1window.Shopify=window.Shopify||{},window.Shopify.theme=window.Shopify.theme||{},Shopify.theme.dom={init:function(){let that=this;if(document.querySelector("external-video")){let iframe_api=document.createElement("script");iframe_api.id="iframe_api",iframe_api.src="https://www.youtube.com/iframe_api",document.head.appendChild(iframe_api)}}},Shopify.theme.dom.init(),Shopify.theme.links={init:function(){Shopify.theme.links.scrollToView()},scrollToView:function(){document.querySelectorAll("a").forEach(element=>{if(element.href!=""){let url=new URL(element.href);url.hash!=""&&url.pathname==location.pathname&&element.addEventListener("click",function(event){url.hash.includes("?")||document.querySelector(url.hash)&&window.scrollTo(0,document.querySelector(url.hash).offsetTop)})}}),window.addEventListener("load",function(){if(location.hash!=""){let url=location;url.hash.includes("?")||document.querySelector(url.hash)&&(window.scrollTo(0,document.querySelector(url.hash).offsetTop),history.replaceState({},document.title,window.location.pathname+window.location.search))}})}},Shopify.theme.links.init(),Shopify.theme.tools={handleize:function(value2){let handle=value2.toString().split(" ").join("-");return handle=handle.toLowerCase(),handle},formatMoney:function(cents,format){let placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,money_format=format;switch(money_format.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2,",",".");break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_with_apostrophe_separator":value=formatWithDelimiters(cents,2,"'",".");break}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=typeof precision<"u"?precision:2,thousands=typeof thousands<"u"?thousands:".",decimal=typeof decimal<"u"?decimal:",",isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split(".");let dollars=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),cents2=parts[1]?decimal+parts[1]:"";return dollars+cents2}return money_format.replace(placeholderRegex,value)},bind:function(t,e2){return function(){return t.apply(e2,arguments)}},setSelectorByValue:function(t,e2){for(var n=0,i2=t.options.length;n<i2;n++){var o2=t.options[n];if(e2==o2.value||e2==o2.innerHTML)return t.selectedIndex=n}},postLink:function(t,e2){var n=(e2=e2||{}).method||"post";i=e2.parameters||{},o=document.createElement("form");for(var r in o.setAttribute("method",n),o.setAttribute("action",t),i){var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",r),l.setAttribute("value",i[r]),o.appendChild(l)}document.body.appendChild(o),o.submit(),document.body.removeChild(o)}},Shopify.theme.tools.CountryProvinceSelector=function(t,e2,n){this.countryEl=document.getElementById(t),this.provinceEl=document.getElementById(e2),this.provinceContainer=document.getElementById(n.hideElement||e2),this.countryEl.addEventListener("change",Shopify.theme.tools.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.theme.tools.CountryProvinceSelector.prototype={initCountry:function(){var t=this.countryEl.getAttribute("data-default");Shopify.theme.tools.setSelectorByValue(this.countryEl,t),this.countryHandler()},initProvince:function(){if(this.provinceEl){var t=this.provinceEl.getAttribute("data-default");t&&0<this.provinceEl.options.length&&Shopify.theme.tools.setSelectorByValue(this.provinceEl,t)}},countryHandler:function(){var t=(i2=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces");if(e=JSON.parse(t),this.clearOptions(this.provinceEl),e&&e.length==0)this.provinceContainer&&(this.provinceContainer.style.display="none");else{for(var n=0;n<e.length;n++){var i2=document.createElement("option").value=e[n][0];i2.innerHTML=e[n][1],this.provinceEl&&this.provinceEl.appendChild(i2)}this.provinceContainer&&(this.provinceContainer.style.display="")}},clearOptions:function(t){t&&t.firstChild&&t.removeChild(t.firstChild)},setOptions:function(t,e2){var n=0;for(e2.length;n<e2.length;n++){var i2=document.createElement("option");i2.value=e2[n],i2.innerHTML=e2[n],t.appendChild(i2)}}},Shopify.theme.cart=Shopify.theme.cart||{},Shopify.theme.cart.action=Shopify.theme.cart.action||"redirect",Shopify.theme.cart={sections:["cart-drawer","cart
1-main"],init:function(){window.addEventListener("cart:add",function(e2){e2.preventDefault(),Shopify.theme.cart.trackAddToCart(e2.detail),Shopify.theme.cart.action=="redirect"?location.pathname=window.Shopify.routes.cartUrl:Shopify.theme.cart.action=="drawer"&&window.dispatchEvent(new CustomEvent("cart:drawer:open"))})},trackAddToCart:async function(eventData){const tracking_data={eventName:eventData.add_type=="bundle"?"bundle_add_to_cart":"add_to_cart",data:{}},first_item=eventData.items?eventData.items.pop():eventData;tracking_data.eventName=="bundle_add_to_cart"?(tracking_data.data.amount=first_item.price,tracking_data.data.variant_id=first_item.variant_id,tracking_data.data.product_id=first_item.product_id,tracking_data.data.quantity=first_item.quantity,tracking_data.data.items=[],eventData.components.forEach(component=>{const item={amount:component.amount,variant_id:component.variant_id,product_id:component.product_id,quantity:component.quantity};tracking_data.data.items.push(item)})):(tracking_data.data.amount=first_item.price,tracking_data.data.variant_id=first_item.variant_id,tracking_data.data.product_id=first_item.product_id,tracking_data.data.quantity=first_item.quantity),console.log(tracking_data);const bs2Host="https://junglueck-events.bs2.beeclever-apps.de",headers={Accept:"application/json","Content-Type":"application/json","X-Origin":window.origin};let visitorId=localStorage?.getItem("visitorId");if(!visitorId){const response=await fetch(bs2Host+"/visitor.php",{type:"cors",method:"POST",headers});if(response.ok){const resJson=await response.json();resJson?.visitorId&&(localStorage.setItem("visitorId",resJson.visitorId),visitorId=resJson.visitorId)}}if(!visitorId)return;tracking_data.visitorId=visitorId,tracking_data.data=tracking_data.data||{},tracking_data.data.country="DE";const requestBody=JSON.stringify(tracking_data),path=bs2Host+"/event.php",body=new Blob([requestBody],headers);self.hasOwnProperty("browser")&&browser?.sendBeacon?browser.sendBeacon(path,body):window?.navigator?.sendBeacon?window.navigator.sendBeacon(path,body):fetch(path,{type:"cors",method:"POST",headers,body:requestBody})},addToCart:function(itemsToAdd,events=!0,callback=cart=>{}){const url=window.Shopify.routes.cartAddUrl+"?sections="+this.sections.join(",");fetch(url,{body:JSON.stringify(itemsToAdd),credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(response){return response.json()}).then(function(response){if(response.status){events&&window.dispatchEvent(new CustomEvent("cart:add",{detail:{}}));const error_string=` 2CART ADD FAILED 3Status: ${response.status} 4Message: ${response.message} 5Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else callback(response),events&&window.dispatchEvent(new CustomEvent("cart:add",{detail:{...response,add_type:"single",added_count:itemsToAdd.items.reduce((acc,i2)=>acc+i2.quantity,0)}}))}).catch(function(err){console.error(err)})},getCart:function(events=!0,callback=cart=>{}){const url=window.Shopify.routes.cartUrl+"?sections="+this.sections.join(",");fetch(window.Shopify.routes.cartUrl,{credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},method:"GET"}).then(function(response){return response.json()}).then(function(response){if(response.status){const error_string=` 6CART GET FAILED 7Status: ${response.status} 8Message: ${response.message} 9Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else callback(response),events&&window.dispatchEvent(new CustomEvent("cart:changed",{detail:{...response}}))}).catch(function(err){console.error(err)})},updateCart:function(itemsToUpdate,events=!0,callback=cart=>{}){const url=window.Shopify.routes.cartUpdateUrl+"?sections="+this.sections.join(",");fetch(url,{body:JSON.stringify(itemsToUpdate),credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(response){return response.json()}).then(function(response){if(response.status){const error_string=` 10CART UPDATE FAILED 11Status: ${response.status} 12Message: ${response.message} 13Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else callback(response),events&&window.dispatchEvent(new CustomEvent("cart:changed",{detail:{...response}}))}).catch(function(err){console.error(err)})},clearCart:function(events=!0,callback=cart=>{}){const url=window.Shopify.routes.cartClearUrl+"?sections="+this.sections.join(",");fetch(url,{body:"",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(response){return response.json()}).then(function(response){if(response.status){const error_string=` 14CART CLEAR FAILED 15Status: ${response.status} 16Message: ${response.message} 17Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else callback(response),events&&window.dispatchEvent(new CustomEvent("cart:changed",{detail:{...response}}))}).catch(function(err){console.error(err)})},changeItem:function(itemToChange,events=!0,callback=cart=>{}){const url=window.Shopify.routes.cartChangeUrl+"?sections="+this.sections.join(",");fetch(url,{body:JSON.stringify(itemToChange),credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"},method:"POST"}).then(function(response){return response.json()}).then(function(response){if(response.status){const error_string=` 18CART CHANGE FAILED 19Status: ${response.status} 20Message: ${response.message} 21Description: ${response.description}`;throw new Error(error_string,{cause:"Cart Error"})}else callback(response),events&&window.dispatchEvent(new CustomEvent("cart:changed",{detail:{...response}}))}).catch(function(err){console.error(err)})}},Shopify.theme.cart.init();class CustomDOMParser{constructor(){}parseFromString(string,format="text/html"){let div=document.createElement("div");if(format=="text/html")return div.innerHTML=string,div;console.error("CustomDOMParser: Format not supported!")}}document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("#RegisterForm, #LoginForm, #RecoverPasswordForm").forEach(form=>{const triggerInput=form.querySelector('input[type="password"], input[type="email"]');if(triggerInput){let executeHCaptcha2=function(){typeof hcaptcha?.execute=="function"&&(hcaptcha.execute(),triggerInput.removeEventListener("input",executeHCaptcha2))};var executeHCaptcha=executeHCaptcha2;triggerInput.addEventListener("input",executeHCaptcha2)}})}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("[data-product-id][data-collection-title][data-collection-url]").forEach(link=>{link.addEventListener("click",function(){const productId=this.dataset.productId,title=this.dataset.collectionTitle,url=this.dataset.collectionUrl;if(productId)if(title&&url){const collectionData={title,url};sessionStorage.setItem(`product_${productId}_collection`,JSON.stringify(collectionData))}else sessionStorage.removeItem(`product_${productId}_collection`)})})}); 22//# sourceMappingURL=/cdn/shop/t/676/assets/theme.js.map?v=4720164526508511751789463010
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.