var ShopTheLookManager=function(t,e,o){this.shop=t,this.product=null,this.products=null,this.jQuery=e,this.isAddingToCart=!1,this.cssSelectors={product:".shopthelook_product",variants:".shopthelook_variants",price:".shopthelook_price",singleProductAdd:".shopthelook_add-to-cart",allProductsAdd:".js-action.shopthelook_add-all-to-cart"},this.settings=o};function loadScript(t,e){var o=document.createElement("script");o.type="text/javascript",o.readyState?o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(o.onreadystatechange=null,e())}:o.onload=function(){e()},o.src=t,document.getElementsByTagName("head")[0].appendChild(o)}ShopTheLookManager.prototype.init=function(t){var e,i;(this.settings.isEnabled||void 0!==Shopify.PreviewBarInjector)&&(this.isProductPage()||this.isShopTheLookPage()||this.isWidget()||this.isCartPage())&&(e=this.getCurrentProduct(),i=[],this.isCartPage()&&this.jQuery.getJSON("/cart.js",e=>{for(let t=0;t')},w=function(){return{mobile:"3.6%",tablet:"25.9%",desktop:"25.8%"}[h.getActiveBreakpoint()]};y(),"stevie-rep-clivingston.myshopify.com"!==h.shop&&"suave-owl-menswear.myshopify.com"!==h.shop&&"range-boutique.myshopify.com"!==h.shop&&(l("body").on("click",'a[href*="/products"]',function(t){l(this).parents(".shop-the-look-container").length||(t.preventDefault(),t.stopPropagation(),h.product.id=l(this).attr("href"),i({productId:h.product.id}),o(),s.on("click",e))}),l("a[data-shop-the-look]").on("click",function(t){t.preventDefault(),t.stopPropagation(),h.product.id=l(this).attr("data-shop-the-look"),i({productId:h.product.id}),o(),s.on("click",e)})),i()},ShopTheLookManager.prototype.initializeGlideSlider=function(o,i){var a=this.jQuery,o=a(o);if(0===o.length)console.warn("stl embeded container doesn't exist");else{let t="carousel",e={perView:2,type:t=1===i?"slider":t,breakpoints:{1024:{perView:2},600:{perView:1}}};2{-1===(o=m.settings.formUrl).indexOf("https")&&(o=o.replace("http","https"));let s=!1;var e=m.isCartPage()?1:0,o=o+"?shop="+m.shop+"&mainProductId="+t+"&isCartPage="+e+"&locale="+m.getLocale()+"&country="+m.getCountry(),t=m.getDefinedTemplate();return t&&(o=o+"&definedTemplate="+t),fetch(o,{method:"GET"}).then(function(t){return t.json().then(function(t){var e,o,i=g("button#shopthelook");if(i.removeClass("loading-stl"),0 div.detail.product-column-right"):g("div.thumbnails.owl-carousel.owl-loaded.owl-drag")).after(t);else if("shopmitchellevan.myshopify.com"===Shopify.shop)g("#shopify-section-static-featured-collection").prepend('
'+t+"
");else if(0 .page-width > .grid",operand:"after"},{selector:".a1p_list-products",operand:"after"},{selector:"#related",operand:"append"},{selector:".complete-look",operand:"before"},{selector:".product__details .grid__item",operand:"append"},{selector:".section-related-products",operand:"before"},{selector:".shopify-section.section-apps",operand:"after"},{selector:"#shopify-section-related-products",operand:"before"},{selector:"#shopify-section-static-produc",operand:"append"},{selector:".container .heading-wrapper--recommended-products.heading-wrapper",operand:"before"},{selector:".product-section",operand:"after"},{selector:".releted--products",operand:"before"},{selector:".product__section-container.row.grid__wrapper",operand:"after"},{selector:"#shopify-section-signature-section",operand:"before"},{selector:".grid.product-single",operand:"after"},{selector:".collapsibles-wrapper.collapsibles-wrapper--border-bottom",operand:"after"},{selector:".related_products",operand:"after"},{selector:"#product-area",operand:"after"},{selector:".product__related",operand:"before"},{selector:'[itemtype="http://schema.org/Product"]',operand:"after"},{selector:".single-product-content > .container > .row",operand:"after"},{selector:".h_row_4",operand:"before"},{selector:"main > .shopify-section:nth-child(1)",operand:"after"},{selector:".shopify-section.section-main-product",operand:"after"},{selector:"main .shopify-section:first",operand:"after"},{selector:".shopify-section.shopify-section--product-content",operand:"after"},{selector:".shopify-section--product-template",operand:"after"},{selector:'[data-section-id="template--product"]',operand:"after"}],p=0,r,r;p #shopthelook {"+o[e]+"}")),g("body").trigger("stl.widgetHasBennLoaded"),g("body").trigger("shopthelook:widgetLoaded"),"undefined"==typeof jQuery||parseFloat(jQuery.fn.jquery)<3?"azilboutique.myshopify.com"===m.shop||"the-white-collection-au.myshopify.com"===m.shop||"volange-au.myshopify.com"===m.shop?g(".stl .stl__scroll-container").addClass("stl__scrollable"):!t.show_button&&!t.popup_autoload||m.isCartPage()&&""!==t.definedTemplate||m.loadStyleAndScriptForPopup(h):("undefined"!=typeof jQuery&&3t.id+":"+t.quantity).join(","),fetch("https://"+i+"/cart/"+t+"?discount="+o).then(t=>(t.ok||console.error("There was a problem with the fetch operation:"),"redirect_cart"===e&&(document.location.href="/cart"),t.text())).then(()=>{"redirect_cart"===e&&(document.location.href="/cart")}).then(t=>{if(t.ok)return t.text();throw new Error("Network response was not ok")}).then(t=>{console.log("Data from second request:",t)}).catch(t=>{console.error("There was a problem with the fetch operation:",t)})):document.location.href="/cart")};h()},ShopTheLookManager.prototype.updateCartDetails=function(o){var t=this.jQuery;void 0!==o.item_count&&0{var e=document.querySelector("cart-notification")||document.querySelector("cart-drawer");null!==e&&(e.classList.remove("is-empty"),o.sections=t,e.renderContents(o))})},1e3)}catch(t){console.warn(t)}t("body").trigger("stl.updateCartDetails",[o]);var e=new CustomEvent("stl.updateCartDetails",o);document.body.dispatchEvent(e)},ShopTheLookManager.prototype.getLocale=function(){return void 0!==window.Shopify&&void 0!==window.Shopify.locale?window.Shopify.locale:"en"},ShopTheLookManager.prototype.getCountry=function(){return void 0!==window.Shopify&&void 0!==window.Shopify.country?window.Shopify.country:"en"},ShopTheLookManager.prototype.insertCartToken=function(t,e,o){var i=this.jQuery,a=this.getCurrentProduct(),n=null;a&&(n=a.id),i.ajax({url:this.settings.cartTokenInsertUrl,method:"POST",data:{shop:o,cartToken:t,productId:e,mainProductLookId:n},dataType:"json"}).done(function(t){})},ShopTheLookManager.prototype.addButton=function(){var t,e=this.jQuery("#shopthelook"),o="",i=this.shop;0===e.length&&(""!==this.settings.mainButtonColor&&(o="",this.jQuery("body").append(o)),""!==this.settings.mainButtonHoverStyle&&(o="",this.jQuery("body").append(o)),""!==this.settings.mainButtonCustomCss&&(o="",this.jQuery("body").append(o)),(o="")!==this.settings.mainButtonAfterSectionSelector&&(o=this.settings.mainButtonAfterSectionSelector),t='",""!==o?0<(o=this.jQuery(o)).length&&o.after(t):0