PageSourceSearch

https://www.odla.nu/cdn/shop/t/29/assets/custom.js?v=72190995193857496231788176887

js odla.nu collected 2026-10-02 06:57:17 UTC 2,484 bytes, 2 lines download raw bytes

1class GTCCartDrawerFormValidate extends HTMLElement{constructor(){super(),this.form=null,this.button=null,this.handleSubmit=this.handleSubmit.bind(this),this.settings={validatePreorderFreight:!1,timeout:500}}connectedCallback(){this.form=this.querySelector("form")||this.closest("form")||document.getElementById("cart-drawer-form"),this.button=this.querySelector('button[name="checkout"]')||this.closest("cart-drawer").querySelector('button[name="checkout"]'),this.button&&this.form&&this.form.addEventListener("submit",this.handleSubmit)}disconnectedCallback(){this.form&&this.form.removeEventListener("submit",this.handleSubmit)}async handleSubmit(event){const requiredInput=this.form.elements["cart-terms"];!requiredInput||!requiredInput.checked||this.settings.validatePreorderFreight||(event.preventDefault(),setTimeout(async()=>{await this.validatePreorderFreight(),this.button.click()},0))}async fetchPreorderData(){return await(await fetch(Shopify.routes.root+"cart?view=preorder-data")).json()}async validatePreorderFreight(){const{validated}=await this.fetchPreorderData();if(console.log("validated",validated),validated===void 0){console.error("Preorder freight is not set correctly");return}validated?(this.settings.validatePreorderFreight=!0,setTimeout(()=>{this.settings.validatePreorderFreight=!1},this.settings.timeout)):(this.settings.validatePreorderFreight=!1,document.dispatchEvent(new CustomEvent("on:gtc-preorder:update")),alert(window.theme.strings.cartError||"There was an error while updating your cart. Please try again."))}}customElements.get("gtc-cart-drawer-form-validate")||customElements.define("gtc-cart-drawer-form-validate",GTCCartDrawerFormValidate);class CustomReadMore extends HTMLElement{constructor(){super(),this.content=this.querySelector(".custom-read-more__content"),this.toggle=this.querySelector(".custom-read-more__toggle"),this.toggle.addEventListener("click",this.toggleContent.bind(this))}connectedCallback(){const maxHeight=this.getAttribute("truncate-height");maxHeight>this.content.scrollHeight?(this.classList.add("open"),this.style.setProperty("--truncate-height","auto"),this.toggle.style.display="none"):(this.classList.remove("open"),this.style.setProperty("--truncate-height",maxHeight+"px"))}toggleContent(){this.classList.toggle("open")}}customElements.get("custom-read-more")||customElements.define("custom-read-more",CustomReadMore);
2//# sourceMappingURL=/cdn/shop/t/29/assets/custom.js.map?v=72190995193857496231788176887

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.