(function(g){var f=window.AmazonUIPageJS||window.P,n=f._namespace||f.attributeErrors,a=n?n("CommonDetailPageScripts",""):f;a.guardFatal?a.guardFatal(g)(a,window):a.execute(function(){g(a,window)})})(function(g,f,n){g.when("jQuery","jumpLink").execute(function(a,b){var f=a("#miniATFUDP"),k=0;0<f.length&&(k=f.height()+9);0<a("#reviewStarsLinkedCustomerReviews").length&&b.bind("#reviewStarsLinkedCustomerReviews",10,k);0<a("#askATFLink").length&&b.bind("#askATFLink",10,k);g.when("cf").execute(function(g){0<
a("#important-information a[href\x3d'#legal-disclaimer']").length&&b.bind("#important-information a[href\x3d'#legal-disclaimer']",10,k,!0)});b.bind("#seeMoreDetailsLink",300,k)});"use strict";g.when("A","jQuery","ImageBlockATF","jumpLink","cf").register("miniATFUtils",function(a,b,n,k){function x(e){r&&!e||t||(e=(new Date).getTime()-y,e=50>e?50-e:10,r=1,r=0,y=(new Date).getTime(),setTimeout(function(){var e=u.scrollTop(),a=b("#miniATFUDP");if(0<a.length){var c=z;if("T1"===c){c=b("#sims_fbt");if(0>=
c.length||0>=c.height())c=b("#buyxgety_feature_div");var d=c;c=Number.MAX_VALUE;if(d&&0<d.length){var l=d.height();d=d.offset();l&&d&&(c=d.top+l)}c=Math.min(c,1200)}else if("T2"===c){c="#product-details-grid_feature_div #prodDetails #important-information_feature_div #importantInformation #detail-bullets #detail_bullets_id #technical-data #technicalSpecifications_feature_div #productDescription #product-description-iframe #dpx-btf-hlcx-comparison_feature_div #HLCXComparisonWidget_feature_div".split(" ");
d=Number.MAX_VALUE;for(l=0;l<c.length;l++){var h=b(c[l]);if(h&&0<h.length&&0<h.height()){var m=Number.MAX_VALUE;h&&0<h.length&&(h=h.offset())&&(m=h.top);m<d&&(d=m)}}c=Math.min(d,1700)-100}else c=void 0;e>c?!v&&a.is(":hidden")&&(a.removeClass("a-hidden"),a.slideDown(200)):(a.slideUp(200),v=0)}},e))}k=b("#miniATFUDP");var A=b("#miniATFPartialSelection")[0],p=b(".twister-dropdown-highlight")[0];if(!(0>=k.length)){var v=0,y=0,r=0,q={},t=0,w=0,z="T2";q.setMiniATFShowHeight=function(b){z=b};q.setMiniATFScrollUpHeight=
function(a){w=0;"T1"===a&&(a=b("#productTitle"),0<a.length&&(a=a.offset())&&(w=a.top-20))};b("body").delegate(".go-to-top","click",function(){b("body, html").animate({scrollTop:w},300);v=1;A&&p&&(b(p).removeClass("transparentTwisterDropdownBorder"),b(p).addClass("highlightTwisterDropdownBorder"));return!1});A&&p&&b(p).click(function(){b(this).addClass("transparentTwisterDropdownBorder");b(this).removeClass("highlightTwisterDropdownBorder")});var u=b(f);u.scroll(function(){x(0)});u.resize(function(){x(1)});
g.when("ImageBlockBTF").execute(function(e){var g=function(a){var m=a.getState().selected_variations;if(m){var c="",d=a.getState().variation_display_labels;b.each(e.visualDimensions,function(a,b){a=1===e.gIsNewTwister?b:d[b];m[a]&&(c+=" "+m[a])});return c&&c.substring(1)}},f=e.defaultColor,c=f,d=e.landingAsinColor,l,h=b("#miniATF_image");0<h.length&&(l=h.attr("src"));q.updateMiniATFDiv=function(){t=0;var a=b("#miniATF_image");0<a.length&&l&&a.attr("src",l)};a.on("image-block-twister-swatch-click",
function(a,b,h,k){t=1;a=(a=k?k:g(b))&&""!==a?a:f;a===d&&(a=f);a!==c&&(l=(b=a!==f&&a!==d?e:n)&&b.colorImages&&b.colorImages[a]&&0<b.colorImages[a].length&&b.colorImages[a][0]?b.colorImages[a][0].large:null,c=a)})});return q}});"use strict";g.when("ueCount","jQuery").execute(function(a,b){b("#miniATF_BackToTopLink").click(function(){a.incrementCounterByOne("sl_back_to_top_button_click_count")})});"use strict";g.when("jQuery","dp-util-cookie","cf").execute(function(a,b){"000-0000000-8675309"===a("#addToCart").find('input[name\x3d"session-id"]').val()&&
a("#addToCart").find('input[name\x3d"session-id"]').val(b("session-id"))})});
/* ******** */
(function(f){var a=window.AmazonUIPageJS||window.P,l=a._namespace||a.attributeErrors,b=l?l("DetailPageClimatePledgeFriendlyNewAssets",""):a;b.guardFatal?b.guardFatal(f)(b,window):b.execute(function(){f(b,window)})})(function(f,a,l){f.when("A","climate-pledge-friendly-csm-counters").register("cpf-dpx-handlers",function(b,c){function h(){return b.capabilities.isAmazonApp?"map":b.capabilities.tablet?"twb":b.capabilities.mobile?"mwb":"dsk"}function l(){return b.$("#cpf-manual-load").length&&b.$("#cpf-manual-load").is("[data-cpf-manual-load-flag]")}
b.declarative("CPF-ATF-LandingPageLink","click",{allowLinkDefault:!0},function(d){c.incrementCounter("cpf_dp_"+h()+"_dpcd_aflk")});b.declarative("CPF-BTF-LandingPageLink","click",{allowLinkDefault:!0},function(d){c.incrementCounter("cpf_dp_"+h()+"_dpcd_bflk")});b.declarative("a-modal","click",function(d){d=d.$currentTarget[0].id;-1!==d.indexOf("CPF-ATF-Card")?c.incrementCounter("cpf_dp_"+h()+"_dppb_bgck"):-1!==d.indexOf("CPF-BTF-Certificate-Card")&&c.incrementCounter("cpf_dp_"+h()+"_dpcd_cfcd")});
b.declarative("CPF-OpenExternalLink","click",function(d){var m=d.$currentTarget[0].firstChild.href;c.incrementCounter("cpf_dp_"+h()+"_dpcd_excf");b.capabilities.isAmazonApp?f.when("mash").execute(function(d){a.location=m}):a.open(m,"_blank")});f.when("A","a-sheet").execute("dp-cpf-bottom-sheet-atf-declarative-action",function(d,a){var b=d.$,e,g;d.declarative("dp-cpf-sheet-atf","click",function(k){k=k&&k.data||{};c.recordClick();c.incrementCounter("cpf_dp_"+h()+"_dppb_bgck");e&&e.destroy();k.preloadDomId||
f.log("missing preloadDomId in ATF bottom sheet trigger","ERROR","DetailPageClimatePledgeFriendlyNewAssets");var m=b("#"+k.preloadDomId);m.length&&m.find(".climatePledgeFriendlyATFFooter").length?(e=a.create({name:"dp-cpf-bottom-sheet-atf",preloadDomId:"dp-cpf-bottom-sheet-atf",height:1,closeType:"icon",sheetLabel:k.sheetLabel,sheetDescription:k.sheetDescription}),a.showSheet(e),d.on("a:sheet:afterShow:dp-cpf-bottom-sheet-atf",function(a){var b=m.clone().removeAttr("id");b.find(".dp-cpf-container-bottom-sheet-atf").attr("id",
"dp-cpf-bottom-sheet-atf-content");e.getContentContainer().append(b.html());var k=(g=e.getContentContainer().find(".dp-cpf-container-bottom-sheet-atf").first())&&g.innerHeight();var f=function(){var a=g&&g.find(".climatePledgeFriendlyATFFooter");a&&a.position&&a.position()&&(a.is(":last-child")&&7<e.getContentContainer()[0].scrollHeight-e.getContentContainer()[0].offsetHeight-e.getContentContainer()[0].scrollTop?a.addClass("climatePledgeFriendlyShadowBox"):!a.is(":last-child")&&a.position().top+a.outerHeight()>=
e.getContentContainer().outerHeight()-7?a.addClass("climatePledgeFriendlyShadowBox"):a.removeClass("climatePledgeFriendlyShadowBox"))};d.defer(function(){a.sheet.changeHeight({height:g?Math.ceil(g.innerHeight()+1):k,duration:.3});d.delay(f,500)});e.getContentContainer().scroll(d.throttle(f,150));c.incrementCounter("cpf_dp_"+h()+"_dpcd_atck");l()&&d.loadDescendantImagesManually(e.getContentContainer())})):c.incrementCounter("cpf_dp_"+h()+"_dppb_nr")});d.declarative("dp-cpf-sheet-atf-bottom","click",
function(a){a=a&&a.data||{};a.preloadDomId||f.log("missing preloadDomId in ATF bottom sheet secondary trigger","ERROR","DetailPageClimatePledgeFriendlyNewAssets");a=b("#"+a.preloadDomId);a.length?(a=a.clone().removeAttr("id"),a.find(".dp-cpf-container-bottom-sheet-atf-bottom").attr("id","dp-cpf-bottom-sheet-atf-bottom-content"),e.getContentContainer().replaceWith(a.html()),e.changeHeight({height:document.querySelector("#dp-cpf-bottom-sheet-atf-bottom-content").offsetHeight,duration:.2}),l()&&d.loadImageManually(b(".subAttributeCertIconATF")),
c.incrementCounter("cpf_dp_"+h()+"_dpcd_abck")):c.incrementCounter("cpf_dp_"+h()+"_dppb_snr")})});f.when("A").execute(function(a){a.on("a:image:lazyLoaded",function(a){a.hasClass("climatePledgeFriendlyLazyload")&&c.recordLazyLoad()});a.on("a:image:load:cpf-leaf",function(){c.recordImageLoad()})});f.when("A","a-sheet").execute("dp-cpf-bottom-sheet-declarative-action",function(a,b){var d=a.$,e;a.declarative("dp-cpf-sheet","click",function(g){g=g&&g.data||{};e&&e.destroy();g.preloadDomId||f.log("missing preloadDomId in BTF bottom sheet trigger",
"ERROR","DetailPageClimatePledgeFriendlyNewAssets");var k=d("#"+g.preloadDomId);k.length?(e=b.create({name:"dp-cpf-bottom-sheet",preloadDomId:"dp-cpf-bottom-sheet",height:1,closeType:"icon",sheetLabel:g.sheetLabel,sheetDescription:g.sheetDescription}),b.showSheet(e),a.on("a:sheet:afterShow:dp-cpf-bottom-sheet",function(b){var f=k.clone().removeAttr("id");f.find(".dp-cpf-container-bottom-sheet").attr("id","dp-cpf-bottom-sheet-content");e.getContentContainer().append(f.html());b.sheet.changeHeight({height:document.querySelector("#dp-cpf-bottom-sheet-content").offsetHeight,
duration:.3});c.incrementCounter("cpf_dp_"+h()+"_dpcd_cfcd");l()&&a.loadImageManually(d(".subAttributeCertIconBTF"))})):c.incrementCounter("cpf_dp_"+h()+"_dppb_bnr")})});c.recordLatency()});"use strict";f.when("dp-latency-marker").register("climate-pledge-friendly-csm-counters",function(){return{incrementCounter:function(a,c){c=c||1;c=(ue.count(a)||0)+c;ue.count(a,c)},recordLatency:function(){"function"===typeof a.uet&&a.uet("bb","climate-pledge-friendly-dpx",{wb:1});"function"===typeof a.uet&&a.uet("x1",
"climate-pledge-friendly-dpx",{wb:1});"function"===typeof a.uex&&a.uex("ld","climate-pledge-friendly-dpx",{wb:1})},recordClick:function(){"function"===typeof a.uet&&a.uet("af","climate-pledge-friendly-dpx-click",{wb:1});"function"===typeof a.uex&&a.uex("ld","climate-pledge-friendly-dpx-click",{wb:1})},recordImageLoad:function(){"function"===typeof a.uet&&a.uet("be","climate-pledge-friendly-dpx-image-loading",{wb:1});"function"===typeof a.uex&&a.uex("ld","climate-pledge-friendly-dpx-image-loading",
{wb:1})},recordLazyLoad:function(){"function"===typeof a.uet&&a.uet("cf","climate-pledge-friendly-dpx-image-loading",{wb:1});"function"===typeof a.uex&&a.uex("ld","climate-pledge-friendly-dpx-image-loading",{wb:1})}}})});
/* ******** */
(function(b){var c=window.AmazonUIPageJS||window.P,d=c._namespace||c.attributeErrors,a=d?d("PrimeOneClickAssets",""):c;a.guardFatal?a.guardFatal(b)(a,window):a.execute(function(){b(a,window)})})(function(b,c,d){b.register("PrimeOneClickCountdown",function(){function a(e,a,b,c,d){if(!(1>e)){var f=this;this.endTime=this.getCurrentTime()+e;this.expirationCallback=a;this.displayElement=b;this.displayEnabled=!!d;this.formatFunction=c;this.update();this.currentTimer=setInterval(function(){f.update()},6E4)}}
a.prototype.update=function(){var a=this.endTime-this.getCurrentTime();0>a&&(a=0);this.updateDisplay(a);0===a&&("function"===typeof this.expirationCallback&&this.expirationCallback(),this.destroy())};a.prototype.updateDisplay=function(a){this.displayElement&&this.displayEnabled&&(this.displayElement.innerHTML=this.getCountdownDisplay(Math.floor(a/3600),Math.floor(a%3600/60),a%60))};a.prototype.getCountdownDisplay=function(a,b,c){return"function"===typeof this.formatFunction?this.formatFunction(a,
b,c):a+"h "+b+"m "+c+"s"};a.prototype.enableDisplay=function(){this.displayEnabled=!0;this.update()};a.prototype.disableDisplay=function(a){this.displayEnabled=!1;a&&this.displayElement&&(this.displayElement.innerHTML="")};a.prototype.getCurrentTime=function(){return Math.floor(+new Date/1E3)};a.prototype.destroy=function(){clearTimeout(this.currentTimer)};return{Countdown:a}})});
/* ******** */