(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<this.numberOfDimensionsExpandedOnLanding)&&this.expandedDimensionList.push(c)},init:function(){-1===this.maxNumberOfDimensionsExpanded&&(this.maxNumberOfDimensionsExpanded=
Object.keys(this.dimensionKeyRowMap).length)},expandDimension:function(c){-1===this.expandedDimensionList.indexOf(c)&&this.expandedDimensionList.push(c);if(this.maxNumberOfDimensionsExpanded<this.expandedDimensionList.length)for(var k=0;k<this.expandedDimensionList.length&&(this.expandedDimensionList[k]!==c&&this.dimensionKeyRowMap[this.expandedDimensionList[k]].collapse(),this.maxNumberOfDimensionsExpanded!==this.expandedDimensionList.length);k++);},collapseDimension:function(c){c=this.expandedDimensionList.indexOf(c);
-1!==c&&this.expandedDimensionList.splice(c,1)}};return k});"use strict";y.when("A","desktop-configurator-constants","3p-promise").register("desktop-configurator-view",function(c,k,t){function n(f,w,n,x,p,u,A,v){function a(){"function"===typeof C.markFeatureInteractive&&C.markFeatureInteractive("twister",{hasComponents:!0,components:[{name:"twister-desktopConfigurator"}]})}function b(){if(!D)return 0===f.unselectedDimCount;var a=d();return!!D.util.getAsinFromSelectionInfo(a)}function e(d,a,b,e,c,
h,m,v,q,r,f,B){return{text:d,image:a||"",popoverImage:b||"",name:e,id:f+"_"+e,selected:c,slotHtm:h,showSlot:m,isVisible:v,unavailable:q,defaultSlotUnavailable:U,isCirclularImageSwatch:g.inlineTwisterData&&"CIRCLE"===g.inlineTwisterData.swatchShape,asin:r,pageUrl:B}}function m(d){V[d]||null===I[d]||(d=g.rows[d],d.toggleSwatch&&d.toggleSwatch.removeMisplacedSwatch())}function q(d,a){var b=O.unselectedDimensionPrompt||"",e=f&&f.variationDisplayLabels?f.variationDisplayLabels[d]:"",g=f&&f.variationValues?
f.variationValues[d][a]:"";return{dimKey:d,titleSelectorPrefix:"inline-twister-dim-title-",titleValueSelector:"inline-twister-dim-title-value",mainText:e,subText:-1!==a?g:b.replace("###dimension",e||"")}}function d(){if(!D){var d=[];c.each(g.dimList,function(a){d.push({dimKey:a,val:f.selectedVariationValues?f.selectedVariationValues[a]:-1})});return d}return D.state()}function h(){return c.map(g.dimList,function(d,a){if(!g.isSingletonMap[d])return new t(function(b){r(g.rows[d],d,a);b()})})}function r(d,
a,h){var m=g.inlineTwisterData.slotsEnabledDimensions,v=!!((g.dimList.length===m.length?m[h]:m[0])&&b(a));h=f.variationValues[a];var q=d.getInitialVisibleSwatchList(),r=[];c.each(h,function(d,b){d=e(d,W[a+"::"+b],X[a+"::"+b],b,g.initSelectionState[a].val===b,q[b]?q[b].slotHtm:"",v,q[b]&&q[b].isVisible,q[b]&&q[b].unavailable,F,a,N[a]?N[a][d]:null);r.push(d)});g.swatches[a]=r}function B(){c.each(g.rows,function(d){g.isSingletonMap[d.dimKey]||(d.createDisplaySwatches(),g.textSwatchMap[d.dimKey]&&d.toggleSwatch.alignTextSwatches())})}
function E(){function h(d,a,b){var m,v,q,r=d.expanderContent.find(".inline-twister-swatch:not(.aok-hidden):not(.swatch-prototype)"),B=f.variationValues[a]||[],p=g.inlineTwisterData.inlineVariationsSize,l=-1,w=p,k=[],n=null;-1===p&&(l=parseInt(d.expanderContent.attr("data-swatchCountPerRow"))||r.length,w=l*P[a]);c.each(r,function(g,h){var c=parseInt(g.getAttribute("data-idxInToggleSwatchList")),r="true"===g.getAttribute("data-initiallySelected"),f="true"===g.getAttribute("data-initiallyUnavailable");
m=g.getAttribute("data-asin");v=c;q=B[c]||"";var u,t,E;u=W[a+"::"+v];t=X[a+"::"+v];E=q;f=e(E,u,t,v,r,"",b,!0,f,m,a,N[a]?N[a][E]:null);d.toggleSwatch&&(u=d.toggleSwatch.createSwatch(f,g),f.isVisible=u.isVisible);k.push(f);r&&h>=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<g.dimensionsMap.length;q++){var r=c[q].val;-1===r&&(r=k.CHAR_ASTERISK);v.push(String(r))}c=
m?v.join(m):v;return{divMetadata:a,eventType:e,subType:b,dimensionsMap:h,currDimCombId:c}}var p=d(),n=0,t={},u=g.inlineTwisterData.slotsEnabledDimensions,E=g.inlineTwisterData.popoverSlotsEnabledDimensions;l.each(p,function(d,a){t[a.dimKey]=a;g.dimIndexMap[a.dimKey]=d;g.dimensionsMap[d]=a.dimKey});g.initSelectionState=t;l.each(g.dimList,function(a,b){var e=t[b].val;a=J(b);var e=q(b,e),h=!(!Q&&(g.dimList.length===u.length?u[n]:u[0])),c=-1!==R.indexOf(b);g.textSwatchMap[b]=a;a=new w("inline-twister-row-",
e,{showSlot:!1,dimKey:b,inlineTwisterData:g.inlineTwisterData},{handleDimensionExpansion:function(a,e,m){b=a.dimKey;if(m){g.dimensionHandler.expandDimension(b);a=F;m={};S[b]?(m=H(g.swatches[b],e,b,d(),!1,!c,h),g.indexTranslationMap[b]=m,a={swatches:g.swatches[b]}):(r(e,b,h),S[b]=!0);var v=g.rows[b];v.setState(a,m,K,null,!1);L(e,v,b);g.logger.logDimensionExpanded(b);c||(I[b]=null)}else g.dimensionHandler.collapseDimension(b),g.logger.logDimensionCollapsed(b)}},g.logger);g.rows[b]=a;n+=1});0===g.inlineTwisterData.numberOfDimensionsExpanded&&
(a(),aa=!0);n=0;l.each(g.dimList,function(a,e){function q(d,a,b){if(a){var h=parseInt(a.buttonName,10),c=d[h]&&d[h].id?d[h].id:"";e=a.buttonGroupName;d[h]&&d[h].selected&&g.logger.logSelectedSwatchClick();c&&v.exists(c)&&v.hide(c);K=e;d={dimKey:e,val:h};C.newTwisterInteractionStartTime=new Date;g.twister.metaData(B(e,h,k.viewEvents.CLICK));g.twister.dimensionChanged(d);g.logger.logDimensionValueClick();b&&g.logger.logDimValueClickAfterAutoUpdate()}}function r(a,e){var h=e.data,c=e.type;e=e.$currentTarget;
var m=h.id,q=!!b(a),q=M&&q&&A,q=h.showImageInPopOver||q,f=!A,l=[];if(h){if(c===k.viewEvents.MOUSE_ENTER){var p=parseInt(h.name,10);l.push({dimKey:a,val:p});q&&v.show(m,e,h,f)}else q&&v.hide(m),l=d();D&&(g.twister.metaData(B(a,p,c)),g.twister.dimensionPeek(l));K=a}}function p(d,a){var b=parseInt(d.buttonName,10),e=g.swatches[a];(e?e[b]:F)?(G.setUserInteracting(!0),c.delay(function(){q(e,d)},350),g.logger.logSecViewSwatchClick()):y.log("Selected swatch not found on side sheet toggle button click. Value clicked: "+
b+" ; Swatch length: "+g.swatches[a].length,ba.ERROR,ba.ATTRIBUTION)}function w(d,a){g.isSideSheetOpen=a;g.isWindowResizedAfterSideSheetOpen&&!a&&l.each(g.dimList,function(d,a){g.textSwatchMap[a]&&(J(a),(d=g.rows[a])&&d.toggleSwatch&&(d.toggleSwatch.alignTextSwatches(),d.toggleSwatch.alignTextSwatchNodesInLastRow()))});g.isWindowResizedAfterSideSheetOpen=!1}function t(a,b,e){var h=O.desktopConfiguratorAllOptionsString||"",q=g.swatches[a].length,r={dimensionDisplayText:e.mainText,displayValueText:e.subText,
dimKey:a,getSwatchInfo:G.getSwatch.bind(G),destroyPopover:v.destroy,optionsText:h,totalValueCount:q,isTextSwatch:z};g.sideSheet.open(r);var f={swatches:g.swatches[a]};c.delay(function(){var e=H(g.swatches[a],b,a,d(),!0,!1,T);Y&&m(a);G.setState(f,e,K,null,!0,!0);g.sideSheet.update(r);V[a]=!0;c.delay(function(){z&&L(b,G,a,!0);z&&G.toggleSwatch&&q<k.TEXT_ALIGNMENT_LIMIT&&G.toggleSwatch.alignTextSwatches(!1,!0)})},1E3);g.isSideSheetOpen=!0;g.isWindowResizedAfterSideSheetOpen=!1;g.logger.logSeeAllLinkClick("Dimension"+
(g.dimIndexMap[a]+1))}function J(a){D&&(g.isWindowResizedAfterSideSheetOpen=!0,g.isSideSheetOpen||L(g.showSlotMap[a],g.rows[a],a,!1))}var z=g.textSwatchMap[e];a=[];var x=!Q&&(g.dimList.length===u.length?u[n]:u[0]),A=g.dimList.length===E.length?E[n]:E[0],T=!x,M=x||A,Y=-1!==R.indexOf(e),G=g.rows[e];g.showSlotMap[e]=M;P[e]=g.inlineTwisterData.numOfRowsPerDimension;x=-1!==f.singletonDimensionKeys.indexOf(e);g.isSingletonMap[e]=x;n+=1;!x&&G&&(x=!(!M||!b(e)),I[e]=null,a={name:e,swatches:a,isTextSwatch:z,
onChange:q,onHover:r,hideSlotsFromMainView:T,totalSwatchCount:(f.variationValues[e]||[]).length,preserveNaturalSwatchOrder:Y},g.sideSheet.registerToggleButtonGroup(e,p,w),G.initializeComponents(a,M,{showSideSheet:t,handleWindowResize:J}),g.dimensionHandler.registerDimension(e,G),a=h(G,e,x),g.swatches[e]=a)});aa||a()}function J(a){var d=!0;(g.inlineTwisterData.disableImageSwatch===F?0:g.inlineTwisterData.disableImageSwatch)||(d=!g.inlineTwisterData.imageDimensionKeysMap[a]);return d}function H(a,d,
e,h,q,r,f,p){var B=!(!d||!b(e));d=D.util.getDimAvailability(e,h);var w=-1!==R.indexOf(e),k=c.state("filteredAvailability");if(k!==F&&!0===k.filterApplicable&&1===h.length){for(var n={},u=0;u<k.asins.length;++u)n[k.asins[u]]=1;for(var k=[],t=[],u=0;u<d.available.length;++u){var E=d.available[u];E.asin in n?k.push(E):t.push(E)}d.available=k;d.unavailable=t}var H={},x=0,J=v.updateIfCurrentlyActive,z=-1,A=-1;l.each(h,function(a,d){d.dimKey===e&&(z=d.val,A=a)});-1!==z&&(r&&(H[z]=x),x++);var y=g.rows[e];
c.each(d.available,function(d){a[d.index]=a[d.index]||{};var b=a[d.index];b.unavailable=!1;b.selected&&(z=d.index,b.isVisible||(null!==I[e]&&a[I[e]]&&(a[I[e]].isVisible=!1,w&&m(e)),I[e]=d.index),b.isVisible=!0);r&&(b.isVisible=x<g.inlineVariationsSize[e]||b.selected);var h=b.isVisible||q,l=q?b.id+"_sec":b.id;B&&h?b.slotHtm=g.slotManager.get(d.asin,e,g.noOfLoadingIndicator,q,Z,J.bind(v,l),f,p):(b.slotHtm=b.slotHtm||"",J(l,b.slotHtm));q&&y&&y.toggleSwatch&&(h=y.toggleSwatch.getSwatch(d.index),c.objectIsEmpty(h)&&
(H[d.index]=x));r&&z!==d.index&&(H[d.index]=x);b.showSlot=B;b.selected||x++});c.each(d.unavailable,function(d){a[d.index]=a[d.index]||{};var b=a[d.index];b.unavailable=!0;r&&(b.isVisible=x<g.inlineVariationsSize[e]);var h=c.state("filteredAvailability"),m=U;h!==F&&!0===h.filterApplicable&&(d.index in h.variations[A]||(m='\x3cspan class\x3d"a-size-small default-slot-unavailable"\x3e'+ca+"\x3c/span\x3e"),b.defaultSlotUnavailable=m);b.slotHtm=B?m:"";r&&(H[d.index]=x);b.showSlot=B;x++});S[e]=!0;w&&(H=
{});return H}function L(d,a,b,e){var h=g.textSwatchMap[b];d&&h&&(!e||g.isSideSheetOpen)&&(g.slotManager.resetMinSlotHeight(b),d=a.toggleSwatch.getSlotNodes(e),da(d,b,e),g.slotManager.updateSlotHeight(b,e))}function da(d,a,b){g.slotManager.resetSlotHeight(a,b);c.each(d,function(d,b){c.each(d,function(d){g.slotManager.setState(d,a,b)})})}function Z(d,a){a&&!g.isSideSheetOpen||L(!0,g.rows[d],d,a)}var g=this,D=F;this.isWindowResizedAfterSideSheetOpen=!1;this.data=f;this.noOfLoadingIndicator=1;this.dimList=
f.reorderedDimensionListKeys||[];this.dimensionsMap=[];this.logger=p;this.inlineTwisterData=f?f.inlineTwisterData||{}:{};this.swatches={};this.sideSheet=new A;var I={},O=this.inlineTwisterData&&this.inlineTwisterData.stringTranslationMap?this.inlineTwisterData.stringTranslationMap:{},U='\x3cspan class\x3d"a-size-small default-slot-unavailable"\x3e'+(O.defaultSlotUnavailableString||"")+"\x3c/span\x3e",W=f.imageHashMap||{},X=f.desktopConfiguratorPopoverImageMap||{},N=f.dimensionPageLoadUrls||{},ca=
"pwASINs"in f&&f.pwASINs instanceof Array&&0<f.pwASINs.length?f.pwUnavailableMessage:"",P={},Q=!!f.isAssemblyVariationsEnabled;this.rows={};this.dimensionHandler=new u(g.inlineTwisterData);this.isSingletonMap={};this.indexTranslationMap={};this.textSwatchMap={};var K,ba=k.loggingConstants;this.initSelectionState={};v.setVisibleSlotConfig(this.inlineTwisterData&&this.inlineTwisterData.desktopConfiguratorSlotsInPopover?this.inlineTwisterData.desktopConfiguratorSlotsInPopover:[]);this.inlineVariationsSize=
{};this.dimIndexMap={};this.isSideSheetOpen=!1;this.showSlotMap={};var R=g.inlineTwisterData.dimsWithSwatchReorderingDisabled||[],V={},S={},aa=!1;(function(){var d=g.logger.createFunctionTimerInstance("desktopConfiguratorInitTime");d.start();E();d.stop()})();c.on("register-desktop-configurator-with-twisterCore",function(a,b){D=a;g.logger.registerTwisterCore(D);g.sideSheet.init(g.logger);a=d();var e=g.inlineTwisterData.slotsEnabledDimensions,m=g.inlineTwisterData.popoverSlotsEnabledDimensions,v={};
l.each(a,function(d,a){v[a.dimKey]=a});D.slotsDimSum.addDefaultQueryParameter("showFancyPrice",g.inlineTwisterData.showFancyPrice);D.slotsDimSum.addDefaultQueryParameter("twisterFlavor",k.DESKTOP_CONFIGURATOR_FLAVOR);g.slotManager=new n(D,x,g.logger,g.inlineTwisterData);g.dimensionHandler.init();var r=0;c.each(g.rows,function(d){function a(e){var m,v={},r;m=e.selected().selectionInfo();l.each(m,function(d,a){v[a.dimKey]=a});r=v[b].val;e=g.swatches[b];e[r]=e[r]||{};e[h]=e[h]||{};e[h].selected=!1;e[r].selected=
!0;var p=q(b,h);h===r||f||d.setThumbnailImage(e[r].image);h=r;H(e,w,b,m,!1,!1,k,w);m=q(b,r);r={swatches:e};var B=c.filter(e,function(d){return d.isVisible});e.length===B.length&&(d.hideSideSheetLink(),g.inlineVariationsSize[b]=e.length);d.setExpanderHeaderAriaLabel(p,m);d.setState(r,{},K,m,!1);L(w,d,b)}if(!g.isSingletonMap[d.dimKey]){d.postInitialize();var b=d.dimKey,h=v[b].val,f=J(b),p=g.dimList.length===m.length?m[r]:m[0],B=!Q&&(g.dimList.length===e.length?e[r]:e[0]),k=!B,w=B||p,p={viewAttribution:"DetailPage",
viewName:"DesktopConfiguratorRowView_"+b};c.on("update-desktop-configurator-view",function(d){a(d)});g.twister=D.registerActive(p,{updateView:function(e,h){var m={};"VARIATION_CHANGE"===e?c.delay(function(){a(h)}):"VARIATION_PEEK"===e&&(e=h.peek().selectionInfo(),l.each(e,function(d,a){m[a.dimKey]=a}),e=m[b].val,e=q(b,e),K===b&&d.title.setState(e),g.sideSheet.activeDimKey===b&&g.sideSheet.updateDimVal(e))}})}r++});c.trigger("desktop-configurator-twisterCore-initialized",g);t.all(h()).then(function(){B()});
b.then(function(){c.each(g.rows,function(d){d.activatePageRefresh()})})})}var l=c.$;n.prototype={updateView:function(f){c.trigger("update-desktop-configurator-view",f.tsm.currentState())}};return n});"use strict";y.when("A").register("desktop-configurator-constants",function(c){return{AJAX_CALL_TIMEOUT:2E4,DIMENSION_VALUE:"DimensionValue###",DISPLAY_VALUE:"DisplayValue###",SWATCH_DATA:"SwatchData###",DESKTOP_CONFIGURATOR_FLAVOR:"twisterPlusDesktopConfigurator",MAX_DIMENSION_FLAVOUR_CAP:3,POPOVER_DELAY:500,
MAX_INLINE_ROWS:7,SIDE_SHEET_ANIMATION_SPEED:300,SIDE_SHEET_PADDING:32,TEXT_SWATCH_MARGIN_RIGHT:6,CONFIGURED_SLOTS:["price","ms3","twisterPrimeWardrobe","twisterAvailability","deliveryPromise"],DP_STATE_VIEW_SUBTYPE:"DETAILPAGE_STATE_VIEW_METADATA",CHAR_UNDERSCORE:"_",CHAR_ASTERISK:"*",DEFAULT_SCROLLER_WIDTH:20,BORDER_WIDTH:2,TEXT_ALIGNMENT_LIMIT:400,DEFAULT_TEXT_SWATCH_SPACING:16,DEFAULT_IMAGE_SWATCH_SPACING:8,REDUCED_IMAGE_SWATCH_SPACING:4,viewEvents:{MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",
CLICK:"click"},sideSheetSelectors:{EXPANDER_CONTENT_PREFIX:"#inline-twister-expander-content-",SEC_VIEW_DIMENSION_VALUE_LIST:" #tp-inline-twister-dim-values-container",DIMENSION_VALUES_LIST:" .dimension-values-list",DIMENSION_VALUES_LIST_ODD_CHILD:" .dimension-values-list \x3e :nth-child(odd)",DIMENSION_VALUES_LIST_EVEN_CHILD:" .dimension-values-list \x3e :nth-child(even)",LIST_ITEM_CIRCULAR_IMAGE:".dimension-value-list-item-circular-image",CIRCULAR_IMAGE_SWATCH_BUTTON:".circle-image-swatch-button",
LIST_ITEM_SQUARE_IMAGE:".dimension-value-list-item-square-image",SQUARE_IMAGE_SWATCH_BUTTON:".image-swatch-button",TEXT_LIST_ITEM:".swatch-list-item-text",TEXT_SWATCH_BUTTON:".text-swatch-button",TEXT_SWATCH_BUTTON_WITH_SLOTS:".text-swatch-button-with-slots",IMAGE_SELECTOR:".swatch-image",SEC_VIEW_TOGGLE_BUTTON_PREFIX:"sec_",DELAY:200},widgetSelectors:{EXPANDER_CONTENT_PREFIX:"#inline-twister-expander-content-",EXPANDER_HEADER_PREFIX:"#inline-twister-expander-header-",DIMENSION_EXPANDER_ICON_PREFIX:"#dimension-expander-icon-",
DIMENSION_EXPANDER_ICON_WRAPPER:".dimension-expander-icon-wrapper",EXPANDED_DIMENSION_TEXT_PREFIX:"#inline-twister-expanded-dimension-text-",COLLAPSED_DIMENSION_TEXT_PREFIX:"#inline-twister-collapsed-dimension-text-",AUTO_NOTIFICATION_EXPANDED:"#inline-twister-auto-notification-expanded",AUTO_NOTIFICATION_COLLAPSED:"#inline-twister-auto-notification-collapsed",IMAGE_THUMBNAIL:".dimension-collapsed-image-thumbnail",SWATCH_NODE_SELECTOR:".inline-twister-swatch",SLOT_NODE_SELECTOR:".dimension-slot-info",
TOGGLE_BUTTON_SELECTOR:".a-button-toggle",IMAGE_SELECTOR:".swatch-image",DIMENSION_VALUES_LIST:".dimension-values-list"},classes:{A_COLOR_ATTAINABLE:"a-color-attainable",AOK_HIDDEN:"aok-hidden",DIMENSION_EXPANDER_CONTENT_EXPAND:"dimension-expander-content-expand",ROTATE:"rotate",A_BUTTON_UNAVAILABLE:"a-button-unavailable",A_BUTTON_SELECTED:"a-button-selected",A_BUTTON_FOCUS:"a-button-focus",ROW_IDENTIFIER_PREFIX:"desktop-configurator-dim-row-"},cssConstants:{BG_COLOR:"background-color",GREEN_BG_COLOR:"#D9EED9",
WHITE_BG_COLOR:"white"},loggingConstants:{ATTRIBUTION:"TwisterPlusDesktopConfigurator",ERROR:"ERROR"}}});"use strict";y.when("A").register("desktop-configurator-logger",function(c){function k(){if(!(this instanceof k))return new k;l||(l=this);return l}function t(c){if("undefined"!==typeof C.csa){var l=C.csa("Events",{producerId:"dp-rpcx"}),k=f.count(c)||0;l("log",{schemaId:"dpRpcx.CSALoggingSchema.5",eventName:c,valueToLog:k},{ent:"all"})}}var n=c.$,l,f=C.ue;k.prototype={registerTwisterCore:function(c){this.twisterCore=
c},logCSMDataOnLanding:function(){var c=0,l=0,k=0,p=this.twisterCore.util,u=p.tvm.dimensionInfo,A=this.twisterCore.state().length,v=Object.keys(p.tvm.dimCombinations).length;n.each(u,function(a,b){a=b.dimKey;p.isRequiredDim(a)&&k++;p.isSingletonDim(a)?l++:c++});f&&f.count&&(f.count("dpMobileTwisterDropdownPresent",c),t("dpMobileTwisterDropdownPresent"),f.count("dpMbileTwisterSingletonDim",l),t("dpMbileTwisterSingletonDim"),f.count("dpMobileTwisterRequiredDim",k),t("dpMobileTwisterRequiredDim"),f.count("dpMobileTwisterDimSize",
A),t("dpMobileTwisterDimSize"),f.count("dpMobileTwisterFamilySize",v),t("dpMobileTwisterFamilySize"),f.count("twisterPlus.inlineTwisterGV",1),t("twisterPlus.inlineTwisterGV"))},logCSMTagsOnLanding:function(f){function l(d,a,b){var e=[];if(a===b)e.push(""),d=d[a],c.$.isArray(d)?c.each(d,function(d,a){e.push(d)}):e.push(d);else{var m=Math.floor((a+b)/2);a=l.call(this,d,a,m);var v=l.call(this,d,m+1,b);c.each(a,function(d,a){c.each(v,function(a,b){e.push(""===d?a:""===a?d:d+":"+a)})})}return e}function k(d){d&&
u.push(d)}var p=this,u=[],n=!0,v=!0,a=[0,3,8,25,50,100,1E3,5E3],b=Object.keys(this.twisterCore.util.tvm.dimCombinations).length,e,m;f.dimensionList&&(e="variation_dimension:"+f.dimensionList.length,c.each(f.dimensionList,function(d,a){p.addCSMTag(d)}));for(var q=1;q<a.length;q++)if(b<=a[q]){m="family_size_bucket:"+a[q-1]+"-"+a[q];break}else q===a.length-1&&(m="family_size_bucket:gt"+a[q]);f.dimensionInfo&&c.each(f.dimensionInfo,function(d,a){d.isSingleton||(n=!1)});a=n?"SingletonFamily":"DesktopConfigurator";
f.initDimCombination&&c.each(f.initDimCombination,function(d,a){-1===d.val&&(v=!1)});k(e);k(m);k(a);v&&k("defaultSelection");f=l.call(this,u,0,u.length-1);(function(d){var a=this;c.each(d,function(d,b){d&&a.addCSMTag(d)})}).call(this,f)},createFunctionTimerInstance:function(c){var f=this;return{eventType:c,start:function(){this.startTime=Date.now()},stop:function(){this.startTime&&f.logCounter(this.eventType,Date.now()-this.startTime)}}},addCSMTag:function(c){C.ue&&C.ue.tag&&C.ue.tag(c)},logCounter:function(c,
l){f&&f.count&&(l===F?f.count(c,(f.count(c)||0)+1):f.count(c,l),t(c))},logBottomSheetPageUpdate:function(c){this.logCounter("twisterPlus.inlineTwisterPageUpdate")},logSelectedSwatchClick:function(){this.logCounter("twisterPlus.inlineTwister.selectedSwatchClick")},logDimensionValueClick:function(){this.logCounter("dpmobiletwisterclickOndimval")},logSecViewTotalCount:function(c){this.logCounter("twisterPlus.inlineTwister.secondaryViewCount."+c)},logSecViewGV:function(c){this.logCounter("twisterPlus.inlineTwister.secondaryViewGV."+
c)},logSecViewClosed:function(c){this.logCounter("twisterPlus.inlineTwister.secondaryViewClosed."+c)},logDimensionCollapsed:function(c){this.logCounter("twisterPlus.inlineTwister.dimCollapse."+c)},logDimensionExpanded:function(c){this.logCounter("twisterPlus.inlineTwister.dimExpand."+c)},logSecViewSwatchClick:function(){this.logCounter("twisterPlus.inlineTwister.secViewSwatchClick")},logDimExpansionAfterAutoUpdate:function(){this.logCounter("twisterPlus.inlineTwister.dimExpansionAfterAutoUpdate")},
logDimValueClickAfterAutoUpdate:function(){this.logCounter("twisterPlus.inlineTwister.dimValueClickAfterAutoUpdate")},logAvailabilitySlotRender:function(){this.logCounter("twisterPlus.inlineTwister.availabilitySlotRender")},logPPUSlotRender:function(){this.logCounter("twisterPlus.inlineTwister.ppuSlotRender")},logPrimeSlotRender:function(){this.logCounter("twisterPlus.inlineTwister.primeSlotRender")},logPriceSlotRender:function(){this.logCounter("twisterPlus.inlineTwister.priceSlotRender")},logDeliverySlotRender:function(){this.logCounter("twisterPlus.inlineTwister.deliverySlotRender")},
logReviewsSlotRender:function(){this.logCounter("twisterPlus.inlineTwister.reviewsSlotRender")},logSeeAllLinkClick:function(c){this.logCounter("twisterPlus.inlineTwister.seeAllLinkClick."+c)}};return k});"use strict";y.when("A").register("twister-dynamic-style",function(c){function k(c,f){this.name=c;this.styleNode;this.rules=f||[];this.pendingRefresh}var t=c.$,n={};k.prototype={refresh:function(){var c=t("\x3cdiv /\x3e",{html:"\x26shy;\x3cstyle\x3e"+this.rules.join(" ")+"\x3c/style\x3e"});this.styleNode?
(this.styleNode.replaceWith(c),delete this.styleNode,this.styleNode=c):(this.styleNode=c,this.styleNode.appendTo("body"))}};return{addCSSRules:function(c,f){n[c]?n[c].rules=f||[]:n[c]=new k(c,f);n[c].refresh()}}});"use strict";y.when("A","desktop-configurator-constants","desktop-configurator-twister-register").register("desktop-configurator-slot-manager",function(c,k,t){function n(c,a,b,e){this.twisterCore=c;this.batch={};this.currentBatch;this.maxSlotHeight={};this.minSlotHeight={};this.dynamicStyle=
a;this.slotIdentifierMap={};this.logger=b;this.auiPriceSize=e&&e.auiPriceSize?e.auiPriceSize:"m";this.currentlyUnavailableMessage=e&&e.stringTranslationMap?e.stringTranslationMap.currentlyUnavailableMessage:"";this.desktopConfiguratorSlotsInMainView=e&&e.desktopConfiguratorSlotsInMainView?e.desktopConfiguratorSlotsInMainView:[]}function l(v,a,b,e,m){var q=this.batch,d=this;q[v]=q[v]||[];q[v].push(b);clearTimeout(this.currentBatch);this.currentBatch=setTimeout(function(){var b=c.map(d.batch,function(d,
a){return a});d.twisterCore.slotsDimSum.get(b,function(b){var h=d.batch[b.ASIN];h&&(u.each(h,function(d,a){a(b)}),delete d.batch[b.ASIN]);p(d.batch)&&(h=Object.keys(d.maxSlotHeight),c.each(h,function(d){e(d,m&&d===a)}))})},0)}function f(c,a,b,e){b[a]=b[a]||{};b[a].uniqueCount=b[a].uniqueCount||0;var m="inline-twister-dimsum-loading-"+a+"-"+b[a].uniqueCount;b[a].uniqueCount+=1;return{loadingHtm:'\x3cdiv class\x3d"'+m+(c?" loading-indicator-1":"")+(e?" aok-hidden":"")+'"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e',
promise:function(a,d){var b=u("."+m+":not(.loading-indicator-in-popover)").parent();b.length&&(b.html(a),d(b))}}}function w(c){return c.replace(/\n/g,"").replace(/[\t ]+\</g,"\x3c").replace(/\>[\t ]+\</g,"\x3e\x3c").replace(/\>[\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(0<c.find(".loading-indicator-1").length)return c[0].scrollHeight;if(0===c.find(".defaultSlotUnavailable").length)return a;c=c[0].scrollHeight;
a<c&&(a=c);return a}function p(c){for(var a in c)if(c.hasOwnProperty(a))return!1;return!0}var u=c.$,A={default:function(c,a,b){c=u("\x3cdiv\x3e"+c+"\x3c/div\x3e");var e=c.find(".price_slot_ppu"),m=c.find("#ms3slot"),q=c.find("#twisterAvailability"),d=c.find("#deliveryPromisePrefix"),h=c.find(".variationReviewsSection"),r=b?[]:this.desktopConfiguratorSlotsInMainView,f=c.find(".twister_swatch_price");q.length&&((f.length||b)&&-1===r.indexOf("twisterAvailability")&&q.parent().addClass("aok-hidden"),
q.parent().append("\x3cdiv class\x3d'js-dummy-twister-availability'\x3e\x3c/div\x3e"),q.parent().find(".a-size-medium").removeClass("a-size-medium").addClass("a-size-small"),q.parent().find(".a-size-mini").removeClass("a-size-mini").addClass("a-size-small"),q.parent().find(".a-size-large").removeClass("a-size-large").addClass("a-size-small"),a&&this.logger.logAvailabilitySlotRender());0<f.length?(-1===r.indexOf("price")&&f.addClass("aok-hidden"),f.addClass("inline-twister-swatch-price"),b=c.find(".a-price"),
0<b.length?b[0].dataset&&(b[0].dataset.aSize=this.auiPriceSize):(f.find(".a-size-small").removeClass("a-size-small").addClass("a-size-base").addClass("a-color-base"),f.find(".a-size-mini").removeClass("a-size-mini").addClass("a-size-base").addClass("a-color-base"),f.find(".a-size-large").removeClass("a-size-large").addClass("a-size-base").addClass("a-color-base")),b="a-size-small",f.find(".olpWrapper").removeClass("a-size-mini a-size-micro a-size-medium a-size-large a-size-base a-color-base").addClass(b),
e.length&&(b="twister-plus-inline-twister-ppu a-size-micro",e.removeClass("a-size-mini a-size-small a-size-medium a-size-large a-size-base a-color-base").addClass(b),a&&this.logger.logPPUSlotRender()),a&&this.logger.logPriceSlotRender()):(f=c.find("#sndbox-mobile-twister-price"),0<f.length&&a&&this.logger.logPriceSlotRender());m.length&&(m.find(".a-icon-mini").removeClass("a-icon-mini").addClass("a-icon-small"),-1===r.indexOf("ms3")&&m.addClass("aok-hidden"),a&&this.logger.logPrimeSlotRender());0<
d.length&&(d.removeClass("a-size-small a-color-secondary").addClass("a-color-base"),-1===r.indexOf("deliveryPromise")&&d.parent().addClass("aok-hidden"),d.find("br").remove(),e=d.find("b"),0===e.length&&(e=d.find("span")),e.length&&(m=" "+w(e.text()),e.addClass("aok-hidden"),d.append('\x3cspan style\x3d"font-weight: bold;"\x3e'+m+"\x3c/span\x3e")),a&&this.logger.logDeliverySlotRender());0<h.length&&(h.removeClass("a-spacing-micro a-spacing-top-micro").addClass("a-spacing-none a-spacing-top-none"),
-1===r.indexOf("variationReviews")&&h.addClass("aok-hidden"),a&&this.logger.logReviewsSlotRender());t.executeModifiers(c);return c.html()}};n.prototype={get:function(c,a,b,e,m,q,d){var h=this,r=this.twisterCore.slotsDimSum.get([c]);if(r[c])return z.call(h,r[c].Value,!1,d);var p=f(b,a,h.slotIdentifierMap,d);l.call(this,c,a,function(a){p.promise(z.call(h,a.Value,!0,d),q)},m,e);return p.loadingHtm},setState:function(c,a,b){this.minSlotHeight[a]||(this.minSlotHeight[a]=[]);this.maxSlotHeight[a]||(this.maxSlotHeight[a]=
[]);this.minSlotHeight[a][b]=this.minSlotHeight[a][b]||0;this.minSlotHeight[a][b]=x(c,this.minSlotHeight[a][b]);this.maxSlotHeight[a][b]=this.maxSlotHeight[a][b]||0;var e=this.maxSlotHeight[a];var m=this.maxSlotHeight[a][b];!c||0===c.length||0<c.find(".loading-indicator-1").length||(c=c[0].scrollHeight,m<c&&(m=c));e[b]=m;this.maxSlotHeight[a][b]=this.maxSlotHeight[a][b]>this.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=0<h.closest(".reduced-image-swatch-margin").length,d=h.outerWidth(),h=h.outerHeight(),r=r?k.REDUCED_IMAGE_SWATCH_SPACING:k.DEFAULT_IMAGE_SWATCH_SPACING,f.css({marginLeft:r/2+"px",marginRight:r/
2+"px"}));f.width(d);f.height(h);c.each(b,function(){m.append(f.clone().addClass("side-sheet-loader-1"))});d=m.clone();d.find(".side-sheet-loader-1").removeClass("side-sheet-loader-1").addClass("side-sheet-loader-2");e.append(d);a=p(a);e.prepend(a);e=e[0].outerHTML;this.sideSheet.updateWidth(this.getWidth(b,r));this.sideSheet.open(e)},update:function(a){this.mainViewDimContainer=u("#inline-twister-row-"+a.dimKey+" #tp-inline-twister-dim-values-container");var b=this.mainViewDimContainer.clone(),e=
b.find(A.DIMENSION_VALUES_LIST);e.attr("id",a.dimKey+"dim_list");var c=p(a);b.prepend(c);e.children().slice(1).removeClass("aok-hidden");e.attr("data-a-button-group",'{"name":"sec_'+a.dimKey+'"}');this.sideSheet.updateContent(b[0].outerHTML);a=this.sideSheet.container;this.swatchList=a.find(A.DIMENSION_VALUES_LIST).children().slice(1);f(this.swatchList,this.activeDimKey);this.dimValContainer=a.find(".desktop-configurator-side-sheet-content-header .dim-value");w.call(this,this.swatchList)},close:function(){this.sideSheet.close()},
registerToggleButtonGroup:function(a,b,e){var m=A.SEC_VIEW_TOGGLE_BUTTON_PREFIX+a,f=this;this.updateSideSheetStatus[a]=e;c.on("a:button-group:"+m+":toggle",function(d){f.sideSheet.close();d.selectedButton.buttonGroupName=a;b(d.selectedButton,a)})},updateDimVal:function(a){this.dimValContainer&&this.dimValContainer.length&&this.dimValContainer.text(a.subText)},getScrollbarWidth:function(){if(this.scrollbarWidth)return this.scrollbarWidth;var a=document.body?C.innerWidth-document.body.clientWidth:-1;
0>a&&(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<a.length)?a[a.length-2]:!1}function p(a,b,e,c){c=c&&0<c.length?c:a.find(".a-button");b&&!e?(c.addClass("text-swatch-button-with-slots").removeClass("text-swatch-button"),a.find("hr").show(),a.find("hr").removeClass("aok-hidden")):(c.removeClass("text-swatch-button-with-slots").addClass("text-swatch-button"),a.find("hr").hide(),a.find("hr").addClass("aok-hidden"))}return{alignTextSwatches:function(a,
b,e){var f=0,q,d;c.each(a,function(a){a.domNode&&(a.isVisible||b||e)&&(q=a.domNode.attr("data-idxInToggleSwatchList"),d=e?t("#desktop-configurator-side-sheet").find("[data-idxInToggleSwatchList\x3d"+q+"]"):a.domNode,a=d.find(".swatch-title-text-display"),a.length&&a[0].style.removeProperty("height"),a=a?a.height():0,f<a&&(f=a))});c.each(a,function(a){a.domNode&&(a.isVisible||b||e)&&(q=a.domNode.attr("data-idxInToggleSwatchList"),d=e?t("#desktop-configurator-side-sheet").find("[data-idxInToggleSwatchList\x3d"+
q+"]"):a.domNode,d.find(".swatch-title-text-display").height(f))})},createSwatch:function(a,b,e,c,f,d,h){var k=!b.unavailable,l=b.isVisible,n=b.selected,u=b.showSlot,t=b.slotHtm;e="#"+e;if(d.length)return d=d.clone(),d.removeClass("swatch-prototype"),f&&d.addClass("slots-hidden"),d.attr("data-idxInToggleSwatchList",c),c=d.find(e).attr("id",b.id),d.find(e+"-announce").attr("id",b.id+"-announce"),d.find("input").attr({name:b.name,"aria-labelledby":b.id+"-announce"}),d.find("text"===a?".swatch-title-text-display":
"square_image"===a?".swatch-title-text":".swatch-text").text(b.text),k||c.addClass("a-button-unavailable"),n&&c.addClass("a-button-selected"),"text"!==a&&(n=d.find(".swatch-image"),n.addClass("inline-twister-manual-load"),n.attr({"data-a-image-source":b.image||"",id:"inline-twister-image-"+b.name,alt:b.text})),n=d.find(".dimension-slot-info"),n.length&&(n.attr("id","dimension-slot-info-"+b.name),u?k?0<t.length&&n.html(t):n.html(b.defaultSlotUnavailable):d.find("text"===a?".slots-padding":".dimension-slot-info").addClass("aok-hidden"),
"text"===a&&p(d,u,f,c)),h.append(d),l||d.addClass("aok-hidden"),d},getThumbnailImageUrlForPhysicalId:function(a){return a&&a.length&&(a=a.split("."),2<a.length)?(a.splice(-2,1,f()),a.join(".")):!1},updateSlotSectionInTextSwatch:p}}();var z=function(f){function p(a,b,e,c,q,d,h,k){this.id=a.id;this.unavailable=!!a.unavailable;this.selected=!!a.selected;this.showSlot=a.showSlot;this.slotHtm=a.slotHtm;this.isImageSwatch=!b;this.asin=a.asin;this.pageUrl=a.pageUrl;this.hideSlotsFromMainView=q;var l=b?"text":
a.isCirclularImageSwatch?"circular_image":"square_image";this.domNode=k?t(k):f.createSwatch(l,a,e,c,q,d,h);this.isVisible=a.isVisible;this.imageUrl=a.image;this.popoverImage=a.popoverImage;this.isSlotVisible=!0;this.slotNodeIdentifier=b?".slots-padding":".dimension-slot-info";this.title=a.text;this.name=a.name;this.subscribeToHoverEvent(e)}p.prototype={setState:function(a,b,e,c){this.selected=!!a.selected;this.updateAvailablity(a);this.updateSlotNode(a,b,e);this.updateVisibility(a);this.updateSwatchIndexInDomNode(c);
return this},getSlotNode:function(a){this.slotNode||(this.slotNode=this.domNode.find(n.SLOT_NODE_SELECTOR));if(!a)return this.slotNode;a=this.slotNode?this.slotNode.attr("id"):"";return t("#desktop-configurator-side-sheet").find("#"+a)},updateSlotNode:function(a,b,e){this.slotNode||(this.slotNode=this.domNode.find(n.SLOT_NODE_SELECTOR));this.showSlot!==a.showSlot&&((this.showSlot=a.showSlot)?this.domNode.find(this.slotNodeIdentifier).removeClass("aok-hidden"):this.domNode.find(this.slotNodeIdentifier).addClass("aok-hidden"),
this.isImageSwatch||f.updateSlotSectionInTextSwatch(this.domNode,this.showSlot,this.hideSlotsFromMainView));this.slotHtm!==a.slotHtm&&(b&&t("#tp-inline-twister-sec-view-"+e+" #"+this.slotNode.attr("id")).html(a.slotHtm),this.slotNode.html(a.slotHtm),this.slotHtm=a.slotHtm)},updateAvailablity:function(a){this.toggleButton||(this.toggleButton=this.domNode.find(n.TOGGLE_BUTTON_SELECTOR));(this.unavailable=a.unavailable)?this.toggleButton.addClass(l.A_BUTTON_UNAVAILABLE):this.toggleButton.removeClass(l.A_BUTTON_UNAVAILABLE)},
updateSelection:function(){this.toggleButton||(this.toggleButton=this.domNode.find(n.TOGGLE_BUTTON_SELECTOR));this.selected?(this.toggleButton.addClass(l.A_BUTTON_SELECTED),this.toggleButton.removeClass(l.A_BUTTON_UNAVAILABLE)):(this.toggleButton.removeClass(l.A_BUTTON_SELECTED),this.toggleButton.removeClass(l.A_BUTTON_FOCUS))},updateVisibility:function(a){a.isVisible?this.domNode.removeClass(l.AOK_HIDDEN):this.domNode.addClass(l.AOK_HIDDEN);this.isVisible=a.isVisible},subscribeToHoverEvent:function(a){a=
"desktop-configurator-swatch-hover:"+a;try{c.declarative.remove(this.domNode,a),c.declarative.create(this.domNode,a,{})}catch(b){y.log("Hover event subscribe failed with error: "+this.name,w.ERROR,w.ATTRIBUTION)}},updateSwatchIndexInDomNode:function(a){this.domNode&&this.domNode.attr("data-idxInToggleSwatchList",a)},getTopPosition:function(){var a=this.domNode.position();return this.topPosition=a?a.top:0}};return p}(k),x=function(f,p){function a(a,e,f,q){var d=this;this.isTextSwatch=a.isTextSwatch;
this.name=a.name;this.domNode=t(n.EXPANDER_CONTENT_PREFIX+a.name);this.title=q;this.selectedSwatch=null;this.swatches={};this.orderedSwatchList=[];this.initialVisibleSwatchList={};this.swatchIdxOrder=[];this.isPageRefreshActive=!1;this.totalSwatchCount=a.totalSwatchCount||0;this.onChange=a.onChange;this.hoverHandler=a.onHover;this.isUserInteracting=!1;this.autoNotificationCallback=e.autoNotificationCallback;this.rowContainer=f;this.swatchListContainer=this.domNode.find(n.DIMENSION_VALUES_LIST);this.markAutoUpdated=
!1;this.hideSlotsFromMainView=a.hideSlotsFromMainView;this.windowResizeCallback=e.windowResizeCallback;this.preserveNaturalSwatchOrder=a.preserveNaturalSwatchOrder;this.displaySwatches=[];this.numberOfSwatchesPerRow=0;this.swatchPrototypeNode=t("#"+a.name).closest(n.SWATCH_NODE_SELECTOR);this.swatchPrototypeNodeParent=this.swatchPrototypeNode.parent();c.on("a:button-group:"+this.name+":toggle",function(a){var b=parseInt(a.selectedButton.buttonName,10),e=d.swatches[b];e?d.isPageRefreshActive?(d.isUserInteracting=
!0,b=e.unavailable,e.updateSelection(),d.autoNotificationCallback&&d.autoNotificationCallback(b,!0),d.onChange&&d.onChange(d.swatches,a.selectedButton,d.markAutoUpdated),d.setAutoUpdated(!1)):e.pageUrl&&(C.location.href=e.pageUrl):(a="Selected swatch not found on toggle button click. Value clicked: "+b+" ; Swatch length: "+Object.keys(d.swatches).length,y.log(a,w.ERROR,w.ATTRIBUTION))});this.registerHoverDeclarative("desktop-configurator-swatch-hover:"+a.name);this.registerHoverDeclarative("desktop-configurator-swatch-hover:"+
a.name+"_sec",!0);if(this.isTextSwatch)c.on("resize",function(){0<d.displaySwatches.length&&(d.repopulateDisplaySwatches(),d.alignTextSwatches(),d.alignTextSwatchNodesInLastRow(),"function"===typeof d.windowResizeCallback&&d.windowResizeCallback(d.name))})}a.prototype={setState:function(a,e,f,q){var d=this,h,k=[],l=[],n=[];c.objectIsEmpty(e)||(c.each(e,function(e,c){if(!d.swatches[c]&&(a.swatches[c].isVisible||f)){var h=new p(a.swatches[c],d.isTextSwatch,d.name,c,d.hideSlotsFromMainView,d.swatchPrototypeNode,
d.swatchPrototypeNodeParent);h.subscribeToHoverEvent(d.name);d.swatches[c]=h;!d.isTextSwatch&&d.swatches[c]&&d.swatches[c].domNode&&n.push(d.swatches[c].domNode.find(".inline-twister-manual-load")[0])}l[e]=c}),this.swatchIdxOrder=l,q||(this.resetToggleSwatchContainer(),this.displaySwatches=[]),c.each(this.swatchIdxOrder,function(a,b){if(a=d.swatches[a])a&&d.swatchListContainer.append(a.domNode),a&&a.subscribeToHoverEvent(d.name),d.addToDisplaySwatches(a,d.displaySwatches)}));c.each(a.swatches,function(a,
b){if(d.swatches[b])h=a.selected?d.swatches[b]:h,d.swatches[b].selected=!!a.selected,k.push({index:b,data:a});else{if(a.isVisible||f)d.swatches[b]=new p(a,d.isTextSwatch,d.name,b,d.hideSlotsFromMainView,d.swatchPrototypeNode,d.swatchPrototypeNodeParent),d.swatches[b].subscribeToHoverEvent(d.name),d.addToDisplaySwatches(d.swatches[b],d.displaySwatches),!d.isTextSwatch&&d.swatches[b]&&d.swatches[b].domNode&&n.push(d.swatches[b].domNode.find(".inline-twister-manual-load")[0]);a.selected&&(h=d.swatches[b])}});
this.selectedSwatch&&this.selectedSwatch.updateSelection();h&&h.updateSelection();c.each(k,function(a,b){d.swatches[a.index].setState(a.data,f,d.name,a.index)});this.isTextSwatch&&(c.objectIsEmpty(e)?this.alignTextSwatchNodesInLastRow():this.alignTextSwatches());d.selectedSwatch&&h&&d.selectedSwatch!==h&&!d.isUserInteracting&&d.autoNotificationCallback(!0);d.selectedSwatch=h;d.isUserInteracting=!1;n.length&&c.loadImageManually(n);return this},getSlotNodes:function(a){return c.map(this.displaySwatches,
function(e){return c.map(e,function(e){return e.getSlotNode(a)})})},setUserInteracting:function(a){this.isUserInteracting=a},alignTextSwatches:function(a,e){c.each(this.displaySwatches,function(c){f.alignTextSwatches(c,a,e)})},alignTextSwatchNodesInLastRow:function(){var a=this.domNode.find(".inline-twister-swatch:not(.aok-hidden):not(.swatch-prototype)");if(1<a.length){var e=a[a.length-1],m=a[a.length-2];e&&m&&e.getBoundingClientRect().top===m.getBoundingClientRect().top&&(a=c.map(a.slice(a.length-
(a.length%this.numberOfSwatchesPerRow||this.numberOfSwatchesPerRow),a.length),function(a){return this.swatches[a.getAttribute("data-idxInToggleSwatchList")]},this),f.alignTextSwatches(a))}},resetToggleSwatchContainer:function(){var a=t(this.domNode.find(".a-button-list").children()[0]);this.swatchListContainer.html("");this.swatchListContainer.append(a)},getVisibleSwatchesSize:function(){var a=0;c.each(this.swatches,function(e,c){e.isVisible&&(a+=1)});return a},setAutoUpdated:function(a){this.markAutoUpdated=
a},getInitialVisibleSwatchList:function(){return this.initialVisibleSwatchList},getNumberOfSwatchesPerRow:function(){return this.numberOfSwatchesPerRow},setNumberOfSwatchesPerRow:function(a){a&&(this.numberOfSwatchesPerRow=a)},createSwatch:function(a,e){e=new p(a,this.isTextSwatch,this.name,a.name,this.hideSlotsFromMainView,this.swatchPrototypeNode,this.swatchPrototypeNodeParent,e);this.swatches[a.name]=e;this.initialVisibleSwatchList[a.name]=e;this.selectedSwatch=a.selected?e:this.selectedSwatch;
this.orderedSwatchList.push(e);return e},activatePageRefresh:function(){this.isPageRefreshActive=!0;this.domNode.find(".page-load-link").remove()},getSwatch:function(a){return this.swatches[a]?this.swatches[a]:{}},registerHoverDeclarative:function(a,e){var f=this;c.declarative(a,"mouseenter mouseleave",function(a){var b=a.$currentTarget[0].getAttribute("data-idxInToggleSwatchList"),b=f.getSwatch(b);a.data={slotNode:a.$currentTarget.find(b.slotNodeIdentifier),showImageInPopOver:b.isImageSwatch&&!!b.popoverImage,
unavailable:b.unavailable,showSlot:b.showSlot,selected:b.selected,title:b.title,name:b.name,id:e?b.id+"_sec":b.id,image:b.popoverImage};f.hoverHandler(f.name,a)})},addToDisplaySwatches:function(a,e){var c=l.ROW_IDENTIFIER_PREFIX;if(0===e.length)e.push([a]);else{var f=e[e.length-1];f&&f.length===this.numberOfSwatchesPerRow?e.push([a]):f.push(a)}this.removeSwatchRowIdentifier(a);a.domNode&&a.domNode.addClass(c+(e.length-1).toString())},repopulateDisplaySwatches:function(){if(0!==this.displaySwatches.length){var a=
[],e=0,f,p=this;c.each(this.displaySwatches,function(d,h){c.each(d,function(d,c){0===a.length?a.push([d]):0===e?(f=a[0][a[0].length-1],d.getTopPosition()!==f.getTopPosition()?(e=a[0].length,p.numberOfSwatchesPerRow=e,p.addToDisplaySwatches(d,a)):(a[0].push(d),p.removeSwatchRowIdentifier(d),d.domNode&&d.domNode.addClass(l.ROW_IDENTIFIER_PREFIX+(0).toString()))):p.addToDisplaySwatches(d,a)})});0===e&&(this.numberOfSwatchesPerRow=e=a[0].length);this.displaySwatches=a}},removeSwatchRowIdentifier:function(a){a.domNode&&
a.domNode.removeClass(function(a,b){return(b.match(/(^|\s)desktop-configurator-dim-row-\S+/g)||[]).join(" ")})},createDisplaySwatches:function(){var a=this;c.each(this.orderedSwatchList,function(e){a.addToDisplaySwatches(e,a.displaySwatches)})},removeMisplacedSwatch:function(){var a=this.displaySwatches[this.displaySwatches.length-1],e=a[a.length-1],c=e.name;e.domNode&&e.domNode.remove();delete this.swatches[c];this.selectedSwatch&&this.selectedSwatch.name===c&&(this.selectedSwatch=null);1<a.length?
a.pop():this.displaySwatches.pop()},removeInitiallyHiddenSwatches:function(){for(var a=this.domNode.find(".inline-twister-swatch.aok-hidden:not(.swatch-prototype)"),e=a.length-1;0<=e;e--){var c=a[e];c.parentNode.removeChild(c)}}};return a}(k,z),p=function(f){function p(a){this.mainText=a.mainText;this.subText=a.subText;this.dimKey=a.dimKey;this.titleSelectorPrefix=a.titleSelectorPrefix;this.titleValueSelector=a.titleValueSelector;this.domNode=t("#"+this.titleSelectorPrefix+this.dimKey)}p.prototype=
{refresh:function(){this.domNode.find("."+this.titleValueSelector).text(this.subText);this.domNode.removeClass("twister-plus-inline-twister-dim-required twister-plus-inline-twister-dim-required-delay")},setState:function(a){return c.equals(a,t.extend({},this))?this:(t.extend(this,a),this.refresh())},getData:function(){return{mainText:this.mainText,subText:this.subText}}};return p}(k),u=function(p,k,a){function b(a,b,p,d,h){function u(){x=x||w.domNode.find(".dimension-heading");x.css(f.BG_COLOR,f.GREEN_BG_COLOR);
c.delay(function(){c.animate(x,{"background-color":f.WHITE_BG_COLOR},200)},1E3)}var w=this;this.disableCollapseFunctionality=p.inlineTwisterData?p.inlineTwisterData.disableCollapseFunctionality:!1;this.stringTranslationMap=p.inlineTwisterData?p.inlineTwisterData.stringTranslationMap:{};this.title=b?new k(b):null;this.dimKey=p.dimKey;this.domNode=t("#"+a+this.dimKey);this.showSlot=p.showSlot;this.logger=h;this.isTwisterCoreInitialized=this.markAutoUpdated=!1;this.expanderContent=w.domNode.find(n.EXPANDER_CONTENT_PREFIX+
this.dimKey);this.expanderHeader=w.domNode.find(n.EXPANDER_HEADER_PREFIX+this.dimKey);this.icon=w.domNode.find(n.DIMENSION_EXPANDER_ICON_PREFIX+this.dimKey);this.expandedText=w.domNode.find(n.EXPANDED_DIMENSION_TEXT_PREFIX+this.dimKey);this.collapsedText=w.domNode.find(n.COLLAPSED_DIMENSION_TEXT_PREFIX+this.dimKey);this.rowCallbacks=d;this.autoNotificationExpanded=w.domNode.find(n.AUTO_NOTIFICATION_EXPANDED);this.autoNotificationExpandedText=w.autoNotificationExpanded.text();this.imageThumbnail=w.domNode.find(n.IMAGE_THUMBNAIL);
this.sideSheetLink=this.domNode.find(".tp-side-sheet-link-container");this.isExpanded=this.expanderContent.hasClass("dimension-expander-content-expand");var x;this.autoNotificationCallback=function(a,e){var b=w.autoNotificationExpandedText;a?w.isExpanded&&e?(w.autoNotificationExpanded.find("."+l.A_COLOR_ATTAINABLE).html(b),w.autoNotificationExpanded.removeClass(l.AOK_HIDDEN)):(u(),w.setAutoUpdated(!0)):w.hideAutoNotification()};this.disableCollapseFunctionality||c.declarative("toggle-dimension-expander-"+
this.dimKey,"click",function(a){w.isExpanded?w.collapse():w.expand();w.hideAutoNotification()})}b.prototype={setState:function(a,b,c,d,f,p){this.toggleSwatch&&c!==this.dimKey&&this.autoNotificationExpanded.addClass(l.AOK_HIDDEN);a&&this.toggleSwatch&&this.toggleSwatch.setState(a,b,f,p);f||d&&this.title&&this.title.setState(d)},expand:function(){this.expanderContent&&this.expanderContent.css("visibility","");this.expanderContent&&this.expanderContent.addClass(l.DIMENSION_EXPANDER_CONTENT_EXPAND);this.icon&&
this.icon.addClass(l.ROTATE);this.expandedText&&this.expandedText.removeClass(l.AOK_HIDDEN);this.collapsedText&&this.collapsedText.addClass(l.AOK_HIDDEN);this.imageThumbnail.addClass(l.AOK_HIDDEN);this.isExpanded=!0;var a={dimKey:this.dimKey};"function"===typeof this.rowCallbacks.handleDimensionExpansion&&this.isTwisterCoreInitialized&&this.rowCallbacks.handleDimensionExpansion(a,this.showSlot,!0);if(this.expanderHeader){var a=this.stringTranslationMap?this.stringTranslationMap.expanderHeaderAriaLabel:
"",b=this.title.getData(),a=a.replace("###dimension",b.mainText).replace("###value",b.subText),a=a+" "+(this.stringTranslationMap?this.stringTranslationMap.tapToCollapse:"");this.expanderHeader.attr("aria-label",a);this.expanderHeader.find(n.DIMENSION_EXPANDER_ICON_WRAPPER).attr("aria-label",a)}this.markAutoUpdated&&(this.logger.logDimExpansionAfterAutoUpdate(),this.markAutoUpdated=!1)},collapse:function(){this.expanderContent&&this.expanderContent.removeClass(l.DIMENSION_EXPANDER_CONTENT_EXPAND);
this.expanderContent&&this.expanderContent.css("visibility","hidden");this.icon&&this.icon.removeClass(l.ROTATE);this.expandedText&&this.expandedText.addClass(l.AOK_HIDDEN);this.collapsedText&&this.collapsedText.removeClass(l.AOK_HIDDEN);this.imageThumbnail.removeClass(l.AOK_HIDDEN);this.isExpanded=!1;var a={dimKey:this.dimKey};"function"===typeof this.rowCallbacks.handleDimensionExpansion&&this.isTwisterCoreInitialized&&this.rowCallbacks.handleDimensionExpansion(a,this.showSlot,!1);this.autoNotificationExpanded.addClass(l.AOK_HIDDEN);
if(this.expanderHeader){var a=this.stringTranslationMap?this.stringTranslationMap.expanderHeaderAriaLabel:"",b=this.title.getData(),a=a.replace("###dimension",b.mainText).replace("###value",b.subText),a=a+" "+(this.stringTranslationMap?this.stringTranslationMap.tapToExpand:"");this.expanderHeader.attr("aria-label",a);this.expanderHeader.find(n.DIMENSION_EXPANDER_ICON_WRAPPER).attr("aria-label",a)}},setUserInteracting:function(a){this.toggleSwatch&&this.toggleSwatch.setUserInteracting(a)},setExpanderHeaderAriaLabel:function(a,
b){a=this.expanderHeader.attr("aria-label").replace(a.subText,b.subText);this.expanderHeader.attr("aria-label",a);this.expanderHeader.find(n.DIMENSION_EXPANDER_ICON_WRAPPER).attr("aria-label",a)},setThumbnailImage:function(a){(a=p.getThumbnailImageUrlForPhysicalId(a))&&this.imageThumbnail.attr("src",a)},setAutoUpdated:function(a){this.markAutoUpdated=a;this.toggleSwatch&&this.toggleSwatch.setAutoUpdated(a)},getInitialVisibleSwatchList:function(){return this.toggleSwatch?this.toggleSwatch.getInitialVisibleSwatchList():
{}},getSwatch:function(a){return this.toggleSwatch?this.toggleSwatch.getSwatch(a):{}},activatePageRefresh:function(){this.toggleSwatch&&this.toggleSwatch.activatePageRefresh()},showSideSheetLink:function(){this.sideSheetLink.removeClass("aok-hidden")},hideSideSheetLink:function(){this.sideSheetLink.addClass("aok-hidden")},setMaxHeight:function(a){this.expanderContent.css("max-height",a)},triggerExpandOrCollapseAnimation:function(a,b,c){var d=this;this.expanderContent.animate({"max-height":a+"px"},
b,function(){d.setMaxHeight("");c&&c()})},getDisplaySwatches:function(){return this.toggleSwatch?this.toggleSwatch.displaySwatches:[]},createDisplaySwatches:function(){this.toggleSwatch&&this.toggleSwatch.createDisplaySwatches()},hideAutoNotification:function(){this.autoNotificationExpanded.addClass(l.AOK_HIDDEN)},initializeComponents:function(b,f,p){if(!this.toggleSwatch&&b){var d=this.title.getData();this.toggleSwatch=new a(b,{windowResizeCallback:p.handleWindowResize,autoNotificationCallback:this.autoNotificationCallback},
this.domNode,d.mainText)}this.isTextSwatch=b?b.isTextSwatch:!0;this.rowCallbacks=c.extend(this.rowCallbacks,p);this.totalSwatchCount=b?b.totalSwatchCount:0;this.showSlot=f;var h=this;c.declarative("open-desktop-configurator-side-sheet:"+this.dimKey,"click",function(){"function"===typeof h.rowCallbacks.showSideSheet&&h.isTwisterCoreInitialized&&(h.rowCallbacks.showSideSheet(h.dimKey,h.showSlot,h.title.getData()),h.hideAutoNotification())})},postInitialize:function(){this.isTwisterCoreInitialized=!0;
var a={dimKey:this.dimKey};this.toggleSwatch&&this.toggleSwatch.removeInitiallyHiddenSwatches();this.isExpanded&&this.rowCallbacks.handleDimensionExpansion(a,this.showSlot,!0)}};return b}(k,p,x);return{Swatch:z,ToggleSwatch:x,Title:p,Row:u,utils:k}});"use strict";y.when("A","detail-page-side-sheet-handlers").register("detail-page-side-sheet",function(c,k){function t(c){var f=c.id&&"string"===typeof c.id,n=1===z("#"+c.id).length;if(f&&n)this.id=c.id,this.shouldRenderHTMLString=!!c.shouldRenderHTMLString,
this.animationDuration=c.animationDuration||300,this.container=k.getContainer(c.id),this.onBeforeShow=c.onBeforeShow,this.onAfterHide=c.onAfterHide,f=c.width||580,(n=this.container)&&n.width(f),w(c.id,f),l.call(this);else throw c="Side sheet initialisation failed: "+(f?"Side sheet not present in DOM, or multiple instances of side sheet ID "+c.id+" exist":"Invalid Side sheet ID"),y.log(c,"ERROR","DetailPageSideSheet"),c;}function n(c){var f=this.container;c=this.shouldRenderHTMLString?z(c):z(c).clone();
f.html(c);c.css("display","block");f.removeClass("aok-hidden")}function l(){var f=this;c.declarative("close-detail-page-side-sheet:"+this.id,"click",function(){f.close()});c.declarative("open-detail-page-side-sheet:"+this.id,"click",function(c){f.open(c&&c.data?c.data.content:null)})}function f(c){c.code&&"escape"===c.code.toLowerCase()&&(this.close(),document&&document.removeEventListener("keydown",x))}function w(c,f){c=z("#"+c+"-background .close-button");c.length&&(c[0].style.marginRight=f+10+
"px")}var z=c.$,x=null;t.prototype={open:function(c){if(c&&"string"===typeof c){n.call(this,c);if(this.onBeforeShow)this.onBeforeShow();k.showSideSheet(this.id,this.animationDuration);x=f.bind(this);document&&document.addEventListener("keydown",x)}else y.log("Invalid side sheet content. Side sheet ID: "+this.id,"ERROR","DetailPageSideSheet")},close:function(){k.closeSideSheet(this.id,this.animationDuration);k.resetSideSheetContainer(this.container);if(this.onAfterHide)this.onAfterHide()},updateWidth:function(c){var f=
this.container;f&&f.width(c);w(this.id,c)},updateContent:function(c){c&&"string"===typeof c?n.call(this,c):y.log("Invalid side sheet content. Side sheet ID: "+this.id,"ERROR","DetailPageSideSheet")}};return t});"use strict";y.when("A").register("detail-page-side-sheet-handlers",function(c){function k(c,k){l("#"+c+" .detail-page-side-sheet-content").show(function(){n({right:"0px"},c,k)})}function t(c,k){l("#"+c+" .detail-page-side-sheet-content").show(function(){n({right:"-600px"},c,k)})}function n(f,
k,n){c.animate(l("#"+k+" .detail-page-side-sheet-content"),f,n)}var l=c.$;return{showSideSheet:function(c,n){l("body").css("overflow","hidden");l(".detail-page-side-sheet-darken-bg").removeClass("aok-hidden");l("#"+c).removeClass("aok-hidden");k(c,n)},closeSideSheet:function(c,k){t(c,k);l(".detail-page-side-sheet-darken-bg").addClass("aok-hidden");l("#"+c).addClass("aok-hidden");l("body").css("overflow","scroll")},getContainer:function(c){return l("#"+c).find(".detail-page-side-sheet-content")},resetSideSheetContainer:function(c){c.html("")}}})});