holidoit 1.0.166 → 1.0.167

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.
Files changed (41) hide show
  1. package/README.md +6 -0
  2. package/dist/embed.html +1 -1
  3. package/dist/holidoit-embed.js +1 -1
  4. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/holidoit-embed.js +1 -1
  5. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/holidoit.js +1 -1
  6. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/holidoit.umd.js +1 -1
  7. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/experience-grid-drawer-loader.js +1 -1
  8. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/experience-page-drawer-loader.js +1 -1
  9. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/inline-book-now-loader.js +1 -1
  10. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-booking-box.js +1 -1
  11. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-grid.js +1 -1
  12. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience.js +1 -1
  13. package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widgets-loader.js +1 -1
  14. package/dist/holidoit.js +1 -1
  15. package/dist/holidoit.umd.js +1 -1
  16. package/dist/release-manifest.json +23 -23
  17. package/dist/widgets/experience-grid-drawer-loader.js +1 -1
  18. package/dist/widgets/experience-page-drawer-loader.js +1 -1
  19. package/dist/widgets/inline-book-now-loader.js +1 -1
  20. package/dist/widgets/widget-book-now-button.html +1 -1
  21. package/dist/widgets/widget-booking-box.html +1 -1
  22. package/dist/widgets/widget-booking-box.js +1 -1
  23. package/dist/widgets/widget-experience-grid-drawer.html +1 -1
  24. package/dist/widgets/widget-experience-grid.html +1 -1
  25. package/dist/widgets/widget-experience-grid.js +1 -1
  26. package/dist/widgets/widget-experience-page-drawer.html +1 -1
  27. package/dist/widgets/widget-experience.html +1 -1
  28. package/dist/widgets/widget-experience.js +1 -1
  29. package/dist/widgets/widgets-loader.js +1 -1
  30. package/package.json +1 -1
  31. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/embed.html +0 -0
  32. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/payment-redirect.html +0 -0
  33. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-book-now-button.html +0 -0
  34. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-book-now-button.js +0 -0
  35. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-booking-box.html +0 -0
  36. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-grid-drawer.html +0 -0
  37. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-grid-drawer.js +0 -0
  38. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-grid.html +0 -0
  39. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-page-drawer.html +0 -0
  40. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience-page-drawer.js +0 -0
  41. /package/dist/holidoit-js-releases/{20261002094648885-af688fa62c09-705e151c → 20261006133105370-d791c5681cec-168a521f}/widgets/widget-experience.html +0 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see holidoit.umd.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Holidoit",[],e):"object"==typeof exports?exports.Holidoit=e():t.Holidoit=e()}(this,()=>(()=>{var t={172:t=>{t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},317:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(t){return t+"º"}};return n.default.locale(i,null,!0),i}(n(353))},353:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",o="second",r="minute",a="hour",s="day",l="week",u="month",c="quarter",d="year",h="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},y={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(i,u),r=n-o<0,a=e.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:l,d:s,D:h,h:a,m:r,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var _="$isDayjsObject",k=function(t){return t instanceof x||!(!t||!t[_])},M=function t(e,n,i){var o;if(!e)return b;if("string"==typeof e){var r=e.toLowerCase();w[r]&&(o=r),n&&(w[r]=n,o=r);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var s=e.name;w[s]=e,o=s}return!i&&o&&(b=o),o||!i&&b},S=function(t,e){if(k(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new x(n)},O=y;O.l=M,O.i=k,O.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function g(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(m);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return O},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return S(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<S(t)},v.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,i=!!O.u(e)||e,c=O.p(t),f=function(t,e){var o=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?o:o.endOf(s)},m=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return i?f(1,0):f(31,11);case u:return i?f(1,g):f(0,g+1);case l:var b=this.$locale().weekStart||0,w=(p<b?p+7:p)-b;return f(i?v-w:v+(6-w),g);case s:case h:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case r:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,l=O.p(t),c="set"+(this.$u?"UTC":""),f=(n={},n[s]=c+"Date",n[h]=c+"Date",n[u]=c+"Month",n[d]=c+"FullYear",n[a]=c+"Hours",n[r]=c+"Minutes",n[o]=c+"Seconds",n[i]=c+"Milliseconds",n)[l],m=l===s?this.$D+(e-this.$W):e;if(l===u||l===d){var p=this.clone().set(h,1);p.$d[f](m),p.init(),this.$d=p.set(h,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[O.p(t)]()},v.add=function(i,c){var h,f=this;i=Number(i);var m=O.p(c),p=function(t){var e=S(f);return O.w(e.date(e.date()+Math.round(t*i)),f)};if(m===u)return this.set(u,this.$M+i);if(m===d)return this.set(d,this.$y+i);if(m===s)return p(1);if(m===l)return p(7);var g=(h={},h[r]=e,h[a]=n,h[o]=t,h)[m]||1,v=this.$d.getTime()+i*g;return O.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),r=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,c=n.meridiem,d=function(t,n,o,r){return t&&(t[n]||t(e,i))||o[n].slice(0,r)},h=function(t){return O.s(r%12||12,t,"0")},m=c||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(p,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return s+1;case"MM":return O.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,l,2);case"ddd":return d(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(r);case"HH":return O.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return m(r,a,!0);case"A":return m(r,a,!1);case"m":return String(a);case"mm":return O.s(a,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,h,f){var m,p=this,g=O.p(h),v=S(i),y=(v.utcOffset()-this.utcOffset())*e,b=this-v,w=function(){return O.m(p,v)};switch(g){case d:m=w()/12;break;case u:m=w();break;case c:m=w()/3;break;case l:m=(b-y)/6048e5;break;case s:m=(b-y)/864e5;break;case a:m=b/n;break;case r:m=b/e;break;case o:m=b/t;break;default:m=b}return f?m:O.a(m)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=M(t,e,!0);return i&&(n.$L=i),n},v.clone=function(){return O.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),L=x.prototype;return S.prototype=L,[["$ms",i],["$s",o],["$m",r],["$H",a],["$W",s],["$M",u],["$y",d],["$D",h]].forEach(function(t){L[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),S.extend=function(t,e){return t.$i||(t(e,x,S),t.$i=!0),S},S.locale=M,S.isDayjs=k,S.unix=function(t){return S(1e3*t)},S.en=w[b],S.Ls=w,S.p={},S}()},373:t=>{t.exports=function(t){var e=Object(t),n=[];for(var i in e)n.unshift(i);return function t(){for(;n.length;)if((i=n.pop())in e)return t.value=i,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},445:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var a=o.prototype;r.utc=function(t){return new o({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=r(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var l=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(i,o){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?u.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],r=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===r?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,t)).$offset=a,s.$x.$localOffset=l,s};var c=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var i=this.local(),o=r(t).local();return h.call(i,o,e,n)}}}()},494:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function o(t,e,n){var o=i[n];return Array.isArray(o)&&(o=o[e?0:1]),o.replace("%d",t)}var r={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(t){return t+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o}};return n.default.locale(r,null,!0),r}(n(353))},546:t=>{function e(n,i,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}t.exports=e=function(t,n,i,o){function r(n,i){e(t,n,function(t){return this._invoke(n,i,t)})}n?a?a(t,n,{value:i,enumerable:!o,configurable:!o,writable:!o}):t[n]=i:(r("next",0),r("throw",1),r("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,i,o,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},569:function(t){t.exports=function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},s=function(e,n){for(var i=a(e,n),r=[],s=0;s<i.length;s+=1){var l=i[s],u=l.type,c=l.value,d=t[u];d>=0&&(r[d]=parseInt(c,10))}var h=r[3],f=24===h?0:h,m=r[0]+"-"+r[1]+"-"+r[2]+" "+f+":"+r[4]+":"+r[5]+":000",p=+e;return(o.utc(m).valueOf()-(p-=p%1e3))/6e4},l=i.prototype;l.tz=function(t,e){void 0===t&&(t=r);var n,i=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:t}),l=Math.round((a-new Date(s))/1e3/60),u=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(u)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),e){var c=n.utcOffset();n=n.add(i-c,"minute")}}else n=this.utcOffset(0,e);return n.$x.$timezone=t,n},l.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return n&&n.value};var u=l.startOf;l.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return u.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,l=s(+o(),a);if("string"!=typeof t)return o(t).tz(a);var u=function(t,e,n){var i=t-60*e*1e3,o=s(i,n);if(e===o)return[i,e];var r=s(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),l,a),c=u[0],d=u[1],h=o(c).utcOffset(d);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}()},579:(t,e,n)=>{var i=n(738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(i(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},633:(t,e,n)=>{var i=n(172),o=n(993),r=n(869),a=n(887),s=n(791),l=n(373),u=n(579);function c(){"use strict";var e=o(),n=e.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))}var f={throw:1,return:2,break:3,continue:3};function m(t){var e,n;return function(i){e||(e={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(t,e){return n(i.a,f[t],e)},delegateYield:function(t,o,r){return e.resultName=o,n(i.d,u(t),r)},finish:function(t){return n(i.f,t)}},n=function(t,n,o){i.p=e.prev,i.n=e.next;try{return t(n,o)}finally{e.next=i.n}}),e.resultName&&(e[e.resultName]=i.v,e.resultName=void 0),e.sent=i.v,e.next=i.n;try{return t.call(this,e)}finally{i.p=e.prev,i.n=e.next}}}return(t.exports=c=function(){return{wrap:function(t,n,i,o){return e.w(m(t),n,i,o&&o.reverse())},isGeneratorFunction:h,mark:e.m,awrap:function(t,e){return new i(t,e)},AsyncIterator:s,async:function(t,e,n,i,o){return(h(e)?a:r)(m(t),e,n,i,o)},keys:l,values:u}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=c,t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,n)=>{var i=n(633)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},791:(t,e,n)=>{var i=n(172),o=n(546);t.exports=function t(e,n){function r(t,o,a,s){try{var l=e[t](o),u=l.value;return u instanceof i?n.resolve(u.v).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):n.resolve(u).then(function(t){l.value=t,a(l)},function(t){return r("throw",t,a,s)})}catch(t){s(t)}}var a;this.next||(o(t.prototype),o(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(t,e,i){function o(){return new n(function(e,n){r(t,i,e,n)})}return a=a?a.then(o,o):o()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},813:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")}};return n.default.locale(i,null,!0),i}(n(353))},826:function(t){t.exports=function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}}}()},840:function(t){t.exports=function(){"use strict";return function(t,e,n){var i=e.prototype,o=function(t){return t&&(t.indexOf?t:t.s)},r=function(t,e,n,i,r){var a=t.name?t:t.$locale(),s=o(a[e]),l=o(a[n]),u=s||l.map(function(t){return t.slice(0,i)});if(!r)return u;var c=a.weekStart;return u.map(function(t,e){return u[(e+(c||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(t,e){return t.formats[e]||function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})}(t.formats[e.toUpperCase()])},l=function(){var t=this;return{months:function(e){return e?e.format("MMMM"):r(t,"months")},monthsShort:function(e){return e?e.format("MMM"):r(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):r(t,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):r(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):r(t,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return s(t.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return l.bind(this)()},n.localeData=function(){var t=a();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(e){return s(t,e)},meridiem:t.meridiem,ordinal:t.ordinal}},n.months=function(){return r(a(),"months")},n.monthsShort=function(){return r(a(),"monthsShort","months",3)},n.weekdays=function(t){return r(a(),"weekdays",null,null,t)},n.weekdaysShort=function(t){return r(a(),"weekdaysShort","weekdays",3,t)},n.weekdaysMin=function(t){return r(a(),"weekdaysMin","weekdays",2,t)}}}()},869:(t,e,n)=>{var i=n(887);t.exports=function(t,e,n,o,r){var a=i(t,e,n,o,r);return a.next().then(function(t){return t.done?t.value:a.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887:(t,e,n)=>{var i=n(993),o=n(791);t.exports=function(t,e,n,r,a){return new o(i().w(t,e,n,r),a||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},900:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};return n.default.locale(i,null,!0),i}(n(353))},993:(t,e,n)=>{var i=n(546);function o(){var e,n,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function l(t,o,r,a){var s=o&&o.prototype instanceof c?o:c,l=Object.create(s.prototype);return i(l,"_invoke",function(t,i,o){var r,a,s,l=0,c=o||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,a=0,s=e,h.n=n,u}};function f(t,i){for(a=t,s=i,n=0;!d&&l&&!o&&n<c.length;n++){var o,r=c[n],f=h.p,m=r[2];t>3?(o=m===i)&&(s=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=f&&((o=t<2&&f<r[1])?(a=0,h.v=i,h.n=r[1]):f<m&&(o=t<3||r[0]>i||i>m)&&(r[4]=t,r[5]=i,h.n=m,a=0))}if(o||t>1)return u;throw d=!0,i}return function(o,c,m){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,m),a=c,s=m;(n=a<2?e:s)||!d;){r||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(l=2,r){if(a||(o="next"),n=r[o]){if(!(n=n.call(r,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=r.return)&&n.call(r),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);r=e}else if((n=(d=h.n<0)?s:t.call(i,h))!==u)break}catch(t){r=e,a=1,s=t}finally{l=1}}return{value:n,done:d}}}(t,r,a),!0),l}var u={};function c(){}function d(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),m=h.prototype=c.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t}return d.prototype=h,i(m,"constructor",h),i(h,"constructor",d),d.displayName="GeneratorFunction",i(h,s,"GeneratorFunction"),i(m),i(m,s,"Generator"),i(m,a,function(){return this}),i(m,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:l,m:p}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function e(e,n){return function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function l(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(i),n.d(i,{Languages:()=>E,changeLanguage:()=>z,close:()=>N,closeEmbed:()=>X,destroy:()=>G,init:()=>F,open:()=>j,openEmbed:()=>Z,renderHolidoitEmbed:()=>J,toggle:()=>W,toggleEmbed:()=>q,version:()=>K});var u=n(756),c=n.n(u),d="holidoit-loader-iframe",h="2.0.0",f="_holidoit_payment_session";var m="holidoit_analytics_dedupe_keys",p=new Set;function g(t){return"object"===r(t)&&null!==t&&!Array.isArray(t)}function v(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(t){return null}}function y(){var t=v();if(!t)return[];try{var e=t.getItem(m);if(!e)return[];var n=JSON.parse(e);return Array.isArray(n)?n.filter(function(t){return"string"==typeof t&&t.length>0}):[]}catch(t){return[]}}function b(t){if(t){p.add(t);var e=y().filter(function(e){return e!==t});e.push(t),function(t){var e=v();if(e)try{e.setItem(m,JSON.stringify(t.slice(-200)))}catch(t){}}(e)}}function w(t,e){return"undefined"!=typeof window&&(!function(t){return!(!t||!p.has(t)&&(!y().includes(t)||(p.add(t),0)))}(e)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),b(e),window.dataLayer.push(t),!0))}function _(t){if(!g(t)||"HOLIDOIT_ANALYTICS_EVENT"!==t.type)return null;var e,n=g(t.payload)?t.payload:t,i=n.channel,o=n.dedupeKey,r=n.eventData,a=n.source,s=n.widgetType;return"dataLayer"!==i||"embed"!==a&&"widget"!==a||"string"!=typeof o||""===o.trim()||(!g(e=r)||"string"!=typeof e.event||""===e.event.trim())?null:{channel:i,dedupeKey:o.trim(),eventData:r,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}var k=new Set(["holidoit.js","embed.html","payment-redirect.html","widgets/widget-book-now-button.html","widgets/widget-booking-box.html","widgets/widget-experience.html","widgets/widget-experience-grid.html","widgets/widget-experience-grid-drawer.html","widgets/widget-experience-page-drawer.html"]);var M=n(353),S=n.n(M),O=(n(494),n(826),n(317),n(813),n(900),n(840)),x=n.n(O),L=n(569),D=n.n(L),I=n(445),T=n.n(I);S().extend(T()),S().extend(D()),S().extend(x());var E=function(t){return t.ITALIAN="it",t.ENGLISH="en",t.SPANISH="es",t.FRENCH="fr",t.GERMAN="de",t}({});S()().locale("it").localeData().months(),S()().locale("it").localeData().weekdays(),S()().locale("en").localeData().months(),S()().locale("en").localeData().weekdays(),S()().locale("de").localeData().months(),S()().locale("de").localeData().weekdays(),S()().locale("es").localeData().months(),S()().locale("es").localeData().weekdays(),S()().locale("fr").localeData().months(),S()().locale("fr").localeData().weekdays();function B(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return H(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var A=function(){if("undefined"==typeof window)return null;try{var t=new URLSearchParams(window.location.search),e=t.get("payment_intent");if(!e)return null;var n={paymentIntent:e,paymentIntentClientSecret:t.get("payment_intent_client_secret"),redirectStatus:t.get("redirect_status")};"localhost"===window.location.hostname||window.location.hostname;return n}catch(t){return null}}(),V=!1,Y=new Set(["holidoitExperienceSelected","holidoitIFrameChangeLanguage","holidoitExperienceCount"]),P=Object.values(E),R=l(l(l(l(l({},E.ITALIAN,"Prenota ora"),E.ENGLISH,"Book now"),E.SPANISH,"Reservar ahora"),E.FRENCH,"Réserver maintenant"),E.GERMAN,"Jetzt buchen");var U=new(function(){return t=function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"config",null),l(this,"embedConfig",null),l(this,"iframe",null),l(this,"container",null),l(this,"floatingButton",null),l(this,"isOpen",!1),l(this,"hasDrawerEntered",!1),l(this,"closeTimeout",null),l(this,"isReady",!1),l(this,"pendingMessages",[]),l(this,"embedOrigin",""),l(this,"resolvedEmbedUrl",""),l(this,"resolvedApiUrl",""),l(this,"htmlLangObserver",null),l(this,"hasExplicitLanguageSelection",!1),l(this,"hasReceivedEmbedReady",!1),l(this,"embedConfigLoaded",!1),l(this,"previouslyFocusedElement",null),l(this,"visualViewportBaselineHeight",null),l(this,"visualViewportBaselineWidth",null),l(this,"visualViewportUpdateFrame",null),l(this,"isKeyboardVisible",!1),l(this,"lastKeyboardViewportHeight",null),l(this,"lastKeyboardViewportOffsetTop",0),l(this,"keyboardOpeningGuardUntil",0),l(this,"keyboardOpeningCheckTimeout",null),l(this,"keyboardDismissalGuardUntil",0),l(this,"hostCanvasStyles",null),l(this,"scrollLockState",null),l(this,"touchMoveHandler",null),l(this,"scheduleVisualViewportUpdate",function(){null!==e.visualViewportUpdateFrame&&cancelAnimationFrame(e.visualViewportUpdateFrame),e.visualViewportUpdateFrame=requestAnimationFrame(function(){e.visualViewportUpdateFrame=null,e.syncKeyboardViewport()})}),l(this,"handleExternalMessage",function(t){var n=t.data;if(n&&"string"==typeof n.action&&Y.has(n.action)){var i=null;if(t.source!==window){if(!(i=e.getSenderIframe(t.source)))return void e.log("Ignoring external message from unknown iframe source",n.action);if(i.id===d)return;if(!e.isTrustedHolidoitOrigin(t.origin))return void e.log("Ignoring external message from untrusted origin",t.origin,n.action)}switch(e.log("Received external message",n),n.action){case"holidoitExperienceSelected":n.experienceId&&(e.log("Experience selected from external iframe",n.experienceId),e.open({experienceId:n.experienceId,gift:!!n.gift}));break;case"holidoitIFrameChangeLanguage":n.language&&(e.log("Language change from external iframe",n.language),e.changeLanguage(n.language));break;case"holidoitExperienceCount":if(!i)return;if(e.log("Experience count from external iframe",n.count),"number"==typeof n.height){var o=n.height+16,r=parseInt(i.style.height||"0",10);Math.abs(o-r)>15&&(i.style.height="".concat(o,"px"),e.log("Adjusted iframe height to",o,"for",i.id||i.src))}}}}),l(this,"handleMessage",function(t){var n,i,o,a;if(e.isMessageFromOwnEmbedIframe(t)){var s,l=t.data;if("object"===r(s=l)&&null!==s&&!Array.isArray(s)&&"string"==typeof l.type&&l.type.startsWith("HOLIDOIT_")&&(e.log("Received message from embed iframe",l),!e.handleAnalyticsMessage(l)))switch(l.type){case"HOLIDOIT_READY":e.hasReceivedEmbedReady=!0,e.maybeSendInitMessage();break;case"HOLIDOIT_OPENED":e.isOpen&&null===e.closeTimeout&&(e.hasDrawerEntered=!0,e.syncContainerBackdrop());break;case"HOLIDOIT_CLOSED":e.close();break;case"HOLIDOIT_DRAWER_EXITED":null!==e.closeTimeout&&e.finishClose();break;case"HOLIDOIT_BOOKING_COMPLETE":var u=l.payload;e.log("Booking complete",u),null===(n=e.config)||void 0===n||null===(i=n.onBookingComplete)||void 0===i||i.call(n,u);break;case"HOLIDOIT_PAYMENT_REDIRECT_START":var c=l.payload;if(null!=c&&c.session){e.log("Saving payment session for redirect",c.session);try{localStorage.setItem(f,JSON.stringify(c.session))}catch(t){e.log("Failed to save payment session (incognito mode?)",t)}}break;case"HOLIDOIT_LANGUAGE_CHANGED":var d=l.payload,h=e.normalizeLanguage(null==d?void 0:d.language);h&&(e.log("Language changed from embed:",h),e.applyLanguage(h,{markAsExplicit:!0,syncEmbed:!1}),window.postMessage({action:"holidoitEmbedChangeLanguage",language:h},"*"));break;case"HOLIDOIT_CHECKOUT_FIELD_FOCUS":var m,p=l.payload;if(!e.isOpen||null!==e.closeTimeout||"boolean"!=typeof(null==p?void 0:p.focused)||window.innerWidth>=775)break;e.clearKeyboardOpeningCheck(),p.focused?(e.keyboardOpeningGuardUntil=performance.now()+600,e.keyboardDismissalGuardUntil=0,e.updateKeyboardVisibility(!0,null===(m=window.visualViewport)||void 0===m?void 0:m.height),e.keyboardOpeningCheckTimeout=window.setTimeout(function(){e.keyboardOpeningCheckTimeout=null;var t=window.visualViewport;t&&null!==e.visualViewportBaselineHeight&&e.visualViewportBaselineHeight-t.height>100||e.scheduleVisualViewportUpdate()},650)):(e.keyboardOpeningGuardUntil=0,e.keyboardDismissalGuardUntil=performance.now()+450,e.updateKeyboardVisibility(!1));break;case"HOLIDOIT_ERROR":var g=l.payload;null===(o=e.config)||void 0===o||null===(a=o.onError)||void 0===a||a.call(o,(null==g?void 0:g.message)||"Unknown error");break;case"HOLIDOIT_NAVIGATE_TO":var v=l.payload;null!=v&&v.url&&(e.log("Navigating parent page to:",v.url),window.location.href=v.url)}}})},n=[{key:"isIOSDevice",value:function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var t=navigator.userAgent||"",e=/iPad|iPhone|iPod/.test(t),n="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return e||n}},{key:"safeScrollToPosition",value:function(t,e){var n=null;try{(n=document.createElement("style")).textContent="html, body { scroll-behavior: auto !important; }",(document.head||document.documentElement).appendChild(n),window.scrollTo({left:t,top:e,behavior:"auto"})}catch(n){window.scrollTo(t,e)}finally{n&&requestAnimationFrame(function(){var t;null===(t=n)||void 0===t||t.remove()})}}},{key:"getDocumentScrollRoot",value:function(){var t=document.scrollingElement;return t instanceof HTMLElement?t:document.documentElement}},{key:"isDocumentScrollRoot",value:function(t){return t===this.getDocumentScrollRoot()||t===document.documentElement||t===document.body}},{key:"getScrollPosition",value:function(){return{top:window.scrollY,left:window.scrollX}}},{key:"getScrollbarWidth",value:function(){return window.innerWidth-document.documentElement.clientWidth}},{key:"restoreScrollPosition",value:function(t,e){var n=this.getScrollPosition();(Math.abs(n.top-t)>1||Math.abs(n.left-e)>1)&&this.safeScrollToPosition(e,t)}},{key:"focusWithoutScroll",value:function(t){if(t&&t.isConnected)try{t.focus({preventScroll:!0})}catch(e){t.focus()}}},{key:"init",value:function(t){var e,n,i=this;if(t.embedId&&(t.embedId=t.embedId.trim()),t.embedId){if(this.container)return this.log("Holidoit already initialized, skipping duplicate init"),this.config=C(C({},this.config),t),void this.syncLanguageWithDocument();var o=window.scrollY,r=history.scrollRestoration||"auto";try{history.scrollRestoration="manual"}catch(t){this.log("scrollRestoration not supported, continuing without it")}this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,this.config=C(C({},t),{},{language:this.normalizeLanguage(t.language)||void 0}),this.resolvedEmbedUrl=function(t){try{var e=new URL(t,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(e.origin!==n.origin||!e.pathname.startsWith(n.pathname))return t;var i=e.pathname.slice(n.pathname.length);return k.has(i)?(e.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20261002094648885-af688fa62c09-705e151c","/").concat(i),e.toString()):t}catch(e){return t}}(t.embedUrl||"https://cdn.holidoit.com/embed.html"),this.resolvedApiUrl="https://engine.holydoit.com",this.embedOrigin=this.getEmbedOrigin(this.resolvedEmbedUrl),this.log("Initializing Holidoit embed",{embedId:t.embedId,version:h}),this.createContainer(),this.createIframe(),null===(e=window.visualViewport)||void 0===e||e.addEventListener("resize",this.scheduleVisualViewportUpdate),null===(n=window.visualViewport)||void 0===n||n.addEventListener("scroll",this.scheduleVisualViewportUpdate,{passive:!0}),this.safeScrollToPosition(0,o),requestAnimationFrame(function(){try{history.scrollRestoration=r}catch(t){}}),this.setupMessageListener(),this.observeDocumentLanguage();var a=function(){i.bindBookNowButtons(),i.observeForBookNowButtons(),i.interceptHolidoitLinks()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a(),this.fetchEmbedConfig().then(function(){var e;((null===(e=i.embedConfig)||void 0===e?void 0:e.has_floating_button)||t.floatingButton)&&i.createFloatingButton(),i.maybeSendInitMessage()}),this.checkPaymentRedirect()}}},{key:"fetchEmbedConfig",value:(a=c().mark(function t(){var e,n,i,o,r,a,s;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(e=this.config)&&void 0!==e&&e.embedId){t.next=1;break}return t.abrupt("return");case 1:return n="".concat(this.resolvedApiUrl,"/partner/v0/embed-config/").concat(this.config.embedId,"/get"),this.log("Fetching embed config from:",n),t.prev=2,t.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});case 3:if((i=t.sent).ok){t.next=4;break}throw new Error("Failed to fetch embed config: ".concat(i.status));case 4:return t.next=5,i.json();case 5:o=t.sent,this.embedConfig=o,this.log("Embed config loaded:",o),r=this.getDocumentLanguage(),a=this.isLanguageSupportedByEmbed(r),!this.hasExplicitLanguageSelection&&r&&a?(this.applyLanguage(r,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",r)):!this.config.language&&o.language&&(this.config.language=o.language,this.log("Language set from API config:",o.language)),o.floating_button_config&&(this.config.floatingButtonOptions=this.mergeFloatingButtonOptions(this.config.floatingButtonOptions,o.floating_button_config),this.log("Merged floating button options:",this.config.floatingButtonOptions)),t.next=7;break;case 6:t.prev=6,s=t.catch(2),this.log("Failed to fetch embed config, using local options:",s);case 7:return t.prev=7,this.embedConfigLoaded=!0,t.finish(7);case 8:case"end":return t.stop()}},t,this,[[2,6,7,8]])}),u=function(){var t=this,e=arguments;return new Promise(function(n,i){var r=a.apply(t,e);function s(t){o(r,n,i,s,l,"next",t)}function l(t){o(r,n,i,s,l,"throw",t)}s(void 0)})},function(){return u.apply(this,arguments)})},{key:"mergeFloatingButtonOptions",value:function(t,e){var n,i,o,r;return t?{desktop:C(C({},t.desktop),e.desktop),mobile:C(C({},t.mobile),e.mobile),zIndex:null!==(n=e.zIndex)&&void 0!==n?n:t.zIndex,callToAction:null!==(i=e.callToAction)&&void 0!==i?i:t.callToAction,italianCallToAction:null!==(o=e.italianCallToAction)&&void 0!==o?o:t.italianCallToAction,englishCallToAction:null!==(r=e.englishCallToAction)&&void 0!==r?r:t.englishCallToAction}:e}},{key:"open",value:function(t){var e,n,i,o,r;null!=t&&t.embedId&&(t.embedId=t.embedId.trim()),this.log("Opening embed",t),this.iframe&&this.container&&(this.clearCloseTimeout(),this.isOpen||(this.previouslyFocusedElement=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement!==document.documentElement?document.activeElement:null),this.isOpen=!0,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null!==(e=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==e?e:null,this.visualViewportBaselineWidth=window.innerWidth,this.lockBodyScroll(),this.container.style.display="block",this.container.style.pointerEvents="auto",this.syncContainerBackdrop(),this.scheduleVisualViewportUpdate(),this.floatingButton&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),this.postMessage({type:"HOLIDOIT_OPEN",payload:{embedId:(null==t?void 0:t.embedId)||(null===(i=this.config)||void 0===i?void 0:i.embedId),experienceId:null==t?void 0:t.experienceId,test:null==t?void 0:t.test,gift:null==t?void 0:t.gift}}),null===(o=this.config)||void 0===o||null===(r=o.onOpen)||void 0===r||r.call(o))}},{key:"close",value:function(){var t=this;this.isOpen&&null===this.closeTimeout&&(this.log("Closing embed"),this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.closeTimeout=window.setTimeout(function(){t.finishClose()},600),this.hasDrawerEntered=!1,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_CLOSE"}))}},{key:"finishClose",value:function(){var t,e;this.clearCloseTimeout(),this.isOpen=!1,this.hasDrawerEntered=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.updateKeyboardVisibility(!1),document.activeElement===this.iframe&&this.iframe.blur(),this.floatingButton&&(this.floatingButton.removeAttribute("inert"),this.floatingButton.removeAttribute("aria-hidden"),this.floatingButton.removeAttribute("tabindex")),this.focusWithoutScroll(this.previouslyFocusedElement),this.previouslyFocusedElement=null,this.unlockBodyScroll(),this.container&&(this.syncContainerBackdrop(),this.container.style.display="none",this.container.style.pointerEvents="none"),this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,null===(t=this.config)||void 0===t||null===(e=t.onClose)||void 0===e||e.call(t)}},{key:"toggle",value:function(t){this.isOpen?this.close():this.open(t)}},{key:"changeLanguage",value:function(t){var e=this.normalizeLanguage(t);e?(this.log("Changing language",e),this.applyLanguage(e,{markAsExplicit:!0,syncEmbed:!0})):this.log("Ignoring unsupported language change",t)}},{key:"updateFloatingButtonText",value:function(t){var e,n;if(this.floatingButton&&this.config){var i=this.config.floatingButtonOptions,o=this.resolveFloatingButtonResponsiveOption(null==i||null===(e=i.desktop)||void 0===e?void 0:e.textColor,null==i||null===(n=i.mobile)||void 0===n?void 0:n.textColor,"white"),r=this.getFloatingButtonCallToAction(t),a='<svg style="fill: '.concat(o,' !important;" xmlns="http://www.w3.org/2000/svg" height="19" width="19" viewBox="0 0 448 512"><path style="fill: ').concat(o,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(o," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(a," ").concat(r,"</span>"),this.log("Updated floating button text to:",r)}}},{key:"destroy",value:function(){var t,e;this.log("Destroying embed"),this.clearCloseTimeout(),this.syncHostCanvasBackdrop(!1),this.scrollLockState&&this.unlockBodyScroll(),this.container&&(this.container.remove(),this.container=null),this.floatingButton&&(this.floatingButton.remove(),this.floatingButton=null),this.htmlLangObserver&&(this.htmlLangObserver.disconnect(),this.htmlLangObserver=null),this.iframe=null,this.config=null,this.isOpen=!1,this.hasDrawerEntered=!1,this.isReady=!1,this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,window.removeEventListener("message",this.handleMessage),window.removeEventListener("message",this.handleExternalMessage),null===(t=window.visualViewport)||void 0===t||t.removeEventListener("resize",this.scheduleVisualViewportUpdate),null===(e=window.visualViewport)||void 0===e||e.removeEventListener("scroll",this.scheduleVisualViewportUpdate),null!==this.visualViewportUpdateFrame&&(cancelAnimationFrame(this.visualViewportUpdateFrame),this.visualViewportUpdateFrame=null),this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)}},{key:"clearKeyboardOpeningCheck",value:function(){null!==this.keyboardOpeningCheckTimeout&&(window.clearTimeout(this.keyboardOpeningCheckTimeout),this.keyboardOpeningCheckTimeout=null)}},{key:"clearCloseTimeout",value:function(){null!==this.closeTimeout&&(window.clearTimeout(this.closeTimeout),this.closeTimeout=null)}},{key:"syncKeyboardViewport",value:function(){var t,e=window.visualViewport;if(this.container&&this.isOpen&&null===this.closeTimeout&&e){if(this.syncContainerBackdrop(),window.innerWidth>=775)return this.visualViewportBaselineHeight=e.height,this.visualViewportBaselineWidth=window.innerWidth,void this.updateKeyboardVisibility(!1,e.height);if(performance.now()<this.keyboardDismissalGuardUntil)this.updateKeyboardVisibility(!1,e.height);else{if(null===this.visualViewportBaselineWidth||Math.abs(this.visualViewportBaselineWidth-window.innerWidth)>2)return this.visualViewportBaselineWidth=window.innerWidth,this.visualViewportBaselineHeight=e.height,void this.updateKeyboardVisibility(!1,e.height);var n=null!==(t=this.visualViewportBaselineHeight)&&void 0!==t?t:e.height;this.visualViewportBaselineHeight=Math.max(n,e.height);var i=this.visualViewportBaselineHeight-e.height>100||performance.now()<this.keyboardOpeningGuardUntil;this.updateKeyboardVisibility(i,e.height)}}}},{key:"updateKeyboardVisibility",value:function(t,e){t&&this.isOpen&&!this.hasDrawerEntered&&(this.hasDrawerEntered=!0,this.syncContainerBackdrop());var n="number"==typeof e&&e>0?Math.round(e):null,i=t&&this.iframe?Math.max(0,Math.round(-this.iframe.getBoundingClientRect().top)):0;(this.isKeyboardVisible!==t||t&&(this.lastKeyboardViewportHeight!==n||this.lastKeyboardViewportOffsetTop!==i))&&(this.isKeyboardVisible=t,this.lastKeyboardViewportHeight=t?n:null,this.lastKeyboardViewportOffsetTop=i,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_KEYBOARD_VISIBILITY",payload:C({visible:t,viewportOffsetTop:i},null!==n&&{viewportHeight:n})}))}},{key:"syncContainerBackdrop",value:function(){var t,e,n=this.isOpen&&this.hasDrawerEntered&&window.innerWidth<775,i=n?this.isKeyboardVisible?"#fff":"linear-gradient(to bottom, transparent calc(2dvh + 16px), #fff 0)":"transparent";null===(t=this.container)||void 0===t||t.style.setProperty("background",i,"important"),null===(e=this.iframe)||void 0===e||e.style.setProperty("background",i,"important");var o=window.visualViewport,r=null!==this.hostCanvasStyles&&o&&null!==this.visualViewportBaselineHeight&&this.visualViewportBaselineHeight-o.height>100;this.syncHostCanvasBackdrop(n&&this.isIOSDevice()&&(this.isKeyboardVisible||!!r))}},{key:"syncHostCanvasBackdrop",value:function(t){var n;if(t){if(this.hostCanvasStyles)return;this.hostCanvasStyles=[];for(var i=0,o=[document.documentElement,document.body];i<o.length;i++)for(var r=o[i],a=0,s=[["background-color","#fff"],["background-image","none"]];a<s.length;a++){var l=e(s[a],2),u=l[0],c=l[1],d=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);r.style.setProperty(u,c,"important"),this.hostCanvasStyles.push({element:r,property:u,value:d,priority:h,appliedValue:r.style.getPropertyValue(u)})}}else{var f,m=B(null!==(n=this.hostCanvasStyles)&&void 0!==n?n:[]);try{for(m.s();!(f=m.n()).done;){var p=f.value,g=p.element,v=p.property,y=p.value,b=p.priority,w=p.appliedValue;g.style.getPropertyValue(v)===w&&"important"===g.style.getPropertyPriority(v)&&(y?g.style.setProperty(v,y,b):g.style.removeProperty(v))}}catch(t){m.e(t)}finally{m.f()}this.hostCanvasStyles=null}}},{key:"createContainer",value:function(){this.container=document.createElement("div"),this.container.id="holidoit-loader-container",this.container.style.cssText="\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n z-index: 2147483647 !important;\n display: none;\n pointer-events: none;\n ",document.body.appendChild(this.container)}},{key:"createIframe",value:function(){var t=this;this.container&&this.config&&(this.iframe=document.createElement("iframe"),this.iframe.id=d,this.iframe.src=this.resolvedEmbedUrl,this.iframe.allow="payment",this.iframe.setAttribute("tabindex","-1"),this.iframe.style.cssText="\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n border: none !important;\n background: transparent !important;\n ",this.iframe.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation"),this.container.appendChild(this.iframe),document.activeElement===this.iframe&&this.iframe.blur(),this.iframe.onload=function(){t.log("Iframe loaded, waiting for HOLIDOIT_READY from embed")})}},{key:"createFloatingButton",value:function(){var t,e,n,i,o,r,a,s,l,u,c,d,h,f,m,p,g,v,y,b,w,_,k,M,S=this;if(this.config){var O=this.config.floatingButtonOptions;this.floatingButton=document.createElement("button"),this.floatingButton.id="holidoit-floating-button";var x=window.innerWidth,L=x<775,D=this.resolveFloatingButtonResponsiveOption(null==O||null===(t=O.desktop)||void 0===t?void 0:t.width,null==O||null===(e=O.mobile)||void 0===e?void 0:e.width,L?x-34:190),I=this.resolveFloatingButtonResponsiveOption(null==O||null===(n=O.desktop)||void 0===n?void 0:n.height,null==O||null===(i=O.mobile)||void 0===i?void 0:i.height,54),T=this.resolveFloatingButtonResponsiveOption(null==O||null===(o=O.desktop)||void 0===o?void 0:o.backgroundColor,null==O||null===(r=O.mobile)||void 0===r?void 0:r.backgroundColor,"#0f172a"),B=this.resolveFloatingButtonResponsiveOption(null==O||null===(a=O.desktop)||void 0===a?void 0:a.textColor,null==O||null===(s=O.mobile)||void 0===s?void 0:s.textColor,"white"),H=this.resolveFloatingButtonResponsiveOption(null==O||null===(l=O.desktop)||void 0===l?void 0:l.borderRounding,null==O||null===(u=O.mobile)||void 0===u?void 0:u.borderRounding,30),$=this.resolveFloatingButtonResponsiveOption(null==O||null===(c=O.desktop)||void 0===c?void 0:c.fontSize,null==O||null===(d=O.mobile)||void 0===d?void 0:d.fontSize,16),C=this.resolveFloatingButtonResponsiveOption(null==O||null===(h=O.desktop)||void 0===h?void 0:h.fontWeight,null==O||null===(f=O.mobile)||void 0===f?void 0:f.fontWeight,500),A=this.resolveFloatingButtonResponsiveOption(null==O||null===(m=O.desktop)||void 0===m?void 0:m.textCase,null==O||null===(p=O.mobile)||void 0===p?void 0:p.textCase,"none"),V=this.resolveFloatingButtonResponsiveOption(null==O||null===(g=O.desktop)||void 0===g?void 0:g.bottomPosition,null==O||null===(v=O.mobile)||void 0===v?void 0:v.bottomPosition,L?22:30),Y=this.resolveFloatingButtonResponsiveOption(null==O||null===(y=O.desktop)||void 0===y?void 0:y.rightPosition,null==O||null===(b=O.mobile)||void 0===b?void 0:b.rightPosition,L?17:30),P=this.resolveFloatingButtonResponsiveOption(null==O||null===(w=O.desktop)||void 0===w?void 0:w.leftPosition,null==O||null===(_=O.mobile)||void 0===_?void 0:_.leftPosition,void 0),R=this.resolveFloatingButtonResponsiveOption(null==O||null===(k=O.desktop)||void 0===k?void 0:k.topPosition,null==O||null===(M=O.mobile)||void 0===M?void 0:M.topPosition,void 0),U=Math.min((null==O?void 0:O.zIndex)||2147483646,2147483646),F=this.config.language||E.ITALIAN,j=this.getFloatingButtonCallToAction(F),N="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",W="#0f172a"===T?"#1e293b":T;this.floatingButton.style.cssText="\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 10px !important;\n position: fixed !important;\n z-index: ".concat(U," !important;\n width: ").concat(D,"px !important;\n height: ").concat(I,"px !important;\n background: ").concat(T," !important;\n color: ").concat(B," !important;\n border: none !important;\n border-radius: ").concat(H,"px !important;\n font-size: ").concat($,"px !important;\n font-weight: ").concat(C," !important;\n text-transform: ").concat("uppercase"===A?"uppercase":"capitalize"===A?"capitalize":"none"," !important;\n cursor: pointer !important;\n box-shadow: ").concat(N,' !important;\n padding: 12px 24px !important;\n font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;\n transform: scale(1) !important;\n ').concat(void 0!==V?"bottom: ".concat(V,"px !important;"):"","\n ").concat(void 0!==Y?"right: ".concat(Y,"px !important;"):"","\n ").concat(void 0!==P?"left: ".concat(P,"px !important;"):"left: auto !important;","\n ").concat(void 0!==R?"top: ".concat(R,"px !important;"):"top: auto !important;","\n "),this.floatingButton.addEventListener("mouseenter",function(){S.floatingButton&&(S.floatingButton.style.background="".concat(W," !important"),S.floatingButton.style.boxShadow="".concat("0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"," !important"))}),this.floatingButton.addEventListener("mouseleave",function(){S.floatingButton&&(S.floatingButton.style.background="".concat(T," !important"),S.floatingButton.style.boxShadow="".concat(N," !important"),S.floatingButton.style.transform="scale(1) !important")}),this.floatingButton.addEventListener("mousedown",function(){S.floatingButton&&(S.floatingButton.style.transform="scale(0.98) !important")}),this.floatingButton.addEventListener("mouseup",function(){S.floatingButton&&(S.floatingButton.style.transform="scale(1) !important")});var z='<svg style="fill: '.concat(B,' !important;" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><path style="fill: ').concat(B,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(B," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(z," ").concat(j,"</span>"),this.floatingButton.addEventListener("click",function(){return S.open()}),this.isOpen&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),document.body.appendChild(this.floatingButton)}}},{key:"normalizeLanguage",value:function(t){if(!t)return null;var e=t.trim().toLowerCase();if(!e)return null;if(P.includes(e))return e;var n=e.split(/[-_]/)[0];return P.includes(n)?n:null}},{key:"getDocumentLanguage",value:function(){var t;return"undefined"==typeof document?null:this.normalizeLanguage(null===(t=document.documentElement)||void 0===t?void 0:t.lang)}},{key:"syncLanguageWithDocument",value:function(){var t;if(!this.hasExplicitLanguageSelection){var e=this.getDocumentLanguage();e&&this.isLanguageSupportedByEmbed(e)&&(null===(t=this.config)||void 0===t?void 0:t.language)!==e&&(this.applyLanguage(e,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",e))}}},{key:"isLanguageSupportedByEmbed",value:function(t){var e;if(!t)return!1;var n=null===(e=this.embedConfig)||void 0===e?void 0:e.languages;return Array.isArray(n)&&n.includes(t)}},{key:"observeDocumentLanguage",value:function(){var t=this;"undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&(this.htmlLangObserver&&this.htmlLangObserver.disconnect(),this.htmlLangObserver=new MutationObserver(function(e){var n,i=B(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("attributes"===o.type&&"lang"===o.attributeName)return void t.syncLanguageWithDocument()}}catch(t){i.e(t)}finally{i.f()}}),this.htmlLangObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))}},{key:"applyLanguage",value:function(t,e){e.markAsExplicit&&(this.hasExplicitLanguageSelection=!0),this.config&&(this.config.language=t),this.updateFloatingButtonText(t),e.syncEmbed&&this.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:t}})}},{key:"getFloatingButtonCallToAction",value:function(t){var e,n=null===(e=this.config)||void 0===e?void 0:e.floatingButtonOptions;return t===E.ITALIAN&&null!=n&&n.italianCallToAction?n.italianCallToAction:t===E.ENGLISH&&null!=n&&n.englishCallToAction?n.englishCallToAction:null!=n&&n.callToAction?n.callToAction:R[t]||R[E.ENGLISH]}},{key:"resolveFloatingButtonResponsiveOption",value:function(t,e,n){return window.innerWidth<775?void 0!==e?e:n:void 0!==t?t:n}},{key:"bindBookNowButtons",value:function(){var t=this,e=document.querySelectorAll(".book-now-button");if(0!==e.length){var n=0;e.forEach(function(e){var i=e,o="_holidoitClickBound";i[o]||(i[o]=!0,n++,i.addEventListener("click",function(e){var n;e.preventDefault(),e.stopPropagation();var o=i.getAttribute("data-product-number")||(null===(n=i.closest("[data-product-number]"))||void 0===n?void 0:n.getAttribute("data-product-number"))||"";t.log("Book now button clicked",{element:i.tagName,productNumber:o});var r=parseInt(o,10);setTimeout(function(){isNaN(r)?t.open():t.open({experienceId:r})},0)}))}),n>0&&this.log("Bound click handlers to ".concat(n," .book-now-button element(s)"))}}},{key:"observeForBookNowButtons",value:function(){var t=this;window._holidoitObserverActive||(window._holidoitObserverActive=!0,new MutationObserver(function(e){for(var n=!1,i=0;i<e.length;i++){var o=e[i];if("childList"===o.type)for(var r=0;r<o.addedNodes.length;r++){var a,s,l=o.addedNodes[r];if(l instanceof HTMLElement&&(null!==(a=l.classList)&&void 0!==a&&a.contains("book-now-button")||null!==(s=l.querySelector)&&void 0!==s&&s.call(l,".book-now-button"))){n=!0;break}}if(n)break}n&&(t.log("Detected dynamically added .book-now-button elements, binding..."),t.bindBookNowButtons())}).observe(document.body,{childList:!0,subtree:!0}),this.log("MutationObserver active for .book-now-button elements"))}},{key:"parseHolidoitEmbedUrl",value:function(t){try{var e=new URL(t),n=e.hostname.replace(/^www\./,"");if("holidoit.com"!==n&&"holido.it"!==n)return null;var i=e.pathname.match(/^\/embed\/web\/([^/]+)\/?$/);if(!i)return null;var o=i[1],r=e.searchParams.get("experienceId"),a=r?parseInt(r,10):void 0;return{embedId:o,experienceId:a&&!isNaN(a)?a:void 0}}catch(t){return null}}},{key:"interceptHolidoitLinks",value:function(){var t=this;document.addEventListener("click",function(e){var n,i,o,r=null===(n=e.target)||void 0===n||null===(i=n.closest)||void 0===i?void 0:i.call(n,"a[href]");if(null!=r&&r.href){var a=t.parseHolidoitEmbedUrl(r.href);a&&a.embedId===(null===(o=t.config)||void 0===o?void 0:o.embedId)&&(e.preventDefault(),e.stopPropagation(),t.log("Intercepted holidoit embed link",a),a.experienceId?t.open({experienceId:a.experienceId}):t.open())}},!0)}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage),window.addEventListener("message",this.handleExternalMessage)}},{key:"getSenderIframe",value:function(t){if(!t)return null;for(var e=0,n=Array.from(document.querySelectorAll("iframe"));e<n.length;e++){var i=n[e];if(i.contentWindow===t)return i}return null}},{key:"isMessageFromOwnEmbedIframe",value:function(t){var e;return!(null===(e=this.iframe)||void 0===e||!e.contentWindow)&&t.source===this.iframe.contentWindow&&t.origin===this.embedOrigin}},{key:"isTrustedHolidoitOrigin",value:function(t){if(!t||"null"===t)return!1;if(t===this.embedOrigin)return!0;try{var e=new URL(t).hostname;return"localhost"===e||"127.0.0.1"===e||"holidoit.com"===e||e.endsWith(".holidoit.com")||"holido.it"===e||e.endsWith(".holido.it")||"holydoit.com"===e||e.endsWith(".holydoit.com")}catch(t){return!1}}},{key:"extractAnalyticsPayload",value:function(t){var e=_(t);return e&&"embed"===e.source?e:(this.log("Ignoring invalid analytics message payload",t),null)}},{key:"handleAnalyticsMessage",value:function(t){var e=this.extractAnalyticsPayload(t);return!!e&&(w(e.eventData,e.dedupeKey)?(this.log("Pushed analytics event to dataLayer",e.dedupeKey,e.eventData),!0):(this.log("Ignoring duplicate analytics event",e.dedupeKey),!0))}},{key:"postMessage",value:function(t){var e;return null!==(e=this.iframe)&&void 0!==e&&e.contentWindow?this.isReady||"HOLIDOIT_INIT"===t.type?(this.log("Posting message to iframe",t),void this.iframe.contentWindow.postMessage(t,this.embedOrigin)):(this.log("Embed not ready, queueing message",t),void this.pendingMessages.push(t)):(this.log("Iframe not ready, queueing message",t),void this.pendingMessages.push(t))}},{key:"maybeSendInitMessage",value:function(){var t=this;if(this.hasReceivedEmbedReady&&this.embedConfigLoaded&&!this.isReady&&this.config){this.log("Embed and config are ready, sending HOLIDOIT_INIT");var e="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname;this.postMessage({type:"HOLIDOIT_INIT",payload:{embedId:this.config.embedId,language:this.config.language,floatingButton:this.config.floatingButton,floatingButtonOptions:this.config.floatingButtonOptions,parentOrigin:window.location.origin,parentUrl:window.location.href,isMobile:window.innerWidth<775,debug:this.config.debug||e}}),this.isReady=!0,this.pendingMessages.forEach(function(e){return t.postMessage(e)}),this.pendingMessages=[]}}},{key:"checkPaymentRedirect",value:function(){var t=this;if(V)this.log("Payment redirect already processed, skipping");else{var e=null,n=null,i=null;if(A)e=A.paymentIntent,n=A.redirectStatus,i=A.paymentIntentClientSecret,this.log("Using captured Stripe params",A);else{var o=new URLSearchParams(window.location.search);e=o.get("payment_intent"),n=o.get("redirect_status"),i=o.get("payment_intent_client_secret")}if(e&&n){this.log("Payment redirect detected",{paymentIntent:e,redirectStatus:n}),V=!0;var r=null;try{r=localStorage.getItem(f)}catch(t){this.log("localStorage not available (incognito mode?)",t)}if(r)try{var a=JSON.parse(r);this.log("Found payment session",a),this.open(),this.isReady?t.postMessage({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:e,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}):this.pendingMessages.push({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:e,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}),this.cleanUrlParams();try{localStorage.removeItem(f)}catch(t){this.log("Failed to remove payment session from localStorage",t)}}catch(t){this.log("Failed to parse payment session",t)}else this.log("Payment redirect params found but no session - cleaning URL"),this.cleanUrlParams()}}}},{key:"cleanUrlParams",value:function(){var t=new URL(window.location.href);t.searchParams.delete("payment_intent"),t.searchParams.delete("payment_intent_client_secret"),t.searchParams.delete("redirect_status"),window.history.replaceState({},"",t.toString())}},{key:"getEmbedOrigin",value:function(t){try{return new URL(t).origin}catch(t){return window.location.origin}}},{key:"lockBodyScroll",value:function(){var t=this;if(this.scrollLockState)this.log("Scroll already locked, skipping");else{var e=this.getDocumentScrollRoot(),n=this.getScrollPosition(),i=n.top,o=n.left,r=this.getScrollbarWidth(),a={overflow:document.body.style.overflow,overscrollBehavior:document.body.style.overscrollBehavior,paddingRight:document.body.style.paddingRight,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,width:document.body.style.width},s={overflow:document.documentElement.style.overflow,overscrollBehavior:document.documentElement.style.overscrollBehavior};this.scrollLockState={mode:this.isIOSDevice()&&this.isDocumentScrollRoot(e)?"fixed-body":"document-overflow",scrollTop:i,scrollLeft:o,scrollbarWidth:r,bodyStyles:a,htmlStyles:s},document.documentElement.style.overflow="hidden",document.documentElement.style.overscrollBehavior="none",document.body.style.overflow="hidden",document.body.style.overscrollBehavior="none",r>0&&(document.body.style.paddingRight="".concat(r,"px")),"fixed-body"===this.scrollLockState.mode&&(document.body.style.position="fixed",document.body.style.top="-".concat(i,"px"),document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",this.touchMoveHandler=function(e){var n,i=e.target;null!==(n=t.container)&&void 0!==n&&n.contains(i)||e.preventDefault()},document.addEventListener("touchmove",this.touchMoveHandler,{passive:!1})),this.log("Scroll locked",{mode:this.scrollLockState.mode,scrollbarWidth:r})}}},{key:"unlockBodyScroll",value:function(){if(this.scrollLockState){var t=this.scrollLockState,e=t.mode,n=t.scrollTop,i=t.scrollLeft,o=t.bodyStyles,r=t.htmlStyles;document.body.style.overflow=o.overflow,document.body.style.overscrollBehavior=o.overscrollBehavior,document.body.style.paddingRight=o.paddingRight,document.documentElement.style.overflow=r.overflow,document.documentElement.style.overscrollBehavior=r.overscrollBehavior,"fixed-body"===e&&(document.body.style.position=o.position,document.body.style.top=o.top,document.body.style.left=o.left,document.body.style.right=o.right,document.body.style.width=o.width,this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)),this.restoreScrollPosition(n,i),this.scrollLockState=null,this.log("Scroll unlocked",{mode:e})}else this.log("Scroll not locked, skipping unlock")}},{key:"log",value:function(){var t,e="undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);if(null!==(t=this.config)&&void 0!==t&&t.debug||e){for(var n,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];(n=console).log.apply(n,["[Holidoit]"].concat(o))}}}],n&&s(t.prototype,n),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i,a,u}()),F=function(t){return U.init(t)},j=function(t){return U.open(t)},N=function(){return U.close()},W=function(t){return U.toggle(t)},z=function(t){return U.changeLanguage(t)},G=function(){return U.destroy()},K=h,J=function(t,e,n){t&&U.init({embedId:t,floatingButton:null==e||e,floatingButtonOptions:n})},q=function(t,e,n){U.toggle({embedId:t,experienceId:e?parseInt(e,10):void 0,test:n})},Z=function(){return U.open()},X=function(){return U.close()},Q={init:F,open:j,close:N,toggle:W,changeLanguage:z,destroy:G,version:K,renderHolidoitEmbed:J,toggleEmbed:q,openEmbed:Z,closeEmbed:X};if("undefined"!=typeof window){window.Holidoit=Q;var tt=document.currentScript,et=function(){var t=window.HolidoitConfig;if(null!=t&&t.embedId)U.init(t);else if(null!=tt&&tt.getAttribute("data-embed-id")){var e=tt.getAttribute("data-embed-id"),n=tt.getAttribute("data-floating-button"),i=tt.getAttribute("data-language"),o=tt.getAttribute("data-embed-url"),r=tt.getAttribute("data-debug");U.init({embedId:e,floatingButton:"true"===n,language:i||void 0,embedUrl:o||void 0,debug:"true"===r})}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",et):et()}})(),i})());
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Holidoit",[],e):"object"==typeof exports?exports.Holidoit=e():t.Holidoit=e()}(this,()=>(()=>{var t={172:t=>{t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},317:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(t){return t+"º"}};return n.default.locale(i,null,!0),i}(n(353))},353:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",o="second",r="minute",a="hour",s="day",l="week",u="month",c="quarter",d="year",h="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},y={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var i=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(i,u),r=n-o<0,a=e.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:l,d:s,D:h,h:a,m:r,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var _="$isDayjsObject",k=function(t){return t instanceof x||!(!t||!t[_])},M=function t(e,n,i){var o;if(!e)return b;if("string"==typeof e){var r=e.toLowerCase();w[r]&&(o=r),n&&(w[r]=n,o=r);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var s=e.name;w[s]=e,o=s}return!i&&o&&(b=o),o||!i&&b},S=function(t,e){if(k(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new x(n)},O=y;O.l=M,O.i=k,O.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function g(t){this.$L=M(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(m);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return O},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return S(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<S(t)},v.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,i=!!O.u(e)||e,c=O.p(t),f=function(t,e){var o=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return i?o:o.endOf(s)},m=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(c){case d:return i?f(1,0):f(31,11);case u:return i?f(1,g):f(0,g+1);case l:var b=this.$locale().weekStart||0,w=(p<b?p+7:p)-b;return f(i?v-w:v+(6-w),g);case s:case h:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case r:return m(y+"Seconds",2);case o:return m(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,l=O.p(t),c="set"+(this.$u?"UTC":""),f=(n={},n[s]=c+"Date",n[h]=c+"Date",n[u]=c+"Month",n[d]=c+"FullYear",n[a]=c+"Hours",n[r]=c+"Minutes",n[o]=c+"Seconds",n[i]=c+"Milliseconds",n)[l],m=l===s?this.$D+(e-this.$W):e;if(l===u||l===d){var p=this.clone().set(h,1);p.$d[f](m),p.init(),this.$d=p.set(h,Math.min(this.$D,p.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[O.p(t)]()},v.add=function(i,c){var h,f=this;i=Number(i);var m=O.p(c),p=function(t){var e=S(f);return O.w(e.date(e.date()+Math.round(t*i)),f)};if(m===u)return this.set(u,this.$M+i);if(m===d)return this.set(d,this.$y+i);if(m===s)return p(1);if(m===l)return p(7);var g=(h={},h[r]=e,h[a]=n,h[o]=t,h)[m]||1,v=this.$d.getTime()+i*g;return O.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),r=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,c=n.meridiem,d=function(t,n,o,r){return t&&(t[n]||t(e,i))||o[n].slice(0,r)},h=function(t){return O.s(r%12||12,t,"0")},m=c||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(p,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return O.s(e.$y,4,"0");case"M":return s+1;case"MM":return O.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return e.$D;case"DD":return O.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,l,2);case"ddd":return d(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(r);case"HH":return O.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return m(r,a,!0);case"A":return m(r,a,!1);case"m":return String(a);case"mm":return O.s(a,2,"0");case"s":return String(e.$s);case"ss":return O.s(e.$s,2,"0");case"SSS":return O.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,h,f){var m,p=this,g=O.p(h),v=S(i),y=(v.utcOffset()-this.utcOffset())*e,b=this-v,w=function(){return O.m(p,v)};switch(g){case d:m=w()/12;break;case u:m=w();break;case c:m=w()/3;break;case l:m=(b-y)/6048e5;break;case s:m=(b-y)/864e5;break;case a:m=b/n;break;case r:m=b/e;break;case o:m=b/t;break;default:m=b}return f?m:O.a(m)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=M(t,e,!0);return i&&(n.$L=i),n},v.clone=function(){return O.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),L=x.prototype;return S.prototype=L,[["$ms",i],["$s",o],["$m",r],["$H",a],["$W",s],["$M",u],["$y",d],["$D",h]].forEach(function(t){L[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),S.extend=function(t,e){return t.$i||(t(e,x,S),t.$i=!0),S},S.locale=M,S.isDayjs=k,S.unix=function(t){return S(1e3*t)},S.en=w[b],S.Ls=w,S.p={},S}()},373:t=>{t.exports=function(t){var e=Object(t),n=[];for(var i in e)n.unshift(i);return function t(){for(;n.length;)if((i=n.pop())in e)return t.value=i,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},445:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var a=o.prototype;r.utc=function(t){return new o({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=r(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var l=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(i,o){var r=this.$utils().u;if(r(i))return this.$u?0:r(this.$offset)?u.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],r=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===r?a:-a}(i),null===i))return this;var a=Math.abs(i)<=16?60*i:i;if(0===a)return this.utc(o);var s=this.clone();if(o)return s.$offset=a,s.$u=!1,s;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(a+l,t)).$offset=a,s.$x.$localOffset=l,s};var c=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return h.call(this,t,e,n);var i=this.local(),o=r(t).local();return h.call(i,o,e,n)}}}()},494:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function o(t,e,n){var o=i[n];return Array.isArray(o)&&(o=o[e?0:1]),o.replace("%d",t)}var r={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(t){return t+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o}};return n.default.locale(r,null,!0),r}(n(353))},546:t=>{function e(n,i,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}t.exports=e=function(t,n,i,o){function r(n,i){e(t,n,function(t){return this._invoke(n,i,t)})}n?a?a(t,n,{value:i,enumerable:!o,configurable:!o,writable:!o}):t[n]=i:(r("next",0),r("throw",1),r("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,i,o,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},569:function(t){t.exports=function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},s=function(e,n){for(var i=a(e,n),r=[],s=0;s<i.length;s+=1){var l=i[s],u=l.type,c=l.value,d=t[u];d>=0&&(r[d]=parseInt(c,10))}var h=r[3],f=24===h?0:h,m=r[0]+"-"+r[1]+"-"+r[2]+" "+f+":"+r[4]+":"+r[5]+":000",p=+e;return(o.utc(m).valueOf()-(p-=p%1e3))/6e4},l=i.prototype;l.tz=function(t,e){void 0===t&&(t=r);var n,i=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:t}),l=Math.round((a-new Date(s))/1e3/60),u=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(u)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),e){var c=n.utcOffset();n=n.add(i-c,"minute")}}else n=this.utcOffset(0,e);return n.$x.$timezone=t,n},l.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return n&&n.value};var u=l.startOf;l.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return u.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,l=s(+o(),a);if("string"!=typeof t)return o(t).tz(a);var u=function(t,e,n){var i=t-60*e*1e3,o=s(i,n);if(e===o)return[i,e];var r=s(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),l,a),c=u[0],d=u[1],h=o(c).utcOffset(d);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}()},579:(t,e,n)=>{var i=n(738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(i(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},633:(t,e,n)=>{var i=n(172),o=n(993),r=n(869),a=n(887),s=n(791),l=n(373),u=n(579);function c(){"use strict";var e=o(),n=e.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))}var f={throw:1,return:2,break:3,continue:3};function m(t){var e,n;return function(i){e||(e={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(t,e){return n(i.a,f[t],e)},delegateYield:function(t,o,r){return e.resultName=o,n(i.d,u(t),r)},finish:function(t){return n(i.f,t)}},n=function(t,n,o){i.p=e.prev,i.n=e.next;try{return t(n,o)}finally{e.next=i.n}}),e.resultName&&(e[e.resultName]=i.v,e.resultName=void 0),e.sent=i.v,e.next=i.n;try{return t.call(this,e)}finally{i.p=e.prev,i.n=e.next}}}return(t.exports=c=function(){return{wrap:function(t,n,i,o){return e.w(m(t),n,i,o&&o.reverse())},isGeneratorFunction:h,mark:e.m,awrap:function(t,e){return new i(t,e)},AsyncIterator:s,async:function(t,e,n,i,o){return(h(e)?a:r)(m(t),e,n,i,o)},keys:l,values:u}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=c,t.exports.__esModule=!0,t.exports.default=t.exports},738:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:(t,e,n)=>{var i=n(633)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},791:(t,e,n)=>{var i=n(172),o=n(546);t.exports=function t(e,n){function r(t,o,a,s){try{var l=e[t](o),u=l.value;return u instanceof i?n.resolve(u.v).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):n.resolve(u).then(function(t){l.value=t,a(l)},function(t){return r("throw",t,a,s)})}catch(t){s(t)}}var a;this.next||(o(t.prototype),o(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(t,e,i){function o(){return new n(function(e,n){r(t,i,e,n)})}return a=a?a.then(o,o):o()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},813:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(t){return t+(1===t?"er":"")}};return n.default.locale(i,null,!0),i}(n(353))},826:function(t){t.exports=function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}}}()},840:function(t){t.exports=function(){"use strict";return function(t,e,n){var i=e.prototype,o=function(t){return t&&(t.indexOf?t:t.s)},r=function(t,e,n,i,r){var a=t.name?t:t.$locale(),s=o(a[e]),l=o(a[n]),u=s||l.map(function(t){return t.slice(0,i)});if(!r)return u;var c=a.weekStart;return u.map(function(t,e){return u[(e+(c||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(t,e){return t.formats[e]||function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})}(t.formats[e.toUpperCase()])},l=function(){var t=this;return{months:function(e){return e?e.format("MMMM"):r(t,"months")},monthsShort:function(e){return e?e.format("MMM"):r(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):r(t,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):r(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):r(t,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return s(t.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return l.bind(this)()},n.localeData=function(){var t=a();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(e){return s(t,e)},meridiem:t.meridiem,ordinal:t.ordinal}},n.months=function(){return r(a(),"months")},n.monthsShort=function(){return r(a(),"monthsShort","months",3)},n.weekdays=function(t){return r(a(),"weekdays",null,null,t)},n.weekdaysShort=function(t){return r(a(),"weekdaysShort","weekdays",3,t)},n.weekdaysMin=function(t){return r(a(),"weekdaysMin","weekdays",2,t)}}}()},869:(t,e,n)=>{var i=n(887);t.exports=function(t,e,n,o,r){var a=i(t,e,n,o,r);return a.next().then(function(t){return t.done?t.value:a.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887:(t,e,n)=>{var i=n(993),o=n(791);t.exports=function(t,e,n,r,a){return new o(i().w(t,e,n,r),a||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},900:function(t,e,n){t.exports=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),i={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(t){return t+"º"}};return n.default.locale(i,null,!0),i}(n(353))},993:(t,e,n)=>{var i=n(546);function o(){var e,n,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function l(t,o,r,a){var s=o&&o.prototype instanceof c?o:c,l=Object.create(s.prototype);return i(l,"_invoke",function(t,i,o){var r,a,s,l=0,c=o||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,a=0,s=e,h.n=n,u}};function f(t,i){for(a=t,s=i,n=0;!d&&l&&!o&&n<c.length;n++){var o,r=c[n],f=h.p,m=r[2];t>3?(o=m===i)&&(s=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=f&&((o=t<2&&f<r[1])?(a=0,h.v=i,h.n=r[1]):f<m&&(o=t<3||r[0]>i||i>m)&&(r[4]=t,r[5]=i,h.n=m,a=0))}if(o||t>1)return u;throw d=!0,i}return function(o,c,m){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,m),a=c,s=m;(n=a<2?e:s)||!d;){r||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(l=2,r){if(a||(o="next"),n=r[o]){if(!(n=n.call(r,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=r.return)&&n.call(r),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);r=e}else if((n=(d=h.n<0)?s:t.call(i,h))!==u)break}catch(t){r=e,a=1,s=t}finally{l=1}}return{value:n,done:d}}}(t,r,a),!0),l}var u={};function c(){}function d(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),m=h.prototype=c.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t}return d.prototype=h,i(m,"constructor",h),i(h,"constructor",d),d.displayName="GeneratorFunction",i(h,s,"GeneratorFunction"),i(m),i(m,s,"Generator"),i(m,a,function(){return this}),i(m,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:l,m:p}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function e(e,n){return function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function l(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(i),n.d(i,{Languages:()=>E,changeLanguage:()=>z,close:()=>N,closeEmbed:()=>X,destroy:()=>G,init:()=>F,open:()=>j,openEmbed:()=>Z,renderHolidoitEmbed:()=>J,toggle:()=>W,toggleEmbed:()=>q,version:()=>K});var u=n(756),c=n.n(u),d="holidoit-loader-iframe",h="2.0.0",f="_holidoit_payment_session";var m="holidoit_analytics_dedupe_keys",p=new Set;function g(t){return"object"===r(t)&&null!==t&&!Array.isArray(t)}function v(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(t){return null}}function y(){var t=v();if(!t)return[];try{var e=t.getItem(m);if(!e)return[];var n=JSON.parse(e);return Array.isArray(n)?n.filter(function(t){return"string"==typeof t&&t.length>0}):[]}catch(t){return[]}}function b(t){if(t){p.add(t);var e=y().filter(function(e){return e!==t});e.push(t),function(t){var e=v();if(e)try{e.setItem(m,JSON.stringify(t.slice(-200)))}catch(t){}}(e)}}function w(t,e){return"undefined"!=typeof window&&(!function(t){return!(!t||!p.has(t)&&(!y().includes(t)||(p.add(t),0)))}(e)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),b(e),window.dataLayer.push(t),!0))}function _(t){if(!g(t)||"HOLIDOIT_ANALYTICS_EVENT"!==t.type)return null;var e,n=g(t.payload)?t.payload:t,i=n.channel,o=n.dedupeKey,r=n.eventData,a=n.source,s=n.widgetType;return"dataLayer"!==i||"embed"!==a&&"widget"!==a||"string"!=typeof o||""===o.trim()||(!g(e=r)||"string"!=typeof e.event||""===e.event.trim())?null:{channel:i,dedupeKey:o.trim(),eventData:r,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}var k=new Set(["holidoit.js","embed.html","payment-redirect.html","widgets/widget-book-now-button.html","widgets/widget-booking-box.html","widgets/widget-experience.html","widgets/widget-experience-grid.html","widgets/widget-experience-grid-drawer.html","widgets/widget-experience-page-drawer.html"]);var M=n(353),S=n.n(M),O=(n(494),n(826),n(317),n(813),n(900),n(840)),x=n.n(O),L=n(569),D=n.n(L),I=n(445),T=n.n(I);S().extend(T()),S().extend(D()),S().extend(x());var E=function(t){return t.ITALIAN="it",t.ENGLISH="en",t.SPANISH="es",t.FRENCH="fr",t.GERMAN="de",t}({});S()().locale("it").localeData().months(),S()().locale("it").localeData().weekdays(),S()().locale("en").localeData().months(),S()().locale("en").localeData().weekdays(),S()().locale("de").localeData().months(),S()().locale("de").localeData().weekdays(),S()().locale("es").localeData().months(),S()().locale("es").localeData().weekdays(),S()().locale("fr").localeData().months(),S()().locale("fr").localeData().weekdays();function B(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return H(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var A=function(){if("undefined"==typeof window)return null;try{var t=new URLSearchParams(window.location.search),e=t.get("payment_intent");if(!e)return null;var n={paymentIntent:e,paymentIntentClientSecret:t.get("payment_intent_client_secret"),redirectStatus:t.get("redirect_status")};"localhost"===window.location.hostname||window.location.hostname;return n}catch(t){return null}}(),V=!1,Y=new Set(["holidoitExperienceSelected","holidoitIFrameChangeLanguage","holidoitExperienceCount"]),P=Object.values(E),R=l(l(l(l(l({},E.ITALIAN,"Prenota ora"),E.ENGLISH,"Book now"),E.SPANISH,"Reservar ahora"),E.FRENCH,"Réserver maintenant"),E.GERMAN,"Jetzt buchen");var U=new(function(){return t=function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"config",null),l(this,"embedConfig",null),l(this,"iframe",null),l(this,"container",null),l(this,"floatingButton",null),l(this,"isOpen",!1),l(this,"hasDrawerEntered",!1),l(this,"closeTimeout",null),l(this,"isReady",!1),l(this,"pendingMessages",[]),l(this,"embedOrigin",""),l(this,"resolvedEmbedUrl",""),l(this,"resolvedApiUrl",""),l(this,"htmlLangObserver",null),l(this,"hasExplicitLanguageSelection",!1),l(this,"hasReceivedEmbedReady",!1),l(this,"embedConfigLoaded",!1),l(this,"previouslyFocusedElement",null),l(this,"visualViewportBaselineHeight",null),l(this,"visualViewportBaselineWidth",null),l(this,"visualViewportUpdateFrame",null),l(this,"isKeyboardVisible",!1),l(this,"lastKeyboardViewportHeight",null),l(this,"lastKeyboardViewportOffsetTop",0),l(this,"keyboardOpeningGuardUntil",0),l(this,"keyboardOpeningCheckTimeout",null),l(this,"keyboardDismissalGuardUntil",0),l(this,"hostCanvasStyles",null),l(this,"scrollLockState",null),l(this,"touchMoveHandler",null),l(this,"scheduleVisualViewportUpdate",function(){null!==e.visualViewportUpdateFrame&&cancelAnimationFrame(e.visualViewportUpdateFrame),e.visualViewportUpdateFrame=requestAnimationFrame(function(){e.visualViewportUpdateFrame=null,e.syncKeyboardViewport()})}),l(this,"handleExternalMessage",function(t){var n=t.data;if(n&&"string"==typeof n.action&&Y.has(n.action)){var i=null;if(t.source!==window){if(!(i=e.getSenderIframe(t.source)))return void e.log("Ignoring external message from unknown iframe source",n.action);if(i.id===d)return;if(!e.isTrustedHolidoitOrigin(t.origin))return void e.log("Ignoring external message from untrusted origin",t.origin,n.action)}switch(e.log("Received external message",n),n.action){case"holidoitExperienceSelected":n.experienceId&&(e.log("Experience selected from external iframe",n.experienceId),e.open({experienceId:n.experienceId,gift:!!n.gift}));break;case"holidoitIFrameChangeLanguage":n.language&&(e.log("Language change from external iframe",n.language),e.changeLanguage(n.language));break;case"holidoitExperienceCount":if(!i)return;if(e.log("Experience count from external iframe",n.count),"number"==typeof n.height){var o=n.height+16,r=parseInt(i.style.height||"0",10);Math.abs(o-r)>15&&(i.style.height="".concat(o,"px"),e.log("Adjusted iframe height to",o,"for",i.id||i.src))}}}}),l(this,"handleMessage",function(t){var n,i,o,a;if(e.isMessageFromOwnEmbedIframe(t)){var s,l=t.data;if("object"===r(s=l)&&null!==s&&!Array.isArray(s)&&"string"==typeof l.type&&l.type.startsWith("HOLIDOIT_")&&(e.log("Received message from embed iframe",l),!e.handleAnalyticsMessage(l)))switch(l.type){case"HOLIDOIT_READY":e.hasReceivedEmbedReady=!0,e.maybeSendInitMessage();break;case"HOLIDOIT_OPENED":e.isOpen&&null===e.closeTimeout&&(e.hasDrawerEntered=!0,e.syncContainerBackdrop());break;case"HOLIDOIT_CLOSED":e.close();break;case"HOLIDOIT_DRAWER_EXITED":null!==e.closeTimeout&&e.finishClose();break;case"HOLIDOIT_BOOKING_COMPLETE":var u=l.payload;e.log("Booking complete",u),null===(n=e.config)||void 0===n||null===(i=n.onBookingComplete)||void 0===i||i.call(n,u);break;case"HOLIDOIT_PAYMENT_REDIRECT_START":var c=l.payload;if(null!=c&&c.session){e.log("Saving payment session for redirect",c.session);try{localStorage.setItem(f,JSON.stringify(c.session))}catch(t){e.log("Failed to save payment session (incognito mode?)",t)}}break;case"HOLIDOIT_LANGUAGE_CHANGED":var d=l.payload,h=e.normalizeLanguage(null==d?void 0:d.language);h&&(e.log("Language changed from embed:",h),e.applyLanguage(h,{markAsExplicit:!0,syncEmbed:!1}),window.postMessage({action:"holidoitEmbedChangeLanguage",language:h},"*"));break;case"HOLIDOIT_CHECKOUT_FIELD_FOCUS":var m,p=l.payload;if(!e.isOpen||null!==e.closeTimeout||"boolean"!=typeof(null==p?void 0:p.focused)||window.innerWidth>=775)break;e.clearKeyboardOpeningCheck(),p.focused?(e.keyboardOpeningGuardUntil=performance.now()+600,e.keyboardDismissalGuardUntil=0,e.updateKeyboardVisibility(!0,null===(m=window.visualViewport)||void 0===m?void 0:m.height),e.keyboardOpeningCheckTimeout=window.setTimeout(function(){e.keyboardOpeningCheckTimeout=null;var t=window.visualViewport;t&&null!==e.visualViewportBaselineHeight&&e.visualViewportBaselineHeight-t.height>100||e.scheduleVisualViewportUpdate()},650)):(e.keyboardOpeningGuardUntil=0,e.keyboardDismissalGuardUntil=performance.now()+450,e.updateKeyboardVisibility(!1));break;case"HOLIDOIT_ERROR":var g=l.payload;null===(o=e.config)||void 0===o||null===(a=o.onError)||void 0===a||a.call(o,(null==g?void 0:g.message)||"Unknown error");break;case"HOLIDOIT_NAVIGATE_TO":var v=l.payload;null!=v&&v.url&&(e.log("Navigating parent page to:",v.url),window.location.href=v.url)}}})},n=[{key:"isIOSDevice",value:function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var t=navigator.userAgent||"",e=/iPad|iPhone|iPod/.test(t),n="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return e||n}},{key:"safeScrollToPosition",value:function(t,e){var n=null;try{(n=document.createElement("style")).textContent="html, body { scroll-behavior: auto !important; }",(document.head||document.documentElement).appendChild(n),window.scrollTo({left:t,top:e,behavior:"auto"})}catch(n){window.scrollTo(t,e)}finally{n&&requestAnimationFrame(function(){var t;null===(t=n)||void 0===t||t.remove()})}}},{key:"getDocumentScrollRoot",value:function(){var t=document.scrollingElement;return t instanceof HTMLElement?t:document.documentElement}},{key:"isDocumentScrollRoot",value:function(t){return t===this.getDocumentScrollRoot()||t===document.documentElement||t===document.body}},{key:"getScrollPosition",value:function(){return{top:window.scrollY,left:window.scrollX}}},{key:"getScrollbarWidth",value:function(){return window.innerWidth-document.documentElement.clientWidth}},{key:"restoreScrollPosition",value:function(t,e){var n=this.getScrollPosition();(Math.abs(n.top-t)>1||Math.abs(n.left-e)>1)&&this.safeScrollToPosition(e,t)}},{key:"focusWithoutScroll",value:function(t){if(t&&t.isConnected)try{t.focus({preventScroll:!0})}catch(e){t.focus()}}},{key:"init",value:function(t){var e,n,i=this;if(t.embedId&&(t.embedId=t.embedId.trim()),t.embedId){if(this.container)return this.log("Holidoit already initialized, skipping duplicate init"),this.config=C(C({},this.config),t),void this.syncLanguageWithDocument();var o=window.scrollY,r=history.scrollRestoration||"auto";try{history.scrollRestoration="manual"}catch(t){this.log("scrollRestoration not supported, continuing without it")}this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,this.config=C(C({},t),{},{language:this.normalizeLanguage(t.language)||void 0}),this.resolvedEmbedUrl=function(t){try{var e=new URL(t,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(e.origin!==n.origin||!e.pathname.startsWith(n.pathname))return t;var i=e.pathname.slice(n.pathname.length);return k.has(i)?(e.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20261006133105370-d791c5681cec-168a521f","/").concat(i),e.toString()):t}catch(e){return t}}(t.embedUrl||"https://cdn.holidoit.com/embed.html"),this.resolvedApiUrl="https://engine.holydoit.com",this.embedOrigin=this.getEmbedOrigin(this.resolvedEmbedUrl),this.log("Initializing Holidoit embed",{embedId:t.embedId,version:h}),this.createContainer(),this.createIframe(),null===(e=window.visualViewport)||void 0===e||e.addEventListener("resize",this.scheduleVisualViewportUpdate),null===(n=window.visualViewport)||void 0===n||n.addEventListener("scroll",this.scheduleVisualViewportUpdate,{passive:!0}),this.safeScrollToPosition(0,o),requestAnimationFrame(function(){try{history.scrollRestoration=r}catch(t){}}),this.setupMessageListener(),this.observeDocumentLanguage();var a=function(){i.bindBookNowButtons(),i.observeForBookNowButtons(),i.interceptHolidoitLinks()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a(),this.fetchEmbedConfig().then(function(){var e;((null===(e=i.embedConfig)||void 0===e?void 0:e.has_floating_button)||t.floatingButton)&&i.createFloatingButton(),i.maybeSendInitMessage()}),this.checkPaymentRedirect()}}},{key:"fetchEmbedConfig",value:(a=c().mark(function t(){var e,n,i,o,r,a,s;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(e=this.config)&&void 0!==e&&e.embedId){t.next=1;break}return t.abrupt("return");case 1:return n="".concat(this.resolvedApiUrl,"/partner/v0/embed-config/").concat(this.config.embedId,"/get"),this.log("Fetching embed config from:",n),t.prev=2,t.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});case 3:if((i=t.sent).ok){t.next=4;break}throw new Error("Failed to fetch embed config: ".concat(i.status));case 4:return t.next=5,i.json();case 5:o=t.sent,this.embedConfig=o,this.log("Embed config loaded:",o),r=this.getDocumentLanguage(),a=this.isLanguageSupportedByEmbed(r),!this.hasExplicitLanguageSelection&&r&&a?(this.applyLanguage(r,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",r)):!this.config.language&&o.language&&(this.config.language=o.language,this.log("Language set from API config:",o.language)),o.floating_button_config&&(this.config.floatingButtonOptions=this.mergeFloatingButtonOptions(this.config.floatingButtonOptions,o.floating_button_config),this.log("Merged floating button options:",this.config.floatingButtonOptions)),t.next=7;break;case 6:t.prev=6,s=t.catch(2),this.log("Failed to fetch embed config, using local options:",s);case 7:return t.prev=7,this.embedConfigLoaded=!0,t.finish(7);case 8:case"end":return t.stop()}},t,this,[[2,6,7,8]])}),u=function(){var t=this,e=arguments;return new Promise(function(n,i){var r=a.apply(t,e);function s(t){o(r,n,i,s,l,"next",t)}function l(t){o(r,n,i,s,l,"throw",t)}s(void 0)})},function(){return u.apply(this,arguments)})},{key:"mergeFloatingButtonOptions",value:function(t,e){var n,i,o,r;return t?{desktop:C(C({},t.desktop),e.desktop),mobile:C(C({},t.mobile),e.mobile),zIndex:null!==(n=e.zIndex)&&void 0!==n?n:t.zIndex,callToAction:null!==(i=e.callToAction)&&void 0!==i?i:t.callToAction,italianCallToAction:null!==(o=e.italianCallToAction)&&void 0!==o?o:t.italianCallToAction,englishCallToAction:null!==(r=e.englishCallToAction)&&void 0!==r?r:t.englishCallToAction}:e}},{key:"open",value:function(t){var e,n,i,o,r;null!=t&&t.embedId&&(t.embedId=t.embedId.trim()),this.log("Opening embed",t),this.iframe&&this.container&&(this.clearCloseTimeout(),this.isOpen||(this.previouslyFocusedElement=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement!==document.documentElement?document.activeElement:null),this.isOpen=!0,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null!==(e=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==e?e:null,this.visualViewportBaselineWidth=window.innerWidth,this.lockBodyScroll(),this.container.style.display="block",this.container.style.pointerEvents="auto",this.syncContainerBackdrop(),this.scheduleVisualViewportUpdate(),this.floatingButton&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),this.postMessage({type:"HOLIDOIT_OPEN",payload:{embedId:(null==t?void 0:t.embedId)||(null===(i=this.config)||void 0===i?void 0:i.embedId),experienceId:null==t?void 0:t.experienceId,test:null==t?void 0:t.test,gift:null==t?void 0:t.gift}}),null===(o=this.config)||void 0===o||null===(r=o.onOpen)||void 0===r||r.call(o))}},{key:"close",value:function(){var t=this;this.isOpen&&null===this.closeTimeout&&(this.log("Closing embed"),this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.closeTimeout=window.setTimeout(function(){t.finishClose()},600),this.hasDrawerEntered=!1,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_CLOSE"}))}},{key:"finishClose",value:function(){var t,e;this.clearCloseTimeout(),this.isOpen=!1,this.hasDrawerEntered=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.updateKeyboardVisibility(!1),document.activeElement===this.iframe&&this.iframe.blur(),this.floatingButton&&(this.floatingButton.removeAttribute("inert"),this.floatingButton.removeAttribute("aria-hidden"),this.floatingButton.removeAttribute("tabindex")),this.focusWithoutScroll(this.previouslyFocusedElement),this.previouslyFocusedElement=null,this.unlockBodyScroll(),this.container&&(this.syncContainerBackdrop(),this.container.style.display="none",this.container.style.pointerEvents="none"),this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,null===(t=this.config)||void 0===t||null===(e=t.onClose)||void 0===e||e.call(t)}},{key:"toggle",value:function(t){this.isOpen?this.close():this.open(t)}},{key:"changeLanguage",value:function(t){var e=this.normalizeLanguage(t);e?(this.log("Changing language",e),this.applyLanguage(e,{markAsExplicit:!0,syncEmbed:!0})):this.log("Ignoring unsupported language change",t)}},{key:"updateFloatingButtonText",value:function(t){var e,n;if(this.floatingButton&&this.config){var i=this.config.floatingButtonOptions,o=this.resolveFloatingButtonResponsiveOption(null==i||null===(e=i.desktop)||void 0===e?void 0:e.textColor,null==i||null===(n=i.mobile)||void 0===n?void 0:n.textColor,"white"),r=this.getFloatingButtonCallToAction(t),a='<svg style="fill: '.concat(o,' !important;" xmlns="http://www.w3.org/2000/svg" height="19" width="19" viewBox="0 0 448 512"><path style="fill: ').concat(o,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(o," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(a," ").concat(r,"</span>"),this.log("Updated floating button text to:",r)}}},{key:"destroy",value:function(){var t,e;this.log("Destroying embed"),this.clearCloseTimeout(),this.syncHostCanvasBackdrop(!1),this.scrollLockState&&this.unlockBodyScroll(),this.container&&(this.container.remove(),this.container=null),this.floatingButton&&(this.floatingButton.remove(),this.floatingButton=null),this.htmlLangObserver&&(this.htmlLangObserver.disconnect(),this.htmlLangObserver=null),this.iframe=null,this.config=null,this.isOpen=!1,this.hasDrawerEntered=!1,this.isReady=!1,this.hasExplicitLanguageSelection=!1,this.hasReceivedEmbedReady=!1,this.embedConfigLoaded=!1,this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.visualViewportBaselineHeight=null,this.visualViewportBaselineWidth=null,window.removeEventListener("message",this.handleMessage),window.removeEventListener("message",this.handleExternalMessage),null===(t=window.visualViewport)||void 0===t||t.removeEventListener("resize",this.scheduleVisualViewportUpdate),null===(e=window.visualViewport)||void 0===e||e.removeEventListener("scroll",this.scheduleVisualViewportUpdate),null!==this.visualViewportUpdateFrame&&(cancelAnimationFrame(this.visualViewportUpdateFrame),this.visualViewportUpdateFrame=null),this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)}},{key:"clearKeyboardOpeningCheck",value:function(){null!==this.keyboardOpeningCheckTimeout&&(window.clearTimeout(this.keyboardOpeningCheckTimeout),this.keyboardOpeningCheckTimeout=null)}},{key:"clearCloseTimeout",value:function(){null!==this.closeTimeout&&(window.clearTimeout(this.closeTimeout),this.closeTimeout=null)}},{key:"syncKeyboardViewport",value:function(){var t,e=window.visualViewport;if(this.container&&this.isOpen&&null===this.closeTimeout&&e){if(this.syncContainerBackdrop(),window.innerWidth>=775)return this.visualViewportBaselineHeight=e.height,this.visualViewportBaselineWidth=window.innerWidth,void this.updateKeyboardVisibility(!1,e.height);if(performance.now()<this.keyboardDismissalGuardUntil)this.updateKeyboardVisibility(!1,e.height);else{if(null===this.visualViewportBaselineWidth||Math.abs(this.visualViewportBaselineWidth-window.innerWidth)>2)return this.visualViewportBaselineWidth=window.innerWidth,this.visualViewportBaselineHeight=e.height,void this.updateKeyboardVisibility(!1,e.height);var n=null!==(t=this.visualViewportBaselineHeight)&&void 0!==t?t:e.height;this.visualViewportBaselineHeight=Math.max(n,e.height);var i=this.visualViewportBaselineHeight-e.height>100||performance.now()<this.keyboardOpeningGuardUntil;this.updateKeyboardVisibility(i,e.height)}}}},{key:"updateKeyboardVisibility",value:function(t,e){t&&this.isOpen&&!this.hasDrawerEntered&&(this.hasDrawerEntered=!0,this.syncContainerBackdrop());var n="number"==typeof e&&e>0?Math.round(e):null,i=t&&this.iframe?Math.max(0,Math.round(-this.iframe.getBoundingClientRect().top)):0;(this.isKeyboardVisible!==t||t&&(this.lastKeyboardViewportHeight!==n||this.lastKeyboardViewportOffsetTop!==i))&&(this.isKeyboardVisible=t,this.lastKeyboardViewportHeight=t?n:null,this.lastKeyboardViewportOffsetTop=i,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_KEYBOARD_VISIBILITY",payload:C({visible:t,viewportOffsetTop:i},null!==n&&{viewportHeight:n})}))}},{key:"syncContainerBackdrop",value:function(){var t,e,n=this.isOpen&&this.hasDrawerEntered&&window.innerWidth<775,i=n?this.isKeyboardVisible?"#fff":"linear-gradient(to bottom, transparent calc(2dvh + 16px), #fff 0)":"transparent";null===(t=this.container)||void 0===t||t.style.setProperty("background",i,"important"),null===(e=this.iframe)||void 0===e||e.style.setProperty("background",i,"important");var o=window.visualViewport,r=null!==this.hostCanvasStyles&&o&&null!==this.visualViewportBaselineHeight&&this.visualViewportBaselineHeight-o.height>100;this.syncHostCanvasBackdrop(n&&this.isIOSDevice()&&(this.isKeyboardVisible||!!r))}},{key:"syncHostCanvasBackdrop",value:function(t){var n;if(t){if(this.hostCanvasStyles)return;this.hostCanvasStyles=[];for(var i=0,o=[document.documentElement,document.body];i<o.length;i++)for(var r=o[i],a=0,s=[["background-color","#fff"],["background-image","none"]];a<s.length;a++){var l=e(s[a],2),u=l[0],c=l[1],d=r.style.getPropertyValue(u),h=r.style.getPropertyPriority(u);r.style.setProperty(u,c,"important"),this.hostCanvasStyles.push({element:r,property:u,value:d,priority:h,appliedValue:r.style.getPropertyValue(u)})}}else{var f,m=B(null!==(n=this.hostCanvasStyles)&&void 0!==n?n:[]);try{for(m.s();!(f=m.n()).done;){var p=f.value,g=p.element,v=p.property,y=p.value,b=p.priority,w=p.appliedValue;g.style.getPropertyValue(v)===w&&"important"===g.style.getPropertyPriority(v)&&(y?g.style.setProperty(v,y,b):g.style.removeProperty(v))}}catch(t){m.e(t)}finally{m.f()}this.hostCanvasStyles=null}}},{key:"createContainer",value:function(){this.container=document.createElement("div"),this.container.id="holidoit-loader-container",this.container.style.cssText="\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n z-index: 2147483647 !important;\n display: none;\n pointer-events: none;\n ",document.body.appendChild(this.container)}},{key:"createIframe",value:function(){var t=this;this.container&&this.config&&(this.iframe=document.createElement("iframe"),this.iframe.id=d,this.iframe.src=this.resolvedEmbedUrl,this.iframe.allow="payment",this.iframe.setAttribute("tabindex","-1"),this.iframe.style.cssText="\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n border: none !important;\n background: transparent !important;\n ",this.iframe.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation"),this.container.appendChild(this.iframe),document.activeElement===this.iframe&&this.iframe.blur(),this.iframe.onload=function(){t.log("Iframe loaded, waiting for HOLIDOIT_READY from embed")})}},{key:"createFloatingButton",value:function(){var t,e,n,i,o,r,a,s,l,u,c,d,h,f,m,p,g,v,y,b,w,_,k,M,S=this;if(this.config){var O=this.config.floatingButtonOptions;this.floatingButton=document.createElement("button"),this.floatingButton.id="holidoit-floating-button";var x=window.innerWidth,L=x<775,D=this.resolveFloatingButtonResponsiveOption(null==O||null===(t=O.desktop)||void 0===t?void 0:t.width,null==O||null===(e=O.mobile)||void 0===e?void 0:e.width,L?x-34:190),I=this.resolveFloatingButtonResponsiveOption(null==O||null===(n=O.desktop)||void 0===n?void 0:n.height,null==O||null===(i=O.mobile)||void 0===i?void 0:i.height,54),T=this.resolveFloatingButtonResponsiveOption(null==O||null===(o=O.desktop)||void 0===o?void 0:o.backgroundColor,null==O||null===(r=O.mobile)||void 0===r?void 0:r.backgroundColor,"#0f172a"),B=this.resolveFloatingButtonResponsiveOption(null==O||null===(a=O.desktop)||void 0===a?void 0:a.textColor,null==O||null===(s=O.mobile)||void 0===s?void 0:s.textColor,"white"),H=this.resolveFloatingButtonResponsiveOption(null==O||null===(l=O.desktop)||void 0===l?void 0:l.borderRounding,null==O||null===(u=O.mobile)||void 0===u?void 0:u.borderRounding,30),$=this.resolveFloatingButtonResponsiveOption(null==O||null===(c=O.desktop)||void 0===c?void 0:c.fontSize,null==O||null===(d=O.mobile)||void 0===d?void 0:d.fontSize,16),C=this.resolveFloatingButtonResponsiveOption(null==O||null===(h=O.desktop)||void 0===h?void 0:h.fontWeight,null==O||null===(f=O.mobile)||void 0===f?void 0:f.fontWeight,500),A=this.resolveFloatingButtonResponsiveOption(null==O||null===(m=O.desktop)||void 0===m?void 0:m.textCase,null==O||null===(p=O.mobile)||void 0===p?void 0:p.textCase,"none"),V=this.resolveFloatingButtonResponsiveOption(null==O||null===(g=O.desktop)||void 0===g?void 0:g.bottomPosition,null==O||null===(v=O.mobile)||void 0===v?void 0:v.bottomPosition,L?22:30),Y=this.resolveFloatingButtonResponsiveOption(null==O||null===(y=O.desktop)||void 0===y?void 0:y.rightPosition,null==O||null===(b=O.mobile)||void 0===b?void 0:b.rightPosition,L?17:30),P=this.resolveFloatingButtonResponsiveOption(null==O||null===(w=O.desktop)||void 0===w?void 0:w.leftPosition,null==O||null===(_=O.mobile)||void 0===_?void 0:_.leftPosition,void 0),R=this.resolveFloatingButtonResponsiveOption(null==O||null===(k=O.desktop)||void 0===k?void 0:k.topPosition,null==O||null===(M=O.mobile)||void 0===M?void 0:M.topPosition,void 0),U=Math.min((null==O?void 0:O.zIndex)||2147483646,2147483646),F=this.config.language||E.ITALIAN,j=this.getFloatingButtonCallToAction(F),N="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",W="#0f172a"===T?"#1e293b":T;this.floatingButton.style.cssText="\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 10px !important;\n position: fixed !important;\n z-index: ".concat(U," !important;\n width: ").concat(D,"px !important;\n height: ").concat(I,"px !important;\n background: ").concat(T," !important;\n color: ").concat(B," !important;\n border: none !important;\n border-radius: ").concat(H,"px !important;\n font-size: ").concat($,"px !important;\n font-weight: ").concat(C," !important;\n text-transform: ").concat("uppercase"===A?"uppercase":"capitalize"===A?"capitalize":"none"," !important;\n cursor: pointer !important;\n box-shadow: ").concat(N,' !important;\n padding: 12px 24px !important;\n font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;\n transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) !important;\n transform: scale(1) !important;\n ').concat(void 0!==V?"bottom: ".concat(V,"px !important;"):"","\n ").concat(void 0!==Y?"right: ".concat(Y,"px !important;"):"","\n ").concat(void 0!==P?"left: ".concat(P,"px !important;"):"left: auto !important;","\n ").concat(void 0!==R?"top: ".concat(R,"px !important;"):"top: auto !important;","\n "),this.floatingButton.addEventListener("mouseenter",function(){S.floatingButton&&(S.floatingButton.style.background="".concat(W," !important"),S.floatingButton.style.boxShadow="".concat("0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"," !important"))}),this.floatingButton.addEventListener("mouseleave",function(){S.floatingButton&&(S.floatingButton.style.background="".concat(T," !important"),S.floatingButton.style.boxShadow="".concat(N," !important"),S.floatingButton.style.transform="scale(1) !important")}),this.floatingButton.addEventListener("mousedown",function(){S.floatingButton&&(S.floatingButton.style.transform="scale(0.98) !important")}),this.floatingButton.addEventListener("mouseup",function(){S.floatingButton&&(S.floatingButton.style.transform="scale(1) !important")});var z='<svg style="fill: '.concat(B,' !important;" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><path style="fill: ').concat(B,' !important;" d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z"/></svg>');this.floatingButton.innerHTML='<span style="display: flex; align-items: center; gap: 10px; color: '.concat(B," !important; font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; font-size: inherit !important; font-weight: inherit !important;\">").concat(z," ").concat(j,"</span>"),this.floatingButton.addEventListener("click",function(){return S.open()}),this.isOpen&&(this.floatingButton.setAttribute("inert",""),this.floatingButton.setAttribute("aria-hidden","true"),this.floatingButton.tabIndex=-1),document.body.appendChild(this.floatingButton)}}},{key:"normalizeLanguage",value:function(t){if(!t)return null;var e=t.trim().toLowerCase();if(!e)return null;if(P.includes(e))return e;var n=e.split(/[-_]/)[0];return P.includes(n)?n:null}},{key:"getDocumentLanguage",value:function(){var t;return"undefined"==typeof document?null:this.normalizeLanguage(null===(t=document.documentElement)||void 0===t?void 0:t.lang)}},{key:"syncLanguageWithDocument",value:function(){var t;if(!this.hasExplicitLanguageSelection){var e=this.getDocumentLanguage();e&&this.isLanguageSupportedByEmbed(e)&&(null===(t=this.config)||void 0===t?void 0:t.language)!==e&&(this.applyLanguage(e,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",e))}}},{key:"isLanguageSupportedByEmbed",value:function(t){var e;if(!t)return!1;var n=null===(e=this.embedConfig)||void 0===e?void 0:e.languages;return Array.isArray(n)&&n.includes(t)}},{key:"observeDocumentLanguage",value:function(){var t=this;"undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&(this.htmlLangObserver&&this.htmlLangObserver.disconnect(),this.htmlLangObserver=new MutationObserver(function(e){var n,i=B(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("attributes"===o.type&&"lang"===o.attributeName)return void t.syncLanguageWithDocument()}}catch(t){i.e(t)}finally{i.f()}}),this.htmlLangObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))}},{key:"applyLanguage",value:function(t,e){e.markAsExplicit&&(this.hasExplicitLanguageSelection=!0),this.config&&(this.config.language=t),this.updateFloatingButtonText(t),e.syncEmbed&&this.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:t}})}},{key:"getFloatingButtonCallToAction",value:function(t){var e,n=null===(e=this.config)||void 0===e?void 0:e.floatingButtonOptions;return t===E.ITALIAN&&null!=n&&n.italianCallToAction?n.italianCallToAction:t===E.ENGLISH&&null!=n&&n.englishCallToAction?n.englishCallToAction:null!=n&&n.callToAction?n.callToAction:R[t]||R[E.ENGLISH]}},{key:"resolveFloatingButtonResponsiveOption",value:function(t,e,n){return window.innerWidth<775?void 0!==e?e:n:void 0!==t?t:n}},{key:"bindBookNowButtons",value:function(){var t=this,e=document.querySelectorAll(".book-now-button");if(0!==e.length){var n=0;e.forEach(function(e){var i=e,o="_holidoitClickBound";i[o]||(i[o]=!0,n++,i.addEventListener("click",function(e){var n;e.preventDefault(),e.stopPropagation();var o=i.getAttribute("data-product-number")||(null===(n=i.closest("[data-product-number]"))||void 0===n?void 0:n.getAttribute("data-product-number"))||"";t.log("Book now button clicked",{element:i.tagName,productNumber:o});var r=parseInt(o,10);setTimeout(function(){isNaN(r)?t.open():t.open({experienceId:r})},0)}))}),n>0&&this.log("Bound click handlers to ".concat(n," .book-now-button element(s)"))}}},{key:"observeForBookNowButtons",value:function(){var t=this;window._holidoitObserverActive||(window._holidoitObserverActive=!0,new MutationObserver(function(e){for(var n=!1,i=0;i<e.length;i++){var o=e[i];if("childList"===o.type)for(var r=0;r<o.addedNodes.length;r++){var a,s,l=o.addedNodes[r];if(l instanceof HTMLElement&&(null!==(a=l.classList)&&void 0!==a&&a.contains("book-now-button")||null!==(s=l.querySelector)&&void 0!==s&&s.call(l,".book-now-button"))){n=!0;break}}if(n)break}n&&(t.log("Detected dynamically added .book-now-button elements, binding..."),t.bindBookNowButtons())}).observe(document.body,{childList:!0,subtree:!0}),this.log("MutationObserver active for .book-now-button elements"))}},{key:"parseHolidoitEmbedUrl",value:function(t){try{var e=new URL(t),n=e.hostname.replace(/^www\./,"");if("holidoit.com"!==n&&"holido.it"!==n)return null;var i=e.pathname.match(/^\/embed\/web\/([^/]+)\/?$/);if(!i)return null;var o=i[1],r=e.searchParams.get("experienceId"),a=r?parseInt(r,10):void 0;return{embedId:o,experienceId:a&&!isNaN(a)?a:void 0}}catch(t){return null}}},{key:"interceptHolidoitLinks",value:function(){var t=this;document.addEventListener("click",function(e){var n,i,o,r=null===(n=e.target)||void 0===n||null===(i=n.closest)||void 0===i?void 0:i.call(n,"a[href]");if(null!=r&&r.href){var a=t.parseHolidoitEmbedUrl(r.href);a&&a.embedId===(null===(o=t.config)||void 0===o?void 0:o.embedId)&&(e.preventDefault(),e.stopPropagation(),t.log("Intercepted holidoit embed link",a),a.experienceId?t.open({experienceId:a.experienceId}):t.open())}},!0)}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage),window.addEventListener("message",this.handleExternalMessage)}},{key:"getSenderIframe",value:function(t){if(!t)return null;for(var e=0,n=Array.from(document.querySelectorAll("iframe"));e<n.length;e++){var i=n[e];if(i.contentWindow===t)return i}return null}},{key:"isMessageFromOwnEmbedIframe",value:function(t){var e;return!(null===(e=this.iframe)||void 0===e||!e.contentWindow)&&t.source===this.iframe.contentWindow&&t.origin===this.embedOrigin}},{key:"isTrustedHolidoitOrigin",value:function(t){if(!t||"null"===t)return!1;if(t===this.embedOrigin)return!0;try{var e=new URL(t).hostname;return"localhost"===e||"127.0.0.1"===e||"holidoit.com"===e||e.endsWith(".holidoit.com")||"holido.it"===e||e.endsWith(".holido.it")||"holydoit.com"===e||e.endsWith(".holydoit.com")}catch(t){return!1}}},{key:"extractAnalyticsPayload",value:function(t){var e=_(t);return e&&"embed"===e.source?e:(this.log("Ignoring invalid analytics message payload",t),null)}},{key:"handleAnalyticsMessage",value:function(t){var e=this.extractAnalyticsPayload(t);return!!e&&(w(e.eventData,e.dedupeKey)?(this.log("Pushed analytics event to dataLayer",e.dedupeKey,e.eventData),!0):(this.log("Ignoring duplicate analytics event",e.dedupeKey),!0))}},{key:"postMessage",value:function(t){var e;return null!==(e=this.iframe)&&void 0!==e&&e.contentWindow?this.isReady||"HOLIDOIT_INIT"===t.type?(this.log("Posting message to iframe",t),void this.iframe.contentWindow.postMessage(t,this.embedOrigin)):(this.log("Embed not ready, queueing message",t),void this.pendingMessages.push(t)):(this.log("Iframe not ready, queueing message",t),void this.pendingMessages.push(t))}},{key:"maybeSendInitMessage",value:function(){var t=this;if(this.hasReceivedEmbedReady&&this.embedConfigLoaded&&!this.isReady&&this.config){this.log("Embed and config are ready, sending HOLIDOIT_INIT");var e="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname;this.postMessage({type:"HOLIDOIT_INIT",payload:{embedId:this.config.embedId,language:this.config.language,floatingButton:this.config.floatingButton,floatingButtonOptions:this.config.floatingButtonOptions,parentOrigin:window.location.origin,parentUrl:window.location.href,isMobile:window.innerWidth<775,debug:this.config.debug||e}}),this.isReady=!0,this.pendingMessages.forEach(function(e){return t.postMessage(e)}),this.pendingMessages=[]}}},{key:"checkPaymentRedirect",value:function(){var t=this;if(V)this.log("Payment redirect already processed, skipping");else{var e=null,n=null,i=null;if(A)e=A.paymentIntent,n=A.redirectStatus,i=A.paymentIntentClientSecret,this.log("Using captured Stripe params",A);else{var o=new URLSearchParams(window.location.search);e=o.get("payment_intent"),n=o.get("redirect_status"),i=o.get("payment_intent_client_secret")}if(e&&n){this.log("Payment redirect detected",{paymentIntent:e,redirectStatus:n}),V=!0;var r=null;try{r=localStorage.getItem(f)}catch(t){this.log("localStorage not available (incognito mode?)",t)}if(r)try{var a=JSON.parse(r);this.log("Found payment session",a),this.open(),this.isReady?t.postMessage({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:e,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}):this.pendingMessages.push({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:e,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}),this.cleanUrlParams();try{localStorage.removeItem(f)}catch(t){this.log("Failed to remove payment session from localStorage",t)}}catch(t){this.log("Failed to parse payment session",t)}else this.log("Payment redirect params found but no session - cleaning URL"),this.cleanUrlParams()}}}},{key:"cleanUrlParams",value:function(){var t=new URL(window.location.href);t.searchParams.delete("payment_intent"),t.searchParams.delete("payment_intent_client_secret"),t.searchParams.delete("redirect_status"),window.history.replaceState({},"",t.toString())}},{key:"getEmbedOrigin",value:function(t){try{return new URL(t).origin}catch(t){return window.location.origin}}},{key:"lockBodyScroll",value:function(){var t=this;if(this.scrollLockState)this.log("Scroll already locked, skipping");else{var e=this.getDocumentScrollRoot(),n=this.getScrollPosition(),i=n.top,o=n.left,r=this.getScrollbarWidth(),a={overflow:document.body.style.overflow,overscrollBehavior:document.body.style.overscrollBehavior,paddingRight:document.body.style.paddingRight,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,right:document.body.style.right,width:document.body.style.width},s={overflow:document.documentElement.style.overflow,overscrollBehavior:document.documentElement.style.overscrollBehavior};this.scrollLockState={mode:this.isIOSDevice()&&this.isDocumentScrollRoot(e)?"fixed-body":"document-overflow",scrollTop:i,scrollLeft:o,scrollbarWidth:r,bodyStyles:a,htmlStyles:s},document.documentElement.style.overflow="hidden",document.documentElement.style.overscrollBehavior="none",document.body.style.overflow="hidden",document.body.style.overscrollBehavior="none",r>0&&(document.body.style.paddingRight="".concat(r,"px")),"fixed-body"===this.scrollLockState.mode&&(document.body.style.position="fixed",document.body.style.top="-".concat(i,"px"),document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",this.touchMoveHandler=function(e){var n,i=e.target;null!==(n=t.container)&&void 0!==n&&n.contains(i)||e.preventDefault()},document.addEventListener("touchmove",this.touchMoveHandler,{passive:!1})),this.log("Scroll locked",{mode:this.scrollLockState.mode,scrollbarWidth:r})}}},{key:"unlockBodyScroll",value:function(){if(this.scrollLockState){var t=this.scrollLockState,e=t.mode,n=t.scrollTop,i=t.scrollLeft,o=t.bodyStyles,r=t.htmlStyles;document.body.style.overflow=o.overflow,document.body.style.overscrollBehavior=o.overscrollBehavior,document.body.style.paddingRight=o.paddingRight,document.documentElement.style.overflow=r.overflow,document.documentElement.style.overscrollBehavior=r.overscrollBehavior,"fixed-body"===e&&(document.body.style.position=o.position,document.body.style.top=o.top,document.body.style.left=o.left,document.body.style.right=o.right,document.body.style.width=o.width,this.touchMoveHandler&&(document.removeEventListener("touchmove",this.touchMoveHandler),this.touchMoveHandler=null)),this.restoreScrollPosition(n,i),this.scrollLockState=null,this.log("Scroll unlocked",{mode:e})}else this.log("Scroll not locked, skipping unlock")}},{key:"log",value:function(){var t,e="undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);if(null!==(t=this.config)&&void 0!==t&&t.debug||e){for(var n,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];(n=console).log.apply(n,["[Holidoit]"].concat(o))}}}],n&&s(t.prototype,n),i&&s(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,i,a,u}()),F=function(t){return U.init(t)},j=function(t){return U.open(t)},N=function(){return U.close()},W=function(t){return U.toggle(t)},z=function(t){return U.changeLanguage(t)},G=function(){return U.destroy()},K=h,J=function(t,e,n){t&&U.init({embedId:t,floatingButton:null==e||e,floatingButtonOptions:n})},q=function(t,e,n){U.toggle({embedId:t,experienceId:e?parseInt(e,10):void 0,test:n})},Z=function(){return U.open()},X=function(){return U.close()},Q={init:F,open:j,close:N,toggle:W,changeLanguage:z,destroy:G,version:K,renderHolidoitEmbed:J,toggleEmbed:q,openEmbed:Z,closeEmbed:X};if("undefined"!=typeof window){window.Holidoit=Q;var tt=document.currentScript,et=function(){var t=window.HolidoitConfig;if(null!=t&&t.embedId)U.init(t);else if(null!=tt&&tt.getAttribute("data-embed-id")){var e=tt.getAttribute("data-embed-id"),n=tt.getAttribute("data-floating-button"),i=tt.getAttribute("data-language"),o=tt.getAttribute("data-embed-url"),r=tt.getAttribute("data-debug");U.init({embedId:e,floatingButton:"true"===n,language:i||void 0,embedUrl:o||void 0,debug:"true"===r})}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",et):et()}})(),i})());