PageSourceSearch

https://vacances.be/_nuxt/BH9oArRT.js

js vacances.be collected 2026-10-05 22:14:17 UTC 3,159 bytes, 1 lines download raw bytes

1import{at as E,am as O,R as f,a9 as h,ae as b,an as R,u as T,E as a,D as A}from"./5etdam8z.js";import{f as w,a as S}from"./BmQ4PBUD.js";function j(t){const e=w(t,o=>!Object.is(o,null));return Object.keys(e).forEach(o=>{S(e[o])&&!e[o]&&delete e[o]}),e}function D(t){return Object.fromEntries(Object.entries(t).map(([e,o])=>[[E[e]],o]))}const d=f.get("categories"),p=f.get("promotions"),F=f.get("property"),C=(t,e,o)=>{switch(t){case a.CATEGORY:return d.getCategory(e,{language:o});case a.SUBCATEGORY:return d.getCategory(e,{language:o})}};function P(t){return t===a.CATEGORY||t===a.SUBCATEGORY}async function u(t){const e=D(j(t));if(Object.keys(e).length===0)return[];if("category_best_offer"in e&&Object.keys(e).length===1)return[];try{return(await F.fetchProperties({...e,size:8})).data.results}catch(o){return console.log(o),[]}}const B=O("category",{state:()=>({page:{id:null,additional_fields:[],header_1:null,header_2:null,banner:null,top_description:"",below_description:"",stores:[],related_category:{},slug:"",seo_title:"",meta_description:"",name:"",faq_items:null,script_2:"",script_1:"",related_posts:[],promoted_posts:[],children_categories:[],bottom_related_stores:[],datafeed_linking_fields:{},in_slider_subcategories:[],parent_category:null,specific_hotels:[],alternative_items:[],path:"",no_index:!1},promotions:[],promotionsCount:null,recentPromotions:null,counts:null,properties:[],category_datafeed_items:[]}),getters:{getCounts:t=>t.counts,getPage:t=>t.page,getPromotions:t=>t.promotions,getPromotionsCount:t=>t.promotionsCount,getRecentPromotions:t=>t.recentPromotions,getProperties:t=>t.properties,bestOfferDatafeedItems:t=>t.category_datafeed_items},actions:{async fetch(t){const{$i18n:e}=b(),o=A();R(o.public.apiUrl,e.locale.value||e.locale);const y=T(),l=y.currentSlug,s=y.currentEntity,g=e.locale.value||e.locale,_=t.query.page||1;try{if(s===a.CATEGORY){const[n,{data:c}]=await Promise.all([C(s,l,g),d.getCategoryPromotionsCount(l,{page:_,language:g})]);Object.keys(this.page).forEach(m=>{this.page[m]=n.data[m]}),this.counts=c}else{const n=await C(s,l,g);Object.keys(this.page).forEach(c=>{this.page[c]=n.data[c]}),this.promotions=n.data.promotions}const i=[u(this.page.datafeed_linking_fields),u({...this.page.datafeed_linking_fields,category_best_offer:!0})];P(s)&&i.push(p.getPromotionsByCategory(this.page.id,{size:h,page:_}));const r=await Promise.all(i);this.properties=r[0],this.category_datafeed_items=r[1],P(s)&&r[2]&&(this.promotions=r[2].data.results,this.promotionsCount=r[2].data.count)}catch(i){throw new Error(i)}},async fetchRecentPromotions(t){const{data:e}=await p.getLatestOffersByCategory(t,{});this.recentPromotions=e},async updatePromotions(t){try{const e={type:t.query.type||null,size:h,page:t.query.page||null};if(!e.type||!e.page)return;const o=await p.getPromotionsByCategory(this.page.id,e);this.promotions=o.data.results,this.promotionsCount=o.data.count}catch(e){console.log(e)}},async getCategoryDataFeed(){this.category_datafeed_items=[];try{this.category_datafeed_items=await u({...this.page.datafeed_linking_fields,category_best_offer:!0})}catch(t){console.log(t)}}}});
1export{j as p,D as t,B as u};

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.