function anonymous( ) { return (function w(d) {w.inPreview=false;w.sdk=window.exponea;w.data=d;w.html="
\n \n \n
\n

\n \n

\n
\n Enjoy $15 Off*\n
\n

\n your first order when you subscribe!\n

\n
\n \n \n
\n \n
\n No Thanks\n
\n

\n *Minimum purchase $125. Offer valid for first-time subscribers only. See Terms for details. Consent is not a condition of purchase. California residents: see our Notice of Financial Incentive/ Bona Fide Loyalty Program Disclosure in our Privacy Notice. \n

\n\n
\n
\n \"\"\n
\n
\n
\n \n
\n
\n Thanks for joining!\n
\n

\n Use Code to take $15 off* your first order.\n

\n

\n For additional exclusive offers, sign up for mobile alerts from FSA Store!\n

\n
\n \n \n
\n

\n *Minimum purchase $125. Offer valid for first-time subscribers only. See Terms for details. Consent is not a condition of purchase. California residents: see our Notice of Financial Incentive/ Bona Fide Loyalty Program Disclosure in our Privacy Notice. By subscribing to FSA Store text messaging, you agree to receive recurring autodialed marketing text messages (e.g., cart reminders) to the mobile number used at opt-in. Message frequency may vary. Msg. & data rates may apple. Reply HELP for help and STOP to cancel.\n

\n
\n \"\"\n
\n
\n \n
\n

\n \n

\n
\n Enjoy $15 Off*\n
\n

\n your first order when you subscribe!\n

\n
\n \n
\n \n

\n *Minimum purchase $125. Offer valid for first-time subscribers only. See Terms for details. Consent is not a condition of purchase. California residents: see our Notice of Financial Incentive/ Bona Fide Loyalty Program Disclosure in our Privacy Notice. By subscribing to FSA Store text messaging, you agree to receive recurring autodialed marketing text messages (e.g., cart reminders) to the mobile number used at opt-in. Message frequency may vary. Msg. & data rates may apple. Reply HELP for help and STOP to cancel.\n

\n
\n \"\"\n
\n
\n
\n \n
\n

\n Thank you!\n

\n

\n You will receive a SMS message with voucher shortly.\n

\n continue shopping\n
\n \"\"\n
\n
\n

Don't have an FSA? Visit HSAstore.com

\n
";w.style="@import url(\"https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&display=swap\");\n/*\n * Jinja Params Start. Do not edit these values.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/*\n * Jinja Params End\n */\n.weblayer--box-subscription-sms-email-signup {\n display: flex;\n flex-wrap: wrap;\n box-sizing: border-box;\n font-family: \"Lato\", Arial, Helvetica, sans-serif;\n font-size: 1rem; /* to prevent inheriting fs of element it's appended to */\n line-height: normal;\n text-decoration: inherit;\n cursor: default;\n position: fixed;\n max-width: 100vw;\n max-height: 100vh;\n z-index: 2147483000; /* close to the highest possible z-index */\n width: 720px;\n \n background-image: url(https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/ae52a6e2-ca6a-4d8e-8944-532f952aae85/f03685b2-f5ce-11ee-8b7a-5e98655b738a/bg-with-logo.png);\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n \n box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.4);\n border-radius: 0px;\n margin: 10px;\n overflow: hidden;\n padding: 80px 35px 64px 35px;\n}\n.weblayer--box-subscription-sms-email-signup * {\n box-sizing: border-box;\n}\n@media screen and (max-width: 768px) {\n .weblayer--box-subscription-sms-email-signup {\n width: 100%;\n height: 100%;\n margin: 0;\n }\n}\n.weblayer--box-subscription-sms-email-signup.enter-fade {\n animation: fadeIn ease-in 1s;\n}\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-top.horizontal-left.enter-slide-left {\n animation: slideInLeftVT cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInLeftVT {\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-top.horizontal-center.enter-slide-up {\n animation: slideInUpVT cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInUpVT {\n 0% {\n opacity: 0;\n transform: translate(-50%, -100%);\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-top.horizontal-right.enter-slide-right {\n animation: slideInRightVT cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInRightVT {\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-left.enter-slide-left {\n animation: slideInLeftVC cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInLeftVC {\n 0% {\n opacity: 0;\n transform: translate(-100%, -50%);\n }\n 100% {\n opacity: 1;\n transform: translate(0, -50%);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center.enter-slide-up {\n animation: slideInTopVC cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInTopVC {\n 0% {\n opacity: 0;\n transform: translate(-50%, -100%);\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-right.enter-slide-right {\n animation: slideInRightVC cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInRightVC {\n 0% {\n opacity: 0;\n transform: translate(100%, -50%);\n }\n 100% {\n opacity: 1;\n transform: translate(0, -50%);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-bottom.horizontal-left.enter-slide-left {\n animation: slideInLeftVB cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInLeftVB {\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-bottom.horizontal-center.enter-slide-down {\n animation: slideInDownVB cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInDownVB {\n 0% {\n opacity: 0;\n transform: translate(-50%, 100%);\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, 0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.vertical-bottom.horizontal-right.enter-slide-right {\n animation: slideInRightVB cubic-bezier(0.56, 0.01, 0.42, 1.04) 0.75s;\n}\n@keyframes slideInRightVB {\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n.weblayer--box-subscription-sms-email-signup.horizontal-left {\n left: 0;\n}\n.weblayer--box-subscription-sms-email-signup.horizontal-right {\n right: 0;\n}\n.weblayer--box-subscription-sms-email-signup.horizontal-center {\n left: 50%;\n transform: translateX(-50%);\n}\n.weblayer--box-subscription-sms-email-signup.vertical-top {\n top: 0;\n}\n.weblayer--box-subscription-sms-email-signup.vertical-bottom {\n bottom: 0;\n}\n.weblayer--box-subscription-sms-email-signup.vertical-center {\n top: 50%;\n transform: translateY(-50%);\n}\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center {\n transform: translate(-50%, -50%);\n}\n.weblayer--box-subscription-sms-email-signup .close {\n /* inherits fs of 1rem defined in base styles */\n font-size: inherit;\n line-height: 1px;\n /* resets browser styles for button */\n color: transparent;\n background-color: transparent;\n top: 0;\n right: 0;\n padding: 0.5em;\n /* resets browser styles for button */\n border: 0;\n position: absolute;\n /* base class + 1 to prevent colliding of layers of clickable elements */\n z-index: 2147483001;\n opacity: 1;\n}\n.weblayer--box-subscription-sms-email-signup > .close:hover {\n cursor: pointer;\n}\n.weblayer--box-subscription-sms-email-signup > .close:focus {\n outline: none;\n}\n.weblayer--box-subscription-sms-email-signup > .inner {\n flex-wrap: wrap;\n display: flex;\n width: 100%;\n flex-direction: column;\n align-items: left;\n justify-content: center;\n background-color: #ffffff;\n padding: 35px 30px;\n border-radius: 10px;\n max-width: 580px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .heading {\n \n font-family: Oswald;\n \n font-size: 66px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n margin: 0.111112em 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a, .weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .text{\n color: #44474a;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a {\n\tdisplay: inline-block;\n\tmargin-bottom: 8px;\n\ttext-decoration: underline;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .text \n color: #44474a;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .text.line-two {\n margin-bottom: 0.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form {\n width: 100%;\n margin: 1em 0 0.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .text.line-three {\n font-size: 14px;\n font-weight: normal;\n line-height: 1.2;\n color: #44474a;\n margin: 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .email-input {\n font-size: 14px;\n font-weight: normal;\n line-height: 2.4;\n font-family: inherit;\n border: 1px solid #707070;\n box-shadow: none;\n outline: none;\n margin: 0;\n color: #707070;\n width: 60%;\n min-height: auto;\n border-radius: 10px;\n max-width: 100%;\n resize: vertical;\n padding: 0.9em 1.14289em;\n margin-bottom: 1.7143em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .email-input::placeholder, .weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .email-input::-webkit-input-placeholder, .weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .email-input::-ms-input-placeholder {\n color: rgba(28, 23, 51, 0.5);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .button {\n width: 35%;\n font-size: 18px;\n font-weight: bold;\n line-height: 2.0;\n font-family: inherit;\n background: transparent;\n border: none;\n text-decoration: none;\n margin: 0;\n user-select: none;\n outline: none;\n color: #ffffff;\n background: #142745;\n border-radius: 10px;\n cursor: pointer;\n padding: 0.666em 0.857em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .button:hover {\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .button:focus {\n outline: none;\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .logo {\n display: flex;\n justify-content: center;\n margin-top: 12px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .logo > img {\n max-height: 24px;\n}\n@media screen and (max-width: 768px) {\n .weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version {\n display: none;\n }\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .heading {\n \n font-family: Oswald;\n \n font-size: 66px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n margin: 0.111112em 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .text {\n font-size: 16px;\n font-weight: normal;\n line-height: 1.2;\n color: #44474a;\n margin: 0;\n text-align: left;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .text.line-two {\n margin-bottom: 0.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form {\n margin: 1em 0 0.5em;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > * {\n width: 100%;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .iti--allow-dropdown {\n margin-bottom: 1.5em;\n margin-right: 10px;\n max-width: 55%;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .iti--allow-dropdown ul {\n width: calc(720px - 1.5em * 2);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .iti--allow-dropdown ul > li > .iti__country-name {\n white-space: break-spaces;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone {\n font-size: 14px;\n font-weight: normal;\n line-height: 2.4;\n font-family: inherit;\n border: 1px solid #707070;\n box-shadow: none;\n outline: none;\n margin: 0;\n color: #707070;\n width: 100%;\n min-height: auto;\n border-radius: 10px;\n max-width: 100%;\n resize: vertical;\n padding: 0.8em 0.857em 0.8em 3.4286em;\n margin-bottom: 1.7143em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone::placeholder {\n color: rgba(28, 23, 51, 0.5);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone::-webkit-input-placeholder {\n color: rgba(28, 23, 51, 0.5);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone::-ms-input-placeholder {\n color: rgba(28, 23, 51, 0.5);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .button {\n width: 35%;\n font-size: 18px;\n font-weight: bold;\n line-height: 1.9;\n font-family: inherit;\n background: transparent;\n border: none;\n text-decoration: none;\n margin: 0;\n user-select: none;\n outline: none;\n color: #ffffff;\n background: #142745;\n border-radius: 10px;\n cursor: pointer;\n padding: 0.666em 0.857em;\n margin-bottom: 1.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .button:hover {\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .button:focus {\n outline: none;\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .decline {\n font-family: inherit;\n background: transparent;\n border: none;\n text-decoration: none;\n margin: 0;\n user-select: none;\n outline: none;\n font-size: 14px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n margin-top: 1em;\n margin-bottom: 1.5em;\n text-align: left;\n width: 100%;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .decline:hover {\n text-decoration: underline;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .conditions {\n width: 100%;\n font-size: 10px;\n font-weight: normal;\n line-height: 1.2;\n color: #44474a;\n text-align: left;\n margin: 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .conditions > .link {\n color: inherit;\n text-decoration: underline;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .conditions > .link:hover {\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .conditions > .link:focus {\n outline: none;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .logo {\n display: flex;\n justify-content: center;\n margin-top: 24px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .logo > img {\n max-height: 24px;\n}\n\n@media screen and (min-width: 769px) {\n .weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version {\n display: none;\n }\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .heading {\n \n font-family: Oswald;\n \n font-size: 66px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n margin: 0.111112em 0;\n text-align: left;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .text {\n font-size: 16px;\n font-weight: normal;\n line-height: 2.4;\n color: #44474a;\n margin: 0;\n text-align: center;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .text.line-two {\n margin-bottom: 0.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form {\n width: 60%;\n margin: 1em 0 0.5em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form > .button {\n width: 35%;\n font-size: 18px;\n font-weight: bold;\n line-height: 2.4;\n font-family: inherit;\n background: transparent;\n border: none;\n text-decoration: none;\n margin: 0;\n user-select: none;\n outline: none;\n color: #ffffff;\n background: #142745;\n border-radius: 10px;\n cursor: pointer;\n padding: 0.666em 0.857em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form > .button:hover {\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form > .button:focus {\n outline: none;\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .decline {\n font-family: inherit;\n background: transparent;\n border: none;\n text-decoration: none;\n margin: 0;\n user-select: none;\n outline: none;\n font-size: 14px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n margin-top: 1em;\n margin-bottom: 1.5em;\n text-align: center;\n width: 100%;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .decline:hover {\n text-decoration: underline;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .conditions {\n width: 100%;\n font-size: 10px;\n font-weight: normal;\n line-height: 1.2;\n color: #44474a;\n text-align: center;\n margin: 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .conditions > .link {\n color: inherit;\n text-decoration: underline;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .conditions > .link:hover {\n filter: brightness(96%);\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .conditions > .link:focus {\n outline: none;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .logo {\n display: flex;\n justify-content: center;\n margin-top: 24px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .logo > img {\n max-height: 24px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-three > .heading {\n font-size: 22px;\n font-weight: bold;\n line-height: 1.2;\n color: #44474a;\n text-align: center;\n margin: 0 0 0.2em;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-three > .text {\n font-size: 16px;\n font-weight: normal;\n line-height: 1.3;\n color: #44474a;\n text-align: center;\n margin: 1.5em 0 0;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-three > .logo {\n display: flex;\n justify-content: center;\n margin-top: 24px;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-three > .logo > img {\n max-height: 24px;\n}\n.modal-segment {\n\tbackground-color: rgba(0,0,0, 0.5);\n display: block;\n height: 100%;\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n z-index: 1082;\n}\n\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-three {\n\twidth: 100%;\n\tmax-width: 100%;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner {\n\tposition: relative;\n}\n\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center {\n margin: 0;\n background-color: #fff;\n background-repeat: no-repeat;\n background-position: center center;\n background-size: cover;\n min-height: 490px;\n padding: 80px 0 64px 35px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner {\n position: relative;\n max-height: 325px;\n background: #fff;\n border-radius: 10px;\n max-width: 580px;\n padding: 35px 0 35px 30px;\n text-align: left;\n display: block;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .heading,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .heading {\n display: block;\n padding: 0;\n margin: 4px 0;\n font-size: 38px;\n line-height: 51px;\n font-weight: 700;\n text-align: left;\n font-family: Sans Text, sans-serif;\n color: #44474a;\n}\n\n.weblayer--box-subscription-sms-email-signup p.text.line-two,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .text.line-two {\n margin: 0;\n font-weight: 300;\n font-size: 18px;\n line-height: 24px;\n color: #142745;\n font-family: Grotesque, sans-serif;\n -webkit-font-smoothing: subpixel-antialiased;\n}\n\n.weblayer--box-subscription-sms-email-signup p.text.line-one {\n margin: 0;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form {\n margin-top: 25px;\n padding-bottom: 15px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .email-input,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone {\n width: 100%;\n height: 60px;\n padding: 7px 15px 0 30px;\n background: #fff;\n margin: 0 auto;\n font-family: Grotesque, sans-serif;\n font-size: 16px;\n text-transform: none;\n font-weight: 300;\n text-align: left;\n color: #142745;\n line-height: normal;\n border: 1px solid #707070;\n border-radius: 10px !important;\n box-shadow: 0 2px 0 #cfcfcf !important;\n -webkit-transition: all 0.11s linear;\n transition: all 0.11s linear;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n max-width: 320px;\n margin: 0;\n display: inline-block;\n height: 60px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .button,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .button,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .phone-form > .button,\n.weblayer--box-subscription-sms-email-signup .btn-shop {\nmargin: 0;\n margin-left: 11px;\n display: inline-block;\n padding: 18px 13px;\n vertical-align: middle;\n font-size: 18px;\n color: #fff;\n line-height: normal;\n text-decoration: none;\n font-weight: 300;\n font-family: Grotesque, sans-serif;\n letter-spacing: 0.25px;\n background-color: #142745;\n border: 1px solid #142745;\n border-radius: 10px !important;\n box-shadow: none !important;\n cursor: pointer;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n -webkit-transition: all 0.3s ease-in-out;\n transition: all 0.3s ease-in-out;\n height: 60px;\n position: relative;\n top: -2px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .button{\n\ttop: 0;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .decline {\n vertical-align: middle;\n line-height: normal;\n letter-spacing: 0.25px;\n cursor: pointer;\n width: auto;\n display: inline-block;\n font-family: Grotesque, sans-serif;\n font-size: 14px;\n font-weight: 300;\n color: #44474a;\n border: none;\n position: relative;\n background: transparent;\n padding: 10px 0;\n -webkit-transition: all 0.11s linear;\n transition: all 0.11s linear;\n margin-top: 14px;\n text-decoration: none;\n margin-bottom: 0;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a.decline:after,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .decline:after {\n width: 100%;\n max-width: 100%;\n height: 1px;\n background: #44474a;\n content: \"\";\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n bottom: 9px;\n overflow: hidden;\n -webkit-transition: all 0.3s ease-in-out;\n transition: all 0.3s ease-in-out;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .text.line-three,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .text.line-three, \n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .conditions {\n font-size: 12px;\n line-height: 16px;\n text-transform: none;\n margin: 20px auto 0;\n color: #44474a;\n font-weight: 300;\n letter-spacing: 0.25px;\n font-family: Grotesque, sans-serif;\n -webkit-font-smoothing: subpixel-antialiased;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .text.line-three {\n margin-top: 5px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .conditions {\n max-width: 90%;\n margin-top: 15px;\n}\n\n.weblayer--box-subscription-sms-email-signup p.ltkpopup-link {\n position: absolute;\n bottom: 22px;\n left: 65px;\n font-size: 16px;\n color: #142745;\n line-height: 1.4;\n font-family: Grotesque, sans-serif;\n -webkit-font-smoothing: subpixel-antialiased;\n margin: 0;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form > .iti--allow-dropdown {\n margin: 0;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .phone-form .phone {\n padding-left: 47px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-two > .desktop-version > .logo {\n display: none;\n}\n\n.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center {\n\tmax-width: 720px;\n\theight: auto;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-three {\n width: calc(100% - 35px);\n max-width: calc(100% - 35px);\n padding: 35px 30px 35px 30px;\n}\n\n.weblayer--box-subscription-sms-email-signup .btn-shop {\n margin-top: 24px;\n max-width: 50%;\n display: flex;\n align-items: center;\n justify-self: start;\n justify-content: center;\n align-self: center;\n height: 60px;\n text-transform: capitalize;\n}\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .text.line-three {\n\tmargin-top: 6px;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .text.line-three a,\n.weblayer--box-subscription-sms-email-signup > .inner.step-two .conditions a {\n\ttext-decoration: underline;\n}\n\n.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a {\n\tmargin-top: 0;\n}\n\n@media only screen and (max-width: 730px) {\n\t.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center {\n\t max-width: 320px;\n\t background-image: url(https://d15k2d11r6t6rl.cloudfront.net/public/users/Integrators/ae52a6e2-ca6a-4d8e-8944-532f952aae85/f03685b2-f5ce-11ee-8b7a-5e98655b738a/bg-fsa-min.png);\n\t border-radius: 10px;\n\t padding: 70px 20px 35px;\n\t background-size: cover;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup.vertical-center.horizontal-center.modal-step-one {\n\t\tmin-height: 620px;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner {\n\t padding: 0;\n\t max-width: unset;\n\t width: auto;\n\t max-height: unset;\n\t height: auto;\n\t min-height: auto;\n\t background: transparent;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-one > .heading,\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .heading {\n\t\tfont-size: 32px;\n line-height: 43px;\n font-family: Sans Text, sans-serif;\n color: #44474a;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup p.text.line-two,\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .text.line-two {\n\t\tfont-size: 16px;\n line-height: 21px;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .text.line-two {\n\t\tfont-size: 12px;\n\t\ttext-align: left;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .button,\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form > .button {\n\t width: 100%;\n\t margin: 15px 0 0 0;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form > .button {\n\t\tmargin-top: 0;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form {\n\t padding-bottom: 0;\n\t margin-bottom: 0;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > a {\n\t margin-top: 0;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-one > .form > .text.line-three {\n\t\tfont-size: 11px;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup p.ltkpopup-link {\n\t left: 20px;\n\t font-size: 13px;\n\t max-width: 200px;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .form {\n\t\twidth: 100%;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two > .mobile-version > .decline {\n\t text-align: center;\n\t display: block;\n\t margin: 0 auto 4px;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-two {\n\t margin-bottom: auto;\n\t}\n\t\n\t.weblayer--box-subscription-sms-email-signup .btn-shop {\n\t\tfont-size: 15px;\n\t\tmax-width: 100%;\n\t}\n\t.weblayer--box-subscription-sms-email-signup > .inner.step-three {\n\t\twidth: 100%;\n \tmax-width: 100%;\n\t}\n}\n";w.script=function(){/** * Universal parameters */ var PARAM_showAfter = parseInt("5000", 10); var PARAM_removeAfter = parseInt("0", 10); var PARAM_trigger = "On entry"; var PARAM_parentElement = "body"; var PARAM_positionVertical = "Center"; var PARAM_positionHorizontal = "Center"; var PARAM_enterAnimation = "None"; /** * Template specific parameters */ var PARAM_smsRecipient = ""; var PARAM_smsMessage = "*Minimum purchase $125. One use per customer. By subscribing to FSA Store text messaging, you agree to receive recurring autodialed marketing text messages (e.g. cart reminders) to the mobile number used at opt-in. Consent is not a condition of purchase. Message frequency may vary. Msg & data rates may apply. Reply HELP for help and STOP to cancel. See Terms and Conditions & Privacy Policy. Offer valid for first-time mobile subscribers only."; var PARAM_initialCountry = "us"; var PARAM_preferredCountries = "us"; var PARAM_onlyCountries = "us"; var PARAM_invalidNumberMessage = "Enter a valid phone number"; var PARAM_consentCategoryEmail = "FSA Marketing Email"; var PARAM_consentCategorySMS = "FSA Text Message Notification"; var PARAM_SubscribeEmailActionURL = '/on/demandware.store/Sites-FSASTORE-Site/default/EmailSubscribe-SubscribeEmail'; var PARAM_SubscribeEmailPhoneActionURL = '/on/demandware.store/Sites-FSASTORE-Site/default/Segment-SubscribeEmailPhone';; /** * Initialization */ var self = this; // Helper Id used to identify the banner on the website, not actual ID of the banner var bannerSemiId = Math.random().toString(36).substring(5); // Used in onExit banners to mark if the banner was triggered already window['__exp_triggered-' + bannerSemiId] = false; // Resetting some of the parameters while previewing the banner in the app to easily see its appearance if (self.inPreview) { // reset the show delay while editing the banner in editor PARAM_showAfter = 0; // always append the banner to the body itself PARAM_parentElement = 'body'; // always show the banner right away PARAM_trigger = 'On entry'; } /** * Basic functions */ /** * Function used to register listener for the trigger that will display the banner */ function registerStartTrigger() { // Promise that is resolved when required dependencies are loaded window['__exp_load_promise-' + bannerSemiId] = Promise.all([ loadStylesheet('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/css/intlTelInput.css'), loadScript('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/intlTelInput.min.js')] ); if (PARAM_trigger === 'On exit') { document.body.addEventListener('mouseout', onExitMouseOutHandler); } else if (PARAM_trigger === 'On scroll') { window.addEventListener('scroll', scheduleShowBanner); } else { // If 'On entry' or anything unknown start the banner right away scheduleShowBanner(); } } /** * This function starts the showAfter timer and then displays the banner */ function scheduleShowBanner() { window.removeEventListener('scroll', scheduleShowBanner); window['__exp_load_promise-' + bannerSemiId].then(function () { setTimeout(function () { trackEvent('show', false); // Create and display the banner requestAnimationFrame(createBanner); document.body.classList.add("modal-open"); var newDiv = document.createElement('div'); newDiv.classList.add('modal-segment'); document.body.appendChild(newDiv); // If removeAfter is provided start the removal timer if (PARAM_removeAfter > 0) { setTimeout(function () { removeBanner(); }, PARAM_removeAfter); } }, PARAM_showAfter); }); } /** * Function used to insert the banner contents into the HTML and adding basic functionality */ function createBanner() { // select the parent element console.log('Banner Started'); var parentElement = document.querySelector(PARAM_parentElement) // insert banner HTML into the website parentElement.insertAdjacentHTML('afterbegin', self.html); // get the banner reference var banner = parentElement.firstElementChild; self.banner = banner; // add close functionality to the close button banner.querySelector('.close').onclick = handleCloseButtonClick; // add close/decline functionality to the decline links var declineLinks = banner.querySelectorAll('.decline'); for (var i = 0; i < declineLinks.length; i++) { declineLinks[i].onclick = handleCloseButtonClick; } // add classes specifying banner position and animation banner.className += ' ' + getPositionAndAnimationClasses(); // insert banner CSS into the website banner.insertAdjacentHTML('afterbegin', ''); var links = banner.querySelectorAll('a'); for (var i = 0; i < links.length; i++) { trackLink(links[i], 'click', true); } initializeStepOneForm(banner); } /** * Function used to remove the banner from the website */ function removeBanner() { if (self.banner && self.banner.parentNode) { self.banner.parentNode.removeChild(self.banner); } } /** * Function used to remove the banner from the website */ function removeBanner() { if (self.banner && self.banner.parentNode) { self.banner.parentNode.removeChild(self.banner); } } /** * Function triggered when the closing button is clicked * @param event - browser click Event * @returns {boolean} */ function handleCloseButtonClick(event) { removeBanner(); document.body.classList.remove("modal-open"); var divToRemove = document.querySelector('.modal-segment'); if (divToRemove) { divToRemove.remove(); } trackEvent('close', true); // Stop the click event propagation onto parent HTML elements event.preventDefault(); if (event.stopPropagation) { event.stopPropagation(); } else { event.cancelBubble = true; } return false; } /** * Function used to track single action * @param action - string * @param interactive - boolean */ function trackEvent(action, interactive) { self.sdk.track('banner', getEventProperties(action, interactive)); } /** * Function used to add action tracking to element * @param link - element * @param action - string * @param interactive - boolean */ function trackLink(link, action, interactive) { var eventData = getEventProperties(action, interactive); eventData.link = link.href; self.sdk.trackLink(link, 'banner', eventData); } /** * Default attributes tracked with every banner event * @param action - string * @param interactive - boolean * @returns object - object to be tracked */ function getEventProperties(action, interactive) { return { action: action, banner_id: self.data.banner_id, banner_name: self.data.banner_name, banner_type: self.data.banner_type, variant_id: self.data.variant_id, variant_name: self.data.variant_name, variant_origin: self.data.contextual_personalization != null ? 'contextual personalisation' : 'ABtest', interaction: interactive !== false, }; } /** * Function used to start banners with onExit trigger * @param event - browser mouse event */ function onExitMouseOutHandler(event) { event = event ? event : window.event; var vpWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); if (event.clientX >= (vpWidth)) { return; } if (event.clientY >= 50) { return; } var from = event.relatedTarget || event.toElement; if (!from && !window['__exp_triggered-' + bannerSemiId]) { window['__exp_triggered-' + bannerSemiId] = true; scheduleShowBanner(); } } /** * Function that returns correct class */ function getPositionAndAnimationClasses() { var verticalClass = { Top: 'vertical-top', Center: 'vertical-center', Bottom: 'vertical-bottom', }[PARAM_positionVertical] || ''; var horizontalClass = { Left: 'horizontal-left', Center: 'horizontal-center', Right: 'horizontal-right', }[PARAM_positionHorizontal] || ''; var enterAnimationClass = { 'Fade in': 'enter-fade', 'Slide in': { Top: { Left: 'enter-slide-left', Center: 'enter-slide-up', Right: 'enter-slide-right', }[PARAM_positionHorizontal], Center: { Left: 'enter-slide-left', Center: 'enter-slide-up', Right: 'enter-slide-right', }[PARAM_positionHorizontal], Bottom: { Left: 'enter-slide-left', Center: 'enter-slide-down', Right: 'enter-slide-right', }[PARAM_positionHorizontal], }[PARAM_positionVertical], }[PARAM_enterAnimation] || ''; return verticalClass + ' ' + horizontalClass + ' ' + enterAnimationClass; } /** * Template specific functions */ /** * Format provided phone number */ function formatPhone(phone) { phone = phone.split(' ').join(''); phone = phone.split('(').join(''); phone = phone.split(')').join(''); phone = phone.split('-').join(''); if (phone.length === 10) { return '+1' + phone; } else if (phone.startsWith('001')) { return phone.replace('001', '+1'); } else if (phone.startsWith('00')) { return phone.replace('00', '+'); } else if (phone.startsWith('+1')) { return phone.replace('+1', ''); } else { return null; } } /** * Detect the operating system */ function getMobileOperatingSystem() { var userAgent = navigator.userAgent || navigator.vendor || window.opera; if (/android/i.test(userAgent)) { return "Android"; } // iOS detection from: http://stackoverflow.com/a/9039885/177710 if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return "iOS"; } return "unknown"; } /** * Validates if provided email is valid */ function validateEmail(email) { return email && /^\S+@\S+\.\S+$/.test(email); } /** * Initialize the banner form submit button */ function initializeStepOneForm(banner) { banner.classList.add("modal-step-one"); var form = banner.querySelector('.step-one form'); var os = getMobileOperatingSystem(); form.onsubmit = function (event) { event.preventDefault(); var email = (form.email.value || ''); var isEmailValid = validateEmail(email); if (email == '' || !isEmailValid){ var emailErrorMsg = $(form.email).data('email-error'); document.getElementById('bloomreach-email-error').innerHTML = emailErrorMsg; return false; } if (isEmailValid) { document.getElementById('bloomreach-email-error').innerHTML = ''; sendSegmentEmailEvent(email); stepTwo(banner, os, email); return false; } } } /** * Ask for phone number, track customer and send to thank you */ function stepTwo(banner, os, email) { var stepOne = banner.querySelector(".step-one"); var stepTwo = banner.querySelector(".step-two"); banner.classList.remove("modal-step-one"); banner.classList.add("modal-step-two"); stepOne.style.display = "none"; stepTwo.style.display = "flex"; if (os === "iOS" || os === "Android") { var form = stepTwo.querySelector('.mobile-version form'); form.onsubmit = function (event) { event.preventDefault(); window.open("sms:" + escapeHtml(PARAM_smsRecipient) + ";?&body=(ref: sgnpe) " + escapeHtml(PARAM_smsMessage)); var eventProperties = getEventProperties('subscribe'); /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id eventProperties.consent_category = PARAM_consentCategorySMS; */ self.sdk.track('banner', eventProperties); /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id identifyCustomerByEmail(email); */ showThankYou(banner); return false; }; } else { var form = stepTwo.querySelector('.desktop-version form'); var phoneInput = form.querySelector('input[type="tel"]'); var onlyCountries = stringToArray(PARAM_onlyCountries); var preferredCountries = stringToArray(PARAM_preferredCountries); // Initialize intl-tel-input var options = { initialCountry: PARAM_initialCountry, utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/utils.min.js", }; if (onlyCountries.length > 0) { options.onlyCountries = onlyCountries; } if (preferredCountries.length > 0) { options.preferredCountries = preferredCountries; } banner.phoneInput = window.intlTelInput(phoneInput, options); phoneInput.oninput = function () { toggleInvalidNumberState(false, phoneInput); } form.onsubmit = function (event) { event.preventDefault(); toggleInvalidNumberState(false, phoneInput); if (!banner.phoneInput.isValidNumber()) { toggleInvalidNumberState(true, phoneInput); return false; } // Check if selected country is in onlyCountries var onlyCountries = stringToArray(PARAM_onlyCountries); var selectedCountry = banner.phoneInput.getSelectedCountryData(); if (onlyCountries.length > 0 && (!selectedCountry || !selectedCountry.iso2 || !onlyCountries.includes(selectedCountry.iso2))) { toggleInvalidNumberState(true, phoneInput); return false; } var phoneNumber = formatPhone(banner.phoneInput.getNumber() || ''); var eventProperties = getEventProperties('subscribe'); /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id eventProperties.phone = phoneNumber; eventProperties.consent_category = PARAM_consentCategorySMS; */ self.sdk.track('banner', eventProperties); /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id identifyCustomerByPhone(phoneNumber); identifyCustomerByEmail(email); */ sendSegmentEmailPhoneEvent(email, phoneNumber); showThankYou(banner); return false; } } } function escapeHtml(string) { return string .replace(/ /g, '%20') .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } /** * Send Email Data to segment */ function sendSegmentEmailEvent(email) { if (PARAM_SubscribeEmailActionURL) { $.ajax({ url: PARAM_SubscribeEmailActionURL, type: 'post', dataType: 'json', data: { emailId: email, placement: 'popup' }, success: function (data) { console.log('Successfully send data to Segment'); }, error: function (err) { console.error('Something went wrong. Please try again!'); } }); } } /** * Send Phone Data to segment */ function sendSegmentEmailPhoneEvent(email, phoneNo) { if (PARAM_SubscribeEmailPhoneActionURL) { $.ajax({ url: PARAM_SubscribeEmailPhoneActionURL, type: 'post', dataType: 'json', data: { emailId: email, phoneNo: phoneNo, placement: 'popup' }, success: function (data) { console.log('Successfully send data to Segment'); }, error: function (err) { console.error('Something went wrong. Please try again!'); } }); } } /** * Move to Thank you step after submitting phone number */ function showThankYou(banner) { var stepTwo = banner.querySelector(".step-two"); var stepThree = banner.querySelector(".step-three"); banner.classList.remove("modal-step-two"); banner.classList.add("modal-step-three"); stepTwo.style.display = 'none'; stepThree.style.display = 'flex'; var btnShop = banner.querySelector('.btn-shop'); btnShop.onclick = function() { removeBanner(); document.body.classList.remove('modal-open'); // Remove the class from body }; } /** * Track email attribute, set phone as hard-id and track consent for newsletter */ /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id function identifyCustomerByEmail(email) { self.sdk.track('consent', { // you can add/adjust your own attributes here. Don't forget to change the category attribute. 'action': "accept", 'category': PARAM_consentCategoryEmail, 'valid_until': "unlimited", 'location': window.location.href, 'data_source': "Multi-Step Sign-up Unit (Email & SMS)" }); self.sdk.update({ email: email }); self.sdk.identify({ email_id: email }); } */ /** * Track phone attribute, set phone as hard-id and track consent for newsletter */ /** Name: Mike Moore reason: Prevent the banner from posting events directly to Bloomreach under the email address decrypted as the hard_id function identifyCustomerByPhone(phone) { self.sdk.track('double_opt_in', { 'action': "new", 'phone': phone, 'data_source': 'Multi-Step Sign-up Unit (Email & SMS)', 'consent_list': [{ action: "accept", category: PARAM_consentCategorySMS, valid_until: "unlimited" }] }); self.sdk.update({ phone: phone }); self.sdk.identify({ phone_id: phone }); } */ /** * Method used to dynamically load new stylesheet into the page * @param href * @returns {Promise} */ function loadStylesheet(href) { return new Promise(function (resolve) { var el = document.querySelector(`head > link[rel='${href}']`); if (el) { return; } var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = href; document.body.appendChild(l); resolve(true); }); } /** * Method used to dynamically load new javascript into the page * @param src * @returns {Promise} */ function loadScript(src) { return new Promise(function (resolve) { setTimeout(function () { var el = document.querySelector(`body > script[src='${src}']`); if (el) { return el['loaded'] ? resolve(true) : attachLoadListener(el); } var script = document.createElement('script'); script.src = src; script.defer = true; script['loaded'] = false; attachLoadListener(script); document.body.appendChild(script); function attachLoadListener(element) { element.addEventListener('load', function () { element['loaded'] = true; resolve(true); }); } }); }); } /** * Converts string in format "us, gb" to array ["us", "gb"] * @param string */ function stringToArray(string) { return (string || '').split(',').map(function (item) { return item.trim(); }).filter(function (item) { return !!item }); } /** * Shows or hides invalid state for phone number input */ function toggleInvalidNumberState(invalid, input) { if (invalid) { input.setCustomValidity(PARAM_invalidNumberMessage); input.reportValidity(); } else { input.setCustomValidity(''); input.reportValidity(); } } /** * Register the start trigger and return required removal function */ registerStartTrigger(); return { remove: removeBanner, };};w.remove=(w.script.call(w)||{}).remove;w.contextual_personalization={};return w;})({"banner_id":"6712dc0b0a3b116a7298a330","banner_name":"FSA Opt-in Subscription Default Banner - Segment Integrated - revised","banner_type":"subscription","banner_group":"","variant_id":0,"variant_name":"Variant A"}); }