holidoit 1.0.165 → 1.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed.html +1 -1
- package/dist/holidoit-embed.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/holidoit-embed.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/holidoit.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/holidoit.umd.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/experience-grid-drawer-loader.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/experience-page-drawer-loader.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/inline-book-now-loader.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-booking-box.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-grid.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-page-drawer.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience.js +1 -1
- package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widgets-loader.js +1 -1
- package/dist/holidoit.js +1 -1
- package/dist/holidoit.umd.js +1 -1
- package/dist/release-manifest.json +24 -24
- package/dist/widgets/experience-grid-drawer-loader.js +1 -1
- package/dist/widgets/experience-page-drawer-loader.js +1 -1
- package/dist/widgets/inline-book-now-loader.js +1 -1
- package/dist/widgets/widget-book-now-button.html +1 -1
- package/dist/widgets/widget-booking-box.html +1 -1
- package/dist/widgets/widget-booking-box.js +1 -1
- package/dist/widgets/widget-experience-grid-drawer.html +1 -1
- package/dist/widgets/widget-experience-grid.html +1 -1
- package/dist/widgets/widget-experience-grid.js +1 -1
- package/dist/widgets/widget-experience-page-drawer.html +1 -1
- package/dist/widgets/widget-experience-page-drawer.js +1 -1
- package/dist/widgets/widget-experience.html +1 -1
- package/dist/widgets/widget-experience.js +1 -1
- package/dist/widgets/widgets-loader.js +1 -1
- package/package.json +1 -1
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/embed.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/payment-redirect.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-book-now-button.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-book-now-button.js +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-booking-box.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-grid-drawer.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-grid-drawer.js +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-grid.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience-page-drawer.html +0 -0
- /package/dist/holidoit-js-releases/{20260929072631398-dddf8aaaf28c-edfa2139 → 20261002094648885-af688fa62c09-705e151c}/widgets/widget-experience.html +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see experience-page-drawer-loader.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitExperiencePageDrawer",[],t):"object"==typeof exports?exports.HolidoitExperiencePageDrawer=t():e.HolidoitExperiencePageDrawer=t()}(this,()=>(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},317:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},353:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",o="second",r="minute",a="hour",s="day",l="week",u="month",d="quarter",c="year",h="date",f="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,p={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(i,u),r=n-o<0,a=t.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:l,d:s,D:h,h:a,m:r,s:o,ms:i,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=p;var _="$isDayjsObject",k=function(e){return e instanceof x||!(!e||!e[_])},S=function e(t,n,i){var o;if(!t)return b;if("string"==typeof t){var r=t.toLowerCase();w[r]&&(o=r),n&&(w[r]=n,o=r);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!i&&o&&(b=o),o||!i&&b},O=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},M=y;M.l=S,M.i=k,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function p(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var v=p.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(g);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(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return M},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=O(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return O(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<O(e)},v.$g=function(e,t,n){return M.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,i=!!M.u(t)||t,d=M.p(e),f=function(e,t){var o=M.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?o:o.endOf(s)},g=function(e,t){return M.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,p=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case c:return i?f(1,0):f(31,11);case u:return i?f(1,p):f(0,p+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(i?v-w:v+(6-w),p);case s:case h:return g(y+"Hours",0);case a:return g(y+"Minutes",1);case r:return g(y+"Seconds",2);case o:return g(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=M.p(e),d="set"+(this.$u?"UTC":""),f=(n={},n[s]=d+"Date",n[h]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[a]=d+"Hours",n[r]=d+"Minutes",n[o]=d+"Seconds",n[i]=d+"Milliseconds",n)[l],g=l===s?this.$D+(t-this.$W):t;if(l===u||l===c){var m=this.clone().set(h,1);m.$d[f](g),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](g);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[M.p(e)]()},v.add=function(i,d){var h,f=this;i=Number(i);var g=M.p(d),m=function(e){var t=O(f);return M.w(t.date(t.date()+Math.round(e*i)),f)};if(g===u)return this.set(u,this.$M+i);if(g===c)return this.set(c,this.$y+i);if(g===s)return m(1);if(g===l)return m(7);var p=(h={},h[r]=t,h[a]=n,h[o]=e,h)[g]||1,v=this.$d.getTime()+i*p;return M.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=e||"YYYY-MM-DDTHH:mm:ssZ",o=M.z(this),r=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,c=function(e,n,o,r){return e&&(e[n]||e(t,i))||o[n].slice(0,r)},h=function(e){return M.s(r%12||12,e,"0")},g=d||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return c(n.monthsShort,s,u,3);case"MMMM":return c(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return c(n.weekdaysMin,t.$W,l,2);case"ddd":return c(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(r);case"HH":return M.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return g(r,a,!0);case"A":return g(r,a,!1);case"m":return String(a);case"mm":return M.s(a,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,h,f){var g,m=this,p=M.p(h),v=O(i),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return M.m(m,v)};switch(p){case c:g=w()/12;break;case u:g=w();break;case d:g=w()/3;break;case l:g=(b-y)/6048e5;break;case s:g=(b-y)/864e5;break;case a:g=b/n;break;case r:g=b/t;break;case o:g=b/e;break;default:g=b}return f?g:M.a(g)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=S(e,t,!0);return i&&(n.$L=i),n},v.clone=function(){return M.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()},p}(),L=x.prototype;return O.prototype=L,[["$ms",i],["$s",o],["$m",r],["$H",a],["$W",s],["$M",u],["$y",c],["$D",h]].forEach(function(e){L[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),O.extend=function(e,t){return e.$i||(e(t,x,O),e.$i=!0),O},O.locale=S,O.isDayjs=k,O.unix=function(e){return O(1e3*e)},O.en=w[b],O.Ls=w,O.p={},O}()},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var i in t)n.unshift(i);return function e(){for(;n.length;)if((i=n.pop())in t)return e.value=i,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},445:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var a=o.prototype;r.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=r(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.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(e){void 0===e&&(e="");var i=e.match(t);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,e)).$offset=a,s.$x.$localOffset=l,s};var d=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var c=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var i=this.local(),o=r(e).local();return h.call(i,o,t,n)}}}()},494:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e,t,n){var o=i[n];return Array.isArray(o)&&(o=o[t?0:1]),o.replace("%d",e)}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(e){return e+"."},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:e=>{function t(n,i,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,i,o){function r(n,i){t(e,n,function(e){return this._invoke(n,i,e)})}n?a?a(e,n,{value:i,enumerable:!o,configurable:!o,writable:!o}):e[n]=i:(r("next",0),r("throw",1),r("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i,o,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,i,o){var r,a=function(e,n,i){void 0===i&&(i={});var o=new Date(e),r=function(e,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=e+"|"+i,r=t[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[o]=r),r}(n,i);return r.formatToParts(o)},s=function(t,n){for(var i=a(t,n),r=[],s=0;s<i.length;s+=1){var l=i[s],u=l.type,d=l.value,c=e[u];c>=0&&(r[c]=parseInt(d,10))}var h=r[3],f=24===h?0:h,g=r[0]+"-"+r[1]+"-"+r[2]+" "+f+":"+r[4]+":"+r[5]+":000",m=+t;return(o.utc(g).valueOf()-(m-=m%1e3))/6e4},l=i.prototype;l.tz=function(e,t){void 0===e&&(e=r);var n,i=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),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),t){var d=n.utcOffset();n=n.add(i-d,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var u=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return u.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var i=n&&t,a=n||t||r,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var u=function(e,t,n){var i=e-60*t*1e3,o=s(i,n);if(t===o)return[i,t];var r=s(i-=60*(o-t)*1e3,n);return o===r?[i,o]:[e-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(e,i).valueOf(),l,a),d=u[0],c=u[1],h=o(d).utcOffset(c);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){r=e}}}()},579:(e,t,n)=>{var i=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(i(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var i=n(172),o=n(993),r=n(869),a=n(887),s=n(791),l=n(373),u=n(579);function d(){"use strict";var t=o(),n=t.m(d),c=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===c||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function g(e){var t,n;return function(i){t||(t={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(e,t){return n(i.a,f[e],t)},delegateYield:function(e,o,r){return t.resultName=o,n(i.d,u(e),r)},finish:function(e){return n(i.f,e)}},n=function(e,n,o){i.p=t.prev,i.n=t.next;try{return e(n,o)}finally{t.next=i.n}}),t.resultName&&(t[t.resultName]=i.v,t.resultName=void 0),t.sent=i.v,t.next=i.n;try{return e.call(this,t)}finally{i.p=t.prev,i.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,n,i,o){return t.w(g(e),n,i,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new i(e,t)},AsyncIterator:s,async:function(e,t,n,i,o){return(h(t)?a:r)(g(e),t,n,i,o)},keys:l,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var i=n(633)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},791:(e,t,n)=>{var i=n(172),o=n(546);e.exports=function e(t,n){function r(e,o,a,s){try{var l=t[e](o),u=l.value;return u instanceof i?n.resolve(u.v).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):n.resolve(u).then(function(e){l.value=e,a(l)},function(e){return r("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,i){function o(){return new n(function(t,n){r(e,i,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},813:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+(1===e?"er":"")}};return n.default.locale(i,null,!0),i}(n(353))},826:function(e){e.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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}}()},840:function(e){e.exports=function(){"use strict";return function(e,t,n){var i=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},r=function(e,t,n,i,r){var a=e.name?e:e.$locale(),s=o(a[t]),l=o(a[n]),u=s||l.map(function(e){return e.slice(0,i)});if(!r)return u;var d=a.weekStart;return u.map(function(e,t){return u[(t+(d||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):r(e,"months")},monthsShort:function(t){return t?t.format("MMM"):r(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):r(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):r(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):r(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return l.bind(this)()},n.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.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(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return r(a(),"months")},n.monthsShort=function(){return r(a(),"monthsShort","months",3)},n.weekdays=function(e){return r(a(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return r(a(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return r(a(),"weekdaysMin","weekdays",2,e)}}}()},869:(e,t,n)=>{var i=n(887);e.exports=function(e,t,n,o,r){var a=i(e,t,n,o,r);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var i=n(993),o=n(791);e.exports=function(e,t,n,r,a){return new o(i().w(e,t,n,r),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},900:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},993:(e,t,n)=>{var i=n(546);function o(){var t,n,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function l(e,o,r,a){var s=o&&o.prototype instanceof d?o:d,l=Object.create(s.prototype);return i(l,"_invoke",function(e,i,o){var r,a,s,l=0,d=o||[],c=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return r=e,a=0,s=t,h.n=n,u}};function f(e,i){for(a=e,s=i,n=0;!c&&l&&!o&&n<d.length;n++){var o,r=d[n],f=h.p,g=r[2];e>3?(o=g===i)&&(s=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=t):r[0]<=f&&((o=e<2&&f<r[1])?(a=0,h.v=i,h.n=r[1]):f<g&&(o=e<3||r[0]>i||i>g)&&(r[4]=e,r[5]=i,h.n=g,a=0))}if(o||e>1)return u;throw c=!0,i}return function(o,d,g){if(l>1)throw TypeError("Generator is already running");for(c&&1===d&&f(d,g),a=d,s=g;(n=a<2?t:s)||!c;){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=t}else if((n=(c=h.n<0)?s:e.call(i,h))!==u)break}catch(e){r=t,a=1,s=e}finally{l=1}}return{value:n,done:c}}}(e,r,a),!0),l}var u={};function d(){}function c(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),g=h.prototype=d.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,i(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return c.prototype=h,i(g,"constructor",h),i(h,"constructor",c),c.displayName="GeneratorFunction",i(h,s,"GeneratorFunction"),i(g),i(g,s,"Generator"),i(g,a,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(i),n.d(i,{holidoitExperiencePageDrawerLoader:()=>re});var l="HOLIDOIT_ANALYTICS_EVENT",u="holidoit-loader-iframe",d="holidoit-loader-container",c="2.0.0",h="_holidoit_payment_session";function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var m="holidoit_analytics_dedupe_keys",p=new Set;function v(e){return"object"===t(e)&&null!==e&&!Array.isArray(e)}function y(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(e){return null}}function b(){var e=y();if(!e)return[];try{var t=e.getItem(m);if(!t)return[];var n=JSON.parse(t);return Array.isArray(n)?n.filter(function(e){return"string"==typeof e&&e.length>0}):[]}catch(e){return[]}}function w(e){if(e){p.add(e);var t=b().filter(function(t){return t!==e});t.push(e),function(e){var t=y();if(t)try{t.setItem(m,JSON.stringify(e.slice(-200)))}catch(e){}}(t)}}function _(e,t){return"undefined"!=typeof window&&(!function(e){return!(!e||!p.has(e)&&(!b().includes(e)||(p.add(e),0)))}(t)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),w(t),window.dataLayer.push(e),!0))}function k(e){if(!v(e)||e.type!==l)return null;var t,n=v(e.payload)?e.payload:e,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()||(!v(t=r)||"string"!=typeof t.event||""===t.event.trim())?null:{channel:i,dedupeKey:o.trim(),eventData:r,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}function S(e){try{return new URL(e,window.location.href).origin}catch(e){return null}}var O=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"]);function M(e){try{var t=new URL(e,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(t.origin!==n.origin||!t.pathname.startsWith(n.pathname))return e;var i=t.pathname.slice(n.pathname.length);return O.has(i)?(t.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20260929072631398-dddf8aaaf28c-edfa2139","/").concat(i),t.toString()):e}catch(t){return e}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||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 I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}var E=n(756),D=n.n(E),T=n(353),H=n.n(T),A=(n(494),n(826),n(317),n(813),n(900),n(840)),B=n.n(A),C=n(569),P=n.n(C),$=n(445),U=n.n($);H().extend(U()),H().extend(P()),H().extend(B());var R=function(e){return e.ITALIAN="it",e.ENGLISH="en",e.SPANISH="es",e.FRENCH="fr",e.GERMAN="de",e}({});H()().locale("it").localeData().months(),H()().locale("it").localeData().weekdays(),H()().locale("en").localeData().months(),H()().locale("en").localeData().weekdays(),H()().locale("de").localeData().months(),H()().locale("de").localeData().weekdays(),H()().locale("es").localeData().months(),H()().locale("es").localeData().weekdays(),H()().locale("fr").localeData().months(),H()().locale("fr").localeData().weekdays();function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var W=function(){if("undefined"==typeof window)return null;try{var e=new URLSearchParams(window.location.search),t=e.get("payment_intent");if(!t)return null;var n={paymentIntent:t,paymentIntentClientSecret:e.get("payment_intent_client_secret"),redirectStatus:e.get("redirect_status")};"localhost"===window.location.hostname||window.location.hostname;return n}catch(e){return null}}(),N=!1,z=new Set(["holidoitExperienceSelected","holidoitIFrameChangeLanguage","holidoitExperienceCount"]),G=Object.values(R),K=s(s(s(s(s({},R.ITALIAN,"Prenota ora"),R.ENGLISH,"Book now"),R.SPANISH,"Reservar ahora"),R.FRENCH,"Réserver maintenant"),R.GERMAN,"Jetzt buchen");var J=function(){return a(function n(){var i=this;e(this,n),s(this,"config",null),s(this,"embedConfig",null),s(this,"iframe",null),s(this,"container",null),s(this,"floatingButton",null),s(this,"isOpen",!1),s(this,"hasDrawerEntered",!1),s(this,"closeTimeout",null),s(this,"isReady",!1),s(this,"pendingMessages",[]),s(this,"embedOrigin",""),s(this,"resolvedEmbedUrl",""),s(this,"resolvedApiUrl",""),s(this,"htmlLangObserver",null),s(this,"hasExplicitLanguageSelection",!1),s(this,"hasReceivedEmbedReady",!1),s(this,"embedConfigLoaded",!1),s(this,"previouslyFocusedElement",null),s(this,"visualViewportBaselineHeight",null),s(this,"visualViewportBaselineWidth",null),s(this,"visualViewportUpdateFrame",null),s(this,"isKeyboardVisible",!1),s(this,"lastKeyboardViewportHeight",null),s(this,"lastKeyboardViewportOffsetTop",0),s(this,"keyboardOpeningGuardUntil",0),s(this,"keyboardOpeningCheckTimeout",null),s(this,"keyboardDismissalGuardUntil",0),s(this,"hostCanvasStyles",null),s(this,"scrollLockState",null),s(this,"touchMoveHandler",null),s(this,"scheduleVisualViewportUpdate",function(){null!==i.visualViewportUpdateFrame&&cancelAnimationFrame(i.visualViewportUpdateFrame),i.visualViewportUpdateFrame=requestAnimationFrame(function(){i.visualViewportUpdateFrame=null,i.syncKeyboardViewport()})}),s(this,"handleExternalMessage",function(e){var t=e.data;if(t&&"string"==typeof t.action&&z.has(t.action)){var n=null;if(!(e.source===window)){if(!(n=i.getSenderIframe(e.source)))return void i.log("Ignoring external message from unknown iframe source",t.action);if(n.id===u)return;if(!i.isTrustedHolidoitOrigin(e.origin))return void i.log("Ignoring external message from untrusted origin",e.origin,t.action)}switch(i.log("Received external message",t),t.action){case"holidoitExperienceSelected":t.experienceId&&(i.log("Experience selected from external iframe",t.experienceId),i.open({experienceId:t.experienceId,gift:!!t.gift}));break;case"holidoitIFrameChangeLanguage":t.language&&(i.log("Language change from external iframe",t.language),i.changeLanguage(t.language));break;case"holidoitExperienceCount":if(!n)return;if(i.log("Experience count from external iframe",t.count),"number"==typeof t.height){var o=t.height+16,r=parseInt(n.style.height||"0",10);Math.abs(o-r)>15&&(n.style.height="".concat(o,"px"),i.log("Adjusted iframe height to",o,"for",n.id||n.src))}}}}),s(this,"handleMessage",function(e){var n,o,r,a;if(i.isMessageFromOwnEmbedIframe(e)){var s,l=e.data;if("object"===t(s=l)&&null!==s&&!Array.isArray(s)&&"string"==typeof l.type&&l.type.startsWith("HOLIDOIT_"))if(i.log("Received message from embed iframe",l),!i.handleAnalyticsMessage(l))switch(l.type){case"HOLIDOIT_READY":i.hasReceivedEmbedReady=!0,i.maybeSendInitMessage();break;case"HOLIDOIT_OPENED":i.isOpen&&null===i.closeTimeout&&(i.hasDrawerEntered=!0,i.syncContainerBackdrop());break;case"HOLIDOIT_CLOSED":i.close();break;case"HOLIDOIT_DRAWER_EXITED":null!==i.closeTimeout&&i.finishClose();break;case"HOLIDOIT_BOOKING_COMPLETE":var u=l.payload;i.log("Booking complete",u),null===(n=i.config)||void 0===n||null===(o=n.onBookingComplete)||void 0===o||o.call(n,u);break;case"HOLIDOIT_PAYMENT_REDIRECT_START":var d=l.payload;if(null!=d&&d.session){i.log("Saving payment session for redirect",d.session);try{localStorage.setItem(h,JSON.stringify(d.session))}catch(e){i.log("Failed to save payment session (incognito mode?)",e)}}break;case"HOLIDOIT_LANGUAGE_CHANGED":var c=l.payload,f=i.normalizeLanguage(null==c?void 0:c.language);f&&(i.log("Language changed from embed:",f),i.applyLanguage(f,{markAsExplicit:!0,syncEmbed:!1}),window.postMessage({action:"holidoitEmbedChangeLanguage",language:f},"*"));break;case"HOLIDOIT_CHECKOUT_FIELD_FOCUS":var g,m=l.payload;if(!i.isOpen||null!==i.closeTimeout||"boolean"!=typeof(null==m?void 0:m.focused)||window.innerWidth>=775)break;if(i.clearKeyboardOpeningCheck(),m.focused)i.keyboardOpeningGuardUntil=performance.now()+600,i.keyboardDismissalGuardUntil=0,i.updateKeyboardVisibility(!0,null===(g=window.visualViewport)||void 0===g?void 0:g.height),i.keyboardOpeningCheckTimeout=window.setTimeout(function(){i.keyboardOpeningCheckTimeout=null;var e=window.visualViewport;e&&null!==i.visualViewportBaselineHeight&&i.visualViewportBaselineHeight-e.height>100||i.scheduleVisualViewportUpdate()},650);else i.keyboardOpeningGuardUntil=0,i.keyboardDismissalGuardUntil=performance.now()+450,i.updateKeyboardVisibility(!1);break;case"HOLIDOIT_ERROR":var p=l.payload;null===(r=i.config)||void 0===r||null===(a=r.onError)||void 0===a||a.call(r,(null==p?void 0:p.message)||"Unknown error");break;case"HOLIDOIT_NAVIGATE_TO":var v=l.payload;null!=v&&v.url&&(i.log("Navigating parent page to:",v.url),window.location.href=v.url)}}})},[{key:"isIOSDevice",value:function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var e=navigator.userAgent||"",t=/iPad|iPhone|iPod/.test(e),n="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return t||n}},{key:"safeScrollToPosition",value:function(e,t){var n=null;try{(n=document.createElement("style")).textContent="html, body { scroll-behavior: auto !important; }",(document.head||document.documentElement).appendChild(n),window.scrollTo({left:e,top:t,behavior:"auto"})}catch(n){window.scrollTo(e,t)}finally{n&&requestAnimationFrame(function(){var e;null===(e=n)||void 0===e||e.remove()})}}},{key:"getDocumentScrollRoot",value:function(){var e=document.scrollingElement;return e instanceof HTMLElement?e:document.documentElement}},{key:"isDocumentScrollRoot",value:function(e){return e===this.getDocumentScrollRoot()||e===document.documentElement||e===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(e,t){var n=this.getScrollPosition();(Math.abs(n.top-e)>1||Math.abs(n.left-t)>1)&&this.safeScrollToPosition(t,e)}},{key:"focusWithoutScroll",value:function(e){if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch(t){e.focus()}}},{key:"init",value:function(e){var t,n,i=this;if(e.embedId&&(e.embedId=e.embedId.trim()),e.embedId){if(this.container)return this.log("Holidoit already initialized, skipping duplicate init"),this.config=F(F({},this.config),e),void this.syncLanguageWithDocument();var o=window.scrollY,r=history.scrollRestoration||"auto";try{history.scrollRestoration="manual"}catch(e){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=F(F({},e),{},{language:this.normalizeLanguage(e.language)||void 0}),this.resolvedEmbedUrl=M(e.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:e.embedId,version:c}),this.createContainer(),this.createIframe(),null===(t=window.visualViewport)||void 0===t||t.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(e){}}),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 t;((null===(t=i.embedConfig)||void 0===t?void 0:t.has_floating_button)||e.floatingButton)&&i.createFloatingButton(),i.maybeSendInitMessage()}),this.checkPaymentRedirect()}}},{key:"fetchEmbedConfig",value:(n=D().mark(function e(){var t,n,i,o,r,a,s;return D().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.config)&&void 0!==t&&t.embedId){e.next=1;break}return e.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),e.prev=2,e.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});case 3:if((i=e.sent).ok){e.next=4;break}throw new Error("Failed to fetch embed config: ".concat(i.status));case 4:return e.next=5,i.json();case 5:o=e.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)),e.next=7;break;case 6:e.prev=6,s=e.catch(2),this.log("Failed to fetch embed config, using local options:",s);case 7:return e.prev=7,this.embedConfigLoaded=!0,e.finish(7);case 8:case"end":return e.stop()}},e,this,[[2,6,7,8]])}),i=function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function a(e){I(r,i,o,a,s,"next",e)}function s(e){I(r,i,o,a,s,"throw",e)}a(void 0)})},function(){return i.apply(this,arguments)})},{key:"mergeFloatingButtonOptions",value:function(e,t){var n,i,o,r;return e?{desktop:F(F({},e.desktop),t.desktop),mobile:F(F({},e.mobile),t.mobile),zIndex:null!==(n=t.zIndex)&&void 0!==n?n:e.zIndex,callToAction:null!==(i=t.callToAction)&&void 0!==i?i:e.callToAction,italianCallToAction:null!==(o=t.italianCallToAction)&&void 0!==o?o:e.italianCallToAction,englishCallToAction:null!==(r=t.englishCallToAction)&&void 0!==r?r:e.englishCallToAction}:t}},{key:"open",value:function(e){var t,n,i,o,r;null!=e&&e.embedId&&(e.embedId=e.embedId.trim()),this.log("Opening embed",e),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!==(t=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==t?t: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==e?void 0:e.embedId)||(null===(i=this.config)||void 0===i?void 0:i.embedId),experienceId:null==e?void 0:e.experienceId,test:null==e?void 0:e.test,gift:null==e?void 0:e.gift}}),null===(o=this.config)||void 0===o||null===(r=o.onOpen)||void 0===r||r.call(o))}},{key:"close",value:function(){var e=this;this.isOpen&&null===this.closeTimeout&&(this.log("Closing embed"),this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.closeTimeout=window.setTimeout(function(){e.finishClose()},600),this.hasDrawerEntered=!1,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_CLOSE"}))}},{key:"finishClose",value:function(){var e,t;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===(e=this.config)||void 0===e||null===(t=e.onClose)||void 0===t||t.call(e)}},{key:"toggle",value:function(e){this.isOpen?this.close():this.open(e)}},{key:"changeLanguage",value:function(e){var t=this.normalizeLanguage(e);t?(this.log("Changing language",t),this.applyLanguage(t,{markAsExplicit:!0,syncEmbed:!0})):this.log("Ignoring unsupported language change",e)}},{key:"updateFloatingButtonText",value:function(e){var t,n;if(this.floatingButton&&this.config){var i=this.config.floatingButtonOptions,o=this.resolveFloatingButtonResponsiveOption(null==i||null===(t=i.desktop)||void 0===t?void 0:t.textColor,null==i||null===(n=i.mobile)||void 0===n?void 0:n.textColor,"white"),r=this.getFloatingButtonCallToAction(e),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 e,t;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===(e=window.visualViewport)||void 0===e||e.removeEventListener("resize",this.scheduleVisualViewportUpdate),null===(t=window.visualViewport)||void 0===t||t.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 e,t=window.visualViewport;if(this.container&&this.isOpen&&null===this.closeTimeout&&t){if(this.syncContainerBackdrop(),window.innerWidth>=775)return this.visualViewportBaselineHeight=t.height,this.visualViewportBaselineWidth=window.innerWidth,void this.updateKeyboardVisibility(!1,t.height);if(performance.now()<this.keyboardDismissalGuardUntil)this.updateKeyboardVisibility(!1,t.height);else{if(null===this.visualViewportBaselineWidth||Math.abs(this.visualViewportBaselineWidth-window.innerWidth)>2)return this.visualViewportBaselineWidth=window.innerWidth,this.visualViewportBaselineHeight=t.height,void this.updateKeyboardVisibility(!1,t.height);var n=null!==(e=this.visualViewportBaselineHeight)&&void 0!==e?e:t.height;this.visualViewportBaselineHeight=Math.max(n,t.height);var i=this.visualViewportBaselineHeight-t.height>100||performance.now()<this.keyboardOpeningGuardUntil;this.updateKeyboardVisibility(i,t.height)}}}},{key:"updateKeyboardVisibility",value:function(e,t){e&&this.isOpen&&!this.hasDrawerEntered&&(this.hasDrawerEntered=!0,this.syncContainerBackdrop());var n="number"==typeof t&&t>0?Math.round(t):null,i=e&&this.iframe?Math.max(0,Math.round(-this.iframe.getBoundingClientRect().top)):0;(this.isKeyboardVisible!==e||e&&(this.lastKeyboardViewportHeight!==n||this.lastKeyboardViewportOffsetTop!==i))&&(this.isKeyboardVisible=e,this.lastKeyboardViewportHeight=e?n:null,this.lastKeyboardViewportOffsetTop=i,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_KEYBOARD_VISIBILITY",payload:F({visible:e,viewportOffsetTop:i},null!==n&&{viewportHeight:n})}))}},{key:"syncContainerBackdrop",value:function(){var e,t,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===(e=this.container)||void 0===e||e.style.setProperty("background",i,"important"),null===(t=this.iframe)||void 0===t||t.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(e){var t;if(e){if(this.hostCanvasStyles)return;this.hostCanvasStyles=[];for(var n=0,i=[document.documentElement,document.body];n<i.length;n++)for(var o=i[n],r=0,a=[["background-color","#fff"],["background-image","none"]];r<a.length;r++){var s=L(a[r],2),l=s[0],u=s[1],d=o.style.getPropertyValue(l),c=o.style.getPropertyPriority(l);o.style.setProperty(l,u,"important"),this.hostCanvasStyles.push({element:o,property:l,value:d,priority:c,appliedValue:o.style.getPropertyValue(l)})}}else{var h,f=V(null!==(t=this.hostCanvasStyles)&&void 0!==t?t:[]);try{for(f.s();!(h=f.n()).done;){var g=h.value,m=g.element,p=g.property,v=g.value,y=g.priority,b=g.appliedValue;m.style.getPropertyValue(p)===b&&"important"===m.style.getPropertyPriority(p)&&(v?m.style.setProperty(p,v,y):m.style.removeProperty(p))}}catch(e){f.e(e)}finally{f.f()}this.hostCanvasStyles=null}}},{key:"createContainer",value:function(){this.container=document.createElement("div"),this.container.id=d,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 e=this;this.container&&this.config&&(this.iframe=document.createElement("iframe"),this.iframe.id=u,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(){e.log("Iframe loaded, waiting for HOLIDOIT_READY from embed")})}},{key:"createFloatingButton",value:function(){var e,t,n,i,o,r,a,s,l,u,d,c,h,f,g,m,p,v,y,b,w,_,k,S,O=this;if(this.config){var M=this.config.floatingButtonOptions;this.floatingButton=document.createElement("button"),this.floatingButton.id="holidoit-floating-button";var x=window.innerWidth,L=x<775,I=this.resolveFloatingButtonResponsiveOption(null==M||null===(e=M.desktop)||void 0===e?void 0:e.width,null==M||null===(t=M.mobile)||void 0===t?void 0:t.width,L?x-34:190),E=this.resolveFloatingButtonResponsiveOption(null==M||null===(n=M.desktop)||void 0===n?void 0:n.height,null==M||null===(i=M.mobile)||void 0===i?void 0:i.height,54),D=this.resolveFloatingButtonResponsiveOption(null==M||null===(o=M.desktop)||void 0===o?void 0:o.backgroundColor,null==M||null===(r=M.mobile)||void 0===r?void 0:r.backgroundColor,"#0f172a"),T=this.resolveFloatingButtonResponsiveOption(null==M||null===(a=M.desktop)||void 0===a?void 0:a.textColor,null==M||null===(s=M.mobile)||void 0===s?void 0:s.textColor,"white"),H=this.resolveFloatingButtonResponsiveOption(null==M||null===(l=M.desktop)||void 0===l?void 0:l.borderRounding,null==M||null===(u=M.mobile)||void 0===u?void 0:u.borderRounding,30),A=this.resolveFloatingButtonResponsiveOption(null==M||null===(d=M.desktop)||void 0===d?void 0:d.fontSize,null==M||null===(c=M.mobile)||void 0===c?void 0:c.fontSize,16),B=this.resolveFloatingButtonResponsiveOption(null==M||null===(h=M.desktop)||void 0===h?void 0:h.fontWeight,null==M||null===(f=M.mobile)||void 0===f?void 0:f.fontWeight,500),C=this.resolveFloatingButtonResponsiveOption(null==M||null===(g=M.desktop)||void 0===g?void 0:g.textCase,null==M||null===(m=M.mobile)||void 0===m?void 0:m.textCase,"none"),P=this.resolveFloatingButtonResponsiveOption(null==M||null===(p=M.desktop)||void 0===p?void 0:p.bottomPosition,null==M||null===(v=M.mobile)||void 0===v?void 0:v.bottomPosition,L?22:30),$=this.resolveFloatingButtonResponsiveOption(null==M||null===(y=M.desktop)||void 0===y?void 0:y.rightPosition,null==M||null===(b=M.mobile)||void 0===b?void 0:b.rightPosition,L?17:30),U=this.resolveFloatingButtonResponsiveOption(null==M||null===(w=M.desktop)||void 0===w?void 0:w.leftPosition,null==M||null===(_=M.mobile)||void 0===_?void 0:_.leftPosition,void 0),V=this.resolveFloatingButtonResponsiveOption(null==M||null===(k=M.desktop)||void 0===k?void 0:k.topPosition,null==M||null===(S=M.mobile)||void 0===S?void 0:S.topPosition,void 0),Y=Math.min((null==M?void 0:M.zIndex)||2147483646,2147483646),j=this.config.language||R.ITALIAN,F=this.getFloatingButtonCallToAction(j),W="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",N="#0f172a"===D?"#1e293b":D;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(Y," !important;\n width: ").concat(I,"px !important;\n height: ").concat(E,"px !important;\n background: ").concat(D," !important;\n color: ").concat(T," !important;\n border: none !important;\n border-radius: ").concat(H,"px !important;\n font-size: ").concat(A,"px !important;\n font-weight: ").concat(B," !important;\n text-transform: ").concat("uppercase"===C?"uppercase":"capitalize"===C?"capitalize":"none"," !important;\n cursor: pointer !important;\n box-shadow: ").concat(W,' !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!==P?"bottom: ".concat(P,"px !important;"):"","\n ").concat(void 0!==$?"right: ".concat($,"px !important;"):"","\n ").concat(void 0!==U?"left: ".concat(U,"px !important;"):"left: auto !important;","\n ").concat(void 0!==V?"top: ".concat(V,"px !important;"):"top: auto !important;","\n "),this.floatingButton.addEventListener("mouseenter",function(){O.floatingButton&&(O.floatingButton.style.background="".concat(N," !important"),O.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(){O.floatingButton&&(O.floatingButton.style.background="".concat(D," !important"),O.floatingButton.style.boxShadow="".concat(W," !important"),O.floatingButton.style.transform="scale(1) !important")}),this.floatingButton.addEventListener("mousedown",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(0.98) !important")}),this.floatingButton.addEventListener("mouseup",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(1) !important")});var z='<svg style="fill: '.concat(T,' !important;" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><path style="fill: ').concat(T,' !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(T," !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(F,"</span>"),this.floatingButton.addEventListener("click",function(){return O.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(e){if(!e)return null;var t=e.trim().toLowerCase();if(!t)return null;if(G.includes(t))return t;var n=t.split(/[-_]/)[0];return G.includes(n)?n:null}},{key:"getDocumentLanguage",value:function(){var e;return"undefined"==typeof document?null:this.normalizeLanguage(null===(e=document.documentElement)||void 0===e?void 0:e.lang)}},{key:"syncLanguageWithDocument",value:function(){var e;if(!this.hasExplicitLanguageSelection){var t=this.getDocumentLanguage();t&&this.isLanguageSupportedByEmbed(t)&&(null===(e=this.config)||void 0===e?void 0:e.language)!==t&&(this.applyLanguage(t,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",t))}}},{key:"isLanguageSupportedByEmbed",value:function(e){var t;if(!e)return!1;var n=null===(t=this.embedConfig)||void 0===t?void 0:t.languages;return Array.isArray(n)&&n.includes(e)}},{key:"observeDocumentLanguage",value:function(){var e=this;"undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&(this.htmlLangObserver&&this.htmlLangObserver.disconnect(),this.htmlLangObserver=new MutationObserver(function(t){var n,i=V(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("attributes"===o.type&&"lang"===o.attributeName)return void e.syncLanguageWithDocument()}}catch(e){i.e(e)}finally{i.f()}}),this.htmlLangObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))}},{key:"applyLanguage",value:function(e,t){t.markAsExplicit&&(this.hasExplicitLanguageSelection=!0),this.config&&(this.config.language=e),this.updateFloatingButtonText(e),t.syncEmbed&&this.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}})}},{key:"getFloatingButtonCallToAction",value:function(e){var t,n=null===(t=this.config)||void 0===t?void 0:t.floatingButtonOptions;return e===R.ITALIAN&&null!=n&&n.italianCallToAction?n.italianCallToAction:e===R.ENGLISH&&null!=n&&n.englishCallToAction?n.englishCallToAction:null!=n&&n.callToAction?n.callToAction:K[e]||K[R.ENGLISH]}},{key:"resolveFloatingButtonResponsiveOption",value:function(e,t,n){return window.innerWidth<775?void 0!==t?t:n:void 0!==e?e:n}},{key:"bindBookNowButtons",value:function(){var e=this,t=document.querySelectorAll(".book-now-button");if(0!==t.length){var n=0;t.forEach(function(t){var i=t,o="_holidoitClickBound";i[o]||(i[o]=!0,n++,i.addEventListener("click",function(t){var n;t.preventDefault(),t.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"))||"";e.log("Book now button clicked",{element:i.tagName,productNumber:o});var r=parseInt(o,10);setTimeout(function(){isNaN(r)?e.open():e.open({experienceId:r})},0)}))}),n>0&&this.log("Bound click handlers to ".concat(n," .book-now-button element(s)"))}}},{key:"observeForBookNowButtons",value:function(){var e=this;window._holidoitObserverActive||(window._holidoitObserverActive=!0,new MutationObserver(function(t){for(var n=!1,i=0;i<t.length;i++){var o=t[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)if(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&&(e.log("Detected dynamically added .book-now-button elements, binding..."),e.bindBookNowButtons())}).observe(document.body,{childList:!0,subtree:!0}),this.log("MutationObserver active for .book-now-button elements"))}},{key:"parseHolidoitEmbedUrl",value:function(e){try{var t=new URL(e),n=t.hostname.replace(/^www\./,"");if("holidoit.com"!==n&&"holido.it"!==n)return null;var i=t.pathname.match(/^\/embed\/web\/([^/]+)\/?$/);if(!i)return null;var o=i[1],r=t.searchParams.get("experienceId"),a=r?parseInt(r,10):void 0;return{embedId:o,experienceId:a&&!isNaN(a)?a:void 0}}catch(e){return null}}},{key:"interceptHolidoitLinks",value:function(){var e=this;document.addEventListener("click",function(t){var n,i,o,r=null===(n=t.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=e.parseHolidoitEmbedUrl(r.href);a&&a.embedId===(null===(o=e.config)||void 0===o?void 0:o.embedId)&&(t.preventDefault(),t.stopPropagation(),e.log("Intercepted holidoit embed link",a),a.experienceId?e.open({experienceId:a.experienceId}):e.open())}},!0)}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage),window.addEventListener("message",this.handleExternalMessage)}},{key:"getSenderIframe",value:function(e){if(!e)return null;for(var t=0,n=Array.from(document.querySelectorAll("iframe"));t<n.length;t++){var i=n[t];if(i.contentWindow===e)return i}return null}},{key:"isMessageFromOwnEmbedIframe",value:function(e){var t;return!(null===(t=this.iframe)||void 0===t||!t.contentWindow)&&e.source===this.iframe.contentWindow&&e.origin===this.embedOrigin}},{key:"isTrustedHolidoitOrigin",value:function(e){if(!e||"null"===e)return!1;if(e===this.embedOrigin)return!0;try{var t=new URL(e).hostname;return"localhost"===t||"127.0.0.1"===t||("holidoit.com"===t||t.endsWith(".holidoit.com")||"holido.it"===t||t.endsWith(".holido.it")||"holydoit.com"===t||t.endsWith(".holydoit.com"))}catch(e){return!1}}},{key:"extractAnalyticsPayload",value:function(e){var t=k(e);return t&&"embed"===t.source?t:(this.log("Ignoring invalid analytics message payload",e),null)}},{key:"handleAnalyticsMessage",value:function(e){var t=this.extractAnalyticsPayload(e);return!!t&&(_(t.eventData,t.dedupeKey)?(this.log("Pushed analytics event to dataLayer",t.dedupeKey,t.eventData),!0):(this.log("Ignoring duplicate analytics event",t.dedupeKey),!0))}},{key:"postMessage",value:function(e){var t;return null!==(t=this.iframe)&&void 0!==t&&t.contentWindow?this.isReady||"HOLIDOIT_INIT"===e.type?(this.log("Posting message to iframe",e),void this.iframe.contentWindow.postMessage(e,this.embedOrigin)):(this.log("Embed not ready, queueing message",e),void this.pendingMessages.push(e)):(this.log("Iframe not ready, queueing message",e),void this.pendingMessages.push(e))}},{key:"maybeSendInitMessage",value:function(){var e=this;if(this.hasReceivedEmbedReady&&this.embedConfigLoaded&&!this.isReady&&this.config){this.log("Embed and config are ready, sending HOLIDOIT_INIT");var t="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||t}}),this.isReady=!0,this.pendingMessages.forEach(function(t){return e.postMessage(t)}),this.pendingMessages=[]}}},{key:"checkPaymentRedirect",value:function(){var e=this;if(N)this.log("Payment redirect already processed, skipping");else{var t=null,n=null,i=null;if(W)t=W.paymentIntent,n=W.redirectStatus,i=W.paymentIntentClientSecret,this.log("Using captured Stripe params",W);else{var o=new URLSearchParams(window.location.search);t=o.get("payment_intent"),n=o.get("redirect_status"),i=o.get("payment_intent_client_secret")}if(t&&n){this.log("Payment redirect detected",{paymentIntent:t,redirectStatus:n}),N=!0;var r=null;try{r=localStorage.getItem(h)}catch(e){this.log("localStorage not available (incognito mode?)",e)}if(r)try{var a=JSON.parse(r);this.log("Found payment session",a),this.open();this.isReady?e.postMessage({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}):this.pendingMessages.push({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}),this.cleanUrlParams();try{localStorage.removeItem(h)}catch(e){this.log("Failed to remove payment session from localStorage",e)}}catch(e){this.log("Failed to parse payment session",e)}else this.log("Payment redirect params found but no session - cleaning URL"),this.cleanUrlParams()}}}},{key:"cleanUrlParams",value:function(){var e=new URL(window.location.href);e.searchParams.delete("payment_intent"),e.searchParams.delete("payment_intent_client_secret"),e.searchParams.delete("redirect_status"),window.history.replaceState({},"",e.toString())}},{key:"getEmbedOrigin",value:function(e){try{return new URL(e).origin}catch(e){return window.location.origin}}},{key:"lockBodyScroll",value:function(){var e=this;if(this.scrollLockState)this.log("Scroll already locked, skipping");else{var t=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(t)?"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(t){var n,i=t.target;null!==(n=e.container)&&void 0!==n&&n.contains(i)||t.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 e=this.scrollLockState,t=e.mode,n=e.scrollTop,i=e.scrollLeft,o=e.bodyStyles,r=e.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"===t&&(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:t})}else this.log("Scroll not locked, skipping unlock")}},{key:"log",value:function(){var e,t="undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);if(null!==(e=this.config)&&void 0!==e&&e.debug||t){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))}}}]);var n,i}(),q=new J;function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var te="holidoitExperiencePageDrawerWidget",ne="holidoitWidget",ie={init:function(e){return q.init(e)},open:function(e){return q.open(e)},close:function(){return q.close()},toggle:function(e){return q.toggle(e)},changeLanguage:function(e){return q.changeLanguage(e)},destroy:function(){return q.destroy()},version:c},oe=function(){return a(function t(){var n=this;e(this,t),s(this,"config",null),s(this,"widgets",[]),s(this,"isInitialized",!1),s(this,"mutationObserver",null),s(this,"resizeObserver",null),s(this,"autoInsertedElement",null),s(this,"handleMessage",function(e){var t=e.data||{},i=t.type,o=t.height;if(i!==l)if("HOLIDOIT_WIDGET_RESIZE"!==i||"number"!=typeof o){if("HOLIDOIT_WIDGET_READY"===i){if(!n.findTrustedWidgetForEvent(e))return;n.log("Widget ready:",e.data)}}else{var r=n.findTrustedWidgetForEvent(e);if(!r)return;if(Math.abs(o-r.lastAppliedHeight)<15)return;requestAnimationFrame(function(){r.iframe.style.height="".concat(o,"px"),r.lastAppliedHeight=o,n.log("Resized widget to",o,"px")})}else n.handleAnalyticsMessage(e)})},[{key:"init",value:function(e){var t=this;if(e.embedId){if(this.isInitialized)return this.log("Already initialized, updating config"),this.config=ee(ee({},this.config),e),void this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets()});this.config=e,this.isInitialized=!0,this.log("Initializing experience page drawer loader",e),this.setupMessageListener(),this.setupResizeObserver(),this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets(),t.observeForWidgets()})}}},{key:"runWhenBodyReady",value:function(e){document.body?e():document.addEventListener("DOMContentLoaded",function(){e()},{once:!0})}},{key:"getHolidoitApi",value:function(){if("undefined"==typeof window)return ie;var e=window.Holidoit;return null!=e&&e.init&&null!=e&&e.open?e:ie}},{key:"initializeHolidoit",value:function(){if(this.config){var e,t=this.getHolidoitApi(),n=this.config.drawerLanguage||this.config.language;if("undefined"!=typeof window&&window.Holidoit!==ie&&document.getElementById(d))this.log("Holidoit drawer already initialized on page, reusing existing instance"),n&&(null===(e=t.changeLanguage)||void 0===e||e.call(t,n));else t.init({embedId:this.config.embedId,language:n,embedUrl:this.config.embedUrl,floatingButton:!1,debug:this.config.debug})}}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage)}},{key:"handleAnalyticsMessage",value:function(e){var t=this,n=this.findTrustedWidgetForEvent(e);!function(e){var t=e.event,n=e.isTrustedSource,i=e.widgetSrc,o=e.log;if(n){var r=k(t.data);r&&"widget"===r.source&&(_(r.eventData,r.dedupeKey)?null==o||o("Pushed analytics event to dataLayer",{dedupeKey:r.dedupeKey,widgetType:r.widgetType,src:i}):null==o||o("Skipped duplicate analytics event",r.dedupeKey))}else null==o||o("Ignored analytics message from untrusted iframe",t.origin)}({event:e,isTrustedSource:Boolean(n),widgetSrc:null==n?void 0:n.src,log:function(){return t.log.apply(t,arguments)}})}},{key:"findTrustedWidgetForEvent",value:function(e){return function(e){var t,n=e.widgets,i=e.event,o=e.getWidgetSrc,r=f(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a.iframe.contentWindow===i.source){var s=S(o(a));return s&&i.origin===s?a:null}}}catch(e){r.e(e)}finally{r.f()}return null}({widgets:this.widgets,event:e,getWidgetSrc:function(e){return e.src}})}},{key:"setupResizeObserver",value:function(){var e=this;this.resizeObserver=new ResizeObserver(function(t){var n,i=Z(t);try{for(i.s();!(n=i.n()).done;){var o,r=n.value.target,a=Z(e.widgets);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.element===r){var l;null===(l=s.iframe.contentWindow)||void 0===l||l.postMessage({type:"HOLIDOIT_REQUEST_HEIGHT"},"*");break}}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}})}},{key:"getWidgetElements",value:function(){var e=[],t=new Set;return document.querySelectorAll(".".concat(te)).forEach(function(n){var i=n;t.has(i)||(t.add(i),e.push(i))}),document.querySelectorAll(".".concat(ne)).forEach(function(n){var i=n;(i.dataset.src||"").includes("widget-experience-page-drawer.html")&&!t.has(i)&&(t.add(i),e.push(i))}),e}},{key:"ensureAutoInsertedPlaceholder",value:function(){var e,t;if(!1!==(null===(e=this.config)||void 0===e?void 0:e.autoInsertIfMissing)&&!(this.getWidgetElements().length>0||this.autoInsertedElement&&document.body.contains(this.autoInsertedElement))){var n=document.createElement("div");n.className=te;var i=null===(t=this.config)||void 0===t?void 0:t.scriptElement;null!=i&&i.parentNode&&i.parentElement!==document.head?i.parentNode.insertBefore(n,i.nextSibling):document.body.appendChild(n),this.autoInsertedElement=n,this.log("Auto-inserted .holidoitExperiencePageDrawerWidget placeholder")}}},{key:"resolveWidgetUrl",value:function(){var e,t;if(null!==(e=this.config)&&void 0!==e&&e.widgetUrl)return this.config.widgetUrl;if(null!==(t=this.config)&&void 0!==t&&t.scriptSrc)try{return new URL("./widget-experience-page-drawer.html",this.config.scriptSrc).toString()}catch(e){}return"https://cdn.holidoit.com/widgets/widget-experience-page-drawer.html"}},{key:"scanAndCreateWidgets",value:function(){this.ensureAutoInsertedPlaceholder();var e,t=Z(this.getWidgetElements());try{for(t.s();!(e=t.n()).done;){var n=e.value;"true"!==n.dataset.holidoitProcessed&&this.createWidget(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"applyWidgetParams",value:function(e,t){var n,i,o,r,a,s;null!==(n=this.config)&&void 0!==n&&n.embedId&&!e.searchParams.has("embedId")&&e.searchParams.set("embedId",this.config.embedId);var l=t.dataset.experienceId||t.dataset.productNumber,u=null!==(i=this.config)&&void 0!==i&&i.experienceId?String(this.config.experienceId):void 0,d=l||u;d&&!e.searchParams.has("experienceId")&&e.searchParams.set("experienceId",d);var c=t.dataset.language||(null===(o=this.config)||void 0===o?void 0:o.language);c&&!e.searchParams.has("lang")&&e.searchParams.set("lang",c);var h=t.dataset.showLanguagePicker,f=void 0===(null===(r=this.config)||void 0===r?void 0:r.showLanguagePicker)?void 0:String(this.config.showLanguagePicker),g=null!=h?h:f;void 0===g||e.searchParams.has("show_language_picker")||e.searchParams.set("show_language_picker",g);var m=t.dataset.withLogo,p=void 0===(null===(a=this.config)||void 0===a?void 0:a.withLogo)?void 0:String(this.config.withLogo),v=null!=m?m:p;void 0===v||e.searchParams.has("with_logo")||e.searchParams.set("with_logo",v);var y=t.dataset.gift,b=void 0===(null===(s=this.config)||void 0===s?void 0:s.gift)?void 0:String(this.config.gift),w=null!=y?y:b;void 0===w||e.searchParams.has("gift")||e.searchParams.set("gift",w)}},{key:"createWidget",value:function(e){var t,n,i=e.dataset.src;i||(i=this.resolveWidgetUrl());try{n=new URL(M(i),window.location.href)}catch(e){return}this.applyWidgetParams(n,e);var o=document.createElement("iframe");o.className="holidoit-experience-page-drawer-iframe",o.src=n.toString(),o.allow="payment",o.setAttribute("scrolling","auto"),o.setAttribute("frameborder","0"),o.style.cssText="\n width: 100% !important;\n min-height: ".concat(600,"px !important;\n border: none !important;\n display: block !important;\n "),o.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"),e.innerHTML="",e.appendChild(o),e.dataset.holidoitProcessed="true";var r={element:e,iframe:o,src:n.toString(),lastAppliedHeight:600};this.widgets.push(r),null===(t=this.resizeObserver)||void 0===t||t.observe(e),this.log("Created experience page drawer widget",r)}},{key:"observeForWidgets",value:function(){var e=this;this.mutationObserver||(this.mutationObserver=new MutationObserver(function(t){var n,i=!1,o=Z(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if("childList"===r.type){for(var a=0,s=Array.from(r.addedNodes);a<s.length;a++){var l,u,d,c,h=s[a];if(h instanceof HTMLElement&&(null!==(l=h.classList)&&void 0!==l&&l.contains(te)||null!==(u=h.querySelector)&&void 0!==u&&u.call(h,".".concat(te))||null!==(d=h.matches)&&void 0!==d&&d.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]'))||null!==(c=h.querySelector)&&void 0!==c&&c.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]')))){i=!0;break}}if(i)break}}}catch(e){o.e(e)}finally{o.f()}i&&(e.log("Detected new experience page drawer widget elements, scanning..."),e.scanAndCreateWidgets())}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}},{key:"changeLanguage",value:function(e){var t;this.config&&(this.config.language=e,this.config.drawerLanguage=e);var n=this.getHolidoitApi();null===(t=n.changeLanguage)||void 0===t||t.call(n,e);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r;null===(r=i.value.iframe.contentWindow)||void 0===r||r.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}},"*")}}catch(e){o.e(e)}finally{o.f()}}},{key:"destroy",value:function(){var e,t,n;this.log("Destroying experience page drawer widgets"),window.removeEventListener("message",this.handleMessage);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r=i.value;r.iframe.remove(),r.element.dataset.holidoitProcessed="false"}}catch(e){o.e(e)}finally{o.f()}this.widgets=[],null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=null,this.isInitialized=!1,this.config=null,null!==(n=this.autoInsertedElement)&&void 0!==n&&n.parentNode&&this.autoInsertedElement.parentNode.removeChild(this.autoInsertedElement),this.autoInsertedElement=null}},{key:"log",value:function(){var e;if(null!==(e=this.config)&&void 0!==e&&e.debug){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];(t=console).log.apply(t,["[HolidoitExperiencePageDrawer]"].concat(i))}}}])}(),re=new oe;if("undefined"!=typeof window){window.Holidoit||(window.Holidoit=ie);var ae=document.currentScript;if(ae){var se=new URL(ae.src,window.location.href),le=se.searchParams.get("embedId")||ae.dataset.embedId;if(le){var ue=se.searchParams.get("lang")||ae.dataset.language,de=se.searchParams.get("drawerLang")||ae.dataset.drawerLang||ae.dataset.drawerLanguage||ue,ce=se.searchParams.get("experienceId")||se.searchParams.get("productNumber")||ae.dataset.experienceId||ae.dataset.productNumber,he=parseInt(ce||"",10),fe=se.searchParams.get("show_language_picker")||se.searchParams.get("showLanguagePicker")||ae.dataset.showLanguagePicker,ge=null==fe?void 0:"false"!==fe,me=se.searchParams.get("with_logo")||se.searchParams.get("withLogo")||ae.dataset.withLogo,pe=null==me?void 0:"true"===me,ve=se.searchParams.get("gift")||ae.dataset.gift,ye=null==ve?void 0:"true"===ve;re.init({embedId:le,language:ue,drawerLanguage:de,experienceId:Number.isNaN(he)?void 0:he,embedUrl:se.searchParams.get("embedUrl")||ae.dataset.embedUrl||void 0,widgetUrl:se.searchParams.get("widgetUrl")||ae.dataset.widgetUrl||void 0,showLanguagePicker:ge,withLogo:pe,gift:ye,debug:"true"===se.searchParams.get("debug")||"true"===ae.dataset.debug,autoInsertIfMissing:"false"!==(se.searchParams.get("autoInsertIfMissing")||ae.dataset.autoInsertIfMissing),scriptSrc:ae.src,scriptElement:ae})}}window.HolidoitExperiencePageDrawer=re}})(),i})());
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("HolidoitExperiencePageDrawer",[],t):"object"==typeof exports?exports.HolidoitExperiencePageDrawer=t():e.HolidoitExperiencePageDrawer=t()}(this,()=>(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},317:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},353:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",o="second",r="minute",a="hour",s="day",l="week",u="month",d="quarter",c="year",h="date",f="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,p={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(i,u),r=n-o<0,a=t.clone().add(i+(r?-1:1),u);return+(-(i+(n-o)/(r?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:l,d:s,D:h,h:a,m:r,s:o,ms:i,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=p;var _="$isDayjsObject",k=function(e){return e instanceof x||!(!e||!e[_])},S=function e(t,n,i){var o;if(!t)return b;if("string"==typeof t){var r=t.toLowerCase();w[r]&&(o=r),n&&(w[r]=n,o=r);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!i&&o&&(b=o),o||!i&&b},O=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},M=y;M.l=S,M.i=k,M.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function p(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var v=p.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(g);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(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return M},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(e,t){var n=O(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return O(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<O(e)},v.$g=function(e,t,n){return M.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,i=!!M.u(t)||t,d=M.p(e),f=function(e,t){var o=M.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?o:o.endOf(s)},g=function(e,t){return M.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,p=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case c:return i?f(1,0):f(31,11);case u:return i?f(1,p):f(0,p+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(i?v-w:v+(6-w),p);case s:case h:return g(y+"Hours",0);case a:return g(y+"Minutes",1);case r:return g(y+"Seconds",2);case o:return g(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=M.p(e),d="set"+(this.$u?"UTC":""),f=(n={},n[s]=d+"Date",n[h]=d+"Date",n[u]=d+"Month",n[c]=d+"FullYear",n[a]=d+"Hours",n[r]=d+"Minutes",n[o]=d+"Seconds",n[i]=d+"Milliseconds",n)[l],g=l===s?this.$D+(t-this.$W):t;if(l===u||l===c){var m=this.clone().set(h,1);m.$d[f](g),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](g);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[M.p(e)]()},v.add=function(i,d){var h,f=this;i=Number(i);var g=M.p(d),m=function(e){var t=O(f);return M.w(t.date(t.date()+Math.round(e*i)),f)};if(g===u)return this.set(u,this.$M+i);if(g===c)return this.set(c,this.$y+i);if(g===s)return m(1);if(g===l)return m(7);var p=(h={},h[r]=t,h[a]=n,h[o]=e,h)[g]||1,v=this.$d.getTime()+i*p;return M.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=e||"YYYY-MM-DDTHH:mm:ssZ",o=M.z(this),r=this.$H,a=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,c=function(e,n,o,r){return e&&(e[n]||e(t,i))||o[n].slice(0,r)},h=function(e){return M.s(r%12||12,e,"0")},g=d||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(m,function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return c(n.monthsShort,s,u,3);case"MMMM":return c(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return c(n.weekdaysMin,t.$W,l,2);case"ddd":return c(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(r);case"HH":return M.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return g(r,a,!0);case"A":return g(r,a,!1);case"m":return String(a);case"mm":return M.s(a,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,h,f){var g,m=this,p=M.p(h),v=O(i),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return M.m(m,v)};switch(p){case c:g=w()/12;break;case u:g=w();break;case d:g=w()/3;break;case l:g=(b-y)/6048e5;break;case s:g=(b-y)/864e5;break;case a:g=b/n;break;case r:g=b/t;break;case o:g=b/e;break;default:g=b}return f?g:M.a(g)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=S(e,t,!0);return i&&(n.$L=i),n},v.clone=function(){return M.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()},p}(),L=x.prototype;return O.prototype=L,[["$ms",i],["$s",o],["$m",r],["$H",a],["$W",s],["$M",u],["$y",c],["$D",h]].forEach(function(e){L[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),O.extend=function(e,t){return e.$i||(e(t,x,O),e.$i=!0),O},O.locale=S,O.isDayjs=k,O.unix=function(e){return O(1e3*e)},O.en=w[b],O.Ls=w,O.p={},O}()},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var i in t)n.unshift(i);return function e(){for(;n.length;)if((i=n.pop())in t)return e.value=i,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},445:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,r){var a=o.prototype;r.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=r(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.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(e){void 0===e&&(e="");var i=e.match(t);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,e)).$offset=a,s.$x.$localOffset=l,s};var d=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var c=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var h=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var i=this.local(),o=r(e).local();return h.call(i,o,t,n)}}}()},494:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e,t,n){var o=i[n];return Array.isArray(o)&&(o=o[t?0:1]),o.replace("%d",e)}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(e){return e+"."},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:e=>{function t(n,i,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,i,o){function r(n,i){t(e,n,function(e){return this._invoke(n,i,e)})}n?a?a(e,n,{value:i,enumerable:!o,configurable:!o,writable:!o}):e[n]=i:(r("next",0),r("throw",1),r("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i,o,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},569:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,i,o){var r,a=function(e,n,i){void 0===i&&(i={});var o=new Date(e),r=function(e,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=e+"|"+i,r=t[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),t[o]=r),r}(n,i);return r.formatToParts(o)},s=function(t,n){for(var i=a(t,n),r=[],s=0;s<i.length;s+=1){var l=i[s],u=l.type,d=l.value,c=e[u];c>=0&&(r[c]=parseInt(d,10))}var h=r[3],f=24===h?0:h,g=r[0]+"-"+r[1]+"-"+r[2]+" "+f+":"+r[4]+":"+r[5]+":000",m=+t;return(o.utc(g).valueOf()-(m-=m%1e3))/6e4},l=i.prototype;l.tz=function(e,t){void 0===e&&(e=r);var n,i=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),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),t){var d=n.utcOffset();n=n.add(i-d,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var u=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return u.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var i=n&&t,a=n||t||r,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var u=function(e,t,n){var i=e-60*t*1e3,o=s(i,n);if(t===o)return[i,t];var r=s(i-=60*(o-t)*1e3,n);return o===r?[i,o]:[e-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(e,i).valueOf(),l,a),d=u[0],c=u[1],h=o(d).utcOffset(c);return h.$x.$timezone=a,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){r=e}}}()},579:(e,t,n)=>{var i=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(i(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var i=n(172),o=n(993),r=n(869),a=n(887),s=n(791),l=n(373),u=n(579);function d(){"use strict";var t=o(),n=t.m(d),c=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===c||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function g(e){var t,n;return function(i){t||(t={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(e,t){return n(i.a,f[e],t)},delegateYield:function(e,o,r){return t.resultName=o,n(i.d,u(e),r)},finish:function(e){return n(i.f,e)}},n=function(e,n,o){i.p=t.prev,i.n=t.next;try{return e(n,o)}finally{t.next=i.n}}),t.resultName&&(t[t.resultName]=i.v,t.resultName=void 0),t.sent=i.v,t.next=i.n;try{return e.call(this,t)}finally{i.p=t.prev,i.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,n,i,o){return t.w(g(e),n,i,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new i(e,t)},AsyncIterator:s,async:function(e,t,n,i,o){return(h(t)?a:r)(g(e),t,n,i,o)},keys:l,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var i=n(633)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},791:(e,t,n)=>{var i=n(172),o=n(546);e.exports=function e(t,n){function r(e,o,a,s){try{var l=t[e](o),u=l.value;return u instanceof i?n.resolve(u.v).then(function(e){r("next",e,a,s)},function(e){r("throw",e,a,s)}):n.resolve(u).then(function(e){l.value=e,a(l)},function(e){return r("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,i){function o(){return new n(function(t,n){r(e,i,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},813:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+(1===e?"er":"")}};return n.default.locale(i,null,!0),i}(n(353))},826:function(e){e.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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}}()},840:function(e){e.exports=function(){"use strict";return function(e,t,n){var i=t.prototype,o=function(e){return e&&(e.indexOf?e:e.s)},r=function(e,t,n,i,r){var a=e.name?e:e.$locale(),s=o(a[t]),l=o(a[n]),u=s||l.map(function(e){return e.slice(0,i)});if(!r)return u;var d=a.weekStart;return u.map(function(e,t){return u[(t+(d||0))%7]})},a=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):r(e,"months")},monthsShort:function(t){return t?t.format("MMM"):r(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):r(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):r(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):r(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return l.bind(this)()},n.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.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(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return r(a(),"months")},n.monthsShort=function(){return r(a(),"monthsShort","months",3)},n.weekdays=function(e){return r(a(),"weekdays",null,null,e)},n.weekdaysShort=function(e){return r(a(),"weekdaysShort","weekdays",3,e)},n.weekdaysMin=function(e){return r(a(),"weekdaysMin","weekdays",2,e)}}}()},869:(e,t,n)=>{var i=n(887);e.exports=function(e,t,n,o,r){var a=i(e,t,n,o,r);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var i=n(993),o=n(791);e.exports=function(e,t,n,r,a){return new o(i().w(e,t,n,r),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},900:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),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(e){return e+"º"}};return n.default.locale(i,null,!0),i}(n(353))},993:(e,t,n)=>{var i=n(546);function o(){var t,n,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function l(e,o,r,a){var s=o&&o.prototype instanceof d?o:d,l=Object.create(s.prototype);return i(l,"_invoke",function(e,i,o){var r,a,s,l=0,d=o||[],c=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return r=e,a=0,s=t,h.n=n,u}};function f(e,i){for(a=e,s=i,n=0;!c&&l&&!o&&n<d.length;n++){var o,r=d[n],f=h.p,g=r[2];e>3?(o=g===i)&&(s=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=t):r[0]<=f&&((o=e<2&&f<r[1])?(a=0,h.v=i,h.n=r[1]):f<g&&(o=e<3||r[0]>i||i>g)&&(r[4]=e,r[5]=i,h.n=g,a=0))}if(o||e>1)return u;throw c=!0,i}return function(o,d,g){if(l>1)throw TypeError("Generator is already running");for(c&&1===d&&f(d,g),a=d,s=g;(n=a<2?t:s)||!c;){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=t}else if((n=(c=h.n<0)?s:e.call(i,h))!==u)break}catch(e){r=t,a=1,s=e}finally{l=1}}return{value:n,done:c}}}(e,r,a),!0),l}var u={};function d(){}function c(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),g=h.prototype=d.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,i(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return c.prototype=h,i(g,"constructor",h),i(h,"constructor",c),c.displayName="GeneratorFunction",i(h,s,"GeneratorFunction"),i(g),i(g,s,"Generator"),i(g,a,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:l,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(i),n.d(i,{holidoitExperiencePageDrawerLoader:()=>re});var l="HOLIDOIT_ANALYTICS_EVENT",u="holidoit-loader-iframe",d="holidoit-loader-container",c="2.0.0",h="_holidoit_payment_session";function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var m="holidoit_analytics_dedupe_keys",p=new Set;function v(e){return"object"===t(e)&&null!==e&&!Array.isArray(e)}function y(){if("undefined"==typeof window)return null;try{return window.sessionStorage}catch(e){return null}}function b(){var e=y();if(!e)return[];try{var t=e.getItem(m);if(!t)return[];var n=JSON.parse(t);return Array.isArray(n)?n.filter(function(e){return"string"==typeof e&&e.length>0}):[]}catch(e){return[]}}function w(e){if(e){p.add(e);var t=b().filter(function(t){return t!==e});t.push(e),function(e){var t=y();if(t)try{t.setItem(m,JSON.stringify(e.slice(-200)))}catch(e){}}(t)}}function _(e,t){return"undefined"!=typeof window&&(!function(e){return!(!e||!p.has(e)&&(!b().includes(e)||(p.add(e),0)))}(t)&&(Array.isArray(window.dataLayer)||(window.dataLayer=[]),w(t),window.dataLayer.push(e),!0))}function k(e){if(!v(e)||e.type!==l)return null;var t,n=v(e.payload)?e.payload:e,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()||(!v(t=r)||"string"!=typeof t.event||""===t.event.trim())?null:{channel:i,dedupeKey:o.trim(),eventData:r,source:a,widgetType:"string"==typeof s&&s.trim()?s:void 0}}function S(e){try{return new URL(e,window.location.href).origin}catch(e){return null}}var O=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"]);function M(e){try{var t=new URL(e,"undefined"==typeof window?void 0:window.location.href),n=new URL("https://cdn.holidoit.com/");if(t.origin!==n.origin||!t.pathname.startsWith(n.pathname))return e;var i=t.pathname.slice(n.pathname.length);return O.has(i)?(t.pathname="".concat(n.pathname,"holidoit-js-releases/").concat("20261002094648885-af688fa62c09-705e151c","/").concat(i),t.toString()):e}catch(t){return e}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||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 I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}var E=n(756),D=n.n(E),T=n(353),H=n.n(T),A=(n(494),n(826),n(317),n(813),n(900),n(840)),B=n.n(A),C=n(569),P=n.n(C),$=n(445),U=n.n($);H().extend(U()),H().extend(P()),H().extend(B());var R=function(e){return e.ITALIAN="it",e.ENGLISH="en",e.SPANISH="es",e.FRENCH="fr",e.GERMAN="de",e}({});H()().locale("it").localeData().months(),H()().locale("it").localeData().weekdays(),H()().locale("en").localeData().months(),H()().locale("en").localeData().weekdays(),H()().locale("de").localeData().months(),H()().locale("de").localeData().weekdays(),H()().locale("es").localeData().months(),H()().locale("es").localeData().weekdays(),H()().locale("fr").localeData().months(),H()().locale("fr").localeData().weekdays();function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var W=function(){if("undefined"==typeof window)return null;try{var e=new URLSearchParams(window.location.search),t=e.get("payment_intent");if(!t)return null;var n={paymentIntent:t,paymentIntentClientSecret:e.get("payment_intent_client_secret"),redirectStatus:e.get("redirect_status")};"localhost"===window.location.hostname||window.location.hostname;return n}catch(e){return null}}(),N=!1,z=new Set(["holidoitExperienceSelected","holidoitIFrameChangeLanguage","holidoitExperienceCount"]),G=Object.values(R),K=s(s(s(s(s({},R.ITALIAN,"Prenota ora"),R.ENGLISH,"Book now"),R.SPANISH,"Reservar ahora"),R.FRENCH,"Réserver maintenant"),R.GERMAN,"Jetzt buchen");var J=function(){return a(function n(){var i=this;e(this,n),s(this,"config",null),s(this,"embedConfig",null),s(this,"iframe",null),s(this,"container",null),s(this,"floatingButton",null),s(this,"isOpen",!1),s(this,"hasDrawerEntered",!1),s(this,"closeTimeout",null),s(this,"isReady",!1),s(this,"pendingMessages",[]),s(this,"embedOrigin",""),s(this,"resolvedEmbedUrl",""),s(this,"resolvedApiUrl",""),s(this,"htmlLangObserver",null),s(this,"hasExplicitLanguageSelection",!1),s(this,"hasReceivedEmbedReady",!1),s(this,"embedConfigLoaded",!1),s(this,"previouslyFocusedElement",null),s(this,"visualViewportBaselineHeight",null),s(this,"visualViewportBaselineWidth",null),s(this,"visualViewportUpdateFrame",null),s(this,"isKeyboardVisible",!1),s(this,"lastKeyboardViewportHeight",null),s(this,"lastKeyboardViewportOffsetTop",0),s(this,"keyboardOpeningGuardUntil",0),s(this,"keyboardOpeningCheckTimeout",null),s(this,"keyboardDismissalGuardUntil",0),s(this,"hostCanvasStyles",null),s(this,"scrollLockState",null),s(this,"touchMoveHandler",null),s(this,"scheduleVisualViewportUpdate",function(){null!==i.visualViewportUpdateFrame&&cancelAnimationFrame(i.visualViewportUpdateFrame),i.visualViewportUpdateFrame=requestAnimationFrame(function(){i.visualViewportUpdateFrame=null,i.syncKeyboardViewport()})}),s(this,"handleExternalMessage",function(e){var t=e.data;if(t&&"string"==typeof t.action&&z.has(t.action)){var n=null;if(!(e.source===window)){if(!(n=i.getSenderIframe(e.source)))return void i.log("Ignoring external message from unknown iframe source",t.action);if(n.id===u)return;if(!i.isTrustedHolidoitOrigin(e.origin))return void i.log("Ignoring external message from untrusted origin",e.origin,t.action)}switch(i.log("Received external message",t),t.action){case"holidoitExperienceSelected":t.experienceId&&(i.log("Experience selected from external iframe",t.experienceId),i.open({experienceId:t.experienceId,gift:!!t.gift}));break;case"holidoitIFrameChangeLanguage":t.language&&(i.log("Language change from external iframe",t.language),i.changeLanguage(t.language));break;case"holidoitExperienceCount":if(!n)return;if(i.log("Experience count from external iframe",t.count),"number"==typeof t.height){var o=t.height+16,r=parseInt(n.style.height||"0",10);Math.abs(o-r)>15&&(n.style.height="".concat(o,"px"),i.log("Adjusted iframe height to",o,"for",n.id||n.src))}}}}),s(this,"handleMessage",function(e){var n,o,r,a;if(i.isMessageFromOwnEmbedIframe(e)){var s,l=e.data;if("object"===t(s=l)&&null!==s&&!Array.isArray(s)&&"string"==typeof l.type&&l.type.startsWith("HOLIDOIT_"))if(i.log("Received message from embed iframe",l),!i.handleAnalyticsMessage(l))switch(l.type){case"HOLIDOIT_READY":i.hasReceivedEmbedReady=!0,i.maybeSendInitMessage();break;case"HOLIDOIT_OPENED":i.isOpen&&null===i.closeTimeout&&(i.hasDrawerEntered=!0,i.syncContainerBackdrop());break;case"HOLIDOIT_CLOSED":i.close();break;case"HOLIDOIT_DRAWER_EXITED":null!==i.closeTimeout&&i.finishClose();break;case"HOLIDOIT_BOOKING_COMPLETE":var u=l.payload;i.log("Booking complete",u),null===(n=i.config)||void 0===n||null===(o=n.onBookingComplete)||void 0===o||o.call(n,u);break;case"HOLIDOIT_PAYMENT_REDIRECT_START":var d=l.payload;if(null!=d&&d.session){i.log("Saving payment session for redirect",d.session);try{localStorage.setItem(h,JSON.stringify(d.session))}catch(e){i.log("Failed to save payment session (incognito mode?)",e)}}break;case"HOLIDOIT_LANGUAGE_CHANGED":var c=l.payload,f=i.normalizeLanguage(null==c?void 0:c.language);f&&(i.log("Language changed from embed:",f),i.applyLanguage(f,{markAsExplicit:!0,syncEmbed:!1}),window.postMessage({action:"holidoitEmbedChangeLanguage",language:f},"*"));break;case"HOLIDOIT_CHECKOUT_FIELD_FOCUS":var g,m=l.payload;if(!i.isOpen||null!==i.closeTimeout||"boolean"!=typeof(null==m?void 0:m.focused)||window.innerWidth>=775)break;if(i.clearKeyboardOpeningCheck(),m.focused)i.keyboardOpeningGuardUntil=performance.now()+600,i.keyboardDismissalGuardUntil=0,i.updateKeyboardVisibility(!0,null===(g=window.visualViewport)||void 0===g?void 0:g.height),i.keyboardOpeningCheckTimeout=window.setTimeout(function(){i.keyboardOpeningCheckTimeout=null;var e=window.visualViewport;e&&null!==i.visualViewportBaselineHeight&&i.visualViewportBaselineHeight-e.height>100||i.scheduleVisualViewportUpdate()},650);else i.keyboardOpeningGuardUntil=0,i.keyboardDismissalGuardUntil=performance.now()+450,i.updateKeyboardVisibility(!1);break;case"HOLIDOIT_ERROR":var p=l.payload;null===(r=i.config)||void 0===r||null===(a=r.onError)||void 0===a||a.call(r,(null==p?void 0:p.message)||"Unknown error");break;case"HOLIDOIT_NAVIGATE_TO":var v=l.payload;null!=v&&v.url&&(i.log("Navigating parent page to:",v.url),window.location.href=v.url)}}})},[{key:"isIOSDevice",value:function(){if("undefined"==typeof window||"undefined"==typeof navigator)return!1;var e=navigator.userAgent||"",t=/iPad|iPhone|iPod/.test(e),n="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return t||n}},{key:"safeScrollToPosition",value:function(e,t){var n=null;try{(n=document.createElement("style")).textContent="html, body { scroll-behavior: auto !important; }",(document.head||document.documentElement).appendChild(n),window.scrollTo({left:e,top:t,behavior:"auto"})}catch(n){window.scrollTo(e,t)}finally{n&&requestAnimationFrame(function(){var e;null===(e=n)||void 0===e||e.remove()})}}},{key:"getDocumentScrollRoot",value:function(){var e=document.scrollingElement;return e instanceof HTMLElement?e:document.documentElement}},{key:"isDocumentScrollRoot",value:function(e){return e===this.getDocumentScrollRoot()||e===document.documentElement||e===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(e,t){var n=this.getScrollPosition();(Math.abs(n.top-e)>1||Math.abs(n.left-t)>1)&&this.safeScrollToPosition(t,e)}},{key:"focusWithoutScroll",value:function(e){if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch(t){e.focus()}}},{key:"init",value:function(e){var t,n,i=this;if(e.embedId&&(e.embedId=e.embedId.trim()),e.embedId){if(this.container)return this.log("Holidoit already initialized, skipping duplicate init"),this.config=F(F({},this.config),e),void this.syncLanguageWithDocument();var o=window.scrollY,r=history.scrollRestoration||"auto";try{history.scrollRestoration="manual"}catch(e){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=F(F({},e),{},{language:this.normalizeLanguage(e.language)||void 0}),this.resolvedEmbedUrl=M(e.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:e.embedId,version:c}),this.createContainer(),this.createIframe(),null===(t=window.visualViewport)||void 0===t||t.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(e){}}),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 t;((null===(t=i.embedConfig)||void 0===t?void 0:t.has_floating_button)||e.floatingButton)&&i.createFloatingButton(),i.maybeSendInitMessage()}),this.checkPaymentRedirect()}}},{key:"fetchEmbedConfig",value:(n=D().mark(function e(){var t,n,i,o,r,a,s;return D().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.config)&&void 0!==t&&t.embedId){e.next=1;break}return e.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),e.prev=2,e.next=3,fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});case 3:if((i=e.sent).ok){e.next=4;break}throw new Error("Failed to fetch embed config: ".concat(i.status));case 4:return e.next=5,i.json();case 5:o=e.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)),e.next=7;break;case 6:e.prev=6,s=e.catch(2),this.log("Failed to fetch embed config, using local options:",s);case 7:return e.prev=7,this.embedConfigLoaded=!0,e.finish(7);case 8:case"end":return e.stop()}},e,this,[[2,6,7,8]])}),i=function(){var e=this,t=arguments;return new Promise(function(i,o){var r=n.apply(e,t);function a(e){I(r,i,o,a,s,"next",e)}function s(e){I(r,i,o,a,s,"throw",e)}a(void 0)})},function(){return i.apply(this,arguments)})},{key:"mergeFloatingButtonOptions",value:function(e,t){var n,i,o,r;return e?{desktop:F(F({},e.desktop),t.desktop),mobile:F(F({},e.mobile),t.mobile),zIndex:null!==(n=t.zIndex)&&void 0!==n?n:e.zIndex,callToAction:null!==(i=t.callToAction)&&void 0!==i?i:e.callToAction,italianCallToAction:null!==(o=t.italianCallToAction)&&void 0!==o?o:e.italianCallToAction,englishCallToAction:null!==(r=t.englishCallToAction)&&void 0!==r?r:e.englishCallToAction}:t}},{key:"open",value:function(e){var t,n,i,o,r;null!=e&&e.embedId&&(e.embedId=e.embedId.trim()),this.log("Opening embed",e),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!==(t=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==t?t: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==e?void 0:e.embedId)||(null===(i=this.config)||void 0===i?void 0:i.embedId),experienceId:null==e?void 0:e.experienceId,test:null==e?void 0:e.test,gift:null==e?void 0:e.gift}}),null===(o=this.config)||void 0===o||null===(r=o.onOpen)||void 0===r||r.call(o))}},{key:"close",value:function(){var e=this;this.isOpen&&null===this.closeTimeout&&(this.log("Closing embed"),this.clearKeyboardOpeningCheck(),this.keyboardOpeningGuardUntil=0,this.keyboardDismissalGuardUntil=0,this.closeTimeout=window.setTimeout(function(){e.finishClose()},600),this.hasDrawerEntered=!1,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_CLOSE"}))}},{key:"finishClose",value:function(){var e,t;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===(e=this.config)||void 0===e||null===(t=e.onClose)||void 0===t||t.call(e)}},{key:"toggle",value:function(e){this.isOpen?this.close():this.open(e)}},{key:"changeLanguage",value:function(e){var t=this.normalizeLanguage(e);t?(this.log("Changing language",t),this.applyLanguage(t,{markAsExplicit:!0,syncEmbed:!0})):this.log("Ignoring unsupported language change",e)}},{key:"updateFloatingButtonText",value:function(e){var t,n;if(this.floatingButton&&this.config){var i=this.config.floatingButtonOptions,o=this.resolveFloatingButtonResponsiveOption(null==i||null===(t=i.desktop)||void 0===t?void 0:t.textColor,null==i||null===(n=i.mobile)||void 0===n?void 0:n.textColor,"white"),r=this.getFloatingButtonCallToAction(e),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 e,t;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===(e=window.visualViewport)||void 0===e||e.removeEventListener("resize",this.scheduleVisualViewportUpdate),null===(t=window.visualViewport)||void 0===t||t.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 e,t=window.visualViewport;if(this.container&&this.isOpen&&null===this.closeTimeout&&t){if(this.syncContainerBackdrop(),window.innerWidth>=775)return this.visualViewportBaselineHeight=t.height,this.visualViewportBaselineWidth=window.innerWidth,void this.updateKeyboardVisibility(!1,t.height);if(performance.now()<this.keyboardDismissalGuardUntil)this.updateKeyboardVisibility(!1,t.height);else{if(null===this.visualViewportBaselineWidth||Math.abs(this.visualViewportBaselineWidth-window.innerWidth)>2)return this.visualViewportBaselineWidth=window.innerWidth,this.visualViewportBaselineHeight=t.height,void this.updateKeyboardVisibility(!1,t.height);var n=null!==(e=this.visualViewportBaselineHeight)&&void 0!==e?e:t.height;this.visualViewportBaselineHeight=Math.max(n,t.height);var i=this.visualViewportBaselineHeight-t.height>100||performance.now()<this.keyboardOpeningGuardUntil;this.updateKeyboardVisibility(i,t.height)}}}},{key:"updateKeyboardVisibility",value:function(e,t){e&&this.isOpen&&!this.hasDrawerEntered&&(this.hasDrawerEntered=!0,this.syncContainerBackdrop());var n="number"==typeof t&&t>0?Math.round(t):null,i=e&&this.iframe?Math.max(0,Math.round(-this.iframe.getBoundingClientRect().top)):0;(this.isKeyboardVisible!==e||e&&(this.lastKeyboardViewportHeight!==n||this.lastKeyboardViewportOffsetTop!==i))&&(this.isKeyboardVisible=e,this.lastKeyboardViewportHeight=e?n:null,this.lastKeyboardViewportOffsetTop=i,this.syncContainerBackdrop(),this.postMessage({type:"HOLIDOIT_KEYBOARD_VISIBILITY",payload:F({visible:e,viewportOffsetTop:i},null!==n&&{viewportHeight:n})}))}},{key:"syncContainerBackdrop",value:function(){var e,t,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===(e=this.container)||void 0===e||e.style.setProperty("background",i,"important"),null===(t=this.iframe)||void 0===t||t.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(e){var t;if(e){if(this.hostCanvasStyles)return;this.hostCanvasStyles=[];for(var n=0,i=[document.documentElement,document.body];n<i.length;n++)for(var o=i[n],r=0,a=[["background-color","#fff"],["background-image","none"]];r<a.length;r++){var s=L(a[r],2),l=s[0],u=s[1],d=o.style.getPropertyValue(l),c=o.style.getPropertyPriority(l);o.style.setProperty(l,u,"important"),this.hostCanvasStyles.push({element:o,property:l,value:d,priority:c,appliedValue:o.style.getPropertyValue(l)})}}else{var h,f=V(null!==(t=this.hostCanvasStyles)&&void 0!==t?t:[]);try{for(f.s();!(h=f.n()).done;){var g=h.value,m=g.element,p=g.property,v=g.value,y=g.priority,b=g.appliedValue;m.style.getPropertyValue(p)===b&&"important"===m.style.getPropertyPriority(p)&&(v?m.style.setProperty(p,v,y):m.style.removeProperty(p))}}catch(e){f.e(e)}finally{f.f()}this.hostCanvasStyles=null}}},{key:"createContainer",value:function(){this.container=document.createElement("div"),this.container.id=d,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 e=this;this.container&&this.config&&(this.iframe=document.createElement("iframe"),this.iframe.id=u,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(){e.log("Iframe loaded, waiting for HOLIDOIT_READY from embed")})}},{key:"createFloatingButton",value:function(){var e,t,n,i,o,r,a,s,l,u,d,c,h,f,g,m,p,v,y,b,w,_,k,S,O=this;if(this.config){var M=this.config.floatingButtonOptions;this.floatingButton=document.createElement("button"),this.floatingButton.id="holidoit-floating-button";var x=window.innerWidth,L=x<775,I=this.resolveFloatingButtonResponsiveOption(null==M||null===(e=M.desktop)||void 0===e?void 0:e.width,null==M||null===(t=M.mobile)||void 0===t?void 0:t.width,L?x-34:190),E=this.resolveFloatingButtonResponsiveOption(null==M||null===(n=M.desktop)||void 0===n?void 0:n.height,null==M||null===(i=M.mobile)||void 0===i?void 0:i.height,54),D=this.resolveFloatingButtonResponsiveOption(null==M||null===(o=M.desktop)||void 0===o?void 0:o.backgroundColor,null==M||null===(r=M.mobile)||void 0===r?void 0:r.backgroundColor,"#0f172a"),T=this.resolveFloatingButtonResponsiveOption(null==M||null===(a=M.desktop)||void 0===a?void 0:a.textColor,null==M||null===(s=M.mobile)||void 0===s?void 0:s.textColor,"white"),H=this.resolveFloatingButtonResponsiveOption(null==M||null===(l=M.desktop)||void 0===l?void 0:l.borderRounding,null==M||null===(u=M.mobile)||void 0===u?void 0:u.borderRounding,30),A=this.resolveFloatingButtonResponsiveOption(null==M||null===(d=M.desktop)||void 0===d?void 0:d.fontSize,null==M||null===(c=M.mobile)||void 0===c?void 0:c.fontSize,16),B=this.resolveFloatingButtonResponsiveOption(null==M||null===(h=M.desktop)||void 0===h?void 0:h.fontWeight,null==M||null===(f=M.mobile)||void 0===f?void 0:f.fontWeight,500),C=this.resolveFloatingButtonResponsiveOption(null==M||null===(g=M.desktop)||void 0===g?void 0:g.textCase,null==M||null===(m=M.mobile)||void 0===m?void 0:m.textCase,"none"),P=this.resolveFloatingButtonResponsiveOption(null==M||null===(p=M.desktop)||void 0===p?void 0:p.bottomPosition,null==M||null===(v=M.mobile)||void 0===v?void 0:v.bottomPosition,L?22:30),$=this.resolveFloatingButtonResponsiveOption(null==M||null===(y=M.desktop)||void 0===y?void 0:y.rightPosition,null==M||null===(b=M.mobile)||void 0===b?void 0:b.rightPosition,L?17:30),U=this.resolveFloatingButtonResponsiveOption(null==M||null===(w=M.desktop)||void 0===w?void 0:w.leftPosition,null==M||null===(_=M.mobile)||void 0===_?void 0:_.leftPosition,void 0),V=this.resolveFloatingButtonResponsiveOption(null==M||null===(k=M.desktop)||void 0===k?void 0:k.topPosition,null==M||null===(S=M.mobile)||void 0===S?void 0:S.topPosition,void 0),Y=Math.min((null==M?void 0:M.zIndex)||2147483646,2147483646),j=this.config.language||R.ITALIAN,F=this.getFloatingButtonCallToAction(j),W="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",N="#0f172a"===D?"#1e293b":D;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(Y," !important;\n width: ").concat(I,"px !important;\n height: ").concat(E,"px !important;\n background: ").concat(D," !important;\n color: ").concat(T," !important;\n border: none !important;\n border-radius: ").concat(H,"px !important;\n font-size: ").concat(A,"px !important;\n font-weight: ").concat(B," !important;\n text-transform: ").concat("uppercase"===C?"uppercase":"capitalize"===C?"capitalize":"none"," !important;\n cursor: pointer !important;\n box-shadow: ").concat(W,' !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!==P?"bottom: ".concat(P,"px !important;"):"","\n ").concat(void 0!==$?"right: ".concat($,"px !important;"):"","\n ").concat(void 0!==U?"left: ".concat(U,"px !important;"):"left: auto !important;","\n ").concat(void 0!==V?"top: ".concat(V,"px !important;"):"top: auto !important;","\n "),this.floatingButton.addEventListener("mouseenter",function(){O.floatingButton&&(O.floatingButton.style.background="".concat(N," !important"),O.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(){O.floatingButton&&(O.floatingButton.style.background="".concat(D," !important"),O.floatingButton.style.boxShadow="".concat(W," !important"),O.floatingButton.style.transform="scale(1) !important")}),this.floatingButton.addEventListener("mousedown",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(0.98) !important")}),this.floatingButton.addEventListener("mouseup",function(){O.floatingButton&&(O.floatingButton.style.transform="scale(1) !important")});var z='<svg style="fill: '.concat(T,' !important;" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 448 512"><path style="fill: ').concat(T,' !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(T," !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(F,"</span>"),this.floatingButton.addEventListener("click",function(){return O.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(e){if(!e)return null;var t=e.trim().toLowerCase();if(!t)return null;if(G.includes(t))return t;var n=t.split(/[-_]/)[0];return G.includes(n)?n:null}},{key:"getDocumentLanguage",value:function(){var e;return"undefined"==typeof document?null:this.normalizeLanguage(null===(e=document.documentElement)||void 0===e?void 0:e.lang)}},{key:"syncLanguageWithDocument",value:function(){var e;if(!this.hasExplicitLanguageSelection){var t=this.getDocumentLanguage();t&&this.isLanguageSupportedByEmbed(t)&&(null===(e=this.config)||void 0===e?void 0:e.language)!==t&&(this.applyLanguage(t,{markAsExplicit:!1,syncEmbed:this.isReady}),this.log("Language set from <html lang>:",t))}}},{key:"isLanguageSupportedByEmbed",value:function(e){var t;if(!e)return!1;var n=null===(t=this.embedConfig)||void 0===t?void 0:t.languages;return Array.isArray(n)&&n.includes(e)}},{key:"observeDocumentLanguage",value:function(){var e=this;"undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&(this.htmlLangObserver&&this.htmlLangObserver.disconnect(),this.htmlLangObserver=new MutationObserver(function(t){var n,i=V(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if("attributes"===o.type&&"lang"===o.attributeName)return void e.syncLanguageWithDocument()}}catch(e){i.e(e)}finally{i.f()}}),this.htmlLangObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}))}},{key:"applyLanguage",value:function(e,t){t.markAsExplicit&&(this.hasExplicitLanguageSelection=!0),this.config&&(this.config.language=e),this.updateFloatingButtonText(e),t.syncEmbed&&this.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}})}},{key:"getFloatingButtonCallToAction",value:function(e){var t,n=null===(t=this.config)||void 0===t?void 0:t.floatingButtonOptions;return e===R.ITALIAN&&null!=n&&n.italianCallToAction?n.italianCallToAction:e===R.ENGLISH&&null!=n&&n.englishCallToAction?n.englishCallToAction:null!=n&&n.callToAction?n.callToAction:K[e]||K[R.ENGLISH]}},{key:"resolveFloatingButtonResponsiveOption",value:function(e,t,n){return window.innerWidth<775?void 0!==t?t:n:void 0!==e?e:n}},{key:"bindBookNowButtons",value:function(){var e=this,t=document.querySelectorAll(".book-now-button");if(0!==t.length){var n=0;t.forEach(function(t){var i=t,o="_holidoitClickBound";i[o]||(i[o]=!0,n++,i.addEventListener("click",function(t){var n;t.preventDefault(),t.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"))||"";e.log("Book now button clicked",{element:i.tagName,productNumber:o});var r=parseInt(o,10);setTimeout(function(){isNaN(r)?e.open():e.open({experienceId:r})},0)}))}),n>0&&this.log("Bound click handlers to ".concat(n," .book-now-button element(s)"))}}},{key:"observeForBookNowButtons",value:function(){var e=this;window._holidoitObserverActive||(window._holidoitObserverActive=!0,new MutationObserver(function(t){for(var n=!1,i=0;i<t.length;i++){var o=t[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)if(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&&(e.log("Detected dynamically added .book-now-button elements, binding..."),e.bindBookNowButtons())}).observe(document.body,{childList:!0,subtree:!0}),this.log("MutationObserver active for .book-now-button elements"))}},{key:"parseHolidoitEmbedUrl",value:function(e){try{var t=new URL(e),n=t.hostname.replace(/^www\./,"");if("holidoit.com"!==n&&"holido.it"!==n)return null;var i=t.pathname.match(/^\/embed\/web\/([^/]+)\/?$/);if(!i)return null;var o=i[1],r=t.searchParams.get("experienceId"),a=r?parseInt(r,10):void 0;return{embedId:o,experienceId:a&&!isNaN(a)?a:void 0}}catch(e){return null}}},{key:"interceptHolidoitLinks",value:function(){var e=this;document.addEventListener("click",function(t){var n,i,o,r=null===(n=t.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=e.parseHolidoitEmbedUrl(r.href);a&&a.embedId===(null===(o=e.config)||void 0===o?void 0:o.embedId)&&(t.preventDefault(),t.stopPropagation(),e.log("Intercepted holidoit embed link",a),a.experienceId?e.open({experienceId:a.experienceId}):e.open())}},!0)}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage),window.addEventListener("message",this.handleExternalMessage)}},{key:"getSenderIframe",value:function(e){if(!e)return null;for(var t=0,n=Array.from(document.querySelectorAll("iframe"));t<n.length;t++){var i=n[t];if(i.contentWindow===e)return i}return null}},{key:"isMessageFromOwnEmbedIframe",value:function(e){var t;return!(null===(t=this.iframe)||void 0===t||!t.contentWindow)&&e.source===this.iframe.contentWindow&&e.origin===this.embedOrigin}},{key:"isTrustedHolidoitOrigin",value:function(e){if(!e||"null"===e)return!1;if(e===this.embedOrigin)return!0;try{var t=new URL(e).hostname;return"localhost"===t||"127.0.0.1"===t||("holidoit.com"===t||t.endsWith(".holidoit.com")||"holido.it"===t||t.endsWith(".holido.it")||"holydoit.com"===t||t.endsWith(".holydoit.com"))}catch(e){return!1}}},{key:"extractAnalyticsPayload",value:function(e){var t=k(e);return t&&"embed"===t.source?t:(this.log("Ignoring invalid analytics message payload",e),null)}},{key:"handleAnalyticsMessage",value:function(e){var t=this.extractAnalyticsPayload(e);return!!t&&(_(t.eventData,t.dedupeKey)?(this.log("Pushed analytics event to dataLayer",t.dedupeKey,t.eventData),!0):(this.log("Ignoring duplicate analytics event",t.dedupeKey),!0))}},{key:"postMessage",value:function(e){var t;return null!==(t=this.iframe)&&void 0!==t&&t.contentWindow?this.isReady||"HOLIDOIT_INIT"===e.type?(this.log("Posting message to iframe",e),void this.iframe.contentWindow.postMessage(e,this.embedOrigin)):(this.log("Embed not ready, queueing message",e),void this.pendingMessages.push(e)):(this.log("Iframe not ready, queueing message",e),void this.pendingMessages.push(e))}},{key:"maybeSendInitMessage",value:function(){var e=this;if(this.hasReceivedEmbedReady&&this.embedConfigLoaded&&!this.isReady&&this.config){this.log("Embed and config are ready, sending HOLIDOIT_INIT");var t="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||t}}),this.isReady=!0,this.pendingMessages.forEach(function(t){return e.postMessage(t)}),this.pendingMessages=[]}}},{key:"checkPaymentRedirect",value:function(){var e=this;if(N)this.log("Payment redirect already processed, skipping");else{var t=null,n=null,i=null;if(W)t=W.paymentIntent,n=W.redirectStatus,i=W.paymentIntentClientSecret,this.log("Using captured Stripe params",W);else{var o=new URLSearchParams(window.location.search);t=o.get("payment_intent"),n=o.get("redirect_status"),i=o.get("payment_intent_client_secret")}if(t&&n){this.log("Payment redirect detected",{paymentIntent:t,redirectStatus:n}),N=!0;var r=null;try{r=localStorage.getItem(h)}catch(e){this.log("localStorage not available (incognito mode?)",e)}if(r)try{var a=JSON.parse(r);this.log("Found payment session",a),this.open();this.isReady?e.postMessage({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}):this.pendingMessages.push({type:"HOLIDOIT_PAYMENT_REDIRECT",payload:{paymentIntent:t,paymentIntentClientSecret:i||void 0,redirectStatus:n,session:a}}),this.cleanUrlParams();try{localStorage.removeItem(h)}catch(e){this.log("Failed to remove payment session from localStorage",e)}}catch(e){this.log("Failed to parse payment session",e)}else this.log("Payment redirect params found but no session - cleaning URL"),this.cleanUrlParams()}}}},{key:"cleanUrlParams",value:function(){var e=new URL(window.location.href);e.searchParams.delete("payment_intent"),e.searchParams.delete("payment_intent_client_secret"),e.searchParams.delete("redirect_status"),window.history.replaceState({},"",e.toString())}},{key:"getEmbedOrigin",value:function(e){try{return new URL(e).origin}catch(e){return window.location.origin}}},{key:"lockBodyScroll",value:function(){var e=this;if(this.scrollLockState)this.log("Scroll already locked, skipping");else{var t=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(t)?"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(t){var n,i=t.target;null!==(n=e.container)&&void 0!==n&&n.contains(i)||t.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 e=this.scrollLockState,t=e.mode,n=e.scrollTop,i=e.scrollLeft,o=e.bodyStyles,r=e.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"===t&&(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:t})}else this.log("Scroll not locked, skipping unlock")}},{key:"log",value:function(){var e,t="undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);if(null!==(e=this.config)&&void 0!==e&&e.debug||t){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))}}}]);var n,i}(),q=new J;function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var te="holidoitExperiencePageDrawerWidget",ne="holidoitWidget",ie={init:function(e){return q.init(e)},open:function(e){return q.open(e)},close:function(){return q.close()},toggle:function(e){return q.toggle(e)},changeLanguage:function(e){return q.changeLanguage(e)},destroy:function(){return q.destroy()},version:c},oe=function(){return a(function t(){var n=this;e(this,t),s(this,"config",null),s(this,"widgets",[]),s(this,"isInitialized",!1),s(this,"mutationObserver",null),s(this,"resizeObserver",null),s(this,"autoInsertedElement",null),s(this,"handleMessage",function(e){var t=e.data||{},i=t.type,o=t.height;if(i!==l)if("HOLIDOIT_WIDGET_RESIZE"!==i||"number"!=typeof o){if("HOLIDOIT_WIDGET_READY"===i){if(!n.findTrustedWidgetForEvent(e))return;n.log("Widget ready:",e.data)}}else{var r=n.findTrustedWidgetForEvent(e);if(!r)return;if(Math.abs(o-r.lastAppliedHeight)<15)return;requestAnimationFrame(function(){r.iframe.style.height="".concat(o,"px"),r.lastAppliedHeight=o,n.log("Resized widget to",o,"px")})}else n.handleAnalyticsMessage(e)})},[{key:"init",value:function(e){var t=this;if(e.embedId){if(this.isInitialized)return this.log("Already initialized, updating config"),this.config=ee(ee({},this.config),e),void this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets()});this.config=e,this.isInitialized=!0,this.log("Initializing experience page drawer loader",e),this.setupMessageListener(),this.setupResizeObserver(),this.runWhenBodyReady(function(){t.initializeHolidoit(),t.scanAndCreateWidgets(),t.observeForWidgets()})}}},{key:"runWhenBodyReady",value:function(e){document.body?e():document.addEventListener("DOMContentLoaded",function(){e()},{once:!0})}},{key:"getHolidoitApi",value:function(){if("undefined"==typeof window)return ie;var e=window.Holidoit;return null!=e&&e.init&&null!=e&&e.open?e:ie}},{key:"initializeHolidoit",value:function(){if(this.config){var e,t=this.getHolidoitApi(),n=this.config.drawerLanguage||this.config.language;if("undefined"!=typeof window&&window.Holidoit!==ie&&document.getElementById(d))this.log("Holidoit drawer already initialized on page, reusing existing instance"),n&&(null===(e=t.changeLanguage)||void 0===e||e.call(t,n));else t.init({embedId:this.config.embedId,language:n,embedUrl:this.config.embedUrl,floatingButton:!1,debug:this.config.debug})}}},{key:"setupMessageListener",value:function(){window.addEventListener("message",this.handleMessage)}},{key:"handleAnalyticsMessage",value:function(e){var t=this,n=this.findTrustedWidgetForEvent(e);!function(e){var t=e.event,n=e.isTrustedSource,i=e.widgetSrc,o=e.log;if(n){var r=k(t.data);r&&"widget"===r.source&&(_(r.eventData,r.dedupeKey)?null==o||o("Pushed analytics event to dataLayer",{dedupeKey:r.dedupeKey,widgetType:r.widgetType,src:i}):null==o||o("Skipped duplicate analytics event",r.dedupeKey))}else null==o||o("Ignored analytics message from untrusted iframe",t.origin)}({event:e,isTrustedSource:Boolean(n),widgetSrc:null==n?void 0:n.src,log:function(){return t.log.apply(t,arguments)}})}},{key:"findTrustedWidgetForEvent",value:function(e){return function(e){var t,n=e.widgets,i=e.event,o=e.getWidgetSrc,r=f(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a.iframe.contentWindow===i.source){var s=S(o(a));return s&&i.origin===s?a:null}}}catch(e){r.e(e)}finally{r.f()}return null}({widgets:this.widgets,event:e,getWidgetSrc:function(e){return e.src}})}},{key:"setupResizeObserver",value:function(){var e=this;this.resizeObserver=new ResizeObserver(function(t){var n,i=Z(t);try{for(i.s();!(n=i.n()).done;){var o,r=n.value.target,a=Z(e.widgets);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.element===r){var l;null===(l=s.iframe.contentWindow)||void 0===l||l.postMessage({type:"HOLIDOIT_REQUEST_HEIGHT"},"*");break}}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}})}},{key:"getWidgetElements",value:function(){var e=[],t=new Set;return document.querySelectorAll(".".concat(te)).forEach(function(n){var i=n;t.has(i)||(t.add(i),e.push(i))}),document.querySelectorAll(".".concat(ne)).forEach(function(n){var i=n;(i.dataset.src||"").includes("widget-experience-page-drawer.html")&&!t.has(i)&&(t.add(i),e.push(i))}),e}},{key:"ensureAutoInsertedPlaceholder",value:function(){var e,t;if(!1!==(null===(e=this.config)||void 0===e?void 0:e.autoInsertIfMissing)&&!(this.getWidgetElements().length>0||this.autoInsertedElement&&document.body.contains(this.autoInsertedElement))){var n=document.createElement("div");n.className=te;var i=null===(t=this.config)||void 0===t?void 0:t.scriptElement;null!=i&&i.parentNode&&i.parentElement!==document.head?i.parentNode.insertBefore(n,i.nextSibling):document.body.appendChild(n),this.autoInsertedElement=n,this.log("Auto-inserted .holidoitExperiencePageDrawerWidget placeholder")}}},{key:"resolveWidgetUrl",value:function(){var e,t;if(null!==(e=this.config)&&void 0!==e&&e.widgetUrl)return this.config.widgetUrl;if(null!==(t=this.config)&&void 0!==t&&t.scriptSrc)try{return new URL("./widget-experience-page-drawer.html",this.config.scriptSrc).toString()}catch(e){}return"https://cdn.holidoit.com/widgets/widget-experience-page-drawer.html"}},{key:"scanAndCreateWidgets",value:function(){this.ensureAutoInsertedPlaceholder();var e,t=Z(this.getWidgetElements());try{for(t.s();!(e=t.n()).done;){var n=e.value;"true"!==n.dataset.holidoitProcessed&&this.createWidget(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"applyWidgetParams",value:function(e,t){var n,i,o,r,a,s;null!==(n=this.config)&&void 0!==n&&n.embedId&&!e.searchParams.has("embedId")&&e.searchParams.set("embedId",this.config.embedId);var l=t.dataset.experienceId||t.dataset.productNumber,u=null!==(i=this.config)&&void 0!==i&&i.experienceId?String(this.config.experienceId):void 0,d=l||u;d&&!e.searchParams.has("experienceId")&&e.searchParams.set("experienceId",d);var c=t.dataset.language||(null===(o=this.config)||void 0===o?void 0:o.language);c&&!e.searchParams.has("lang")&&e.searchParams.set("lang",c);var h=t.dataset.showLanguagePicker,f=void 0===(null===(r=this.config)||void 0===r?void 0:r.showLanguagePicker)?void 0:String(this.config.showLanguagePicker),g=null!=h?h:f;void 0===g||e.searchParams.has("show_language_picker")||e.searchParams.set("show_language_picker",g);var m=t.dataset.withLogo,p=void 0===(null===(a=this.config)||void 0===a?void 0:a.withLogo)?void 0:String(this.config.withLogo),v=null!=m?m:p;void 0===v||e.searchParams.has("with_logo")||e.searchParams.set("with_logo",v);var y=t.dataset.gift,b=void 0===(null===(s=this.config)||void 0===s?void 0:s.gift)?void 0:String(this.config.gift),w=null!=y?y:b;void 0===w||e.searchParams.has("gift")||e.searchParams.set("gift",w)}},{key:"createWidget",value:function(e){var t,n,i=e.dataset.src;i||(i=this.resolveWidgetUrl());try{n=new URL(M(i),window.location.href)}catch(e){return}this.applyWidgetParams(n,e);var o=document.createElement("iframe");o.className="holidoit-experience-page-drawer-iframe",o.src=n.toString(),o.allow="payment",o.setAttribute("scrolling","auto"),o.setAttribute("frameborder","0"),o.style.cssText="\n width: 100% !important;\n min-height: ".concat(600,"px !important;\n border: none !important;\n display: block !important;\n "),o.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"),e.innerHTML="",e.appendChild(o),e.dataset.holidoitProcessed="true";var r={element:e,iframe:o,src:n.toString(),lastAppliedHeight:600};this.widgets.push(r),null===(t=this.resizeObserver)||void 0===t||t.observe(e),this.log("Created experience page drawer widget",r)}},{key:"observeForWidgets",value:function(){var e=this;this.mutationObserver||(this.mutationObserver=new MutationObserver(function(t){var n,i=!1,o=Z(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if("childList"===r.type){for(var a=0,s=Array.from(r.addedNodes);a<s.length;a++){var l,u,d,c,h=s[a];if(h instanceof HTMLElement&&(null!==(l=h.classList)&&void 0!==l&&l.contains(te)||null!==(u=h.querySelector)&&void 0!==u&&u.call(h,".".concat(te))||null!==(d=h.matches)&&void 0!==d&&d.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]'))||null!==(c=h.querySelector)&&void 0!==c&&c.call(h,".".concat(ne,'[data-src*="widget-experience-page-drawer.html"]')))){i=!0;break}}if(i)break}}}catch(e){o.e(e)}finally{o.f()}i&&(e.log("Detected new experience page drawer widget elements, scanning..."),e.scanAndCreateWidgets())}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}},{key:"changeLanguage",value:function(e){var t;this.config&&(this.config.language=e,this.config.drawerLanguage=e);var n=this.getHolidoitApi();null===(t=n.changeLanguage)||void 0===t||t.call(n,e);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r;null===(r=i.value.iframe.contentWindow)||void 0===r||r.postMessage({type:"HOLIDOIT_CHANGE_LANGUAGE",payload:{language:e}},"*")}}catch(e){o.e(e)}finally{o.f()}}},{key:"destroy",value:function(){var e,t,n;this.log("Destroying experience page drawer widgets"),window.removeEventListener("message",this.handleMessage);var i,o=Z(this.widgets);try{for(o.s();!(i=o.n()).done;){var r=i.value;r.iframe.remove(),r.element.dataset.holidoitProcessed="false"}}catch(e){o.e(e)}finally{o.f()}this.widgets=[],null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=null,this.isInitialized=!1,this.config=null,null!==(n=this.autoInsertedElement)&&void 0!==n&&n.parentNode&&this.autoInsertedElement.parentNode.removeChild(this.autoInsertedElement),this.autoInsertedElement=null}},{key:"log",value:function(){var e;if(null!==(e=this.config)&&void 0!==e&&e.debug){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];(t=console).log.apply(t,["[HolidoitExperiencePageDrawer]"].concat(i))}}}])}(),re=new oe;if("undefined"!=typeof window){window.Holidoit||(window.Holidoit=ie);var ae=document.currentScript;if(ae){var se=new URL(ae.src,window.location.href),le=se.searchParams.get("embedId")||ae.dataset.embedId;if(le){var ue=se.searchParams.get("lang")||ae.dataset.language,de=se.searchParams.get("drawerLang")||ae.dataset.drawerLang||ae.dataset.drawerLanguage||ue,ce=se.searchParams.get("experienceId")||se.searchParams.get("productNumber")||ae.dataset.experienceId||ae.dataset.productNumber,he=parseInt(ce||"",10),fe=se.searchParams.get("show_language_picker")||se.searchParams.get("showLanguagePicker")||ae.dataset.showLanguagePicker,ge=null==fe?void 0:"false"!==fe,me=se.searchParams.get("with_logo")||se.searchParams.get("withLogo")||ae.dataset.withLogo,pe=null==me?void 0:"true"===me,ve=se.searchParams.get("gift")||ae.dataset.gift,ye=null==ve?void 0:"true"===ve;re.init({embedId:le,language:ue,drawerLanguage:de,experienceId:Number.isNaN(he)?void 0:he,embedUrl:se.searchParams.get("embedUrl")||ae.dataset.embedUrl||void 0,widgetUrl:se.searchParams.get("widgetUrl")||ae.dataset.widgetUrl||void 0,showLanguagePicker:ge,withLogo:pe,gift:ye,debug:"true"===se.searchParams.get("debug")||"true"===ae.dataset.debug,autoInsertIfMissing:"false"!==(se.searchParams.get("autoInsertIfMissing")||ae.dataset.autoInsertIfMissing),scriptSrc:ae.src,scriptElement:ae})}}window.HolidoitExperiencePageDrawer=re}})(),i})());
|