"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4376],{14376:function(n,t,e){e.r(t),e.d(t,{QubitUrgencyMessagingRenderer:function(){return Z}});var i,o,a,r,l,s,u=e(95235),d=e(8529),c=e(2784),g=e(52034),b=e(41857),f=e(7328),p=e(15754),v=e(25237),y=e.n(v),h=e(19453),m=e(48840),B=e(81292),q=e(87330),S=e(50556),M=e(97234),w=e(21025),k=e(28160),x=e(11669),j=e(34870),W=e(45082),C=e(52322),O=y()(function(){return Promise.resolve().then(e.bind(e,56407))},{loadableGenerated:{webpack:function(){return[56407]}}}),P=m.zo.div(i||(i=(0,f.Z)(["\n display: flex;\n position: relative;\n align-items: center;\n background-color: ",";\n padding: ","\n ",";\n opacity: 95%;\n\n "," {\n padding: "," ",";\n width: ",";\n }\n\n ",";\n "," {\n ",";\n }\n\n ","\n\n ","\n"])),function(n){return n.theme.colors.palette.greys.white},function(n){var t;return null!=n&&null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.padding?0:(0,m.W0)(.5)},(0,m.W0)(2),function(n){return(0,B.mq)(n.theme.breakpointUtils.map,"sm")},(0,m.W0)(1),(0,m.W0)(2),function(n){return n.isParentFullWidth?"auto":"100%"},function(n){return"width: ".concat(n.desktopWidth)},function(n){return(0,B.mq)(n.theme.breakpointUtils.map,"sm")},function(n){return"width: ".concat(n.desktopWidth)},function(n){var t;return(null==n||null===(t=n.qubitBadgeMessagingStyle)||void 0===t?void 0:t.border)&&"\n ".concat(n.qubitBadgeMessagingStyle.border.top.display&&"border-top: ".concat(n.qubitBadgeMessagingStyle.border.top.width," solid ").concat(n.qubitBadgeMessagingStyle.border.top.color),";\n ").concat(n.qubitBadgeMessagingStyle.border.right.display&&" border-right:".concat(n.qubitBadgeMessagingStyle.border.right," solid ").concat(n.qubitBadgeMessagingStyle.border.right.color),";\n ").concat(n.qubitBadgeMessagingStyle.border.left.display&&" border-left:".concat(n.qubitBadgeMessagingStyle.border.left.width," solid ").concat(n.qubitBadgeMessagingStyle.border.left.color),";\n ").concat(n.qubitBadgeMessagingStyle.border.bottom.display&&" border-bottom:".concat(n.qubitBadgeMessagingStyle.border.bottom.width," solid ").concat(n.qubitBadgeMessagingStyle.border.bottom.color),";\n border-radius: ").concat(n.qubitBadgeMessagingStyle.border.radius,";")},function(n){var t;return(null==n||null===(t=n.qubitBadgeMessagingStyle)||void 0===t?void 0:t.boxShadow)&&"box-shadow:".concat(n.qubitBadgeMessagingStyle.boxShadow.shadowColor," ").concat(n.qubitBadgeMessagingStyle.boxShadow.shadowY," ").concat(n.qubitBadgeMessagingStyle.boxShadow.shadowX," ")}),U=(0,m.zo)(S.T)(o||(o=(0,f.Z)(["\n margin: 0 ",";\n ","\n ",";\n ","\n\n ","\n ","\n"])),(0,m.W0)(1),(0,q.xv)("small","default"),function(n){return n.showCloseButton&&"padding: 0 ".concat((0,m.W0)(1))},function(n){var t;return null!=n&&null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.font?"color: ".concat(n.qubitBadgeMessagingStyle.font.textColor,";\n strong { color: ").concat(n.qubitBadgeMessagingStyle.font.textColor,"};\n ").concat((0,q.xv)(n.qubitBadgeMessagingStyle.font.entry,n.qubitBadgeMessagingStyle.font.style)):" ".concat((0,q.xv)("small","default"),";")},function(n){var t,e;return null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.padding?(0,m.mX)(null===(e=n.qubitBadgeMessagingStyle)||void 0===e?void 0:e.padding):null},function(n){var t,e;return null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.height?null===(e=n.qubitBadgeMessagingStyle)||void 0===e?void 0:e.height:null}),I=(0,m.zo)(M.E)(a||(a=(0,f.Z)(["\n overflow: unset;\n"]))),D=m.zo.button(r||(r=(0,f.Z)(["\n outline: none;\n border: 2px solid transparent;\n display: block;\n\n &:hover,\n &:focus {\n opacity: 0.8;\n }\n\n &:active svg path {\n fill: ",";\n }\n &:focus {\n border: 2px solid ",";\n }\n"])),function(n){return n.theme.colors.palette.greys.darker},function(n){return n.theme.colors.palette.brand.base}),A=m.zo.div(s||(s=(0,f.Z)(["\n display: flex;\n justify-content: center;\n height: fit-content;\n top: ",";\n ",";\n bottom: ",";\n animation: ",";\n @media (prefers-reduced-motion) {\n animation: none;\n }\n\n top: ","px;\n\n ","\n\n "," {\n justify-content: ",";\n width: ",";\n padding-left: 2%;\n top: ","px;\n bottom: unset;\n }\n\n "," {\n ","\n }\n\n position: absolute;\n width: ",";\n z-index: 5;\n"])),(0,m.W0)(2),function(n){return!n.showCloseButton&&"opacity: 0"},function(n){return n.isGrid?"".concat((0,m.W0)(17)):"".concat((0,m.W0)(13))},function(n){return n.showCloseButton?"none":(0,h.css)(["10s "," ease-out"],(0,m.F4)(l||(l=(0,f.Z)(["\n 0%, 60% { opacity: 1 }\n 70%, 100% { opacity: 0 }\n"]))))},function(n){var t,e;return(null===(t=n.verticalAlignment)||void 0===t?void 0:t.mobile)||(null===(e=n.qubitBadgeMessagingStyle)||void 0===e||null===(e=e.container)||void 0===e?void 0:e.verticalAlignmentTop)||224},function(n){var t;return null!=n&&null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.container?"transform: ".concat(n.qubitBadgeMessagingStyle.container.transform,";\n left: ").concat(n.qubitBadgeMessagingStyle.container.left,";\n margin-left : ").concat(n.qubitBadgeMessagingStyle.container.marginLeft.mobile,";"):"transform: translateY(-50%);"},function(n){return(0,B.mq)(n.theme.breakpointUtils.map,"sm")},function(n){return n.horizontalAlignment||"center"},function(n){var t;return(null===(t=n.qubitBadgeMessagingStyle)||void 0===t||null===(t=t.container)||void 0===t?void 0:t.width)||"48%"},function(n){var t,e;return(null===(t=n.verticalAlignment)||void 0===t?void 0:t.desktop)||(null===(e=n.qubitBadgeMessagingStyle)||void 0===e||null===(e=e.container)||void 0===e?void 0:e.verticalAlignmentTop)||190},function(n){return(0,B.mq)(n.theme.breakpointUtils.map,"md")},function(n){var t;return null!=n&&null!==(t=n.qubitBadgeMessagingStyle)&&void 0!==t&&t.container?"transform: ".concat(n.qubitBadgeMessagingStyle.container.transform,";\n margin-left : ").concat(n.qubitBadgeMessagingStyle.container.marginLeft.desktop):"transform: translateY(-50%);"},function(n){var t;return(null===(t=n.qubitBadgeMessagingStyle)||void 0===t||null===(t=t.container)||void 0===t?void 0:t.width)||"100%"}),z=(0,p.ZP)(function(n){var t=n.forwardedRef,e=n.onClick,i=n.content,o=n.isFullWidth,a=n.desktopWidth,r=n.setShowBadge,l=n.showCloseButton,s=n.qubitBadgeMessagingStyle;return i?(0,C.jsxs)(P,{onClick:e,ref:t,isParentFullWidth:o,desktopWidth:a,role:"button",qubitBadgeMessagingStyle:s,children:[i.imageUrl&&(0,C.jsx)(I,{src:[{url:i.imageUrl}],alt:i.message||"",isAmp:!1,width:"24px",height:"24px"}),i.message&&(0,C.jsx)(U,{qubitBadgeMessagingStyle:s,content:i.message,showCloseButton:l}),l&&(0,C.jsx)(D,{onClick:function(){return r(!1)},children:(0,C.jsx)(O,{fill:"#000"})})]}):(0,C.jsx)("div",{ref:t})}),F=function(n){var t=(0,k.w)(),e=(0,b.ND)().qubit,i=c.useRef(!1),o=(0,W.e)({mode:(null==e?void 0:e.mode)||x.fz.LIVE,type:n.type||w.Q3.PRODUCT,placementId:n.placementId,productId:n.productId});if(!(null!=o&&o.qubitPlacements))return null;var a=o.qubitPlacements.content&&o.qubitPlacements.content[w.aN.BADGING];return(0,C.jsx)(c.Fragment,{children:(0,C.jsx)(z,{content:a,isFullWidth:n.isFullWidth,desktopWidth:n.desktopWidth,qubitBadgeMessagingStyle:n.qubitBadgeMessagingStyle,onEnterViewport:function(){var a;i.current||((0,j.M)({logger:t,sendPlacementLevelImpression:j.c,productId:n.productId,callbackURL:null==e?void 0:e.callbackURL,callbackData:null===(a=o.qubitPlacements)||void 0===a?void 0:a.callbackData}),i.current=!0)},onClick:function(){var i;return(0,j.c)({logger:t,sku:n.productId,eventType:w.Vv.CLICK_THROUGH,callbackData:null===(i=o.qubitPlacements)||void 0===i?void 0:i.callbackData,callbackURL:null==e?void 0:e.callbackURL})},setShowBadge:n.setShowBadge,showCloseButton:null==e?void 0:e.showUrgencyMsgCloseButton})})};function L(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),e.push.apply(e,i)}return e}function R(n){for(var t=1;t