PageSourceSearch

https://www.invia.sk/assets/invia2020/js/3160.3e4e74f8584530ae5a4f.chunk.js

js invia.sk collected 2026-09-28 14:03:48 UTC 5,524 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkinvia2020=globalThis.webpackChunkinvia2020||[]).push([[3160],{13160(t,e,n){n.r(e),n.d(e,{default:()=>E});var a=n(95455),i=n(64060),o=n(43336),r=n(64457),l=n(17486),s=n(94042),c=n(46667),_=n(71842),p=n(12106),m=n(16336),u=n(31826),d=n(71056),h=n(61391);const g=(t,e)=>t.replace(/_c:_$/,`_c:_${Math.round(e)}`),f=(t,e)=>"not_set"===e?t:t.replace(/_p:_not_set$/,`_p:_${e}`),I=()=>{const t=(0,s.Cu)();if(!t)return{canonical:"",local:""};const e=(0,u.bL)(t.canonicalValue??""),n=(0,u.Q$)(t.localLabel??""),a=""===e?"":`sort:_${e}`;return{canonical:a,local:""===n?a:`sort:_${n}`}},w=t=>{const{serverItem:e,presetOffersParameter18:n,loadTimeMs:a,photoCount:i="not_set"}=t,o={...e},r=String(o.item_id??"");(0,l.cA)();const p=(0,l.Bz)(r),u=p?.itemListName??"",w=(0,m.G)(u,p?.navigationSource),y=w===l.it.LISTING;o.item_list_name=u,o.item_parameter_15=w,o.item_parameter_18=n,o.item_parameter_12=g(String(o.item_parameter_12??""),a),o.item_parameter_4=f(String(o.item_parameter_4??""),i);const A=y?(0,c.Bx)(r):null,E=(0,_.bU)(A);o.index=E.index,o.pagination_page=E.pagination_page,o.item_parameter_5=(0,d.D)(String(o.item_parameter_5??""),Number.parseInt((0,_.oy)(A)??"0",10)||0);const T=y?I():{canonical:"",local:""};o.item_parameter_6=T.canonical,o.item_parameter_6_local=T.local;const b=y?(0,s.P3)():null;return{event:"view_item",page_type:"hotel",open_type:(0,h.N)(),...b?{filters:b}:{},ecommerce:{items:[o]}}},y=async(t,e,n)=>{if(""!==t)try{const a=JSON.parse(t),i=performance.now(),o=await(0,p.c)(n);(0,r.B)(w({serverItem:a,presetOffersParameter18:e,loadTimeMs:i,photoCount:o}),{preserveEmptyString:!0,preserveNull:!0})}catch(t){(0,i.yA)("[GA4_VIEW_ITEM] Error building the hotel detail view_item payload:",t)}},A=15e3;class E extends a.xI{static targets=["localityMapSection","hotelOffersSection"];connect(){this.hotelId=Number.parseInt(this.data.get("hotel-id")??"",10)||void 0,(0,p.c)(this.hotelId),this.loadSection("hotelOffersSection","/direct/tour_hotel/ajax-hotel-offers/").then((()=>this.pushViewItem()))}pushViewItem(){const t=this.element.querySelector("[data-ga4-preset-offers]");y(this.data.get("view-item")??"",t?.getAttribute("data-ga4-preset-offers")??"",this.hotelId)}async onLoad(){await this.loadSection("localityMapSection","/direct/tour_hotel/ajax-locality-map-description/")}async loadSection(t,e){const n=this.targets.find(t);if(!n)return;const a=await this.fetchSection(t,e);a?n.replaceWith(a):n.classList.add("u-js-hide")}async fetchSection(t,e){const n=new AbortController,a=window.setTimeout((()=>n.abort()),A);try{const a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nl_hotel_id:this.data.get("hotel-id")}),signal:n.signal});if(!a.ok)throw new Error(`Network response was not ok (${a.status}).`);const r=new o.Ay(await a.json());if(!r.responseIsOk)return(0,i.yA)(`Hotel detail: fetching ${t} error.`,r),null;const l=r.customData[t];if(!l)return null;const s=document.createElement("div");return s.innerHTML=l,s.firstElementChild}catch(e){return(0,i.yA)(`Hotel detail: fetching ${t} failed.`,e),null}finally{window.clearTimeout(a)}}}},12106(t,e,n){n.d(e,{c:()=>c});var a=n(64060),i=n(73306),o=n(39642);const r=3e3,l=new Map,s=async(t,e)=>{const n=new AbortController,l=window.setTimeout((()=>n.abort()),r);try{const a=`${(0,o.mB)()}?${(0,i.Z)({hotelId:t??null,offerId:e||null})}`,r=await fetch(a,{credentials:"omit",signal:n.signal,headers:{Accept:"application/json"}});if(!r.ok)return"not_set";const l=await r.json();return Array.isArray(l?.customData?.images)?l.customData.images.length:"not_set"}catch(t){return(0,a.yA)("[GA4_VIEW_ITEM] Error fetching the gallery photo count:",t),"not_set"}finally{window.clearTimeout(l)}},c=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("function"!=typeof fetch||null==t&&""===e)return Promise.resolve("not_set");const n=`${t??""}|${e}`,a=l.get(n);if(a)return a;const i=s(t,e);return l.set(n,i),i}},16336(t,e,n){n.d(e,{G:()=>i});var a=n(17486);const i=(t,e)=>e||(""===t.trim()?a.it.DIRECT:(0,a.f0)(t)??"")},61391(t,e,n){n.d(e,{N:()=>r});const a="same_tab",i="new_tab",o="undefined"!=typeof window?window.history.length:0,r=()=>o<=1?i:a},71842(t,e,n){n.d(e,{Vg:()=>a,bU:()=>o,oy:()=>r});const a=()=>({index:null,pagination_page:null}),i=t=>{if(null==t||""===t)return null;const e="number"==typeof t?t:Number.parseInt(String(t),10);return Number.isFinite(e)?e:null},o=t=>t?{index:i(t.index??t.position??t.rank),pagination_page:i(t.pagination_page??t.paginationPage??t.page??t.pagination)}:a(),r=t=>{const e=t?.item_parameter_5;if("string"!=typeof e)return null;const n=e.match(/offers:_([^_]+)/);return n&&""!==n[1]&&"not_set"!==n[1]?n[1]:null}},39642(t,e,n){n.d(e,{Gb:()=>l,fW:()=>o,mB:()=>r,uB:()=>i});var a=n(9625);const i={IMAGE:"image",IMAGE_ACTIVE:"imageActive",TAG:"tag"},o={DEFAULT_IMAGE_INDEX:"1",API_URL:"/gallery/ajax-gallery-data",ALL_TAG:"all",GALLERY_PARAM:"gallery",URL_PATTERNS:{THUMBNAIL_170:"web-170x113",THUMBNAIL_320:"web-320x220",THUMBNAIL_510:"web-510x350"},IMAGE_SIZES:{DESKTOP_WIDE:"(min-width: 1440px) calc((100vw - 2*20px) * 0.2)",DESKTOP:"(min-width: 735px) calc((100vw - 2*20px) * 0.25)",MOBILE:"calc((100vw - 2*16px) * 0.5)"},THUMBNAIL_DIMENSIONS:{WIDTH:"165",HEIGHT:"93"}},r=()=>(0,a.Y)(o.API_URL),l={CONTAINER:"b-gallery-container",CONTAINER_PREVIEW:"b-gallery-container--preview",CONTAINER_VIDEO:"b-gallery-container--video",THUMB_ACTIVE:"is-active"}}}]);
2//# sourceMappingURL=3160.3e4e74f8584530ae5a4f.chunk.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.