1import{_ as D}from"./nuxt-link.06bb5a9a.js";import{b as P,B as R,r as h,E as b,K as z,I as H,h as e,q as M,e as U,f as o,j as c,k as w,z as J,t as V,l as K,x as O}from"./entry.c0f9deca.js";import F from"./DPicture.b8778d4b.js";import{u as G}from"./useLanguage.2ca45a83.js";import{u as Q}from"./useTrack.e788edaa.js";import{u as l}from"./useLang.fe43f0bd.js";import{u as W}from"./useApi.0d4816d5.js";import{_ as X}from"./leaf-top-right.1d828470.js";import{_ as Y}from"./icon-jb.b233ee13.js";import"./index.0c461a16.js";import"./index.90e2068c.js";import"./site.25e21301.js";const Z=""+globalThis.__publicAssetsURL("images/bg-tour.webp"),tt={class:"overflow-hidden relative px-4 pt-10 pb-5 w-full h-full xl:p-6 md:p-4"},et=o("div",{class:"absolute inset-0 w-full"},[o("img",{src:Z,alt:"background tour",class:"object-cover w-full h-full"})],-1),st=o("div",{class:"absolute -top-10 -right-10 lg:-top-14 lg:-right-14 max-lg:max-w-[100px] lg:max-w-[130px] w-full"},[o("img",{src:X,alt:"leaf top right"})],-1),ot={class:"relative space-y-2 md:space-y-3 xl:space-y-4 max-sm:p-4"},nt=["innerHTML"],at={class:"flex items-center gap-x-5 md:gap-x-6 xl:gap-x-8"},lt=o("div",{class:"flex items-center gap-x-2 md:gap-x-3 xl:gap-x-4 embed-btn"},[o("div",{class:"w-8 h-8"},[o("img",{src:Y,alt:"icon jungle boss"})]),o("span",{class:"text-gray-700 title-3"}," Jungle Boss ")],-1),rt={class:"absolute inset-0 w-full"},it={className:"font-medium button-1 relative z-20 !text-white"},ut={class:"md:max-w-[200px] lg:max-w-[288px] w-full flex-shrink-0 overflow-hidden"},kt={__name:"EmbedTour",props:{id:String,placement:String},setup(j){const g=P(),i=j,p=R("post-detail"),{currentLang:q}=G();p.value.tour;const n=h(null),{track:x}=Q(),d=b(()=>{var t,s;return l((t=p.value)==null?void 0:t.post_translations,"slug","en")||l((s=p.value)==null?void 0:s.post_translations,"slug")||""}),_=b(()=>{var t,s;return l((t=n.value)==null?void 0:t.tour_translations,"slug","en")||l((s=n.value)==null?void 0:s.tour_translations,"slug")||""}),L=b(()=>`${d.value}__${_.value}__${i.placement||""}`),k=h(null);let m=null;const f=h(!1);z(k,t=>{typeof window>"u"||t&&!f.value&&(m=new IntersectionObserver((s,u)=>{s.forEach(a=>{a.isIntersecting&&!f.value&&(E(),f.value=!0,u.disconnect())})},{threshold:.5}),m.observe(t))}),H(()=>{m&&m.disconnect()}),(async()=>{var s;const t=["id","cover.id","cover.files_translations.*","tour_translations.languages_code","tour_translations.title","tour_translations.tour_description","tour_translations.slug"];if(i!=null&&i.id){const u={fields:t,"filter[status][_eq]":"published","filter[tour_translations][languages_code][_eq]":q,"filter[id][_eq]":i.id};try{const{data:a}=await W("items/tours",u);((s=a==null?void 0:a.value)==null?void 0:s.length)>0&&(n.value=a==null?void 0:a.value[0])}catch(a){console.log(a)}}})();function v(){x("tour_banner_click",{source_blog:d.value,target_tour:_.value,placement:i.placement||"",banner_id:L.value})}function E(){x("tour_banner_impression",{source_blog:d.value,target_tour:_.value,placement:i.placement||"",banner_id:L.value})}return(t,s)=>{var y,T,$,B;const u=D,a=O,A=F;return e(n)?(M(),U("div",{key:0,ref_key:"rootRef",ref:k,class:"md:max-w-[585px] lg:max-w-[790px] w-full md:mx-auto bg-primary-50 rounded-lg overflow-hidden md:flex embed-tour"},[o("div",tt,[et,st,o("div",ot,[c(u,{to:e(g)({name:"tour-slug",params:{slug:("useLang"in t?t.useLang:e(l))((y=e(n))==null?void 0:y.tour_translations,"slug")}}),onClick:s[0]||(s[0]=r=>v()),class:"text-gray-900 title-3"},{default:w(()=>{var r;return[J(V(("useLang"in t?t.useLang:e(l))((r=e(n))==null?void 0:r.tour_translations)),1)]}),_:1},8,["to"]),o("div",{class:"text-gray-500 body-2 line-clamp-2",innerHTML:("useLang"in t?t.useLang:e(l))((T=e(n))==null?void 0:T.tour_translations,"tour_description")},null,8,nt),o("div",at,[lt,c(u,{to:e(g)({name:"tour-slug",params:{slug:("useLang"in t?t.useLang:e(l))(($=e(n))==null?void 0:$.tour_translations,"slug")}}),onClick:s[1]||(s[1]=r=>v()),class:"btn btn-solid"},{default:w(()=>[o("div",rt,[c(a)]),o("span",it,V(t.$t("button.viewTour")),1)]),_:1},8,["to"])])])]),o("div",ut,[c(u,{to:e(g)({name:"tour-slug",params:{slug:("useLang"in t?t.useLang:e(l))((B=e(n))==null?void 0:B.tour_translations,"slug")}}),onClick:s[2]||(s[2]=r=>v()),class:"block w-full h-full image aspect-w-3 aspect-h-2"},{default:w(()=>{var r,I,N,C,S;return[c(A,{src:(I=(r=e(n))==null?void 0:r.cover)==null?void 0:I.id,alt:("useLang"in t?t.useLang:e(l))((C=(N=e(n))==null?void 0:N.cover)==null?void 0:C.files_translations,"alt_title")||("useLang"in t?t.useLang:e(l))((S=e(n))==null?void 0:S.tour_translations),class:"object-cover w-full h-full"},null,8,["src","alt"])]}),_:1},8,["to"])])],512)):K("",!0)}}};export{kt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.