관리-도구
편집 파일: seo-preview.f8f0ee19.js
import{o as i,c as n,z as K,v as d,C as g,K as j,L as U,a as t,F as E,J as I,t as l,x as P,m as z,k as w,b,G as k,l as x,q as A,$ as J,E as B,Y as W}from"./js/runtime-dom.esm-bundler.6789c400.js";import{c as X,b as Q}from"./js/vue-router.fc4966b9.js";import{u as M,r as Z,R as ee}from"./js/index.20192476.js";import{g as te,C as oe,f as q,c as se,e as re,_ as ie}from"./js/Caret.662da1f3.js";import{C as ce}from"./js/Tabs.2fd33524.js";import{C as ne}from"./js/Index.de83b4aa.js";import{S as ae,a as le}from"./js/Mobile.3fcac169.js";import{S as de}from"./js/Facebook.889f0b59.js";import{_ as m}from"./js/_plugin-vue_export-helper.249dac1d.js";import{S as N,u as pe}from"./js/Settings.0254ae9c.js";import{S as _e}from"./js/Twitter.faae4f4e.js";import{v as he,w as ge,t as ue,x as me}from"./js/postTitle.d67eb903.js";import{C as ve}from"./js/FacebookPreview.8edcde79.js";import{C as fe}from"./js/GoogleSearchPreview.2f81905c.js";import{S as we}from"./js/Profile.19fffd1c.js";import{S as be}from"./js/Google.21dda6d1.js";import"./js/translations.12335a6a.js";import{_}from"./js/default-i18n.54b5d8cd.js";import{u as ke}from"./js/TruSeoScore.c8bdf339.js";import{S as Se}from"./js/Exclamation.bf79561a.js";import{n as Ce}from"./js/helpers.f95d5840.js";import{C as ye}from"./js/TwitterPreview.09956aa1.js";import"./js/ProBadge.7733ac87.js";import"./js/Information.82968754.js";import"./js/Slide.d0517fb0.js";import"./js/TableOfContentsStore.62cf580e.js";import"./js/metabox.dc73facf.js";import"./js/cleanForSlug.f9ffe7db.js";import"./js/toString.1401d490.js";import"./js/_baseTrim.940c51cf.js";import"./js/_stringToArray.08127ca9.js";import"./js/_baseSet.32e7a763.js";import"./js/regex.f8017116.js";import"./js/Img.2fc40874.js";import"./js/constants.2019bcb3.js";import"./js/Book.e7bb6a80.js";const xe={},Ee={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-icon-google"},De=K('<circle cx="12" cy="12" r="11.5" fill="white" stroke="#D0D1D7"></circle><g clip-path="url(#clip0_3359_97687)"><path d="M19.04 12.1666C19.04 11.6466 18.9933 11.1466 18.9067 10.6666H12V13.5032H15.9467C15.7767 14.4199 15.26 15.1966 14.4833 15.7166V17.5566H16.8533C18.24 16.2799 19.04 14.3999 19.04 12.1666Z" fill="#4285F4"></path><path d="M12 19.3332C13.98 19.3332 15.64 18.6765 16.8533 17.5565L14.4833 15.7165C13.8267 16.1565 12.9867 16.4165 12 16.4165C10.09 16.4165 8.47332 15.1265 7.89665 13.3932H5.44666V15.2932C6.65332 17.6899 9.13332 19.3332 12 19.3332Z" fill="#34A853"></path><path d="M7.89663 13.3931C7.74996 12.9531 7.66663 12.4831 7.66663 11.9998C7.66663 11.5164 7.74996 11.0464 7.89663 10.6064V8.70642H5.44663C4.93329 9.72833 4.66617 10.8562 4.66663 11.9998C4.66663 13.1831 4.94996 14.3031 5.44663 15.2931L7.89663 13.3931Z" fill="#FBBC05"></path><path d="M12 7.58323C13.0767 7.58323 14.0433 7.95323 14.8033 8.6799L16.9067 6.57657C15.6367 5.39323 13.9767 4.66656 12 4.66656C9.13332 4.66656 6.65332 6.3099 5.44666 8.70656L7.89666 10.6066C8.47332 8.87323 10.09 7.58323 12 7.58323Z" fill="#EA4335"></path></g><defs><clipPath id="clip0_3359_97687"><rect width="16" height="16" fill="white" transform="translate(4 3.99994)"></rect></clipPath></defs>',3),Te=[De];function Ve(e,o){return i(),n("svg",Ee,Te)}const Ae=m(xe,[["render",Ve]]),Pe={components:{CoreFacebookPreview:ve},data(){return{facebookData:he()}}},$e={class:"preview-wrapper"};function Ie(e,o,c,a,s,r){const p=d("core-facebook-preview");return i(),n("div",$e,[g(p,{description:s.facebookData.description,image:s.facebookData.image,title:s.facebookData.title},null,8,["description","image","title"])])}const Me=m(Pe,[["render",Ie],["__scopeId","data-v-8a1fdef2"]]),Fe={},Be=e=>(j("data-v-66375cd8"),e=e(),U(),e),He={class:"google-serp-snippet-placeholder"},Le=Be(()=>t("div",{class:"google-serp-snippet-placeholder__main"},[t("div"),t("div"),t("div"),t("div"),t("div"),t("div")],-1)),Oe=[Le];function Ge(e,o){return i(),n("div",He,Oe)}const Re=m(Fe,[["render",Ge],["__scopeId","data-v-66375cd8"]]),Ke={},je={fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",class:"aioseo-icon-google-search"},Ue=K('<g clip-path="url(#clip0_129_35614)"><path d="M4.16669 0.833332V1.66667C4.82973 1.66667 5.46561 1.93006 5.93445 2.3989C6.40329 2.86774 6.66669 3.50362 6.66669 4.16667H7.50002C7.50002 3.28261 7.14883 2.43476 6.52371 1.80964C5.89859 1.18452 5.05074 0.833332 4.16669 0.833332Z" fill="#34A853"></path><path d="M4.16665 1.66667V0.833332C3.28259 0.833332 2.43474 1.18452 1.80962 1.80964C1.1845 2.43476 0.833313 3.28261 0.833313 4.16667H1.66665C1.66665 2.79167 2.79165 1.66667 4.16665 1.66667Z" fill="#EA4335"></path><path d="M1.66665 4.16667H0.833313C0.833313 5.05072 1.1845 5.89857 1.80962 6.52369C2.43474 7.14881 3.28259 7.5 4.16665 7.5V6.66667C2.79165 6.66667 1.66665 5.54583 1.66665 4.16667Z" fill="#FBBC04"></path><path d="M9.16669 8.57917L6.79585 6.20833C7.25178 5.6254 7.49965 4.90673 7.50002 4.16667H6.66669C6.66669 4.82971 6.40329 5.46559 5.93445 5.93443C5.46561 6.40328 4.82973 6.66667 4.16669 6.66667V7.5C4.93752 7.5 5.63335 7.23333 6.20002 6.8L8.57085 9.17083L9.16669 8.57917Z" fill="#4285F4"></path></g><defs><clipPath id="clip0_129_35614"><rect width="10" height="10" fill="white"></rect></clipPath></defs>',2),Ze=[Ue];function qe(e,o){return i(),n("svg",je,Ze)}const Ne=m(Ke,[["render",qe]]),Ye={},ze={fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 260 547.1",class:"aioseo-mobile-device-frame"},Je=t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M222.206 0H37.7945C16.9212 0 0 16.9937 0 37.9565V509.14C0 530.103 16.9212 547.097 37.7945 547.097H222.206C243.079 547.097 260 530.103 260 509.14V37.9565C260 16.9937 243.079 0 222.206 0ZM7.81955 37.9565C7.81955 21.3309 21.2398 7.85307 37.7945 7.85307H56.7464C58.9919 8.64665 60.6015 10.7957 60.6015 13.3222C60.6015 21.3253 67.0616 27.8129 75.0304 27.8129H184.318C192.287 27.8129 198.747 21.3253 198.747 13.3222C198.747 10.7957 200.356 8.64665 202.602 7.85307H222.206C238.76 7.85307 252.18 21.3309 252.18 37.9565V509.14C252.18 525.766 238.76 539.244 222.206 539.244H37.7945C21.2398 539.244 7.81955 525.766 7.81955 509.14V37.9565Z",fill:"currentColor"},null,-1),We=t("rect",{x:"115.34",y:"14.3973",width:"28.6717",height:"2.61769",rx:"1.30884",fill:"#E8E8EB"},null,-1),Xe=t("ellipse",{cx:"157.697",cy:"15.7062",rx:"3.25815",ry:"3.27211",fill:"#E8E8EB"},null,-1),Qe=[Je,We,Xe];function et(e,o){return i(),n("svg",ze,Qe)}const tt=m(Ye,[["render",et]]),ot={},st={width:"15",height:"19",viewBox:"0 0 15 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-padlock"},rt=t("path",{d:"M12.5346 6.63175H11.6925V4.94744C11.6925 2.6231 9.80607 0.736679 7.48173 0.736679C5.15739 0.736679 3.27096 2.6231 3.27096 4.94744V6.63175H2.42881C1.50244 6.63175 0.744507 7.38968 0.744507 8.31605V16.7376C0.744507 17.6639 1.50244 18.4219 2.42881 18.4219H12.5346C13.461 18.4219 14.2189 17.6639 14.2189 16.7376V8.31605C14.2189 7.38968 13.461 6.63175 12.5346 6.63175ZM7.48173 14.2111C6.55536 14.2111 5.79742 13.4532 5.79742 12.5268C5.79742 11.6004 6.55536 10.8425 7.48173 10.8425C8.40809 10.8425 9.16603 11.6004 9.16603 12.5268C9.16603 13.4532 8.40809 14.2111 7.48173 14.2111ZM10.0924 6.63175H4.87105V4.94744C4.87105 3.50736 6.04165 2.33677 7.48173 2.33677C8.92181 2.33677 10.0924 3.50736 10.0924 4.94744V6.63175Z",fill:"currentColor"},null,-1),it=[rt];function ct(e,o){return i(),n("svg",st,it)}const nt=m(ot,[["render",ct]]),G="all-in-one-seo-pack",at={components:{GoogleSerpSnippetPlaceholder:Re,SvgDannieProfile:we,SvgIconGoogleSearch:Ne,SvgIconSettings:N,SvgLogoGoogle:be,SvgMobileDeviceFrame:tt,SvgPadlock:nt,SvgSearch:te},props:{device:{type:String,default:"desktop"},searchText:{type:String,default:""}},data(){return{strings:{all:_("All",G),results:_("About 61,000,000,000 results (0.40 seconds)",G)}}}},H=e=>(j("data-v-833ed46d"),e=e(),U(),e),lt={class:"google-serp-wireframe"},dt={class:"google-serp-wireframe__overflow-y"},pt={class:"google-serp-wireframe__header"},_t={class:"google-serp-wireframe__bullets"},ht={class:"google-serp-wireframe__address-bar"},gt=H(()=>t("div",{class:"placeholder"},null,-1)),ut={class:"google-serp-wireframe__body"},mt={class:"svg-logo-google-wrapper"},vt={class:"svg-search-wrapper google-serp-wireframe__search-bar"},ft={class:"text-truncate"},wt={class:"svg-settings-wrapper"},bt={class:"svg-dannie-profile-wrapper"},kt={class:"google-serp-wireframe__footer"},St={class:"google-serp-wireframe__tabs"},Ct={class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--all"},yt=H(()=>t("div",{class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--placeholder"},null,-1)),xt=H(()=>t("div",{class:"google-serp-wireframe__divider"},null,-1)),Et={class:"google-serp-wireframe__results"},Dt={key:0,class:"google-serp-wireframe__snippet"};function Tt(e,o,c,a,s,r){const p=d("svg-mobile-device-frame"),h=d("svg-padlock"),f=d("svg-logo-google"),S=d("svg-search"),C=d("svg-icon-settings"),y=d("svg-dannie-profile"),u=d("svg-icon-google-search"),D=d("google-serp-snippet-placeholder");return i(),n("div",{class:k(["google-serp-wireframe-wrapper",`google-serp-wireframe-wrapper--${c.device}`])},[t("div",lt,[g(p,{width:"260"}),t("div",dt,[t("div",pt,[t("div",_t,[(i(),n(E,null,I(3,T=>t("div",{key:`bullet-${T}`})),64))]),t("div",ht,[g(h,{width:"25"}),gt])]),t("div",ut,[t("div",mt,[g(f,{width:"60"})]),t("div",vt,[t("div",ft,l(c.searchText),1),g(S,{width:"12"})]),t("div",wt,[g(C,{width:"18"})]),t("div",bt,[g(y,{width:"26"})])]),t("div",kt,[t("div",St,[t("div",Ct,[g(u,{width:"18"}),P(" "+l(s.strings.all),1)]),(i(),n(E,null,I(5,T=>t("div",{key:`dot-${T}`,class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--double-placeholder"})),64)),yt]),xt,t("div",Et,l(s.strings.results),1),e.$slots["serp-snippet"]?(i(),n("div",Dt,[z(e.$slots,"serp-snippet",{},void 0,!0),c.device==="desktop"?(i(),n(E,{key:0},I(3,T=>g(D,{key:`snippet-placeholder-${T}`})),64)):(i(),w(D,{key:1}))])):b("",!0)])])])],2)}const Vt=m(at,[["render",Tt],["__scopeId","data-v-833ed46d"]]),At={setup(){return{rootStore:M(),seoPreviewStore:pe()}},components:{CoreGoogleSearchPreview:fe,GoogleSerpWireframe:Vt},props:{device:{type:String,default:"desktop"}},data(){return{googleData:ge()}},computed:{richResults(){var c;let e=document.querySelector('[class*="aioseo-table-of-contents"] ul');e&&(e=e.innerText.split(` `).slice(0,4).map(a=>ue(a.trim(),30)).filter(a=>a));const o=((c=document.querySelector("script.aioseo-schema")||{})==null?void 0:c.textContent)||"";return{anchorLinks:e||[],reviewSnippet:this.seoPreviewStore.extractReviewSnippet(o),faq:this.seoPreviewStore.extractFaq(o)}}}},Pt={class:"preview-wrapper"};function $t(e,o,c,a,s,r){var f,S,C;const p=d("core-google-search-preview"),h=d("google-serp-wireframe");return i(),n("div",Pt,[g(h,{device:c.device,"search-text":((C=(S=(f=a.rootStore.aioseo)==null?void 0:f.keyphrases)==null?void 0:S.focus)==null?void 0:C.keyphrase)??""},{"serp-snippet":x(()=>{var y,u,D;return[g(p,{"focus-keyphrase":((D=(u=(y=a.rootStore.aioseo)==null?void 0:y.keyphrases)==null?void 0:u.focus)==null?void 0:D.keyphrase)??"",device:c.device,url:s.googleData.url,title:s.googleData.title,description:s.googleData.description,"rich-results":r.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"])]}),_:1},8,["device","search-text"])])}const It=m(At,[["render",$t],["__scopeId","data-v-dbe291d1"]]),$="all-in-one-seo-pack",Mt={computed:{metaTags(){var s,r,p;const e=[],o=[{label:_("Title",$),value:document.title||""},{label:_("Description",$),value:((s=document.querySelector('meta[name="description"]'))==null?void 0:s.content)||""},{label:_("Canonical URL",$),value:((r=document.querySelector('link[rel="canonical"]'))==null?void 0:r.href)||""}],c=document.querySelectorAll('meta[property^="og:"][content],meta[name^="twitter:"][content]');let a=((p=document.querySelector('meta[name="keywords"]'))==null?void 0:p.content)||"";return a&&(a=a.split(",").join(", "),o.splice(2,0,{label:_("Meta Keywords",$),value:a})),o.forEach(h=>{h.value&&e.push({label:h.label,value:h.value})}),0<(c==null?void 0:c.length)&&c.forEach(h=>{h.content&&e.push({label:h.getAttribute("name")?h.getAttribute("name"):h.getAttribute("property"),value:h.content})}),e}},methods:{isUrl:Ce}},Ft={class:"aioseo-seo-preview-standalone-view-meta-tags"},Bt=["href"];function Ht(e,o,c,a,s,r){return i(),n("div",Ft,[t("dl",null,[(i(!0),n(E,null,I(r.metaTags,(p,h)=>(i(),n(E,{key:h},[t("dt",null,l(p.label),1),t("dd",null,[r.isUrl(p.value)?(i(),n("a",{key:0,href:p.value,target:"_blank"},l(p.value),9,Bt)):(i(),n(E,{key:1},[P(l(p.value),1)],64))])],64))),128))])])}const Lt=m(Mt,[["render",Ht]]),v="all-in-one-seo-pack",Ot={setup(){const{getErrorClass:e,getErrorDisplay:o,strings:c}=ke();return{getErrorClass:e,getErrorDisplay:o,rootStore:M(),composableStrings:c}},components:{CoreAlert:oe,SvgIconPencil:q,SvgCircleCheck:se,SvgCircleExclamation:Se,SvgCircleClose:re,ViewMetaTags:Lt},data(){return{strings:Z(this.composableStrings,{focusKeyphrase:_("Focus Keyphrase",v),pageAnalysis:_("Page Analysis",v),basicSeo:_("Basic SEO",v),readability:_("Readability",v),title:_("Title",v),metaTags:_("Meta Tags",v),noKeyphraseFound:_("No keyphrase found",v),noDataYet:_("No data yet",v),visitAdmin:_('You can edit the "Focus Keyphrase" and view information about "Page Analysis" on the admin side.',v)})}},computed:{focusKeyphrase(){var e,o,c;return((c=(o=(e=this.rootStore.aioseo)==null?void 0:e.keyphrases)==null?void 0:o.focus)==null?void 0:c.keyphrase)||!1},editFocusKeyphraseUrl(){var e;try{if(!((e=this.rootStore.aioseo)!=null&&e.editObjectUrl))return"#";const o="aioseo-post-settings-snippet-focus-keyphrase-row";return`${new URL(this.rootStore.aioseo.editObjectUrl).href}&aioseo-scroll=${o}&aioseo-highlight=${o}`}catch{return"#"}}},methods:{getCheckObject(e){var o,c;return(c=(o=this.rootStore.aioseo)==null?void 0:o.page_analysis)==null?void 0:c.analysis[e]},getCheckErrors(e){var o;return((o=this.getCheckObject(e))==null?void 0:o.errors)||0},getCheckIconComponent(e){const o=this.getErrorClass(this.getCheckErrors(e));return o==="red"?"svg-circle-close":o==="orange"?"svg-circle-exclamation":"svg-circle-check"},checkErrorsExists(e){var o,c;return typeof((c=(o=this.rootStore.aioseo.page_analysis.analysis)==null?void 0:o[e])==null?void 0:c.errors)<"u"},isCheckEligible(){var e;return typeof((e=this.rootStore.aioseo.page_analysis)==null?void 0:e.analysis)<"u"}}},Gt={class:"aioseo-seo-preview-standalone-view-seo-inspector"},Rt={key:0,class:"first-half"},Kt={class:"child"},jt={key:0},Ut={key:1,class:"no-keyphrase-found"},Zt={key:0,class:"check"},qt={class:"check__title"},Nt={class:"check__feedback"},Yt={key:1,class:"check"},zt={class:"check__title"},Jt={class:"check__feedback"},Wt={key:2,class:"check"},Xt={class:"check__title"},Qt={class:"check__feedback"},eo={key:3,class:"check"},to={class:"check__title"},oo={class:"check__feedback"},so={key:4,class:"check"},ro={class:"check__title"},io={class:"check__feedback"},co={key:5,class:"check"},no={class:"check__title"},ao={class:"check__feedback"},lo={class:"second-half"},po={class:"child"};function _o(e,o,c,a,s,r){const p=d("svg-circle-exclamation"),h=d("core-alert"),f=d("view-meta-tags");return i(),n("div",Gt,[t("div",null,[r.isCheckEligible()?(i(),n("div",Rt,[t("div",Kt,[t("dl",null,[t("dt",null,l(s.strings.focusKeyphrase),1),t("dd",null,[r.focusKeyphrase?(i(),n("span",jt,l(r.focusKeyphrase),1)):b("",!0),r.focusKeyphrase?b("",!0):(i(),n("span",Ut,[g(p,{width:"20"}),P(" "+l(s.strings.noKeyphraseFound),1)]))]),t("dt",null,l(s.strings.pageAnalysis),1),t("dd",null,[r.checkErrorsExists("basic")?(i(),n("div",Zt,[(i(),w(A(r.getCheckIconComponent("basic")),{class:k([a.getErrorClass(r.getCheckErrors("basic")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",qt,l(s.strings.basicSeo)+": ",1),t("span",Nt,l(a.getErrorDisplay(r.getCheckErrors("basic"))),1)])])):(i(),n("div",Yt,[t("span",zt,l(s.strings.basicSeo)+": ",1),t("span",Jt,l(s.strings.noDataYet),1)])),r.checkErrorsExists("title")?(i(),n("div",Wt,[(i(),w(A(r.getCheckIconComponent("title")),{class:k([a.getErrorClass(r.getCheckErrors("title")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",Xt,l(s.strings.title)+": ",1),t("span",Qt,l(a.getErrorDisplay(r.getCheckErrors("title"))),1)])])):(i(),n("div",eo,[t("span",to,l(s.strings.title)+": ",1),t("span",oo,l(s.strings.noDataYet),1)])),r.checkErrorsExists("readability")?(i(),n("div",so,[(i(),w(A(r.getCheckIconComponent("readability")),{class:k([a.getErrorClass(r.getCheckErrors("readability")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",ro,l(s.strings.readability)+": ",1),t("span",io,l(a.getErrorDisplay(r.getCheckErrors("readability"))),1)])])):(i(),n("div",co,[t("span",no,l(s.strings.readability)+": ",1),t("span",ao,l(s.strings.noDataYet),1)]))])]),a.rootStore.aioseo.editObjectBtnText&&r.editFocusKeyphraseUrl?(i(),w(h,{key:0,innerHTML:`${s.strings.visitAdmin} <a style='display: inline-flex' href='${r.editFocusKeyphraseUrl}'>${a.rootStore.aioseo.editObjectBtnText} →</a>`,size:"small"},null,8,["innerHTML"])):b("",!0)])])):b("",!0),t("div",lo,[t("div",po,[t("dl",null,[t("dt",null,l(s.strings.metaTags),1),t("dd",null,[g(f)])])])])])])}const ho=m(Ot,[["render",_o],["__scopeId","data-v-eb154246"]]),go={components:{CoreTwitterPreview:ye},data(){return{twitterData:me()}}},uo={class:"preview-wrapper"};function mo(e,o,c,a,s,r){const p=d("core-twitter-preview");return i(),n("div",uo,[g(p,{card:s.twitterData.card,description:s.twitterData.description,image:s.twitterData.image,title:s.twitterData.title},null,8,["card","description","image","title"])])}const vo=m(go,[["render",mo],["__scopeId","data-v-66b08051"]]),V="all-in-one-seo-pack",fo={setup(){return{rootStore:M()}},components:{BaseButton:ie,CoreMainTabs:ce,CoreModal:ne,SvgDesktop:ae,SvgIconFacebook:de,SvgIconGoogle:Ae,SvgIconPencil:q,SvgIconSettings:N,SvgIconTwitter:_e,SvgMobile:le,ViewFacebook:Me,ViewGoogle:It,ViewSeoInspector:ho,ViewTwitter:vo},data(){return{teleportTo:this.getShadowRoot()?this.getShadowRoot().querySelector("#aioseo-modal-portal"):"#aioseo-modal-portal",activeTab:"ViewGoogle",device:"desktop",display:null,loadingEditPreviewDataBtn:!1,strings:{modalHeader:_("SEO Preview",V)},tabs:[{slug:"ViewGoogle",icon:"svg-icon-google",name:"Google",component:"ViewGoogle"},{slug:"ViewFacebook",icon:"svg-icon-facebook",name:"Facebook",component:"ViewFacebook"},{slug:"ViewTwitter",icon:"svg-icon-twitter",name:"X (Twitter)",component:"ViewTwitter"},{slug:"ViewSeoInspector",icon:"svg-icon-settings",name:_("SEO Inspector",V),component:"ViewSeoInspector"}]}},computed:{editSnippetData(){const e={url:"",btnText:""};return this.activeTab==="ViewGoogle"?(e.url=this.rootStore.aioseo.editGoogleSnippetUrl||"",e.btnText=_("Edit Snippet",V),e):this.activeTab==="ViewFacebook"?(e.url=this.rootStore.aioseo.editFacebookSnippetUrl||"",e.btnText=_("Edit Facebook Meta Data",V),e):(this.activeTab==="ViewTwitter"&&(e.url=this.rootStore.aioseo.editTwitterSnippetUrl||"",e.btnText=_("Edit X Meta Data",V)),e)},editObjectData(){const e={url:"",btnText:""};return this.activeTab==="ViewSeoInspector"&&(e.url=this.rootStore.aioseo.editObjectUrl||"",e.btnText=this.rootStore.aioseo.editObjectBtnText||""),e}},methods:{getShadowRoot(){var e;return((e=document.querySelector(".aioseo-seo-preview-shadow-wrapper")||{})==null?void 0:e.shadowRoot)||null},styleShadowDom(){if(!this.getShadowRoot())return!1;this.rootStore.aioseo.mainAssetCssQueue.forEach(e=>{if(typeof e.url>"u"||!e.url)return;const o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("media","all"),o.setAttribute("href",e.url),this.getShadowRoot().prepend(o)})},watchClicks(){const e=document.querySelector("#wp-admin-bar-aioseo-seo-preview a");e&&e.addEventListener("click",o=>{o.preventDefault(),this.display=!0})}},mounted(){this.styleShadowDom(),this.watchClicks()}},wo={class:"aioseo-modal-content"},bo={class:"component-overflow"},ko={class:"component-container"},So={key:0,class:"btn-edit-preview-data-wrapper"},Co={key:1,class:"device-toggle"};function yo(e,o,c,a,s,r){const p=d("core-main-tabs"),h=d("svg-icon-pencil"),f=d("base-button"),S=d("svg-desktop"),C=d("svg-mobile"),y=d("core-modal");return i(),w(y,{show:s.display,classes:["aioseo-seo-preview-standalone"],onClose:o[4]||(o[4]=u=>s.display=null),"teleport-to":s.teleportTo},J({headerTitle:x(()=>[P(l(s.strings.modalHeader),1)]),body:x(()=>[t("div",wo,[g(p,{tabs:s.tabs,showSaveButton:!1,active:s.activeTab,onChanged:o[0]||(o[0]=u=>s.activeTab=u)},{"var-tab-icon":x(({tab:u})=>[(i(),w(A(u.icon)))]),_:1},8,["tabs","active"]),t("div",bo,[t("div",ko,[t("div",{class:k(["component-wrapper","tab"+s.activeTab+" tab"+s.activeTab+"--"+s.device])},[(i(),w(A(s.activeTab),{device:s.device,parentComponentContext:"modal"},null,8,["device"]))],2)])])])]),_:2},[r.editSnippetData.url||r.editObjectData.url||s.activeTab==="ViewGoogle"?{name:"footer",fn:x(()=>[r.editSnippetData.url||r.editObjectData.url?(i(),n("div",So,[g(f,{href:r.editSnippetData.url||r.editObjectData.url,loading:s.loadingEditPreviewDataBtn,onClick:o[1]||(o[1]=B(u=>s.loadingEditPreviewDataBtn=!0,["exact"])),class:"btn-edit-preview-data",type:"gray",size:"small",tag:"a"},{default:x(()=>[g(h,{width:"14"}),P(" "+l(r.editSnippetData.btnText||r.editObjectData.btnText),1)]),_:1},8,["href","loading"])])):b("",!0),s.activeTab==="ViewGoogle"?(i(),n("div",Co,[t("a",{class:k(["btn-device",{"btn-device--active":s.device==="desktop"}]),role:"button",href:"#",onClick:o[2]||(o[2]=B(u=>s.device="desktop",["prevent"]))},[g(S,{width:"24"})],2),t("a",{class:k(["btn-device",{"btn-device--active":s.device==="mobile"}]),role:"button",href:"#",onClick:o[3]||(o[3]=B(u=>s.device="mobile",["prevent"]))},[g(C,{width:"24"})],2)])):b("",!0)]),key:"0"}:void 0]),1032,["show","teleport-to"])}const Y=m(fo,[["render",yo]]),L=X({history:Q(),routes:[{path:"/:pathMatch(.*)*",component:Y}]}),F=W({...Y,name:"Standalone/SeoPreview"});F.use(L);L.app=F;ee(F,L);const R=M(),xo=JSON.parse(JSON.stringify(window.aioseoSeoPreview));R.aioseo=Z({...R.aioseo},{...xo||{}});const O=document.createElement("div");O.setAttribute("id","aioseo-modal-portal");{const e=document.createElement("div"),o=e.attachShadow({mode:"open"}),c=document.createElement("div");e.setAttribute("class","aioseo-seo-preview-shadow-wrapper"),e.setAttribute("style","margin:0;padding:0;border:0"),c.setAttribute("dir",(document==null?void 0:document.dir)||"ltr"),c.setAttribute("style","margin:0;padding:0;border:0"),o.appendChild(c),c.appendChild(O),document.body.appendChild(e)}F.mount(O);