관리-도구
편집 파일: App.fk02nb60.js
import{v as p,o as i,c as S,C as c,l as d,x as A,t as g,a as u,k as _,b as m,G as j,E as ae,K as Vt,L as Ft,g as ve,y as fo,M as Nt,n as $e,Y as yo,h as So,H as ft,F as be,J as He,m as xe,T as Fe,f as Se,u as v,D as ko,q as ye}from"./runtime-dom.esm-bundler.h3clfjuw.js";/* empty css */import{b as te,j as de,a as Ge,e as ee,u as _e,ag as We,G as Ye,E as Gt,a7 as Be,M as Me,ah as vo,aa as Ze,g as Ae,v as bo,ai as wo,Z as Co,d as Po,r as zt,K as Eo,f as qt,N as xo,A as Ue,aj as jt,P as $t,C as Xe,t as To,n as Ao}from"./index.jlplx4ex.js";import{a as Lo,C as Io,u as Mo}from"./LicenseKeyBar.hjx3oj2j.js";import{a as Te}from"./allowed.oev11igf.js";import{g as Ne,r as ht}from"./params.k8e95b6q.js";import{C as Ee,a as Je,S as yt,f as St,c as kt,e as Oo,b as Ve,d as st,h as Do}from"./Caret.hnvbzqgq.js";import{G as Pe,P as Bo,F as Ro,d as Ho,S as Uo,O as Ko}from"./constants.hcfrsngk.js";import{C as we}from"./SettingsRow.1l1umqn0.js";import{B as Vo}from"./Checkbox.fww0datn.js";import{G as Fo,a as No}from"./Row.o0q8mn7y.js";import"./translations.b896ab1m.js";import{_ as I}from"./_plugin-vue_export-helper.oebm7xum.js";import{_ as n,a as R}from"./default-i18n.hohxoesu.js";import{C as Oe}from"./Tabs.jvzsqe7o.js";import{C as Le}from"./Index.lexckf3q.js";import{u as vt}from"./MaxCounts.h4dewttr.js";import{u as bt}from"./Tags.bchklxw9.js";import{o as rt,r as Go,p as zo,q as qo,T as Wt,t as nt}from"./postSlug.iva7u65b.js";import{S as Yt}from"./Ellipse.mhzh8c2h.js";import{d as it}from"./debounce.nun852aa.js";import{V as jo,g as $o}from"./helpers.cti0cl6i.js";import{t as At}from"./toFinite.m12yy0up.js";import{u as Zt}from"./TruSeoScore.kirz7zix.js";import{C as Ce}from"./Tooltip.jx4casvt.js";import{S as Wo}from"./Statistics.l9vto0az.js";import{S as Qe,a as wt,g as at,h as Yo,j as Zo,k as Xo,m as Jo,n as Qo,o as es,p as ts,q as os,r as ss,s as rs,t as ns,u as is,v as as,w as ls,x as cs,y as ds,z as us,A as ps,C as ms,D as gs,e as hs,E as _s,F as fs}from"./index.npoectbv.js";import{S as Ct}from"./Plus.e1tf1dpc.js";import{S as et}from"./Eye.jbr17b06.js";import{B as Xt}from"./RadioToggle.h9afcyfi.js";import{C as ys}from"./GoogleSearchPreview.j1gqkkrz.js";import{C as Pt}from"./HtmlTagsEditor.lf2fbwqe.js";import{T as Ss}from"./Slide.dop8j51m.js";import{C as ks}from"./ProBadge.ab6jhp8x.js";import{p as Lt}from"./popup.by9shv56.js";import{l as Re}from"./license.d8rszxb2.js";import{S as vs,a as bs}from"./Mobile.livanyta.js";import{u as ws}from"./vue3-apexcharts.n0h2b4pa.js";import{_ as Cs}from"./ConnectCta.dramn71a.js";import{C as tt}from"./Blur.f3nyx4yc.js";import{C as Et}from"./Index.h6ka6vtn.js";import{G as _t}from"./Graph.nl8drpov.js";import{u as Jt}from"./WpTable.iid7bkmr.js";import{C as Qt}from"./Table.dpnj7vzp.js";import{R as eo}from"./RequiredPlans.kyt85n6a.js";import{a as to}from"./addons.b0mmvdz0.js";import{u as Ps}from"./PostTypes.pd67gy5m.js";import{S as oo}from"./External.lyui8nzf.js";import{S as Es,a as xs,b as Ts}from"./InternalOutbound.gq4sspcu.js";import{u as so}from"./Image.es2mqda0.js";import{t as ro}from"./Editor.fji40euo.js";import{C as As}from"./FacebookPreview.jawxccqo.js";import{C as no}from"./ImageUploader.lcptj1on.js";import{C as Ls}from"./TwitterPreview.vqtawrbw.js";import{S as io}from"./Settings.cshbxeez.js";import{a as ao,S as Is}from"./Build.mjaxpub4.js";import{L as Ms}from"./Redirects.gg0zdho6.js";import{U as Os,S as Ds}from"./Upsell.niv97kks.js";var Bs=Math.floor,Rs=Math.random;function Hs(o,e){return o+Bs(Rs()*(e-o+1))}var Us=parseFloat,Ks=Math.min,Vs=Math.random;function Fs(o,e,r){if(r&&typeof r!="boolean"&&jo(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=At(o),e===void 0?(e=o,o=0):e=At(e)),o>e){var t=o;o=e,e=t}if(r||o%1||e%1){var s=Vs();return Ks(o+s*(e-o+Us("1e-"+((s+"").length-1))),e)}return Hs(o,e)}const ie="all-in-one-seo-pack",Ns={setup(){return{postEditorStore:te()}},components:{BaseCheckbox:Vo,GridColumn:Fo,GridRow:No},data(){return{strings:{useDefaultSettings:n("Use Default Settings",ie),robotsMeta:n("Robots meta:",ie),maxSnippet:n("Max Snippet",ie),maxVideoPreview:n("Max Video Preview",ie),maxImagePreview:n("Max Image Preview",ie),standard:n("Standard",ie),none:n("None",ie),large:n("Large",ie),noindex:n("No Index",ie),nofollow:n("No Follow",ie),noarchive:n("No Archive",ie),notranslate:n("No Translate",ie),noimageindex:n("No Image Index",ie),nosnippet:n("No Snippet",ie),noodp:n("No ODP",ie)}}},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}}},Gs={class:"aioseo-robots-meta"},zs={key:0,class:"global-robots-settings aioseo-description"},qs={class:"robots-meta-title"},js={class:"global-robots-settings-options"},$s={key:0,class:"aioseo-description max-snippet"},Ws={class:"aioseo-description max-video-preview"},Ys={key:1,class:"aioseo-description max-image-preview"};function Zs(o,e,r,t,s,a){const h=p("base-toggle"),l=p("base-checkbox"),y=p("grid-column"),C=p("grid-row"),P=p("base-input"),T=p("base-select");return i(),S("div",Gs,[c(h,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=b=>t.postEditorStore.currentPost.default=b),e[1]||(e[1]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?m("",!0):(i(),S("div",zs,[u("span",qs,g(s.strings.robotsMeta),1),c(C,{class:"settings"},{default:d(()=>[t.postEditorStore.currentPost.isHomePage?m("",!0):(i(),_(y,{key:0,xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=b=>t.postEditorStore.currentPost.noindex=b),e[3]||(e[3]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=b=>t.postEditorStore.currentPost.nofollow=b),e[5]||(e[5]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=b=>t.postEditorStore.currentPost.noarchive=b),e[7]||(e[7]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=b=>t.postEditorStore.currentPost.notranslate=b),e[9]||(e[9]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=b=>t.postEditorStore.currentPost.noimageindex=b),e[11]||(e[11]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=b=>t.postEditorStore.currentPost.nosnippet=b),e[13]||(e[13]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),c(y,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(l,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=b=>t.postEditorStore.currentPost.noodp=b),e[15]||(e[15]=b=>t.postEditorStore.isDirty=!0)]},{default:d(()=>[A(g(s.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",js,[t.postEditorStore.currentPost.nosnippet?m("",!0):(i(),S("div",$s,[u("span",null,g(s.strings.maxSnippet),1),c(P,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=b=>t.postEditorStore.currentPost.maxSnippet=b),e[17]||(e[17]=b=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",Ws,[u("span",null,g(s.strings.maxVideoPreview),1),c(P,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=b=>t.postEditorStore.currentPost.maxVideoPreview=b),e[19]||(e[19]=b=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?m("",!0):(i(),S("div",Ys,[u("span",null,g(s.strings.maxImagePreview),1),c(T,{size:"medium",options:a.imagePreviewOptions,modelValue:a.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=b=>a.saveImagePreview(b.value))},null,8,["options","modelValue"])]))])]))])}const Xs=I(Ns,[["render",Zs]]),he="all-in-one-seo-pack",Js={setup(){return{licenseStore:de(),optionsStore:Ge(),postEditorStore:te()}},components:{CoreAlert:Ee,CoreSettingsRow:we,CoreSingleRobotsMeta:Xs},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:n("Advanced",he),robotsSetting:n("Robots Setting",he),robotsToggle:n("Use Default Settings",he),canonicalUrl:n("Canonical URL",he),placeholder:n("Enter a URL to change the default Canonical URL",he),priorityScore:n("Priority Score",he),priority:n("Priority",he),frequency:n("Frequency",he),priorityFrequencyUpsell:R(n("Priority Score is a %1$s feature. %2$s",he),"PRO",ee.getUpsellLink("post-advanced",Pe.learnMore,"priority-frequency",!0)),keywords:n("Keywords",he),tagPlaceholder:n("Press enter to create a keyword",he)}}},computed:{getPriorityOptions(){return[{label:n("default",he),value:"default"}].concat(Bo)},getFrequencyOptions(){return[{label:n("default",he),value:"default"}].concat(Ro)}},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}}},Qs={class:"aioseo-tab-content aioseo-post-advanced"},er={class:"selectbox-row"},tr={class:"select"},or=u("div",{class:"separator"},[u("span"),A(" - ")],-1),sr={class:"select"},rr=["innerHTML"];function nr(o,e,r,t,s,a){const h=p("core-single-robots-meta"),l=p("core-settings-row"),y=p("base-input"),C=p("base-select"),P=p("core-alert");return i(),S("div",Qs,[c(l,{id:"aioseo-post-robots-setting",name:s.strings.robotsSetting,align:""},{content:d(()=>[c(h)]),_:1},8,["name"]),c(l,{id:"aioseo-post-canonical-url",name:s.strings.canonicalUrl,align:""},{content:d(()=>[c(y,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=T=>t.postEditorStore.currentPost.canonicalUrl=T),e[1]||(e[1]=T=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),c(l,{name:s.strings.priorityScore,align:""},{content:d(()=>[u("div",er,[u("div",tr,[u("span",null,g(s.strings.priority),1),c(C,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getPriorityOptions,modelValue:t.licenseStore.isUnlicensed?a.getPriority("default"):a.getPriority(t.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=T=>t.licenseStore.isUnlicensed?null:a.savePriority(T.value))},null,8,["disabled","options","modelValue"])]),or,u("div",sr,[u("span",null,g(s.strings.frequency),1),c(C,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getFrequencyOptions,modelValue:t.licenseStore.isUnlicensed?a.getFrequency("default"):a.getFrequency(t.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=T=>t.licenseStore.isUnlicensed?null:a.saveFrequency(T.value))},null,8,["disabled","options","modelValue"])])]),t.licenseStore.isUnlicensed?(i(),_(P,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:s.strings.priorityFrequencyUpsell},null,8,rr)]),_:1})):m("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(i(),_(l,{key:0,name:s.strings.keywords,align:""},{content:d(()=>[c(C,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.keywords||[],modelValue:t.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=T=>t.postEditorStore.currentPost.keywords=T),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])}const ir=I(Js,[["render",nr]]),ar={setup(){return{licenseStore:de(),rootStore:_e()}},components:{CoreApiBar:Lo,CoreLicenseKeyBar:Io}};function lr(o,e,r,t,s,a){const h=p("core-api-bar"),l=p("core-license-key-bar");return i(),S("div",null,[t.rootStore.pong?m("",!0):(i(),_(h,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(i(),_(l,{key:1})):m("",!0)])}const lo=I(ar,[["render",lr]]),cr={emits:["next","previous"],setup(){return{truSeoHighlighterStore:We()}},components:{SvgEllipse:Yt,SvgCaret:Je,SvgClose:yt},data(){return{error:this.truSeoHighlighterStore.highlightAnalyzerHasError,order:this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1,total:this.truSeoHighlighterStore.highlightMarks.length}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},dr=o=>(Vt("data-v-6d6404ce"),o=o(),Ft(),o),ur={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},pr={class:"tru-seo-highlight-popover__count"},mr=dr(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),gr={class:"tru-seo-highlight-popover__nav"},hr=["disabled"],_r=["disabled"],fr={class:"tru-seo-highlight-popover__close"};function yr(o,e,r,t,s,a){const h=p("svg-ellipse"),l=p("svg-caret"),y=p("svg-close");return i(),S("div",ur,[u("div",{class:j(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":s.error}])},[c(h,{width:"8"})],2),u("div",pr,[u("span",null,g(s.order)+"/"+g(s.total),1)]),mr,u("div",gr,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:s.order===1,onClick:e[0]||(e[0]=ae(C=>o.$emit("previous"),["stop","exact"]))},[c(l,{width:"20"})],8,hr),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:s.order===s.total,onClick:e[1]||(e[1]=ae(C=>o.$emit("next"),["stop","exact"]))},[c(l,{width:"20"})],8,_r)]),u("div",fr,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=ae((...C)=>a.close&&a.close(...C),["stop","exact"]))},[c(y,{width:"10"})],32)])])}const Sr=I(cr,[["render",yr],["__scopeId","data-v-6d6404ce"]]),kr=()=>{var O,D,Y,H;const o=ve(null),e=ve({}),r=Ye(),t=Gt(),s=(D=(O=window==null?void 0:window.wp)==null?void 0:O.data)==null?void 0:D.select("core/block-editor"),a=(H=(Y=window==null?void 0:window.wp)==null?void 0:Y.data)==null?void 0:H.select("core/edit-post"),h=ve(null),l=We(),y=f=>{var w,L,M,U,V,B;let E="content";(L=(w=f.block)==null?void 0:w.attributes)!=null&&L.caption?E="caption":(U=(M=f.block)==null?void 0:M.attributes)!=null&&U.value?E="value":(B=(V=f.block)==null?void 0:V.attributes)!=null&&B.citation&&(E="citation"),l.dispatchAnnotations.__experimentalAddAnnotation({id:f.id,range:f.range,source:l.source,blockClientId:f.block.clientId,richTextIdentifier:E})},C=(f,E)=>{if(!E)return!1;!E.hasFocus()&&r&&E.focus();let w=E.selection.win.getSelection();w.selectAllChildren(f.parent);const L=w.toString().length;if(f.range.end<L)for(let M=f.range.end;M<L;M++)w.modify("extend","backward","character");if(0<f.range.start){w=Go(w);for(let M=f.range.start;0<M;M--)w.modify("extend","forward","character")}E.undoManager.ignore(()=>{E.annotator.annotate(l.source,{uid:f.id})}),w.empty()},P=()=>{if(l.clearHighlightPopover(),l.sanitizeHighlightMarks(),!l.activeMark)return!1;const f=yo({name:"TruSeoHighlightPopover",render(){return So(Sr,{onNext(){X(1)},onPrevious(){X(-1)}})}}),E=qo(),w=new ResizeObserver(it(re,750)),L=k("wrapper");if(!L)return!1;L.parentElement.appendChild(E),f.mount(E),w.observe(k("wrapper"),{box:"border-box"}),l.highlightPopover.app=f,l.highlightPopover.node=E,l.highlightPopover.observer=w,re()},T=()=>{l.toggleHighlightAnalyzer(null),l.allowHighlighting=!1},b=({block:f,node:E})=>{var L,M,U,V;let w="";return E?w=E.outerText.replace(/\n\n/g,` `):f&&(w=((L=f==null?void 0:f.attributes)==null?void 0:L.content)||((M=f==null?void 0:f.attributes)==null?void 0:M.caption)||((U=f==null?void 0:f.attributes)==null?void 0:U.value)||((V=f==null?void 0:f.attributes)==null?void 0:V.citation)||"",w=w.replace(/<br[^>]*>/gi,` `),w=vo(w)),zo(w)},k=f=>{var E;if(f==="closest-relative")return rt({element:k("wrapper").parentElement,property:"position",value:"relative"});if(f==="navigable")return rt({element:k("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(f==="wrapper")return document.getElementById("content_ifr");if(f==="first-block")return((E=h.value.getBody())==null?void 0:E.firstElementChild)||{}}if(r){if(f==="wrapper")return document.querySelector(".editor-styles-wrapper");if(f==="first-block"){const w=s.getBlocks()[0];return document.getElementById(`block-${w==null?void 0:w.clientId}`)||{}}}},x=()=>{var f;for(const E of s.getBlocks()||[]){if(E.name==="core/freeform"){const w=window.tinymce.get(`editor-${E.clientId}`),L=((f=w.getBody())==null?void 0:f.children)||[];if(!L.length)continue;me(w);for(const M of L)W({block:E,node:M});continue}W({block:E,node:null})}for(const[E,w]of Object.entries(l.highlightMarks))K(w.parent,parseInt(E)===l.highlightMarks.length-1),w.block.name==="core/freeform"?C(w,window.tinymce.get(`editor-${w.block.clientId}`)):y(w)},z=()=>{var E;const f=((E=h.value.getBody())==null?void 0:E.children)||[];if(!f.length)return!1;me(h.value);for(const w of f)W({block:null,node:w});for(const[w,L]of Object.entries(l.highlightMarks))K(L.parent,parseInt(w)===l.highlightMarks.length-1),C(L,h.value)},X=f=>{const E=l.highlightMarks.findIndex(w=>w.active);if(!l.highlightMarks[E+f])return!1;l.allowScrolling=!0,l.highlightMarks[E].active=!1,l.highlightMarks[E+f].active=!0,P()},ue=f=>{var U,V;const E=()=>{f.preventDefault(),f.clipboardData.setData("text/html",window.getSelection().toString())},w=window.getSelection()||{};if(!(w!=null&&w.rangeCount))return!1;const L=((U=f.clipboardData)==null?void 0:U.getData("text/html"))||"";if(L&&L.indexOf(l.source)!==-1)return E(),!1;const M=w.getRangeAt(0)||{};for(const B of Object.values(((V=M==null?void 0:M.cloneContents())==null?void 0:V.children)||[]))if(Object.values((B==null?void 0:B.classList)||[]).some(oe=>oe.endsWith(l.source)))return E(),!1},pe=f=>{var U,V;const E=(B,oe)=>{B.collapse(oe.firstChild,oe.firstChild.length),B.deleteFromDocument()};if(["Delete","Backspace"].indexOf(f.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,M=((V=w==null?void 0:w.anchorNode)==null?void 0:V.nextElementSibling)||null;Object.values((L==null?void 0:L.classList)||[]).some(B=>B.endsWith(l.source))?E(w,L):Object.values((M==null?void 0:M.classList)||[]).some(B=>B.endsWith(l.source))&&E(w,M)},se=()=>{var E;o.value=new MutationObserver(w=>{let L=!1;for(const M of w)for(const U of(M==null?void 0:M.removedNodes)||[])(l.highlightMarks.some(V=>U.isEqualNode(V.parent))||Object.values((U==null?void 0:U.classList)||[]).some(V=>V.endsWith(l.source)))&&(L=!0);L&&fe()});const f=(E=k("first-block"))==null?void 0:E.parentElement;if(typeof f!="object")return!1;o.value.observe(f,{attributes:!1,childList:!0,subtree:!0})},K=(f,E=!1)=>{const w=(M,U)=>{var V;U.disconnect();for(const B of M){if(Object.values(((V=B==null?void 0:B.target)==null?void 0:V.classList)||[]).some(oe=>oe.endsWith(l.source))){F(B.target);continue}for(const oe of(B==null?void 0:B.addedNodes)||[])if(Object.values((oe==null?void 0:oe.classList)||[]).some(ge=>ge.endsWith(l.source))){F(oe);break}}E&&$e().then(()=>it(P,250)())};if(typeof(f==null?void 0:f.parentElement)!="object")return!1;new MutationObserver(w).observe(f,{attributes:!0,childList:!0,subtree:!0})},$=()=>{const f=E=>{var w,L,M;for(const U of E){if((U==null?void 0:U.type)!=="attributes")continue;if(!rt({element:(w=k("wrapper"))==null?void 0:w.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||r&&(a.getEditorMode()!=="visual"||s.getBlockMode((L=s.getSelectedBlock())==null?void 0:L.clientId)==="html")||t&&(J(),((M=document.getElementById("content"))==null?void 0:M.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return T(),!1;l.allowHighlighting=!0}};l.wpBodyContentObserver=new MutationObserver(it(f,250)),l.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},me=f=>{f.annotator.register(l.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${l.source}`]})})},re=(f=[])=>{var ge;if(!l.activeMark||!l.highlightPopover.node)return!1;for(const _o of f)if(JSON.stringify(_o.contentRect)===JSON.stringify(e))return!1;f.length&&(e.value=((ge=f[0])==null?void 0:ge.contentRect)||e,l.allowScrolling=!1);const E=l.activeMark.node.getBoundingClientRect(),w=k("wrapper").getBoundingClientRect(),L=k("closest-relative").getBoundingClientRect(),M=k("first-block").getBoundingClientRect(),[U,V]=[140,32];let B=E.top,oe=M.left-L.left;U<oe?(l.highlightPopover.node.style.top=B-L.top+"px",l.highlightPopover.node.style.transform="translate(-105%, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(B=B-V-L.top,B=t?B+w.top:B,oe=t?oe+w.left:oe,l.highlightPopover.node.style.top=B+"px",l.highlightPopover.node.style.transform="translate(0, 0)",l.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),l.highlightPopover.node.style.left=oe+"px",N()},fe=()=>{var f;window.removeEventListener("copy",ue),window.removeEventListener("keyup",pe),(f=o.value)==null||f.disconnect(),l.clearAll(),$e().then(()=>{if(!l.highlightSentences)return l.toggleHighlightAnalyzer(null),!1;r&&x(),t&&z(),se(),window.addEventListener("copy",ue),window.addEventListener("keyup",pe)})},N=()=>{$e().then(()=>{var w,L,M,U;if(!l.allowScrolling)return!1;l.activeMark.node.scrollIntoView();let f=k("navigable"),E=f.scrollTop-60;t&&(E-=((L=(w=document.querySelector("#wp-content-editor-tools"))==null?void 0:w.getBoundingClientRect())==null?void 0:L.height)||0,E-=((U=(M=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:M.getBoundingClientRect())==null?void 0:U.height)||0),f.isEqualNode(document.documentElement)&&(f=window),f.scrollTo({top:E}),l.allowScrolling=!1})},F=f=>{const E=l.highlightMarks.findIndex(w=>f.hasAttribute("data-mce-annotation-uid")?f.dataset.mceAnnotationUid.indexOf(w.id)!==-1:f.id.indexOf(w.id)!==-1);E!==-1&&(l.highlightMarks[E].node=f,f.style.backgroundColor="#cce0ff")},W=({block:f,node:E})=>{const w=b({block:f,node:E});if(w)for(const[L,M]of Object.entries(l.highlightSentences||{})){const U=new RegExp(Me(M),"g");let V;for(;(V=U.exec(w))!==null&&!l.highlightMarks.find(ge=>ge.sentenceIndex===L);){const B={start:V.index,end:V.index+V[0].length||1};l.highlightMarks.find(ge=>E?(ge.range.start===B.start||ge.range.end===B.end)&&ge.parent.isEqualNode(E):(ge.range.start===B.start||ge.range.end===B.end)&&ge.block.clientId===f.clientId)||l.highlightMarks.push({id:Fs(1,999999999),range:B,block:f,parent:E||document.getElementById(`block-${f.clientId}`),node:null,active:l.highlightMarks.length===0,sentenceIndex:L})}}if(f)for(const L of(f==null?void 0:f.innerBlocks)||[])W({block:L,node:null})},J=()=>{if(h.value)return!1;const f=window.setInterval(()=>{var E;if(h.value=((E=window==null?void 0:window.tinymce)==null?void 0:E.get("content"))||null,!h.value)return!1;window.clearInterval(f),h.value.dom.addStyle(` span.annotation-text.annotation-text-${l.source} { background-color: #CCE0FF; border-radius: 4px; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},G=(f,E)=>{const w=JSON.stringify(f),L=JSON.stringify(E);w!==L&&fe()};return fo(()=>{var E;l.wpBodyContentObserver&&((E=l.wpBodyContentObserver)==null||E.disconnect());const f=window.setInterval(()=>{typeof k("wrapper")=="object"&&(window.clearInterval(f),$())},1e3)}),Nt(()=>{if((Be()||!r&&!t)&&(l.enabled=!1),r&&(!l.dispatchAnnotations||!s||!a)&&(l.enabled=!1),!l.enabled)return!1}),{watchHighlightSentences:G}},vr="all-in-one-seo-pack",br={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Ze()}},components:{CoreTooltip:Ce,SvgPencil:St,SvgStatistics:Wo,SvgTrash:Qe},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:n("Delete",vr)}}},computed:{scoreClass(){return 80<this.score?"score-green":50<this.score?"score-orange":1<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}}},wr={class:"aioseo-keyphrase-tag"},Cr={key:0,class:"aioseo-edit-keyphrase-tag"},Pr=["value"];function Er(o,e,r,t,s,a){const h=p("svg-pencil"),l=p("svg-statistics"),y=p("svg-trash"),C=p("core-tooltip");return i(),S("div",wr,[u("span",{class:j(["aioseo-add-keyphrase-tag",s.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=P=>a.toggleKeyphrasesPanel(r.index))},g(r.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=P=>a.editKeyphraseEv(r.index))},[c(h)]),u("a",{href:"#",onClick:e[2]||(e[2]=ae(P=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:!0}),["prevent","exact"])),class:"btn-keyword-rank-tracker"},[c(l,{width:"20"})]),u("span",{class:j(["keyphrase-score",a.scoreClass]),onClick:e[3]||(e[3]=P=>a.toggleKeyphrasesPanel(r.index))},g(r.score)+"/100",3)],2),s.edit?(i(),S("span",Cr,[u("input",{value:r.keyphrase,onBlur:e[4]||(e[4]=(...P)=>a.closeEdit&&a.closeEdit(...P)),onKeydown:e[5]||(e[5]=ft((...P)=>a.pressEnter&&a.pressEnter(...P),["enter"]))},null,40,Pr),u("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=P=>a.deleteKeyphraseEv(r.index))},[c(C,{type:"action"},{tooltip:d(()=>[A(g(s.strings.delete),1)]),default:d(()=>[c(y)]),_:1})])])):m("",!0)])}const co=I(br,[["render",Er]]),xr={},Tr={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Ar=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),Lr=[Ar];function Ir(o,e){return i(),S("svg",Tr,Lr)}const Mr=I(xr,[["render",Ir]]),It="all-in-one-seo-pack",Or={setup(){return{truSeoHighlighterStore:We()}},components:{CoreTooltip:Ce,SvgEye:et,SvgEyeFilled:Mr},props:{analyzer:String},data(){return{strings:{highlightSections:n("Highlight sections in the Editor",It),highlightingIsDisabled:n("Highlighting is disabled for current view",It)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Dr=["disabled"];function Br(o,e,r,t,s,a){const h=p("svg-eye"),l=p("core-tooltip"),y=p("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(i(),S("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=ae(C=>a.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==r.analyzer?(i(),_(l,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:d(()=>[A(g(t.truSeoHighlighterStore.allowHighlighting?s.strings.highlightSections:s.strings.highlightingIsDisabled),1)]),default:d(()=>[c(h,{width:"16",height:"16"})]),_:1},8,["offset"])):(i(),_(y,{key:1,width:"16",height:"16"}))],8,Dr)):m("",!0)}const Rr=I(Or,[["render",Br]]),Hr={components:{SvgCaret:Je,SvgCircleCheck:kt,SvgCircleClose:Oo,TruSeoToggleHighlighter:Rr},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(o){o.target.parentElement.classList.toggle("toggled")}}},Ur={class:"aioseo-analysis-detail"},Kr={key:0},Vr={class:"title__text"},Fr={class:"description"};function Nr(o,e,r,t,s,a){const h=p("svg-circle-check"),l=p("svg-circle-close"),y=p("tru-seo-toggle-highlighter"),C=p("svg-caret");return i(),S("ul",Ur,[(i(!0),S(be,null,He(r.analysisItems,(P,T)=>{var b;return i(),S(be,{key:T},[P.title?(i(),S("li",Kr,[u("p",{class:j(["title",P.error===0?"toggled":""])},[P.error===0?(i(),_(h,{key:0,width:"16"})):m("",!0),P.error===1?(i(),_(l,{key:1,width:"16"})):m("",!0),u("span",Vr,g(P.title),1),(b=P==null?void 0:P.highlightSentences)!=null&&b.length?(i(),_(y,{key:2,analyzer:T},null,8,["analyzer"])):m("",!0),c(C,{width:"16",role:"button",onClick:ae(a.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),u("p",Fr,g(P.description),1)])):m("",!0)],64)}),128))])}const ot=I(Hr,[["render",Nr]]),ze="all-in-one-seo-pack",Gr={setup(){return{licenseStore:de(),postEditorStore:te(),rootStore:_e(),truSeo:new Wt}},components:{CoreAlert:Ee,CoreKeyphrase:co,CoreLoader:Ve,SvgCirclePlus:Ct,metaboxAnalysisDetail:ot},data(){return{selectedKeyphrase:0,strings:{additional:n("Additional Keyphrases",ze),addKeyphrase:n("Add Additional Keyphrases",ze),keyphraseDocumentation:n("Improve your SEO rankings with additional keyphrases.",ze),upsell:R(n("Additional Keyphrases are a %1$s feature. %2$s",ze),"PRO",ee.getUpsellLink("post-settings",Pe.learnMore,"additional-keywords",!0))}}},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 r;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium");if(e.value){const t={keyphrase:e.value,score:0},s=this.postEditorStore.currentPost.keyphrases.additional.push(t),a=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(r=a[s])==null||r.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})}}},zr={class:"additional-keyphrases-panel"},qr={key:0},jr={class:"analysis-wrapper"},$r={class:"aioseo-description additional-keyphrases-description"},Wr=["innerHTML"];function Yr(o,e,r,t,s,a){const h=p("core-keyphrase"),l=p("core-loader"),y=p("metaboxAnalysisDetail"),C=p("base-input"),P=p("svg-circle-plus"),T=p("base-button"),b=p("core-alert");return i(),S("div",zr,[t.postEditorStore.currentPost.keyphrases.additional&&t.postEditorStore.currentPost.keyphrases.additional.length&&t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),S("div",qr,[(i(!0),S(be,null,He(t.postEditorStore.currentPost.keyphrases.additional,(k,x)=>(i(),_(h,{key:x,index:x,keyphrase:k.keyphrase,score:k.score,onSaved:a.onSaved,onDeleted:a.onDeleted,onSelectedKeyphrase:a.onSelectedKeyphrase,class:j(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===x?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",jr,[t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(l,{key:0,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(y,{key:1,analysisItems:t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].analysis},null,8,["analysisItems"])):m("",!0)])])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),_(C,{key:1,size:"medium",class:j(`add-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:ft(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),_(T,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:d(()=>[c(P,{width:"14",height:"14"}),A(" "+g(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.rootStore.isPro||!t.licenseStore.license.isActive?(i(),S(be,{key:3},[u("div",$r,g(s.strings.keyphraseDocumentation),1),c(b,{class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:s.strings.upsell},null,8,Wr)]),_:1})],64)):m("",!0)])}const Zr=I(Gr,[["render",Yr],["__scopeId","data-v-76e100c0"]]),Xr=""+window.__aioseoDynamicImportPreload__("images/open-ai.ofcdxr9l.png"),ne="all-in-one-seo-pack",Jr={setup(){return{getAssetUrl:$o,settingsStore:Ae(),links:ee}},components:{CoreModal:Le},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:Xr,strings:{upgradeToPro:n("Unlock AI Generator",ne),learnMoreLink:R('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',ee.getUpsellUrl("post-settings","general","open-ai"),n("Learn more about all the features",ne),ee.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?R(n("Generate New SEO %1$s",ne),n("Title",ne)):R(n("Generate New SEO %1$s",ne),n("Description",ne))},ctaHeaderTitle(){return this.type==="title"?R(n("Generating SEO %1$s is a Pro Feature",ne),n("Titles",ne)):R(n("Generating SEO %1$s is a Pro Feature",ne),n("Descriptions",ne))},ctaDescription(){return this.type==="title"?R(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.",ne),n("titles",ne),n("title",ne)):R(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.",ne),n("meta descriptions",ne),n("description",ne))}}},Qr={class:"cta"},en=["src"],tn={class:"bottom"},on={class:"title"},sn=["innerHTML"];function rn(o,e,r,t,s,a){const h=p("base-button"),l=p("core-modal");return i(),_(l,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=y=>t.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:d(()=>[A(g(a.headerTitle),1)]),body:d(()=>[u("div",Qr,[u("img",{src:t.getAssetUrl(s.OpenAiImage),alt:"open-ai-upsell"},null,8,en),u("div",tn,[u("div",null,[u("p",on,g(a.ctaHeaderTitle),1),u("p",null,g(a.ctaDescription),1)]),u("div",null,[c(h,{type:"green",size:"medium",tag:"a",href:t.links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:d(()=>[A(g(s.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:s.strings.learnMoreLink},null,8,sn)])])])]),_:1})}const nn=I(Jr,[["render",rn]]),an={},ln={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},cn=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),dn=[cn];function un(o,e){return i(),S("svg",ln,dn)}const pn=I(an,[["render",un]]),mn="all-in-one-seo-pack",gn={setup(){return{settingsStore:Ae()}},components:{AiModal:nn,CoreTooltip:Ce,SvgAiRobot:pn},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:n("Use AI Generator",mn)}}}},hn={class:"aioseo-ai-generator"};function _n(o,e,r,t,s,a){const h=p("svg-ai-robot"),l=p("core-tooltip"),y=p("ai-modal");return i(),S("div",hn,[c(l,{type:"action",offset:"-30px,0"},{tooltip:d(()=>[A(g(s.strings.useAiGenerator),1)]),default:d(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=C=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[c(h,{onClick:e[0]||(e[0]=C=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))})])]),_:1}),c(y,{show:t.settingsStore.modals.aiGenerator===r.type,type:r.type},null,8,["show","type"])])}const fn=I(gn,[["render",_n]]),yn={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,strings:t}=Zt();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,settingsStore:Ae(),strings:t}},components:{CoreTooltip:Ce,SvgCaret:Je,SvgCircleCheck:kt,SvgCircleQuestionMark:wt,SvgEllipse:Yt,TransitionSlide:Ss},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)}},Sn={class:"aioseo-card aioseo-sidebar-card"},kn={class:"text"},vn={key:0,class:"content"},bn={key:1,class:"content"};function wn(o,e,r,t,s,a){const h=p("svg-ellipse"),l=p("svg-circle-check"),y=p("svg-circle-question-mark"),C=p("core-tooltip"),P=p("svg-caret"),T=p("transition-slide");return i(),S("div",Sn,[r.hideHeader?m("",!0):(i(),S("div",{key:0,class:"header",onClick:e[0]||(e[0]=b=>t.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[u("div",kn,[xe(o.$slots,"header",{},()=>[A(g(r.headerText),1)]),r.focusScore>=0?xe(o.$slots,"alt",{key:0},()=>[r.focusScore!==null?(i(),S("span",{key:0,class:j(["card-score",t.getScoreClass(r.focusScore)])},g(r.focusScore)+"/100 ",3)):m("",!0)]):m("",!0),r.trueSeoScore>=0?xe(o.$slots,"alt",{key:1},()=>[u("span",{class:j(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(i(),_(h,{key:0,width:"6"})):m("",!0),r.trueSeoScore===0?(i(),_(l,{key:1,width:"12"})):m("",!0),A(" "+g(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):m("",!0),o.$slots.tooltip?(i(),_(C,{key:2},{tooltip:d(()=>[xe(o.$slots,"tooltip")]),default:d(()=>[c(y)]),_:3})):m("",!0)]),r.toggles&&t.settingsStore.settings.toggledCards?(i(),_(P,{key:0,class:j({rotated:!t.settingsStore.settings.toggledCards[r.slug]})},null,8,["class"])):m("",!0)])),t.settingsStore.settings.toggledCards||r.noSlide?(i(),_(T,{key:1,active:t.settingsStore.settings.toggledCards[r.slug]&&r.toggles||r.noSlide},{default:d(()=>[o.$slots["before-tabs"]?(i(),S("div",vn,[xe(o.$slots,"before-tabs")])):m("",!0),xe(o.$slots,"tabs"),o.$slots.default?(i(),S("div",bn,[xe(o.$slots,"default")])):m("",!0)]),_:3},8,["active"])):m("",!0)])}const Cn=I(yn,[["render",wn]]),Pn={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 a=s.x===0?0:s.x/o,h=s.y===0?0:s.y/e,l=a*this.width,y=r-h*r+this.strokeWidth;return`${l},${y}`}).join(" ");return`0,${r+this.strokeWidth} `+t+` ${this.width},${r+this.strokeWidth}`}}},En=["width","height","viewBox"],xn=["fill","points"],Tn=["stroke","strokeWidth","points"];function An(o,e,r,t,s,a){return i(),S("svg",{width:r.width,height:r.height,viewBox:a.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:r.fillColor,points:a.polylinePoints},null,8,xn),u("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:a.polylinePoints},null,8,Tn)],8,En)}const Ln=I(Pn,[["render",An]]),In={},Mn={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},On=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),Dn=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),Bn=[On,Dn];function Rn(o,e){return i(),S("svg",Mn,Bn)}const Hn=I(In,[["render",Rn]]),q="all-in-one-seo-pack",Un={setup(){return{connectStore:bo(),licenseStore:de(),optionsStore:Ge(),postEditorStore:te(),rootStore:_e(),semrushStore:wo(),truSeo:new Wt}},components:{CoreAlert:Ee,CoreKeyphrase:co,CoreLoader:Ve,CoreModal:Le,CoreTooltip:Ce,SvgAreaChart:Ln,SvgCircleCheck:kt,SvgCirclePlus:Ct,SvgLogoSemrush:Hn,SvgTrash:Qe,metaboxAnalysisDetail:ot},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:{value:"US",label:"United States of America - US"},strings:{modalTitle:R(n("Additional Keyphrases by %1$s",q),"Semrush"),addKeyphrase:n("Add Focus Keyphrase",q),getAdditionalKeyphrases:n("Get Additional Keyphrases",q),showResultsFor:n("Show Results For:",q),keyphrase:n("Keyphrase",q),volume:n("Volume",q),trend:n("Trend",q),addAdditionalKeyphrase:n("Add Keyphrase",q),removeAdditionalKeyphrase:n("Remove Keyphrase",q),noResults:n("No results",q),upsell:R(n("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",q),"Semrush","<strong>AIOSEO Pro</strong>",ee.getUpsellLink("semrush-keywords",Pe.learnMore,null,!0)),semrushGetAdditionalKeyphrases:R(n("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",q),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:n("To use this feature, first add a focus keyphrase.",q),focusKeyphrase:n("Focus Keyphrase",q),delete:n("Delete",q),semrushTooltip:R(n("Get Additional Keyphrases with %1$s!",q),"Semrush"),semrushTooltipLicenseKey:R(n("%1$sA valid license key is required%2$s in order to connect with %3$s.",q),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:R(n("You have exceeded the number of requests allowed by your %1$s plan.",q),"Semrush"),inOrderToUpgradeSemrush:R(n("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",q),ee.getUpsellLink("semrush-pricing",Pe.learnMore,"semrushPricing",!0))}}},watch:{semrushCountry:{deep:!0,handler(){this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?n("You have exceeded the limit for requests. Please try again later.",q):n("An error occurred while fetching keyphrases. Please try again later.",q)},semrushDatabase(){return Ho.map(o=>(o.value==="GB"&&(o.value="UK",o.label="United Kingdom"),o.value==="KR"&&(o.label="South Korea"),o)).filter(o=>Uo.includes(o.value.toLowerCase())).map(o=>(o.label=o.label+" - "+o.value.toUpperCase(),o))}},methods:{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){Lt(o,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(o){Lt(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(){this.loadingResults=!0,this.semrushStore.getKeyphrases(this.semrushCountry.value).then(()=>{this.loadingResults=!1}).catch(o=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(o.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:a}=o;if(!(a!=="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=Ne(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 80<o?"score-green":50<o?"score-orange":1<o?"score-red":"score-none"},async addAdditionalKeyphrase(o,e){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(){const o=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&o.push(this.semrushStore.refresh())}},Kn={class:"aioseo-focus-keyphrase-panel"},Vn={class:"disabled-button gray medium"},Fn={class:"disabled-button gray"},Nn=["innerHTML"],Gn={class:"aioseo-modal-content has-padding"},zn={class:"aioseo-settings-row"},qn={class:"settings-name"},jn={class:"name"},$n={class:"results"},Wn={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Yn={class:"keyphrases-header"},Zn={class:"keyphrase"},Xn={class:"keyphrase-volume"},Jn={class:"keyphrase-trend"},Qn={key:0,class:"keyphrase-actions"},ei={class:"keyphrases-rows"},ti={class:"keyphrase"},oi={class:"keyphrase-volume"},si={class:"keyphrase-trend"},ri={key:0,class:"keyphrase-actions"},ni={key:0,class:"focus-keyphrase"},ii={key:1},ai={key:1,class:"remove-keyphrase"},li=["onClick"],ci={key:1,class:"keyphrase-row"},di=["colspan"],ui={key:1},pi={class:"semrush-logo"},mi={class:"semrush-upsell"},gi=["innerHTML"],hi=["innerHTML"];function _i(o,e,r,t,s,a){const h=p("base-input"),l=p("svg-circle-plus"),y=p("base-button"),C=p("core-tooltip"),P=p("core-keyphrase"),T=p("core-loader"),b=p("metaboxAnalysisDetail"),k=p("core-alert"),x=p("base-select"),z=p("svg-area-chart"),X=p("svg-circle-check"),ue=p("svg-trash"),pe=p("svg-logo-semrush"),se=p("core-modal");return i(),S("div",Kn,[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(h,{key:0,size:"medium",class:j(`add-focus-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:ft(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),u("div",{class:j(`add-focus-keyphrase-${o.$root.$data.screenContext}-button`)},[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(y,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:d(()=>[c(l,{width:"14",height:"14"}),A(" "+g(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(C,{key:1},{tooltip:d(()=>[u("span",null,g(s.strings.semrushGetAdditionalKeyphrases)+" "+g(s.strings.pleaseAddFocusKeyphrase),1)]),default:d(()=>[u("div",Vn,[c(l,{width:"14",height:"14"}),A(" "+g(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0)],2),t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(P,{key:1,index:0,keyphrase:t.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:t.postEditorStore.currentPost.keyphrases.focus.score,onSaved:a.onSaved,onDeleted:a.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):m("",!0),t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus?(i(),_(T,{key:2,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(b,{key:3,analysisItems:t.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.rootStore.isPro&&t.licenseStore.isUnlicensed?(i(),_(C,{key:4},{tooltip:d(()=>[u("span",{innerHTML:s.strings.semrushTooltipLicenseKey},null,8,Nn)]),default:d(()=>[u("div",Fn,[c(l,{width:"14",height:"14"}),A(" "+g(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.rootStore.isPro||!t.licenseStore.isUnlicensed)?(i(),_(C,{key:5,disabled:!s.showSemrushTooltip||t.rootStore.isPro,"force-show":s.showSemrushTooltip&&!t.rootStore.isPro},{tooltip:d(()=>[u("span",null,g(s.strings.semrushTooltip),1)]),default:d(()=>[c(y,{class:"add-keyphrase gray medium",onClick:a.getAdditionalKeyphrases},{default:d(()=>[c(l,{width:"14",height:"14"}),A(" "+g(s.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):m("",!0),c(se,{show:s.semrushShowModal,onClose:e[1]||(e[1]=K=>s.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:d(()=>[A(g(s.strings.modalTitle),1)]),body:d(()=>[u("div",Gn,[t.licenseStore.isUnlicensed?(i(),_(k,{key:0,type:"blue",innerHTML:s.strings.upsell},null,8,["innerHTML"])):m("",!0),u("div",zn,[u("div",qn,[u("div",jn,g(s.strings.showResultsFor),1)]),c(x,{class:"semrush-country-selector",size:"medium",options:a.semrushDatabase,placeholder:s.strings.selectPriceIndicator,modelValue:s.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=K=>s.semrushCountry=K)},null,8,["options","placeholder","modelValue"])]),u("div",$n,[u("table",Wn,[u("thead",null,[u("tr",Yn,[u("th",Zn,g(s.strings.keyphrase),1),u("th",Xn,g(s.strings.volume),1),u("th",Jn,g(s.strings.trend),1),t.licenseStore.isUnlicensed?m("",!0):(i(),S("th",Qn))])]),u("tbody",ei,[t.semrushStore.results.length&&!s.loadingResults?(i(!0),S(be,{key:0},He(t.semrushStore.results,(K,$)=>(i(),S("tr",{class:j(["keyphrase-row",{even:$%2===0}]),key:$},[u("td",ti,g(K[0]),1),u("td",oi,g(K[1]),1),u("td",si,[c(z,{width:66,height:24,data:a.transformTrendDataToChartPoints(K[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),t.licenseStore.isUnlicensed?m("",!0):(i(),S("td",ri,[K[0]===t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),S("div",ni,[c(X),A(" "+g(s.strings.focusKeyphrase),1)])):m("",!0),K[0]!==t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),S("div",ii,[$!==s.removingAdditionalKeyphrase&&($===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(K[0]))?(i(),_(y,{key:0,type:"gray",size:"medium",onClick:me=>a.addAdditionalKeyphrase(K[0],$),loading:$===s.addingAdditionalKeyphrase},{default:d(()=>[A(g(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):m("",!0),a.getAdditionalKeyphrase(K[0])&&$!==s.addingAdditionalKeyphrase&&($===s.removingAdditionalKeyphrase||a.hasAdditionalKeyphrase(K[0]))?(i(),S("div",ai,[u("span",{class:j(["keyphrase-score",a.scoreClass(a.getAdditionalKeyphrase(K[0]).score)]),onClick:me=>a.goToAdditionalKeyphrase(K[0])},g(a.getAdditionalKeyphrase(K[0]).score)+"/100",11,li),c(C,{type:"action"},{tooltip:d(()=>[A(g(s.strings.delete),1)]),default:d(()=>[c(ue,{onClick:me=>a.removeAdditionalKeyphrase(K[0],$)},null,8,["onClick"])]),_:2},1024)])):m("",!0)])):m("",!0)]))],2))),128)):m("",!0),!t.semrushStore.results.length||s.loadingResults?(i(),S("tr",ci,[u("td",{colspan:t.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[s.loadingResults?(i(),_(T,{key:0,dark:""})):m("",!0),!s.loadingResults&&!t.semrushStore.error?(i(),S("span",ui,g(s.strings.noResults),1)):m("",!0),t.semrushStore.error&&!t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),_(k,{key:2,type:"red"},{default:d(()=>[A(g(a.semrushError),1)]),_:1})):m("",!0),t.semrushStore.error&&t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),S(be,{key:3},[u("div",pi,[c(pe)]),u("div",mi,[u("span",null,[u("strong",{innerHTML:s.strings.youHaveExceededSemrush},null,8,gi)]),A(" "+g(" ")+" "),u("span",{innerHTML:s.strings.inOrderToUpgradeSemrush},null,8,hi)])],64)):m("",!0)])],8,di)])):m("",!0)])])])])]),_:1},8,["show"])])}const fi=I(Un,[["render",_i]]),qe="all-in-one-seo-pack",yi={setup(){return{postEditorStore:te(),rootStore:_e()}},components:{CoreAlert:Ee,CoreMainTabs:Oe,metaboxAnalysisDetail:ot},data(){return{initTab:"basic",tabs:[{slug:"basic",name:n("Basic SEO",qe)},{slug:"title",name:n("Title",qe)},{slug:"readability",name:n("Readability",qe)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){if(!Ye()||!["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 R(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.",qe),o,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},Si={class:"page-analysis-panel"},ki=["innerHTML"];function vi(o,e,r,t,s,a){const h=p("core-alert"),l=p("core-main-tabs"),y=p("metaboxAnalysisDetail");return i(),S("div",Si,[a.pageBuilderAlert?(i(),_(h,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:a.pageBuilderAlert},null,8,ki)]),_:1})):m("",!0),c(l,{tabs:a.parseTabs,showSaveButton:!1,active:s.initTab,internal:"",onChanged:e[0]||(e[0]=C=>a.processChangeTab(C))},null,8,["tabs","active"]),c(Fe,{mode:"out-in"},{default:d(()=>[t.postEditorStore.currentPost.page_analysis?(i(),_(y,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[s.initTab]},null,8,["analysisItems"])):m("",!0)]),_:1})])}const bi=I(yi,[["render",vi]]),je="all-in-one-seo-pack",wi={emits:["changeTab"],setup(){return{licenseStore:de(),postEditorStore:te(),hasRequiredFeature:Re.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:Pe,links:ee}},components:{CoreAlert:Ee},data(){return{license:Re,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",je),linkingRecommendations:n("internal linking recommendations in Link Assistant.",je),upsell:R(n("Cornerstone Content is a %1$s feature. %2$s",je),"PRO",ee.getUpsellLink("post-settings-general",Pe.learnMore,"cornerstone-content",!0)),markAsCornerstone:n("Mark as Cornerstone",je)}}}},Ci={class:"cornerstone-content-panel"},Pi={class:"cornerstone-content-text"},Ei=["innerHTML"],xi=["innerHTML"];function Ti(o,e,r,t,s,a){const h=p("base-toggle"),l=p("core-alert");return i(),S("div",Ci,[u("p",Pi,[u("span",null,g(s.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=ae(y=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},g(s.strings.linkingRecommendations),1),u("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Ei)]),c(h,{modelValue:t.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=y=>t.postEditorStore.currentPost.pillar_content=y),e[2]||(e[2]=y=>t.postEditorStore.isDirty=!0)],disabled:!t.hasRequiredFeature},{default:d(()=>[A(g(s.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(i(),_(l,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:s.strings.upsell},null,8,xi)]),_:1})):m("",!0)])}const Ai=I(wi,[["render",Ti]]),Z="all-in-one-seo-pack",Li={emits:["changeTab"],setup(){const{parseTags:o}=bt({separator:void 0}),{maxRecommendedCount:e}=vt(),{watchHighlightSentences:r}=kr(),{runAnalysis:t,strings:s}=Zt();return{composableStrings:s,licenseStore:de(),maxRecommendedCount:e,optionsStore:Ge(),parseTags:o,postEditorStore:te(),rootStore:_e(),runAnalysis:t,seoPreviewStore:Co(),settingsStore:Ae(),tagsStore:Po(),truSeoHighlighterStore:We(),watchHighlightSentences:r}},components:{AdditionalKeyphrases:Zr,AiGenerator:fn,BaseRadioToggle:Xt,CoreAlert:Ee,CoreGoogleSearchPreview:ys,CoreHtmlTagsEditor:Pt,CoreSettingsRow:we,CoreSidebarCard:Cn,CoreTooltip:Ce,CoreProBadge:ks,FocusKeyphrase:fi,MetaboxAnalysisDetail:ot,PageAnalysis:bi,CornerstoneContent:Ai,SvgCircleQuestionMark:wt,SvgDesktop:vs,SvgMobile:bs,SvgPencil:St},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:Re,allowed:Te,isPageBuilderEditor:Be,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:zt(this.composableStrings,{pageName:n("General",Z),serpPreview:n("SERP Preview",Z),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.",Z),editSnippet:n("Edit Snippet",Z),clickToAddTitle:n("Click on the tags below to insert variables into your title.",Z),metaDescription:n("Meta Description",Z),clickToAddDescription:n("Click on the tags below to insert variables into your meta description.",Z),cornerstoneContent:n("Cornerstone Content",Z),focusKeyphrase:n("Focus Keyphrase",Z),additionalKeyphrases:n("Additional Keyphrases",Z),pageAnalysis:n("Page Analysis",Z),basicSeo:n("Basic SEO",Z),title:n("Title",Z),readability:n("Readability",Z),lookingForMetaKeywords:n("Looking for meta keywords?",Z),goToAdvancedTab:n("Go to the Advanced tab to add/edit meta keywords",Z),autogenerateDescriptionsAlert:R(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.",Z),"AIOSEO",ee.getPlainLink(n("Search Appearance > Advanced",Z),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:R(n("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",Z),ee.getDocLink(Pe.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){st(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){st(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(o,e){st(()=>this.watchHighlightSentences(o,e))}},computed:{title(){return R(n("%1$s Title",Z),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return nt()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&Te("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return nt()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&Te("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return nt()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&Te("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 Eo()?"-15px,0":Be()?"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)})}},Ii={class:"aioseo-tab-content aioseo-post-general"},Mi=["innerHTML"],Oi=["innerHTML"],Di=["innerHTML"],Bi={key:0},Ri=["innerHTML"],Hi=["innerHTML"];function Ui(o,e,r,t,s,a){const h=p("svg-circle-question-mark"),l=p("core-tooltip"),y=p("svg-desktop"),C=p("svg-mobile"),P=p("base-radio-toggle"),T=p("core-google-search-preview"),b=p("svg-pencil"),k=p("base-button"),x=p("core-settings-row"),z=p("ai-generator"),X=p("core-html-tags-editor"),ue=p("core-alert"),pe=p("core-pro-badge"),se=p("cornerstone-content"),K=p("focus-keyphrase"),$=p("additional-keyphrases"),me=p("page-analysis"),re=p("core-sidebar-card"),fe=p("metabox-analysis-detail");return i(),S("div",Ii,[s.allowed("aioseo_page_general_settings")?(i(),_(x,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:d(()=>[u("div",null,[u("span",null,g(s.strings.serpPreview),1),c(l,{offset:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:d(()=>[A(g(s.strings.serpPreviewDocumentation),1)]),default:d(()=>[c(h)]),_:1},8,["offset"])]),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(P,{key:0,modelValue:t.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":a.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:d(()=>[c(y)]),mobile:d(()=>[c(C)]),_:1},8,["modelValue","onUpdate:modelValue"])):m("",!0)]),content:d(()=>{var N,F,W;return[c(T,{"focus-keyphrase":((W=(F=(N=t.postEditorStore.currentPost)==null?void 0:N.keyphrases)==null?void 0:F.focus)==null?void 0:W.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"?(i(),_(k,{key:0,class:"edit-snippet gray small",onClick:a.editSnippetEv},{default:d(()=>[c(b),A(" "+g(s.strings.editSnippet),1)]),_:1},8,["onClick"])):m("",!0)]}),_:1})):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(x,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:a.title,key:s.titleKey},{content:d(()=>[c(X,{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":a.getDefaultTags("title")},{"tags-description":d(()=>[A(g(s.strings.clickToAddTitle),1)]),"append-button":d(()=>[t.postEditorStore.currentPost.postType&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"title"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,60)},null,8,Mi)]),_:1},8,["name"])):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(x,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:s.strings.metaDescription,key:s.descriptionKey},{content:d(()=>[a.showAutogenerateDescriptionsAlert?(i(),_(ue,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:s.strings.autogenerateDescriptionsAlert},null,8,Oi)]),_:1})):m("",!0),c(X,{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":a.getDefaultTags("description")},{"tags-description":d(()=>[A(g(s.strings.clickToAddDescription),1)]),"append-button":d(()=>[t.postEditorStore.currentPost.postType&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"description"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,160)},null,8,Di)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="metabox"&&t.postEditorStore.currentPost.context==="post"&&t.postEditorStore.currentPost.postType!=="attachment"&&!s.isPageBuilderEditor()?(i(),_(x,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:d(()=>[A(g(s.strings.cornerstoneContent)+" ",1),t.licenseStore.isUnlicensed?(i(),_(pe,{key:0})):m("",!0)]),content:d(()=>[c(se,{onChangeTab:e[6]||(e[6]=N=>o.$emit("changeTab",N))})]),_:1})):m("",!0),a.displayTruSeoMetaboxCard?(i(),S(be,{key:4},[t.optionsStore.options.searchAppearance.advanced.useKeywords&&t.optionsStore.options.searchAppearance.advanced.keywordsLooking?(i(),S("div",Bi,[c(ue,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:a.hideKeywordsLooking},{default:d(()=>[A(g(s.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=ae(N=>o.$emit("changeTab","advanced"),["prevent"]))},g(s.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=ae(N=>o.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):m("",!0),c(x,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:d(()=>[u("span",null,g(s.strings.focusKeyphrase),1),c(l,{offset:"25px,0"},{tooltip:d(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Ri)]),default:d(()=>[c(h)]),_:1})]),content:d(()=>[c(K)]),_:1}),c(x,{name:s.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:d(()=>[c($)]),_:1},8,["name"])],64)):m("",!0),a.displayTruSeoMetaboxCard&&t.postEditorStore.currentPost.page_analysis?(i(),_(x,{key:5,name:s.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:d(()=>[c(me)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="sidebar"&&!s.isPageBuilderEditor()&&r.parentComponentContext!=="modal"?(i(),_(re,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":s.strings.cornerstoneContent},{default:d(()=>[c(se,{onChangeTab:e[9]||(e[9]=N=>o.$emit("changeTab",N))})]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(re,{key:7,slug:"focus",focusScore:a.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:d(()=>[u("span",null,g(s.strings.focusKeyphrase),1),c(l,{offset:a.getFocusKeyphraseTooltipOffset()},{tooltip:d(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Hi)]),default:d(()=>[c(h)]),_:1},8,["offset"])]),default:d(()=>[c(K)]),_:1},8,["focusScore"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(re,{key:8,slug:"additional","header-text":s.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:d(()=>[c($)]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(re,{key:9,slug:"basicseo","header-text":s.strings.basicSeo,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:d(()=>[c(fe,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(re,{key:10,slug:"title","header-text":s.strings.title,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:d(()=>[c(fe,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(re,{key:11,slug:"readability","header-text":s.strings.readability,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:d(()=>[c(fe,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0)])}const uo=I(Li,[["render",Ui]]),Ki={class:"post-title"},Vi={key:1},Fi={key:1},Ni={key:0,class:"btn-view"},Gi=["href"],Mt="keyword-rank-tracker-keywords-table",Ot={__name:"KeywordsTable",props:{paginatedKeywords:Object,itemsPerPage:Number},setup(o){const e="all-in-one-seo-pack",r=Ze(),t=_e(),s={openInKeywordRankTracker:n("Open in Keyword Rank Tracker",e),position:n("Position",e),openInKrt:n("Open in Keyword Rank Tracker",e)},a=[{label:Pe.delete,value:"delete"},{label:s.addToGroup,value:"assignGroup"}],h=o,l=ve(null),y=ve([]),{orderBy:C,orderDir:P,pageNumber:T,processAdditionalFilters:b,processChangeItemsPerPage:k,processFilterTable:x,processPagination:z,processSearch:X,processSort:ue,searchTerm:pe,wpTableKey:se,wpTableLoading:K}=Jt({fetchData:r.fetchKeywords,tableId:Mt,tableRef:l.value,resultsPerPage:h.itemsPerPage}),$=Se(()=>[{slug:"name",label:n("Keyword",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:C.value==="name"?P.value:"asc",sorted:C.value==="name"},{slug:"position",label:n("Position",e),sortable:1<h.paginatedKeywords.rows.length,sortDir:C.value==="position"?P.value:"asc",sorted:C.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"}]),me=(F,W)=>{var G;let J=((G=F.statistics)==null?void 0:G[W])??"";switch(W){case"position":J=J!==""?Math.round(J).toFixed(0):J;break}return J},re=F=>{var W;return(W=F.statistics)!=null&&W.history?[{name:s.position,data:F.statistics.history.map(J=>({x:J.date,y:J.position,label:J.position}))}]:[]},fe=F=>t.aioseo.urls.aio.searchStatistics+`&search=${encodeURIComponent(F.name)}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`,N=async(F,W)=>{y.value[W]=!0;try{F.id?await r.deleteKeywords([F.id]):await r.insertKeywords({keywords:[F.name]}).then(()=>{F.tracking=!0}).catch(()=>{F.tracking=!1}),await r.fetchKeywords({rows:h.paginatedKeywords.rows}).then(()=>{r.maybeFetchStatistics({context:"keywords"})})}catch(J){console.error(J)}finally{y.value=[]}};return(F,W)=>{const J=p("base-toggle");return i(),_(v(Qt),{ref_key:"table",ref:l,id:Mt,"additional-filters":[],"bulk-options":a,columns:$.value,filters:[],"initial-items-per-page":100,"initial-page-number":v(T),"initial-search-term":v(pe),key:v(se),loading:v(K),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:v(x),onPaginate:v(z),onProcessAdditionalFilters:v(b),onProcessBulkAction:G=>({}),onProcessChangeItemsPerPage:v(k),onSearch:v(X),onSortColumn:v(ue)},{name:d(({row:G})=>[u("div",Ki,[u("b",null,g(G.name),1)])]),position:d(({row:G})=>[G.statistics===null?(i(),_(v(Ve),{key:0,dark:""})):(i(),S("div",Vi,g(me(G,"position")),1))]),history:d(({row:G})=>[G.statistics===null?(i(),_(v(Ve),{key:0,dark:""})):(i(),S("div",Fi,[re(G).length?(i(),_(v(_t),{key:0,series:re(G),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:O=>parseFloat(O).toFixed(2)}}}},null,8,["series","chart-overrides"])):m("",!0)]))]),tracking:d(({row:G,index:O})=>[y.value[O]?(i(),_(v(Ve),{key:0,dark:""})):m("",!0),c(J,{modelValue:G.tracking,"onUpdate:modelValue":[D=>G.tracking=D,D=>N(G,O,D)],disabled:!!y.value[O]},null,8,["modelValue","onUpdate:modelValue","disabled"])]),view:d(({row:G})=>[G.id?(i(),S("div",Ni,[u("a",{href:fe(G),target:"_blank"},[c(v(Ce),{type:"action",offset:"-80px,0"},{tooltip:d(()=>[A(g(s.openInKrt),1)]),default:d(()=>[c(v(et))]),_:1})],8,Gi)])):m("",!0)]),_:1},8,["columns","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},zi={key:0,class:"keyword-rank-tracker-container"},qi=["innerHTML"],ji={class:"keyword-rank-tracker-container__card"},$i={class:"keyword-rank-tracker-container__card__header"},Wi={class:"keyword-rank-tracker-container__card__body"},Yi=["innerHTML"],Zi={class:"keyword-rank-tracker-container__card"},Xi={class:"keyword-rank-tracker-container__card__header"},Ji={class:"keyword-rank-tracker-container__card__body"},lt="320px",Qi={__name:"KeywordRankTracker",setup(o){ko(T=>({"580b842a":lt}));const e="all-in-one-seo-pack",r=Ze(),t=de(),s=_e(),a=qt(),h=ee.getDocLink(n("Learn More",e),"keywordRankTracker",!0),l={...ws().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)},y=Se(()=>!t.isUnlicensed&&Re.hasCoreFeature("search-statistics")&&(!a.isConnected||a.unverifiedSite)),C=Se(()=>({rows:r.keywords.all.rows.slice(0,3).map(T=>({...T,tracking:!0}))})),P=Se(()=>{var k;const T={};for(const x of C.value.rows)(k=x==null?void 0:x.statistics)!=null&&k.history&&(T[x.name]=x);const b=[];for(const x in T)b.push({name:x,data:T[x].statistics.history.map(z=>({x:z.date,y:z.position}))});return b});return(T,b)=>(i(),S("div",null,[v(a).shouldShowSampleReports?(i(),S("div",zi,[u("div",null,[u("span",null,g(l.withAioseo),1),A(),u("span",{innerHTML:v(h)},null,8,qi)]),u("div",ji,[u("div",$i,g(l.keywordPositions),1),u("div",Wi,[c(v(_t),{height:parseInt(lt),series:P.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:k=>parseFloat(k).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),c(v(Ot),{"paginated-keywords":C.value},null,8,["paginated-keywords"])])):(i(),S(be,{key:1},[c(v(tt),{class:"keyword-rank-tracker-container"},{default:d(()=>[u("div",null,[u("span",null,g(l.withAioseo),1),A(),u("span",{innerHTML:v(h)},null,8,Yi)]),u("div",Zi,[u("div",Xi,g(l.keywordPositions),1),u("div",Ji,[c(v(_t),{height:parseInt(lt),series:P.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:k=>parseFloat(k).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),c(v(Ot),{"paginated-keywords":C.value},null,8,["paginated-keywords"])]),_:1}),y.value?(i(),_(v(Cs),{key:0})):(i(),_(v(Et),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:v(a).showSampleReports,"cta-link":v(ee).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":v(ee).getUpsellUrl("search-statistics","keyword-rank-tracker",v(s).isPro?"pricing":"liteUpgrade"),"feature-list":[l.feature1,l.feature2,l.feature3,l.feature4],"align-top":"","hide-bonus":!v(t).isUnlicensed},{"header-text":d(()=>[A(g(l.ctaHeader),1)]),description:d(()=>[c(v(eo),{"core-feature":["search-statistics"]}),A(" "+g(l.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))]))}},Dt=I(Qi,[["__scopeId","data-v-6bf4070c"]]),ea={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=de(),s=qt(),a=e,h={headerTitle:n("Keyword Performance Tracking",r)},l=Se(()=>s.isConnected&&!s.unverifiedSite);return(y,C)=>(i(),_(v(Le),{show:o.modalOpen,onClose:C[0]||(C[0]=P=>a("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:d(()=>[A(g(h.headerTitle),1)]),body:d(()=>[u("div",{class:j(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":v(s).shouldShowSampleReports}])},[!v(t).isUnlicensed&&v(Re).hasCoreFeature("search-statistics","keyword-rank-tracker")&&l.value?(i(),_(v(Dt),{key:0})):(i(),_(v(Dt),{key:1}))],2)]),_:1},8,["show"]))}},ta={},oa={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},sa=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),ra=[sa];function na(o,e){return i(),S("svg",oa,ra)}const xt=I(ta,[["render",na]]),ct="all-in-one-seo-pack",ia={setup(){return{postEditorStore:te()}},components:{CoreSettingsRow:we,SvgRightArrowShort:xt},data(){return{strings:{title:n("Link Assistant",ct),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.",ct),button:n("Open Link Assistant",ct)}}}},aa={class:"aioseo-link-assistant-sidebar"},la={class:"aioseo-sidebar-content-title"};function ca(o,e,r,t,s,a){const h=p("svg-right-arrow-short"),l=p("base-button"),y=p("core-settings-row");return i(),S("div",aa,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:d(()=>[u("div",la,g(s.strings.title),1),u("p",null,g(s.strings.description),1),c(l,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=C=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:d(()=>[c(h),A(" "+g(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const da=I(ia,[["render",ca]]),ua=()=>{const o=(e,r)=>{const t=Me(r);let s=null;return e.forEach(a=>{if(s||!a.attributes)return;if(a.attributes.content&&a.attributes.content.search(t)!==-1){s=a.clientId;return}if(!a.innerBlocks)return;const h=o(a.innerBlocks,r);h&&(s=h)}),s};return{findTargetBlock:o}},ke="all-in-one-seo-pack",pa=(o={})=>{const{emit:e,linkType:r,linksReport:t,metabox:s,pageNumber:a,post:h,postIndex:l,postReport:y,refreshTable:C=()=>{},wpTableLoading:P}=o,T=ve(""),b="linkAssistantPostsReport",k=ve([]),x=ve(!1),z=Se(()=>{if(!s)return h.links[r].rows;const O=a.value===1?0:(a.value-1)*10;return h.links[r].rows.slice(O,O+10)}),X={frontPage:n("Front Page",ke),deleteLink:n("Delete Link",ke)},ue={areYouSureSingle:n("Are you sure you want to delete this link?",ke),areYouSureMultiple:n("Are you sure you want to delete these links?",ke),areYouSureAll:n("Are you sure you want to delete all links?",ke),actionCannotBeUndone:n("This action cannot be undone.",ke),yesSingle:n("Yes, I want to delete this link",ke),yesMultiple:n("Yes, I want to delete these links",ke),yesAll:n("Yes, I want to delete all links",ke),noChangedMind:n("No, I changed my mind",ke)},pe=[{label:n("Delete",ke),value:"delete"}],se=xo(),K=te(),$=O=>{window.aioseoBus.$emit("updatingLinks",!0);const D={...O,additionalFilters:{postId:h.ID||K.currentPost.id,postIndex:l,type:r}};return se[y?"fetchPostReport":"fetchLinksReportInner"](D).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},me=O=>{window.location.href=`#/post-report?postId=${h.ID}&postIndex=${l}&initialTab=${O}`},re=({action:O,selectedRows:D})=>{!D.length||!O||(T.value=O,k.value=D,x.value=!0)},fe=()=>{if(x.value=!1,!!k.value.length){if(typeof k.value=="number"){N(k.value);return}if(s&&r!=="inboundInternal"){G(k.value).forEach(D=>{F(D)});return}window.aioseoBus.$emit("updatingLinks",!0),se.linksBulk({postIndex:l,postId:h.ID||K.currentPost.id,action:T.value,linkType:r,linkIds:k.value,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),C()})}},N=O=>{const D=h.links[r].rows[O].id;if(D){if(s&&r!=="inboundInternal"){F(O);return}window.aioseoBus.$emit("updatingLinks",!0),se.linkDelete({postIndex:l,postId:h.ID||K.currentPost.id,linkId:D,linksReport:t,postReport:y}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),C()})}},F=O=>{Ye()&&(window.aioseoBus.$emit("updatingLinks",!1),W(O),window.aioseoBus.$emit("updatingLinks",!1)),Gt()&&J(O)},W=O=>{const D=K.currentPost.linkAssistant.links[r].rows[O];if(!D)return;window.aioseoBus.$emit("updatingLinks",!0);const Y=Me(D.anchor.trim()),H=D.phrase_html.trim(),f=Me(H),E=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:w}=ua(),L=w(E,H);if(!L){window.aioseoBus.$emit("updatingLinks",!1);return}const M=window.wp.data.select("core/block-editor").getBlock(L);if(!M){window.aioseoBus.$emit("updatingLinks",!1);return}let U=new RegExp(`(<t?a[^<>]*>)(.*)?(${Y})(.*)?(</t?a[^<>]*>)`,"i");const V=H.replace(U,"$2$3$4");U=new RegExp(`${f}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(L,{content:M.attributes.content.replace(U,V)}).then(()=>{h.links[r].rows.splice(O,1)}).catch(B=>{console.error(`Couldn delete link with type "${r}" and index ${O}:`,B)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},J=O=>{var V;const D=K.currentPost.linkAssistant.links[r].rows[O];if(!D||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let Y="",H=null,f=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(H=window.tinyMCE.get("content"),Y=H.getContent({format:"raw"})):(f=document.querySelector("textarea#content"),Y=f?f.value:""),!Y){window.aioseoBus.$emit("updatingLinks",!1);return}let E=D.phrase_html.trim();H||(E=E.replace(/(\sdata-mce-href=".*")/gi,""));const w=Me(D.anchor.trim());let L=new RegExp(`(<t?a[^<>]*>)(.*)?(${w})(.*)?(</t?a[^<>]*>)`,"i");const M=E.replace(L,"$2$3$4"),U=Me(E);L=new RegExp(`${U}`,"i"),Y=Y.replace(L,M),H?H.setContent(Y):f.value=Y,h.links[r].rows.splice(O,1),(V=se.postSettingsUpdate({postContent:Y}))==null||V.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},G=O=>{let D,Y=[];return Array.isArray(O)&&(D=O.map(Number)),D&&h.links[r].rows.forEach((H,f)=>{D.includes(H.id)&&Y.push(f)}),O==="all"&&(Y=h.links[r].rows.map((H,f)=>f)),Y.sort(function(H,f){return f-H})};return Nt(()=>{window.aioseoBus.$on("updatingLinks",O=>{P.value=O}),a.value=se.postReport[r].totals.page}),{bulkOptions:pe,changeItemsPerPageSlug:b,doBulkAction:fe,fetchData:$,maybeDoBulkAction:re,modalStrings:ue,openPostReport:me,rows:z,selectedRows:k,showModal:x,strings:X}},ma={emits:["closeModal","doBulkAction"],components:{CoreModal:Le,SvgClose:yt},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}}},ga={class:"aioseo-modal-body"},ha=["innerHTML"];function _a(o,e,r,t,s,a){const h=p("svg-close"),l=p("base-button"),y=p("core-modal");return i(),_(y,{show:r.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=C=>o.$emit("closeModal",!0))},{body:d(()=>[u("div",ga,[u("button",{class:"close",onClick:e[1]||(e[1]=ae(C=>o.$emit("closeModal",!0),["stop"]))},[c(h,{onClick:e[0]||(e[0]=C=>o.$emit("closeModal",!0))})]),u("h3",null,g(a.areYouSure),1),u("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,ha),c(l,{type:"blue",size:"medium",onClick:e[2]||(e[2]=C=>o.$emit("doBulkAction",C))},{default:d(()=>[A(g(a.confirmation),1)]),_:1}),c(l,{type:"gray",size:"medium",onClick:e[3]||(e[3]=C=>o.$emit("closeModal",!0))},{default:d(()=>[A(g(r.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const fa=I(ma,[["render",_a]]),ya={components:{CoreTooltip:Ce},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=Ue.decode(this.anchor),e=Me(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return Ue.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return Ue.decode(this.stripTags(this.getPart(2)))},lastPart(){return Ue.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const r=Ue.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()}}},Sa={class:"phrase"},ka={key:0,class:"first"},va=["href"],ba={key:2},wa={class:"anchor"},Ca={key:3,class:"last"};function Pa(o,e,r,t,s,a){const h=p("core-tooltip");return i(),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",Sa,[a.firstPart?(i(),S("span",ka,g(a.firstPart),1)):m("",!0),r.tooltip?(i(),_(h,{key:1,type:"action"},{tooltip:d(()=>[u("a",{class:"tooltip-url",href:r.url,target:"_blank"},g(r.url),9,va)]),default:d(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...l)=>a.maybeOpenLink&&a.maybeOpenLink(...l))},g(a.linkAnchor),1)]),_:1})):m("",!0),r.tooltip?m("",!0):(i(),S("div",ba,[u("span",wa,g(a.linkAnchor),1)])),a.lastPart?(i(),S("span",Ca,g(a.lastPart),1)):m("",!0)]),xe(o.$slots,"icons")],32)}const Ea=I(ya,[["render",Pa]]),xa={},Ta={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Aa=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),La=[Aa];function Ia(o,e){return i(),S("svg",Ta,La)}const Tt=I(xa,[["render",Ia]]),Ma={key:0},Oa={key:0,class:"row-actions"},Da={class:"view"},Ba=["href"],Ra={class:"edit"},Ha=["href"],Ua={key:0,class:"links-bottom"},Ka={class:"links-bottom-left"},Va={key:1},Fa={class:"links-bottom-right"},Na="inboundInternal",Bt="aioseo-post-report-inbound-internal",Ga={__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=Ae(),a=o,h=e,l=ve(1),y=ve(!1),{bulkOptions:C,changeItemsPerPageSlug:P,doBulkAction:T,fetchData:b,maybeDoBulkAction:k,modalStrings:x,openPostReport:z,rows:X,selectedRows:ue,showModal:pe,strings:se}=pa({emit:h,linkType:Na,linksReport:a.linksReport,metabox:a.metabox,pageNumber:l,post:a.post,postIndex:a.postIndex,postReport:a.postReport,refreshTable:()=>fe(),wpTableLoading:y}),{editPost:K,viewPost:$}=Ps(),{processChangeItemsPerPage:me,processFetchTableData:re,refreshTable:fe,wpTableKey:N}=Jt({changeItemsPerPageSlug:P,fetchData:b,pageNumber:l,tableId:Bt,wpTableLoading:y}),F=zt(se,{deleteAllLinks:R(n("Delete All %1$s Links",r),n("Inbound Internal",r)),outboundSuggestions:R(n("%1$s Link Suggestions",r),n("Inbound",r))}),W=Se(()=>[{slug:"post_title",label:n("Post Title",r)},{slug:"phrase",label:n("Phrase",r)},{slug:"delete",width:"50px"}]),J=Se(()=>R(n("See All %1$s %2$s Links",r),a.post.links.inboundInternal.totals.total,n("Inbound Internal",r))),G=O=>{l.value=O,!a.metabox&&(y.value=!0,re().then(()=>y.value=!1))};return(O,D)=>{const Y=p("base-button");return i(),S("div",null,[(i(),_(v(Qt),{id:Bt,key:v(N),class:j({"link-assistant-inner-table":!o.postReport}),columns:W.value,loading:y.value,rows:v(X),totals:o.post.links.inboundInternal.totals,"bulk-options":v(C),"initial-items-per-page":v(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:G,onProcessBulkAction:v(k),onProcessChangeItemsPerPage:v(me)},{post_title:d(({row:H})=>{var f,E;return[u("span",null,[A(g(H.context.postTitle)+" ",1),((E=(f=H.context)==null?void 0:f.permalink)==null?void 0:E.replace(/\/$/,""))===v(t).aioseo.urls.home?(i(),S("span",Ma,"("+g(v(F).frontPage)+")",1)):m("",!0)]),H.context?(i(),S("div",Oa,[u("span",Da,[u("a",{href:H.context.permalink,target:"_blank"},g(v($)(H.context.postType.singular)),9,Ba),A(" | ")]),u("span",Ra,[u("a",{href:H.context.editLink,target:"_blank"},g(v(K)(H.context.postType.singular)),9,Ha)])])):m("",!0)]}),phrase:d(({row:H})=>[c(v(Ea),{phrase:H.phrase,phraseHtml:H.phrase_html||"",anchor:H.anchor,url:H.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:d(({row:H})=>[c(v(Ce),{type:"action"},{tooltip:d(()=>[A(g(v(F).deleteLink),1)]),default:d(()=>[c(v(Qe),{onClick:f=>v(k)({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?m("",!0):(i(),S("div",Ua,[u("div",Ka,[o.post.links.inboundInternal.rows.length?(i(),_(Y,{key:0,type:"blue",tag:"button",onClick:D[0]||(D[0]=H=>h("openSuggestions"))},{default:d(()=>[c(v(Tt)),A(" "+g(v(F).outboundSuggestions),1)]),_:1})):m("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(i(),S("div",Va,[c(v(oo)),u("a",{class:"link-view",href:"#",onClick:D[1]||(D[1]=ae(H=>v(z)("inbound-internal"),["prevent"]))},g(J.value),1)])):m("",!0)]),u("div",Fa,[o.post.links.inboundInternal.rows.length?(i(),S("a",{key:0,class:"link-delete",onClick:D[2]||(D[2]=ae(H=>v(k)({action:"delete",selectedRows:"all"}),["prevent"]))},g(v(F).deleteAllLinks),1)):m("",!0)])])),c(v(fa),{show:v(pe),selectedRows:v(ue),strings:v(x),onDoBulkAction:v(T),onCloseModal:D[3]||(D[3]=H=>pe.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},le="all-in-one-seo-pack",za={setup(){return{licenseStore:de(),postEditorStore:te(),rootStore:_e(),links:ee}},components:{CoreAlert:Ee,CoreBlur:tt,CoreMainTabs:Oe,CoreModal:Le,Cta:Et,LinkAssistantInboundInternal:Ga,LinksSideBar:da,SvgLinkAffiliate:Es,SvgLinkExternal:oo,SvgLinkInternalInbound:xs,SvgLinkInternalOutbound:Ts,SvgLinkSuggestion:Tt,RequiredPlans:eo},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",le),ctaHeader:R(n("Link Assistant is a %1$s Feature",le),"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.",le),thisFeatureRequires:n("This feature requires one of the following plans:",le),linkOpportunities:n("Actionable Link Suggestions",le),orphanedPosts:n("See Orphaned Posts",le),affiliateLinks:n("See Affiliate Links",le),domainReports:n("Top Domain Reports",le)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:R("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,n("Inbound Internal",le))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:R("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,n("Outbound Internal",le))},{slug:"affiliate",icon:"svg-link-affiliate",name:R("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,n("Affiliate",le))},{slug:"external",icon:"svg-link-external",name:R("%1$s %2$s",this.mockedPostData.links.external.totals.total,n("External",le))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:R("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,n("Link Suggestions",le))}]},modalHeader(){return R(n('Links & Suggestions for "%1$s"',le),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},qa={class:"aioseo-tab-content aioseo-link-assistant"},ja={key:0};function $a(o,e,r,t,s,a){const h=p("core-main-tabs"),l=p("link-assistant-inbound-internal"),y=p("core-blur"),C=p("required-plans"),P=p("cta"),T=p("core-modal"),b=p("links-side-bar");return i(),S("div",qa,[o.$root.$data.screenContext==="metabox"?(i(),S("div",ja,[c(y,null,{default:d(()=>[c(h,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:k})=>[(i(),_(ye(k.icon),{class:j([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),c(P,{"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":d(()=>[A(g(s.strings.ctaHeader),1)]),description:d(()=>[c(C,{addon:"aioseo-link-assistant"}),A(" "+g(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):m("",!0),c(T,{show:t.postEditorStore.currentPost.linkAssistant.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=k=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:d(()=>[A(g(a.modalHeader),1)]),body:d(()=>[c(y,null,{default:d(()=>[c(h,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:k})=>[(i(),_(ye(k.icon),{class:j([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(l,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),c(P,{"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":d(()=>[A(g(s.strings.ctaHeader),1)]),description:d(()=>[c(C,{addon:"aioseo-link-assistant"}),A(" "+g(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(b,{key:1})):m("",!0)])}const Rt=I(za,[["render",$a]]),Wa={};function Ya(o,e){return i(),S("div")}const Za=I(Wa,[["render",Ya]]),Xa={setup(){return{addons:to,licenseStore:de()}},components:{Links:Rt,LinksActivate:Za,LinksLite:Rt},props:{parentComponentContext:String}},Ja={class:"aioseo-tab-content aioseo-link-assistant"};function Qa(o,e,r,t,s,a){const h=p("Links",!0),l=p("LinksLite"),y=p("LinksActivate");return i(),S("div",Ja,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-link-assistant")&&t.addons.canActivate("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(y,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const el=I(Xa,[["render",Qa]]),Ke="all-in-one-seo-pack",po=()=>{const o=Se(()=>[{groupLabel:n("Default",Ke),options:[{label:n("Default Object Type (Set in Social Networks)",Ke),value:"default"}]}].concat(Ko)),e=[{label:n("Default (Set under Social Networks)",Ke),value:"default"},{label:n("Summary",Ke),value:"summary"},{label:n("Summary with Large Image",Ke),value:"summary_large_image"}];return{getObjectTypeLabelByOption:s=>{let a="";return o.value.forEach(h=>{const l=h.options.find(y=>y.value===s);l&&(a=(l==null?void 0:l.label)||"")}),a},getTwitterCardLabelByOption:s=>{var a;return((a=e.find(h=>h.value===s))==null?void 0:a.label)||""},objectTypeOptions:o,twitterCardOptions:e}},Q="all-in-one-seo-pack",tl={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,setImageUrl:a}=so(),{maxRecommendedCount:h}=vt(),{objectTypeOptions:l}=po(),{parseTags:y}=bt({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,maxRecommendedCount:h,objectTypeOptions:l,optionsStore:Ge(),parseTags:y,postEditorStore:te(),rootStore:_e(),setImageUrl:a}},components:{CoreAlert:Ee,CoreFacebookPreview:As,CoreHtmlTagsEditor:Pt,CoreImageUploader:no,CoreSettingsRow:we},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ro,titleCount:0,descriptionCount:0,strings:{tabName:n("Facebook Preview",Q),imageSource:n("Image Source",Q),customFieldsName:n("Custom Field Name",Q),video:n("Video URL",Q),width:n("Width",Q),height:n("Height",Q),facebookObjectType:n("Object Type",Q),facebookImage:n("Facebook Image",Q),facebookTitle:n("Facebook Title",Q),facebookDescription:n("Facebook Description",Q),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.",Q),clickToAddSiteName:n("Click on the tags below to insert variables into your site name.",Q),clickToAddHomePageDescription:n("Click on the tags below to insert variables into your meta description.",Q),articleSection:n("Article Section",Q),articleTags:n("Article Tags",Q),tagPlaceholder:n("Press enter to create an article tag",Q),facebookDisabled:R(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",Q),n("Open Graph",Q),R('<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",Q)))}}},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)}},ol={class:"tab-facebook"},sl={id:"aioseo-post-settings-facebook"},rl=["innerHTML"],nl=["innerHTML"];function il(o,e,r,t,s,a){const h=p("core-alert"),l=p("core-facebook-preview"),y=p("core-settings-row"),C=p("core-html-tags-editor"),P=p("base-select"),T=p("base-input"),b=p("core-image-uploader");return i(),S("div",ol,[c(y,{class:"snippet-preview-row"},{name:d(()=>[u("span",null,g(s.strings.tabName),1)]),content:d(()=>[t.optionsStore.options.social.facebook.general.enable?m("",!0):(i(),_(h,{key:0,class:"facebook-disabled-warning",innerHTML:s.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),c(l,{description:a.previewDescription,image:t.imageUrl,loading:t.loading,title:a.previewTitle},null,8,["description","image","loading","title"])]),_:1}),u("div",sl,[c(y,{name:s.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:d(()=>[c(C,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=k=>t.postEditorStore.currentPost.og_title=k),e[2]||(e[2]=k=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=k=>s.titleCount=k.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":d(()=>[A(g(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,rl)]),_:1},8,["name"]),c(y,{name:s.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:d(()=>[c(C,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=k=>t.postEditorStore.currentPost.og_description=k),e[5]||(e[5]=k=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=k=>s.descriptionCount=k.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":d(()=>[A(g(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,nl)]),_:1},8,["name"]),c(y,{class:"facebook-image-source",name:s.strings.imageSource,align:""},{content:d(()=>[c(P,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=k=>a.saveImageType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.og_image_type==="custom"?(i(),_(y,{key:0,name:s.strings.customFieldsName,align:""},{content:d(()=>[c(T,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=k=>t.postEditorStore.currentPost.og_image_custom_fields=k),e[8]||(e[8]=k=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),t.postEditorStore.currentPost.og_image_type==="custom_image"?(i(),_(y,{key:1,class:"facebook-image",name:s.strings.facebookImage},{content:d(()=>[c(b,{description:s.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=k=>t.postEditorStore.currentPost.og_image_custom_url=k)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),c(y,{class:"facebook-video",name:s.strings.video,align:""},{content:d(()=>[c(T,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=k=>t.postEditorStore.currentPost.og_video=k)},null,8,["modelValue"])]),_:1},8,["name"]),c(y,{class:"facebook-object-type",name:s.strings.facebookObjectType,align:""},{content:d(()=>[c(P,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:a.getObjectTypeOptions(t.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=k=>a.setObjectType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),a.shouldShowArticleSection?(i(),_(y,{key:2,name:s.strings.articleSection,align:""},{content:d(()=>[c(T,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=k=>t.postEditorStore.currentPost.og_article_section=k)},null,8,["modelValue"])]),_:1},8,["name"])):m("",!0),a.shouldShowArticleSection?(i(),_(y,{key:3,name:s.strings.articleTags,align:""},{content:d(()=>[c(P,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=k=>t.postEditorStore.currentPost.og_article_tags=k),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])])}const al=I(tl,[["render",il]]),ce="all-in-one-seo-pack",ll={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,setImageUrl:s}=so(),{maxRecommendedCount:a}=vt(),{twitterCardOptions:h}=po(),{parseTags:l}=bt({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,maxRecommendedCount:a,optionsStore:Ge(),parseTags:l,postEditorStore:te(),rootStore:_e(),setImageUrl:s,twitterCardOptions:h}},components:{CoreAlert:Ee,CoreHtmlTagsEditor:Pt,CoreImageUploader:no,CoreSettingsRow:we,CoreTwitterPreview:Ls},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ro,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:n("X (Twitter) Preview",ce),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.",ce),useFB:n("Use Data from Facebook Tab",ce),imageSource:n("Image Source",ce),customFieldsName:n("Custom Field Name",ce),twitterImage:n("X Image",ce),twitterTitle:n("X Title",ce),twitterDescription:n("X Description",ce),twitterCardType:n("X Card Type",ce),minimumSizeSummary:n("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ce),minimumSizeSummaryWithLarge:n("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ce),twitterDisabled:R(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",ce),n("X (Twitter)",ce),R('<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",ce)))}}},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)}},cl={class:"tab-twitter"},dl={id:"aioseo-post-settings-twitter"},ul=["innerHTML"],pl=["innerHTML"];function ml(o,e,r,t,s,a){const h=p("core-alert"),l=p("core-twitter-preview"),y=p("core-settings-row"),C=p("base-toggle"),P=p("core-html-tags-editor"),T=p("base-select"),b=p("base-input"),k=p("core-image-uploader");return i(),S("div",cl,[c(y,{class:"snippet-preview-row"},{name:d(()=>[u("span",null,g(s.strings.twitterPreview),1)]),description:d(()=>[u("i",null,g(s.strings.twitterPreviewDescription),1)]),content:d(()=>[t.optionsStore.options.social.twitter.general.enable?m("",!0):(i(),_(h,{key:0,class:"twitter-disabled-warning",innerHTML:s.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),c(l,{card:t.postEditorStore.currentPost.twitter_card,description:a.previewDescription,image:a.previewImage,loading:t.loading,title:a.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),u("div",dl,[c(y,{name:s.strings.useFB,class:"use-facebook"},{content:d(()=>[c(C,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=x=>t.postEditorStore.currentPost.twitter_use_og=x),e[1]||(e[1]=x=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:0,name:s.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:d(()=>[c(P,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=x=>t.postEditorStore.currentPost.twitter_title=x),e[4]||(e[4]=x=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=x=>s.titleCount=x.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,ul)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:1,name:s.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:d(()=>[c(P,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=x=>t.postEditorStore.currentPost.twitter_description=x),e[7]||(e[7]=x=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=x=>s.descriptionCount=x.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":d(()=>[A(g(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,pl)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(y,{key:2,class:"twitter-image-source",name:s.strings.imageSource,align:""},{content:d(()=>[c(T,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=x=>a.saveTwitterImageType(x.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom"?(i(),_(y,{key:3,class:"twitter-custom-field",name:s.strings.customFieldsName,align:""},{content:d(()=>[c(b,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=x=>t.postEditorStore.currentPost.twitter_image_custom_fields=x),e[10]||(e[10]=x=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom_image"?(i(),_(y,{key:4,class:"twitter-image",name:s.strings.twitterImage},{content:d(()=>[c(k,{description:a.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=x=>t.postEditorStore.currentPost.twitter_image_custom_url=x)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),c(y,{class:"twitter-card-type",name:s.strings.twitterCardType,align:""},{content:d(()=>[c(T,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:a.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=x=>a.cardSelect(x.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const gl=I(ll,[["render",ml]]),dt="all-in-one-seo-pack",hl={setup(){return{postEditorStore:te(),settingsStore:Ae()}},components:{CoreSettingsRow:we,SvgPencil:St},data(){return{strings:{title:n("Social Media",dt),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.",dt),editSnippet:n("Preview & Edit",dt)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},_l={class:"aioseo-sidebar-content-title"};function fl(o,e,r,t,s,a){const h=p("svg-pencil"),l=p("base-button"),y=p("core-settings-row");return o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,name:s.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:d(()=>[u("div",_l,g(s.strings.title),1),u("p",null,g(s.strings.sidebarCopy),1),c(l,{class:"open-social-modal gray small",onClick:a.openModalEv},{default:d(()=>[c(h),A(" "+g(s.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):m("",!0)}const yl=I(hl,[["render",fl]]),ut="all-in-one-seo-pack",Sl={setup(){return{postEditorStore:te(),settingsStore:Ae()}},components:{BaseRadioToggle:Xt,CoreMainTabs:Oe,CoreSettingsRow:we,Facebook:al,Twitter:gl,SocialSideBar:yl},props:{parentComponentContext:String},data(){return{strings:{pageName:n("Social",ut)},tabs:[{slug:"facebook",name:n("Facebook",ut)},{slug:"twitter",name:n("X (Twitter)",ut)}]}},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(){Ne()["social-tab"]&&(this.processChangeTab(Ne()["social-tab"]),setTimeout(()=>{ht("social-tab")},500))}},kl={class:"aioseo-tab-content aioseo-post-social"};function vl(o,e,r,t,s,a){const h=p("core-main-tabs"),l=p("core-settings-row"),y=p("social-side-bar");return i(),S("div",kl,[o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(l,{key:0,"no-border":""},{content:d(()=>[c(h,{tabs:s.tabs,showSaveButton:!1,active:a.initTab,internal:"",onChanged:e[0]||(e[0]=C=>a.processChangeTab(C)),disableMobile:""},null,8,["tabs","active"])]),_:1})):m("",!0),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(Fe,{key:1,name:"route-fade",mode:"out-in"},{default:d(()=>[(i(),_(ye(a.initTab)))]),_:1})):m("",!0),r.parentComponentContext!=="modal"?(i(),_(y,{key:2})):m("",!0)])}const mo=I(Sl,[["render",vl]]),pt="all-in-one-seo-pack",bl={setup(){return{settingsStore:Ae()}},components:{CoreMainTabs:Oe,CoreSettingsRow:we,General:uo,Social:mo,SvgSettings:io,SvgShare:ao},data(){return{strings:{pageName:n("Modal Content",pt)},tabs:[{slug:"general",icon:"svg-settings",name:n("General",pt)},{slug:"social",icon:"svg-share",name:n("Social",pt)}]}},computed:{getTabs(){return this.tabs.filter(o=>Te(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},wl={class:"aioseo-modal-content"},Cl={class:"mobile-radio-buttons"},Pl={class:"component-wrapper"};function El(o,e,r,t,s,a){const h=p("core-main-tabs");return i(),S("div",wl,[u("div",Cl,[c(h,{tabs:a.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=l=>a.processChangeTab(l))},null,8,["tabs","active"])]),u("div",Pl,[c(Fe,{name:"route-fade",mode:"out-in"},{default:d(()=>[(i(),_(ye(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const xl=I(bl,[["render",El]]),mt="all-in-one-seo-pack",Tl={setup(){return{postEditorStore:te()}},components:{CoreSettingsRow:we,SvgRightArrowShort:xt},data(){return{strings:{title:n("Redirects",mt),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.",mt),button:n("Open Redirects",mt)}}}},Al={class:"aioseo-redirects-sidebar"},Ll={class:"aioseo-sidebar-content-title"};function Il(o,e,r,t,s,a){const h=p("svg-right-arrow-short"),l=p("base-button"),y=p("core-settings-row");return i(),S("div",Al,[o.$root.$data.screenContext==="sidebar"?(i(),_(y,{key:0,class:"snippet-description-row open-redirects-copy"},{content:d(()=>[u("div",Ll,g(s.strings.title),1),u("p",null,g(s.strings.description),1),c(l,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=C=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:d(()=>[c(h),A(" "+g(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const Ml=I(Tl,[["render",Il],["__scopeId","data-v-1754537e"]]),Ol="all-in-one-seo-pack",Dl={setup(){return{postEditorStore:te()}},components:{CoreModal:Le,RedirectsSideBar:Ml,RedirectsLite:Ms},props:{parentComponentContext:String},data(){return{strings:{modalHeader:n("Redirects",Ol)}}}},Bl={class:"bd"};function Rl(o,e,r,t,s,a){const h=p("redirects-lite"),l=p("core-modal"),y=p("redirects-side-bar");return i(),S("div",null,[o.$root.$data.screenContext==="metabox"?(i(),_(h,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),c(l,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=C=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:d(()=>[A(g(s.strings.modalHeader),1)]),body:d(()=>[u("div",Bl,[c(h,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(y,{key:1})):m("",!0)])}const Ht=I(Dl,[["render",Rl]]),Hl={};function Ul(o,e){return i(),S("div")}const Kl=I(Hl,[["render",Ul]]),Vl={setup(){return{addons:to,licenseStore:de()}},components:{Redirects:Ht,RedirectsActivate:Kl,RedirectsLite:Ht},props:{parentComponentContext:String}},Fl={class:"aioseo-tab-content"};function Nl(o,e,r,t,s,a){const h=p("Redirects",!0),l=p("RedirectsLite"),y=p("RedirectsActivate");return i(),S("div",Fl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-redirects")&&t.addons.canActivate("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(y,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const Gl=I(Vl,[["render",Nl]]),zl={class:"graph-container"},ql={class:"graph"},jl={class:"left"},$l=["title"],Wl={class:"right action-buttons"},go={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",r=o,{childGraphs:t,graphs:s}=jt(),a=Se(()=>{var b,k,x,z;if(r.customGraph)return n("Custom Schema",e)+" - "+r.graph.graphName;if(r.defaultGraph)return y(r.defaultGraph);if((b=r.graph)!=null&&b.label)return r.graph.label;const P=(x=(k=r.graph)==null?void 0:k.slug)==null?void 0:x.toLowerCase();return((z=s.find(X=>X.slug===P))==null?void 0:z.label)||n("Parsing Block Data...",e)}),h=Se(()=>{if(r.customGraph)return at;if(r.defaultGraph){const P=l(r.defaultGraph);return P?C(P):at}return C(r.graph.slug)}),l=P=>{Object.entries(t).forEach(b=>{const k=b[0];b[1].forEach(x=>{P===x.childGraphName&&(P=k)})});let T="";return s.forEach(b=>{b.graphName===P&&(T=b.slug)}),T},y=P=>{let T="",b=P;return Object.entries(t).forEach(k=>{const x=k[0];k[1].forEach(z=>{T||P===z.childGraphName&&(T=x,b=z.label,s.forEach(X=>{X.graphName===x&&(T=X.label)}))})}),T?T+" - "+b+" "+n("(Default)",e):P+" "+n("(Default)",e)},C=P=>{switch(P){case"article":return gs;case"book":return ms;case"car":return ps;case"course":return us;case"dataset":return ds;case"event":return cs;case"faq-page":return ls;case"fact-check":return as;case"how-to":return is;case"job-posting":return ns;case"movie":return rs;case"music":return ss;case"person":return os;case"product":return ts;case"product-review":return es;case"recipe":return Qo;case"service":return Jo;case"software-application":return Xo;case"video":return Zo;case"web-page":return Yo;default:return at}};return(P,T)=>(i(),S("div",zl,[u("div",ql,[u("div",jl,[(i(),_(ye(h.value))),u("span",{title:a.value},g(a.value),9,$l)]),u("div",Wl,[xe(P.$slots,"buttons")])])]))}},Yl={class:"title"},Zl=["innerHTML"],Xl={class:"schema-templates"},Jl={class:"main"},Ql={class:"schema-catalog"},ec={class:"graphs"},tc={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:r}=jt(),t=_e(),s={schemaGenerator:n("Schema Generator",e),headerTooltip:R(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),ee.getDocLink(Pe.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:R(n("Schema Generator is a %1$s Feature",e),"PRO")},a=[n("Unlimited Schema",e),n("Validate with Google",e),n("Increase Rankings",e),n("Additional Schema Types",e)],h=[{slug:"schema-templates",icon:hs,name:n("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:_s,name:n("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:fs,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(y,C)=>{const P=p("base-input"),T=p("base-button");return i(),_(v(Le),{classes:["aioseo-post-schema-modal-cta"],onClose:C[0]||(C[0]=b=>y.$emit("close"))},{headerTitle:d(()=>[u("div",Yl,g(s.schemaGenerator),1),c(v(Ce),null,{tooltip:d(()=>[u("span",{innerHTML:s.headerTooltip},null,8,Zl)]),default:d(()=>[c(v(wt))]),_:1})]),body:d(()=>[c(v(tt),null,{default:d(()=>[c(v(Oe),{tabs:h,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":d(({tab:b})=>[(i(),_(ye(b.icon)))]),_:1}),u("div",Xl,[c(v(Oe),{tabs:l,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":d(({tab:b})=>[(i(),_(ye(b.icon)))]),_:1}),u("div",Jl,[c(P,{class:"search",size:"medium",prependIcon:"search",placeholder:s.searchSchema},null,8,["placeholder"]),u("div",Ql,[u("div",ec,[(i(!0),S(be,null,He(v(r),(b,k)=>(i(),_(v(go),{key:b.graphName+k,graph:b},{buttons:d(()=>[c(T,{class:"small",type:"gray"},{default:d(()=>[c(v(Ct))]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),c(v(Et),{"cta-link":v(ee).getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":s.ctaButtonText,"learn-more-link":v(ee).getUpsellUrl("schema-generator",null,v(t).isPro?"pricing":"liteUpgrade"),"feature-list":a},{"header-text":d(()=>[A(g(s.ctaHeader),1)]),description:d(()=>[A(g(s.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},De="all-in-one-seo-pack",oc={setup(){return{postEditorStore:te(),GLOBAL_STRINGS:Pe,links:ee}},components:{CoreAlert:Ee,CoreSettingsRow:we,CoreTooltip:Ce,CtaModal:tc,GraphCard:go,SvgEye:et},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.",De),noGraphs:n("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",De),schemaInUse:n("Schema In Use",De),generateSchema:n("Generate Schema",De),validateSchema:n("Validate Schema",De),defaultGraphTooltip:n("This is the default graph for this post type. All data for this graph will be automatically generated.",De)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return Be()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},sc={class:"graphs"},rc={key:0,class:"sidebar-description"},nc={class:"description"},ic=["innerHTML"],ac=["innerHTML"],lc={class:"buttons"};function cc(o,e,r,t,s,a){const h=p("svg-eye"),l=p("base-button"),y=p("core-tooltip"),C=p("graph-card"),P=p("core-alert"),T=p("cta-modal"),b=p("core-settings-row");return i(),S("div",{class:j(["aioseo-tab-content aioseo-post-schema",[{sidebar:a.isSidebar}]])},[c(b,{name:s.strings.schemaInUse},{content:d(()=>[u("div",sc,[a.isSidebar?(i(),S("div",rc,[u("p",nc,g(s.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,ic)])):m("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(C,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:d(()=>[c(y,{offset:a.getDefaultSchemaTooltipOffset()},{tooltip:d(()=>[u("span",{innerHTML:s.strings.defaultGraphTooltip},null,8,ac)]),default:d(()=>[c(l,{class:"small no-hover",type:"gray"},{default:d(()=>[c(h)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):m("",!0)]),u("div",lc,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(P,{key:0,class:"no-graphs",type:"yellow"},{default:d(()=>[A(g(s.strings.noGraphs),1)]),_:1})):m("",!0),c(l,{class:"medium",type:"blue",onClick:e[0]||(e[0]=k=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:d(()=>[A(g(s.strings.generateSchema),1)]),_:1}),c(l,{class:"medium",type:"gray",onClick:e[1]||(e[1]=k=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:d(()=>[A(g(s.strings.validateSchema),1)]),_:1})]),c(T,{show:!a.isSidebar&&s.modalOpenMetabox,onClose:e[2]||(e[2]=k=>s.modalOpenMetabox=!1)},null,8,["show"]),c(T,{show:a.isSidebar&&s.modalOpenSidebar,onClose:e[3]||(e[3]=k=>s.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const Ut=I(oc,[["render",cc]]),dc={setup(){return{licenseStore:de()}},components:{Schema:Ut,SchemaLite:Ut},props:{parentComponentContext:String}},uc={class:"aioseo-post-schema-view"};function pc(o,e,r,t,s,a){const h=p("schema",!0),l=p("schema-lite");return i(),S("div",uc,[t.licenseStore.isUnlicensed?m("",!0):(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const mc=I(dc,[["render",pc]]),ho=o=>(Vt("data-v-20175fdb"),o=o(),Ft(),o),gc={class:"aioseo-seo-revision-list-item"},hc={class:"aioseo-seo-revision-list-item__author"},_c={class:"aioseo-seo-revision-list-item__author__avatar"},fc={class:"aioseo-seo-revision-list-item__author__name"},yc=ho(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Sc={class:"aioseo-seo-revision-list-item__action"},kc=ho(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),vc={class:"aioseo-seo-revision-list-item__action__view"},bc={class:"aioseo-seo-revision-list-item__action__delete"},wc={__name:"ListItem",setup(o){const{currentUser:e}=$t(Xe());return(r,t)=>(i(),S("div",gc,[u("div",hc,[u("span",_c,[c(v(Os),{src:v(e).avatar.url,size:v(e).avatar.size},null,8,["src","size"])]),u("span",fc,g(v(To)(v(e).display_name,30)),1)]),yc,u("div",Sc,[kc,u("span",vc,[c(v(et),{width:"18"})]),u("span",bc,[c(v(Qe),{width:"18"})])])]))}},Cc=I(wc,[["__scopeId","data-v-20175fdb"]]),Pc={components:{SeoRevisionListItem:Cc}},Ec={class:"aioseo-seo-revisions-list"};function xc(o,e,r,t,s,a){const h=p("seo-revision-list-item");return i(),S("div",Ec,[(i(),S(be,null,He(13,l=>c(h,{key:"seo-revision-list-item-"+l})),64))])}const Tc=I(Pc,[["render",xc],["__scopeId","data-v-7b502c37"]]),gt="all-in-one-seo-pack",Ac={setup(){return{seoRevisionsStore:Xe()}},components:{CoreBlur:tt,CoreModal:Le,CoreSettingsRow:we,SeoRevisionsList:Tc,SeoRevisionsUpsell:Ds,SvgRightArrowShort:xt},data(){return{strings:{button:n("Open SEO Revisions",gt),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.",gt),seoRevisions:n("SEO Revisions",gt)}}}},Lc={key:0,class:"aioseo-seo-revisions-metabox"},Ic={key:1,class:"aioseo-seo-revisions-sidebar"},Mc={class:"aioseo-seo-revisions-sidebar__modal-body"},Oc={class:"description"};function Dc(o,e,r,t,s,a){const h=p("seo-revisions-list"),l=p("core-blur"),y=p("seo-revisions-upsell"),C=p("core-modal"),P=p("svg-right-arrow-short"),T=p("base-button"),b=p("core-settings-row");return o.$root.$data.screenContext==="metabox"?(i(),S("div",Lc,[c(l,null,{default:d(()=>[c(h)]),_:1}),c(y,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(i(),S("div",Ic,[c(C,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=k=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:d(()=>[A(g(s.strings.seoRevisions),1)]),body:d(()=>[u("div",Mc,[c(l,null,{default:d(()=>[c(h)]),_:1}),c(y,{"parent-component-context":"modal"})])]),_:1},8,["show"]),c(b,{align:""},{name:d(()=>[A(g(s.strings.seoRevisions),1)]),description:d(()=>[u("p",Oc,g(s.strings.description),1)]),content:d(()=>[c(T,{class:"gray small",onClick:e[1]||(e[1]=ae(k=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:d(()=>[c(P,{width:"10"}),A(" "+g(s.strings.button),1)]),_:1})]),_:1})])):m("",!0)}const Kt=I(Ac,[["render",Dc],["__scopeId","data-v-eda67d56"]]),Bc={setup(){return{licenseStore:de()}},components:{SeoRevisions:Kt,SeoRevisionsLite:Kt},props:{parentComponentContext:String},data(){return{license:Re}}},Rc={class:"aioseo-seo-revisions aioseo-tab-content"};function Hc(o,e,r,t,s,a){const h=p("seo-revisions",!0),l=p("seo-revisions-lite");return i(),S("div",Rc,[!t.licenseStore.isUnlicensed&&s.license.hasCoreFeature("seo-revisions")?(i(),_(h,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(i(),_(l,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Uc=I(Bc,[["render",Hc],["__scopeId","data-v-463f2e4b"]]),Kc={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=$t(Xe()),r=Se(()=>99<e.value?"99+":e.value);return(t,s)=>v(e)?(i(),S("span",{key:0,class:j(["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<v(e)}])},g(r.value),3)):m("",!0)}},Vc={},Fc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},Nc=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),Gc=[Nc];function zc(o,e){return i(),S("svg",Fc,Gc)}const qc=I(Vc,[["render",zc]]),jc={},$c={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},Wc=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),Yc=[Wc];function Zc(o,e){return i(),S("svg",$c,Yc)}const Xc=I(jc,[["render",Zc]]),Jc={},Qc={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},ed=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),td=[ed];function od(o,e){return i(),S("svg",Qc,td)}const sd=I(Jc,[["render",od]]),rd={},nd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},id=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),ad=[id];function ld(o,e){return i(),S("svg",nd,ad)}const cd=I(rd,[["render",ld]]),Ie="all-in-one-seo-pack",dd={setup(){const o=Xe(),e=ve(!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 $e(),window.wp.data.subscribe(()=>{e.value||r()})};return{keywordRankTrackerStore:Ze(),licenseStore:de(),postEditorStore:te(),redirectsStore:Ao(),rootStore:_e(),seoRevisionsStore:o,settingsStore:Ae(),watchObjectRevisionsOnSavePost:t}},components:{Advanced:ir,Alert:lo,CoreMainTabs:Oe,CoreModal:Le,General:uo,KeywordRankTracker:ea,LinkAssistant:el,ModalContent:xl,Redirects:Gl,Schema:mc,SeoRevisions:Uc,SeoRevisionsCountBadge:Kc,Social:mo,SvgBackup:qc,SvgBuild:Is,SvgCaret:Je,SvgCircleInformationSolid:Xc,SvgClose:yt,SvgLinkSuggestion:Tt,SvgReceipt:sd,SvgRedirectCrossedArrows:cd,SvgSettings:io,SvgShare:ao},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:n("Preview Snippet Editor",Ie)},activeMainSidebarTab:"",isPageBuilderEditor:Be}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Do(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",Ie)},{slug:"social",icon:"svg-share",name:n("Social",Ie)},{slug:"schema",icon:"svg-receipt",name:n("Schema",Ie)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:n("Redirects",Ie),warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:n("SEO Revisions",Ie),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:n("Advanced",Ie)}];return!this.rootStore.aioseo.integration&&!Be()&&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",Ie)}),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"&&Te(this.getTabPermission(o.slug))):this.tabs.filter(o=>Te(this.getTabPermission(o.slug))?!0:o.slug==="general"&&(Te("aioseo_page_analysis")||Te(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=Ne()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{ht("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=Ne()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{ht("aioseo-tab")},500);break}},beforeMount(){const o=document.querySelector(".interface-complementary-area__pin-unpin-item");o&&o!==null&&(o.style.display="block")},mounted(){Ye()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},ud={class:"aioseo-app aioseo-post-settings"},pd={key:0,class:"aioseo-sidepanel"},md=["onClick"],gd={class:"name"},hd={key:0,class:"aioseo-tab-title"};function _d(o,e,r,t,s,a){const h=p("core-main-tabs"),l=p("svg-circle-information-solid"),y=p("svg-caret"),C=p("svg-close"),P=p("alert"),T=p("modal-content"),b=p("core-modal"),k=p("keyword-rank-tracker");return i(),S("div",ud,[o.$root.$data.screenContext!=="sidebar"?(i(),_(h,{key:0,tabs:a.getTabs,showSaveButton:!1,active:s.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=x=>a.processChangeTab(x))},{"var-tab-icon":d(({tab:x})=>[(i(),_(ye(x.icon),{class:j([{warning:x.warning}])},null,8,["class"])),(i(),_(ye(x.badge)))]),_:1},8,["tabs","active"])):m("",!0),c(Fe,{name:"route-fade",mode:"out-in"},{default:d(()=>[o.$root.$data.screenContext==="sidebar"&&s.activeTab===null?(i(),S("div",pd,[(i(!0),S(be,null,He(a.getTabs,(x,z)=>(i(),S("a",{key:z,class:"aioseo-sidepanel-button",href:"#",onClick:ae(X=>a.processChangeTab(x.slug),["prevent"])},[(i(),_(ye(x.icon),{class:"icon"})),u("div",gd,g(x.name),1),(i(),_(ye(x.badge))),x.warning?(i(),_(l,{key:0,width:"15",height:"15"})):m("",!0),c(y)],8,md))),128))])):m("",!0)]),_:1}),c(Fe,{name:"route-fade",mode:"out-in"},{default:d(()=>[s.activeTab?(i(),S("div",{key:s.activeTab,class:j(["aioseo-tab",{"is-page-builder":!!t.rootStore.aioseo.integration}])},[o.$root.$data.screenContext==="sidebar"?(i(),S("div",hd,[u("span",null,g(a.getTabName(s.activeTab)),1),c(C,{onClick:e[1]||(e[1]=x=>a.processChangeTab(null))})])):m("",!0),o.$root.$data.screenContext==="sidebar"?(i(),_(P,{key:1})):m("",!0),(i(),_(ye(s.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=x=>a.processChangeTab(x))},null,32))],2)):m("",!0)]),_:1}),c(b,{show:t.postEditorStore.currentPost.modalOpen&&o.$root.$data.screenContext==="sidebar",onClose:a.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:d(()=>[A(g(s.strings.modalTitle),1)]),body:d(()=>[c(T)]),_:1},8,["show","onClose"]),c(k,{"modal-open":t.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=x=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:x}))},null,8,["modal-open"])])}const fd=I(dd,[["render",_d]]),bu={__name:"App",setup(o){Mo({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const e=te();return(r,t)=>(i(),S("div",{onClick:t[0]||(t[0]=ae(()=>{},["stop"])),id:"main-settings-cont"},[r.$root.$data.screenContext!=="sidebar"?(i(),_(v(lo),{key:0})):m("",!0),v(e).currentPost.id?(i(),_(v(fd),{key:1})):m("",!0)]))}};export{bu as _};