(function(y){var C=window.AmazonUIPageJS||window.P,F=C._namespace||C.attributeErrors,c=F?F("DPTwisterPlusDesktopConfiguratorAssets",""):C;c.guardFatal?c.guardFatal(y)(c,window):c.execute(function(){y(c,window)})})(function(y,C,F){y.when("A","desktop-configurator-view","desktop-configurator-widgets-factory","desktop-configurator-slot-manager","twister-dynamic-style","desktop-configurator-logger","desktop-configurator-dimension-handler","desktop-configurator-side-sheet-view","desktop-configurator-popover-factory", "twister-js-init-dpx-data","twister-plus-desktop-configurator-mark-render").register("desktop-configurator-view-initialiser",function(c,k,t,n,l,f,w,z,x,p){var u=p?p.inlineTwisterData||{}:{};u.inlineTwisterEnabled&&(f=new f,new k(p,t.Row,n,l,f,w,z,x),!u.shouldDelayRegistrationWithTwisterCore&&c.trigger("desktop-configurator-view-initialized"))});"use strict";y.when("A").register("desktop-configurator-dimension-handler",function(c){function k(c){this.numberOfDimensionsExpandedOnLanding=c.numberOfDimensionsExpanded|| 0;this.expandAllDimensions=-1===this.numberOfDimensionsExpandedOnLanding;this.dimensionKeyRowMap={};this.expandedDimensionList=[];this.maxNumberOfDimensionsExpanded=c.maxNumberOfDimensionsExpanded||1}k.prototype={registerDimension:function(c,k){this.dimensionKeyRowMap[c]=k;(this.expandAllDimensions||this.expandedDimensionList.length=w&&(I[a]=c);-1!==p&&-1===l&&(g=g.getBoundingClientRect().top,null===n?n=g:g!==n&&(l=h))});-1!==p&&(-1===l&&(l=r.length),P[a]=Math.ceil(r.length/l));g.inlineVariationsSize[a]=r.length;d.toggleSwatch&&d.toggleSwatch.setNumberOfSwatchesPerRow(l);return k}function r(d,a,e){var h= !(!d||!b(a)),m=g.rows[a].getInitialVisibleSwatchList();h&&c.each(m,function(b){if(!b.unavailable){var h=v.updateIfCurrentlyActive.bind(v,b.id),h=g.slotManager.get(b.asin,a,g.noOfLoadingIndicator,!1,Z,h,e);b.updateSlotNode({showSlot:d,slotHtm:h},!1,a)}})}function B(a,b,e){a={dimIndex:g.dimIndexMap[a],dimValueIndex:b};b=k.DP_STATE_VIEW_SUBTYPE;var h=g.dimensionsMap,c;c=d();for(var m=k.CHAR_UNDERSCORE,v=[],q=0;q[\t ]+\[\t ]+$/g,"\x3e")}function z(c,a,b){return w(A.default.call(this,c.content.twisterSlotDiv,a,b))}function x(c,a){if(!c||0===c.length)return a;if(0this.minSlotHeight[a][b]?this.maxSlotHeight[a][b]:this.minSlotHeight[a][b]},updateSlotHeight:function(f,a){var b=[],e;c.each(this.maxSlotHeight[f], function(c,q){a?(b.push("#desktop-configurator-side-sheet #"+f+"dim_list .desktop-configurator-dim-row-"+q+" .dimension-slot-info {height: "+c+"px;}"),e="twister-plus-desktop-configurator-side-sheet-slot-height-"):(b.push("#inline-twister-expander-content-"+f+" .desktop-configurator-dim-row-"+q+" .dimension-slot-info {height: "+c+"px;}"),e="twister-plus-desktop-configurator-slot-height-")});this.dynamicStyle.addCSSRules(e+f,b)},resetMinSlotHeight:function(f){this.minSlotHeight[f]||(this.minSlotHeight[f]= []);this.minSlotHeight[f]=c.map(this.minSlotHeight[f],function(){return 0})},resetSlotHeight:function(f,a){this.maxSlotHeight[f]||(this.maxSlotHeight[f]=[]);this.dynamicStyle.addCSSRules((a?"twister-plus-desktop-configurator-side-sheet-slot-height-":"twister-plus-desktop-configurator-slot-height-")+f,[]);this.maxSlotHeight[f]=c.map(this.maxSlotHeight[f],function(){return 0})}};return n});"use strict";y.when("A","desktop-configurator-constants","detail-page-side-sheet").register("desktop-configurator-side-sheet-view", function(c,k,t){function n(){this.sideSheetData=this.activeDimKey=null;this.swatchList=[];this.mainViewDimContainer=this.keyDownEventHandler=this.dimValContainer=null;this.updateSideSheetStatus={}}function l(){this.sideSheetData=this.activeDimKey=null;this.swatchList=[];this.mainViewDimContainer=this.keyDownEventHandler=this.dimValContainer=null}function f(a,b){c.each(a,function(a){var m="desktop-configurator-swatch-hover:"+b+"_sec";try{c.declarative.remove(a,m),c.declarative.create(a,m,{})}catch(f){y.log("Hover event subscribe failed with error: "+ this.name,v.ERROR,v.ATTRIBUTION)}})}function w(a){a=Array.prototype.slice.call(a);var b=u(a[0]).find("input");a=u(a[a.length-1]).find("input");this.keyDownEventHandler=x.bind(this,b,a);document&&document.addEventListener("keydown",this.keyDownEventHandler);c.delay(function(){b&&b.focus()})}function z(){if(this.mainViewDimContainer){var a=this.mainViewDimContainer.parent().find(".tp-side-sheet-link-container a")[0];document&&document.removeEventListener("keydown",this.keyDownEventHandler);a&&a.focus()}} function x(a,b,e){e.code&&"tab"===e.code.toLowerCase()&&(e.shiftKey?document&&document.activeElement===a[0]&&(e.preventDefault(),b.focus()):document&&document.activeElement===b[0]&&(e.preventDefault(),a.focus()))}function p(a){var b=u("#desktop-configurator-side-sheet-content-header").clone();b.removeClass("aok-hidden");b.find(".dim-name").text(a.dimensionDisplayText+":");b.find(".dim-value").text(a.displayValueText);var e=a.optionsText;e&&b.find(".dim-options").text(e.replace("###options",a.totalValueCount)); return b}var u=c.$,A=k.sideSheetSelectors,v=k.loggingConstants;n.prototype={init:function(a){var b=this,e=u("#twister-plus-inline-twister-container");0!==e.length&&(e=e[0].getBoundingClientRect().width,this.scrollbarWidth=this.getScrollbarWidth(),this.sideSheet=new t({id:"desktop-configurator-side-sheet",shouldRenderHTMLString:!0,animationDuration:k.SIDE_SHEET_ANIMATION_SPEED,width:e+k.SIDE_SHEET_PADDING+b.scrollbarWidth,onAfterHide:function(){a.logSecViewClosed(b.activeDimKey);c.each(b.swatchList, function(a){var e=parseInt(a.getAttribute("data-idxInToggleSwatchList"),10),e=b.sideSheetData.getSwatchInfo(e);c.declarative.remove(a,"desktop-configurator-swatch-hover:"+b.activeDimKey+"_sec");b.sideSheetData.destroyPopover(e.id+"_sec")});z.call(b);b.updateSideSheetStatus[b.activeDimKey]&&b.updateSideSheetStatus[b.activeDimKey](b.activeDimKey,!1);l.call(b)}}))},open:function(a){this.activeDimKey=a.dimKey;this.sideSheetData=a;var b=u("#inline-twister-row-"+a.dimKey+" #tp-inline-twister-dim-values-container").find(".desktop-configurator-dim-row-0"), e=u("#side-sheet-loader-container").clone().removeClass("aok-hidden"),m=e.find(".loader-container"),f=e.find("#side-sheet-loader").clone().removeClass("aok-hidden"),d,h,r=k.DEFAULT_TEXT_SWATCH_SPACING;a.isTextSwatch?(d=b.width()-k.BORDER_WIDTH,h=b.height()-k.BORDER_WIDTH):(h=b.find(".swatch-image-container"),r=0a&&(a=k.DEFAULT_SCROLLER_WIDTH);return a},getWidth:function(a,b){var e=0;c.each(a,function(a){e+=a.getBoundingClientRect().width+b});return e+k.SIDE_SHEET_PADDING+this.scrollbarWidth}};return n});"use strict";y.when("A","a-popover","desktop-configurator-constants").register("desktop-configurator-popover-factory",function(c,k,t){function n(a){var b=x("\x3cdiv /\x3e"),e=x("\x3cspan /\x3e"),c=a.title,m=a.showImageInPopOver,f=!a.hideSlots;b.addClass("desktop-configurator-popover-content");e.addClass("desktop-configurator-title-block a-size-base a-color-base a-text-bold"); e.text(c);b.append(e);m&&(e=x("\x3cdiv /\x3e"),m=x("\x3cimg /\x3e"),m.attr("src",a.image),m.attr("data-a-image-source",a.image),m.attr("alt",c),e.append(m),b.addClass("visual-dimension"),e.addClass("desktop-configurator-image-block"),b.prepend(e));f&&l(b,a.slotNode);return b}function l(a,b){b="string"===typeof b?b:b.clone();var e=x("\x3cdiv /\x3e");a.find(".desktop-configurator-slot-block").remove();e.addClass("desktop-configurator-slot-block");e.html(b);f(e);a.append(e)}function f(a){var b=a.find(".price_slot_ppu"), f=a.find("#ms3slot"),p=a.find(".twister_swatch_price"),k=a.find("#twisterAvailability"),l=a.find("#deliveryPromisePrefix"),u=a.find(".variationReviewsSection"),n=a.find(".default-slot-unavailable"),v=a.find(".loading-indicator-1");a=a.find(".twisterPrimeWardrobe");var t={variationReviews:u,price:p,ms3:f,twisterAvailability:k.parent(),deliveryPromise:l.parent(),ppu:b,twisterPrimeWardrobe:a};v.length&&(v.addClass("loading-indicator-in-popover"),0===e.length?v.addClass("aok-hidden"):v.removeClass("aok-hidden")); c.each(m,function(a){t[a]&&(-1===e.indexOf(a)?t[a].addClass("aok-hidden"):(t[a].removeClass("aok-hidden"),a=q[a+"_styleSlot"],"function"===typeof a&&a.call(this,t)))});n.length&&n.removeClass("a-size-small").addClass("a-size-base")}function w(a,b,e,m){e=n({slotNode:e.slotNode,title:e.title,showImageInPopOver:e.showImageInPopOver,image:e.image,hideSlots:m});b=k.create(b,{name:a,inlineContent:e,closeButton:!1,padding:"none",activate:"none",restoreFocusOnHide:!1});p[a]=b;u[a]||(c.on("a:popover:afterShow:"+ a,function(a){c.delay(function(){x(v.DIMENSION_VALUES_LIST).removeClass("stop-scrolling-dc")})}),u[a]=!0);return b}function z(a,b,e){if(a=p[a])b=n({slotNode:b.slotNode,title:b.title,showImageInPopOver:b.showImageInPopOver,image:b.image,hideSlots:e}),a.update({content:b});return a}var x=c.$,p={},u={},A=t.POPOVER_DELAY,v=t.sideSheetSelectors,a=null,b=null,e=[],m=t.CONFIGURED_SLOTS,q={price_styleSlot:function(a){var b=a.ppu;a=a.price;a.length&&(a.find(".a-size-base").removeClass("a-size-base").addClass("a-size-large"), b.length&&b.removeClass("a-size-micro").addClass("a-size-small"))},ms3_styleSlot:function(a){a=a.ms3;a.length&&a.find(".a-icon-mini").removeClass("a-icon-mini").addClass("a-icon-small")},twisterAvailability_styleSlot:function(a){var b=a.twisterAvailability;b.length&&(a=a.ms3,b.find(".a-size-small").removeClass("a-size-small").addClass("a-size-base"),a.length&&a.after(b))},deliveryPromise_styleSlot:function(a){a=a.deliveryPromise;a.length&&a.addClass("a-size-base")}};return{show:function(d,e,m,f){a= this.exists(d)?z.call(this,d,m,f):w.call(this,d,e,m,f);clearTimeout(b);var q=this;b=c.delay(function(){x(v.DIMENSION_VALUES_LIST).addClass("stop-scrolling-dc");a&&a.show();q.updateIfCurrentlyActive(d,m.slotNode)},A)},exists:function(a){return!!p[a]},hide:function(d){(d=p[d])&&d.hide();a=null;clearTimeout(b)},updateIfCurrentlyActive:function(b,e){a&&a.$container&&a.attributes.name===b&&(b=a.$container.find(".desktop-configurator-popover-content"),l(b,e))},destroy:function(a){p[a]&&k.remove(a);delete p[a]; clearTimeout(b)},setVisibleSlotConfig:function(a){e=a}}});"use strict";y.when("A").register("desktop-configurator-twister-register",function(){var c=[];return{registerModifier:function(k){c.push(k)},executeModifiers:function(k){c.forEach(function(c){c.modify&&"function"===typeof c.modify&&c.modify(k)})}}});"use strict";y.when("A","desktop-configurator-constants").register("desktop-configurator-widgets-factory",function(c,k){var t=c.$,n=k.widgetSelectors,l=k.classes,f=k.cssConstants,w=k.loggingConstants; k=function(){function f(){var a=t(n.IMAGE_THUMBNAIL).attr("src");return a&&a.length&&(a=a.split("."),2