import{f as i,i as m,j as E,U as C,T as w,au as M,Q as l,R as P,a0 as u,v as n,P as b,M as d,r as x,ao as D,ap as B,an as L,h as A}from"./js/vendor-vue-ui.de3ab35f.js";import{l as $}from"./js/index.faac30d2.js";import{l as j}from"./js/index.d71ed80b.js";import{e as f,aH as g,u as S,aI as R,m as q,ak as F,l as T}from"./js/app-core.a6d808ce.js";import{h as U}from"./js/helpers.a3c68658.js";import{k as N}from"./js/vendor-lodash.8e35bd59.js";import{P as V}from"./js/PageBuilderIntegration.1f233afc.js";import{_ as W}from"./js/vendor-other.7b559694.js";import{M as H}from"./js/Modal.e019a86e.js";import{_ as O}from"./js/ScoreButton.3b868378.js";import{S as _}from"./js/LogoGear.6afc7f21.js";import"./js/Button.a549093d.js";import"./js/_plugin-vue_export-helper.eefbdd86.js";import"./js/Input.77b5ee76.js";import"./js/Index.52399193.js";import"./js/Close.098d4b76.js";import"./js/Pencil.405b16d2.js";import"./js/Trash.d35f8063.js";import"./js/Select.a288249f.js";import"./js/Caret.a017b70a.js";import"./js/Toggle.26ac9b1a.js";import"./js/App.6e23fe0d.js";/* empty css                */import"./js/ScrollAndHighlight.3b248cee.js";import"./js/ScrollTo.f4df02aa.js";import"./js/LicenseKeyBar.a2fd2799.js";import"./js/vendor-phone.8b9bc15d.js";import"./js/icon.5572a14b.js";import"./js/Tabs.c5d4ce83.js";import"./js/ProBadge.fd60f711.js";import"./js/Information.278772ab.js";import"./js/Slide.e6618126.js";import"./js/Index.16a854da.js";import"./js/SettingsRow.0c329e43.js";import"./js/Row.6337df55.js";import"./js/Settings.9925e4db.js";import"./js/Build.693cf766.js";import"./js/AiContent.ac754618.js";import"./js/Suggestion.94b951e4.js";let v={};const z=()=>{const o={...v},t=R();N(o,t)||(v=t,q())},I=()=>{const{vc:o,vc_mode:t}=window;return t==="admin_frontend_editor"?o.builder.getContent():document.querySelector("#content")?.value||""},p=async()=>{S().processContent({content:I()}).finally(()=>{z()})},Q=({vc:o})=>{p(),o.events.on("shortcodeView:updated",()=>{f(p,1e3)}),o.shortcodes.on("sync",()=>{f(p,1e3)}),g().forEach(t=>{t.addEventListener("click",()=>{setTimeout(U)})})},G={__name:"LimitModifiedDate",emits:["click"],setup(o){const t={buttonTitle:W("Save (Don't Modify Date)","all-in-one-seo-pack")};return(e,s)=>(i(),m("a",{href:"#",onClick:s[0]||(s[0]=w(r=>e.$emit("click"),["prevent","exact","stop"]))},[E("p",null,C(t.buttonTitle),1)]))}},J=()=>document.querySelector("#vc_more-options")?.querySelector("ul"),K=({jQuery:o})=>{const t=(s,r,a)=>{const c=new URLSearchParams(a.data);c.get("action")==="vc_save"&&(c.set("aioseo_limit_modified_date",!0),a.data=c.toString(),o(document).off("ajaxSend",t))};new V({limitModifiedDate:{component:G,appName:"Standalone/WPBakery/LimitModifiedDate",props:{onClick:()=>{o(document).on("ajaxSend",t),g(!0)[0]?.click()}},node:{$wrapper:J(),tag:"li",attributes:{id:"aioseo-limit-modified-date-wpbakery",class:"vc_dropdown-list-item"}}}}).mount()},X={class:"aioseo-wpbakery-integration"},Y={key:2,class:"aioseo-gear-icon"},y={__name:"App",props:{isFrontendEditor:Boolean},setup(o){const t=x(!1),{currentPost:e}=M(S());return(s,r)=>(i(),m("div",X,[o.isFrontendEditor?(i(),l(n(O),{key:0,"show-score":n(F)(),score:n(e).seo_score,class:b([t.value?"aioseo-score-button--active":""]),onClick:r[0]||(r[0]=w(a=>t.value=!t.value,["prevent"]))},{icon:P(()=>[u(n(_))]),_:1},8,["show-score","score","class"])):d("",!0),o.isFrontendEditor?(i(),l(n(H),{key:1,score:n(e).seo_score,"is-open":t.value,"onUpdate:isOpen":r[1]||(r[1]=a=>t.value=a)},null,8,["score","is-open"])):d("",!0),o.isFrontendEditor?d("",!0):(i(),m("div",Y,[u(n(_))]))]))}},{vc:Z}=window,tt=()=>{const{vc_mode:o}=window,t=D({history:B(),routes:[{path:"/:pathMatch(.*)*",component:y}]});let e=L({name:"Standalone/WPBakery",data(){return{tableContext:window.aioseo.currentPost.context,screenContext:"sidebar"}},render:()=>A(y)},{isFrontendEditor:o==="admin_frontend_editor"});e=$(e),e=j(e),e.use(t),t.app=e,T(e,t),e.mount("#aioseo-wpbakery")},k=()=>{tt(),Q(window),K(window)};let h=!1;Z.events.on("app.render",()=>{k(),h=!0});window.addEventListener("load",()=>{h||k()});
