PageSourceSearch

https://www.tivolihotel.com/Content/AHHG/modern/GalleryMain.a980f6df7e0af1f28c24.js

js tivolihotel.com collected 2026-09-26 02:05:11 UTC 9,032 bytes, 2 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e3f44db3-cebd-4748-8064-27abd8e84602",e._sentryDebugIdIdentifier="sentry-dbid-e3f44db3-cebd-4748-8064-27abd8e84602")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"a2d5290bd6679f4257e70fe152336d0d3c09f7af"}}catch(e){}}(),(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[528],{2900:(e,t,l)=>{l.d(t,{A:()=>n});const n=class{constructor(e,t=0,l={},n=!0){this.xStart=null,this.yStart=null,this.element="string"==typeof e?document.querySelector(e):e,this.element.addEventListener("touchstart",function(e){this.handleTouchStart(e)}.bind(this),!1),this.element.addEventListener("touchmove",function(e){this.handleTouchMove(e)}.bind(this),!1),this.element.addEventListener("touchend",function(e){this.handleTouchEnd(e)}.bind(this),!1),this.threshold=t,this.handlers={onUp:()=>{},onRight:()=>{},onDown:()=>{},onLeft:()=>{},...l},this.isSingle=n}handleTouchStart(e){this.xStart=e.touches[0].clientX,this.yStart=e.touches[0].clientY}handleTouchMove(e){if(!this.xStart||!this.yStart)return;const t=this.xStart-e.touches[0].clientX,l=this.yStart-e.touches[0].clientY,n=Math.abs(t),a=Math.abs(l);(n>this.threshold||a>this.threshold)&&(n>a?t>0?this.handlers.onRight(t):this.handlers.onLeft(t):l>0?this.handlers.onUp(l):this.handlers.onDown(l),this.isSingle?(this.xStart=null,this.yStart=null):(this.xStart=e.touches[0].clientX,this.yStart=e.touches[0].clientY))}handleTouchEnd(e){this.xStart=null,this.yStart=null}}},91:(e,t,l)=>{l.r(t),l.d(t,{default:()=>g});var n=l(1425);const a={class:"Gallery-main",style:{height:"auto"}},r={class:"Gallery-wrapper",ref:"gallery"},i={key:0,class:"Gallery-loader Spinner is-active"},o={class:"u-hiddenVisually"},s=["aria-label","aria-hidden"],u=["aria-label","aria-hidden"],h=["aria-label","aria-hidden"];var c=l(7063),d=l(2900);const v={name:"GalleryMain",props:{isStationary:{type:Boolean,default:!1,required:!1},numChildren:{type:Number,required:!1},ratio:{default:.5625},isLoading:{type:Boolean,default:!1},hideFullscreenButton:{type:Boolean,default:!1}},setup(e,{emit:t}){const l=(0,n.KR)(0),a=(0,n.KR)([]),r=(0,n.KR)(!1),i=(0,n.KR)(!1),o=(0,n.KR)(!1),s=(0,n.KR)(null),u=(0,n.KR)([]),h=(0,n.WQ)("currentItem"),v=(0,n.KR)(0),g=new Map;(0,n.Gt)("currentItem",h),(0,n.Gt)("parentChildren",u);const y=(0,n.WQ)("updateCurrentItem"),w=(e,t)=>{const l=`Accessibility.${e}`,n=c.A.getLabel(l);return n===l?t:n},f=(0,n.EW)((()=>w("NextImage","Next gallery image"))),m=(0,n.EW)((()=>w("PreviousImage","Previous"))),p=(0,n.EW)((()=>w("FullScreenGallery","Open gallery to full screen"))),b=(0,n.EW)((()=>w("ShowingImage","Showing image"))),L=(0,n.EW)((()=>e.isStationary?0:h.value)),x=()=>new Promise((t=>{let n=0;const a=()=>{requestAnimationFrame((()=>{let r=0;if(u.value?.length&&u.value[L.value]){const e=u.value[L.value].$el;e&&(r=e.getBoundingClientRect().height)}if(0===r&&s.value&&(r=s.value.offsetWidth*e.ratio),0===r&&n<10)return n++,void a();0===r&&(r=200),l.value=r,t(r)}))};a()})),C=()=>{if(!u.value?.length)return;const e=Array.from(u.value,(e=>e.$el.getElementsByTagName("figcaption")[0])).filter(Boolean);if(!e.length)return;const t=e.map((e=>(e.style.height="auto",e.offsetHeight))),l=Math.max(...t);e.forEach((e=>{e.style.height=`${l}px`}));let n=null;const a=u.value?.find((e=>e&&e.$el&&e.$el.classList&&e.$el.classList.contains("active")));if(a?n=a.$el:u.value?.length&&u.value[L.value]&&(n=u.value[L.value].$el),n){const e=n.querySelector("figcaption");v.value=!e||l<=0?0:l-2}},S=async()=>{if(!u.value?.length)return;const e=(L.value+u.value.length-1)%u.value.length;await E(e),await(0,n.dY)(),C()},k=async()=>{if(!u.value?.length)return;const e=(L.value+u.value.length+1)%u.value.length;await E(e),await(0,n.dY)(),C()},E=e=>{if(!u.value?.length)return Promise.resolve();const t=u.value[e];if(!t)return Promise.resolve();g.has(e)&&(clearTimeout(g.get(e)),g.delete(e)),o.value=!0;const l=setTimeout((()=>{console.warn("Loading timeout reached for gallery item",e),o.value=!1}),1e4);g.set(e,l);try{return t.loadImage().then((()=>(y(e),x()))).then((()=>{try{B(I(e)),B(I(I(e)))}catch(e){console.error("Error loading next items:",e)}})).catch((e=>{console.error("Error in gallery item loading:",e)})).finally((()=>{clearTimeout(g.get(e)),g.delete(e),o.value=!1}))}catch(t){return console.error("Critical error in showItem:",t),clearTimeout(g.get(e)),g.delete(e),o.value=!1,Promise.resolve()}};(0,n.Gt)("registerChild",(e=>{u.value.includes(e)||u.value.push(e)})),(0,n.Gt)("unregisterChild",(e=>{const t=u.value.indexOf(e);t>-1&&u.value.splice(t,1)}));const I=e=>u.value?.length?e===u.value.length-1?0:e+1:0,B=async e=>{try{if(!u.value?.length)return;const t=u.value[e];t&&"function"==typeof t.loadImage&&await t.loadImage()}catch(t){console.error(`Error loading next item ${e}:`,t)}},T=(0,n.WQ)("toggleFullscreen");return(0,n.sV)((()=>{(0,n.dY)((async()=>{await x(),C(),i.value=e.numChildren>1&&!e.isStationary||u.value?.length>1&&!e.isStationary,u.value?.length&&E(0),E(L.value),C(),window.addEventListener("resize",(async()=>{await x(),C()})),s.value&&new d.A(s.value,50,{onLeft:S,onRight:k});const t=new MutationObserver((()=>
1{u.value&&(a.value=u.value.map((e=>{const{preview:t,caption:l}=e;return{preview:t,caption:l}})))}));s.value&&t.observe(s.value,{childList:!0,subtree:!0})}))})),(0,n.xo)((()=>{g.forEach((e=>clearTimeout(e))),g.clear(),window.removeEventListener("resize",(async()=>{await x(),C()}))})),(0,n.wB)((()=>e.numChildren),(()=>{i.value=e.numChildren>1&&!e.isStationary||u.value?.length>1&&!e.isStationary})),{toggleFullscreenHandler:()=>{T()},currentItemHeight:l,previews:a,isFullscreen:r,showControls:i,isLoadingImage:o,currentItem:L,gallery:s,childComponents:u,showPrev:S,showNext:k,toggleFullscreen:T,itemClickHandler:()=>{u.value?.length>1&&T()},counterBottom:v,galleryNextLabel:f,galleryPreviousLabel:m,galleryFullscreenLabel:p,showingImageLabel:b}}},g=(0,l(6262).A)(v,[["render",function(e,t,l,c,d,v){return(0,n.uX)(),(0,n.CE)("div",a,[(0,n.Lk)("div",r,[(0,n.RG)(e.$slots,"default"),c.isLoadingImage||l.isLoading?((0,n.uX)(),(0,n.CE)("div",i,t[3]||(t[3]=[(0,n.Lk)("span",null,null,-1)]))):(0,n.Q3)("",!0),(0,n.bo)((0,n.Lk)("div",{class:"Gallery-counter",style:(0,n.Tr)({bottom:c.counterBottom+"px"})},[(0,n.Lk)("div",o,(0,n.v_)(c.showingImageLabel),1),(0,n.eW)(" "+(0,n.v_)(c.currentItem+1)+"/"+(0,n.v_)(c.childComponents.length),1)],4),[[n.aG,c.showControls&&!c.isLoadingImage&&!l.isLoading]]),c.showControls?((0,n.uX)(),(0,n.CE)("button",{key:1,class:"Gallery-prev Button Button--iconAlt","aria-label":c.galleryPreviousLabel,onClick:t[0]||(t[0]=(0,n.D$)((e=>c.showPrev()),["prevent"])),"aria-hidden":!c.showControls},t[4]||(t[4]=[(0,n.Lk)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 40 40","enable-background":"new 0 0 40 40","xml:space":"preserve"},[(0,n.Lk)("path",{d:"M25,33.9L23.5,35c-0.6-0.8-1.1-1.6-1.7-2.3c-2.9-4.1-5.8-8.2-8.7-12.3c-0.2-0.2-0.2-0.5,0-0.7c3.4-4.8,6.8-9.6,10.2-14.4\r\n            c0.1-0.1,0.1-0.2,0.2-0.3L25,6c-0.6,0.9-1.2,1.7-1.8,2.5c-2.6,3.7-5.2,7.4-7.8,11.2c-0.2,0.3-0.1,0.4,0,0.7\r\n            c3.1,4.4,6.3,8.9,9.4,13.3C24.9,33.8,24.9,33.8,25,33.9z"})],-1)]),8,s)):(0,n.Q3)("",!0),c.showControls?((0,n.uX)(),(0,n.CE)("button",{key:2,class:"Gallery-next Button Button--iconAlt","aria-label":c.galleryNextLabel,onClick:t[1]||(t[1]=(0,n.D$)((e=>c.showNext()),["prevent"])),"aria-hidden":!c.showControls},t[5]||(t[5]=[(0,n.Lk)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 40 40","enable-background":"new 0 0 40 40","xml:space":"preserve"},[(0,n.Lk)("path",{d:"M15,6.1L16.5,5c0.6,0.8,1.1,1.6,1.7,2.3c2.9,4.1,5.8,8.2,8.7,12.3c0.2,0.2,0.2,0.5,0,0.7c-3.4,4.8-6.8,9.6-10.2,14.4\r\n            c-0.1,0.1-0.1,0.2-0.2,0.3L15,34c0.6-0.9,1.2-1.7,1.8-2.5c2.6-3.7,5.2-7.4,7.8-11.2c0.2-0.3,0.1-0.4,0-0.7\r\n            c-3.1-4.4-6.3-8.9-9.4-13.3C15.1,6.2,15.1,6.2,15,6.1z"})],-1)]),8,u)):(0,n.Q3)("",!0)],512),c.showControls&&!l.hideFullscreenButton||l.isStationary&&!l.hideFullscreenButton?((0,n.uX)(),(0,n.CE)("button",{key:0,class:"Gallery-expand Button Button--icon",onClick:t[2]||(t[2]=(0,n.D$)((e=>c.toggleFullscreenHandler()),["prevent"])),"aria-label":c.galleryFullscreenLabel,"aria-hidden":!c.showControls||l.hideFullscreenButton},t[6]||(t[6]=[(0,n.Lk)("svg",{class:"Icon Icon--filled",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40"},[(0,n.Lk)("path",{d:"M12 16v-4h4v-2h-6v6zM24 12h4v4h2v-6h-6zM28 24v4h-4v2h6v-6zM16 28h-4v-4h-2v6h6z"})],-1)]),8,h)):(0,n.Q3)("",!0)])}]])}}]);
2//# sourceMappingURL=GalleryMain.a980f6df7e0af1f28c24.js.map

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.