PageSourceSearch

https://www.elite.se/dist/client/assets/odp-tracking-CjWsxBsp.js

js elite.se collected 2026-10-02 03:45:21 UTC 5,420 bytes, 1 lines download raw bytes

1import{b as e}from"./dateFormatting-DCO0V6lp.js";import{i as t,r as n}from"./cookieHelpers-CvxkkiBo.js";var r=e=>Object.entries(e).reduce((e,[t,n])=>(n!==null&&n!==``&&n!==void 0&&(e[t]=n),e),{}),i=e=>e.startsWith(`0`)&&!e.startsWith(`+`)?`+46${e.substring(1)}`:e,a=t=>e(t),o=(e,t,n,r,i)=>({product_id:e,order_id:t,quantity:n,...r!==void 0&&{price:r},...i!==void 0&&{subtotal:i}}),s={0:`Pay Later`,1:`Pay Later With Invoice`,2:`Pay Now`},c=(e,t)=>{if(!e.reservationDetails)return null;let n=e.reservationDetails,c=[o(`${e.hotelCode}-${e.roomTypeCode}`,n.reservationId,1),o(`${e.hotelCode}-${e.roomTypeCode}-${n.packageCode?n.packageCode:n.rateCode}`,n.reservationId,1,...e.isPayedWithPoints?[]:[n.prices?.roomAfterTax??0,n.prices?.roomAfterTax??0]),...n.packageCode?[o(`${e.hotelCode}-${n.packageCode.slice(1)}`,n.reservationId,1)]:[],...n.addOns?.map(e=>o(e.rph?e.rph.toString():``,n.reservationId,e.quantity,e.addonAfterTax,parseFloat((e.addonAfterTax*e.quantity).toFixed(2))))??[]],l=t&&e.customerDetails?r({phone:e.customerDetails.phoneNumber?i(e.customerDetails.phoneNumber):null,first_name:e.customerDetails.firstName,last_name:e.customerDetails.lastName,name:`${e.customerDetails.firstName} ${e.customerDetails.lastName}`,email:e.customerDetails.emailAddress}):{};return{order_id:n.reservationId,hotel_code:e.hotelCode,room_type_code:`${e.hotelCode}-${e.roomTypeCode}`,rate_code:`${e.hotelCode}-${e.roomTypeCode}-${n.packageCode?n.packageCode:n.rateCode}`,rate_name:n.rateName,payment_method:e.isPayedWithPoints?s[2]:s[n.paymentMethod]||`Unknown`,currency_code:e.currencyCode??``,paid_with_points:e.isPayedWithPoints,number_of_nights:n.numberOfNights,number_of_guests:n.numberOfGuests,number_of_children:n.numberOfChildren,adults:n.adults,children_ages:n.childrenAges?n.childrenAges.join(`, `):``,check_in_date:a(n.checkInDate),check_out_date:a(n.checkOutDate),...t&&l,...c.length>0&&{items:c},...e.isPayedWithPoints?{points_spend:n.prices?.totalAfterTax}:{tax:0,subtotal:n.prices?.totalAfterTax,total:n.prices?.totalAfterTax}}},l=(e,t)=>{let n=[o(`${e.availabilityTimeSlot.locationId.toString()}-${e.availabilityTimeSlot.serviceId.toString()}`,e.book4TimeId,e.price.quantity,e.price.unitPrice,e.price.totalPrice)],s=t?r({phone:e.userDetails.phone?i(e.userDetails.phone):null,first_name:e.userDetails.firstName,last_name:e.userDetails.lastName,name:`${e.userDetails.firstName} ${e.userDetails.lastName}`,email:e.userDetails.email}):{};return{order_id:e.book4TimeId,spa_name:e.name.spaName,currency_code:e.price.currency,check_in_date:a(e.availabilityTimeSlot.date),check_out_date:a(e.availabilityTimeSlot.date),adults:e.price.quantity,subtotal:e.price.totalPrice,total:e.price.totalPrice,items:n,...t&&s}},u=function(e){return e.Hotel=`Hotel`,e.Room=`Room`,e.Rate=`Rate`,e.Package=`Package`,e.PackageRate=`Package Rate`,e.Addon=`Addon`,e.SpaTreatment=`Spa Treatment`,e.SpaActivity=`Spa Activity`,e}({}),d=function(e){return e[e.HotelReservation=0]=`HotelReservation`,e[e.SpaReservation=1]=`SpaReservation`,e}({}),f=(e,n,i)=>{let{cookieStatisticsConsent:a,currentCustomer:o,productData:s,customProperties:c}=i||{};(a===void 0?t():a)&&n&&v(`product`,{action:e,product_id:n,...o&&o.emailAddress&&{email:o.emailAddress},...s?r(s):{},...c?r(c):{}})},p=(e,n,i,a)=>{let o=a===void 0?t():a;Array.isArray(n)||(n=[n]),n.forEach(t=>{let n;if(i===d.HotelReservation)n=c(t,o);else if(i===d.SpaReservation)n=l(t,o);else{console.error(`Unsupported order type:`,i);return}if(!n){console.error(`Order data could not be generated`);return}v(`order`,{action:e,order:{...r(n)}})})},m=(e,n)=>{(n===void 0?t():n)&&(v(`account`,{action:e}),e===`logout`&&window.zaius?.anonymize())},h=(e,a)=>{let{login:o,cookieStatisticsConsent:s}=a||{},c=s===void 0?t():s,l=n();if(c){let t={email:e.email,loyalty_member_id:e.loyaltyMemberId},n={first_name:e.firstName,last_name:e.lastName,...r({phone:e.phoneNumber?i(e.phoneNumber):void 0,country:e.country,city:e.city,street1:e.address,zip:e.postalCode,language:e.language,company_code:e.companyCode,available_points:e.availablePoints,tier_nights:e.tierNights,loyalt_level_name:e.loyaltyLevelName,dob_day:e.birthDate?Number(e.birthDate.split(`-`)[2]):void 0,dob_month:e.birthDate?Number(e.birthDate.split(`-`)[1]):void 0,dob_year:e.birthDate?Number(e.birthDate.split(`-`)[0]):void 0})};o&&window.zaius?.identify({...t}),window.zaius?.customer(t,n),e.phoneNumber&&window.zaius?.consent({consent:l,identifier_field_name:`phone`,identifier_value:i(e.phoneNumber)}),e.email&&window.zaius?.consent({consent:l,identifier_field_name:`email`,identifier_value:e.email})}},g=e=>{(e===void 0?t():e)&&typeof $$epiforms<`u`&&$$epiforms(document).ready(function(){$$epiforms(`.EPiServerForms`).on(`formsNavigationNextStep formsNavigationPrevStep formsSetupCompleted formsReset formsStartSubmitting formsSubmitted formsSubmittedError formsNavigateToStep formsStepValidating`,function(e){let t=e.workingFormInfo.Name;e.type===`formsSetupCompleted`?v(`web_form`,{action:`impression`,form_name:t}):e.type===`formsStepValidating`?e.isValid||v(`web_form`,{action:`submission_validation_failed`,form_name:t}):e.type===`formsSubmitted`&&e.isSuccess&&v(`web_form`,{action:`submission`,form_name:t})})})},_=(e,n,i,a)=>{(i===void 0?t():i)&&v(e,{action:n,...a?r(a):{}})},v=(e,t)=>
1{window.zaius&&window.zaius?.event(e,t)};export{v as a,d as c,o as d,i as f,g as i,u as l,r as m,_ as n,p as o,a as p,h as r,f as s,m as t,s 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.