{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./Components/CompanionsPicker/styles.css?c693","webpack:///./Components/AmountPicker/styles.css?e791","webpack:///external \"Vue\"","webpack:///./Components/ArrivalDeparturePicker/arrivalDeparturePicker.css?d843","webpack:///./Apps/AccommodationDetails/Src/BookingCreateState.ts","webpack:///./Types/FilterSelections.ts","webpack:///./Types/CreateInitialBookingTSVM.ts","webpack:///./Components/ArrivalDeparturePicker/ArrivalDeparturePicker.vue","webpack:///./Components/ArrivalDeparturePicker/Month.vue","webpack:///./Components/ArrivalDeparturePicker/Day.vue","webpack:///./Components/ArrivalDeparturePicker/Day.vue?f99c","webpack:///./Components/ArrivalDeparturePicker/Day.vue?918b","webpack:///./Components/ArrivalDeparturePicker/Translations/VueTranslations.ts","webpack:///./Components/ArrivalDeparturePicker/Month.vue?ceb8","webpack:///./Components/ArrivalDeparturePicker/Month.vue?ad35","webpack:///./Components/ArrivalDeparturePicker/Functions/fetchAvailability.ts","webpack:///./Functions/DateFunctions.ts","webpack:///./Components/ArrivalDeparturePicker/Types/ArrivalDepartureState.ts","webpack:///./Components/ArrivalDeparturePicker/Types/DateEntry.ts","webpack:///./Components/ArrivalDeparturePicker/Types/MonthEntry.ts","webpack:///./Components/ArrivalDeparturePicker/Functions/createData.ts","webpack:///./Components/ArrivalDeparturePicker/Types/AvailabilityContainer.ts","webpack:///./Types/NSCarouselWrapper.ts","webpack:///./Components/ArrivalDeparturePicker/arrivalDeparturePicker.ts","webpack:///./Components/ArrivalDeparturePicker/ArrivalDeparturePicker.vue?6e92","webpack:///./Components/CompanionsPicker/CompanionsPicker.vue","webpack:///./Components/AmountPicker/AmountPicker.vue","webpack:///./Components/AmountPicker/AmountPicker.vue?c29e","webpack:///./Components/AmountPicker/AmountPicker.vue?3681","webpack:///./Components/CompanionsPicker/Translations/VueTranslations.ts","webpack:///./Components/CompanionsPicker/companionsPicker.ts","webpack:///./Components/CompanionsPicker/CompanionsPicker.vue?e681","webpack:///./Functions/Query/AccommodationDetailsQM.ts","webpack:///./Functions/urlFunctions.ts","webpack:///./Apps/AccommodationDetails/Translations/VueTranslations.ts","webpack:///./Apps/AccommodationDetails/Src/AccommodationDetailsApp.ts","webpack:///./Apps/AccommodationDetails/main.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Vue","BookingCreateState","numberOfAdults","numberOfPets","numberOfChildren","numberOfBabies","this","guestBreakdown","class","displayMode","isForAccommodation","isPickStateArrival","isPickStateDeparture","ref","arrivalDeparturePicker_Title_ChooseArrDept","onDayClick","months","month","type","arrivalDateInput","departureDateInput","arrivalDeparturePicker_Label_ChooseDeptToContinue","showClearButton","hasArrivalDate","displayConstrained","resetDate","arrivalDeparturePicker_Btn_ResetDate","hideNoPreferenceButton","noDatePreference","arrivalDeparturePicker_Btn_NoDatePreference","monthName","year","arrivalDeparturePicker_Label_2Char_Monday","arrivalDeparturePicker_Label_2Char_Tuesday","arrivalDeparturePicker_Label_2Char_Wednesday","arrivalDeparturePicker_Label_2Char_Thursday","arrivalDeparturePicker_Label_2Char_Friday","arrivalDeparturePicker_Label_2Char_Saturday","arrivalDeparturePicker_Label_2Char_Sunday","days","day","classes","isSelectedArrival","isSelectedDeparture","isSelected","isValidDeparture","data-date","data-lt","ltDate","props","required","setup","context","arrivalDateLt","departureDateLt","validDepartures","undefined","some","index","render","currentLanguage","globalLanguage","translations","nl","en","de","currentTranslation","components","Day","fetchAvailabilityUrl","fetchAvailability","accommodationId","url","URL","location","href","fetch","toString","method","headers","redirect","response","ok","json","alert","arrivalDeparturePicker_Error_SomethingWentWrong","nrOfDaysStartOnMonday","nrOfDaysStartOnSunday","toXX","val","computeNrOfDaysInPreviousMonth","dayOfWeek","startWeekOnMonday","computeNrOfDaysInNextMonth","monthFormatter","Intl","DateTimeFormat","timeZone","computeNameOfMonth","jsMonth","format","Date","oneDayMs","refDate","getTime","computeLtDate","date","Math","round","abs","computeLtDateFromDate","fromLtDate","valueOf","setDate","getDate","toYYYYMMDD","getFullYear","getMonth","parseDate","str","ArrivalDepartureState","displayDateCurrentFormat","weekday","displayDate","parseToLtDate","todayDate","setHours","today","aval","checkArrival","isAvailable","isValidArrival","entries","ent","createData","startYear","startMonth","endYear","endMonth","Array","doNextMonth","createDaysForMonth","firstDayDate","lastDayDate","daysInPrevMonth","getDay","prevDate","createAndFillDataEntry","daysInNextMonth","nextDate","isPrevious","isNext","entry","updateForAvailability","nsCarouselWrapper","nsCarousel","nsArrivalDeparturePickerOptions","track","forward","back","slide","trackEndClass","trackStartClass","invertTrackStartEnd","Month","readOnly","Boolean","default","arrivalDate","String","departureDate","defaultDate","numberOfMonths","Number","shouldDetectBecameVisible","becameVisible","displaySingle","emits","selectionConfirmed","root","propsArrivalDate","propsDepartureDate","availability","hasSelection","emit","arrivalDateString","departureDateString","set","pickState","ReadOnly","Departure","ResetArrival","Arrival","isFirstBecameVisible","scrollToMonth","arrivalMonthSelector","pos","defaultScrollContainer","getElementsByClassName","offsetLeft","scrollLeft","clientLeft","scrollTo","top","left","behavior","onBecameVisible","selectedArrivalDateEl","document","querySelector","closest","newv","oldv","now","end","setMonth","event","target","HTMLElement","classList","contains","newDate","getAttribute","parseInt","newValue","oldValue","avEntry","find","vd","maxDays","immediate","hideChrome","companionsPicker_Title_ChooseCompany","model","label","companionsPicker_Label_NumberOfPersons","max","maxGuests","min","companionsPicker_Label_NumberOfBabies","sub-label","companionsPicker_Title_Between_0_2_years","maxPets","companionsPicker_Label_NumberOfPets","forceNoBtnType","onConfirm","customButtonText","subLabel","onSubtract","modelValue","onAdd","getNewValue","delta","newVal","mv","__scopeId","AmountPicker","companionsPicker_Button_CustomButton","guestsConfirmed","e","definitions","numberOfPersons","tryGetNumber","def","isNaN","setQueryDetailsFromProps","getUrlFromData","source","ignoreDates","join","tryGetReturnUrl","existingQuery","URLSearchParams","search","toLowerCase","has","calendarCssValues","gridGapWidth","paddingHorizontal","singleCalendarWidth","template","ArrivalDeparturePicker","CompanionsPicker","priceDetailMessage","reviewCount","reviewTotalScore","priceIndicationEndpoint","initializeBookingUrl","updatePriceInfoUrl","errorMessage","hasError","message","title","hideError","showCalendarPicker","showCompanionPicker","showPriceDetailsMessage","htmlElementExpandedCalendarContainer","setCalendarVisibility","flag","contentBlockWidth","getElementById","offsetWidth","style","width","hideAllPickers","setCompanionVisibility","bookingData","returnUrl","searchPageUrl","latestPrice","hasPrice","currentBookingState","Initial","isFetchingPriceUpdate","addEventListener","pe","persisted","Created","Creating","showLoader","clearPriceAndDates","refreshPage","queryParams","append","newHref","pathname","indexOf","updatePricing","body","JSON","stringify","priceResult","notAvailable","displayPrice","updatePricingErrorTitle","updatePricingErrorMessage","initializeBooking","bookingResult","isCreated","redirectUrl","Error","clearAndReloadAvailability","errorTitle","onDatesSelected","then","onGuestsConfirmed","deep","flush","showPriceIndicationOption","onGoToPriceIndication","searchParams","open","id","dataset","app","mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C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AEHhB,sBACAE,wBACAH,WACAD,cACAH,cACAlB,eACAI,YACA6B,cACAzS,YAEAwT,oBACAjB,aAGA1B,qBACAC,sBACAG,wBACAQ,yBACAD,iBACAT,0BAGAvS,qBAGAuV,kBACAE,oBAGA/N,cAGA8K,uCAEAoD,4BACAC,2BClcNG,GAAK,2BACLC,GAAWlJ,SAASC,cAAcgJ,IAAoBC,QAItDC,GAAM,uBAAU,GAAD,kBAAWD,KAChCC,GAAIC,MAAMH,K","file":"js/app.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/VueApps/_Dist/AccommodationDetails/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"efb4\",\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./styles.css?vue&type=style&index=0&lang=css\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./styles.css?vue&type=style&index=0&id=3925f3bc&scoped=true&lang=css\"","module.exports = Vue;","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!./arrivalDeparturePicker.css?vue&type=style&index=0&lang=css\"","export enum BookingCreateState {\r\n\r\n Initial = 0,\r\n Creating,\r\n Created,\r\n Error\r\n}\r\n","export class FilterSelectionDate {\r\n\r\n arrival?: string;\r\n departure?: string;\r\n default?: string;\r\n\r\n}\r\n\r\n\r\n/*\r\n * \r\n * NL selectecetern> \r\n * selection[0] = {name: \"NL\", \"amenitytId: 12\", value: 4 };\r\n * Heel nederland?\r\n * \r\n * \r\n */\r\n\r\nexport class FilterSelectionLocation {\r\n\r\n selection = new Array();\r\n\r\n customName?: string;\r\n\r\n getSelectionName() {\r\n\r\n // selection[0].name\r\n // or if multiplee items return string.join (...)\r\n //or if custom name => return custom name\r\n }\r\n\r\n hasValue(countNoPreference = true): boolean {\r\n // returns true if there is 'any' selection. note that\r\n // this will also unclide the no preference.\r\n\r\n if (countNoPreference) {\r\n return !!this.selection.length;\r\n } else {\r\n\r\n if (this.selection.length) {\r\n\r\n if (this.selection.length == 1) {\r\n\r\n if (this.selection[0].countryNoPreference) {\r\n\r\n // no preference means no value\r\n return false;\r\n }\r\n }\r\n\r\n // either 1 with not a no-country-preference,\r\n // or more than 1\r\n return true; \r\n }\r\n\r\n return false;\r\n }\r\n }\r\n}\r\n\r\nexport class FilterSelectionLocationEntry {\r\n\r\n countryName?: string;\r\n countryValueId?: number;\r\n countryNoPreference!: boolean;\r\n regionName?: string;\r\n regionValueId?: number;\r\n regionNoPreference!: boolean;\r\n cityName?: string;\r\n cityValueId?: number;\r\n cityNoPreference!: boolean;\r\n\r\n /**\r\n * has selected at least a country\r\n */\r\n hasSelection(): boolean {\r\n\r\n return !!this.countryValueId;\r\n }\r\n\r\n getAsFormValue(): string | false {\r\n\r\n if (this.countryValueId) {\r\n let val = `${this.countryValueId}`;\r\n\r\n if (this.regionValueId) {\r\n\r\n val += `,${this.regionValueId}`;\r\n } else if (this.cityValueId) {\r\n\r\n val += `,-1`;\r\n }\r\n\r\n if (this.cityValueId) {\r\n\r\n val += `,${this.cityValueId}`;\r\n }\r\n return val;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n\r\n}\r\n\r\nexport class FilterSelectionCompanions {\r\n\r\n numberOfAdults = 2;\r\n numberOfPets = 0;\r\n numberOfChildren = 0;\r\n numberOfBabies = 0;\r\n\r\n}","import { FilterSelectionCompanions } from '@Types/FilterSelections';\r\n\r\n// this class is a typescript equivalent of CreateInitialBookingVM\r\nexport default class CreateInitialBooking {\r\n\r\n arrivalDate?: string;\r\n departureDate?: string;\r\n accommodationId?: string;\r\n\r\n searchPageUrl?: string;\r\n\r\n //todo: determine how we want to process dynamic \"nr of persons\"\r\n // where each channel may require a different breakdown.\r\n // e.g. numberOfAdults + nr of babies (which are defined as < 2, or < 1?)\r\n // etc etc.\r\n\r\n //todo: determine how we want to process dynamic \"nr of persons\"\r\n // where each channel may require a different breakdown.\r\n // e.g. numbrOfAdults + nr of babies (which are defined as < 2, or < 1?)\r\n // etc etc.\r\n guestBreakdown: FilterSelectionCompanions;\r\n //numberOfAdults?: number;\r\n //numberOfChildren?: number;\r\n //numberOfBabies?: number;\r\n //numberOfPets?: number;\r\n\r\n constructor() {\r\n\r\n this.guestBreakdown = new FilterSelectionCompanions();\r\n }\r\n\r\n}","\r\n\r\n\r\n\r\n\r\n\r\n\r\n","\r\n\r\n","\r\n\r\n","\r\n\r\n import { defineComponent, ref, Ref, computed, PropType, ComputedRef, inject } from 'vue';\r\n import { DateEntry, } from '@Components/ArrivalDeparturePicker/Types/DateEntry';\r\n\r\n export default defineComponent({\r\n\r\n props: {\r\n\r\n day: {\r\n type: Object as PropType,\r\n required: true\r\n }\r\n },\r\n\r\n setup(props, context) {\r\n\r\n\r\n\r\n const arrivalDateLt = inject('arrivalDateLt') as ComputedRef;\r\n const departureDateLt = inject('departureDateLt') as ComputedRef;;\r\n\r\n // we dont need availability, we provide the valid dates..\r\n // const availability = inject('availability');// as reactive | undefined;\r\n const validDepartures = inject('validDepartures') as ComputedRef>;\r\n\r\n\r\n // if i am the arrival date, i should be selected\r\n const isSelectedArrival = computed(() => arrivalDateLt.value !== undefined && arrivalDateLt.value == props.day.ltDate);\r\n\r\n\r\n // if i am the departure date, i should be selected\r\n const isSelectedDeparture = computed(() => departureDateLt.value !== undefined && departureDateLt.value == props.day.ltDate);\r\n\r\n // if i am between arrival and departure,\r\n // i should be selected\r\n const isSelected = computed(() => {\r\n\r\n if (isSelectedArrival.value || isSelectedDeparture.value) return true;\r\n\r\n // todo : determine if there is a selection, and this value is between it\r\n if (arrivalDateLt.value !== undefined && departureDateLt.value !== undefined) {\r\n\r\n return props.day.ltDate > arrivalDateLt.value && props.day.ltDate < departureDateLt.value;\r\n }\r\n\r\n return false;\r\n\r\n });\r\n\r\n // if there is an arrival date, but no departure date,\r\n // i should show if i am valid as a departure date\r\n const isValidDeparture = computed(() => {\r\n\r\n return validDepartures.value.some((value, index) => index === 0 ? false : value == props.day.ltDate);\r\n\r\n });\r\n\r\n\r\n return {\r\n isSelectedArrival,\r\n isSelectedDeparture,\r\n isSelected,\r\n isValidDeparture\r\n };\r\n }\r\n });\r\n\r\n\r\n\r\n","import { render } from \"./Day.vue?vue&type=template&id=2efb8e56\"\nimport script from \"./Day.vue?vue&type=script&lang=ts\"\nexport * from \"./Day.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","declare let globalLanguage: string;\r\nlet currentLanguage = globalLanguage || \"nl\";\r\n\r\nconst translations = {\r\n\r\n nl: {\"arrivalDeparturePicker_Btn_NoDatePreference\":\"Geen voorkeur\",\"arrivalDeparturePicker_Btn_ResetDate\":\"Wis datum\",\"arrivalDeparturePicker_Error_SomethingWentWrong\":\"Something went wrong while getting availability, please refresh the page\",\"arrivalDeparturePicker_Label_2Char_Friday\":\"Vr\",\"arrivalDeparturePicker_Label_2Char_Monday\":\"Ma\",\"arrivalDeparturePicker_Label_2Char_Saturday\":\"Za\",\"arrivalDeparturePicker_Label_2Char_Sunday\":\"Zo\",\"arrivalDeparturePicker_Label_2Char_Thursday\":\"Do\",\"arrivalDeparturePicker_Label_2Char_Tuesday\":\"Di\",\"arrivalDeparturePicker_Label_2Char_Wednesday\":\"Wo\",\"arrivalDeparturePicker_Label_ChooseDeptToContinue\":\"Selecteer een vertrekdatum om door te gaan\",\"arrivalDeparturePicker_Title_ChooseArrDept\":\"Kies aankomst en vertrek\"},\r\n en: {\"arrivalDeparturePicker_Btn_NoDatePreference\":\"No preference\",\"arrivalDeparturePicker_Btn_ResetDate\":\"Reset date\",\"arrivalDeparturePicker_Error_SomethingWentWrong\":\"Something went wrong while getting the availability data, please refresh the page\",\"arrivalDeparturePicker_Label_2Char_Friday\":\"Fr\",\"arrivalDeparturePicker_Label_2Char_Monday\":\"Mo\",\"arrivalDeparturePicker_Label_2Char_Saturday\":\"Sa\",\"arrivalDeparturePicker_Label_2Char_Sunday\":\"Su\",\"arrivalDeparturePicker_Label_2Char_Thursday\":\"Th\",\"arrivalDeparturePicker_Label_2Char_Tuesday\":\"Tu\",\"arrivalDeparturePicker_Label_2Char_Wednesday\":\"We\",\"arrivalDeparturePicker_Label_ChooseDeptToContinue\":\"Select a departure date to continue\",\"arrivalDeparturePicker_Title_ChooseArrDept\":\"Choose arrival and departure date\"},\r\n de: {\"arrivalDeparturePicker_Btn_NoDatePreference\":\"Keine Pr\\u00E4ferenz\",\"arrivalDeparturePicker_Btn_ResetDate\":\"Datum l\\u00F6schen\",\"arrivalDeparturePicker_Error_SomethingWentWrong\":\"Etwas ist schief gelaufen, w\\u00E4hrend Sie auf die Verf\\u00FCgbarkeit gewartet haben, bitte aktualisieren Sie die Seite\",\"arrivalDeparturePicker_Label_2Char_Friday\":\"Fr\",\"arrivalDeparturePicker_Label_2Char_Monday\":\"Mo\",\"arrivalDeparturePicker_Label_2Char_Saturday\":\"Sa\",\"arrivalDeparturePicker_Label_2Char_Sunday\":\"So\",\"arrivalDeparturePicker_Label_2Char_Thursday\":\"Do\",\"arrivalDeparturePicker_Label_2Char_Tuesday\":\"Di\",\"arrivalDeparturePicker_Label_2Char_Wednesday\":\"Mi\",\"arrivalDeparturePicker_Label_ChooseDeptToContinue\":\"Bitte w\\u00E4hlen Sie ein Abreisedatum aus, um fortzufahren\",\"arrivalDeparturePicker_Title_ChooseArrDept\":\"W\\u00E4hlen Sie An- und Abreise\"}\r\n};\r\n\r\ninterface appTranslations {\r\n\r\n arrivalDeparturePicker_Btn_NoDatePreference: string; \r\n arrivalDeparturePicker_Btn_ResetDate: string; \r\n arrivalDeparturePicker_Error_SomethingWentWrong: string; \r\n arrivalDeparturePicker_Label_2Char_Friday: string; \r\n arrivalDeparturePicker_Label_2Char_Monday: string; \r\n arrivalDeparturePicker_Label_2Char_Saturday: string; \r\n arrivalDeparturePicker_Label_2Char_Sunday: string; \r\n arrivalDeparturePicker_Label_2Char_Thursday: string; \r\n arrivalDeparturePicker_Label_2Char_Tuesday: string; \r\n arrivalDeparturePicker_Label_2Char_Wednesday: string; \r\n arrivalDeparturePicker_Label_ChooseDeptToContinue: string; \r\n arrivalDeparturePicker_Title_ChooseArrDept: string; \r\n\r\n}\r\n\r\n//@ts-ignore\r\nlet currentTranslation = (currentLanguage in translations) ? translations[currentLanguage] : translations[\"nl\"];\r\n\r\nexport default currentTranslation as appTranslations;","\r\n\r\n import { defineComponent, ref, reactive, PropType, watch } from 'vue';\r\n import Day from '@Components/ArrivalDeparturePicker/Day.vue';\r\n\r\n import { MonthEntry } from './Types/MonthEntry';\r\n\r\n import appTranslations from \"@Components/ArrivalDeparturePicker/Translations/VueTranslations\"\r\n\r\n export default defineComponent({\r\n\r\n components: { Day },\r\n\r\n props: {\r\n\r\n\r\n month: {\r\n type: Object as PropType,\r\n required: true\r\n }\r\n\r\n },\r\n\r\n\r\n setup(props, context) {\r\n\r\n return {\r\n arrivalDeparturePicker_Label_2Char_Friday: appTranslations.arrivalDeparturePicker_Label_2Char_Friday,\r\n arrivalDeparturePicker_Label_2Char_Monday: appTranslations.arrivalDeparturePicker_Label_2Char_Monday,\r\n arrivalDeparturePicker_Label_2Char_Saturday: appTranslations.arrivalDeparturePicker_Label_2Char_Saturday,\r\n arrivalDeparturePicker_Label_2Char_Sunday: appTranslations.arrivalDeparturePicker_Label_2Char_Sunday,\r\n arrivalDeparturePicker_Label_2Char_Thursday: appTranslations.arrivalDeparturePicker_Label_2Char_Thursday,\r\n arrivalDeparturePicker_Label_2Char_Tuesday: appTranslations.arrivalDeparturePicker_Label_2Char_Tuesday,\r\n arrivalDeparturePicker_Label_2Char_Wednesday: appTranslations.arrivalDeparturePicker_Label_2Char_Wednesday\r\n };\r\n }\r\n\r\n });\r\n\r\n\r\n\r\n","import { render } from \"./Month.vue?vue&type=template&id=db1f5302\"\nimport script from \"./Month.vue?vue&type=script&lang=ts\"\nexport * from \"./Month.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","import AvailabilityFetchVM from '../Types/AvailabilityFetchTSVM';\r\nimport appTranslations from \"@Components/ArrivalDeparturePicker/Translations/VueTranslations\"\r\n\r\nconst fetchAvailabilityUrl = \"/Fetch/FetchAvailability\";\r\n\r\nexport default async function fetchAvailability(accommodationId: number) {\r\n\r\n \r\n const url = new URL(fetchAvailabilityUrl + `?accommodationId=${accommodationId}`, window.location.href);\r\n\r\n const response = await fetch(url.toString(), {\r\n\r\n method: \"Get\",\r\n headers: { 'Content-Type': 'application/json' },\r\n redirect: \"error\"\r\n\r\n });\r\n\r\n if (response.ok) {\r\n\r\n return await response.json() as AvailabilityFetchVM;\r\n\r\n } else {\r\n\r\n alert(appTranslations.arrivalDeparturePicker_Error_SomethingWentWrong);\r\n\r\n }\r\n\r\n}","\r\n\r\n\r\nconst nrOfDaysStartOnMonday = [6, 0, 1, 2, 3, 4, 5];\r\nconst nrOfDaysStartOnSunday = [0, 1, 2, 3, 4, 5, 6];\r\n\r\n\r\n\r\n/**\r\n * function to pad a value with a leading 0 if required\r\n * @param val\r\n */\r\nexport function toXX(val: number) {\r\n\r\n // faster then pad? :val.toString().padStart(2,'0')\r\n\r\n if (val < 10) {\r\n return \"0\" + val;\r\n\r\n }\r\n else return \"\" + val;\r\n}\r\n\r\n\r\n/**\r\n * given the day of week, how many days in that week belong to the previous month, if the given date is the first day of the month? (defaults to starting the week on monday, if set to false, starts on sunday)\r\n * @param dayOfWeek\r\n * @param startWeekOnMonday\r\n */\r\nexport function computeNrOfDaysInPreviousMonth(dayOfWeek: number, startWeekOnMonday = true) {\r\n\r\n return startWeekOnMonday ? nrOfDaysStartOnMonday[dayOfWeek] : nrOfDaysStartOnSunday[dayOfWeek];\r\n\r\n}\r\n\r\n/**\r\n * given the day of week, how many days in that week belong to the next month, if that is the last day of the week? (defaults to starting the week on monday, if set to false, starts on sunday)\r\n * @param dayOfWeek\r\n * @param startWeekOnMonday\r\n */\r\nexport function computeNrOfDaysInNextMonth(dayOfWeek: number, startWeekOnMonday = true) {\r\n\r\n return 6 - (startWeekOnMonday ? nrOfDaysStartOnMonday[dayOfWeek] : nrOfDaysStartOnSunday[dayOfWeek]);\r\n\r\n}\r\n\r\n\r\n\r\n\r\nconst monthFormatter = new Intl.DateTimeFormat(undefined, { month: 'long', timeZone: 'UTC' });\r\n\r\nexport function computeNameOfMonth(jsMonth: number) {\r\n\r\n return monthFormatter.format(new Date(`2017-${toXX(jsMonth + 1)}-01T00:00:00+00:00`));\r\n\r\n}\r\n\r\n// this seems to be off by one depending on locale?\r\n//export function computeNameOfMonthWithDate(date: Date) {\r\n\r\n// return monthFormatter.format(date);\r\n\r\n//}\r\n\r\nconst oneDayMs = 24 * 60 * 60 * 1000; // hours * minutes * seconds * milliseconds\r\nconst refDate = new Date(2020, 0, 1).getTime();\r\n\r\n/**\r\n * returns the LtDate representation of a given date time\r\n * @param day\r\n * @param jsMonth\r\n * @param year\r\n * @param ltDateRefYear\r\n */\r\nexport function computeLtDate(day: number, jsMonth: number, year: number): number {\r\n\r\n\r\n const date = new Date(year, jsMonth, day).getTime();\r\n // const refDate = new Date(ltDateRefYear, 0, 1).getTime();\r\n\r\n return Math.round(Math.abs((date - refDate) / oneDayMs));\r\n\r\n}\r\n\r\n/**\r\n * returns the LtDate representation of a given date time\r\n * @param day\r\n * @param month\r\n * @param year\r\n * @param ltDateRefYear\r\n */\r\nexport function computeLtDateFromDate(date: Date | undefined): number | undefined {\r\n\r\n if (!date) return undefined;\r\n\r\n return Math.round(Math.abs((date.getTime() - refDate) / oneDayMs));\r\n\r\n}\r\n\r\n/**\r\n * Converts an ltdate back to a date.\r\n * @param val\r\n */\r\nexport function fromLtDate(val: number | undefined): Date| undefined {\r\n\r\n if (!val) return undefined;\r\n\r\n const date = new Date(refDate.valueOf());\r\n date.setDate(date.getDate() + val);\r\n\r\n return date;\r\n\r\n}\r\n\r\n\r\n/**\r\n * will format a date as yyyy-mm-dd, with leading zeros if required.\r\n * to be used in an input type=date or querystring.\r\n * @param date\r\n */\r\nexport function toYYYYMMDD(date: Date | undefined) {\r\n\r\n if (date) {\r\n\r\n return `${date.getFullYear()}-${toXX(date.getMonth() + 1)}-${toXX(date.getDate())}`;\r\n\r\n }\r\n else return \"\";\r\n}\r\n\r\n/**\r\n * parse date that will return undefined if the value is not a string. value\r\n * should be in a valid string format for the new Date constructor.\r\n * @param str\r\n */\r\nexport function parseDate(str: string | undefined | null): Date | undefined {\r\n\r\n if (!str) return undefined;\r\n\r\n return new Date(str);\r\n\r\n}\r\n\r\nconst displayDateCurrentFormat = new Intl.DateTimeFormat([], { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' });\r\nconst displayShortDateCurrentFormat = new Intl.DateTimeFormat([], { weekday: 'short', month: 'short', day: 'numeric' });\r\nconst displayShortDateNoWeekdayCurrentFormat = new Intl.DateTimeFormat([], { month: 'short', day: 'numeric' });\r\nconst displayMonthNameAndYearFormat = new Intl.DateTimeFormat([], { month: 'long', year: 'numeric' });\r\n\r\n\r\n/**\r\n * converts a date to a long display date, using Intl functions. If the date is a string, then it is first parsed\r\n * to a new date. if undefined, returns empty string.\r\n * \r\n * @param date\r\n */\r\nexport function displayDate(date: string | Date | undefined): string {\r\n\r\n if (!date) {\r\n return \"\";\r\n }\r\n\r\n return displayDateCurrentFormat.format(date instanceof Date ? date : new Date(date));\r\n}\r\n\r\n/**\r\n * converts a date to a short display date, using Intl functions. If the date is a string, then it is first parsed\r\n * to a new date. if undefined, returns empty string.\r\n * \r\n * @param date\r\n */\r\nexport function displayShortDate(date: string | Date | undefined): string {\r\n\r\n if (!date) {\r\n return \"\";\r\n }\r\n\r\n return displayShortDateCurrentFormat.format(date instanceof Date ? date : new Date(date));\r\n}\r\n\r\n/**\r\n * converts a date to a short display date, using Intl functions. If the date is a string, then it is first parsed\r\n * to a new date. if undefined, returns empty string.\r\n * \r\n * @param date\r\n */\r\nexport function displayShortDateNoWeekday(date: string | Date | undefined): string {\r\n\r\n if (!date) {\r\n return \"\";\r\n }\r\n\r\n return displayShortDateNoWeekdayCurrentFormat.format(date instanceof Date ? date : new Date(date));\r\n}\r\n\r\n/**\r\n * converts a date to a short display date, using Intl functions. If the date is a string, then it is first parsed\r\n * to a new date. if undefined, returns empty string.\r\n * \r\n * @param date\r\n */\r\nexport function displayMonthAndYear(date: string | Date | undefined): string {\r\n\r\n if (!date) {\r\n return \"\";\r\n }\r\n\r\n return displayMonthNameAndYearFormat.format(date instanceof Date ? date : new Date(date));\r\n}\r\n\r\n\r\n\r\n/**\r\n * Converts a date format (e.g. yyyy-MM-dd) to an lt date value.\r\n * \r\n * @param str\r\n */\r\nexport function parseToLtDate(str: string | undefined | null): number | undefined {\r\n if (!str) return undefined;\r\n\r\n return computeLtDateFromDate(parseDate(str));\r\n\r\n\r\n}\r\n\r\n","\r\nexport enum ArrivalDepartureState {\r\n\r\n ReadOnly = 0,\r\n Arrival = 1,\r\n Departure = 2,\r\n ResetArrival = 3\r\n\r\n}\r\n\r\nexport default ArrivalDepartureState;","import AvailabilityFetchVM from './AvailabilityFetchTSVM';\r\nimport * as dateFunctions from '@Functions/DateFunctions';\r\n\r\nconst todayDate = new Date();\r\ntodayDate.setHours(0, 0, 0);\r\nconst today = dateFunctions.computeLtDateFromDate(todayDate) as number;\r\n\r\nexport class DateEntry {\r\n\r\n day: number;\r\n month: number;\r\n year: number;\r\n classes: Array;\r\n key: string;\r\n ltDate: number;\r\n\r\n constructor(day: number, month: number, year: number) {\r\n\r\n this.day = day;\r\n this.month = month;\r\n this.year = year;\r\n this.key = `${year}-${(month+1)}-${day}`;\r\n this.classes = [];\r\n\r\n this.ltDate = dateFunctions.computeLtDate(this.day, month, year);\r\n }\r\n\r\n\r\n /**\r\n * set data based on availability. should be set only once per run.\r\n * @param aval\r\n */\r\n public updateForAvailability(aval: AvailabilityFetchVM | undefined) {\r\n\r\n\r\n if (aval) {\r\n\r\n const checkArrival = true;\r\n let isAvailable = false;\r\n let isValidArrival = false;\r\n\r\n for (const ent of aval.entries) {\r\n\r\n if (!isAvailable && (this.ltDate >= ent[0] && this.ltDate <= ent[ent.length - 1])) {\r\n\r\n // if the current date is inside this entry, then the accommodation is available.\r\n isAvailable = true;\r\n }\r\n\r\n if (checkArrival && !isValidArrival && this.ltDate === ent[0]) {\r\n\r\n isValidArrival = true;\r\n }\r\n\r\n // if we have set both isAvailable, and isValidArrival, and\r\n // we dont need to check valid departure, then we can stop.\r\n if (checkArrival && isAvailable && isValidArrival) break;\r\n\r\n\r\n }\r\n\r\n if (isAvailable) {\r\n // entry.classes.push(\"-v\");\r\n } else {\r\n this.classes.push(\"-x\");\r\n }\r\n\r\n if (isValidArrival) {\r\n this.classes.push(\"-a\");\r\n }\r\n\r\n\r\n } else {\r\n\r\n // for non accommodation, so what we do here is only check using \"today\"\r\n // and perhaps a cap for max duration (?)\r\n if (this.ltDate <= (today + 2)) { // plus 2 -- beause in the accommodation calendar we use addDays 3 (inclusive) to fetch availability\r\n this.classes.push(\"-x\");\r\n } else {\r\n this.classes.push(\"-a\");\r\n }\r\n }\r\n };\r\n}\r\n\r\n\r\n\r\n","import { DateEntry } from './DateEntry';\r\nimport { computeNameOfMonth } from '@Functions/DateFunctions'\r\n\r\nexport class MonthEntry {\r\n\r\n \r\n month: number;\r\n year: number;\r\n key: string;\r\n days!: Array;\r\n monthName: string;\r\n\r\n constructor(month: number, year: number) {\r\n\r\n \r\n this.month = month;\r\n this.year = year;\r\n this.key = `${year}-${month}`;\r\n this.monthName = computeNameOfMonth(this.month);\r\n }\r\n\r\n \r\n}\r\n","/* eslint-disable @typescript-eslint/no-use-before-define */\r\n\r\nimport { DateEntry } from '../Types/DateEntry';\r\nimport { MonthEntry } from '../Types/MonthEntry';\r\nimport * as dateFunctions from '@Functions/DateFunctions';\r\nimport AvailabilityFetchVM from '../Types/AvailabilityFetchTSVM';\r\n\r\n\r\n/**\r\n * Creates all basic months/days for the given range.\r\n * \r\n * @param startYear\r\n * @param startMonth\r\n * @param endYear\r\n * @param endMonth\r\n */\r\nexport default function createData(startYear: number, startMonth: number, endYear: number, endMonth: number, aval: AvailabilityFetchVM | undefined): Array {\r\n\r\n\r\n const result = new Array();\r\n\r\n // starting with startYear, until endMonth, create months\r\n\r\n let doNextMonth = true;\r\n let index = 0;\r\n\r\n while (doNextMonth) {\r\n\r\n index++;\r\n if (index > 10 * 12) break; // hard cap for 10 years currently.\r\n\r\n const month = new MonthEntry(startMonth, startYear);\r\n createDaysForMonth(month, aval); //eslint-disable-line\r\n\r\n\r\n result.push(month);\r\n\r\n startMonth++;\r\n if (startMonth > 11) {\r\n startMonth = 0;\r\n startYear++;\r\n }\r\n\r\n if (startYear === endYear && startMonth > endMonth) {\r\n\r\n doNextMonth = false;\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n return result;\r\n}\r\n\r\n\r\nfunction createDaysForMonth(month: MonthEntry, aval: AvailabilityFetchVM | undefined) {\r\n\r\n\r\n month.days = new Array();\r\n\r\n const firstDayDate = new Date(month.year, month.month, 1);\r\n const lastDayDate = new Date(month.year, month.month + 1, 0);\r\n\r\n\r\n \r\n // add days of previous month if needed\r\n const daysInPrevMonth = dateFunctions.computeNrOfDaysInPreviousMonth(firstDayDate.getDay());\r\n\r\n if (daysInPrevMonth > 0) {\r\n\r\n // determine what the actual dates are:\r\n const prevDate = new Date(firstDayDate.valueOf());\r\n prevDate.setDate(prevDate.getDate() - daysInPrevMonth);\r\n\r\n // foreach day in prev month, add day\r\n for (let i = 0; i < daysInPrevMonth; i++) {\r\n\r\n month.days.push(createAndFillDataEntry(aval, prevDate.getDate() + i, prevDate.getMonth(), prevDate.getFullYear(), true, false)); \r\n }\r\n }\r\n\r\n // add each day of the month\r\n for (let i = 1; i <= lastDayDate.getDate(); i++) {\r\n\r\n month.days.push(createAndFillDataEntry(aval, i, month.month, month.year));\r\n }\r\n\r\n // add days in next month, if any\r\n const daysInNextMonth = dateFunctions.computeNrOfDaysInNextMonth(lastDayDate.getDay());\r\n\r\n if (daysInNextMonth > 0) {\r\n\r\n const nextDate = new Date(lastDayDate.valueOf());\r\n nextDate.setDate(nextDate.getDate() + 1);\r\n\r\n // foreach day in next month, add day\r\n for (let i = 1; i <= daysInNextMonth; i++) {\r\n\r\n month.days.push(createAndFillDataEntry(aval, i, nextDate.getMonth(), nextDate.getFullYear(), false, true));\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\n\r\nfunction createAndFillDataEntry(aval: AvailabilityFetchVM | undefined, day: number, month: number, year: number, isPrevious = false, isNext = false): DateEntry {\r\n\r\n const entry = new DateEntry(day, month, year);\r\n entry.updateForAvailability(aval);\r\n\r\n if (isNext) {\r\n entry.classes.push(\"next\");\r\n }\r\n if (isPrevious) {\r\n entry.classes.push(\"prev\");\r\n }\r\n\r\n return entry;\r\n\r\n}\r\n\r\n","import AvailabilityFetchVM from '@Components/ArrivalDeparturePicker/Types/AvailabilityFetchTSVM';\r\n\r\nexport default class AvailabilityContainer {\r\n\r\n data: AvailabilityFetchVM | undefined;\r\n\r\n \r\n}","// set in index/html view, from json from c#\r\n// currently in home, and search;\r\ndeclare const nsCarousel: {\r\n create(selector: string | HTMLElement, options: object): Array;\r\n determineTrackEnds(options: any, container: HTMLElement, track: HTMLElement, e: any): void;\r\n};\r\nexport interface NSCarouselEntry {\r\n\r\n container: HTMLElement;\r\n track: HTMLElement;\r\n slides: NodeListOf;\r\n options: object;\r\n\r\n}\r\n\r\nexport const nsCarouselWrapper = nsCarousel;\r\n\r\nexport const nsArrivalDeparturePickerOptions = {\r\n\r\n track: \".adp-months-container\",\r\n forward:\".btn-next\",\r\n back: \".btn-prev\",\r\n slide: \".calendar\",\r\n trackEndClass: \"-is-end\",\r\n trackStartClass: \"-is-start\",\r\n invertTrackStartEnd: false \r\n};","import { defineComponent, ref, reactive, computed, provide, watch, nextTick, toRef, unref, onMounted } from 'vue';\r\nimport Month from '@Components/ArrivalDeparturePicker/Month.vue';\r\n\r\nimport SelectionConfirmedEvent from '@Components/ArrivalDeparturePicker/Types/SelectionConfirmedEvent';\r\n\r\nimport fetchAvailability from '@Components/ArrivalDeparturePicker/Functions/fetchAvailability';\r\nimport * as dateFunctions from '@Functions/DateFunctions';\r\nimport ArrivalDepartureState from './Types/ArrivalDepartureState';\r\nimport createData from './Functions/createData';\r\n\r\nimport AvailabilityContainer from './Types/AvailabilityContainer';\r\n\r\nimport { nsCarouselWrapper, nsArrivalDeparturePickerOptions, NSCarouselEntry } from '@Types/NSCarouselWrapper';\r\n\r\nimport appTranslations from \"@Components/ArrivalDeparturePicker/Translations/VueTranslations\"\r\n\r\ninterface DateReactive {\r\n\r\n value: number | undefined;\r\n}\r\n\r\nexport default defineComponent({\r\n\r\n components: { Month },\r\n\r\n props: {\r\n\r\n\r\n readOnly: {\r\n type: Boolean,\r\n required: false,\r\n default: false\r\n },\r\n\r\n arrivalDate: {\r\n type: String,\r\n required: false\r\n },\r\n departureDate: {\r\n type: String,\r\n required: false\r\n },\r\n\r\n defaultDate: {\r\n type: String,\r\n required: false\r\n },\r\n\r\n // add custom validators with regex: \\d{4}-[0123]?\\d-[0123]?\\d\r\n accommodationId: {\r\n\r\n type: String,\r\n required: false\r\n },\r\n\r\n numberOfMonths: {\r\n type: Number,\r\n required: false,\r\n default: 18\r\n },\r\n\r\n\r\n shouldDetectBecameVisible: {\r\n type: Boolean,\r\n required: false,\r\n default: false\r\n },\r\n\r\n becameVisible: {\r\n type: Boolean,\r\n required: false,\r\n },\r\n\r\n hideNoPreferenceButton: {\r\n type: Boolean,\r\n required: false,\r\n default: false\r\n },\r\n\r\n displaySingle:{\r\n type: Boolean,\r\n required: false,\r\n default: false\r\n },\r\n\r\n displayConstrained: {\r\n type: Boolean,\r\n required: false,\r\n default: false\r\n }\r\n\r\n },\r\n\r\n emits: {\r\n\r\n selectionConfirmed: null, // no validation\r\n resetDate: null\r\n },\r\n\r\n async setup(props, context) {\r\n\r\n const root = ref(null);\r\n\r\n const propsArrivalDate = toRef(props, 'arrivalDate');\r\n const propsDepartureDate = toRef(props, 'departureDate');\r\n\r\n const arrivalDate = ref(dateFunctions.parseToLtDate(propsArrivalDate.value));\r\n const departureDate = ref(dateFunctions.parseToLtDate(propsDepartureDate.value));\r\n const defaultDate = ref(dateFunctions.parseToLtDate(props.defaultDate));\r\n\r\n\r\n const availability = reactive(new AvailabilityContainer()); //define here so it can be used on watches etc.\r\n const validDepartures = ref>([]);\r\n\r\n let arrivalCarouselWrapper: null | NSCarouselEntry = null;\r\n\r\n let displayMode = \"display-auto\";\r\n if (props.displaySingle) {\r\n displayMode = \"display-single\";\r\n }\r\n\r\n if (props.displayConstrained) {\r\n displayMode = \"display-contrained\";\r\n }\r\n\r\n onMounted(() => {\r\n\r\n // must be called before any async calls.\r\n // mount our carousel js:\r\n arrivalCarouselWrapper = nsCarouselWrapper.create(root.value as HTMLElement, nsArrivalDeparturePickerOptions)[0];\r\n\r\n });\r\n\r\n // currently we do not watch for outside changes.\r\n // we can by enabling this code,\r\n watch(propsArrivalDate, (n, o) => {\r\n\r\n\r\n arrivalDate.value = dateFunctions.parseToLtDate(n);\r\n });\r\n\r\n watch(propsDepartureDate, (n, o) => {\r\n\r\n departureDate.value = dateFunctions.parseToLtDate(n);\r\n });\r\n\r\n const hasSelection = computed(() => { return !!arrivalDate.value && !!departureDate.value; });\r\n\r\n\r\n // final event to send a new arrival and departure date upwards\r\n const selectionConfirmed = () => {\r\n\r\n context.emit(\"selectionConfirmed\", {\r\n arrivalDate: dateFunctions.fromLtDate(arrivalDate.value),\r\n departureDate: dateFunctions.fromLtDate(departureDate.value),\r\n arrivalDateString: arrivalDateInput.value,\r\n departureDateString: departureDateInput.value\r\n } as SelectionConfirmedEvent);\r\n\r\n };\r\n\r\n // wrapper type to convert to/from formatted string to be used in input type=date\r\n const arrivalDateInput = computed(\r\n {\r\n get: () => { return dateFunctions.toYYYYMMDD(dateFunctions.fromLtDate(arrivalDate.value)); },\r\n set: val => {\r\n arrivalDate.value = dateFunctions.parseToLtDate(val.toString());\r\n }\r\n }\r\n );\r\n\r\n const hasArrivalDate = computed(() => { return !!arrivalDate.value; });\r\n\r\n /**\r\n * we always show in constrained mode to avoid confusion of buttons showing up or not.\r\n * otherwise only show if there is a date selected.\r\n */\r\n const showClearButton = computed(() => {\r\n\r\n if (props.displayConstrained) return true;\r\n else return hasArrivalDate.value;\r\n });\r\n\r\n // wrapper type to convert to/from formatted string to be used in input type=date\r\n const departureDateInput = computed(\r\n {\r\n get: () => { return dateFunctions.toYYYYMMDD(dateFunctions.fromLtDate(departureDate.value)); },\r\n set: val => {\r\n departureDate.value = dateFunctions.parseToLtDate(val.toString());\r\n }\r\n }\r\n );\r\n\r\n\r\n const noDatePreference = () => {\r\n resetDate();\r\n selectionConfirmed();\r\n }\r\n\r\n\r\n\r\n provide('arrivalDateLt', arrivalDate);\r\n provide('departureDateLt', departureDate);\r\n provide('validDepartures', validDepartures);\r\n\r\n\r\n // The current state of the picker in regards to what are we picking \r\n const pickState = computed(() => {\r\n\r\n if (props.readOnly) return ArrivalDepartureState.ReadOnly;\r\n // if (!arrivalDate.value) return ArrivalDepartureState.Arrival;\r\n if (!!arrivalDate.value && !departureDate.value) return ArrivalDepartureState.Departure;\r\n if (hasSelection) return ArrivalDepartureState.ResetArrival;\r\n\r\n // default is always arrival?\r\n return ArrivalDepartureState.Arrival;\r\n });\r\n\r\n const isPickStateArrival = computed(() => pickState.value === ArrivalDepartureState.Arrival || pickState.value === ArrivalDepartureState.ResetArrival);\r\n const isPickStateDeparture = computed(() => pickState.value === ArrivalDepartureState.Departure);\r\n\r\n let isFirstBecameVisible = true;\r\n\r\n const scrollToMonth = (arrivalMonthSelector: HTMLElement) => {\r\n\r\n if (root.value) {\r\n\r\n let pos = 0;\r\n const defaultScrollContainer = root.value.getElementsByClassName(\"adp-months-container\")[0] as HTMLElement;\r\n\r\n pos = (arrivalMonthSelector.offsetLeft - arrivalMonthSelector.scrollLeft + arrivalMonthSelector.clientLeft);\r\n \r\n defaultScrollContainer.scrollTo({\r\n top: 0,\r\n left: pos,\r\n behavior: 'smooth'\r\n }), 100;\r\n\r\n }\r\n };\r\n\r\n const onBecameVisible = async () => {\r\n\r\n\r\n // When calendar becomes visible and arrival date is picked, the calendar scrolls the selected arrival date into view.\r\n \r\n if (root.value) {\r\n\r\n if (arrivalDate.value !== undefined) {\r\n await nextTick();\r\n\r\n // Get the selected arrival date element\r\n const selectedArrivalDateEl = document.querySelector(\".-sa:not(.next)\") as HTMLElement;\r\n\r\n if (selectedArrivalDateEl) {\r\n let arrivalMonthSelector = selectedArrivalDateEl.closest(\".calendar\") as HTMLElement;\r\n\r\n scrollToMonth(arrivalMonthSelector);\r\n\r\n }\r\n // else :we do not scroll at all,.\r\n\r\n }\r\n else if (defaultDate.value !== undefined && isFirstBecameVisible) {\r\n\r\n\r\n await nextTick();\r\n // find the month that is selected.\r\n\r\n const selectedArrivalDateEl = document.querySelector(\"[data-lt='\" + defaultDate.value + \"']:not(.next):not(.prev)\") as HTMLElement;\r\n\r\n\r\n if (selectedArrivalDateEl) {\r\n let arrivalMonthSelector = selectedArrivalDateEl.closest(\".calendar\") as HTMLElement;\r\n\r\n scrollToMonth(arrivalMonthSelector);\r\n\r\n }\r\n }\r\n }\r\n\r\n isFirstBecameVisible = false;\r\n };\r\n\r\n if (props.shouldDetectBecameVisible) {\r\n\r\n // if so, we will watch became visible\r\n watch(() => props.becameVisible, async (newv, oldv) => {\r\n\r\n if (newv === true && !oldv) {\r\n\r\n // call becameVisible\r\n await onBecameVisible();\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n // get availability if we can\r\n\r\n if (props.accommodationId) {\r\n\r\n provide('availability', availability);\r\n availability.data = await fetchAvailability(+props.accommodationId);\r\n\r\n\r\n }\r\n\r\n\r\n // set / create months and days\r\n // defaults to current month and year\r\n const now = new Date();\r\n const end = new Date(now.valueOf());\r\n end.setMonth(now.getMonth() + props.numberOfMonths);\r\n const months = reactive(createData(now.getFullYear(), now.getMonth(), end.getFullYear(), end.getMonth(), availability.data));\r\n\r\n\r\n\r\n\r\n\r\n\r\n // if not read only, we will bind the handler for handling click events on the \r\n // the root element\r\n const onDayClick = (event: Event) => {\r\n\r\n if (pickState.value !== ArrivalDepartureState.ReadOnly && event.target !== null && event.target instanceof HTMLElement) {\r\n\r\n if (event.target.classList.contains('d')) {\r\n\r\n const newDate = (event.target.getAttribute('data-lt'));\r\n if (newDate !== null) {\r\n\r\n // handle selection click, which depends on our state...\r\n if ((pickState.value === ArrivalDepartureState.Arrival || pickState.value === ArrivalDepartureState.ResetArrival) && event.target.classList.contains('-a')) { // -a means valid arrival\r\n\r\n // an arrival has been selected, switch to departure\r\n // or\r\n // a new arrival has been selected, also reset departure, and switch to\r\n // departure selection.\r\n arrivalDate.value = parseInt(newDate);\r\n\r\n // for both states setting this to undefined is valid..\r\n departureDate.value = undefined;\r\n\r\n // in this state, we should probably also update valid departures,\r\n // but we can let that be processed in a watch.\r\n\r\n }\r\n else if (pickState.value === ArrivalDepartureState.Departure && event.target.classList.contains('-d')) {\r\n\r\n // departure selected, auto confirm\r\n departureDate.value = parseInt(newDate);\r\n selectionConfirmed();\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n const resetDate = () => {\r\n // If only arrival is selected, clear the selection in this component (because data is not saved yet)\r\n // else the data needs to be reset in the parent component (searchbar)\r\n if (arrivalDate.value && !departureDate.value) {\r\n arrivalDate.value = undefined;\r\n } else {\r\n\r\n context.emit(\"resetDate\", {\r\n arrivalDate: dateFunctions.fromLtDate(arrivalDate.value),\r\n departureDate: dateFunctions.fromLtDate(departureDate.value),\r\n arrivalDateString: arrivalDateInput.value,\r\n departureDateString: departureDateInput.value\r\n } as SelectionConfirmedEvent);\r\n }\r\n };\r\n\r\n\r\n\r\n\r\n\r\n\r\n // watch arrival date change to update departure dates\r\n watch(arrivalDate, (newValue, oldValue) => {\r\n\r\n if (newValue !== unref(oldValue) && newValue !== undefined) { // do we need this check, or does vue do this automatically?\r\n\r\n\r\n // we are in accommodation mode\r\n if (props.accommodationId) {\r\n if (availability.data !== undefined) {\r\n\r\n\r\n // using current arrival date, we should check any valid departure days..\r\n // we do this here to avoid having the 'day' component do this for each date..\r\n const avEntry = availability.data.entries.find((value) => value[0] === newValue);\r\n if (avEntry) {\r\n validDepartures.value = avEntry;\r\n\r\n } else {\r\n validDepartures.value = [];\r\n }\r\n }\r\n }\r\n // else this is the default picker (home, search)\r\n else {\r\n\r\n // the default is to use arrival and add days?\r\n const vd = new Array();\r\n const maxDays = 4 * 7;\r\n for (let i = 1; i <= maxDays; i++) {\r\n vd.push(newValue + i);\r\n }\r\n validDepartures.value = vd;\r\n }\r\n\r\n }\r\n }, {\r\n immediate: true\r\n });\r\n\r\n\r\n return {\r\n\r\n root,\r\n displayMode,\r\n months,\r\n isForAccommodation: props.accommodationId !== undefined,\r\n\r\n arrivalDate,\r\n departureDate,\r\n\r\n // computed\r\n showClearButton,\r\n hasArrivalDate,\r\n hasSelection,\r\n arrivalDateInput,\r\n departureDateInput,\r\n pickState,\r\n isPickStateArrival,\r\n isPickStateDeparture,\r\n\r\n // actions\r\n selectionConfirmed,\r\n onDayClick,\r\n resetDate,\r\n noDatePreference,\r\n arrivalDeparturePicker_Title_ChooseArrDept: appTranslations.arrivalDeparturePicker_Title_ChooseArrDept,\r\n arrivalDeparturePicker_Label_ChooseDeptToContinue: appTranslations.arrivalDeparturePicker_Label_ChooseDeptToContinue,\r\n arrivalDeparturePicker_Btn_NoDatePreference: appTranslations.arrivalDeparturePicker_Btn_NoDatePreference,\r\n arrivalDeparturePicker_Btn_ResetDate: appTranslations.arrivalDeparturePicker_Btn_ResetDate\r\n };\r\n\r\n }\r\n\r\n\r\n\r\n});\r\n\r\n","import { render } from \"./ArrivalDeparturePicker.vue?vue&type=template&id=b71b8e8e\"\nimport script from \"./arrivalDeparturePicker.ts?vue&type=script&lang=js\"\nexport * from \"./arrivalDeparturePicker.ts?vue&type=script&lang=js\"\n\nimport \"./arrivalDeparturePicker.css?vue&type=style&index=0&lang=css\"\nscript.render = render\n\nexport default script","\r\n\r\n\r\n","\r\n\r\n\r\n\r\n","\r\n\r\n import { defineComponent, onMounted, ref } from 'vue';\r\n\r\n export default defineComponent({\r\n\r\n props: {\r\n\r\n modelValue: Number,\r\n label: String,\r\n subLabel: String,\r\n name: String,\r\n max: {\r\n type: Number,\r\n default: 99\r\n\r\n },\r\n min: {\r\n type: Number,\r\n default: 0\r\n\r\n }\r\n },\r\n\r\n emits: [\"update:modelValue\"],\r\n\r\n\r\n setup(props, context) {\r\n\r\n \r\n const getNewValue = (delta: number) => {\r\n\r\n if (props.modelValue == undefined) {\r\n\r\n // if we are going up, return 1, else default to 0;\r\n return Math.max(props.min, delta > 0 ? 1 : 0);\r\n }\r\n else {\r\n\r\n const newVal = props.modelValue + delta;\r\n if (newVal < props.min) return props.min;\r\n if (newVal > props.max) return (props.max);\r\n return newVal;\r\n }\r\n };\r\n\r\n const onAdd = () => {\r\n\r\n context.emit('update:modelValue', getNewValue(1));\r\n }\r\n\r\n const onSubtract = () => {\r\n\r\n context.emit('update:modelValue', getNewValue(-1));\r\n }\r\n\r\n\r\n onMounted(() => {\r\n\r\n const mv = (props.modelValue ?? 0);\r\n\r\n if (mv < props.min) {\r\n context.emit('update:modelValue', props.min);\r\n }\r\n else if (mv > props.max) {\r\n context.emit('update:modelValue', props.max);\r\n }\r\n });\r\n\r\n return {\r\n onAdd,\r\n onSubtract\r\n };\r\n }\r\n\r\n });\r\n\r\n","import { render } from \"./AmountPicker.vue?vue&type=template&id=3925f3bc&scoped=true\"\nimport script from \"./AmountPicker.vue?vue&type=script&lang=ts\"\nexport * from \"./AmountPicker.vue?vue&type=script&lang=ts\"\n\nimport \"./styles.css?vue&type=style&index=0&id=3925f3bc&scoped=true&lang=css\"\nscript.render = render\nscript.__scopeId = \"data-v-3925f3bc\"\n\nexport default script","declare let globalLanguage: string;\r\nlet currentLanguage = globalLanguage || \"nl\";\r\n\r\nconst translations = {\r\n\r\n nl: {\"companionsPicker_Button_CustomButton\":\"Zoeken\",\"companionsPicker_Label_NumberOfBabies\":\"Babies\",\"companionsPicker_Label_NumberOfPersons\":\"Personen\",\"companionsPicker_Label_NumberOfPets\":\"Huisdieren\",\"companionsPicker_Title_Between_0_2_years\":\"Tussen 0 - 2 jaar\",\"companionsPicker_Title_ChooseCompany\":\"Kies gezelschap\"},\r\n en: {\"companionsPicker_Button_CustomButton\":\"Search\",\"companionsPicker_Label_NumberOfBabies\":\"Babies\",\"companionsPicker_Label_NumberOfPersons\":\"Persons\",\"companionsPicker_Label_NumberOfPets\":\"Pets\",\"companionsPicker_Title_Between_0_2_years\":\"Between 0 - 2 years\",\"companionsPicker_Title_ChooseCompany\":\"Choose company\"},\r\n de: {\"companionsPicker_Button_CustomButton\":\"Suchen\",\"companionsPicker_Label_NumberOfBabies\":\"Babys\",\"companionsPicker_Label_NumberOfPersons\":\"Personen\",\"companionsPicker_Label_NumberOfPets\":\"Haustiere\",\"companionsPicker_Title_Between_0_2_years\":\"Zwischen 0 - 2 Jahren\",\"companionsPicker_Title_ChooseCompany\":\"Reisegruppe ausw\\u00E4hlen\"}\r\n};\r\n\r\ninterface appTranslations {\r\n\r\n companionsPicker_Button_CustomButton: string; \r\n companionsPicker_Label_NumberOfBabies: string; \r\n companionsPicker_Label_NumberOfPersons: string; \r\n companionsPicker_Label_NumberOfPets: string; \r\n companionsPicker_Title_Between_0_2_years: string; \r\n companionsPicker_Title_ChooseCompany: string; \r\n\r\n}\r\n\r\n//@ts-ignore\r\nlet currentTranslation = (currentLanguage in translations) ? translations[currentLanguage] : translations[\"nl\"];\r\n\r\nexport default currentTranslation as appTranslations;","import { defineComponent, ref, reactive, computed, PropType } from 'vue';\r\nimport { FilterSelectionCompanions } from '@Types/FilterSelections';\r\nimport AmountPicker from '@Components/AmountPicker/AmountPicker.vue';\r\n//import { defaultSearchDefinitions } from '@Types/DefaultSearchDefinitions';\r\nimport appTranslations from \"@Components/CompanionsPicker/Translations/VueTranslations\"\r\n\r\nexport default defineComponent({\r\n\r\n components: { AmountPicker },\r\n\r\n props: {\r\n\r\n model: Object as PropType,\r\n\r\n // todo: add prop to determine what guest info should be shown or not\r\n maxPets: {\r\n type: Number,\r\n default: 3\r\n },\r\n maxGuests: {\r\n type: Number,\r\n default: 45 // note this number currently defines the max value used in the vue pickers. and is not dynmamically set from the actual max number currently available.\r\n },\r\n customButtonText: {\r\n type: String,\r\n default: appTranslations.companionsPicker_Button_CustomButton\r\n },\r\n\r\n hideChrome: Boolean,\r\n\r\n // introduced with searchbar 2023,\r\n // the old version had no btn type, and was considered a submit\r\n // btn when in a form, thus automatically submitting the form.\r\n // in 2023, we should trigger a specific submit action and\r\n // perform the logic.\r\n forceNoBtnType: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n\r\n emits: {\r\n\r\n guestsConfirmed: null\r\n },\r\n\r\n setup(props, context) {\r\n\r\n \r\n\r\n const onConfirm = (e: Event) => {\r\n\r\n context.emit(\"guestsConfirmed\");\r\n };\r\n\r\n\r\n\r\n return {\r\n\r\n //defaultSearchDefinitions,\r\n onConfirm,\r\n forceNoBtnType: props.forceNoBtnType,\r\n companionsPicker_Title_ChooseCompany: appTranslations.companionsPicker_Title_ChooseCompany,\r\n companionsPicker_Label_NumberOfBabies: appTranslations.companionsPicker_Label_NumberOfBabies,\r\n companionsPicker_Label_NumberOfPersons: appTranslations.companionsPicker_Label_NumberOfPersons,\r\n companionsPicker_Label_NumberOfPets: appTranslations.companionsPicker_Label_NumberOfPets,\r\n companionsPicker_Title_Between_0_2_years: appTranslations.companionsPicker_Title_Between_0_2_years\r\n\r\n };\r\n\r\n }\r\n\r\n\r\n\r\n});\r\n","import { render } from \"./CompanionsPicker.vue?vue&type=template&id=8a3ab3e2\"\nimport script from \"./companionsPicker.ts?vue&type=script&lang=js\"\nexport * from \"./companionsPicker.ts?vue&type=script&lang=js\"\n\nimport \"./styles.css?vue&type=style&index=0&lang=css\"\nscript.render = render\n\nexport default script","\r\n// Definitions:\r\n// public DateTime ? ArrivalDate { get; set; }\r\n// public DateTime ? DepartureDate { get; set; }\r\n// public int NumberOfPersons { get; set; }\r\n// public int NumberOfBabies { get; set; }\r\n// public int NumberOfPets { get; set; }\r\n\r\nconst definitions = {\r\n\r\n arrivalDate: \"arrivalDate\",\r\n departureDate: \"departureDate\",\r\n numberOfPersons: \"numberOfPersons\",\r\n numberOfBabies: \"numberOfBabies\",\r\n numberOfPets: \"numberOfPets\"\r\n};\r\n\r\nimport CreateInitialBooking from '@Types/CreateInitialBookingTSVM';\r\n\r\n\r\n\r\nfunction tryGetNumber(props: any, key: string, def: number): number {\r\n\r\n if (props.hasOwnProperty(key)) {\r\n\r\n let result = parseInt(props[key]);\r\n if (!isNaN(result)) {\r\n return result;\r\n }\r\n }\r\n\r\n return def;\r\n}\r\n\r\n\r\n\r\nexport function setQueryDetailsFromProps(props: any, target: CreateInitialBooking): void {\r\n\r\n\r\n target.arrivalDate = props[definitions.arrivalDate];\r\n target.departureDate = props[definitions.departureDate];\r\n\r\n target.guestBreakdown.numberOfAdults =\r\n tryGetNumber(props, definitions.numberOfPersons, target.guestBreakdown.numberOfAdults);\r\n\r\n target.guestBreakdown.numberOfBabies =\r\n tryGetNumber(props, definitions.numberOfBabies, target.guestBreakdown.numberOfBabies);\r\n\r\n target.guestBreakdown.numberOfPets =\r\n tryGetNumber(props, definitions.numberOfPets, target.guestBreakdown.numberOfPets);\r\n\r\n\r\n}\r\n\r\n\r\nexport function getUrlFromData(source: CreateInitialBooking, ignoreDates = false): string {\r\n\r\n let url = new Array();\r\n\r\n if (!ignoreDates) {\r\n\r\n if (source.arrivalDate) {\r\n url.push(`${definitions.arrivalDate}=${source.arrivalDate}`);\r\n }\r\n\r\n if (source.departureDate) {\r\n url.push(`${definitions.departureDate}=${source.departureDate}`);\r\n }\r\n }\r\n\r\n url.push(`${definitions.numberOfPersons}=${source.guestBreakdown.numberOfAdults}`);\r\n\r\n if (source.guestBreakdown.numberOfBabies > 0) {\r\n url.push(`${definitions.numberOfBabies}=${source.guestBreakdown.numberOfBabies}`);\r\n }\r\n\r\n if (source.guestBreakdown.numberOfPets > 0) {\r\n url.push(`${definitions.numberOfPets}=${source.guestBreakdown.numberOfPets}`);\r\n }\r\n\r\n return url.join(\"&\");\r\n}","\r\n\r\nexport function tryGetReturnUrl(): string | false {\r\n\r\n\r\n const existingQuery = new URLSearchParams(window.location.search.toLowerCase());\r\n if (existingQuery.has(\"returnurl\")) {\r\n\r\n return existingQuery.get(\"returnurl\") as string;\r\n }\r\n\r\n else return false;\r\n}","declare let globalLanguage: string;\r\nlet currentLanguage = globalLanguage || \"nl\";\r\n\r\nconst translations = {\r\n\r\n nl: {\"accDetails_Btn_Apply\":\"Toepassen\",\"updatePricingErrorMessage\":\"Er ging helaas iets mis bij het ophalen van de prijs.\",\"updatePricingErrorTitle\":\"Oeps\"},\r\n en: {\"accDetails_Btn_Apply\":\"Apply\",\"updatePricingErrorMessage\":\"Unfortunately, something went wrong while retrieving the price.\",\"updatePricingErrorTitle\":\"Oops\"},\r\n de: {\"accDetails_Btn_Apply\":\"Anwendung\",\"updatePricingErrorMessage\":\"Leider ist beim Abrufen der Preisinformationen etwas schief gelaufen.\",\"updatePricingErrorTitle\":\"Hoppla\"}\r\n};\r\n\r\ninterface appTranslations {\r\n\r\n accDetails_Btn_Apply: string; \r\n updatePricingErrorMessage: string; \r\n updatePricingErrorTitle: string; \r\n\r\n}\r\n\r\n//@ts-ignore\r\nlet currentTranslation = (currentLanguage in translations) ? translations[currentLanguage] : translations[\"nl\"];\r\n\r\nexport default currentTranslation as appTranslations;","import { computed, reactive, ref, nextTick, onMounted, watch } from 'vue';\r\nimport { BookingCreateState } from './BookingCreateState';\r\nimport CreateInitialBooking from '@Types/CreateInitialBookingTSVM';\r\nimport IBookingInitResult from \"./BookingInitResultTSVM\";\r\nimport { FetchPriceResult } from '@Types/FetchPriceResultTSVM';\r\n//import { ActiveFilter } from './ActiveFilter';\r\n\r\nimport ArrivalDeparturePicker from '@Components/ArrivalDeparturePicker/ArrivalDeparturePicker.vue';\r\nimport SelectionConfirmedEvent from '@Components/ArrivalDeparturePicker/Types/SelectionConfirmedEvent';\r\nimport CompanionsPicker from '@Components/CompanionsPicker/CompanionsPicker.vue';\r\n//import { CompanionsPickerData } from '@Components/CompanionsPicker/Types/Data';\r\nimport { displayDate, toYYYYMMDD } from '@Functions/DateFunctions';\r\nimport { setQueryDetailsFromProps, getUrlFromData } from \"@Functions/Query/AccommodationDetailsQM\";\r\nimport { tryGetReturnUrl } from '@Functions/urlFunctions';\r\nimport appTranslations from \"@Apps/AccommodationDetails/Translations/VueTranslations\"\r\n\r\n\r\n// These properties are defined in AccommodationDetail.scss\r\nconst calendarCssValues = {\r\n gridGapWidth: 30,\r\n paddingHorizontal: 20 + 20,\r\n singleCalendarWidth: 424\r\n}\r\n\r\n\r\nexport default {\r\n\r\n template: \"#accommodationDetailsAppTemplate\",\r\n components: { ArrivalDeparturePicker, CompanionsPicker },\r\n props: {\r\n accommodationId: String,\r\n numberOfPersons: String,\r\n numberOfBabies: String,\r\n numberOfPets: String,\r\n arrivalDate: String,\r\n departureDate: String,\r\n priceDetailMessage: String,\r\n reviewCount: String,\r\n reviewTotalScore: String,\r\n priceIndicationEndpoint: String\r\n },\r\n\r\n setup(props:any) {\r\n\r\n const initializeBookingUrl = \"/Booking/Init\";\r\n const updatePriceInfoUrl = \"/Fetch/FetchPrice\";\r\n const errorMessage = reactive({\r\n\r\n\r\n\r\n // has error is used to show or hide the error..\r\n\r\n hasError: false,\r\n message: \"\",\r\n title: \"\",\r\n\r\n });\r\n const hideError = () => {\r\n\r\n // todo: for now we set hasError = false,\r\n // but we probably want a seperate property to hide the error message\r\n errorMessage.hasError = false;\r\n errorMessage.message = \"\";\r\n errorMessage.title = \"\";\r\n };\r\n\r\n const showCalendarPicker = ref(false);\r\n const showCompanionPicker = ref(false);\r\n\r\n const showPriceDetailsMessage = ref(false);\r\n\r\n const htmlElementExpandedCalendarContainer = ref(null);\r\n\r\n const setCalendarVisibility = (flag: boolean) => {\r\n if (flag) {\r\n showCalendarPicker.value = true;\r\n\r\n // get width of #general block and grid gap\r\n let contentBlockWidth = document.getElementById(\"generalImages\")!.offsetWidth;\r\n // set calendar width accordingly\r\n htmlElementExpandedCalendarContainer.value!.style.width = contentBlockWidth + \"px\";\r\n htmlElementExpandedCalendarContainer.value!.style.left = -(contentBlockWidth + calendarCssValues.gridGapWidth) + \"px\";\r\n\r\n } else {\r\n showCalendarPicker.value = false;\r\n }\r\n\r\n };\r\n\r\n const hideAllPickers = () => {\r\n showCalendarPicker.value = false;\r\n showCompanionPicker.value = false;\r\n }\r\n\r\n const setCompanionVisibility = () => {\r\n showCompanionPicker.value = true;\r\n };\r\n\r\n\r\n\r\n //--------------------------------------------------------\r\n\r\n // todo: we should get the create initial booking data from somewhere\r\n // probablty the querystring, so we need to create a binder that can translate\r\n // querystring data to the createinitial booking model.\r\n // we will need something like that for more situations, so will probably be \r\n // something we will want to share in the functions folder?\r\n\r\n const bookingData = reactive(new CreateInitialBooking());\r\n\r\n // set/bind properties..\r\n // because of limitations, we use props with type any;\r\n // every prop param is a string, so we need to convert if set\r\n setQueryDetailsFromProps(props, bookingData);\r\n bookingData.accommodationId = props.accommodationId;\r\n\r\n const returnUrl = tryGetReturnUrl();\r\n if (returnUrl !== false) {\r\n bookingData.searchPageUrl = returnUrl;\r\n }\r\n\r\n //--------------------------------------------------------\r\n //setup date picker\r\n\r\n\r\n const latestPrice = ref(\"\");\r\n const hasPrice = computed(() => latestPrice.value && latestPrice.value.length > 0);\r\n const currentBookingState = ref(BookingCreateState.Initial);\r\n const isFetchingPriceUpdate = ref(false);\r\n\r\n\r\n\r\n window.addEventListener('pageshow', (pe) => {\r\n\r\n // if navigating back and browser has cached page, we may be looking at progress indicator, so clear it..\r\n if (pe.persisted && (currentBookingState.value === BookingCreateState.Created || currentBookingState.value === BookingCreateState.Creating)) {\r\n\r\n currentBookingState.value = BookingCreateState.Initial;\r\n }\r\n\r\n });\r\n\r\n const showLoader = computed(() => {\r\n switch (currentBookingState.value) {\r\n case BookingCreateState.Created: {\r\n return true;\r\n }\r\n case BookingCreateState.Creating: {\r\n return true;\r\n }\r\n }\r\n });\r\n\r\n\r\n // function to clear dates and unset price\r\n const clearPriceAndDates = () => {\r\n\r\n bookingData.arrivalDate = undefined;\r\n bookingData.departureDate = undefined;\r\n latestPrice.value = \"\";\r\n };\r\n\r\n const refreshPage = () => {\r\n\r\n const queryParams = new URLSearchParams(getUrlFromData(bookingData, true));\r\n\r\n\r\n\r\n if (returnUrl !== false) {\r\n queryParams.append(\"returnUrl\", returnUrl);\r\n }\r\n\r\n\r\n\r\n\r\n let newHref = window.location.pathname + \"?\" + queryParams.toString();\r\n\r\n if (window.location.search.indexOf(\"vue-dev\") > -1) {\r\n\r\n newHref += (newHref.indexOf(\"&\") >= 0 ? \"&\" : \"\") + (\"vue-dev\");\r\n }\r\n\r\n window.location.href = newHref;\r\n\r\n }\r\n\r\n const updatePricing = async () => {\r\n\r\n if (!(bookingData.arrivalDate && bookingData.departureDate)) {\r\n\r\n latestPrice.value = \"\";\r\n return;\r\n\r\n }\r\n\r\n // fetch price info\r\n isFetchingPriceUpdate.value = true;\r\n const url = new URL(updatePriceInfoUrl, window.location.href);\r\n\r\n const response = await fetch(url.toString(), {\r\n\r\n method: \"POST\",\r\n headers: { 'Content-Type': 'application/json' },\r\n redirect: \"error\",\r\n body: JSON.stringify(bookingData)\r\n\r\n });\r\n\r\n if (response.ok) {\r\n\r\n const priceResult = await response.json() as FetchPriceResult;\r\n\r\n if (priceResult.notAvailable) {\r\n\r\n errorMessage.message = priceResult.errorMessage;\r\n errorMessage.hasError = true;\r\n clearPriceAndDates();\r\n }\r\n\r\n else {\r\n\r\n latestPrice.value = priceResult.displayPrice;\r\n\r\n }\r\n }\r\n\r\n else {\r\n errorMessage.title = appTranslations.updatePricingErrorTitle; // \"Oeps\"; \r\n errorMessage.message = appTranslations.updatePricingErrorMessage;// \"Er ging helaas iets mis bij het ophalen van de prijs.\";\r\n errorMessage.hasError = true;\r\n }\r\n\r\n isFetchingPriceUpdate.value = false;\r\n };\r\n\r\n\r\n\r\n\r\n\r\n // this will create a new booking online\r\n const initializeBooking = async () => {\r\n // do any validations\r\n // block double creations\r\n if (currentBookingState.value == BookingCreateState.Creating) return;\r\n\r\n // todo: check has arrival/departure date set\r\n //if (bookingData.arrivalDate == null && bookingData.departureDate == null) return;\r\n\r\n\r\n\r\n // change state\r\n currentBookingState.value = BookingCreateState.Creating;\r\n\r\n const url = new URL(initializeBookingUrl, window.location.href);\r\n\r\n const response = await fetch(url.toString(), {\r\n\r\n method: \"POST\",\r\n headers: { 'Content-Type': 'application/json' },\r\n redirect: \"error\",\r\n body: JSON.stringify(bookingData)\r\n\r\n });\r\n\r\n\r\n if (response.ok) {\r\n\r\n const bookingResult = await response.json() as IBookingInitResult;\r\n\r\n // todo: update states based on results..\r\n if (bookingResult.isCreated && bookingResult.redirectUrl !== undefined) {\r\n currentBookingState.value = BookingCreateState.Created;\r\n\r\n\r\n // should perhaps update the popup slightly? such as \"success\" (?)\r\n // success, should redirect and use the public id\r\n window.location.href = bookingResult.redirectUrl;\r\n\r\n } else {\r\n\r\n currentBookingState.value = BookingCreateState.Error;\r\n errorMessage.hasError = true;\r\n\r\n // check errors..\r\n if (bookingResult.clearAndReloadAvailability) {\r\n\r\n //todo: still returns empty string\r\n errorMessage.message = bookingResult.errorMessage as string;\r\n errorMessage.title = bookingResult.errorTitle as string;\r\n\r\n //error.errorMessage = bookingResult.errorMessage;\r\n // todo: should reload calendar, and clear current arrival and departures\r\n // show error message, which will probablty contain something like \r\n // 'no longer available, choose a different arrival/departure...\r\n\r\n // on remove / hide error, should we reset the current bookingstate\r\n // so that the error window is removed?\r\n clearPriceAndDates();\r\n\r\n } else {\r\n\r\n errorMessage.message = bookingResult.errorMessage as string;\r\n errorMessage.title = appTranslations.updatePricingErrorTitle;\r\n errorMessage.hasError = true;\r\n\r\n //todo: still returns empty string\r\n\r\n // show error message, probably something unexpected?\r\n // on remove / hide error, should we reset the current bookingstate\r\n // so that the error window is removed?\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n } else {\r\n errorMessage.title = appTranslations.updatePricingErrorTitle;\r\n errorMessage.message = appTranslations.updatePricingErrorMessage;\r\n errorMessage.hasError = true;\r\n }\r\n\r\n\r\n };\r\n\r\n\r\n\r\n const onDatesSelected = (event: SelectionConfirmedEvent) => {\r\n\r\n bookingData.arrivalDate = event.arrivalDateString;\r\n bookingData.departureDate = event.departureDateString;\r\n\r\n nextTick().then(async () => {\r\n\r\n if (bookingData.arrivalDate && bookingData.departureDate) {\r\n showCalendarPicker.value = false;\r\n }\r\n await updatePricing();\r\n });\r\n\r\n };\r\n\r\n const onGuestsConfirmed = (event: Event) => {\r\n\r\n // not used, currently calls hideAllPickers directly in vue app\r\n };\r\n\r\n const resetDate = () => {\r\n bookingData.arrivalDate = undefined;\r\n bookingData.departureDate = undefined;\r\n }\r\n\r\n watch(bookingData.guestBreakdown, async () => {\r\n\r\n\r\n nextTick().then(async () => {\r\n showCalendarPicker.value = false;\r\n await updatePricing();\r\n });\r\n },\r\n {\r\n deep: true,\r\n flush: 'post'\r\n }\r\n );\r\n\r\n\r\n\r\n // setup for price indication backend\r\n\r\n const showPriceIndicationOption = props.priceIndicationEndpoint && props.priceIndicationEndpoint.length > 0;\r\n\r\n \r\n const onGoToPriceIndication = () => {\r\n\r\n // if we dont have a price, we cant show, this should be handled inside the\r\n // vue app, so just throw a simple alert in case.\r\n\r\n if (!hasPrice.value) {\r\n\r\n alert(\"No price available, please select an arrival and departure date first\");\r\n return;\r\n }\r\n\r\n let url = new URL(props.priceIndicationEndpoint, window.location.href);\r\n // add the following querystring params:\r\n // - arrivalDate\r\n // - departureDate\r\n // - numberOfPersons\r\n // - numberOfBabies\r\n // - numberOfPets\r\n\r\n // (note that accommodation id is already set)\r\n\r\n // note that we need to format arrival date as yyyy-MM-dd, but currently the bookingDat values are already in that format\r\n url.searchParams.append(\"arrival\", bookingData.arrivalDate!);\r\n url.searchParams.append(\"departure\", bookingData.departureDate!);\r\n\r\n url.searchParams.append(\"numberOfPersons\", (bookingData.guestBreakdown.numberOfAdults + bookingData.guestBreakdown.numberOfChildren).toString());\r\n\r\n if (bookingData.guestBreakdown.numberOfPets > 0) {\r\n url.searchParams.append(\"numberOfPets\", bookingData.guestBreakdown.numberOfPets.toString());\r\n }\r\n\r\n if(bookingData.guestBreakdown.numberOfBabies > 0){\r\n url.searchParams.append(\"numberOfBabies\", bookingData.guestBreakdown.numberOfBabies.toString());\r\n }\r\n\r\n window.open(url.href, '_blank');\r\n\r\n };\r\n\r\n\r\n onMounted(async () => { await updatePricing(); });\r\n\r\n\r\n return {\r\n\r\n currentBookingState,\r\n isFetchingPriceUpdate,\r\n hasPrice,\r\n latestPrice,\r\n bookingData,\r\n errorMessage,\r\n hideError,\r\n refreshPage,\r\n resetDate,\r\n\r\n initializeBooking,\r\n showLoader,\r\n\r\n\r\n showCalendarPicker,\r\n showCompanionPicker,\r\n setCalendarVisibility,\r\n setCompanionVisibility,\r\n hideAllPickers,\r\n showPriceDetailsMessage,\r\n // companionsPickerData,\r\n // enum\r\n BookingCreateState,\r\n\r\n // handler\r\n onDatesSelected,\r\n onGuestsConfirmed,\r\n\r\n // helper functions\r\n displayDate,\r\n\r\n // html elements\r\n htmlElementExpandedCalendarContainer,\r\n\r\n showPriceIndicationOption,\r\n onGoToPriceIndication\r\n }\r\n }\r\n\r\n};\r\n\r\n","import { createApp } from 'vue'\r\nimport App from './Src/AccommodationDetailsApp'\r\n\r\nconst id = '#accommodationDetailsApp';\r\nconst dataset = (document.querySelector(id) as HTMLElement).dataset;\r\n// convert all data- attributes on root element to a dataset, and pass that as props to the root app.\r\n// note that the
is replaced with the template, therefore we \r\n// get any data attributes before hand. NOTE: if your prop is called abc, then use data-abc=\"\" on the element!\r\nconst app = createApp(App, { ...dataset });\r\napp.mount(id);\r\n\r\n\r\n\r\n\r\n"],"sourceRoot":""}