@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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-
|
|
1
|
+
"use strict";const l=require("./SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs"),s=require("./TextField-641e6fd1.cjs"),m=require("./NumberField.vue_vue_type_script_setup_true_lang-d756efc3.cjs"),y={class:"fresh-booking-action-field"},b=l.defineComponent({__name:"ActionField",props:{modelValue:{},label:{},buttonLabel:{},buttonIcon:{},buttonIconColor:{},buttonDisabled:{type:Boolean,default:!1},secondary:{type:Boolean,default:!1},name:{},id:{},type:{default:"text"},placeholder:{},icon:{},iconType:{default:"fal"},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},data:{},action:{},minValue:{},maxValue:{},isLoading:{type:Boolean,default:!1}},emits:["update:modelValue","action"],setup(p,{emit:i}){const t=p,n=t.id||l.ranId();function u(e){i("update:modelValue",e)}const d=l.computed({get:()=>t.modelValue,set:e=>u(e)}),r=l.computed({get:()=>t.modelValue,set:e=>u(e)});function c(){i("action")}return(e,o)=>(l.openBlock(),l.createBlock(l.InputField,{label:e.label,id:l.unref(n),icon:e.icon,"icon-type":e.iconType,required:e.required,type:e.type,readonly:e.readonly},{default:l.withCtx(()=>[l.createBaseVNode("div",y,[e.type==="dropdown"&&e.data?(l.openBlock(),l.createBlock(s._sfc_main,{key:0,modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=a=>d.value=a),id:l.unref(n),options:e.data,name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","options","name","required","placeholder"])):e.type==="number"?(l.openBlock(),l.createBlock(m._sfc_main,{key:1,modelValue:r.value,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value=a),id:l.unref(n),"min-value":e.minValue,"max-value":e.maxValue},null,8,["modelValue","id","min-value","max-value"])):(l.openBlock(),l.createBlock(s.TextField,{key:2,modelValue:d.value,"onUpdate:modelValue":o[2]||(o[2]=a=>d.value=a),id:l.unref(n),name:e.name,required:e.required,placeholder:e.placeholder},null,8,["modelValue","id","name","required","placeholder"])),l.createVNode(l.Clickable,{"data-test":`${e.name}Submit`,icon:e.buttonIcon,label:e.buttonLabel,"icon-color":e.buttonIconColor,styling:e.action,type:"button","is-loading":e.isLoading,disabled:e.buttonDisabled,secondary:e.secondary,onClickEvent:o[3]||(o[3]=a=>c())},null,8,["data-test","icon","label","icon-color","styling","is-loading","disabled","secondary"])])]),_:1},8,["label","id","icon","icon-type","required","type","readonly"]))}});const f=l._export_sfc(b,[["__scopeId","data-v-07d4466b"]]);exports.ActionField=f;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as f, j as c, c as m, k as d, l as i, w as V, x as v, n as t, m as g, C as q, I as k, _ as B } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { _ as I, T as C } from "./TextField-
|
|
3
|
-
import { _ as F } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { h as f, j as c, c as m, k as d, l as i, w as V, x as v, n as t, m as g, C as q, I as k, _ as B } from "./SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js";
|
|
2
|
+
import { _ as I, T as C } from "./TextField-4e7defc6.js";
|
|
3
|
+
import { _ as F } from "./NumberField.vue_vue_type_script_setup_true_lang-d3b3206f.js";
|
|
4
4
|
const A = { class: "fresh-booking-action-field" }, h = /* @__PURE__ */ f({
|
|
5
5
|
__name: "ActionField",
|
|
6
6
|
props: {
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as E, s as R, a as M, k as v, q as k, ad as q, y as Y, r as J, c as L, $ as j, o as W, l as O, w as X, x as V, t as w, m as f, n as s, A as P, C as Z, v as B, _ as U } from "./SelectField.vue_vue_type_style_index_0_lang-
|
|
2
|
-
import { u as N, a as F, _ as ee } from "./DateField.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { _ as H } from "./NumberField.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { h as E, s as R, a as M, k as v, q as k, ad as q, y as Y, r as J, c as L, $ as j, o as W, l as O, w as X, x as V, t as w, m as f, n as s, A as P, C as Z, v as B, _ as U } from "./SelectField.vue_vue_type_style_index_0_lang-d1f9b48d.js";
|
|
2
|
+
import { u as N, a as F, _ as ee } from "./DateField.vue_vue_type_style_index_0_lang-3f5993f7.js";
|
|
3
|
+
import { _ as H } from "./NumberField.vue_vue_type_script_setup_true_lang-d3b3206f.js";
|
|
4
4
|
import { c as x } from "./_commonjsHelpers-c5d32002.js";
|
|
5
|
-
import { E as G } from "./_-
|
|
6
|
-
import { F as D } from "./Field-
|
|
5
|
+
import { E as G } from "./_-f5a3364b.js";
|
|
6
|
+
import { F as D } from "./Field-ea77905a.js";
|
|
7
7
|
var K = {}, C = {}, S = {}, te = x && x.__awaiter || function(e, n, t, i) {
|
|
8
8
|
function r(a) {
|
|
9
9
|
return a instanceof t ? a : new t(function(o) {
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2bf82818.cjs"),D=require("./DateField.vue_vue_type_style_index_0_lang-b6694990.cjs"),F=require("./NumberField.vue_vue_type_script_setup_true_lang-a549c70e.cjs"),C=require("./_commonjsHelpers-6763f629.cjs"),L=require("./_-3cff5490.cjs"),b=require("./Field-d926807f.cjs");var A={},g={},w={},B=C.commonjsGlobal&&C.commonjsGlobal.__awaiter||function(t,l,n,i){function o(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function u(s){try{r(i.next(s))}catch(y){c(y)}}function d(s){try{r(i.throw(s))}catch(y){c(y)}}function r(s){s.done?a(s.value):o(s.value).then(u,d)}r((i=i.apply(t,l||[])).next())})},N=C.commonjsGlobal&&C.commonjsGlobal.__generator||function(t,l){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(r){return function(s){return d([r,s])}}function d(r){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(a=r[0]&2?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[r[0]&2,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,o=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1],a=r;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(r);break}a[2]&&n.ops.pop(),n.trys.pop();continue}r=l.call(t,n)}catch(s){r=[6,s],o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(w,"__esModule",{value:!0});w.ReCaptchaInstance=void 0;var O=function(){function t(l,n,i){this.siteKey=l,this.recaptchaID=n,this.recaptcha=i,this.styleContainer=null}return t.prototype.execute=function(l){return B(this,void 0,void 0,function(){return N(this,function(n){return[2,this.recaptcha.enterprise?this.recaptcha.enterprise.execute(this.recaptchaID,{action:l}):this.recaptcha.execute(this.recaptchaID,{action:l})]})})},t.prototype.getSiteKey=function(){return this.siteKey},t.prototype.hideBadge=function(){this.styleContainer===null&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{visibility:hidden !important;}",document.head.appendChild(this.styleContainer))},t.prototype.showBadge=function(){this.styleContainer!==null&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},t}();w.ReCaptchaInstance=O;Object.defineProperty(g,"__esModule",{value:!0});g.getInstance=g.load=void 0;var E=w,p;(function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED"})(p||(p={}));var R=function(){function t(){}return t.load=function(l,n){if(n===void 0&&(n={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(t.getLoadingState()===p.LOADED)return t.instance.getSiteKey()===l?Promise.resolve(t.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(t.getLoadingState()===p.LOADING)return l!==t.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(o,a){t.successfulLoadingConsumers.push(function(c){return o(c)}),t.errorLoadingRunnable.push(function(c){return a(c)})});t.instanceSiteKey=l,t.setLoadingState(p.LOADING);var i=new t;return new Promise(function(o,a){i.loadScript(l,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then(function(){t.setLoadingState(p.LOADED);var c=i.doExplicitRender(grecaptcha,l,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),u=new E.ReCaptchaInstance(l,c,grecaptcha);t.successfulLoadingConsumers.forEach(function(d){return d(u)}),t.successfulLoadingConsumers=[],n.autoHideBadge&&u.hideBadge(),t.instance=u,o(u)}).catch(function(c){t.errorLoadingRunnable.forEach(function(u){return u(c)}),t.errorLoadingRunnable=[],a(c)})})},t.getInstance=function(){return t.instance},t.setLoadingState=function(l){t.loadingState=l},t.getLoadingState=function(){return t.loadingState===null?p.NOT_LOADED:t.loadingState},t.prototype.loadScript=function(l,n,i,o,a){var c=this;n===void 0&&(n=!1),i===void 0&&(i=!1),o===void 0&&(o={}),a===void 0&&(a="");var u=document.createElement("script");u.setAttribute("recaptcha-v3-script","");var d="https://www.google.com/recaptcha/api.js";n&&(i?d="https://recaptcha.net/recaptcha/enterprise.js":d="https://recaptcha.net/recaptcha/api.js"),i&&(d="https://www.google.com/recaptcha/enterprise.js"),a&&(d=a),o.render&&(o.render=void 0);var r=this.buildQueryString(o);return u.src=d+"?render=explicit"+r,new Promise(function(s,y){u.addEventListener("load",c.waitForScriptToLoad(function(){s(u)},i),!1),u.onerror=function(k){t.setLoadingState(p.NOT_LOADED),y(k)},document.head.appendChild(u)})},t.prototype.buildQueryString=function(l){var n=Object.keys(l);return n.length<1?"":"&"+Object.keys(l).filter(function(i){return!!l[i]}).map(function(i){return i+"="+l[i]}).join("&")},t.prototype.waitForScriptToLoad=function(l,n){var i=this;return function(){window.grecaptcha===void 0?setTimeout(function(){i.waitForScriptToLoad(l,n)},t.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready(function(){l()}):window.grecaptcha.ready(function(){l()})}},t.prototype.doExplicitRender=function(l,n,i,o){var a={sitekey:n,badge:i.badge,size:i.size,tabindex:i.tabindex};return i.container?o?l.enterprise.render(i.container,a):l.render(i.container,a):o?l.enterprise.render(a):l.render(a)},t.loadingState=null,t.instance=null,t.instanceSiteKey=null,t.successfulLoadingConsumers=[],t.errorLoadingRunnable=[],t.SCRIPT_LOAD_DELAY=25,t}();g.load=R.load;g.getInstance=R.getInstance;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReCaptchaInstance=t.getInstance=t.load=void 0;var l=g;Object.defineProperty(t,"load",{enumerable:!0,get:function(){return l.load}}),Object.defineProperty(t,"getInstance",{enumerable:!0,get:function(){return l.getInstance}});var n=w;Object.defineProperty(t,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})})(A);const T=e.defineComponent({__name:"_",emits:["submit"],setup(t,{emit:l}){const{recaptchaSiteKey:n}=e.storeToRefs(e.useUtilityStore());async function i(){const a=await(await A.load(n.value)).execute("<action>");console.log(a),l("submit")}return(o,a)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:i},[e.renderSlot(o.$slots,"default")],32))}}),j={id:"fresh-booking-availability-date-selection"},P={key:0,id:"fresh-booking-availability-guest-selection"},$={id:"fresh-booking-availability-confirmation"},H=e.defineComponent({__name:"HotelAvailabilityForm",props:{booking:{type:Boolean,default:!1},link:{}},setup(t){const l=t,{t:n}=e.useI18n(),{adults:i,children:o,arrivalDate:a,departureDate:c,location:u,isExpired:d}=e.storeToRefs(D.useAvailabilityStore()),{reset:r}=D.useAvailabilityStore(),{fetchAvailabilityData:s}=D.useHotelStore(),{areListingsLoading:y}=e.storeToRefs(D.useHotelStore()),{firstSelectableDateOffset:k,lastSelectableDateOffset:x,disableChildSelection:m,disableAdultSelection:h}=e.storeToRefs(e.useUtilityStore()),S=e.ref([]),Y=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+(k.value-1)))),J=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+x.value))),W=e.computed(()=>new Date(new Date().setDate(a.value.getDate()+k.value))),X=e.computed(()=>new Date(new Date().setDate(a.value.getDate()+(x.value+1)))),V=e.computed(()=>!(!h&&i.value===0));function I(){l.booking===!1?window.location.replace(l.link):V.value&&s()}return e.watch(a,f=>{const _=new Date(new Date(f).setDate(new Date(f).getDate()+1));new Date(c.value)<_&&(c.value=_)}),e.watch(S,f=>{a.value=f[0],c.value=f[1]}),e.onMounted(()=>{d.value&&l.booking&&r(),S.value=[a.value,c.value]}),(f,_)=>(e.openBlock(),e.createBlock(T,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:f.booking}),onSubmit:I},{default:e.withCtx(()=>[e.createBaseVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!f.booking},{"only-adult-guests":!e.unref(h)&&e.unref(m)},{"only-child-guests":!e.unref(m)&&e.unref(h)},{"no-guests":e.unref(h)&&e.unref(m)},{"all-guests":!e.unref(h)&&!e.unref(m)}])},[e.createBaseVNode("li",j,[e.createCommentVNode("",!0),e.createVNode(D._sfc_main,{modelValue:S.value,"onUpdate:modelValue":_[1]||(_[1]=v=>S.value=v),label:e.unref(n)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(h)||!e.unref(m)?(e.openBlock(),e.createElementBlock("li",P,[e.unref(h)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F._sfc_main,{key:0,modelValue:e.unref(i),"onUpdate:modelValue":_[4]||(_[4]=v=>e.isRef(i)?i.value=v:null),label:e.unref(n)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"])),e.unref(m)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F._sfc_main,{key:1,modelValue:e.unref(o),"onUpdate:modelValue":_[5]||(_[5]=v=>e.isRef(o)?o.value=v:null),label:e.unref(n)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"]))])):e.createCommentVNode("",!0),e.createBaseVNode("li",$,[e.createVNode(e.Clickable,{label:e.unref(n)("availability.buttonLabel"),disabled:!V.value,"is-loading":e.unref(y)},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const G=e._export_sfc(H,[["__scopeId","data-v-61d87281"]]),q={class:"availability-skeleton"},U={key:0,class:"availability-skeleton-navigation"},M={key:1,class:"availability-skeleton-hotel"},z={key:2,class:"availability-skeleton-event"},K=e.defineComponent({__name:"AvailabilitySkeleton",props:{view:{default:"hotel"}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",q,[l.view==="both"?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(L.Element,{height:"28px",width:"60px","border-radius":"20px"}),e.createVNode(L.Element,{height:"28px",width:"60px","border-radius":"20px"})])):e.createCommentVNode("",!0),l.view!=="event"?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":"","no-label":""})])):(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":"","no-label":""})]))]))}});const Q=e._export_sfc(K,[["__scopeId","data-v-c266ccbc"]]);exports.AvailabilitySkeleton=Q;exports.HotelAvailabilityForm=G;
|
|
1
|
+
"use strict";const e=require("./SelectField.vue_vue_type_style_index_0_lang-2b92f88c.cjs"),D=require("./DateField.vue_vue_type_style_index_0_lang-31a9e5dc.cjs"),F=require("./NumberField.vue_vue_type_script_setup_true_lang-d756efc3.cjs"),C=require("./_commonjsHelpers-6763f629.cjs"),L=require("./_-82677476.cjs"),b=require("./Field-028d9987.cjs");var A={},g={},w={},B=C.commonjsGlobal&&C.commonjsGlobal.__awaiter||function(t,l,n,i){function o(a){return a instanceof n?a:new n(function(c){c(a)})}return new(n||(n=Promise))(function(a,c){function u(s){try{r(i.next(s))}catch(y){c(y)}}function d(s){try{r(i.throw(s))}catch(y){c(y)}}function r(s){s.done?a(s.value):o(s.value).then(u,d)}r((i=i.apply(t,l||[])).next())})},N=C.commonjsGlobal&&C.commonjsGlobal.__generator||function(t,l){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(r){return function(s){return d([r,s])}}function d(r){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(a=r[0]&2?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[r[0]&2,a.value]),r[0]){case 0:case 1:a=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,o=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1],a=r;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(r);break}a[2]&&n.ops.pop(),n.trys.pop();continue}r=l.call(t,n)}catch(s){r=[6,s],o=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}};Object.defineProperty(w,"__esModule",{value:!0});w.ReCaptchaInstance=void 0;var O=function(){function t(l,n,i){this.siteKey=l,this.recaptchaID=n,this.recaptcha=i,this.styleContainer=null}return t.prototype.execute=function(l){return B(this,void 0,void 0,function(){return N(this,function(n){return[2,this.recaptcha.enterprise?this.recaptcha.enterprise.execute(this.recaptchaID,{action:l}):this.recaptcha.execute(this.recaptchaID,{action:l})]})})},t.prototype.getSiteKey=function(){return this.siteKey},t.prototype.hideBadge=function(){this.styleContainer===null&&(this.styleContainer=document.createElement("style"),this.styleContainer.innerHTML=".grecaptcha-badge{visibility:hidden !important;}",document.head.appendChild(this.styleContainer))},t.prototype.showBadge=function(){this.styleContainer!==null&&(document.head.removeChild(this.styleContainer),this.styleContainer=null)},t}();w.ReCaptchaInstance=O;Object.defineProperty(g,"__esModule",{value:!0});g.getInstance=g.load=void 0;var E=w,p;(function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED"})(p||(p={}));var R=function(){function t(){}return t.load=function(l,n){if(n===void 0&&(n={}),typeof document>"u")return Promise.reject(new Error("This is a library for the browser!"));if(t.getLoadingState()===p.LOADED)return t.instance.getSiteKey()===l?Promise.resolve(t.instance):Promise.reject(new Error("reCAPTCHA already loaded with different site key!"));if(t.getLoadingState()===p.LOADING)return l!==t.instanceSiteKey?Promise.reject(new Error("reCAPTCHA already loaded with different site key!")):new Promise(function(o,a){t.successfulLoadingConsumers.push(function(c){return o(c)}),t.errorLoadingRunnable.push(function(c){return a(c)})});t.instanceSiteKey=l,t.setLoadingState(p.LOADING);var i=new t;return new Promise(function(o,a){i.loadScript(l,n.useRecaptchaNet||!1,n.useEnterprise||!1,n.renderParameters?n.renderParameters:{},n.customUrl).then(function(){t.setLoadingState(p.LOADED);var c=i.doExplicitRender(grecaptcha,l,n.explicitRenderParameters?n.explicitRenderParameters:{},n.useEnterprise||!1),u=new E.ReCaptchaInstance(l,c,grecaptcha);t.successfulLoadingConsumers.forEach(function(d){return d(u)}),t.successfulLoadingConsumers=[],n.autoHideBadge&&u.hideBadge(),t.instance=u,o(u)}).catch(function(c){t.errorLoadingRunnable.forEach(function(u){return u(c)}),t.errorLoadingRunnable=[],a(c)})})},t.getInstance=function(){return t.instance},t.setLoadingState=function(l){t.loadingState=l},t.getLoadingState=function(){return t.loadingState===null?p.NOT_LOADED:t.loadingState},t.prototype.loadScript=function(l,n,i,o,a){var c=this;n===void 0&&(n=!1),i===void 0&&(i=!1),o===void 0&&(o={}),a===void 0&&(a="");var u=document.createElement("script");u.setAttribute("recaptcha-v3-script","");var d="https://www.google.com/recaptcha/api.js";n&&(i?d="https://recaptcha.net/recaptcha/enterprise.js":d="https://recaptcha.net/recaptcha/api.js"),i&&(d="https://www.google.com/recaptcha/enterprise.js"),a&&(d=a),o.render&&(o.render=void 0);var r=this.buildQueryString(o);return u.src=d+"?render=explicit"+r,new Promise(function(s,y){u.addEventListener("load",c.waitForScriptToLoad(function(){s(u)},i),!1),u.onerror=function(k){t.setLoadingState(p.NOT_LOADED),y(k)},document.head.appendChild(u)})},t.prototype.buildQueryString=function(l){var n=Object.keys(l);return n.length<1?"":"&"+Object.keys(l).filter(function(i){return!!l[i]}).map(function(i){return i+"="+l[i]}).join("&")},t.prototype.waitForScriptToLoad=function(l,n){var i=this;return function(){window.grecaptcha===void 0?setTimeout(function(){i.waitForScriptToLoad(l,n)},t.SCRIPT_LOAD_DELAY):n?window.grecaptcha.enterprise.ready(function(){l()}):window.grecaptcha.ready(function(){l()})}},t.prototype.doExplicitRender=function(l,n,i,o){var a={sitekey:n,badge:i.badge,size:i.size,tabindex:i.tabindex};return i.container?o?l.enterprise.render(i.container,a):l.render(i.container,a):o?l.enterprise.render(a):l.render(a)},t.loadingState=null,t.instance=null,t.instanceSiteKey=null,t.successfulLoadingConsumers=[],t.errorLoadingRunnable=[],t.SCRIPT_LOAD_DELAY=25,t}();g.load=R.load;g.getInstance=R.getInstance;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReCaptchaInstance=t.getInstance=t.load=void 0;var l=g;Object.defineProperty(t,"load",{enumerable:!0,get:function(){return l.load}}),Object.defineProperty(t,"getInstance",{enumerable:!0,get:function(){return l.getInstance}});var n=w;Object.defineProperty(t,"ReCaptchaInstance",{enumerable:!0,get:function(){return n.ReCaptchaInstance}})})(A);const T=e.defineComponent({__name:"_",emits:["submit"],setup(t,{emit:l}){const{recaptchaSiteKey:n}=e.storeToRefs(e.useUtilityStore());async function i(){const a=await(await A.load(n.value)).execute("<action>");console.log(a),l("submit")}return(o,a)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:i},[e.renderSlot(o.$slots,"default")],32))}}),j={id:"fresh-booking-availability-date-selection"},P={key:0,id:"fresh-booking-availability-guest-selection"},$={id:"fresh-booking-availability-confirmation"},H=e.defineComponent({__name:"HotelAvailabilityForm",props:{booking:{type:Boolean,default:!1},link:{}},setup(t){const l=t,{t:n}=e.useI18n(),{adults:i,children:o,arrivalDate:a,departureDate:c,location:u,isExpired:d}=e.storeToRefs(D.useAvailabilityStore()),{reset:r}=D.useAvailabilityStore(),{fetchAvailabilityData:s}=D.useHotelStore(),{areListingsLoading:y}=e.storeToRefs(D.useHotelStore()),{firstSelectableDateOffset:k,lastSelectableDateOffset:x,disableChildSelection:m,disableAdultSelection:h}=e.storeToRefs(e.useUtilityStore()),S=e.ref([]),Y=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+(k.value-1)))),J=e.computed(()=>new Date(new Date().setDate(new Date().getDate()+x.value))),W=e.computed(()=>new Date(new Date().setDate(a.value.getDate()+k.value))),X=e.computed(()=>new Date(new Date().setDate(a.value.getDate()+(x.value+1)))),V=e.computed(()=>!(!h&&i.value===0));function I(){l.booking===!1?window.location.replace(l.link):V.value&&s()}return e.watch(a,f=>{const _=new Date(new Date(f).setDate(new Date(f).getDate()+1));new Date(c.value)<_&&(c.value=_)}),e.watch(S,f=>{a.value=f[0],c.value=f[1]}),e.onMounted(()=>{d.value&&l.booking&&r(),S.value=[a.value,c.value]}),(f,_)=>(e.openBlock(),e.createBlock(T,{id:"konnectio-availability-form",class:e.normalizeClass({reservation:f.booking}),onSubmit:I},{default:e.withCtx(()=>[e.createBaseVNode("ul",{id:"konnectio-availability-form-content",class:e.normalizeClass([{"is-not-booking-page":!f.booking},{"only-adult-guests":!e.unref(h)&&e.unref(m)},{"only-child-guests":!e.unref(m)&&e.unref(h)},{"no-guests":e.unref(h)&&e.unref(m)},{"all-guests":!e.unref(h)&&!e.unref(m)}])},[e.createBaseVNode("li",j,[e.createCommentVNode("",!0),e.createVNode(D._sfc_main,{modelValue:S.value,"onUpdate:modelValue":_[1]||(_[1]=v=>S.value=v),label:e.unref(n)("availability.checkInOut"),"icon-type":"fas","icon-placement":"label","min-range":1,range:""},null,8,["modelValue","label"]),e.createCommentVNode("",!0)]),!e.unref(h)||!e.unref(m)?(e.openBlock(),e.createElementBlock("li",P,[e.unref(h)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F._sfc_main,{key:0,modelValue:e.unref(i),"onUpdate:modelValue":_[4]||(_[4]=v=>e.isRef(i)?i.value=v:null),label:e.unref(n)("availability.adults"),"icon-type":"fas","icon-placement":"label",name:"adults",icon:"male"},null,8,["modelValue","label"])),e.unref(m)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F._sfc_main,{key:1,modelValue:e.unref(o),"onUpdate:modelValue":_[5]||(_[5]=v=>e.isRef(o)?o.value=v:null),label:e.unref(n)("availability.children"),"icon-type":"fas","icon-placement":"label",name:"children",icon:"child"},null,8,["modelValue","label"]))])):e.createCommentVNode("",!0),e.createBaseVNode("li",$,[e.createVNode(e.Clickable,{label:e.unref(n)("availability.buttonLabel"),disabled:!V.value,"is-loading":e.unref(y)},null,8,["label","disabled","is-loading"])])],2)]),_:1},8,["class"]))}});const G=e._export_sfc(H,[["__scopeId","data-v-61d87281"]]),q={class:"availability-skeleton"},U={key:0,class:"availability-skeleton-navigation"},M={key:1,class:"availability-skeleton-hotel"},z={key:2,class:"availability-skeleton-event"},K=e.defineComponent({__name:"AvailabilitySkeleton",props:{view:{default:"hotel"}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",q,[l.view==="both"?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(L.Element,{height:"28px",width:"60px","border-radius":"20px"}),e.createVNode(L.Element,{height:"28px",width:"60px","border-radius":"20px"})])):e.createCommentVNode("",!0),l.view!=="event"?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":"","no-label":""})])):(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(b.Field,{"with-icon":""}),e.createVNode(b.Field,{"with-icon":"","no-label":""})]))]))}});const Q=e._export_sfc(K,[["__scopeId","data-v-c266ccbc"]]);exports.AvailabilitySkeleton=Q;exports.HotelAvailabilityForm=G;
|