images-eu.ssl-images-amazon.com Open in urlscan Pro
2a02:26f0:7100::213:c6c8  Public Scan

URL: https://images-eu.ssl-images-amazon.com/images/I/41qpeTNicOL.js?AUIClients/EverywhereCartAsset
Submission: On July 11 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

(function(g){var e=window.AmazonUIPageJS||window.P,y=e._namespace||e.attributeErrors,b=y?y("EverywhereCartAsset",""):e;b.guardFatal?b.guardFatal(g)(b,window):b.execute(function(){g(b,window)})})(function(g,e,y){g.when("A","EwcUrl").register("EwcAjax",function(b,d){function a(a,e,q,n,h,g,t,p){return f.ajax({type:e,url:a,data:q,dataType:t||"html",timeout:5E3,beforeSend:p,success:function(f,m,z){var l=e&&"POST"===e.toUpperCase(),h=a&&-1!==a.indexOf(d.updateAction);l&&h&&b.trigger("ewc:cartUpdate:success");
return n(f,m,z)},error:h,complete:g})}var f=b.$;return{fetch:function(b,d,f,e,h,g){return a(b,"GET",d,f,e,h,g)},post:function(b,d,f,e,h,g,t){return a(b,"POST",d,f,e,h,g,t)},url:d}});"use strict";g.when("A","EwcAjax","EWCLogger","EWCManipulationUpdates","a-popover","a-dropdown","SmartWagonSideSheet").register("UpdateAction",function(b,d,a,f,m,l,q){function n(){return k(".ewc-active-cart--selected").find(".ewc-item:not(.ewc-item-deleted)").filter(function(c,a){return!k(a).data("removed")}).map(function(c,
a){c=a.getAttribute("data-itemid");var b=a.getAttribute("data-quantity")||1;a="pantry"===a.getAttribute("data-itemcategory");return c+"|"+b+(a?"|1":"")})}function h(){k(".ewc-active-cart--selected").find(".ewc-item:not(.ewc-item-deleted)").map(function(c,a){c=a.getAttribute("data-asin");a=a.getAttribute("data-itemid");q.resetPopoverInstance("preload-"+c+"-"+a)})}function u(c){c.hide(400,function(){k(this).remove()})}function t(){k(".ewc-item-delete-error-container").addClass("aok-hidden");k(".ewc-item-update-error-container").addClass("aok-hidden");
k(".ewc-item-sfl-error-container").addClass("aok-hidden")}function p(c){return k("#ewc-compact-body input[name\x3d"+c+"]").val()}function r(){var c=p("requestID"),a=p("timeStamp"),b=p("token");return{requestID:c,timeStamp:a,token:b}}function v(){k(".ewc-item").map(function(a,b){a=k(b);a.data("removed")&&u(a)})}function z(a){var c=a.find(".sc-quantity-update-message.sc-hidden");if(!(1>c.length)){var d="quantity-popover-"+a.data("itemid"),f={content:c.contents(),name:d,width:250};m.create(a.find(".sc-action-quantity"),
f).show();b.on("a:popover:invisible:"+d,function(a){m.remove(a.popover);c.remove()})}}function B(a,b){b&&b.split(",").map(function(c){c=a.find(".ewc-item[data-itemid\x3d"+c+"]");u(c)})}function C(a){var c=a.find(".ewc-pantry-box"),b=c.find(".ewc-item:not(.ewc-item-deleted)");c&&!b.length&&(a=a.find(".ewc-pantry-header"),u(c),u(a))}function G(a,b,d){a=k("#ewc-total-quantity");var c=parseInt(a.data("value")!==y?a.data("value"):a.val());e&&e.$Nav&&e.$Nav.when("api.setCartCount").run(function(a){a(parseInt(c),
!0)})}function K(){g.now("QuantitySelectorWidget","QuantitySelectorUtils").execute(function(a,b){if(a!==y&&b!==y){var c=k(".qs-widget-cart span[data-action\x3d'qs-widget-button-decl'], .ewc-sideSheet-visible span[data-action\x3d'qs-widget-button-decl']").toArray().map(function(a,c){return JSON.parse(a.getAttribute("data-qs-widget-button-decl")).qsUID});0<b.getActivatedQsWidgets().filter(function(a){return-1!==c.indexOf(a)}).length&&a.hideAllPopover()}})}function L(){if(""!==H){var a=l.getSelect("ewc-kebab-menu-"+
H);a&&a.update({})}}function M(c,b){var z=b.requestType+I++;a.logUECounter("EWC:"+b.logType+":Request");a.logCustomerClick(z);var m=c.data.itemid,g=c.data.cartType||"",l=g.replace("_Cart",""),F=c.data.brandId,q=c.data.asin,D=k("#sc-item-"+m).closest(".ewc-item"),p=D.closest(".ewc-active-cart"),A=D.find(".sc-list-loading-spinner");c=D.data("item-count");A.removeClass("aok-hidden");var w=D.data("related-item-ids")||"";w&&(m+=","+w);v();C(p);t();var x=n(),E={actionItemID:m,actionType:b.actionType,cartType:l,
almBrandId:F,activeItems:x?x.toArray():null},N=r();Object.keys(N).map(function(a){E[a]=N[a]});d.post(d.url.updateAction+b.refType+c,k.param(E,!0),function(c){a.logUECounter("EWC:"+b.logType+":Request:Success");if("Fresh"===l||"Local_Market"===l)O(q,!0),h();c.manipulations.map(function(a){f.execute(a,u)});B(p,w);G(p,m,g);D.addClass("ewc-wider-compact-view-only");e.$Nav.when("$","config").run(function(a,c){if(c&&c.ewc&&c.ewc.flyout){var b=c.ewc.flyout.cache();b&&e.setTimeout(function(){b.updateCacheAndEwcContainer()},
500)}});a.logCriticalFeatureLoaded(z,"1")},function(c){c&&(D.find(b.errorMessageSelector).removeClass("aok-hidden"),a.logUECounter("EWC:"+b.logType+":Request:Failed"),a.logError(c,{message:"EWC update request failed"}))},function(){A.addClass("aok-hidden");a.logContentLoaded(z)},"json")}function Q(a){return a.isItemSoldByCount?!JSON.parse(a.isItemSoldByCount):a.pickingStrategy?"bulk"===a.pickingStrategy||"catch"===a.pickingStrategy:!1}function O(a,d){var c=document.querySelectorAll('div[data-asin\x3d"'+
a+'"].ewc-item');if(1===c.length&&c[0]){try{var f=c[0].querySelector("span[data-action\x3d'qs-widget-button-decl']");var e=JSON.parse(f.getAttribute("data-qs-widget-button-decl")).qsUID}catch(S){e=void 0}(c=c[0].querySelector('[id*\x3d"qs-widget-button-"][id$\x3d"-announce"]'))&&c.textContent&&b.trigger("quantity-selector-widget:sync-stepper-quantity",a,d?"0":c.textContent,null,e)}}function J(c,b){var m=c.data("itemid"),g="ewc-update-"+I++;a.logUECounter("EWC:Update:Request");a.logCustomerClick(g);
var l=c.closest(".ewc-active-cart"),h=l.data("cartType"),F=c.find(".sc-list-loading-spinner");F.removeClass("aok-hidden");g=c.data("brandId");var p=c.data("item-count"),B=c.data("quantity");v();t();var C=n(),A={actionItemID:m,actionType:"update-quantity",cartType:"Retail",activeItems:C?C.toArray():null,quantity:b,almBrandId:g},w=r();Object.keys(w).map(function(a){A[a]=w[a]});d.post(d.url.updateAction+("?ref_\x3dewc_qty_update_"+p+"|"+B+"|"+A.quantity),k.param(A,!0),function(b){a.logUECounter("EWC:Update:Request:Success");
q.resetPopoverInstance("preload-"+c.attr("data-asin")+"-"+m);b.manipulations.map(function(a){f.execute(a,u)});G(l,m,h);z(k("#sc-item-"+m));e.$Nav.when("$","config").run(function(a,c){if(c&&c.ewc&&c.ewc.flyout){var b=c.ewc.flyout.cache();b&&e.setTimeout(function(){b.updateCacheAndEwcContainer()},500)}})},function(b){c.find(".ewc-item-update-error-container").removeClass("aok-hidden");a.logUECounter("EWC:Quantity:Request:Failed");a.logError(b,{message:"EWC update request failed"})},function(){F.addClass("aok-hidden");
a.logContentLoaded("ewc-update")},"json")}var k=b.$,I=1,R=1,P,H="";k(".ewc-scroller").bind("scroll",function(){K();L()});k(e).bind("scroll",function(){K();if(l.getSelect){var a=l.getSelect(k('[name\x3d"'+P+'"]'));a&&a.update({})}L()});b.declarative("ewc-kebab-menu-click","click",function(a){H=a.data.itemid});b.declarative("ewc-qty-dropdown-button","click",function(a){a.$target&&0<a.$target.size()&&a.$target[0].name&&(P=a.$target[0].name)});b.declarative("ewc-delete-item","click",function(a){M(a,{actionType:"delete",
requestType:"ewc-delete-",logType:"Delete",refType:"?ref_\x3dewc_delete_",errorMessageSelector:".ewc-item-delete-error-container"})});b.declarative("ewc-save-for-later","click",function(a){M(a,{actionType:"save-for-later",requestType:"ewc-sfl-",logType:"SaveForLater",refType:"?ref_\x3dewc_sfl_",errorMessageSelector:".ewc-item-sfl-error-container"})});b.on("quantity-selector-widget:action:QuantityChanged",function(b){var c="ewc-modify-"+I++;a.logUECounter("EWC:Modify:Request");a.logCustomerClick(c);
var m=b.itemId,g=k("#sc-item-"+b.itemId),l=g.closest(".ewc-active-cart"),q=l.data("cartType"),p=l.data("cartType").replace(/_Cart.*/g,""),B=g.find(".sc-list-loading-spinner");B.removeClass("aok-hidden");c=g.data("localmarketBrand");var C=g.data("item-count"),y=g.data("quantity"),A=b.asin;v();t();var w=n(),x={actionItemID:m,actionType:"update-quantity",cartType:p,almBrandId:c,activeItems:w?w.toArray():null};Q(b)?(x.amountInUom=b.quantity,x.quantity="1"):x.quantity=b.quantity;var E=r();Object.keys(E).map(function(a){x[a]=
E[a]});d.post(d.url.updateAction+("?ref_\x3dewc_qty_update_alm_"+C+"|"+y+"|"+x.quantity),k.param(x,!0),function(b){a.logUECounter("EWC:Modify:Request:Success");"Fresh"!==p&&"Local_Market"!==p||h();b.manipulations.map(function(a){f.execute(a,u)});O(A,!1);G(l,m,q);z(g);e.$Nav.when("$","config").run(function(a,b){if(b&&b.ewc&&b.ewc.flyout){var c=b.ewc.flyout.cache();c&&e.setTimeout(function(){c.updateCacheAndEwcContainer()},500)}});a.logCriticalFeatureLoaded("ewc-modify","1")},function(a){},function(){B.addClass("aok-hidden");
a.logContentLoaded("ewc-modify")},"json")});b.declarative("ewc-buy-item","click",function(b){var c="ewc-buynow-"+R++;a.logUECounter("EWC:BuyNow:Request");a.logCustomerClick(c);k("#ewc-buyNow-form-"+b.data.itemid).submit()});b.declarative("sc-item-action","click",function(a){var b=k("#sc-item-"+a.data.itemID);a=String(a.data.quantity);var c=b.data("minquantity");switch(a){case (c+9).toString():b.find(".a-dropdown-container:first").hide();b.find(".sc-quantity-textfield").show();b.find(".sc-quantity-textfield input").focus();
break;default:J(b,a)}});k("#nav-flyout-ewc").delegate(".sc-quantity-textfield","keydown",function(a){var b=k.event.fix(a),c=k(this),d=c.parent().closest(".ewc-item"),f=b.which;13===f||8===f||46===f||9===f||48<=f&&57>=f||96<=f&&105>=f?d.find(".sc-update-link").removeClass("aok-hidden"):a.preventDefault();13===b.which&&(10>c.val()&&(d.find(".sc-quantity-textfield").hide(),d.find(".a-dropdown-container").show()),c.val().match(/^\d+$/)?J(d,parseInt(c.val())):d.find(".ewc-item-update-error-container").removeClass("aok-hidden"))});
k("#nav-flyout-ewc").delegate(".sc-update-link","click",function(a){a=k(this).parent().parent().find(".sc-quantity-textfield");var b=a.parent().closest(".ewc-item");a.val().match(/^\d+$/)?J(b,parseInt(a.val())):b.find(".ewc-item-update-error-container").removeClass("aok-hidden")})});"use strict";g.when("A","load").execute("CFSDetail",function(b){e.amz_js_PopWin||(e.amz_js_PopWin=function(b,a,f){e.open(b,a,f).focus();return!1})});"use strict";g.when("A","load").execute("CollapseFullHeight",function(b){var d=
b.$;d(document).click(function(){var a=d(".ewc-compact-head");!0===a.hasClass("ewc-compact-head--open")&&(a.removeClass("ewc-compact-head--open"),d(".ewc-compact-head--multiple-carts .ewc-multi-cart-dropdown:visible").addClass("aok-hidden"))})});(function(b,d){b&&b.when("$","config","flyouts.anchor").run("ewc.resetArrowTemp",function(a,b,d){a(".nav-ewc-arrow").length&&a(".nav-ewc-arrow").detach().appendTo(d())})})(e.$Nav,g);"use strict";g.when("A","InitializeCompactBody","load","EWCLogger").register("EWCRefreshCallback",
function(b,d,a,f){return{update:function(){f.logUECounter("EWC:Refresh Callback:Request:Success")}}});"use strict";g.when("A","ShowMultiCart","SmartWagonSideSheet","load").register("InitializeCompactEWC",function(b,d,a){function f(){b.declarative("ewc-cart-header-click",["click"],d.onCartHeaderClick);e()}function e(){var b=g("#nav-flyout-ewc .nav-ewc-content")[0];b&&(new MutationObserver(function(){a.resetPopoverInstance()})).observe(b,{childList:!0})}var g=b.$;f();return{init:f}});"use strict";g.when("A",
"SetCompactBodyHeight","SetBodyScrollBackground","SmartWagonSideSheet","load").register("InitializeCompactBody",function(b,d,a,f){var g=b.$;g(e).bind("resize",function(){a.toggleBackgroundColorOnScrollState()});return{initializeCompactBody:function(e){d.setBodyHeight();a.toggleBackgroundColorOnScrollState();!e&&f.resetPopoverInstance&&f.resetPopoverInstance();b.trigger("quantity-selector-widget:initialize")}}});"use strict";g.when("A").execute("LocalMarketEverywhereCartClearPurchase",function(b){b.declarative("create-new-order-ultra-fast-grocery-action",
"click",function(d){var a=d.data.reservationData;b.$.ajax({type:"POST",url:"/uff/order-mod/selected-order/clear",data:{addressId:a.addressId,brandId:a.brandId,"anti-csrftoken-a2z":d.data.csrf},success:function(a,b){e.location.reload(!0)}})})});"use strict";g.when("A","load").register("SetAbsolutePosition",function(b){var d=b.$;return{setBodyAndHeadToAbsolutePosition:function(){"absolute"!==d("#ewc-compact-body").css("position")&&(d("#ewc-compact-body").css({position:"absolute"}),d(".ewc-compact-head").css({position:"absolute"}))}}});
"use strict";g.when("A","load").register("SetBodyScrollBackground",function(b){var d=b.$;return{toggleBackgroundColorOnScrollState:function(){var a=d("#ewc-compact-body .ewc-active-cart--selected");a.prop("scrollHeight")>d("#ewc-compact-body").innerHeight()?a.addClass("ewc-compact-body--scroll"):a.removeClass("ewc-compact-body--scroll")}}});"use strict";g.when("A","jQuery","load").register("SetCompactBodyHeight",function(b,d){return{setBodyHeight:function(){var a={height:"calc(100% - "+d(".ewc-compact-head").height()+
"px)"};d("#ewc-compact-body").css(a)}}});"use strict";g.when("A","SmartWagonSideSheet","load").register("ShowMultiCart",function(b,d){return{onCartHeaderClick:function(a){var f=b.$,g=f(".ewc-multi-cart-dropdown");if(!(1>=g.find(".ewc-cart-header").size())){var l=a.$event;a=a.$currentTarget.parent(".ewc-cart-header");var q=f(".ewc-compact-head");if(q.hasClass("ewc-compact-head--open")){if(!a.hasClass("ewc-cart-header--selected")){d.removeSmartWagon();var n=a.attr("data-cart-type");f(".ewc-cart-header.ewc-cart-header--selected").removeClass("ewc-cart-header--selected");
f(".ewc-active-cart.ewc-active-cart--selected").removeClass("ewc-active-cart--selected");f(".ewc-scroller.ewc-scroller--selected").removeClass("ewc-scroller--selected");f(".ewc-compact-actions.ewc-compact-actions--selected").removeClass("ewc-compact-actions--selected");a.addClass("ewc-cart-header--selected");f(".ewc-cart-header[data-cart-type\x3d'"+n+"']").addClass("ewc-cart-header--selected");f(".ewc-active-cart[data-cart-type\x3d'"+n+"']").addClass("ewc-active-cart--selected");f(".ewc-compact-actions[data-cart-type\x3d'"+
n+"']").addClass("ewc-compact-actions--selected");f(".ewc-active-cart[data-cart-type\x3d'"+n+"']").parent().addClass("ewc-scroller--selected");e.$Nav.when("$","config").run(function(a,b){if(b&&b.ewc&&b.ewc.flyout){var d=b.ewc.flyout.cache();d&&e.setTimeout(function(){d.updateCacheAndEwcContainer()},500)}})}g.addClass("aok-hidden");q.removeClass("ewc-compact-head--open")}else g.removeClass("aok-hidden"),q.addClass("ewc-compact-head--open");l.stopImmediatePropagation()}}}});"use strict";g.when("A").register("EWCManipulationUpdates",
function(b){var d=b.$;return{execute:function(a,b){var f=d(a.selector),e=a.content;switch(a.type){case "updateData":var g=a.dataAttributes;Object.keys(g).map(function(a){f.data(a,g[a])});break;case "remove":b(f);break;case "show":f.removeClass("aok-hidden");break;case "prepend":f.prepend(e);break;case "append":f.append(e);break;case "insert":f.after(e);break;case "replace":f.replaceWith(e)}}}});"use strict";g.when("A","a-popover","EwcAjax","query-param-helper").register("SmartWagonSideSheet",function(b,
d,a,f){function m(){var a=[];n(".ewc-active-cart--selected").find(".ewc-item").each(function(b,d){a.push(n(d).data("asin"))});return a.slice(0,30).join(";")}function l(){h.$container.removeClass("ewc-sideSheet-visible");v.hide();h.$container.animate({right:"-500px"},{duration:h.transitionDuration,complete:function(){u.hide();h.$container.addClass("aok-hidden");n("#nav-flyout-ewc").css("z-index","0")}})}function q(){!1!==h.$container.hasClass("ewc-sideSheet-visible")&&l()}var n=b.$,h={};h.$container=
b.$('\x3cdiv id\x3d"ewc-smart-wagon-desktop-sideSheet" class\x3d"celwidget" cel_widget_id\x3d"ewc-smart-wagon"\x3e\x3c/div\x3e');h.$container.addClass("aok-hidden");h.$container.appendTo("#nav-flyout-ewc");h.transitionDuration=500;var u=b.$('\x3cdiv id\x3d"ewc-smart-wagon-content"\x3e\x3c/div\x3e');u.appendTo(h.$container);var t=b.$("\x3cdiv id\x3d'ewc-smart-wagon-close-button' class\x3d'a-declarative' data-action\x3d'a-popover-floating-close'\x3e\x3c/div\x3e");t.appendTo(h.$container);t.click(q);
var p=b.$("\x3cdiv id\x3d'ewc-smart-wagon-loading-spinner' class\x3d'a-row a-spacing-top-medium aok-hidden'\x3e\x3cdiv class\x3d'a-spinner-wrapper'\x3e\x3cspan class\x3d'a-spinner a-spinner-medium'\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e");p.appendTo(h.$container);var r={};var v=b.$("\x3cdiv id\x3d'ewc-smart-wagon-popover-lgtbox' class\x3d'a-declarative a-modal' data-action\x3d'a-popover-floating-close'\x3e\x3c/div\x3e");v.hide();v.appendTo("#navbar");v.click(q);b.declarative("ewc-popover","mouseenter",
function(a){var f=a.data;r[a.data.name]||(f.dataStrategy="preload",r[a.data.name]=d.create(a.$target,f));r[a.data.name].show();a=b.state("changeProductRecommendationsPopoverText");e.ue&&e.ue.trigger&&(a&&a.state?e.ue.trigger("PAX_EWC_CHANGE_RECS_POPUP_TEXT_816203","T1"):e.ue.trigger("PAX_EWC_CHANGE_RECS_POPUP_TEXT_816203","C"))});b.declarative("ewc-popover","click",function(a){e.location=a.$currentTarget.find(".sc-product-link").attr("href")});t=function(){Object.keys(r).map(function(a){r[a]&&r[a].isActive()&&
r[a].hide()})};b.on("scroll",t);n(".ewc-scroller").bind("scroll",t);b.declarative("view-related-items","click",function(b){d.get(b.$currentTarget.closest(".a-popover")).hide();p.removeClass("aok-hidden");var e=n(".ewc-subtotal-value \x3e .ewc-currency-symbol")[0]?n(".ewc-subtotal-value \x3e .ewc-currency-symbol")[0].value+b.data.price:null;a.fetch("/cart/ewc/smart-wagon/"+b.data.asin,{asinsInCart:m(),currency:e,smartWagonType:b.data.smartWagonType,almStoreId:b.data.almStoreId,almBrandId:b.data.almBrandId,
unitOfMeasurePrice:b.data.unitOfMeasurePrice,pageAsin:b.data.asin,sourceItemId:b.data.itemid,pickUpInStore:b.data.pickUpInStore},function(a){u.html(a);u.show();g.when("A","p13n-sc-carousel").execute("activateSmartWagonCarousels",function(a,b){a=a.$;a("#smart-wagon-recommendations").find(".p13n-sc-carousel").each(b.initializeElement)});f.overwriteProductUrls(b.data.itemid)},function(a){a&&q()},function(){p.addClass("aok-hidden")});h.$container.css("right");h.$container.removeClass("aok-hidden");e=
n("#nav-flyout-ewc")[0].offsetWidth||0;h.$container.animate({right:e+"px"},{duration:h.transitionDuration,complete:function(){h.$container.addClass("ewc-sideSheet-visible")}},"linear");n("#nav-flyout-ewc").css("z-index","6000");v.show()});b.declarative("ewc-sw-continue-shopping","click",function(a){q()});return{removeSmartWagon:q,resetPopoverInstance:function(a){var b=r[a];if(b)return d.remove(b.$trigger),delete r[a];Object.keys(r).map(function(a){d.remove(r[a].$trigger)});r={}}}});"use strict";g.when("A").register("query-param-helper",
function(b){function d(a,b){if(b&&b.length&&a&&a.length){var d=a.prop("href");d&&d.length&&(b=d.substring(0,d.indexOf("?"))+b,a.attr("href",b))}}var a=b.$;return{overwriteProductUrls:function(b){var e=a("#ewc-smart-wagon-desktop-sideSheet a:has(.sc-product-title)"),f=a(".ewc-smart-wagon-item-image-container a");(b=a('div.ewc-item[data-itemid\x3d"'+b+'"]').find("a.sc-product-link"))&&1===b.length&&(b=b.prop("href"))&&b.length&&(b=b.substring(b.indexOf("?"),b.length),d(f,b),d(e,b))}}});"use strict";
g.register("EWCLogger",function(){function b(b,a,f){e.uet&&"function"===typeof e.uet&&(f?e.uet(b,a,f):e.uet(b,a))}return{logContentLoaded:function(b){e.uex&&"function"===typeof e.uex&&e.uex("ld",b)},logCriticalFeatureLoaded:function(d,a){b("cf",d,a)},logCustomerClick:function(d){b("tc",d)},logUECounter:function(b,a){"undefined"!==typeof e.ue&&"undefined"!==typeof e.ue.count&&e.ue.count(b,a||1)},logError:function(b,a){e.ueLogError&&(a=a||{},a.logLevel=a.logLevel||"ERROR",a.attribution=a.attribution||
"EWCAsset: Website \x3e Amazon Shopping Cart \x3e EWC",a.message=a.message||"",e.ueLogError(b,a))}}});"use strict";g.register("EwcUrl",function(){return{updateAction:"/cart/ewc/update"}})});