PageSourceSearch

https://www.nbastore.eu/static/1.1.0-rc-20260923.183655/js/sas-banner-container.js

js nbastore.eu collected 2026-09-26 01:39:19 UTC 11,887 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkiris=self.webpackChunkiris||[]).push([[7715],{16729(e,t,n){n.r(t),n.d(t,{SasBannerContainer:()=>F,default:()=>G});n(74509);var s=n(14041),a=n(39067),o=n.n(a),i=n(32192);const r=JSON.parse('{"id":"SAS_BANNER","name":"Sign Up And Save Banner settings","description":"Properties to control the Sign Up And Save fixed-bottom banner notification","type":"object","properties":{"isBannerEnabled":{"type":"boolean","name":"Is SAS Banner Enabled","description":"Enables the Sign Up And Save fixed-bottom banner notification","default":false},"logo":{"$ref":"IMAGE_NO_REQ","name":"Logo","description":"Logo image displayed on the left side of the banner. Leave empty to hide."},"notificationText":{"type":"string","name":"Notification Text","description":"Promo text displayed in the banner (e.g. \'Get $10 off your next order\')","default":"Join our list to get $10 off when you sign up for texts"},"redeemButtonText":{"type":"string","name":"Redeem Button Text","description":"Label for the CTA button that opens the signup modal","default":"Join"},"inCtaCloseButtonAriaLabel":{"type":"string","name":"In-CTA Close Button Aria Label","description":"Accessible name for the dismiss button when it is rendered inside the CTA (BARE_CTA with a Redeem Button Text). Has no effect on the CARD corner dismiss button, which is owned by Aspire and always reads \'Close alert\'. LOCALIZATION IS CMS-OWNED: none of this schema\'s strings carry `shouldTranslate`, so the \'Close\' default is served as English to every locale. Non-English sites must set a localized value per locale in Lumen.","default":"Close","exposeToTools":false},"shouldFadeOut":{"type":"boolean","name":"Should Fade Out","description":"Auto-dismiss the banner after a delay on each page load. Does not write the suppression cookie or count toward the dismissal escalation.","default":false},"bannerPosition":{"type":"string","name":"Banner Position","description":"Where the banner sits on the page. BOTTOM_CENTER is the existing full-width centered layout. BOTTOM_LEFT and BOTTOM_RIGHT are compact corner placements mirroring the cart-summary-toast.","enum":["BOTTOM_CENTER","BOTTOM_LEFT","BOTTOM_RIGHT"],"default":"BOTTOM_CENTER"},"toastVariant":{"type":"string","name":"Toast Variant","description":"CARD is the white toast surface showing the logo, notification text and CTA with a dismiss \'x\' in the corner. BARE_CTA drops the surface, shadow and padding and shows only the CTA with the dismiss \'x\' inside it \u2014 the logo and notification text are hidden. BARE_CTA falls back to the corner dismiss \'x\' when no Redeem Button Text is configured, so the banner always stays dismissible.","enum":["CARD","BARE_CTA"],"default":"CARD"},"toastSize":{"type":"string","name":"Toast Size","description":"Scales the toast padding, notification text, logo and CTA. MEDIUM is the existing size.","enum":["SMALL","MEDIUM","LARGE"],"default":"MEDIUM"},"customStyles":{"type":"object","name":"Custom Colors","description":"Optional color overrides for the CTA. Leave empty to use the site theme defaults.","properties":{"ctaBackgroundColor":{"type":"string","name":"CTA Backgroun
1d Color","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","description":"Defines the background color of the CTA. Example color hash code: #ff0000"},"ctaTextColor":{"type":"string","name":"CTA Text Color","pattern":"^#(?:[0-9a-fA-F]{3}){1,2}$","description":"Defines the color of the CTA label, and of the dismiss icon when it sits inside the CTA. Example color hash code: #fffddd"}}},"firstPageOnly":{"type":"boolean","name":"Show On First Eligible Page Only","description":"When true, the banner shows on the first eligible page of a session and is hidden on subsequent pages until the next session. Dismiss-via-X still triggers the suppression cookie independently.","default":false},"suppressBannerIfPopupShownThisPage":{"type":"boolean","name":"Suppress Banner If Popup Shown This Page","description":"When true, the SAS banner is suppressed on any page where the SMS opt-in popup was displayed. The banner becomes eligible again on the next page load.","default":false},"recognizedSMSToastEligibility":{"type":"string","name":"Recognized SMS Toast Eligibility","description":"Applies the SMS opt-in popup\'s logged-in guard to the SAS toast: an eligible fan who has already opted into SMS \u2014 or who has a verification pending \u2014 is not shown the toast. LOGGED_IN targets authenticated fans; BOTH targets everyone; GUEST targets non-logged-in fans and is not yet wired up, since a guest has no readable CRM opt-in status; NEITHER disables the guard. Resolving the status needs a CRM read on page load, so the toast is withheld until it lands rather than shown and then pulled; on a failed read the toast shows. SIGNUP_SAVE sites are unaffected and never trigger the read.","enum":["GUEST","LOGGED_IN","BOTH","NEITHER"],"default":"NEITHER"}},"dependencies":{"shouldFadeOut":{"oneOf":[{"properties":{"shouldFadeOut":{"enum":[true]},"fadeOutTimeSeconds":{"type":"integer","name":"Fade Out Time (seconds)","description":"Seconds before the banner auto-dismisses on each page.","default":10,"minimum":1}}},{"properties":{"shouldFadeOut":{"enum":[false]}}}]}}}');var l=n(11552),d=n(99870),u=n.n(d),c=n(42729),p=n(16040),m=n(33466),h=n(84859),b=n(5765),f=n(1098),g=n(55165),T=n(62813),E=n(12985),S=n(78021),O=n(28501);const C={BOTTOM_CENTER:"BOTTOM_CENTER",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_RIGHT:"BOTTOM_RIGHT"},A={CARD:"CARD",BARE_CTA:"BARE_CTA"},y={SMALL:"SMALL",MEDIUM:"MEDIUM",LARGE:"LARGE"},B=e=>{const{srcSet:t={}}=e||{},n=e=>"string"===typeof e&&""!==e.trim();return n(t.SMALL)&&n(t.MEDIUM)},M=()=>(0,g.$r)().sasBanner||{},_="sas-banner-session-shown",w=()=>{const{views:e=0}=M(),t=e+1;t>=g.u5?(0,g.hh)():(e=>{const t=(0,g.$r)();S.Ay.setCookieValue(O.AZ.CRM_USER_INFO.name,JSON.stringify({...t,sasBanner:e}))})({views:t,lastSeen:(new Date).toISOString()})},R=e=>{let{usesSmsOptInModal:t,isModalOpen:n,onModalClose:a}=e;return t?n?s.createElement(h.A,{onClose:a,location:"toast"}):null:s.createElement(m.A,{isOpen:n,onClose:a,triggerVersion:"sticky-banner"})},x=e=>{const{logo:t,notificationText:n,redeemButtonText:a,inCtaCloseButtonAriaLabel:o,onDismiss:i,onAutoDismiss:r,onRedeem:d,isModalOpen:m,onModalClose:h,usesSmsOptInModal:f,shouldFadeOut:g,fadeOutTimeSeconds:T,bannerPosition:E,toastVariant:S,toastSize:O,customStyles:M,isBannerVisible:_}=e;(0,s.useEffect)((()=>{if(!g||!T||!r)return;const e=setTimeout(r,1e3*T);return()=>clearTimeout(e)}),[g,T,r]);const{ctaBackgroundColor:w,ctaTextColor:x}=M||{},I={...w?{backgroundColor:w}:{},...x?{color:x}:{}},v=null===a||void 0===a?void 0:a.trim(),L=null===n||void 0===n?void 0:n.trim(),D=S===A.BARE_CTA,N=D&&Boolean(v),k=!D&&(B(t)||Boolean(L)),P=k||Boolean(v),F=k?s.createElement(s.Fragment,null,B(t)?s.createElement("div",{className:"sas-banner__logo"},s.createElement(b.A,(0,l.A)({},t.srcSet,{alt:t.alt??""}))):null,L?s.createElement("span",{className:"sas-banner__text"},L):null):null;return s.createElement(s.Fragment,null,_&&s.createElement("div",{className:u()("sas-banner",{"sas-banner--bottom-right":E===C.BOTTOM_RIGHT,"sas-banner--bottom-left":E===C.BOTTOM_LEFT,"sas-banner--bare":D,"sas-banner--small":O===y.SMALL,"sas-banner--large":O===y.LARGE})},s.createElement(c.B,{variant:"neutral",hasIcon:!1,isDismissible:!N,onClose:i,className:"sas-banner__toast"},s.createElement(c.g,null,N?s.createElement("div",{className:"sas-banner__content"},s.createElement("div",{className:"sas-banner__cta sas-banner__cta--with-close",style:I},s.createElement("button",{type:"button",className:"sas-banner__cta-action","data-trk-id":"sas-banner-redeem",onClick:d},v),s.createElement("button",{type:"button",className:"sas-banner__cta-close","data-trk-id":"sas-banner-dismiss","aria-label":o,onClick:i},s.createElement(p.A,null)))):s.createElement("div",(0,l.A)({className:u()("sas-banner__content",{"sas-banner__content--clickable":P})},P?{role:"button",tabIndex:0,"data-trk-id":"sas-banner-redeem",onClick:d,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d())}}:{}
1),F,v?s.createElement("div",{className:"sas-banner__cta",style:I},v):null)))),s.createElement(R,{usesSmsOptInModal:f,isModalOpen:m,onModalClose:h}))};x.defaultProps={isBannerVisible:!0,inCtaCloseButtonAriaLabel:"Close",toastVariant:A.CARD,toastSize:y.MEDIUM,customStyles:{}},x.propTypes={logo:o().shape({alt:o().string,srcSet:o().object}),notificationText:o().string,redeemButtonText:o().string,inCtaCloseButtonAriaLabel:o().string,onDismiss:o().func.isRequired,onAutoDismiss:o().func,onRedeem:o().func.isRequired,isModalOpen:o().bool.isRequired,onModalClose:o().func.isRequired,usesSmsOptInModal:o().bool,shouldFadeOut:o().bool,fadeOutTimeSeconds:o().number,bannerPosition:o().oneOf(Object.values(C)),toastVariant:o().oneOf(Object.values(A)),toastSize:o().oneOf(Object.values(y)),customStyles:o().shape({ctaBackgroundColor:o().string,ctaTextColor:o().string}),isBannerVisible:o().bool};(0,f.A)(x,r);var I=n(46341),v=n(75867),L=n(4404),D=n(34741),N=n(73118),k=n(84470);const P=e=>i.default.emit({et:"SELECT.BUTTON",a:{bid:e,bctx:"sas-banner",purl:window.location.href,obpurl:window.location.href,rurl:window.document.referrer}}),F=e=>{const{isBannerEnabled:t,logo:n,notificationText:a,redeemButtonText:o,inCtaCloseButtonAriaLabel:i,shouldFadeOut:r,fadeOutTimeSeconds:l,bannerPosition:d,toastVariant:u,toastSize:c,customStyles:p,firstPageOnly:m,suppressBannerIfPopupShownThisPage:h=!1,recognizedSMSToastEligibility:b,appContext:f,waitingForPopup:S=!1}=e,{isSignUpAndSaveEnabledOnSite:O}=(0,I.EE)("site-settings"),{count:C}=(0,v.Iy)(),A=(0,E.Hd)(L.S_,!1),y=(0,I.EE)("cart-summary-toast").isToastEnabled&&C>0&&!A,B=(0,I.EE)("marketing-cookies-consent").isEnabled&&(0,D.M6)(),[R,F]=(0,s.use
1State)(!0),G=(e=>(0,T.e2)(e)&&(0,T.MK)()&&(0,g.x3)())(b),[V,U]=(0,s.useState)(!!G&&null);(0,s.useEffect)((()=>{if(!G)return void U(!1);U(null);let e=!1;return(async()=>{const{optInStatus:e}=await(0,g.y4)();return(0,g.Lf)(e)})().then((t=>{e||U(t)})),()=>{e=!0}}),[G]);const[z]=(0,s.useState)((()=>Boolean((0,E.Hd)(_,!1)))),H=(0,s.useRef)(!1);S&&(H.current=!0);const j=H.current,$=!1===V&&!y&&!B&&!(m&&z)&&!(()=>{const{suppressed:e=!1,suppressExpiry:t=0}=(0,g.eV)();if(e&&Date.now()<t)return!0;const{lastSeen:n=null}=M();return!(!n||new Date(n).toDateString()!==(new Date).toDateString())})()&&!(h&&j),J=t&&O&&$&&!S,[q,W]=(0,s.useState)(!1),K=(0,s.useRef)(!1);(0,s.useEffect)((()=>{$&&f&&(K.current||((0,k.Ji)({appContext:f,settingID:"SAS_BANNER",settings:["isBannerEnabled"]}),K.current=!0))}),[$,f]);const Z=(0,s.useRef)(!1);(0,s.useEffect)((()=>{J&&R&&(Z.current||(Z.current=!0,m&&(0,E.J2)(_,!0),(0,N.I1)({notifyId:"sas-banner"})))}),[J,R,m]);const Q=(0,s.useCallback)((()=>{F(!1)}),[]);if((!R||!J)&&!q)return null;return s.createElement(x,{logo:n,notificationText:a,redeemButtonText:o,inCtaCloseButtonAriaLabel:i,shouldFadeOut:r,fadeOutTimeSeconds:l,bannerPosition:d,toastVariant:u,toastSize:c,customStyles:p,isBannerVisible:R,onDismiss:e=>{e&&e.stopPropagation&&e.stopPropagation(),P("sas-banner-dismiss"),w(),F(!1)},onAutoDismiss:Q,onRedeem:()=>{P("sas-banner-redeem"),W(!0)},isModalOpen:q,onModalClose:()=>{W(!1)},usesSmsOptInModal:(0,T.MK)()})};F.propTypes={isBannerEnabled:o().bool,logo:o().shape({alt:o().string,srcSet:o().object}),notificationText:o().string,redeemButtonText:o().string,inCtaCloseButtonAriaLabel:o().string,shouldFadeOut:o().bool,fadeOutTimeSeconds:o().number,bannerPosition:o().oneOf(Object.values(C)),toastVariant:o().oneOf(Object.values(A)),toastSize:o().oneOf(Object.values(y)),customStyles:o().shape({ctaBackgroundColor:o().string,ctaTextColor:o().string}),firstPageOnly:o().bool,suppressBannerIfPopupShownThisPage:o().bool,recognizedSMSToastEligibility:o().oneOf(Object.values(T.Ax)),appContext:o().object,waitingForPopup:o().bool};const G=(0,I.V4)((0,f.A)(F,r),"sas-banner")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.