관리-도구
편집 파일: seo-preview.ff233c94.js
import{o as i,c as n,z as U,v as p,C as h,K,L as j,a as t,F as E,J as M,t as d,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.5c3c7d72.js";import{c as X,b as Q}from"./js/vue-router.2f910c93.js";import{u as $,r as Z,R as ee}from"./js/index.ae2b6956.js";import{g as te,C as oe,f as q,c as se,e as re,_ as ie}from"./js/Caret.d9cc70ba.js";import{C as ce}from"./js/Tabs.b7a0989c.js";import{C as ne}from"./js/Index.4b4d1967.js";import{S as ae,a as le}from"./js/Mobile.ada2591a.js";import{S as de}from"./js/Facebook.c0193ddb.js";import{_ as u}from"./js/_plugin-vue_export-helper.eefbdd86.js";import{S as N,u as pe}from"./js/Settings.9f4c4ffc.js";import{S as _e}from"./js/Twitter.f6341402.js";import{v as he,w as ge,t as ue,x as me}from"./js/helpers.979ce6ae.js";import{C as ve}from"./js/FacebookPreview.eab372cf.js";import{C as fe}from"./js/GoogleSearchPreview.c38187f9.js";import{S as we}from"./js/Profile.ad607616.js";import{S as be}from"./js/Google.8021a4a0.js";import"./js/translations.d159963e.js";import{_}from"./js/default-i18n.20001971.js";import{u as ke}from"./js/TruSeoScore.9c887755.js";import{S as Se}from"./js/Exclamation.22e53a8b.js";import{n as Ce}from"./js/helpers.c7282833.js";import{u as ye}from"./js/Url.e2d414d9.js";import{C as xe}from"./js/TwitterPreview.e775ca55.js";import"./js/ProBadge.751e0b85.js";import"./js/Information.13e8cece.js";import"./js/Slide.39c07c03.js";import"./js/TableOfContentsStore.c4730d49.js";import"./js/metabox.870afb5f.js";import"./js/cleanForSlug.c4a9e111.js";import"./js/toString.a2dfb892.js";import"./js/_baseTrim.11b89ad9.js";import"./js/_stringToArray.f9ddb970.js";import"./js/_baseSet.ab668497.js";import"./js/regex.8a6101c0.js";import"./js/Img.90c4fd14.js";import"./js/constants.24c44c43.js";import"./js/Book.74a13fcd.js";const Ee={},De={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-icon-google"},Te=U('<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),Ve=[Te];function Ae(e,o){return i(),n("svg",De,Ve)}const Pe=u(Ee,[["render",Ae]]),Ie={components:{CoreFacebookPreview:ve},data(){return{facebookData:he()}}},Me={class:"preview-wrapper"};function $e(e,o,c,l,s,r){const a=p("core-facebook-preview");return i(),n("div",Me,[h(a,{description:s.facebookData.description,image:s.facebookData.image,title:s.facebookData.title},null,8,["description","image","title"])])}const Fe=u(Ie,[["render",$e],["__scopeId","data-v-8a1fdef2"]]),Be={},He=e=>(K("data-v-66375cd8"),e=e(),j(),e),Le={class:"google-serp-snippet-placeholder"},Oe=He(()=>t("div",{class:"google-serp-snippet-placeholder__main"},[t("div"),t("div"),t("div"),t("div"),t("div"),t("div")],-1)),Ge=[Oe];function Re(e,o){return i(),n("div",Le,Ge)}const Ue=u(Be,[["render",Re],["__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"},Ze=U('<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),qe=[Ze];function Ne(e,o){return i(),n("svg",je,qe)}const Ye=u(Ke,[["render",Ne]]),ze={},Je={fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 260 547.1",class:"aioseo-mobile-device-frame"},We=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),Xe=t("rect",{x:"115.34",y:"14.3973",width:"28.6717",height:"2.61769",rx:"1.30884",fill:"#E8E8EB"},null,-1),Qe=t("ellipse",{cx:"157.697",cy:"15.7062",rx:"3.25815",ry:"3.27211",fill:"#E8E8EB"},null,-1),et=[We,Xe,Qe];function tt(e,o){return i(),n("svg",Je,et)}const ot=u(ze,[["render",tt]]),st={},rt={width:"15",height:"19",viewBox:"0 0 15 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-padlock"},it=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),ct=[it];function nt(e,o){return i(),n("svg",rt,ct)}const at=u(st,[["render",nt]]),G="all-in-one-seo-pack",lt={components:{GoogleSerpSnippetPlaceholder:Ue,SvgDannieProfile:we,SvgIconGoogleSearch:Ye,SvgIconSettings:N,SvgLogoGoogle:be,SvgMobileDeviceFrame:ot,SvgPadlock:at,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=>(K("data-v-833ed46d"),e=e(),j(),e),dt={class:"google-serp-wireframe"},pt={class:"google-serp-wireframe__overflow-y"},_t={class:"google-serp-wireframe__header"},ht={class:"google-serp-wireframe__bullets"},gt={class:"google-serp-wireframe__address-bar"},ut=H(()=>t("div",{class:"placeholder"},null,-1)),mt={class:"google-serp-wireframe__body"},vt={class:"svg-logo-google-wrapper"},ft={class:"svg-search-wrapper google-serp-wireframe__search-bar"},wt={class:"text-truncate"},bt={class:"svg-settings-wrapper"},kt={class:"svg-dannie-profile-wrapper"},St={class:"google-serp-wireframe__footer"},Ct={class:"google-serp-wireframe__tabs"},yt={class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--all"},xt=H(()=>t("div",{class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--placeholder"},null,-1)),Et=H(()=>t("div",{class:"google-serp-wireframe__divider"},null,-1)),Dt={class:"google-serp-wireframe__results"},Tt={key:0,class:"google-serp-wireframe__snippet"};function Vt(e,o,c,l,s,r){const a=p("svg-mobile-device-frame"),m=p("svg-padlock"),f=p("svg-logo-google"),S=p("svg-search"),C=p("svg-icon-settings"),y=p("svg-dannie-profile"),g=p("svg-icon-google-search"),D=p("google-serp-snippet-placeholder");return i(),n("div",{class:k(["google-serp-wireframe-wrapper",`google-serp-wireframe-wrapper--${c.device}`])},[t("div",dt,[h(a,{width:"260"}),t("div",pt,[t("div",_t,[t("div",ht,[(i(),n(E,null,M(3,T=>t("div",{key:`bullet-${T}`})),64))]),t("div",gt,[h(m,{width:"25"}),ut])]),t("div",mt,[t("div",vt,[h(f,{width:"60"})]),t("div",ft,[t("div",wt,d(c.searchText),1),h(S,{width:"12"})]),t("div",bt,[h(C,{width:"18"})]),t("div",kt,[h(y,{width:"26"})])]),t("div",St,[t("div",Ct,[t("div",yt,[h(g,{width:"18"}),P(" "+d(s.strings.all),1)]),(i(),n(E,null,M(5,T=>t("div",{key:`dot-${T}`,class:"google-serp-wireframe__tabs__tab google-serp-wireframe__tabs__tab--double-placeholder"})),64)),xt]),Et,t("div",Dt,d(s.strings.results),1),e.$slots["serp-snippet"]?(i(),n("div",Tt,[z(e.$slots,"serp-snippet",{},void 0,!0),c.device==="desktop"?(i(),n(E,{key:0},M(3,T=>h(D,{key:`snippet-placeholder-${T}`})),64)):(i(),w(D,{key:1}))])):b("",!0)])])])],2)}const At=u(lt,[["render",Vt],["__scopeId","data-v-833ed46d"]]),Pt={setup(){return{rootStore:$(),seoPreviewStore:pe()}},components:{CoreGoogleSearchPreview:fe,GoogleSerpWireframe:At},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(l=>ue(l.trim(),30)).filter(l=>l));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)}}}},It={class:"preview-wrapper"};function Mt(e,o,c,l,s,r){var f,S,C;const a=p("core-google-search-preview"),m=p("google-serp-wireframe");return i(),n("div",It,[h(m,{device:c.device,"search-text":((C=(S=(f=l.rootStore.aioseo)==null?void 0:f.keyphrases)==null?void 0:S.focus)==null?void 0:C.keyphrase)??""},{"serp-snippet":x(()=>{var y,g,D;return[h(a,{"focus-keyphrase":((D=(g=(y=l.rootStore.aioseo)==null?void 0:y.keyphrases)==null?void 0:g.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 $t=u(Pt,[["render",Mt],["__scopeId","data-v-dbe291d1"]]),I="all-in-one-seo-pack",Ft={setup(){const{decodeUrl:e}=ye();return{decodeUrl:e}},computed:{metaTags(){var s,r;const e=[],o=[{label:_("Title",I),value:document.title||""},{label:_("Description",I),value:((s=document.querySelector('meta[name="description"]'))==null?void 0:s.content)||""},{label:_("Canonical URL",I),value:document.querySelector('link[rel="canonical"]').getAttribute("href")||""}],c=document.querySelectorAll('meta[property^="og:"][content],meta[name^="twitter:"][content]');let l=((r=document.querySelector('meta[name="keywords"]'))==null?void 0:r.content)||"";return l&&(l=l.split(",").join(", "),o.splice(2,0,{label:_("Meta Keywords",I),value:l})),o.forEach(a=>{a.value&&e.push({label:a.label,value:a.value})}),0<(c==null?void 0:c.length)&&c.forEach(a=>{a.content&&e.push({label:a.getAttribute("name")?a.getAttribute("name"):a.getAttribute("property"),value:a.content})}),e}},methods:{isUrl:Ce}},Bt={class:"aioseo-seo-preview-standalone-view-meta-tags"},Ht=["href"];function Lt(e,o,c,l,s,r){return i(),n("div",Bt,[t("dl",null,[(i(!0),n(E,null,M(r.metaTags,(a,m)=>(i(),n(E,{key:m},[t("dt",null,d(a.label),1),t("dd",null,[r.isUrl(a.value)?(i(),n("a",{key:0,href:a.value,target:"_blank"},d(l.decodeUrl(a.value)),9,Ht)):(i(),n(E,{key:1},[P(d(a.value),1)],64))])],64))),128))])])}const Ot=u(Ft,[["render",Lt]]),v="all-in-one-seo-pack",Gt={setup(){const{getErrorClass:e,getErrorDisplay:o,strings:c}=ke();return{getErrorClass:e,getErrorDisplay:o,rootStore:$(),composableStrings:c}},components:{CoreAlert:oe,SvgIconPencil:q,SvgCircleCheck:se,SvgCircleExclamation:Se,SvgCircleClose:re,ViewMetaTags:Ot},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"}}},Rt={class:"aioseo-seo-preview-standalone-view-seo-inspector"},Ut={key:0,class:"first-half"},Kt={class:"child"},jt={key:0},Zt={key:1,class:"no-keyphrase-found"},qt={key:0,class:"check"},Nt={class:"check__title"},Yt={class:"check__feedback"},zt={key:1,class:"check"},Jt={class:"check__title"},Wt={class:"check__feedback"},Xt={key:2,class:"check"},Qt={class:"check__title"},eo={class:"check__feedback"},to={key:3,class:"check"},oo={class:"check__title"},so={class:"check__feedback"},ro={key:4,class:"check"},io={class:"check__title"},co={class:"check__feedback"},no={key:5,class:"check"},ao={class:"check__title"},lo={class:"check__feedback"},po={class:"second-half"},_o={class:"child"};function ho(e,o,c,l,s,r){const a=p("svg-circle-exclamation"),m=p("core-alert"),f=p("view-meta-tags");return i(),n("div",Rt,[t("div",null,[r.isCheckEligible()?(i(),n("div",Ut,[t("div",Kt,[t("dl",null,[t("dt",null,d(s.strings.focusKeyphrase),1),t("dd",null,[r.focusKeyphrase?(i(),n("span",jt,d(r.focusKeyphrase),1)):b("",!0),r.focusKeyphrase?b("",!0):(i(),n("span",Zt,[h(a,{width:"20"}),P(" "+d(s.strings.noKeyphraseFound),1)]))]),t("dt",null,d(s.strings.pageAnalysis),1),t("dd",null,[r.checkErrorsExists("basic")?(i(),n("div",qt,[(i(),w(A(r.getCheckIconComponent("basic")),{class:k([l.getErrorClass(r.getCheckErrors("basic")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",Nt,d(s.strings.basicSeo)+": ",1),t("span",Yt,d(l.getErrorDisplay(r.getCheckErrors("basic"))),1)])])):(i(),n("div",zt,[t("span",Jt,d(s.strings.basicSeo)+": ",1),t("span",Wt,d(s.strings.noDataYet),1)])),r.checkErrorsExists("title")?(i(),n("div",Xt,[(i(),w(A(r.getCheckIconComponent("title")),{class:k([l.getErrorClass(r.getCheckErrors("title")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",Qt,d(s.strings.title)+": ",1),t("span",eo,d(l.getErrorDisplay(r.getCheckErrors("title"))),1)])])):(i(),n("div",to,[t("span",oo,d(s.strings.title)+": ",1),t("span",so,d(s.strings.noDataYet),1)])),r.checkErrorsExists("readability")?(i(),n("div",ro,[(i(),w(A(r.getCheckIconComponent("readability")),{class:k([l.getErrorClass(r.getCheckErrors("readability")),"check__icon"])},null,8,["class"])),t("div",null,[t("span",io,d(s.strings.readability)+": ",1),t("span",co,d(l.getErrorDisplay(r.getCheckErrors("readability"))),1)])])):(i(),n("div",no,[t("span",ao,d(s.strings.readability)+": ",1),t("span",lo,d(s.strings.noDataYet),1)]))])]),l.rootStore.aioseo.editObjectBtnText&&r.editFocusKeyphraseUrl?(i(),w(m,{key:0,innerHTML:`${s.strings.visitAdmin} <a style='display: inline-flex' href='${r.editFocusKeyphraseUrl}'>${l.rootStore.aioseo.editObjectBtnText} →</a>`,size:"small"},null,8,["innerHTML"])):b("",!0)])])):b("",!0),t("div",po,[t("div",_o,[t("dl",null,[t("dt",null,d(s.strings.metaTags),1),t("dd",null,[h(f)])])])])])])}const go=u(Gt,[["render",ho],["__scopeId","data-v-eb154246"]]),uo={components:{CoreTwitterPreview:xe},data(){return{twitterData:me()}}},mo={class:"preview-wrapper"};function vo(e,o,c,l,s,r){const a=p("core-twitter-preview");return i(),n("div",mo,[h(a,{card:s.twitterData.card,description:s.twitterData.description,image:s.twitterData.image,title:s.twitterData.title},null,8,["card","description","image","title"])])}const fo=u(uo,[["render",vo],["__scopeId","data-v-66b08051"]]),V="all-in-one-seo-pack",wo={setup(){return{rootStore:$()}},components:{BaseButton:ie,CoreMainTabs:ce,CoreModal:ne,SvgDesktop:ae,SvgIconFacebook:de,SvgIconGoogle:Pe,SvgIconPencil:q,SvgIconSettings:N,SvgIconTwitter:_e,SvgMobile:le,ViewFacebook:Fe,ViewGoogle:$t,ViewSeoInspector:go,ViewTwitter:fo},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()}},bo={class:"aioseo-modal-content"},ko={class:"component-overflow"},So={class:"component-container"},Co={key:0,class:"btn-edit-preview-data-wrapper"},yo={key:1,class:"device-toggle"};function xo(e,o,c,l,s,r){const a=p("core-main-tabs"),m=p("svg-icon-pencil"),f=p("base-button"),S=p("svg-desktop"),C=p("svg-mobile"),y=p("core-modal");return i(),w(y,{show:s.display,classes:["aioseo-seo-preview-standalone"],onClose:o[4]||(o[4]=g=>s.display=null),"teleport-to":s.teleportTo},J({headerTitle:x(()=>[P(d(s.strings.modalHeader),1)]),body:x(()=>[t("div",bo,[h(a,{tabs:s.tabs,showSaveButton:!1,active:s.activeTab,onChanged:o[0]||(o[0]=g=>s.activeTab=g)},{"var-tab-icon":x(({tab:g})=>[(i(),w(A(g.icon)))]),_:1},8,["tabs","active"]),t("div",ko,[t("div",So,[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",Co,[h(f,{href:r.editSnippetData.url||r.editObjectData.url,loading:s.loadingEditPreviewDataBtn,onClick:o[1]||(o[1]=B(g=>s.loadingEditPreviewDataBtn=!0,["exact"])),class:"btn-edit-preview-data",type:"gray",size:"small",tag:"a"},{default:x(()=>[h(m,{width:"14"}),P(" "+d(r.editSnippetData.btnText||r.editObjectData.btnText),1)]),_:1},8,["href","loading"])])):b("",!0),s.activeTab==="ViewGoogle"?(i(),n("div",yo,[t("a",{class:k(["btn-device",{"btn-device--active":s.device==="desktop"}]),role:"button",href:"#",onClick:o[2]||(o[2]=B(g=>s.device="desktop",["prevent"]))},[h(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(g=>s.device="mobile",["prevent"]))},[h(C,{width:"24"})],2)])):b("",!0)]),key:"0"}:void 0]),1032,["show","teleport-to"])}const Y=u(wo,[["render",xo]]),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=$(),Eo=JSON.parse(JSON.stringify(window.aioseoSeoPreview));R.aioseo=Z({...R.aioseo},{...Eo||{}});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);