1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunks/NotificationPopup-C_1tNOFE.js","chunks/rolldown-runtime-1Lrmk_5_.js","chunks/react-C0UXURGA.js","chunks/newsletter-modal-aGFCO7F9.js","chunks/webmcp-CYTq0HEC.js","chunks/should-load-Cr9fYX8m.js"])))=>i.map(i=>d[i]); 2import{a as t,t as e}from"./chunks/rolldown-runtime-1Lrmk_5_.js";import{i as o,n as a,r as n,t as i}from"./chunks/vendor-DhdCyoDk.js";import{t as r}from"./chunks/clipboard-CSVALDaZ.js";import{t as s}from"./chunks/newsletter-modal-aGFCO7F9.js";import{i as c,n as l}from"./chunks/react-C0UXURGA.js";import{n as d,t as u}from"./chunks/utils-C--hp92G.js";import{n as h}from"./chunks/should-load-Cr9fYX8m.js";var p=t(o(),1);function m(t){if(!t.parentElement?.classList.contains("table-responsive")){const e=document.createElement("div");e.className="table-responsive",t.parentNode?.insertBefore(e,t),e.appendChild(t)}return t}function f(t,e=!1){return e&&t.classList.add("table"),t.classList.add("table-borderless")}function v(t,e){const o=t.querySelectorAll("th"),a=[{className:"highlight-value",text:e.value},{className:"highlight-flexibility",text:e.flexibility}];o.forEach((e,o)=>{const n=a.find(t=>e.classList.contains(t.className));if(n){let o=document.getElementById(n.className);o||(o=function(t=""){const e=document.createElement("div");return e.innerHTML=`\n <div class="highlight-header">\n ${t}\n </div>\n <div class="highlight-column"></div>\n `,e}(n.text)),o.id=n.className,o.style.width=`${e.offsetWidth}px`,o.style.height=t.offsetHeight+75-5+"px",o.style.left=`${e.offsetLeft}px`,t.parentNode.insertBefore(o,t)}})}p.default.fn.isOnScreen=function(t=!1,e=""){var o=(0,p.default)(this).first()[0].getBoundingClientRect(),a=(0,p.default)(window).height(),n=(0,p.default)(window).width(),i=o.top>=0&&o.top<=a,r=o.bottom>=0&&o.bottom<=a,s=o.left>=0&&o.left<=n,c=o.right>=0&&o.right<=n,l=o.left<=0&&o.right>=n,d=o.top<=0&&o.bottom>=a,u="horizontal"==e?s||c||l:i,h="horizontal"==e?s||c||l:r,m="vertical"==e?i||r||d:s,f="vertical"==e?i||r||d:c;return t?u||h||m||f:u&&h&&m&&f},p.default.expr.filters.onscreen=function(t){return(0,p.default)(t).isOnScreen(!0)},p.default.expr.filters.entireonscreen=function(t){return(0,p.default)(t).isOnScreen(!0)},function(t,e){t(function(){const o=t(".vo-comparison"),a=t(".vo-comparison table"),n=nymgData.yesText,i=nymgData.noText;if(o.length){let r=2;if(a.length){let t={value:nymgData.highlightValue,flexibility:nymgData.highlightFlexibility};a.each(function(){v(this,t),e.onresize=()=>{v(this,t)}})}if(t("tr.compare-row").each(function(){const e=t(this),a=e.children(),n=a.first();if(n.html().length&&(r=parseInt(a.length),r<2&&(r=2),!o.hasClass("vo-comparison-selector"))){const o=t("<tr></tr>");t("<td></td>").appendTo(o),t("<td></td>").attr({colspan:r-1}).html(n.html()).appendTo(o),e.before(o)}}),o.hasClass("vo-comparison-selector")||o.find(t("th")).css({maxWidth:(100/(r-1)).toString()+"%"}),t("span.no, span.yes").each(function(){const e=t(this);let o=i;"yes"===t(this).attr("class")&&(o=n),t("<span></span>").attr({class:"visually-hidden"}).text(o).appendTo(e),t(this).html(e.html())}),o.hasClass("vo-comparison-selector")){const e=t(".vo-comparison-selector"),o=e.find(".vo-comparison-passes > div"),a="vo-comparison-selector-flipped",n="pass-active",i="red-highlight",r="blue-highlight";let s=i;const c="red-linked",l="blue-linked";let d,u,h,p=c,m=4;e.find(".mobile-row").css("display",""),o.on("click",function(){if(t(this).hasClass(i)||t(this).hasClass(r))return;let o=t(this).children().data("column");o+=1,s===i?d=o:m=o,t(e).removeClass(a),d>m&&t(e).addClass(a),u=".vo-comparison-selector tr th:nth-child("+o+")",h=".vo-comparison-selector tr td:nth-child("+o+")",t(".vo-comparison-passes div").removeClass(s),t(this).addClass(s),t("."+p).removeClass(p).removeClass(n).removeClass(s),t(u).addClass(n).addClass(s).addClass(p),t(h).addClass(n).addClass(p),s===i?(s=r,p=l):(m=o,s=i,p=c)}),o.keypress(function(t){13===t.which&&o.click()})}}})}(jQuery,window,document);i();var g=class t extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.isPlaylistThumbnailLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>t.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(t){this.setAttribute("videoplay",t)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get autoPause(){return this.hasAttribute("autopause")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(t){this.setAttribute("params",t)}set posterQuality(t){this.setAttribute("posterquality",t)}get disableNoscript(){return this.hasAttribute("disablenoscript")}setupDom(){const t=this.attachShadow({mode:"open"});let e="";window.liteYouTubeNonce&&(e=`nonce="${window.liteYouTubeNonce}"`),t.innerHTML=`\n <style ${e}>\n :host {\n --aspect-ratio: var(--lite-youtube-aspect-ratio, 16 / 9);\n --aspect-ratio-short: var(--lite-youtube-aspect-ratio-short, 9 / 16);\n --frame-shadow-visible: var(--lite-youtube-frame-shadow-visible, yes);\n contain: content;\n display: block;\n position: relative;\n width: 100%;\n aspect-ratio: var(--aspect-ratio);\n }\n\n @media (max-width: 40em) {\n :host([short]) {\n aspect-ratio: var(--aspect-ratio-short);\n }\n }\n\n #frame, #fallbackPlaceholder, iframe {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n }\n\n #frame {\n cursor: pointer;\n }\n\n #fallbackPlaceholder, slot[name=image]::slotted(*) {\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n\n @container style(--frame-shadow-visible: yes) {\n #frame::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n background-image: linear-gradient(180deg, #111 -20%, transparent 90%);\n height: 60px;\n width: 100%;\n z-index: 1;\n }\n }\n\n #playButton {\n width: 68px;\n height: 48px;\n background-color: transparent;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');\n z-index: 1;\n border: 0;\n border-radius: inherit;\n }\n\n #playButton:before {\n content: '';\n border-style: solid;\n border-width: 11px 0 11px 19px;\n border-color: transparent transparent transparent #fff;\n }\n\n #playButton,\n #playButton:before {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate3d(-50%, -50%, 0);\n cursor: inherit;\n }\n\n /* Post-click styles */\n .activated {\n cursor: unset;\n }\n\n #frame.activated::before,\n #frame.activated > #playButton {\n display: none;\n }\n </style>\n <div id="frame">\n <picture>\n <slot name="image">\n <source id="webpPlaceholder" type="image/webp">\n <source id="jpegPlaceholder" type="image/jpeg">\n <img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">\n </slot>\n </picture>\n <button id="playButton" part="playButton"></button>\n </div>\n `,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){0===this.shadowRoot.querySelector("slot[name=image]").assignedNodes().length&&this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort()||this.autoPause)&&this.initIntersectionObserver(),this.disableNoscript||this.injectSearchNoScript()}attributeChangedCallback(t,e,o){e!==o&&("playlistid"===t&&null!==e&&e!==o&&(this.isPlaylistThumbnailLoaded=!1),this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}injectSearchNoScript(){const t=document.createElement("noscript");this.prepend(t),t.innerHTML=this.generateIframe()}generateIframe(t=!1){let e=t?0:1,o=this.autoPause?"&enablejsapi=1":"";const a=this.noCookie?"-nocookie":"";let n;return n=this.playlistId?`?listType=playlist&list=${this.playlistId}&`:`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,e=1),`\n<iframe credentialless frameborder="0" title="${this.videoTitle}
2"\n referrerpolicy="strict-origin-when-cross-origin"\n allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen\n src="https://www.youtube${a}.com/embed/${n}autoplay=${e}${o}&${this.params}"\n></iframe>`}addIframe(t=!1){if(!this.isIframeLoaded){const e=this.generateIframe(t);this.domRefFrame.insertAdjacentHTML("beforeend",e),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){this.playlistId&&!this.videoId?this.loadPlaylistThumbnail():this.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg?.fallback?.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async loadPlaylistThumbnail(){if(!this.isPlaylistThumbnailLoaded){this.isPlaylistThumbnailLoaded=!0;try{const t=`https://www.youtube.com/oembed?url=https://www.youtube.com/playlist?list=${this.playlistId}&format=json`,e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch playlist thumbnail: ${e.status}`);const o=await e.json();if(o.thumbnail_url){const t=o.thumbnail_url,e=t.match(/\/vi\/([^\/]+)\//);if(e){const t=e[1];this.loadThumbnailImages(t)}else this.domRefImg.fallback.src=t,this.domRefImg.fallback.loading=this.posterLoading}}catch(t){}}}loadThumbnailImages(t){const e=`https://i.ytimg.com/vi_webp/${t}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=e;const o=`https://i.ytimg.com/vi/${t}/${this.posterQuality}.jpg`;this.domRefImg.jpeg.srcset=o,this.domRefImg.fallback.src=o,this.domRefImg.fallback.loading=this.posterLoading}async testPosterImage(){setTimeout(()=>{const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,e=new Image;e.fetchPriority="low",e.referrerPolicy="origin",e.src=t,e.onload=async t=>{const e=t.target;90==e?.naturalHeight&&120==e?.naturalWidth&&(this.posterQuality="hqdefault"),this.loadThumbnailImages(this.videoId)}},100)}initIntersectionObserver(){new IntersectionObserver((e,o)=>{e.forEach(e=>{e.isIntersecting&&!this.isIframeLoaded&&(t.warmConnections(this),this.addIframe(!0),o.unobserve(this))})},{root:null,rootMargin:"0px",threshold:0}).observe(this),this.autoPause&&new IntersectionObserver((t,e)=>{t.forEach(t=>{1!==t.intersectionRatio&&this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return""===this.getAttribute("short")&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,e){const o=document.createElement("link");o.rel=t,o.href=e,o.crossOrigin="true",document.head.append(o)}static warmConnections(e){t.isPreconnected||window.liteYouTubeIsPreconnected||(t.addPrefetch("preconnect","https://i.ytimg.com/"),t.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?t.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(t.addPrefetch("preconnect","https://www.youtube.com"),t.addPrefetch("preconnect","https://www.google.com"),t.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),t.addPrefetch("preconnect","https://static.doubleclick.net")),t.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}};g.isPreconnected=!1,customElements.define("lite-youtube",g);var k,y,C,b,_=e((t,e)=>{e.exports=function(t){var e=t("html"),o=t(window),a=t(document),n=t.fancybox=function(){n.open.apply(this,arguments)},i=navigator.userAgent.match(/msie/i),r=null,s=void 0!==document.createTouch,c=function(e){return e&&e.hasOwnProperty&&e instanceof t},l=function(e){return e&&"string"===t.type(e)},d=function(t){return l(t)&&t.indexOf("%")>0},u=function(t){return t&&!(t.style.overflow&&"hidden"===t.style.overflow)&&(t.clientWidth&&t.scrollWidth>t.clientWidth||t.clientHeight&&t.scrollHeight>t.clientHeight)},h=function(t,e){var o=parseInt(t,10)||0;return e&&d(t)&&(o=n.getViewport()[e]/100*o),Math.ceil(o)},p=function(t,e){return h(t,e)+"px"};t.extend(n,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(i?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',loading:'<div id="fancybox-loading"><div></div></div>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:t.noop,beforeLoad:t.noop,afterLoad:t.noop,beforeShow:t.noop,afterShow:t.noop,beforeChange:t.noop,beforeClose:t.noop,afterClose:t.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,
vendor: 9,252 bytes, line 2
2skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(e,o){if(e&&(t.isPlainObject(o)||(o={}),!1!==n.close(!0)))return t.isArray(e)||(e=c(e)?t(e).get():[e]),t.each(e,function(a,i){var r,s,d,u,h,p,m,f={};"object"===t.type(i)&&(i.nodeType&&(i=t(i)),c(i)?(f={href:i.data("fancybox-href")||i.attr("href"),title:t("<div/>").text(i.data("fancybox-title")||i.attr("title")||"").html(),isDom:!0,element:i},t.metadata&&t.extend(!0,f,i.metadata())):f=i),r=o.href||f.href||(l(i)?i:null),s=void 0!==o.title?o.title:f.title||"",!(u=(d=o.content||f.content)?"html":o.type||f.type)&&f.isDom&&((u=i.data("fancybox-type"))||(u=(h=i.prop("class").match(/fancybox\.(\w+)/))?h[1]:null)),l(r)&&(u||(n.isImage(r)?u="image":n.isSWF(r)?u="swf":"#"===r.charAt(0)?u="inline":l(i)&&(u="html",d=i)),"ajax"===u&&(p=r.split(/\s+/,2),r=p.shift(),m=p.shift())),d||("inline"===u?r?d=t(l(r)?r.replace(/.*(?=#[^\s]+$)/,""):r):f.isDom&&(d=i):"html"===u?d=r:u||r||!f.isDom||(u="inline",d=i)),t.extend(f,{href:r,type:u,content:d,title:s,selector:m}),e[a]=f}),n.opts=t.extend(!0,{},n.defaults,o),void 0!==o.keys&&(n.opts.keys=!!o.keys&&t.extend({},n.defaults.keys,o.keys)),n.group=e,n._start(n.opts.index)},cancel:function(){var t=n.coming;t&&!1===n.trigger("onCancel")||(n.hideLoading(),t&&(n.ajaxLoad&&n.ajaxLoad.abort(),n.ajaxLoad=null,n.imgPreload&&(n.imgPreload.onload=n.imgPreload.onerror=null),t.wrap&&t.wrap.stop(!0,!0).trigger("onReset").remove(),n.coming=null,n.current||n._afterZoomOut(t)))},close:function(e){n.cancel(),!1!==n.trigger("beforeClose")&&(n.unbindEvents(),n.isActive&&(n.isOpen&&!0!==e?(n.isOpen=n.isOpened=!1,n.isClosing=!0,t(".fancybox-item, .fancybox-nav").remove(),n.wrap.stop(!0,!0).removeClass("fancybox-opened"),n.transitions[n.current.closeMethod]()):(t(".fancybox-wrap").stop(!0).trigger("onReset").remove(),n._afterZoomOut())))},play:function(t){var e=function(){clearTimeout(n.player.timer)},o=function(){e(),n.current&&n.player.isActive&&(n.player.timer=setTimeout(n.next,n.current.playSpeed))},i=function(){e(),a.unbind(".player"),n.player.isActive=!1,n.trigger("onPlayEnd")};!0===t||!n.player.isActive&&!1!==t?n.current&&(n.current.loop||n.current.index<n.group.length-1)&&(n.player.isActive=!0,a.bind({"onCancel.player beforeClose.player":i,"onUpdate.player":o,"beforeLoad.player":e}),o(),n.trigger("onPlayStart")):i()},next:function(t){var e=n.current;e&&(l(t)||(t=e.direction.next),n.jumpto(e.index+1,t,"next"))},prev:function(t){var e=n.current;e&&(l(t)||(t=e.direction.prev),n.jumpto(e.index-1,t,"prev"))},jumpto:function(t,e,o){var a=n.current;a&&(t=h(t),n.direction=e||a.direction[t>=a.index?"next":"prev"],n.router=o||"jumpto",a.loop&&(t<0&&(t=a.group.length+t%a.group.length),t%=a.group.length),void 0!==a.group[t]&&(n.cancel(),n._start(t)))},reposition:function(e,o){var a,i=n.current,r=i?i.wrap:null;r&&(a=n._getPosition(o),e&&"scroll"===e.type?(delete a.position,r.stop(!0,!0).animate(a,200)):(r.css(a),i.pos=t.extend({},i.dim,a)))},update:function(t){var e=t&&t.originalEvent&&t.originalEvent.type,o=!e||"orientationchange"===e;o&&(clearTimeout(r),r=null),n.isOpen&&!r&&(r=setTimeout(function(){var a=n.current;a&&!n.isClosing&&(n.wrap.removeClass("fancybox-tmp"),(o||"load"===e||"resize"===e&&a.autoResize)&&n._setDimension(),"scroll"===e&&a.canShrink||n.reposition(t),n.trigger("onUpdate"),r=null)},o&&!s?0:300))},toggle:function(e){n.isOpen&&(n.current.fitToView="boolean"===t.type(e)?e:!n.current.fitToView,s&&(n.wrap.removeAttr("style").addClass("fancybox-tmp"),n.trigger("onUpdate")),n.update())},hideLoading:function(){a.unbind(".loading"),t("#fancybox-loading").remove()},showLoading:function(){var e,o;n.hideLoading(),e=t(n.opts.tpl.loading).click(n.cancel).appendTo("body"),a.bind("keydown.loading",function(t){27===(t.which||t.keyCode)&&(t.preventDefault(),n.cancel())}),n.defaults.fixed||(o=n.getViewport(),e.css({position:"absolute",top:.5*o.h+o.y,left:.5*o.w+o.x})),n.trigger("onLoading")},getViewport:function(){var t=n.current&&n.current.locked||!1,e={x:o.scrollLeft(),y:o.scrollTop()};return t&&t.length?(e.w=t[0].clientWidth,e.h=t[0].clientHeight):(e.w=s&&window.innerWidth?window.innerWidth:o.width(),e.h=s&&window.innerHeight?window.innerHeight:o.height()),e},unbindEvents:function(){n.wrap&&c(n.wrap)&&n.wrap.unbind(".fb"),a.unbind(".fb"),o.unbind(".fb")},bindEvents:function(){var e,i=n.current;i&&(o.bind("orientationchange.fb"+(s?"":" resize.fb")+(i.autoCenter&&!i.locked?" scroll.fb":""),n.update),(e=i.keys)&&a.bind("keydown.fb",function(o){var a=o.which||o.keyCode,r=o.target||o.srcElement;if(27===a&&n.coming)return!1;o.ctrlKey||o.altKey||o.shiftKey||o.metaKey||r&&(r.type||t(r).is("[contenteditable]"))||t.each(e,function(e,r){return i.group.length>1&&void 0!==r[a]?(n[e](r[a]),o.preventDefault(),!1):t.inArray(a,r)>-1?(n[e](),o.preventDefault(),!1):void 0})}),t.fn.mousewheel&&i.mouseWheel&&n.wrap.bind("mousewheel.fb",function(e,o,a,r){for(var s=t(e.target||null),c=!1;s.length&&!(c||s.is(".fancybox-skin")||s.is(".fancybox-wrap"));)c=u(s[0]),s=t(s).parent();0===o||c||n.group.length>1&&!i.canShrink&&(r>0||a>0?n.prev(r>0?"down":"left"):(r<0||a<0)&&n.next(r<0?"up":"right"),e.preventDefault())}))},trigger:function(e,o){var i,r=o||n.coming||n.current;if(r){if(t.isFunction(r[e])&&(i=r[e].apply(r,Array.prototype.slice.call(arguments,1))),!1===i)return!1;r.helpers&&t.each(r.helpers,function(o,a){a&&n.helpers[o]&&t.isFunction(n.helpers[o][e])&&n.helpers[o][e](t.extend(!0,{},n.helpers[o].defaults,a),r)})}a.trigger(e)},isImage:function(t){return l(t)&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(t){return l(t)&&t.match(/\.(swf)((\?|#).*)?$/i)},_start:function(e){var o,a,i,r,c,l={};if(e=h(e),!(o=n.group[e]||null))return!1;if(r=(l=t.extend(!0,{},n.opts,o)).margin,c=l.padding,"number"===t.type(r)&&(l.margin=[r,r,r,r]),"number"===t.type(c)&&(l.padding=[c,c,c,c]),l.modal&&t.extend(!0,l,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),l.autoSize&&(l.autoWidth=l.autoHeight=!0),"auto"===l.width&&(l.autoWidth=!0),"auto"===l.height&&(l.autoHeight=!0),l.group=n.group,l.index=e,n.coming=l,!1!==n.trigger("beforeLoad")){if(i=l.type,a=l.href,!i)return n.coming=null,!(!n.current||!n.router||"jumpto"===n.router)&&(n.current.index=e,n[n.router](n.direction));if(n.isActive=!0,"image"!==i&&"swf"!==i||(l.autoHeight=l.autoWidth=!1,l.scrolling="visible"),"image"===i&&(l.aspectRatio=!0),"iframe"===i&&s&&(l.scrolling="scroll"),l.wrap=t(l.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+i+" fancybox-tmp "+l.wrapCSS).appendTo(l.parent||"body"),t.extend(l,{skin:t(".fancybox-skin",l.wrap),outer:t(".fancybox-outer",l.wrap),inner:t(".fancybox-inner",l.wrap)}),t.each(["Top","Right","Bottom","Left"],function(t,e){l.skin.css("padding"+e,p(l.padding[t]))}),n.trigger("onReady"),"inline"===i||"html"===i){if(!l.content||!l.content.length)return n._error("content")}else if(!a)return n._error("href");"image"===i?n._loadImage():"ajax"===i?n._loadAjax():"iframe"===i?n._loadIframe():n._afterLoad()}else n.coming=null},_error:function(e){t.extend(n.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:e,content:n.coming.tpl.error}),n._afterLoad()},_loadImage:function(){var t=n.imgPreload=new Image;t.onload=function(){this.onload=this.onerror=null,n.coming.width=this.width/n.opts.pixelRatio,n.coming.height=this.height/n.opts.pixelRatio,n._afterLoad()},t.onerror=function(){this.onload=this.onerror=null,n._error("image")},t.src=n.coming.href,!0!==t.complete&&n.showLoading()},_loadAjax:function(){var e=n.coming;n.showLoading(),n.ajaxLoad=t.ajax(t.extend({},e.ajax,{url:e.href,error:function(t,e){n.coming&&"abort"!==e?n._error("ajax",t):n.hideLoading()},success:function(t,o){"success"===o&&(e.content=t,n._afterLoad())}}))},_loadIframe:function(){var e=n.coming,o=t(e.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":e.iframe.scrolling).attr("src",e.href);t(e.wrap).bind("onReset",function(){try{t(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(y){}}),e.iframe.preload&&(n.showLoading(),o.one("load",function(){t(this).data("ready",1),s||t(this).bind("load.fb",n.update),t(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(),n._afterLoad()})),e.content=o.appendTo(e.inner),e.iframe.preload||n._afterLoad()},_preloadImages:function(){var t,e,o=n.group,a=n.current,i=o.length,r=a.preload?Math.min(a.preload,i-1):0;for(e=1;e<=r;e+=1)"image"===(t=o[(a.index+e)%i]).type&&t.href&&((new Image).src=t.href)},_afterLoad:function(){var e,o,a,i,r,s,l=n.coming,d=n.current,u="fancybox-placeholder";if(n.hideLoading(),l&&!1!==n.isActive){if(!1===n.trigger("afterLoad",l,d))return l.wrap.stop(!0).trigger("onReset").remove(),void(n.coming=null);switch(d&&(n.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()),n.unbindEvents(),e=l,o=l.content,a=l.type,i=l.scrolling,t.extend(n,{wrap:e.wrap,skin:e.skin,outer:e.outer,inner:e.inner,current:e,previous:d}),r=e.href,a){case"inline":case"ajax":case"html":e.selector?o=t("<
2div>").html(o).find(e.selector):c(o)&&(o.data(u)||o.data(u,t('<div class="'+u+'"></div>').insertAfter(o).hide()),o=o.show().detach(),e.wrap.bind("onReset",function(){t(this).find(o).length&&o.hide().replaceAll(o.data(u)).data(u,!1)}));break;case"image":o=e.tpl.image.replace(/\{href\}/g,r);break;case"swf":o='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+r+'"></param>',s="",t.each(e.swf,function(t,e){o+='<param name="'+t+'" value="'+e+'"></param>',s+=" "+t+'="'+e+'"'}),o+='<embed src="'+r+'" type="application/x-shockwave-flash" width="100%" height="100%"'+s+"></embed></object>"}c(o)&&o.parent().is(e.inner)||e.inner.append(o),n.trigger("beforeShow"),e.inner.css("overflow","yes"===i?"scroll":"no"===i?"hidden":i),n._setDimension(),n.reposition(),n.isOpen=!1,n.coming=null,n.bindEvents(),n.isOpened?d.prevMethod&&n.transitions[d.prevMethod]():t(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),n.transitions[n.isOpened?e.nextMethod:e.openMethod](),n._preloadImages()}},_setDimension:function(){var e,o,a,i,r,s,c,l,u,m,f,v,g,k,C,b,_,w=n.getViewport(),x=0,S=n.wrap,P=n.skin,I=n.inner,T=n.current,D=T.width,M=T.height,j=T.minWidth,E=T.minHeight,F=T.maxWidth,A=T.maxHeight,L=T.scrolling,O=T.scrollOutside?T.scrollbarWidth:0,B=T.margin,N=h(B[1]+B[3]),H=h(B[0]+B[2]);if(S.add(P).add(I).width("auto").height("auto").removeClass("fancybox-tmp"),r=N+(a=h(P.outerWidth(!0)-P.width())),s=H+(i=h(P.outerHeight(!0)-P.height())),c=d(D)?(w.w-r)*h(D)/100:D,l=d(M)?(w.h-s)*h(M)/100:M,"iframe"===T.type){if(b=T.content,T.autoHeight&&1===b.data("ready"))try{b[0].contentWindow.document.location&&(I.width(c).height(9999),_=b.contents().find("body"),O&&_.css("overflow-x","hidden"),l=_.outerHeight(!0))}catch(y){}}else(T.autoWidth||T.autoHeight)&&(I.addClass("fancybox-tmp"),T.autoWidth||I.width(c),T.autoHeight||I.height(l),T.autoWidth&&(c=I.width()),T.autoHeight&&(l=I.height()),I.removeClass("fancybox-tmp"));if(D=h(c),M=h(l),f=c/l,j=h(d(j)?h(j,"w")-r:j),F=h(d(F)?h(F,"w")-r:F),E=h(d(E)?h(E,"h")-s:E),u=F,m=A=h(d(A)?h(A,"h")-s:A),T.fitToView&&(F=Math.min(w.w-r,F),A=Math.min(w.h-s,A)),k=w.w-N,C=w.h-H,T.aspectRatio?(D>F&&(M=h((D=F)/f)),M>A&&(D=h((M=A)*f)),D<j&&(M=h((D=j)/f)),M<E&&(D=h((M=E)*f))):(D=Math.max(j,Math.min(D,F)),T.autoHeight&&"iframe"!==T.type&&(I.width(D),M=I.height()),M=Math.max(E,Math.min(M,A))),T.fitToView)if(I.width(D).height(M),S.width(D+a),v=S.width(),g=S.height(),T.aspectRatio)for(;(v>k||g>C)&&D>j&&M>E&&!(x++>19);)M=Math.max(E,Math.min(A,M-10)),(D=h(M*f))<j&&(M=h((D=j)/f)),D>F&&(M=h((D=F)/f)),I.width(D).height(M),S.width(D+a),v=S.width(),g=S.height();else D=Math.max(j,Math.min(D,D-(v-k))),M=Math.max(E,Math.min(M,M-(g-C)));O&&"auto"===L&&M<l&&D+a+O<k&&(D+=O),I.width(D).height(M),S.width(D+a),v=S.width(),g=S.height(),e=(v>k||g>C)&&D>j&&M>E,o=T.aspectRatio?D<u&&M<m&&D<c&&M<l:(D<u||M<m)&&(D<c||M<l),t.extend(T,{dim:{width:p(v),height:p(g)},origWidth:c,origHeight:l,canShrink:e,canExpand:o,wPadding:a,hPadding:i,wrapSpace:g-P.outerHeight(!0),skinSpace:P.height()-M}),!b&&T.autoHeight&&M>E&&M<A&&!o&&I.height("auto")},_getPosition:function(t){var e=n.current,o=n.getViewport(),a=e.margin,i=n.wrap.width()+a[1]+a[3],r=n.wrap.height()+a[0]+a[2],s={position:"absolute",top:a[0],left:a[3]};return e.autoCenter&&e.fixed&&!t&&r<=o.h&&i<=o.w?s.position="fixed":e.locked||(s.top+=o.y,s.left+=o.x),s.top=p(Math.max(s.top,s.top+(o.h-r)*e.topRatio)),s.left=p(Math.max(s.left,s.left+(o.w-i)*e.leftRatio)),s},_afterZoomIn:function(){var e=n.current;e&&(n.isOpen=n.isOpened=!0,n.wrap.css("overflow","visible").addClass("fancybox-opened").hide().show(0),n.update(),(e.closeClick||e.nextClick&&n.group.length>1)&&n.inner.css("cursor","pointer").bind("click.fb",function(o){t(o.target).is("a")||t(o.target).parent().is("a")||(o.preventDefault(),n[e.closeClick?"close":"next"]())}),e.closeBtn&&t(e.tpl.closeBtn).appendTo(n.skin).bind("click.fb",function(t){t.preventDefault(),n.close()}),e.arrows&&n.group.length>1&&((e.loop||e.index>0)&&t(e.tpl.prev).appendTo(n.outer).bind("click.fb",n.prev),(e.loop||e.index<n.group.length-1)&&t(e.tpl.next).appendTo(n.outer).bind("click.fb",n.next)),n.trigger("afterShow"),e.loop||e.index!==e.group.length-1?n.opts.autoPlay&&!n.player.isActive&&(n.opts.autoPlay=!1,n.play(!0)):n.play(!1))},_afterZoomOut:function(e){e=e||n.current,t(".fancybox-wrap").trigger("onReset").remove(),t.extend(n,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,
vendor: 4,228 bytes, line 2
2skin:null,outer:null,inner:null}),n.trigger("afterClose",e)}}),n.transitions={getOrigPosition:function(){var t=n.current,e=t.element,o=t.orig,a={},i=50,r=50,s=t.hPadding,l=t.wPadding,d=n.getViewport();return!o&&t.isDom&&e.is(":visible")&&((o=e.find("img:first")).length||(o=e)),c(o)?(a=o.offset(),o.is("img")&&(i=o.outerWidth(),r=o.outerHeight())):(a.top=d.y+(d.h-r)*t.topRatio,a.left=d.x+(d.w-i)*t.leftRatio),("fixed"===n.wrap.css("position")||t.locked)&&(a.top-=d.y,a.left-=d.x),a={top:p(a.top-s*t.topRatio),left:p(a.left-l*t.leftRatio),width:p(i+l),height:p(r+s)}},step:function(t,e){var o,a,i=e.prop,r=n.current,s=r.wrapSpace,c=r.skinSpace;"width"!==i&&"height"!==i||(o=e.end===e.start?1:(t-e.start)/(e.end-e.start),n.isClosing&&(o=1-o),a=t-("width"===i?r.wPadding:r.hPadding),n.skin[i](h("width"===i?a:a-s*o)),n.inner[i](h("width"===i?a:a-s*o-c*o)))},zoomIn:function(){var e=n.current,o=e.pos,a=e.openEffect,i="elastic"===a,r=t.extend({opacity:1},o);delete r.position,i?(o=this.getOrigPosition(),e.openOpacity&&(o.opacity=.1)):"fade"===a&&(o.opacity=.1),n.wrap.css(o).animate(r,{duration:"none"===a?0:e.openSpeed,easing:e.openEasing,step:i?this.step:null,complete:n._afterZoomIn})},zoomOut:function(){var t=n.current,e=t.closeEffect,o="elastic"===e,a={opacity:.1};o&&(a=this.getOrigPosition(),t.closeOpacity&&(a.opacity=.1)),n.wrap.animate(a,{duration:"none"===e?0:t.closeSpeed,easing:t.closeEasing,step:o?this.step:null,complete:n._afterZoomOut})},changeIn:function(){var t,e=n.current,o=e.nextEffect,a=e.pos,i={opacity:1},r=n.direction,s=200;a.opacity=.1,"elastic"===o&&(t="down"===r||"up"===r?"top":"left","down"===r||"right"===r?(a[t]=p(h(a[t])-s),i[t]="+=200px"):(a[t]=p(h(a[t])+s),i[t]="-=200px")),"none"===o?n._afterZoomIn():n.wrap.css(a).animate(i,{duration:e.nextSpeed,easing:e.nextEasing,complete:n._afterZoomIn})},changeOut:function(){var e=n.previous,o=e.prevEffect,a={opacity:.1},i=n.direction;"elastic"===o&&(a["down"===i||"up"===i?"top":"left"]=("up"===i||"left"===i?"-":"+")+"=200px"),e.wrap.animate(a,{duration:"none"===o?0:e.prevSpeed,easing:e.prevEasing,complete:function(){t(this).trigger("onReset").remove()}})}},n.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:t("html"),create:function(e){var o;e=t.extend({},this.defaults,e),this.overlay&&this.close(),o=n.coming?n.coming.parent:e.parent,this.overlay=t('<div class="fancybox-overlay"></div>').appendTo(o&&o.length?o:"body"),this.fixed=!1,e.fixed&&n.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(e){var a=this;e=t.extend({},this.defaults,e),this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(e),this.fixed||(o.bind("resize.overlay",t.proxy(this.update,this)),this.update()),e.closeClick&&this.overlay.bind("click.overlay",function(e){if(t(e.target).hasClass("fancybox-overlay"))return n.isActive?n.close():a.close(),!1}),this.overlay.css(e.css).show()},close:function(){o.unbind("resize.overlay"),this.el.hasClass("fancybox-lock")&&(t(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH)),t(".fancybox-overlay").remove().hide(),t.extend(this,{overlay:null,fixed:!1})},update:function(){var t,e="100%";this.overlay.width(e).height("100%"),i?(t=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),a.width()>t&&(e=a.width())):a.width()>o.width()&&(e=a.width()),this.overlay.width(e).height(a.height())},onReady:function(e,o){var a=this.overlay;t(".fancybox-overlay").stop(!0,!0),a||this.create(e),e.locked&&this.fixed&&o.fixed&&(o.locked=this.overlay.append(o.wrap),o.fixed=!1),!0===e.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(e,a){a.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&t("*").filter(function(){return"fixed"===t(this).css("position")&&!t(this).hasClass("fancybox-overlay")&&!t(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=o.scrollTop(),this.scrollH=o.scrollLeft(),this.el.addClass("fancybox-lock"),o.scrollTop(this.scrollV).scrollLeft(this.scrollH)),this.open(e)}
2,onUpdate:function(){this.fixed||this.update()},afterClose:function(e){this.overlay&&!n.coming&&this.overlay.fadeOut(e.speedOut,t.proxy(this.close,this))}},n.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(e){var o,a,r=n.current,s=r.title,c=e.type;if(t.isFunction(s)&&(s=s.call(r.element,r)),l(s)&&""!==t.trim(s)){switch(o=t('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+s+"</div>"),c){case"inside":a=n.skin;break;case"outside":a=n.wrap;break;case"over":a=n.inner;break;default:a=n.skin,o.appendTo("body"),i&&o.width(o.width()),o.wrapInner('<span class="child"></span>'),n.current.margin[2]+=Math.abs(h(o.css("margin-bottom")))}o["top"===e.position?"prependTo":"appendTo"](a)}}},t.fn.fancybox=function(e){var o,i=t(this),r=this.selector||"",s=function(a){var s,c,l=t(this).blur(),d=o;a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||l.is(".fancybox-wrap")||(s=e.groupAttr||"data-fancybox-group",(c=l.attr(s))||(s="rel",c=l.get(0)[s]),c&&""!==c&&"nofollow"!==c&&(d=(l=(l=r.length?t(r):i).filter("["+s+'="'+c+'"]')).index(this)),e.index=d,!1!==n.open(l,e)&&a.preventDefault())};return o=(e=e||{}).index||0,r&&!1!==e.live?a.undelegate(r,"click.fb-start").delegate(r+":not('.fancybox-item, .fancybox-nav')","click.fb-start",s):i.unbind("click.fb-start").bind("click.fb-start",s),this.filter("[data-fancybox-start=1]").trigger("click"),this},a.ready(function(){var o,a,i,r;void 0===t.scrollbarWidth&&(t.scrollbarWidth=function(){var e=t('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),o=e.children(),a=o.innerWidth()-o.height(99).innerWidth();return e.remove(),a}),void 0===t.support.fixedPosition&&(t.support.fixedPosition=(i=t('<div style="position:fixed;top:20px;"></div>').appendTo("body"),r=20===i[0].offsetTop||15===i[0].offsetTop,i.remove(),r)),t.extend(n.defaults,{scrollbarWidth:t.scrollbarWidth(),fixed:t.support.fixedPosition,parent:t("body")}),o=t(window).width(),e.addClass("fancybox-lock-test"),a=t(window).width(),e.removeClass("fancybox-lock-test"),t("<style type='text/css'>.fancybox-margin{margin-right:"+(a-o)+"px;}</style>").appendTo("head")})}}),w=t(_(),1);function x(t){const e=t+"=",o=document.cookie.split(";");for(let a=0;a<o.length;a++){let t=o[a];for(;" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(e))return t.substring(e.length,t.length)}return""}function S(t,e,o){const a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);const n="expires="+a.toUTCString();document.cookie=t+"="+e+"; "+n+"; path=/; SameSite=Lax; Secure;"}k=jQuery,window,b={min:8,max:12,tolerance:.02,truncate:!1,width:null,sampleNumberOfLetters:10,sampleFontSize:12},C=function(){var t=null;function e(t){this.options=t,this.item=k('<span id="meassure"></span>'),this.item.css({position:"absolute",left:"-1000px",top:"-1000px","font-size":this.options.sampleFontSize+"px"}),k("body").append(this.item),this.meassures={}}return e.instance=function(o){return t||(t=new e(o)),t},e.prototype.getMeassure=function(t){var e;return(e=this.meassures[t])||(e=this.setMeassure(t)),e},e.prototype.setMeassure=function(t){var e,o,a,n,i;for(n="",a=" "===t?" ":t,o=0,i=this.options.sampleNumberOfLetters-1;0<=i?o<=i:o>=i;0<=i?o++:o--)n+=a;return this.item.html(n),e=this.item.width()/this.options.sampleNumberOfLetters/this.options.sampleFontSize,this.meassures[t]=e,e},e}(),y=function(){function t(t,e){this.$element=t,this.options=k.extend({},b,e),this.$element=k(this.$element),this._defaults=b,this._name="quickfit",this.quickfitHelper=C.instance(this.options)}return t.prototype.fit=function(){var t;return this.options.width||(t=this.$element.width(),this.options.width=t-this.options.tolerance*t),(this.text=this.$element.attr("data-quickfit"))?this.previouslyTruncated=!0:this.text=this.$element.text(),this.calculateFontSize(),this.options.truncate&&this.truncate(),{$element:this.$element,size:this.fontSize}},t.prototype.calculateFontSize=function(){var t,e,o;for(e=0,o=0;o<this.text.length;++o)t=this.text.charAt(o),e+=this.quickfitHelper.getMeassure(t);return this.targetFontSize=parseInt(this.options.width/e),this.fontSize=Math.max(this.options.min,Math.min(this.options.max,this.targetFontSize))},t.prototype.truncate=function(){var t,e,o,a,n;if(this.fontSize>this.targetFontSize){for(a="",n=3*this.quickfitHelper.getMeassure(".")*this.fontSize,t=0;n<this.options.width&&t<this.text.length;)o=this.text[t++],e&&(a+=e),n+=this.fontSize*this.quickfitHelper.getMeassure(o),e=o;return a.length+1===this.text.length?a=this.text:a+="...",this.textWasTruncated=!0,this.$element.attr("data-quickfit",this.text).html(a)}if(this.previouslyTruncated)return this.$element.html(this.text)},t}(),k.fn.quickfit=function(t){for(var e=[],o=this.each(function(){var o=new y(this,t).fit();return e.push(o),o.$element}),a=0;a<e.length;a++){var n=e[a];n.$element.css({fontSize:n.size+"px"})}return o},function(t,e,o){t(function(){(0,w.default)(t),t("iframe"),t(".floats"),t("#wpadminbar"),t(".header__container");let a=t(".header__banner");t(".header__bannerNotice"),t(".header__bannerApp"),t(".header__bannerClose"),t(".header__fixedMobile"),t(".nav__container"),t(".header__search"),t(".nav__container ul"),t(".header__mobileButton--search"),t(".header__mobileButton--hamburger"),t(".animation__hamburger"),t(".view__mobile .nav__container .menu-item-has-children > span"),t(".view__mobile .nav__container > ul > .menu-item-has-children > span"),t(".view__mobile .nav__container > ul > .menu-item-has-children > ul > .menu-item-has-children > span");const n=".multi-link-first",i=t(n),r=t("#nav-main-menu");r.offset();const s=t("#top-row");function c(){const o=t(".vo-checkout--cart--content");let n=0;if(o.length){let i=e.innerWidth,c=t(e).scrollTop(),l=a.outerHeight()??0,d=r.outerHeight()??0;n=i<768||c>s.outerHeight()?l+d:l,o.css("padding-top",n+"px")}}c(),t(".fancybox").fancybox({helpers:{overlay:{locked:!1}}}),t(o).on("cartLoaded",function(){c()}),t(e).on("resize",function(){c()}).resize(),t(e).on("scroll",function(){c()}).scroll(),i.length&&t(o).on("click",n,function(e){const o=t(this).data("grouped");if(o){const e=t('.multi-link-mate[data-grouped="'+o+'"]');e.length<=4&&e.each(function(){t(this)[0].trigger("click")})}}),t(e).on("load",function(){t("#header_menu li:last-child").addClass("last-child"),t(e).on("resize",function(){t("#wrapper").width()>=979?t("main").height()&&t("main").height()<t("aside").height()&&t("main").css("min-height",t("aside").height()+"px"):t("main").css("height","auto").css("min-height",0),function(){const o=t(".vo_highlights_cell");if(o.length){let a=0;t(o).height("auto"),t(e).outerWidth()>=480&&(t(o).height("auto"),t(".vo_highlights_box p:last-child",o).css("position","relative"),o.each(function(){t(this).outerHeight()>a&&(a=t(this).outerHeight())}),t(o).height(a),t(".vo_highlights_box p:last-child",o).css("position","absolute"))}const a=t(".fancy_posts");a.length&&a.each(function(){const o=t(this),a=t(".fancy_post",o);if(a.length){let n=0;t(e).outerWidth()<480?t(a).height("auto"):a.each(function(e,a){if(e%2==1){let a=n;t(this).outerHeight()>n&&(t(this).height("auto"),a=t(this).outerHeight()),t(".fancy_post:nth-child("+e+")",o).css("height",a),t(".fancy_post:nth-child("+(e+1)+")",o).css("height",a),n=0}else t(this).height("auto"),n=t(this).outerHeight()})}})}()}).resize()})})}(jQuery,window,document),function(t,e,o){const a=".vo-bi--show--date-picker",n=".vo-bi--show-date-picker-from",i="#vo-bi--show-date-from",r=".vo-bi--show-date-picker-to",
2s="#vo-bi--show-date-to",c={},l="#vo-bi--show-date-midday",d="#vo-bi--show-date-evening",u=".vo-bi--show--find-button",h=".vo-bi--show--wrapper",p=".vo-bi--show--results-wrapper",m=".vo-bi--show--results",f=".vo-bi--show--overlay",v=".vo-bi--show--back-to-top-button",g=".vo-bi--availability--buy-tickets",k=".vo-bi--availability--item-quantity-less",y=".vo-bi--availability--item-quantity-input",C=".vo-bi--availability--item-quantity-more",b=".vo-bi--page-overlay",_=".vo-bi--modal",w=".vo-bi--modal--extra-details",S=".vo-bi--modal-find-button",P=".vo-bi--modal--content",I=".vo-bi--modal--close",T="modal_data",D=_+" .vo-bi--modal--inputs",M=".vo-bi--last-minute-box",j='[name="vo-checkout--broadway_insurance"]';let E=null;const F=function(t,o,a){return null==t&&(t=""),null==o&&(o=""),null==a&&(a=e.location.toString()),a.indexOf("#")>0&&(a=a.substring(0,a.indexOf("#"))),a.indexOf(t)>0&&(a=A(a,t)),a+(a.indexOf("?")>0?"&":"?")+t+"="+o},A=function(t,e){const o=t.split("?");if(o.length<2)return t;const a=encodeURIComponent(e)+"=",n=o[1].split(/[&;]/g);for(let i=n.length;i-- >0;)-1!==n[i].lastIndexOf(a,0)&&n.splice(i,1);return o[0]+"?"+n.join("&")},L=function(t,a){t=t.replace(/\//g,"-"),a=a.replace(/\//g,"-");let n=e.location.toString();return n=F("date_to",a,F("date_from",t,n)),e.history.replaceState({},o.title,n),n},O=".vo-bi--find-shows-by-date",B=".vo-bi--find-shows-by-name",N="#vo-bi--show-name-input";function H(){t(".bi-fancybox").fancybox({helpers:{overlay:{locked:!1}},afterLoad:function(){this.title=t(this.element).data("title")},beforeShow:function(){const e=t(this.element).data("alt");if(e){const o=t(".fancybox-image");o.length&&o.attr("alt",e)}}})}function q(t){return t.getFullYear()+"/"+String(t.getMonth()+1).padStart(2,"0")+"/"+String(t.getDate()).padStart(2,"0")}function R(t,e){return Math.round((e-t)/864e5)}function W(t){!function(t,e,a){let n="";if(a){const t=new Date;t.setTime(t.getTime()+24*a*60*60*1e3),n="; expires"+t.toGMTString()}o.cookie=t+"="+e+n+"; path=/;SameSite=None;Secure;"}(t,"",-1)}function z(t,e){let o=t.html();o=parseInt(o)+parseInt(e),o<1&&(o=1),t.html(o)}function U(){return[nymgData.translations["01_long"],nymgData.translations["02_long"],nymgData.translations["03_long"],nymgData.translations["04_long"],nymgData.translations["05_long"],nymgData.translations["06_long"],nymgData.translations["07_long"],nymgData.translations["08_long"],nymgData.translations["09_long"],nymgData.translations["10_long"],nymgData.translations["11_long"],nymgData.translations["12_long"]]}function $(){return[nymgData.translations.sunday_long,nymgData.translations.monday_long,nymgData.translations.tuesday_long,nymgData.translations.wednesday_long,nymgData.translations.thursday_long,nymgData.translations.friday_long,nymgData.translations.saturday_long]}function Q(){return[nymgData.translations.sunday_min,nymgData.translations.monday_min,nymgData.translations.tuesday_min,nymgData.translations.wednesday_min,nymgData.translations.thursday_min,nymgData.translations.friday_min,nymgData.translations.saturday_min]}function V(e="price",o="",a=""){""!==o&&t(".fancy_image").length&&(t("<div/>",{class:"fancy_image_bar vo-adaptive-banner vo-adaptive-banner__show--bi vo-bi--show--back-to-top-button "+e+"-banner vo-bi--cursor-pointer "+a,id:"vo-bi-"+e+"-banner",html:'<span class="vo-adaptive-text">'+o+"</span>"}).appendTo(".fancy_image"),t(".vo-adaptive-text").quickfit({max:20,min:7,truncate:!1}),Y())}function Y(){const e=!!t(".fancy_image_bar.price-banner:not(.banner-hidden)").length,o=!!t(".fancy_image_bar.discount-banner:not(.banner-hidden)").length,a=e?"price":o?"discount":"";if(!a.length)return;let n=!1;switch(a){case"price":n="discount";break;case"discount":n="price"}const i=t("#vo-bi-disclaimer-"+a),r=t("#vo-bi-disclaimer-"+n),s="hide-date";if(i.length&&r.length)return i.removeClass(s),void r.addClass(s);i.length?i.removeClass(s):r.length&&r.removeClass(s)}function G(t){if(!t.length)return;let e=0;const o=nymgData.flex_ticket_label;t.is(":checked")&&(e=parseFloat(t.data("price"))),voCheckoutCheckout.addExtraCost(o,"broadway-insurance",e),voCheckoutCheckout.setSummaryExtraCosts(e,o)}function J(e){t(f).show(),t.post(nymgData.ajaxUrl,e,function(e){t(".vo-results").html(e.html),t(f).hide()},"json")}function Z(){t(_).off("scroll"),t(b).fadeOut(200),t(_).fadeOut(200,function(){K(""),t(P).html(""),t(w).html("").hide()}),t("body").removeClass("vo-bi--modal-active")}function X(e){e?t(_).addClass("loading"):t(_).removeClass("loading")}function K(e){t(".vo-bi--modal--title").html(e)}function tt(e){!1===e?t(D).hide():t(D).show()}function et(e){E&&clearTimeout(E),t(e).addClass("error"),E=setTimeout(function(){t(e).removeClass("error")},250)}function ot(t){const o=decodeURIComponent(e.location.search.substring(1)).split("&");let a,n;for(n=0;n<o.length;
2n++)if(a=o[n].split("="),a[0]===t)return void 0===a[1]||a[1];return null}function at(e){t.post(nymgData.ajaxUrl,{action:"vo-bi-disable-broadway-seating"},function(t){nt(e,t,!1)},"json")}function nt(e,a,n=!1){if(a.success&&a.items)for(const i in a.items){const r=e.querySelector('.vo-checkout-item.row[id="item-'+i+'"]');if(!r)continue;const s=a.rendered[i]??"";if(s.length)r.outerHTML=s,n&&t(o).trigger("broadwayTimerAdded");else{const e=r.querySelector('.vo-checkout--meta-data [data-key="seating"]');e&&(e.innerHTML=a.items[i]??"",e.classList.remove("hide"),n&&t(o).trigger("cartItemMetaUpdated"))}}}t(function(){W(T),H(),function(){const e=t(a).first();if(!e.length)return;const o=e.data("date-source")||"default",n=new Date;n.setHours(0,0,0,0);const r=q(n),c=new Date(n);c.setDate(c.getDate()+7);const l=q(c);let d=null,u=null;const h=ot("date_from"),p=ot("date_to");if(h&&p)d=h.replace(/-/g,"/"),u=p.replace(/-/g,"/");else if("forced"===o)d=e.data("date-from")||r,u=e.data("date-to")||l,new Date(d+" 00:00:00")<n&&(d=r);else{const t=x("vo-bi-date_from"),e=x("vo-bi-date_to");t&&e?(d=t.substring(0,10).replace(/-/g,"/"),u=e.substring(0,10).replace(/-/g,"/"),new Date(d+" 00:00:00")<n&&(d=r),new Date(u+" 00:00:00")<n&&(u=l)):(d=r,u=l)}t(i).val(d),t(s).val(u)}(),function(){c.maxDays=void 0!==t(a).data("max-days")?t(a).data("max-days"):10,t(n).length&&t(n).datepicker({altFormat:"yy/mm/dd",altField:i,minDate:new Date,dateFormat:nymgData.date_format,monthNames:U(),dayNames:$(),dayNamesMin:Q(),dayNamesShort:Q(),onSelect:function(e,o){const a=new Date(t(i).val()+" 00:00:00"),l=new Date(t(s).val()+" 00:00:00");a>l?(t(r).datepicker("setDate",new Date(a.getFullYear(),a.getMonth(),a.getDate())),et(r)):R(a,l)>c.maxDays&&(t(r).datepicker("setDate",new Date(a.getFullYear(),a.getMonth(),a.getDate()+c.maxDays)),et(r)),t(n).datepicker("setDate",new Date(a.getFullYear(),a.getMonth(),a.getDate()))}}).datepicker("setDate",new Date(t(i).val()));t(r).length&&t(r).datepicker({altFormat:"yy/mm/dd",altField:s,minDate:new Date,dateFormat:nymgData.date_format,monthNames:U(),dayNames:$(),dayNamesMin:Q(),dayNamesShort:Q(),onSelect:function(e,o){const a=new Date(t(i).val()+" 00:00:00"),l=new Date(t(s).val()+" 00:00:00");a>l?(t(n).datepicker("setDate",new Date(l.getFullYear(),l.getMonth(),l.getDate())),et(n)):R(a,l)>c.maxDays&&(t(n).datepicker("setDate",new Date(l.getFullYear(),l.getMonth(),l.getDate()-c.maxDays)),et(n)),t(r).datepicker("setDate",new Date(l.getFullYear(),l.getMonth(),l.getDate()))}}).datepicker("setDate",new Date(t(s).val()))}(),t(o).on("click",u,function(e){e.preventDefault(),e.target.classList.add("after-loader");const o={action:"vo-bi-get-performance-availability",showCode:t(this).data("show_code"),resultType:t(this).data("result_type"),showType:t(this).data("show_type"),showInModal:t(this).data("show_in_modal"),productDate:t(this).data("product_date"),productTime:t(this).data("product_time"),productId:t(this).data("product_filter"),showName:t(this).data("show_name"),hideDatePickers:t(this).data("hide_datepickers"),lastMinute:t(this).data("last_minute"),dateFrom:t(i).val(),dateTo:t(s).val(),dateMidday:t(l).is(":checked"),dateEvening:t(d).is(":checked"),hideBackBtn:t(this).data("hide_back")};L(o.dateFrom,o.dateTo),void 0!==o.showInModal&&"1"===o.showInModal.toString()&&(t(b).fadeIn(200),t(_).fadeIn(200),t("body").addClass("vo-bi--modal-active"),X(!0)),t(f).show(),t.post(nymgData.ajaxUrl,o,function(o){let a=m;var n,i,r;if(o.showInModal&&"1"===o.showInModal.toString()?(a=P,K(o.showName.replace(/\\(.)/gm,"$1")),o.extraDetails&&(r=o.extraDetails,t(w).html(r).show()),n=o.showCode,i=o.showName,t(S).data("show_code",n),t(S).data("show_name",i),X(!1),o.hideDatePickers&&"1"===o.hideDatePickers.toString()?tt(!1):tt(!0)):t(p).show(),t(a).html(""),o.emptyMessage&&""!==o.emptyMessage.toString())t(a).html(o.emptyMessage);else{let e=Object.values(o.performances).filter(Boolean).join("");t(a).html(e)}o.resultFooter&&""!==o.resultFooter.toString()&&t(a).append(o.resultFooter),H(),t(f).hide(),e.target.classList.remove("after-loader")},"json")}),t(o).on("click",g,async function(e){e.preventDefault();const o=t(this).data("unique_id");let a=parseInt(t(".product_quantity[data-unique_id="+o+"]").val());a&&void 0!==a||(a=1);const n={action:"vo-bi-add-to-cart",performanceId:o,quantity:a,lastMinute:t(this).data("last_minute")};try{const e=await t.post(nymgData.ajaxUrl,n,null,"json");Z(),void 0!==e.success&&!0===e.success?void 0!==e.update&&!0===e.update?await voCheckoutCart.updateCartItem(e.cartItem):await voCheckoutCart.addCartItem(e.cartItem):void 0!==e.message&&""!==e.message.toString()?voCheckout.showErrorDialog(e.message,nymgData.add_to_cart_error_button):voCheckout.showErrorDialog(nymgData.add_to_cart_error,nymgData.add_to_cart_error_button)}catch(i){voCheckout.showErrorDialog(nymgData.add_to_cart_error,nymgData.add_to_cart_error_button)}W(T)}),t(o).on("click",v,function(e){e.preventDefault(),t(h).length&&t("html, body").stop().animate({scrollTop:t(h).position().top-50},500)}),t(".vo-result-banner span").each(function(){t(this).quickfit({max:15,min:7,truncate:!1})}),t(o).on("click",k,function(){t(this).blur(),z(t(this).next(y),-1)}),t(o).on("click",C,function(){t(this).blur(),z(t(this).prev(y),1)}),t(o).on("click",O,function(e){e.preventDefault();const o={action:"vo-bi-get-shows",dateFrom:t(i).val(),dateTo:t(s).val(),dateMidday:t(l).is(":checked"),dateEvening:t(d).is(":checked")};L(o.dateFrom,o.dateTo),J(o)}),t(o).on("click",B,function(e){e.preventDefault(),J({action:"vo-bi-get-shows",showName:t(N).val()})}),t(N).on("keyup",function(e){13===e.keyCode&&t(B).trigger("click")}
2),t(o).on("click",I+",.vo-bi--page-overlay",function(t){t.preventDefault(),Z(),W(T)}),t(_).on("scroll",function(){t(n).datepicker("hide").blur(),t(r).datepicker("hide").blur()}),function(){const t="price";if("undefined"==typeof voBiLowestPrice)return;if(""===voBiLowestPrice)return;V(t,voBiLowestPriceText)}(),function(){const e="discount";if("undefined"==typeof voBiMaxDiscount)return void Y();if(""===voBiMaxDiscount||0===voBiMaxDiscount)return void Y();if(!t(".fancy_image").length)return void Y();V(e,voBiMaxDiscountText,"banner-hidden")}(),t(M).length&&t(e).on("resize",function(){t(M).height("auto");let e=0;t(M).each(function(){t(this).outerHeight()>e&&(e=t(this).outerHeight())}),t(M).css("height",e+"px")}).resize(),function(){const e=t(".vo-bi--show--date-picker.direct-load");if(!e.length)return;if(t(".vo-shows-container").length){const t=e.parent().find(".vo-bi--find-shows-button:visible");return void(t.length&&t.trigger("click"))}if(null!==ot("startdate")||null!==ot("enddate"))return;if(t(".vo-bi--show").length&&!t(p).hasClass("delayed-loading")){const e=t(".vo-bi--show "+u);e.length&&e.data("show_code")&&e.trigger("click")}}(),t(o).on("change",j,async function(){G(t(this));try{await voCheckoutCheckout.getSummaryOverview()}catch(e){}}),t(o).on("updateExtraCosts",function(){G(t(j))}),function(){const e=ot("startdate"),o=ot("enddate");null===e&&null===o||(null!==e&&t(n).datepicker("setDate",new Date(e)),null!==o&&t(r).datepicker("setDate",new Date(o)),t.each(t(u),function(){void 0!==t(this).data("show_code")&&t(this).trigger("click")}))}(),function(){const e=o.querySelector(".vo-checkout-items");if(!e)return;const a='[data-disable="bi_seating"]',n=t(a);if(n.length)return n.each(function(o,a){t(a).val().length&&at(e)}),void t(o).on("change",a,function(o){t(o.target).val().length&&at(e)});const i=e.querySelectorAll(".seating-placeholder");if(!i.length)return;!function(e,a){(function(e,a){if(!e)return;if(!a.length)return;t.post(nymgData.ajaxUrl,{action:"vo-bi-get-broadway-seating"},function(t){a.forEach(function(t){t.innerHTML=""}),nt(e,t,!0)},"json").then(function(){t(o).trigger("cartLoaded")})})(e,a),function(t){if(!t.length)return;t.forEach(function(t){if(!t.getAttribute("data-content"))return;t.innerHTML=t.getAttribute("data-content"),t.removeAttribute("data-content");const e=t.querySelector("i");if(!e)return;let o=!0;const a=setInterval(function(){e?o?(e.innerHTML+=".",e.innerHTML.length>7&&(o=!1)):(e.innerHTML=e.innerHTML.substring(1,e.innerHTML.length),"."===e.innerHTML&&(o=!0)):clearInterval(a)},600)})}(a)}(e,i)}(),t(o).on("cartLoaded",function(){H()}),function(){const e=t(p),o="delayed-loading";e.hasClass(o)&&(t(".vo-bi--show "+u).click(),e.removeClass(o))}()})}(jQuery,window,document),function(t,e,o,a){let n,i=!1,r=t(".vo_cal-tooltip");const s=".vo_cal-overview-filter-button";function c(){return[vocalFront.translations.sunday_min,vocalFront.translations.monday_min,vocalFront.translations.tuesday_min,vocalFront.translations.wednesday_min,vocalFront.translations.thursday_min,vocalFront.translations.friday_min,vocalFront.translations.saturday_min]}function l(t,o,a){return null==t&&(t=""),null==o&&(o=""),null==a&&(a=e.location.toString()),a.indexOf("#")>0&&(a=a.substring(0,a.indexOf("#"))),a.indexOf(t)>0&&(a=function(t,e){const o=t.split("?");if(o.length<2)return t;const a=encodeURIComponent(e)+"=",n=o[1].split(/[&;]/g);for(let i=n.length;i-- >0;)-1!==n[i].lastIndexOf(a,0)&&n.splice(i,1);return o[0]+"?"+n.join("&")}(a,t)),a+(a.indexOf("?")>0?"&":"?")+t+"="+o}function d(e,o){if(!t(e).length)return;const a=e.replace("-picker","");let n=e,i=e.replace("from","to"),r=a,s=a.replace("from","to");"to"===o&&(n=e.replace("to","from"),i=e,r=a.replace("to","from"),s=a),t(e).datepicker({altFormat:"yy-mm-dd",altField:a,dateFormat:vocalFront.date_format,monthNames:[vocalFront.translations["01_long"],vocalFront.translations["02_long"],vocalFront.translations["03_long"],vocalFront.translations["04_long"],vocalFront.translations["05_long"],vocalFront.translations["06_long"],vocalFront.translations["07_long"],vocalFront.translations["08_long"],vocalFront.translations["09_long"],vocalFront.translations["10_long"],vocalFront.translations["11_long"],vocalFront.translations["12_long"]],monthNamesShort:[vocalFront.translations["01_short"],vocalFront.translations["02_short"],vocalFront.translations["03_short"],vocalFront.translations["04_short"],vocalFront.translations["05_short"],vocalFront.translations["06_short"],vocalFront.translations["07_short"],vocalFront.translations["08_short"],vocalFront.translations["09_short"],vocalFront.translations["10_short"],vocalFront.translations["11_short"],vocalFront.translations["12_short"]],dayNamesMin:c(),dayNamesShort:c(),onSelect:function(o,a){new Date(t(r).val())>new Date(t(s).val())&&("#"+t(e).attr("id")===n?t(i).datepicker("setDate",t(e).val()):t(n).datepicker("setDate",t(e).val()))}}).datepicker("setDate",new Date(t(a).val()))}function u(){if(t(".vo_cal-overview-daily-events-holder").length){const e=t(".vo_cal-overview-button");let o=0;e.each(function(){const e=t(this).width();e>o&&(o=e)}),e.width(o+1).css("opacity","1")}}function h(){const e=t(".vo_cal-ajax");e.length&&function(e,o,a,n){const i={action:vocalFront.action_events_search,search_term:e,date_from:o,date_to:a,limit:n};t.post(nymgData.ajaxUrl,i,function(e){e.html&&e.status&&(t(".vo_cal-search-loader").hide(),"success"===e.status?(t(".vo_cal-overview-daily-events tbody").html(e.html),t(".vo_cal-no-results").hide()):t(".vo_cal-no-results").show(),t("#wrapper").width()>=979?t("main").css("min-height",t(".vo_cal-search-results").height()+30+"px"):t("main").css("height","auto").css("min-height",0))},"json")}(e.data("search"),e.data("date_from"),e.data("date_to"),e.data("limit"))}function p(){if(!t(s).length)return;let a=!1;
2t(o).on("click",s,function(n){n.preventDefault();const i=t("#vo_cal-date-from").val(),r=t("#vo_cal-date-to").val();!function(t,a){let n=e.location.toString();n=l("date_to",a,l("date_from",t,n)),e.history.replaceState({},o.title,n)}(i,r);const s=this;if(a)return;const c=t(".vo_cal-overview-daily-events-overlay"),d=vocalFront.action_events,h=t(".vo_cal-overview-filters");let p={action:d,date_from:i,date_to:r};h.data("action")&&(p=t.extend({},p,h.data())),t(s).addClass("after-loader"),c.show(),a=!0,t.post(nymgData.ajaxUrl,p,function(e){a=!1,e.html&&e.status&&(t(s).removeClass("after-loader"),"success"===e.status?(t(".events-list-wrapper").html(e.html),t(".vo_cal-overview-daily-events-holder .vo_cal-overview-daily-events").html(e.html),t(".vo_cal-overview-daily-events-heading").html(vocalFront.found_events),t(".vo_cal-overview-events-append").html(e.append??"")):t(".vo_cal-no-results").show(),c.hide()),u()},"json")}),t(o).on("keypress",s,function(e){13===e.which&&t(this).click()})}t(function(){!function(){if(!r.length)return;let e,s=0;t(o).on("mouseenter",r.selector,function(o){if(!i){i=!0;const o=++s;if(r=t(this),n=t(".vo_cal-tooltip-text",r),t(".vo_cal-tooltip-text.static",r)[0])return!0;n.addClass("loading").removeClass("hide"),e=t.ajax({url:nymgData.ajaxUrl,type:"POST",dataType:"JSON",data:{action:vocalFront.action_events_tooltip,data:r.data()},success:function(t){o===s&&(t.error?n.addClass("hide"):n.removeClass("loading").html(t.output))},complete:function(){o===s&&(e=a,i=!1)}})}o.preventDefault()}).on("mouseleave",r.selector,function(){if(t(".vo_cal-tooltip-text.static",r.selector)[0])return!0;n!==a&&n.empty(),e&&e.abort()})}(),function(){const a=function(t){return null!==o.getElementById(t)},n=navigator.clipboard?.writeText?.bind(navigator.clipboard),i=function(t){const e=o.createElement("textarea");e.value=t,o.body.appendChild(e),e.select();try{return o.execCommand("copy")}finally{o.body.removeChild(e)}};t(o).on("click",".vo_cal-copy-link",function(o){o.preventDefault();const r=t(this),s=r.data("element-id"),c=r.attr("aria-label"),l=r.data("copy-success"),d=r.data("copy-error"),u=function(t,e,o){return"/"!==t.pathname&&e&&o(e)?t.origin+t.pathname+(t.search||"")+"#"+e:null}(e.location,s,a);if(!u)return r.prop("disabled",!0).attr({title:d,"aria-label":d}),void r.find("i").removeClass("fa-link").addClass("fa-triangle-exclamation");(async function(t,e,o){if(e)try{return await e(t),!0}catch{}try{return!0===o(t)}catch{return!1}})(u,n,i).then(function(t){const e=function(t,e,o){return t?{icon:"fa-check",label:e}:{icon:"fa-triangle-exclamation",label:o}}(t,l,d),o=r.find("i");r.attr({title:e.label,"aria-label":e.label}),o.removeClass("fa-link fa-check fa-triangle-exclamation").addClass(e.icon),t&&setTimeout(function(){r.attr({title:c,"aria-label":c}),o.removeClass("fa-check").addClass("fa-link")},2e3)})})}(),p(),h(),d("#vo_cal-date-from-picker","from"),d("#vo_cal-date-to-picker","to"),function(){const e=t(".vo_cal-overview-filters.direct-load");if(!e.length)return;const o=e.find(".vo_cal-overview-filter-button:visible");o.length&&o.trigger("click")}(),u(),function(){if("undefined"==typeof vocalFrontDelay)return;if(!t(vocalFrontDelay.ajax_selector).length)return;if(t(".vo_cal-overview-ajax-categories").length)return;if(t(".vo_cal-overview-ajax-performer").length)return;if(t(".vo_cal-overview-ajax-name").length)return;const e=vocalFrontDelay.title,o=vocalFrontDelay.date_picker,a=vocalFrontDelay.limit,n=vocalFrontDelay.period,i=vocalFrontDelay.year,r=vocalFrontDelay.min_days,s=vocalFrontDelay.ajax_selector;t.ajax({url:nymgData.ajaxUrl,type:"POST",dataType:"JSON",data:{action:vocalFrontDelay.action_delayed_events,title:e,date_picker:o,limit:a,period:n,year:i,min_days:r},success:function(e){t(".ajax-loading").remove(),t(s).append(e.output).fadeIn(300)}})}()})}(jQuery,window,document),function(t,e,o){t.ajaxSetup({cache:!1});const a=t("#wpadminbar"),n=".vo-checkout-proceed",i=t(n);let r=0;const s=t(".vo-checkout-eric"),c=t(".vo-checkout-summary");let l=t(".vo-checkout-sidebar").width(),d=0,u=0;function h(){d&&(c.css("max-width",l+"px"),d>768&&(u>r?(c.addClass("sticky"),c.css("position","fixed"),c.css("top","1rem")):(c.removeClass("sticky"),c.css("position","initial"),c.css("top","initial"))))}function p(){t(".header__banner"),d=e.innerWidth,t(e).height(),u=t(e).scrollTop(),r=88,s.length&&(r=r+s.height()+30),a.length&&a.height(),l=t(".vo-checkout-sidebar").width()}function m(t=!1){const e="disabled";t?i.removeAttr(e):i.attr(e,e)}function f(){let e=0;
2t(".vo-checkout-supplement input:checked").each(function(){let o;try{o=JSON.parse(t(this).val())}catch(y){return}o&&o.price&&(e+=parseFloat(o.price)||0),voCheckoutCheckout.addExtraCost(o?.supplement_title,"vo-checkout--supplement_"+o.product_id,o.price),voCheckoutCheckout.setSummaryExtraCosts(e,o?.supplement_title)})}function v(t,e){if(!t.length)return;if(!e.length)return;const o="checked";t.is(":checked")?e.addClass(o):e.removeClass(o)}function g(){let e;return t("input[required]").each(function(){const o=t(this);if("hidden"===o.attr("type"))return;const a=o.closest(".vo-checkout--form-input");a.removeClass("error"),""===o.val().toString().replace(/\s/g,"")&&(e=a,a.addClass("error"),t(this).val("").trigger("change"))}),!e||(t("html, body").stop().animate({scrollTop:t(e).position().top-50},500),!1)}t(function(){p(),m(t(".vo-checkout-payment-method.selected").length),function(){const e='.vo-checkout-upsell [type="checkbox"]',a=".vo-checkout--form-checkbox";let n=t(e),i=n.closest(a);v(n,i),t(o).on("change",e,function(){const e=t(this);v(e,e.closest(a))});const r='.insurance-wrapper [type="checkbox"]',s=".vo-checkout-insurance";n=t(r),i=n.closest(s),v(n,i),t(o).on("change",r,function(){const e=t(this);v(e,e.closest(s))})}(),t(o).on("change",".vo-checkout-supplement input",async function(){f(),await voCheckoutCheckout.getSummaryOverview()}),t(o).on("updateExtraCosts",function(){f()})}),t(e).on("resize",function(){h(),p()}).resize(),t(e).on("scroll",function(){h(),p()}).scroll(),t(o).on("change","#vo-checkout--date-picker-date_of_arrival",function(){const e=t(this),o="readonly";e.val().length?e.attr(o,o):e.removeAttr(o)}),t(o).on("click",".vo-checkout-item__remove",async function(){const e=t(this).data("cart-item-id");if(await voCheckoutCart.changeCartItemQuantity(e,0,!0),!t('[data-type="broadway"]').length){const e=t(".vo-checkout-insurance");e.find("input").prop("checked",!1),e.remove()}await voCheckoutCheckout.reloadCheckoutItems(),t(".vo-checkout__wrapper .vo-checkout-item#item-"+e).remove(),function(e){if(0===parseInt(e))return;const o=t(".vo-checkout-summary__notices p[data-items]");o&&o.length&&o.each(function(){const o=t(this),a=JSON.parse(o.attr("data-items")),n=t.inArray(e,a);-1!==n&&(a.splice(n,1),a.length?o.attr("data-items",JSON.stringify(a)):o.remove())})}(e),voCheckoutCart.getCartItemsCount()<1&&setTimeout(function(){voCheckoutCheckout.goToPreviousPage()},500)}),t(o).on("click",".vo-checkout-summary__label--discount-reveal a",async function(){t(".vo-checkout-summary__label--discount-reveal").remove(),t(".vo-checkout-summary__input--discount").show(),t(".vo-checkout-summary__input--discount-divider").show()}),t(o).on("click",".vo-checkout-button__discount--applied",async function(){t("#discount_code").val(""),t(".vo-checkout-summary__label--discount-reveal").hide(),await voCheckoutCheckout.reloadCheckoutItems()}),t(o).on("click",".vo-checkout-button__discount--apply",async function(){await voCheckoutCheckout.reloadCheckoutItems()}),t(o).on("click",".vo-checkout-payment-method",function(){if(!g())return;const e=t(this).data("id"),o=t(this).data("provider");t(".vo-checkout-payment-method").removeClass("selected"),t(this).addClass("selected"),t("#vo-checkout-payment-method").val(e),t("#vo-checkout-payment-provider").val(o),m(!0)}),t(o).on("click",n,function(){return!!g()&&(voCheckoutCart.routineAllowed=!1,!0)}),t(o).on("cartItemMetaUpdated",function(){!function(){const e=[],a=t(".vo-checkout-items");t(a).find(".vo-checkout-item").each(function(){const o=parseInt(t(this).prop("id"));o<1||e.push(o)}),e.length&&t.post(nymgData.ajaxUrl,{action:"vo-checkout-get-cart-items"},function(t){const e=t.html??"";e.length&&a.html(e)},"json").then(function(){t(o).trigger("broadwayTimerAdded")})}()}),t(o).on("broadwayTimerAdded",function(){voCheckoutCheckout.initTimer()})}(jQuery,window,document),function(t,e){!function t(e,o,a,n){var i=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),r="function"==typeof Path2D&&"function"==typeof DOMMatrix,s=function(){if(!e.OffscreenCanvas)return!1;try{var t=new OffscreenCanvas(1,1),o=t.getContext("2d");o.fillRect(0,0,1,1);var a=t.transferToImageBitmap();
2o.createPattern(a,"no-repeat")}catch(y){return!1}return!0}();function c(){}function l(t){var a=o.exports.Promise,n=void 0!==a?a:e.Promise;return"function"==typeof n?new n(t):(t(c,c),null)}var d,u,h,p,m,f,v,g,k,C,b,_=(d=s,u=new Map,{transform:function(t){if(d)return t;if(u.has(t))return u.get(t);var e=new OffscreenCanvas(t.width,t.height);return e.getContext("2d").drawImage(t,0,0),u.set(t,e),e},clear:function(){u.clear()}}),w=(m=Math.floor(1e3/60),f={},v=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(h=function(t){var e=Math.random();return f[e]=requestAnimationFrame(function o(a){v===a||v+m-1<a?(v=a,delete f[e],t()):f[e]=requestAnimationFrame(o)}),e},p=function(t){f[t]&&cancelAnimationFrame(f[t])}):(h=function(t){return setTimeout(t,m)},p=function(t){return clearTimeout(t)}),{frame:h,cancel:p}),x=(C={},function(){if(g)return g;if(!a&&i){var e=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{g=new Worker(URL.createObjectURL(new Blob([e])))}catch(y){return"undefined"!=typeof console&&console.warn,null}!function(t){function e(e,o){t.postMessage({options:e||{},callback:o})}t.init=function(e){var o=e.transferControlToOffscreen();t.postMessage({canvas:o},[o])},t.fire=function(o,a,n){if(k)return e(o,null),k;var i=Math.random().toString(36).slice(2);return k=l(function(a){function r(e){e.data.callback===i&&(delete C[i],t.removeEventListener("message",r),k=null,_.clear(),n(),a())}t.addEventListener("message",r),e(o,i),C[i]=r.bind(null,{data:{callback:i}})})},t.reset=function(){for(var e in t.postMessage({reset:!0}),C)C[e](),delete C[e]}}(g)}return g}),S={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function P(t,e,o){return function(t,e){return e?e(t):t}(t&&null!=t[e]?t[e]:S[e],o)}function I(t){return t<0?0:Math.floor(t)}function T(t,e){return Math.floor(Math.random()*(e-t))+t}function D(t){return parseInt(t,16)}function M(t){return t.map(j)}function j(t){var e=String(t).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:D(e.substring(0,2)),g:D(e.substring(2,4)),b:D(e.substring(4,6))}}function E(t){t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight}function F(t){var e=t.getBoundingClientRect();t.width=e.width,t.height=e.height}function A(t){var e=t.angle*(Math.PI/180),o=t.spread*(Math.PI/180);return{x:t.x,y:t.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*t.startVelocity+Math.random()*t.startVelocity,angle2D:-e+(.5*o-Math.random()*o),tiltAngle:(.5*Math.random()+.25)
2*Math.PI,color:t.color,shape:t.shape,tick:0,totalTicks:t.ticks,decay:t.decay,drift:t.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*t.gravity,ovalScalar:.6,scalar:t.scalar,flat:t.flat}}function L(t,e){e.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.velocity*=e.decay,e.flat?(e.wobble=0,e.wobbleX=e.x+10*e.scalar,e.wobbleY=e.y+10*e.scalar,e.tiltSin=0,e.tiltCos=0,e.random=1):(e.wobble+=e.wobbleSpeed,e.wobbleX=e.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.y+10*e.scalar*Math.sin(e.wobble),e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2);var o=e.tick++/e.totalTicks,a=e.x+e.random*e.tiltCos,n=e.y+e.random*e.tiltSin,i=e.wobbleX+e.random*e.tiltCos,s=e.wobbleY+e.random*e.tiltSin;if(t.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-o)+")",t.beginPath(),r&&"path"===e.shape.type&&"string"==typeof e.shape.path&&Array.isArray(e.shape.matrix))t.fill(function(t,e,o,a,n,i,r){var s=new Path2D(t),c=new Path2D;c.addPath(s,new DOMMatrix(e));var l=new Path2D;return l.addPath(c,new DOMMatrix([Math.cos(r)*n,Math.sin(r)*n,-Math.sin(r)*i,Math.cos(r)*i,o,a])),l}(e.shape.path,e.shape.matrix,e.x,e.y,.1*Math.abs(i-a),.1*Math.abs(s-n),Math.PI/10*e.wobble));else if("bitmap"===e.shape.type){var c=Math.PI/10*e.wobble,l=.1*Math.abs(i-a),d=.1*Math.abs(s-n),u=e.shape.bitmap.width*e.scalar,h=e.shape.bitmap.height*e.scalar,p=new DOMMatrix([Math.cos(c)*l,Math.sin(c)*l,-Math.sin(c)*d,Math.cos(c)*d,e.x,e.y]);p.multiplySelf(new DOMMatrix(e.shape.matrix));var m=t.createPattern(_.transform(e.shape.bitmap),"no-repeat");m.setTransform(p),t.globalAlpha=1-o,t.fillStyle=m,t.fillRect(e.x-u/2,e.y-h/2,u,h),t.globalAlpha=1}else if("circle"===e.shape)t.ellipse?t.ellipse(e.x,e.y,Math.abs(i-a)*e.ovalScalar,Math.abs(s-n)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):function(t,e,o,a,n,i,r,s,c){t.save(),t.translate(e,o),t.rotate(i),t.scale(a,n),t.arc(0,0,1,r,s,c),t.restore()}(t,e.x,e.y,Math.abs(i-a)*e.ovalScalar,Math.abs(s-n)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI);else if("star"===e.shape)for(var f=Math.PI/2*3,v=4*e.scalar,g=8*e.scalar,k=e.x,y=e.y,C=5,b=Math.PI/C;C--;)k=e.x+Math.cos(f)*g,y=e.y+Math.sin(f)*g,t.lineTo(k,y),f+=b,k=e.x+Math.cos(f)*v,y=e.y+Math.sin(f)*v,t.lineTo(k,y),f+=b;else t.moveTo(Math.floor(e.x),Math.floor(e.y)),t.lineTo(Math.floor(e.wobbleX),Math.floor(n)),t.lineTo(Math.floor(i),Math.floor(s)),t.lineTo(Math.floor(a),Math.floor(e.wobbleY));return t.closePath(),t.fill(),e.tick<e.totalTicks}function O(t,o){var r,s=!t,c=!!P(o||{},"resize"),d=!1,u=P(o,"disableForReducedMotion",Boolean),h=i&&P(o||{},"useWorker")?x():null,p=s?E:F,m=!(!t||!h)&&!!t.__confetti_initialized,f="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function v(e,o,i){for(var s=P(e,"particleCount",I),c=P(e,"angle",Number),d=P(e,"spread",Number),u=P(e,"startVelocity",Number),h=P(e,"decay",Number),m=P(e,"gravity",Number),f=P(e,"drift",Number),v=P(e,"colors",M),g=P(e,"ticks",Number),k=P(e,"shapes"),y=P(e,"scalar"),C=!!P(e,"flat"),b=function(t){var e=P(t,"origin",Object);return e.x=P(e,"x",Number),e.y=P(e,"y",Number),e}(e),x=s,S=[],D=t.width*b.x,j=t.height*b.y;x--;)S.push(A({x:D,y:j,angle:c,spread:d,startVelocity:u,color:v[x%v.length],shape:k[T(0,k.length)],ticks:g,decay:h,gravity:m,drift:f,scalar:y,flat:C}));return r?r.addFettis(S):(r=function(t,e,o,i,r){var s,c,d=e.slice(),u=t.getContext("2d"),h=l(function(e){function l(){s=c=null,u.clearRect(0,0,i.width,i.height),_.clear(),r(),e()}s=w.frame(function e(){!a||i.width===n.width&&i.height===n.height||(i.width=t.width=n.width,i.height=t.height=n.height),i.width||i.height||(o(t),i.width=t.width,i.height=t.height),u.clearRect(0,0,i.width,i.height),(d=d.filter(function(t){return L(u,t)})).length?s=w.frame(e):l()}),c=l});return{addFettis:function(t){return d=d.concat(t),h},canvas:t,promise:h,reset:function(){s&&w.cancel(s),c&&c()}}}(t,S,p,o,i),r.promise)}function g(o){var a=u||P(o,"disableForReducedMotion",Boolean),n=P(o,"zIndex",Number);if(a&&f)return l(function(t){t()});s&&r?t=r.canvas:s&&!t&&(t=function(t){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=t,e}(n),document.body.appendChild(t)),c&&!m&&p(t);var i={width:t.width,height:t.height};function g(){if(h){var e={getBoundingClientRect:function(){if(!s)return t.getBoundingClientRect()}};return p(e),void h.postMessage({resize:{width:e.width,height:e.height}})}i.width=i.height=null}function k(){r=null,c&&(d=!1,e.removeEventListener("resize",g)),s&&t&&(document.body.contains(t)&&document.body.removeChild(t),t=null,m=!1)}return h&&!m&&h.init(t),m=!0,h&&(t.__confetti_initialized=!0),c&&!d&&(d=!0,e.addEventListener("resize",g,!1)),h?h.fire(o,i,k):v(o,i,k)}return g.reset=function(){h&&h.reset(),r&&r.reset()},g}function B(){return b||(b=O(null,{useWorker:!0,resize:!0})),b}o.exports=function(){return B().apply(this,arguments)},o.exports.reset=function(){B().reset()},o.exports.create=O,o.exports.shapeFromPath=function(t){if(!r)throw new Error("path confetti are not supported in this browser");var e,o;"string"==typeof t?e=t:(e=t.path,o=t.matrix);var a=new Path2D(e),n=document.createElement("canvas").getContext("2d");if(!o){for(var i,s,c=1e3,l=c,d=c,u=0,h=0,p=0;p<c;p+=2)for(var m=0;m<c;
2m+=2)n.isPointInPath(a,p,m,"nonzero")&&(l=Math.min(l,p),d=Math.min(d,m),u=Math.max(u,p),h=Math.max(h,m));i=u-l,s=h-d;var f=Math.min(10/i,10/s);o=[f,0,0,f,-Math.round(i/2+l)*f,-Math.round(s/2+d)*f]}return{type:"path",path:e,matrix:o}},o.exports.shapeFromText=function(t){var e,o=1,a="#000000",n='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';"string"==typeof t?e=t:(e=t.text,o="scalar"in t?t.scalar:o,n="fontFamily"in t?t.fontFamily:n,a="color"in t?t.color:a);var i=10*o,r=i+"px "+n,s=new OffscreenCanvas(i,i),c=s.getContext("2d");c.font=r;var l=c.measureText(e),d=Math.ceil(l.actualBoundingBoxRight+l.actualBoundingBoxLeft),u=Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent),h=l.actualBoundingBoxLeft+2,p=l.actualBoundingBoxAscent+2;d+=4,u+=4,(c=(s=new OffscreenCanvas(d,u)).getContext("2d")).font=r,c.fillStyle=a,c.fillText(e,h,p);var m=1/o;return{type:"bitmap",bitmap:s.transferToImageBitmap(),matrix:[m,0,0,m,-d*m/2,-u*m/2]}}}(function(){return void 0!==t?t:"undefined"!=typeof self?self:this||{}}(),e,!1),t.confetti=e.exports}(window,{});var P="nymg-alertify-js",I=["nymg-alertify-core-css","nymg-alertify-default-css"],T="nymgAlertifyLoader",D=new WeakMap;function M(t){return Boolean(t.alertify&&"function"==typeof t.alertify.set&&"function"==typeof t.alertify.alert)}function j(t,e,o){e=void 0===o.goToCartText?"Ok":e,o.alertify.set({labels:{ok:e}}),o.alertify.alert(t)}function E(t,e,o){"function"!=typeof e.alert?e.console&&"function"==typeof e.console.error&&e.console.error("Unable to display checkout error dialog",t,o):e.alert(t)}function F(t,e,o,a){const n=t.getElementById(e);if("loaded"===n?.dataset?.nymgAlertifyState)return Promise.resolve(n);const i=n??t.createElement(o);n||(i.id=e,i.dataset[T]="true","link"===o?(i.rel="stylesheet",i.href=a):(i.async=!0,i.src=a));const r=new Promise((t,o)=>{i.addEventListener("load",()=>{i.dataset.nymgAlertifyState="loaded",t(i)},{once:!0}),i.addEventListener("error",()=>{o(new Error(`Failed to load ${e}`))},{once:!0})});return n||t.head.appendChild(i),r}function A(t){if(M(t))return Promise.resolve();const e=D.get(t);if(e)return e;const o=function(t){const e=t.vocParams?.alertify_loader;if(!e||"string"!=typeof e.script_url||""===e.script_url||!Array.isArray(e.style_urls)||e.style_urls.length!==I.length||e.style_urls.some(t=>"string"!=typeof t||""===t))return null;const o=Number(e.timeout_ms);return{scriptUrl:e.script_url,styleUrls:e.style_urls,timeoutMs:Number.isFinite(o)?Math.max(50,Math.min(15e3,o)):8e3}}(t);if(!o||!t.document?.head)return Promise.reject(new Error("Alertify loader configuration is unavailable"));const a=[F(t.document,P,"script",o.scriptUrl),...o.styleUrls.map((e,o)=>F(t.document,I[o],"link",e))];let n;const i=Promise.race([Promise.all(a),new Promise((e,a)=>{n=t.setTimeout(()=>a(new Error("Alertify asset load timed out")),o.timeoutMs)})]).finally(()=>t.clearTimeout(n)).then(()=>{if(!M(t))throw new Error("Alertify loaded without exposing its API")}).catch(e=>{throw function(t){for(const e of[P,...I]){const o=t.getElementById(e);"true"===o?.dataset?.[T]&&o.remove()}}(t.document),e}).finally(()=>{M(t)||D.delete(t)});return D.set(t,i),i}function L(t){return new URLSearchParams(window.location.search).get(t)}function O(t,e,o=!0){const a=new URL(window.location.href);return a.searchParams.set(t,e),o&&window.history.replaceState({},"",a),a.toString()}!function(t,e,o,a){if("undefined"==typeof nymgData||!nymgData.ajaxUrl)return;const n=nymgData.ajaxUrl,i=nymgData.ajaxSecurity;t.ajaxSetup({cache:!1}),globalThis.voHoverBlock={hoverBlockClass:"vo-checkout--hover-block",hoverBlockSelector:".vo-checkout--hover-block",hoverBlockHeaderClass:"vo-checkout--hover-block--header",hoverBlockHeaderSelector:".vo-checkout--hover-block--header",hoverBlockContentClass:"vo-checkout--hover-block--content",hoverBlockContentSelector:".vo-checkout--hover-block--content",hoverBlockInnerContentClass:"vo-checkout--hover-block--inner-content",hoverBlockInnerContentSelector:".vo-checkout--hover-block--inner-content",closeHoverBlockClass:"vo-checkout--hover-block--close",closeHoverBlockSelector:".vo-checkout--hover-block--close",hoverBlockFooterClass:"vo-checkout--hover-block--footer",hoverBlockFooterSelector:".vo-checkout--hover-block--footer",hoverBlockButtonClass:"vo-checkout--hover-block--button",init:function(){voHoverBlock.initResizeFunctions()},initResizeFunctions:function(){t(e).on("resize",function(){voHoverBlock.resizeInnerContent()}).resize()},resizeInnerContent:function(){t(voHoverBlock.hoverBlockInnerContentSelector).each(function(){const o=t(this).parent(voHoverBlock.hoverBlockContentSelector),a=t(e).outerHeight()-t(voHoverBlock.hoverBlockHeaderSelector,o).outerHeight()-t(voHoverBlock.hoverBlockFooterSelector,o).outerHeight();t(this).outerHeight(a)})}},globalThis.voCheckoutCart={miniCartClass:"vo-checkout--mini-cart",miniCartSelector:".vo-checkout--mini-cart",cartClass:"vo-checkout--cart",cartSelector:".vo-checkout--cart",cartContentSelector:".vo-checkout--cart--content",cartShowClass:"vo-checkout--cart--show",cartHideClass:"vo-checkout--cart--hide",cartDisableClass:"vo-checkout--cart--disable",closeCartClass:"vo-checkout--cart--close",closeCartSelector:".vo-checkout--cart--close",proceedToCheckoutClass:"vo-checkout--cart--proceed-to-checkout",proceedToCheckoutSelector:".vo-checkout--cart--proceed-to-checkout",noAdditionalFeesSelector:".vo-checkout--cart--notice-additional-fees",additionalFeesClass:"additional_fees",additionalFeesSelector:".additional_fees",totalAmountClass:"vo-checkout--cart--total-amount",totalAmountSelector:".vo-checkout--cart--total-amount",totalItemsTextClass:"vo-checkout--cart--total-items",totalItemTextSelector:".vo-checkout--cart--total-items",cartItemsClass:"vo-checkout--cart--items",cartItemsSelector:".vo-checkout--cart--items",cartItemIdSelector:"#vo-checkout--cart-item-",cartItemPriceClass:"vo-checkout--cart--cart-item-price",cartItemPriceSelector:".vo-checkout--cart--cart-item-price",cartItemChildPriceClass:"vo-checkout--cart--cart-item-child-price",cartItemChildPriceSelector:".vo-checkout--cart--cart-item-child-price",cartItemQuantityInputClass:"vo-checkout--cart--cart-item-quantity-input",cartItemQuantityInputSelector:".vo-checkout--cart--cart-item-quantity-input",cartItemQuantityLessClass:"vo-checkout--cart--cart-item-quantity-less",cartItemQuantityLessSelector:".vo-checkout--cart--cart-item-quantity-less",cartItemQuantityMoreClass:"vo-checkout--cart--cart-item-quantity-more",cartItemQuantityMoreSelector:".vo-checkout--cart--cart-item-quantity-more",cartItemRemoveClass:"vo-checkout--cart--cart-item-remove",cartItemRemoveSelector:".vo-checkout--cart--cart-item-remove",cartItemLastUpdatedId:"vo-checkout--cart-last-updated",cartItemLastUpdatedSelector:"#vo-checkout--cart-last-updated",cartBusy:!1,quantityBusy:!1,cartItems:null,updatingUserData:!1,routineActive:!1,routineAllowed:!0,init:function(){var e,a,i;e=o.cookie,a=function(){voCheckoutCart.initCart([])},i=function(){t.post(n,{action:"vo-checkout-get-cart-items"},function(t){voCheckoutCart.initCart(t.items??null)},"json")},function(t){return t.split(";").some(function(t){const e=t.indexOf("=");if(-1===e)return!1;const o=t.slice(0,e).trim(),a=t.slice(e+1).trim();return"vo_session"===o&&""!==a})}(e)?i():setTimeout(a,0)}
2,initCart:function(e){voCheckoutCart.cartItems=e,voCheckoutCart.initCartHtml(),voCheckoutCart.initClickFunctions(),voCheckoutCart.initEcommerceRoutineCycle(),t(o).trigger("cartLoaded")},initCartHtml:function(){t("<div/>",{class:voCheckoutCart.miniCartClass,html:voCheckoutCart.getNumberOfItems(),tabIndex:"0"}).appendTo(t("body")),voCheckoutCart.getNumberOfItems()<1&&t(voCheckoutCart.miniCartSelector).addClass(voCheckoutCart.cartHideClass),t("<div/>",{class:voCheckoutCart.cartClass+" "+voHoverBlock.hoverBlockClass}).appendTo(t("body")),t("<div/>",{class:"vo-checkout--cart--content "+voHoverBlock.hoverBlockContentClass}).appendTo(t(voCheckoutCart.cartSelector)).css("padding-top",t(".floats").height()+"px"),t(".floats").remove(),t(voCheckoutCart.cartContentSelector).addClass("floats"),t("<div/>",{class:"vo-checkout--cart--header "+voHoverBlock.hoverBlockHeaderClass,html:"<h2>"+vocParams.shopping_cart+'<span class="fa fa-close '+voCheckoutCart.closeCartClass+" "+voHoverBlock.closeHoverBlockClass+'" tabindex="0"></span></h2>'}).appendTo(t(voCheckoutCart.cartContentSelector)),t("<div/>",{class:voCheckoutCart.cartItemsClass+" "+voHoverBlock.hoverBlockInnerContentClass,html:voCheckoutCart.getCartItemsContent()}).appendTo(t(voCheckoutCart.cartContentSelector)),t("<div/>",{class:"vo-checkout--cart--footer "+voHoverBlock.hoverBlockFooterClass,html:'<div class="additional_fees">'+r.getFormattedAdditionalFees(voCheckoutCart)+'</div><div class="vo-checkout--cart--total">'+vocParams.total_amount+'<span class="'+voCheckoutCart.totalItemsTextClass+'">'+vocParams.cart_items_count_text+'</span></div><div class="'+voCheckoutCart.totalAmountClass+'">'+r.getFormattedAmount(voCheckoutCart.getTotalCartAmount())+'</div><a href="'+vocParams.checkout_url+'" class="'+voCheckoutCart.proceedToCheckoutClass+" "+voHoverBlock.hoverBlockButtonClass+" "+(voCheckoutCart.getCartItemsCount()<1?"disabled":"")+'">'+vocParams.proceed_to_checkout+"</a>"}).appendTo(t(voCheckoutCart.cartContentSelector))},initClickFunctions:function(){t(o).on("click",voCheckoutCart.closeCartSelector,function(){voCheckoutCart.toggleCart()}),t(o).on("click",voCheckoutCart.miniCartSelector,function(){voCheckoutCart.toggleCart()}),t(o).on("click",voCheckoutCart.cartItemQuantityLessSelector,function(){const e=t(this).data("cart_item_id");voCheckoutCart.changeCartItemQuantity(e,-1)}),t(o).on("click",voCheckoutCart.cartItemQuantityMoreSelector,function(){const e=t(this).data("cart_item_id");voCheckoutCart.changeCartItemQuantity(e,1)}),t(o).on("click",voCheckoutCart.cartItemRemoveSelector,function(){const e=t(this).data("cart_item_id");voCheckoutCart.changeCartItemQuantity(e,0,!0)}),t(o).on("click",voCheckoutCart.proceedToCheckoutSelector,function(t){voCheckoutCart.getCartItemsCount()<1&&t.preventDefault()})},getCartItemsCount:function(){return null===voCheckoutCart.cartItems?0:voCheckoutCart.cartItems.length},initEcommerceRoutineCycle:async function(){const t=Math.max(parseInt(vocParams.cart_sync_time),5e3);await voCheckoutCart.ecommerceRoutineCycle(),setInterval(await voCheckoutCart.ecommerceRoutineCycle,t)},ecommerceRoutineCycle:async function(){if(!voCheckoutCart.routineAllowed)return;if(voCheckoutCart.getNumberOfItems()<1)return;if(voCheckoutCart.routineActive)return;voCheckoutCart.routineActive=!0;const e={action:"vo-checkout-ecommerce-routine",checkout:voCheckoutCheckout.isCheckout};if(t(voCheckoutCheckout.formSelector).length){const o=t(voCheckoutCheckout.formSelector).serializeArray();if(voCheckoutCheckout.iti){const t=voCheckoutCheckout.iti.getSelectedCountryData();t&&t.dialCode&&o.push({name:"phone_ext",value:"+"+t.dialCode})}e.userdata=o}await t.post(n,e,async function(t){if(!t.length)return;let e;for(const o in t)null!==t[o].function_name&&(e=t[o].function_name,null!==t[o].args?voDoFunction(e,t[o].args):voDoFunction(e))},"json"),voCheckoutCart.routineActive=!1},stopEcommerceRoutineCycle:function(){voCheckoutCart.routineAllowed=!1},reloadCartItems:function(){voCheckoutCheckout.isCheckout||t.post(n,{action:"vo-checkout-get-cart-items"},function(e){voCheckoutCart.cartItems=e.items??null,voCheckoutCart.disableCart();const o=voCheckoutCart.getCartItemsContent();t(voCheckoutCart.cartItemsSelector).html(o),voCheckoutCart.syncCartTotals(!1),voCheckoutCart.enableCart()},"json").then(function(){t(o).trigger("cartLoaded")})},openCart:function(){t(voCheckoutCart.cartSelector).addClass(voCheckoutCart.cartShowClass),t(voCheckoutCart.miniCartSelector).addClass(voCheckoutCart.cartShowClass),voHoverBlock.resizeInnerContent(),t(o).trigger("cartLoaded")},toggleCart:function(e=!1){t(voCheckoutCart.cartSelector).hasClass(voCheckoutCart.cartShowClass)||e?(t(voCheckoutCart.cartSelector).removeClass(voCheckoutCart.cartShowClass),t(voCheckoutCart.miniCartSelector).removeClass(voCheckoutCart.cartShowClass)):voCheckoutCart.openCart()},disableCart:function(){t(voCheckoutCart.cartSelector).addClass(voCheckoutCart.cartDisableClass)},enableCart:function(){t(voCheckoutCart.cartSelector).removeClass(voCheckoutCart.cartDisableClass)},getLastUpdatedNow:function(){const t=new Date;return t.getTime()+6e4*t.getTimezoneOffset()},getNumberOfItems:function(){let t=0;if(voCheckoutCart.getCartItemsCount()<1)return t;for(const e in voCheckoutCart.cartItems)Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,e)&&(t+=parseInt(voCheckoutCart.cartItems[e].product_quantity));return t},getTotalItemText:function(){const t=voCheckoutCart.getNumberOfItems();let e=vocParams.item_plural.replace("%s",t);return 1===t&&(e=vocParams.item_singular)," ("+e+")"},getTotalDepositAmount:function(){let t=0;for(const e in voCheckoutCart.cartItems)if(Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,e)){const o=voCheckoutCart.cartItems[e];if(0!==o.parent_id)continue;if(!o.deposits||0===o.deposits.length)continue;const a=parseFloat(o.product_quantity??0);for(const e of o.deposits)if(e.active){const o=parseFloat(e.amount??0);t=parseFloat(t)+a*o}}return t},getTotalCartAmount:function(){let t=0;if(voCheckoutCart.getCartItemsCount()<1)return t;for(const e in voCheckoutCart.cartItems)Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,e)&&(t=parseFloat(t)+parseFloat(voCheckoutCart.cartItems[e].product_quantity??0)*parseFloat(voCheckoutCart.cartItems[e].product_price??0));return t},updateAdditionalFees:function(){const e=r.getFormattedAdditionalFees(voCheckoutCart);t(voCheckoutCart.additionalFeesSelector).html(e)},changeCartItemQuantity:async function(e,o,a){if(voCheckoutCart.quantityBusy)return;voCheckoutCart.quantityBusy=!0,a=void 0!==a&&a;let n=0;const i=parseInt(o),r=voCheckoutCart.cartItems??[];for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&r[s].id===e&&(n=a?i:parseInt(r[s].product_quantity??0)+i,r[s].product_quantity=n,r[s].product_quantity<1&&(r[s].product_quantity=0,t(voCheckoutCart.cartItemIdSelector+e).remove()));voCheckoutCart.cartItems=r,voCheckoutCart.syncCartTotals(!0),voCheckoutCart.quantityBusy=!1},syncCartTotals:function(e){if(!0===(e=void 0!==e&&e)&&(voCheckoutCart.disableCart(),!voCheckoutCart.cartBusy)){voCheckoutCart.cartBusy=!0;const e={action:"vo-checkout-update-cart-totals",cartItems:voCheckoutCart.cartItems};t.post(n,e,function(e){void 0!==e.message&&""!==e.message&&r.showErrorDialog(e.message,vocParams.add_to_cart_error_button),void 0!==e.reload&&!0===e.reload&&voCheckoutCart.reloadCartItems(),voCheckoutCart.cartBusy=!1,voCheckoutCart.enableCart(),t(o).trigger("cartLoaded")},"json")}for(const o in voCheckoutCart.cartItems)if(Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,o)){const e=voCheckoutCart.cartItems[o];0===e.parent_id?(t(voCheckoutCart.cartItemQuantityInputSelector,voCheckoutCart.cartItemIdSelector+e.id).html(e.product_quantity),t(voCheckoutCart.cartItemPriceSelector+":not("+voCheckoutCart.cartItemChildPriceSelector+")",voCheckoutCart.cartItemIdSelector+e.id).html(r.getFormattedAmount(parseFloat(e.product_quantity)*parseFloat(e.product_price)))):t(voCheckoutCart.cartItemChildPriceSelector,voCheckoutCart.cartItemIdSelector+e.parent_id).html(r.getFormattedAmount(parseFloat(e.product_quantity)*parseFloat(e.product_price)))}t(voCheckoutCart.miniCartSelector).html(voCheckoutCart.getNumberOfItems()),t(voCheckoutCart.totalItemTextSelector).html(voCheckoutCart.getTotalItemText()),t(voCheckoutCart.totalAmountSelector).html(r.getFormattedAmount(voCheckoutCart.getTotalCartAmount())),voCheckoutCart.updateAdditionalFees(),voCheckoutCart.getNumberOfItems()<1?(voCheckoutCheckout.isCheckout&&!voCheckoutCheckout.isProcessing&&voCheckoutCheckout.goToPreviousPage(),t(voCheckoutCart.miniCartSelector).addClass(voCheckoutCart.cartHideClass),voCheckoutCart.toggleCart(!0)):t(voCheckoutCart.miniCartSelector).removeClass(voCheckoutCart.cartHideClass),voCheckoutCart.getCartItemsCount()<1?t(voCheckoutCart.proceedToCheckoutSelector).addClass("disabled"):t(voCheckoutCart.proceedToCheckoutSelector).removeClass("disabled")},addCartItem:async function(e){voCheckoutCart.getCartItemsCount()<1&&(voCheckoutCart.cartItems=[]),voCheckoutCart.cartItems.push(e),t(voCheckoutCart.cartItemsSelector).html(voCheckoutCart.getCartItemsContent()),voCheckoutCart.syncCartTotals(),voCheckoutCart.openCart()},updateCartItem:async function(t){await voCheckoutCart.changeCartItemQuantity(t.id,t.product_quantity,!0),voCheckoutCart.openCart()},getCartItemsContent:function(){voCheckoutCart.getCartItemsCount()<1&&(voCheckoutCart.cartItems=[]);let t='<div class="vo-checkout--cart--cart-items">';for(const e in voCheckoutCart.cartItems)if(Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,e)){if(parseInt(voCheckoutCart.cartItems[e].product_quantity??0)<1)continue;t+=voCheckoutCart.getCartItemContent(voCheckoutCart.cartItems[e])}return t+="</div>",t},getCartItemContent:function(t){voCheckoutCart.getCartItemsCount()<1&&(voCheckoutCart.cartItems=[]);let e="";if(0===t.parent_id){e+='<div class="vo-checkout--cart--cart-item" id="vo-checkout--cart-item-'+t.id+'">',e+='<div class="vo-checkout--cart--cart-item-name">',e+=t.product_name,e+="</div>",e+='<div class="vo-checkout--cart--cart-item-unit-price">',e+=r.getFormattedAmount(parseFloat(t.product_price)),e+="</div>",e+=t.product_meta_data_html;
2for(const o in voCheckoutCart.cartItems)Object.prototype.hasOwnProperty.call(voCheckoutCart.cartItems,o)&&voCheckoutCart.cartItems[o].parent_id===t.id&&(e+='<div class="vo-checkout--cart--cart-item-child">',e+='<div class="vo-checkout--cart--cart-item-quantity">',e+=voCheckoutCart.cartItems[o].product_name,e+="</div>",e+='<div class="'+voCheckoutCart.cartItemPriceClass+" "+voCheckoutCart.cartItemChildPriceClass+'">',e+=r.getFormattedAmount(parseFloat(voCheckoutCart.cartItems[o].product_price)*parseFloat(voCheckoutCart.cartItems[o].product_quantity)),e+="</div>",e+="</div>");e+='<div class="vo-checkout--cart--cart-item-quantity '+(1===t.quantity_locked?"vo-checkout--cart--cart-item-quantity--locked":"")+'">',e+='<div class="'+voCheckoutCart.cartItemQuantityLessClass+'" data-cart_item_id="'+t.id+'" tabindex="0">-</div>',e+='<div class="'+voCheckoutCart.cartItemQuantityInputClass+'">',e+=t.product_quantity,e+="</div>",e+='<div class="'+voCheckoutCart.cartItemQuantityMoreClass+'" data-cart_item_id="'+t.id+'" tabindex="0">+</div>',e+='<div class="'+voCheckoutCart.cartItemRemoveClass+'" data-cart_item_id="'+t.id+'" tabindex="0"></div>',e+="</div>",e+='<div class="'+voCheckoutCart.cartItemPriceClass+'">',e+=r.getFormattedAmount(parseFloat(t.product_price)*parseFloat(t.product_quantity)),e+="</div>",e+="</div>"}return e}},globalThis.voCheckoutCheckout={iti:!1,isCheckout:!1,isProcessing:!1,url:vocParams.checkout_url,validatedFields:new Set,checkoutButtonSelector:".vo-checkout--button",checkoutCounter:".vo-checkout--checkout-countdown__counter",checkoutLoaderClass:"vo-checkout-loading",checkoutSuccessContentSelector:".vo-checkout--content",checkoutSuccessSelector:".vo-checkout--checkout-success",checkoutSuccessOrderOverviewSelector:".success-order-overview",countryCodeSelector:"#vo-checkout--country",datePickerSelector:".vo-checkout--date-picker",formSelector:"#vo-checkout--billing-form",giftDataSelector:".vo-checkout--form-gift-data",isGiftSelector:".vo-checkout--form-is_gift",itemsSelector:".vo-checkout-items",newsletterSelector:"#vo-checkout--newsletter",orderOverviewExtraCostClass:"vo-checkout--order-overview--extra-cost",orderOverviewExtraCostSelector:".vo-checkout--order-overview--extra-cost",orderOverviewShippingSelector:".vo-checkout--order-overview--shipping",overviewSelector:".vo-checkout--order-overview-wrap",serviceFeeSelector:".vo-checkout--order-overview--service-fee",shippingMethodSelector:".vo-checkout--shipping-method",shippingMethodsSelector:"#vo-checkout--shipping-methods",summarySelector:".vo-checkout-summary__content",summarySelectorSidebar:".vo-checkout-sidebar .vo-checkout-summary__content",summarySelectorStepContent:".vo-checkout-step__content .vo-checkout-summary__content",totalCellSelector:"#vo-checkout--order-overview--total-cell",totalSelector:"#vo-checkout--order-overview--total",upsellSelector:".vo-checkout-upsell",currentShippingMethodPrice:0,currentExtraCostPrice:0,currentExtraCostLabel:"",timer:!1,timerMinutes:0,timerSeconds:0,timerStartTime:0,timerEndTime:0,loading:!1,init:function(){if(t(".vo-checkout-page").length)voCheckoutCheckout.isCheckout=!0,t(voCheckoutCheckout.itemsSelecter).length||(voCheckoutCheckout.isProcessing=!0),voCheckoutCheckout.initAjaxFunctions(),voCheckoutCheckout.initShippingMethods(),voCheckoutCheckout.initChangeFunctions(),voCheckoutCheckout.initClickFunctions(),voCheckoutCheckout.initCheckboxes(),voCheckoutCheckout.initDatePickers(),voCheckoutCheckout.initTelInput();else if(t(voCheckoutCheckout.checkoutSuccessSelector).length)voCheckoutCheckout.initAjaxFunctionsSuccessPage();else if(t(voCheckoutCheckout.checkoutSuccessOrderOverviewSelector).length){let t=this;setTimeout(function(){t.showConfetti()},1e3)}else t(voCheckoutCheckout.orderOverviewShippingSelector).show();voCheckoutCheckout.initTimer()},showConfetti:function(){confetti({scalar:2,spread:180,particleCount:400,origin:{y:-.1},startVelocity:-50})},initDatePickers:function(){voCheckoutCheckout.datePickerSelector.length&&t(voCheckoutCheckout.datePickerSelector).datepicker({altFormat:"yy-mm-dd",altField:"."+t(voCheckoutCheckout.datePickerSelector).data("target"),minDate:new Date,dateFormat:vocParams.date_format,monthNames:voCheckoutCheckout.getMonthNames(),dayNames:voCheckoutCheckout.getDayNames(),dayNamesMin:voCheckoutCheckout.getDayNamesMin(),dayNamesShort:voCheckoutCheckout.getDayNamesMin()})},initTelInput:function(){if(!t(voCheckoutCheckout.formSelector).length)return;const a=vocParams.preferredCountries[0]||"us",n={us:"(201) 555-0123",gb:"07400 123456",nl:"06 12345678",fr:"06 12 34 56 78",de:"0151 12345678",es:"612 34 56 78",it:"312 345 6789"},i=o.querySelector("#vo-checkout--phone_input");i&&(i.placeholder=n[a]||"+00123456",voCheckoutCheckout.iti=e.intlTelInput(i,{utilsScript:vocParams.telInputUtilScript,hiddenInput:"vo-checkout--phone",preferredCountries:vocParams.preferredCountries,initialCountry:a,separateDialCode:!0,nationalMode:!1,autoPlaceholder:"aggressive",formatOnDisplay:!0}),i.addEventListener("blur",function(){voCheckoutCheckout.validatePhoneField(this)}),i.addEventListener("input",function(){voCheckoutCheckout.validatePhoneField(this)}))},initAjaxFunctions:function(){voCheckoutCheckout.getShippingMethods()},initAjaxFunctionsSuccessPage:function(){const e={action:"vo-checkout-get-payment-status",security:i,orderId:vocParams.order_id};voCheckoutCheckout.loading?voCheckoutCheckout.initCheckoutContent():(voCheckoutCheckout.loading=!0,t.post(n,e,function(e){e.html&&t(voCheckoutCheckout.checkoutSuccessSelector).hide().html(e.html).fadeIn(),voCheckoutCheckout.loading=!1,voCheckoutCheckout.initCheckoutContent()},"json"))},initCheckoutContent:function(){t(voCheckoutCheckout.checkoutSuccessContentSelector).length&&t(voCheckoutCheckout.checkoutSuccessContentSelector).fadeIn()},initChangeFunctions:function(){t(voCheckoutCheckout.countryCodeSelector).on("change",function(t){voCheckoutCheckout.getShippingMethods(),t.preventDefault()}),voCheckoutCheckout.initFormValidation()},initClickFunctions:function(){t(o).on("change",voCheckoutCheckout.shippingMethodSelector+" input[type=radio]",async function(e){const o=t(voCheckoutCheckout.shippingMethodSelector+" input[type=radio]:checked"),a=parseFloat(o.data("price"));t("label"+voCheckoutCheckout.shippingMethodSelector).each(function(){t(this).removeClass("checked")}),o.closest("label").addClass("checked"),voCheckoutCheckout.updateShippingCosts(a),await voCheckoutCheckout.getSummaryOverview()}),t(o).on("click",voCheckoutCheckout.isGiftSelector+" input[type=checkbox]",function(e){t(this).is(":checked")?t(voCheckoutCheckout.giftDataSelector).stop().slideDown():t(voCheckoutCheckout.giftDataSelector).stop().slideUp()}),t(o).on("change",voCheckoutCheckout.upsellSelector+' input[type="checkbox"]',async function(){await voCheckoutCheckout.getSummaryOverview()}),t(o).on("change",voCheckoutCheckout.upsellSelector+" select",async function(){await voCheckoutCheckout.getSummaryOverview()})}
2,initCheckboxes:function(){t(voCheckoutCheckout.isGiftSelector+" input[type=checkbox]").is(":checked")&&t(voCheckoutCheckout.giftDataSelector).stop().slideDown()},initShippingMethods:function(){t("<div/>",{id:"vo-checkout--shipping-methods"}).insertBefore("#vo-checkout-step-2 .vo-checkout-summary__content").hide()},initTimer:function(){const e=t(voCheckoutCheckout.checkoutCounter);if(!e.length)return;if(t("body").hasClass("hide-seating"))return;const o=e.text().trim();if(!o.length)return;if(!o.includes(":"))return;const a=t("#popup-timer");if(a){const t=e.closest(".vo-checkout-item").prop("id");a.prop("data-product",t)}const n=o.split(":");voCheckoutCheckout.timerMinutes=parseInt(n[0]),voCheckoutCheckout.timerSeconds=parseInt(n[1]);const i=60*voCheckoutCheckout.timerMinutes+voCheckoutCheckout.timerSeconds;voCheckoutCheckout.timerStartTime=new Date,voCheckoutCheckout.timerEndTime=new Date(voCheckoutCheckout.timerStartTime.getTime()+1e3*i),voCheckoutCheckout.timer=setInterval(voCheckoutCheckout.updateTimer,500)},updateTimer:function(){const e=new Date,o=Math.round((voCheckoutCheckout.timerEndTime.getTime()-e.getTime())/1e3);if(o>=0)voCheckoutCheckout.timerSeconds=o%60,voCheckoutCheckout.timerMinutes=(o-voCheckoutCheckout.timerSeconds)/60,t(voCheckoutCheckout.checkoutCounter).text(voCheckoutCheckout.padStart(voCheckoutCheckout.timerMinutes,2)+":"+voCheckoutCheckout.padStart(voCheckoutCheckout.timerSeconds,2));else{clearInterval(voCheckoutCheckout.timer);const e=t("#popup-timer"),o=e.data("popup-title")?e.data("popup-title"):"";let a=t(".vo-checkout-items .vo-checkout-item").length;t(".ny-popup__header",e).length||(e.wrapInner('<div class="ny-popup__content"></div>'),e.prepend('<div class="ny-popup__header">'+o+'<button class="ny-popup__reload"></button></div>'),e.wrapInner('<div class="ny-popup__modal">')),e.addClass("ny-popup--active"),t("body").addClass("ny-popup-open"),t(".ny-popup__reload").on("click",function(o){o.preventDefault(),t("body").removeClass("ny-popup-open");const n=e.prop("data-product")??"0";n&&(t('.vo-checkout-item__remove[data-cart-item-id="'+n.replace("item-","")+'"]').click(),a--),setTimeout(function(){e.removeClass("ny-popup--active"),0===a?voCheckoutCheckout.goToPreviousPage():location.reload()},500)})}},goToPreviousPage:function(){e.location.href=t(".vo-checkout-header__back").prop("href")??"/"},padStart:function(t,e){let o=t+"";for(;o.length<e;)o="0"+o;return o},getPreviousPageUrl:function(){return t(o).trigger("emptiedCart"),t(".vo-checkout-header__back").prop("href")??"/"},resetShippingCosts:function(){t(".price",voCheckoutCheckout.orderOverviewShippingSelector).empty(),t(voCheckoutCheckout.orderOverviewShippingSelector).hide(),t(voCheckoutCheckout.shippingMethodsSelector).html("").hide()},updateShippingCosts:function(e){voCheckoutCheckout.currentShippingMethodPrice=e,t(".price",voCheckoutCheckout.orderOverviewShippingSelector).html(r.getFormattedAmount(e)),t(voCheckoutCheckout.orderOverviewShippingSelector).fadeIn(),voCheckoutCheckout.updateOrderTotal()},updateOrderTotal:function(){voCheckoutCheckout.getExtraCosts();const e=parseFloat(t(voCheckoutCheckout.totalSelector).val())+voCheckoutCheckout.currentShippingMethodPrice+voCheckoutCheckout.currentExtraCostPrice;t(voCheckoutCheckout.totalCellSelector).html(r.getFormattedAmount(e))},addExtraCost:function(e,o,a){t(voCheckoutCheckout.orderOverviewExtraCostSelector+'[data-identifier="'+o+'"]').length?0===a?t(voCheckoutCheckout.orderOverviewExtraCostSelector+'[data-identifier="'+o+'"]').remove():t(".price",voCheckoutCheckout.orderOverviewExtraCostSelector+'[data-identifier="'+o+'"]').html(r.getFormattedAmount(a)):t("<tr/>",{class:voCheckoutCheckout.orderOverviewExtraCostClass,"data-identifier":o,html:"<td>"+e+'</td><td></td><td class="price" data-amount="'+a+'">'+r.getFormattedAmount(a)+"</td>"}).insertBefore(t(voCheckoutCheckout.serviceFeeSelector)),voCheckoutCheckout.updateOrderTotal()},getExtraCosts:function(){let e=0;t(voCheckoutCheckout.orderOverviewExtraCostSelector).each(function(){const o=t(".price",this);if(o.length){const t=o.data("amount");t&&(e+=parseFloat(t))}}),voCheckoutCheckout.currentExtraCostPrice=e},setShippingMethods:function(e){t(voCheckoutCheckout.shippingMethodsSelector).html('<p class="vo-checkout--shipping-label"><strong>'+vocParams.shipping_method_label+": </strong></p>");let o=!1;for(const a in e){if(!Object.prototype.hasOwnProperty.call(e,a))continue;const n=e[a],i=t("<label/>",{class:"vo-checkout--shipping-method"+(o?"":" checked"),html:'<input type="radio" value="'+n.id+'" name="vo-checkout--shipping_method_price_id" '+(o?"":"checked ")+' data-price="'+n.price+'" /> '+voCheckoutCheckout.getShippingMethodLabel(n.shipping_method.name)+" ("+r.getFormattedAmount(n.price)+")"}).appendTo(voCheckoutCheckout.shippingMethodsSelector);!1===o&&(o=n.id);const s=vocParams.shipping_tooltips;if(""!==n.tooltip){const e=s[n.shipping_method.name]??"";""!==e&&(i.addClass("vo-checkout--tooltip"),t("<div/>",{class:"vo-checkout--tooltip__text",html:e}).appendTo(i))}}t(voCheckoutCheckout.shippingMethodsSelector).show()},getShippingMethodLabel:function(t){const e=vocParams.shipping_labels;return e.hasOwnProperty(t)?e[t]:t},getShippingMethods:function(){const e={action:"vo-checkout-get-shipping-methods",countryCode:t(voCheckoutCheckout.countryCodeSelector).val()};voCheckoutCheckout.loading||(voCheckoutCheckout.loading=!0,t.post(n,e,function(t){t.length?(voCheckoutCheckout.updateShippingCosts(parseFloat(t[0].price)),voCheckoutCheckout.setShippingMethods(t)):voCheckoutCheckout.resetShippingCosts(),voCheckoutCheckout.loading=!1,voCheckoutCheckout.getSummaryOverview()},"json"))},getCartOverview:async function(){const e={action:"vo-checkout-get-cart-overview"};return voCheckoutCheckout.loading?voCheckoutCheckout.getSummaryOverview():(voCheckoutCheckout.loading=!0,t(voCheckoutCheckout.itemsSelector).addClass(voCheckoutCheckout.checkoutLoaderClass),new Promise(o=>{t.post(n,e,function(e){const a=e.html??"";t(voCheckoutCheckout.itemsSelector).replaceWith(a),t(voCheckoutCheckout.itemsSelector).removeClass(voCheckoutCheckout.checkoutLoaderClass),voCheckoutCheckout.loading=!1,voCheckoutCheckout.getSummaryOverview().then(o)},"json")}))},reloadCheckoutItems:async function(){const e={action:"voc-checkout-cart-refresh",discount:t("#discount_code").val()};return voCheckoutCheckout.loading?voCheckoutCheckout.getSummaryOverview():(voCheckoutCheckout.loading=!0,t(voCheckoutCheckout.itemsSelector).addClass(voCheckoutCheckout.checkoutLoaderClass),new Promise(a=>{t.post(n,e,function(e){const n=e.html??"";t(voCheckoutCheckout.itemsSelector).html(n),t(voCheckoutCheckout.itemsSelector).removeClass(voCheckoutCheckout.checkoutLoaderClass),voCheckoutCheckout.loading=!1,voCheckoutCheckout.getSummaryOverview().then(()=>{t(o).trigger("cartLoaded"),a()})},"json")}))},addSelectedUpsellProductsToCart:async function(){const e=voCheckoutCheckout.upsellSelector;if(!t(e).length)return;const o=t(e+' input[type="checkbox"]').map(async function(){const e=t(this).attr("value"),o=t('.vo-checkout-upsell select[data-product-id="'+e+'"]');return t(this).is(":checked")?(o&&o.removeClass("hidden"),t.post(n,{action:"voc-products-add-to-cart",productId:e,quantity:o?o.val():1,setQuantity:!0}).then(function(t){})):(o&&o.addClass("hidden"),t.post(n,{action:"voc-products-remove-from-cart",productId:e}))}).get();await Promise.all(o)},setSummaryExtraCosts(t=0,e=""){voCheckoutCheckout.currentExtraCostPrice=t,voCheckoutCheckout.currentExtraCostLabel=e},getSummaryShippingCosts(){const e=t(voCheckoutCheckout.shippingMethodSelector+" input[type=radio]:checked");return e.length?parseFloat(e.data("price")):0},getSummaryOverview:async function(){t(o).trigger("updateExtraCosts");const e=voCheckoutCheckout.getSummaryShippingCosts();await voCheckoutCheckout.addSelectedUpsellProductsToCart();const a={action:"vo-checkout-get-summary-overview",shipping_cost:e,extra_costs:voCheckoutCheckout.currentExtraCostPrice,extra_costs_label:voCheckoutCheckout.currentExtraCostLabel};return voCheckoutCheckout.loading?Promise.resolve():(voCheckoutCheckout.loading=!0,t(voCheckoutCheckout.summarySelector).addClass(voCheckoutCheckout.checkoutLoaderClass),new Promise(e=>{t.post(n,a,function(o){o.sidebar.length&&o.step_content.length&&(voCheckoutCheckout.updateShippingCosts(voCheckoutCheckout.currentShippingMethodPrice),t(voCheckoutCheckout.summarySelectorSidebar).replaceWith(o.sidebar),t(voCheckoutCheckout.summarySelectorStepContent).replaceWith(o.step_content),t(voCheckoutCheckout.summarySelector).removeClass(voCheckoutCheckout.checkoutLoaderClass),voCheckoutCheckout.loading=!1),t(voCheckoutCheckout.summarySelector).removeClass(voCheckoutCheckout.checkoutLoaderClass),voCheckoutCheckout.loading=!1,e()},"json")}))},getMonthNames:function(){return[vocParams.translations["01_long"],vocParams.translations["02_long"],vocParams.translations["03_long"],vocParams.translations["04_long"],vocParams.translations["05_long"],vocParams.translations["06_long"],vocParams.translations["07_long"],vocParams.translations["08_long"],vocParams.translations["09_long"],vocParams.translations["10_long"],vocParams.translations["11_long"],vocParams.translations["12_long"]]},getDayNames:function(){return[vocParams.translations.sunday_long,vocParams.translations.monday_long,vocParams.translations.tuesday_long,vocParams.translations.wednesday_long,vocParams.translations.thursday_long,vocParams.translations.friday_long,vocParams.translations.saturday_long]},getDayNamesMin:function(){return[vocParams.translations.sunday_min,vocParams.translations.monday_min,vocParams.translations.tuesday_min,vocParams.translations.wednesday_min,vocParams.translations.thursday_min,vocParams.translations.friday_min,vocParams.translations.saturday_min]},initFormValidation:function(){t(voCheckoutCheckout.formSelector).find('input[type="text"], input[type="email"], input[type="tel"], select').each(function(){const e=t(this),o=e.attr("type"),a=e.attr("name");
2"hidden"!==o&&"vo-checkout--phone_input"!==e.attr("id")&&(e.on("blur",function(){voCheckoutCheckout.validateField(this)}),e.on("input",function(){clearTimeout(this.validationTimeout),this.validationTimeout=setTimeout(()=>{voCheckoutCheckout.validateField(this)},300)}),a&&(a.includes("name")||a.includes("city")||a.includes("street"))&&e.on("blur",function(){voCheckoutCheckout.correctCapitalization(this)}))}),voCheckoutCheckout.fixAutofillMapping()},validateField:function(e){const o=t(e),a=o.closest(".vo-checkout--form-input"),n=o.attr("name"),i=o.val().trim(),r=o.attr("required")||o.prop("required");return a.removeClass("error valid"),r&&!i||"email"===o.attr("type")&&i&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)||n&&n.includes("postal_code")&&i&&i.length<3?(a.addClass("error"),voCheckoutCheckout.validatedFields.delete(n),!1):!i||(a.addClass("valid"),voCheckoutCheckout.validatedFields.add(n),!0)},validatePhoneField:function(e){const o=t(e),a=o.closest(".vo-checkout--form-input");if(voCheckoutCheckout.iti)return a.removeClass("error valid"),o.val().trim()?voCheckoutCheckout.iti.isValidNumber()?(a.addClass("valid"),voCheckoutCheckout.validatedFields.add("vo-checkout--phone_input"),!0):(a.addClass("error"),voCheckoutCheckout.validatedFields.delete("vo-checkout--phone_input"),!1):((o.attr("required")||o.prop("required"))&&a.addClass("error"),!1)},correctCapitalization:function(e){const o=t(e);let a=o.val().trim();if(!a)return;const n=(i=a)===i.toUpperCase()||i===i.toLowerCase()?i.replace(/\w\S*/g,t=>{const e=t.toLowerCase();return["van","de","der","den","van der","von","zu"].includes(e)&&t!==i.substring(0,t.length)?e:t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):i;var i;n!==a&&o.val(n)},fixAutofillMapping:function(){t("#vo-checkout--first_name").attr("autocomplete","given-name"),t("#vo-checkout--last_name").attr("autocomplete","family-name"),t("#vo-checkout--email").attr("autocomplete","email"),t("#vo-checkout--phone_input").attr("autocomplete","tel"),t("#vo-checkout--company").attr("autocomplete","organization"),t("#vo-checkout--street").attr("autocomplete","address-line1"),t("#vo-checkout--house_number").attr("autocomplete","address-line2"),t("#vo-checkout--postal_code").attr("autocomplete","postal-code"),t("#vo-checkout--city").attr("autocomplete","address-level2"),t("#vo-checkout--country").attr("autocomplete","country"),t("#vo-checkout--street, #vo-checkout--house_number").on("input",function(){const e=t("#vo-checkout--street"),o=t("#vo-checkout--house_number"),a=e.val();if(a&&!o.val()){const t=a.match(/^(\d+[a-zA-Z]?)\s+(.+)$/)||a.match(/^(.+)\s+(\d+[a-zA-Z]?)$/);t&&(/^\d/.test(t[1])?(o.val(t[1]),e.val(t[2])):(e.val(t[1]),o.val(t[2])),voCheckoutCheckout.validateField(e[0]),voCheckoutCheckout.validateField(o[0]))}})}};const r={openCheckout:function(){r.openCenteredPopup(vocParams.checkout_url,"vo-checkout",320,525)},openCenteredPopup:function(t,n,i,r){const s=e.screenLeft!==a?e.screenLeft:screen.left,c=e.screenTop!==a?e.screenTop:screen.top,l=(e.innerWidth?e.innerWidth:o.documentElement.clientWidth?o.documentElement.clientWidth:screen.width)/2-i/2+s,d=(e.innerHeight?e.innerHeight:o.documentElement.clientHeight?o.documentElement.clientHeight:screen.height)/2-r/2+c,u=e.open(t,n,"scrollbars=yes, width="+i+", height="+r+", top="+d+", left="+l);e.focus&&u.focus()},showErrorDialog:function(t,e){return function(t,e,o=globalThis){if(M(o)){try{j(t,e,o)}catch(a){E(t,o,a)}return Promise.resolve()}return A(o).then(()=>j(t,e,o)).catch(e=>E(t,o,e))}(t,e)},getFormattedAmount:function(t){const e=r.formatNumber(t);return"right"!==vocParams.currency_sign_placement?vocParams.currency_sign+" "+e:e+" "+vocParams.currency_sign},getFormattedAdditionalFees(t){let e='<span class="no_fees">'+vocParams.no_additional_fees+"</span>";if(!t.cartItems||0===t.cartItems.length)return e;const o=new Map;for(const n of t.cartItems)if(n.deposits&&0!==n.deposits.length&&0===n.parent_id)for(const t of n.deposits){if(!t.active)continue;const e=t.id,a=parseFloat(t.amount),i=parseInt(n.product_quantity??0),r=a*i;if(o.has(e)){const t=o.get(e);t.totalCost+=r,t.quantity+=i}else o.set(e,{title:t.title||t.name,amount:a,totalCost:r,quantity:i})}if(0===o.size)return e;let a='<div class="vo-checkout--additional-fees">';a+="<strong>Deposits:</strong>",a+='<ul class="vo-checkout--deposits-list">';
2for(const[n,i]of o)a+='<li class="vo-checkout--deposit-item">',a+='<span class="deposit-title">'+i.title+"</span>",a+=' <span class="deposit-details">('+i.quantity+"x "+r.getFormattedAmount(i.amount)+")</span>",a+=' <span class="deposit-total">'+r.getFormattedAmount(i.totalCost)+"</span>",a+="</li>";return a+="</ul>",a+="</div>",a},formatNumber:function(t){let e;const o=vocParams.decimals,a=vocParams.decimal_sign,n=vocParams.thousand_sign,i=t<0?"-":"",r=parseInt(t=Math.abs(+t||0).toFixed(o))+"";return e=(e=r.length)>3?e%3:0,i+(e?r.substr(0,e)+n:"")+r.substr(e).replace(/(\d{3})(?=\d)/g,"$1"+n)+(o>0?a+Math.abs(t-r).toFixed(o).slice(2):"")}};t(e).on("load",function(){voCheckoutCart.init(),voCheckoutCheckout.init(),voHoverBlock.init()})}(jQuery,window,document);var B=class{constructor(){this.overlay=(0,p.default)("#overlay")}showOverlay(){this.overlay.stop().fadeIn()}hideOverlay(){this.overlay.stop().fadeOut()}};!function(t,e,o,a){let n=!1,i=null;const s=".vo-checkout-products--wrapper",c=".vo-checkout-product--overlay",l=".vo-checkout-product--results-wrapper",d=".vo-checkout-product--results",u=".vo-checkout-product--date-picker",h=".vo-checkout-product--date-picker-from",p=".vo-checkout-product--date-picker-to",m=".vo-checkout-product--date-picker-right",f=".vo-checkout-product--date-from",v=".vo-checkout-product--date-to",g=".vo-checkout-product--find-button",k=".vo-checkout-product--modal-find-button",y=".vo-checkout-product--availability--buy-tickets",C=".product__buy--simple:not(.vo-checkout-product--availability--buy-tickets)",b=".product-card",_=".product--simple .product-card",w=".product__quantity",x=".vo-checkout-products--back-to-top-button",S=".vo-checkout-products--modal--inputs",P=".vo-checkout-products--modal",I=".vo-checkout-products--modal--title",T=".vo-checkout-products--modal--scroll",D=".vo-checkout-products--modal--content",M=".vo-checkout-products--modal--close",j=".vo-checkout-products--product--viator",E=".vo-checkout-products--viator--find-button",F=".vo-checkout-products--viator--date",A=".vo-checkout-products--viator--calendar",N=".vo-checkout-products--viator--age-bands",H=".vo-checkout-product--viator--buy-button";let q=null,R=null,W=null,z=null,U=null,$=null;const Q="#viator_add_to_cart_form",V="#viator_form_error",Y="#viator_add_to_cart_button",G=".vo-checkout-products--modal--before-cart-form",J=".vo-checkout-product--find-button--stock",Z=".vo-checkout-product--single-date-picker",X=".vo-checkout-product--single-date-from",K=".vo-checkout--upselling-quantity",tt=".vo-checkout--form-checkbox",et=".vo-checkout-products--app-button",ot=".vo-checkout-product--fareharbor--buy-button",at=".vo-checkout-product--find-button--fareharbor",nt=".vo-checkout-product--results-wrapper--fareharbor",it="#vo-checkout--billing-form",rt=".vo-checkout--checkout-success",st=".vo-checkout--upsell",ct=".vo-checkout--upselling-quantity",lt="#vo-checkout--upselling-notice-",dt="vo-checkout--upselling-notice-add",ut="vo-checkout--upselling-notice-remove",ht="vo-checkout--extra-order-",pt=".vo-checkout-products__upsell-modal-close",mt=".vo-checkout-product--find-button--pass",ft=".vo-checkout-product--find-button--copy",vt="mp_id";let gt=!1;const kt=new B;function yt(){t(g).prop("onclick",null).off("click"),t(o).on("click",g,function(e){if(!n){n=!0;let o=t(this).closest(s),i=t(this).data("show_in_modal");i=i!==a?i.toString():"0";const r=t(this).data("modal_title"),u=t(this).data("date_from"),y=t(this).data("date_to"),C=t(this).data("product_id");let b=t(this).data("show_date_pickers");b=b!==a?b.toString():"0","1"===i&&(o=t(P));const _=t(f,o),w=t(v,o);let x=t(_).val(),I=t(w).val();void 0!==u&&(x=u),void 0!==y&&(I=y),"1"===i&&("1"===b?(t(h).datepicker("setDate",new Date(x)),t(p).datepicker("setDate",new Date(I)),o=t(S),t(S).show()):t(S).hide());const T={action:"vo-checkout-product-get-availability",productId:t(this).data("product_id"),dateFrom:x,dateTo:I};if("1"===i){const e=t(k);e.hasClass(J.replace(".",""))&&(t(m).show(),e.removeClass(J.replace(".","")),e.addClass(g.replace(".","")),yt()),Et(r),Tt(),jt(!0)}else t(c,o).show(),e.target.classList.add("after-loader");t.post(nymgData.ajaxUrl,T,function(a){let r=d;if("1"===i?(Mt(C,b),r=D,o=t(P)):t(l,o).show(),t(r,o).html(""),a.errorMessage&&""!==a.errorMessage.toString())t(r,o).html(a.errorMessage);else{for(const e in a.availabilityList)void 0!==a.availabilityList[e]&&t(r,o).html(t(r,o).html()+a.availabilityList[e]);void 0!==a.additionalContent&&t(r,o).html(t(r,o).html()+a.additionalContent)}"1"===i?jt(!1):(t(c,o).hide(),e.target.classList.remove("after-loader")),n=!1},"json")}e.preventDefault()})}
2function Ct(e){t('<div class="product-card__loader"><i class="fas fa-spinner fa-pulse fa-fw"></i></div>').appendTo(e)}function bt(e){t(".product-card__loader",e).remove()}function _t(t,o){void 0!==e.alertify?(e.alertify.set({labels:{ok:void 0===o?"Ok":o}}),e.alertify.alert(t)):e.alert(t)}function wt(e){i&&clearTimeout(i),t(e).addClass("error"),i=setTimeout(function(){t(e).removeClass("error")},250)}function xt(t,e){return Math.round((e-t)/864e5)}function St(){return[vocPParams.translations["01_long"],vocPParams.translations["02_long"],vocPParams.translations["03_long"],vocPParams.translations["04_long"],vocPParams.translations["05_long"],vocPParams.translations["06_long"],vocPParams.translations["07_long"],vocPParams.translations["08_long"],vocPParams.translations["09_long"],vocPParams.translations["10_long"],vocPParams.translations["11_long"],vocPParams.translations["12_long"]]}function Pt(){return[vocPParams.translations.sunday_long,vocPParams.translations.monday_long,vocPParams.translations.tuesday_long,vocPParams.translations.wednesday_long,vocPParams.translations.thursday_long,vocPParams.translations.friday_long,vocPParams.translations.saturday_long]}function It(){return[vocPParams.translations.sunday_min,vocPParams.translations.monday_min,vocPParams.translations.tuesday_min,vocPParams.translations.wednesday_min,vocPParams.translations.thursday_min,vocPParams.translations.friday_min,vocPParams.translations.saturday_min]}function Tt(e){kt.showOverlay(),"before_cart_form"===e?t(G).fadeIn(200):t(P).fadeIn(200),t("body").addClass("vo-checkout-products--modal-active")}function Dt(e){kt.hideOverlay(),"before_cart_form"===e?t(G).fadeOut(200):t(P).fadeOut(200,function(){t(D).html(""),Et("")}),t("body").removeClass("vo-checkout-products--modal-active")}function Mt(e,o){t(k).data("product_id",e),t(k).data("show_date_pickers",o)}function jt(e,o){let a=P;"before_cart_form"===o&&(a=G),e?t(a).addClass("loading"):t(a).removeClass("loading")}function Et(e,o){"before_cart_form"===o?t(I,G).html(e):t(I).html(e)}function Ft(){const e=z,o={},a=[],n=[];let i=1;o.bookingDate=R,o.ageBands=e,o.gradeCode=W;for(let s=0;s<e.length;s++){const o=e[s];for(let e=0;e<o.count;e++){const e={};e.firstname=t("#traveler_"+i+"_first_name").val(),e.surname=t("#traveler_"+i+"_last_name").val(),e.bandId=o.bandId,e.leadTraveller=1===i,a.push(e),i++}}o.persons=a,U.length&&t.each(U,function(e,o){const a=t("#question_"+o.questionId);if(a.length){const t={};t.questionId=o.questionId,t.answer=a.val(),n.push(t)}}),o.answers=n;const r=t("#viator_hotel");return r.length&&(o.hotelId=r.val()),o}function At(){const e=[];return t("select",N).length&&t("select",N).each(function(){t(this).val()>0&&e.push({bandId:t(this).data("band_id"),count:t(this).val(),description:t(this).data("description")})}),e}function Lt(){t(J).prop("onclick",null).off("click"),t(J).length&&t(J).on("click",function(e){e.preventDefault();const o=t(this).data("product_id"),a=t(".vo-checkout-product--results-wrapper--stock[data-product_id="+o+"]");let i=t(d+"[data-product_id="+o+"]");const r=t(c+"[data-product_id="+o+"]");let s=t(X).val();const l=t(this).data("show_in_modal").toString(),u=t(this).data("modal_title"),p=t(this).data("date_from"),v=t(this).data("show_date_pickers").toString();let y=t(t(f)).val();if(void 0!==p&&(y=p),"1"===l&&("1"===v?(t(h).datepicker("setDate",new Date(y)),t(S).show()):t(S).hide()),"1"===l){const e=t(k);e.hasClass(g.replace(".",""))&&(t(m).hide(),e.removeClass(g.replace(".","")),e.addClass(J.replace(".","")),Lt()),s=y,Et(u),Tt(),jt(!0)}if(void 0!==o){const c={action:"voc-stock-product-get-availability",productId:o,date:s};e.target.classList.add("after-loader"),t.post(nymgData.ajaxUrl,c,function(s){"1"===l?(Mt(o,v),i=t(D)):(a.show(),e.target.classList.remove("after-loader")),i.html(""),s.errorMessage&&""!==s.errorMessage.toString()?i.html(s.errorMessage):i.html(s.html),"1"===l?jt(!1):r.hide(),n=!1},"json")}})}t(function(){!function(){t(h).length&&t(h).each(function(){const e=t(this).closest(u),o=t(f,e),a=t(v,e),n=t(this),i=t(p,e);n.datepicker({altFormat:"yy-mm-dd",altField:o,minDate:new Date,dateFormat:vocPParams.date_format,monthNames:St(),dayNames:Pt(),dayNamesMin:It(),dayNamesShort:It(),onSelect:function(){const t=new Date(o.val()),e=new Date(a.val());t>e?(i.datepicker("setDate",new Date(t.getFullYear(),t.getUTCMonth(),t.getUTCDate())),wt(i)):xt(t,e)>10&&(i.datepicker("setDate",new Date(t.getFullYear(),t.getUTCMonth(),t.getUTCDate()+10)),wt(i)),n.datepicker("setDate",new Date(t.getFullYear(),t.getUTCMonth(),t.getUTCDate()))}}).datepicker("setDate",new Date(t(o).val()))});t(p).length&&(t(p).each(function(){const e=t(this).closest(u),o=t(f,e),a=t(v,e),n=t(h,e),i=t(this);i.datepicker({altFormat:"yy-mm-dd",altField:a,minDate:new Date,dateFormat:vocPParams.date_format,monthNames:St(),dayNames:Pt(),dayNamesMin:It(),dayNamesShort:It(),onSelect:function(){const t=new Date(o.val()),e=new Date(a.val());t>e?(n.datepicker("setDate",new Date(e.getFullYear(),e.getUTCMonth(),e.getUTCDate())),wt(n)):xt(t,e)>10&&(n.datepicker("setDate",new Date(e.getFullYear(),e.getUTCMonth(),e.getUTCDate()-10)),wt(n)),i.datepicker("setDate",new Date(e.getFullYear(),e.getUTCMonth(),e.getUTCDate()))}}).datepicker("setDate",new Date(t(a).val()))}),t(Z).length&&t(Z).datepicker({altFormat:"yy-mm-dd",altField:X,minDate:new Date,dateFormat:vocPParams.date_format,monthNames:St(),dayNames:Pt(),dayNamesMin:It(),dayNamesShort:It()}).datepicker("setDate",new Date(t(X).val())))}(),yt(),function(){const e=function(e){let o=Number.parseInt(t(e).val(),10);return Number.isInteger(o)||(o=0),o=Math.max(0,Math.min(10,o)),t(e).val(o
2),o},a=function(o){let a=0,n=0;t(w,o).each(function(){const o=t(this).closest("[data-ticket-type-id]"),i=e(this),r=Number.parseFloat(o.attr("data-effective-price"))||0;n+=i,a+=i*r}),t(".product__total",o).text(function(t){const e=function(t){const e=Number.isInteger(Math.abs(+t||0))?0:vocParams.decimals,o=vocParams.decimal_sign,a=vocParams.thousand_sign,n=t<0?"-":"",i=parseInt(t=Math.abs(+t||0).toFixed(e))+"",r=i.length>3?i.length%3:0;return n+(r?i.substr(0,r)+a:"")+i.substr(r).replace(/(\d{3})(?=\d)/g,"$1"+a)+(e>0?o+Math.abs(t-i).toFixed(e).slice(2):"")}(t);return"right"!==vocParams.currency_sign_placement?vocParams.currency_sign+" "+e:e+" "+vocParams.currency_sign}(a)),t(C,o).prop("disabled",n<1)};t(o).on("click",".product__quantity-change",function(){const o=t(this).siblings(w).first();o.val(e(o)+Number.parseInt(t(this).data("change"),10)),a(t(this).closest(b))}),t(o).on("input change",w,function(){a(t(this).closest(b))}),t(b).each(function(){a(this)}),t(o).on("click",C,function(o){if(o.preventDefault(),n)return;const a=t(this),i=a.closest(b),r={};t(w,i).each(function(){const o=t(this).closest("[data-ticket-type-id]").attr("data-ticket-type-id");r[o]=e(this)}),Object.values(r).some(t=>t>0)&&(n=!0,Ct(i),t.post(nymgData.ajaxUrl,{action:"voc-products-add-to-cart",productId:a.data("product_id"),ticketTypeQuantities:r},function(t){void 0!==t.success&&!0===t.success?(voCheckoutCart.reloadCartItems(),voCheckoutCart.openCart()):void 0!==t.message&&""!==t.message&&_t(t.message,vocPParams.add_to_cart_error_button)},"json").always(function(){bt(i),n=!1}))})}(),t(o).on("click",y,function(e){if(!n){n=!0;const e=this,o=t(this).closest(_);o.length?Ct(o):t(this).css("width",t(this).outerWidth()).addClass("vo-checkout--loading").append('<i class="fas fa-spinner fa-pulse fa-fw buy-button-loader"></i>');const a=t(this).data("product_id");let i=parseInt(t(this).parent(".vo-checkout-product--availability--tickets").prev().find(".product_quantity").val());i&&void 0!==i||(i=1);const r={action:"voc-products-add-to-cart",productId:a,quantity:i,key:t(this).data("key"),availabilityId:t(this).data("availability_id"),ticketTypeId:t(this).data("ticket_type_id"),date:t(this).data("date")};t.post(nymgData.ajaxUrl,r,function(a){void 0!==a.success&&!0===a.success?(void 0!==a.update&&!0===a.update?voCheckoutCart.updateCartItem(a.cartItem):voCheckoutCart.addCartItem(a.cartItem),t(M).click()):void 0!==a.message&&""!==a.message&&_t(a.message,vocPParams.add_to_cart_error_button),o.length?bt(o):(t(e).css("width","").removeClass("vo-checkout--loading"),t("i",e).remove()),n=!1},"json")}e.preventDefault()}),t(o).on("click",x,function(e){e.preventDefault(),t(s).length&&t("html, body").stop().animate({scrollTop:t(s).position().top-50},500)}),t(o).on("click",M,function(e){e.preventDefault(),Dt(t(this).data("modal_type"))}),t(j).length&&t(j).each(function(){const e=t(this),a=t(A,e),i=t(N,e),r=t(F,e),u=t(E,e),h={action:"voc-get-viator-age-bands-and-dates",productCode:t(this).data("product_code")};t.post(nymgData.ajaxUrl,h,function(e){if(e.bookingQuestions&&(U=e.bookingQuestions),e.hotelPickup&&($=e.hotelPickup),e.dates){a.data("available_dates",e.dates);let o=new Date;if(Object.prototype.hasOwnProperty.call(e.dates,0)){o=new Date(e.dates[0]);const t=o.getUTCMonth()+1,a=t>9?t:"0"+t,n=o.getUTCDate(),i=n>9?n:"0"+n;r.val(o.getFullYear().toString()+"-"+a.toString()+"-"+i.toString())}a.datepicker({altFormat:"yy-mm-dd",altField:r,dateFormat:vocPParams.date_format,monthNames:St(),dayNames:Pt(),dayNamesMin:It(),dayNamesShort:It(),beforeShowDay:function(e){const o=e.getFullYear()+"-"+(e.getUTCMonth()+1)+"-"+e.getUTCDate();return-1!==t.inArray(o,a.data("available_dates"))?[!0,"","Available"]:[!1,"","unAvailable"]}}).datepicker("setDate",o)}if(e.ageBands){const o=t("<table/>");for(const a in e.ageBands)if(Object.prototype.hasOwnProperty.call(e.ageBands,a)){const n=e.ageBands[a],i=t("<select/>",{"data-band_id":n.bandId,"data-description":n.description}),r=t("<tr/>"),s=t("<td/>");for(let e=0;e<=10;e++)t("<option/>",{html:e,value:e,selected:2===e&&0===a}).appendTo(i);i.appendTo(s),t("<td/>",{html:n.description+" ("+n.ageFrom+"-"+n.ageTo+")"}).appendTo(r),s.appendTo(r),r.appendTo(o)}o.appendTo(i)}},"json"),u.on("click",function(e){e.preventDefault();const o=t(this).closest(s),a={action:"voc-get-viator-tour-grades",productId:t(this).data("product_id"),productC
2ode:t(this).data("product_code"),bookingDate:t(F).val(),ageBands:At()};t(c,o).show(),e.target.classList.add("after-loader"),t.post(nymgData.ajaxUrl,a,function(a){t(l,o).show(),t(d,o).html(a.html),t(c,o).hide(),e.target.classList.remove("after-loader")},"json")}),t(o).on("click",H,function(e){e.preventDefault();const o=t(this).data("age_bands");let a="";var n;q=t(this).data("product_id"),R=t(this).data("booking_date"),W=t(this).data("grade_code"),z=o,a+='<div class="viator-add-to-cart-form" id="viator_add_to_cart_form">',a+='<p class="vo-checkout--form-message" id="viator_form_error" style="display: none;">Please enter all fields</p>',a+=function(t){let e="",o=1;e+="<h3>Traveler details</h3>",e+="<p>We need some extra information for this booking. Please fill in all fields.</p>";for(let a=0;a<t.length;a++){const n=t[a];for(let t=0;t<n.count;t++)e+='<div class="vo-checkout--form-input vo-checkout--form-text input-left"><label>'+(1===o?"Main ":"")+"Traveler "+(1===o?"":o)+" <span>("+n.description+')</span></label><input type="text" class="first_name" placeholder="First name" id="traveler_'+o+'_first_name" /></div>',e+='<div class="vo-checkout--form-input vo-checkout--form-text input-right"><label> </label><input type="text" class="last_name" placeholder="Last name" id="traveler_'+o+'_last_name" /></div>',o++}return e}(o),a+=function(){let e="";return U.length&&(e+="<h3>Booking Questions</h3>",t.each(U,function(t,o){e+='<div class="vo-checkout--form-input vo-checkout--form-text">',e+="<label>"+o.title+" ("+o.message+")</label>",e+='<input type="text" name="question" id="question_'+o.questionId+'" placeholder="'+o.subTitle+'" />',e+="</div>"})),e}(),a+=function(){let e="";return $&&(e+="<h3>Hotel Pickup</h3>",e+='<div class="vo-checkout--form-input vo-checkout--form-select "><label>Hotel</label><select class="viator-hotel" id="viator_hotel" name="viator_hotel"></select></div>',t.ajax(nymgData.ajaxUrl,{data:{action:"voc-get-viator-hotels"},method:"post",dataType:"JSON",success:function(e){if(void 0!==e.hotels&&e.hotels.length){const o=t(".viator-hotel");t.each(e.hotels,function(t,e){e.address.length?o.append('<option value="'+e.id+'">'+e.name+" - "+e.address+"</option>"):o.append('<option value="'+e.id+'">'+e.name+"</option>")})}}})),e}(),a+=(t(this),'<a name="vo-checkout--submit" class="vo-checkout--button" id="viator_add_to_cart_button"><span>Add to cart</span></a>'),a+="</div>",Tt("before_cart_form"),Et(t(this).data("product_name"),"before_cart_form"),n=a,t(D,G).html(n)}),t(o).on("click",Y,function(e){if(e.preventDefault(),function(){let e=!0;return t("input",Q).each(function(){const o=t(this).val();null!==o&&o.length||(e=!1)}),t("select",Q).each(function(){const o=t(this).val();null!==o&&o.length||(e=!1)}),e}()){t(V).hide(),jt(!0,"before_cart_form");const e={action:"voc-products-add-to-cart",productId:q,quantity:1,viatorData:Ft()};t.post(nymgData.ajaxUrl,e,function(t){void 0!==t.success&&!0===t.success?(void 0!==t.update&&!0===t.update?voCheckoutCart.updateCartItem(t.cartItem):voCheckoutCart.addCartItem(t.cartItem),Dt("before_cart_form")):void 0!==t.message&&""!==t.message.toString()&&_t(t.message,vocPParams.add_to_cart_error_button),jt(!1,"before_cart_form"),n=!1},"json")}else t(V).show(),t(T).stop().animate({scrollTop:0},200)})}),function(){t(at).length&&t(at).on("click",function(e){e.preventDefault();const o=t(this).closest(s),a=t(this).data("product_id"),i=t(nt+'[data-product_id="'+a+'"]'),r=t(d+'[data-product_id="'+a+'"]'),l=t(c+'[data-product_id="'+a+'"]'),u=t(f,o),h=t(v,o),p=t(u).val(),m=t(h).val();if(void 0!==a){const o={action:"voc-get-fareharbor-product-availability",productId:a,dateFrom:p,dateTo:m};l.show(),e.target.classList.add("after-loader"),t.post(nymgData.ajaxUrl,o,function(t){if(i.show(),r.html(""),t.errorMessage&&""!==t.errorMessage.toString())r.html(t.errorMessage);else for(const e in t.availabilityList)void 0!==t.availabilityList[e]&&r.html(r.html()+t.availabilityList[e]);e.target.classList.remove("after-loader"),l.hide(),n=!1},"json")}});t(o).on("click",ot,function(e){e.preventDefault(),t(this).css("width",t(this).outerWidth()).addClass("vo-checkout--loading").append('<i class="fas fa-spinner fa-pulse fa-fw buy-button-loader"></i>');const o=t(this).data("product_id"),a=t(this).data("availability_id"),i=t(this).data("item_id"),r=t(this).data("ticket_id"),s=t(this).data("ticket_type_id");let c=parseInt(t(this).parent(".vo-checkout-product--availability--tickets").prev().find(".product_quantity").val());const l=t(this).data("key"),d=t(this).data("date"),u=this;c&&void 0!==c||(c=1);const h={action:"voc-products-add-to-cart",productId:o,quantity:c,key:l,date:d,ticketTypeId:s,fareHarborData:{availabilityId:a,itemId:i,ticketId:r}};t.post(nymgData.ajaxUrl,h,function(e){void 0!==e.success&&!0===e.success?(void 0!==e.update&&!0===e.update?voCheckoutCart.updateCartItem(e.cartItem):voCheckoutCart.addCartItem(e.cartItem),Dt("before_cart_form")):void 0!==e.message&&""!==e.message.toString()&&_t(e.message,vocPParams.add_to_cart_error_button),jt(!1,"before_cart_form"),t(u).css("width","").removeClass("vo-checkout--loading"),t("i",u).remove(),n=!1},"json")})}(),Lt(),t(o).on("change",tt+' input[type="checkbox"]',function(){const e=t(K,t(this).closest(tt)),o=t(this).val();if(!t(this).closest(tt).parents(".vo-checkout-insurance").length)if(this.checked)e.css("visibility","initial"),t(lt+o).fadeOut();else if(e.is(":visible")){e.css("visibility","hidden");const a={action:"voc-products-remove-from-cart",productId:o};t.post(nymgData.ajaxUrl,a,async function(e){void 0!==e.success&&!0===e.success&&(await voCheckoutCheckout.getCartOverview(t(voCheckoutCheckout.overviewSelector)),t(lt+o).html(vocPParams.text_upsell_remove).removeClass(dt).addClass(ut).fadeIn("fast",function(){t(this).delay(1e3).fadeOut("fast")}))},"json")}}),t(o).on("click",K+" .add",function(){const e=t(".vo-checkout-items"),o=t(this);if(!n){n=!0;const a=t(this).data("productId");let i=t(this).prev(".quantity").val();i&&void 0!==i||(i=1),o.css("width",o.outerWidth()).addClass("vo-checkout--loading").append('<i class="fas fa-spinner fa-pulse fa-fw buy-button-loader"></i>');const r={action:"voc-products-add-to-cart",productId:a,quantity:i};t.post(nymgData.ajaxUrl,r,function(i){void 0!==i.success&&!0===i.success?(void 0!==i.update&&!0===i.update?voCheckoutCart.updateCartItem(i.cartItem):voCheckoutCart.addCartItem(i.cartItem),voCheckoutCheckout.getCartOverview(t(voCheckoutCheckout.overviewSelector)),t(lt+a).html(vocPParams.text_upsell_add).removeClass(ut).addClass(dt).fadeIn()):void 0!==i.message&&""!==i.message&&_t(i.message,vocPParams.add_to_cart_error_button),e.length&&i.checkout_html.length&&(e.empty(),e.html(i.checkout_html)),t(o).css("width","").removeClass("vo-checkout--loading"),t("i",o).remove(),n=!1},"json")}}),function(){if(0===t(ct).length)return;t(it).on("submit",function(e){e.preventDefault();const a=this;if(!gt)return void a.submit();let n,i,r;const s=JSON.parse(vocPParams.upselling_products),c=".vo-checkout--order-overview-wrap";for(n=0;n<s.length;n++)if(i=s[n].id,!o.getElementById(ht+i).checked&&(r=s[n].product_name,!t(c+' *:contains("'+r+'")').length))return t("#vo-checkout-products__upsell-modal--check-"+i).fadeIn(),void t("#vo-checkout-products__upsell-modal--confirm-"+i).on("click",function(t){t.preventDefault(),a.submit()});a.submit()})}(),t(o).on("click",pt,function(e){t("#vo-checkout-products__upsell-modal--check-"+t(this).data("product-id")).fadeOut(),e.preventDefault()}),function(){if(!t(et).length)return;if(/iPad|iPhone|iPod|Android|Tablet/.test(navigator.userAgent)&&!e.MSStream){const o=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!e.MSStream,a=/Android/.test(navigator.userAgent)&&!e.MSStream;o?t(et+".apple").show():a&&t(et+".android").show()}}(),function(){if(!t(rt).length)return;const o=setInterval(function(){t(st).length&&(clearInterval(o),n())},100),n=function(){let o=0,n=0;const i=t(".vo-checkout--upsell"),r=t(".upsell-products__wrapper"),s=r.find("ul"),c=r.find(".slide-next"),l=r.find(".slide-prev"),d=s.position(),u=s.find("li").width()-c.width(),h=s.width(),p=function(t){l.hide(),c.hide(),s.width()<i.width()||(t<0&&l.show(),-1*t+r.width()<h&&c.show())},m=function(){let t=r.width()/2;return t<u&&(t=u),t},f=function(){e.addEventListener("touchstart",function(){r.css("overflowX","auto"),r.css("height","15.5rem"),c.zIndex(-1),c.attr("tabindex",-1),c.find("i").hide(),l.zIndex(-1),l.attr("tabindex",-1),l.find("i").hide()})},v=function(){const e="utm_source=checkout&utm_medium=website",o="#";i.find(".upsell-products a").each(function(){if(t(this).hasClass("vo-checkout-product--availability--buy-tickets")||t(this).hasClass("upsell-products__button upsell-products__buy")){let a=t(this).attr("href");if(-38!==a.indexOf(e)){a=a.replace(o,"");const n=-1!==a.indexOf("?")?"&":"?";t(this).attr("href",a+n+e+o)}}})};(function(){r.css("overflowX","hidden"),r.css("height","15rem"),c.zIndex(7),c.attr("tabindex",0),c.find("i").show(),l.zIndex(7),l.attr("tabindex",0),l.find("i").show(),d!==a&&p(d.left)})(),f(),v(),c.on("keypress",function(e){13===e.which&&t(this).click()}),c.on("click touch",function(){n=-1*(h-r.width()),o=s.position().left-m(),1.1*o<n&&(o=n),s.css("left",o),p(o)}),l.on("keypress",function(e){13===e.which&&t(this).click()}),l.on("click touch",function(){n=0,o=s.position().left+m(),1.1*o>n&&(o=n),s.css("left",o),p(o)})}}(),function(){const e=".vo-checkout--mini-cart",o=setInterval(function(){t(e).length&&(clearInterval(o),a())},100),a=function(){t(e+", .vo-checkout--cart--close, .vo-checkout--cart--cart-item-quantity-less, .vo-checkout--cart--cart-item-quantity-more, .vo-checkout--cart--cart-item-remove").on("keypress",function(e){13===e.which&&t(this).click()})}}(),e.addEventListener("click",function(e){gt||t(e.target).parent(".upsell-wrapper").length&&(gt=!0)}),t(function(){let e=L(vt);if(e){const o=t('[data-product_id="'+e+'"]');o.length&&o.click()}}),t(o).on("click",ft,function(){r(O(vt,t(this).data("modal_product_id"),!1))}),t(o).on("click",mt,function(e){e.preventDefault();let o=t(this).data("product_id"),a=t(this).data("modal_title");t(S).hide();const n={action:"vo-checkout-product-get-ticket-types",productId:o};jt(!0),t.post(nymgData.ajaxUrl,n,function(e){if(e.errorMessage&&""!==e.errorMessage.toString())t(d,t(P)).html(e.errorMessage);else{t(D).html(e.modalTitle);for(const o in e.ticketTypes)void 0!==e.ticketTypes[o]&&t(D).html(t(D).html()+e.ticketTypes[o]);Et(a),Mt(o,!1),Tt()}},"json").always(function(){jt(!1)})})})}(jQuery,window,document),window.jQuery=window.$=p.default,function(t,e,o){let a=!1;const n=nymgData.ajaxUrl,i=nymgData.ajaxSecurity,r=nymgData.ajaxLocale,c=".vo-contact-form",l=t(c),d=t(c+" ul"),u=t(c+"__name"),h=t(c+"__email"),p=t(c+"__message"),m=t(c+"__newsletter"),f=t(c+"__to-email"),v=t(c+"__consent");let g="",k="",y="",C=!1,b=!1,_="",w=!1;t("table.responsive");const x=function(){const e=".vo-newsletter";t(e).length&&t(e).each(function(){if(t(this).hasClass("vo-newsletter--popup"))return;if(t(this).hasClass("no-slide"))return;const o=t(this),a=o.find('[name="email"]'),n=o.find(e+"-signup--first-name"),i=o.find(e+"-signup--consent");a.on("keyup",function(){o.hasClass("consent-slide")?a.val().length>0?i.slideDown(250):i.slideUp(250):a.val().length>0?(n.slideDown(250),i.slideDown(250)):(n.slideUp(250),i.slideUp(250))})})},S=function(){const e=".vo-newsletter";if(!t(e).length)return;const o=["email","consent"];t(e).each(function(){const s=t(this).find("form"),c=t(this).find('[name="email"]'),l=t(this).find('[name="first-name"]'),d=t(this).find('[name="consent"]'),u=t(this).find('[name="mc-tag"]'),h=t(this).find('button[type="submit"]'),p=t(this).find(e+"-signup__message");c.on("keyup",function(t){13===t.keyCode&&c.val().length&&h.trigger("click")}),h.on("click",function(e){e.preventDefault(),a||(a=!0,s.addClass("loading"),t.ajax({url:n,type:"POST",dataType:"JSON",data:{action:"vo-newsletter-signup",security:i,email:c.val(),name:l.val(),tag:u.val(),consent:d.is(":checked"),locale:r},success:function(t){p.removeClass("success error"),t.error?(p.addClass("error"),o.forEach(t=>{s.find('[name="'+t+'"]').closest('[class^="vo-newsletter"]').removeClass("error")}),t.fields&&t.fields.forEach(t=>{s.find('[name="'+t+'"]').closest('[class^="vo-newsletter"]').addClass("error")})):(p.addClass("success"),s.slideUp()),p.html(t.message).slideDown(),s.removeClass("loading"),a=!1}}))})})},P=function(){o.querySelectorAll(".dialog-open").forEach(t=>{t.addEventListener("click",()=>{const e=o.querySelector("dialog#"+t.getAttribute("aria-controls"));e.showModal(),e.addEventListener("click",t=>{var o=e.getBoundingClientRect();
2o.top<=t.clientY&&t.clientY<=o.top+o.height&&o.left<=t.clientX&&t.clientX<=o.left+o.width||e.close()}),e.querySelector(".dialog-close").addEventListener("click",()=>{e.close()})})})},I=()=>{const t=e.devicePixelRatio;o.querySelector("body").classList.contains("logged-in");t<2||o.querySelectorAll(".content img").forEach(e=>{const a=e.height,n=e.width,i=e.getAttribute("src");if("http"!==i.substring(0,4))return;const r=o.createElement("img");if(r.src=i,r.height>a*t&&r.width>n*t)return;if(0===r.height||0===r.width)return;const s="-"+r.width+"x"+r.height+".",c=o.createElement("img"),l=i.replace(s,".");c.src=l,0!==c.height&&0!==c.width&&e.setAttribute("src",l)})},T=()=>{var e;I(),t(".vo-newsletter").length&&(x(),S()),s(t,o),e=1,o.querySelectorAll(".eric-quote .dialog-open").forEach(t=>{0!==e?e--:t.parentElement.style.display="none"}),P()};t(function(){T(),t(o).on("nymgContentChanged",function(){P()});const a=t(".button-buynow");if(a.length){const o=t(e).height()-a.offset().top-a.outerHeight();t("body").on("cookiebar-open",()=>{a.css("bottom",o+t(".cookiebar").outerHeight())}),t("body").on("cookiebar-close",()=>{a.css("bottom",o)})}t(o).on("click",".ny-popup-link",function(e){!function(e){const o=t(e),a=o.data("popup-title")?o.data("popup-title"):"";t(".ny-popup__header",o).length||(o.wrapInner('<div class="ny-popup__content"></div>'),o.prepend('<div class="ny-popup__header">'+a+'<a class="ny-popup__close" href="javascript:void(0);"></a></div>'),o.wrapInner('<div class="ny-popup__modal">'));o.addClass("ny-popup--active"),t("body").addClass("ny-popup-open"),t(".ny-popup--active .ny-popup__close").focus()}(t(this).attr("href")),e.preventDefault()}),t(o).on("click",".ny-popup__close",function(){t(".ny-popup").removeClass("ny-popup--active"),t("body").removeClass("ny-popup-open")}),t(o).on("click",".ny-popup__reload",function(){t(".ny-popup__modal").hide(),location.reload()}),t(o).on("click",".ny-popup--active",function(){t(".ny-popup--active .ny-popup__close").click()}),t(o).on("click",".ny-popup__modal",function(t){t.stopPropagation()}),t(o).on("keyup",function(e){27===e.which&&t(".ny-popup").hasClass("ny-popup--active")&&t(".ny-popup--active .ny-popup__close").click()}),t(o).on("keyup",".ny-popup-link, .ny-popup__close, .ny-popup__reload",function(e){13===e.which&&t(this).click()})}),t(c).submit(function(e){e.preventDefault(),w=!1,u.removeClass("error"),h.removeClass("error"),p.removeClass("error"),v.removeClass("error"),g=u.val(),k=h.val(),y=p.val(),C=m.is(":checked"),b=v.find("input").is(":checked"),_=f.val(),g||(u.addClass("error"),w=!0),k||(h.addClass("error"),w=!0),y||(p.addClass("error"),w=!0),b||(v.addClass("error"),w=!0),w||t.ajax({url:n,type:"POST",dataType:"JSON",data:{action:"vo-send-contact-form",security:i,name:g,email:k,message:y,newsletter:C,to_mail:_,consent:b,captcha:grecaptcha.getResponse(),locale:r},success:function(e){let o=e.message,a="",n="";grecaptcha&&!grecaptcha.getResponse().length>0&&(a="<br>- ",n=a+e.captcha),"success"===e.status&&d.hide(),e.mailchimp&&(o=o+" "+e.mailchimp.message),t(c+"__response").remove(),l.prepend('<span class="vo-contact-form__response vo-contact-form__response--'+e.status+'">'+o+n+"</span>")}}),e.preventDefault()})}(p.default,window,document),globalThis.sendContentChangeEvent=()=>{(0,p.default)(document).trigger("nymgContentChanged")},globalThis.voDoFunction=function(t,...e){if("string"!=typeof t)return!1;if("function"==typeof window[t])return void 0===e?t():t(e);let o=window;return(t=t.split(".")).forEach(function(t){if(void 0===o[t])return!1;o=o[t]}),"function"==typeof o&&(void 0===e?o():o(e))};var N={ajaxUrl:nymgData.ajaxUrl,ajaxSecurity:nymgData.ajaxSecurity,init:function(){this.postRating=document.querySelector("#post-rating-stars"),this.postRating&&(this.stars=this.postRating.querySelectorAll(".pr-star"),this.avgRating=this.postRating.dataset.rating,this.stars&&this.stars.forEach(N.initStar))},initStar:function(t){const e=N;t.addEventListener("mouseenter",function(){e.mouseEnter(t)}),t.addEventListener("mouseleave",function(){e.mouseLeave(t)}),t.addEventListener("click",N.onClick),t.addEventListener("keydown",function(o){e.handleKeydown(o,t)}),t.addEventListener("focus",function(){e.handleFocus(t)}),t.addEventListener("blur",function(){e.handleBlur(t)})}
2,mouseEnter:function(t){this.stars.forEach(function(e){e.dataset.nr<=t.dataset.nr&&e.classList.add("fa-star","mouseover")})},mouseLeave:function(t){this.stars.forEach(function(t){t.classList.remove("mouseover")})},onClick:function(t){const e=t.target.dataset.nr,o=N.postRating.dataset.postId;p.default.ajax({url:nymgData.ajaxUrl,type:"POST",dataType:"JSON",data:{action:"vo-post-rating",security:nymgData.ajaxSecurity,rating:e,postId:o},success:function(t){t.message?N.notice(t.message):t.error&&N.error(t.error)},error:function(t,e,o){N.error("An error occurred while submitting your rating.")}})},notice:function(t,e=!1){const o=N.postRating.querySelector(".pr-message-container"),a=N.postRating.querySelector(".pr-star-container"),n=o.querySelector(".pr-message");e&&o.classList.add("error"),o.classList.remove("pr-hidden"),a.classList.add("pr-hidden"),n.innerHTML=t},error:function(t){this.notice(t,!0)},handleKeydown:function(t,e){const o=parseInt(e.dataset.nr);let a=o;switch(t.key){case"Enter":case" ":t.preventDefault(),N.onClick(t),N.updateAriaStates(o);break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),a=Math.max(1,o-1);break;case"ArrowRight":case"ArrowUp":t.preventDefault(),a=Math.min(5,o+1);break;case"Home":t.preventDefault(),a=1;break;case"End":t.preventDefault(),a=5;break;default:return}if(a!==o){const t=document.getElementById("star-"+a);t&&(N.stars.forEach(function(t){t.setAttribute("aria-checked","false")}),t.setAttribute("aria-checked","true"),N.stars.forEach(function(t){t.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.focus())}},handleFocus:function(t){this.mouseEnter(t)},handleBlur:function(t){this.mouseLeave(t)},updateAriaStates:function(t){this.stars.forEach(function(e){const o=parseInt(e.dataset.nr);e.setAttribute("aria-checked",o===t?"true":"false")})}};globalThis.VORating=N||{},N.init(),function(t){t(function(){const e=t(".header__bannerNotice"),o=e.find(".noticebar__countdown");if(o.length){const t=new Date(o.data("end")).getTime(),a=1e3,n=60*a,i=60*n,r=o.find(".countdown"),s=e.css("background-color");r.find(".time").css("color",s);const c=function(t,e){t.text()!==e&&t.text(e)},l=setInterval(function(){const e=t-(new Date).getTime();e<0&&(clearInterval(l),o.remove());const s=("00"+Math.floor(e/i)).slice(-2),d=("00"+Math.floor(e%i/n)).slice(-2),u=("00"+Math.floor(e%n/a)).slice(-2);c(r.find("#hour"),s),c(r.find("#minute"),d),c(r.find("#second"),u)},a)}})}(jQuery,window,document),function(t){const e=".vo-hot-spot-map";t(function(){t(e).each(function(){const e=JSON.parse(t(this).html()),o=t(this).data("zoom_level");let a=t(this).data("map_center_latitude"),n=t(this).data("map_center_longitude"),i=!1;if(e.length){Object.prototype.hasOwnProperty.call(e,0)&&(""!==a.toString()&&""!==n.toString()||(a=e[0].latitude,n=e[0].longitude));const r=new google.maps.Map(this,{center:{lat:a,lng:n},scrollwheel:!1,zoom:o});for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){i=new google.maps.InfoWindow;const o=new google.maps.Marker({map:r,position:{lat:e[t].latitude,lng:e[t].longitude},title:"YOW"});google.maps.event.addListener(o,"click",function(t,o){return function(){const a=e[o].content??"";let n="<strong>"+e[o].name+"</strong>";n+="<br/>"+e[o].address,n+=a.length?"<br/>"+a:"",i.setContent(n),i.open(r,t),google.maps.event.addListener(r,"click",function(){i.close()})}}(o,t))}t(this).show()}})})}(jQuery,window,document),window.dataLayer=window.dataLayer||[],function(t){const e={};function o(a){if(e[a])return e[a].exports;const n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){const e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=2)}([function(t,e){function o(t,e){for(let o=0;o<e.length;o++){const a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}t.exports=function(t,e,a){return e&&o(t.prototype,e),a&&o(t,a),t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,o){o.r(e);const a=o(1),n=o.n(a),i=o(0),r=o.n(i);!function(t,e,o,a){const i=".vo-pass-picker__sharing-result",s="#share-email",c=".share-by-email-icon",l=".share-by-email-loader",d=nymgData.restUrl,u=nymgData.restUrlShareByEmail,h=nymgData.pageID,p=nymgData.defaultErrorMsg;parseInt(t("html").css("font-size")),t(function(){!function(){const o=new m(".vo-pass-picker",voHSPasses);o.addClickHandlers(),o.addChangeHandlers(),e.addEventListener("hashchange",t.proxy(o.hashHandler,o),!1),t(function(){e.location.hash&&o.hashHandler()})}()});var m=function(){function m(e,o){n()(this,m),this.picker=t(e),this.passes=o,this.attractions=[],this.grades={},this.adults=2,this.children=0,this.days=null,this.total=0,this.passTotal=0,this.recommendedPassTotal=0,this.cheapestPassTotal=0,this.calculatedPasses={cheapest:null,recommended:null},this.ericsTip=null,this.loader=!1,this.lastUpdate=0}return r()(m,[{key:"addClickHandlers",value:function(){this.picker.find("[class*=js-picker-attraction-]").on("click",t.proxy(this.handleToggleAttractionEvent,this)),this.picker.find(".js-picker-counter-toggler").on("click",t.proxy(this.handleToggleCounterDetails,this)),this.picker.find(".js-picker-accept-grade").on("click",t.proxy(this.acceptGrade,this)),this.picker.find(".js-picker-cancel-grade").on("click",t.proxy(this.cancelGrade,this)),this.picker.find(".js-picker-toggle-explanation").on("click",t.proxy(this.toggleExplanation,this)),this.picker.find(".js-picker-toggle-sharing").on("click",t.proxy(this.toggleSharing,this)),this.picker.find(".js-picker-share-by-email").on("click",t.proxy(this.shareByEmail,this)),this.picker.find(".js-picker-retry").on("click",t.proxy(this.refreshTotals,this)),this.picker.find(".js-picker-pass").on("click",t.proxy(this.handleTogglePassEvent,this)),this.picker.find(".js-picker-see-more").on("click",m.seeMore),this.picker.find(".js-picker-clear").on("click",t.proxy(this.clearAttractions,this)),this.picker.find(".vo-pass-picker__attraction-tour-grades").on("click",function(t){return t.stopPropagation()})}},{key:"addChangeHandlers",value:function(){const e=this;this.picker.find(".js-picker-days").on("change",t.proxy(this.changeDays,this)),this.picker.find(".js-picker-days-decrement").on("click",function(){return e.dayNumber=null===e.days||0===e.days?0:e.days-1}),this.picker.find(".js-picker-days-increment").on("click",function(){return e.dayNumber=null===e.days?1:e.days+1}),this.picker.find(".js-picker-adults").on("change",t.proxy(this.changeAdults,this)),this.picker.find(".js-picker-adults-decrement").on("click",function(){return e.adultNumber=1===e.adults?1:e.adults-1}),this.picker.find(".js-picker-adults-increment").on("click",function(){return e.adultNumber=e.adults+1}),this.picker.find(".js-picker-children").on("change",t.proxy(this.changeChildren,this)),this.picker.find(".js-picker-children-decrement").on("click",function(){return e.childNumber=0===e.children?0:e.children-1}),this.picker.find(".js-picker-children-increment").on("click",function(){return e.childNumber=e.children+1}),t("#pass-picker-counter").on("shown.bs.collapse hidden.bs.collapse",function(){var e=t(this).hasClass("show");t(".counter-collapse-chevron").toggleClass("fa-chevron-down",e).toggleClass("fa-chevron-up",!e)})}},{key:"hashHandler",value:function(o){const a=this;try{if(decodeURIComponent(e.location.hash.substring(1))===this.hash)return;const o=JSON.parse(decodeURIComponent(e.location.hash.substring(1))),n=[],i=[];t(o.at).each(function(t){const e=o.at[t];if(null!==e){const t=a.picker.find(".js-picker-attraction-"+e);
2t.first().length&&(n.push(t.first()),i.push(e))}}),this.attractions=n,this.grades=o.g,this.adults=o.a,this.children=o.c,this.days=o.d,this.refreshInputs(),this.toggleAllAttractions(),this.refreshTotals(),o.at.length!==i.length&&(e.location.hash=JSON.stringify({at:i,g:o.g,a:o.a,c:o.c,d:o.d}))}catch(o){}}},{key:"handleToggleAttractionEvent",value:function(e){const o=t(e.currentTarget);!o.data("tourGrades")||o.hasClass("vo-pass-picker__attraction--selected")?this.toggleAttraction(o):m.toggleGrade(o)}},{key:"toggleAttraction",value:function(t){t.toggleClass("vo-pass-picker__attraction--selected");const o=t.hasClass("vo-pass-picker__attraction--selected");this.picker.find(".js-picker-attraction-"+t.data("id")).toggleClass("vo-pass-picker__attraction--selected",o),o?this.attractions.push(t):(this.attractions=this.attractions.filter(function(e){return e.data("id")!==t.data("id")}),delete this.grades[t.data("id")]),e.location.hash=this.hash,this.refreshTotals(),a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:(o?"enable":"disabled")+"Attraction",eventLabel:t.data("id")})}},{key:"acceptGrade",value:function(e){const o=t(e.currentTarget).parents(".vo-pass-picker__attraction"),a=o.find(".js-picker-tour-grade").val();this.grades[o.data("id")]=a,m.updateGradePrices(o,a),m.toggleGrade(o),this.toggleAttraction(o)}},{key:"cancelGrade",value:function(e){const o=t(e.currentTarget).parents(".vo-pass-picker__attraction");delete this.grades[o.data("id")],m.updateGradePrices(o,0),m.toggleGrade(o)}},{key:"clearAttractions",value:function(){this.attractions=[],this.grades={},this.toggleAllAttractions(),e.location.hash=this.hash,this.refreshTotals(),this.picker.find(".js-picker-savings").text("$0"),a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:"resetAttractions"})}},{key:"toggleAllAttractions",value:function(){let e;const o=this;for(e in this.picker.find(".vo-pass-picker__attraction").each(function(e,a){const n=t(a);n.toggleClass("vo-pass-picker__attraction--selected",o.attractions.some(function(t){return t.data("id")===n.data("id")}))}),this.grades)m.updateGradePrices(this.picker.find(".js-picker-attraction-".concat(e)),this.grades[e])}},{key:"refreshInputs",value:function(){this.picker.find(".js-picker-adults").val(this.adults),this.picker.find(".js-picker-children").val(this.children),this.picker.find(".js-picker-days").val(null===this.days?"":this.days)}},{key:"changeAdults",value:function(o){this.adultNumber=parseInt(t(o.currentTarget).val()),e.location.hash=this.hash,a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:"changeAdults",eventLabel:this.adults,eventValue:this.adults})}},{key:"changeChildren",value:function(o){this.childNumber=parseInt(t(o.currentTarget).val()),e.location.hash=this.hash,a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:"changeChildren",eventLabel:this.children,eventValue:this.children})}},{key:"changeDays",value:function(o){this.days=""===t(o.currentTarget).val()?null:parseInt(t(o.currentTarget).val()),e.location.hash=this.hash,a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:"changeAdults",eventLabel:this.days,eventValue:null===this.days?0:this.days})}},{key:"calculateTotal",value:function(){const t=this;this.total=0,this.attractions.forEach(function(e){t.total+=t.adults*parseFloat(e.data("priceAdult")),t.total+=t.children*parseFloat(e.data("priceChild"))})}},{key:"calculatePassTotal",value:function(){const o=this;return 0===this.attractions.length?(this.recommendedPassTotal=0,this.cheapestPassTotal=0,this.calculatedPasses.cheapest=null,this.calculatedPasses.recommended=null,t.when()):(this.loaderEnabled=!0,t.ajax({url:d,type:"POST",contentType:"application/json",dataType:"JSON",data:JSON.stringify({attractions:this.attractions.map(function(t){return t.data("id")}),adults:this.adults,children:this.children,days:this.days,grades:this.grades,timeStamp:e.performance.now()})}).then(function(t){t.error?(o.loaderEnabled=!1,o.inErrorState=!0):t.timeStamp<o.lastUpdate?o.loaderEnabled=!1:(o.calculatedPasses.cheapest=t.cheapest,o.calculatedPasses.recommended=t.recommended,o.recommendedPassTotal=null===t.recommended?0:t.recommended.total,o.cheapestPassTotal=null===t.cheapest?0:t.cheapest.total,o.ericsTip=t.ericsTip,o.lastUpdate=t.timeStamp,o.loaderEnabled=!1,o.inErrorState=!1)}).fail(function(){o.loaderEnabled=!1,o.inErrorState=!0}))}},{key:"refreshTotals",value:function(){const t=this;this.calculatePassTotal().then(function(){t.updateCart()}),this.calculateTotal(),this.hideShareResults()}},{key:"updateCart",value:function(){const e=this,o=this.calculatedPasses.cheapest,a=this.calculatedPasses.recommended;t(".vo-pass-picker-stats");const n=this.totalAmount-this.recommendedPassTotalAmount,i=n>0?"$"+n.toFixed(2):"$0";if(this.picker.find(".js-picker-pass").each(function(e,n){const i=t(n),r=null!==o&&parseInt(i.data("passId"))===o.passId,s=null!==a&&parseInt(i.data("passId"))===a.passId;i.toggleClass("vo-pass-picker__pass--cheapest",r),i.find(".vo-pass-picker__pass-image").toggleClass("vo-pass-picker__pass-image--cheapest",r),i.toggleClass("vo-pass-picker__pass--recommended",s),i.find(".vo-pass-picker__pass-image").toggleClass("vo-pass-picker__pass-image--recommended",s)}),this.picker.find(".js-picker-counter").toggleClass("vo-pass-picker__counter--not-empty",this.attractions.length>0),this.picker.find(".vo-pass-picker-stats").toggleClass("vo-pass-picker-stats--show",this.attractions.length>0),this.attractions.length>0?this.picker.find(".vo-pass-picker__counter-holder").removeClass("vo-pass-picker__counter-holder--shadow"):this.picker.find(".vo-pass-picker__counter-holder").addClass("vo-pass-picker__counter-holder--shadow"),this.picker.find(".js-picker-counter").removeClass("vo-pass-picker__counter--no-pass"),this.picker.find(".js-picker-total").text("$".concat(this.totalAmount)),this.picker.find(".js-picker-total-attractions").text("".concat(this.attractions.length)),this.picker.find(".js-picker-cheapest-pass-total").text("$".concat(this.cheapestPassTotalAmount)),this.picker.find(".js-picker-recommended-pass-total").text("$".concat(this.recommendedPassTotalAmount)),this.picker.find(".js-picker-clear").toggle(this.attractions.length>0),this.recommendedPassTotalAmount>0?this.picker.find(".js-picker-savings").text(i):this.picker.find(".js-picker-savings").text("$0"),null!==a){this.picker.find(".js-picker-recommended").show();const n=null!==a.days?"".concat(a.days," days"):"".concat(a.attractions," attractions");this.picker.find(".js-picker-pass-recommended-holder").empty().append(this.picker.find(".js-picker-pass").filter(function(e,o){return t(o).data("passId")==a.passId}).find("img").clone()).attr("href",this.passes[a.passId].url),o.passId===a.passId?t(".js-picker-pass-recommended-holder").addClass("vo-pass-picker__pass--cheapest"):t(".js-picker-pass-recommended-holder").removeClass("vo-pass-picker__pass--cheapest"),this.picker.find(".js-picker-recommended-pass-name").text("".concat(this.passes[a.passId].name," ").concat(n));const i=this.picker.find(".js-picker-recommended-pass-link");i.text(i.data("template").replace("{passName}",this.passes[a.passId].name)).attr("href",this.passes[a.passId].url).attr("data-var_id",a.id).attr("data-pass_id",a.passId).attr("data-info_url",this.passes[a.passId].info_url),this.picker.find(".js-picker-share-by-email").attr("data-var_id",a.id).attr("data-pass_id",a.passId),this.picker.find(".js-picker-recommended-pass-adult-count").text("".concat(this.adults)),this.picker.find(".js-picker-recommended-pass-adult-price").text("$".concat(a.adultPrice)),this.picker.find(".js-picker-recommended-pass-adult-total-price").text("$".concat((this.adults*a.adultPrice).toFixed(2))),this.picker.find(".js-picker-recommended-pass-child-count").text("".concat(this.children)),this.picker.find(".js-picker-recommended-pass-child-price").text("$".concat(a.childPrice)),this.picker.find(".js-picker-recommended-pass-child-total-price").text("$".concat((this.children*a.childPrice).toFixed(2))),this.picker.find(".js-picker-recommended-pass-adult").show(),this.picker.find(".js-picker-recommended-pass-child").toggle(this.children>0),this.picker.find(".js-picker-recommended-extras-total-price").text("$".concat(a.extraTotal)),this.picker.find(".js-picker-recommended-extras-total").toggle(a.extraTotal>0),this.picker.find(".js-picker-recommended-pass-total").text("$".concat(a.total.toFixed(2))),this.picker.find(".js-picker-recommended-reason").text("".concat(a.reasonShort)),this.picker.find(".js-picker-recommended-reason-long").text("".concat(a.reasonLong)),this.picker.find(".js-picker-recommended-extras li").remove(),this.picker.find(".js-picker-recommended-extras-text").show(),a.extra.forEach(function(o){const a=null===o.linkName?o.name:o.linkName,n=null===o.url?"javascript:void(0)":o.url,i=null===o.url?"":"_blank",r=t('<li><a href="'.concat(n,"\" class='vo-pass-picker__extra_attraction' target=\"").concat(i,'">').concat(a,"</a></li>")).appendTo(e.picker.find(".js-picker-recommended-extras"));null===o.url&&r.on("click",m.showNoUrlPopup)}),0===a.extra.length&&this.picker.find(".js-picker-recommended-extras-text").hide()}else this.picker.find(".js-picker-counter").addClass("vo-pass-picker__counter--no-pass"),this.picker.find(".js-picker-recommended").hide();if(null!==o){if(o.id===a.id)return void this.picker.find(".js-picker-cheapest").hide();this.picker.find(".js-picker-cheapest").show();const n=null!==o.days?"".concat(o.days," days"):"".concat(o.attractions," attractions");this.picker.find(".js-picker-cheapest-pass-name").text("".concat(this.passes[o.passId].name," ").concat(n)).attr("href",this.passes[o.passId].url);const i=this.picker.find(".js-picker-cheapest-pass-link");i.text(i.data("template").replace("{passName}",this.passes[o.passId].name)).attr("href",this.passes[o.passId].url).attr("data-var_id",o.id
2).attr("data-pass_id",o.passId),this.picker.find(".js-picker-pass-cheapest-holder").empty().append(this.picker.find(".js-picker-pass").filter(function(e,a){return t(a).data("passId")===o.passId}).find("img").clone()).attr("href",this.passes[o.passId].url),this.picker.find(".js-picker-cheapest-pass-adult-count").text("".concat(this.adults)),this.picker.find(".js-picker-cheapest-pass-adult-price").text("$".concat(o.adultPrice)),this.picker.find(".js-picker-cheapest-pass-adult-total-price").text("$".concat((this.adults*o.adultPrice).toFixed(2))),this.picker.find(".js-picker-cheapest-pass-child-count").text("".concat(this.children)),this.picker.find(".js-picker-cheapest-pass-child-price").text("$".concat(o.childPrice)),this.picker.find(".js-picker-cheapest-pass-child-total-price").text("$".concat((this.children*o.childPrice).toFixed(2))),this.picker.find(".js-picker-cheapest-pass-adult").show(),this.picker.find(".js-picker-cheapest-pass-child").toggle(this.children>0),this.picker.find(".js-picker-cheapest-extras-total-price").text("$".concat(o.extraTotal)),this.picker.find(".js-picker-cheapest-extras-total").toggle(o.extraTotal>0),this.picker.find(".js-picker-cheapest-extras li").remove(),this.picker.find(".js-picker-cheapest-extras-text").show(),this.picker.find(".js-picker-cheapest .vo-pass-picker__pass-results--collapsed").empty()||this.picker.find(".js-picker-savings").text("$"+(this.totalAmount-this.cheapestPassTotalAmount).toFixed(2)),o.extra.forEach(function(t){const o=null===t.linkName?t.name:t.linkName,a=null===t.url?"javascript:void(0)":t.url,n=null===t.url?"":"_blank",i=e.picker.find(".js-picker-cheapest-extras").append('<li><a href="'.concat(a,"\" class='vo-pass-picker__extra_attraction' target=\"").concat(n,'">').concat(o,"</a></li>"));null===t.url&&i.on("click",m.showNoUrlPopup)}),0===o.extra.length&&this.picker.find(".js-picker-cheapest-extras-text").hide()}else this.picker.find(".js-picker-cheapest").hide()}},{key:"toggleExplanation",value:function(e){const o=t(e.currentTarget),n=o.find(".fa");t(".js-picker-explanation").toggle(),n.hasClass("fa-chevron-down")?(n.removeClass("fa-chevron-down"),n.addClass("fa-info-circle")):(n.removeClass("fa-info-circle"),n.addClass("fa-chevron-down")),o.blur(),a.push({event:"gaEvent",eventCategory:"PassPicker",eventAction:"toggleExplanation"})}},{key:"toggleSharing",value:function(e){t(".js-picker-sharing").toggle()}},{key:"shareByEmail",value:function(e){e.preventDefault();const o=this.totalAmount-this.recommendedPassTotalAmount,a=o>0?"$"+o.toFixed(2):"$0";t(l).removeClass("d-none"),t(c).addClass("d-none"),this.hideShareResults();let n="";const r=t(".js-picker-share-by-email").attr("data-var_id"),d=t(".js-picker-share-by-email").attr("data-pass_id");void 0!==r&&void 0!==d&&(n=voHSVariations[d][r].discount);const m=t(".vo-pass-picker__pass-results").find(".js-picker-recommended-pass-link").attr("href"),f=t(".vo-pass-picker__pass-results").find(".js-picker-recommended-pass-link").attr("data-info_url");t.ajax({url:u,type:"POST",contentType:"application/json",dataType:"JSON",headers:{"X-WP-Nonce":nymgData.restNonce},data:JSON.stringify({id:h,email:t(s).val(),total:this.totalAmount,savings:a,params:this.hash,pass:this.passes[this.calculatedPasses.cheapest.passId].name,attractions:this.attractions.map(function(t){return t.data("id")}),adults:this.adults,children:this.children,days:this.days,grades:this.grades,buy_url:m,info_url:f,discount_code:n,subscribe_newsletter:t("#pp-newsletter-subscribe").prop("checked")})}).then(function(e){t(i).show(),t(i).html(e.message),t(i).addClass("text-success"),!0===e.error&&t(i).addClass("text-danger"),!1===e.error&&t(s).val("")}).fail(function(e){t(i).show(),t(i).html(p),t(i).addClass("text-danger")}).always(function(){t(c).removeClass("d-none"),t(l).addClass("d-none")})}},{key:"hideShareResults",value:function(){t(i).hide(),t(i).removeClass("text-success, text-danger")}},{key:"handleTogglePassEvent",value:function(e){const o=this,a=t(e.currentTarget),n=!a.hasClass("vo-pass-picker__pass--selected");n&&this.picker.find(".vo-pass-picker__pass--selected").each(function(e,a){const n=t(a);o.togglePassRelated(n,!1)}),this.togglePassRelated(a,n)}},{key:"togglePassRelated",value:function(e,o){const a=e.data("passId");this.picker.find(".vo-pass-picker__attraction").each(function(e,n){o&&Str
2ing(t(n).data("passes")).split(",").includes(String(a))?t(n).addClass("vo-pass-picker__attraction--included"):t(n).removeClass("vo-pass-picker__attraction--included")}),e.toggleClass("vo-pass-picker__pass--selected",o)}},{key:"handleToggleCounterDetails",value:function(e){const o=t(e.currentTarget).parent(),a=o.hasClass("js-picker-cheapest"),n=o.find(".vo-pass-picker__pass-info").toggle().is(":visible"),i=this.totalAmount-(a&&n?this.cheapestPassTotalAmount:this.recommendedPassTotalAmount),r=i>0?"$"+i.toFixed(2):"$0";this.picker.find(".js-picker-savings").text(r),o.toggleClass("vo-pass-picker__pass-results--collapsed").find(".vo-pass-picker__counter-pass-chevron").toggleClass("fa-chevron-down",!n).toggleClass("fa-chevron-up",n)}},{key:"adultNumber",set:function(t){this.adults=t,this.refreshTotals(),this.refreshInputs()}},{key:"childNumber",set:function(t){this.children=t,this.refreshTotals(),this.refreshInputs()}},{key:"dayNumber",set:function(t){this.days=t,this.refreshTotals(),this.refreshInputs()}},{key:"loaderEnabled",set:function(t){this.loader=!!t,this.picker.find(".vo-pass-picker__counter").toggleClass("vo-pass-picker__counter--loading",t)}},{key:"inErrorState",set:function(t){this.picker.find(".vo-pass-picker__counter").toggleClass("vo-pass-picker__counter--failed",t)}},{key:"totalAmount",get:function(){return this.total.toFixed(2)}},{key:"recommendedPassTotalAmount",get:function(){return this.recommendedPassTotal.toFixed(2)}},{key:"cheapestPassTotalAmount",get:function(){return this.cheapestPassTotal.toFixed(2)}},{key:"hash",get:function(){const t=this.attractions.map(function(t){return t.data("id")});return JSON.stringify({at:t,g:this.grades,a:this.adults,c:this.children,d:this.days})}}],[{key:"toggleGrade",value:function(t){t.toggleClass("vo-pass-picker__attraction--show-grades"),t.find(".vo-pass-picker__attraction-tour-grades").toggleClass("vo-pass-picker__attraction-tour-grades--visible"),t.find(".vo-pass-picker__attraction-details").toggle()}},{key:"updateGradePrices",value:function(t,e){let o;o=0===e?t.find(".js-picker-tour-grades").data("tourGrades")[0]:t.find(".js-picker-tour-grades").data("tourGrades").find(function(t){return t.id==e}),t.data("priceAdult",o.price_adult),t.data("priceChild",o.price_child),t.find(".js-price-adult").text(Math.round(o.price_adult)),t.find(".js-price-child").text(Math.round(o.price_child))}},{key:"seeMore",value:function(){const e=t(".vo-pass-picker__counter-holder");e.addClass("vo-pass-picker__counter-holder--in-screen"),t(".vo-pass-picker__counter").addClass("vo-pass-picker__counter--in-screen"),e.length>0&&t([o.documentElement,o.body]).animate({scrollTop:e.offset().top},200)}},{key:"showNoUrlPopup",value:function(){t("#vo-pass-picker__no-url-message").dialog({modal:!0,buttons:{Ok:function(){t(this).dialog("close")}}})}}]),m}()}(jQuery,window,document,dataLayer)}]),function(t,e,o){const a=".js-picker-cheapest-pass-link, .js-picker-recommended-pass-link",n="#overlay",i=".pp-modal",r=".pp-modal-content",s=".pp-modal-close",c=".pp-copy-button",l="hs_pp_modal_data",d="vo-hs-pp--modal-active",u=new B,h=".pp-pass-image",p=".pp-pass-discount",m=".pp-holder-discount",f=".pp-holder-passname",v=".pp-holder-amount";function g(t){!function(t,e,a){let n="";if(a){const t=new Date;t.setTime(t.getTime()+24*a*60*60*1e3),n="; expires"+t.toGMTString()}o.cookie=t+"="+e+n+";path=/;SameSite=None;Secure;"}(t,"",-1)}function k(e){t(".pp-modal-title").html(e)}function y(e){!1===e?(t(h).html(""),t(f).text(""),t(v).text(""),t(m).text(""),t(p).hide(),t(r+" .pp-pass-reason").html("").hide(),t(r+" .pp-buy-now button").removeData("href").removeAttr("data-href"),t(r+" .pp-buy-now"),t(r+" .pp-pass-name-full").html(""),t(r+" .pp-pass-info").html(""),t(r+" .pp-pass-extra-list").html(""),t(r+" .pp-pass-extra").hide(),t(r).hide()):(t(h).html(e.image),t(f).text(e.passName),t(v).text(e.amount),null!==e.discount&&""!==e.discount&&(t(m).text(e.discount),t(p).show()),t(r+" .pp-pass-reason").html(e.reason).show(),t(r+" .pp-buy-now button").attr("data-href",e.buynow.attr("href")),t(r+" .pp-buy-now").show(),t(r+" .pp-pass-name-full").html(e.passNameFull).show(),t(r+" .pp-pass-info").html(e.info),""!==e.extra&&(t(r+" .pp-pass-extra-list").html(e.extra),t(r+" .pp-pass-extra").show()),t(r).show())}let C;function b(){const o=t("#wpadminbar"),a=o.length?o.height():0,n=t(".header__banner"),i=n.length&&n.is(":visible")?n.height():0,r=t("#main-menu").height()??0,s=t(".vo-pass-picker__category"),c=s.length>0?s.offset().top:0,l=t(e).scrollTop()??0,d=t(".vo-pass-picker__counter-holder"),u=a+i+r+16??0,h=a+i+r,p=e.innerWidth??0,m=(p-d.parent().width()+46)/2;p<=1550?d.removeClass("vo-pass-picker__counter-holder--fixed").css("width","").css("top",""):l+60>=c-h?(d.height(),d.removeClass("vo-pass-picker__counter-holder--fixed-mobile").addClass("vo-pass-picker__counter-holder--fixed").css("width",m+"px").css("top",u+"px")):d.removeClass("vo-pass-picker__counter-holder--fixed").css("width",m+"px").css("top","")}t(o).ready(function(){t(".vo-pass-picker__loader").remove(),t(".vo-pass-picker").removeClass("loading"),t(".vo-pass-picker__attraction-image-holder*").each(function(){t(this).css("backgroundImage",'url("'+t(this).data("image")+'")')}),g(l),t(s).on("click",function(e){e.preventDefault(),u.hideOverlay(),t(i).fadeOut(200,function(){k(""),y(!1)}),t("body").removeClass(d),g(l)}),t(n).on("click",function(){t(s).click()}),t(s).on("keypress",function(e){13===e.which&&t(this).click()}),t(o).on("click",r+" .pp-buy-now button",function(){const o=t(this).data("href");o&&e.open(o,"_blank")}),t(a).on("click",function(e){return e.preventDefault(),!(t(this).data("var_id")>0&&(function(e){const o=e.attr("data-var_id"),a=e.attr("data-pass_id"),n=e.attr("data-pass_type"),r=t(".vo-pass-picker__pass-results--"+n),s=voHSPasses[a].name,c=voHSVariations[a][o].discount,l=t(".js-picker-savings").text(),h=r.find(".vo-pass-picker__button");u.showOverlay(),k(s),y({image:r.find(".vo-pass-picker__pass-image").clone(),passName:s,passNameFull:r.find(".js-picker-"+n+"-pass-name").text(),amount:l,discount:c,reason:r.find(".js-picker-"+n+"-reason").text(),buynow:h,info:r.find(".js-picker-explanation").html(),extra:r.find(".vo-pass-picker__extras").html()}),t(i).fadeIn(200),t("body").addClass(d)}(t(this)),1))}),t(a).on("keypress",function(e){13===e.which&&t(this).click()}),t(o).on("click",c,function(){const e=t("<input>"),a=t(m).text();t("body").append(e),e.val(a).select(),o.execCommand("copy"),e.remove(),alert(t(this).attr("data-success"))}),t(c).on("keypress",function(e){13===e.which&&t(this).click()})}),t(function(){C=t(".vo-pass-picker__counter-holder"),C.height(),b()}),t(e).on("resize",function(){b()}).resize(),t(e).on("scroll",function(){b()}).scroll()}(jQuery,window,document),function(t,e,o,a){let n=null,i=[],r=!1,s=null;const c=t("#travel-information"),l=t("#travel-results"),d=t("#travel-results-templates"),u=t("#travel-no-results"),h=t(".nymg-loader"),p=t("#persons"),m=t("#departure"),f=t("#destination"),v=t(".reverse-journey"),g=t("#extra-reverse-journey-result"),k=t(".
2share-collapse-btn"),C=t(".share-by-email-loader"),b=t(".share-by-email-send-icon"),_=t(".share-by-email-message"),w=t("#email");t("#collapseShareByEmail");const x="count",S="transfer_from",P="transfer_to",I="reverse";function T(){const e=[],o=[],a=parseInt(t("#departure").find(":selected").val()),n=parseInt(t("#destination").find(":selected").val());r=!r,!0===r&&v.addClass("active"),!0!==r&&v.removeClass("active"),t("#departure option").each(function(){e[t(this).val()]=t(this).text()}),t("#destination option").each(function(){o[t(this).val()]=t(this).text()}),m.find("option:not(:first)").remove(),f.find("option:not(:first)").remove(),o.forEach(function(t,e){const o=n===e?"selected":"";m.append('<option value="'+e+'" '+o+">"+t+"</option>")}),e.forEach(function(t,e){const o=a===e?"selected":"";f.append('<option value="'+e+'" '+o+">"+t+"</option>")})}function D(){i=[],t("#alert-area").html(""),L();const e=t(":input").serializeArray();if(null!=n&&n.abort(),""===t(f).val()||""===t(m).val()||0===t(p).val())return!1;h.removeClass("d-none"),c.addClass("loading-overlay"),l.addClass("loading-overlay"),l.addClass("d-none"),u.addClass("d-none"),g.addClass("d-none"),d.html(""),t(k).addClass("pe-none"),n=t.post("/wp-json/transfer-planner/v1/calculate",e,function(e){const o=null!==e.data.transportationModes?e.data.transportationModes:[];null!==e.data.skippedTransportationModes&&e.data.skippedTransportationModes,s=o;let a=!1;for(const[t,n]of Object.entries(o))d.append(n.template),a=!0;d.children().length?(l.removeClass("d-none"),g.removeClass("d-none")):u.removeClass("d-none"),a&&t(k).removeClass("pe-none"),n=null}).fail(function(e){!function(e){if(e.responseJSON!==a){const o=e.responseJSON;o.data!==a&&o.data.validationErrors!==a&&o.data.validationErrors.forEach(function(e){t("#"+e.element).addClass("is-invalid"),t("#validation-feedback-"+e.element).html(e.message).show()}),o.message!==a&&function(t,e="danger"){const o='<div id="alert" class="alert alert-'+e+' alert-dismissible fade show" role="alert">'+t+'<button type="button" class="btn-close btn-close-alert-modal" aria-label="Close"></button></div>';i.push(o)}(o.message),j()}}(e)}).always(function(){j(),i.forEach(function(e){t("#alert-area").append(e)})})}function M(){t("#alert").fadeOut(500,function(){t(this).remove()})}function j(){h.addClass("d-none"),l.removeClass("loading-overlay"),c.removeClass("loading-overlay")}function E(){if(!c.length)return;const o=new URL(e.location);o.searchParams.set(x,t(".persons").val());const a=t(m).val(),n=a?t(m).find('[value="'+a+'"]').text():"";o.searchParams.set(S,n);const i=t(f).val(),s=i?t(f).find('[value="'+i+'"]').text():"";o.searchParams.set(P,s);const l=r?"1":"0";o.searchParams.set(I,l),e.history.replaceState({},"",o.toString().split("#")[0])}function F(t){return new URLSearchParams(e.location.search).get(t)}function A(e,o=!1){t(_).html(e),t(_).removeClass("d-none"),o&&t(_).addClass("text-success"),o||t(_).addClass("text-danger")}function L(){t(_).addClass("d-none"),t(_).removeClass("text-success"),t(_).removeClass("text-danger")}t(function(){!function(){try{let e=F(x),o=F(S),a=F(P);if("1"===F(I)&&(T(),o=F(P),a=F(S)),null===e||null===o||null===a)return!1;e=t.isNumeric(e)&&e>=1?e:2,t(".persons").val(e),t("#departure option").each(function(){t(this).text()===o&&t(this).attr("selected","selected")}),t("#destination option").each(function(){t(this).text()===a&&t(this).attr("selected","selected")}),D()}catch(y){}}(),t(o).on("change","#transportation-modes, .persons, #sorting",D),t(o).on("change","#departure, #destination",D),t(o).on("submit","#travel-information form",function(t){t.preventDefault(),D()}),t(o).on("click",".btn-close-alert-modal",M),t("input, select").change(function(e){var o;e.preventDefault(),o=t(this).attr("id"),t("#"+o).removeClass("is-invalid"),t("#validation-feedback-"+o).html("").hide(),E()}),t(".reverse-journey").click(function(t){T(),E(),D()}),t(".persons-minus").click(function(e){e.preventDefault(),function(e){const o=t("."+e);let a=o.val();a--,a>0&&o.val(a);o.change()}("persons")}),t(".persons-plus").click(function(e){e.preventDefault(),function(e){const o=t("."+e);let a=o.val();a++,o.val(a),o.change()}("persons")}),t(o).on("click",".share-collapse-btn",function(e){e.preventDefault();let o=t(".share-by-email").hasClass("collapse");o&&t(".share-by-email").removeClass("collapse"),o||t(".share-by-email").addClass("collapse")}),t(o).on("click",".share-by-email-btn",function(o){!function(){if(null===s||0===s.length)return!1;let o={email:t(w).val(),share_url:e.location.href,travel_methods:[],subscribe_newsletter:t("#tp-newsletter-subscribe").prop("checked")};for(const[t,e]of Object.entries(s))e&&"object"==typeof e&&o.travel_methods.push({title:e.title,price:e.price});t(C).removeClass("d-none"),t(b).addClass("d-none"),L(),t.post("/wp-json/transfer-planner/v1/share-by-email",o).done(function(t){t.message!=a&&""!=t.message&&A(t.message,!0)}).fail(function(t){let e=t.responseJSON.message;e!=a&&""!=e&&A(e)}).always(function(){t(C).addClass("d-none"),t(b).removeClass("d-none")})}()})})}(jQuery,window,document),function(t,e,o){const a=nymgData||{},n=a.itinerary??{};
2n.setup,n.rest,a.locale,t(o).ready(function(){!function(){if(!t(".nymg-itinerary__wrapper").length)return;(new i).init()}(),function(){if(!t(".nymg-travel").length);}()});class i{wrapper=t(".nymg-itinerary__wrapper");overviewPosition=0;overflow;overview;headings;cells;timeCells;nav;navPrev;navNext;init=function(){const a=this;if(a.wrapper.length){if(a.overflow=t(".nymg-itinerary__overflow"),a.overview=t(".nymg-itinerary__overview"),a.headings=t(".nymg-itinerary__heading"),a.cells=t(".nymg-itinerary__cell"),a.timeCells=t(".nymg-itinerary__time"),a.nav=t(".nymg-itinerary__nav"),a.navPrev=a.nav.find(".nymg-itinerary__nav--prev"),a.navNext=a.nav.find(".nymg-itinerary__nav--next"),a.overviewPosition=a.getPostion(),a.wrapper.attr("id","nymg-itinerary__printarea"),"true"!==a.getUrlParameter("print")&&e.matchMedia("print").addListener(function(t){t.matches&&alert(a.wrapper.data("alert"))}),a.wrapper.find("a[href^=http]").each(function(){var e=t(this).attr("href");e=(e=e.replace("http://","")).replace("https://",""),t(this).attr("data-print",e)}),e.matchMedia("screen").matches&&"true"!==a.getUrlParameter("print"))a.updateHtmlOutput(),a.updateNav(),a.resizeCells(),a.updateTimeWidth(!1),t(e).resize(function(){a.updateNav(),a.resizeCells()}),a.wrapper.find(".nymg-itinerary__nav button").on("click",function(){a.moveOverview(t(this).parent().attr("class").replace("nymg-itinerary__nav--",""))}),a.wrapper.find("button").keypress(function(e){if(13===e.which)return t(this).click(),!1}),setInterval(function(){a.getPostion()!==a.overviewPosition&&(a.overviewPosition=a.getPostion(),a.updateButtons(a.overviewPosition))},50);else{a.clearCells(),a.updateTimeWidth(!0),a.wrapper.addClass("print"),t("body").addClass("print-preview");for(var n=t(".nymg-itinerary__overview > .nymg-itinerary__day"),i=0;i<n.length;i+=3)n.slice(i,i+3).wrapAll('<li class="print-break"></li>').wrapAll('<div class="print-break__div"></div>').wrapAll("<ul></ul>")}t(o).bind("keyup keydown",function(e){return!e.ctrlKey&&!e.metaKey||80!==e.keyCode||(alert(a.wrapper.data("alert")),t(".nymg-itinerary__print--action").click(),!1)})}};getPostion=function(){return this.overview.position()?.left};updateNav=function(){const t=this;t.overflow.css("paddingTop",0),t.nav.hide(),t.overview.width()>t.wrapper.width()-10?(t.overflow.css("overflowX","scroll"),t.overflow.css("paddingTop","2rem"),t.wrapper.find(".nymg-itinerary__title").length&&t.nav.css("top","2rem"),t.nav.show(),t.updateButtons(t.overviewPosition)):t.overview.css("margin","auto")};updateButtons=function(t){const e=this;e.navPrev.hide(),e.navNext.hide(),t<0&&e.navPrev.show(),e.nav.width()-t<e.overview.width()&&e.navNext.show()};updateHtmlOutput=function(){let e=this;e.headings.each(function(){""===t(this).text()&&t(this).html(" ")}),e.navPrev.find("button").addClass("nymg-itinerary__nav__button"),e.navNext.find("button").addClass("nymg-itinerary__nav__button")};resizeCells=function(){let o=this,a=0;e.innerWidth<500?o.clearCells():(o.cells.each(function(){t(this).show(),t(this).height()>a&&(a=t(this).height())}),o.cells.each(function(){var e=t(this).parent().parent();"nymg-itinerary__times"!==e.attr("class")&&e.find(".nymg-itinerary__cell").first().html()!==t(this).html()&&t(this).contents().length<2&&t(this).css("borderTopColor","#E0E0E0"),t(this).height()!==a&&t(this).height(a)}))};updateTimeWidth=function(e){let o=this;var a=0;if(o.timeCells.each(function(){t(this).text().length>a&&(a=t(this).text().length)}),a>6){var n=a/2.5+"em";t(".nymg-itinerary__times").css("width",n),o.timeCells.each(function(){t(this).css("width","calc("+n+" - 1rem)")}),e&&o.cells.each(function(){t(this).css("paddingLeft",n),t(this).css("minHeight","2rem")})}};clearCells=function(){this.cells.each(function(){t(this).css("height","auto"),t(this).contents().length<2&&t(this).hide()})};moveOverview=function(t){let e=this;var o=e.getPostion(),a=-1*e.overview.width()/3;o="next"===t?o+a:o-a,e.overflow.animate({scrollLeft:-1*o},750)};getUrlParameter=function(t){var o,a,n=e.location.search.substring(1).split("&");for(a=0;a<n.length;a++)if((o=n[a].split("="))[0]===t)return void 0===o[1]||decodeURIComponent(o[1])}}}(jQuery,window,document);var H=".nymg-itinerary-cards__day",q="itineraryBoardEnhanced";function R(t,e,o){const a=Math.max(e-o,0);return{progress:Math.min(Math.abs(t),a),max:a}}function W(t,e,o){return t<0?e>1:e<o-1}function z(t,e){return e?-t:t}function U(){try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function $(t){try{const e=t.querySelector(H);if(!e)return t.clientWidth;return function(t,e){return(Number.isFinite(t)?t:0)+(Number.isFinite(e)?e:0)}(e.getBoundingClientRect().width,parseFloat(window.getComputedStyle(t).columnGap
2)||0)}catch{return 0}}function Q(t,e){try{const o=("function"==typeof t.closest?t.closest(".nymg-itinerary-cards__board"):null)||t.parentElement;return o?o.querySelector(e):null}catch{return null}}function V(t,e,o){try{const{progress:a,max:n}=R(t.scrollLeft,t.scrollWidth,t.clientWidth);if(!W(e,a,n))return;const i=$(t);if(!i)return;t.scrollBy({left:z(e*i,o),behavior:(U(),"auto")})}catch{}}function Y(t,e,o){try{const a=Math.max(t.scrollWidth-t.clientWidth,0),n="end"===e?z(a,o):0;t.scrollTo({left:n,behavior:(U(),"auto")})}catch{}}var G={passive:!1};function J(t){try{if(t.dataset&&"true"===t.dataset[q])return null;t.dataset&&(t.dataset[q]="true")}catch{}const e=function(t){try{return"rtl"===window.getComputedStyle(t).direction}catch{return!1}}(t),o=Q(t,".nymg-itinerary-cards__board-nav--prev"),a=Q(t,".nymg-itinerary-cards__board-nav--next"),n=Q(t,".nymg-itinerary-cards__board-fade"),i=()=>function(t,e,o,a){try{const{progress:n,max:i}=R(t.scrollLeft,t.scrollWidth,t.clientWidth),{prevDisabled:r,nextDisabled:s}=function(t,e){return{prevDisabled:t<=1,nextDisabled:t>=e-1}}(n,i);e&&(e.disabled=r,e.setAttribute("aria-disabled",String(r))),o&&(o.disabled=s,o.setAttribute("aria-disabled",String(s))),a&&a.classList&&a.classList.toggle("nymg-itinerary-cards__board-fade--hidden",s)}catch{}}(t,o,a,n),r=()=>V(t,-1,e),s=()=>V(t,1,e),c=function(o){if(a=o.deltaX,n=o.deltaY,!(Math.abs(n)>Math.abs(a)))return;var a,n;const{progress:i,max:r}=R(t.scrollLeft,t.scrollWidth,t.clientWidth),s=(c=o.deltaY,l=o.deltaMode,d=t.clientWidth,1===l?16*c:2===l?c*(Number.isFinite(d)&&d>0?d:16):c);var c,l,d;W(s>0?1:-1,i,r)&&(o.preventDefault(),t.scrollLeft+=z(s,e))},l=function(o){if(o.target===t)switch(o.key){case"ArrowLeft":o.preventDefault(),V(t,-1,e);break;case"ArrowRight":o.preventDefault(),V(t,1,e);break;case"Home":o.preventDefault(),Y(t,"start",e);break;case"End":o.preventDefault(),Y(t,"end",e)}},d=()=>i(),u=()=>i(),h=[];if(o)try{o.addEventListener("click",r),h.push(()=>o.removeEventListener("click",r))}catch{}if(a)try{a.addEventListener("click",s),h.push(()=>a.removeEventListener("click",s))}catch{}try{t.addEventListener("wheel",c,G),h.push(()=>t.removeEventListener("wheel",c,G))}catch{}try{t.addEventListener("keydown",l),h.push(()=>t.removeEventListener("keydown",l))}catch{}try{t.addEventListener("scroll",d),h.push(()=>t.removeEventListener("scroll",d))}catch{}try{window.addEventListener("resize",u),h.push(()=>window.removeEventListener("resize",u))}catch{}try{if("undefined"!=typeof ResizeObserver){const e=new ResizeObserver(()=>i());e.observe(t);const o=t.querySelector(H);o&&e.observe(o),h.push(()=>e.disconnect())}}catch{}return i(),function(){h.forEach(t=>{try{t()}catch{}});try{t.dataset&&delete t.dataset[q]}catch{}}}function Z(t){const e=[];try{(t||document).querySelectorAll(".nymg-itinerary-cards__days").forEach(t=>{const o=J(t);o&&e.push(o)})}catch{}return e}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>Z()):Z());var X=t(c(),1),K=l(),tt={},et=function(t,e,o){let a=Promise.resolve();if(e&&e.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),r=i?.nonce||i?.getAttribute("nonce");n=e.map(e=>{if((e=function(t){return"/wp-content/themes/sage/public/build/"+t}(e))in tt)return;tt[e]=!0;const a=e.endsWith(".css"),n=a?'[rel="stylesheet"]':"";if(o)for(let o=t.length-1;o>=0;o--){const n=t[o];if(n.href===e&&(!a||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=a?"stylesheet":"modulepreload",a||(i.as="script"),i.crossOrigin="",i.href=e,r&&i.setAttribute("nonce",r),document.head.appendChild(i),a?new Promise((t,o)=>{i.addEventListener("load",t),i.addEventListener("error",()=>o(new Error(`Unable to preload CSS for ${e}`)))}):void 0}),a=Promise.all(n.map(t=>Promise.resolve(t).then(t=>({status:"fulfilled",value:t}),t=>({status:"rejected",reason:t}))))}var n;function i(t){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=t,window.dispatchEvent(e),!e.defaultPrevented)throw t}return a.then(e=>{for(const t of e||[])"rejected"===t.status&&i(t.reason);return t().catch(i)})};async function ot(){const t={NotificationPopup:()=>et(()=>import("./chunks/NotificationPopup-C_1tNOFE.js"),__vite__mapDeps([0,1,2,3]))};for(const[e,o]of Object.entries({"notification-popup":"NotificationPopup"}))customElements.define(`js-${e}`,class extends HTMLElement{async connectedCallback(){try{const a=(await t[o]())[o];if(!a)return void this.setAttribute("data-ny-component-error",e);const n=Array.from(this.attributes).reduce((t,e)=>{const o={imageurl:"imageUrl",newsletteravailable:"newsletterAvailable",newsletterctatext:"newsletterCtaText",closelabel:"closeLabel",triggerlabel:"triggerLabel"}[(a=e.name).toLowerCase()]||a;var a;let n=e.value;return"newsletterAvailable"===o&&(n="true"===n),{...t,[o]:n}},{}),i=t=>{this.setAttribute("data-ny-component-error",e)};(0,K.createRoot)(this,{onUncaughtError:t=>i(t),onCaughtError:t=>i(t)}).render(X.createElement(a,n))}catch(y){this.setAttribute("data-ny-component-error",e)}}})}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ot):ot());var at=class{constructor(){this.copy_action=document.querySelector(".article-action--copy")}init(){this.copy_action&&this.addListener()}addListener(){this.copy_action.addEventListener("click",t=>{t.preventDefault();const e=t.currentTarget.getAttribute("data-url");e&&this.copyToClipboard(e)})}copyToClipboard(t){navigator.clipboard?navigator.clipboard.writeText(t).then(()=>this.toggleMessage("success")).catch(t=>{this.logError(t),this.toggleMessage("error")}):this.copyToClipboardFallback(t)}copyToClipboardFallback(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",document.body.appendChild(e),e.select();try{this.toggleMessage(document.execCommand("copy")?"success":"error")}catch(o){this.logError(o),this.toggleMessage("error")}document.body.removeChild(e)}toggleMessage(t){const e=document.querySelector(".article-actions__message");if(!e)return;const o="hidden",a=e.querySelector(".message--success"),n=e.querySelector(".message--error");a&&n&&("success"===t?(a.classList.remove(o),n.classList.add(o)):(a.classList.add(o),n.classList.remove(o)),e.classList.remove(o),setTimeout(()=>{e.classList.add(o)},3e3))}logError(t){}},nt=class{init(){var t=this;(0,p.default)(document).ready(function(){t.cookiebar=(0,p.default)(".cookiebar"),t.cookiebar_close=(0,p.default)(".btn-cookiebar-close"),t.cookiebar.length&&("1"!==x("acceptCookies")&&(t.cookiebar.addClass("active"),S("acceptCookies","1",1),t.publishHeight(),t.resizeHandler=function(){t.publishHeight()},(0,p.default)(window).on("resize",t.resizeHandler)),t.cookiebar_close.on("click",function(e){e.preventDefault(),t.cookiebar.fadeOut("slow",function(){t.clearHeight()})}),t.cookiebar_close.on("keypress",function(e){13===e.which&&t.cookiebar_close.trigger("click")}))})}publishHeight(){document.documentElement.style.setProperty("--nymg-cookiebar-height",Math.
2ceil(this.cookiebar.outerHeight())+"px")}clearHeight(){document.documentElement.style.removeProperty("--nymg-cookiebar-height"),this.resizeHandler&&((0,p.default)(window).off("resize",this.resizeHandler),this.resizeHandler=void 0)}},it=class{constructor(){this.mobile_large_breakpoint=768,this.mobile_small_breakpoint=400,this.background_overlay=new B,this.menu_item_has_children_selector=".menu-item-has-children",this.dropdown_menu_selector=".dropdown-menu",this.depth_0_selector=".depth_0",this.navbar_selector="#nav-main-menu",this.navbar_collapse_selector=".navbar-collapse",this.navbar_toggler_selector=".navbar-toggler",this.navbar_toggler_active_selector=".navbar-toggler.active",this.menu_selector="#menu-menu",this.top_level_menu_item=null,this.dropdown=null,this.navbar=null,this.navbar_collapse=null,this.depth_0=null,this.admin_bar=null,this.banners=null,this.header=null,this.submenu=null,this.top_row=null,this.navbar_top=null,this.top_row_height=null,this.scoll_menu_detected="scrolled-menu",this.navbar_margins="mt-2 mt-md-1"}init(){var t=this,e=(0,p.default)(window).width();(0,p.default)(document).ready(function(){t.top_level_menu_item=(0,p.default)(".top-level-menu-item"),t.dropdown=(0,p.default)(".dropdown"),t.navbar=(0,p.default)(t.navbar_selector),t.navbar_collapse=(0,p.default)(t.navbar_collapse_selector),t.depth_0=(0,p.default)(t.depth_0_selector),t.admin_bar=(0,p.default)("#wpadminbar"),t.banners=(0,p.default)(".header__banner"),t.header=(0,p.default)("#top_header"),t.submenu=(0,p.default)(".menu-menu-container"),t.top_row=(0,p.default)("#top-row"),t.navbar_top=t.navbar.offset()?t.navbar.offset().top:0,t.top_row_height=t.top_row.outerHeight()??0,(0,p.default)(document).on("setMenuPosition",function(){t.setMenuPosition()}),t.initMenu(),t.setMenuPosition(),(0,p.default)(window).on("resize",function(){var o=(0,p.default)(window).width();o!==e&&(e=o,t.resetMenu(),t.initMenu(),t.setMenuPosition())}),(0,p.default)(window).scroll(function(){t.setMenuPosition()})})}initMenu(){let t=window.innerWidth;t>this.mobile_large_breakpoint&&this.initScreenMenu(),t>=this.mobile_small_breakpoint&&t<=this.mobile_large_breakpoint&&this.initMobileMenu(),t<this.mobile_small_breakpoint&&this.initMobileMenu(!1)}initMobileMenu(t=!0){var e=this;this.top_level_menu_item.off("mouseenter"),this.top_level_menu_item.off("mouseleave"),this.top_level_menu_item.click(function(){e.updateMobileSubmenuWidth(this,t)}),(0,p.default)(this.navbar_toggler_selector).click(function(){e.updateNavbarToggler(this)})}updateNavbarToggler(t){"true"==(0,p.default)(t).attr("aria-expanded")&&(this.background_overlay.showOverlay(),(0,p.default)(t).addClass("active"),(0,p.default)(t).parent().find(this.navbar_collapse_selector).addClass("open")),"false"==(0,p.default)(t).attr("aria-expanded")&&(this.background_overlay.hideOverlay(),(0,p.default)(t).removeClass("active"),(0,p.default)(t).parent().find(this.navbar_collapse_selector).removeClass("open"))}updateMobileSubmenuWidth(t,e){let o=window.innerWidth,a=(0,p.default)(this.menu_selector).outerWidth(!0),n=parseInt(this.top_level_menu_item.css("marginRight")),i=this.top_level_menu_item.innerWidth(),r=(0,p.default)(t).find(this.dropdown_menu_selector+this.depth_0_selector),s=r.outerWidth(!0),c=Math.ceil(a)-2*n;if(a>o&&(a=o),s<c&&r.css("width",Math.ceil(a)-2*n+"px"),r.css("margin-left","0px"),e&&!r.isOnScreen(!1,"horizontal")){let t=-1*(Math.ceil(i)+n);r.css("margin-left",t+"px")}}initScreenMenu(){var t=this;this.top_level_menu_item.off("click"),this.addHoverBehaviorToDropdown(),this.top_level_menu_item.on("mouseenter",function(){t.updateScreenSubMenuWidth((0,p.default)(this)),t.background_overlay.showOverlay()}),this.top_level_menu_item.on("mouseleave",function(){t.background_overlay.hideOverlay()})}addHoverBehaviorToDropdown(){let t=this;this.dropdown.hover(function(){(0,p.default)(this).addClass("show"),(0,p.default)(this).find(t.dropdown_menu_selector).addClass("show")},function(){(0,p.default)(this).removeClass("show"),(0,p.default)(this).find(t.dropdown_menu_selector).removeClass("show")}),this.dropdown.on("mouseenter",function(){(0,p.default)(this).find(t.dropdown_menu_selector).attr("data-bs-popper","static")})}updateScreenSubMenuWidth(t){let e=t.find(this.depth_0_selector),o=this.navbar_collapse.offset().left+this.navbar_collapse.width();if(e.offset().left+e.width()+50>o){e.addClass("dropdown-menu-end");let t=this.navbar_collapse.offset().left;e.offset().left<t&&e.removeClass("dropdown-menu-end")}}resetMenu(){this.depth_0.css("margin-left","0px"),this.depth_0.each(function(){(0,p.default)(this).removeClass("dropdown-menu-end")}),(0,p.default)(this.navbar_toggler_active_selector).click()}setMenuPosition(){const t=(0,p.default)(window).scrollTop();window.innerWidth;let e=0;this.banners.each(function(){e+=(0,p.default)(this).is(":visible")?(0,p.default)(this).outerHeight():0});let o=(this.admin_bar.height()??0)+e,a=parseInt(this.submenu.css("margin-top")),n=o+this.navbar.outerHeight()+a;(0,p.default)(window).outerWidth()<this.mobile_large_breakpoint?this.setMenuFixed(e,o,n):t>this.top_row_height?this.setMenuFixed(e,o):(this.navbar_top=this.navbar.offset()?this.navbar.offset().top:0,this.unsetMenuFixed(e))}setMenuFixed(t,e,o=0){this.navbar.removeClass(this.navbar_margins),this.navbar.addClass(this.scoll_menu_detected),this.navbar.css("top",e+"px"),t+=this.navbar.outerHeight(),this.header.css("margin-top",t+"px"),this.setSubmenuSpacing(o)}unsetMenuFixed(t){this.navbar.addClass(this.navbar_margins),this.navbar.removeClass(this.scoll_menu_detected),this.navbar.css("top",0),this.header.css("margin-top",t+"px"),this.setSubmenuSpacing()}setSubmenuSpacing(t=0){(0,p.default)(window).outerWidth()<this.mobile_large_breakpoint?this.submenu.css("padding-bottom",t+"px"):this.submenu.css("padding-bottom",0)}},rt=class{constructor(){this.search=(0,p.default)(".global-search")}init(){var t=this;this.search.on("keyup",function(){t.search.val((0,p.default)(this).val())})}},st=class{constructor(){this.floats=null,this.holder=null,this.adminBar=null,this.header=null,this.headerBanner=null,this.headerNoticeBanner=null,this.headerAppBanner=null,this.headerBannerClose=null,this.headerFixedMobile=null,this.windowWidth=0,this.adminBarHeight=0,this.headerTopRowHeight=0,this.windowScrollTop=0,this.headerNavHeight=0,this.headerBannerHeight=0,this.notice_banner_shown=!1,this.app_banner_shown=!1}init(){var t=this;(0,p.default)(document).ready(function(){t.floats=(0,p.default)(".floats"),t.holder=(0,p.default)("#holder"),t.adminBar=(0,p.default)("#wpadminbar"),t.header=(0,p.default)("header"),t.headerBanner=(0,p.default)(".header__banner"),t.headerNoticeBanner=(0,p.default)(".header__bannerNotice"),t.headerAppBanner=(0,p.default)(".header__bannerApp"),t.headerBannerClose=(0,p.default)(".header__bannerClose"),t.headerFixedMobile=(0,p.default)(".header__fixedMobile"),t.screenDimensions(),t.setPosition(),(0,p.default)(window).on("resize",function(){t.screenDimensions(),t.setPosition()}),(0,p.default)(window).on("scroll",function(){t.screenDimensions(),t.setPosition()}),t.closeBannerHandler()})}setPosition(){let t=this.adminBar.height()??0;this.headerBanner.each(function(){(0,p.default)(this).is(":visible")&&((0,p.default)(this).css("margin-top",t+"px"),t+=(0,p.default)(this).outerHeight())}),(0,p.default)(document).trigger("setMenuPosition")}closeBannerHandler(){var t=this;this.headerBannerClose.on("click",function(){let e="app-banner";t.headerBanner.hasClass("header__bannerNotice")&&(e="notice-banner"),t.headerBannerHeight=0,t.headerBanner.remove(),S(e,"hide",1),t.setPosition()}),t.headerBannerClose.on("keypress",function(e){13===e.which&&t.headerBannerClose.click()})}screenDimensions(){if(this.windowWidth=window.innerWidth,this.windowScrollTop=(0,p.default)(window).scrollTop(),this.headerNavHeight=this.windowWidth>=768?42:0,this.headerBannerHeight=0,!x("notice-banner")&&this.headerNoticeBanner.length)this.headerBanner.hasClass("header__bannerNotice")&&(this.headerNoticeBanner.show(),this.headerBannerHeight=this.headerBanner.height());else if(!x("app-banner")&&this.headerBanner.length&&this.headerBanner.hasClass("header__bannerApp")&&this.windowWidth<=767){const t=(0,p.default)(".header__bannerApp"),e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,o=/Android/.test(navigator.userAgent)&&!window.MSStream;e?(t.show(),(0,p.default)(".app-button__android").hide(),this.headerAppBanner.show(),this.headerBannerHeight=t.height()+24):o&&(t.show(),(0,p.default)(".app-button__apple").hide(),this.headerAppBanner.show(),this.headerBannerHeight=t.height()+24)}this.headerTopRowHeight=this.windowWidth<=767?60:75,this.adminBarHeight=this.adminBar.length?this.adminBar.height():0}};a();var ct=class{init(){(0,p.default)(function(){new d(".header-swiper",{modules:[u],slidesPerView:n,spaceBetween:10,loop:!0,freeMode:!0,grabCursor:!0,navigation:{nextEl:".button-next",prevEl:".button-prev"},on:{init:function(){(0,p.default)(".slide-image").removeClass("d-none")}}})})}},lt=class{init(){var t=this;(0,p.default)(function(){t.iframe=(0,p.default)(".video-frame-wrapper iframe"),t.iframe.length&&t.setWrapper()})}setWrapper(){this.iframe.each(function(){(0,p.default)(this).data("ratio",this.height/this.width).removeAttr("width").removeAttr("height")})}},dt=class t{static{this.config={google_ads:{type:"google_ads",url_pattern:"https://googleads.g.doubleclick.net",classes:["google-ads"]}}}init(){(0,p.default)(()=>{this.iframes=(0,p.default)("iframe"),this.iframes?.length&&this.setWrapper()})}setWrapper(){this.iframes.each((t,e)=>{try{const t=(0,p.default)(e);if(!t.length)return;this.applyWrapper(t)}catch(o){}})}applyWrapper(e){for(const o of Object.values(t.config)){const t=e.attr("src");t&&(t.startsWith(o.url_pattern)&&e.wrap(`<div class="iframe-wrapper ${o.classes}"></div>`))}}},ut=class{init(){this.tables=document.querySelectorAll(".vo-comparison table"),this.tables.length&&(this.mediaQuery=window.matchMedia("(min-width: 768px)"),this.handleTables(),this.mediaQuery.addEventListener("change",()=>this.handleTables()))}
2handleTables(){this.tables.forEach(t=>{t.closest(".vo-comparison")?.classList.contains("vo-comparison-selector")?this.handleResponsiveTable(t):this.handleStaticTable(t),t.classList.add("visible");let e={value:nymgData.highlightValue,flexibility:nymgData.highlightFlexibility};v(t,e),window.onresize=()=>{v(t,e)}})}handleResponsiveTable(t){this.mediaQuery.matches?(m(t),f(t,!0)):(function(t){const e=t.parentElement;e?.classList.contains("table-responsive")&&(e.parentNode?.insertBefore(t,e),e.parentNode?.removeChild(e))}(t),function(t,e=!1){e&&t.classList.remove("table"),t.classList.remove("table-borderless")}(t,!0))}handleStaticTable(t){f(t,!0),m(t)}},ht=class{init(){this.tables=document.querySelectorAll("table.responsive"),this.tables.length&&this.setWrapper()}setWrapper(){this.tables.forEach(t=>{if(t.classList.add("table","table-striped","table-borderless","border","overflow-hidden"),!t.parentElement?.classList.contains("table-responsive")){const e=document.createElement("div");e.className="table-responsive",t.parentNode?.insertBefore(e,t),e.appendChild(t)}if(!t.querySelector("thead")){const e=t.querySelector("tr");if(e){const o=document.createElement("thead");e.querySelectorAll("td").forEach(t=>{const e=document.createElement("th");e.innerHTML=t.innerHTML,t.parentNode?.replaceChild(e,t)}),o.appendChild(e),t.prepend(o)}}})}},pt=class{limitModalLinks(){(0,p.default)(".author-modal-open").first().removeClass("d-none")}};window.jQuery=window.$=p.default,function(t=()=>et(()=>import("./chunks/webmcp-CYTq0HEC.js"),__vite__mapDeps([4,5]))){h()&&t().catch(()=>{})}(),(0,p.default)(document).ready(function(){(new nt).init(),(new st).init(),(new it).init(),(new ct).init(),(new at).init(),(new rt).init(),(new lt).init(),(new dt).init(),(new ut).init(),(new ht).init(),(new pt).limitModalLinks()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.