@influence-society-web/deshotelsetdesiles 4.2.4 → 4.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(()=>{var Z=Object.defineProperty;var Q=(a,e,t)=>e in a?Z(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var D=(a,e,t)=>(Q(a,typeof e!="symbol"?e+"":e,t),t);var l="data",f={startingPriceList:`[${l}=starting-price-list]`,price:`[${l}=price]`,discount:`[${l}=discount]`,discountContainer:`[${l}=discount-container]`,currency:`[${l}=currency]`,beHid:`[${l}-be-hid]`,destination:`[${l}=destination]`,offersList:`[${l}=offers-list]`,offerSlugDetail:`[${l}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${l}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${l}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${l}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${l}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${l}=offers-list-container]`,listItem:`[${l}=list-item]`,image:`[${l}=image]`,name:`[${l}=name]`,description:`[${l}=description]`,hotelName:`[${l}=hotel-name]`,hotelLink:`[${l}=hotel-link]`,hotelStartingPriceContainer:`[${l}=hotel-starting-price-container]`,moreDetails:`[${l}=more-details]`,offersPopup:`[${l}=offers-popup]`,offersPopupClose:`[${l}=close-btn]`,hotelReserveLink:`[${l}=hotel-reserve-link]`,hotelVillaReserveLink:`[${l}=hotel-villa-reserve-link]`,hotelURLS:`[${l}=hotel-urls]`,languageDropdown:`[${l}=language-dropdown]`,selectedLanguage:`[${l}=selected-language]`,loadingSpinner:`[${l}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:a=>`[${l}-be-hid=${a}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var L={en:"Guadeloupe Islands",fr:"Les \xCEles de Guadeloupe",es:"Las islas de Guadalupe",it:"Le isole della Guadalupa"},N={en:"La Dominique",fr:"La Dominique",es:"Dominica",it:"Dominica"},C={en:"Saint Lucia",fr:"Sainte-Lucie",es:"Santa Luc\xEDa",it:"Santa Lucia"},V={en:"Martinique",fr:"Martinique",es:"Martinica",it:"Martinica"},S={en:"Mauritius",fr:"\xCEle Maurice",es:"Mauricio",it:"Mauritius"},P={en:"Saint Martin",fr:"Saint-Martin",es:"Saint-Martin",it:"Saint Martin"},R={en:"Antigua",fr:"Antigua",es:"Antigua",it:"Antigua"},J={en:"Anguilla",fr:"Anguilla",es:"Anguila",it:"Anguilla"},M={gpgos12767:{destination:L,slug:"/hotels-et-villas/creole-beach-hotel-spa",codeIPlanet:"FRAN414",cmsId:"67c809b5f63deab8a71cf8e9"},gptro12772:{destination:L,slug:"/hotels-et-villas/le-jardin-malanga",codeIPlanet:"FRAN416",cmsId:"67c809b5f63deab8a71cf90d"},gpsai12770:{destination:L,slug:"/hotels-et-villas/la-toubana-hotel-spa",codeIPlanet:"FRAN411",cmsId:"67c809b5f63deab8a71cf8ef"},gpgos12769:{destination:L,slug:"/hotels-et-villas/mahogany-hotel-residence-spa",codeIPlanet:"FRAN423",cmsId:"67c809b5f63deab8a71cf91f"},gpgua27143:{destination:L,slug:"/hotels-et-villas/langley-resort-fort-royal",codeIPlanet:"GPAN32",cmsId:"67c809b5f63deab8a71cf8f0"},mqros18592:{destination:N,slug:"/hotels-et-villas/jungle-bay-dominica",codeIPlanet:"DMAN1",cmsId:"67c809b5f63deab8a71cf8ed"},dmtib00001:{destination:N,slug:"/hotels-et-villas/secret-bay-dominique",codeIPlanet:"DMAN2",cmsId:"67c809b5f63deab8a71cfefd"},agste21689:{destination:C,slug:"/hotels-et-villas/jade-mountain",codeIPlanet:"AGAN6",cmsId:"67c809b5f63deab8a71cf92a"},zzzzz25376:{destination:C,slug:"/hotels-et-villas/windjammer-landing",codeIPlanet:"LCAN4",cmsId:"67c809b5f63deab8a71cf92b"},lcgro30400:{destination:C,slug:"/hotels-et-villas/cap-maison",codeIPlanet:"LCLC8",cmsId:"67c809b5f63deab8a71cf929"},agste21688:{destination:C,slug:"/hotels-et-villas/anse-chastanet",codeIPlanet:"AGAN5",cmsId:"67c809b5f63deab8a71cf928"},mqsai18593:{destination:V,slug:"/hotels-et-villas/plein-soleil",codeIPlanet:"MQAN16",cmsId:"67c809b5f63deab8a71cf925"},zzzzz25378:{destination:S,slug:"/hotels-et-villas/shanti-maurice",codeIPlanet:"MUAN22",cmsId:"67c809b5f63deab8a71cf933"},zzzzz25377:{destination:S,slug:"/hotels-et-villas/lux-le-morne",codeIPlanet:"MUAN21",cmsId:"67c809b5f63deab8a71cf931"},zzzzz25379:{destination:S,slug:"/hotels-et-villas/constance-belle-mare-plage",codeIPlanet:"MUAN20",cmsId:"67c809b5f63deab8a71cf92f"},mupos25678:{destination:S,slug:"/hotels-et-villas/constance-le-prince-maurice",codeIPlanet:"MUAN24",cmsId:"67c809b5f63deab8a71cf930"},zzzzz25380:{destination:S,slug:"/hotels-et-villas/anahita-the-resort",codeIPlanet:"MUAN19",cmsId:"67c809b5f63deab8a71cf92e"},agstm21687:{destination:P,slug:"/hotels-et-villas/la-samanna",codeIPlanet:"FRAN2350",cmsId:"67c809b5f63deab8a71cf926"},frsai31536:{destination:P,slug:"/hotels-et-villas/le-grand-case-beach-club",codeIPlanet:"FRFRA3",cmsId:"67c809b5f63deab8a71cf927"},ageng20433:{destination:R,slug:"/hotels-et-villas/the-inn-at-english-harbour",codeIPlanet:"AGAN4",cmsId:"67c809b5f63deab8a71cf8ec"},agcro20496:{destination:R,slug:"/hotels-et-villas/blue-waters",codeIPlanet:"AGAN1",cmsId:"67c809b5f63deab8a71cf8eb"},gpang25884:{destination:J,slug:"/hotels-et-villas/aurora-anguilla-resort-golf-club",codeIPlanet:"GPAN30",cmsId:"67c809b5f63deab8a71cf8ea"}},w={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},$={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var F={"/thematiques/sejour-en-famille":"67c809b5f63deab8a71cf936","/en/themes/family-stay":"67c809b5f63deab8a71cf936","/es/temas/estancia-en-familia":"67c809b5f63deab8a71cf936","/it/temi/soggiorno-in-famiglia":"67c809b5f63deab8a71cf936","/thematiques/voyages-de-noces":"67c809b5f63deab8a71cfb33","/en/themes/honeymoons":"67c809b5f63deab8a71cfb33","/es/temas/lunas-de-miel":"67c809b5f63deab8a71cfb33","/it/temi/lune-di-miele":"67c809b5f63deab8a71cfb33","/thematiques/paradis-des-golfeurs":"67c809b5f63deab8a71cfb32","/en/themes/a-golfer-s-paradise":"67c809b5f63deab8a71cfb32","/es/temas/el-paraiso-del-golfista":"67c809b5f63deab8a71cfb32","/it/temi/un-paradiso-per-i-golfisti":"67c809b5f63deab8a71cfb32","/thematiques/all-inclusives":"67c809b5f63deab8a71cf934","/en/themes/all-inclusives":"67c809b5f63deab8a71cf934","/es/temas/todo-incluido":"67c809b5f63deab8a71cf934","/it/temi/tutto-compreso":"67c809b5f63deab8a71cf934","/thematiques/escapade-spa-bien-etre":"67c809b5f63deab8a71cf935","/en/themes/wellness-spa-getaway":"67c809b5f63deab8a71cf935","/es/temas/escapada-spa-bienestar":"67c809b5f63deab8a71cf935","/it/temi/soggiorno-benessere-alle-terme":"67c809b5f63deab8a71cf935","/thematiques/activites-et-loisirs":"67c809b5f63deab8a71cfcb4","/en/themes/leisure-activities":"67c809b5f63deab8a71cfcb4","/es/temas/actividades-y-ocio":"67c809b5f63deab8a71cfcb4","/it/temi/attivita-e-tempo-libero":"67c809b5f63deab8a71cfcb4","/thematiques/plongee-sous-marine":"67c809b5f63deab8a71cf937","/en/themes/scuba-diving":"67c809b5f63deab8a71cf937","/es/temas/submarinismo":"67c809b5f63deab8a71cf937","/it/temi/immersione-subacquea":"67c809b5f63deab8a71cf937","/thematiques/roadtrip":"67c809b5f63deab8a71cfb34","/en/themes/roadtrip":"67c809b5f63deab8a71cfb34","/es/temas/viaje-por-carretera":"67c809b5f63deab8a71cfb34","/it/temi/viaggio-in-auto":"67c809b5f63deab8a71cfb34","/thematiques/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/en/themes/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/es/temas/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/it/temi/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/thematiques/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/en/themes/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/es/temas/ponts-du-mes-de-mayo":"69b7d869ecee16ecb87f202b","/it/temi/ponti-del-mese-di-maggio":"69b7d869ecee16ecb87f202b"},I="https://deshotelsetdesiles.ccordier.workers.dev/v2/",z="https://deshotelsetdesiles.i-planet.fr/dhdi-public/searchform.cgi",T="FR",G="1*q1lzz9*_gcl_au*MTMyMzcyMDY5NC4xNzM5Mjg5MzYx*_ga*NTAxMzI1MzMwLjE3MzkyODkzNjE.*_ga_Q0RXHLR7D4*MTczOTI5NzEzNC4zLjAuMTczOTI5NzE3Mi4yMi4wLjA.";var k=async()=>new Promise(a=>{geoip2.country(e=>{a(e.country.iso_code)},()=>{a(T)})});var v=a=>{let e="?";for(let[t,s]of Object.entries(a))s&&(e+=`${t}=${s}&`);return e};var O=class{async getGroupOffersData(e){let t=I+"groupOffers"+v(e),r=await(await fetch(t)).json();return r.error||!r.data?null:r}async getSingleHotelOffersData(e){let t=I+"offers"+v(e),r=await(await fetch(t)).json();return r.error||!r.data?null:r}async getCMSOffers(){let e=I+"cmsOffers",s=await(await fetch(e)).json();return s.items?s:null}async getCountries(){let e=I+"cmsCountries",s=await(await fetch(e)).json();return s.items?s:null}};var U=()=>{let a=B();if(!a){let e=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(e)}window.Weglot.on("languageChanged",()=>{if(a)window.location.reload();else{let e=window.Weglot.getCurrentLang();localStorage.setItem("wglang",e),window.loadFromServer&&window.loadFromServer()}})},B=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",q=()=>{let a=y();return $[a]},y=()=>{if(!B())return localStorage.getItem("wglang")||"fr";try{let a=window.Weglot.getCurrentLang();if(a)return a}catch(a){return console.error("Error getting language",a),"fr"}return"fr"},x=()=>{let a={};return Object.entries(M).forEach(([e,t])=>{a[t.cmsId]=e}),a},p=(a,e)=>`${a.toLowerCase().trim()}-${e.toLowerCase().trim()}`,K=(a,e,t)=>{let s=y().toUpperCase(),r=M[e].codeIPlanet.toUpperCase(),i=`${z}?Lang=${s}&currency=${a.toUpperCase()}&HotelCode=${r}`,o=_("_ga"),n=G,d=_("_gcl_au");return i+=`&_ga=${o}&_gl=${n}&_gcl_au=${d}`,t&&(i=`${i}&HotelPromo=${t}`),i},_=a=>{let e=document.cookie.match(new RegExp("(^| )"+a+"=([^;]+)"));return e?e[2]:null};var Y=(a,e,t,s)=>{let{quotation:r,rate:{distribution:i}}=e,{pricePerNight:o,currency:n,plainBookLink:d}=r,{accessCode:m}=i||{},g="";m&&m.length>0&&([g]=m),X(a,o,n);let h=a.querySelector(f.hotelReserveLink);h&&h.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(d,"_blank")});let c=a.querySelector(f.hotelVillaReserveLink);if(c&&c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(K(n,t,g),"_blank")}),s){let{fieldData:{"discount-percentage":u}}=s,b=a.querySelector(f.discount);b&&u&&(b.innerHTML=`-${u}%`);let E=a.querySelector(f.discountContainer);E&&!u&&(E.style.display="none")}},X=(a,e,t)=>{let s=a.querySelector(f.price);s&&(s.innerHTML=Math.floor(e).toString());let r=a.querySelector(f.currency);r&&(r.innerHTML=w[t])};var A=class{constructor(e,t){this.listInstance=e;this.itemTemplateElement=t;D(this,"loadingSpinner");D(this,"cmsFilterEmptyState");D(this,"offerLookup",{});D(this,"apiClient",new O);D(this,"countryCode");D(this,"availableCountries",{});D(this,"countryCodeFilter",e=>{let{fieldData:t}=e;return!t["supported-countries"]||t["supported-countries"].length===0?!0:t["supported-countries"].map(r=>this.availableCountries[r]).includes(this.countryCode)});this.cmsFilterEmptyState=document.querySelector(f.cmsFilterEmptyState),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.add("hide-empty-state"),e.clearItems(),U(),this.loadingSpinner=document.querySelector(f.loadingSpinner),this.countryCode=T}async getGroupOffers(e){let{clearItems:t=!0,filter:s}=e||{};t&&this.listInstance.clearItems();let r=await this.apiClient.getCMSOffers();if(!r)return;let i=await this.apiClient.getCountries();if(!i)return;i.items.forEach(b=>{this.availableCountries[b.id]=b.fieldData.title?.trim()}),this.countryCode=await k();let o=r.items.filter(s).filter(this.countryCodeFilter),n=this.generateHotelIds(o),d=this.generateHotelIds(o).join(","),m=n.length===1;m&&(d=[d,d].join(","));let{offerMetaData:g}=this.generateOfferData(o),h=q(),c=await this.apiClient.getGroupOffersData({hids:d,locale:h});if(!c||c.error||!c.data){this.hideSpinnerAndShowFilter();return}m&&(c.data=[c.data[0]]);let u=this.getAllOffers(c,g);this.addHotelToCollection(u),this.hideSpinnerAndShowFilter()}async getGroupCategoryOffers(e,t=!1){let s=r=>{let{isArchived:i,isDraft:o,fieldData:n}=r;return i||o?!1:t?(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot"):n.category===e};await this.getGroupOffers({filter:s})}async getGroupThemeOffers(e){let t=s=>{let{isArchived:r,isDraft:i,fieldData:o}=s;return r||i||!o.thematiques?!1:o.thematiques.includes(e)};await this.getGroupOffers({filter:t})}async getGroupOtherThemedOffers(e){let t=s=>{let{isArchived:r,isDraft:i,fieldData:o}=s;return r||i||o.slug===e?!1:Array.isArray(o.thematiques)&&o.thematiques.length>0};await this.getGroupOffers({filter:t})}async getGroupSlugOffers(e){let t=s=>{let{isArchived:r,isDraft:i,fieldData:o}=s;return r||i?!1:o.slug===e};await this.getGroupOffers({filter:t})}async getGroupOtherOffers(e,t){let s=r=>{let{isArchived:i,isDraft:o,fieldData:n}=r;return i||o||n.slug===e?!1:t?n.category===t:(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot")};await this.getGroupOffers({filter:s})}hideSpinnerAndShowFilter(){this.loadingSpinner&&(this.loadingSpinner.style.display="none"),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.remove("hide-empty-state")}generateHotelIds(e){let t=[],s=x();return e.forEach(r=>{let{fieldData:{"hotel-villa":i}}=r;t.push(s[i])}),Array.from(new Set(t))}getAllOffers(e,t){let s=[];return e.data.forEach(r=>{let{prop:{hid:i},rates:o}=r;o.forEach(n=>{let{name:d,title:m}=n.rate;(t.includes(p(i,d))||t.includes(p(i,m)))&&s.push({...r,rates:[n]})})}),s.sort((r,i)=>{let o=this.offerLookup[p(r.prop.hid,r.rates[0].rate.title)]||this.offerLookup[p(r.prop.hid,r.rates[0].rate.name)],n=this.offerLookup[p(i.prop.hid,i.rates[0].rate.title)]||this.offerLookup[p(i.prop.hid,i.rates[0].rate.name)],d=Number(o.fieldData.order)||0,m=Number(n.fieldData.order)||0;return d-m}),s}generateOfferData(e){let t=[];return e.forEach(s=>{let{fieldData:{"hotel-or-property-api-id":r,"offer-api-name":i}}=s,o=p(r,i);t.push(o),this.offerLookup[o]=s}),{offerMetaData:t}}addHotelToCollection(e){for(let{prop:t,rates:s}of e){let r=s.map(i=>this.createItem(t,i,this.itemTemplateElement));this.listInstance.addItems(r)}}createItem(e,t,s){let{rate:r}=t,{hid:i,title:o,property:n}=e,{image:d,title:m,name:g}=r,h=this.offerLookup[p(i||n,m)]||this.offerLookup[p(i||n,g)],c=s.cloneNode(!0),u=M[i||n];if(!u)return c;let{destination:b,slug:E}=u;this.bindOffersMetaData(c,{destination:b,image:d,hotelName:o,title:m,slug:E}),Y(c,t,i,h);let H=c.querySelector(f.moreDetails);return H&&H.addEventListener("click",()=>{let W=this.getOffersCmsSlug(i,n,g);window.location.href=`/offers/${W}`}),c.style.display="flex",c}getOffersCmsSlug(e,t,s){return this.offerLookup[p(e||t,s)]?.fieldData.slug}bindOffersMetaData(e,{destination:t,image:s,hotelName:r,title:i,slug:o,description:n}){let d=e.querySelector(f.destination),m=e.querySelector(f.image),g=e.querySelector(f.hotelName),h=e.querySelector(f.name),c=e.querySelector(f.description),u=e.querySelector(f.hotelLink),b=y();d&&(d.textContent=t[b]),m&&(m.src=s?.url),g&&(g.innerHTML=r),h&&(h.innerHTML=i),c&&n&&(c.innerHTML=n),u&&o&&u.addEventListener("click",()=>{window.location.href=o})}};var j=a=>{let[e]=a.items;if(!e)throw new Error("No items found in the list instance");let t=e.element;return new A(a,t)};window.fsAttributes=window.fsAttributes||[];window.loadFromServer=()=>{window.fsAttributes.push(["cmsload",async a=>{let e=j(a[0]),t=window.location.pathname;await e.getGroupThemeOffers(F[t])}])};window.loadFromServer();})();
1
+ "use strict";(()=>{var Q=Object.defineProperty;var V=(s,e,t)=>e in s?Q(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var D=(s,e,t)=>(V(s,typeof e!="symbol"?e+"":e,t),t);var l="data",f={startingPriceList:`[${l}=starting-price-list]`,price:`[${l}=price]`,discount:`[${l}=discount]`,discountContainer:`[${l}=discount-container]`,currency:`[${l}=currency]`,beHid:`[${l}-be-hid]`,destination:`[${l}=destination]`,offersList:`[${l}=offers-list]`,offerSlugDetail:`[${l}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${l}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${l}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${l}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${l}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${l}=offers-list-container]`,listItem:`[${l}=list-item]`,image:`[${l}=image]`,name:`[${l}=name]`,description:`[${l}=description]`,hotelName:`[${l}=hotel-name]`,hotelLink:`[${l}=hotel-link]`,hotelStartingPriceContainer:`[${l}=hotel-starting-price-container]`,moreDetails:`[${l}=more-details]`,offersPopup:`[${l}=offers-popup]`,offersPopupClose:`[${l}=close-btn]`,hotelReserveLink:`[${l}=hotel-reserve-link]`,hotelVillaReserveLink:`[${l}=hotel-villa-reserve-link]`,hotelURLS:`[${l}=hotel-urls]`,languageDropdown:`[${l}=language-dropdown]`,selectedLanguage:`[${l}=selected-language]`,loadingSpinner:`[${l}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:s=>`[${l}-be-hid=${s}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var L={en:"Guadeloupe Islands",fr:"Les \xCEles de Guadeloupe",es:"Las islas de Guadalupe",it:"Le isole della Guadalupa"},P={en:"La Dominique",fr:"La Dominique",es:"Dominica",it:"Dominica"},T={en:"Saint Lucia",fr:"Sainte-Lucie",es:"Santa Luc\xEDa",it:"Santa Lucia"},J={en:"Martinique",fr:"Martinique",es:"Martinica",it:"Martinica"},S={en:"Mauritius",fr:"\xCEle Maurice",es:"Mauricio",it:"Mauritius"},R={en:"Saint Martin",fr:"Saint-Martin",es:"Saint-Martin",it:"Saint Martin"},w={en:"Antigua",fr:"Antigua",es:"Antigua",it:"Antigua"},X={en:"Anguilla",fr:"Anguilla",es:"Anguila",it:"Anguilla"},M={gpgos12767:{destination:L,slug:"/hotels-et-villas/creole-beach-hotel-spa",codeIPlanet:"FRAN414",cmsId:"67c809b5f63deab8a71cf8e9"},gptro12772:{destination:L,slug:"/hotels-et-villas/le-jardin-malanga",codeIPlanet:"FRAN416",cmsId:"67c809b5f63deab8a71cf90d"},gpsai12770:{destination:L,slug:"/hotels-et-villas/la-toubana-hotel-spa",codeIPlanet:"FRAN411",cmsId:"67c809b5f63deab8a71cf8ef"},gpgos12769:{destination:L,slug:"/hotels-et-villas/mahogany-hotel-residence-spa",codeIPlanet:"FRAN423",cmsId:"67c809b5f63deab8a71cf91f"},gpgua27143:{destination:L,slug:"/hotels-et-villas/langley-resort-fort-royal",codeIPlanet:"GPAN32",cmsId:"67c809b5f63deab8a71cf8f0"},mqros18592:{destination:P,slug:"/hotels-et-villas/jungle-bay-dominica",codeIPlanet:"DMAN1",cmsId:"67c809b5f63deab8a71cf8ed"},dmtib00001:{destination:P,slug:"/hotels-et-villas/secret-bay-dominique",codeIPlanet:"DMAN2",cmsId:"67c809b5f63deab8a71cfefd"},agste21689:{destination:T,slug:"/hotels-et-villas/jade-mountain",codeIPlanet:"AGAN6",cmsId:"67c809b5f63deab8a71cf92a"},zzzzz25376:{destination:T,slug:"/hotels-et-villas/windjammer-landing",codeIPlanet:"LCAN4",cmsId:"67c809b5f63deab8a71cf92b"},lcgro30400:{destination:T,slug:"/hotels-et-villas/cap-maison",codeIPlanet:"LCLC8",cmsId:"67c809b5f63deab8a71cf929"},agste21688:{destination:T,slug:"/hotels-et-villas/anse-chastanet",codeIPlanet:"AGAN5",cmsId:"67c809b5f63deab8a71cf928"},mqsai18593:{destination:J,slug:"/hotels-et-villas/plein-soleil",codeIPlanet:"MQAN16",cmsId:"67c809b5f63deab8a71cf925"},zzzzz25378:{destination:S,slug:"/hotels-et-villas/shanti-maurice",codeIPlanet:"MUAN22",cmsId:"67c809b5f63deab8a71cf933"},zzzzz25377:{destination:S,slug:"/hotels-et-villas/lux-le-morne",codeIPlanet:"MUAN21",cmsId:"67c809b5f63deab8a71cf931"},zzzzz25379:{destination:S,slug:"/hotels-et-villas/constance-belle-mare-plage",codeIPlanet:"MUAN20",cmsId:"67c809b5f63deab8a71cf92f"},mupos25678:{destination:S,slug:"/hotels-et-villas/constance-le-prince-maurice",codeIPlanet:"MUAN24",cmsId:"67c809b5f63deab8a71cf930"},zzzzz25380:{destination:S,slug:"/hotels-et-villas/anahita-the-resort",codeIPlanet:"MUAN19",cmsId:"67c809b5f63deab8a71cf92e"},agstm21687:{destination:R,slug:"/hotels-et-villas/la-samanna",codeIPlanet:"FRAN2350",cmsId:"67c809b5f63deab8a71cf926"},frsai31536:{destination:R,slug:"/hotels-et-villas/le-grand-case-beach-club",codeIPlanet:"FRFRA3",cmsId:"67c809b5f63deab8a71cf927"},ageng20433:{destination:w,slug:"/hotels-et-villas/the-inn-at-english-harbour",codeIPlanet:"AGAN4",cmsId:"67c809b5f63deab8a71cf8ec"},agcro20496:{destination:w,slug:"/hotels-et-villas/blue-waters",codeIPlanet:"AGAN1",cmsId:"67c809b5f63deab8a71cf8eb"},gpang25884:{destination:X,slug:"/hotels-et-villas/aurora-anguilla-resort-golf-club",codeIPlanet:"GPAN30",cmsId:"67c809b5f63deab8a71cf8ea"}},$={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},F={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var z={"/thematiques/sejour-en-famille":"67c809b5f63deab8a71cf936","/en/themes/family-stay":"67c809b5f63deab8a71cf936","/es/temas/estancia-en-familia":"67c809b5f63deab8a71cf936","/it/temi/soggiorno-in-famiglia":"67c809b5f63deab8a71cf936","/thematiques/voyages-de-noces":"67c809b5f63deab8a71cfb33","/en/themes/honeymoons":"67c809b5f63deab8a71cfb33","/es/temas/lunas-de-miel":"67c809b5f63deab8a71cfb33","/it/temi/lune-di-miele":"67c809b5f63deab8a71cfb33","/thematiques/paradis-des-golfeurs":"67c809b5f63deab8a71cfb32","/en/themes/a-golfer-s-paradise":"67c809b5f63deab8a71cfb32","/es/temas/el-paraiso-del-golfista":"67c809b5f63deab8a71cfb32","/it/temi/un-paradiso-per-i-golfisti":"67c809b5f63deab8a71cfb32","/thematiques/all-inclusives":"67c809b5f63deab8a71cf934","/en/themes/all-inclusives":"67c809b5f63deab8a71cf934","/es/temas/todo-incluido":"67c809b5f63deab8a71cf934","/it/temi/tutto-compreso":"67c809b5f63deab8a71cf934","/thematiques/escapade-spa-bien-etre":"67c809b5f63deab8a71cf935","/en/themes/wellness-spa-getaway":"67c809b5f63deab8a71cf935","/es/temas/escapada-spa-bienestar":"67c809b5f63deab8a71cf935","/it/temi/soggiorno-benessere-alle-terme":"67c809b5f63deab8a71cf935","/thematiques/activites-et-loisirs":"67c809b5f63deab8a71cfcb4","/en/themes/leisure-activities":"67c809b5f63deab8a71cfcb4","/es/temas/actividades-y-ocio":"67c809b5f63deab8a71cfcb4","/it/temi/attivita-e-tempo-libero":"67c809b5f63deab8a71cfcb4","/thematiques/plongee-sous-marine":"67c809b5f63deab8a71cf937","/en/themes/scuba-diving":"67c809b5f63deab8a71cf937","/es/temas/submarinismo":"67c809b5f63deab8a71cf937","/it/temi/immersione-subacquea":"67c809b5f63deab8a71cf937","/thematiques/roadtrip":"67c809b5f63deab8a71cfb34","/en/themes/roadtrip":"67c809b5f63deab8a71cfb34","/es/temas/viaje-por-carretera":"67c809b5f63deab8a71cfb34","/it/temi/viaggio-in-auto":"67c809b5f63deab8a71cfb34","/thematiques/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/en/themes/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/es/temas/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/it/temi/senior-60-ans-et-plus":"67c809b5f63deab8a71cfedb","/thematiques/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/en/themes/ponts-du-mois-de-mai":"69b7d869ecee16ecb87f202b","/es/temas/ponts-du-mes-de-mayo":"69b7d869ecee16ecb87f202b","/it/temi/ponti-del-mese-di-maggio":"69b7d869ecee16ecb87f202b"},I="https://deshotelsetdesiles.ccordier.workers.dev/v2/",G="https://deshotelsetdesiles.i-planet.fr/dhdi-public/searchform.cgi",O="FR",k="1*q1lzz9*_gcl_au*MTMyMzcyMDY5NC4xNzM5Mjg5MzYx*_ga*NTAxMzI1MzMwLjE3MzkyODkzNjE.*_ga_Q0RXHLR7D4*MTczOTI5NzEzNC4zLjAuMTczOTI5NzE3Mi4yMi4wLjA.";var _=async()=>new Promise(s=>{geoip2.country(e=>{s(e.country.iso_code)},()=>{s(O)})});var v=s=>{let e="?";for(let[t,r]of Object.entries(s))r&&(e+=`${t}=${r}&`);return e};var y=class{async getGroupOffersData(e){let t=I+"groupOffers"+v(e),i=await(await fetch(t)).json();return i.error||!i.data?null:i}async getSingleHotelOffersData(e){let t=I+"offers"+v(e),i=await(await fetch(t)).json();return i.error||!i.data?null:i}async getCMSOffers(){let e=I+"cmsOffers",r=await(await fetch(e)).json();return r.items?r:null}async getCountries(){let e=I+"cmsCountries",r=await(await fetch(e)).json();return r.items?r:null}};var B=()=>{let s=q();if(!s){let e=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(e)}window.Weglot.on("languageChanged",()=>{if(s)window.location.reload();else{let e=window.Weglot.getCurrentLang();localStorage.setItem("wglang",e),window.loadFromServer&&window.loadFromServer()}})},q=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",x=()=>{let s=E();return F[s]},E=()=>{if(!q())return localStorage.getItem("wglang")||"fr";try{let s=window.Weglot.getCurrentLang();if(s)return s}catch(s){return console.error("Error getting language",s),"fr"}return"fr"},ee=()=>!window.location.hostname.includes("webflow.io");function K(s){if(!ee())return`/offers/${s}`;let e=E();return!e||e==="fr"?`/offers/${s}`:`/${e}/offers/${s}`}var Y=()=>{let s={};return Object.entries(M).forEach(([e,t])=>{s[t.cmsId]=e}),s},p=(s,e)=>`${s.toLowerCase().trim()}-${e.toLowerCase().trim()}`,j=(s,e,t)=>{let r=E().toUpperCase(),i=M[e].codeIPlanet.toUpperCase(),a=`${G}?Lang=${r}&currency=${s.toUpperCase()}&HotelCode=${i}`,o=U("_ga"),n=k,d=U("_gcl_au");return a+=`&_ga=${o}&_gl=${n}&_gcl_au=${d}`,t&&(a=`${a}&HotelPromo=${t}`),a},U=s=>{let e=document.cookie.match(new RegExp("(^| )"+s+"=([^;]+)"));return e?e[2]:null};var W=(s,e,t,r)=>{let{quotation:i,rate:{distribution:a}}=e,{pricePerNight:o,currency:n,plainBookLink:d}=i,{accessCode:m}=a||{},g="";m&&m.length>0&&([g]=m),te(s,o,n);let h=s.querySelector(f.hotelReserveLink);h&&h.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(d,"_blank")});let c=s.querySelector(f.hotelVillaReserveLink);if(c&&c.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),window.open(j(n,t,g),"_blank")}),r){let{fieldData:{"discount-percentage":u}}=r,b=s.querySelector(f.discount);b&&u&&(b.innerHTML=`-${u}%`);let C=s.querySelector(f.discountContainer);C&&!u&&(C.style.display="none")}},te=(s,e,t)=>{let r=s.querySelector(f.price);r&&(r.innerHTML=Math.floor(e).toString());let i=s.querySelector(f.currency);i&&(i.innerHTML=$[t])};var A=class{constructor(e,t){this.listInstance=e;this.itemTemplateElement=t;D(this,"loadingSpinner");D(this,"cmsFilterEmptyState");D(this,"offerLookup",{});D(this,"apiClient",new y);D(this,"countryCode");D(this,"availableCountries",{});D(this,"countryCodeFilter",e=>{let{fieldData:t}=e;return!t["supported-countries"]||t["supported-countries"].length===0?!0:t["supported-countries"].map(i=>this.availableCountries[i]).includes(this.countryCode)});this.cmsFilterEmptyState=document.querySelector(f.cmsFilterEmptyState),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.add("hide-empty-state"),e.clearItems(),B(),this.loadingSpinner=document.querySelector(f.loadingSpinner),this.countryCode=O}async getGroupOffers(e){let{clearItems:t=!0,filter:r}=e||{};t&&this.listInstance.clearItems();let i=await this.apiClient.getCMSOffers();if(!i)return;let a=await this.apiClient.getCountries();if(!a)return;a.items.forEach(b=>{this.availableCountries[b.id]=b.fieldData.title?.trim()}),this.countryCode=await _();let o=i.items.filter(r).filter(this.countryCodeFilter),n=this.generateHotelIds(o),d=this.generateHotelIds(o).join(","),m=n.length===1;m&&(d=[d,d].join(","));let{offerMetaData:g}=this.generateOfferData(o),h=x(),c=await this.apiClient.getGroupOffersData({hids:d,locale:h});if(!c||c.error||!c.data){this.hideSpinnerAndShowFilter();return}m&&(c.data=[c.data[0]]);let u=this.getAllOffers(c,g);this.addHotelToCollection(u),this.hideSpinnerAndShowFilter()}async getGroupCategoryOffers(e,t=!1){let r=i=>{let{isArchived:a,isDraft:o,fieldData:n}=i;return a||o?!1:t?(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot"):n.category===e};await this.getGroupOffers({filter:r})}async getGroupThemeOffers(e){let t=r=>{let{isArchived:i,isDraft:a,fieldData:o}=r;return i||a||!o.thematiques?!1:o.thematiques.includes(e)};await this.getGroupOffers({filter:t})}async getGroupOtherThemedOffers(e){let t=r=>{let{isArchived:i,isDraft:a,fieldData:o}=r;return i||a||o.slug===e?!1:Array.isArray(o.thematiques)&&o.thematiques.length>0};await this.getGroupOffers({filter:t})}async getGroupSlugOffers(e){let t=r=>{let{isArchived:i,isDraft:a,fieldData:o}=r;return i||a?!1:o.slug===e};await this.getGroupOffers({filter:t})}async getGroupOtherOffers(e,t){let r=i=>{let{isArchived:a,isDraft:o,fieldData:n}=i;return a||o||n.slug===e?!1:t?n.category===t:(!n.thematiques||n.thematiques.length===0)&&!n.slug.includes("derniere-minute")&&!n.slug.includes("reservez-tot")};await this.getGroupOffers({filter:r})}hideSpinnerAndShowFilter(){this.loadingSpinner&&(this.loadingSpinner.style.display="none"),this.cmsFilterEmptyState&&this.cmsFilterEmptyState.classList.remove("hide-empty-state")}generateHotelIds(e){let t=[],r=Y();return e.forEach(i=>{let{fieldData:{"hotel-villa":a}}=i;t.push(r[a])}),Array.from(new Set(t))}getAllOffers(e,t){let r=[];return e.data.forEach(i=>{let{prop:{hid:a},rates:o}=i;o.forEach(n=>{let{name:d,title:m}=n.rate;(t.includes(p(a,d))||t.includes(p(a,m)))&&r.push({...i,rates:[n]})})}),r.sort((i,a)=>{let o=this.offerLookup[p(i.prop.hid,i.rates[0].rate.title)]||this.offerLookup[p(i.prop.hid,i.rates[0].rate.name)],n=this.offerLookup[p(a.prop.hid,a.rates[0].rate.title)]||this.offerLookup[p(a.prop.hid,a.rates[0].rate.name)],d=Number(o.fieldData.order)||0,m=Number(n.fieldData.order)||0;return d-m}),r}generateOfferData(e){let t=[];return e.forEach(r=>{let{fieldData:{"hotel-or-property-api-id":i,"offer-api-name":a}}=r,o=p(i,a);t.push(o),this.offerLookup[o]=r}),{offerMetaData:t}}addHotelToCollection(e){for(let{prop:t,rates:r}of e){let i=r.map(a=>this.createItem(t,a,this.itemTemplateElement));this.listInstance.addItems(i)}}createItem(e,t,r){let{rate:i}=t,{hid:a,title:o,property:n}=e,{image:d,title:m,name:g}=i,h=this.offerLookup[p(a||n,m)]||this.offerLookup[p(a||n,g)],c=r.cloneNode(!0),u=M[a||n];if(!u)return c;let{destination:b,slug:C}=u;this.bindOffersMetaData(c,{destination:b,image:d,hotelName:o,title:m,slug:C}),W(c,t,a,h);let H=c.querySelector(f.moreDetails);return H&&H.addEventListener("click",()=>{let N=this.getOffersCmsSlug(a,n,g);N&&(window.location.href=K(N))}),c.style.display="flex",c}getOffersCmsSlug(e,t,r){return this.offerLookup[p(e||t,r)]?.fieldData.slug}bindOffersMetaData(e,{destination:t,image:r,hotelName:i,title:a,slug:o,description:n}){let d=e.querySelector(f.destination),m=e.querySelector(f.image),g=e.querySelector(f.hotelName),h=e.querySelector(f.name),c=e.querySelector(f.description),u=e.querySelector(f.hotelLink),b=E();d&&(d.textContent=t[b]),m&&(m.src=r?.url),g&&(g.innerHTML=i),h&&(h.innerHTML=a),c&&n&&(c.innerHTML=n),u&&o&&u.addEventListener("click",()=>{window.location.href=o})}};var Z=s=>{let[e]=s.items;if(!e)throw new Error("No items found in the list instance");let t=e.element;return new A(s,t)};window.fsAttributes=window.fsAttributes||[];window.loadFromServer=()=>{window.fsAttributes.push(["cmsload",async s=>{let e=Z(s[0]),t=window.location.pathname;await e.getGroupThemeOffers(z[t])}])};window.loadFromServer();})();
@@ -1 +1 @@
1
- "use strict";(()=>{var P=Object.defineProperty;var M=(a,t,s)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var l=(a,t,s)=>(M(a,typeof t!="symbol"?t+"":t,s),s);var e="data",o={startingPriceList:`[${e}=starting-price-list]`,price:`[${e}=price]`,discount:`[${e}=discount]`,discountContainer:`[${e}=discount-container]`,currency:`[${e}=currency]`,beHid:`[${e}-be-hid]`,destination:`[${e}=destination]`,offersList:`[${e}=offers-list]`,offerSlugDetail:`[${e}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${e}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${e}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${e}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${e}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${e}=offers-list-container]`,listItem:`[${e}=list-item]`,image:`[${e}=image]`,name:`[${e}=name]`,description:`[${e}=description]`,hotelName:`[${e}=hotel-name]`,hotelLink:`[${e}=hotel-link]`,hotelStartingPriceContainer:`[${e}=hotel-starting-price-container]`,moreDetails:`[${e}=more-details]`,offersPopup:`[${e}=offers-popup]`,offersPopupClose:`[${e}=close-btn]`,hotelReserveLink:`[${e}=hotel-reserve-link]`,hotelVillaReserveLink:`[${e}=hotel-villa-reserve-link]`,hotelURLS:`[${e}=hotel-urls]`,languageDropdown:`[${e}=language-dropdown]`,selectedLanguage:`[${e}=selected-language]`,loadingSpinner:`[${e}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:a=>`[${e}-be-hid=${a}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var c={DHDICBeach:"gpgos12767",DHDIJMalanga:"gptro12772",DHDIToubana:"gpsai12770",DHDIMahogany:"gpgos12769",DHDILangleyres:"gpgua27143",DHDIJungle:"mqros18592",DHDIJade:"agste21689",DHDIWINDLAND:"zzzzz25376",DHDILeCapMaison:"lcgro30400",DHDIChastenet:"agste21688",DHDILPSoleil:"mqsai18593",DHDISHANTI:"zzzzz25378",DHDIPavillon:"zzzzz25377",DHDIBELLEMARE:"zzzzz25379",DHDIPrincemaurice:"mupos25678",DHDIANAHITA:"zzzzz25380",DHDISamana:"agstm21687",FRANTHTLGrandCaseBe1:"frsai31536",DHDITInn:"ageng20433",DHDIBWaters:"agcro20496",DHDICuisinartgolf:"gpang25884",DMDESHTLSecretBayDom:"dmtib00001"};var m={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},b={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var h="https://deshotelsetdesiles.ccordier.workers.dev/v2/";var p=a=>{let t="?";for(let[s,i]of Object.entries(a))i&&(t+=`${s}=${i}&`);return t};var D=()=>{let a=I();if(!a){let t=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(t)}window.Weglot.on("languageChanged",()=>{if(a)window.location.reload();else{let t=window.Weglot.getCurrentLang();localStorage.setItem("wglang",t),window.loadFromServer&&window.loadFromServer()}})},I=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",L=()=>{let a=A();return b[a]},A=()=>{if(!I())return localStorage.getItem("wglang")||"fr";try{let a=window.Weglot.getCurrentLang();if(a)return a}catch(a){return console.error("Error getting language",a),"fr"}return"fr"};var d=class{constructor(t){l(this,"hotelsIds");l(this,"itemElements");l(this,"itemContainerElements",[]);l(this,"hotelStartingPriceDataMap",new Map);this.hotelsIds=[],this.itemElements=[],t.querySelectorAll(o.beHid).forEach(s=>{let i=s.getAttribute(`${e}-be-hid`)?.trim();if(i&&c[i]){this.hotelsIds.push(c[i]),this.itemElements.push(s),this.itemContainerElements.push(s.parentElement);let n=s.querySelector(o.price);n&&(n.style.display="none")}else if(i&&!c[i]){let n=s.querySelector(o.hotelStartingPriceContainer);n&&this.hidePricingContainer(n)}}),D()}async getHotelStartingPrice(){for(let t=0;t<this.hotelsIds.length;t++){let s=this.hotelsIds[t],i=this.itemElements[t],n=i.querySelector(o.hotelStartingPriceContainer)||this.itemContainerElements[t],r=this.hotelStartingPriceDataMap.get(s);if(r===void 0&&(r=await this.getHotelStartingPriceData({property:s,locale:L()})),this.hotelStartingPriceDataMap.set(s,r),!r){this.hidePricingContainer(n);continue}let{quotation:{pricePerNight:g,currency:S}}=r;g||this.hidePricingContainer(n);let f=i.querySelector(o.price);f&&(f.innerHTML=Math.floor(g).toString(),f.style.display="block");let u=i.querySelector(o.currency);u&&(u.innerHTML=m[S])}}async getHotelStartingPriceData(t){let s=h+"startingfrom"+p(t),n=await(await fetch(s)).json();return n.error||!n.data?null:n.data}hidePricingContainer(t){t&&(t.style.display="none")}};window.Webflow||(window.Webflow=[]);window.loadFromServer=()=>{window.Webflow.push(async()=>{let a=document.querySelector(o.startingPriceList);a&&await new d(a).getHotelStartingPrice()})};window.loadFromServer();})();
1
+ "use strict";(()=>{var P=Object.defineProperty;var M=(a,t,s)=>t in a?P(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s;var l=(a,t,s)=>(M(a,typeof t!="symbol"?t+"":t,s),s);var e="data",o={startingPriceList:`[${e}=starting-price-list]`,price:`[${e}=price]`,discount:`[${e}=discount]`,discountContainer:`[${e}=discount-container]`,currency:`[${e}=currency]`,beHid:`[${e}-be-hid]`,destination:`[${e}=destination]`,offersList:`[${e}=offers-list]`,offerSlugDetail:`[${e}=offer-slug-detail], [data-offer-slug-detail]`,offerSlugOthersList:`[${e}=offer-slug-others-list], [data-offer-slug-others-list]`,offerSlugOthersList2:`[${e}=offer-slug-others-list2], [data-offer-slug-others-list2]`,offerSlugOthersList3:`[${e}=offer-slug-others-list3], [data-offer-slug-others-list3]`,offerSlugOthersListItem:".offer-others_item",offersMoreWrapper:`[${e}=offers-more-wrapper]`,offerOthersTabsMenu:".offer-others_tabs-menu",offerOthersTabLink:".offer-others_tab-link",offerOthersTabPane:".offer-others_tab-pane",offersListContainer:`[${e}=offers-list-container]`,listItem:`[${e}=list-item]`,image:`[${e}=image]`,name:`[${e}=name]`,description:`[${e}=description]`,hotelName:`[${e}=hotel-name]`,hotelLink:`[${e}=hotel-link]`,hotelStartingPriceContainer:`[${e}=hotel-starting-price-container]`,moreDetails:`[${e}=more-details]`,offersPopup:`[${e}=offers-popup]`,offersPopupClose:`[${e}=close-btn]`,hotelReserveLink:`[${e}=hotel-reserve-link]`,hotelVillaReserveLink:`[${e}=hotel-villa-reserve-link]`,hotelURLS:`[${e}=hotel-urls]`,languageDropdown:`[${e}=language-dropdown]`,selectedLanguage:`[${e}=selected-language]`,loadingSpinner:`[${e}=loading-spinner]`,cmsFilterEmptyState:"[fs-cmsfilter-element=empty]",startingfromItem:a=>`[${e}-be-hid=${a}]`,popupOverlay:"[fs-smartlightbox-element=trigger-close]"};var c={DHDICBeach:"gpgos12767",DHDIJMalanga:"gptro12772",DHDIToubana:"gpsai12770",DHDIMahogany:"gpgos12769",DHDILangleyres:"gpgua27143",DHDIJungle:"mqros18592",DHDIJade:"agste21689",DHDIWINDLAND:"zzzzz25376",DHDILeCapMaison:"lcgro30400",DHDIChastenet:"agste21688",DHDILPSoleil:"mqsai18593",DHDISHANTI:"zzzzz25378",DHDIPavillon:"zzzzz25377",DHDIBELLEMARE:"zzzzz25379",DHDIPrincemaurice:"mupos25678",DHDIANAHITA:"zzzzz25380",DHDISamana:"agstm21687",FRANTHTLGrandCaseBe1:"frsai31536",DHDITInn:"ageng20433",DHDIBWaters:"agcro20496",DHDICuisinartgolf:"gpang25884",DMDESHTLSecretBayDom:"dmtib00001"};var m={AED:"\u062F.\u0625.",AFN:"Af",ALL:"L",AMD:"\u058F",ANG:"\u0192",AOA:"Kz",ARS:"AR$",AUD:"AU$",AWG:"\u0192",AZN:"\u043C\u0430\u043D",BAM:"KM",BBD:"BBD$",BDT:"\u09F3",BGN:"\u043B\u0432.",BHD:"BD",BIF:"FBu",BMD:"$",BND:"B$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"BZ$",CAD:"CA$",CDF:"FC",CHF:"Fr.",CKD:"$",CLP:"CL$",CNY:"CN\xA5",COP:"CO$",CRC:"\u20A1",CUC:"CUC$",CUP:"$MN",CVE:"CV$",CZK:"K\u010D",DJF:"Fdj",DKK:"kr.",DOP:"RD$",DZD:"DA",EGP:"E\xA3",EHP:"Ptas.",ERN:"Nkf",ETB:"Br",EUR:"\u20AC",FJD:"FJ$",FKP:"FK\xA3",FOK:"kr",GBP:"\xA3",GEL:"\u20BE",GGP:"\xA3",GHS:"GH\u20B5",GIP:"\xA3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"G$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20AA",IMP:"\xA3",INR:"Rs.",IQD:"\u062F.\u0639.",IRR:"\uFDFC",ISK:"kr",JEP:"\xA3",JMD:"J$",JOD:"JD",JPY:"\xA5",KES:"KSh",KGS:"\u0441",KHR:"\u17DB",KID:"$",KMF:"CF",KPW:"\u20A9",KRW:"\u20A9",KWD:"KD",KYD:"CI$",KZT:"\u20B8",LAK:"\u20ADN",LBP:"LL.",LKR:"Rs.",LRD:"L$",LSL:"L",LYD:"LD",MAD:"DH",MDL:"L",MGA:"Ar",MKD:"den",MMK:"Ks",MNT:"\u20AE",MOP:"MOP$",MRU:"UM",MUR:"Rs.",MVR:"MRf",MWK:"MK",MXN:"MX$",MYR:"RM",MZN:"MTn",NAD:"N$",NGN:"\u20A6",NIO:"C$",NOK:"kr",NPR:"Rs.",NZD:"NZ$",OMR:"OR",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"\u20B1",PKR:"Rs.",PLN:"z\u0142",PND:"$",PRB:"\u0440.",PYG:"\u20B2",QAR:"QR",RON:"L",RSD:"din",RUB:"\u20BD",RWF:"FRw",SAR:"SR",SBD:"SI$",SCR:"Rs.",SDG:"\xA3SD",SEK:"kr",SGD:"S$",SHP:"\xA3",SLL:"Le",SLS:"Sl",SOS:"Sh.So.",SRD:"Sr$",SSP:"SS\xA3",STN:"Db",SVC:"\u20A1",SYP:"LS",SZL:"L",THB:"\u0E3F",TJS:"SM",TMT:"m.",TND:"DT",TOP:"T$",TRY:"TL",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"\u20B4",UGX:"USh",USD:"$",UYU:"$U",UZS:"\u0441\u0443\u043C",VED:"Bs.",VES:"Bs.F",VND:"\u20AB",VUV:"VT",WST:"T",XAF:"Fr",XCD:"$",XOF:"\u20A3",XPF:"\u20A3",YER:"YR",ZAR:"R",ZMW:"ZK",ZWB:"",ZWL:"Z$",Abkhazia:"",Artsakh:"\u0564\u0580."},b={it:"it_IT",es:"es_ES",fr:"fr_FR",en:"en_GB"};var h="https://deshotelsetdesiles.ccordier.workers.dev/v2/";var p=a=>{let t="?";for(let[s,i]of Object.entries(a))i&&(t+=`${s}=${i}&`);return t};var D=()=>{let a=L();if(!a){let t=localStorage.getItem("wglang")||"fr";window.Weglot.switchTo(t)}window.Weglot.on("languageChanged",()=>{if(a)window.location.reload();else{let t=window.Weglot.getCurrentLang();localStorage.setItem("wglang",t),window.loadFromServer&&window.loadFromServer()}})},L=()=>window.location.hostname!=="deshotelsetdesiles.webflow.io",I=()=>{let a=A();return b[a]},A=()=>{if(!L())return localStorage.getItem("wglang")||"fr";try{let a=window.Weglot.getCurrentLang();if(a)return a}catch(a){return console.error("Error getting language",a),"fr"}return"fr"};var d=class{constructor(t){l(this,"hotelsIds");l(this,"itemElements");l(this,"itemContainerElements",[]);l(this,"hotelStartingPriceDataMap",new Map);this.hotelsIds=[],this.itemElements=[],t.querySelectorAll(o.beHid).forEach(s=>{let i=s.getAttribute(`${e}-be-hid`)?.trim();if(i&&c[i]){this.hotelsIds.push(c[i]),this.itemElements.push(s),this.itemContainerElements.push(s.parentElement);let n=s.querySelector(o.price);n&&(n.style.display="none")}else if(i&&!c[i]){let n=s.querySelector(o.hotelStartingPriceContainer);n&&this.hidePricingContainer(n)}}),D()}async getHotelStartingPrice(){for(let t=0;t<this.hotelsIds.length;t++){let s=this.hotelsIds[t],i=this.itemElements[t],n=i.querySelector(o.hotelStartingPriceContainer)||this.itemContainerElements[t],r=this.hotelStartingPriceDataMap.get(s);if(r===void 0&&(r=await this.getHotelStartingPriceData({property:s,locale:I()})),this.hotelStartingPriceDataMap.set(s,r),!r){this.hidePricingContainer(n);continue}let{quotation:{pricePerNight:g,currency:S}}=r;g||this.hidePricingContainer(n);let f=i.querySelector(o.price);f&&(f.innerHTML=Math.floor(g).toString(),f.style.display="block");let u=i.querySelector(o.currency);u&&(u.innerHTML=m[S])}}async getHotelStartingPriceData(t){let s=h+"startingfrom"+p(t),n=await(await fetch(s)).json();return n.error||!n.data?null:n.data}hidePricingContainer(t){t&&(t.style.display="none")}};window.Webflow||(window.Webflow=[]);window.loadFromServer=()=>{window.Webflow.push(async()=>{let a=document.querySelector(o.startingPriceList);a&&await new d(a).getHotelStartingPrice()})};window.loadFromServer();})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@influence-society-web/deshotelsetdesiles",
3
- "version": "4.2.4",
3
+ "version": "4.2.6",
4
4
  "description": "An Influence Society site",
5
5
  "homepage": "https://github.com/finsweet/client-influence-society#readme",
6
6
  "license": "ISC",