1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CXfMfvTn.js","./lTr7RkzU.js","./BfJgI-1u.js","./swiper-vue.DJHdZmOr.css","./entry.-lzxiteZ.css","./DKF9JScY.js","./Dp4LzAFS.js","./BJcvxiDA.js","./DX6qNNtM.js","./CHsTEjTD.js","./C1K6ie2k.js","./CqkleIqs.js","./CsXuFr7W.js","./DXnM3pWz.js","./DJ4SyrFv.js","./C_NHbtVw.js","./0wg2g_9u.js","./BnCSxA_j.js"])))=>i.map(i=>d[i]); 2import{_ as V,g as L,v as M,f as N}from"./lTr7RkzU.js";import{_ as O}from"./Bhj8_NNP.js";import{_ as C}from"./DPLf-UgY.js";import{I as h,a9 as A,V as f,X as x,W as k,a0 as T,U as E,O as P,Q as R,a7 as S,N as $,m as p,aa as j,d as B,G as D}from"./BfJgI-1u.js";import"./DKF9JScY.js";import"./Dp4LzAFS.js";const U=$(()=>N(()=>import("./CXfMfvTn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url).then(a=>a.default||a)),c=8,z={__name:"DestinationFeaturedTours",props:{dest:Object,items:Array},async setup(a,{expose:d}){d();let n,s;const t=a,v=p(()=>t.dest?.linkTitles?.featuredTours?.trim()||`Recommended touring itineraries${t.dest?.name?` including ${t.dest.name}`:""}`),g=p(()=>t.dest?.linkTitles?.featuredToursIntro?.trim()||`A selection of our most popular touring itineraries ${t.dest?.name?` including ${t.dest?.name}`:""}. `),i=t.dest?.id||void 0,{data:u}=([n,s]=j(()=>M(`tours-${i||"ALL"}`,()=>t.items?Promise.resolve(null):$fetch(`/api/featured-tours?destId=${i}`),{onResponseError:({response:e})=>{console.error("API Error:",e.status,e._data)}})),n=await n,s(),n),_=p(()=>t.items??u.value),o=B(!1),m=e=>Array.isArray(e)?e.length<=c?e:e.slice(0,c):[],y=e=>{const r=[...e];for(let l=r.length-1;l>0;l--){const w=Math.floor(Math.random()*(l+1));[r[l],r[w]]=[r[w],r[l]]}return r.slice(0,Math.min(c,r.length))},I=p(()=>{const e=_.value||[];return e.length?!o.value||e.length<=c?m(e):y(e):[]});D(()=>{o.value=!0});const b={props:t,sectionTitle:v,sectionText:g,destId:i,fetchedTours:u,tours:_,MAX_TOURS:c,hasMounted:o,getInitialSelection:m,getRandomSelection:y,selectedTours:I};return Object.defineProperty(b,"__isScriptSetup",{enumerable:!1,value:!0}),b}},F={key:0,class:"bg-gray-100 w-full py-8 pb-24"},W={class:"flex justify-between items-center flex-wrap"},X={class:"w-full md:w-8/12"},G={class:"w-full grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 tems-stretch"};function H(a,d,n,s,t,v){const g=O,i=L,u=U,_=C;return s.selectedTours&&s.selectedTours.length>0?(f(),h("div",F,[x(_,null,{default:k(()=>[T("div",W,[T("div",X,[x(g,{title:s.sectionTitle,text:s.sectionText},null,8,["title","text"])]),n.dest?.slug?(f(),E(i,{key:0,to:`/destinations/${n.dest.slug}/tours`,class:"border-ph-blue border bg-transparent px-2 md:px-4 py-1 md:py-2 text-sm md:text-lg rounded-full w-fit text-ph-blue hover:bg-ph-blue hover:text-white"},{default:k(()=>d[0]||(d[0]=[P(" View all tours")])),_:1,__:[0]},8,["to"])):A("",!0)]),T("div",G,[(f(!0),h(R,null,S(s.selectedTours,(o,m)=>(f(),h("div",{key:o?.id??o?._id??o?.slug??m},[x(u,{offer:o},null,8,["offer"])]))),128))])]),_:1})])):A("",!0)}const ee=V(z,[["render",H],["__file","tours.vue"]]);export{ee 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.