{"branding":{"logoUrl":"https://s7media.vitaminshoppe.com/is/image/VitaminShoppe/TVS_Horizontal_RGB","faviconUrl":"https://www.vitaminshoppe.com/images/favicon.ico","brandName":"Vitamin Shoppe","siteTermsUrl":null,"privacyPolicyUrl":null,"copyright":null,"logoInFooter":false,"additionalTexts":{},"additionalContents":{"myaccount":{"header":{"html":"<!-- <tvs-header host=\"ng8\"></tvs-header> -->\r\n<div class=\"ciam-header-pad\">\r\n    <div class=\"ciam-header-content\">\r\n        <div class=\"ciam-myaccount-heading\">\r\n            <a class=\"back-arrow\">\r\n                <span _ngcontent-fon-c51=\"\"\r\n                    ><svg\r\n                        _ngcontent-fon-c51=\"\"\r\n                        focusable=\"false\"\r\n                        width=\"14px\"\r\n                        height=\"19px\"\r\n                        viewBox=\"0 0 14 19\"\r\n                        version=\"1.1\"\r\n                        xmlns=\"http://www.w3.org/2000/svg\"\r\n                        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n                        aria-hidden=\"true\"\r\n                    >\r\n                        <defs _ngcontent-fon-c51=\"\">\r\n                            <filter\r\n                                _ngcontent-fon-c51=\"\"\r\n                                x=\"-2.8%\"\r\n                                y=\"-16.4%\"\r\n                                width=\"105.6%\"\r\n                                height=\"132.8%\"\r\n                                filterUnits=\"objectBoundingBox\"\r\n                                id=\"filter-1\"\r\n                            >\r\n                                <feOffset\r\n                                    _ngcontent-fon-c51=\"\"\r\n                                    dx=\"0\"\r\n                                    dy=\"1\"\r\n                                    in=\"SourceAlpha\"\r\n                                    result=\"shadowOffsetOuter1\"\r\n                                ></feOffset>\r\n                                <feGaussianBlur\r\n                                    _ngcontent-fon-c51=\"\"\r\n                                    stdDeviation=\"2\"\r\n                                    in=\"shadowOffsetOuter1\"\r\n                                    result=\"shadowBlurOuter1\"\r\n                                ></feGaussianBlur>\r\n                                <feColorMatrix\r\n                                    _ngcontent-fon-c51=\"\"\r\n                                    values=\"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.148118239 0\"\r\n                                    type=\"matrix\"\r\n                                    in=\"shadowBlurOuter1\"\r\n                                    result=\"shadowMatrixOuter1\"\r\n                                ></feColorMatrix>\r\n                                <feMerge _ngcontent-fon-c51=\"\">\r\n                                    <feMergeNode _ngcontent-fon-c51=\"\" in=\"shadowMatrixOuter1\"></feMergeNode>\r\n                                    <feMergeNode _ngcontent-fon-c51=\"\" in=\"SourceGraphic\"></feMergeNode>\r\n                                </feMerge>\r\n                            </filter>\r\n                        </defs>\r\n                        <g\r\n                            _ngcontent-fon-c51=\"\"\r\n                            id=\"Page-1\"\r\n                            stroke=\"none\"\r\n                            stroke-width=\"1\"\r\n                            fill=\"none\"\r\n                            fill-rule=\"evenodd\"\r\n                        >\r\n                            <g\r\n                                _ngcontent-fon-c51=\"\"\r\n                                id=\"Checkout-Copy-82\"\r\n                                transform=\"translate(-4.000000, -37.000000)\"\r\n                                fill=\"#0458ad\"\r\n                                fill-rule=\"nonzero\"\r\n                                stroke=\"#0458ad\"\r\n                                stroke-width=\"1.4\"\r\n                            >\r\n                                <g _ngcontent-fon-c51=\"\" id=\"TOP-Icon-row\" filter=\"url(#filter-1)\">\r\n                                    <g _ngcontent-fon-c51=\"\" id=\"Back-cart\" transform=\"translate(8.545362, 35.000000)\">\r\n                                        <path\r\n                                            _ngcontent-fon-c51=\"\"\r\n                                            d=\"M-1.9763302,8.15136523 C-2.05748388,8.22954838 -2.05989197,8.35871641 -1.98170882,8.43987009 C-1.98150963,8.44007684 -1.98131001,8.44028317 -1.98110996,8.44048908 L1.83252619,12.3657262 C2.21737878,12.761841 2.85047793,12.7709708 3.24659272,12.3861182 C3.25361095,12.3792995 3.26052873,12.3723782 3.2673438,12.3653564 L7.0766239,8.44055731 C7.15523053,8.35956688 7.15329808,8.2301879 7.07230765,8.15158127 C7.07217982,8.1514572 7.07205182,8.1513333 7.07192367,8.15120956 C6.99050073,8.07259563 6.86077678,8.07483283 6.78211299,8.15620761 L2.55044726,12.5337091 L2.55044726,12.5337091 L-1.68626237,8.15643578 C-1.76501897,8.07506623 -1.89477782,8.07279797 -1.9763302,8.15136523 Z\"\r\n                                            id=\"Dropdown\"\r\n                                            transform=\"translate(2.547716, 10.556608) rotate(-270.000000) translate(-2.547716, -10.556608) \"\r\n                                        ></path>\r\n                                    </g>\r\n                                </g>\r\n                            </g>\r\n                        </g></svg></span>Back to My Account</a>\r\n        </div>\r\n        <div class=\"ciam-desk-block ciam-tvs-logo ciam-desktop-logo\">\r\n            <a href=\"https://qa5.vitaminshoppe.com\">\r\n                <svg _ngcontent-vle-c51=\"\" focusable=\"false\" width=\"301px\" height=\"40px\" viewBox=\"0 0 301 40\"\r\n                    version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n                    role=\"img\">\r\n                    <defs _ngcontent-vle-c51=\"\">\r\n                        <polygon _ngcontent-vle-c51=\"\" id=\"path-1\"\r\n                            points=\"0.171348965 0.200833333 19.4583333 0.200833333 19.4583333 26.9582917 0.171348965 26.9582917\">\r\n                        </polygon>\r\n                    </defs>\r\n                    <g _ngcontent-vle-c51=\"\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n                        <g _ngcontent-vle-c51=\"\" id=\"Cart\" transform=\"translate(-24.000000, -46.000000)\">\r\n                            <g _ngcontent-vle-c51=\"\" id=\"Top-NAv\" transform=\"translate(0.000000, 11.000000)\">\r\n                                <g _ngcontent-vle-c51=\"\" id=\"Group-10\" transform=\"translate(24.000000, 35.000000)\">\r\n                                    <path _ngcontent-vle-c51=\"\"\r\n                                        d=\"M285.749833,27.13275 C285.749833,27.3410833 285.9165,27.5494167 286.1665,27.5494167 L294.9165,27.5494167 C295.166917,27.5494167 295.333167,27.3410833 295.333167,27.13275 L295.333167,24.8410833 C295.333167,24.63275 295.166917,24.4244167 294.9165,24.4244167 L289.0415,24.4244167 L289.0415,21.5494167 L293.874833,21.5494167 C294.083167,21.5494167 294.2915,21.38275 294.2915,21.13275 L294.2915,18.8410833 C294.2915,18.63275 294.083167,18.4244167 293.874833,18.4244167 L289.0415,18.4244167 L289.0415,15.7994167 L294.9165,15.7994167 C295.166917,15.7994167 295.333167,15.5910833 295.333167,15.38275 L295.333167,13.0910833 C295.333167,12.88275 295.166917,12.6744167 294.9165,12.6744167 L286.1665,12.6744167 C285.9165,12.6744167 285.749833,12.88275 285.749833,13.0910833 L285.749833,27.13275 Z M271.874833,27.13275 C271.874833,27.3410833 272.041917,27.5494167 272.2915,27.5494167 L274.7915,27.5494167 C274.999833,27.5494167 275.208167,27.3410833 275.208167,27.13275 L275.208167,22.1744167 L277.4165,22.1744167 C279.999833,22.1744167 282.12525,20.0494167 282.12525,17.4244167 C282.12525,14.88275 279.999833,12.75775 277.374833,12.75775 L272.2915,12.75775 C272.041917,12.75775 271.874833,12.9660833 271.874833,13.1744167 L271.874833,27.13275 Z M275.166917,19.0910833 L275.166917,15.8410833 L277.1665,15.8410833 C278.083583,15.8410833 278.833167,16.50775 278.833167,17.4244167 C278.833167,18.38275 278.083583,19.0910833 277.1665,19.0910833 L275.166917,19.0910833 Z M257.958583,27.13275 C257.958583,27.3410833 258.124833,27.5494167 258.37525,27.5494167 L260.87525,27.5494167 C261.083583,27.5494167 261.291917,27.3410833 261.291917,27.13275 L261.291917,22.1744167 L263.50025,22.1744167 C266.083583,22.1744167 268.208167,20.0494167 268.208167,17.4244167 C268.208167,14.88275 266.083583,12.75775 263.458167,12.75775 L258.37525,12.75775 C258.124833,12.75775 257.958583,12.9660833 257.958583,13.1744167 L257.958583,27.13275 Z M261.249833,19.0910833 L261.249833,15.8410833 L263.249833,15.8410833 C264.1665,15.8410833 264.9165,16.50775 264.9165,17.4244167 C264.9165,18.38275 264.1665,19.0910833 263.249833,19.0910833 L261.249833,19.0910833 Z M246.124833,12.50775 C241.874833,12.50775 238.5415,15.9244167 238.5415,20.13275 C238.5415,24.38275 241.916917,27.7160833 246.124833,27.7160833 C250.37525,27.7160833 253.749833,24.3410833 253.749833,20.13275 C253.749833,15.9244167 250.333167,12.50775 246.124833,12.50775 L246.124833,12.50775 Z M246.124833,24.3410833 C243.833167,24.3410833 241.916917,22.4244167 241.916917,20.13275 C241.916917,17.7994167 243.833167,15.88275 246.124833,15.88275 C248.458167,15.88275 250.37525,17.7994167 250.37525,20.13275 C250.333167,22.4660833 248.458167,24.3410833 246.124833,24.3410833 L246.124833,24.3410833 Z M221.62525,27.13275 C221.62525,27.3410833 221.833583,27.5494167 222.041917,27.5494167 L224.541917,27.5494167 C224.7915,27.5494167 224.958583,27.3410833 224.958583,27.13275 L224.958583,21.5494167 L231.00025,21.5494167 L231.00025,27.13275 C231.00025,27.3410833 231.1665,27.5494167 231.416917,27.5494167 L233.916917,27.5494167 C234.12525,27.5494167 234.333583,27.3410833 234.333583,27.13275 L234.333583,13.13275 C234.333583,12.9244167 234.12525,12.7160833 233.916917,12.7160833 L231.416917,12.7160833 C231.1665,12.7160833 231.00025,12.9244167 231.00025,13.13275 L231.00025,18.4660833 L224.958583,18.4660833 L224.958583,13.13275 C224.958583,12.9244167 224.7915,12.7160833 224.541917,12.7160833 L222.041917,12.7160833 C221.833583,12.7160833 221.62525,12.9244167 221.62525,13.13275 L221.62525,27.13275 Z M207.499833,25.50775 C207.333583,25.7994167 207.374833,25.88275 207.624833,26.0910833 C208.124833,26.5910833 209.62525,27.7160833 212.374833,27.7160833 C215.499833,27.7160833 217.374833,25.50775 217.374833,23.3410833 C217.374833,20.4660833 214.75025,19.1744167 213.083583,18.50775 C211.416917,17.8410833 210.791917,17.25775 210.791917,16.4660833 C210.791917,15.88275 211.374833,15.38275 212.12525,15.38275 C213.4165,15.38275 214.958583,16.5494167 215.166917,16.63275 C215.37525,16.7994167 215.749833,16.5910833 215.87525,16.3410833 L216.958167,14.75775 C217.041917,14.5910833 217.083167,14.2160833 216.833583,14.0910833 C216.208583,13.63275 214.499833,12.50775 212.2915,12.50775 C209.0415,12.50775 207.4165,14.63275 207.4165,16.7160833 C207.4165,19.25775 209.708167,20.6744167 211.5415,21.38275 C212.999833,21.9660833 213.708583,22.63275 213.708583,23.50775 C213.708583,24.25775 213.083583,24.75775 212.25025,24.75775 C210.833167,24.75775 209.333583,23.63275 209.249833,23.5910833 C209.083167,23.4660833 208.708583,23.4244167 208.5415,23.7160833 L207.499833,25.50775 L207.499833,25.50775 Z M183.083583,27.13275 C183.083583,27.3410833 183.291917,27.5494167 183.50025,27.5494167 L186.00025,27.5494167 C186.249833,27.5494167 186.416917,27.3410833 186.416917,27.13275 L186.416917,19.25775 L194.7915,27.6744167 C194.833583,27.7160833 194.999833,27.7994167 195.083167,27.7994167 L195.4165,27.7994167 C195.624833,27.7994167 195.833167,27.63275 195.833167,27.4244167 L195.833167,13.13275 C195.833167,12.9244167 195.624833,12.7160833 195.4165,12.7160833 L192.87525,12.7160833 C192.624833,12.7160833 192.458583,12.9244167 192.458583,13.13275 L192.458583,20.63275 L184.00025,12.50775 L183.458167,12.50775 C183.249833,12.50775 183.0415,12.6744167 183.0415,12.88275 L183.083583,27.13275 Z M174.583167,27.13275 C174.583167,27.3410833 174.7915,27.5494167 174.999833,27.5494167 L177.5415,27.5494167 C177.749833,27.5494167 177.958167,27.3410833 177.958167,27.13275 L177.958167,13.13275 C177.958167,12.9244167 177.749833,12.7160833 177.5415,12.7160833 L174.999833,12.7160833 C174.7915,12.7160833 174.583167,12.9244167 174.583167,13.13275 L174.583167,27.13275 Z M153.50025,27.0494167 C153.458167,27.3410833 153.6665,27.50775 153.916917,27.50775 L156.416917,27.50775 C156.62525,27.50775 156.7915,27.3410833 156.833583,27.1744167 L157.749833,20.63275 L157.7915,20.63275 L161.374833,27.50775 C161.458167,27.63275 161.62525,27.75775 161.749833,27.75775 L162.124833,27.75775 C162.25025,27.75775 162.4165,27.63275 162.499833,27.50775 L166.0415,20.63275 L166.083167,20.63275 L167.041917,27.1744167 C167.041917,27.3410833 167.25025,27.50775 167.458583,27.50775 L169.958583,27.50775 C170.208167,27.50775 170.4165,27.2994167 170.37525,27.0494167 L167.999833,12.8410833 C167.958167,12.63275 167.7915,12.50775 167.624833,12.50775 L167.2915,12.50775 C167.1665,12.50775 166.999833,12.5910833 166.9165,12.7160833 L161.999833,21.8410833 L161.958167,21.8410833 L156.958167,12.7160833 C156.874833,12.5910833 156.708167,12.50775 156.583167,12.50775 L156.249833,12.50775 C156.083167,12.50775 155.874833,12.6744167 155.874833,12.8410833 L153.50025,27.0494167 Z M136.333167,26.9660833 C136.208583,27.25775 136.374833,27.50775 136.708167,27.50775 L139.0415,27.50775 C139.458167,27.50775 139.708167,27.25775 139.7915,27.00775 L140.5415,25.2994167 L146.2915,25.2994167 L147.041917,26.9660833 C147.25025,27.38275 147.4165,27.50775 147.7915,27.50775 L150.124833,27.50775 C150.458167,27.50775 150.624833,27.2160833 150.499833,26.9660833 L143.874833,12.7160833 C143.7915,12.5910833 143.6665,12.4660833 143.50025,12.4660833 L143.291917,12.4660833 C143.124833,12.4660833 142.999833,12.5910833 142.9165,12.7160833 L136.333167,26.9660833 L136.333167,26.9660833 Z M141.833583,22.4660833 L143.4165,18.9660833 L145.0415,22.4660833 L141.833583,22.4660833 Z M128.749833,27.13275 C128.749833,27.3410833 128.958167,27.5494167 129.1665,27.5494167 L131.708167,27.5494167 C131.9165,27.5494167 132.124833,27.3410833 132.124833,27.13275 L132.124833,15.8410833 L135.166917,15.8410833 C135.4165,15.8410833 135.583583,15.63275 135.583583,15.4244167 L135.583583,13.13275 C135.583583,12.9244167 135.4165,12.7160833 135.166917,12.7160833 L125.791917,12.7160833 C125.5415,12.7160833 125.37525,12.9244167 125.37525,13.13275 L125.37525,15.4244167 C125.37525,15.63275 125.5415,15.8410833 125.791917,15.8410833 L128.833167,15.8410833 L128.833167,27.13275 L128.749833,27.13275 Z M118.458167,27.13275 C118.458167,27.3410833 118.6665,27.5494167 118.874833,27.5494167 L121.416917,27.5494167 C121.62525,27.5494167 121.833583,27.3410833 121.833583,27.13275 L121.833583,13.13275 C121.833583,12.9244167 121.62525,12.7160833 121.416917,12.7160833 L118.874833,12.7160833 C118.6665,12.7160833 118.458167,12.9244167 118.458167,13.13275 L118.458167,27.13275 Z M107.499833,27.50775 C107.583167,27.63275 107.708167,27.75775 107.87525,27.75775 L108.083583,27.75775 C108.249833,27.75775 108.374833,27.63275 108.458167,27.50775 L115.083167,13.25775 C115.208167,12.9660833 115.0415,12.7160833 114.708167,12.7160833 L111.874833,12.7160833 C111.708167,12.7160833 111.5415,12.8410833 111.499833,12.9660833 L107.999833,20.6744167 L107.87525,20.6744167 L104.374833,12.9660833 C104.333583,12.8410833 104.1665,12.7160833 103.999833,12.7160833 L101.1665,12.7160833 C100.833167,12.7160833 100.6665,13.00775 100.791917,13.25775 L107.499833,27.50775 Z M81.4998333,27.13275 C81.4998333,27.3410833 81.6665,27.5494167 81.9165,27.5494167 L90.6665,27.5494167 C90.9165,27.5494167 91.0831667,27.3410833 91.0831667,27.13275 L91.0831667,24.8410833 C91.0831667,24.63275 90.9165,24.4244167 90.6665,24.4244167 L84.7915,24.4244167 L84.7915,21.5494167 L89.6248333,21.5494167 C89.8331667,21.5494167 90.0415,21.38275 90.0415,21.13275 L90.0415,18.8410833 C90.0415,18.63275 89.8331667,18.4244167 89.6248333,18.4244167 L84.7915,18.4244167 L84.7915,15.7994167 L90.6665,15.7994167 C90.9165,15.7994167 91.0831667,15.5910833 91.0831667,15.38275 L91.0831667,13.0910833 C91.0831667,12.88275 90.9165,12.6744167 90.6665,12.6744167 L81.9165,12.6744167 C81.6665,12.6744167 81.4998333,12.88275 81.4998333,13.0910833 L81.4998333,27.13275 Z M63.5831667,27.13275 C63.5831667,27.3410833 63.7915,27.5494167 63.9998333,27.5494167 L66.4998333,27.5494167 C66.7498333,27.5494167 66.9165,27.3410833 66.9165,27.13275 L66.9165,21.5494167 L72.9581667,21.5494167 L72.9581667,27.13275 C72.9581667,27.3410833 73.1248333,27.5494167 73.3748333,27.5494167 L75.8748333,27.5494167 C76.0831667,27.5494167 76.2915,27.3410833 76.2915,27.13275 L76.2915,13.13275 C76.2915,12.9244167 76.0831667,12.7160833 75.8748333,12.7160833 L73.3748333,12.7160833 C73.1248333,12.7160833 72.9581667,12.9244167 72.9581667,13.13275 L72.9581667,18.4660833 L66.9165,18.4660833 L66.9165,13.13275 C66.9165,12.9244167 66.7498333,12.7160833 66.4998333,12.7160833 L63.9998333,12.7160833 C63.7915,12.7160833 63.5831667,12.9244167 63.5831667,13.13275 L63.5831667,27.13275 Z M53.2919167,15.8410833 L50.2498333,15.8410833 C49.9998333,15.8410833 49.8331667,15.63275 49.8331667,15.4244167 L49.8331667,13.13275 C49.8331667,12.9244167 49.9998333,12.7160833 50.2498333,12.7160833 L59.6248333,12.7160833 C59.8748333,12.7160833 60.0415,12.9244167 60.0415,13.13275 L60.0415,15.4244167 C60.0415,15.63275 59.8748333,15.8410833 59.6248333,15.8410833 L56.5831667,15.8410833 L56.5831667,27.13275 C56.5831667,27.3410833 56.3748333,27.5494167 56.1665,27.5494167 L53.6248333,27.5494167 C53.4165,27.5494167 53.2081667,27.3410833 53.2081667,27.13275 L53.2081667,15.8410833 L53.2919167,15.8410833 Z\"\r\n                                        id=\"Fill-1\" fill=\"#012169\"></path>\r\n                                    <path _ngcontent-vle-c51=\"\"\r\n                                        d=\"M298.458167,14.174375 L298.624833,14.174375 C298.833167,14.174375 299.00025,14.0910417 299.00025,13.9660417 C299.00025,13.8410417 298.874833,13.7160417 298.6665,13.7160417 L298.458167,13.7160417 L298.458167,14.174375 Z M298.458167,15.049375 L298.083583,15.049375 L298.083583,13.5077083 C298.208167,13.5077083 298.4165,13.4660417 298.6665,13.4660417 C298.958167,13.4660417 299.083167,13.5077083 299.208583,13.5910417 C299.2915,13.674375 299.374833,13.7577083 299.374833,13.924375 C299.374833,14.1327083 299.249833,14.2577083 299.0415,14.299375 C299.208583,14.3410417 299.249833,14.4660417 299.333583,14.674375 C299.374833,14.924375 299.416917,15.0077083 299.458167,15.049375 L299.083167,15.049375 C299.0415,15.0077083 299.00025,14.8410417 298.958167,14.674375 C298.916917,14.5077083 298.833167,14.424375 298.624833,14.424375 L298.458167,14.424375 L298.458167,15.049375 Z M297.499833,14.2160417 C297.499833,14.924375 298.0415,15.4660417 298.708583,15.4660417 C299.374833,15.4660417 299.9165,14.924375 299.9165,14.2160417 C299.9165,13.5077083 299.416917,12.9660417 298.708583,12.9660417 C298.0415,13.0077083 297.499833,13.549375 297.499833,14.2160417 L297.499833,14.2160417 Z M300.2915,14.2160417 C300.2915,15.0910417 299.583167,15.799375 298.708583,15.799375 C297.833167,15.799375 297.083167,15.0910417 297.083167,14.2160417 C297.083167,13.3410417 297.7915,12.674375 298.708583,12.674375 C299.583167,12.674375 300.2915,13.3410417 300.2915,14.2160417 L300.2915,14.2160417 Z\"\r\n                                        id=\"Fill-3\" fill=\"#012169\"></path>\r\n                                    <g _ngcontent-vle-c51=\"\" id=\"Group-7\" transform=\"translate(27.500000, 0.216000)\">\r\n                                        <mask _ngcontent-vle-c51=\"\" id=\"mask-2\" fill=\"white\">\r\n                                            <use _ngcontent-vle-c51=\"\" xlink:href=\"#path-1\"></use>\r\n                                        </mask>\r\n                                        <g _ngcontent-vle-c51=\"\" id=\"Clip-6\"></g>\r\n                                        <path _ngcontent-vle-c51=\"\"\r\n                                            d=\"M19.4583333,1.58329167 C17.5416667,0.208291667 7.75,-1.54170833 3.20833333,4.08329167 C-4.91666667,14.2499583 5.83333333,26.9582917 5.83333333,26.9582917 L19.4583333,1.58329167 Z\"\r\n                                            id=\"Fill-5\" fill=\"#15BEF0\" mask=\"url(#mask-2)\"></path>\r\n                                    </g>\r\n                                    <path _ngcontent-vle-c51=\"\"\r\n                                        d=\"M26.583375,20.3409583 C24.1667083,15.8409583 20.958375,9.257625 20.583375,8.54929167 C16.7500417,1.79929167 11.583375,1.09095833 8.54170833,1.09095833 L4.16666667e-05,1.09095833 C4.16666667e-05,1.09095833 18.6250417,36.7159583 18.8750417,37.1742917 C20.0417083,39.007625 21.708375,39.7992917 23.5000417,39.7992917 C25.2917083,39.7992917 26.9167083,39.132625 28.083375,37.1742917 L33.3750417,27.1742917 C33.333375,27.1742917 30.6667083,27.9659583 26.583375,20.3409583\"\r\n                                        id=\"Fill-8\" fill=\"#012169\"></path>\r\n                                </g>\r\n                            </g>\r\n                        </g>\r\n                    </g>\r\n                </svg></a>\r\n\r\n        </div>\r\n        <div _ngcontent-vlu-c51=\"\" class=\"ciam-mob-block ciam-tvs-logo ciam-mob-logo\"><a _ngcontent-vlu-c51=\"\" href=\"https://qa5.vitaminshoppe.com\"\r\n                title=\"Home\" tabindex=\"0\"><svg _ngcontent-vlu-c51=\"\" focusable=\"false\" width=\"42px\" height=\"36px\"\r\n                    viewBox=\"0 0 41 35\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"\r\n                    xmlns:xlink=\"http://www.w3.org/1999/xlink\" role=\"img\">\r\n                    <defs _ngcontent-vlu-c51=\"\">\r\n                        <filter _ngcontent-vlu-c51=\"\" x=\"-2.8%\" y=\"-16.4%\" width=\"105.6%\" height=\"132.8%\"\r\n                            filterUnits=\"objectBoundingBox\" id=\"filter-1\">\r\n                            <feOffset _ngcontent-vlu-c51=\"\" dx=\"0\" dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\">\r\n                            </feOffset>\r\n                            <feGaussianBlur _ngcontent-vlu-c51=\"\" stdDeviation=\"2\" in=\"shadowOffsetOuter1\"\r\n                                result=\"shadowBlurOuter1\"></feGaussianBlur>\r\n                            <feColorMatrix _ngcontent-vlu-c51=\"\"\r\n                                values=\"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.148118239 0\" type=\"matrix\"\r\n                                in=\"shadowBlurOuter1\" result=\"shadowMatrixOuter1\"></feColorMatrix>\r\n                            <feMerge _ngcontent-vlu-c51=\"\">\r\n                                <feMergeNode _ngcontent-vlu-c51=\"\" in=\"shadowMatrixOuter1\"></feMergeNode>\r\n                                <feMergeNode _ngcontent-vlu-c51=\"\" in=\"SourceGraphic\"></feMergeNode>\r\n                            </feMerge>\r\n                        </filter>\r\n                        <polygon _ngcontent-vlu-c51=\"\" id=\"path-2\"\r\n                            points=\"0.121203845 0.136404281 13.7638696 0.136404281 13.7638696 18.3098409 0.121203845 18.3098409\">\r\n                        </polygon>\r\n                    </defs>\r\n                    <g _ngcontent-vlu-c51=\"\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n                        <g _ngcontent-vlu-c51=\"\" id=\"TOP-Icon-row\" transform=\"translate(-166.000000, -20.000000)\"\r\n                            filter=\"url(#filter-1)\">\r\n                            <g _ngcontent-vlu-c51=\"\" id=\"Logos/Full\" transform=\"translate(0.000000, 16.000000)\">\r\n                                <g _ngcontent-vlu-c51=\"\" id=\"V-logo\" transform=\"translate(170.000000, 7.000000)\">\r\n                                    <g _ngcontent-vlu-c51=\"\" id=\"Group-7\" transform=\"translate(19.452120, 0.000000)\">\r\n                                        <mask _ngcontent-vlu-c51=\"\" id=\"mask-3\" fill=\"white\">\r\n                                            <use _ngcontent-vlu-c51=\"\" xlink:href=\"#path-2\"></use>\r\n                                        </mask>\r\n                                        <g _ngcontent-vlu-c51=\"\" id=\"Clip-6\"></g>\r\n                                        <path _ngcontent-vlu-c51=\"\"\r\n                                            d=\"M13.7638696,1.07535815 C12.4081137,0.141469917 5.48196949,-1.0471151 2.26941748,2.77333674 C-3.4778086,9.6784497 4.12621359,18.3098409 4.12621359,18.3098409 L13.7638696,1.07535815 Z\"\r\n                                            id=\"Fill-5\" fill=\"#41B6E6\" mask=\"url(#mask-3)\"></path>\r\n                                    </g>\r\n                                    <path _ngcontent-vlu-c51=\"\"\r\n                                        d=\"M18.8037448,13.6686994 C17.0943135,10.6123379 14.824896,6.14099429 14.5596394,5.65990036 C11.8481276,1.07535815 8.19348128,0.594264209 6.04195562,0.594264209 L-3.55271368e-14,0.594264209 C-3.55271368e-14,0.594264209 13.1744105,24.7904592 13.3512483,25.1017553 C14.176491,26.3469396 15.3554092,26.8846328 16.6227462,26.8846328 C17.8900832,26.8846328 19.0395284,26.4318385 19.8647712,25.1017553 L23.6078363,18.3098409 C23.5783634,18.3098409 21.6920943,18.8475341 18.8037448,13.6686994\"\r\n                                        id=\"Fill-8\" fill=\"#012169\"></path>\r\n                                </g>\r\n                            </g>\r\n                        </g>\r\n                    </g>\r\n                </svg></a></div>\r\n        <span _ngcontent-vlu-c51=\"\" class=\"ciam-chat-icon\"><a _ngcontent-vlu-c51=\"\" href=\"javascript:void(0)\"><svg _ngcontent-vlu-c51=\"\" focusable=\"false\" width=\"33px\" height=\"31px\" viewBox=\"0 0 33 31\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><defs _ngcontent-vlu-c51=\"\"><filter _ngcontent-vlu-c51=\"\" x=\"-2.8%\" y=\"-16.4%\" width=\"105.6%\" height=\"132.8%\" filterUnits=\"objectBoundingBox\" id=\"filter-1\"><feOffset _ngcontent-vlu-c51=\"\" dx=\"0\" dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset><feGaussianBlur _ngcontent-vlu-c51=\"\" stdDeviation=\"2\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur><feColorMatrix _ngcontent-vlu-c51=\"\" values=\"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.148118239 0\" type=\"matrix\" in=\"shadowBlurOuter1\" result=\"shadowMatrixOuter1\"></feColorMatrix><feMerge _ngcontent-vlu-c51=\"\"><feMergeNode _ngcontent-vlu-c51=\"\" in=\"shadowMatrixOuter1\"></feMergeNode><feMergeNode _ngcontent-vlu-c51=\"\" in=\"SourceGraphic\"></feMergeNode></feMerge></filter></defs><g _ngcontent-vlu-c51=\"\" id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><g _ngcontent-vlu-c51=\"\" id=\"Checkout-Copy-28\" transform=\"translate(-332.000000, -25.000000)\" stroke=\"#666666\" stroke-width=\"1.2\"><g _ngcontent-vlu-c51=\"\" id=\"TOP-Icon-row\" filter=\"url(#filter-1)\"><g _ngcontent-vlu-c51=\"\" id=\"chat\" transform=\"translate(337.000000, 29.000000)\"><path _ngcontent-vlu-c51=\"\" d=\"M22.695,9.5319 C22.695,14.7966 17.614,19.0638 11.348,19.0638 C9.616,19.0638 7.975,18.7383 6.507,18.15555 C4.586,19.51005 0.189,21 0.189,21 C0.189,21 2.147,17.84265 2.488,15.48855 C0.931,13.85685 0,11.7852 0,9.5319 C0,4.2672 5.081,0 11.348,0 C17.614,0 22.695,4.2672 22.695,9.5319 Z\" id=\"Stroke-1\"></path></g></g></g></g></svg></a></span>\r\n\r\n    </div>\r\n</div>","link":null},"footer":{"html":"<tvs-footer></tvs-footer>","link":null}}},"additionalScripts":{"login":"/**\r\n * login-branding.js\r\n *\r\n * Strivacity CIAM integration: branding, UI overrides, analytics tagging,\r\n * WebAuthn/passkey safeguards and form validation for TVS auth flows (login,\r\n * registration, password reset, MFA, passkeys, remembered accounts,\r\n * complete-profile / checkout).\r\n *\r\n * Runs on the Strivacity-hosted journey, hooking the SDK's custom events\r\n * (`form-ready`, `block-ready`, `block-request`) plus native DOM events.\r\n *\r\n * Structure:\r\n *   1. Global state & feature detection (devicePasskeySupported)\r\n *   2. WebAuthn pending-request guard (IIFE)\r\n *   3. GA / analytics tagging (getPageType, login-method tracking, reportLogin)\r\n *   4. SVG assets (desktop/mobile graphics)\r\n *   5. DOM & flow helpers (findByText, hideHost/unhideHost, advancePast, handlerFor)\r\n *   6. Phone field formatting & locking (formatUsNationalDigits, lockCountryCodeValue)\r\n *   7. handleGlobalObserver: MutationObserver for dynamic UI customization\r\n *   8. form-ready: live field validation, submit gating, completeprofile patching\r\n *   9. block-ready: i18n overrides and per-block UI customizations\r\n *  10. block-request: global error banners, email error copy, remembered-account cleanup\r\n *  11. brandingLoaded: load hook\r\n *  12. Reset-link click interceptor (capture phase)\r\n *  13. Utilities: setupBackButton, checkoutStaticContent, displayWarningForSocialLogin,\r\n *      setRememberedAccount, removeRememberedAccountsUI, removeAllRememberedAccount,\r\n *      clearLocalAuthState\r\n */\r\n\r\nlet blockDetail = null;\r\nlet observerForScreen = null;\r\nlet observer = null;\r\nlet observerForRetry = null;\r\nlet emailControl = null;\r\n/** Short App Id is first 7 characters from Client ID in Edit URL of it */\r\nlet shortAppIdForBranding = \"29565bf\";\r\nif (window.location.href.includes(\"qa1.vitaminshoppe.com\") || window.location.href.includes(\"qa3.vitaminshoppe.com\") || window.location.href.includes(\"qa4.vitaminshoppe.com\")) {\r\n  shortAppIdForBranding = \"43212f7\";\r\n}\r\nelse if (window.location.href.includes(\"www.vitaminshoppe.com\")) {\r\n  shortAppIdForBranding = \"c38bc7a\";\r\n}\r\n\r\nconst devicePasskeySupported =\r\n  window.isSecureContext &&\r\n  typeof window.PublicKeyCredential !== 'undefined' &&\r\n  typeof navigator.credentials?.get === 'function';\r\n\r\n/* -------------------------------------------------------------------------- */\r\n/* WebAuthn pending-request guard                                             */\r\n/* -------------------------------------------------------------------------- */\r\n/*\r\n * Bug: the Sign In modal starts a passkey-autofill request\r\n *   `navigator.credentials.get({ mediation: 'conditional' })` that stays pending\r\n *   for the page lifetime (closing tvs-modal only hides <sty-login>). Chrome\r\n *   allows one in-flight WebAuthn ceremony per document, so a later\r\n *   `credentials.create()` at passkey-enroll fails with \"A request is already\r\n *   pending\" and the native passkey modal never appears.\r\n *\r\n * Fix: wrap navigator.credentials to (1) track conditional get() via linked\r\n *   AbortControllers, (2) abort them before any create(), (3) also abort on\r\n *   modal close (body loses `tvs-modal-open`) and on pagehide.\r\n */\r\n(function installWebAuthnPendingRequestGuard() {\r\n  try {\r\n    const creds = navigator.credentials;\r\n    if (!creds || typeof creds.get !== 'function' || creds.__tvsWebAuthnGuard) {\r\n      return;\r\n    }\r\n    creds.__tvsWebAuthnGuard = true;\r\n\r\n    const origGet = creds.get.bind(creds);\r\n    const origCreate = creds.create ? creds.create.bind(creds) : null;\r\n    const pendingConditionalControllers = new Set();\r\n\r\n    // AbortSignal.any (Chrome 116+) lets us keep the SDK's own abort signal\r\n    // working while adding our own cancel channel. Fall back gracefully.\r\n    const linkSignals = (existingSignal, ownSignal) => {\r\n      if (!existingSignal) {\r\n        return ownSignal;\r\n      }\r\n      if (typeof AbortSignal !== 'undefined' && typeof AbortSignal.any === 'function') {\r\n        return AbortSignal.any([existingSignal, ownSignal]);\r\n      }\r\n      return existingSignal;\r\n    };\r\n\r\n    const abortPendingConditionalRequests = () => {\r\n      if (!pendingConditionalControllers.size) {\r\n        return;\r\n      }\r\n      console.debug('login-branding: aborting stale conditional WebAuthn request(s):', pendingConditionalControllers.size);\r\n      pendingConditionalControllers.forEach((controller) => {\r\n        try {\r\n          controller.abort();\r\n        } catch (e) {\r\n          console.debug('login-branding: failed to abort conditional WebAuthn request', e);\r\n        }\r\n      });\r\n      pendingConditionalControllers.clear();\r\n    };\r\n\r\n    // Expose for other integration code that may want to cancel explicitly.\r\n    window.tvsAbortPendingWebAuthn = abortPendingConditionalRequests;\r\n\r\n    creds.get = function patchedCredentialsGet(options) {\r\n      try {\r\n        if (options && options.mediation === 'conditional') {\r\n          const controller = new AbortController();\r\n          const patchedOptions = Object.assign({}, options, {\r\n            signal: linkSignals(options.signal, controller.signal),\r\n          });\r\n          pendingConditionalControllers.add(controller);\r\n\r\n          const request = origGet(patchedOptions);\r\n          const cleanup = () => pendingConditionalControllers.delete(controller);\r\n          request.then(cleanup, cleanup);\r\n          return request;\r\n        }\r\n      } catch (e) {\r\n        console.debug('login-branding: WebAuthn get() guard error, falling back', e);\r\n      }\r\n      return origGet(options);\r\n    };\r\n\r\n    if (origCreate) {\r\n      creds.create = function patchedCredentialsCreate(options) {\r\n        // A passkey ceremony is starting - make sure no stale conditional\r\n        // request is holding the single WebAuthn slot, otherwise the native\r\n        // modal is silently blocked with \"A request is already pending.\".\r\n        abortPendingConditionalRequests();\r\n        return origCreate(options);\r\n      };\r\n    }\r\n\r\n    // Abort stale requests whenever a modal is (re)opened so only the freshly\r\n    // opened flow keeps a live conditional request and Strivacity initializes\r\n    // exactly one WebAuthn ceremony; also abort on close as a safety net.\r\n    // tvs-modal toggles `tvs-modal-open` on <body> while a modal is visible.\r\n    const observeModalToggle = () => {\r\n      if (typeof MutationObserver === 'undefined' || !document.body) {\r\n        return;\r\n      }\r\n      let wasModalOpen = document.body.classList.contains('tvs-modal-open');\r\n      const bodyClassObserver = new MutationObserver(() => {\r\n        const isModalOpen = document.body.classList.contains('tvs-modal-open');\r\n        if (isModalOpen !== wasModalOpen) {\r\n          // Opening: abort leftovers from a previous modal BEFORE the new flow\r\n          // starts its own conditional get(). Closing: abort what it left behind.\r\n          abortPendingConditionalRequests();\r\n          wasModalOpen = isModalOpen;\r\n        }\r\n      });\r\n      bodyClassObserver.observe(document.body, { attributes: true, attributeFilter: ['class'] });\r\n    };\r\n\r\n    if (document.body) {\r\n      observeModalToggle();\r\n    } else {\r\n      document.addEventListener('DOMContentLoaded', observeModalToggle, { once: true });\r\n    }\r\n\r\n    window.addEventListener('pagehide', abortPendingConditionalRequests);\r\n  } catch (e) {\r\n    console.debug('login-branding: failed to install WebAuthn pending-request guard', e);\r\n  }\r\n})();\r\n\r\n/*\r\n======================\r\n       START GA\r\n======================\r\n*/\r\n\r\n/**\r\n * Determines the current page type from the browser URL, based on the path\r\n * segment after the base URL (or a trailing segment / query param for some\r\n * pages). Check order matters - some rules are more specific than others.\r\n *\r\n * @returns Page type string (e.g. 'home', 'PLP', 'PDP', 'brand', 'cart',\r\n *          'checkout', 'thankYou', 'login', 'order-history-login', 'msi',\r\n *          'wishlist', 'myautodelivery', 'myAccount', 'registration',\r\n *          'purchaseHistory', 'completeprofile', 'LP'), or 'undefined'.\r\n */\r\nfunction getPageType() {\r\n  if (typeof window === 'undefined' || !window.location) {\r\n    return 'undefined';\r\n  }\r\n\r\n  const { pathname, search } = window.location;\r\n  const path = (pathname || '').toLowerCase();\r\n  const query = (search || '').toLowerCase();\r\n\r\n  // Home page: base URL only (no meaningful path)\r\n  if (path === '' || path === '/') {\r\n    return 'home';\r\n  }\r\n\r\n  // completeprofile is identified via a query param named \"completeprofile\"\r\n  if (query.includes('completeprofile') || path.includes('/completeprofile')) {\r\n    return 'completeprofile';\r\n  }\r\n\r\n  // Segment-prefixed pages (segment right after base URL)\r\n  if (path.startsWith('/c/')) {\r\n    return 'PLP';\r\n  }\r\n  if (path.startsWith('/p/')) {\r\n    return 'PDP';\r\n  }\r\n  if (path.startsWith('/b/')) {\r\n    return 'brand';\r\n  }\r\n  if (path.startsWith('/lp/')) {\r\n    return 'LP';\r\n  }\r\n  if (path.startsWith('/cart/')) {\r\n    return 'cart';\r\n  }\r\n\r\n  // Trailing / contains segment pages\r\n  if (path.includes('/checkout')) {\r\n    return 'checkout';\r\n  }\r\n  if (path.includes('/thankyou')) {\r\n    return 'thankYou';\r\n  }\r\n  if (path.includes('/login')) {\r\n    return 'login';\r\n  }\r\n  if (path.includes('/order-history-login')) {\r\n    return 'order-history-login';\r\n  }\r\n  if (path.includes('/msi')) {\r\n    return 'msi';\r\n  }\r\n  // Both /wishlist and /saved-items map to 'wishlist'\r\n  if (path.includes('/wishlist') || path.includes('/saved-items')) {\r\n    return 'wishlist';\r\n  }\r\n  if (path.includes('/myautodelivery')) {\r\n    return 'myautodelivery';\r\n  }\r\n  if (path.includes('/myaccount')) {\r\n    return 'myAccount';\r\n  }\r\n  if (path.includes('/registration')) {\r\n    return 'registration';\r\n  }\r\n  if (path.includes('/purchasehistory')) {\r\n    return 'purchaseHistory';\r\n  }\r\n  if (path.includes('/rewardscenter')) {\r\n    return 'MY_HEALTHY_AWARDS';\r\n  }\r\n\r\n  return 'HOME';\r\n}\r\n\r\nlet radioObserver; // module/outer scope, created once\r\nvar EVENT_TYPE = 'sty.ga.eventType';\r\nvar LOGIN_METHOD_STORAGE_KEY = 'sty.ga.lastLoginMethod';\r\nvar REPORTED_KEY = 'sty.ga.loginReported';\r\nvar PREFERRED_AUTH_METHOD_KEY = 'preferredAuthMethod';\r\n\r\n// Reported when the specific login/registration authentication method\r\n// cannot be identified.\r\nconst DEFAULT_LOGIN_METHOD = 'Strivacity';\r\n\r\nconst LOGIN_METHOD_BY_BLOCK = {\r\n  password: () => 'password',\r\n  passkey: () => 'passkey',\r\n  otp: () => 'otp',\r\n  passcode: () => 'passkey',\r\n  externalLoginProvider: (request) =>\r\n    `${String(request?.provider ?? 'unknown').replace(/^STV/, '').toLowerCase()}`,\r\n};\r\n\r\nfunction initLoginMethodTracking() {\r\n  document.addEventListener('block-request', (event) => {\r\n    const { block, request } = event.detail ?? {};\r\n    const resolveMethod = LOGIN_METHOD_BY_BLOCK[block];\r\n    if (resolveMethod) {\r\n      const method = resolveMethod(request);\r\n      sessionStorage.setItem(LOGIN_METHOD_STORAGE_KEY, method);\r\n      console.debug(\"GA tagging logs: LOGIN_METHOD_STORAGE_KEY\", sessionStorage.getItem(LOGIN_METHOD_STORAGE_KEY));\r\n      console.debug('GA tagging logs: Resolved method:', method, '-> stored under', LOGIN_METHOD_STORAGE_KEY);\r\n    } else {\r\n      console.debug('GA tagging logs: Block not in LOGIN_METHOD_BY_BLOCK:', block);\r\n    }\r\n  });\r\n}\r\n\r\nfunction reportLogin(pageType) {\r\n  // if (sessionStorage.getItem(REPORTED_KEY)) {\r\n  //   console.debug(\"Returned without logging\");\r\n  //   return;\r\n  // }\r\n  console.debug(\"GA Tagging Logs: reportLogin: LOGIN_METHOD_STORAGE_KEY: \", sessionStorage.getItem(LOGIN_METHOD_STORAGE_KEY));\r\n  const methodType = sessionStorage.getItem(LOGIN_METHOD_STORAGE_KEY); // Use this during login only so its optional and can be null\r\n  const preferredAuthMethod = sessionStorage.getItem(PREFERRED_AUTH_METHOD_KEY); // Use this during registration only so its optional and can be null\r\n  const e_Type = sessionStorage.getItem(EVENT_TYPE)\r\n\r\n  let e_Method = methodType || \"\";\r\n  if (e_Type === \"sign_up\") {\r\n    if (methodType !== null && (methodType.includes('apple') || methodType.includes('google'))) {\r\n      // Registration with social methods\r\n      e_Method = methodType\r\n    } else {\r\n      // Registration with passkey || passowrd\r\n      e_Method = preferredAuthMethod\r\n    }\r\n  } else if (e_Type == \"e_login\") {\r\n    // Login flow\r\n    e_Method = methodType\r\n  }\r\n\r\n  console.debug(\"Returned without logging 1: \", e_Method);\r\n\r\n  if (methodType.includes('apple') || methodType.includes('google')) {\r\n\r\n    console.debug(\"Returned without logging 2\");\r\n    localStorage.setItem('socialLoginProviderInfoCIAM', methodType);\r\n  }\r\n\r\n  // Fallback: when the specific login/registration authentication method cannot\r\n  // be identified (null/undefined/empty), report the generic provider instead.\r\n  if (e_Method === null || e_Method === undefined || String(e_Method).trim() === \"\") {\r\n    e_Method = DEFAULT_LOGIN_METHOD;\r\n  }\r\n  console.debug(\"Returned without logging 2: \", e_Method);\r\n  sessionStorage.setItem(REPORTED_KEY, '1');\r\n  sessionStorage.removeItem(LOGIN_METHOD_STORAGE_KEY);\r\n  sessionStorage.removeItem(EVENT_TYPE);\r\n  sessionStorage.removeItem(PREFERRED_AUTH_METHOD_KEY);\r\n  // debugger;\r\n  console.debug(\"Returned without logging 3: \", e_Method);\r\n  console.debug(\"GA tagging logs: payload\", {\r\n    event: e_Type,\r\n    method: e_Method,\r\n    page_type: pageType,\r\n  });\r\n\r\n  sty.webAnalyticsService.track(e_Type, {\r\n    method: e_Method,\r\n    page_type: pageType,\r\n  });\r\n  console.debug(\"GA event fired\");\r\n}\r\n\r\nfunction setupRadioObserver() {\r\n  if (radioObserver) {\r\n    radioObserver.disconnect(); // clear all previous observations\r\n  }\r\n  radioObserver = new MutationObserver((mutations) => {\r\n    mutations.forEach((m) => {\r\n      const el = m.target;\r\n      if (el.tagName === 'STY-RADIO' && el.getAttribute('aria-checked') === 'true') {\r\n        console.debug('aria-checked mutation ->', el.getAttribute('value'));\r\n        sessionStorage.setItem(PREFERRED_AUTH_METHOD_KEY, el.getAttribute('value'));\r\n      }\r\n    });\r\n  });\r\n\r\n  document.querySelectorAll('sty-radio').forEach((el) => {\r\n    radioObserver.observe(el, { attributes: true, attributeFilter: ['aria-checked'] });\r\n  });\r\n}\r\n\r\ninitLoginMethodTracking();\r\n\r\n/*\r\n======================\r\n        END GA\r\n======================\r\n*/\r\n\r\n/* ----------------------------------- */\r\n/* SVGs for Desktop and Mobile */\r\n/* ----------------------------------- */\r\n\r\nconst desktopSvg = `<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"Layer_1\" version=\"1.1\" viewBox=\"0 0 409.3 207.7\">\r\n  <defs>\r\n    <style>\r\n      .st0 {\r\n        fill-rule: evenodd;\r\n      }\r\n      .st0, .st1, .st2 {\r\n        fill: #012169;\r\n      }\r\n      .st1 {\r\n        stroke: #012169; stroke-linecap: round; stroke-linejoin: round;\r\n      }\r\n      .st3 {\r\n        fill: #9cdbd9;\r\n      }\r\n      .st4 {\r\n        isolation: isolate;\r\n      }\r\n      .st5 {\r\n        fill: #fff;\r\n      }\r\n      .st6 {\r\n        fill: #44b6e5;\r\n      }\r\n      .st7 {\r\n        fill: #45b8e7;\r\n      }\r\n    </style>\r\n  </defs>\r\n  <path class=\"st5\" d=\"M111.4,13.1h211.3c1.8,0,3.2,1.4,3.2,3.2v134.8H108.2V16.3c0-1.8,1.4-3.2,3.2-3.2Z\"/>\r\n  <path class=\"st2\" d=\"M319.9,11.3c-.8-.2-1.6-.3-2.4-.3H116.5c-5.7,0-10.4,4.7-10.4,10.4v125.6c0,3.4,2.8,6.2,6.2,6.2h209.4c3.4,0,6.2-2.8,6.2-6.2V21.5c0-4.9-3.4-9-8-10.1ZM323.7,147.1c0,1.1-.9,2-2,2H112.3c-1.1,0-2-.9-2-2V21.5c0-3.4,2.8-6.2,6.2-6.2h201c.8,0,1.6.2,2.4.5,2.3.9,3.8,3.2,3.8,5.7v125.6Z\"/>\r\n  <path class=\"st2\" d=\"M369.1,196.7c-1.2,2-3.2,3.3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.5v12.2Z\"/>\r\n  <path class=\"st6\" d=\"M196.7,71.3h41.4c4.3,0,7.7,3.5,7.7,7.7v25.6c0,4.3-3.5,7.7-7.7,7.7h-41.4c-4.3,0-7.7-3.5-7.7-7.7v-25.6c0-4.3,3.5-7.7,7.7-7.7Z\"/>\r\n  <path class=\"st2\" d=\"M222.4,87c0-3.2-2.9-5.7-6.2-5-1.9.4-3.5,1.9-3.9,3.9-.5,2.3.6,4.5,2.5,5.5.3.2.5.6.4,1l-1.4,5.8c-.1.6.3,1.2,1,1.2h4.9c.6,0,1.1-.6,1-1.2l-1.4-5.8c0-.4,0-.8.4-1,1.5-.9,2.6-2.5,2.6-4.4Z\"/>\r\n  <path class=\"st6\" d=\"M16.1,152.6c-8.9,0-16.1-7.2-16.1-16.1s7.2-16.1,16.1-16.1h131.2c8.9,0,16.1,7.2,16.1,16.1s-7.2,16.1-16.1,16.1H16.1Z\"/>\r\n  <circle class=\"st2\" cx=\"43.5\" cy=\"136.5\" r=\"5.3\"/>\r\n  <circle class=\"st2\" cx=\"62.6\" cy=\"136.5\" r=\"5.3\"/>\r\n  <circle class=\"st2\" cx=\"81.7\" cy=\"136.5\" r=\"5.3\"/>\r\n  <circle class=\"st2\" cx=\"100.8\" cy=\"136.5\" r=\"5.3\"/>\r\n  <circle class=\"st2\" cx=\"119.9\" cy=\"136.5\" r=\"5.3\"/>\r\n  <circle class=\"st2\" cx=\"24.4\" cy=\"136.5\" r=\"5.3\"/>\r\n  <polygon class=\"st0\" points=\"149 129.6 151.7 132.3 141.5 142.5 138.7 145.3 136 142.5 132.5 139 135.2 136.3 138.7 139.8 149 129.6\"/>\r\n  <rect class=\"st3\" x=\"18.3\" width=\"127\" height=\"91.5\" rx=\"9.6\" ry=\"9.6\"/>\r\n  <circle class=\"st7\" cx=\"352.9\" cy=\"76.2\" r=\"56.4\"/>\r\n  <path class=\"st2\" d=\"M95.4,43.4c-.7,0-1.3-.6-1.3-1.3v-8.6c0-.7.6-1.3,1.3-1.3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\"/>\r\n      <path class=\"st1\" d=\"M372.7,69.1c-1.8-4.5-5.2-8.2-9.4-10.6-4.4-2.4-9.6-3.2-14.5-2.1-2.6.5-5.3,1.7-7.5,3.2-.4.3,0,1.1.4.7,4-2.6,8.9-4,13.6-3.4s9.1,2.6,12.4,6.1c1.8,1.8,3.2,4,4.2,6.3,0,.3.3.4.5.3.1,0,.4-.3.3-.5h0Z\"/>\r\n      <path class=\"st1\" d=\"M362.1,63.7c2.6,1.7,4.8,4.4,5.9,7.3,0,.3.3.4.5.3.1,0,.4-.3.3-.5-1.3-3.2-3.6-5.8-6.3-7.8-.4-.3-.8.4-.4.7h0Z\"/>\r\n      <path class=\"st1\" d=\"M338.2,71c1.1-2.6,2.9-4.9,5-6.6,2.2-1.7,5.2-2.9,7.9-3.3,1.7-.1,3.4,0,5.2.3.5,0,.8-.7.3-.8-3.2-.7-6.3-.4-9.4.8-2.8,1.1-5.3,2.8-7.1,5.2-1.1,1.3-2,2.8-2.6,4.4,0,.3,0,.4.3.5.3,0,.4,0,.5-.3h0Z\"/>\r\n      <path class=\"st1\" d=\"M338.2,83.4c-.8-2-1.3-4.2-1.3-6.3s-.8-.5-.8,0c0,2.2.4,4.5,1.3,6.6,0,.3.3.4.5.3.1,0,.4-.3.3-.5h0Z\"/>\r\n      <path class=\"st1\" d=\"M342.3,70.1c-1.8,2.8-2.5,6.1-2,9.4.1.9.4,1.8.8,2.6,0,.3.3.4.5.3.1,0,.4-.3.3-.5-1.2-2.9-1.2-6.2,0-9.1.3-.8.7-1.6,1.2-2.2.3-.4-.4-.8-.7-.4h-.1Z\"/>\r\n      <path class=\"st1\" d=\"M363.8,69.9c-2.6-3.8-7.1-6.1-11.8-5.7-1.3,0-2.6.4-3.8.9-.3,0-.4.3-.3.5,0,.1.3.4.5.3,2.1-.8,4.4-1.2,6.5-.8,2.1.4,4.1,1.2,5.8,2.5.9.8,1.7,1.6,2.4,2.5.3.4,1.1,0,.7-.4h0Z\"/>\r\n      <path class=\"st1\" d=\"M357.5,70.6c1.3.8,2.2,2.1,2.9,3.6,0,.3.3.4.5.3.1,0,.4-.3.3-.5-.7-1.6-1.8-3-3.3-4-.4-.3-.8.4-.4.7h0Z\"/>\r\n      <path class=\"st1\" d=\"M346.5,72.8c1.5-2.2,4-3.6,6.6-3.6s.5-.8,0-.8c-2.9,0-5.7,1.5-7.4,4-.3.4.4.8.7.4h.1Z\"/>\r\n      <path class=\"st1\" d=\"M345.9,80.2c-.7-1.5-.8-3-.5-4.6,0-.5-.7-.8-.8-.3-.4,1.7-.1,3.4.5,5,0,.3.3.4.5.3.1,0,.4-.3.3-.5h0Z\"/>\r\n      <path class=\"st1\" d=\"M357.4,75.3c-.7-1.7-2.5-2.8-4.4-2.8s-3.6,1.3-4.2,3.2c-.4,1.1-.3,2.1,0,3.2,0,.3.3.4.5.3.1,0,.4-.3.3-.5-.7-1.5-.3-3.2.9-4.2,1.2-1.1,2.9-1.2,4.4-.5.8.4,1.3,1.1,1.7,1.8,0,.3.4.3.5.1.3,0,.3-.4.1-.5h.1Z\"/>\r\n    </g>\r\n    <path class=\"st1\" d=\"M371.6,87.2c.3-4.4-.3-8.9-1.6-13.1-.4-1.2-.8-2.4-1.3-3.6,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5,1.7,4.1,2.6,8.3,2.8,12.7v3.7c0,.5.8.5.8,0h.1Z\"/>\r\n    <path class=\"st1\" d=\"M366.5,93.4c1.1-4.1,1.3-8.3.8-12.4-.1-1.2-.4-2.4-.7-3.6,0-.5-.9-.3-.8.3.9,4,1.1,8.1.5,12.2-.1,1.2-.4,2.2-.7,3.3,0,.5.7.8.8.3h0Z\"/>\r\n    <path class=\"st1\" d=\"M361.1,96.7c1.2-2.8,2-5.8,2.2-8.7.3-3,0-6.2-.5-9.1-.4-1.7-.9-3.3-1.6-4.9,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5,1.2,2.8,1.8,5.7,2.1,8.7.3,2.9,0,5.9-.7,8.9-.4,1.6-.9,3.2-1.6,4.8,0,.3,0,.4.1.5.1,0,.5,0,.5-.1h0v-.3Z\"/>\r\n    <path class=\"st1\" d=\"M359.2,84.2c0-3-.8-5.9-1.8-8.7,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5,1.1,2.8,1.7,5.5,1.8,8.6,0,.5.8.5.8,0h0Z\"/>\r\n    <path class=\"st1\" d=\"M355.8,98.1c1.5-2.5,2.5-5.2,3-8.1,0-.5-.7-.8-.8-.3-.5,2.8-1.6,5.4-2.9,7.8-.3.4.4.9.7.4h0Z\"/>\r\n    <path class=\"st1\" d=\"M353.5,93.3c1.7-4,2.1-8.5,1.1-12.7-.3-1.2-.7-2.4-1.1-3.4,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5,1.6,4,2,8.3,1.1,12.4-.3,1.2-.7,2.2-1.1,3.3,0,.3,0,.4.3.5.3,0,.4,0,.5-.3h0Z\"/>\r\n    <path class=\"st1\" d=\"M346.3,96.9c3.6-3.7,5.3-9,4.6-14.1-.1-1.5-.5-2.9-1.2-4.2,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5.9,2.4,1.3,4.8,1.2,7.3s-.9,4.9-2.1,7c-.7,1.2-1.5,2.2-2.4,3.2-.4.4.3.9.5.5h.1Z\"/>\r\n    <path class=\"st1\" d=\"M346.8,86.3c.1-2-.1-4.1-.9-6.1,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5.8,1.8,1.1,3.8.9,5.8,0,.3.3.4.4.4s.4-.1.4-.4h0Z\"/>\r\n    <path class=\"st1\" d=\"M342.2,95c1.6-1.3,2.8-2.9,3.6-4.8,0-.3,0-.4-.1-.5-.1,0-.5,0-.5.1-.8,1.7-2,3.3-3.4,4.6-.1.1-.1.4,0,.5s.4.1.5,0h0Z\"/>\r\n    <path class=\"st1\" d=\"M340.1,91.5c2.5-2.5,3.3-6.3,2-9.5,0-.3-.3-.4-.5-.3-.1,0-.4.3-.3.5.7,1.5.8,3.2.4,4.8s-1.1,2.9-2.2,4.1c-.4.4.3.9.5.5h.1Z\"/>\r\n    <path class=\"st1\" d=\"M372.7,69.1c-1.6-4-4.4-7.3-7.9-9.6-3.7-2.4-8.1-3.7-12.4-3.4-2.5,0-4.9.7-7.3,1.6-.3,0-.4.3-.3.5,0,.1.3.4.5.3,4-1.6,8.3-2,12.5-1.1,4.1.9,7.8,3.2,10.6,6.2,1.5,1.7,2.8,3.6,3.6,5.7,0,.3.3.4.5.3.1,0,.4-.3.3-.5h-.1Z\"/>\r\n  </g>\r\n  <rect class=\"st2\" x=\"199.6\" y=\"11.5\" width=\"35.9\" height=\"11.7\" rx=\"1.8\" ry=\"1.8\"/>\r\n</svg>`\r\n\r\nconst mobileSvg = `<svg xmlns=\"http://www.w3.org/2000/svg\" id=\"Layer_1\" version=\"1.1\" viewBox=\"0 0 255.9 165\">\r\n  <defs>\r\n    <style>\r\n      .st0 {\r\n        fill-rule: evenodd;\r\n      }\r\n      .st0, .st1, .st2 {\r\n        fill: #012169;\r\n      }\r\n      .st1 {\r\n        stroke: #012169; stroke-linecap: round; stroke-linejoin: round;\r\n      }\r\n      .st3 {\r\n        fill: #9cdbd9;\r\n      }\r\n      .st4 {\r\n        isolation: isolate;\r\n      }\r\n      .st5 {\r\n        fill: #fff;\r\n      }\r\n      .st6 {\r\n        fill: #44b6e5;\r\n      }\r\n      .st7 {\r\n        fill: #45b8e7;\r\n      }\r\n    </style>\r\n  </defs>\r\n  <g>\r\n    <g>\r\n      <g>\r\n        <rect class=\"st5\" x=\"85.5\" y=\"1.5\" width=\"92.4\" height=\"161.9\" rx=\"12.3\" ry=\"12.3\"/>\r\n        <path class=\"st2\" d=\"M179.6,37.1c1.1,0,1.9-.9,1.9-1.9v-12c0-1.1-.9-1.9-1.9-1.9h-.2v-7.7c0-7.5-6.1-13.6-13.6-13.6h-68.3c-7.5,0-13.6,6.1-13.6,13.6v137.9c0,7.5,6.1,13.6,13.6,13.6h68.3c7.5,0,13.6-6.1,13.6-13.6V55.6h.2c1.1,0,1.9-.9,1.9-1.9v-12c0-1.1-.9-1.9-1.9-1.9h-.2v-2.6h.2ZM176.3,151.5c0,5.8-4.7,10.5-10.5,10.5h-68.3c-5.8,0-10.5-4.7-10.5-10.5V13.6c0-5.8,4.7-10.5,10.5-10.5h16.1c.6,0,1.2.3,1.5.8.8,1.6,2.5,2.6,4.4,2.6h24.4c1.9,0,3.6-1.1,4.4-2.6.3-.5.9-.8,1.5-.8h16.2c5.8,0,10.5,4.7,10.5,10.5v137.9Z\"/>\r\n      </g>\r\n      <g>\r\n        <path class=\"st6\" d=\"M147,81.1h-3.9v-8.7c0-5.5-4.5-10-10-10s-10,4.5-10,10v8.7h-3.9v-8.7c0-7.7,6.2-13.9,13.9-13.9s13.9,6.2,13.9,13.9v8.7Z\"/>\r\n        <rect class=\"st6\" x=\"112.8\" y=\"75.9\" width=\"40.6\" height=\"29.3\" rx=\"5.4\" ry=\"5.4\"/>\r\n        <path class=\"st2\" d=\"M136.8,87.1c0-2.3-2.1-4-4.4-3.5-1.4.3-2.5,1.4-2.8,2.8-.4,1.7.4,3.2,1.8,3.9.2.1.4.4.3.7l-1,4.2c-.1.4.2.9.7.9h3.5c.5,0,.8-.4.7-.9l-1-4.2c0-.3,0-.6.3-.7,1.1-.6,1.8-1.8,1.8-3.1Z\"/>\r\n      </g>\r\n    </g>\r\n    <circle class=\"st7\" cx=\"213.3\" cy=\"72.9\" r=\"42.6\"/>\r\n    <g>\r\n      <path class=\"st2\" d=\"M190.5,63.9c-.5,0-.9-.4-.9-.9v-7.1c0-3.3,2.7-6.1,6.1-6.1h7.1c.5,0,.9.4.9.9s-.4.9-.9.9h-7.1c-2.3,0-4.2,1.9-4.2,4.2v7.1c0,.5-.4.9-.9.9Z\"/>\r\n      <path class=\"st2\" d=\"M236.2,63.9c-.5,0-.9-.4-.9-.9v-7.1c0-2.3-1.9-4.2-4.2-4.2h-7.1c-.5,0-.9-.4-.9-.9s.4-.9.9-.9h7.1c3.3,0,6.1,2.7,6.1,6.1v7.1c0,.5-.4.9-.9.9Z\"/>\r\n      <path class=\"st2\" d=\"M202.7,97.5h-7.1c-3.3,0-6.1-2.7-6.1-6.1v-7.1c0-.5.4-.9.9-.9s.9.4.9.9v7.1c0,2.3,1.9,4.2,4.2,4.2h7.1c.5,0,.9.4.9.9s-.4.9-.9.9Z\"/>\r\n      <path class=\"st2\" d=\"M231.1,97.5h-7.1c-.5,0-.9-.4-.9-.9s.4-.9.9-.9h7.1c2.3,0,4.2-1.9,4.2-4.2v-7.1c0-.5.4-.9.9-.9s.9.4.9.9v7.1c0,3.3-2.7,6.1-6.1,6.1Z\"/>\r\n    </g>\r\n    <g class=\"st4\">\r\n      <g>\r\n        <path class=\"st1\" d=\"M201.2,64.4c-2.3,3.4-3.1,7.7-2.4,11.7.2,1.1.5,2.2,1,3.2,0,.2.2.3.4.2.1,0,.3-.2.2-.4-.8-1.8-1.2-3.8-1.2-5.8,0-2,.3-3.9,1.1-5.8.4-1,.9-2,1.5-2.9.2-.3-.3-.6-.5-.3h0Z\"/>\r\n        <path class=\"st1\" d=\"M229.4,67.2c-1.4-3.4-3.9-6.2-7.1-8-3.3-1.8-7.3-2.4-11-1.6-2,.4-4,1.3-5.7,2.4-.3.2,0,.8.3.5,3-2,6.7-3,10.3-2.6,3.6.4,6.9,2,9.4,4.6,1.4,1.4,2.4,3,3.2,4.8,0,.2.2.3.4.2.1,0,.3-.2.2-.4h0Z\"/>\r\n        <path class=\"st1\" d=\"M221.4,63.1c2,1.3,3.6,3.3,4.5,5.5,0,.2.2.3.4.2.1,0,.3-.2.2-.4-1-2.4-2.7-4.4-4.8-5.9-.3-.2-.6.3-.3.5h0Z\"/>\r\n        <path class=\"st1\" d=\"M203.3,68.6c.8-2,2.2-3.7,3.8-5,1.7-1.3,3.9-2.2,6-2.5,1.3-.1,2.6,0,3.9.2.4,0,.6-.5.2-.6-2.4-.5-4.8-.3-7.1.6-2.1.8-4,2.1-5.4,3.9-.8,1-1.5,2.1-2,3.3,0,.2,0,.3.2.4.2,0,.3,0,.4-.2h0Z\"/>\r\n        <path class=\"st1\" d=\"M203.3,78c-.6-1.5-1-3.2-1-4.8,0-.4-.6-.4-.6,0,0,1.7.3,3.4,1,5,0,.2.2.3.4.2.1,0,.3-.2.2-.4h0Z\"/>\r\n        <path class=\"st1\" d=\"M206.4,67.9c-1.4,2.1-1.9,4.6-1.5,7.1.1.7.3,1.4.6,2,0,.2.2.3.4.2.1,0,.3-.2.2-.4-.9-2.2-.9-4.7,0-6.9.2-.6.5-1.2.9-1.7.2-.3-.3-.6-.5-.3h0Z\"/>\r\n        <path class=\"st1\" d=\"M222.7,67.8c-2-2.9-5.4-4.6-8.9-4.3-1,0-2,.3-2.9.7-.2,0-.3.2-.2.4,0,.1.2.3.4.2,1.6-.6,3.3-.9,4.9-.6,1.6.3,3.1.9,4.4,1.9.7.6,1.3,1.2,1.8,1.9.2.3.8,0,.5-.3h0Z\"/>\r\n        <path class=\"st1\" d=\"M217.9,68.3c1,.6,1.7,1.6,2.2,2.7,0,.2.2.3.4.2.1,0,.3-.2.2-.4-.5-1.2-1.4-2.3-2.5-3-.3-.2-.6.3-.3.5h0Z\"/>\r\n        <path class=\"st1\" d=\"M209.6,70c1.1-1.7,3-2.7,5-2.7.4,0,.4-.6,0-.6-2.2,0-4.3,1.1-5.6,3-.2.3.3.6.5.3h0Z\"/>\r\n        <path class=\"st1\" d=\"M209.1,75.6c-.5-1.1-.6-2.3-.4-3.5,0-.4-.5-.6-.6-.2-.3,1.3-.1,2.6.4,3.8,0,.2.2.3.4.2.1,0,.3-.2.2-.4h0Z\"/>\r\n        <path class=\"st1\" d=\"M217.8,71.9c-.5-1.3-1.9-2.1-3.3-2.1-1.4,0-2.7,1-3.2,2.4-.3.8-.2,1.6,0,2.4,0,.2.2.3.4.2.1,0,.3-.2.2-.4-.5-1.1-.2-2.4.7-3.2.9-.8,2.2-.9,3.3-.4.6.3,1,.8,1.3,1.4,0,.2.3.2.4.1.2,0,.2-.3.1-.4h0Z\"/>\r\n      </g>\r\n      <path class=\"st1\" d=\"M228.6,80.9c.2-3.3-.2-6.7-1.2-9.9-.3-.9-.6-1.8-1-2.7,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4,1.3,3.1,2,6.3,2.1,9.6,0,.9,0,1.8,0,2.8,0,.4.6.4.6,0h0Z\"/>\r\n      <path class=\"st1\" d=\"M224.7,85.6c.8-3.1,1-6.3.6-9.4-.1-.9-.3-1.8-.5-2.7,0-.4-.7-.2-.6.2.7,3,.8,6.1.4,9.2-.1.9-.3,1.7-.5,2.5,0,.4.5.6.6.2h0Z\"/>\r\n      <path class=\"st1\" d=\"M220.6,88.1c.9-2.1,1.5-4.4,1.7-6.6.2-2.3,0-4.7-.4-6.9-.3-1.3-.7-2.5-1.2-3.7,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4.9,2.1,1.4,4.3,1.6,6.6.2,2.2,0,4.5-.5,6.7-.3,1.2-.7,2.4-1.2,3.6,0,.2,0,.3.1.4.1,0,.4,0,.4-.1h0Z\"/>\r\n      <path class=\"st1\" d=\"M219.2,78.6c0-2.3-.6-4.5-1.4-6.6,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4.8,2.1,1.3,4.2,1.4,6.5,0,.4.6.4.6,0h0Z\"/>\r\n      <path class=\"st1\" d=\"M216.6,89.1c1.1-1.9,1.9-3.9,2.3-6.1,0-.4-.5-.6-.6-.2-.4,2.1-1.2,4.1-2.2,5.9-.2.3.3.7.5.3h0Z\"/>\r\n      <path class=\"st1\" d=\"M214.9,85.5c1.3-3,1.6-6.4.8-9.6-.2-.9-.5-1.8-.8-2.6,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4,1.2,3,1.5,6.3.8,9.4-.2.9-.5,1.7-.8,2.5,0,.2,0,.3.2.4.2,0,.3,0,.4-.2h0Z\"/>\r\n      <path class=\"st1\" d=\"M209.4,88.2c2.7-2.8,4-6.8,3.5-10.7-.1-1.1-.4-2.2-.9-3.2,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4.7,1.8,1,3.6.9,5.5-.1,1.9-.7,3.7-1.6,5.3-.5.9-1.1,1.7-1.8,2.4-.3.3.2.7.4.4h0Z\"/>\r\n      <path class=\"st1\" d=\"M209.8,80.2c.1-1.5-.1-3.1-.7-4.6,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4.6,1.4.8,2.9.7,4.4,0,.2.2.3.3.3s.3-.1.3-.3h0Z\"/>\r\n      <path class=\"st1\" d=\"M206.3,86.8c1.2-1,2.1-2.2,2.7-3.6,0-.2,0-.3-.1-.4-.1,0-.4,0-.4.1-.6,1.3-1.5,2.5-2.6,3.5-.1.1-.1.3,0,.4.1.1.3.1.4,0h0Z\"/>\r\n      <path class=\"st1\" d=\"M204.7,84.1c1.9-1.9,2.5-4.8,1.5-7.2,0-.2-.2-.3-.4-.2-.1,0-.3.2-.2.4.5,1.1.6,2.4.3,3.6-.3,1.2-.8,2.2-1.7,3.1-.3.3.2.7.4.4h0Z\"/>\r\n      <path class=\"st1\" d=\"M229.4,67.2c-1.2-3-3.3-5.5-6-7.3-2.8-1.8-6.1-2.8-9.4-2.6-1.9,0-3.7.5-5.5,1.2-.2,0-.3.2-.2.4,0,.1.2.3.4.2,3-1.2,6.3-1.5,9.5-.8,3.1.7,5.9,2.4,8,4.7,1.1,1.3,2.1,2.7,2.7,4.3,0,.2.2.3.4.2.1,0,.3-.2.2-.4h0Z\"/>\r\n    </g>\r\n    <path class=\"st6\" d=\"M12.3,144.7c-6.8,0-12.3-5.5-12.3-12.3s5.5-12.3,12.3-12.3h100.2c6.8,0,12.3,5.5,12.3,12.3s-5.5,12.3-12.3,12.3H12.3Z\"/>\r\n    <g>\r\n      <circle class=\"st2\" cx=\"33.2\" cy=\"132.4\" r=\"4\"/>\r\n      <circle class=\"st2\" cx=\"47.8\" cy=\"132.4\" r=\"4\"/>\r\n      <circle class=\"st2\" cx=\"62.4\" cy=\"132.4\" r=\"4\"/>\r\n      <circle class=\"st2\" cx=\"77\" cy=\"132.4\" r=\"4\"/>\r\n      <circle class=\"st2\" cx=\"91.6\" cy=\"132.4\" r=\"4\"/>\r\n    </g>\r\n    <polygon class=\"st0\" points=\"113.8 127.1 115.9 129.2 108.1 137 106 139.1 103.9 137 101.2 134.3 103.3 132.3 106 135 113.8 127.1\"/>\r\n    <rect class=\"st3\" x=\"1.6\" y=\"5.6\" width=\"96.8\" height=\"69\" rx=\"9.6\" ry=\"9.6\"/>\r\n    <g>\r\n      <g>\r\n        <path class=\"st2\" d=\"M60.8,37.8c-.5,0-1-.4-1-1v-6.6c0-.5.4-1,1-1s1,.4,1,1v6.6c0,.5-.4,1-1,1Z\"/>\r\n        <path class=\"st2\" d=\"M38.7,37.8c-.5,0-1-.4-1-1v-6.6c0-.5.4-1,1-1s1,.4,1,1v6.6c0,.5-.4,1-1,1Z\"/>\r\n        <path class=\"st2\" d=\"M52.2,47.1h-4.3c-.5,0-1-.4-1-1s.4-1,1-1h4.3c.3,0,.5-.1.6-.3.1-.1,0-.3,0-.3l-3.2-11.9c-.1-.5.2-1,.7-1.2.5-.1,1.1.2,1.2.7l3.2,11.9c.2.7,0,1.4-.4,2-.5.6-1.3,1-2.2,1Z\"/>\r\n        <path class=\"st2\" d=\"M49.2,57c-2.5,0-5-.7-7.3-2.1-.5-.3-.6-.9-.3-1.3.3-.5.9-.6,1.3-.3,4.1,2.4,8.5,2.4,13.4,0,.5-.2,1.1,0,1.3.4.2.5,0,1.1-.4,1.3-2.8,1.4-5.4,2.1-7.9,2.1Z\"/>\r\n      </g>\r\n      <g>\r\n        <path class=\"st2\" d=\"M26.2,30.5c-.5,0-1-.4-1-1v-7.3c0-3.4,2.8-6.2,6.2-6.2h7.3c.5,0,1,.4,1,1s-.4,1-1,1h-7.3c-2.4,0-4.3,1.9-4.3,4.3v7.3c0,.5-.4,1-1,1Z\"/>\r\n        <path class=\"st2\" d=\"M73.4,30.5c-.5,0-1-.4-1-1v-7.3c0-2.4-1.9-4.3-4.3-4.3h-7.3c-.5,0-1-.4-1-1s.4-1,1-1h7.3c3.4,0,6.2,2.8,6.2,6.2v7.3c0,.5-.4,1-1,1Z\"/>\r\n        <path class=\"st2\" d=\"M38.7,65.1h-7.3c-3.4,0-6.2-2.8-6.2-6.2v-7.3c0-.5.4-1,1-1s1,.4,1,1v7.3c0,2.4,1.9,4.3,4.3,4.3h7.3c.5,0,1,.4,1,1s-.4,1-1,1Z\"/>\r\n        <path class=\"st2\" d=\"M68.1,65.1h-7.3c-.5,0-1-.4-1-1s.4-1,1-1h7.3c2.4,0,4.3-1.9,4.3-4.3v-7.3c0-.5.4-1,1-1s1,.4,1,1v7.3c0,3.4-2.8,6.2-6.2,6.2Z\"/>\r\n      </g>\r\n    </g>\r\n  </g>\r\n  <circle class=\"st2\" cx=\"18.6\" cy=\"132.4\" r=\"4\"/>\r\n</svg>`\r\n\r\n/* ----------------------------------- */\r\n/* Helper functions */\r\n/* ----------------------------------- */\r\n\r\n// Find an element of `selector` whose visible text contains `text` (case-insensitive).\r\nfunction findByText(selector, text) {\r\n  const needle = text.toLowerCase();\r\n  return Array.from(document.querySelectorAll(selector)).find((el) => (el.textContent || '').trim().toLowerCase().includes(needle));\r\n}\r\n\r\n// Hide the login panel during an auto-advance round-trip so the user doesn't\r\n// see (or double-click) the dead screen. The next block-ready unhides, as does\r\n// the safety timer, so a silently failed advance restores the screen.\r\nlet unhideTimer = null;\r\n\r\nfunction hideHost() {\r\n  const host = document.querySelector('sty-login');\r\n  if (host) {\r\n    host.style.setProperty('visibility', 'hidden', 'important');\r\n  }\r\n  window.clearTimeout(unhideTimer);\r\n  unhideTimer = window.setTimeout(unhideHost, 4000);\r\n}\r\n\r\nfunction unhideHost() {\r\n  window.clearTimeout(unhideTimer);\r\n  unhideTimer = null;\r\n  const host = document.querySelector('sty-login');\r\n  if (host) {\r\n    host.style.removeProperty('visibility');\r\n  }\r\n}\r\n\r\n// Click `selector` inside `container` (scoped to the current block so a\r\n// leftover button from the previous block isn't hit). Returns false while the\r\n// button isn't ready (the retry observer keeps calling). Hides only on click.\r\nfunction advancePast(container, selector) {\r\n  const button = container.querySelector(selector);\r\n  if (!button || button.hasAttribute('disabled') || button.hasAttribute('loading')) {\r\n    return false;\r\n  }\r\n\r\n  hideHost();\r\n  // sty-button handles click on its host element (submit types call\r\n  // form.requestSubmit(), action buttons run their @click handler).\r\n  button.click();\r\n  return true;\r\n}\r\n\r\n// Decide what (if anything) to do for the block that just became ready.\r\n// Returns an apply-function for the retry loop, or null to leave the screen\r\n// alone. Gates read block-ready state (not the DOM), so a screen with a real\r\n// decision (multiple targets/methods) or a non-success result is never skipped.\r\nfunction handlerFor(state) {\r\n  console.debug(\"Handle For:\", state);\r\n\r\n  if (state.activeBlock === 'mfaEnrollTargetSelect') {\r\n    const data = (state.blocks && state.blocks.mfaEnrollTargetSelect) || {};\r\n    const targets = (data.availableTargets || []).length;\r\n    const methods = (data.availableMethods || []).length;\r\n    console.debug(\"Target and Methods available\", targets, methods);\r\n    if (targets === 1 && methods <= 1) {\r\n      console.debug(\"Target and Methods available\", targets, methods);\r\n      // The block pre-selects the single target/method in form-ready, which\r\n      // runs AFTER block-ready. Submitting before that fails `required`\r\n      // validation and stalls the flow, so wait for the checked radio.\r\n      return () => {\r\n        const block = document.querySelector('[data-block=\"mfaEnrollTargetSelect\"]');\r\n        if (!block || !block.querySelector('sty-radio[checked]')) {\r\n          return false;\r\n        }\r\n        return advancePast(block, 'sty-button[data-button=\"submit\"]');\r\n      };\r\n    }\r\n    return null;\r\n  }\r\n  if (state.activeBlock === 'genericResult') {\r\n    console.debug(\"genericResult state: \", state)\r\n    console.debug(\"genericResult: \", state.activeBlock)\r\n\r\n    const data = (state.blocks && state.blocks.genericResult) || {};\r\n    if (data.result === 'success' && data.actionButton) {\r\n      return () => {\r\n        const block = document.querySelector('[data-block=\"genericResult\"]');\r\n        if (!block) {\r\n          return false;\r\n        }\r\n        return advancePast(block, 'sty-button[data-button=\"actionButton\"]');\r\n      };\r\n    }\r\n    return null;\r\n  }\r\n\r\n  return null;\r\n}\r\n\r\n/**\r\n * Formats up to 10 national digits the exact way sty-input-phone formats them\r\n * as the user types: \"8888888888\" -> \"888 888 8888\". Partial lengths are\r\n * grouped the same way so intermediate values still match the component.\r\n */\r\nfunction formatUsNationalDigits(digits) {\r\n  const d = (digits || '').replace(/\\D/g, '').slice(0, 10);\r\n  if (d.length <= 3) return d;\r\n  if (d.length <= 6) return `${d.slice(0, 3)} ${d.slice(3)}`;\r\n  return `${d.slice(0, 3)} ${d.slice(3, 6)} ${d.slice(6)}`;\r\n}\r\n\r\n/**\r\n * Locks the US country code (+1) prefix in phone input fields.\r\n * Prevents user from deleting the prefix and re-asserts it on re-renders.\r\n */\r\nfunction lockCountryCodeValue(phoneInput) {\r\n  // Re-assert the \"+1 \" prefix on EVERY run - sty-input-phone can re-render and\r\n  // revert the value, so this must keep winning that tug-of-war.\r\n  //\r\n  // WC1-3558: in complete-profile the number is prefilled from the backend and\r\n  // held in the host's `.value`, but the visible inner input can briefly be\r\n  // empty mid-render. Blindly setting '+1 ' wiped that prefill, so PRESERVE\r\n  // existing digits (from the visible input, else the host) and only fall back\r\n  // to a bare \"+1 \" when there is genuinely nothing to keep.\r\n  if (!phoneInput.value.startsWith('+1 ')) {\r\n    const inputDigits = (phoneInput.value || '').replace(/\\D/g, '');\r\n    const host = phoneInput.closest('sty-input-phone');\r\n    const hostDigits = host ? (host.value || '').replace(/\\D/g, '') : '';\r\n\r\n    // National number = digits without a leading US country code (\"1\").\r\n    let national = inputDigits.replace(/^1/, '');\r\n    // If the visible input has lost the number (fewer than 10 national digits),\r\n    // recover it from the host component, which is the source of truth.\r\n    if (national.length < 10 && hostDigits) {\r\n      national = hostDigits.replace(/^1/, '');\r\n    }\r\n\r\n    phoneInput.value = national ? ('+1 ' + national) : '+1 ';\r\n  }\r\n\r\n  // WC1-3558 (prefill validity): the backend prefills unformatted, e.g.\r\n  // \"+1 8888888888\". That already starts with \"+1 \" so the block above leaves\r\n  // it alone - but sty-input-phone's internal validator only accepts its own\r\n  // spaced format (\"+1 888 888 8888\"), so the field shows \"Please enter a valid\r\n  // phone number\" and blocks submit until manually edited. Normalize the\r\n  // prefill ONCE into the spaced format and dispatch a real input event so the\r\n  // component re-parses and clears its error, exactly as a manual edit would.\r\n  // One-time flag keeps it from fighting the formatter while the user types.\r\n  if (phoneInput.dataset.prefillNormalized !== 'true') {\r\n    const host = phoneInput.closest('sty-input-phone');\r\n    const rawDigits = (phoneInput.value || (host && host.value) || '').replace(/\\D/g, '');\r\n    const national = rawDigits.replace(/^1/, '').slice(0, 10);\r\n\r\n    // Only act on a complete 10-digit prefill; partial/empty values are left\r\n    // for the user (and the component) to handle normally.\r\n    if (national.length === 10) {\r\n      const canonical = '+1 ' + formatUsNationalDigits(national);\r\n      phoneInput.dataset.prefillNormalized = 'true';\r\n      if (phoneInput.value !== canonical) {\r\n        phoneInput.value = canonical;\r\n        // Mimic a manual edit so the component re-parses, reformats and clears\r\n        // its internal validity error (and our own button-state revalidation\r\n        // picks it up via the form's input listener).\r\n        phoneInput.dispatchEvent(new Event('input', { bubbles: true }));\r\n        phoneInput.dispatchEvent(new Event('change', { bubbles: true }));\r\n      }\r\n    }\r\n  }\r\n\r\n  // The MutationObserver below calls this function again on almost every\r\n  // re-render of sty-input-phone (nearly every keystroke). Only the\r\n  // *listener setup* below needs to run once — guard just that part, so\r\n  // we don't stack duplicate keydown/input handlers over time.\r\n  if (phoneInput.dataset.countryLockInit === 'true') {\r\n    return;\r\n  }\r\n  phoneInput.dataset.countryLockInit = 'true';\r\n\r\n  // Prevent user from backspacing into \"+1 \"\r\n  phoneInput.addEventListener('keydown', (e) => {\r\n    if ((e.key === 'Backspace' || e.key === 'ArrowLeft') && phoneInput.selectionStart <= 3) {\r\n      e.preventDefault();\r\n    }\r\n  });\r\n\r\n  // Re-enforce prefix on paste/input\r\n  phoneInput.addEventListener('input', (e) => {\r\n    if (!e.target.value.startsWith('+1 ')) {\r\n      e.target.value = '+1 ';\r\n    }\r\n  });\r\n}\r\n\r\nfunction handleGlobalObserver(mutationsList) {\r\n  for (const mutation of mutationsList) {\r\n    if (\r\n      (blockDetail.state.activeBlock === \"password\" ||\r\n        blockDetail.state.activeBlock === \"passwordEnroll\") &&\r\n      mutation.target.localName === \"sty-input-password\"\r\n    ) {\r\n      const passwordInputs = document.querySelectorAll(\"sty-input-password\");\r\n      passwordInputs.forEach(input => {\r\n        console.debug(\"Password Inputs\", input);\r\n        const passwordSvgIcon = input.shadowRoot\r\n          ?.querySelector(\"div[part='button-toggle']\")\r\n          ?.querySelector(\"svg\");\r\n\r\n        if (passwordSvgIcon) {\r\n          passwordSvgIcon.style.height = \"22px\";\r\n          passwordSvgIcon.style.color = \"var(--sty-text-secondary)\"\r\n        }\r\n      });\r\n    }\r\n    if (mutation.target.localName === 'sty-block-external-login-provider') {\r\n      mutation.target.style.setProperty(\"margin-block-start\", \"0\");\r\n      let externalLoginProviderEle = mutation.target.children;\r\n      [...externalLoginProviderEle].forEach((externalEle, index) => {\r\n        // Common styles for all external login buttons\r\n        Object.assign(externalEle.style, {\r\n          marginBlockStart: index === 0 ? '0' : '16px',\r\n          boxShadow: '0 0 6px 0 rgba(0, 0, 0, 0.25)',\r\n          height: '40px',\r\n          color: '#666',\r\n          fontFamily: 'Lato, sans-serif',\r\n          fontSize: '14px',\r\n          lineHeight: '1.2',\r\n          fontWeight: '700',\r\n          padding: '11px 16px'\r\n        });\r\n\r\n        const dataButtonValue = (externalEle.getAttribute('data-button') || '').toLowerCase();\r\n        const labelSpan = externalEle.querySelector('span');\r\n        const isSignIn = blockDetail.state.activeBlock === 'identifier';\r\n\r\n        // Provider-specific customization\r\n        if (dataButtonValue.includes('facebook')) {\r\n          externalEle.style.color = '#fff';\r\n          if (labelSpan) {\r\n            labelSpan.innerHTML = isSignIn ? 'Sign In with Facebook' : 'Continue with Facebook';\r\n            labelSpan.style.setProperty('display', 'block');\r\n            labelSpan.style.setProperty('margin-inline-start', '16px');\r\n          }\r\n        } else if (dataButtonValue.includes('google')) {\r\n          if (labelSpan) {\r\n            labelSpan.innerHTML = isSignIn ? 'Sign In with Google' : 'Continue with Google';\r\n            labelSpan.style.setProperty('display', 'block');\r\n            labelSpan.style.setProperty('margin-inline-start', '16px');\r\n          }\r\n        } else if (dataButtonValue.includes('apple')) {\r\n          externalEle.style.color = '#fff';\r\n          if (labelSpan) {\r\n            labelSpan.innerHTML = isSignIn ? 'Sign In with Apple' : 'Continue with Apple';\r\n            labelSpan.style.setProperty('display', 'block');\r\n            labelSpan.style.setProperty('margin-inline-start', '16px');\r\n          }\r\n        }\r\n      });\r\n\r\n    }\r\n\r\n    if (mutation.target.localName === \"sty-external-provider-icon\") {\r\n      mutation.target.style.setProperty(\"margin-inline-end\", \"0\");\r\n      if (mutation.target.renderRoot.children.length > 0) {\r\n        mutation.target.renderRoot.children[0].style.setProperty(\"width\", \"18px\", \"important\");\r\n        mutation.target.renderRoot.children[0].style.setProperty(\"height\", \"18px\", \"important\");\r\n      }\r\n    }\r\n\r\n    if (mutation.target.localName === \"sty-input-text\" && document.querySelector(\"sty-input-text\")) {\r\n      let errorShadowEleIcon = document.querySelector(\"sty-input-text\").shadowRoot.querySelector(\"div[part='error-icon']\");\r\n      if (errorShadowEleIcon) {\r\n        errorShadowEleIcon.style.display = \"none\";\r\n      }\r\n    }\r\n\r\n    if (mutation.target.localName === \"sty-input-phone\" && mutation.target.shadowRoot) {\r\n      const phoneInput = document.querySelector('input[name=\"attributes.phoneNumbers.primaryPhoneNumber\"]');\r\n      if (phoneInput) {\r\n        lockCountryCodeValue(phoneInput);\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n\r\n// Code to trigger field errors and handle disabled state of submit buttons\r\ndocument.addEventListener('form-ready', (event) => {\r\n  const form = event.target;\r\n\r\n  if (form.has('email')) {\r\n    emailControl = form.get('email');\r\n  }\r\n\r\n  const submitButton = form.querySelector('sty-button[type=\"submit\"]');\r\n  const isLoginForm = form.closest('sty-block-identifier') !== null;\r\n\r\n  const DEBUG = true;\r\n  const log = (...args) => { if (DEBUG) console.debug('[form-validation]', ...args); };\r\n\r\n  // ---- your existing checkout / completeprofile logic, unchanged ----\r\n  if (form.closest('sty-block-registration')) {\r\n    if (window.location.href.includes(\"/twa/checkout\")) {\r\n      form.patchValue({ \"attributes.checkoutHiddenAttribute\": 'checkout' });\r\n    }\r\n    if (window.location.href.includes(\"/s/completeprofile\")) {\r\n      form.patchValue({ \"attributes.isCompletProfileFlow\": 'true' });\r\n      if (form.getRawValue()) {\r\n        const v = form.getRawValue();\r\n        if (v.email) {\r\n          const el = document.querySelector(\"sty-input-text[data-field='attribute-email']\");\r\n          el.setAttribute(\"disabled\", true);\r\n          el.classList.add(\"complete-profile-email\");\r\n          el.parentElement.classList.add(\"ciam-complete-profile-email\");\r\n        }\r\n        if (v.attributes.name.givenName) {\r\n          const el = document.querySelector(\"sty-input-text[data-field='attribute-attributes.name.givenName']\");\r\n          setTimeout(() => {\r\n            el.setAttribute(\"disabled\", true);\r\n          }, 0);\r\n          el.classList.add(\"complete-profile-input-bg\");\r\n        }\r\n        if (v.attributes.name.familyName) {\r\n          const el = document.querySelector(\"sty-input-text[data-field='attribute-attributes.name.familyName']\");\r\n          setTimeout(() => {\r\n            el.setAttribute(\"disabled\", true);\r\n          }, 0);\r\n          el.classList.add(\"complete-profile-input-bg\");\r\n        }\r\n        if (v.attributes.phoneNumbers.primaryPhoneNumber) {\r\n          const el = document.querySelector(\"sty-input-phone[data-field='attribute-attributes.phoneNumbers.primaryPhoneNumber']\");\r\n          setTimeout(() => {\r\n            el.setAttribute(\"disabled\", true);\r\n          }, 0);\r\n          el.classList.add(\"complete-profile-input-bg\");\r\n        }\r\n        if (v.attributes.addresses.primary.postalCode) {\r\n          const el = document.querySelector(\"sty-input-text[data-field='attribute-attributes.addresses.primary.postalCode']\");\r\n          setTimeout(() => {\r\n            el.setAttribute(\"disabled\", true);\r\n          }, 0);\r\n          el.classList.add(\"complete-profile-input-bg\");\r\n        }\r\n      }\r\n    }\r\n  }\r\n\r\n  // Live check for the phone field: bypasses the component's cached validity.\r\n  const isPhoneLiveValid = (phoneControl) => {\r\n    const inner = phoneControl.querySelector('input[slot=\"input\"]');\r\n    if (!inner) return false;\r\n    const digits = (inner.value || '').replace(/\\D/g, '');\r\n    // US is the default in the DOM; 10 digits is the standard NANP length.\r\n    // If required is not set, treat empty as valid.\r\n    const required = phoneControl.hasAttribute('required');\r\n    if (!required && digits.length === 0) return true;\r\n    return digits.length === 11;\r\n  };\r\n\r\n  // ---- Strict email live-validity, same pattern as the phone check above ----\r\n  // Requires local-part@domain.tld (.com/.org/.co.uk pass; \"name@host\" fails)\r\n\r\n  const EMAIL_RE = /^[A-Za-z0-9](?:[A-Za-z0-9._%-]*[A-Za-z0-9])?@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z]{2,}$/;\r\n\r\n  const isEmailLiveValid = (emailControl) => {\r\n    const inner = emailControl.querySelector('input[slot=\"input\"]');\r\n    const value = ((inner ? inner.value : emailControl.value) || '').trim();\r\n    const required = emailControl.hasAttribute('required');\r\n\r\n    if (!required && value.length === 0) return true;\r\n    if (value.length === 0) return false;\r\n    if (value.includes('..')) return false; // extra guard against consecutive dots\r\n    return EMAIL_RE.test(value);\r\n  };\r\n\r\n  // Detect an email field by type=\"email\", name containing \"email\", or a\r\n  // data-field attribute containing \"email\".\r\n  const isEmailField = (control) => {\r\n    const name = (control.getAttribute('name') || '').toLowerCase();\r\n    const type = (control.getAttribute('type') || '').toLowerCase();\r\n    const dataField = (control.getAttribute('data-field') || '').toLowerCase();\r\n    return type === 'email' || name.includes('email') || dataField.includes('email');\r\n  };\r\n\r\n  // ---- Password live-validity, same pattern as the phone/email checks above ----\r\n  // FIREFOX FIX: sty-input-password.checkValidity() reads a cached state that\r\n  // Firefox only recomputes on the next Lit update - i.e. AFTER the `input`\r\n  // event - so typing/pasting/autofill returned stale `false` and the button\r\n  // only enabled on blur. Reading the inner <input> is synchronous and current.\r\n  // Scoped to sty-block-password (sign-in) on purpose: registration/reset blocks\r\n  // own strength rules that MUST keep flowing through control.checkValidity().\r\n  const isPasswordField = (control) => {\r\n    if (!control.closest('sty-block-password')) return false;\r\n    const tag = (control.tagName || '').toLowerCase();\r\n    const name = (control.getAttribute('name') || '').toLowerCase();\r\n    const dataField = (control.getAttribute('data-field') || '').toLowerCase();\r\n    return tag === 'sty-input-password'\r\n      || name.includes('password')\r\n      || dataField.includes('password');\r\n  };\r\n\r\n  const isPasswordLiveValid = (passwordControl) => {\r\n    const inner = passwordControl.querySelector('input[slot=\"input\"]')\r\n      || passwordControl.querySelector('input');\r\n    const value = ((inner ? inner.value : passwordControl.value) || '');\r\n    return value.length > 0;\r\n  };\r\n\r\n  const computeFormValidity = async () => {\r\n    const rows = [];\r\n    const promises = [];\r\n    form.controls.forEach((control) => {\r\n      const name = control.getAttribute('name');\r\n      if (control.tagName && control.tagName.toLowerCase() === 'sty-input-phone') {\r\n        const v = isPhoneLiveValid(control);\r\n        rows.push(`${name}=${v}(live)`);\r\n        promises.push(Promise.resolve(v));\r\n      } else if (isEmailField(control)) {\r\n        const v = isEmailLiveValid(control);\r\n        rows.push(`${name}=${v}(live-email)`);\r\n        promises.push(Promise.resolve(v));\r\n      } else if (isPasswordField(control)) {\r\n        const v = isPasswordLiveValid(control);\r\n        rows.push(`${name}=${v}(live-password)`);\r\n        promises.push(Promise.resolve(v));\r\n      } else {\r\n        promises.push(\r\n          Promise.resolve(control.checkValidity()).then((v) => {\r\n            rows.push(`${name}=${v}`);\r\n            return v;\r\n          })\r\n        );\r\n      }\r\n    });\r\n    const values = await Promise.all(promises);\r\n    log('  per-control:', rows.join(', '));\r\n    return values.every(Boolean);\r\n  };\r\n\r\n  // Guards against out-of-order async validation results: two overlapping\r\n  // revalidations (e.g. fast paste + the component's own change event) could let\r\n  // a slower earlier run resolve last and clobber the newer state - seen in\r\n  // Firefox as \"button → ENABLED\" followed by a stale \"button → disabled\".\r\n  let buttonStateToken = 0;\r\n\r\n  const updateButtonState = async () => {\r\n    if (isLoginForm) return;\r\n    const token = ++buttonStateToken;\r\n    const isValid = await computeFormValidity();\r\n    if (token !== buttonStateToken) {\r\n      log('  stale validation result discarded');\r\n      return;\r\n    }\r\n    log(`button → ${isValid ? 'ENABLED' : 'disabled'}`);\r\n    isValid ? submitButton.removeAttribute('disabled') : submitButton.setAttribute('disabled', '');\r\n  };\r\n\r\n  const revalidate = async (control, reason) => {\r\n    const name = control.getAttribute('name');\r\n    const isTouched = control.getAttribute('data-touch-gated') === 'touched';\r\n    log(`revalidate ${name} reason=${reason} touched=${isTouched}`);\r\n    try {\r\n      if (isTouched) await control.validate();\r\n    } catch (err) { log(`  revalidate error: ${err.message}`); }\r\n    await updateButtonState();\r\n  };\r\n\r\n  const attachedControls = new Set();\r\n  const attachValidation = (control) => {\r\n    if (attachedControls.has(control)) return;\r\n    attachedControls.add(control);\r\n    control.setAttribute('data-touch-gated', 'untouched');\r\n    log(`attached: ${control.getAttribute('name')} (${control.tagName})`);\r\n\r\n    // NEW: give email fields a proper inline error message via the built-in\r\n    // validator system, in addition to the live gating above.\r\n    if (isEmailField(control) && typeof control.addValidators === 'function') {\r\n      control.addValidators([\r\n        {\r\n          type: 'strictEmailFormat',\r\n          fn: ({ control: c }) => {\r\n            const value = (c.value || '').trim();\r\n            if (!c.hasAttribute('required') && value.length === 0) return true;\r\n            if (value.includes('..')) return false;\r\n            return EMAIL_RE.test(value);\r\n          },\r\n          message: 'Please enter a valid email address (e.g. name@example.com)',\r\n        },\r\n      ]);\r\n    }\r\n\r\n    control.addEventListener('change', () => revalidate(control, 'host-change'));\r\n\r\n    // Browser autofill / password managers can populate the inner <input> without\r\n    // a trusted `input` event reaching our capture listener (Firefox fills\r\n    // credentials silently). Poll the raw value briefly after attach so the\r\n    // submit button unlocks without needing a focus/blur.\r\n    const innerInput = control.querySelector('input[slot=\"input\"]')\r\n      || control.querySelector('input');\r\n    if (innerInput) {\r\n      let lastSeenValue = innerInput.value || '';\r\n      const AUTOFILL_POLL_MS = 250;\r\n      const AUTOFILL_WINDOW_MS = 5000;\r\n      const startedAt = Date.now();\r\n      const autofillPoll = setInterval(() => {\r\n        if (!control.isConnected || Date.now() - startedAt > AUTOFILL_WINDOW_MS) {\r\n          clearInterval(autofillPoll);\r\n          return;\r\n        }\r\n        const current = innerInput.value || '';\r\n        if (current !== lastSeenValue) {\r\n          lastSeenValue = current;\r\n          log(`autofill detected → ${control.getAttribute('name')}`);\r\n          revalidate(control, 'autofill-poll');\r\n        }\r\n      }, AUTOFILL_POLL_MS);\r\n    }\r\n\r\n    control.addEventListener('focusout', async (e) => {\r\n      if (!control.contains(e.relatedTarget)) {\r\n        control.setAttribute('data-touch-gated', 'touched');\r\n        log(`${control.getAttribute('name')} → touched`);\r\n        try { await control.validate(); } catch (err) { log(`  focusout error: ${err.message}`); }\r\n        await updateButtonState();\r\n      }\r\n    });\r\n  };\r\n\r\n  form.addEventListener('input', (e) => {\r\n    let matched = null;\r\n    form.controls.forEach((control) => {\r\n      if (!matched && control.contains && control.contains(e.target)) matched = control;\r\n    });\r\n    if (matched) {\r\n      log(`form-capture input → ${matched.getAttribute('name')}`);\r\n      revalidate(matched, 'form-capture-input');\r\n    }\r\n  }, true);\r\n\r\n  form.controls.forEach((control) => attachValidation(control));\r\n  form.controls.subscribe(({ value }) => { if (value) attachValidation(value); });\r\n\r\n  updateButtonState();\r\n});\r\n\r\n\r\ndocument.addEventListener('block-ready', (event) => {\r\n  blockDetail = event.detail;\r\n  console.debug(\"Block Details\", blockDetail);\r\n  console.debug(\"active block: \", blockDetail.state.activeBlock);\r\n  sty.i18nService.overrides = {\r\n    'en-US': {\r\n      \"common.attributes.general.errors.required\": \"Please enter a valid {displayName}\",\r\n      \"blocks.forgottenUsername.fields.email.errors.required\": \"Please enter a valid email address\",\r\n      \"blocks.identifier.fields.identifier.errors.required.email\": \"Please enter a valid email address\",\r\n      \"blocks.mfaEnrollTargetSelect.fields.target.errors.required.add.email\": \"Please enter a valid email address\",\r\n      \"common.attributes.email.errors.required\": \"Please enter a valid email address\",\r\n      \"common.attributes.emailList.errors.required\": \"Please enter a valid email address\",\r\n\r\n      \"blocks.forgottenUsername.fields.email.errors.invalid\": \"Please enter a valid email address\",\r\n      \"blocks.identifier.fields.identifier.errors.invalid.email\": \"Please enter a valid email address\",\r\n      \"blocks.mfaEnrollTargetSelect.fields.target.errors.invalid.email\": \"Please enter a valid email address\",\r\n      \"common.attributes.email.errors.invalid\": \"Please enter a valid email address\",\r\n\r\n      \"blocks.password.fields.password.errors.required\": \"Please enter your password\",\r\n      \"common.attributes.password.errors.required\": \"Please enter your password\",\r\n\r\n      \"common.attributes.passwordConfirmation.errors.required\": \"Please enter your password again\",\r\n      \"common.attributes.passwordConfirmation.errors.sameAs\": \"The passwords do not match\",\r\n\r\n      \"common.attributes.password.errors.restrictedCharacters\": \"Password must not contain empty spaces anywhere\",\r\n      \"blocks.identifier.signInWithPasskey\": \"Sign in with Passkey\"\r\n    },\r\n  };\r\n  sty.i18nService.mergeLocaleMessage();\r\n\r\n  document.querySelectorAll(\r\n    'sty-input-text input, sty-input-phone input, sty-input-password input, sty-input-passcode input'\r\n  ).forEach(input => {\r\n    input.style.setProperty('padding-block-start', '12px', 'important');\r\n  });\r\n\r\n  document.querySelectorAll(\r\n    'sty-input-text, sty-input-phone, sty-input-password, sty-input-passcode'\r\n  ).forEach(el => {\r\n    el.removeAttribute('variant');\r\n  });\r\n\r\n  let keepMeLoggedInContainer = document.querySelectorAll(\"sty-checkbox[data-field='keepMeLoggedIn']\");\r\n  keepMeLoggedInContainer.forEach(ele => {\r\n    if (ele !== null && ele.renderRoot !== null) {\r\n      // Add tooltip icon next to \"Keep me logged in\" label if not already added\r\n      if (!ele.querySelector('.keep-logged-in-tooltip-wrapper')) {\r\n        const labelSlot = ele.shadowRoot.querySelector('div[part=\"label\"]');\r\n        console.debug(\"labelSlot\", labelSlot);\r\n        if (labelSlot && labelSlot.querySelector(\".keep-logged-in-tooltip-wrapper\") === null) {\r\n          console.debug(\"labelSlot\", labelSlot);\r\n          const originalText = labelSlot.textContent;\r\n          labelSlot.innerHTML = `\r\n            <span part=\"tooltip-wrapper\" class=\"keep-logged-in-tooltip-wrapper\">\r\n              <span part=\"keep-logged-in-text\" class=\"keep-logged-in-label-text\">${originalText}</span>\r\n              <span part=\"keep-logged-in-tooltip-icon\" class=\"keep-logged-in-tooltip-icon\" tabindex=\"0\" role=\"button\" aria-label=\"More information about staying signed in\">\r\n                <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\r\n                  <circle cx=\"8\" cy=\"8\" r=\"7.5\" stroke=\"#666\" stroke-width=\"1\"/>\r\n                  <path d=\"M8 7V11\" stroke=\"#666\" stroke-width=\"1.2\" stroke-linecap=\"round\"/>\r\n                  <circle cx=\"8\" cy=\"5\" r=\"0.75\" fill=\"#666\"/>\r\n                </svg>\r\n                <span part=\"keep-logged-in-tooltip-message\" class=\"keep-logged-in-tooltip-message\" role=\"tooltip\">\r\n                  Check this box to stay signed in and reduce future logins. Do not use this option on shared or public devices.\r\n                  <div part=\"tooltip-arrow\" class=\"arrow\" style=\"left: 50%;\"></div>\r\n                </span>\r\n              </span>\r\n            </span>\r\n          `;\r\n\r\n          const icon = ele.shadowRoot.querySelector(\r\n            '.keep-logged-in-tooltip-icon'\r\n          );\r\n\r\n          icon.addEventListener('mouseenter', () => {\r\n            ele.setAttribute('tooltip-visible', '');\r\n          });\r\n\r\n          icon.addEventListener('mouseleave', () => {\r\n            ele.removeAttribute('tooltip-visible');\r\n          });\r\n\r\n          icon.addEventListener('focus', () => {\r\n            ele.setAttribute('tooltip-visible', '');\r\n          });\r\n\r\n          icon.addEventListener('blur', () => {\r\n            ele.removeAttribute('tooltip-visible');\r\n          });\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  let emailInputText = document.querySelectorAll(\"sty-login sty-input-text[data-field='identifier']\");\r\n  emailInputText.forEach(emailEle => {\r\n    if (emailEle !== null && emailEle.renderRoot !== null) {\r\n      console.debug(\"email ele\", emailEle);\r\n      let shadowRootEle = emailEle.shadowRoot.querySelector(\"div[part='container']\");\r\n      let shadowWrapperDivEle = shadowRootEle.querySelector(\"div[part='wrapper']\");\r\n      shadowRootEle.style.setProperty(\"display\", \"block\");\r\n      emailEle.renderRoot.children[0].style.setProperty(\"border\", \"none\");\r\n      emailEle.renderRoot.children[0].style.setProperty(\"background\", \"none\");\r\n\r\n      if (shadowWrapperDivEle) {\r\n        console.debug(\"shadowWrapperDivEle\", shadowWrapperDivEle);\r\n        shadowWrapperDivEle.style.setProperty(\"paddingInline\", \"0\");\r\n      }\r\n      let emailInputTextLabel = emailEle.querySelector(\"label\");\r\n      emailInputTextLabel.innerHTML = \"Email<span class='asterik'>*</span>\";\r\n    }\r\n  });\r\n\r\n\r\n\r\n  if (event.detail.state.activeBlock === 'identifier') {\r\n    sessionStorage.setItem(EVENT_TYPE, \"e_login\");\r\n    console.debug(\"GA tagging logs: EVENT_TYPE\", sessionStorage.getItem(EVENT_TYPE));\r\n\r\n    console.debug(\"devicePasskeySupported\", devicePasskeySupported);\r\n    if (typeof devicePasskeySupported !== 'undefined' && !devicePasskeySupported) {\r\n      document.querySelectorAll(\"sty-block-identifier sty-button[data-button='passkeyLogin']\").forEach((passkeyBtn) => {\r\n        passkeyBtn.remove();\r\n      });\r\n    }\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        'blocks.identifier.submit': 'Sign In'\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n    let forgottenUsernameEle = document.querySelector(\"a[data-button='forgottenUsername']\");\r\n    if (forgottenUsernameEle)\r\n      forgottenUsernameEle.style.display = \"none\";\r\n\r\n    let registrationFormLinkEle = document.querySelectorAll(\"sty-login sty-i18n[keypath='blocks.identifier.registration']\");\r\n\r\n    registrationFormLinkEle.forEach(ele => {\r\n      ele.childNodes.forEach((node) => {\r\n        if (node.nodeType === Node.TEXT_NODE) {\r\n          node.remove();\r\n        }\r\n      });\r\n      let registrationFormLink = ele.querySelector(\"a\");\r\n      if (registrationFormLink) {\r\n        registrationFormLink.classList.add(\"primary-btn\");\r\n        registrationFormLink.textContent = \"Create My Account\";\r\n      }\r\n      console.debug(\"Before login footer upate\");\r\n      if (ele.querySelectorAll(\"sty-login .user-login__footer\").length === 0) {\r\n        console.debug(\"Inside login footer upate\");\r\n        ele.insertAdjacentHTML('afterbegin', '<div _ngcontent-ng-c273166303=\"\" class=\"user-login__footer\"><h1 _ngcontent-ng-c273166303=\"\" class=\"user-login__footer__title\">Join Now</h1><div _ngcontent-ng-c273166303=\"\" class=\"user-login__footer__content\">Gain access to instant points, Cash Back Awards, exclusive<br/>giveaways, and V.I.P. events, for starters.</div></div>');\r\n        if (!document.querySelector(\"#turnToLoginModalUpgrade\") || !document.querySelector(\"#turnToLoginModalUpgrade\").contains(ele)) {\r\n          ele.insertAdjacentHTML('beforeend', '<div _ngcontent-ng-c273166303=\"\" class=\"user-login__footer__action\"><div _ngcontent-ng-c273166303=\"\" class=\"user-login__footer__action--guest\"><a _ngcontent-ng-c273166303=\"\" tabindex=\"0\" class=\"link-underline a-link modal-close-link\">Continue as a guest </a><span _ngcontent-ng-c273166303=\"\" aria-hidden=\"true\" class=\"link-underline a-link\"></span></div></div>');\r\n        }\r\n\r\n      }\r\n      console.debug(\"After login footer upate\");\r\n      if (document.querySelectorAll(\".modal-close-link\").length > 0) {\r\n        document.addEventListener(\"click\", (e) => {\r\n          console.debug(\"check execution\", (e.target.classList));\r\n          if (e.target.classList.contains(\"modal-close-link\")) {\r\n            const parentModalEle = e.target.closest('tvs-modal');\r\n            let modalCloseEvent = new CustomEvent(\"strivacity-modal-close\", {\r\n              detail: {\r\n                modalClose: true,\r\n                modalId: parentModalEle ? parentModalEle.id : \"\"\r\n              }\r\n            });\r\n            document.dispatchEvent(modalCloseEvent);\r\n\r\n            // Fire the checkout-as-guest-event\r\n            document.dispatchEvent(new CustomEvent(\"checkout-as-guest-event\"));\r\n            console.debug(\"continue as guest checkout events fired\")\r\n          }\r\n        })\r\n      }\r\n    });\r\n\r\n    const createMyAccLinkArr = document.querySelectorAll('sty-login sty-block-identifier sty-i18n a[data-button=\"registration\"]')\r\n    createMyAccLinkArr.forEach(createMyAccLinkEle => {\r\n      createMyAccLinkEle.addEventListener('click', () => {\r\n        console.debug('loading create my acc btn: ', createMyAccLinkEle)\r\n\r\n        const submitButton = document.querySelector('[data-button=\"submit\"]');\r\n        console.debug('loading identifier submit btn: ', submitButton)\r\n\r\n        const observer = new MutationObserver((mutationsList) => {\r\n          console.debug('loading mutationsList: ', mutationsList)\r\n\r\n          for (const mutation of mutationsList) {\r\n            console.debug('loading mutation: ', mutation)\r\n            if (mutation?.attributeName === 'loading') {\r\n              submitButton.removeAttribute('loading');\r\n            }\r\n          }\r\n        });\r\n\r\n        observer.observe(submitButton, {\r\n          childList: false,\r\n          attributes: true,\r\n          subtree: false\r\n        });\r\n      });\r\n    });\r\n\r\n    const identifierBlock = document.querySelectorAll(\"sty-login sty-block-identifier\");\r\n\r\n    identifierBlock.forEach(identifier => {\r\n      let inputField = identifier.querySelector(\"sty-input-text input\");\r\n      if (inputField) {\r\n        inputField.placeholder = \"Ex.example@mail.com\";\r\n      }\r\n    });\r\n    if (window.location.href.includes(\"/twa/checkout\")) {\r\n      checkoutStaticContent();\r\n    }\r\n  }\r\n\r\n  if (blockDetail.state.activeBlock === 'password') {\r\n    sessionStorage.setItem(EVENT_TYPE, \"e_login\");\r\n    console.debug(\"GA tagging logs: EVENT_TYPE\", sessionStorage.getItem(EVENT_TYPE));\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        'blocks.password.title': 'Sign In',\r\n        'blocks.password.fields.password.label': 'Password',\r\n        'blocks.password.submit': 'Sign In with Password',\r\n        'blocks.password.forgottenPassword': 'Forgot Password'\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n    console.debug(\"sty Account Infor Reset Link\");\r\n\r\n    let styAccountInfoEles = document.querySelectorAll(\"sty-block-password[data-block='password'] sty-account-info\");\r\n\r\n    styAccountInfoEles.forEach(styAccountInfo => {\r\n      if (styAccountInfo && document.querySelector(\"sty-block-password[data-block='password']\") && styAccountInfo.parentElement.querySelector(':scope > .sign-in-password-text') === null) {\r\n        styAccountInfo.insertAdjacentHTML(\"beforebegin\", \"<p class='sign-in-password-text'>Signing in as</p>\");\r\n        let styAccountInfoResetLink = styAccountInfo.querySelector(\"a[data-button='reset']\");\r\n        if (styAccountInfoResetLink) {\r\n          styAccountInfoResetLink.classList.add(\"account-info-reset-link\");\r\n          console.debug(\"sty Account Infor Reset Link\", styAccountInfoResetLink);\r\n          styAccountInfoResetLink.querySelector(\"span\").innerHTML = \"Use another email\";\r\n          styAccountInfoResetLink.querySelector(\"span\").classList.add(\"account-info-reset-link-text\");\r\n        }\r\n      }\r\n    })\r\n\r\n    let passwordSvgIcon = document.querySelector(\"sty-input-password\").shadowRoot.querySelector(\"div[part='button-toggle']\").querySelector(\"svg\");\r\n    if (passwordSvgIcon) {\r\n      console.debug(\"Inside password svg icon\", passwordSvgIcon);\r\n      passwordSvgIcon.style.height = \"24px\";\r\n    }\r\n    let styCheckboxUi = document.querySelector(\"sty-block-password sty-checkbox\")?.shadowRoot.querySelector(\"[part=input]:before\");\r\n    if (styCheckboxUi) {\r\n      console.debug(\"styCheckboxUi\", styCheckboxUi);\r\n      styCheckboxUi.style.border = \"1.5px solid #333\";\r\n    }\r\n    let forgottenPasswordEle = document.createElement(\"a\");\r\n    forgottenPasswordEle.role = \"button\";\r\n    forgottenPasswordEle.classList.add(\"tvs--forgotten-password\");\r\n    forgottenPasswordEle.innerText = \"Forgot Password\";\r\n    document.querySelectorAll(\"sty-login sty-block-password\").forEach(passwordBlock => {\r\n      if (!passwordBlock.querySelector(\".tvs--forgotten-password\")) {\r\n        passwordBlock.appendChild(forgottenPasswordEle);\r\n        let passwordInputField = passwordBlock.querySelector(\"sty-input-password input\");\r\n        if (passwordInputField) {\r\n          passwordInputField.placeholder = \"Enter Password\";\r\n        }\r\n      }\r\n\r\n      // WC-XXXX: Chrome hijacks the header search bar for username autofill.\r\n      injectAutofillUsernameDecoy(passwordBlock);\r\n    });\r\n    document.addEventListener('click', (e) => {\r\n      if (e.target.classList.contains(\"tvs--forgotten-password\")) {\r\n        e.preventDefault();\r\n        localStorage.setItem(\"forgotPasswordEmail\", blockDetail.state.account.identifier);\r\n        if (window.location.hostname.split('.')[0].includes('account') || window.location.hostname.split('.')[0].includes('qa1-account')) {\r\n          window.location.href = `${document.referrer}twa/password-reset`\r\n        } else {\r\n          window.location.href = \"/twa/password-reset\";\r\n        }\r\n      }\r\n    });\r\n\r\n    document.querySelectorAll(\"a[data-button='forgottenPassword']\").forEach(styForgotPasswordEle => styForgotPasswordEle.remove());\r\n\r\n\r\n  }\r\n\r\n  /*\r\n    REGISTRATION BLOCK\r\n  */\r\n  if (blockDetail.state.activeBlock === 'registration') {\r\n    sessionStorage.setItem(EVENT_TYPE, \"sign_up\");\r\n    console.debug(\"GA tagging logs: EVENT_TYPE\", sessionStorage.getItem(EVENT_TYPE));\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        \"common.attributes.phone.errors.invalid\": \"Please enter a valid phone number\",\r\n        \"common.attributes.phone.errors.required\": \"Please enter a valid phone number\",\r\n        \"common.attributes.general.errors.unique\": \"This email is already associated with an account. Please sign in, or use a different email address to continue.\"\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n\r\n    // Check target pages early\r\n    const isInRegistrationUpgrade = !!document.querySelector('vshoppe-registration-upgrade sty-block-registration');\r\n    const isInThankYou = !!document.querySelector('thank-you-create-account sty-block-registration');\r\n    const isInModal = !!document.querySelector('tvs-modal sty-block-registration');\r\n\r\n    const isTargetPage = (isInRegistrationUpgrade || isInThankYou) && !isInModal;\r\n\r\n    if (isTargetPage) {\r\n      // Remove elements for target pages\r\n      const elementsToRemove = [\r\n        'sty-block-registration [data-t-id=\"blocks.registration.title\"]',\r\n        'sty-block-registration .registration-subtitle',\r\n        'sty-block-registration [data-separator=\"login\"]'\r\n      ];\r\n\r\n      elementsToRemove.forEach(selector => {\r\n        const nodes = document.querySelectorAll(selector);\r\n        nodes.forEach(node => {\r\n          if (node?.parentNode) {\r\n            node.parentNode.removeChild(node);\r\n          }\r\n        });\r\n      });\r\n\r\n      // Style submit button\r\n      const submitButtons = document.querySelectorAll(\r\n        'sty-block-registration sty-button[type=\"submit\"]'\r\n      );\r\n      submitButtons.forEach(btn => {\r\n        btn.style.cssText = `\r\n          bottom: -10%;\r\n          width: 225px;\r\n          left: 50%;\r\n          transform: translateX(-50%);\r\n        `;\r\n      });\r\n\r\n      // Style methods section\r\n      const methodsSections = document.querySelectorAll(\r\n        'sty-block-registration div[data-section=\"methods\"][role=\"list\"]'\r\n      );\r\n      methodsSections.forEach(section => {\r\n        section.style.marginBottom = '64px';\r\n      });\r\n    }\r\n\r\n    // Normal registration flow for other pages\r\n    // Change title\r\n    let registrationTitles = document.querySelectorAll(\"sty-block-registration [data-block-title]\");\r\n    registrationTitles.forEach(registrationTitle => {\r\n      registrationTitle.textContent = \"Join Now\";\r\n      if (window.location.href.includes('/s/completeprofile')) {\r\n        registrationTitle.textContent = \"Complete Your Profile\";\r\n      }\r\n\r\n      // Add subtitle\r\n      if (registrationTitle.parentElement?.querySelectorAll(\".registration-subtitle\").length === 0) {\r\n        registrationTitle.insertAdjacentHTML('afterend', `\r\n          <div class=\"registration-subtitle\">\r\n            Ready to get your V.I.P. on? Fill out the info below and we'll kickstart your membership with 25 FREE bonus points towards a Cash Back Award.\r\n          </div>\r\n        `);\r\n      }\r\n    });\r\n\r\n    let inputTexts = document.querySelectorAll(\"sty-input-text\");\r\n    inputTexts.forEach(inputText => {\r\n      let errorShadowEleIcon = inputText.shadowRoot?.querySelector(\"div[part='error-icon']\");\r\n      if (errorShadowEleIcon) {\r\n        errorShadowEleIcon.style.display = \"none\";\r\n      }\r\n    });\r\n\r\n    // Save the preffered method of registration for GA\r\n    setupRadioObserver();\r\n\r\n    const radioConfigs = [\r\n      {\r\n        selector: 'sty-radio[value=\"passkey\"]',\r\n        subtitle: 'Sign up without a password using your fingerprint, face ID or a PIN.',\r\n        isRecommended: true\r\n      },\r\n      {\r\n        selector: 'sty-radio[value=\"password\"]',\r\n        subtitle: 'Sign up securely using a traditional password.'\r\n      }\r\n    ];\r\n\r\n    radioConfigs.forEach(config => {\r\n      let radios = document.querySelectorAll(config.selector);\r\n\r\n      radios.forEach(radio => {\r\n        if (radio?.shadowRoot) {\r\n          const shadowRoot = radio.shadowRoot;\r\n          const labelDiv = shadowRoot.querySelector('div[part=\"label\"]');\r\n\r\n          if (labelDiv) {\r\n            // Handle \"Recommended\" inside slot (INLINE with label text)\r\n            if (config.isRecommended) {\r\n              const slot = shadowRoot.querySelector('slot[name=\"label\"]');\r\n\r\n              if (slot) {\r\n                const assignedNodes = slot.assignedNodes({ flatten: true });\r\n\r\n                assignedNodes.forEach(node => {\r\n                  if (node.nodeType === Node.TEXT_NODE) {\r\n                    const text = node.textContent.trim();\r\n\r\n                    if (text && !text.includes('Recommended')) {\r\n                      const wrapper = document.createElement('span');\r\n                      wrapper.textContent = text + ' ';\r\n\r\n                      const recommended = document.createElement('span');\r\n                      recommended.className = 'passkey-recommended';\r\n                      recommended.textContent = 'Recommended';\r\n                      recommended.style.cssText = `\r\n                        margin-left: 8px;\r\n                        color: #008935;\r\n                        font-family: var(--sty-font-family);\r\n                        font-size: var(--sty-font-size-xs);\r\n                        font-weight: 400;\r\n                      `;\r\n\r\n                      const mq = window.matchMedia('(max-width: 418px)');\r\n\r\n                      const updateStyles = (e) => {\r\n                        recommended.style.wordBreak = e.matches ? 'keep-all' : '';\r\n                        recommended.style.marginLeft = e.matches ? '0' : '8px';\r\n                      };\r\n\r\n                      updateStyles(mq); // Run once immediately\r\n                      mq.addEventListener('change', updateStyles);\r\n\r\n                      wrapper.appendChild(recommended);\r\n                      node.replaceWith(wrapper);\r\n                    }\r\n                  }\r\n                });\r\n              }\r\n            }\r\n\r\n            // Subtitle\r\n            if (!labelDiv.querySelector('[data-subtitle=\"true\"]')) {\r\n              const subtitle = document.createElement('span');\r\n              subtitle.setAttribute('data-subtitle', 'true');\r\n              subtitle.className = 'radio-subtitle';\r\n              subtitle.style.cssText = `\r\n                color: rgba(102, 102, 102, 1);\r\n                font-family: 'Lato', sans-serif;\r\n                font-size: 12px;\r\n                font-weight: 400;\r\n                display: block;\r\n                line-height: 1.4;\r\n                word-break: normal;\r\n              `;\r\n              subtitle.textContent = config.subtitle;\r\n              labelDiv.appendChild(subtitle);\r\n            }\r\n          }\r\n        }\r\n      });\r\n    });\r\n\r\n    // Update submit button text\r\n    const isCompleteProfile = window.location.href.includes(\"/s/completeprofile\")\r\n    let submitButtons = document.querySelectorAll('sty-block-registration sty-button[data-button=\"submit\"]');\r\n    submitButtons.forEach(submitButton => {\r\n      submitButton.textContent = isCompleteProfile ? \"Complete Profile\" : \"Create My Account\";\r\n    });\r\n\r\n    // ===== ADD LEGAL DISCLAIMER =====\r\n    let externalLoginSections = document.querySelectorAll('sty-block-registration sty-block-external-login-provider');\r\n    externalLoginSections.forEach(externalLoginSection => {\r\n      if (!externalLoginSection.nextElementSibling?.classList.contains('registration-legal-disclaimer')) {\r\n        externalLoginSection.insertAdjacentHTML('afterend', `\r\n          <p class=\"registration-legal-disclaimer\">\r\n            By creating an account, you agree to the \r\n            <a href=\"/lp/healthy-awards-terms-conditions\" target=\"_blank\">Healthy Awards Terms and Conditions</a>, \r\n            <a href=\"/lp/terms-conditions-auto-delivery\" target=\"_blank\">Auto Delivery Terms and Conditions</a>, and the Vitamin Shoppe's \r\n            <a href=\"/u/terms\" target=\"_blank\">Terms of Use</a>, and \r\n            <a href=\"/u/privacy\" target=\"_blank\">Privacy Policy</a>. \r\n            If you are a California or Colorado resident, \r\n            you agree that you are enrolling in a financial incentive/loyalty program \r\n            and acknowledge that you have read and understand the \r\n            <a href=\"/lp/us-state-privacy-supplement\" target=\"_blank\">Financial Incentive and Loyalty Program Notice.</a>\r\n          </p>\r\n        `);\r\n      }\r\n    });\r\n\r\n    // Setting up the < Back button\r\n    setupBackButton('sty-block-registration a[data-button=\"login\"]');\r\n\r\n    let inputFields = document.querySelectorAll('sty-input-text[name=\"attributes.addresses.primary.postalCode.postalCode\"]');\r\n    inputFields.forEach(inputField => {\r\n      const clearButton = inputField.shadowRoot?.querySelector('div[part=\"suffix\"]');\r\n      if (clearButton) {\r\n        clearButton.style.display = 'none';\r\n      }\r\n    });\r\n    if (window.location.href.includes(\"/s/completeprofile\")) {\r\n      displayWarningForSocialLogin();\r\n      scrollToTopForCompleteProfile();\r\n    }\r\n  }\r\n\r\n  /*\r\n    REGISTRATION AND PROGRESSIVE PROFILING BLOCK\r\n  */\r\n  if (blockDetail.state.activeBlock === 'registration' || blockDetail.state.activeBlock === 'progressiveProfiling') {\r\n    /** Phone number input field updates for country code issue resolution */\r\n    const phone = document.querySelector('sty-input-phone');\r\n    phone.shadowRoot.querySelector(\"div[part='country-code-list']\").remove();\r\n\r\n    setTimeout(() => {\r\n      phone.setAttribute('autocomplete', false);\r\n      phone.setAttribute('lookupCountryCode', false);\r\n      phone.countryCode = 'US';\r\n    });\r\n  }\r\n\r\n  /* ============================================================\r\n    SHARED HELPERS\r\n    ============================================================ */\r\n\r\n  /**\r\n   * Sets the common label + resend section text (identical across all 3 blocks).\r\n   */\r\n  function applyCommonPasscodeText() {\r\n    const passcodeLabel = document.querySelector('sty-input-passcode label[slot=\"label\"]');\r\n    if (passcodeLabel && !passcodeLabel.hasAttribute('data-customized')) {\r\n      passcodeLabel.textContent = 'Enter 6 digit code';\r\n      passcodeLabel.setAttribute('data-customized', 'true');\r\n    }\r\n\r\n    const resendContainer = document.querySelector('sty-i18n[data-section=\"resend\"]');\r\n    if (resendContainer && !resendContainer.hasAttribute('data-customized')) {\r\n      const resendLink = resendContainer.querySelector('a[data-button=\"resend\"]');\r\n      if (resendLink) {\r\n        resendContainer.childNodes.forEach(node => {\r\n          if (node.nodeType === Node.TEXT_NODE && node.textContent.includes(\"Didn't\")) {\r\n            node.textContent = \"Didn't Get a Code? \";\r\n          }\r\n        });\r\n        resendLink.textContent = 'Resend Code';\r\n        resendContainer.setAttribute('data-customized', 'true');\r\n      }\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Updates the \"sent your code to <email>\" text container used by the\r\n   * MFA enroll challenge and MFA passcode blocks.\r\n   */\r\n  function applyEmailSentText(blockSelector, keypath) {\r\n    const textContainer = document.querySelector(\r\n      `${blockSelector} sty-i18n[keypath=\"${keypath}\"]`\r\n    );\r\n    if (!textContainer || textContainer.hasAttribute('data-customized')) return;\r\n\r\n    const emailStrong = textContainer.querySelector('strong[data-target]');\r\n    if (emailStrong) {\r\n      const emailText = emailStrong.textContent;\r\n      textContainer.innerHTML = '';\r\n\r\n      const message = document.createElement('div');\r\n      message.textContent = blockSelector === 'sty-block-mfa-passcode' ? \"To sign in to your account, we've sent your code to\" : \"To create your account, we've sent your code to\";\r\n\r\n      const emailLine = document.createElement('div');\r\n      emailLine.innerHTML = `<strong>${emailText}</strong>`;\r\n\r\n      textContainer.appendChild(message);\r\n      textContainer.appendChild(emailLine);\r\n    }\r\n    textContainer.setAttribute('data-customized', 'true');\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        [keypath]: \"To create your account, we've sent your code to: {target}\",\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n  }\r\n\r\n  /**\r\n   * Builds the 6-box passcode UI, wires up all keyboard/paste/error/timer\r\n   * behaviour, and syncs the combined value back to the real hidden input.\r\n   * Identical across all 3 blocks.\r\n   */\r\n  function initSixBoxPasscodeUI() {\r\n    const styInputPasscode = document.querySelector('sty-input-passcode');\r\n    if (!styInputPasscode || styInputPasscode.querySelector('.passcode-boxes-wrapper')) return;\r\n\r\n    // FIX 1: Best-effort autofocus removal before component acts on it\r\n    styInputPasscode.removeAttribute('autofocus');\r\n\r\n    const realInput = styInputPasscode.querySelector('input[slot=\"input\"]');\r\n    if (realInput) {\r\n      realInput.style.cssText =\r\n        'position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;';\r\n    }\r\n\r\n    // FIX 1: Suppress observer reactions during initial focus setup\r\n    let isInitializing = true;\r\n    // FIX 3: Track whether a server-side error has occurred\r\n    let hadError = false;\r\n    // Suppress Strivacity's own error text until a real error occurs\r\n    styInputPasscode.classList.add('suppress-feedback');\r\n\r\n    styInputPasscode.insertAdjacentHTML('beforeend', `\r\n      <div class=\"passcode-boxes-wrapper\" slot=\"input\" style=\"position: relative;\">\r\n        <div class=\"passcode-boxes\" id=\"passcode-boxes\">\r\n          ${'<input class=\"passcode-box\" maxlength=\"1\" inputmode=\"numeric\" type=\"text\" autocomplete=\"off\" />'.repeat(6)}\r\n        </div>\r\n        <div class=\"passcode-timer\" id=\"passcode-timer\">Code Expires in 6:00</div>\r\n      </div>\r\n    `);\r\n\r\n    const boxes = Array.from(styInputPasscode.querySelectorAll('.passcode-box'));\r\n    const timerEl = styInputPasscode.querySelector('#passcode-timer');\r\n\r\n    const syncToRealInput = () => {\r\n      if (!realInput) return;\r\n      const combined = boxes.map(b => b.value).join('');\r\n      realInput.value = combined;\r\n      realInput.dispatchEvent(new Event('input', { bubbles: true }));\r\n      realInput.dispatchEvent(new Event('change', { bubbles: true }));\r\n\r\n      // FIX 3: Re-trigger submission after a prior error\r\n      if (combined.length === 6 && hadError) {\r\n        hadError = false;\r\n        setTimeout(() => {\r\n          const shadowBtn = styInputPasscode?.shadowRoot?.querySelector('button');\r\n          if (shadowBtn) return shadowBtn.click();\r\n\r\n          const form = realInput.closest('form');\r\n          if (form) {\r\n            try { return form.requestSubmit(); } catch (e) { /* fall through */ }\r\n          }\r\n          realInput.dispatchEvent(new KeyboardEvent('keydown', {\r\n            key: 'Enter', keyCode: 13, bubbles: true, cancelable: true,\r\n          }));\r\n        }, 50);\r\n      }\r\n    };\r\n\r\n    const setErrorState = () => {\r\n      hadError = true;\r\n      styInputPasscode.classList.remove('suppress-feedback');\r\n      boxes.forEach(b => {\r\n        b.classList.add('error');\r\n        b.classList.remove('filled');\r\n      });\r\n    };\r\n\r\n    const clearErrorState = () => boxes.forEach(b => b.classList.remove('error'));\r\n\r\n    boxes.forEach((box, i) => {\r\n      box.addEventListener('keydown', e => {\r\n        if (e.key === 'Backspace') {\r\n          clearErrorState();\r\n          if (box.value) {\r\n            box.value = '';\r\n            box.classList.remove('filled');\r\n          } else if (i > 0) {\r\n            boxes[i - 1].focus();\r\n            boxes[i - 1].value = '';\r\n            boxes[i - 1].classList.remove('filled');\r\n          }\r\n          syncToRealInput();\r\n          e.preventDefault();\r\n        }\r\n        if (e.key === 'ArrowLeft' && i > 0) boxes[i - 1].focus();\r\n        if (e.key === 'ArrowRight' && i < 5) boxes[i + 1].focus();\r\n      });\r\n\r\n      box.addEventListener('input', e => {\r\n        clearErrorState();\r\n        const val = e.target.value.replace(/\\D/g, '');\r\n        box.value = val ? val[0] : '';\r\n        if (box.value) {\r\n          box.classList.add('filled');\r\n          if (i < 5) boxes[i + 1].focus();\r\n        } else {\r\n          box.classList.remove('filled');\r\n        }\r\n        syncToRealInput();\r\n      });\r\n\r\n      box.addEventListener('paste', e => {\r\n        e.preventDefault();\r\n        clearErrorState();\r\n        const pasted = (e.clipboardData || window.clipboardData)\r\n          .getData('text')\r\n          .replace(/\\D/g, '')\r\n          .slice(0, 6);\r\n        pasted.split('').forEach((ch, j) => {\r\n          if (boxes[i + j]) {\r\n            boxes[i + j].value = ch;\r\n            boxes[i + j].classList.add('filled');\r\n          }\r\n        });\r\n        boxes[Math.min(i + pasted.length, 5)].focus();\r\n        syncToRealInput();\r\n      });\r\n\r\n      box.addEventListener('focus', () => box.select());\r\n    });\r\n\r\n    const feedback = styInputPasscode.querySelector('sty-feedback');\r\n    if (feedback) {\r\n      new MutationObserver(() => {\r\n        if (isInitializing) return;\r\n        if (styInputPasscode.hasAttribute('invalid')) setErrorState();\r\n      }).observe(feedback, { attributes: true, childList: true, subtree: true });\r\n    }\r\n\r\n    new MutationObserver(() => {\r\n      if (isInitializing) return;\r\n      if (styInputPasscode.hasAttribute('invalid') && boxes.some(b => b.value)) {\r\n        setErrorState();\r\n      }\r\n    }).observe(styInputPasscode, { attributes: true, attributeFilter: ['invalid'] });\r\n\r\n    let secs = 360;\r\n    const timerInterval = setInterval(() => {\r\n      secs--;\r\n      if (secs <= 0) {\r\n        clearInterval(timerInterval);\r\n        timerEl.textContent = 'Code Expired';\r\n        timerEl.classList.add('expiring');\r\n        setErrorState();\r\n        return;\r\n      }\r\n      const m = Math.floor(secs / 60);\r\n      const s = secs % 60;\r\n      timerEl.textContent = `Code Expires in ${m}:${String(s).padStart(2, '0')}`;\r\n      if (secs <= 30) timerEl.classList.add('expiring');\r\n    }, 1000);\r\n\r\n    setTimeout(() => {\r\n      boxes[0].focus();\r\n      setTimeout(() => { isInitializing = false; }, 400);\r\n    }, 100);\r\n  }\r\n\r\n  /**\r\n   * Sets the block title (once), the submit button label, and the back button.\r\n   */\r\n  function applyBlockChrome({ blockSelector, backSelector, title = 'Email Verification', submitText = 'Verify Code' }) {\r\n    const titleElement = document.querySelector(`${blockSelector} [data-block-title]`);\r\n    if (titleElement && !titleElement.hasAttribute('data-customized')) {\r\n      titleElement.textContent = title;\r\n      titleElement.setAttribute('data-customized', 'true');\r\n    }\r\n\r\n    setupBackButton(`${blockSelector} ${backSelector}`);\r\n\r\n    const submitButton = document.querySelector(`${blockSelector} sty-button[data-button=\"submit\"]`);\r\n    if (submitButton) submitButton.textContent = submitText;\r\n  }\r\n\r\n  /* ============================================================\r\n    BLOCK DISPATCH\r\n    ============================================================ */\r\n\r\n  const activeBlock = blockDetail.state.activeBlock;\r\n\r\n  /* --- PASSCODE (email verification) --- */\r\n  if (activeBlock === 'passcode' || activeBlock === 'passcode-verification') {\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        \"blocks.passcode.fields.passcode.errors.exactLength\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.passcode.fields.passcode.errors.invalid\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.passcode.fields.passcode.errors.required\": \"Please enter a valid 6-digit passcode\",\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n\r\n    applyBlockChrome({\r\n      blockSelector: 'sty-block-passcode',\r\n      backSelector: 'a[data-button=\"login\"]',\r\n    });\r\n\r\n    // Simple paragraph sub-text (unique to this block)\r\n    const textSubText = document.querySelector('[data-text] p');\r\n    if (textSubText && !textSubText.hasAttribute('data-customized')) {\r\n      textSubText.textContent = \"To create your account, we've sent your code to\";\r\n      textSubText.setAttribute('data-customized', 'true');\r\n    }\r\n\r\n    applyCommonPasscodeText();\r\n    initSixBoxPasscodeUI();\r\n  }\r\n\r\n  /* --- PASSKEY MFA ENROLL CHALLENGE --- */\r\n  if (activeBlock === 'mfaEnrollChallenge') {\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        \"blocks.mfaEnrollChallenge.fields.passcode.errors.exactLength\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.mfaEnrollChallenge.fields.passcode.errors.invalid\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.mfaEnrollChallenge.fields.passcode.errors.required\": \"Please enter a valid 6-digit passcode\",\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n\r\n    applyBlockChrome({\r\n      blockSelector: 'sty-block-mfa-enroll-challenge',\r\n      backSelector: 'a[data-button=\"login\"]',\r\n    });\r\n    applyEmailSentText('sty-block-mfa-enroll-challenge', 'blocks.mfaEnrollChallenge.email.text');\r\n    applyCommonPasscodeText();\r\n    initSixBoxPasscodeUI();\r\n  }\r\n\r\n  /* --- PASSCODE MFA --- */\r\n  if (activeBlock === 'mfaPasscode') {\r\n\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        \"blocks.mfaPasscode.fields.passcode.errors.exactLength\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.mfaPasscode.fields.passcode.errors.invalid\": \"Please enter a valid 6-digit passcode\",\r\n        \"blocks.mfaPasscode.fields.passcode.errors.required\": \"Please enter a valid 6-digit passcode\",\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n\r\n    applyBlockChrome({\r\n      blockSelector: 'sty-block-mfa-passcode',\r\n      backSelector: 'a[data-button=\"login\"]',\r\n    });\r\n    applyEmailSentText('sty-block-mfa-passcode', 'blocks.mfaPasscode.text.email.passcode');\r\n    applyCommonPasscodeText();\r\n    initSixBoxPasscodeUI();\r\n  }\r\n\r\n\r\n  /*\r\n    PASSWORD ENROLL BLOCK (PASSWORD CREATION AT THE TIME OF REGISTRATION)\r\n  */\r\n  if (blockDetail.state.activeBlock === 'passwordEnroll') {\r\n    const emailText = document.querySelector(\"sty-block-password-enroll sty-account-info span[data-item='identifier']\")\r\n    if (emailText && !emailText.hasAttribute('data-customized')) {\r\n      emailText.insertAdjacentHTML('afterbegin', `\r\n        <span class=\"email-text\">Set up a secure password for </span>\r\n      `)\r\n      emailText.setAttribute('data-customized', 'true'); // Prevent duplicate updates\r\n    }\r\n\r\n    // Testing password strength indicator\r\n    const waitForElement = setInterval(() => {\r\n      const requirementsEl = document.querySelector('sty-input-password-requirements');\r\n      const passwordInput = document.querySelector('sty-input-password');\r\n\r\n      if (requirementsEl && requirementsEl.shadowRoot && passwordInput) {\r\n        clearInterval(waitForElement);\r\n        initCustomPasswordUI(requirementsEl, passwordInput);\r\n      }\r\n    }, 200);\r\n\r\n    function initCustomPasswordUI(requirementsEl, passwordInput) {\r\n\r\n      console.debug('[Password UI] Initializing...');\r\n\r\n      // 1. Hide default Strivacity UI\r\n      requirementsEl.style.display = 'none';\r\n\r\n      // 2. Inject Custom UI\r\n      if (!document.querySelector('.custom-password-wrapper')) {\r\n        passwordInput.insertAdjacentHTML('afterend', `\r\n          <div class=\"custom-password-wrapper\">\r\n\r\n            <div class=\"strength-text\">Password Strength</div>\r\n\r\n            <div class=\"strength-bars\">\r\n              <div class=\"bar\" data-index=\"0\"></div>\r\n              <div class=\"bar\" data-index=\"1\"></div>\r\n              <div class=\"bar\" data-index=\"2\"></div>\r\n              <div class=\"bar\" data-index=\"3\"></div>\r\n            </div>\r\n\r\n            <div class=\"requirements-title\">Password must contain:</div>\r\n\r\n            <ul class=\"requirements-list\">\r\n              <li data-rule=\"numeric\">\r\n                ${crossIcon()} <span>At least one number</span>\r\n              </li>\r\n              <li data-rule=\"uppercase\">\r\n                ${crossIcon()} <span>Uppercase letters</span>\r\n              </li>\r\n              <li data-rule=\"lowercase\">\r\n                ${crossIcon()} <span>Lowercase letters</span>\r\n              </li>\r\n              <li data-rule=\"minLength\">\r\n                ${crossIcon()} <span>8 or more characters</span>\r\n              </li>\r\n            </ul>\r\n\r\n          </div>\r\n        `);\r\n      }\r\n\r\n      // 3. Observe Shadow DOM changes\r\n      const observerForPassword = new MutationObserver(() => {\r\n        syncUI(requirementsEl);\r\n      });\r\n      console.debug(\"requirementsEl: \", requirementsEl);\r\n      observerForPassword.observe(requirementsEl.shadowRoot, {\r\n        subtree: true,\r\n        attributes: true,\r\n        childList: true\r\n      });\r\n\r\n      // Initial sync\r\n      syncUI(requirementsEl);\r\n    }\r\n\r\n    function syncUI(requirementsEl) {\r\n      console.debug(\"requirementsE1l : \", requirementsEl);\r\n      const shadowItems = requirementsEl.shadowRoot.querySelectorAll('[data-requirement]');\r\n      let metCount = 0;\r\n\r\n      shadowItems.forEach(item => {\r\n        const rule = item.getAttribute('data-requirement');\r\n\r\n        // IMPORTANT: confirm this class in DevTools\r\n        const isMet = item.classList.contains('valid') || item.classList.contains('met');\r\n\r\n        const customItem = document.querySelector(`.requirements-list li[data-rule=\"${rule}\"]`);\r\n\r\n        if (customItem) {\r\n          const iconContainer = customItem.querySelector('.icon');\r\n\r\n          if (isMet) {\r\n            customItem.classList.add('met');\r\n            customItem.classList.remove('unmet');\r\n            iconContainer.innerHTML = checkIcon();\r\n            metCount++;\r\n          } else {\r\n            customItem.classList.add('unmet');\r\n            customItem.classList.remove('met');\r\n            iconContainer.innerHTML = crossIcon();\r\n          }\r\n        }\r\n      });\r\n\r\n      updateStrengthBars(metCount);\r\n      updateStrengthText(metCount);\r\n\r\n      console.debug('[Password UI] Met Count:', metCount);\r\n    }\r\n\r\n    function updateStrengthBars(count) {\r\n      const bars = document.querySelectorAll('.strength-bars .bar');\r\n\r\n      bars.forEach((bar, index) => {\r\n        bar.classList.remove('active', 'strong');\r\n\r\n        if (index < count) {\r\n          bar.classList.add('active');\r\n\r\n          if (count === 4) {\r\n            bar.classList.add('strong');\r\n          }\r\n        }\r\n      });\r\n    }\r\n\r\n    function updateStrengthText(count) {\r\n      const text = document.querySelector('.strength-text');\r\n\r\n      if (!text) return;\r\n\r\n      if (count === 0) {\r\n        text.textContent = 'Password Strength: -';\r\n        text.style.color = '#666';\r\n      } else if (count < 4) {\r\n        text.textContent = 'Password Strength: Weak';\r\n        text.style.color = '#c41c1c';\r\n      } else {\r\n        text.textContent = 'Password Strength: Strong';\r\n        text.style.color = '#008000';\r\n      }\r\n    }\r\n\r\n    function checkIcon() {\r\n      return `\r\n        <span class=\"icon check\">\r\n          <svg width=\"16\" height=\"16\" viewBox=\"0 0 20 20\">\r\n            <path d=\"M7 13L3 9L2 10L7 15L18 4L17 3L7 13Z\" fill=\"#008000\"/>\r\n          </svg>\r\n        </span>\r\n      `;\r\n    }\r\n\r\n    function crossIcon() {\r\n      return `\r\n        <span class=\"icon cross\">\r\n          <svg width=\"16\" height=\"16\" viewBox=\"0 0 20 20\">\r\n            <path d=\"M14 6L6 14M6 6L14 14\" stroke=\"#666\" stroke-width=\"2\"/>\r\n          </svg>\r\n        </span>\r\n      `;\r\n    }\r\n  }\r\n\r\n  if (blockDetail.state.activeBlock === \"passkeyEnroll\") {\r\n    sty.i18nService.overrides = {\r\n      'en-US': {\r\n        'blocks.passkeyEnroll.create': 'Add Passkey',\r\n        'blocks.passkeyEnroll.submit': 'Add Passkey'\r\n      },\r\n    };\r\n    sty.i18nService.mergeLocaleMessage();\r\n    if (blockDetail.previousState.activeBlock === \"genericResult\") {\r\n      let hideSkipForNowElements = document.querySelectorAll(\"sty-login sty-block-passkey-enroll[data-block='passkeyEnroll'] a[data-button='skip']\");\r\n      console.debug(\"hideSkipForNowElements: \", hideSkipForNowElements);\r\n      hideSkipForNowElements.forEach(hideSkipForNowEle => {\r\n        if (hideSkipForNowEle) {\r\n          hideSkipForNowEle.classList.add(\"hide-skip-now\");\r\n        }\r\n\r\n      })\r\n    }\r\n\r\n    console.debug(\"blockDetail.previousState.activeBlock: \", blockDetail.previousState.activeBlock)\r\n\r\n    // Adding custom loader\r\n    const isPasskeyEnrollArr = document.querySelectorAll(\r\n      'sty-login.passkeyEnroll'\r\n    );\r\n\r\n    console.debug('isPasskeyEnrollArr: ', isPasskeyEnrollArr)\r\n\r\n    if (isPasskeyEnrollArr.length) {\r\n      const loaderHTML = `\r\n        <sty-loader class=\"temp-passkey-loader\" diameter=\"80\" stroke=\"2.5\" ></sty-loader>\r\n      `;\r\n\r\n      isPasskeyEnrollArr.forEach((isPasskeyEnroll) => {\r\n        // Insert loader before the element\r\n        console.debug('isPasskeyEnroll: ', isPasskeyEnroll)\r\n        console.debug('isPasskeyEnroll adding the loader: ')\r\n\r\n        const parent = isPasskeyEnroll.parentElement;\r\n        const existingLoader = parent?.querySelector('.temp-passkey-loader') || parent?.querySelector('sty-loader');\r\n\r\n        if (!existingLoader) {\r\n          isPasskeyEnroll.insertAdjacentHTML('beforebegin', loaderHTML);\r\n        }\r\n      });\r\n\r\n    }\r\n\r\n    if (blockDetail.previousState.activeBlock === \"passwordEnroll\" || blockDetail.previousState.activeBlock === \"genericResult\" || blockDetail.previousState.activeBlock === \"password\") {\r\n      let passkeyEnrollTitles = document.querySelectorAll(\"sty-login sty-block-passkey-enroll [data-block-title]\");\r\n      passkeyEnrollTitles.forEach(passkeyEnrollTitle => {\r\n        passkeyEnrollTitle.textContent = \"Introducing Passkeys\";\r\n\r\n        // Add subtitle\r\n        if (passkeyEnrollTitle.parentElement.querySelectorAll(\".passkey-enroll-subtitle\").length === 0) {\r\n          passkeyEnrollTitle.insertAdjacentHTML('afterend', `\r\n            <div class=\"passkey-enroll-subtitle\">\r\n              Simplify your sign-in experience\r\n            </div>\r\n          `);\r\n\r\n          // Removing the loader\r\n          setTimeout(() => {\r\n            console.debug('isPasskeyEnroll removing the loader: ')\r\n            document\r\n              .querySelectorAll('.temp-passkey-loader')\r\n              .forEach((loader) => loader.remove());\r\n          }, 2500)\r\n        }\r\n      });\r\n\r\n      // Remove all <sty-account-info>\r\n      document.querySelectorAll('sty-login sty-block-passkey-enroll sty-account-info')\r\n        .forEach(el => el.remove());\r\n\r\n      // Remove all <sty-icon>\r\n      document.querySelectorAll('sty-login sty-block-passkey-enroll sty-icon')\r\n        .forEach(el => el.remove());\r\n\r\n      // Remove all elements with data-t-id starting with \"blocks.passkeyEnroll.explanation.\"\r\n      document.querySelectorAll('sty-login sty-block-passkey-enroll [data-t-id^=\"blocks.passkeyEnroll.explanation.\"]')\r\n        .forEach(el => el.remove());\r\n\r\n      // Add custom image + content after subtitle\r\n      let subtitles = document.querySelectorAll(\r\n        'sty-login sty-block-passkey-enroll .passkey-enroll-subtitle'\r\n      );\r\n\r\n      subtitles.forEach(subtitle => {\r\n        if (subtitle) {\r\n          // Prevent duplicate insertion\r\n          if (!subtitle.parentElement.querySelectorAll('.passkey-custom-content').length) {\r\n            subtitle.insertAdjacentHTML('afterend', `\r\n              <div class=\"passkey-custom-content\">\r\n                <div class=\"passkey-image-placeholder\">\r\n                  <div class=\"svg-desktop\">\r\n                    <!-- DESKTOP SVG HERE -->\r\n                    ${desktopSvg}\r\n                  </div>\r\n                  <div class=\"svg-mobile\">\r\n                    <!-- MOBILE SVG HERE -->\r\n                    ${mobileSvg}\r\n                  </div>\r\n                </div>\r\n                <p class=\"passkey-custom-explanation\">Use your fingerprint, face, or PIN to securely sign in as a passkey.</p>\r\n                <p class=\"passkey-custom-explanation\">Passkeys offer enhanced security and convenience over traditional passwords, while still allowing you to sign in with your password if needed.</p>\r\n                <p class=\"passkey-custom-explanation\">Click 'Add Passkey' to get started, then follow the prompts on your device or browser.</p>\r\n              </div>\r\n            `);\r\n          }\r\n        }\r\n      });\r\n\r\n      // Listen to Add Passkey button click\r\n      let addPasskeyButtons = document.querySelectorAll(\r\n        'sty-login sty-block-passkey-enroll sty-button[data-button=\"create\"]'\r\n      );\r\n\r\n      addPasskeyButtons.forEach(btn => {\r\n        if (btn) {\r\n          btn.addEventListener('click', () => {\r\n            // Remove all custom content blocks\r\n            document.querySelectorAll(\r\n              'sty-login sty-block-passkey-enroll .passkey-custom-content'\r\n            ).forEach(el => el.remove());\r\n          });\r\n        }\r\n      });\r\n    }\r\n  }\r\n\r\n  /**\r\n   * ============================================================\r\n   *  Social Login Pop up close redirect message update\r\n   * ============================================================\r\n   */\r\n\r\n  if (blockDetail.state.activeBlock === \"redirect\") {\r\n    console.debug(\"Back button not clicked\");\r\n    if (!observerForRetry) {\r\n      observerForRetry = new MutationObserver(() => {\r\n        if (document.querySelector(\"sty-block-redirect sty-button[data-button='retry']\")) {\r\n          console.debug(\"Loader:\", document.querySelector(\"sty-block-redirect sty-loader\"));\r\n          document.querySelector(\"sty-block-redirect sty-loader\").remove();\r\n          document.querySelector(\"sty-block-redirect\").insertAdjacentHTML(\"afterbegin\",\r\n            `<p class='retry-bold-message'>Sign-in didn't complete</p>\r\n            <p>We couldn’t confirm your sign-in. Please retry, or refresh the page to see other sign-in options.</p>`\r\n          )\r\n          observerForRetry.disconnect();\r\n          observerForRetry = null;\r\n        }\r\n      });\r\n    }\r\n    else {\r\n      observerForRetry.disconnect();\r\n    }\r\n    document.querySelectorAll(\"sty-block-redirect\").forEach(styBlockRedirect => {\r\n      observerForRetry.observe(styBlockRedirect, { attributes: true, childList: true, subtree: true });\r\n    });\r\n\r\n    // GA - Google analytics from registration\r\n    if (blockDetail.state.blocks.redirect.mode === \"finish\") {\r\n      console.debug(\"GA tagging logs: Calling report login\");\r\n      const pageType = getPageType();\r\n      reportLogin(pageType);\r\n    }\r\n\r\n    //alert for safari pop up blocked\r\n    if (blockDetail.state.blocks.redirect.mode === \"popup\") {\r\n      const originalWindowOpen = window.open;\r\n\r\n      window.open = function (...args) {\r\n        const popup = originalWindowOpen.apply(this, args);\r\n\r\n        if (!popup) {\r\n          // Safari/browser blocked the popup\r\n          showPopupBlockedAlert();\r\n        }\r\n\r\n        return popup;\r\n      };\r\n\r\n      function showPopupBlockedAlert() {\r\n        alert(\r\n          'Pop-up blocked. Please allow pop-ups for this website in Safari and try again.'\r\n        );\r\n      }\r\n    }\r\n  }\r\n\r\n  if (blockDetail.state.activeBlock === \"rememberedAccount\" && blockDetail.state.blocks.rememberedAccount?.accounts?.length > 1) {\r\n    removeRememberedAccountsUI(event.detail.state.blocks.rememberedAccount?.accounts?.length);\r\n  }\r\n\r\n  if (blockDetail.state.activeBlock === \"rememberedAccount\") {\r\n    if (document.querySelector(\"[data-t-id='blocks.rememberedAccount.useDifferent']\")) {\r\n      document.querySelector(\"[data-t-id='blocks.rememberedAccount.useDifferent']\").addEventListener(\"click\", () => {\r\n        console.debug(\"Login different account clicked\");\r\n        localStorage.removeItem(\"ctProfileData\");\r\n      });\r\n    }\r\n  }\r\n\r\n  if (!observer) {\r\n    observer = new MutationObserver((mutationsList) => {\r\n      handleGlobalObserver(mutationsList);\r\n    });\r\n  }\r\n  else {\r\n    observer.disconnect();\r\n  }\r\n  document.querySelectorAll(\"sty-login\").forEach((targetNode) => {\r\n    observer.observe(targetNode, { attributes: true, childList: true, subtree: true });\r\n  });\r\n\r\n  if (observerForScreen) {\r\n    observerForScreen.disconnect();\r\n    observerForScreen = null;\r\n  }\r\n  const apply = handlerFor(blockDetail.state);\r\n  if (!apply) {\r\n    return;\r\n  }\r\n  if (!apply()) {\r\n    observerForScreen = new MutationObserver(() => {\r\n      if (apply()) {\r\n        observerForScreen.disconnect();\r\n        observerForScreen = null;\r\n      }\r\n    });\r\n    observerForScreen.observe(document.body, { childList: true, subtree: true, attributes: true });\r\n  }\r\n});\r\n\r\ndocument.addEventListener('block-request', async (event) => {\r\n  console.debug('global error', event)\r\n\r\n  const globalMessage = event.detail.state?.messages?.global;\r\n  console.debug('globalMessage: ', globalMessage)\r\n\r\n  if (globalMessage?.type === 'error' && (event.detail.state.activeBlock === 'registration' || event.detail.state.activeBlock === 'identifier')) {\r\n    console.debug('globalMessage if check globalMessage?.type: ', globalMessage?.type)\r\n    console.debug('globalMessage if check event.detail.state.activeBlock: ', event.detail.state.activeBlock)\r\n\r\n    // Inline alert ABOVE heading\r\n    const heading = document.querySelector('[data-block-title][data-t-id=\"blocks.registration.title\"]') ||\r\n      document.querySelector('sty-block-registration') ||\r\n      document.querySelector('[data-block-title][data-t-id=\"blocks.identifier.title\"]') ||\r\n      document.querySelector('sty-block-identifier')\r\n\r\n    console.debug('globalMessage heading', heading)\r\n\r\n    if (heading) {\r\n      console.debug('globalMessage heading if check', heading)\r\n      // Prevents duplicates\r\n      document.querySelectorAll('.custom-global-error').forEach(el => el.remove());\r\n\r\n      let messageText = globalMessage?.text;\r\n      if (globalMessage?.text === \"Invalid passkey\") messageText = \"Passkey not recognized\";\r\n      if (globalMessage?.text === \"Account with same identifier already exists. Please try to login with that.\") messageText = \"This email is already associated with an account. Please sign in, or use a different email address to continue.\";\r\n\r\n      heading.insertAdjacentHTML('beforebegin', `\r\n        <sty-alert variant=\"error\" class=\"custom-global-error\">\r\n          <svg class=\"banner-content--icon\" aria-hidden=\"true\" width=\"20px\" height=\"20px\" style=\"min-width: 20px;\" viewBox=\"0 0 20 21\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n            <g id=\"Messages\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n              <g id=\"Mobile_Credit-Card-Expired_1\" transform=\"translate(-30.000000, -138.000000)\">\r\n                <g id=\"Error-Message\" transform=\"translate(9.000000, 122.000000)\">\r\n                  <g id=\"Error-message-1\" transform=\"translate(0.000000, 5.000000)\">\r\n                    <g id=\"error_icon_pagelevel\" transform=\"translate(21.000000, 11.142857)\">\r\n                      <circle id=\"Oval\" fill=\"#C41C1C\" cx=\"10\" cy=\"10\" r=\"10\"></circle>\r\n                      <g id=\"Group-5\" transform=\"translate(7.000000, 7.000000)\" stroke=\"#FFFFFF\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\">\r\n                        <line x1=\"0\" y1=\"6\" x2=\"6\" y2=\"0\" id=\"Stroke-1\"></line>\r\n                        <line x1=\"6\" y1=\"6\" x2=\"0\" y2=\"0\" id=\"Stroke-3\"></line>\r\n                      </g>\r\n                    </g>\r\n                  </g>\r\n                </g>\r\n              </g>\r\n            </g>\r\n          </svg>\r\n          <span class=\"custom-global-error-message\">${messageText}</span>\r\n        </sty-alert>\r\n      `);\r\n\r\n      // Scroll to the error message at the top\r\n      requestAnimationFrame(() => {\r\n        const targetHeader = document.querySelector('sty-alert.custom-global-error');\r\n\r\n        if (targetHeader) {\r\n          targetHeader.scrollIntoView({\r\n            behavior: 'smooth',\r\n            block: 'end'\r\n          });\r\n        }\r\n      });\r\n    }\r\n  }\r\n\r\n  // New code added to update the error message copy of email field level error on form submit\r\n  if (\r\n    event.detail.state.activeBlock === 'registration' &&\r\n    event.detail.previousState.activeBlock === 'registration' &&\r\n    !globalMessage &&\r\n    event.detail.state.messages?.email &&\r\n    emailControl\r\n  ) {\r\n    console.debug('globalMessage email message emailControl: ', emailControl)\r\n    emailControl.setValidity(\r\n      { customError: false },\r\n      'This email is already associated with an account. Please sign in, or use a different email address to continue.'\r\n    );\r\n    // Scroll to the error message at the email field\r\n    requestAnimationFrame(() => {\r\n      const targetField = document.querySelector('sty-block-registration sty-input-text[name=\"email\"]');\r\n\r\n      if (targetField) {\r\n        targetField.scrollIntoView({\r\n          behavior: 'smooth',\r\n          block: 'center'\r\n        });\r\n      }\r\n    });\r\n  }\r\n\r\n  if (event.detail.state.activeBlock === \"rememberedAccount\" && event.detail.state.blocks.rememberedAccount?.accounts?.length > 1) {\r\n    setRememberedAccount(event.detail);\r\n  }\r\n});\r\n\r\nwindow.addEventListener('brandingLoaded', (event) => {\r\n  console.debug(\"Branding Loaded now\");\r\n  scrollToTopForCompleteProfile();\r\n});\r\n\r\nlet replayingResetClick = false;\r\n\r\nwindow.addEventListener(\r\n  \"click\",\r\n  async (event) => {\r\n    const link = event.target.closest(\r\n      'a.account-info-reset-link[data-button=\"reset\"]'\r\n    );\r\n\r\n    if (!link) {\r\n      return;\r\n    }\r\n\r\n    // Allow our programmatically generated click through\r\n    if (replayingResetClick) {\r\n      return;\r\n    }\r\n\r\n    // Block third-party execution for the original click\r\n    event.preventDefault();\r\n    event.stopImmediatePropagation();\r\n\r\n    try {\r\n      console.debug(\"block details:\", blockDetail);\r\n\r\n      // Delete remembered account if accountId is available\r\n      const result = await removeAllRememberedAccount();\r\n      console.debug(\"Result awaited\", result);\r\n      // Only clear local auth state if an account was actually deleted\r\n      if (result.deleted) {\r\n        console.debug(\"Remembered account deleted:\", result.data);\r\n        clearLocalAuthState();\r\n      } else {\r\n        console.debug(\"No remembered account found. Continuing normally.\");\r\n      }\r\n\r\n      // Let the third-party functionality execute\r\n      replayingResetClick = true;\r\n      link.click();\r\n\r\n    } catch (error) {\r\n      console.error(\"Pre-reset API failed:\", error);\r\n\r\n      // If your API fails, don't execute the third-party action.\r\n      // Remove this return if you want the original action to continue.\r\n    } finally {\r\n      replayingResetClick = false;\r\n    }\r\n  },\r\n  true // capture phase\r\n);\r\n\r\n/*\r\n  UTILITY FUNCTIONS\r\n*/\r\n\r\n/**\r\n * Prevents Chrome from autofilling the site-wide header search bar with the\r\n * saved username on the remembered-account password step.\r\n *\r\n * Root cause: that step's <sty-form> has only static account text\r\n * (<sty-account-info>) and the password field - no username <input>.\r\n *\r\n * Fix: insert a decoy <input autocomplete=\"username\"> right before the password\r\n * input in the same <sty-form>. Off-screen, aria-hidden, tabindex -1 and out of\r\n * validation, so users never see or tab to it; Chrome fills it instead.\r\n *\r\n * @param {Element} passwordBlock The <sty-block-password> element for this step.\r\n */\r\nfunction injectAutofillUsernameDecoy(passwordBlock) {\r\n  if (!passwordBlock) return;\r\n\r\n  const form = passwordBlock.querySelector('sty-form') || passwordBlock;\r\n  const passwordInput = form.querySelector('sty-input-password');\r\n  if (!passwordInput) return;\r\n\r\n  // Only one decoy per form.\r\n  if (form.querySelector('.tvs-autofill-decoy-username')) return;\r\n\r\n  const identifier =\r\n    (blockDetail &&\r\n      blockDetail.state &&\r\n      blockDetail.state.account &&\r\n      blockDetail.state.account.identifier) ||\r\n    '';\r\n\r\n  const decoy = document.createElement('input');\r\n  decoy.type = 'text';\r\n  decoy.name = 'username';\r\n  decoy.setAttribute('autocomplete', 'username');\r\n  decoy.className = 'tvs-autofill-decoy-username';\r\n  decoy.tabIndex = -1;\r\n  decoy.setAttribute('aria-hidden', 'true');\r\n  // Keep it out of assistive tech and submission while staying in the rendered\r\n  // layout (display:none/visibility:hidden fields are skipped by Chrome's\r\n  // autofill heuristic, so position it off-screen instead).\r\n  decoy.style.cssText =\r\n    'position:absolute!important;left:-9999px!important;top:0!important;' +\r\n    'width:1px!important;height:1px!important;opacity:0!important;' +\r\n    'pointer-events:none!important;';\r\n  decoy.value = identifier;\r\n\r\n  // Insert as the field immediately preceding the password input so Chrome\r\n  // treats it as the username half of the credential pair.\r\n  passwordInput.parentElement.insertBefore(decoy, passwordInput);\r\n  console.debug(\r\n    'tvs-web-frontend: strivacity-ciam: login-branding: injectAutofillUsernameDecoy: decoy inserted for identifier:',\r\n    identifier\r\n  );\r\n}\r\n\r\nfunction setupBackButton(selector, label = 'Back', className = 'sty-btn-link') {\r\n  const buttons = document.querySelectorAll(selector);\r\n\r\n  buttons.forEach(button => {\r\n    if (!button) return;\r\n\r\n    // Add utility class\r\n    button.classList.add(className);\r\n\r\n    // Check if icon already exists\r\n    let icon = button.querySelector('.back-arrow-icon');\r\n\r\n    // Set label (this resets content)\r\n    button.innerHTML = label;\r\n\r\n    // Recreate icon if it didn't exist\r\n    if (!icon) {\r\n      icon = document.createElement('span');\r\n      icon.className = 'back-arrow-icon';\r\n      icon.setAttribute('aria-hidden', 'true'); // Decorative only\r\n    }\r\n\r\n    // Always ensure icon is at the start\r\n    button.insertBefore(icon, button.firstChild);\r\n  });\r\n}\r\n\r\n/**\r\n * Scrolls to the top on /s/completeprofile, where the page jumps down on block\r\n * transitions (e.g. registration → passwordEnroll).\r\n */\r\nfunction scrollToTopForCompleteProfile() {\r\n  if (!window.location.href.includes('/s/completeprofile')) {\r\n    return;\r\n  }\r\n\r\n  if ('scrollRestoration' in history) {\r\n    history.scrollRestoration = 'manual';\r\n  }\r\n\r\n  const scroller = document.scrollingElement || document.documentElement;\r\n\r\n  const toTop = () => {\r\n    if (scroller) scroller.scrollTop = 0;\r\n    window.scrollTo(0, 0);\r\n    document.querySelectorAll('.body-container').forEach((el) => {\r\n      el.scrollTop = 0;\r\n    });\r\n  };\r\n\r\n  toTop();\r\n  requestAnimationFrame(toTop);\r\n  [50, 150, 300, 600].forEach((delay) => window.setTimeout(toTop, delay));\r\n}\r\n\r\n// Standalone hook so every block transition on /s/completeprofile re-asserts\r\n// scroll position; kept out of the main block-ready handler so it can't end up\r\n// inside a per-block branch.\r\ndocument.addEventListener('block-ready', scrollToTopForCompleteProfile);\r\n\r\n//checkout specific styling added  for passcode timer \r\nfunction applyCheckoutMobilePasscodeTimerStyle() {\r\n  const mql = window.matchMedia('(max-width: 767px)');\r\n  const sync = () => {\r\n    let el = document.getElementById('tvs-checkout-mobile-passcode-timer-style');\r\n    if (getPageType() === 'checkout' && mql.matches) {\r\n      if (!el) {\r\n        el = document.createElement('style');\r\n        el.id = 'tvs-checkout-mobile-passcode-timer-style';\r\n        el.textContent = '.passcode-timer{top:127%;white-space:nowrap;}';\r\n        document.head.appendChild(el);\r\n      }\r\n    } else if (el) {\r\n      el.remove();\r\n    }\r\n  };\r\n  mql.addEventListener('change', sync);\r\n  sync();\r\n}\r\n\r\napplyCheckoutMobilePasscodeTimerStyle();\r\n\r\nfunction checkoutStaticContent() {\r\n  let socialLoginContainer = document.querySelector(\"sty-block-identifier sty-block-external-login-provider\");\r\n  if (document.querySelector(\".sign-in-content--create-account-secured-login\")) {\r\n    socialLoginContainer.insertAdjacentHTML('afterend', \"<hr class='create-account-separator' />\");\r\n    let noGuestCheckoutContent = \"<div class='checkout-no-guest-checkout-content'>Guest Checkout isn't available for AUTO-DELIVERY subscription orders.</div>\";\r\n    let createAccountContainer = document.querySelector(\".sign-in-content--create-account-secured-login sty-login sty-block-identifier [data-separator='registration']\");\r\n    createAccountContainer.insertAdjacentHTML('beforebegin', noGuestCheckoutContent);\r\n  }\r\n}\r\nfunction displayWarningForSocialLogin() {\r\n  let externalLoginProvider = document.querySelector(\".ciam-complete-profile-container sty-block-external-login-provider\");\r\n  if (externalLoginProvider) {\r\n    // Prevent duplicate warning messages\r\n    if (externalLoginProvider.parentElement?.querySelector('.social-login-warning-message')) {\r\n      return;\r\n    }\r\n\r\n    const warningHTML = `\r\n      <div class=\"social-login-warning-message\">\r\n        <svg class=\"warning-icon\" aria-hidden=\"true\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n          <path d=\"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V13H11V15ZM11 11H9V5H11V11Z\" fill=\"#8a6d3b\"/>\r\n        </svg>\r\n        <span class=\"warning-text\">Please choose your registered email address when registering using Google social login. Using a different email address will create a new, separate Healthy Awards account.</span>\r\n      </div>\r\n    `;\r\n\r\n    externalLoginProvider.insertAdjacentHTML('beforebegin', warningHTML);\r\n  }\r\n}\r\n/**\r\n * Clears excess remembered accounts, keeping only the most recent one.\r\n * Called from block-request event when multiple remembered accounts exist.\r\n */\r\nasync function setRememberedAccount(eventDetail) {\r\n  const state = eventDetail?.state;\r\n  if (state?.activeBlock !== 'rememberedAccount') return;\r\n\r\n  const accounts = state.blocks?.rememberedAccount?.accounts;\r\n  if (!accounts || accounts.length <= 1) return;\r\n\r\n  console.debug('Multiple accounts detected, clearing extras:', accounts);\r\n\r\n  // Delete all but the last (most recent) account\r\n  for (let i = 0; i < accounts.length - 1; i++) {\r\n    console.debug('Deleting remembered account at index', i);\r\n    try {\r\n      const response = await fetch(`https://account.vitaminshoppe.com/a/${shortAppIdForBranding}/login/api/v2/rememberedAccount`, {\r\n        method: 'POST',\r\n        headers: { 'Content-Type': 'application/json' },\r\n        body: JSON.stringify({\r\n          accountId: accounts[i]?.accountId,\r\n          action: 'delete'\r\n        })\r\n      });\r\n      const result = await response.json();\r\n      console.debug('rememberedAccounts delete result:', result);\r\n    } catch (err) {\r\n      console.debug('Failed to delete remembered account:', err);\r\n    }\r\n  }\r\n}\r\n\r\nfunction removeRememberedAccountsUI(rememberedAccountLength) {\r\n  let styBlockAccounts = document.querySelectorAll(\"sty-block-remembered-account ul\");\r\n  console.debug(\"jdshfkjsh\", styBlockAccounts);\r\n  styBlockAccounts.forEach((rememberAccounts) => {\r\n    console.debug(\"tetggjhgjgjj\", rememberAccounts.querySelectorAll(\"li\"));\r\n    rememberAccounts.querySelectorAll(\"li\").forEach((accountList, index) => {\r\n      if (index < rememberedAccountLength - 1) {\r\n        accountList.remove();\r\n      }\r\n    });\r\n  });\r\n}\r\nasync function removeAllRememberedAccount() {\r\n  console.debug(\"Remembered Account\", blockDetail);\r\n  var accountId =\r\n    blockDetail &&\r\n    blockDetail.state &&\r\n    blockDetail.state.account &&\r\n    blockDetail.state.account.accountId;\r\n\r\n  if (!accountId) {\r\n    var remembered =\r\n      blockDetail &&\r\n      blockDetail.previousState &&\r\n      blockDetail.previousState.blocks &&\r\n      blockDetail.previousState.blocks.rememberedAccount;\r\n\r\n    if (\r\n      remembered &&\r\n      remembered.accounts &&\r\n      remembered.accounts.length &&\r\n      remembered.accounts[0]\r\n    ) {\r\n      accountId = remembered.accounts[0].accountId;\r\n    }\r\n  }\r\n\r\n  if (!accountId) {\r\n    return { deleted: false, data: null };\r\n  }\r\n\r\n  var response = await fetch(\r\n    `https://account.vitaminshoppe.com/a/${shortAppIdForBranding}/login/api/v2/rememberedAccount`,\r\n    {\r\n      method: \"POST\",\r\n      headers: { \"Content-Type\": \"application/json\" },\r\n      body: JSON.stringify({\r\n        accountId: accountId,\r\n        action: \"delete\"\r\n      })\r\n    }\r\n  );\r\n\r\n  if (!response.ok) {\r\n    throw new Error(\"Failed to delete remembered account: \" + response.status);\r\n  }\r\n\r\n  return {\r\n    deleted: true,\r\n    data: await response.json()\r\n  };\r\n}\r\n\r\nfunction clearLocalAuthState() {\r\n  // Cookies: reset authToken, drop name/email cookies (path=/ so they actually clear).\r\n  document.cookie = 'authToken=initial; path=/; max-age=86400';\r\n  for (const name of ['firstN', 'lastN', 'eMail']) {\r\n    document.cookie = `${name}=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT`;\r\n  }\r\n  localStorage.removeItem('ctProfileData');\r\n}\r\n","myaccount":"// 1. Create the base element\r\n// const baseElement = document.createElement('base');\r\n\r\n// // 2. Set the base URL and default link targeting\r\n// baseElement.href = '/';\r\n// baseElement.target = '_blank'; // Optional: opens all relative links in a new tab\r\n\r\n// // 3. Prepend it to the head so it appears first\r\n// document.head.prepend(baseElement);\r\n\r\n// let preloadMicrofeHeaderJSLink = document.createElement(\"link\");\r\n// preloadMicrofeHeaderJSLink.href = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header.js\";\r\n// preloadMicrofeHeaderJSLink.as = \"script\";\r\n// preloadMicrofeHeaderJSLink.rel = \"preload\";\r\n\r\n// let preloadMicrofeHeaderCSSLink = document.createElement(\"link\");\r\n// preloadMicrofeHeaderCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header.css\";\r\n// preloadMicrofeHeaderCSSLink.as = \"style\";\r\n// preloadMicrofeHeaderCSSLink.rel = \"preload\";\r\n\r\n// document.head.appendChild(preloadMicrofeHeaderJSLink);\r\n// document.head.appendChild(preloadMicrofeHeaderCSSLink);\r\n\r\n// let preloadMicrofeFooterJSLink = document.createElement(\"link\");\r\n// preloadMicrofeFooterJSLink.href = \"https://qa5.vitaminshoppe.com/microfe/footer/tvs-footer.js\";\r\n// preloadMicrofeFooterJSLink.as = \"script\";\r\n// preloadMicrofeFooterJSLink.rel = \"preload\";\r\n\r\n// let preloadMicrofeFooterCSSLink = document.createElement(\"link\");\r\n// preloadMicrofeFooterCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/footer/tvs-footer.css\";\r\n// preloadMicrofeFooterCSSLink.as = \"style\";\r\n// preloadMicrofeFooterCSSLink.rel = \"preload\";\r\n\r\n// document.head.appendChild(preloadMicrofeFooterJSLink);\r\n// document.head.appendChild(preloadMicrofeFooterCSSLink);\r\n\r\n// let preloadMicrofeCMSJSLink = document.createElement(\"link\");\r\n// preloadMicrofeCMSJSLink.href = \"https://qa5.vitaminshoppe.com/microfe/cmscomponent/tvs-cms-component.js\";\r\n// preloadMicrofeCMSJSLink.as = \"script\";\r\n// preloadMicrofeCMSJSLink.rel = \"preload\";\r\n\r\n// let preloadMicrofeCMSCSSLink = document.createElement(\"link\");\r\n// preloadMicrofeCMSCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/cmscomponent/tvs-cms-component.css\";\r\n// preloadMicrofeCMSCSSLink.as = \"style\";\r\n// preloadMicrofeCMSCSSLink.rel = \"preload\";\r\n\r\n// document.head.appendChild(preloadMicrofeCMSJSLink);\r\n// document.head.appendChild(preloadMicrofeCMSCSSLink);\r\n\r\n// let preloadMicrofeHeaderPrequesiteJSLink = document.createElement(\"link\");\r\n// preloadMicrofeHeaderPrequesiteJSLink.href = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header-prerequisite.js\";\r\n// preloadMicrofeHeaderPrequesiteJSLink.as = \"script\";\r\n// preloadMicrofeHeaderPrequesiteJSLink.rel = \"preload\";\r\n\r\n// document.head.appendChild(preloadMicrofeHeaderPrequesiteJSLink);\r\n\r\n// let insertMicrofeHeaderJSLink = document.createElement(\"script\");\r\n// insertMicrofeHeaderJSLink.src = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header.js\";\r\n\r\n// let insertMicrofeHeaderCSSLink = document.createElement(\"link\");\r\n// insertMicrofeHeaderCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header.css\";\r\n// insertMicrofeHeaderCSSLink.as = \"style\";\r\n// insertMicrofeHeaderCSSLink.rel = \"stylesheet\";\r\n\r\n// document.head.appendChild(insertMicrofeHeaderJSLink);\r\n// document.head.appendChild(insertMicrofeHeaderCSSLink);\r\n\r\n// let insertMicrofeHeaderPrerequisiteJSLink = document.createElement(\"script\");\r\n// insertMicrofeHeaderPrerequisiteJSLink.src = \"https://qa5.vitaminshoppe.com/microfe/header/tvs-header-prerequisite.js\";\r\n// document.head.appendChild(insertMicrofeHeaderPrerequisiteJSLink);\r\n\r\n// let insertMicrofeFooterJSLink = document.createElement(\"script\");\r\n// insertMicrofeFooterJSLink.src = \"https://qa5.vitaminshoppe.com/microfe/footer/tvs-footer.js\";\r\n\r\n// let insertMicrofeFooterCSSLink = document.createElement(\"link\");\r\n// insertMicrofeFooterCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/footer/tvs-footer.css\";\r\n// insertMicrofeFooterCSSLink.as = \"style\";\r\n// insertMicrofeFooterCSSLink.rel = \"stylesheet\";\r\n\r\n// document.head.appendChild(insertMicrofeFooterJSLink);\r\n// document.head.appendChild(insertMicrofeFooterCSSLink);\r\n\r\n// let insertMicrofeCMSJSLink = document.createElement(\"script\");\r\n// insertMicrofeCMSJSLink.src = \"https://qa5.vitaminshoppe.com/microfe/cmscomponent/tvs-cms-component.js\";\r\n\r\n// let insertMicrofeCMSCSSLink = document.createElement(\"link\");\r\n// insertMicrofeCMSCSSLink.href = \"https://qa5.vitaminshoppe.com/microfe/cmscomponent/tvs-cms-component.css\";\r\n// insertMicrofeCMSCSSLink.as = \"style\";\r\n// insertMicrofeCMSCSSLink.rel = \"stylesheet\";\r\n\r\n// document.head.appendChild(insertMicrofeCMSJSLink);\r\n// document.head.appendChild(insertMicrofeCMSCSSLink);\r\n/* =====================================================================\r\n * Strivacity My Account portal — Additional Script\r\n *\r\n * Land on the \"Security settings\" page instead of the default\r\n * \"Personal information\" page on first load after login. Subsequent\r\n * in-app navigation is unaffected (the user can move freely afterward).\r\n *\r\n * The My Account portal exposes nav items as <sty-button data-menu-item=\"<pageId>\">.\r\n * We click the Security item once the sidenav renders. The sidenav can appear a\r\n * beat after load, so a short-lived MutationObserver retries until it's there.\r\n * ===================================================================== */\r\n\r\nconsole.debug(\"Referrer\", document.referrer);\r\n(function () {\r\n  let landed = false;\r\n  let observer = null;\r\n\r\n  // The Security settings menu item. Prefer the page id; fall back to the label.\r\n  function findSecurityMenuItem() {\r\n    const byId = document.querySelector('[data-menu-item=\"security\"]');\r\n    if (byId) {\r\n      return byId;\r\n    }\r\n    return Array.from(document.querySelectorAll('[data-menu-item]')).find((el) => /security/i.test(el.textContent || ''));\r\n  }\r\n\r\n  // True if the portal is already showing the Security page (avoid a needless click).\r\n  function alreadyOnSecurity() {\r\n    const app = document.getElementById('app');\r\n    return !!app && app.classList.contains('security');\r\n  }\r\n\r\n  function landOnSecurity() {\r\n    if (landed) {\r\n      return;\r\n    }\r\n    if (alreadyOnSecurity()) {\r\n      landed = true;\r\n      stop();\r\n      return;\r\n    }\r\n    const item = findSecurityMenuItem();\r\n    console.debug(\"Item for security\", item);\r\n    if (item) {\r\n      landed = true;\r\n      // item.click();\r\n\r\n      // WC1-3546: FE | My Account Profile | Strivacity | On clicking browser back, control redirects to Strivacity Personal Information page instead of TVS My Account Profile page\r\n      //window.location.href = \"/myaccount/#/security\"\r\n      window.location.replace(\"/myaccount/#/security\");\r\n\r\n      stop();\r\n    }\r\n  }\r\n\r\n  function stop() {\r\n    if (observer) {\r\n      observer.disconnect();\r\n      observer = null;\r\n    }\r\n  }\r\n\r\n  // Watch the DOM until the sidenav (and its Security item) renders.\r\n  observer = new MutationObserver(landOnSecurity);\r\n  observer.observe(document.documentElement, { childList: true, subtree: true });\r\n  landOnSecurity();\r\n\r\n  // Safety: stop observing after a few seconds even if nothing matched.\r\n  setTimeout(stop, 8000);\r\n})();\r\n\r\nif (document.readyState === 'loading') {\r\n  document.addEventListener('DOMContentLoaded', init);\r\n} else {\r\n  init();\r\n}\r\n\r\nfunction init() {\r\n  console.debug('Initialize here');\r\n  let baseHref = document.querySelector(\"base\");\r\n  console.debug(\"Base href\", baseHref);\r\n  // baseHref.href = \"https://qa5.vitaminshoppe.com\";\r\n  document.addEventListener(\"click\", (event) => {\r\n    if (event.target.closest(\".ciam-header-content a.back-arrow\")) {\r\n      let baseTVSURL = \"https://www.vitaminshoppe.com/\";\r\n      if (document.referrer) {\r\n        let referrer = document.referrer\r\n        switch (referrer) {\r\n          case \"https://qa1.vitaminshoppe.com/\":\r\n            baseTVSURL = \"https://qa1.vitaminshoppe.com/\";\r\n            break;\r\n          case \"https://qa3.vitaminshoppe.com/\":\r\n            baseTVSURL = \"https://qa3.vitaminshoppe.com/\";\r\n            break;\r\n          case \"https://qa4.vitaminshoppe.com/\":\r\n            baseTVSURL = \"https://qa4.vitaminshoppe.com/\";\r\n            break;\r\n          case \"https://qa5.vitaminshoppe.com/\":\r\n            baseTVSURL = \"https://qa5.vitaminshoppe.com/\";\r\n            break;\r\n          case \"https://uat.vitaminshoppe.com/\":\r\n            baseTVSURL = \"https://uat.vitaminshoppe.com/\";\r\n            break;\r\n          default:\r\n            baseTVSURL = \"https://www.vitaminshoppe.com/\";\r\n            break;\r\n        }\r\n\r\n      }\r\n      window.location.href = `${baseTVSURL}s/myAccount/myAccount`;\r\n    }\r\n  });\r\n}\r\n\r\ndocument.addEventListener('form-ready', (event) => {\r\n  console.debug(\"Element to Update Confirm Password Label on SSP\", document.querySelector(\"sty-dialog[data-dialog='changePassword'] sty-input-password[data-field='newPasswordConfirmation'] label\"));\r\n  if (document.querySelector(\"sty-dialog[data-dialog='changePassword'] sty-input-password[data-field='newPasswordConfirmation'] label\")) {\r\n    document.querySelector(\"sty-dialog[data-dialog='changePassword'] sty-input-password[data-field='newPasswordConfirmation'] label\").innerText = \"Confirm New Password\";\r\n  }\r\n\r\n})"},"supportText":null,"loginUrl":null,"websiteUrl":null},"webAnalytics":{}}