PageSourceSearch

https://www.genixflooring.com/cdn/shop/t/37/assets/global.js?v=166075572186291594511775505450

js genixflooring.com collected 2026-10-04 02:21:29 UTC 17,564 bytes, 3 lines download raw bytes

1function getFocusableElements(e){return Array.from(e.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object"))}const trapFocusHandlers={},warningTime=3e3;function trapFocus(e,t=e){var n=getFocusableElements(e),i=n[0],r=n[n.length-1];removeTrapFocus(),trapFocusHandlers.focusin=t=>{(t.target===e||t.target===r||t.target===i)&&document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(t){"TAB"===t.code.toUpperCase()&&(t.target!==r||t.shiftKey||(t.preventDefault(),i.focus()),(t.target===e||t.target===i)&&t.shiftKey&&(t.preventDefault(),r.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),t.focus()}function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(e=>{e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(e=>{e.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(e=>e.pause()),document.querySelectorAll("product-model").forEach(e=>e.modelViewerUI?.pause())}function removeTrapFocus(e=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),e&&e.focus()}function debounce(e,t){let n;return(...i)=>{clearTimeout(n),n=setTimeout(()=>e.apply(this,i),t)}}const serializeForm=e=>{let t={},n=new FormData(e);for(let i of n.keys())t[i]=n.get(i);return JSON.stringify(t)};function throttle(e,t){let n=0;return function(...i){let r=new Date().getTime();if(!(r-n<t))return n=r,e(...i)}}function fetchConfig(e="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${e}`}}}function extractContent(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText}void 0===window.Shopify&&(window.Shopify={}),Shopify.bind=function(e,t){return function(){return e.apply(t,arguments)}},Shopify.setSelectorByValue=function(e,t){for(var n=0,i=e.options.length;n<i;n++){var r=e.options[n];if(t==r.value||t==r.innerHTML)return e.selectedIndex=n,n}},Shopify.addListener=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},Shopify.postLink=function(e,t){var n=(t=t||{}).method||"post",i=t.parameters||{},r=document.createElement("form");for(var a in r.setAttribute("method",n),r.setAttribute("action",e),i){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",i[a]),r.appendChild(s)}document.body.appendChild(r),r.submit(),document.body.removeChild(r)},Shopify.CountryProvinceSelector=function(e,t,n){this.countryEl=document.getElementById(e),this.provinceEl=document.getElementById(t),this.provinceContainer=document.getElementById(n.hideElement||t),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var e=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,e),this.countryHandler()},initProvince:function(){var e=this.provinceEl.getAttribute("data-default");e&&this.provinceEl.options.length>0&&Shopify.setSelectorByValue(this.provinceEl,e)},countryHandler:function(e){var t=this.countryEl.options[this.countryEl.selectedIndex],n=JSON.parse(t.getAttribute("data-provinces"));if(this.clearOptions(this.provinceEl),n&&0==n.length)this.provinceContainer.style.display="none";else{for(var i=0;i<n.length;i++){var t=document.createElement("option");t.value=n[i][0],t.innerHTML=n[i][1],this.provinceEl.appendChild(t)}this.provinceContainer.style.display=""}},clearOptions:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},setOptions:function(e,t){for(var n=0;n<t.length;n++){var i=document.createElement("option");i.value=t[n],i.innerHTML=t[n],e.appendChild(i)}t.length}},Shopify.formatMoney=function(e,t){"string"==typeof e&&(e=e.replace(".",""));var n="",i=/\{\{\s*(\w+)\s*\}\}/,r=t||this.money_format;function a(e,t){return void 0===e?t:e}function s(e,t,n,i){if(t=a(t,2),n=a(n,","),i=a(i,"."),isNaN(e)||null==e)return 0;var r,s=(e=(e/100).toFixed(t)).split(".");return s[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n)+(s[1]?i+s[1]:"")}switch(r.match(i)[1]){case"amount":n=s(e,2);break;case"amount_no_decimals":n=s(e,0);break;case"amount_with_comma_separator":n=s(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":n=s(e,0,".",",")}return r.replace(i,n)},Shopify.getCart=function(e){$.getJSON("/cart.js",function(t,n){"function"==typeof e?e(t):Shopify.onCartUpdate(t)})},Shopify.onCartUpdate=function(e){alert("There are now "+e.item_count+" items in the cart.")},Shopify.changeItem=function(e,t,n){var i={type:"POST",url:"/cart/change.js",data:"quantity="+t+"&id="+e,dataType:"json",success:function(e){"function"==typeof n?n(e):Shopify.onCartUpdate(e)},error:function(i,r){"nu există un id valid sau parametru de linie"==i.responseJSON.message||"Required parameter missing or invalid: line or id param is required"==i.responseJSON.message||"Parameter Missing or Invalid"==i.responseJSON.message||"no valid id or line parameter"==i.responseJSON.message?$.ajax({type:"POST",url:"/cart/change.js",data:"quantity="+t+"&id="+e.split(":")[0],dataType:"json",success:function(e){"function"==typeof n?n(e):Shopify.onCartUpdate(e)}}):Shopify.onError(i,r)}};$.ajax(i)},Shopify.removeItem=function(e,t){var n={type:"POST",url:"/cart/change.js",data:"quantity=0&id="+e,dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)},error:function(n,i){"nu există un id valid sau parametru de linie"==n.responseJSON.message||"Required parameter missing or invalid: line or id param is required"==n.responseJSON.message||"Parameter Missing or Invalid"==n.responseJSON.message||"no valid id or line parameter"==n.responseJSON.message?$.ajax({type:"POST",url:"/cart/change.js",data:"quantity=0&id="+e.split(":")[0],dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)}}):Shopify.onError(n,i)}};$.ajax(n)},Shopify.addItem=function(e,t,n,i,r=null){var t=t||1;let a="quantity="+t+"&id="+e;if(n.closest("form")){let s=n.closest("form"),o=s.find('[name^="properties"]');o.length&&o.each((e,t)=>{a=`${a}&${$(t).attr("name")}=${$(t).val()}`})}var l={type:"POST",url:"/cart/add.js",data:a,dataType:"json",success:function(e){"function"==typeof i?i(e):Shopify.onItemAdded(e)},error:function(e,t){var n=window.cartStrings.addProductOutQuantity2;if(r.length>0){var i=parseInt(r.attr("data-inventory-quantity"));n=getInputMessage(i),r.val(i)}Shopify.onError(e,t,n),target?.classList.remove("is-loading")}};$.ajax(l)},Shopify.onItemAdded=function(e){alert(e.title+" was added to your shopping cart.")},Shopify.onError=function(XMLHttpRequest,textStatus,message){var data=eval("("+XMLHttpRequest.responseText+")");data.message?data.description?showWarning(data.description):showWarning(data.message+": "+message,warningTime):showWarning("Error : "+message,warningTime)};class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details");let e=this.querySelectorAll("summary");this.addAccessibilityAttributes(e),"iPhone"===navigator.platform&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}
1bindEvents(){this.querySelectorAll("summary").forEach(e=>e.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button").forEach(e=>e.addEventListener("click",this.onCloseButtonClick.bind(this)))}addAccessibilityAttributes(e){e.forEach(e=>{e.setAttribute("role","button"),e.setAttribute("aria-expanded",!1),e.setAttribute("aria-controls",e.nextElementSibling.id)})}onKeyUp(e){if("ESCAPE"!==e.code.toUpperCase())return;let t=e.target.closest("details[open]");t&&(t===this.mainDetailsToggle?this.closeMenuDrawer(this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(t))}onSummaryClick(e){let t=e.currentTarget,n=t.parentNode,i=n.hasAttribute("open");n===this.mainDetailsToggle?(i&&e.preventDefault(),i?this.closeMenuDrawer(t):this.openMenuDrawer(t)):(trapFocus(t.nextElementSibling,n.querySelector("button")),setTimeout(()=>{n.classList.add("menu-opening")}))}openMenuDrawer(e){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),e.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,e),document.body.classList.add("overflow-hidden-mobile")}closeMenuDrawer(e,t=!1){void 0!==e&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(e=>{e.removeAttribute("open"),e.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelector("summary").setAttribute("aria-expanded",!1),document.body.classList.remove("overflow-hidden-mobile"),removeTrapFocus(t),this.closeAnimation(this.mainDetailsToggle))}onFocusOut(e){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(e){let t=e.currentTarget.closest("details");this.closeSubmenu(t)}closeSubmenu(e){e.classList.remove("menu-opening"),removeTrapFocus(),this.closeAnimation(e)}closeAnimation(e){let t,n=i=>{void 0===t&&(t=i);let r=i-t;r<400?window.requestAnimationFrame(n):(e.removeAttribute("open"),e.closest("details[open]")&&trapFocus(e.closest("details[open]"),e.querySelector("summary")))};window.requestAnimationFrame(n)}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super()}openMenuDrawer(e){this.header=this.header||document.getElementById("shopify-section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),e.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,e),document.body.classList.add("overflow-hidden-mobile")}}customElements.define("header-drawer",HeaderDrawer);class UpdateQuantity extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeCart=!1,this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.querySelectorAll(".btn-quantity").forEach(e=>e.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(e){e.preventDefault();let t=e.target,n=t.parentElement.querySelector(".quantity"),i=Number(n.value),r=Number(n.dataset.inventoryQuantity),a=t.closest(".product-form")?.querySelector("[data-btn-addtocart]"),s,o=!1,l=document.body.matches(".quickshop-popup-show")?window[`quick_shop_policy_array_${this.input.dataset.product}`]:window[`cart_selling_array_${this.dataset.product}`],c=document.body.matches(".quickshop-popup-show")?this.closest(".productView-options").querySelector('[name="id"]').value:this.input.dataset.cartQuantityId,u=l[c];if(o="false"==a?.dataset.available||void 0==a?.dataset.available,(s=t.matches(".plus")?i+1:t.matches(".minus")?i-1:i)<0&&(s=1),s>r&&o&&"deny"==u){let d=getInputMessage(r);showWarning(d,warningTime),s=r}n.value=s,"number"==typeof this.changeCart&&clearTimeout(this.changeCart),this.changeCart=setTimeout(()=>{t.matches(".btn-quantity")&&this.input.dispatchEvent(this.changeEvent)},350)}quantityCheckedToBeContinue(){let e=window[`cart_selling_array_${this.dataset.product}`];return void 0!=e&&"continue"===e[this.querySelector('[name="quantity"]').dataset.cartQuantityId]}}class UpdateQuantityQuickShop extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.querySelectorAll(".btn-quantity").forEach(e=>e.addEventListener("click",this.onChangeQuantity.bind(this))),this.input.addEventListener("change",this.onChangeQuantity.bind(this))}onChangeQuantity(e){e.preventDefault();let t=e.target,n=t.parentElement.querySelector(".quantity"),i=Number(n.value),r=Number(n.dataset.inventoryQuantity),a=t.closest("[data-quickshop]").querySelector("[data-btn-addtocart]"),s;if((s=t.matches(".plus")?i+1:t.matches(".minus")?i-1:i)<=0&&(s=1),s>r&&!a.matches(".button--pre-untrack")){let o=getInputMessage(r);showWarning(o,warningTime),s=r}n.value=s,t.matches(".btn-quantity")&&this.input.dispatchEvent(this.changeEvent);let l=this.closest("[data-quickshop]"),c=l.querySelector('form input[type="hidden"]');c.setAttribute("value",s)}}class ProductScroller extends HTMLElement{constructor(){super(),this.container=this.querySelector("[data-drag-container]"),this.dragParent=this.querySelector("[data-drag-parent]"),this.initDragToScroll()}initDragToScroll(){let e=e=>e.clientWidth<e.scrollWidth;if(e(this.container)){this.dragToScroll(this.container);return}this.dragToScroll(this.dragParent)}dragToScroll(e){let t=!1,n,i,r;e.addEventListener("mousedown",r=>{r.target,t=!0,n=r.pageX-e.offsetLeft,i=e.scrollLeft}),e.addEventListener("mouseup",()=>{t=!1,clearTimeout(r),r=setTimeout(()=>{e.classList.remove("active")},150)}),e.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault(),e.classList.contains("active")||e.classList.add("active");let a=r.pageX-e.offsetLeft,s=(a-n)*1;e.scrollLeft=i-s}),e.addEventListener("mouseleave",()=>{t=!1,clearTimeout(r),r=setTimeout(()=>{e.classList.remove("active")},150)})}}class ImageToFlip extends HTMLElement{constructor(){super(),this.imageContainer=this,this.initObserver()}initObserver(){this.observer=new IntersectionObserver((e,t)=>{let n=e[0];n.isIntersecting&&(n.target.classList.add("show"),t.unobserve(n.target))},{threshold:.4}),this.observer.observe(this.imageContainer)}}function showWarning(e,t=null){window.warningTimeout&&clearTimeout(window.warningTimeout);let n=document.getElementById("halo-warning-popup").querySelector("[data-halo-warning-content]");n.textContent=e,document.body.classList.add("has-warning"),t&&(window.warningTimeout=setTimeout(()=>{document.body.classList.remove("has-warning")},t))}function getInputMessage(e){return window.cartStrings.addProductOutQuantity.replace("[maxQuantity]",e)}window.addEventListener("load",()=>{customElements.define("cart-update-quantity",UpdateQuantity),customElements.define("quickshop-update-quantity",UpdateQuantityQuickShop),customElements.define("product-scroller",ProductScroller)});class FadeInComponent extends HTMLElement{constructor(){super()}connectedCallback(){this.initObserver()}initObserver(){let e=(e,t)=>{e[0].isIntersecting&&(this.classList.add("fade-in"),t.unobserve(this))},t={threshold:.7};this.observer=new IntersectionObserver(e,t),this.observer.observe(this)}}function loadScrolling(){document.querySelectorAll("[data-scrolling]").forEach(e=>{"vertical"==e.dataset.scrolling?this.scrollVertical(e):this.scrollHorizontal(e)})}function scrollVertical(e){let t=e.closest(".special-banner__item")||e,n=t.getBoundingClientRect().top,i=t.getBoundingClientRect().height,r=window.innerHeight,a=e.scrollHeight/i,s=i>=r?0:(r-i)/2;n-s<0&&n>-1*i?this.scrollTop(e,(-1*n+s)*a):n-s>=0?this.scrollTop(e,0):this.scrollTop(e,e.scrollHeight)}function scrollTop(e,t){e.scrollTo({top:t,behavior:"smooth"})}function scrollHorizontal(e){let t=e.querySelector(".scrolling-text__list--1"),n=e.querySelector(".scrolling-text__list--2");if(!t)return;let i=e.getBoundingClientRect().top,r=e.getBoundingClientRect().height,a=window.innerHeight,s=t.scrollWidth>window.innerWidth?t.scrollWidth-window.innerWidth:0,o=2*t.getBoundingClientRect().height,l=r>=a?0:(a-r)/2,c=s/(r/2+l-o),u=(-1*i+l)*c,d=(r/2-o+l)*c-u;i-l<0&&i-o>-1*r/2?(u*=-1,d*=-1):i-l>=0?(u=0,d=-1*s):(u=-1*s,d=0),t.scrollWidth<=window.innerWidth?n.style.justifyContent="flex-end":this.translateX(t,n,u,d)}function translateX(e,t,n,i){e.style.transform=`translateX(${n}px)`,t.style.transform=`translateX(${i}px)`}window.addEventListener("load",()=>{customElements.define("fade-in-component",FadeInComponent),this.loadScrolling()}),window.onscroll=()=>{this.loadScrolling()};class SmoothScrollMenu{constructor(e){this.menuItems=document.querySelectorAll(e),this.attachEvents(),this.hideMenuItemsWithoutSection()}
1attachEvents(){this.menuItems.forEach(e=>{let t=e.querySelector("a");t&&t.getAttribute("href")&&"#"!==t.getAttribute("href")&&t.addEventListener("click",e=>this.handleMenuItemClick(e,t))})}handleMenuItemClick(e,t){e.preventDefault();var n=t.getAttribute("href"),i=!0;let r=window.location.pathname+window.location.hash;if(n.includes("/")&&r!==n&&(window.location.href=n,i=!1),i){var a=document.getElementById(t.getAttribute("href").split("#")[1]);a&&this.scrollToSection(a)}}scrollToSection(e){this.smoothScrollTo(e)}smoothScrollTo(e){window.scrollTo({behavior:"smooth",top:e.offsetTop})}hideMenuItemsWithoutSection(){this.menuItems.forEach(e=>{let t=e.querySelector("a"),n=t.getAttribute("href").split("#")[1];void 0===n||""===n||document.getElementById(n)||(e.style.display="none")})}}document.addEventListener("DOMContentLoaded",function(){new SmoothScrollMenu(".header__inline-menu .menu-lv-1")});
2
3

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.