@konnectio/core 4.0.10 → 4.0.11
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.
- package/dist/{ActionField-ab9c01ab.cjs → ActionField-8a007a6c.cjs} +1 -1
- package/dist/{ActionField-68f65af4.js → ActionField-d1266f8b.js} +3 -3
- package/dist/ActionField-d1266f8b.js.br +0 -0
- package/dist/{AvailabilitySkeleton-c48588e4.js → AvailabilitySkeleton-0e6d048b.js} +5 -5
- package/dist/AvailabilitySkeleton-0e6d048b.js.br +0 -0
- package/dist/{AvailabilitySkeleton-ca6cf6b6.cjs → AvailabilitySkeleton-3ba8c412.cjs} +1 -1
- package/dist/{DateField.vue_vue_type_style_index_0_lang-b6694990.cjs → DateField.vue_vue_type_style_index_0_lang-31a9e5dc.cjs} +2 -2
- package/dist/{DateField.vue_vue_type_style_index_0_lang-87ddfed8.js → DateField.vue_vue_type_style_index_0_lang-3f5993f7.js} +9 -9
- package/dist/DateField.vue_vue_type_style_index_0_lang-3f5993f7.js.br +0 -0
- package/dist/{Field-d926807f.cjs → Field-028d9987.cjs} +1 -1
- package/dist/{Field-b76d82cb.js → Field-ea77905a.js} +2 -2
- package/dist/Field-ea77905a.js.br +0 -0
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-a32b2a11.js → NumberField.vue_vue_type_script_setup_true_lang-d3b3206f.js} +3 -3
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-d3b3206f.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-d756efc3.cjs +1 -0
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs → SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs} +1 -1
- package/dist/{SelectField.vue_vue_type_style_index_0_lang-c973d794.js → SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js} +4 -4
- package/dist/SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js.br +0 -0
- package/dist/{TextField-8f6e5ef5.js → TextField-4e7defc6.js} +1 -1
- package/dist/TextField-4e7defc6.js.br +0 -0
- package/dist/{TextField-528ca68c.cjs → TextField-641e6fd1.cjs} +1 -1
- package/dist/{ThankYou-8ae535bf.cjs → ThankYou-2c1ee36b.cjs} +1 -1
- package/dist/{ThankYou-2f3c4efe.js → ThankYou-6fc9044f.js} +6 -6
- package/dist/ThankYou-6fc9044f.js.br +0 -0
- package/dist/{_-3cff5490.cjs → _-82677476.cjs} +1 -1
- package/dist/{_-734c9d50.js → _-f5a3364b.js} +1 -1
- package/dist/_-f5a3364b.js.br +0 -0
- package/dist/availability.cjs +1 -1
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/{event-e08d0178.js → event-46a84617.js} +16 -16
- package/dist/event-46a84617.js.br +0 -0
- package/dist/event-8738e24d.cjs +1 -0
- package/dist/event.cjs +1 -1
- package/dist/event.js +9 -9
- package/dist/event.js.br +0 -0
- package/dist/gift-card-validation.cjs +1 -1
- package/dist/gift-card-validation.js +4 -4
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card.cjs +1 -1
- package/dist/gift-card.js +7 -7
- package/dist/gift-card.js.br +0 -0
- package/dist/hotel.cjs +1 -1
- package/dist/hotel.js +10 -10
- package/dist/hotel.js.br +0 -0
- package/dist/{index-c28f52d1.js → index-a3de1ca3.js} +2 -2
- package/dist/index-a3de1ca3.js.br +0 -0
- package/dist/{index-a46a0876.cjs → index-e81b12be.cjs} +1 -1
- package/dist/polyfill.cjs +1 -1
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/package.json +1 -1
- package/dist/ActionField-68f65af4.js.br +0 -0
- package/dist/AvailabilitySkeleton-c48588e4.js.br +0 -0
- package/dist/DateField.vue_vue_type_style_index_0_lang-87ddfed8.js.br +0 -0
- package/dist/Field-b76d82cb.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-a32b2a11.js.br +0 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-a549c70e.cjs +0 -1
- package/dist/SelectField.vue_vue_type_style_index_0_lang-c973d794.js.br +0 -0
- package/dist/TextField-8f6e5ef5.js.br +0 -0
- package/dist/ThankYou-2f3c4efe.js.br +0 -0
- package/dist/_-734c9d50.js.br +0 -0
- package/dist/event-4662e27c.cjs +0 -1
- package/dist/event-e08d0178.js.br +0 -0
- package/dist/index-c28f52d1.js.br +0 -0
package/dist/gift-card.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs"),V=require("./index-a46a0876.cjs"),M=require("./_-3cff5490.cjs"),x=require("./TextField-528ca68c.cjs"),R=require("./Field-d926807f.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=M.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),g=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),d=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),p=e.ref(""),F=e.ref(1),C=e.ref(!0),k=e.ref(""),s=e.ref({base64:"",type:"",name:""}),n=e.ref(void 0),i=e.ref(0),f=e.ref(!1),m=e.ref(0),h=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),B=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),v=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),w=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),T=e.computed(()=>m.value!==0),b=e.computed(()=>{let u;if(T.value)u=w.value[m.value].data[0];else if(i.value!==0){const a=n.value,_=w.value[i.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),E=e.computed(()=>!(!g.value||!d.value||!(c.value.length>=5)||!p.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&f.value)),P=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&f.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,f.value=!0,await e.axios.post("http://stage.hotel_service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:p.value,quantity:F.value,freeText:k.value,showPrice:C.value,contactName:g.value,contactEmail:d.value,contactPhone:c.value,imageBase64:e.b2a(s.value.base64),imageName:s.value.name,imageFormat:s.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.9"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,f.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(m.value=u)}return{moduleState:t,name:g,email:d,phone:c,value:p,remark:k,showValue:C,quantity:F,media:s,placeId:n,placeType:i,showFormPage:h,showPaymentPage:B,showConfirmationPage:v,places:w,hasFilledForm:E,hasForcedPlaceType:T,isWaitingForResponse:P,isMetaDataAvailable:q,orderGiftCard:N,initialize:r}}),$={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=y,{t}=e.useI18n(),{display:g}=e.useAlertStore(),d=e.ref(),c=e.computed(()=>o.modelValue.base64!=="");function p(n){l("update:modelValue",n)}function F(){p({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function C(){d.value&&d.value.click()}function k(n,i){const[f,m]=[n.name,n.type],h=new FileReader;h.onload=function(B){if(B.target){const v=B.target.result;i({base64:v,name:f,type:m})}else g({message:t("imageUploadError"),type:"error"})},h.readAsDataURL(n)}async function s(){let n;(n=d.value.files)instanceof FileList&&k(n[0],p)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",$,[e.createBaseVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=f=>s())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(t)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=f=>C())},null,8,["label","icon-color"])])),c.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(t)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=f=>C())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(t)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=f=>F())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:c.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field,{"is-text-area":""}),e.createVNode(M.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:g,value:d,remark:c,showValue:p,quantity:F,media:C,placeId:k,placeType:s,showFormPage:n,showPaymentPage:i,showConfirmationPage:f,places:m,hasFilledForm:h,hasForcedPlaceType:B,isWaitingForResponse:v,isMetaDataAvailable:w}=e.storeToRefs(U()),{initialize:T,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function P(){await b()}return e.watch(s,()=>{k.value=void 0}),e.onMounted(()=>{T()}),(N,r)=>{const u=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":N.accessToken,"data-layout":N.layout,styling:N.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(w)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(i)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(x.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(x.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(g),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(g)?g.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(B)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(m)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(s)?s.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(m)[e.unref(s)]&&e.unref(m)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(x._sfc_main,{key:0,modelValue:e.unref(k),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(k)?k.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(m)[e.unref(s)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(x.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(d)?d.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(p)?p.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(p)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(f)]])]),N.layout!=="minimal"&&e.unref(n)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(h),"is-loading":e.unref(v),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(v)?v.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(x.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.value=a:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(n)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(h),"data-test":"orderGiftCard","is-loading":e.unref(v),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(v)?v.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[u]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),S=e.createApp({components:{GiftCard:me}});S.use(_e);S.use(e.instance);S.use(ve);S.use(V.StickyPlugin);S.use(V.install,{bootstrap:!1});S.mount("#konnectio-gift-card-app");
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs"),V=require("./index-e81b12be.cjs"),M=require("./_-82677476.cjs"),x=require("./TextField-641e6fd1.cjs"),R=require("./Field-028d9987.cjs");require("./_commonjsHelpers-6763f629.cjs");const U=e.defineStore("giftCard",()=>{e.useAlertStore();const{pay:y}=M.usePaymentStore(),{bearerToken:l,metaData:o}=e.storeToRefs(e.useUtilityStore()),t=e.ref(e.GiftCardModuleState.InitialState),g=e.useStorage("freshBookingName","",void 0,{serializer:e.StorageSerializers.string}),d=e.useStorage("freshBookingEmail","",void 0,{serializer:e.StorageSerializers.string}),c=e.useStorage("freshBookingPhone","",void 0,{serializer:e.StorageSerializers.string}),p=e.ref(""),F=e.ref(1),C=e.ref(!0),k=e.ref(""),s=e.ref({base64:"",type:"",name:""}),n=e.ref(void 0),i=e.ref(0),f=e.ref(!1),m=e.ref(0),h=e.computed(()=>t.value===e.GiftCardModuleState.InitialState||t.value===e.GiftCardModuleState.WaitingForResponse),B=e.computed(()=>t.value===e.GiftCardModuleState.ReadyToPay),v=e.computed(()=>t.value===e.GiftCardModuleState.PaymentSuccess),w=e.computed(()=>{const u={1:{label:e.i18n.t("giftCard.hotelType"),data:[]},2:{label:e.i18n.t("giftCard.restaurantType"),data:[]}},a=o.value.places;return a&&a.forEach(_=>{u[_.placeType].data.push(_)}),Object.fromEntries(Object.entries(u).filter(([,_])=>_.data.length>0))}),T=e.computed(()=>m.value!==0),b=e.computed(()=>{let u;if(T.value)u=w.value[m.value].data[0];else if(i.value!==0){const a=n.value,_=w.value[i.value].data;_.length===1?u=_[0]:a!==void 0&&_.forEach(z=>{String(z.id)===String(a)&&(u=z)})}return u}),E=e.computed(()=>!(!g.value||!d.value||!(c.value.length>=5)||!p.value||b.value===void 0)),q=e.computed(()=>!(t.value===e.GiftCardModuleState.InitialState&&f.value)),P=e.computed(()=>!!(t.value===e.GiftCardModuleState.WaitingForResponse&&f.value));async function N(){t.value=e.GiftCardModuleState.WaitingForResponse,f.value=!0,await e.axios.post("https://stage.hotel_service.konnectio.dk/api/gift-card/create",{termsOfserviceURL:"https://freshbooking.dk",checkoutUrl:"https://freshbooking.dk",currencyID:o.value.currency.id,language:e.getUserLanguage(),amount:p.value,quantity:F.value,freeText:k.value,showPrice:C.value,contactName:g.value,contactEmail:d.value,contactPhone:c.value,imageBase64:e.b2a(s.value.base64),imageName:s.value.name,imageFormat:s.value.type,placeType:b.value?b.value.placeType:void 0,placeID:b.value?b.value.id:void 0},{headers:{Authorization:l.value,Accept:"application/json","Fresh-Booking-Ver":"4.0.11"}}).then(u=>{t.value=e.GiftCardModuleState.ReadyToPay,f.value=!1,y({callback:()=>console.log("Callback!"),response:u.data})})}function r(u){u&&(m.value=u)}return{moduleState:t,name:g,email:d,phone:c,value:p,remark:k,showValue:C,quantity:F,media:s,placeId:n,placeType:i,showFormPage:h,showPaymentPage:B,showConfirmationPage:v,places:w,hasFilledForm:E,hasForcedPlaceType:T,isWaitingForResponse:P,isMetaDataAvailable:q,orderGiftCard:N,initialize:r}}),$={class:"media-selector"},D=["accept"],I={class:"media-selector-wrapper"},L={class:"media-selector-tools"},A={key:0},W={key:1},j={key:2},H=["src"],O=e.defineComponent({__name:"MediaSelector",props:{modelValue:{},validation:{default:"image/*"},iconColor:{default:"#000"},label:{},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(y,{emit:l}){const o=y,{t}=e.useI18n(),{display:g}=e.useAlertStore(),d=e.ref(),c=e.computed(()=>o.modelValue.base64!=="");function p(n){l("update:modelValue",n)}function F(){p({base64:"",name:"",type:""}),d.value&&(d.value.value="")}function C(){d.value&&d.value.click()}function k(n,i){const[f,m]=[n.name,n.type],h=new FileReader;h.onload=function(B){if(B.target){const v=B.target.result;i({base64:v,name:f,type:m})}else g({message:t("imageUploadError"),type:"error"})},h.readAsDataURL(n)}async function s(){let n;(n=d.value.files)instanceof FileList&&k(n[0],p)}return(n,i)=>(e.openBlock(),e.createBlock(e.InputField,{label:n.label,required:n.required,type:"media"},{default:e.withCtx(()=>[e.createBaseVNode("div",$,[e.createBaseVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:n.validation,single:"",onChange:i[0]||(i[0]=f=>s())},null,40,D),e.createBaseVNode("div",I,[e.createBaseVNode("ul",L,[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",A,[e.createVNode(e.Clickable,{label:e.unref(t)("uploadFile"),type:"button",icon:"upload","icon-color":n.iconColor,onClickEvent:i[1]||(i[1]=f=>C())},null,8,["label","icon-color"])])),c.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(e.Clickable,{label:e.unref(t)("replaceFile"),type:"button",icon:"repeat-alt","icon-color":n.iconColor,onClickEvent:i[2]||(i[2]=f=>C())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("li",j,[e.createVNode(e.Clickable,{label:e.unref(t)("removeFile"),type:"button",icon:"trash-alt","icon-color":n.iconColor,onClickEvent:i[3]||(i[3]=f=>F())},null,8,["label","icon-color"])])):e.createCommentVNode("",!0)]),e.createBaseVNode("div",{class:e.normalizeClass(["media-selector-previewer",{opened:c.value}])},[n.modelValue?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.modelValue.base64},null,8,H)):e.createCommentVNode("",!0)],2)])])]),_:1},8,["label","required"]))}});function G(y){const l=y;l.__i18n=l.__i18n||[],l.__i18n.push({locale:"",resource:{da:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload billede"])},removeFile:o=>{const{normalize:t}=o;return t(["Fjern billede"])},replaceFile:o=>{const{normalize:t}=o;return t(["Ersat billede"])},imageUploadError:o=>{const{normalize:t}=o;return t(["Der skete en fejl under billede upload!"])}},en:{uploadFile:o=>{const{normalize:t}=o;return t(["Upload image"])},removeFile:o=>{const{normalize:t}=o;return t(["Remove image"])},replaceFile:o=>{const{normalize:t}=o;return t(["Replace image"])},imageUploadError:o=>{const{normalize:t}=o;return t(["An error occurred under image upload!"])}}}})}typeof G=="function"&&G(O);const K={class:"gift-card-skeleton"},Y={class:"gift-card-skeleton-form"},J=e.defineComponent({__name:"GiftCardSkeleton",setup(y){return(l,o)=>(e.openBlock(),e.createElementBlock("div",K,[e.createBaseVNode("div",Y,[e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field),e.createVNode(R.Field,{"is-text-area":""}),e.createVNode(M.Element,{height:"44px"})])]))}});const Q=e._export_sfc(J,[["__scopeId","data-v-2600a731"]]),X={key:0,id:"fresh-booking-gift-card-wrapper"},Z={id:"fresh-booking-gift-card-title"},ee={id:"fresh-booking-gift-card-content"},te={id:"fresh-booking-gift-card-payment"},ae=["innerHTML"],le={key:0},oe={key:0,id:"fresh-booking-select-place-type"},ne={class:e.normalizeClass(["fresh-booking-label","required"])},re={id:"fresh-booking-select-place-type-input"},ie=["innerHTML"],de={key:0,id:"fresh-booking-gift-card-order"},se={class:"fresh-booking-panel"},ue={key:1,id:"fresh-booking-gift-card-remarks"},ce={key:2,id:"fresh-booking-gift-card-order-minimal","sticky-side":"bottom"},fe={id:"fresh-booking-gift-card-recaptcha"},pe=e.defineComponent({name:"GiftCardLayout",__name:"GiftCard",props:{accessToken:{},layout:{default:"minimal"},placeType:{},styling:{}},setup(y){const{t:l}=e.useI18n(),{name:o,email:t,phone:g,value:d,remark:c,showValue:p,quantity:F,media:C,placeId:k,placeType:s,showFormPage:n,showPaymentPage:i,showConfirmationPage:f,places:m,hasFilledForm:h,hasForcedPlaceType:B,isWaitingForResponse:v,isMetaDataAvailable:w}=e.storeToRefs(U()),{initialize:T,orderGiftCard:b}=U(),{isRecaptchaEnabled:E,currency:q}=e.storeToRefs(e.useUtilityStore());async function P(){await b()}return e.watch(s,()=>{k.value=void 0}),e.onMounted(()=>{T()}),(N,r)=>{const u=e.resolveDirective("sticky");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-gift-card-module",type:"gift-card","access-token":N.accessToken,"data-layout":N.layout,styling:N.styling,"sticky-container":""},{default:e.withCtx(()=>[e.unref(w)?(e.openBlock(),e.createElementBlock("div",X,[e.createBaseVNode("h4",Z,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.title")),1)]),e.createBaseVNode("div",ee,[e.withDirectives(e.createBaseVNode("div",te,[e.createVNode(V.CheckoutWindow)],512),[[e.vShow,e.unref(i)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("p",{id:"fresh-booking-gift-card-description",innerHTML:e.unref(l)("giftCard.description")},null,8,ae),e.createBaseVNode("form",null,[e.createVNode(x.TextField,{modelValue:e.unref(o),"onUpdate:modelValue":r[0]||(r[0]=a=>e.isRef(o)?o.value=a:null),type:"text",name:"name",autocomplete:"name",label:e.unref(l)("giftCard.name"),icon:"user-alt",placeholder:e.unref(l)("giftCard.namePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(x.TextField,{modelValue:e.unref(t),"onUpdate:modelValue":r[1]||(r[1]=a=>e.isRef(t)?t.value=a:null),type:"email",name:"email",autocomplete:"email",label:e.unref(l)("giftCard.email"),icon:"at",placeholder:e.unref(l)("giftCard.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(V.PhoneField,{modelValue:e.unref(g),"onUpdate:modelValue":r[2]||(r[2]=a=>e.isRef(g)?g.value=a:null),icon:"phone-office",label:e.unref(l)("giftCard.phone"),placeholder:e.unref(l)("giftCard.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(B)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,[e.unref(m)?(e.openBlock(),e.createElementBlock("div",oe,[e.createBaseVNode("label",ne,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(l)("giftCard.selectType")),1)]),e.createBaseVNode("div",re,[e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),(a,_)=>(e.openBlock(),e.createElementBlock("li",{key:_},[e.createVNode(V.Checkbox,{modelValue:e.unref(s),"onUpdate:modelValue":r[3]||(r[3]=z=>e.isRef(s)?s.value=z:null),type:"radio",name:"placeType",val:_,label:a.label},null,8,["modelValue","val","label"])]))),128))]),e.unref(m)[e.unref(s)]&&e.unref(m)[e.unref(s)].data.length>1?(e.openBlock(),e.createBlock(x._sfc_main,{key:0,modelValue:e.unref(k),"onUpdate:modelValue":r[4]||(r[4]=a=>e.isRef(k)?k.value=a:null),placeholder:e.unref(l)("giftCard.selectPlacePlaceholder"),options:e.unref(m)[e.unref(s)].data,labelKey:"name",valueKey:"id",required:""},null,8,["modelValue","placeholder","options"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))])),e.createVNode(x.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":r[5]||(r[5]=a=>e.isRef(d)?d.value=a:null),type:"number",name:"value",label:e.unref(l)("giftCard.value"),icon:"money-bill",placeholder:e.unref(l)("giftCard.valuePlaceholder"),suffix:e.unref(q),required:""},null,8,["modelValue","label","placeholder","suffix"]),e.createVNode(V.Checkbox,{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=a=>e.isRef(p)?p.value=a:null),type:"checkbox",name:"showValue",label:e.unref(l)("giftCard.showValue"),checked:e.unref(p)},null,8,["modelValue","label","checked"]),e.createCommentVNode("",!0),e.createCommentVNode("",!0)])],512),[[e.vShow,e.unref(n)]]),e.withDirectives(e.createBaseVNode("div",null,[e.createBaseVNode("div",{innerHTML:e.unref(l)("giftCard.thankYou")},null,8,ie)],512),[[e.vShow,e.unref(f)]])]),N.layout!=="minimal"&&e.unref(n)?(e.openBlock(),e.createElementBlock("div",de,[e.createBaseVNode("div",se,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(h),"is-loading":e.unref(v),"onUpdate:isLoading":r[9]||(r[9]=a=>e.isRef(v)?v.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"])])])):e.createCommentVNode("",!0),e.unref(n)?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(x.TextField,{modelValue:e.unref(c),"onUpdate:modelValue":r[10]||(r[10]=a=>e.isRef(c)?c.value=a:null),type:"textarea",name:"remark",label:e.unref(l)("giftCard.remark"),icon:"info-circle",placeholder:e.unref(l)("giftCard.remarkPlaceholder")},null,8,["modelValue","label","placeholder"])])):e.createCommentVNode("",!0),e.unref(n)?e.withDirectives((e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(e.Clickable,{label:e.unref(l)("giftCard.orderGiftCard"),"full-width":!0,disabled:!e.unref(h),"data-test":"orderGiftCard","is-loading":e.unref(v),"onUpdate:isLoading":r[11]||(r[11]=a=>e.isRef(v)?v.value=a:null),onClickEvent:P},null,8,["label","disabled","is-loading"]),e.withDirectives(e.createBaseVNode("div",fe,[e.createVNode(V._sfc_main)],512),[[e.vShow,e.unref(E)]])])),[[u]]):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.Loading,{key:1}))]),_:1},8,["access-token","data-layout","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Q)]),_:1})}}});const me=e._export_sfc(pe,[["__scopeId","data-v-e4aa1e4c"]]),_e=e.createPinia(),ve=e.zo(),S=e.createApp({components:{GiftCard:me}});S.use(_e);S.use(e.instance);S.use(ve);S.use(V.StickyPlugin);S.use(V.install,{bootstrap:!1});S.mount("#konnectio-gift-card-app");
|
package/dist/gift-card.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as ue, u as ne, s as Q, a as ie, r as b, a8 as w, b as J, c as F, i as Z, S as Y, e as ce, f as pe, a9 as me, h as X, y as re, k as d, l as L, w as j, x as s, q as f, m as r, n as e, C as x, t as k, v as se, I as fe, _ as de, $ as ve, o as ge, aa as he, z as ee, ab as I, ac as W, A as V, a0 as ye, a1 as _e, a2 as ae, H as be, J as ke, N as Ce, a6 as Ve, M as Fe, P as Pe } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { a as Se, P as we, C as le, _ as ze, S as Te, i as $e } from "./index-
|
|
3
|
-
import { u as Ue, E as qe } from "./_-
|
|
4
|
-
import { T as H, _ as Re } from "./TextField-
|
|
5
|
-
import { F as M } from "./Field-
|
|
1
|
+
import { d as ue, u as ne, s as Q, a as ie, r as b, a8 as w, b as J, c as F, i as Z, S as Y, e as ce, f as pe, a9 as me, h as X, y as re, k as d, l as L, w as j, x as s, q as f, m as r, n as e, C as x, t as k, v as se, I as fe, _ as de, $ as ve, o as ge, aa as he, z as ee, ab as I, ac as W, A as V, a0 as ye, a1 as _e, a2 as ae, H as be, J as ke, N as Ce, a6 as Ve, M as Fe, P as Pe } from "./SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js";
|
|
2
|
+
import { a as Se, P as we, C as le, _ as ze, S as Te, i as $e } from "./index-a3de1ca3.js";
|
|
3
|
+
import { u as Ue, E as qe } from "./_-f5a3364b.js";
|
|
4
|
+
import { T as H, _ as Re } from "./TextField-4e7defc6.js";
|
|
5
|
+
import { F as M } from "./Field-ea77905a.js";
|
|
6
6
|
import "./_commonjsHelpers-c5d32002.js";
|
|
7
7
|
const te = ue("giftCard", () => {
|
|
8
8
|
ne();
|
|
@@ -39,7 +39,7 @@ const te = ue("giftCard", () => {
|
|
|
39
39
|
return m;
|
|
40
40
|
}), O = F(() => !(!P.value || !c.value || !(v.value.length >= 5) || !h.value || $.value === void 0)), K = F(() => !(a.value === w.InitialState && g.value)), A = F(() => !!(a.value === w.WaitingForResponse && g.value));
|
|
41
41
|
async function R() {
|
|
42
|
-
a.value = w.WaitingForResponse, g.value = !0, await ce.post("
|
|
42
|
+
a.value = w.WaitingForResponse, g.value = !0, await ce.post("https://stage.hotel_service.konnectio.dk/api/gift-card/create", {
|
|
43
43
|
termsOfserviceURL: "https://freshbooking.dk",
|
|
44
44
|
checkoutUrl: "https://freshbooking.dk",
|
|
45
45
|
currencyID: o.value.currency.id,
|
|
@@ -60,7 +60,7 @@ const te = ue("giftCard", () => {
|
|
|
60
60
|
headers: {
|
|
61
61
|
Authorization: t.value,
|
|
62
62
|
Accept: "application/json",
|
|
63
|
-
"Fresh-Booking-Ver": "4.0.
|
|
63
|
+
"Fresh-Booking-Ver": "4.0.11"
|
|
64
64
|
}
|
|
65
65
|
}).then((m) => {
|
|
66
66
|
a.value = w.ReadyToPay, g.value = !1, z({
|
package/dist/gift-card.js.br
CHANGED
|
Binary file
|
package/dist/hotel.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs"),D=require("./index-a46a0876.cjs"),j=require("./ThankYou-8ae535bf.cjs"),U=require("./DateField.vue_vue_type_style_index_0_lang-b6694990.cjs"),Re=require("./AvailabilitySkeleton-ca6cf6b6.cjs"),yt=require("./NumberField.vue_vue_type_script_setup_true_lang-a549c70e.cjs"),P=require("./TextField-528ca68c.cjs"),R=require("./_-3cff5490.cjs"),ne=require("./_commonjsHelpers-6763f629.cjs");require("./ActionField-ab9c01ab.cjs");require("./Field-d926807f.cjs");const vt=["onClick"],be=e.defineComponent({__name:"HotelReservationForm",props:{showGiftCard:{type:Boolean,default:!1},showTermsNotice:{type:Boolean,default:!1}},setup(n){const{t}=e.useI18n(),o=e.useSlots(),{hideArrivalDepartureInputs:i,disableArrivalUserSelection:a,disableDepartureUserSelection:s,arrivalDefault:u,departureDefault:p,currency:l}=e.storeToRefs(e.useUtilityStore()),{arrivalDate:f,departureDate:y}=e.storeToRefs(U.useAvailabilityStore()),{arrivalTime:m,departureTime:b,roomDisplay:c,templateID:v,totalPrice:_,areListingsLoading:h}=e.storeToRefs(U.useHotelStore()),{removeRoom:r}=U.useHotelStore();function d(g){return g.reduce((B,{totalPrice:E})=>B+E,0)}return(g,k)=>(e.openBlock(),e.createBlock(j.ReservationForm,{"total-price":e.unref(_),"show-gift-card":g.showGiftCard,"show-terms-notice":g.showTermsNotice,"is-sidebar-loading":e.unref(h),notice:e.unref(t)("hotel.reservationNotice")},e.createSlots({form:e.withCtx(()=>[e.renderSlot(g.$slots,"form")]),"reservation-summary":e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(i)?e.unref(e.showDate)(e.unref(f)):`${e.unref(e.showDate)(e.unref(f))}, ${e.unref(a)?e.unref(u):e.unref(m)}`),1)]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(i)?e.unref(e.showDate)(e.unref(y)):`${e.unref(e.showDate)(e.unref(y))}, ${e.unref(s)?e.unref(p):e.unref(b)}`),1)]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.nights")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.daysBetweenDates)(e.unref(f),e.unref(y)))+" "+e.toDisplayString(e.unref(e.lowercase)(e.unref(e.daysBetweenDates)(e.unref(f),e.unref(y))===1?e.unref(t)("booking.reservation.night"):e.unref(t)("booking.reservation.nights"))),1)])]),"price-summary":e.withCtx(()=>[isNaN(e.unref(v))&&e.unref(c).length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(c),({roomGroupID:B,title:E,variants:N})=>(e.openBlock(),e.createElementBlock("div",{key:B},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(E),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N,(I,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.rooms,(x,$)=>(e.openBlock(),e.createElementBlock("ul",{key:$},[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,[e.createBaseVNode("span",null,e.toDisplayString(I.name),1),e.createBaseVNode("span",null,[e.createTextVNode("( "),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(x.adultsCount),1),e.createTextVNode(") "),x.childrenCount>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.Icon,{icon:"child",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(x.childrenCount),1),e.createTextVNode(") ")],64)):e.createCommentVNode("",!0)])]),e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(x.totalPrice,e.unref(l))),1),e.createBaseVNode("span",{class:"fresh-booking-footer-summery-remove",onClick:e.withModifiers(F=>e.unref(r)(B,T,$),["prevent"])},[e.createVNode(e.Icon,{icon:"times",type:"fas","icon-color":"#ff0000"})],8,vt)])]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(d(x.roomAddons),e.unref(l))),1)])]))),128))]))),128))]))),128)):e.createCommentVNode("",!0)]),navigation:e.withCtx(()=>[e.renderSlot(g.$slots,"navigation")]),_:2},[e.unref(o).addons?{name:"addons",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"addons")]),key:"0"}:void 0]),1032,["total-price","show-gift-card","show-terms-notice","is-sidebar-loading","notice"]))}}),_t=e.defineStore("tracking",()=>{const{enableTracking:n,googleApiKey:t}=e.storeToRefs(e.useUtilityStore());function o(){console.log("Tracking"),console.log(t),D.setOptions({config:{id:t.value,params:{send_page_view:!1}},enabled:n.value})}function i({id:l,name:f,value:y,label:m,category:b="general"}){return{items:[{id:l,name:f}],event_label:m,event_category:b,value:y}}function a(l,f){D.event(l,i(f))}function s(l,f,y){a("add_to_cart",{id:l,name:f,value:y,label:"Added to cart",category:"ecommerce"})}function u(l,f,y){a("remove_from_cart",{id:l,name:f,value:y,label:"Removed to cart",category:"ecommerce"})}function p(l){D.event("view_item",{items:[{name:l}]})}return{setup:o,viewItem:p,addToCart:s,removeFromCart:u}}),kt={style:{display:"flex","align-items":"baseline"}},bt={key:0},Bt={style:{display:"flex","align-items":"baseline"}},Vt={key:0};const Et=e.defineComponent({__name:"RoomConfigField",props:{modelValue:{},options:{},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},label:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,{currency:i}=e.storeToRefs(e.useUtilityStore());function a(u){t("update:modelValue",u)}const s=e.computed({get:()=>o.modelValue,set:u=>a(u)});return(u,p)=>(e.openBlock(),e.createBlock(P._sfc_main,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=l=>s.value=l),label:u.label,placeholder:"Select guest configuration",labelKey:"label",valueKey:"value","icon-placement":"label",options:u.options,required:u.required},{option:e.withCtx(({data:l})=>[e.createBaseVNode("div",kt,[e.createBaseVNode("div",null,[e.createVNode(e.Icon,{icon:"male",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.adults}`),1)]),l.children>0?(e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(e.Icon,{icon:"child",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.children}`),1)])):e.createCommentVNode("",!0),e.createBaseVNode("div",null,e.toDisplayString(`(${e.unref(e.showPrice)(l.price,e.unref(i))})`),1)])]),"selected-option":e.withCtx(({data:l})=>[e.createBaseVNode("div",Bt,[e.createBaseVNode("div",null,[e.createVNode(e.Icon,{icon:"male",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.adults}`),1)]),l.children>0?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(e.Icon,{icon:"child",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.children}`),1)])):e.createCommentVNode("",!0),e.createCommentVNode("",!0)])]),_:1},8,["modelValue","label","options","required"]))}}),Ct={key:0,class:"fresh-booking-modal-facilities"},Nt={class:"fresh-booking-modal-facilities-masonry","transition-duration":"0s","destroy-delay":0,"percent-position":!0,"column-width":".grid-sizer","item-selector":".fresh-booking-modal-facility"},Tt={class:"grid-sizer"},St=e.defineComponent({__name:"Info",props:{title:{},description:{},facilities:{}},setup(n){return(t,o)=>{const i=e.resolveDirective("masonry-tile"),a=e.resolveDirective("masonry");return e.openBlock(),e.createBlock(j._sfc_main,{title:t.title,description:t.description},{default:e.withCtx(()=>[t.facilities&&t.facilities.length!==0?(e.openBlock(),e.createElementBlock("div",Ct,[e.withDirectives((e.openBlock(),e.createElementBlock("ul",Nt,[e.withDirectives(e.createBaseVNode("div",Tt,null,512),[[i]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.facilities,({name:s,subFacilities:u},p)=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:p,class:"fresh-booking-modal-facility"},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(s),1)]),e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,({name:l},f)=>(e.openBlock(),e.createElementBlock("li",{key:f},e.toDisplayString(l),1))),128))])])),[[i]])),128))])),[[a]])])):e.createCommentVNode("",!0)]),_:1},8,["title","description"])}}});const xt=e._export_sfc(St,[["__scopeId","data-v-4e226a17"]]),It={class:"fresh-booking-listing-config-body"},Dt={class:"fresh-booking-listing-units-body"};const $t=e.defineComponent({__name:"Hotel",props:{room:{},layout:{}},setup(n){const t=n,{t:o}=e.useI18n(),i=e.ref([]);function a(k){i.value[k].config.push({id:NaN,units:0,addons:[]})}const s=e.computed(()=>t.room.rates.map(k=>({label:k.name,value:k.id}))),u=e.computed(()=>i.value.flatMap(k=>k.id));e.computed(()=>s.value.filter(k=>!u.value.includes(k.value))),e.storeToRefs(e.useUtilityStore());const{roomSelect:p}=e.storeToRefs(U.useHotelStore()),{viewItem:l}=_t(),f=(k,B)=>t.room.rates.find(E=>E.id===k)?.occupantRates.find(E=>E.index===B),y=e.computed(()=>t.room.rates.reduce((k,B)=>k<B.rackRate?k:B.rackRate,1/0)),m=e.computed(()=>t.room.rates.every(k=>k.isBreakfastIncluded===!0)),b=(k,B)=>f(k,B)?f(k,B)?.rooms:null,c=k=>t.room.rates.length>0?t.room.rates.find(B=>B.id===k)?.occupantRates.map(B=>({value:B.index,price:B.totalPrice,adults:B.adultsCount,children:B.childrenCount,hasBreakfast:B.hasBreakfast}))||[]:[],v=e.computed(()=>t.room.rates.length>1),{open:_,close:h}=e.Go({component:xt,attrs:{title:t.room.title,description:t.room.description,facilities:t.room.facilities,onConfirm(){h()}}});function r(){_(),l(t.room.title)}function d(){v.value?i.value.push({id:void 0,config:[{id:t.room.rates[0].occupantRateIndex||NaN,units:0,addons:[]}]}):i.value.push({id:t.room.rates[0].id,config:[{id:t.room.rates[0].occupantRateIndex||NaN,units:0,addons:[]}]})}e.onMounted(()=>{d()});const g=e.computed(()=>JSON.parse(JSON.stringify(i.value)));return e.watch(g,(k,B)=>{B.length>0&&k.forEach((E,N)=>{E.config.forEach((I,T)=>{const x=I.units,$=B[N].config[T].units;x!==$&&(x>$?i.value[N].config[T].addons.push({}):i.value[N].config[T].addons.pop())})})},{deep:!0}),e.watch(i,()=>{p.value[t.room.id]=i.value},{deep:!0}),(k,B)=>(e.openBlock(),e.createBlock(j.Base,{"listing-id":k.room.id,gallery:k.room.images,name:k.room.title,description:k.room.description,layout:k.layout,facilities:k.room.facilities,"prices-from":y.value,"includes-breakfast":m.value,callback:r,style:{"--inputBackground":"transparent"}},{action:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(E,N)=>(e.openBlock(),e.createElementBlock("div",{key:E.id,class:"freshbooking-hotel-room"},[v.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,modelValue:E.id,"onUpdate:modelValue":I=>E.id=I,label:e.unref(o)("hotel.roomVariant"),placeholder:e.unref(o)("hotel.chooseARoomVariant"),options:s.value},null,8,["modelValue","onUpdate:modelValue","label","placeholder","options"])):e.createCommentVNode("",!0),e.createBaseVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.room.rates,({id:I,maximumAdults:T})=>(e.openBlock(),e.createElementBlock("div",{key:I},[E.id===I?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.config,(x,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:"booking-availability-listing-action-selective"},[e.createBaseVNode("ul",It,[(e.openBlock(),e.createBlock(Et,{key:0,modelValue:x.id,"onUpdate:modelValue":F=>x.id=F,description:`Maximum adults: ${T}`,icon:"male","icon-type":"fas",label:e.unref(o)("availability.adults"),options:c(I)},null,8,["modelValue","onUpdate:modelValue","description","label","options"]))]),e.createBaseVNode("ul",Dt,[e.createVNode(yt._sfc_main,{modelValue:x.units,"onUpdate:modelValue":F=>x.units=F,description:`Available units: ${b(E.id,x.id)}`,icon:"house","icon-type":"fas","icon-placement":"label",label:e.unref(o)("booking.availability.units"),minValue:0,"max-value":b(I,x.id)||1/0},null,8,["modelValue","onUpdate:modelValue","description","label","max-value"])]),e.createCommentVNode("",!0)]))),128)):e.createCommentVNode("",!0)]))),128))])]))),128))]),_:1},8,["listing-id","gallery","name","description","layout","facilities","prices-from","includes-breakfast"]))}});const wt=e._export_sfc($t,[["__scopeId","data-v-2d10462e"]]),Be=e.defineComponent({__name:"TimeField",props:{modelValue:{},label:{},id:{},name:{},placeholder:{},icon:{},iconColor:{},iconType:{},primaryColor:{},secondaryColor:{},weekendColor:{},highlightedColor:{},required:{type:Boolean},readonly:{type:Boolean},disabled:{type:Boolean},inline:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},inputStyle:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n;function i(s){t("update:modelValue",s)}const a=e.ref(o.modelValue);return e.watch(a,s=>{i(s)}),(s,u)=>(e.openBlock(),e.createBlock(U._sfc_main,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=p=>a.value=p),type:"time",label:s.label,id:s.id,name:s.name,icon:s.icon,"icon-type":s.iconType,"icon-color":s.iconColor,"auto-apply":!0,required:s.required,readonly:s.readonly},null,8,["modelValue","label","id","name","icon","icon-type","icon-color","required","readonly"]))}});const Lt={style:{display:"flex","align-items":"baseline"}},Pt=e.defineComponent({__name:"CountryField",props:{modelValue:{},options:{},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},label:{},placeholder:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,{t:i}=e.useI18n();function a(u){t("update:modelValue",u)}const s=e.computed({get:()=>o.modelValue,set:u=>a(u)});return(u,p)=>(e.openBlock(),e.createBlock(P._sfc_main,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=l=>s.value=l),label:u.label,placeholder:e.unref(i)("booking.reservation.countryPlaceholder"),labelKey:"name",valueKey:"id",options:u.options,required:u.required},{option:e.withCtx(({data:l})=>[e.createBaseVNode("i",{class:e.normalizeClass(["konnectio-flag-icon",l.iso])},null,2),e.createBaseVNode("span",null,e.toDisplayString(l.name),1)]),"selected-option":e.withCtx(({data:l})=>[e.createBaseVNode("div",Lt,[e.createBaseVNode("i",{class:e.normalizeClass(["konnectio-flag-icon",l.iso])},null,2),e.createBaseVNode("span",null,e.toDisplayString(l.name),1)])]),_:1},8,["modelValue","label","placeholder","options","required"]))}});const Ht=e._export_sfc(Pt,[["__scopeId","data-v-1462612d"]]),Rt=e.defineComponent({__name:"NameField",props:{modelValue:{},title:{},label:{},id:{},placeholder:{},icon:{},iconColor:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},type:{default:"text"},autocomplete:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},limit:{default:1/0},inputStyle:{},excludeTitle:{type:Boolean,default:!1}},emits:["update:modelValue","update:title"],setup(n,{emit:t}){const o=n,i=o.id||e.ranId(),a=e.ref(""),s=e.ref(2);function u(){t("update:modelValue",a.value)}e.watch(s,l=>{t("update:title",l)});const{t:p}=e.useI18n();return e.onMounted(()=>{o.modelValue&&(a.value=o.modelValue),o.title&&(s.value=o.title)}),(l,f)=>(e.openBlock(),e.createBlock(e.InputField,{label:l.label,id:e.unref(i),required:l.required,type:"fresh-booking-name-field",readonly:l.readonly,limit:l.limit},{default:e.withCtx(()=>[e.createBaseVNode("div",{class:e.normalizeClass(["fresh-booking-name-input",{"no-title":l.excludeTitle}])},[l.excludeTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P._sfc_main,{key:0,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=y=>s.value=y),id:e.unref(e.ranId)(),icon:l.icon,"icon-color":l.iconColor,"icon-type":l.iconType,options:[{label:e.unref(p)("booking.reservation.noNameTitle"),value:1},{label:e.unref(p)("booking.reservation.nameTitleMr"),value:2},{label:e.unref(p)("booking.reservation.nameTitleMs"),value:3},{label:e.unref(p)("booking.reservation.nameTitleMrs"),value:4},{label:e.unref(p)("booking.reservation.nameTitleDr"),value:5}],readonly:l.readonly,"hide-button":"","input-style":l.inputStyle},null,8,["modelValue","id","icon","icon-color","icon-type","options","readonly","input-style"])),e.createVNode(P.TextField,{modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=y=>a.value=y),type:"text",name:"name",autocomplete:"name",id:e.unref(i),icon:l.excludeTitle?l.icon:void 0,"icon-color":l.iconColor,"icon-type":l.iconType,placeholder:l.placeholder,required:l.required,readonly:l.readonly,limit:l.limit,onInput:f[2]||(f[2]=y=>u()),"input-style":l.inputStyle},null,8,["modelValue","id","icon","icon-color","icon-type","placeholder","required","readonly","limit","input-style"])],2)]),_:1},8,["label","id","required","readonly","limit"]))}});const Ot=e._export_sfc(Rt,[["__scopeId","data-v-5599e141"]]),Ft={class:"hotel-listing"},Mt={class:"hotel-listing-content-gallery"},zt={class:"hotel-listing-content-thumbs"},At={class:"hotel-listing-content"},Wt={class:"hotel-listing-content-header"},Ut={class:"hotel-listing-content-title"},qt={class:"hotel-listing-content-body"},jt={class:"hotel-listing-content-facilities"},Gt=e.defineComponent({__name:"Listing",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Ft,[e.createBaseVNode("div",Mt,[e.createVNode(R.Element,{width:"280px",height:"153px"}),e.createBaseVNode("div",zt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createVNode(R.Element,{key:i,width:"84px",height:"44px"})),64))])]),e.createBaseVNode("div",At,[e.createBaseVNode("div",Wt,[e.createBaseVNode("div",Ut,[e.createVNode(R.Element,{height:"30px",width:"60%"}),e.createVNode(R.Element,{height:"30px",width:"30px","border-radius":"100%"})]),e.createVNode(R.Element,{height:"15px",width:"25%"})]),e.createBaseVNode("div",qt,[e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px",width:"90%"})]),e.createBaseVNode("div",jt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,i=>e.createVNode(R.Element,{key:i,height:"25px",width:"25px","border-radius":"6px"})),64))])])]))}});const Y=e._export_sfc(Gt,[["__scopeId","data-v-5c132d7f"]]),Yt={class:"hotel-skeleton"},Kt={class:"hotel-skeleton-content"},Qt={class:"hotel-skeleton-sidebar"},Jt=e.defineComponent({__name:"HotelSkeleton",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Yt,[e.createBaseVNode("div",Kt,[e.createVNode(Re.AvailabilitySkeleton),e.createVNode(Y),e.createVNode(Y),e.createVNode(Y)]),e.createBaseVNode("div",Qt,[e.createVNode(j.Sidebar)])]))}});const Xt=e._export_sfc(Jt,[["__scopeId","data-v-11247c5f"]]),Zt={id:"booking-availability-container"},eo={id:"booking-availability-controls"},to={key:0,"sticky-container":""},oo={key:0},no={key:0},io={key:0};const ro={id:"booking-availability-listings"},so={key:1,id:"booking-availability-no-listings"},ao={key:1,id:"booking-availability-no-listings"},lo={key:2,id:"reservation-availability-next-dates"},uo={class:"reservation-special-offers-grid"},co=["title"],po={key:1,class:"konnectio-listing-loading"},fo={class:"fresh-booking-panel"},ho={key:0},mo={key:1},go={class:"fresh-booking-split-inputs"},yo={key:3},vo={class:"fresh-booking-label"},_o={class:"fresh-booking-checkbox-spacing"},ko={class:"booking-reservation-resume-recept-item"},bo={key:1},Bo={class:"fresh-booking-checkbox-spacing"},Vo=["onClick"],Eo=e.defineComponent({name:"HotelLayout",__name:"Hotel",props:{accessToken:{},headerLayout:{default:e.BookingHeaderLayout.Minimal},hideListingGroupTitles:{},layout:{},packagesTitleMaxLines:{default:"2"},styling:{}},setup(n){const{t}=e.useI18n(),{templateID:o,title:i,countries:a,areListingsLoading:s,isAvailabilityDataAvailable:u,isPaymentLoading:p,isReservationFormFilled:l,selectedPackage:f,travelingFor:y,arrivalTime:m,departureTime:b,name:c,nameTitle:v,email:_,phone:h,firmName:r,postal:d,city:g,address:k,country:B,remark:E,allergies:N,newsMails:I,roomSelect:T,roomDisplay:x,hasValidRoomSelection:$,getSelectedPackageRoom:F,availabilityData:A}=e.storeToRefs(U.useHotelStore()),{arrivalDate:je,departureDate:Ge}=e.storeToRefs(U.useAvailabilityStore()),{currency:G,isRecaptchaEnabled:En,disableNewsletterSignup:Ye,arrivalEarliest:Ke,arrivalLatest:Qe,departureEarliest:Je,departureLatest:Xe,enableTracking:Cn,arrivalDefault:Ze,departureDefault:et,enablePackages:Nn,hideArrivalDepartureInputs:tt,disableArrivalUserSelection:ie,disableNamePrefix:ot,disableDepartureUserSelection:re,disableTravelingFor:nt,disableCompanyField:it}=e.storeToRefs(e.useUtilityStore());e.useAlertStore();const{initialize:rt,createReservation:st,getSingleListing:Tn}=U.useHotelStore(),at=e.computed(()=>[[parseInt(Ke.value.split(":")[0]),parseInt(Qe.value.split(":")[0])]]),lt=e.computed(()=>[[parseInt(Je.value.split(":")[0]),parseInt(Xe.value.split(":")[0])]]);function ut(){o.value=NaN}function ct(L){L()}function dt(L,C){je.value=new Date(L),Ge.value=new Date(C),location.reload()}async function pt(L){await st(L)}function ft(L){L()}function ht(){m.value===""&&(m.value=Ze.value),b.value===""&&(b.value=et.value)}return e.onMounted(()=>{rt(),ht()}),(L,C)=>{const mt=e.resolveDirective("snip");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-hotel-module","access-token":L.accessToken,type:"hotel",styling:L.styling},{default:e.withCtx(()=>[e.createVNode(j.MultiStepForm,{title:e.unref(i),layout:L.headerLayout},{availability:e.withCtx(({next:se})=>[e.createVNode(be,null,{form:e.withCtx(()=>[e.createBaseVNode("div",Zt,[e.createBaseVNode("div",eo,[e.createVNode(Re.HotelAvailabilityForm,{booking:!0})]),e.unref(s)?(e.openBlock(),e.createElementBlock("div",po,[e.createVNode(Y),e.createVNode(Y),e.createVNode(Y)])):(e.openBlock(),e.createElementBlock("div",to,[e.unref(A).roomGroups.length>0?(e.openBlock(),e.createElementBlock("div",oo,[isNaN(e.unref(o))?(e.openBlock(),e.createElementBlock("div",no,[e.unref(A).roomGroups.length>0?(e.openBlock(),e.createElementBlock("div",io,[e.createCommentVNode("",!0),e.createBaseVNode("ul",ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A).roomGroups,(w,V)=>(e.openBlock(),e.createBlock(wt,{room:w,layout:L.layout,key:V},null,8,["room","layout"]))),128))])])):(e.openBlock(),e.createElementBlock("div",so,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nothingAvailable")),1)]))])):e.createCommentVNode("",!0)])):e.unref(A).nextAvailableDates.length===0?(e.openBlock(),e.createElementBlock("div",ao,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nothingAvailable")),1)])):(e.openBlock(),e.createElementBlock("div",lo,[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"calendar-circle-exclamation",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nextAvailableDates")),1)]),e.createBaseVNode("ul",uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A).nextAvailableDates,(w,V)=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createBaseVNode("h3",{title:`${e.unref(e.showDate)(w.fromDate)} - ${e.unref(e.showDate)(w.toDate)}`},[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createTextVNode(e.toDisplayString(`${e.unref(e.showDate)(w.fromDate)} - ${e.unref(e.showDate)(w.toDate)}`),1)])),[[mt,{lines:1}]])],8,co),e.createBaseVNode("ul",null,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"house",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.units"))+": "+e.toDisplayString(w.roomCount),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.pricesFrom"))+": "+e.toDisplayString(e.unref(e.showPrice)(w.priceStartFrom,e.unref(G))),1)])]),e.createVNode(e.Clickable,{label:e.unref(t)("booking.availability.selectDates"),"full-width":"",onClickEvent:X=>dt(w.fromDate,w.toDate)},null,8,["label","onClickEvent"])]))),128))])]))]))])]),navigation:e.withCtx(()=>[isNaN(e.unref(o))?(e.openBlock(),e.createBlock(e.Clickable,{key:0,label:e.unref(t)("booking.availability.nextButton"),disabled:!e.unref($),"is-loading":!1,"full-width":"",onClickEvent:w=>ft(se)},null,8,["label","disabled","onClickEvent"])):(e.openBlock(),e.createBlock(e.Clickable,{key:1,label:e.unref(t)("booking.reservation.prevButton"),"full-width":"",onClickEvent:C[0]||(C[0]=w=>ut())},null,8,["label"]))]),_:2},1024)]),reservation:e.withCtx(({next:se,prev:w})=>[e.createVNode(be,{"show-terms-notice":!0,"show-gift-card":!0},e.createSlots({form:e.withCtx(()=>[e.createBaseVNode("form",fo,[!e.unref(tt)&&!(e.unref(ie)&&e.unref(re))?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass({"fresh-booking-split-inputs":!e.unref(ie)&&!e.unref(re)})},[e.unref(ie)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",ho,[e.createVNode(Be,{modelValue:e.unref(m),"onUpdate:modelValue":C[1]||(C[1]=V=>e.isRef(m)?m.value=V:null),label:e.unref(t)("booking.reservation.arrivalTime"),icon:"hourglass-start","hour-range":at.value,required:""},null,8,["modelValue","label","hour-range"])])),e.unref(re)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",mo,[e.createVNode(Be,{modelValue:e.unref(b),"onUpdate:modelValue":C[2]||(C[2]=V=>e.isRef(b)?b.value=V:null),label:e.unref(t)("booking.reservation.departureTime"),icon:"hourglass-end","hour-range":lt.value,required:""},null,8,["modelValue","label","hour-range"])]))],2)):e.createCommentVNode("",!0),e.createVNode(Ot,{modelValue:e.unref(c),"onUpdate:modelValue":C[3]||(C[3]=V=>e.isRef(c)?c.value=V:null),title:e.unref(v),"onUpdate:title":C[4]||(C[4]=V=>e.isRef(v)?v.value=V:null),"exclude-title":e.unref(ot),label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","title","exclude-title","label","placeholder"]),e.createVNode(P.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":C[5]||(C[5]=V=>e.isRef(_)?_.value=V:null),type:"email",name:"email",autocomplete:"email",label:e.unref(t)("booking.reservation.email"),icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(Ye)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.Checkbox,{key:1,modelValue:e.unref(I),"onUpdate:modelValue":C[6]||(C[6]=V=>e.isRef(I)?I.value=V:null),type:"checkbox",name:"newsletter",label:e.unref(t)("booking.reservation.newsletterSignUp")},null,8,["modelValue","label"])),e.unref(it)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P.TextField,{key:2,modelValue:e.unref(r),"onUpdate:modelValue":C[7]||(C[7]=V=>e.isRef(r)?r.value=V:null),type:"text",name:"firm",autocomplete:"firm",label:`${e.unref(t)("booking.reservation.companyName")} (${e.unref(t)("booking.reservation.optional")})`,icon:"id-card",placeholder:e.unref(t)("booking.reservation.companyNamePlaceholder")},null,8,["modelValue","label","placeholder"])),e.createVNode(D.PhoneField,{modelValue:e.unref(h),"onUpdate:modelValue":C[8]||(C[8]=V=>e.isRef(h)?h.value=V:null),icon:"phone-office",label:e.unref(t)("booking.reservation.phone"),placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(Ht,{modelValue:e.unref(B),"onUpdate:modelValue":C[9]||(C[9]=V=>e.isRef(B)?B.value=V:null),label:e.unref(t)("booking.reservation.country"),placeholder:e.unref(t)("booking.reservation.countryPlaceholder"),options:e.unref(a),required:""},null,8,["modelValue","label","placeholder","options"]),e.createVNode(P.TextField,{modelValue:e.unref(k),"onUpdate:modelValue":C[10]||(C[10]=V=>e.isRef(k)?k.value=V:null),type:"textarea",name:"address",autocomplete:"street-address",label:e.unref(t)("booking.reservation.streetAddress"),icon:"map-marked",placeholder:e.unref(t)("booking.reservation.streetAddressPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createBaseVNode("ul",go,[e.createBaseVNode("li",null,[e.createVNode(P.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":C[11]||(C[11]=V=>e.isRef(d)?d.value=V:null),type:"number",name:"postal",autocomplete:"postal-code",label:e.unref(t)("booking.reservation.postal"),icon:"mailbox",placeholder:e.unref(t)("booking.reservation.postalPlaceholder"),required:""},null,8,["modelValue","label","placeholder"])]),e.createBaseVNode("li",null,[e.createVNode(P.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":C[12]||(C[12]=V=>e.isRef(g)?g.value=V:null),type:"text",name:"city",autocomplete:"address-level2",label:e.unref(t)("booking.reservation.city"),icon:"city",placeholder:e.unref(t)("booking.reservation.cityPlaceholder"),required:""},null,8,["modelValue","label","placeholder"])])]),e.createVNode(P.TextField,{modelValue:e.unref(E),"onUpdate:modelValue":C[13]||(C[13]=V=>e.isRef(E)?E.value=V:null),type:"textarea",label:`${e.unref(t)("booking.reservation.remark")} (${e.unref(t)("booking.reservation.optional")})`,icon:"info-circle",placeholder:e.unref(t)("booking.reservation.remarkPlaceholder")},null,8,["modelValue","label","placeholder"]),e.createVNode(P.TextField,{modelValue:e.unref(N),"onUpdate:modelValue":C[14]||(C[14]=V=>e.isRef(N)?N.value=V:null),type:"textarea",label:`${e.unref(t)("booking.reservation.allergies")} (${e.unref(t)("booking.reservation.optional")})`,icon:"allergies",placeholder:e.unref(t)("booking.reservation.allergiesPlaceholder")},null,8,["modelValue","label","placeholder"]),e.unref(nt)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yo,[e.createBaseVNode("label",vo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.purposeOfStay"))+" ("+e.toDisplayString(e.unref(t)("booking.reservation.optional"))+")",1)]),e.createBaseVNode("ul",_o,[e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[15]||(C[15]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.business"),val:"Business"},null,8,["modelValue","label"])]),e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[16]||(C[16]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.pleasure"),val:"Pleasure"},null,8,["modelValue","label"])]),e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[17]||(C[17]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.bleasure"),val:"Bleasure"},null,8,["modelValue","label"])])])]))])]),navigation:e.withCtx(()=>[e.createBaseVNode("div",null,[e.createVNode(e.Clickable,{label:e.unref(t)("general.confirmReservation"),disabled:!e.unref(l),"is-loading":e.unref(p),"full-width":"",onClickEvent:V=>pt(se)},null,8,["label","disabled","is-loading","onClickEvent"]),e.createBaseVNode("button",{class:"konnectio-abort-reservation",onClick:e.withModifiers(V=>ct(w),["prevent"])},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("general.abortReservation")),1)],8,Vo)])]),_:2},[isNaN(e.unref(o))?{name:"addons",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),V=>(e.openBlock(),e.createElementBlock("li",{key:V.roomGroupID},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(V.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.variants,(X,O)=>(e.openBlock(),e.createElementBlock("div",{key:X.ratePlanID},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.rooms,(S,gt)=>(e.openBlock(),e.createElementBlock("div",{key:gt},[e.createBaseVNode("div",ko,[e.createBaseVNode("span",null,e.toDisplayString(`${X.name}`),1),e.createBaseVNode("b",null,[e.createVNode(e.Icon,{icon:"male",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(S.adultsCount),1),S.childrenCount>0?(e.openBlock(),e.createBlock(e.Icon,{key:0,icon:"child",type:"fas",color:"font"})):e.createCommentVNode("",!0),S.childrenCount>0?(e.openBlock(),e.createElementBlock("span",bo,e.toDisplayString(S.childrenCount),1)):e.createCommentVNode("",!0)])]),e.createBaseVNode("ul",Bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.addons,({quantityStrategy:K,id:H,name:Q,price:J})=>(e.openBlock(),e.createElementBlock("li",{key:H},[K===e.unref(e.QuantityStrategy).PerAdultPerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:0,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perAdultPerNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerChildPerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:1,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perChildPerNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:2,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerUnit?(e.openBlock(),e.createBlock(D.Checkbox,{key:3,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).OneTimePayment?(e.openBlock(),e.createBlock(D.Checkbox,{key:4,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):e.createCommentVNode("",!0)]))),128))])]))),128))]))),128))]))),128))]),key:"0"}:void 0]),1024)]),payment:e.withCtx(()=>[e.createVNode(D.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(j.ThankYou,{message:e.unref(t)("booking.confirmation.thankYou")},null,8,["message"])]),_:1},8,["title","layout"])]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Xt)]),_:1})}}});const Co=e._export_sfc(Eo,[["__scopeId","data-v-c9364080"]]);var Oe={exports:{}},ae={exports:{}},le={exports:{}},Ve;function _e(){return Ve||(Ve=1,function(n){(function(t,o){n.exports?n.exports=o():t.EvEmitter=o()})(typeof window<"u"?window:ne.commonjsGlobal,function(){function t(){}var o=t.prototype;return o.on=function(i,a){if(!(!i||!a)){var s=this._events=this._events||{},u=s[i]=s[i]||[];return u.indexOf(a)==-1&&u.push(a),this}},o.once=function(i,a){if(!(!i||!a)){this.on(i,a);var s=this._onceEvents=this._onceEvents||{},u=s[i]=s[i]||{};return u[a]=!0,this}},o.off=function(i,a){var s=this._events&&this._events[i];if(!(!s||!s.length)){var u=s.indexOf(a);return u!=-1&&s.splice(u,1),this}},o.emitEvent=function(i,a){var s=this._events&&this._events[i];if(!(!s||!s.length)){s=s.slice(0),a=a||[];for(var u=this._onceEvents&&this._onceEvents[i],p=0;p<s.length;p++){var l=s[p],f=u&&u[l];f&&(this.off(i,l),delete u[l]),l.apply(this,a)}return this}},o.allOff=function(){delete this._events,delete this._onceEvents},t})}(le)),le.exports}var ue={exports:{}};/*!
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs"),D=require("./index-e81b12be.cjs"),j=require("./ThankYou-2c1ee36b.cjs"),U=require("./DateField.vue_vue_type_style_index_0_lang-31a9e5dc.cjs"),Re=require("./AvailabilitySkeleton-3ba8c412.cjs"),yt=require("./NumberField.vue_vue_type_script_setup_true_lang-d756efc3.cjs"),P=require("./TextField-641e6fd1.cjs"),R=require("./_-82677476.cjs"),ne=require("./_commonjsHelpers-6763f629.cjs");require("./ActionField-8a007a6c.cjs");require("./Field-028d9987.cjs");const vt=["onClick"],be=e.defineComponent({__name:"HotelReservationForm",props:{showGiftCard:{type:Boolean,default:!1},showTermsNotice:{type:Boolean,default:!1}},setup(n){const{t}=e.useI18n(),o=e.useSlots(),{hideArrivalDepartureInputs:i,disableArrivalUserSelection:a,disableDepartureUserSelection:s,arrivalDefault:u,departureDefault:p,currency:l}=e.storeToRefs(e.useUtilityStore()),{arrivalDate:f,departureDate:y}=e.storeToRefs(U.useAvailabilityStore()),{arrivalTime:m,departureTime:b,roomDisplay:c,templateID:v,totalPrice:_,areListingsLoading:h}=e.storeToRefs(U.useHotelStore()),{removeRoom:r}=U.useHotelStore();function d(g){return g.reduce((B,{totalPrice:E})=>B+E,0)}return(g,k)=>(e.openBlock(),e.createBlock(j.ReservationForm,{"total-price":e.unref(_),"show-gift-card":g.showGiftCard,"show-terms-notice":g.showTermsNotice,"is-sidebar-loading":e.unref(h),notice:e.unref(t)("hotel.reservationNotice")},e.createSlots({form:e.withCtx(()=>[e.renderSlot(g.$slots,"form")]),"reservation-summary":e.withCtx(()=>[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.arrival")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(i)?e.unref(e.showDate)(e.unref(f)):`${e.unref(e.showDate)(e.unref(f))}, ${e.unref(a)?e.unref(u):e.unref(m)}`),1)]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.departure")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(i)?e.unref(e.showDate)(e.unref(y)):`${e.unref(e.showDate)(e.unref(y))}, ${e.unref(s)?e.unref(p):e.unref(b)}`),1)]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.nights")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.daysBetweenDates)(e.unref(f),e.unref(y)))+" "+e.toDisplayString(e.unref(e.lowercase)(e.unref(e.daysBetweenDates)(e.unref(f),e.unref(y))===1?e.unref(t)("booking.reservation.night"):e.unref(t)("booking.reservation.nights"))),1)])]),"price-summary":e.withCtx(()=>[isNaN(e.unref(v))&&e.unref(c).length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(c),({roomGroupID:B,title:E,variants:N})=>(e.openBlock(),e.createElementBlock("div",{key:B},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(E),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N,(I,T)=>(e.openBlock(),e.createElementBlock("div",{key:T},[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.rooms,(x,$)=>(e.openBlock(),e.createElementBlock("ul",{key:$},[e.createBaseVNode("li",null,[e.createBaseVNode("span",null,[e.createBaseVNode("span",null,e.toDisplayString(I.name),1),e.createBaseVNode("span",null,[e.createTextVNode("( "),e.createVNode(e.Icon,{icon:"male",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(x.adultsCount),1),e.createTextVNode(") "),x.childrenCount>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.Icon,{icon:"child",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(x.childrenCount),1),e.createTextVNode(") ")],64)):e.createCommentVNode("",!0)])]),e.createBaseVNode("b",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(e.showPrice)(x.totalPrice,e.unref(l))),1),e.createBaseVNode("span",{class:"fresh-booking-footer-summery-remove",onClick:e.withModifiers(F=>e.unref(r)(B,T,$),["prevent"])},[e.createVNode(e.Icon,{icon:"times",type:"fas","icon-color":"#ff0000"})],8,vt)])]),e.createBaseVNode("li",null,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.addons")),1),e.createBaseVNode("b",null,e.toDisplayString(e.unref(e.showPrice)(d(x.roomAddons),e.unref(l))),1)])]))),128))]))),128))]))),128)):e.createCommentVNode("",!0)]),navigation:e.withCtx(()=>[e.renderSlot(g.$slots,"navigation")]),_:2},[e.unref(o).addons?{name:"addons",fn:e.withCtx(()=>[e.renderSlot(g.$slots,"addons")]),key:"0"}:void 0]),1032,["total-price","show-gift-card","show-terms-notice","is-sidebar-loading","notice"]))}}),_t=e.defineStore("tracking",()=>{const{enableTracking:n,googleApiKey:t}=e.storeToRefs(e.useUtilityStore());function o(){console.log("Tracking"),console.log(t),D.setOptions({config:{id:t.value,params:{send_page_view:!1}},enabled:n.value})}function i({id:l,name:f,value:y,label:m,category:b="general"}){return{items:[{id:l,name:f}],event_label:m,event_category:b,value:y}}function a(l,f){D.event(l,i(f))}function s(l,f,y){a("add_to_cart",{id:l,name:f,value:y,label:"Added to cart",category:"ecommerce"})}function u(l,f,y){a("remove_from_cart",{id:l,name:f,value:y,label:"Removed to cart",category:"ecommerce"})}function p(l){D.event("view_item",{items:[{name:l}]})}return{setup:o,viewItem:p,addToCart:s,removeFromCart:u}}),kt={style:{display:"flex","align-items":"baseline"}},bt={key:0},Bt={style:{display:"flex","align-items":"baseline"}},Vt={key:0};const Et=e.defineComponent({__name:"RoomConfigField",props:{modelValue:{},options:{},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},label:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,{currency:i}=e.storeToRefs(e.useUtilityStore());function a(u){t("update:modelValue",u)}const s=e.computed({get:()=>o.modelValue,set:u=>a(u)});return(u,p)=>(e.openBlock(),e.createBlock(P._sfc_main,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=l=>s.value=l),label:u.label,placeholder:"Select guest configuration",labelKey:"label",valueKey:"value","icon-placement":"label",options:u.options,required:u.required},{option:e.withCtx(({data:l})=>[e.createBaseVNode("div",kt,[e.createBaseVNode("div",null,[e.createVNode(e.Icon,{icon:"male",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.adults}`),1)]),l.children>0?(e.openBlock(),e.createElementBlock("div",bt,[e.createVNode(e.Icon,{icon:"child",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.children}`),1)])):e.createCommentVNode("",!0),e.createBaseVNode("div",null,e.toDisplayString(`(${e.unref(e.showPrice)(l.price,e.unref(i))})`),1)])]),"selected-option":e.withCtx(({data:l})=>[e.createBaseVNode("div",Bt,[e.createBaseVNode("div",null,[e.createVNode(e.Icon,{icon:"male",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.adults}`),1)]),l.children>0?(e.openBlock(),e.createElementBlock("div",Vt,[e.createVNode(e.Icon,{icon:"child",type:"fas"}),e.createBaseVNode("span",null,e.toDisplayString(`${l.children}`),1)])):e.createCommentVNode("",!0),e.createCommentVNode("",!0)])]),_:1},8,["modelValue","label","options","required"]))}}),Ct={key:0,class:"fresh-booking-modal-facilities"},Nt={class:"fresh-booking-modal-facilities-masonry","transition-duration":"0s","destroy-delay":0,"percent-position":!0,"column-width":".grid-sizer","item-selector":".fresh-booking-modal-facility"},Tt={class:"grid-sizer"},St=e.defineComponent({__name:"Info",props:{title:{},description:{},facilities:{}},setup(n){return(t,o)=>{const i=e.resolveDirective("masonry-tile"),a=e.resolveDirective("masonry");return e.openBlock(),e.createBlock(j._sfc_main,{title:t.title,description:t.description},{default:e.withCtx(()=>[t.facilities&&t.facilities.length!==0?(e.openBlock(),e.createElementBlock("div",Ct,[e.withDirectives((e.openBlock(),e.createElementBlock("ul",Nt,[e.withDirectives(e.createBaseVNode("div",Tt,null,512),[[i]]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.facilities,({name:s,subFacilities:u},p)=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:p,class:"fresh-booking-modal-facility"},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(s),1)]),e.createBaseVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,({name:l},f)=>(e.openBlock(),e.createElementBlock("li",{key:f},e.toDisplayString(l),1))),128))])])),[[i]])),128))])),[[a]])])):e.createCommentVNode("",!0)]),_:1},8,["title","description"])}}});const xt=e._export_sfc(St,[["__scopeId","data-v-4e226a17"]]),It={class:"fresh-booking-listing-config-body"},Dt={class:"fresh-booking-listing-units-body"};const $t=e.defineComponent({__name:"Hotel",props:{room:{},layout:{}},setup(n){const t=n,{t:o}=e.useI18n(),i=e.ref([]);function a(k){i.value[k].config.push({id:NaN,units:0,addons:[]})}const s=e.computed(()=>t.room.rates.map(k=>({label:k.name,value:k.id}))),u=e.computed(()=>i.value.flatMap(k=>k.id));e.computed(()=>s.value.filter(k=>!u.value.includes(k.value))),e.storeToRefs(e.useUtilityStore());const{roomSelect:p}=e.storeToRefs(U.useHotelStore()),{viewItem:l}=_t(),f=(k,B)=>t.room.rates.find(E=>E.id===k)?.occupantRates.find(E=>E.index===B),y=e.computed(()=>t.room.rates.reduce((k,B)=>k<B.rackRate?k:B.rackRate,1/0)),m=e.computed(()=>t.room.rates.every(k=>k.isBreakfastIncluded===!0)),b=(k,B)=>f(k,B)?f(k,B)?.rooms:null,c=k=>t.room.rates.length>0?t.room.rates.find(B=>B.id===k)?.occupantRates.map(B=>({value:B.index,price:B.totalPrice,adults:B.adultsCount,children:B.childrenCount,hasBreakfast:B.hasBreakfast}))||[]:[],v=e.computed(()=>t.room.rates.length>1),{open:_,close:h}=e.Go({component:xt,attrs:{title:t.room.title,description:t.room.description,facilities:t.room.facilities,onConfirm(){h()}}});function r(){_(),l(t.room.title)}function d(){v.value?i.value.push({id:void 0,config:[{id:t.room.rates[0].occupantRateIndex||NaN,units:0,addons:[]}]}):i.value.push({id:t.room.rates[0].id,config:[{id:t.room.rates[0].occupantRateIndex||NaN,units:0,addons:[]}]})}e.onMounted(()=>{d()});const g=e.computed(()=>JSON.parse(JSON.stringify(i.value)));return e.watch(g,(k,B)=>{B.length>0&&k.forEach((E,N)=>{E.config.forEach((I,T)=>{const x=I.units,$=B[N].config[T].units;x!==$&&(x>$?i.value[N].config[T].addons.push({}):i.value[N].config[T].addons.pop())})})},{deep:!0}),e.watch(i,()=>{p.value[t.room.id]=i.value},{deep:!0}),(k,B)=>(e.openBlock(),e.createBlock(j.Base,{"listing-id":k.room.id,gallery:k.room.images,name:k.room.title,description:k.room.description,layout:k.layout,facilities:k.room.facilities,"prices-from":y.value,"includes-breakfast":m.value,callback:r,style:{"--inputBackground":"transparent"}},{action:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(E,N)=>(e.openBlock(),e.createElementBlock("div",{key:E.id,class:"freshbooking-hotel-room"},[v.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,modelValue:E.id,"onUpdate:modelValue":I=>E.id=I,label:e.unref(o)("hotel.roomVariant"),placeholder:e.unref(o)("hotel.chooseARoomVariant"),options:s.value},null,8,["modelValue","onUpdate:modelValue","label","placeholder","options"])):e.createCommentVNode("",!0),e.createBaseVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.room.rates,({id:I,maximumAdults:T})=>(e.openBlock(),e.createElementBlock("div",{key:I},[E.id===I?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.config,(x,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:"booking-availability-listing-action-selective"},[e.createBaseVNode("ul",It,[(e.openBlock(),e.createBlock(Et,{key:0,modelValue:x.id,"onUpdate:modelValue":F=>x.id=F,description:`Maximum adults: ${T}`,icon:"male","icon-type":"fas",label:e.unref(o)("availability.adults"),options:c(I)},null,8,["modelValue","onUpdate:modelValue","description","label","options"]))]),e.createBaseVNode("ul",Dt,[e.createVNode(yt._sfc_main,{modelValue:x.units,"onUpdate:modelValue":F=>x.units=F,description:`Available units: ${b(E.id,x.id)}`,icon:"house","icon-type":"fas","icon-placement":"label",label:e.unref(o)("booking.availability.units"),minValue:0,"max-value":b(I,x.id)||1/0},null,8,["modelValue","onUpdate:modelValue","description","label","max-value"])]),e.createCommentVNode("",!0)]))),128)):e.createCommentVNode("",!0)]))),128))])]))),128))]),_:1},8,["listing-id","gallery","name","description","layout","facilities","prices-from","includes-breakfast"]))}});const wt=e._export_sfc($t,[["__scopeId","data-v-2d10462e"]]),Be=e.defineComponent({__name:"TimeField",props:{modelValue:{},label:{},id:{},name:{},placeholder:{},icon:{},iconColor:{},iconType:{},primaryColor:{},secondaryColor:{},weekendColor:{},highlightedColor:{},required:{type:Boolean},readonly:{type:Boolean},disabled:{type:Boolean},inline:{type:Boolean},range:{type:Boolean},enableTimePicker:{type:Boolean},inputStyle:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n;function i(s){t("update:modelValue",s)}const a=e.ref(o.modelValue);return e.watch(a,s=>{i(s)}),(s,u)=>(e.openBlock(),e.createBlock(U._sfc_main,{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=p=>a.value=p),type:"time",label:s.label,id:s.id,name:s.name,icon:s.icon,"icon-type":s.iconType,"icon-color":s.iconColor,"auto-apply":!0,required:s.required,readonly:s.readonly},null,8,["modelValue","label","id","name","icon","icon-type","icon-color","required","readonly"]))}});const Lt={style:{display:"flex","align-items":"baseline"}},Pt=e.defineComponent({__name:"CountryField",props:{modelValue:{},options:{},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},label:{},placeholder:{}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,{t:i}=e.useI18n();function a(u){t("update:modelValue",u)}const s=e.computed({get:()=>o.modelValue,set:u=>a(u)});return(u,p)=>(e.openBlock(),e.createBlock(P._sfc_main,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=l=>s.value=l),label:u.label,placeholder:e.unref(i)("booking.reservation.countryPlaceholder"),labelKey:"name",valueKey:"id",options:u.options,required:u.required},{option:e.withCtx(({data:l})=>[e.createBaseVNode("i",{class:e.normalizeClass(["konnectio-flag-icon",l.iso])},null,2),e.createBaseVNode("span",null,e.toDisplayString(l.name),1)]),"selected-option":e.withCtx(({data:l})=>[e.createBaseVNode("div",Lt,[e.createBaseVNode("i",{class:e.normalizeClass(["konnectio-flag-icon",l.iso])},null,2),e.createBaseVNode("span",null,e.toDisplayString(l.name),1)])]),_:1},8,["modelValue","label","placeholder","options","required"]))}});const Ht=e._export_sfc(Pt,[["__scopeId","data-v-1462612d"]]),Rt=e.defineComponent({__name:"NameField",props:{modelValue:{},title:{},label:{},id:{},placeholder:{},icon:{},iconColor:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},type:{default:"text"},autocomplete:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},limit:{default:1/0},inputStyle:{},excludeTitle:{type:Boolean,default:!1}},emits:["update:modelValue","update:title"],setup(n,{emit:t}){const o=n,i=o.id||e.ranId(),a=e.ref(""),s=e.ref(2);function u(){t("update:modelValue",a.value)}e.watch(s,l=>{t("update:title",l)});const{t:p}=e.useI18n();return e.onMounted(()=>{o.modelValue&&(a.value=o.modelValue),o.title&&(s.value=o.title)}),(l,f)=>(e.openBlock(),e.createBlock(e.InputField,{label:l.label,id:e.unref(i),required:l.required,type:"fresh-booking-name-field",readonly:l.readonly,limit:l.limit},{default:e.withCtx(()=>[e.createBaseVNode("div",{class:e.normalizeClass(["fresh-booking-name-input",{"no-title":l.excludeTitle}])},[l.excludeTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P._sfc_main,{key:0,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=y=>s.value=y),id:e.unref(e.ranId)(),icon:l.icon,"icon-color":l.iconColor,"icon-type":l.iconType,options:[{label:e.unref(p)("booking.reservation.noNameTitle"),value:1},{label:e.unref(p)("booking.reservation.nameTitleMr"),value:2},{label:e.unref(p)("booking.reservation.nameTitleMs"),value:3},{label:e.unref(p)("booking.reservation.nameTitleMrs"),value:4},{label:e.unref(p)("booking.reservation.nameTitleDr"),value:5}],readonly:l.readonly,"hide-button":"","input-style":l.inputStyle},null,8,["modelValue","id","icon","icon-color","icon-type","options","readonly","input-style"])),e.createVNode(P.TextField,{modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=y=>a.value=y),type:"text",name:"name",autocomplete:"name",id:e.unref(i),icon:l.excludeTitle?l.icon:void 0,"icon-color":l.iconColor,"icon-type":l.iconType,placeholder:l.placeholder,required:l.required,readonly:l.readonly,limit:l.limit,onInput:f[2]||(f[2]=y=>u()),"input-style":l.inputStyle},null,8,["modelValue","id","icon","icon-color","icon-type","placeholder","required","readonly","limit","input-style"])],2)]),_:1},8,["label","id","required","readonly","limit"]))}});const Ot=e._export_sfc(Rt,[["__scopeId","data-v-5599e141"]]),Ft={class:"hotel-listing"},Mt={class:"hotel-listing-content-gallery"},zt={class:"hotel-listing-content-thumbs"},At={class:"hotel-listing-content"},Wt={class:"hotel-listing-content-header"},Ut={class:"hotel-listing-content-title"},qt={class:"hotel-listing-content-body"},jt={class:"hotel-listing-content-facilities"},Gt=e.defineComponent({__name:"Listing",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Ft,[e.createBaseVNode("div",Mt,[e.createVNode(R.Element,{width:"280px",height:"153px"}),e.createBaseVNode("div",zt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createVNode(R.Element,{key:i,width:"84px",height:"44px"})),64))])]),e.createBaseVNode("div",At,[e.createBaseVNode("div",Wt,[e.createBaseVNode("div",Ut,[e.createVNode(R.Element,{height:"30px",width:"60%"}),e.createVNode(R.Element,{height:"30px",width:"30px","border-radius":"100%"})]),e.createVNode(R.Element,{height:"15px",width:"25%"})]),e.createBaseVNode("div",qt,[e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px"}),e.createVNode(R.Element,{height:"15px",width:"90%"})]),e.createBaseVNode("div",jt,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,i=>e.createVNode(R.Element,{key:i,height:"25px",width:"25px","border-radius":"6px"})),64))])])]))}});const Y=e._export_sfc(Gt,[["__scopeId","data-v-5c132d7f"]]),Yt={class:"hotel-skeleton"},Kt={class:"hotel-skeleton-content"},Qt={class:"hotel-skeleton-sidebar"},Jt=e.defineComponent({__name:"HotelSkeleton",setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",Yt,[e.createBaseVNode("div",Kt,[e.createVNode(Re.AvailabilitySkeleton),e.createVNode(Y),e.createVNode(Y),e.createVNode(Y)]),e.createBaseVNode("div",Qt,[e.createVNode(j.Sidebar)])]))}});const Xt=e._export_sfc(Jt,[["__scopeId","data-v-11247c5f"]]),Zt={id:"booking-availability-container"},eo={id:"booking-availability-controls"},to={key:0,"sticky-container":""},oo={key:0},no={key:0},io={key:0};const ro={id:"booking-availability-listings"},so={key:1,id:"booking-availability-no-listings"},ao={key:1,id:"booking-availability-no-listings"},lo={key:2,id:"reservation-availability-next-dates"},uo={class:"reservation-special-offers-grid"},co=["title"],po={key:1,class:"konnectio-listing-loading"},fo={class:"fresh-booking-panel"},ho={key:0},mo={key:1},go={class:"fresh-booking-split-inputs"},yo={key:3},vo={class:"fresh-booking-label"},_o={class:"fresh-booking-checkbox-spacing"},ko={class:"booking-reservation-resume-recept-item"},bo={key:1},Bo={class:"fresh-booking-checkbox-spacing"},Vo=["onClick"],Eo=e.defineComponent({name:"HotelLayout",__name:"Hotel",props:{accessToken:{},headerLayout:{default:e.BookingHeaderLayout.Minimal},hideListingGroupTitles:{},layout:{},packagesTitleMaxLines:{default:"2"},styling:{}},setup(n){const{t}=e.useI18n(),{templateID:o,title:i,countries:a,areListingsLoading:s,isAvailabilityDataAvailable:u,isPaymentLoading:p,isReservationFormFilled:l,selectedPackage:f,travelingFor:y,arrivalTime:m,departureTime:b,name:c,nameTitle:v,email:_,phone:h,firmName:r,postal:d,city:g,address:k,country:B,remark:E,allergies:N,newsMails:I,roomSelect:T,roomDisplay:x,hasValidRoomSelection:$,getSelectedPackageRoom:F,availabilityData:A}=e.storeToRefs(U.useHotelStore()),{arrivalDate:je,departureDate:Ge}=e.storeToRefs(U.useAvailabilityStore()),{currency:G,isRecaptchaEnabled:En,disableNewsletterSignup:Ye,arrivalEarliest:Ke,arrivalLatest:Qe,departureEarliest:Je,departureLatest:Xe,enableTracking:Cn,arrivalDefault:Ze,departureDefault:et,enablePackages:Nn,hideArrivalDepartureInputs:tt,disableArrivalUserSelection:ie,disableNamePrefix:ot,disableDepartureUserSelection:re,disableTravelingFor:nt,disableCompanyField:it}=e.storeToRefs(e.useUtilityStore());e.useAlertStore();const{initialize:rt,createReservation:st,getSingleListing:Tn}=U.useHotelStore(),at=e.computed(()=>[[parseInt(Ke.value.split(":")[0]),parseInt(Qe.value.split(":")[0])]]),lt=e.computed(()=>[[parseInt(Je.value.split(":")[0]),parseInt(Xe.value.split(":")[0])]]);function ut(){o.value=NaN}function ct(L){L()}function dt(L,C){je.value=new Date(L),Ge.value=new Date(C),location.reload()}async function pt(L){await st(L)}function ft(L){L()}function ht(){m.value===""&&(m.value=Ze.value),b.value===""&&(b.value=et.value)}return e.onMounted(()=>{rt(),ht()}),(L,C)=>{const mt=e.resolveDirective("snip");return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[e.createVNode(e._sfc_main,{id:"fresh-booking-hotel-module","access-token":L.accessToken,type:"hotel",styling:L.styling},{default:e.withCtx(()=>[e.createVNode(j.MultiStepForm,{title:e.unref(i),layout:L.headerLayout},{availability:e.withCtx(({next:se})=>[e.createVNode(be,null,{form:e.withCtx(()=>[e.createBaseVNode("div",Zt,[e.createBaseVNode("div",eo,[e.createVNode(Re.HotelAvailabilityForm,{booking:!0})]),e.unref(s)?(e.openBlock(),e.createElementBlock("div",po,[e.createVNode(Y),e.createVNode(Y),e.createVNode(Y)])):(e.openBlock(),e.createElementBlock("div",to,[e.unref(A).roomGroups.length>0?(e.openBlock(),e.createElementBlock("div",oo,[isNaN(e.unref(o))?(e.openBlock(),e.createElementBlock("div",no,[e.unref(A).roomGroups.length>0?(e.openBlock(),e.createElementBlock("div",io,[e.createCommentVNode("",!0),e.createBaseVNode("ul",ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A).roomGroups,(w,V)=>(e.openBlock(),e.createBlock(wt,{room:w,layout:L.layout,key:V},null,8,["room","layout"]))),128))])])):(e.openBlock(),e.createElementBlock("div",so,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nothingAvailable")),1)]))])):e.createCommentVNode("",!0)])):e.unref(A).nextAvailableDates.length===0?(e.openBlock(),e.createElementBlock("div",ao,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nothingAvailable")),1)])):(e.openBlock(),e.createElementBlock("div",lo,[e.createBaseVNode("h2",null,[e.createVNode(e.Icon,{icon:"calendar-circle-exclamation",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.nextAvailableDates")),1)]),e.createBaseVNode("ul",uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A).nextAvailableDates,(w,V)=>(e.openBlock(),e.createElementBlock("li",{key:V},[e.createBaseVNode("h3",{title:`${e.unref(e.showDate)(w.fromDate)} - ${e.unref(e.showDate)(w.toDate)}`},[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createTextVNode(e.toDisplayString(`${e.unref(e.showDate)(w.fromDate)} - ${e.unref(e.showDate)(w.toDate)}`),1)])),[[mt,{lines:1}]])],8,co),e.createBaseVNode("ul",null,[e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"house",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.units"))+": "+e.toDisplayString(w.roomCount),1)]),e.createBaseVNode("li",null,[e.createVNode(e.Icon,{icon:"money-bill",type:"fal",color:"header"}),e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.availability.pricesFrom"))+": "+e.toDisplayString(e.unref(e.showPrice)(w.priceStartFrom,e.unref(G))),1)])]),e.createVNode(e.Clickable,{label:e.unref(t)("booking.availability.selectDates"),"full-width":"",onClickEvent:X=>dt(w.fromDate,w.toDate)},null,8,["label","onClickEvent"])]))),128))])]))]))])]),navigation:e.withCtx(()=>[isNaN(e.unref(o))?(e.openBlock(),e.createBlock(e.Clickable,{key:0,label:e.unref(t)("booking.availability.nextButton"),disabled:!e.unref($),"is-loading":!1,"full-width":"",onClickEvent:w=>ft(se)},null,8,["label","disabled","onClickEvent"])):(e.openBlock(),e.createBlock(e.Clickable,{key:1,label:e.unref(t)("booking.reservation.prevButton"),"full-width":"",onClickEvent:C[0]||(C[0]=w=>ut())},null,8,["label"]))]),_:2},1024)]),reservation:e.withCtx(({next:se,prev:w})=>[e.createVNode(be,{"show-terms-notice":!0,"show-gift-card":!0},e.createSlots({form:e.withCtx(()=>[e.createBaseVNode("form",fo,[!e.unref(tt)&&!(e.unref(ie)&&e.unref(re))?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass({"fresh-booking-split-inputs":!e.unref(ie)&&!e.unref(re)})},[e.unref(ie)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",ho,[e.createVNode(Be,{modelValue:e.unref(m),"onUpdate:modelValue":C[1]||(C[1]=V=>e.isRef(m)?m.value=V:null),label:e.unref(t)("booking.reservation.arrivalTime"),icon:"hourglass-start","hour-range":at.value,required:""},null,8,["modelValue","label","hour-range"])])),e.unref(re)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",mo,[e.createVNode(Be,{modelValue:e.unref(b),"onUpdate:modelValue":C[2]||(C[2]=V=>e.isRef(b)?b.value=V:null),label:e.unref(t)("booking.reservation.departureTime"),icon:"hourglass-end","hour-range":lt.value,required:""},null,8,["modelValue","label","hour-range"])]))],2)):e.createCommentVNode("",!0),e.createVNode(Ot,{modelValue:e.unref(c),"onUpdate:modelValue":C[3]||(C[3]=V=>e.isRef(c)?c.value=V:null),title:e.unref(v),"onUpdate:title":C[4]||(C[4]=V=>e.isRef(v)?v.value=V:null),"exclude-title":e.unref(ot),label:e.unref(t)("booking.reservation.name"),icon:"user-alt",placeholder:e.unref(t)("booking.reservation.namePlaceholder"),required:""},null,8,["modelValue","title","exclude-title","label","placeholder"]),e.createVNode(P.TextField,{modelValue:e.unref(_),"onUpdate:modelValue":C[5]||(C[5]=V=>e.isRef(_)?_.value=V:null),type:"email",name:"email",autocomplete:"email",label:e.unref(t)("booking.reservation.email"),icon:"at",placeholder:e.unref(t)("booking.reservation.emailPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.unref(Ye)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.Checkbox,{key:1,modelValue:e.unref(I),"onUpdate:modelValue":C[6]||(C[6]=V=>e.isRef(I)?I.value=V:null),type:"checkbox",name:"newsletter",label:e.unref(t)("booking.reservation.newsletterSignUp")},null,8,["modelValue","label"])),e.unref(it)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P.TextField,{key:2,modelValue:e.unref(r),"onUpdate:modelValue":C[7]||(C[7]=V=>e.isRef(r)?r.value=V:null),type:"text",name:"firm",autocomplete:"firm",label:`${e.unref(t)("booking.reservation.companyName")} (${e.unref(t)("booking.reservation.optional")})`,icon:"id-card",placeholder:e.unref(t)("booking.reservation.companyNamePlaceholder")},null,8,["modelValue","label","placeholder"])),e.createVNode(D.PhoneField,{modelValue:e.unref(h),"onUpdate:modelValue":C[8]||(C[8]=V=>e.isRef(h)?h.value=V:null),icon:"phone-office",label:e.unref(t)("booking.reservation.phone"),placeholder:e.unref(t)("booking.reservation.phonePlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(Ht,{modelValue:e.unref(B),"onUpdate:modelValue":C[9]||(C[9]=V=>e.isRef(B)?B.value=V:null),label:e.unref(t)("booking.reservation.country"),placeholder:e.unref(t)("booking.reservation.countryPlaceholder"),options:e.unref(a),required:""},null,8,["modelValue","label","placeholder","options"]),e.createVNode(P.TextField,{modelValue:e.unref(k),"onUpdate:modelValue":C[10]||(C[10]=V=>e.isRef(k)?k.value=V:null),type:"textarea",name:"address",autocomplete:"street-address",label:e.unref(t)("booking.reservation.streetAddress"),icon:"map-marked",placeholder:e.unref(t)("booking.reservation.streetAddressPlaceholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createBaseVNode("ul",go,[e.createBaseVNode("li",null,[e.createVNode(P.TextField,{modelValue:e.unref(d),"onUpdate:modelValue":C[11]||(C[11]=V=>e.isRef(d)?d.value=V:null),type:"number",name:"postal",autocomplete:"postal-code",label:e.unref(t)("booking.reservation.postal"),icon:"mailbox",placeholder:e.unref(t)("booking.reservation.postalPlaceholder"),required:""},null,8,["modelValue","label","placeholder"])]),e.createBaseVNode("li",null,[e.createVNode(P.TextField,{modelValue:e.unref(g),"onUpdate:modelValue":C[12]||(C[12]=V=>e.isRef(g)?g.value=V:null),type:"text",name:"city",autocomplete:"address-level2",label:e.unref(t)("booking.reservation.city"),icon:"city",placeholder:e.unref(t)("booking.reservation.cityPlaceholder"),required:""},null,8,["modelValue","label","placeholder"])])]),e.createVNode(P.TextField,{modelValue:e.unref(E),"onUpdate:modelValue":C[13]||(C[13]=V=>e.isRef(E)?E.value=V:null),type:"textarea",label:`${e.unref(t)("booking.reservation.remark")} (${e.unref(t)("booking.reservation.optional")})`,icon:"info-circle",placeholder:e.unref(t)("booking.reservation.remarkPlaceholder")},null,8,["modelValue","label","placeholder"]),e.createVNode(P.TextField,{modelValue:e.unref(N),"onUpdate:modelValue":C[14]||(C[14]=V=>e.isRef(N)?N.value=V:null),type:"textarea",label:`${e.unref(t)("booking.reservation.allergies")} (${e.unref(t)("booking.reservation.optional")})`,icon:"allergies",placeholder:e.unref(t)("booking.reservation.allergiesPlaceholder")},null,8,["modelValue","label","placeholder"]),e.unref(nt)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yo,[e.createBaseVNode("label",vo,[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("booking.reservation.purposeOfStay"))+" ("+e.toDisplayString(e.unref(t)("booking.reservation.optional"))+")",1)]),e.createBaseVNode("ul",_o,[e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[15]||(C[15]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.business"),val:"Business"},null,8,["modelValue","label"])]),e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[16]||(C[16]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.pleasure"),val:"Pleasure"},null,8,["modelValue","label"])]),e.createBaseVNode("li",null,[e.createVNode(D.Checkbox,{modelValue:e.unref(y),"onUpdate:modelValue":C[17]||(C[17]=V=>e.isRef(y)?y.value=V:null),type:"radio",name:"travelingFor",label:e.unref(t)("booking.reservation.bleasure"),val:"Bleasure"},null,8,["modelValue","label"])])])]))])]),navigation:e.withCtx(()=>[e.createBaseVNode("div",null,[e.createVNode(e.Clickable,{label:e.unref(t)("general.confirmReservation"),disabled:!e.unref(l),"is-loading":e.unref(p),"full-width":"",onClickEvent:V=>pt(se)},null,8,["label","disabled","is-loading","onClickEvent"]),e.createBaseVNode("button",{class:"konnectio-abort-reservation",onClick:e.withModifiers(V=>ct(w),["prevent"])},[e.createBaseVNode("span",null,e.toDisplayString(e.unref(t)("general.abortReservation")),1)],8,Vo)])]),_:2},[isNaN(e.unref(o))?{name:"addons",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),V=>(e.openBlock(),e.createElementBlock("li",{key:V.roomGroupID},[e.createBaseVNode("h6",null,[e.createBaseVNode("span",null,e.toDisplayString(V.title),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.variants,(X,O)=>(e.openBlock(),e.createElementBlock("div",{key:X.ratePlanID},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.rooms,(S,gt)=>(e.openBlock(),e.createElementBlock("div",{key:gt},[e.createBaseVNode("div",ko,[e.createBaseVNode("span",null,e.toDisplayString(`${X.name}`),1),e.createBaseVNode("b",null,[e.createVNode(e.Icon,{icon:"male",type:"fas",color:"font"}),e.createBaseVNode("span",null,e.toDisplayString(S.adultsCount),1),S.childrenCount>0?(e.openBlock(),e.createBlock(e.Icon,{key:0,icon:"child",type:"fas",color:"font"})):e.createCommentVNode("",!0),S.childrenCount>0?(e.openBlock(),e.createElementBlock("span",bo,e.toDisplayString(S.childrenCount),1)):e.createCommentVNode("",!0)])]),e.createBaseVNode("ul",Bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.addons,({quantityStrategy:K,id:H,name:Q,price:J})=>(e.openBlock(),e.createElementBlock("li",{key:H},[K===e.unref(e.QuantityStrategy).PerAdultPerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:0,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perAdultPerNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerChildPerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:1,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perChildPerNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerNight?(e.openBlock(),e.createBlock(D.Checkbox,{key:2,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))} ${e.unref(t)("general.perNight")}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).PerUnit?(e.openBlock(),e.createBlock(D.Checkbox,{key:3,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):K===e.unref(e.QuantityStrategy).OneTimePayment?(e.openBlock(),e.createBlock(D.Checkbox,{key:4,modelValue:e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H],"onUpdate:modelValue":M=>e.unref(T)[V.roomGroupID][O].config[S.configIdx].addons[S.roomIdx][H]=M,label:Q,price:`${e.unref(e.showPrice)(J,e.unref(G))}`},null,8,["modelValue","onUpdate:modelValue","label","price"])):e.createCommentVNode("",!0)]))),128))])]))),128))]))),128))]))),128))]),key:"0"}:void 0]),1024)]),payment:e.withCtx(()=>[e.createVNode(D.CheckoutWindow)]),confirmation:e.withCtx(()=>[e.createVNode(j.ThankYou,{message:e.unref(t)("booking.confirmation.thankYou")},null,8,["message"])]),_:1},8,["title","layout"])]),_:1},8,["access-token","styling"])]),fallback:e.withCtx(()=>[e.createVNode(Xt)]),_:1})}}});const Co=e._export_sfc(Eo,[["__scopeId","data-v-c9364080"]]);var Oe={exports:{}},ae={exports:{}},le={exports:{}},Ve;function _e(){return Ve||(Ve=1,function(n){(function(t,o){n.exports?n.exports=o():t.EvEmitter=o()})(typeof window<"u"?window:ne.commonjsGlobal,function(){function t(){}var o=t.prototype;return o.on=function(i,a){if(!(!i||!a)){var s=this._events=this._events||{},u=s[i]=s[i]||[];return u.indexOf(a)==-1&&u.push(a),this}},o.once=function(i,a){if(!(!i||!a)){this.on(i,a);var s=this._onceEvents=this._onceEvents||{},u=s[i]=s[i]||{};return u[a]=!0,this}},o.off=function(i,a){var s=this._events&&this._events[i];if(!(!s||!s.length)){var u=s.indexOf(a);return u!=-1&&s.splice(u,1),this}},o.emitEvent=function(i,a){var s=this._events&&this._events[i];if(!(!s||!s.length)){s=s.slice(0),a=a||[];for(var u=this._onceEvents&&this._onceEvents[i],p=0;p<s.length;p++){var l=s[p],f=u&&u[l];f&&(this.off(i,l),delete u[l]),l.apply(this,a)}return this}},o.allOff=function(){delete this._events,delete this._onceEvents},t})}(le)),le.exports}var ue={exports:{}};/*!
|
|
2
2
|
* getSize v2.0.3
|
|
3
3
|
* measure size of elements
|
|
4
4
|
* MIT license
|
package/dist/hotel.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { h as J, y as ge, aE as eo, s as Q, a as ve, k as T, l as M, U as mt, n as d, w as D, ad as Oe, x as _, z as P, F as se, W as Qe, aF as to, q as S, a1 as W, a0 as R, t as A, a3 as Ee, m as C, B as q, D as te, G as gt, d as oo, c as Y, aa as Fe, ab as Te, _ as le, r as Ce, aD as io, o as Ge, $ as $e, v as Se, j as Je, I as no, aB as ro, u as so, J as ao, C as _e, aG as fe, A as B, H as lo, af as vt, aH as uo, N as co, a6 as po, M as ho, P as fo } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { s as mo, e as Xe, C as ee, P as go, a as vo, S as yo, i as _o } from "./index-
|
|
3
|
-
import { R as bo, _ as ko, B as Eo, S as To, M as Io, T as Co, x as $o } from "./ThankYou-
|
|
4
|
-
import { u as yt, a as me, _ as So } from "./DateField.vue_vue_type_style_index_0_lang-
|
|
5
|
-
import { A as Vo, H as xo } from "./AvailabilitySkeleton-
|
|
6
|
-
import { _ as Po } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as xe, T as re } from "./TextField-
|
|
8
|
-
import { E as G } from "./_-
|
|
1
|
+
import { h as J, y as ge, aE as eo, s as Q, a as ve, k as T, l as M, U as mt, n as d, w as D, ad as Oe, x as _, z as P, F as se, W as Qe, aF as to, q as S, a1 as W, a0 as R, t as A, a3 as Ee, m as C, B as q, D as te, G as gt, d as oo, c as Y, aa as Fe, ab as Te, _ as le, r as Ce, aD as io, o as Ge, $ as $e, v as Se, j as Je, I as no, aB as ro, u as so, J as ao, C as _e, aG as fe, A as B, H as lo, af as vt, aH as uo, N as co, a6 as po, M as ho, P as fo } from "./SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js";
|
|
2
|
+
import { s as mo, e as Xe, C as ee, P as go, a as vo, S as yo, i as _o } from "./index-a3de1ca3.js";
|
|
3
|
+
import { R as bo, _ as ko, B as Eo, S as To, M as Io, T as Co, x as $o } from "./ThankYou-6fc9044f.js";
|
|
4
|
+
import { u as yt, a as me, _ as So } from "./DateField.vue_vue_type_style_index_0_lang-3f5993f7.js";
|
|
5
|
+
import { A as Vo, H as xo } from "./AvailabilitySkeleton-0e6d048b.js";
|
|
6
|
+
import { _ as Po } from "./NumberField.vue_vue_type_script_setup_true_lang-d3b3206f.js";
|
|
7
|
+
import { _ as xe, T as re } from "./TextField-4e7defc6.js";
|
|
8
|
+
import { E as G } from "./_-f5a3364b.js";
|
|
9
9
|
import { c as _t, g as bt } from "./_commonjsHelpers-c5d32002.js";
|
|
10
|
-
import "./ActionField-
|
|
11
|
-
import "./Field-
|
|
10
|
+
import "./ActionField-d1266f8b.js";
|
|
11
|
+
import "./Field-ea77905a.js";
|
|
12
12
|
const Lo = ["onClick"], Ze = /* @__PURE__ */ J({
|
|
13
13
|
__name: "HotelReservationForm",
|
|
14
14
|
props: {
|
package/dist/hotel.js.br
CHANGED
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ae as isPlainObject, af as nextTick, ag as isFunction, h as defineComponent, j as ranId, r as ref, o as onMounted, k as openBlock, l as createBlock, w as withCtx, x as createBaseVNode, m as createVNode, n as unref, I as InputField, _ as _export_sfc, ah as mergeProps, v as normalizeClass, ai as normalizeStyle, aj as withKeys, q as createElementBlock, z as toDisplayString, t as createCommentVNode, y as useI18n, a3 as createTextVNode, s as storeToRefs, a as useUtilityStore, Q as PaymentGateway, K as pushScopeId, L as popScopeId } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { T as TextField } from "./TextField-
|
|
1
|
+
import { ae as isPlainObject, af as nextTick, ag as isFunction, h as defineComponent, j as ranId, r as ref, o as onMounted, k as openBlock, l as createBlock, w as withCtx, x as createBaseVNode, m as createVNode, n as unref, I as InputField, _ as _export_sfc, ah as mergeProps, v as normalizeClass, ai as normalizeStyle, aj as withKeys, q as createElementBlock, z as toDisplayString, t as createCommentVNode, y as useI18n, a3 as createTextVNode, s as storeToRefs, a as useUtilityStore, Q as PaymentGateway, K as pushScopeId, L as popScopeId } from "./SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js";
|
|
2
|
+
import { T as TextField } from "./TextField-4e7defc6.js";
|
|
3
3
|
function _defineProperty(e, t, n) {
|
|
4
4
|
return t in e ? Object.defineProperty(e, t, {
|
|
5
5
|
value: n,
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SelectField_vue_vue_type_style_index_0_lang=require("./SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs"),TextField=require("./TextField-528ca68c.cjs");function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,i)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(i){_defineProperty(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var load=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(i,l){if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");if(u.async=!0,u.src=t,u.defer=n.defer,n.preconnectOrigin){var s=document.createElement("link");s.href=n.preconnectOrigin,s.rel="preconnect",r.appendChild(s)}r.appendChild(u),u.onload=i,u.onerror=l}})},mergeDeep=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];if(!i.length)return t;var r=i.shift();if(!(!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(t)||!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(r))){for(var u in r)SelectField_vue_vue_type_style_index_0_lang.isPlainObject(r[u])?(t[u]||Object.assign(t,_defineProperty({},u,{})),e(t[u],r[u])):Object.assign(t,_defineProperty({},u,r[u]));return e.apply(void 0,[t].concat(i))}},isBrowser=function(){return!(typeof window>"u"||typeof document>"u")},warn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;isBrowser()},validateScreenviewShape=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return warn('Missing "appName" property inside the plugin options.',t.app_name==null),warn('Missing "name" property in the route.',t.screen_name==null),t};function getPathWithBase(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("/"),i=t.split("/");return n[0]===""&&t[t.length-1]==="/"&&n.shift(),i.join("/")+n.join("/")}var getDefaultParams=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},params={},setOptions=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=getDefaultParams();params=mergeDeep(n,t)},getOptions=function(){return params},query=function(){var e,t=getOptions(),n=t.globalObjectName;!isBrowser()||typeof window[n]>"u"||(e=window)[n].apply(e,arguments)},config=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=getOptions(),l=i.config,r=i.includes;query.apply(void 0,["config",l.id].concat(t)),Array.isArray(r)&&r.forEach(function(u){query.apply(void 0,["config",u.id].concat(t))})},assignGlobalProperty=function(t,n){isBrowser()&&(window["ga-disable-".concat(t)]=n)},disable=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=getOptions(),n=t.config,i=t.includes;assignGlobalProperty(n.id,e),Array.isArray(i)&&i.forEach(function(l){return assignGlobalProperty(l.id,e)})},optOut=function(){disable(!0)},optIn=function(){disable(!1)},router,setRouter=function(t){router=t},getRouter=function(){return router},event=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.includes,l=n.defaultGroupName;t.send_to==null&&Array.isArray(i)&&i.length&&(t.send_to=i.map(function(r){return r.id}).concat(l)),query("event",e,t)},pageview=function(e){if(isBrowser()){var t;if(typeof e=="string")t={page_path:e};else if(e.path||e.fullPath){var n=getOptions(),i=n.pageTrackerUseFullPath,l=n.pageTrackerPrependBase,r=getRouter(),u=r&&r.options.base,s=i?e.fullPath:e.path;t=_objectSpread2(_objectSpread2({},e.name&&{page_title:e.name}),{},{page_path:l?getPathWithBase(s,u):s})}else t=e;t.page_location==null&&(t.page_location=window.location.href),t.send_page_view==null&&(t.send_page_view=!0),event("page_view",t)}},screenview=function(e){var t=getOptions(),n=t.appName;if(e){var i;typeof e=="string"?i={screen_name:e}:i=e,i.app_name=i.app_name||n,event("screen_view",i)}},exception=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["exception"].concat(t))},linker=function(e){config("linker",e)},time=function(e){event("timing_complete",e)},set=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];query.apply(void 0,["set"].concat(t))},refund=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["refund"].concat(t))},purchase=function(e){event("purchase",e)},customMap=function(e){config({custom_map:e})},api=Object.freeze({__proto__:null,query,config,optOut,optIn,pageview,screenview,exception,linker,time,set,refund,purchase,customMap,event}),attachApi=function(t){t.config.globalProperties.$gtag=api},registerGlobals=function(){if(isBrowser()){var e=getOptions(),t=e.enabled,n=e.globalObjectName,i=e.globalDataLayerName;return window[n]==null&&(window[i]=window[i]||[],window[n]=function(){window[i].push(arguments)}),window[n]("js",new Date),t||optOut(),window[n]}},mergeDefaultParams=function(t){return _objectSpread2({send_page_view:!1},t)},addConfiguration=function(){var e=getOptions(),t=e.config,n=e.includes;query("config",t.id,mergeDefaultParams(t.params)),Array.isArray(n)&&n.forEach(function(i){query("config",i.id,mergeDefaultParams(i.params))})},track=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.appName,l=n.pageTrackerTemplate,r=n.pageTrackerScreenviewEnabled,u=n.pageTrackerSkipSamePath;if(!(u&&e.path===t.path)){var s=e;if(SelectField_vue_vue_type_style_index_0_lang.isFunction(l)?s=l(e,t):r&&(s=validateScreenviewShape({app_name:i,screen_name:e.name})),r){screenview(s);return}pageview(s)}},isRouteExcluded=function(t){var n=getOptions(),i=n.pageTrackerExcludedRoutes;return i.includes(t.path)||i.includes(t.name)},addRoutesTracker=function(){var e=getOptions(),t=e.onBeforeTrack,n=e.onAfterTrack,i=getRouter();i.isReady().then(function(){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){var l=i.currentRoute;addConfiguration(),!isRouteExcluded(l.value)&&track(l.value)}),i.afterEach(function(l,r){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){isRouteExcluded(l)||(SelectField_vue_vue_type_style_index_0_lang.isFunction(t)&&t(l,r),track(l,r),SelectField_vue_vue_type_style_index_0_lang.isFunction(n)&&n(l,r))})})})},bootstrap=function(){var e=getOptions(),t=e.onReady,n=e.onError,i=e.globalObjectName,l=e.globalDataLayerName,r=e.config,u=e.customResourceURL,s=e.customPreconnectOrigin,_=e.deferScriptLoad,d=e.pageTrackerEnabled,g=e.disableScriptLoad,v=!!(d&&getRouter());if(registerGlobals(),v?addRoutesTracker():addConfiguration(),!g)return load("".concat(u,"?id=").concat(r.id,"&l=").concat(l),{preconnectOrigin:s,defer:_}).then(function(){t&&t(window[i])}).catch(function(p){return n&&n(p),p})},install=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;attachApi(t),setOptions(n),setRouter(i),getOptions().bootstrap&&bootstrap()};const _hoisted_1$3={class:"fresh-booking-phone-input"},_sfc_main$3=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"PhoneField",props:{modelValue:{},label:{},id:{},placeholder:{},icon:{default:"phone-office"},iconColor:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputStyle:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=n.id||SelectField_vue_vue_type_style_index_0_lang.ranId(),l=SelectField_vue_vue_type_style_index_0_lang.ref("+45"),r=SelectField_vue_vue_type_style_index_0_lang.ref("");function u(){t("update:modelValue",`${l.value} ${r.value}`)}return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{if(n.modelValue){const s=n.modelValue.split(" ");l.value=s[0],r.value=s[1]}}),(s,_)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{label:s.label,id:SelectField_vue_vue_type_style_index_0_lang.unref(i),type:"phone",required:s.required,readonly:s.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",_hoisted_1$3,[SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=d=>l.value=d),type:"text",id:SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.ranId)(),name:"phone-code",autocomplete:"tel-country-code",icon:s.icon,"icon-color":s.iconColor,"icon-type":s.iconType,placeholder:"+45",required:s.required,readonly:s.readonly,"input-style":s.inputStyle,onInput:_[1]||(_[1]=d=>u())},null,8,["modelValue","id","icon","icon-color","icon-type","required","readonly","input-style"]),SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:r.value,"onUpdate:modelValue":_[2]||(_[2]=d=>r.value=d),type:"number",name:"phone",autocomplete:"tel-national",id:SelectField_vue_vue_type_style_index_0_lang.unref(i),placeholder:s.placeholder,required:s.required,readonly:s.readonly,"input-style":s.inputStyle,onInput:_[3]||(_[3]=d=>u())},null,8,["modelValue","id","placeholder","required","readonly","input-style"])])]),_:1},8,["label","id","required","readonly"]))}}),PhoneField_vue_vue_type_style_index_0_scoped_5cd094ab_lang="",PhoneField=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$3,[["__scopeId","data-v-5cd094ab"]]),_hoisted_1$2=["required","type","name","readonly","disabled","value","checked"],_hoisted_2$2=["data-test"],_hoisted_3={key:0},_sfc_main$2=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"Checkbox",props:{modelValue:{type:[String,Boolean,Number]},numeric:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},label:{},price:{},name:{},readonly:{type:Boolean,default:!1},type:{default:"checkbox"},required:{type:Boolean,default:!1},inputStyle:{},val:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;function i(){n.readonly!==!0&&t("update:modelValue",n.type==="radio"?n.val:n.numeric?n.modelValue?0:1:!n.modelValue)}return(l,r)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{required:l.required,type:l.type,readonly:l.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("label",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-container",{"is-readonly":l.readonly},{"has-label":l.label},l.type==="radio"?"radio":"checkbox"])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("input",SelectField_vue_vue_type_style_index_0_lang.mergeProps(l.$attrs,{required:!!l.required,type:l.type,name:l.name,class:"hidden",readonly:!!l.readonly,disabled:!!l.readonly,value:l.type==="radio"?l.val:l.modelValue,checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue,onChange:r[0]||(r[0]=u=>i())}),null,16,_hoisted_1$2),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box",{checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue}]),tabindex:"0",style:SelectField_vue_vue_type_style_index_0_lang.normalizeStyle(l.inputStyle),"data-test":l.name,onKeyup:r[1]||(r[1]=SelectField_vue_vue_type_style_index_0_lang.withKeys(u=>i(),["enter"]))},null,46,_hoisted_2$2),l.label?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",{key:0,class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-label",{"with-price":l.price}])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("span",null,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.label),1),l.price?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",_hoisted_3,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.price),1)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)]),_:1},8,["required","type","readonly"]))}}),Checkbox_vue_vue_type_style_index_0_scoped_7ef656cb_lang="",Checkbox=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$2,[["__scopeId","data-v-7ef656cb"]]),_hoisted_1$1={href:"https://policies.google.com/privacy"},_hoisted_2$1={href:"https://policies.google.com/terms"},_sfc_main$1=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"GoogleNotice",setup(e){const{t}=SelectField_vue_vue_type_style_index_0_lang.useI18n();return(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",null,[SelectField_vue_vue_type_style_index_0_lang.createTextVNode(SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleNotice"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_1$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googlePrivacyPolicy")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleAnd"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_2$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleTOS")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleApply"))+". ",1)]))}});function block0(e){const t=e;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{da:{googleNotice:n=>{const{normalize:i}=n;return i(["Denne side er beskyttet af reCAPTCHA og Google's"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privatlivspolitik"])},googleAnd:n=>{const{normalize:i}=n;return i(["og"])},googleTOS:n=>{const{normalize:i}=n;return i(["Servicevilkår"])},googleApply:n=>{const{normalize:i}=n;return i(["er gældende"])}},en:{googleNotice:n=>{const{normalize:i}=n;return i(["This site is protected by reCAPTCHA and the Google"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privacy Policy"])},googleAnd:n=>{const{normalize:i}=n;return i(["and"])},googleTOS:n=>{const{normalize:i}=n;return i(["Terms of Service"])},googleApply:n=>{const{normalize:i}=n;return i(["apply"])}}}})}typeof block0=="function"&&block0(_sfc_main$1);const _withScopeId=e=>(SelectField_vue_vue_type_style_index_0_lang.pushScopeId("data-v-340cb9ce"),e=e(),SelectField_vue_vue_type_style_index_0_lang.popScopeId(),e),_hoisted_1=_withScopeId(()=>SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout"},null,-1)),_hoisted_2=[_hoisted_1],_sfc_main=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"CheckoutWindow",setup(e){const{paymentGatewayId:t}=SelectField_vue_vue_type_style_index_0_lang.storeToRefs(SelectField_vue_vue_type_style_index_0_lang.useUtilityStore());return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{const n=document.createElement("script"),i=document.createElement("script");n.setAttribute("src","https://checkout.dibspayment.eu/v1/checkout.js?v=1"),i.setAttribute("src","https://checkout.reepay.com/checkout.js"),document.head.appendChild(n),document.head.appendChild(i)}),(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",null,[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout-wrapper",class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass({reePay:SelectField_vue_vue_type_style_index_0_lang.unref(t)===SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.PaymentGateway).ReePay})},_hoisted_2,2)]))}}),CheckoutWindow_vue_vue_type_style_index_0_scoped_340cb9ce_lang="",CheckoutWindow=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main,[["__scopeId","data-v-340cb9ce"]]);var a=Object.defineProperty,c=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o=(e,t,n)=>(c(e,typeof t!="symbol"?t+"":t,n),n);const namespace="@@vue3-sticky-directive",events=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],batchStyle=(e,t={},n={})=>{for(let i in t)e.style[i]=t[i];for(let i in n)n[i]&&!e.classList.contains(i)?e.classList.add(i):!n[i]&&e.classList.contains(i)&&e.classList.remove(i)};class Sticky{constructor(e,t){o(this,"el"),o(this,"vm"),o(this,"unSubscribers"),o(this,"isPending"),o(this,"state"),o(this,"lastState"),o(this,"options"),o(this,"placeholderEl"),o(this,"containerEl"),this.el=e,this.vm=t,this.unSubscribers=[],this.isPending=!1,this.state={isTopSticky:null,isBottomSticky:null,height:null,width:null,xOffset:null},this.lastState={top:null,bottom:null,sticked:!1};const n=this.getAttribute("sticky-offset")||{},i=this.getAttribute("sticky-side")||"top",l=this.getAttribute("sticky-z-index")||"10",r=this.getAttribute("on-stick")||null;this.options={topOffset:Number(n.top)||0,bottomOffset:Number(n.bottom)||0,shouldTopSticky:i==="top"||i==="both",shouldBottomSticky:i==="bottom"||i==="both",zIndex:l,onStick:r}}doBind(){if(this.unSubscribers.length>0)return;const{el:e,vm:t}=this;t.$nextTick(()=>{this.placeholderEl=document.createElement("div"),this.containerEl=this.getContainerEl(),e.parentElement.insertBefore(this.placeholderEl,e),events.forEach(n=>{const i=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(n,i)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(n,i)),window.addEventListener(n,i,{passive:!0}),this.containerEl.addEventListener(n,i,{passive:!0})})})}doUnbind(){this.unSubscribers.forEach(e=>e()),this.unSubscribers=[],this.resetElement()}update(){this.isPending||(requestAnimationFrame(()=>{this.isPending=!1,this.recomputeState(),this.updateElements()}),this.isPending=!0)}isTopSticky(){if(!this.options.shouldTopSticky)return!1;const e=this.state.placeholderElRect.top,t=this.state.containerElRect.bottom,n=this.options.topOffset,i=this.options.bottomOffset;return e<=n&&t>=i}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;const e=window.innerHeight-this.state.placeholderElRect.top-this.state.height,t=window.innerHeight-this.state.containerElRect.top,n=this.options.topOffset,i=this.options.bottomOffset;return e<=i&&t>=n}recomputeState(){this.state=Object.assign({},this.state,{height:this.getHeight(),width:this.getWidth(),xOffset:this.getXOffset(),placeholderElRect:this.getPlaceholderElRect(),containerElRect:this.getContainerElRect()}),this.state.isTopSticky=this.isTopSticky(),this.state.isBottomSticky=this.isBottomSticky()}fireEvents(){typeof this.options.onStick=="function"&&(this.lastState.top!==this.state.isTopSticky||this.lastState.bottom!==this.state.isBottomSticky||this.lastState.sticked!==(this.state.isTopSticky||this.state.isBottomSticky))&&(this.lastState={top:this.state.isTopSticky,bottom:this.state.isBottomSticky,sticked:this.state.isBottomSticky||this.state.isTopSticky},this.options.onStick(this.lastState))}updateElements(){const e={paddingTop:0},t={position:"static",top:"auto",bottom:"auto",left:"auto",width:"auto",zIndex:this.options.zIndex},n={"vue-sticky-placeholder":!0},i={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){t.position="fixed",t.top=this.options.topOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const l=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;l<0&&(t.top=l+this.options.topOffset+"px"),e.paddingTop=this.state.height+"px",i["top-sticky"]=!0}else if(this.state.isBottomSticky){t.position="fixed",t.bottom=this.options.bottomOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const l=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;l<0&&(t.bottom=l+this.options.bottomOffset+"px"),e.paddingTop=this.state.height+"px",i["bottom-sticky"]=!0}else e.paddingTop=0;batchStyle(this.el,t,i),batchStyle(this.placeholderEl,e,n),this.fireEvents()}resetElement(){["position","top","bottom","left","width","zIndex"].forEach(t=>{this.el.style.removeProperty(t)}),this.el.classList.remove("bottom-sticky","top-sticky");const{parentElement:e}=this.placeholderEl;e&&e.removeChild(this.placeholderEl)}getContainerEl(){let e=this.el.parentElement;for(;e&&e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1;){if(e.hasAttribute("sticky-container"))return e;e=e.parentElement}return this.el.parentElement}getXOffset(){return this.placeholderEl.getBoundingClientRect().left}getWidth(){return this.placeholderEl.getBoundingClientRect().width}getHeight(){return this.el.getBoundingClientRect().height}getPlaceholderElRect(){return this.placeholderEl.getBoundingClientRect()}getContainerElRect(){return this.containerEl.getBoundingClientRect()}getAttribute(name){const expr=this.el.getAttribute(name);let result;if(expr)if(this.vm[expr])result=this.vm[expr];else try{result=eval(`(${expr})`)}catch(e){result=expr}return result}}const Sticky$1={mounted(e,t){(typeof t.value>"u"||t.value)&&(e[namespace]=new Sticky(e,t.instance),e[namespace].doBind())},unmounted(e){e[namespace]&&(e[namespace].doUnbind(),e[namespace]=void 0)},updated(e,t){typeof t.value>"u"||t.value?(e[namespace]||(e[namespace]=new Sticky(e,t.instance)),e[namespace].doBind()):e[namespace]&&e[namespace].doUnbind()}},StickyPlugin={install(e){e.directive("Sticky",Sticky$1)}};exports.Checkbox=Checkbox;exports.CheckoutWindow=CheckoutWindow;exports.PhoneField=PhoneField;exports.StickyPlugin=StickyPlugin;exports._sfc_main=_sfc_main$1;exports.event=event;exports.install=install;exports.setOptions=setOptions;
|
|
1
|
+
"use strict";const SelectField_vue_vue_type_style_index_0_lang=require("./SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs"),TextField=require("./TextField-641e6fd1.cjs");function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,i)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(i){_defineProperty(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}var load=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(i,l){if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script");if(u.async=!0,u.src=t,u.defer=n.defer,n.preconnectOrigin){var s=document.createElement("link");s.href=n.preconnectOrigin,s.rel="preconnect",r.appendChild(s)}r.appendChild(u),u.onload=i,u.onerror=l}})},mergeDeep=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];if(!i.length)return t;var r=i.shift();if(!(!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(t)||!SelectField_vue_vue_type_style_index_0_lang.isPlainObject(r))){for(var u in r)SelectField_vue_vue_type_style_index_0_lang.isPlainObject(r[u])?(t[u]||Object.assign(t,_defineProperty({},u,{})),e(t[u],r[u])):Object.assign(t,_defineProperty({},u,r[u]));return e.apply(void 0,[t].concat(i))}},isBrowser=function(){return!(typeof window>"u"||typeof document>"u")},warn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;isBrowser()},validateScreenviewShape=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return warn('Missing "appName" property inside the plugin options.',t.app_name==null),warn('Missing "name" property in the route.',t.screen_name==null),t};function getPathWithBase(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("/"),i=t.split("/");return n[0]===""&&t[t.length-1]==="/"&&n.shift(),i.join("/")+n.join("/")}var getDefaultParams=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},params={},setOptions=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=getDefaultParams();params=mergeDeep(n,t)},getOptions=function(){return params},query=function(){var e,t=getOptions(),n=t.globalObjectName;!isBrowser()||typeof window[n]>"u"||(e=window)[n].apply(e,arguments)},config=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=getOptions(),l=i.config,r=i.includes;query.apply(void 0,["config",l.id].concat(t)),Array.isArray(r)&&r.forEach(function(u){query.apply(void 0,["config",u.id].concat(t))})},assignGlobalProperty=function(t,n){isBrowser()&&(window["ga-disable-".concat(t)]=n)},disable=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=getOptions(),n=t.config,i=t.includes;assignGlobalProperty(n.id,e),Array.isArray(i)&&i.forEach(function(l){return assignGlobalProperty(l.id,e)})},optOut=function(){disable(!0)},optIn=function(){disable(!1)},router,setRouter=function(t){router=t},getRouter=function(){return router},event=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.includes,l=n.defaultGroupName;t.send_to==null&&Array.isArray(i)&&i.length&&(t.send_to=i.map(function(r){return r.id}).concat(l)),query("event",e,t)},pageview=function(e){if(isBrowser()){var t;if(typeof e=="string")t={page_path:e};else if(e.path||e.fullPath){var n=getOptions(),i=n.pageTrackerUseFullPath,l=n.pageTrackerPrependBase,r=getRouter(),u=r&&r.options.base,s=i?e.fullPath:e.path;t=_objectSpread2(_objectSpread2({},e.name&&{page_title:e.name}),{},{page_path:l?getPathWithBase(s,u):s})}else t=e;t.page_location==null&&(t.page_location=window.location.href),t.send_page_view==null&&(t.send_page_view=!0),event("page_view",t)}},screenview=function(e){var t=getOptions(),n=t.appName;if(e){var i;typeof e=="string"?i={screen_name:e}:i=e,i.app_name=i.app_name||n,event("screen_view",i)}},exception=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["exception"].concat(t))},linker=function(e){config("linker",e)},time=function(e){event("timing_complete",e)},set=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];query.apply(void 0,["set"].concat(t))},refund=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];event.apply(void 0,["refund"].concat(t))},purchase=function(e){event("purchase",e)},customMap=function(e){config({custom_map:e})},api=Object.freeze({__proto__:null,query,config,optOut,optIn,pageview,screenview,exception,linker,time,set,refund,purchase,customMap,event}),attachApi=function(t){t.config.globalProperties.$gtag=api},registerGlobals=function(){if(isBrowser()){var e=getOptions(),t=e.enabled,n=e.globalObjectName,i=e.globalDataLayerName;return window[n]==null&&(window[i]=window[i]||[],window[n]=function(){window[i].push(arguments)}),window[n]("js",new Date),t||optOut(),window[n]}},mergeDefaultParams=function(t){return _objectSpread2({send_page_view:!1},t)},addConfiguration=function(){var e=getOptions(),t=e.config,n=e.includes;query("config",t.id,mergeDefaultParams(t.params)),Array.isArray(n)&&n.forEach(function(i){query("config",i.id,mergeDefaultParams(i.params))})},track=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=getOptions(),i=n.appName,l=n.pageTrackerTemplate,r=n.pageTrackerScreenviewEnabled,u=n.pageTrackerSkipSamePath;if(!(u&&e.path===t.path)){var s=e;if(SelectField_vue_vue_type_style_index_0_lang.isFunction(l)?s=l(e,t):r&&(s=validateScreenviewShape({app_name:i,screen_name:e.name})),r){screenview(s);return}pageview(s)}},isRouteExcluded=function(t){var n=getOptions(),i=n.pageTrackerExcludedRoutes;return i.includes(t.path)||i.includes(t.name)},addRoutesTracker=function(){var e=getOptions(),t=e.onBeforeTrack,n=e.onAfterTrack,i=getRouter();i.isReady().then(function(){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){var l=i.currentRoute;addConfiguration(),!isRouteExcluded(l.value)&&track(l.value)}),i.afterEach(function(l,r){SelectField_vue_vue_type_style_index_0_lang.nextTick().then(function(){isRouteExcluded(l)||(SelectField_vue_vue_type_style_index_0_lang.isFunction(t)&&t(l,r),track(l,r),SelectField_vue_vue_type_style_index_0_lang.isFunction(n)&&n(l,r))})})})},bootstrap=function(){var e=getOptions(),t=e.onReady,n=e.onError,i=e.globalObjectName,l=e.globalDataLayerName,r=e.config,u=e.customResourceURL,s=e.customPreconnectOrigin,_=e.deferScriptLoad,d=e.pageTrackerEnabled,g=e.disableScriptLoad,v=!!(d&&getRouter());if(registerGlobals(),v?addRoutesTracker():addConfiguration(),!g)return load("".concat(u,"?id=").concat(r.id,"&l=").concat(l),{preconnectOrigin:s,defer:_}).then(function(){t&&t(window[i])}).catch(function(p){return n&&n(p),p})},install=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;attachApi(t),setOptions(n),setRouter(i),getOptions().bootstrap&&bootstrap()};const _hoisted_1$3={class:"fresh-booking-phone-input"},_sfc_main$3=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"PhoneField",props:{modelValue:{},label:{},id:{},placeholder:{},icon:{default:"phone-office"},iconColor:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputStyle:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=n.id||SelectField_vue_vue_type_style_index_0_lang.ranId(),l=SelectField_vue_vue_type_style_index_0_lang.ref("+45"),r=SelectField_vue_vue_type_style_index_0_lang.ref("");function u(){t("update:modelValue",`${l.value} ${r.value}`)}return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{if(n.modelValue){const s=n.modelValue.split(" ");l.value=s[0],r.value=s[1]}}),(s,_)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{label:s.label,id:SelectField_vue_vue_type_style_index_0_lang.unref(i),type:"phone",required:s.required,readonly:s.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",_hoisted_1$3,[SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=d=>l.value=d),type:"text",id:SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.ranId)(),name:"phone-code",autocomplete:"tel-country-code",icon:s.icon,"icon-color":s.iconColor,"icon-type":s.iconType,placeholder:"+45",required:s.required,readonly:s.readonly,"input-style":s.inputStyle,onInput:_[1]||(_[1]=d=>u())},null,8,["modelValue","id","icon","icon-color","icon-type","required","readonly","input-style"]),SelectField_vue_vue_type_style_index_0_lang.createVNode(TextField.TextField,{modelValue:r.value,"onUpdate:modelValue":_[2]||(_[2]=d=>r.value=d),type:"number",name:"phone",autocomplete:"tel-national",id:SelectField_vue_vue_type_style_index_0_lang.unref(i),placeholder:s.placeholder,required:s.required,readonly:s.readonly,"input-style":s.inputStyle,onInput:_[3]||(_[3]=d=>u())},null,8,["modelValue","id","placeholder","required","readonly","input-style"])])]),_:1},8,["label","id","required","readonly"]))}}),PhoneField_vue_vue_type_style_index_0_scoped_5cd094ab_lang="",PhoneField=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$3,[["__scopeId","data-v-5cd094ab"]]),_hoisted_1$2=["required","type","name","readonly","disabled","value","checked"],_hoisted_2$2=["data-test"],_hoisted_3={key:0},_sfc_main$2=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"Checkbox",props:{modelValue:{type:[String,Boolean,Number]},numeric:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},label:{},price:{},name:{},readonly:{type:Boolean,default:!1},type:{default:"checkbox"},required:{type:Boolean,default:!1},inputStyle:{},val:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;function i(){n.readonly!==!0&&t("update:modelValue",n.type==="radio"?n.val:n.numeric?n.modelValue?0:1:!n.modelValue)}return(l,r)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createBlock(SelectField_vue_vue_type_style_index_0_lang.InputField,{required:l.required,type:l.type,readonly:l.readonly},{default:SelectField_vue_vue_type_style_index_0_lang.withCtx(()=>[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("label",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-container",{"is-readonly":l.readonly},{"has-label":l.label},l.type==="radio"?"radio":"checkbox"])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("input",SelectField_vue_vue_type_style_index_0_lang.mergeProps(l.$attrs,{required:!!l.required,type:l.type,name:l.name,class:"hidden",readonly:!!l.readonly,disabled:!!l.readonly,value:l.type==="radio"?l.val:l.modelValue,checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue,onChange:r[0]||(r[0]=u=>i())}),null,16,_hoisted_1$2),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box",{checked:l.type==="radio"?l.val===l.modelValue:!!l.modelValue}]),tabindex:"0",style:SelectField_vue_vue_type_style_index_0_lang.normalizeStyle(l.inputStyle),"data-test":l.name,onKeyup:r[1]||(r[1]=SelectField_vue_vue_type_style_index_0_lang.withKeys(u=>i(),["enter"]))},null,46,_hoisted_2$2),l.label?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",{key:0,class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass(["fresh-booking-click-box-label",{"with-price":l.price}])},[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("span",null,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.label),1),l.price?(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",_hoisted_3,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(l.price),1)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)):SelectField_vue_vue_type_style_index_0_lang.createCommentVNode("",!0)],2)]),_:1},8,["required","type","readonly"]))}}),Checkbox_vue_vue_type_style_index_0_scoped_7ef656cb_lang="",Checkbox=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main$2,[["__scopeId","data-v-7ef656cb"]]),_hoisted_1$1={href:"https://policies.google.com/privacy"},_hoisted_2$1={href:"https://policies.google.com/terms"},_sfc_main$1=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"GoogleNotice",setup(e){const{t}=SelectField_vue_vue_type_style_index_0_lang.useI18n();return(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("span",null,[SelectField_vue_vue_type_style_index_0_lang.createTextVNode(SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleNotice"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_1$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googlePrivacyPolicy")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleAnd"))+" ",1),SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("a",_hoisted_2$1,SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleTOS")),1),SelectField_vue_vue_type_style_index_0_lang.createTextVNode(" "+SelectField_vue_vue_type_style_index_0_lang.toDisplayString(SelectField_vue_vue_type_style_index_0_lang.unref(t)("googleApply"))+". ",1)]))}});function block0(e){const t=e;t.__i18n=t.__i18n||[],t.__i18n.push({locale:"",resource:{da:{googleNotice:n=>{const{normalize:i}=n;return i(["Denne side er beskyttet af reCAPTCHA og Google's"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privatlivspolitik"])},googleAnd:n=>{const{normalize:i}=n;return i(["og"])},googleTOS:n=>{const{normalize:i}=n;return i(["Servicevilkår"])},googleApply:n=>{const{normalize:i}=n;return i(["er gældende"])}},en:{googleNotice:n=>{const{normalize:i}=n;return i(["This site is protected by reCAPTCHA and the Google"])},googlePrivacyPolicy:n=>{const{normalize:i}=n;return i(["Privacy Policy"])},googleAnd:n=>{const{normalize:i}=n;return i(["and"])},googleTOS:n=>{const{normalize:i}=n;return i(["Terms of Service"])},googleApply:n=>{const{normalize:i}=n;return i(["apply"])}}}})}typeof block0=="function"&&block0(_sfc_main$1);const _withScopeId=e=>(SelectField_vue_vue_type_style_index_0_lang.pushScopeId("data-v-340cb9ce"),e=e(),SelectField_vue_vue_type_style_index_0_lang.popScopeId(),e),_hoisted_1=_withScopeId(()=>SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout"},null,-1)),_hoisted_2=[_hoisted_1],_sfc_main=SelectField_vue_vue_type_style_index_0_lang.defineComponent({__name:"CheckoutWindow",setup(e){const{paymentGatewayId:t}=SelectField_vue_vue_type_style_index_0_lang.storeToRefs(SelectField_vue_vue_type_style_index_0_lang.useUtilityStore());return SelectField_vue_vue_type_style_index_0_lang.onMounted(()=>{const n=document.createElement("script"),i=document.createElement("script");n.setAttribute("src","https://checkout.dibspayment.eu/v1/checkout.js?v=1"),i.setAttribute("src","https://checkout.reepay.com/checkout.js"),document.head.appendChild(n),document.head.appendChild(i)}),(n,i)=>(SelectField_vue_vue_type_style_index_0_lang.openBlock(),SelectField_vue_vue_type_style_index_0_lang.createElementBlock("div",null,[SelectField_vue_vue_type_style_index_0_lang.createBaseVNode("div",{id:"fresh-booking-payment-checkout-wrapper",class:SelectField_vue_vue_type_style_index_0_lang.normalizeClass({reePay:SelectField_vue_vue_type_style_index_0_lang.unref(t)===SelectField_vue_vue_type_style_index_0_lang.unref(SelectField_vue_vue_type_style_index_0_lang.PaymentGateway).ReePay})},_hoisted_2,2)]))}}),CheckoutWindow_vue_vue_type_style_index_0_scoped_340cb9ce_lang="",CheckoutWindow=SelectField_vue_vue_type_style_index_0_lang._export_sfc(_sfc_main,[["__scopeId","data-v-340cb9ce"]]);var a=Object.defineProperty,c=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,o=(e,t,n)=>(c(e,typeof t!="symbol"?t+"":t,n),n);const namespace="@@vue3-sticky-directive",events=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],batchStyle=(e,t={},n={})=>{for(let i in t)e.style[i]=t[i];for(let i in n)n[i]&&!e.classList.contains(i)?e.classList.add(i):!n[i]&&e.classList.contains(i)&&e.classList.remove(i)};class Sticky{constructor(e,t){o(this,"el"),o(this,"vm"),o(this,"unSubscribers"),o(this,"isPending"),o(this,"state"),o(this,"lastState"),o(this,"options"),o(this,"placeholderEl"),o(this,"containerEl"),this.el=e,this.vm=t,this.unSubscribers=[],this.isPending=!1,this.state={isTopSticky:null,isBottomSticky:null,height:null,width:null,xOffset:null},this.lastState={top:null,bottom:null,sticked:!1};const n=this.getAttribute("sticky-offset")||{},i=this.getAttribute("sticky-side")||"top",l=this.getAttribute("sticky-z-index")||"10",r=this.getAttribute("on-stick")||null;this.options={topOffset:Number(n.top)||0,bottomOffset:Number(n.bottom)||0,shouldTopSticky:i==="top"||i==="both",shouldBottomSticky:i==="bottom"||i==="both",zIndex:l,onStick:r}}doBind(){if(this.unSubscribers.length>0)return;const{el:e,vm:t}=this;t.$nextTick(()=>{this.placeholderEl=document.createElement("div"),this.containerEl=this.getContainerEl(),e.parentElement.insertBefore(this.placeholderEl,e),events.forEach(n=>{const i=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(n,i)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(n,i)),window.addEventListener(n,i,{passive:!0}),this.containerEl.addEventListener(n,i,{passive:!0})})})}doUnbind(){this.unSubscribers.forEach(e=>e()),this.unSubscribers=[],this.resetElement()}update(){this.isPending||(requestAnimationFrame(()=>{this.isPending=!1,this.recomputeState(),this.updateElements()}),this.isPending=!0)}isTopSticky(){if(!this.options.shouldTopSticky)return!1;const e=this.state.placeholderElRect.top,t=this.state.containerElRect.bottom,n=this.options.topOffset,i=this.options.bottomOffset;return e<=n&&t>=i}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;const e=window.innerHeight-this.state.placeholderElRect.top-this.state.height,t=window.innerHeight-this.state.containerElRect.top,n=this.options.topOffset,i=this.options.bottomOffset;return e<=i&&t>=n}recomputeState(){this.state=Object.assign({},this.state,{height:this.getHeight(),width:this.getWidth(),xOffset:this.getXOffset(),placeholderElRect:this.getPlaceholderElRect(),containerElRect:this.getContainerElRect()}),this.state.isTopSticky=this.isTopSticky(),this.state.isBottomSticky=this.isBottomSticky()}fireEvents(){typeof this.options.onStick=="function"&&(this.lastState.top!==this.state.isTopSticky||this.lastState.bottom!==this.state.isBottomSticky||this.lastState.sticked!==(this.state.isTopSticky||this.state.isBottomSticky))&&(this.lastState={top:this.state.isTopSticky,bottom:this.state.isBottomSticky,sticked:this.state.isBottomSticky||this.state.isTopSticky},this.options.onStick(this.lastState))}updateElements(){const e={paddingTop:0},t={position:"static",top:"auto",bottom:"auto",left:"auto",width:"auto",zIndex:this.options.zIndex},n={"vue-sticky-placeholder":!0},i={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){t.position="fixed",t.top=this.options.topOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const l=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;l<0&&(t.top=l+this.options.topOffset+"px"),e.paddingTop=this.state.height+"px",i["top-sticky"]=!0}else if(this.state.isBottomSticky){t.position="fixed",t.bottom=this.options.bottomOffset+"px",t.left=this.state.xOffset+"px",t.width=this.state.width+"px";const l=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;l<0&&(t.bottom=l+this.options.bottomOffset+"px"),e.paddingTop=this.state.height+"px",i["bottom-sticky"]=!0}else e.paddingTop=0;batchStyle(this.el,t,i),batchStyle(this.placeholderEl,e,n),this.fireEvents()}resetElement(){["position","top","bottom","left","width","zIndex"].forEach(t=>{this.el.style.removeProperty(t)}),this.el.classList.remove("bottom-sticky","top-sticky");const{parentElement:e}=this.placeholderEl;e&&e.removeChild(this.placeholderEl)}getContainerEl(){let e=this.el.parentElement;for(;e&&e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1;){if(e.hasAttribute("sticky-container"))return e;e=e.parentElement}return this.el.parentElement}getXOffset(){return this.placeholderEl.getBoundingClientRect().left}getWidth(){return this.placeholderEl.getBoundingClientRect().width}getHeight(){return this.el.getBoundingClientRect().height}getPlaceholderElRect(){return this.placeholderEl.getBoundingClientRect()}getContainerElRect(){return this.containerEl.getBoundingClientRect()}getAttribute(name){const expr=this.el.getAttribute(name);let result;if(expr)if(this.vm[expr])result=this.vm[expr];else try{result=eval(`(${expr})`)}catch(e){result=expr}return result}}const Sticky$1={mounted(e,t){(typeof t.value>"u"||t.value)&&(e[namespace]=new Sticky(e,t.instance),e[namespace].doBind())},unmounted(e){e[namespace]&&(e[namespace].doUnbind(),e[namespace]=void 0)},updated(e,t){typeof t.value>"u"||t.value?(e[namespace]||(e[namespace]=new Sticky(e,t.instance)),e[namespace].doBind()):e[namespace]&&e[namespace].doUnbind()}},StickyPlugin={install(e){e.directive("Sticky",Sticky$1)}};exports.Checkbox=Checkbox;exports.CheckoutWindow=CheckoutWindow;exports.PhoneField=PhoneField;exports.StickyPlugin=StickyPlugin;exports._sfc_main=_sfc_main$1;exports.event=event;exports.install=install;exports.setOptions=setOptions;
|