PageSourceSearch

https://shop.interface.com/US/en-US/product.widgets.bundle.js

js interface.com collected 2026-10-02 03:19:37 UTC 68,538 bytes, 2 lines download raw bytes

1/*! For license information please see product.widgets.bundle.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunksfra_boilerplate||=[]).push([[57],{5466(t,e,s){s.d(e,{default:()=>a}),s.dn(a);var i=s(86);const r="js-tab-selected_sm m-active";function a(t){return class extends t{prefs(){return{isImperialValueVisible:!0,...super.prefs()}}init(){super.init(),this.eventBus().once("viewtype.change","reinit"),this.reinit()}updateState(){super.updateState(),this.reinit()}reinit(){this.config.isImperialValueVisible&&(0,i.nZ)()&&(this.showImperialColumn(),this.has("imperialTab")&&this.has("metricTab")&&(this.ref("imperialTab").addClass(r),this.ref("metricTab").removeClass(r))),(0,i.nZ)()||this.eachChild(t=>{t.show()})}showImperialColumn(){this.has("imperialTab")&&this.has("metricTab")&&(this.ref("imperialTab").addClass(r),this.ref("metricTab").removeClass(r),this.eachChild(t=>{t.showImperialColumn()}))}showMetricColumn(){this.has("imperialTab")&&this.has("metricTab")&&(this.ref("imperialTab").removeClass(r),this.ref("metricTab").addClass(r),this.eachChild(t=>{t.showMetricColumn()}))}}}},4527(t,e,s){s.d(e,{default:()=>o}),s.dn(o);var i=s(530),r=s(8520),a=s(781);function o(t){return class extends t{init(){super.init(),this.eventBus().on("attribute.change.begin","disableAddToCartBtn"),this.eventBus().on("attribute.change.complete","enableAddToCartBtn")}disableAddToCartBtn(){this.getById("addToCart",t=>{t.busy(),t.disable()})}enableAddToCartBtn(t){this.getById("addToCart",e=>{e.unbusy(),t?.product?.readyToOrder&&e.enable()})}getAddToCartPayload(t,e){const s=t.prefs(),i=e?.selectedOptions??this.getSelectedProductOptions();return{pid:this.prefs().currentProductId||s.pid,quantity:this.prefs().selectedQuantity||s.selectedQuantity,options:JSON.stringify(i),childProducts:this.prepareChildProducts(this.prefs().bundledProducts),slimCart:"true",...e?.extras}}addToCart(t){if(this.prefs().processingRequest)return Promise.resolve(null);if(!this.prefs().readyToOrder)return this.showCartMessage(this.prefs().textSelectOptions,!0),Promise.resolve(null);if(this.stock&&this.stock<this.prefs().selectedQuantity)return this.showCartMessage(this.prefs().textStockLimit,!0),Promise.resolve(null);const e=this.getSelectedProductOptions();if(!this.validateProductOptions(e))return Promise.resolve(null);this.setPref("processingRequest",!0),t.startProcess(),this.showProgressBar();const s=t.prefs();return(0,i.zP)(s.addToCartUrl,this.getAddToCartPayload(t,{selectedOptions:e})).then(e=>(this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.postAddProduct(e),e)).catch(()=>{this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.showCartMessage(this.prefs().textNetworkError,!0)})}orderSample(t){if(this.prefs().processingRequest)return Promise.resolve(null);const e=this.getSelectedProductOptions();if(!this.validateProductOptions(e))return Promise.resolve(null);this.setPref("processingRequest",!0),t.startProcess(),this.showProgressBar();const s=t.prefs();return(0,i.zP)(s.addToCartUrl,{pid:s.pid,materialBackingId:s.backingId,materialProductId:s.materialProductId,slimCart:"true"}).then(e=>(this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),e.isSampleResponse=!0,this.postAddProduct(e).then(t=>{e.error||t||this.eventBus().emit("sample.product.added.to.cart",e,this)}),e)).catch(()=>{this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.showCartMessage(this.prefs().textNetworkError,!0)})}updateOrderSampleButton(t){this.getById("orderSample",e=>{t.isEligibleForSamples?e.show():e.hide(),e.setPref("pid",t.sampleProductId),e.setPref("materialProductId",t.id),t.isSampleOutOfStock?(e.setPref("isOutOfStock",!0),e.disable()):t.isUnavailableVariant?e.disable():(e.setPref("isOutOfStock",!1),e.enable());const s=(0,r.Jt)(t,"variationAttributesObj.backing.selectedValue.id","");s&&e.setPref("backingId",s)})}showCartMessage(t,e=!1){this.getById(this.prefs().addToCartMsg,s=>{void 0===this.spacesLength&&(this.spacesLength=0),t=t.concat(Array(++this.spacesLength).join(this.prefs().zeroWidthSpaceSymbol)),s.render("template",{msg:t,error:e},s.ref("container")).then(()=>{s.show();const t=s.refs.self.get();t&&t.scrollIntoView()})})}updateProductView(t){super.updateProductView(t),this.updateOrderSampleButton(t),this.getById("sampleAddToCartMsg",t=>{t.hide()})}afterUpdateProduct(t){super.afterUpdateProduct(t),!t.error&&t.cartModel&&this.eventBus().emit("gtm.product.updated",t.cartModel,this)}postAddProduct(t){const e=t?.addedToCartModalConfig,s=!t.error&&!!e,i=e=>{const i=s&&e;
2if(!t.error&&t.cart){this.emit("productadded");const e=t.cart;if(e.showMinicart=!i&&this.prefs().showMinicartOnProductAdd,this.eventBus().emit("product.added.to.cart",e,this),!i&&this.prefs().showAlertOnProductAdd){const e=this.prefs().accessibilityAlerts.addedtocart+": "+t.message;this.eventBus().emit("alert.show",{accessibilityAlert:e,accessibilityAlertPause:!0})}}return(t.error||this.prefs().showMessageOnProductAdd&&!i)&&(this.eventBus().emit("product.addedTocart.with.error",t),this.showCartMessage(t.message,t.error)),e};return s&&e?(0,a.L)(e).catch(()=>!1).then(e=>(e&&t.isSampleResponse&&this.getById("sampleAddToCartMsg",t=>{t.hide()}),i(e))):Promise.resolve(i(!1))}}}},9531(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(4053);function r(t){return class extends t{initialVariationAttributes=null;initialProductId=null;init(){super.init(),this.eventBus().on("product.updated","updateFlyOut"),this.captureInitialVariationAttributes()}captureInitialVariationAttributes(){this.initialProductId=this.prefs().currentProductId,this.initialVariationAttributes=(this.items||[]).filter(t=>{const e=t.config&&t.config.id,s=t.ref&&t.ref("field");return"string"==typeof e&&e.startsWith("attr-")&&s&&s.els&&s.els[0]}).map(t=>{const e=t.config.id.replace("attr-",""),s=t.ref("field").els[0],i=Array.from(s.options),r=i.find(t=>null===t.getAttribute("value")),a=i.filter(t=>null!==t.getAttribute("value"));
2return{attributeId:e,id:e,displayName:t.data("displayName")||"",isBackingAttribute:!!t.data("isBackingAttribute"),disabled:s.disabled?"disabled":"",resetUrl:r&&r.dataset.attrUrl||"",values:a.map(t=>({value:t.value,displayValue:(t.textContent||"").trim(),selected:t.selected,selectable:t.disabled?"":"selectable",disabled:t.disabled,url:t.dataset.attrUrl||""}))}})}resetToInitialVariationAttributes(){this.initialProductId&&this.setPref("currentProductId",this.initialProductId),this.initialVariationAttributes&&this.initialVariationAttributes.forEach(t=>{this.getById("attr-"+t.attributeId,e=>{e.render("template",{attr:t},e.ref("container"))})})}updateFlyOut(t){const{product:e}=t||{};(0,i.Ey)((0,i.eH)(this.ref("self").get()),t)&&e&&(e.variationAttributes&&e.variationAttributes.length&&e.variationAttributes.forEach(t=>{if(this.items&&this.items.length){const e="attr-"+t.attributeId;if(!this.items.some(t=>t.config.id===e||t.id===e))return}t.values=t.values.map(t=>({...t,selected:t.selected,disabled:!t.selectable,selectable:t.selectable?"selectable":""})),this.getById("attr-"+t.attributeId,e=>{e.render("template",{attr:t},e.ref("container"))})}),this.setPref("currentProductId",e.id))}afterChangeAttribute(t){t&&t.product&&this.updateProductView(t.product)}updateProductView(t){this.setPref("currentProductId",t.id),this.updateFlyOut({product:t}),this.emit("updatecontent",this)}}}},9764(t,e,s){s.d(e,{default:()=>a}),s.dn(a);var i=s(530),r=s(8520);function a(t){return class extends t{product=null;prefs(){return{inventoryCheckUrl:"",inventoryProductId:"",isNoraProduct:!1,...super.prefs()}}init(){super.init(),this.eventBus().on("checkInventory.syncProduct","capturePdpProductForInventory")}capturePdpProductForInventory(t){t&&(this.product=t)}showModal(t,e,s){return this.eventBus().emit("check.inventory.popup.show"),super.showModal(t,e,s).then(t=>{const e=this.getById("checkInventory",t=>t||null);return e&&(this.product?e.updateFlyOut({product:this.product}):e.resetToInitialVariationAttributes()),this.updateContent(e||null),t})}toggleSpinner(t){this.ref("dialog").removeClass(this.prefs().classesLoading).attr("aria-busy",t.toString()),this.longWaitingTimeout&&this.longWaitingTimeout(),t&&this.ref("dialog").addClass(this.prefs().classesLoading)}clearInventoryContent(){this.getById("inventoryTable",t=>{const e=t.ref("container");e&&e.length&&e.empty()})}updateContent(t){this.clearInventoryContent(),this.toggleSpinner(!0);const e=t?t.prefs().currentProductId:this.prefs().inventoryProductId,s=(0,r.u0)(this.prefs().inventoryCheckUrl,"pid",e);return(0,i.Ve)(s).then(t=>{let e;if(this.getById("inventoryTable",t=>{e=t}),!e)throw new Error("inventoryTable not found");return this.prefs().isNoraProduct&&(t.isNoraProduct=!0),e.render(void 0,t,e.ref("container")).then(()=>{this.toggleSpinner(!1)}).then(()=>t)}).catch(()=>(this.clearInventoryContent(),this.eventBus().emit("alert.show",{errorCode:500}),this.toggleSpinner(!1),this.closeModal(),Promise.resolve(null)))}}}},7132(t,e,s){function i(t){return class extends t{onInput(){const t=this.ref("range"),e=this.ref("surface-wrapper").get();t&&e&&(e.style.width=`${t.val()}%`)}}}s.d(e,{default:()=>i}),s.dn(i)},1241(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(4053);function r(t){return class extends t{prefs(){return{baseUrl:"",...super.prefs()}}init(){this.eventBus().on("product.updated","onProductUpdated")}onProductUpdated(t){if(!(0,i.Ey)((0,i.eH)(this.ref("self").get()),t))return;const e=t&&t.product?t.product:t;if(!e)return;const s=this.ref("floorDesignIframe").get().contentWindow;s?.postMessage(e.id,"*")}}}},5810(t,e,s){function i(t){return class extends t{prefs(){return{installationImages:[],...super.prefs()}}getInstallationImageById(t){return this.prefs().installationImages.filter(e=>e.installationMethodId===t)[0]}changeLayout(t){const e=t.data("layoutId");if(e){const t=this.getInstallationImageById(String(e));t&&this.render("template",{images:[t]},this.ref("container"))}}}}s.d(e,{default:()=>i}),s.dn(i)},8512(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(8520);function r(t){return class extends t{isExpanded=!1;prefs(){return{selectedLayout:"",installationLayouts:[],isExpanded:!1,...super.prefs()}}init(){this.selectedLayout=this.prefs().installationLayouts[0]}update(t){this.setPref("installationLayouts",t.installationLayouts),this.selectedLayout=this.prefs().installationLayouts[0],this.isExpanded=!1,this.reRender()}handleClickOutside(){this.clickOutsideDispose&&this.clickOutsideDispose(),this.isExpanded=!1,this.reRender()}selectLayout(t){this.selectedLayout=this.prefs().installationLayouts.filter(e=>e.id===String(t.data("layoutId"))).pop(),this.eventBus().emit("gtm.product.attribute.selected",{name:"layout",value:this.selectedLayout&&this.selectedLayout.name}),this.isExpanded=!1,this.reRender()}toggleDropdown(){this.isExpanded=!this.isExpanded,this.reRender().then(()=>{this.isExpanded&&(this.clickOutsideDispose=(0,i.EO)(this.ref("container"),this.handleClickOutside.bind(this)))})}reRender(){return this.render("template",{installationLayouts:this.prefs().installationLayouts.filter(t=>t.id!==this.selectedLayout.id),selectedLayout:this.selectedLayout,isExpanded:this.isExpanded},this.ref("container")).then(()=>{this.clickOutsideDispose&&this.clickOutsideDispose()})}}}},6016(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(6795);function r(t){return class extends t{prefs(){return{classesActivated:"m-activated",...super.prefs()}}handleClick(t){this.getById("checkInventoryFlyOut",t=>{t.showModal({}),t.ref("dialog").addClass(this.prefs().classesActivated)}),(0,i.dG)(t)}}}},153(t,e,s){s.d(e,{default:()=>n}),s.dn(n);var i=s(4053),r=s(5600);const a="hidden",o="data-modal-config";function n(t){return class extends t{lastTileCount=null;lgwModalOpen=!1;prefs(){return{isQuickView:!1,...super.prefs()}}init(){super.init(),this.eventBus().on("product.updated","syncFromProduct"),this.eventBus().on(r.gP,"onTilesCount"),this.eventBus().on("dialogshow","onDialogShow"),this.eventBus().on(r.nl,"onLgw
2ModalClosed");const t=this.ref("button").get();t&&this.ev("click",(t,e)=>{e.preventDefault(),this.openLooksGoodWithModal()},t,!1)}openLooksGoodWithModal(){const t=this.ref("button").get(),e=t?.getAttribute(o);if(t&&e)try{const s=JSON.parse(e);"string"==typeof s.url&&(this.applyCountToModalConfig(t,s),this.eventBus().emit("dialogshow",s))}catch(t){}}syncFromProduct(t){if(!(0,i.Ey)(this.prefs().isQuickView,t))return;const e=(0,r.oe)(t),s=e?.looksGoodWith,a=!!s?.eligible,o=s?.items,n=Array.isArray(o)?o:[],d=e?.id?String(e.id):"";this.setVisible(a),a&&(this.lastTileCount=n.length,this.updateCount(n.length),d&&this.updateModalUrl(d))}onDialogShow(t){const e=t?.wrapperClasses;"string"==typeof e&&e.includes(r.__)&&(this.lgwModalOpen=!0)}onLgwModalClosed(){this.lgwModalOpen=!1}onTilesCount(t){!t||!t.inDialog&&this.lgwModalOpen||(this.lastTileCount=t.count,this.updateCount(t.count))}setVisible(t){const e=this.ref("self").get();e&&(t?e.removeAttribute(a):e.setAttribute(a,a))}updateModalUrl(t){const e=this.ref("button").get(),s=e&&e.getAttribute(o);if(s)try{const i=JSON.parse(s);"string"==typeof i.url&&(i.url=/[?&]pid=/.test(i.url)?i.url.replace(/([?&]pid=)[^&]*/,`$1${encodeURIComponent(t)}`):`${i.url}${i.url.indexOf("?")>=0?"&":"?"}pid=${encodeURIComponent(t)}`,e?.setAttribute(o,JSON.stringify(i)))}catch(t){}}updateCount(t){const e=this.ref("button").get();if(!e)return;!function(t,e){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let i=s.nextNode();for(;i;){const t=i.textContent;if(t&&r.yu.test(t))return void(i.textContent=t.replace(r.yu,`(${e})`));i=s.nextNode()}}(e,t);const s=e.getAttribute(o);if(s)try{const i=JSON.parse(s);"string"==typeof i.headerText&&(i.headerText=(0,r.sb)(i.headerText,t)),e.setAttribute(o,JSON.stringify(i))}catch(t){}}applyCountToModalConfig(t,e){null!==this.lastTileCount&&"string"==typeof e.headerText&&(e.headerText=(0,r.sb)(e.headerText,this.lastTileCount),t.setAttribute(o,JSON.stringify(e)))}}}},2132(t,e,s){s.d(e,{default:()=>c}),s.dn(c);var i=s(530),r=s(3013),a=s(4053),o=s(5600);const n="aria-checked",d="hidden",l="true",u="false",h="m-active";function c(t){return class extends t{prefs(){return{textEmpty:"",updateUrl:"",isQuickView:!1,...super.prefs()}}init(){super.init();const t=this.data("textEmpty"),e="string"==typeof t?t:"";this.setPref("textEmpty",e),(0,o.hZ)(!0),this.eventBus().on("product.updated","onProductUpdated"),this.eventBus().on(o.gP,"onTilesCount"),this.eventBus().on(o.aj,"onExploreAllFromPopup"),this.onDestroy(()=>{(0,o.hZ)(!1)})}onExploreAllFromPopup(){this.switchTab("lgw"),this.scrollIntoView()}onProductUpdated(t){(0,a.Ey)(this.prefs().isQuickView,t)&&this.updateFromProduct((0,o.oe)(t))}updateFromProduct(t){const e=t?.looksGoodWith,s=!!e?.eligible,i=e?.items,r=Array.isArray(i)?i:[],a=t?.id?String(t.id):"";if(!s)return this.switchTab("gallery"),void this.setRootVisible(!1);this.setRootVisible(!0),this.updateLgwTabCount(r.length),this.fetchGridHtml(a)}onTilesCount(t){t&&!t.inDialog&&this.updateLgwTabCount(t.count)}fetchGridHtml(t){const e=this.prefs().updateUrl||this.data("updateUrl");e&&t&&(0,i.uf)(e,{pid:t}).then(t=>{t&&this.applyGridHtml(String(t))}).catch(()=>{})}setRootVisible(t){const e=this.ref("self").get();e&&(t?e.removeAttribute(d):e.setAttribute(d,d))}applyGridHtml(t){const e=(this.items||[]).find(t=>!!t&&"function"==typeof t.replaceGridHtml);e&&e.replaceGridHtml(t)}updateLgwTabCount(t){const e=this.ref("tabLgw").get();if(!e)return;const s=e.textContent||"";e.textContent=(0,o.sb)(s,t)}switchTab(t){const e="string"==typeof t?"gallery"===t:"gallery"===t.getAttribute("data-tab");this.ref("tabGallery")[e?"addClass":"removeClass"](h),this.ref("tabLgw")[e?"removeClass":"addClass"](h),this.ref("tabGallery").attr(n,e?l:u),this.ref("tabLgw").attr(n,e?u:l),this.ref("self")[e?"removeClass":"addClass"]("m-active-lgw"),this.eventBus().emit("lgw.tab.changed",{isGallery:e})}onTabGallery(){this.switchTab("gallery")}onTabLgw(){this.switchTab("lgw")}scrollIntoView(){window.requestAnimationFrame(()=>{(0,r.lG)(this.ref("self").get(),!0)})}}}},4219(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(530);function r(t){return class extends t{prefs(){return{...super.prefs()}}validateFlyOutFields(){let t=!1,e=!1,s=!1;return this.getById("sideMark",e=>{t=e.validate()}),this.getById("materialQuantityInput",t=>{e=t.validate()}),this.getById("inputPrice",t=>{s=t.validate()}),t&&e&&s}cleanupFields(){this.getById("sideMark",t=>{t.setValue("")}),this.getById("materialQuantityInput",t=>{t.setValue("",!0)}),this.getById("inputPrice",t=>{t.setValue("",!0)})}addToCart(t){if(this.prefs().processingRequest)return Promise.resolve(null);if(!this.validateFlyOutFields()||!this.prefs().readyToOrder)return this.prefs().readyToOrder||this.showCartMessage(this.prefs().textSelectOptions,!0),Promise.resolve(null);if(this.stock&&this.stock.toFixed(2)<this.prefs().selectedQuantity.toFixed(2))return this.showCartMessage(this.prefs().textStockLimit,!0),Promise.resolve(null);const e=this.getSelectedProductOptions();if(!this.validateProductOptions(e))return Promise.resolve(null);this.setPref("processingRequest",!0),t.startProcess(),this.showProgressBar();const s=t.prefs();let r="";this.getById("materialQuantityInput",t=>{r=t.getValue()});let a="";this.getById("inputPrice",t=>{a=t.getValue()});let o="";return this.getById("sideMark",t=>{o=t.getValue()}),(0,i.zP)(s.addToCartUrl,this.getAddToCartPayload(t,{selectedOptions:e,extras:{price:a,sideMark:o,quantity:r||this.prefs().selectedQuantity||s.selectedQuantity}})).then(e=>(this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),Promise.resolve(this.postAddProduct(e)).then(t=>{e.error||(t||this.eventBus().emit("flyout.product.added.to.cart",e,this),this.eventBus().emit("minicart.updated",e.cart,this)),this.cleanupFields()}),e)).catch(()=>{this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.showCartMessage(this.prefs().textNetworkError,!0)})}updateProduct(t){const e=this.prefs().productOptions[0],s=this.getSelectedProductOptions(),r=this.validateProductOptions(s);let a="",o=!1;this.getById("materialQuantityInput",t=>{a=t.getValue(),o=t.validate()});let n="",d=!1;this.getById("inputPrice",t=>{n=t.getValue(),d=t.validate()});let l="",u=!1;return this.getById("sideMark",t=>{l=t.getValue(),u=t.validate()}),r&&o&&d&&u?(t.startProcess(),(0,i.zP)(t.ref("self").attr("data-update-url"),{pid:this.prefs().currentProductId||t.prefs().pid,price:n,quantity:a||this.prefs().selectedQuantity||t.selectedQuantity,sideMark:l,uuid:t.ref("self").attr("data-uuid"),...this.getAdditionalProductData(e)}).then(e=>(this.afterUpdateProduct(e),t.stopProcess(),e)).finally(()=>
2{this.emit("updated"),t.stopProcess()})):Promise.resolve(null)}}}},1866(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(4053);function r(t){return class extends t{prefs(){return{waitedRequest:!1,...super.prefs()}}init(){super.init(),this.eventBus().on("product.updated","updateFlyOut")}afterChangeAttribute(t){t&&t.product&&this.updateProductView(t.product)}inputChanged(){this.getById(this.prefs().addToCartMsg,t=>{t.hide()})}updateFlyOut(t){const{product:e}=t||{};!e||!(0,i.Ey)((0,i.eH)(this.ref("self").get()),t)||(e.variationAttributes&&e.variationAttributes.length&&e.variationAttributes.forEach(t=>{this.items&&this.items.length&&!this.items.some(e=>e.config.id==="attr-"+t.attributeId)||(t.values=t.values.map(t=>({...t,selected:t.selected,disabled:!t.selectable,selectable:t.selectable?"selectable":""})),this.getById("attr-"+t.attributeId,e=>{e.render("template",{attr:t},e.ref("container"))}))}),this.setPref("currentProductId",e.id))}selectedQuantity(t,e){t.prefs().isProcessing?this.setPref("waitedRequest",!0):(t.setPref("isProcessing",!0),this.changeAttribute(e).finally(()=>{setTimeout(()=>{t.setPref("isProcessing",!1),this.prefs().waitedRequest&&(this.setPref("waitedRequest",!1),t.emit("selectedquantity",t))},500)}))}renderQuantities(t){const e=t.availability,s=t.quantities;s&&e&&this.getById("materialQuantityInput",t=>{t.setPref("attrUrl",s.actionUrl)})}}}},3879(t,e,s){s.d(e,{default:()=>o}),s.dn(o);var i=s(8520),r=s(4053);const a=Object.freeze({UP:38,DOWN:40,DECIMAL_COMMA:188});function o(t){return class extends t{prefs(){return{productAvailable:!0,amendmentAlert:"",minOrderQuantity:0,isValid:!1,attrUrl:"",isSpecialBoxType:!1,boxTypeMinOrderQuantity:0,boxTypeStepQuantity:0,isProcessing:!1,...super.prefs()}}init(){this.eventBus().on("product.updated","onProductUpdated"),this.eventBus().on("product.quantity.updated","onProductUpdated"),this.eventBus().on("set.quantity.value","setValue"),this.prefs().productAvailable||this.getById("inputQuantity",t=>{t.disable()})}onProductUpdated(t){(0,r.Ey)((0,r.eH)(this.ref("self").get()),t)&&(t?.product?.boxSize&&this.setPref("minOrderQuantity",t.product.boxSize),t?.product?.boxType&&this.setPref("isSpecialBoxType",Boolean(t.product.boxType)),t?.product?.minOrderQuantity&&this.setPref("boxTypeMinOrderQuantity",t.product.minOrderQuantity),t?.product?.stepQuantity&&this.setPref("boxTypeStepQuantity",t.product.stepQuantity),t?.product&&this.setPref("attrUrl",t.product.quantities.actionUrl))}showAmendmentAlert(){this.eventBus().emit("alert.show",{accessibilityAlert:this.prefs().amendmentAlert})}getValue(){let t;return this.getById("inputQuantity",e=>{t=parseFloat(e.getValue())}),t}setValue(t,e=!1){this.getById("inputQuantity",s=>{s.setValue(t,e)})}getQuantityParams(){const t=this.prefs().isSpecialBoxType;return{minOrderQuantity:t?parseFloat(String(this.prefs().boxTypeMinOrderQuantity)):parseFloat(String(this.prefs().minOrderQuantity)),stepQuantity:t?parseFloat(String(this.prefs().boxTypeStepQuantity)):parseFloat(String(this.prefs().minOrderQuantity))}}inputChanged(){this.getById("inputQuantity",t=>{const e=parseFloat(t.getValue()),{minOrderQuantity:s,stepQuantity:r}=this.getQuantityParams();if(e<s)t.setValue(s.toFixed(2)),this.showAmendmentAlert();else if((e-s)%r){const i=s+r*Math.ceil((e-s)/r);t.setValue(i.toFixed(2)),this.showAmendmentAlert()}let a=(0,i.dh)(this.prefs().attrUrl,"quantity");a=(0,i.u0)(a,"quantity",t.getValue()),this.setPref("attrUrl",a),this.emit("selectedquantity",this),this.setPref("isValid",!0)})}keyDown(t,e){if(e.keyCode===a.DECIMAL_COMMA)return e.preventDefault(),void this.getById("inputQuantity",t=>{t.ref("field")&&(t.ref("field").get().value+=".")});e.keyCode!==a.UP&&e.keyCode!==a.DOWN||(e.preventDefault(),this.getById("inputQuantity",t=>{const{minOrderQuantity:s,stepQuantity:r}=this.getQuantityParams(),o=parseFloat(t.getValue());let n=0;if(e.keyCode===a.UP||e.keyCode===a.DOWN){const t=e.keyCode===a.UP?1:-1;n=s+r*(Math.round((o-s)/r)+t)}n<s?(t.setValue(s.toFixed(2)),this.showAmendmentAlert()):t.setValue(n.toFixed(2));let d=(0,i.dh)(this.prefs().attrUrl,"quantity");d=(0,i.u0)(d,"quantity",t.getValue()),this.setPref("attrUrl",d),this.emit
2("selectedquantity",this),this.setPref("isValid",!0)}))}validate(){let t=!1;return this.getById("inputQuantity",e=>{t=e.validate()}),t}getSelectedVariations(){return this}}}},5884(t,e,s){s.d(e,{default:()=>a}),s.dn(a);var i=s(6795),r=s(4053);function a(t){return class extends t{prefs(){return{classesActivated:"m-activated",isMaterialProduct:!1,...super.prefs()}}init(){this.eventBus().on("product.updated","onProductUpdated")}handleClick(t){this.getById("orderProductFlyOut",t=>{t.showModal({}),t.ref("dialog").addClass(this.prefs().classesActivated)}),(0,i.dG)(t),this.prefs().isMaterialProduct&&(0,i._j)(t)}onProductUpdated(t){(0,r.Ey)((0,r.eH)(this.ref("self").get()),t)&&(this.getById("flyoutAddToCartMsg",t=>{t.hide()}),t.product&&(t.product?.available?this.ref("orderButton").enable():this.ref("orderButton").disable()))}}}},8127(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(872);function r(t){return class extends t{init(){this.eventBus().on("product.added.to.cart","productAddedHandler")}productAddedHandler(){const t=i.p.dialogsStack,e=t.indexOf(this);-1!==e&&(t[t.length-1]!==this?(t.splice(e,1),this.close(),this.onAfterCloseModal()):this.closeModal())}}}},9845(t,e,s){s.d(e,{default:()=>o}),s.dn(o);var i=s(530),r=s(6795);const a=Object.freeze({RETURN:13,SPACE:32});function o(t){return class extends t{prefs(){return{accessibilityAlert:"",url:"",...super.prefs()}}handleError(t){this.eventBus().emit("alert.error",{accessibilityAlert:t})}handleClick(t){const e=this.prefs().url,s=this.prefs().accessibilityAlerts.downloadError;e?(0,i.Ve)(e).then(t=>{if(t.error)this.handleError(s);else{const e=`data:application/octet-stream;base64,${t.base64}`,s=document.createElement("a"),i=String(t.fileName);s.href=e,s.text=i,s.download=i,s.click()}}):this.handleError(s),"accountDetails"===this.config.gtmType?(0,r.S4)(this.ref("self")):"accountHistory"===this.config.gtmType?(0,r.SL)(this.ref("self")):(0,r.dG)(this.ref("self"))}handleKeydown(t,e){let s=!1;switch(e.keyCode){case a.RETURN:case a.SPACE:this.handleClick(t),s=!0}s&&(e.preventDefault(),e.stopPropagation())}defineAttributes(t){}updateState(){}}}},2894(t,e,s){s.d(e,{default:()=>d}),s.dn(d);var i=s(9193),r=s(6317),a=s(4053);const o=r.S.getInstance(),n="aria-expanded";function d(t){return class extends t{badges=[];prefs(){return{pid:"",pageType:"PDP",wishlistButtonId:"addToWishlist",hasWishlistBtnChild:!1,isQuickView:!1,productBadges:[],...super.prefs()}}init(){super.init(),this.eventBus().on("update.wishlist.status.product.detail","updateWishlistFlyOutButtonState"),this.eventBus().on("render.badges","renderVariantBadges"),this.badges=this.prefs().productBadges||[],this.updateWishlistFlyOutButtonState()}updateWishlistFlyOutButtonState(t){this.prefs().pid&&o.isItemInWishlist(this.prefs().pid,this.prefs().productOptions,t).then(e=>{this.updateWishListStatusAttr(e,t)})}updateWishlistButtonProductId(t){this.prefs().hasWishlistBtnChild&&this.getById("addToWishlist",e=>{e.setPref("productId",t.id)})}updateWishListStatusAttr(t,e){this.items.forEach(s=>{"wishlistButtonContainerRef"===s.id?this.updateWishListButtonOnPDP(t,s,e):s.id!==this.prefs().wishlistButtonId||s.data("wishlistid")||this.updateWishListButtonOnQuickView(s,t,e)})}updateWishListButtonOnQuickView(t,e,s){const r=t;if(e)r.activate().press();else{const t=JSON.parse(i.A.getItem("wishlistItems")).find(t=>t.variantIds.find(t=>t===this.prefs().pid));!s&&t?r.activate().press():t||r.deactivate().unpress().enable()}}updateWishListButtonOnPDP(t,e,s){const r=e.getById("addToWishlist",t=>t);if(r)if(t)this.callIfExists("activateWishListButton",r);else{const t=JSON.parse(i.A.getItem("wishlistItems")).find(t=>t.variantIds.find(t=>t===this.prefs().pid));!s&&t?this.callIfExists("activateWishListButton",r):t||this.callIfExists("deactivateWishListButton",r)}}renderInstallationLayouts(t){this.getById("installationLayouts",e=>{e.update(t)})}renderInstallationImages(t){const e=this.getById("installationLayouts",t=>t);this.getById("installationImage",s=>{s.setPref("installationImages",t.images.installation_image);let i=s?.config?.installationImages?.[0];e&&e.selectedLayout&&(i=s.prefs().installationImages?.filter(t=>t.installationMethodId===e.selectedLayout.id)[0]),i&&s.render("template",{images:[i]},s.ref("container"))})}changeLayout(t){this.getById("installationImage",e=>{e.changeLayout(t)}),this.getById("installationLayouts",e=>{e.selectLayout(t)})}toggleAllSpecificationsPanel(){this.config.isAllSpecificationsContentOpen=!this.config.isAllSpecificationsContentOpen,this.ref("allSpecificationsContent").toggleClass("js-viewport-hidden_sm"),this.config.isAllSpecificationsContentOpen?(this.getById(this.prefs().descriptions,t=>{t.reinit()}),this.ref("toggleAllSpecificationsItemBtn").attr(n,"true")):this.ref("toggleAllSpecificationsItemBtn").attr(n,"false")}renderVariationAttributes(t){super.renderVariationAttributes(t),t.variationAttributes&&t.variationAttributes.length&&t.variationAttributes.forEac
2h(e=>{const s=!t.isNoraProduct&&"backing"!==e.attributeId,i=t.isNoraProduct&&"color"===e.attributeId,r=!t.isNoraProduct&&"size"!==e.attributeId;s&&r||i||(e.values=e.values.map(t=>({...t,selected:t.selected,disabled:!t.selectable,selectable:t.selectable?"selectable":""})),this.getById("attr-"+e.attributeId+"-specifications",t=>{t.render("template",{attr:e},t.ref("container"))}))})}renderBadges(t){this.getById("badges",e=>{e.render("template",{product:t},e.ref("container"))})}renderCustomMarketingMessage(t){this.getById("customMarketingMessage",e=>{e.render("template",{product:t},e.ref("container"))})}renderWishlist(t){this.getById("wishlistButtonContainerRef",e=>{e.render("template",{pid:t.id,productName:t.productName,allWishLists:t.allWishLists},e.ref("wishlistContainer")).then(t=>{this.eventBus().emit("update.wishlist.status.product.detail"),this.eventBus().emit("update.wishlist.status.product.tile")})})}updateProductView(t){super.updateProductView(t),this.renderInstallationLayouts(t),this.renderInstallationImages(t),this.renderBadges(t),this.renderCustomMarketingMessage(t),this.renderWishlist(t),this.renderUnavailableVariantMessage(t)}openZoom(t){this.getById("productImages",e=>{const s=t.data("zoomId"),i=e.getCarouselImages().map((t,e)=>({zoomId:t.dataset.zoomId,index:e})),r=i.filter(t=>t.zoomId===s).pop()?.index||0;e.customZoom(r)})}closeZoom(){this.getById("productImages",t=>{t.closeZoom()})}closeZoomKeydown(t,e){this.getById("productImages",s=>{s.closeZoomKeydown(t,e)})}setSwatchColorName(t,e){const s=t.getSelectedVariations();let i=s.els[0].getAttribute("data-name");const r=s.els[0].getAttribute("data-color-number");i+=r?" "+r:"",t.setColorName(i)}renderUnavailableVariantMessage(t){t?.isNoraProduct&&(t.isUnavailableVariant?this.ref("unavailableVariantMessage").show():this.ref("unavailableVariantMessage").hide())}changeAttribute(t){const e=this.getConstructor("inputStepper");this.eventBus().emit("attribute.change.begin");const s=t.getSelectedVariations();return super.changeAttribute(t).then(i=>{i&&(this.eventBus().emit("attribute.change.complete",i),i.product&&"checkInventory"!==this.id&&this.eventBus().emit("checkInventory.syncProduct",i.product),"materialQuantityInput"===t.id||t instanceof e||this.eventBus().emit("gtm.product.detail.view",i),s&&s.data("gtmElementName")&&this.eventBus().emit("gtm.product.attribute.selected",{name:s.data("gtmElementName"),value:s.data("gtmElementValue")}),"attr-backing"===t.id&&(this.eventBus().emit("product.quantity.updated",i),this.eventBus().emit("set.quantity.value",0,!0)),"attr-color"===t.id&&this.setSwatchColorName(t,i),"function"==typeof t.detectColorTheme&&t.detectColorTheme())})}renderVariantBadges(t){const e=t||this.badges;this.renderBadges({badges:e})}emitUpdated(t){const e=(0,a.oj)(this.prefs().isQuickView)?(0,a.HO)(t):t;this.eventBus().emit("product.updated",e)}afterUpdateProduct(t){(0,a.oj)(this.prefs().isQuickView)?this.emitUpdated(t):super.afterUpdateProduct(t)}afterChangeAttribute(t){super.afterChangeAttribute(t),t&&t.product&&(this.badges=t.product?.badges),t&&!(0,a.oj)(this.prefs().isQuickView)&&setTimeout(()=>{this.emitUpdated(t)},0)}}}},4897(t,e,s){s.d(e,{default:()=>o}),s.dn(o);var i=s(8520);const r=Object.freeze({SPACE:32,ENTER:13}),a="zoom";function o(t){return class extends t{prefs(){return{accessibilityAlerts:{},thumbnailsPerFrame:4,thumbnailsZoomClass:"m-zoomed-in",classesGlobalDialog:"m-has_dialog m-only_reader",zoomLoop:!1,zoomClickToCloseNonZoomable:!1,zoomCloseElClasses:"",closeOnScroll:!1,predefinedHeight:1773,predefinedWidth:1333,barsSizeBottom:"auto",barsSizeTop:24,showHideOpacity:!0,...super.prefs()}}init(){super.init(),this.eventBus().on("lgw.tab.changed","onLgwTabChanged"),this.onDestroy(()=>{this.gallery&&(this.gallery.close(),this.gallery.destroy(),this.gallery=void 0)})}onLgwTabChanged(t){const e=this.ref("self").get(),s=e?e.closest(".l-pdp-image"):null;s&&(s.hidden=!t.isGallery)}renderImages(t){return t.zoomImages&&t.zoomImages.zoom?(t.zoomImages.zoom.forEach(t=>{t.originalSrc=t&&t.url}),this.render("galleryTemplate",t,this.ref("carouselInner")).then(()=>{this.update()})):Promise.resolve(null)}onImageCarouselPageChanged(t,e){this.getById("imagesThumbnails",t=>{this.imageMode!==a&&t.markCurrentPage(e).scrollIntoView()}),this.getById("indicatorsThumbnails",t=>{this.imageMode!==a&&t.markCurrentPage(e).scrollIntoView()})}onThumbnailCarouselPageClicked(t,e){this.getById("imagesCarousel",t=>t.scrollToPage(e)),this.imageMode===a&&this.gallery&&this.gallery.goTo(e),this.getById("imagesThumbnails",t=>{t.markCurrentPage(e).scrollIntoView()}),this.getById("indicatorsThumbnails",t=>{t.markCurrentPage(e).scrollIntoView()})}update(){this.getById("imagesThumbnails",t=>
2t.update().scrollToPage(0).markCurrentPage(0)),this.getById("indicatorsThumbnails",t=>t.update().scrollToPage(0).markCurrentPage(0)),this.getById("imagesCarousel",t=>t.update().scrollToPage(0))}getOriginalImageSize(){return new Promise(t=>{const e=this.getById("imagesCarousel",t=>t),s={originalHeight:this.prefs().predefinedHeight,originalWidth:this.prefs().predefinedWidth};if(e){const e=this.getCarouselImages()[0];if(e.dataset.originalSrc){const i=new Image;i.addEventListener("load",()=>t({originalHeight:i.height,originalWidth:i.width})),i.addEventListener("error",()=>t(s)),i.src=e.dataset.originalSrc}else t(s)}else t(s)})}addFocusTrap(){this.backFocusElement=document.activeElement instanceof HTMLElement?document.activeElement:document.body,this.addFocusTraps(),this.afterShowModal()}preloadImage(t){return new Promise(e=>{t.complete||t.naturalWidth&&t.naturalHeight?e():(t.addEventListener("load",()=>e()),t.addEventListener("error",()=>e()),t.setAttribute("loading","greedy"))})}initAndShowCustomZoom(t,e,{originalWidth:s,originalHeight:i},r,o){const n=document.querySelectorAll(".pswp")[0],d=this.getById("imagesCarousel",t=>t),l=this.getById("imagesThumbnails",t=>t);if(l.show(),r=-1===r?d.getCurrentPageIndex():r,!(n instanceof HTMLElement))return;n.setAttribute("data-tau","zoom_dialog");const u=this.prefs(),h=o.map(t=>{let e=t.naturalWidth||s,r=t.naturalHeight||i;const a=window.visualViewport.width,o=window.visualViewport.height,n="number"==typeof u.barsSizeBottom?u.barsSizeBottom:0,d=a/e,l=(o-u.barsSizeTop-n)/r,h=d<l?d:l;return e=3*Math.round(e*h),r=3*Math.round(r*h),{title:t.dataset.caption,zoomId:t.dataset.zoomId,src:t.dataset.originalSrc,w:e,h:r}}),c={index:r,barsSize:{top:u.barsSizeTop,bottom:u.barsSizeBottom},loop:u.zoomLoop,history:!1,clickToCloseNonZoomable:u.zoomClickToCloseNonZoomable,closeElClasses:u.zoomCloseElClasses.split(","),closeOnScroll:u.closeOnScroll,showHideOpacity:u.showHideOpacity},p=new t(n,e,h,c);p.listen("imageLoadComplete",()=>{this.toggleSpinner(!1)}),p.listen("close",()=>this.onZoomClosed()),p.listen("doubleTap",()=>{const t=1===p.getZoomLevel();n.classList.toggle("pswp--zoomed-in",!t)}),p.listen("beforeChange",()=>{const t=p.getCurrentIndex();l&&l.markCurrentPage(t).scrollIntoView()}),l&&this.toggleZoomState(!0),p.init(),this.gallery=p,this.imageMode=a,this.addGlobalDialogClass(),l&&(l.updateCarouselMetric(),l.updateCarouselState(),l.getCarouselDimension());const g=this.prefs().accessibilityAlerts.dialogContentLoaded;this.eventBus().emit("alert.show",{accessibilityAlert:g})}toggleSpinner(t){this.ref("zoomDialog").removeClass(this.prefs().classesLoading),this.longWaitingTimeout&&this.longWaitingTimeout(),t&&(this.longWaitingTimeout=(0,i.wR)(()=>{this.ref("zoomDialog").addClass(this.prefs().classesLoading)},1e3))}loadPhotoswipeDependencies(){return Promise.all([s.e(391).then(()=>s.t(5388,23)),s.e(391).then(()=>s.t(7855,23)),this.getOriginalImageSize()])}onImageCarouselPageClicked(){this.customZoom(-1)}openZoom(){this.customZoom(-1)}customZoom(t){this.ref("zoomDialog").attr("aria-hidden","false"),this.toggleSpinner(!0),this.loadPhotoswipeDependencies().then(([e,s,i])=>{const r=this.getCarouselImages();Promise.all(r.map(t=>this.preloadImage(t))).then(()=>{this.initAndShowCustomZoom(e.default,s.default,i,t,r),this.addFocusTrap()})})}closeZoom(){if(this.gallery){this.gallery.close();const t=this.getById("imagesThumbnails",t=>t);t&&(t.updateCarouselMetric(),t.updateCarouselState(),t.hide())}const t=document.querySelectorAll(".pswp")[0];t?.removeAttribute("data-tau"),this.eventBus().emit("alert.hide")}closeZoomKeydown(t,e){e.keyCode!==r.ENTER&&e.keyCode!==r.SPACE||(e.stopPropagation(),e.preventDefault(),this.closeZoom())}onZoomClosed(){this.toggleZoomState(!1),this.imageMode="carousel",this.removeGlobalDialogClass(),this.backFocusElement&&(this.backFocusElement.focus(),this.backFocusElement=void 0)}addGlobalDialogClass(){const t=this.ref("html");t.hasClass(this.prefs().classesGlobalDialog)||t.addClass(this.prefs().classesGlobalDialog)}removeGlobalDialogClass(){this.ref("html").removeClass(this.prefs().classesGlobalDialog)}handleKeydown(t,e){e.keyCode!==r.ENTER&&e.keyCode!==r.SPACE||(e.preventDefault(),e.stopPropagation(),this.customZoom(-1))}getCarouselImages(){const t=this.getById("imagesCarousel",t=>t),e=t.ref(t.prefs().elemCarouselTrack).get();return([].slice.call(e?.querySelectorAll(".b-product_image"))||[]).map(t=>{const e=t.querySelector(".b-product_image-zoom img"),s=t.querySelector("img");return e||s})}toggleZoomState(t){this.getById("imagesThumbnails",t=>t).ref("self").toggleClass(this.prefs().thumbnailsZoomClass,t),this.ref("self").toggleClass(this.prefs().thumbnailsZoomClass,t)}}}},2712(t,e,s){s.d(e,{default:()=>w});var i=s(6795);function r(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function a(t){return"#"+t.map(r).join("")}function o(t,e,s){for(var i=0;i<s.length;i++)if(n(t,e,s[i]))return!0;return!1}function n(t,e,s){switch(s.length){case 3:if(function(t,e,s){return 255!==t[e+3]||t[e]===s[0]&&t[e+1]===s[1]&&t[e+2]===s[2]}(t,e,s))return!0;break;case 4:if(function(t,e,s){return t[e+3]&&s[3]?t[e]===s[0]&&t[e+1]===s[1]&&t[e+2]===s[2]&&t[e+3]===s[3]:t[e+3]===s[3]}(t,e,s))return!0;break;case 5:if(function(t,e,s){var i=s[0],r=s[1],a=s[2],o=s[3],n=s[4],l=t[e+3],u=d(l,o,n);return o?!(l||!u)||!!(d(t[e],i,n)&&d(t[e+1],r,n)&&d(t[e+2],a,n)&&u):u}(t,e,s))return!0;break;default:return!1}}function d(t,e,s){return t>=e-s&&t<=e+s}function l(t,e,s){for(var i={},r=s.dominantDivider||24,a=s.ignoredColor,n=s.step,d=[0,0,0,0,0],l=0;l<e;l+=n){var u=t[l],h=t[l+1],c=t[l+2],p=t[l+3];if(!a||!o(t,l,a)){var g=Math.round(u/r)+","+Math.round(h/r)+","+Math.round(c/r);i[g]?i[g]=[i[g][0]+u*p,i[g][1]+h*p,i[g][2]+c*p,i[g][3]+p,i[g][4]+1]:i[g]=[u*p,h*p,c*p,p,1],d[4]<i[g][4]&&(d=i[g])}}var f=d[0],m=d[1],y=d[2],b=d[3],v=d[4];return b?[Math.round(f/b),Math.round(m/b),Math.round(y/b),Math.round(b/v)]:s.defaultColor}function u(t,e,s){for(var i=0,r=0,a=0,n=0,d=0,l=s.ignoredColor,u=s.step,h=0;h<e;h+=u){var c=t[h+3],p=t[h]*c,g=t[h+1]*c,f=t[h+2]*c;l&&o(t,h,l)||(i+=p,r+=g,a+=f,n+=c,d++)}return n?[Math.round(i/n),Math.round(r/n),Math.round(a/n),Math.round(n/d)]:s.defaultColor}function h(t,e,s){for(var i=0,r=0,a=0,n=0,d=0,l=s.ignoredColor,u=s.step,h=0;h<e;h+=u){var c=t[h],p=t[h+1],g=t[h+2],f=t[h+3];l&&o(t,h,l)||(i+=c*c*f,r+=p*p*f,a+=g*g*f,n+=f,d++)}return n?[Math.round(Math.sqrt(i/n)),Math.round(Math.sqrt(r/n)),Math.round(Math.sqrt(a/n)),Math.round(n/d)]:s.defaultColor}function c(t){return p(t,"defaultColor",[0,0,0,0])}function p(t,e,s){return void 0===t[e]?s:t[e]}function g(t){return function(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement}(t)?"canvas":function(t){return m&&t instanceof OffscreenCanvas}(t)?"offscreencanvas":y(t)?"videoframe":function(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}(t)?"imagebitmap":t.src}function f(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}var m="undefined"!=typeof OffscreenCanvas;function y(t){return"undefined"!=typeof VideoFrame&&t instanceof VideoFrame}var b="undefined"==typeof window;function v(t){return Error("FastAverageColor: "+t)}function C(t,e){e||console.error(t)}var P=function(){function t(){this.canvas=null,this.ctx=null}return t.prototype.getColorAsync=function(t,e){if(!t)return Promise.reject(v("call .getColorAsync() without resource"));if("string"==typeof t){if("undefined"==typeof Image)return Promise.reject(v("resource as string is not supported in this environment"));var s=new Image;return s.crossOrigin=e&&e.crossOrigin||"",s.src=t,this.bindImageEvents(s,e)}if(f(t)&&!t.complete)return this.bindImageEvents(t,e);var i=this.getColor(t,e);
2return i.error?Promise.reject(i.error):Promise.resolve(i)},t.prototype.getColor=function(t,e){var s=c(e=e||{});if(!t)return C(a=v("call .getColor() without resource"),e.silent),this.prepareResult(s,a);var i=function(t,e){var s,i=p(e,"left",0),r=p(e,"top",0),a=p(e,"width",t.width),o=p(e,"height",t.height),n=a,d=o;return"precision"===e.mode||(a>o?(s=a/o,n=100,d=Math.round(n/s)):(s=o/a,d=100,n=Math.round(d/s)),(n>a||d>o||n<10||d<10)&&(n=a,d=o)),{srcLeft:i,srcTop:r,srcWidth:a,srcHeight:o,destWidth:n,destHeight:d}}(function(t){if(f(t)){var e=t.naturalWidth,s=t.naturalHeight;return t.naturalWidth||-1===t.src.search(/\.svg(\?|$)/i)||(e=s=100),{width:e,height:s}}return function(t){return"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement}(t)?{width:t.videoWidth,height:t.videoHeight}:y(t)?{width:t.codedWidth,height:t.codedHeight}:{width:t.width,height:t.height}}(t),e);if(!(i.srcWidth&&i.srcHeight&&i.destWidth&&i.destHeight))return C(a=v('incorrect sizes for resource "'.concat(g(t),'"')),e.silent),this.prepareResult(s,a);if(!this.canvas&&(this.canvas=b?m?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return C(a=v("OffscreenCanvas is not supported in this browser"),e.silent),this.prepareResult(s,a);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return C(a=v("Canvas Context 2D is not supported in this browser"),e.silent),this.prepareResult(s);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=i.destWidth,this.canvas.height=i.destHeight;try{this.ctx.clearRect(0,0,i.destWidth,i.destHeight),this.ctx.drawImage(t,i.srcLeft,i.srcTop,i.srcWidth,i.srcHeight,0,0,i.destWidth,i.destHeight);var r=this.ctx.getImageData(0,0,i.destWidth,i.destHeight).data;return this.prepareResult(this.getColorFromArray4(r,e))}catch(i){var a;return C(a=v("security error (CORS) for resource ".concat(g(t),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),e.silent),e.silent||console.error(i),this.prepareResult(s,a)}},t.prototype.getColorFromArray4=function(t,e){e=e||{};var s=t.length,i=c(e);if(s<4)return i;var r,a,o,n=s-s%4,d=4*(e.step||1);switch(e.algorithm||"sqrt"){case"simple":r=u;break;case"sqrt":r=h;break;case"dominant":r=l;break;default:throw v("".concat(e.algorithm," is unknown algorithm"))}return r(t,n,{defaultColor:i,ignoredColor:(a=e.ignoredColor,a?(o=a,Array.isArray(o[0])?a:[a]):[]),step:d,dominantDivider:e.dominantDivider})},t.prototype.prepareResult=function(t,e){var s,i=t.slice(0,3),r=[t[0],t[1],t[2],t[3]/255],o=(299*(s=t)[0]+587*s[1]+114*s[2])/1e3<128;return{value:[t[0],t[1],t[2],t[3]],rgb:"rgb("+i.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:a(i),hexa:a(t),isDark:o,isLight:!o,error:e}},t.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},t.prototype.bindImageEvents=function(t,e){var s=this;return new Promise(function(i,r){var a=function(){d();var a=s.getColor(t,e);a.error?r(a.error):i(a)},o=function(){d(),r(v('Error loading image "'.concat(t.src,'"')))},n=function(){d(),r(v('Image "'.concat(t.src,'" loading aborted')))},d=function(){t.removeEventListener("load",a),t.removeEventListener("error",o),t.removeEventListener("abort",n)};t.addEventListener("load",a),t.addEventListener("error",o),t.addEventListener("abort",n)})},t}();s.dn(w);const I="render.badges";function w(t){return class extends t{prefs(){return{activeColorName:"",activeColorNumber:"",...super.prefs()}}init(){super.init(),this.setColorName(this.getModifiedColorName()),this.detectColorTheme()}getModifiedColorName(t=null,e=null){if(t){const e=t.data("name"),s=t.data("color-number");return s?e+" "+s:e}const s=e||this.prefs().activeColorName;return this.prefs().activeColorNumber?s+" "+this.prefs().activeColorNumber:s}showAllColors(){this.ref("showAllColors").hide(),this.ref("showLessColors").show(),this.ref("variationEventContainer")?.removeClass("m-collapse")}showLessColors(){this.ref("showAllColors").show(),this.ref("showLessColors").hide(),this.ref("variationEventContainer")?.addClass("m-collapse")}selectVariation(t){super.selectVariation(t),"pdpSeeSpecifications"===t.data("gtmType")&&(0,i.aH)(t),this.eventBus().emit("set.quantity.value",0,!0),this.setPref("activeColorName",t.data("name")),this.setPref("activeColorNumber",t.data("color-number")),this.setColorName(this.getModifiedColorName(t))}
2detectColorTheme(){const t=document.querySelectorAll(".b-variation_swatch-value"),e=new P;t.forEach(t=>{if(!(t instanceof HTMLElement))return;const s=t.querySelector("img");s&&(s.crossOrigin="Anonymous",e.getColorAsync(s).then(e=>{t.setAttribute("data-theme",e.isDark?"dark":"light")}).catch(()=>{}))})}initMouseEvents(){const t=this.ref("variationEventContainer").get(),e=t&&t.children;if(e){const t=[].slice.call(e),s=this.mouseoverBadgeHandler.bind(this),i=this.mouseleaveBadgeHandler.bind(this);t.forEach(t=>{t.addEventListener("mouseover",s),t.addEventListener("mouseleave",i)})}}mouseoverBadgeHandler(t){if("true"===t.target.getAttribute("data-is-badge-target")){const e=t.currentTarget.getAttribute("data-badges");if(e)try{const t=JSON.parse(e)||[];this.eventBus().emit(I,t)}catch(t){}else this.eventBus().emit(I,[])}}mouseleaveBadgeHandler(){this.eventBus().emit(I)}setColorName(t){this.ref("colorName")?.setText(t)}mouseoverColorHandler(t){t?.get(0)?.getAttribute("data-name"),this.setColorName(this.getModifiedColorName(t))}mouseleaveColorHandler(){this.setColorName(this.getModifiedColorName(null,this.prefs().activeColorName))}}}},9745(t,e,s){function i(t){return class extends t{openVideo(t){const e=String(t.data("video-url")||t.attr("data-video-url")||"");e&&this.eventBus().emit("video.showModal",{videoUrl:e})}}}s.d(e,{default:()=>i}),s.dn(i)},3612(t,e,s){function i(t){return class extends t{prefs(){return{...super.prefs(),refVideoContainer:"videoContainer",refContainer:"container",refDialog:"dialog",refContent:"content",classesExtra:"b-video_modal",disableRendering:!0,clickOutSide:!0,closeByEscape:!0}}init(){super.init(),this.eventBus().on("video.showModal","handleVideoOpenEvent")}handleVideoOpenEvent(t){t&&t.videoUrl&&this.handleVideoOpen(t.videoUrl)}handleVideoOpen(t){if(!t)return;const e=this.ref(this.prefs().refContent).get(0),s=e?.querySelector("video"),i=s?.querySelector("source");s&&i&&(i.src=t,s.load(),s.addEventListener("loadeddata",()=>{s.play().catch(()=>{})},{once:!0}));const r=this.ref(this.prefs().refContainer);r.show(),r.addClass(this.prefs().classesShow),this.showModal()}closeModal(){const t=this.ref(this.prefs().refContent).get(0),e=t?.querySelector("video");e&&e.pause(),super.closeModal()}}}s.d(e,{default:()=>i}),s.dn(i)},2083(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(9649);function r(t){return class extends t{trackViewedItem(t=""){if(!t||!this.isTrackingAllowed())return;let e=[...new Set(this.getViewedItems((0,i.R)("recentlyViewed")))];e=e.filter(e=>e!==t.toString()),e.unshift(t.toString()),e.length>12&&(e=e.slice(0,12)),this.saveViewedItems(e)}}}},816(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(4053);function r(t){return class extends t{init(){this.eventBus().on("product.updated","onProductUpdated"),this.eventBus().on("product.addedTocart.with.error","showError")}onProductUpdated(t){(0,i.Ey)((0,i.eH)(this.ref("self").get()),t)&&this.hide()}showError(t){t.isSampleResponse&&(this.show(),this.render("template",t,this.ref("container")))}}}},6879(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(530);function r(t){return class extends t{validateFlyOutFields(){return this.getById("sideMark",t=>t.validate())}addToCart(t){if(this.prefs().processingRequest)return Promise.resolve(null);if(!this.validateFlyOutFields())return Promise.resolve(null);if(!this.prefs().readyToOrder)return this.showCartMessage(this.prefs().textSelectOptions,!0),Promise.resolve(null);if(this.stock&&this.stock<this.prefs().selectedQuantity)return this.showCartMessage(this.prefs().textStockLimit,!0),Promise.resolve(null);const e=this.getSelectedProductOptions();if(!this.validateProductOptions(e))return Promise.resolve(null);this.setPref("processingRequest",!0),t.startProcess(),this.showProgressBar();const s=t.prefs();let r="";return this.getById("sideMark",t=>{r=t.getValue()}),(0,i.zP)(s.addToCartUrl,this.getAddToCartPayload(t,{selectedOptions:e,extras:{sideMark:r}})).then(e=>(this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),Promise.resolve(this.postAddProduct(e)).then(t=>{e.error||(t||this.eventBus().emit("flyout.product.added.to.cart",e,this),this.eventBus().emit("minicart.updated",e.cart,this)),this.getById("sideMark",t=>{t.setValue("")})}),e)).catch(()=>{this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.showCartMessage(this.prefs().textNetworkError,!0)})}updateProduct(t){const e=this.prefs().productOptions[0],s=this.getSelectedProductOptions(),r=this.validateProductOptions(s);let a="",o=!1;return this.getById("sideMark",t=>{a=t.getValue(),o=t.validate()}),r&&o?(t.startProcess(),(0,i.zP)(t.ref("self").attr("data-update-url"),{pid:this.prefs().currentProductId||t.prefs().pid,quantity:this.prefs().selectedQuantity||t.selectedQuantity,sideMark:a,uuid:t.ref("self").attr("data-uuid"),...this.getAdditionalProductData(e)}).then(e=>(t.stopProcess(),this.afterUpdateProduct(e),e)).finally(()=>
2{this.emit("updated"),t.stopProcess()})):Promise.resolve(null)}}}},7886(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(4053);function r(t){return class extends t{prefs(){return{...super.prefs()}}init(){super.init(),this.eventBus().on("product.updated","updateFlyOut")}inputChanged(){this.getById(this.prefs().addToCartMsg,t=>{t.hide()})}updateFlyOut(t){const{product:e}=t||{};(0,i.Ey)((0,i.eH)(this.ref("self").get()),t)&&e&&(e.variationAttributes&&e.variationAttributes.length&&e.variationAttributes.forEach(t=>{this.items&&this.items.length&&!this.items.some(e=>e.config.id==="attr-"+t.attributeId)||(t.values=t.values.map(t=>({...t,selected:t.selected,disabled:!t.selectable,selectable:t.selectable?"selectable":""})),this.getById("attr-"+t.attributeId,e=>{e.render("template",{attr:t},e.ref("container"))}))}),this.setPref("currentProductId",e.id))}}}},990(t,e,s){function i(t){return class extends t{prefs(){return{imperial:!1,metric:!1,...super.prefs()}}showImperialColumn(){this.config.imperial?this.show():this.hide()}showMetricColumn(){this.config.metric?this.show():this.hide()}}}s.d(e,{default:()=>i}),s.dn(i)},9089(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(530);function r(t){return class extends t{prefs(){return{pid:"",processingRequest:!1,textNetworkError:"Network Error",addToCartBtn:"addToCart",classesBusy:"m-busy",showMinicartOnProductAdd:!1,showMessageOnProductAdd:!0,showAlertOnProductAdd:!0,backInStockBtn:"disclosureButton",backInStockForm:"disclosureContent",backInStockSubscriptionEnable:!1,zeroWidthSpaceSymbol:"​",...super.prefs()}}init(){super.init(),this.showBackInStockButton(),this.has(this.prefs().addToCartBtn,t=>{const e=t.data("stock");e&&(this.stock=e)}),this.spacesLength=0}toggleActionButtons(t,e=!1){const s=this.ref(this.prefs().backInStockBtn);e?(t.hide(),s.show()):(t.show(),s.hide())}showCartMessage(t,e=!1){this.getById(this.prefs().addToCartMsg,s=>{void 0===this.spacesLength&&(this.spacesLength=0),t=t.concat(Array(++this.spacesLength).join(this.prefs().zeroWidthSpaceSymbol)),s.render("template",{msg:t,error:e},s.ref("container")).then(()=>s.show())})}showBackInStockButton(){this.prefs().backInStockSubscriptionEnable&&this.getById("addToCart",t=>{t.hide(),this.ref(this.prefs().backInStockBtn).show()})}postAddProduct(t){if(!t.error&&t.cart){this.emit("productadded");const e=t.cart;if(e.showMinicart=this.prefs().showMinicartOnProductAdd,this.eventBus().emit("product.added.to.cart",e,this),this.prefs().showAlertOnProductAdd){const t=this.prefs().accessibilityAlerts.addedtocart;this.eventBus().emit("alert.show",{accessibilityAlert:t})}}(t.error||this.prefs().showMessageOnProductAdd)&&(this.eventBus().emit("product.addedTocart.with.error",t),this.showCartMessage(t.message,t.error))}addToCart(t){if(this.prefs().processingRequest)return Promise.resolve(null);if(!this.prefs().readyToOrder)return this.showCartMessage(this.prefs().textSelectOptions,!0),Promise.resolve(null);if(this.stock&&this.stock<this.prefs().selectedQuantity)return this.showCartMessage(this.prefs().textStockLimit,!0),Promise.resolve(null);const e=this.getSelectedProductOptions();if(!this.validateProductOptions(e))return Promise.resolve(null);this.setPref("processingRequest",!0),t.startProcess(),this.showProgressBar();const s=t.prefs();return(0,i.zP)(s.addToCartUrl,{pid:this.prefs().currentProductId||s.pid,quantity:this.prefs().selectedQuantity||s.selectedQuantity,options:JSON.stringify(e),childProducts:this.prepareChildProducts(this.prefs().bundledProducts)}).then(e=>(this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.postAddProduct(e),e)).catch(()=>{this.setPref("processingRequest",!1),t.stopProcess(),this.hideProgressBar(),this.showCartMessage(this.prefs().textNetworkError,!0)})}showProgressBar(){this.ref("self").addClass(this.prefs().classesBusy)}hideProgressBar(){this.ref("self").removeClass(this.prefs().classesBusy)}updateProductView(t){super.updateProductView(t),this.renderAddToCart(t)}renderAddToCart(t){this.getById("addToCart",e=>{!t.available&&t.availability.isOutOfStock?(e.setPref("isOutOfStock",!0),e.setText(this.prefs().outOfStockLabel),e.disable(),t.backInStockSubscription.isEnabled&&this.toggleActionButtons(e,!0)):t.availability.isReachedLimit?(this.getById(this.prefs().addToCartMsg,e=>{const s=t.availability.messages[0];e.render("template",{msg:s,error:!0},e.ref("container")).then(()=>e.show())}),e.setPref("isOutOfStock",!0),e.setText(this.prefs()[this.prefs().update?"updateLabel":"addToCartLabel"]),e.disable(),this.toggleActionButtons(e)):(e.setPref("isOutOfStock",!1),e.setText(this.prefs()[this.prefs().update?"updateLabel":"addToCartLabel"]),e.enable(),this.toggleActionButtons(e))})}updateBackInStockState(t,e){this.ref("disclosureContent").toggleClass("m-success",e),this.ref("contentBlock").toggle(t),this.ref("successBlock").toggle(e)}handleBackInStockFormSubmit(){this.updateBackInStockState(!1,!0)}prepareChildProducts(t){let e=t;return e=e.map(t=>({pid:t.id,quantity:t.selectedQuantity})),JSON.stringify(e)}}}},3528(t,e,s){s.d(e,{default:()=>o}),s.dn(o);
2var i=s(530),r=s(8520),a=s(5315);function o(t){return class extends t{popupShow=!1;prefs(){return{addToCartMsg:"addToCartMsg",backInStock:"backInStock",disableHistory:!1,descriptions:"descriptions",currentProductId:"",readyToOrder:!1,selectedQuantity:0,textSelectOptions:"",textStockLimit:"",outOfStockLabel:"",updateLabel:"",update:!1,accessibilityAlerts:{quantitychanged:"",optionselected:"",variationselected:""},productOptions:[],bundledProducts:[],...super.prefs()}}init(){super.init(),this.changeAttributeRequests=[],this.eventBus().on("check.inventory.popup.show","handleCheckInventoryPopupShow")}handleCheckInventoryPopupShow(){this.popupShow=!0}isCustomOptionValid(t){}getCustomOptionValue(t){}updateProduct(t){const e=this.prefs().productOptions[0],s=this.getSelectedProductOptions();return this.validateProductOptions(s)?(0,i.zP)(t.ref("self").attr("data-update-url"),{pid:this.prefs().currentProductId||t.prefs().pid,quantity:this.prefs().selectedQuantity||t.ref("self").attr("data-selected-quantity")||1,uuid:t.ref("self").attr("data-uuid"),...this.getAdditionalProductData(e)}).then(t=>(this.afterUpdateProduct(t),t)).finally(()=>{this.emit("updated")}):Promise.resolve(null)}afterUpdateProduct(t){this.eventBus().emit("product.updated",t)}updateProductView(t){this.currentGtmInfo=t.gtmInfo,this.uuid=t.uuid,this.stock=t.availability&&t.availability.stock?t.availability.stock:null,this.setPref("selectedQuantity",t.selectedQuantity),this.setPref("currentProductId",t.id),this.setPref("readyToOrder",t.readyToOrder),this.setGtmInfo(t),this.getById(this.prefs().addToCartMsg,t=>{t.hide()}),this.getById(this.prefs().backInStock,e=>{e.updateProductId(t.id)}),this.renderVariationAttributes(t),this.renderProductOptions(t),this.renderQuantities(t),this.renderPrice(t),this.renderAvailability(t),this.renderImages(t),this.renderName(t),this.renderPromotions(t),this.renderProductDescriptions(t),this.updateSocialLinks(t),this.updateViewFullProductURL(t),this.updateRatings(t),this.updateWishlistButtonProductId(t)}updateRatings(t){const e=[1,2,3,4,5].map((e,s)=>{const i={position:s>0?20*s:0};return t.rating>=e?i.isFull=!0:t.rating%1>0&&Math.ceil(t.rating)>=e?i.isHalf=!0:i.isEmpty=!0,i});let s;return this.has("productRatings",i=>{const r=i.data("addProductLinkToRatingsLink")?t.selectedProductUrl:"";s=this.render("productRatingsPDPTemplate",{product:t,ratings:e,link:r},i)}),s||Promise.resolve(null)}updateWishlistButtonProductId(t){this.getById("addToWishlist",e=>{e.setPref("productId",t.id)})}updateViewFullProductURL(t){t.selectedProductUrl&&this.has("viewFullProductURL",e=>{e.attr("href",t.selectedProductUrl)})}setGtmInfo(t){this.currentGtmInfo=t.gtmInfo,this.currentGtmInfo&&t.selectedQuantity&&(this.currentGtmInfo.quantity=t.selectedQuantity)}renderProductOptions(t){const e="CUSTOM_TEXT",s=t.options;(s||s.length)&&s.forEach(t=>{const i=t.id;this.getById("option-"+i,i=>{let r="";t.selectedValueId===e&&i.getById("customOptionText",t=>{r=t.ref("field").val()}),i.render("template",{option:t},i.ref("container")).then(()=>{this.setPref("productOptions",s),t.selectedValueId===e&&i.getById("customOptionText",t=>{t.ref("field").val(r)})})})})}renderVariationAttributes(t){t.variationAttributes&&t.variationAttributes.length&&t.variationAttributes.forEach(t=>{t.values=t.values.map(t=>({...t,selected:t.selected,disabled:!t.selectable,selectable:t.selectable?"selectable":""})),this.getById("attr-"+t.attributeId,e=>{e.render("template",{attr:t},e.ref("container"))})})}onProductLinkClick(t){this.eventBus().emit("detail.product.link.click",t)}renderQuantities(t){const e=t.availability,s=t.quantities;s&&e&&this.getById("quantity",t=>{t.render("template",{attr:{currentQty:s.currentValue,max:s.max,min:s.min,step:s.step},isOutOfStock:e&&e.isOutOfStock||!1},t.ref("container")).then(function(){t.update(),t.setPref("attrUrl",s.actionUrl)})})}renderName(t){this.getById("productName",e=>{e.render("template",{product:t},e.ref("container"))})}renderPromotions(t){this.getById("promotions",e=>{e.render("template",{promotions:t.promotions||[]},e.ref("container"))})}renderPrice(t){t.price&&t.price.html&&this.getById("priceBlock",e=>{e.render("template",{},void 0,t.price.html)})}renderAvailability(t){let e="",s="";t.availability&&t.availability.messages&&(t.readyToOrder||t.isInaccessibleVariant)&&(e=t.availability.messages.join(""),s=t.availability.class),t.availability.isReachedLimit&&(e=t.availability.inStockMsg.join("")),this.has("productAvailabilityMsg",t=>{t.hide()}),this.getById("availability",t=>{t.render("template",{message:e,class:s},t.ref("container"))})}renderImages(t){this.getById("productImages",e=>{e.renderImages(t)})}renderProductDescriptions(t){this.getById(this.prefs().descriptions,e=>{e.render("template",t,e.ref("container")).then(()=>e.reinit())})}
2updateSocialLinks(t){Object.keys(t.socialLinks).forEach(e=>{this.has("social-link-"+e,s=>{s.attr("href",t.socialLinks[e])})})}changeAttribute(t){this.changeAttributeID=t.id;const e=t.getSelectedVariations();if(!e||e.data("attrIsSelected"))return Promise.resolve(null);this.popupShow=!1;const s=(0,i.DJ)(e.data("attrUrl"),void 0,"GET",!0);return this.changeAttributeRequests.push(s),s.promise.then(t=>{if(!this.popupShow)return this.afterChangeAttribute(t),t}).catch(t=>{"AbortError"!==t.name&&(0,r._K)(t)}).finally(()=>{const t=this.changeAttributeRequests.indexOf(s);t>-1&&this.changeAttributeRequests.splice(t,1)})}afterChangeAttribute(t){t&&t.product&&(this.prefs().disableHistory||this.updateHistoryState(t.product),this.updateProductView(t.product),this.triggerChangeAttributeEvent(t))}dismissQty(){this.changeAttributeRequests.forEach(t=>{t.abortController.abort()}),this.changeAttributeRequests=[]}triggerChangeAttributeEvent(t){if(!this.changeAttributeID)return;let e="";0===this.changeAttributeID.indexOf("quantity")?(e=this.prefs().accessibilityAlerts.quantitychanged,this.showAlert(e,t)):0===this.changeAttributeID.indexOf("attr-")?(e=this.prefs().accessibilityAlerts.variationselected,this.showAlert(e,t)):0===this.changeAttributeID.indexOf("option-")&&(e=this.prefs().accessibilityAlerts.optionselected,this.productOptionsSelect||(this.productOptionsSelect=(0,a.s)(()=>{this.showAlert(e,t)},2e3,!1,!0)),this.productOptionsSelect({}))}showAlert(t,e){this.eventBus().emit("alert.show",{accessibilityAlert:t}),this.changeAttributeID=void 0,this.afterUpdateProduct(e)}updateHistoryState(t){window.history.replaceState(void 0,"",t.selectedProductUrl)}validateProductOptions(t){return!1}getSelectedProductOptions(){return[]}getAdditionalProductData(t){return{}}}}},7747(t,e,s){s.d(e,{default:()=>o}),s.dn(o);var i=s(8520);const r=Object.freeze({SPACE:32,ENTER:13}),a="zoom";function o(t){return class extends t{prefs(){return{accessibilityAlerts:{},thumbnailsPerFrame:4,thumbnailsZoomClass:"m-zoomed-in",classesGlobalDialog:"m-has_dialog",zoomLoop:!1,zoomClickToCloseNonZoomable:!1,zoomCloseElClasses:"",closeOnScroll:!1,predefinedHeight:1773,predefinedWidth:1333,barsSizeBottom:"auto",barsSizeTop:24,showHideOpacity:!0,...super.prefs()}}init(){super.init(),this.onDestroy(()=>{this.gallery&&(this.gallery.close(),this.gallery.destroy(),this.gallery=void 0)})}renderImages(t){return t.images&&t.images.large?(t.images.large.forEach(e=>{const s=t.zoomImages.zoom&&t.zoomImages.zoom[e.index];e.zoomUrl=s&&s.url}),this.render("galleryTemplate",t,this.ref("carouselInner")).then(()=>{this.update()})):Promise.resolve(null)}onImageCarouselPageChanged(t,e){this.getById("imagesThumbnails",t=>{this.imageMode!==a&&t.markCurrentPage(e).scrollIntoView()})}onThumbnailCarouselPageClicked(t,e){this.getById("imagesCarousel",t=>t.scrollToPage(e)),this.imageMode===a&&this.gallery&&this.gallery.goTo(e),this.getById("imagesThumbnails",t=>{t.markCurrentPage(e).scrollIntoView()})}update(){this.getById("imagesThumbnails",t=>t.update().scrollToPage(0).markCurrentPage(0)),this.getById("imagesCarousel",t=>t.update().scrollToPage(0))}getOriginalImageSize(){return new Promise(t=>{const e=this.getById("imagesCarousel",t=>t),s={originalHeight:this.prefs().predefinedHeight,originalWidth:this.prefs().predefinedWidth};if(e){const e=this.getCarouselImages()[0];if(e.dataset.originalSrc){const i=new Image;i.addEventListener("load",()=>t({originalHeight:i.height,originalWidth:i.width})),i.addEventListener("error",()=>t(s)),i.src=e.dataset.originalSrc}else t(s)}else t(s)})}addFocusTrap(){this.backFocusElement=document.activeElement instanceof HTMLElement?document.activeElement:document.body,this.addFocusTraps(),this.afterShowModal()}initAndShowZoom(t,e,{originalWidth:s,originalHeight:i}){const r=document.querySelectorAll(".pswp")[0],o=this.getById("imagesCarousel",t=>t),n=this.getById("imagesThumbnails",t=>t);if(!(o&&r instanceof HTMLElement))return;r.setAttribute("data-tau","zoom_dialog");const d=this.getCarouselImages().map(t=>({src:t.dataset.originalSrc,w:s||t.naturalWidth,h:i||t.naturalHeight})),l=this.prefs(),u={index:o.getCurrentPageIndex(),barsSize:{top:l.barsSizeTop,bottom:l.barsSizeBottom},loop:l.zoomLoop,history:!1,clickToCloseNonZoomable:l.zoomClickToCloseNonZoomable,closeElClasses:l.zoomCloseElClasses.split(","),closeOnScroll:l.closeOnScroll,showHideOpacity:l.showHideOpacity},h=new t(r,e,d,u);h.listen("imageLoadComplete",()=>{const t=this.prefs().accessibilityAlerts.dialogContentLoaded;this.eventBus().emit("alert.show",{accessibilityAlert:t}),this.toggleSpinner(!1)}),h.listen("close",()=>this.onZoomClosed()),h.listen("doubleTap",()=>{const t=1===h.getZoomLevel();r.classList.toggle("pswp--zoomed-in",!t)}),h.listen("beforeChange",()=>{const t=h.getCurrentIndex();o.scrollToPage(t),n&&n.markCurrentPage(t).scrollIntoView()}
2),h.init(),this.gallery=h,this.imageMode=a,n&&this.toggleZoomState(!0),this.addGlobalDialogClass(),n&&(n.updateCarouselMetric(),n.updateCarouselState())}toggleSpinner(t){this.ref("zoomDialog").removeClass(this.prefs().classesLoading),this.longWaitingTimeout&&this.longWaitingTimeout(),t&&(this.longWaitingTimeout=(0,i.wR)(()=>{this.ref("zoomDialog").addClass(this.prefs().classesLoading)},1e3))}loadPhotoswipeDependencies(){return Promise.all([s.e(391).then(()=>s.t(5388,23)),s.e(391).then(()=>s.t(7855,23)),this.getOriginalImageSize()])}onImageCarouselPageClicked(){this.zoom()}openZoom(){this.zoom()}zoom(){this.ref("zoomDialog").attr("aria-hidden","false"),this.toggleSpinner(!0),this.addFocusTrap(),this.loadPhotoswipeDependencies().then(([t,e,s])=>{this.initAndShowZoom(t.default,e.default,s)})}closeZoom(){if(this.gallery){this.gallery.close();const t=this.getById("imagesThumbnails",t=>t);t&&(t.updateCarouselMetric(),t.updateCarouselState())}const t=document.querySelectorAll(".pswp")[0];t?.removeAttribute("data-tau")}closeZoomKeydown(t,e){e.keyCode!==r.ENTER&&e.keyCode!==r.SPACE||(e.stopPropagation(),e.preventDefault(),this.closeZoom())}onZoomClosed(){this.toggleZoomState(!1),this.imageMode="carousel",this.removeGlobalDialogClass(),this.backFocusElement&&(this.backFocusElement.focus(),this.backFocusElement=void 0)}addGlobalDialogClass(){const t=this.ref("html");t.hasClass(this.prefs().classesGlobalDialog)||t.addClass(this.prefs().classesGlobalDialog)}removeGlobalDialogClass(){this.ref("html").removeClass(this.prefs().classesGlobalDialog)}handleKeydown(t,e){e.keyCode!==r.ENTER&&e.keyCode!==r.SPACE||(e.preventDefault(),e.stopPropagation(),this.zoom())}getCarouselImages(){const t=this.getById("imagesCarousel",t=>t),e=t.ref(t.prefs().elemCarouselTrack).get();return[].slice.call(e?.querySelectorAll("img"))||[]}toggleZoomState(t){this.getById("imagesThumbnails",t=>t).ref("self").toggleClass(this.prefs().thumbnailsZoomClass,t)}}}},424(t,e,s){function i(t){return class extends t{getInputValueByID(t){let e="";return this.getById(t,t=>{e=t.getValue()}),e}validateInputByID(t){let e=!1;return this.getById(t,t=>{e=t.validate()}),e}}}s.d(e,{default:()=>i}),s.dn(i)},3344(t,e,s){s.d(e,{default:()=>r}),s.dn(r);var i=s(7819);function r(t){return class extends t{selectedVariation=null;selectVariation(t){this.selectedVariation=t,this.emit("change",this)}getSelectedVariations(){return this.selectedVariation?this.selectedVariation:new i.s([])}}}},3594(t,e,s){s.d(e,{default:()=>r}),s.dn(r);const i=Object.freeze({SPACE:32,ENTER:13});function r(t){return class extends t{prefs(){return{videoThumbnailActiveClass:"m-current",...super.prefs()}}init(){super.init()}hideVideo(){this.ref("self").removeClass(this.prefs().videoThumbnailActiveClass)}showVideo(t){t.addClass(this.prefs().videoThumbnailActiveClass),this.emit("showvideo")}handleKeydown(t,e){e&&(e.keyCode!==i.ENTER&&e.keyCode!==i.SPACE||(e.preventDefault(),e.stopPropagation(),this.showVideo(t)))}}}},3457(t,e,s){function i(t){return class extends t{showVideoElement(){this.getById("imagesCarousel",t=>{const e=t.ref("elemVideoWrapper").data("src");t.ref("elemVideo").attr("src",e),t.ref("elemVideoWrapper").show().focus()}),this.getById("imagesThumbnails",t=>{t.markCurrentPage(-1)})}hideVideoElement(){this.getById("videoThumbnail",t=>{t.hideVideo()}),this.getById("imagesCarousel",t=>{t.ref("elemVideoWrapper").hide(),t.ref("elemVideo").attr("src","")})}onThumbnailCarouselPageClicked(t,e){super.onThumbnailCarouselPageClicked(t,e),this.hideVideoElement()}onImageCarouselPageChanged(t,e){super.onImageCarouselPageChanged(t,e),this.hideVideoElement()}}}s.d(e,{default:()=>i}),s.dn(i)},9235(t,e,s){s.d(e,{default:()=>a}),s.dn(a);var i=s(3230);const r="recentlyViewed";function a(t){return class extends t{prefs(){return{recentlyViewedTrackingAllowed:!1,masterPid:"",...super.prefs()}}init(){super.init(),this.trackViewedItem(this.prefs().masterPid)}isTrackingAllowed(){return 1!==Number((0,i.R)("dw_dnt"))&&this.prefs().recentlyViewedTrackingAllowed}saveViewedItems(t=[]){(0,i.T)(r,t.join("|"),0,!0)}getViewedItems(t=""){return t?t.split("|"):[]}trackViewedItem(t=""){if(!t||!this.isTrackingAllowed())return;let e=this.getViewedItems((0,i.R)(r));e=e.filter(e=>e!==t),e.unshift(t),e.length>12&&(e=e.slice(0,12)),this.saveViewedItems(e)}}}}}]);

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.