import{_,o as s,c as d,a as c,b as h,d as l,e as g,f as m,g as b,h as a,i as f}from"./entry.a485a9a5.js";import{p as y}from"./print_grid-ad23b9a6.mjs";const v={props:{content:{type:Object,default:null},debug:{type:Boolean,default:!1}},data(){return{redirected:!1,page:{id:"",layoutType:{type:"url_override"},loadMoreType:{type:"none"},pageData:this.content,primaryGrid:y}}},computed:{pageWithRoute(){return{...this.page,pageData:{...this.page.pageData,route:{fullPath:this.$route.fullPath,query:this.$route.query,path:this.$route.path}}}},target(){return`script[src="${this.$ss.blueconic.librarySrc}"]`}},mounted(){document.querySelector(this.target)?(this.log("BC JS tag already in DOM.重定向.This.rebect ()):(This.log ("BCJ标签未找到Adding observer."),this.observe())},methods:{redirect(){this.content.linkUrl?(this.log("setting redirect timeout",this.$ss.blueconic.promotionRedirectTimeout),setTimeout(()=>{this.log("redirecting..."),window.location.replace(this.content.linkUrl)},this.$ss.blueconic.promotionRedirectTimeout)):this.log("no redirectTo value found - will not redirect.")},observe(){if(window.MutationObserver){const t=new MutationObserver(e=>{for(let n=0;n {This.log/bs标签JS超时Redirect."),t.disconnect(),this.redirect()},this.$ss.blueconic.promotionScriptTimeout)}else this.log("This browser does not support MutationObservers.Redirect."),this.redirect()},log(...t){const{log:e}=console;this.debug&&e("BlueConic Redirect Handler:",...t)}}},$={style:{display:"none"}},C={class:"spinner"};function R(t,e,n,r,i,o){const u=g,p=m;return s(),d("div",null,[c("div",$,[(s(),h(u,{key:i.page.id,page:JSON.parse(JSON.stringify(o.pageWithRoute))},null,8,["page"]))]),c("div",C,[c("div",null,[l(p,{icon:"ei:spinner-3",width:100,"icon-color":t.$ss.baseStyles.primaryColor},null,8,["icon-color"])])])])}const B=_(v,[["render",R],["__scopeId","data-v-66020919"]]),S={key:0,"data-name":"blueconic-redirect"},w={__name:"ContentRedirect",async setup(t){const e=b("blueconicContent");return(n,r)=>{var o;const i=B;return s(),d("div",null,[a(e)&&((o=a(e))==null?void 0:o.id)!==""?(s(),d("div",S,[l(i,{content:a(e)},null,8,["content"])])):f("",!0)])}}};export{w as default};