1"use strict";(globalThis.webpackChunksfra_boilerplate||=[]).push([[704],{826(t,e,r){function s(t){return class extends t{prefs(){return{addToCartUrl:"",addedToCartAlert:"",isSamplesCart:!1,isMaterialsCart:!1,isStandardProductTile:!1,textNetworkError:"",backingId:"",productType:"none",productId:"",materialProductId:"",...super.prefs()}}handleClick(){this.eventBus().emit("cart.addToOrder",this)}}}r.d(e,{default:()=>s}),r.dn(s)},8715(t,e,r){r.d(e,{default:()=>a}),r.dn(a);var s=r(530),i=r(6795),o=r(86);function a(t){return class extends t{recommendationsPopupOpened=!1;prefs(){return{isSamplesCart:!1,isMaterialsCart:!1,classesActivated:"m-activated",pid:"",productOptions:[],...super.prefs()}}init(){super.init(),this.eventBus().on("cart.addToOrder","addToOrderClick")}removeProduct(t){const e=this.getConstructor("InputStepper"),r=t.data("removeAction")||t.data("action"),i=t.data("pid"),o=t.data("uuid"),a=`quantityStepper-${o}`,n=t.data("materialid"),d=t.data("isMaterial"),u=t.data("isSample");let c,h,l=1;if(t instanceof e)l=parseInt(t.getValue(),10),c=t.prefs().lineItemMinOrderQuantity;else{const t=this.ref(a);l=parseInt(String(t.data("quantity")),10)}this.removeButton=t,(0,s.zP)(window.sfccData.wishlistActionUrls.wishlistStatusForProduct,{pid:u?n:i},"GET").then(t=>{if(t.error)throw new Error(t.errorMsg);h=t.wishlistStatus}).catch(t=>{console.log(t)}).finally(()=>{this.getById("confirmDialog",e=>{e.showModal({productName:t.data("name"),isSampleBag:t.data("isSampleBag"),productId:i,attributes:{"data-tau":this.prefs().tauAttrRemoveProductConfirmationPopUp,url:r,pid:i,materialId:n,isMaterial:d,isSample:u,uuid:o,wishlistStatus:h,currentValue:l,minOrderQuantity:c}})})})}editProduct(t){this.showProgressBar();const e=t.data("uuid"),r=t.data("productType");(0,s.uf)(t.data("href"),{uuid:e,productType:r}).then(t=>{this.getById("editProductModalContainer",e=>{e.ref("container").empty(),e.render("template",{body:t},e.ref("container")).then(()=>{e.getById("orderProductFlyOut",t=>{t.showModal({}),t.ref("dialog").addClass(this.prefs().classesActivated)})})})}).catch(t=>{this.renderCartWithItemLevelActionError(e,t.message)}).finally(()=>{this.hideProgressBar()})}seeInventoryDetails(t){this.showProgressBar();const e=t.data("pid"),r=t.data("uuid");(0,s.uf)(t.data("href"),{pid:e}).then(t=>{this.getById("editProductModalContainer",e=>{e.ref("container").empty(),e.render("template",{body:t},e.ref("container")).then(()=>{e.getById("checkInventoryFlyOut",t=>{t.showModal({}),t.ref("dialog").addClass(this.prefs().classesActivated)})})})}).catch(t=>{this.renderCartWithItemLevelActionError(r,t.message)}).finally(()=>{this.hideProgressBar()})}addToOrderClick(t){t.startProcess(),this.showProgressBar();const e=t.prefs().productId,r=t.prefs().materialProductId;if(this.getById("recommendedAccessoriesPopup",t=>{t.shown&&t.closeModal()}),t.prefs().isSamplesCart){const i=t.prefs();(0,s.zP)(i.addToCartUrl,{pid:e,materialProductId:r,materialBackingId:i.backingId}).then(e=>{this.hideProgressBar(),this.getById("searchInCart",t=>t.handleCancel());const r=e.cart;return e.error?this.showError(this,String(e.message)):r&&(this.eventBus().emit("product.added.to.cart",r,t),this.renderCart(r).then(()=>{this.eventBus().emit("alert.show",{accessibilityAlert:i.addedToCartAlert,accessibilityAlertPause:!0}),this.eventBus().emit("cart.updated",r)})),e}).catch(()=>{this.setPref("processingRequest",!1),this.hideProgressBar(),this.showError(this,i.textNetworkError)}).finally(()=>{t.stopProcess()})}else(t.prefs().isMaterialsCart||t.prefs().isStandardProductTile)&&(0,s.uf)(t.data("href"),{productId:e}).then(t=>{this.getById("editProductModalContainer",e=>{e.ref("container").empty(),e.render("template",{body:t},e.ref("container")).then(()=>{e.getById("orderProductFlyOut",t=>{t.showModal({}),t.ref("dialog").addClass(this.prefs().classesActivated)})})})}).finally(()=>{this.hideProgressBar(),t.stopProcess()})}confirmationRemoveCallback(t){this.renderCart(t)}confirmedRemoveProduct(t,e=!1){const r=t.attributes;if(!r)return Promise.resolve({error:!0});const i=r.url,o=r.pid,a=r.uuid;this.eventBus().emit("cart.remove.product",this),e||this.showProgressBar();let n=(0,s.zP)(i,{pid:o,uuid:a},"POST").then(t=>{if(t.error)throw Error(t.error);return this.confirmationRemoveCallback(t.basket),t});return e||(n=n.catch(t=>(this.renderCartWithItemLevelActionError(a,t.message),t)).finally(()=>{this.hideProgressBar(),this.accessibilityAlert(this.prefs().accessibilityAlerts.productremoved)})),n}cancelProductRemoving(t){const e=t&&t.attributes;if(e&&(0===e.currentValue||e.currentValue<e.minOrderQuantity)){const t=e.uuid,r=e.minOrderQuantity,s=`quantityStepper-${t}`;this.getById(s,t=>{t.setInputValue(t.filterInput(r))})}}
1openRecommendedAccessoriesPopup(){if((0,o.TY)()&&!this.recommendationsPopupOpened){let t;this.getById("recommendedAccessoriesPopup",function(e){t=e.items}),this.eventBus().emit("product.tile.recommended.popup",t),this.recommendationsPopupOpened=!0}this.getById("recommendedAccessoriesPopup",t=>t.showModal({}))}onSampleSizeChange(t){const e=t.get(),r=e.options[e.selectedIndex].getAttribute("data-product-id"),i=t.data("uuid"),o=t.data("quantity"),a=t.data("updateCartUrl");return(0,s.zP)(a,{pid:r,quantity:o,uuid:i}).then(t=>(this.eventBus().emit("product.updated",t),t))}proceedToCheckout(t,e){super.proceedToCheckout(t,e),(0,i.dG)(t),e.defaultPrevented||(window.location.href=t.get(0).href)}renderCart(t){return t?(this.cart=t,this.render("cartTemplate",t,this.ref("cartContainer")).then(()=>{this.eventBus().emit("cart.updated",t)})):Promise.reject(new Error)}updateQty(t){this.showProgressBar();const e=t.data("uuid"),r=t.currentValue,i=r<t.config.lineItemMinOrderQuantity;if(0===r||i)return this.removeProduct(t),this.hideProgressBar(),Promise.resolve(null);const o=(0,s.DJ)(t.data("action"),{pid:t.data("pid"),uuid:e,quantity:t.getValue()},"POST",!1);return this.updateQtyRequests.push(o),o.promise.then(e=>(this.eventBus().emit("gtm.product.updated",e,t),this.renderCartResponse(e),this.accessibilityAlert(this.prefs().accessibilityAlerts.quantitychanged),e)).catch(t=>("AbortError"===t.name||(t&&t.error&&t.errorMessage?this.render("errorTemplate",{message:t.errorMessage},this.ref("errorMsgs")):this.renderCartWithItemLevelActionError(e,t.message)),Promise.resolve(null))).finally(()=>{this.hideProgressBar();const t=this.updateQtyRequests.indexOf(o);t>-1&&this.updateQtyRequests.splice(t,1)})}}}},6951(t,e,r){r.d(e,{default:()=>o}),r.dn(o);var s=r(530),i=r(7819);function o(t){return class extends t{prefs(){return{productId:"",quantity:1,addToCartUrl:"",...super.prefs()}}getSelectedOption(){const t=this.ref("selector").get(),e=t.options,r=t.selectedIndex;return new i.s([e[r]])}addToOrder(t){const e=this.getSelectedOption(),r=String(e.data("productId")),i=t.data("quantity"),o=t.data("addToCartUrl");return this.ref("container").setText(t.data("titleProcessing")),t.startProcess(),(0,s.zP)(o,{pid:r,quantity:i}).then(r=>(this.ref("container").setText(t.data("titleDefault")),r.error?this.emit("error",r.message||t.data("textNetworkError")):r.cart&&(this.parentHandler("rendercart",r.cart),this.eventBus().emit("alert.show",{accessibilityAlert:t.data("addedToCartAlert")}),this.eventBus().emit("bag.product.added.to.cart",this,e)),r)).catch(()=>{this.ref("container").setText(t.data("titleDefault")),this.emit("error",t.data("textNetworkError"))})}}}},9189(t,e,r){r.d(e,{default:()=>a}),r.dn(a);var s=r(530),i=r(8520),o=r(5315);function a(t){return class extends t{prefs(){return{searchUrl:"",cartType:"",...super.prefs()}}init(){super.init(),this.eventBus().on("cart.addToOrder","addToOrderClick")}addToOrderClick(t){t.prefs().isMaterialsCart||t.prefs().isStandardProductTile?this.handleClickOutside():this.clickOutsideDispose&&this.clickOutsideDispose()}handleClickOutside(){this.ref("buttonCancel").hide(),this.ref("container").empty(),this.ref("field").attr("aria-expanded","false"),this.clickOutsideDispose&&this.clickOutsideDispose()}handleCancel(){this.ref("field").val(""),this.ref("field").removeClass("m-active"),this.handleClickOutside()}debounceSearch=(0,o.s)(()=>{this.ref("field").val().length>2&&this.handleSearch()},500,!1,!0);handleSearch(){const t=this.ref("field").val()||"",e=this.prefs().cartType,r=(0,i.TU)(this.prefs().searchUrl,{q:t,cartType:e});return t.length?(this.clickOutsideDispose=(0,i.EO)(this.ref("container"),this.handleClickOutside.bind(this)),this.ref("container").addClass("m-busy"),(0,s.uf)(r).then(t=>{this.ref("container").removeClass("m-busy"),this.ref("field").attr("aria-expanded","true"),this.render(void 0,{},this.ref("container"),String(t))})):Promise.resolve("empty request value")}onInput(){this.ref("buttonCancel").show();const t=String(this.ref("field").val());this.debounceSearch(null),t.length>50?this.ref("field").val(t.substring(0,50)):0===t.length&&this.handleCancel()}handleSubmit(){this.handleSearch()}onLabelActive(){this.ref("field").toggleClass("m-active",!!this.ref("field").val())}}}},257(t,e,r){r.d(e,{default:()=>o}),r.dn(o);var s=r(530),i=r(3013);function o(t){return class extends t{prefs(){return{classesModalQuickView:"m-quick_view",cartGetUrl:"",accessibilityAlerts:{},actionUrls:{},tauAttrRemoveProductConfirmationPopUp:"remove_item_confirmation_dialog",items:[],shipments:[],valid:!0,error:"",redirectUrl:"",couponAction:"",pageError:"",...super.prefs()}}init(){this.cart=this.prefs(),this.updateQtyRequests=[],this.eventBus().on("minicart.updated","renderCart"),this.eventBus().on("product.updated","onProductUpdated"),this.eventBus().on("coupon.updated","onCouponUpdated")}onProductUpdated(t){const e=t.cartModel;e&&this.renderCart(e).then(()=>this.accessibilityAlert(this.prefs().accessibilityAlerts.productupdated))}onCouponUpdated(t){this.renderCart(t).then(()=>
1{if(t){const e=this.prefs().accessibilityAlerts[`promocode${t.couponAction}`];this.accessibilityAlert(e)}})}renderCart(t){return t?(this.cart=t,this.eventBus().emit("cart.updated",t),this.render("cartTemplate",t,this.ref("cartContainer"))):Promise.reject(new Error)}updateQty(t){this.showProgressBar();const e=t.data("uuid"),r=t.currentValue,i=r<t.config.lineItemMinOrderQuantity;if(0===r||i)return this.removeProduct(t),this.hideProgressBar(),Promise.resolve(null);const o=(0,s.DJ)(t.data("action"),{pid:t.data("pid"),uuid:e,quantity:t.getValue()},"POST",!1);return this.updateQtyRequests.push(o),o.promise.then(t=>(this.renderCartResponse(t),this.accessibilityAlert(this.prefs().accessibilityAlerts.quantitychanged),t)).catch(t=>("AbortError"===t.name||(t&&t.error&&t.errorMessage?this.render("errorTemplate",{message:t.errorMessage},this.ref("errorMsgs")):this.renderCartWithItemLevelActionError(e,t.message)),Promise.resolve(null))).finally(()=>{this.hideProgressBar();const t=this.updateQtyRequests.indexOf(o);t>-1&&this.updateQtyRequests.splice(t,1)})}dismissQty(){this.updateQtyRequests.forEach(t=>{t.abortController.abort()}),this.updateQtyRequests=[]}accessibilityAlert(t){this.eventBus().emit("alert.show",{accessibilityAlert:t})}renderCartResponse(t){t&&t.error&&t.redirectUrl?window.location.assign(t.redirectUrl):this.renderCart(t)}onShowModal(t){this.eventBus().emit("product.tile.qv.open.edit",t)}editProduct(t){this.showProgressBar();const e=t.data("uuid");this.getById("editProductModal",t=>t.showModalPreview(this.prefs().classesModalQuickView)),(0,s.uf)(t.data("href"),{uuid:e}).then(e=>{this.getById("editProductModal",r=>r.showModal({body:e,attributes:{"data-tau-unique":"edit_product_dialog"}},this.onShowModal.bind(this,t),!0))}).catch(t=>{this.renderCartWithItemLevelActionError(e,t.message)}).finally(()=>{this.hideProgressBar()})}removeProduct(t){const e=this.getConstructor("InputStepper"),r=t.data("removeAction")||t.data("action"),s=t.data("pid"),i=t.data("uuid"),o=`quantityStepper-${i}`;let a=1,n=null;t instanceof e?(a=parseInt(t.getValue(),10),n=t.prefs().lineItemMinOrderQuantity):this.getById(o,t=>{a=parseInt(t.getValue(),10)}),this.removeButton=t,this.getById("confirmDialog",e=>{e.showModal({productName:t.data("name"),attributes:{"data-tau":this.prefs().tauAttrRemoveProductConfirmationPopUp,url:r,pid:s,uuid:i,currentValue:a,minOrderQuantity:n}})})}onProductLinkClick(t){this.eventBus().emit("cart.product.link.click",t)}renderCartWithItemLevelActionError(t,e){this.cart&&(this.cart.items=this.cart.items.map(r=>({...this.cart&&this.cart.items.find(t=>t.UUID===r.UUID)||r,actionErrorMessage:t===r.UUID?e:""})),this.cart.valid.error=!0,this.renderCart(this.cart))}confirmedRemoveProduct(t,e=!1){const r=t.attributes;if(!r)return Promise.resolve({error:!0});const i=r.url,o=r.pid,a=r.uuid;this.eventBus().emit("cart.remove.product",this),e||this.showProgressBar();let n=(0,s.zP)(i,{pid:o,uuid:a},"POST").then(t=>{if(t.error)throw Error(t.error);return this.confirmationRemoveCallback(t.basket,e),t});return e||(n=n.catch(t=>(this.renderCartWithItemLevelActionError(a,t.message),t)).finally(()=>{this.hideProgressBar()})),n}cancelProductRemoving(t){const e=t&&t.attributes;if(e&&(0===e.currentValue||e.currentValue<e.minOrderQuantity)){const t=e.uuid,r=e.minOrderQuantity,s=`quantityStepper-${t}`;this.getById(s,t=>{t.setInputValue(t.filterInput(r))})}}moveProductToWishlist(t){if(!t)return Promise.resolve([{error:!0}]);const e=t.attributes.uuid;return this.showProgressBar(),(0,s.zP)(this.prefs().actionUrls.moveProductToWishlist,{pid:t.attributes.pid,qty:t.attributes.currentValue}).then(e=>{if(e.error&&!e.itemAlreadyExists)throw Error(e.error);const r=this.confirmedRemoveProduct(t,!0);return Promise.all([e,r])}).catch(t=>(this.renderCartWithItemLevelActionError(e,t.message),[{error:t}])).finally(()=>{this.hideProgressBar()})}confirmationRemoveCallback(t,e=!1){this.renderCart(t).then(()=>this.accessibilityAlert(e?this.prefs().accessibilityAlerts.movedtowishlist:this.prefs().accessibilityAlerts.productremoved))}showProgressBar(){this.ref("cartContainer").attr("aria-busy","true")}hideProgressBar(){this.ref("cartContainer").attr("aria-busy","false")}proceedToCheckout(t,e){t.data("error")&&(e.preventDefault(),this.scrollToError()),this.eventBus().emit("cart.page.submitted",this)}scrollToError(){const t=this.ref("errorMsgs").get();t&&(0,i.lG)(t)}showError(t,e){e&&this.cart&&(this.cart.pageError=e,this.renderCart(this.cart).then(()=>this.scrollToError()))}}}},6784(t,e,r){function s(t){return class extends t{showDelimiter(){this.ref("delimiter").show()}proceedToCheckout(t,e){this.emitWithoutContext("click",t,e)}showError(t,e){this.emitWithoutContext("error",t,e)}}}r.d(e,{default:()=>s}),r.dn(s)},9572(t,e,r){r.d(e,{default:()=>i}),r.dn(i);var s=r(530);function i(t){return class extends t{prefs(){return{msgEmptyCoupon:"",couponInput
1:"dwfrm_coupon_couponCode",couponCodeContent:"couponCodeContent",couponDeletionMsg:"couponDeletionMsg",removeCouponUrl:"",classesShow:"show",...super.prefs()}}onSubmitted(t){t&&(t.error&&(t.errorMessage||t.message)?this.getById(this.prefs().couponInput,e=>e.setError(t.errorMessage||t.message)):t.error&&t.fieldErrors?Object.keys(t.fieldErrors).forEach(e=>{this.getById(e,r=>r.setError(t.fieldErrors[e]))}):(this.getById(this.prefs().couponInput,t=>t.setValue("",!0)),this.eventBus().emit("coupon.updated",t)))}onError(t){this.getById(this.prefs().couponInput,e=>e.setError(t.message))}removeCoupon(t){return this.showProgressBar(),this.has(this.prefs().couponDeletionMsg,function(t){t.setText("").hide()}),(0,s.zP)(this.prefs().removeCouponUrl,{couponCode:t.data("code"),uuid:t.data("uuid")}).then(t=>(t.couponAction="removed",this.eventBus().emit("coupon.updated",t),t)).catch(t=>{this.has(this.prefs().couponDeletionMsg,function(e){e.setText(t.message).show()})}).finally(()=>{this.hideProgressBar()})}focusInput(){this.getById(this.prefs().couponInput,t=>t.focus())}}}},8198(t,e,r){r.d(e,{default:()=>a}),r.dn(a);var s=r(530),i=r(8520),o=r(1731);function a(t){return class extends t{prefs(){return{initialTimeout:24,countdownTimeout:5,countdown:"countdown",countdownCircleAnimated:"countdownCircleAnimated",countdownIcon:"countdownIcon",countdownCircleBg:"countdownCircleBg",sessionTimeoutUrl:"",sessionContinueUrl:"",...super.prefs()}}init(){super.init(),this.onDestroy(()=>this.clearDisposableResources()),this.eventBus().on("responseok","onOKResponse"),this.resetInitialTimeout(),this.started=Date.now(),this.focusListener=this.ev("visibilitychange",()=>this.handleVisibilityChange(),window.document),this.onDestroy(()=>{this.focusListener&&(this.focusListener.forEach(t=>t()),this.focusListener=void 0)})}onOKResponse(){this.started=Date.now(),this.resetInitialTimeout()}handleVisibilityChange(){if(!this.started)return;const t=1e3*this.prefs().initialTimeout*60,e=1e3*this.prefs().countdownTimeout*60,r=Date.now()-this.started,s=r>t;if(r>t+e)this.sessionExpired();else{if(s){const s=(t+e-r)/1e3;return void(this.countdownShown?this.adjustCountdown(s):this.startCountdown().then(()=>this.adjustCountdown(s)))}this.resetInitialTimeout(t-r)}}adjustCountdown(t){this.clearDisposableResources(),this.initCountdown(t)}resetInitialTimeout(t=void 0){this.clearDisposableResources(),this.initialTimeout=(0,i.wR)(()=>{this.startCountdown()},t||60*this.prefs().initialTimeout*1e3)}startCountdown(){this.showModal(),this.countdownShown=!0,this.ref("countdown").setText(`${this.prefs().countdownTimeout}:00`);const t=this.ref("countdownCircle").get(),e=this.ref("countdownCircleBg").get(),r=this.ref("countdownCircleAnimated").get();if(t&&r&&e){const t=2*Math.PI,s=92;this.circleLength=t*s,e.setAttributeNS(null,"r",String(s)),r.setAttributeNS(null,"r",String(s))}return this.initCountdown()}initCountdown(t=void 0){const e=this.ref("countdownCircleAnimated").get(),s=this.circleLength||0,i=60*this.prefs().countdownTimeout;return r.e(666).then(()=>r(367)).then(r=>{this.countdown=new r.default(t=>{this.ref("countdown").setText(`${t.minutes}:${t.seconds}`);const r=1-t.duration/i,o=s-Math.round(s*r);e&&e.setAttributeNS(null,"stroke-dasharray",o+","+s)},()=>this.sessionExpired(),{time:t||60*this.prefs().countdownTimeout})})}sessionExpired(){this.clearDisposableResources(),window.location.assign(this.prefs().sessionTimeoutUrl)}continueSession(){return(0,s.zP)(this.prefs().sessionContinueUrl,{}).then(t=>(o.A.name=t.csrf.tokenName,o.A.value=t.csrf.token,this.closeModal(),this.countdownShown=!1,t))}cancel(){this.continueSession().finally(()=>{super.cancel()})}clearDisposableResources(){this.initialTimeout&&(this.initialTimeout(),this.initialTimeout=void 0),this.countdown&&(this.countdown.destroy(),this.countdown=void 0)}}}}}]);
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.