@nuskin/react-mysite-elements 1.3.0 → 1.4.0-po-dashboard.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/common/icon/icons/SocialMediaIcons.styled.d.ts +5 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/shopping-dashboard/MysiteDashboardWithNavigation.d.ts +47 -0
- package/dist/common/shopping-dashboard/PoDashboardWithNavigation.d.ts +14 -0
- package/dist/common/shopping-dashboard/ProductOfferDashboard.d.ts +15 -0
- package/dist/common/shopping-dashboard/ProductOfferDashboard.styled.d.ts +20 -0
- package/dist/common/shopping-dashboard/ShoppingDashboard.d.ts +37 -0
- package/dist/common/shopping-dashboard/ShoppingDashboard.styled.d.ts +20 -0
- package/dist/common/shopping-dashboard/TranslationKeys/ProductOfferDashboardTranslationKeys.d.ts +241 -0
- package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts +630 -0
- package/dist/common/shopping-dashboard/fixtures/index.d.ts +1 -0
- package/dist/common/shopping-dashboard/fixtures/mockDashboardData.d.ts +8 -0
- package/dist/common/shopping-dashboard/fixtures/mockProductOfferData.d.ts +19 -0
- package/dist/common/shopping-dashboard/index.d.ts +44 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.styled.d.ts +62 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.d.ts +15 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.d.ts +37 -0
- package/dist/common/shopping-dashboard/shared/DashboardHeader.d.ts +13 -0
- package/dist/common/shopping-dashboard/shared/DashboardHeader.styled.d.ts +48 -0
- package/dist/common/shopping-dashboard/shared/DataTable.d.ts +18 -0
- package/dist/common/shopping-dashboard/shared/DataTable.styled.d.ts +42 -0
- package/dist/common/shopping-dashboard/shared/FilterBar.d.ts +7 -0
- package/dist/common/shopping-dashboard/shared/FilterBar.styled.d.ts +12 -0
- package/dist/common/shopping-dashboard/shared/FullViewComponents.styled.d.ts +54 -0
- package/dist/common/shopping-dashboard/shared/LoadingSkeletons.d.ts +14 -0
- package/dist/common/shopping-dashboard/shared/LoadingSkeletons.styled.d.ts +121 -0
- package/dist/common/shopping-dashboard/shared/PageHeader.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/PageHeader.styled.d.ts +56 -0
- package/dist/common/shopping-dashboard/shared/Pagination.d.ts +9 -0
- package/dist/common/shopping-dashboard/shared/Pagination.styled.d.ts +18 -0
- package/dist/common/shopping-dashboard/shared/Signups/SignupsChart.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/Signups/SignupsChart.styled.d.ts +56 -0
- package/dist/common/shopping-dashboard/shared/Signups/SignupsFullView.d.ts +15 -0
- package/dist/common/shopping-dashboard/shared/Signups/SignupsFullView.styled.d.ts +15 -0
- package/dist/common/shopping-dashboard/shared/StatsCard.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/StatsCard.styled.d.ts +38 -0
- package/dist/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.d.ts +14 -0
- package/dist/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.styled.d.ts +72 -0
- package/dist/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.styled.d.ts +84 -0
- package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.d.ts +14 -0
- package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.styled.d.ts +52 -0
- package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersPieChart.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/TopProducts/ProductsFullView.d.ts +14 -0
- package/dist/common/shopping-dashboard/shared/TopProducts/ProductsFullView.styled.d.ts +53 -0
- package/dist/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.d.ts +11 -0
- package/dist/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.styled.d.ts +74 -0
- package/dist/common/shopping-dashboard/shared/WidgetMenu.d.ts +6 -0
- package/dist/common/shopping-dashboard/shared/WidgetMenu.styled.d.ts +5 -0
- package/dist/common/shopping-dashboard/shared/types.d.ts +25 -0
- package/dist/common/shopping-dashboard/shared/useViewport.d.ts +2 -0
- package/dist/common/shopping-dashboard/specs/MysiteDashboardWithNavigation.spec.d.ts +1 -0
- package/dist/common/shopping-dashboard/specs/PoDashboardWithNavigation.spec.d.ts +1 -0
- package/dist/common/shopping-dashboard/specs/SignupsFullView.spec.d.ts +1 -0
- package/dist/common/shopping-dashboard/stories/CategoriesFullView.stories.d.ts +10 -0
- package/dist/common/shopping-dashboard/stories/ConversionRateChart.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/ConversionRateFullView.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/DashboardHeader.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/DataTable.stories.d.ts +8 -0
- package/dist/common/shopping-dashboard/stories/PageHeader.stories.d.ts +8 -0
- package/dist/common/shopping-dashboard/stories/Pagination.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/ProductOfferDashboard.stories.d.ts +13 -0
- package/dist/common/shopping-dashboard/stories/ProductsFullView.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/ShoppingDashboard.stories.d.ts +13 -0
- package/dist/common/shopping-dashboard/stories/SignupsChart.stories.d.ts +10 -0
- package/dist/common/shopping-dashboard/stories/SignupsFullView.stories.d.ts +9 -0
- package/dist/common/shopping-dashboard/stories/StatsCard.stories.d.ts +11 -0
- package/dist/common/shopping-dashboard/stories/TopCategoriesPieChart.stories.d.ts +10 -0
- package/dist/common/shopping-dashboard/stories/TopPerformingOffersFullView.stories.d.ts +10 -0
- package/dist/common/shopping-dashboard/stories/TopPerformingOffersPieChart.stories.d.ts +11 -0
- package/dist/common/shopping-dashboard/stories/TopSellingProductsList.stories.d.ts +11 -0
- package/dist/common/shopping-dashboard/utils/dataUtils.d.ts +14 -0
- package/dist/common/shopping-dashboard/utils/dateConstants.d.ts +14 -0
- package/dist/common/shopping-dashboard/utils/dateFormat.d.ts +16 -0
- package/dist/common/shopping-dashboard/utils/marketConstants.d.ts +14 -0
- package/dist/common/shopping-dashboard/utils/trendUtils.d.ts +16 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -3
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/gitlab-runner-data/builds/nextgen-development/mysite/npm/react-mysite-elements/dist/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../src/index.ts","../src/common/card/NsProductCard.tsx","../src/common/card/styles/NsProductCard.Styled.tsx","../src/common/carousel/NsProductCarousel.tsx","../src/common/carousel/NsProductCarousel.styled.ts","../src/common/carousel/ProductTabCarousel.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.styled.tsx","../src/common/carousel/ProductTabCarousel.styled.tsx","../src/common/headers/MysiteHero.tsx","../src/common/headers/MysiteHero.styled.tsx","../src/common/icon/icons/PlaceholderImage.tsx","../src/common/icon/icons/ArrowDownIcon.tsx","../src/common/utils/gtmTracking.ts"],"names":["zt","Object","create","J","defineProperty","Lt","getOwnPropertyDescriptor","Ht","getOwnPropertyNames","Dt","getPrototypeOf","$t","prototype","hasOwnProperty","le","e","t","exports","At","o","get","enumerable","be","i","n","call","D","__esModule","value","Wt","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","Ye","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","isRequired","getShim","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require_prop_types","Qe","ReactIs","throwOnDirectAccess","index_exports","__export","MysiteHero","NsCategoryNavigation","NsProductCard","NsProductCard_default","ProductCarousel","ProductCardCarousel","ProductTabCarousel","ProductTabCarousel_default","__toCommonJS","import_react","require","import_foundation_ui_components","import_foundation_theme","PriceComponent","z","styled","ProductCardContainer","isMobile","ImageContainer","bgColor","DefaultImage","ProductTitle","ProductBadgeContainer","AddToCartButton","disabled","isHovered","CartIcon","import_material","import_jsx_runtime","productTitle","imageDetails","className","button","onCardClick","productStatusBadge","directSellerBadge","mySitePriceComponent","testId","Se","useState","isButtonHovered","setIsButtonHovered","Pe","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","w","jsxs","onClick","tabIndex","children","jsx","onError","imageSrc","Te","NsImage","alt","imageAlt","areaLabel","width","title","showButton","buttonText","stopPropagation","onMouseEnter","onMouseLeave","height","viewBox","fill","xmlns","fillRule","clipRule","d","import_react_slick","import_useMediaQuery","import_Box","SlickContainer","u","W","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","Ie","NsTypography","ViewAllLink","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","q","useRef","je","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","h","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","_e","Slider","ref","variant","preventDefault","push","Oe","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","Ke","NsCategoryNavigationContainer","Je","div","TabPanel","other","L","role","hidden","id","de","propTypes","ee","itemArray","controlledValue","onChange","et","internalValue","setInternalValue","it","tt","Tabs","orientation","event","newValue","item","ot","Tab","label","categoryId","findIndex","content","ProductTabCarouselContainer","$","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","pt","S","isLoadingInitialData","setIsLoadingInitialData","setCategories","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","finally","cat","N","_","ct","NsSpinner","getContactTextStyles","hasWhiteBackground","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","color","textDecoration","getSocialTitleStyles","textTransform","paddingLeft","getSocialIconsStyles","display","flexDirection","gap","alignItems","getContactTextMobileStyles","paddingBottom","wordBreak","overflowWrap","getSocialTitleMobileStyles","marginBottom","transition","opacity","transform","MysiteHeroContainer","R","oe","bannerProps","isCircularImage","backgroundClip","background","backgroundColor","position","overflow","willChange","backfaceVisibility","top","left","right","boxShadow","paddingTop","justifyContent","fontFamily","headlineFont","padding","objectFit","objectPosition","marginLeft","marginRight","boxSizing","whiteSpace","textOverflow","paragraphFont","WebkitBoxOrient","WebkitLineClamp","MysiteHeroContainerMobile","paddingRight","maxHeight","bottom","pointerEvents","BadgeContainer","Badge","backdropFilter","borderRadius","border","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","F","Tt","sx","ArrowDownIcon","ce","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","a","G","c","renderBadges","showBadges","expirationDate","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","data","every","corner","Array","slice","onerror","isWhiteOrNearWhite","hex","replace","toLowerCase","test","fullHex","split","char","join","r","Number","parseInt","substring","g","b","threshold","createContactClickHandler","contactType","contactValue","contact_type","contact_value","click_element","onKeyDown","key","globalThis","protocol","handlers","socialIcons","I","setIsScrolled","isDescriptionExpanded","setIsDescriptionExpanded","setHasWhiteBackground","isImageCircular","setIsImageCircular","toggleDescription","debounceTimeout","lastScrollY","scrollY","currentScrollState","isTransitioning","lastUpdateTime","updateScrollState","newState","now","Date","clearTimeout","setTimeout","scrollTo","behavior","handleScroll","currentScrollY","abs","scrollingDown","scrollDownThreshold","scrollUpThreshold","initializeState","initialScrollY","shouldStartCompact","rafId","lastRafTime","throttledScrollHandler","requestAnimationFrame","addEventListener","passive","removeEventListener","cancelAnimationFrame","useMemo","icon","social_platform","type","social_url","open","NsLink","containerClass","getCharacterLimit","innerWidth","shouldShowToggle"],"mappings":"AAAA,ihkBAAa,IAAIA,EAAGC,OAAOC,MAAM,CAAC,IAAIC,EAAEF,OAAOG,cAAc,CAAC,IAAIC,EAAGJ,OAAOK,wBAAwB,CAAC,IAAIC,EAAGN,OAAOO,mBAAmB,CAAC,IAAIC,EAAGR,OAAOS,cAAc,CAACC,EAAGV,OAAOW,SAAS,CAACC,cAAc,CAAC,IAAIC,GAAG,SAACC,EAAEC,UAAI,kBAAKA,GAAGD,EAAE,AAACC,CAAAA,EAAE,CAACC,QAAQ,CAAC,CAAC,CAAA,EAAGA,OAAO,CAACD,GAAGA,EAAEC,OAAO,GAAEC,GAAG,SAACH,EAAEC,GAAK,IAAI,IAAIG,KAAKH,EAAEb,EAAEY,EAAEI,EAAE,CAACC,IAAIJ,CAAC,CAACG,EAAE,CAACE,WAAW,CAAC,CAAC,EAAE,EAAEC,GAAG,SAACP,EAAEC,EAAEG,EAAEI,OAAwD,OAAA,QAAA,YAA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AAmB,WAAa,aAElGjY,SAAA4R,CAAAA,GAEJqG,GAAAA,CAAAA,EACGtH,GAAA1Q,GAAA,EAACgP,GAAA,CAAmBnP,QAASyV,EACzBvV,SAAA,CAAA,EAAA2Q,GAAA1Q,GAAA,EAAC2P,GAAA,CACGnP,MAAO,GACPO,OAAQ,GACRtC,UAAW,qBAA4D,OAAvCwW,EAAwB,WAAa,GAAE,EAC3E,GACJ,GAER,GAER,CAAA,EAEAvE,GAAA9Q,IAAA,EAAC2M,GAAA,CACG9N,UAAWoZ,EACX,cAAY,sBACZnL,YAAaA,EACbC,gBAAiByI,EACjBtK,mBAAoBA,EAEnB/K,SAAA,CAAAyQ,GAAmBhS,EAAckO,UAAAA,WAAAA,EAAe,CAAC,EAAG,YACpDgF,GAAqBvX,EAAO8W,EAAYC,EAAwBvT,EAAUmN,GAAkB,EAGzG","sourcesContent":["\"use strict\";var zt=Object.create;var J=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty;var le=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),At=(e,t)=>{for(var o in t)J(e,o,{get:t[o],enumerable:!0})},be=(e,t,o,i)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let n of Ht(t))!$t.call(e,n)&&n!==o&&J(e,n,{get:()=>t[n],enumerable:!(i=Lt(t,n))||i.enumerable});return e};var D=(e,t,o)=>(o=e!=null?zt(Dt(e)):{},be(t||!e||!e.__esModule?J(o,\"default\",{value:e,enumerable:!0}):o,e)),Wt=e=>be(J({},\"__esModule\",{value:!0}),e);var Ye=le((wo,Ve)=>{\"use strict\";var jt=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";Ve.exports=jt});var Qe=le((Co,Ge)=>{\"use strict\";var Ot=Ye();function qe(){}function Ze(){}Ze.resetWarningCache=qe;Ge.exports=function(){function e(i,n,l,r,d,s){if(s!==Ot){var m=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw m.name=\"Invariant Violation\",m}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ze,resetWarningCache:qe};return o.PropTypes=o,o}});var Ke=le((So,Ue)=>{\"use strict\";Ue.exports=Qe()();var ko,vo});var Kt={};At(Kt,{MysiteHero:()=>ge,NsCategoryNavigation:()=>te,NsProductCard:()=>X,ProductCarousel:()=>Z,ProductTabCarousel:()=>gt});module.exports=Wt(Kt);var Se=require(\"react\"),Te=require(\"@nuskin/foundation-ui-components\");var z=require(\"@nuskin/foundation-theme\"),fe=(0,z.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,ue=(0,z.styled)(\"button\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${e=>e.isMobile?\"410px\":\"513px\"};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`,ye=(0,z.styled)(\"div\")`\n width: '240px';\n height: '240px';\n background: ${e=>e.bgColor??\"#f5f5f5\"};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`,we=(0,z.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,Ce=(0,z.styled)(\"div\")`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`,se=(0,z.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,ke=(0,z.styled)(\"button\")`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${e=>e.disabled?\"#999\":\"#fff\"};\n background-color: ${e=>e.disabled?\"#e0e0e0\":!e.isMobile&&e.isHovered?\"#888\":\"#000\"};\n border: ${e=>e.disabled?\"1px solid #ccc\":\"none\"};\n cursor: ${e=>e.disabled?\"not-allowed\":\"pointer\"};\n opacity: ${e=>e.disabled?.6:1};\n transition: ${e=>e.isMobile?\"none\":\"all 0.3s ease\"};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`,ve=(0,z.styled)(\"span\")`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${e=>e.disabled?.5:1};\n`;var Pe=require(\"@mui/material\"),w=require(\"react/jsx-runtime\"),_t=({productTitle:e,imageDetails:t,className:o,button:i,onCardClick:n,productStatusBadge:l,directSellerBadge:r,mySitePriceComponent:d,testId:s})=>{let[m,y]=(0,Se.useState)(!1),p=(0,Pe.useMediaQuery)(\"(max-width: 560px)\"),C=T=>{let B=T.target,P=t?.fallbackImage;P&&B.src!==P&&(B.src=P)};return(0,w.jsxs)(ue,{className:o,onClick:n,tabIndex:0,\"data-testid\":\"product-card\",isMobile:p,children:[(0,w.jsx)(ye,{bgColor:t?.bgColor,onError:C,children:t?.imageSrc?(0,w.jsx)(Te.NsImage,{\"data-testid\":s??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,w.jsx)(we,{alt:\"\"})}),(0,w.jsx)(Ce,{title:e,\"data-testid\":\"product-title\",children:e}),r&&(0,w.jsx)(se,{children:r}),(0,w.jsx)(se,{children:l}),(0,w.jsx)(fe,{children:d}),i?.showButton&&(0,w.jsxs)(ke,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":i.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:i?.disabled??!1,isMobile:p,isHovered:m,onClick:T=>{T.stopPropagation(),i?.disabled||i.onClick?.()},onMouseEnter:()=>{!p&&!i?.disabled&&y(!0)},onMouseLeave:()=>{p||y(!1)},children:[(0,w.jsx)(ve,{className:\"cart-icon\",disabled:i?.disabled,children:(0,w.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,w.jsx)(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\",fill:i?.disabled?\"#999\":\"#ffffff\"})})}),i.buttonText||\"ADD TO CART\"]})]})},X=_t;var q=require(\"react\"),_e=D(require(\"react-slick\")),je=D(require(\"@mui/material/useMediaQuery\"));var Oe=require(\"@nuskin/foundation-ui-components\");var u=require(\"@nuskin/foundation-theme\"),W=D(require(\"@mui/material/Box\")),Ie=require(\"@nuskin/foundation-ui-components\"),Be=(0,u.styled)(W.default)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`,Ne=(0,u.styled)(\"div\")`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`,Re=(0,u.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,Fe=(0,u.styled)(W.default)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`,Me=(0,u.styled)(W.default)`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({$isMobile:e})=>e?0:\"24px\"};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`,Ee=(0,u.styled)(W.default)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`,ze=(0,u.styled)(W.default)`\n display: flex;\n align-items: center;\n opacity: ${({$isDisabled:e})=>e?.3:1};\n pointer-events: ${({$isDisabled:e})=>e?\"none\":\"auto\"};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`,po=(0,u.styled)(\"div\")`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`,Le=(0,u.styled)(Ie.NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`,He=(0,u.styled)(\"a\")`\n color: #000000;\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid #000000;\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: pointer;\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: #666666;\n border-bottom: 1px solid #666666;\n cursor: pointer;\n }\n`,De=(0,u.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,$e=(0,u.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,Ae=(0,u.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,We=(0,u.styled)(\"div\")`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;var h=require(\"react/jsx-runtime\");function Z({entries:e,renderEntry:t,settings:o={},showControlButtons:i=!0,allEntryLabel:n=\"View All\",allEntryLink:l=\"\",categoryName:r,emptyProductMessage:d=\"No Products Available For The Selected Category\",productsCountLabel:s=\"Products\",isInitialDataLoading:m,history:y}){let p=(0,q.useRef)(null),C=(0,je.default)(\"(max-width: 560px)\"),T=(0,q.useCallback)(()=>{p.current?.slickPrev()},[]),B=(0,q.useCallback)(()=>{p.current?.slickNext()},[]),P=t??((g,E)=>(0,h.jsx)(X,{productTitle:g.productTitle,imageDetails:g.imageDetails,button:g.button,onCardClick:g.onCardClick,productStatusBadge:g.productStatusBadge,directSellerBadge:g.directSeller,mySitePriceComponent:g.mySitePriceComponent},`${g.productTitle}-${E}`)),k={dots:!0,infinite:!0,speed:500,slidesToShow:Math.min(e?.length??0,4),slidesToScroll:4,swipe:!0,draggable:!0,arrows:!0,responsive:[{breakpoint:1320,settings:{slidesToShow:Math.min(e?.length??0,3),slidesToScroll:3}},{breakpoint:900,settings:{slidesToShow:Math.min(e?.length??0,2),slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1}}],...o},j=(e?.length??0)>k.slidesToShow,M=()=>e?.length===0&&!m?(0,h.jsx)(De,{children:d}):C?(0,h.jsx)(Ne,{children:(0,h.jsx)(Re,{children:e.map((g,E)=>g&&P(g,E))})}):(0,h.jsx)(_e.default,{...k,ref:p,children:e.map((g,E)=>g&&P(g,E))});return(0,h.jsxs)(Be,{children:[i&&(0,h.jsxs)(Fe,{children:[(0,h.jsxs)($e,{children:[(0,h.jsxs)(Ae,{children:[(0,h.jsx)(Ee,{children:(0,h.jsxs)(Le,{variant:\"body-m\",children:[e?.length??0,\" \",s]})}),!C&&r&&(0,h.jsx)(We,{children:r})]}),(0,h.jsx)(Me,{$isMobile:C,children:(0,h.jsx)(He,{onClick:g=>{y&&(g.preventDefault(),y.push(l))},children:n})})]}),!C&&(0,h.jsx)(ze,{$isDisabled:!j,children:(0,h.jsx)(Oe.NsCarouselControl,{prev:T,next:B,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),M()]})}var S=require(\"react\"),pt=require(\"@mui/material\");var et=D(require(\"react\")),tt=D(require(\"@mui/material/Tabs\")),ot=D(require(\"@mui/material/Tab\")),de=D(require(\"@mui/material/Box\")),ee=D(Ke());var Je=require(\"@nuskin/foundation-theme\"),Xe=Je.styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;var it=require(\"@mui/material\"),L=require(\"react/jsx-runtime\");function at(e){let{children:t,value:o,index:i,...n}=e;return(0,L.jsx)(\"div\",{role:\"tabpanel\",hidden:o!==i,id:`vertical-tabpanel-${i}`,\"aria-labelledby\":`vertical-tab-${i}`,...n,children:o===i&&(0,L.jsx)(de.default,{className:\"tabPanel\",children:t})})}at.propTypes={children:ee.default.node,index:ee.default.number.isRequired,value:ee.default.number.isRequired};var te=({itemArray:e,value:t,onChange:o})=>{let[i,n]=et.useState(0),l=(0,it.useMediaQuery)(\"(max-width:768px)\"),r=t??i;return(0,L.jsx)(Xe,{children:(0,L.jsxs)(de.default,{className:\"tabContainer\",children:[(0,L.jsx)(tt.default,{orientation:l?\"horizontal\":\"vertical\",variant:\"scrollable\",value:r,onChange:(s,m)=>{o?o(s,m):n(m)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(s=>(0,L.jsx)(ot.default,{label:s.label,className:\"tabStyle\"},s.categoryId))}),e.map(s=>(0,L.jsx)(at,{value:r,index:e.findIndex(m=>m.categoryId===s.categoryId),children:s.content},s.categoryId))]})})};var ct=require(\"@nuskin/foundation-ui-components\");var $=require(\"@nuskin/foundation-theme\"),nt=(0,$.styled)(\"div\")`\n display: flex;\n flex-direction: ${({isMobile:e})=>e?\"column\":\"row\"};\n align-items: ${({isMobile:e})=>e?\"stretch\":\"flex-start\"};\n width: 100%;\n max-width: 1920px;\n min-height: ${({isMobile:e})=>e?\"auto\":\"800px\"};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({isMobile:e})=>e?\"10px 16px 0px 16px\":\"50px 60px 0px 60px\"};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`,rt=(0,$.styled)(\"div\")`\n min-width: ${({isMobile:e})=>e?\"100%\":\"auto\"};\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`,lt=(0,$.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`,Ro=(0,$.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`,st=(0,$.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`,dt=(0,$.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var N=require(\"react/jsx-runtime\"),Vt=({allEntryLabel:e,allEntryLink:t,renderEntry:o,settings:i,showControlButtons:n=!0,fetchCategories:l,fetchProducts:r,showCustomCategory:d=!1,emptyProductTabs:s=\"No tabs available\",emptyProductMessage:m,productsCountLabel:y,getCategoryId:p,history:C})=>{let T=(0,pt.useMediaQuery)(\"(max-width:768px)\"),[B,P]=(0,S.useState)(!0),[k,j]=(0,S.useState)([]),[M,g]=(0,S.useState)(0),[E,Q]=(0,S.useState)([]),[A,O]=(0,S.useState)(!1),[ne,U]=(0,S.useState)(!0),b=(0,S.useCallback)(()=>{let x=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');U(x.length===0)},[]);(0,S.useEffect)(()=>{A&&b()},[A,b]),(0,S.useEffect)(()=>{l().then(j)},[l]),(0,S.useEffect)(()=>{if(k.length>0){let x=k[M]?.categoryId;p&&p(x),O(!0),r(x).then(Q).finally(()=>{O(!1),P(!1)})}},[k,M,r]);let v=k.map(x=>({label:x.label,content:\"\",categoryId:x.categoryId}));return(0,N.jsxs)(nt,{isMobile:T,children:[d&&(v.length>0?(0,N.jsx)(rt,{isMobile:T,children:(0,N.jsx)(te,{itemArray:v,value:M,onChange:(x,H)=>g(H)})}):(0,N.jsx)(st,{children:s})),(0,N.jsx)(lt,{isMobile:T,children:A?(0,N.jsx)(dt,{children:ne&&(0,N.jsx)(ct.NsSpinner,{})}):(0,N.jsx)(Z,{isInitialDataLoading:B,entries:E,allEntryLabel:e,allEntryLink:t,renderEntry:o?x=>o({...x,productStatusBadge:x.productStatusBadge}):void 0,settings:i,showControlButtons:n,categoryName:k[M]?.label,emptyProductMessage:m,productsCountLabel:y,history:C})})]})},gt=Vt;var I=require(\"react\"),c=require(\"@mui/material\"),G=require(\"@nuskin/foundation-ui-components\");var R=require(\"@nuskin/foundation-theme\"),_=require(\"@mui/material\"),oe=require(\"react/jsx-runtime\"),pe=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),xt=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),ht=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),mt=e=>({...pe(e),paddingBottom:\"11px\",wordBreak:\"break-all\",overflowWrap:\"break-word\",paddingLeft:\"5px\",\"& a\":{color:\"inherit\",textDecoration:\"none\"},\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"15px\",paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"14px\",paddingBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"12px\",paddingBottom:\"4px\"}}),Yt=e=>({...xt(e),marginBottom:\"11px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"14px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"12px\",marginBottom:\"5px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"11px\",marginBottom:\"4px\"}}),bt=(0,R.styled)(e=>(0,oe.jsx)(_.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",height:\"auto\",flexDirection:\"row\",alignItems:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content\":{paddingTop:\"0\",justifyContent:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title\":{fontSize:\"26px\",lineHeight:\"34px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"90px\",height:\"90px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{\"& > div\":{width:\"90px\",height:\"90px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".content\":{width:\"70%\",height:\"100%\",marginLeft:\"2%\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"252px\",height:\"252px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"3px\":\"0px\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}},\".body-title\":{fontSize:\"32px\",lineHeight:\"38px\",marginBottom:\"8px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-text\":{fontSize:\"16px\",marginBottom:\"12px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"22px\",color:o?\"#000000\":\"#FFFFFF\",fontFamily:e?.paragraphFont??\"inherit\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",overflow:\"hidden\",WebkitLineClamp:3,textOverflow:\"ellipsis\",paddingLeft:\"5px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".social-media\":{display:\"flex\",flexDirection:\"column\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".email-text\":pe(o),\".phone-text\":pe(o),\".social-title-text\":{...xt(o),marginBottom:\"8px\"},\".social-icons\":{...ht(),paddingBottom:\"8px\"}})),ft=(0,R.styled)(e=>(0,oe.jsx)(_.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:o})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",flexDirection:\"column\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content-mobile\":{paddingTop:\"5px\",width:\"60%\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title-mobile\":{fontSize:\"18px\",lineHeight:\"28px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image-mobile\":{width:\"75px\",height:\"75px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image-mobile\":{\"& > div\":{width:\"75px !important\",height:\"75px !important\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".image-content-mobile\":{display:\"flex\",flexDirection:\"row\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"},\".content-mobile\":{width:\"55%\",height:\"100%\",paddingTop:\"10px\",paddingRight:\"10px\",marginLeft:\"8px\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{paddingTop:\"8px\",width:\"100%\"},\"@media (max-width: 400px)\":{paddingTop:\"6px\",width:\"100%\",height:\"100%\"},\"@media (max-width: 375px)\":{paddingTop:\"4px\",width:\"100%\",height:\"100%\"}},\".bg-image-mobile\":{width:\"144px\",height:\"144px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",objectFit:\"cover\",objectPosition:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"2px\":\"0px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"112px\",height:\"112px\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}},\".placeholder-image-mobile\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",width:\"144px\",height:\"144px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"110px !important\",height:\"110px !important\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}}},\".body-title-mobile\":{fontSize:\"22px\",lineHeight:\"28px\",marginBottom:\"13px\",fontWeight:\"400\",color:o?\"#000000\":\"#FFFFFF\",fontStyle:\"normal\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{fontSize:\"16px\",lineHeight:\"24px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"16px\",lineHeight:\"22px\",marginBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"14px\",lineHeight:\"20px\",marginBottom:\"4px\"}},\".body-text-mobile\":{fontSize:\"14px\",padding:\"20px 25px 20px 25px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",backgroundColor:\"#E0E0E0\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)\",opacity:1,transform:\"translateY(0)\"},\".expandable-description-mobile\":{backgroundColor:\"#E0E0E0\",position:\"relative\"},\".description-content-mobile\":{fontSize:\"14px\",padding:\"10px 15px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"max-height 0.3s ease-in-out, opacity 0.3s ease-in-out\",overflow:\"hidden\",position:\"relative\",\"&.collapsed\":{maxHeight:\"50px\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",\"&::after\":{content:'\"\"',position:\"absolute\",bottom:0,left:0,right:0,height:\"20px\",background:\"linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)\",pointerEvents:\"none\"}},\"&.expanded\":{maxHeight:\"none\",whiteSpace:\"normal\",display:\"block\",\"&::after\":{display:\"none\"}}},\".email-text-mobile\":mt(o),\".phone-text-mobile\":mt(o),\".social-title-text-mobile\":Yt(o),\".social-icons-mobile\":{...ht(),paddingBottom:\"10px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"& img\":{width:\"24px\",height:\"24px\",\"@media (max-width: 400px)\":{width:\"20px\",height:\"20px\"},\"@media (max-width: 375px)\":{width:\"18px\",height:\"18px\"}},\"@media (max-width: 420px)\":{paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{paddingBottom:\"4px\"},\"@media (max-width: 375px)\":{paddingBottom:\"3px\"}}})),ut=(0,R.styled)(_.Box)({display:\"flex\",gap:\"12px\",marginBottom:\"16px\",paddingLeft:\"5px\",\"&.mobile-badges\":{flexDirection:\"column\",gap:\"8px\",marginBottom:\"12px\"},\"&.tablet-badges\":{flexDirection:\"row\",gap:\"12px\",marginBottom:\"8px\"}}),yt=(0,R.styled)(e=>(0,oe.jsx)(_.Box,{...e}))(({hasWhiteBackground:e})=>({backgroundColor:\"rgba(255, 255, 255, 0.2)\",backdropFilter:\"blur(10px)\",borderRadius:\"20px\",padding:\"8px 16px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",border:\"1px solid rgba(255, 255, 255, 0.3)\",transition:\"all 0.3s ease\",\"&.mobile-badge\":{padding:\"6px 12px\",borderRadius:\"16px\",fontSize:\"12px\"},\"&.tablet-badge\":{padding:\"8px 16px\",borderRadius:\"20px\",fontSize:\"14px\"},\"&:hover\":{backgroundColor:\"rgba(255, 255, 255, 0.3)\",transform:\"translateY(-1px)\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.1)\"},\".badge-text\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"400\",opacity:.9},\".badge-value\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"600\"}})),wt=(0,R.styled)(\"button\")({backgroundColor:\"#E0E0E0\",border:\"1px solid #252525\",borderRadius:\"10px\",cursor:\"pointer\",width:\"40px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"10px auto 5px auto\",transition:\"all 0.2s ease\",\"& .arrow-icon-mobile\":{transition:\"transform 0.3s ease\",\"&.expanded\":{transform:\"rotate(180deg)\"}}}),Ct=(0,R.styled)(_.Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`,kt=(0,R.styled)(\"span\")`\n line-height: 0.5;\n`,vt=(0,R.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),St=(0,R.styled)(\"span\")({});var Tt=require(\"@mui/material\"),F=require(\"react/jsx-runtime\"),Pt=({width:e,height:t,backgroundColor:o})=>(0,F.jsx)(Tt.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:o},\"data-testid\":\"placeholder-image\",children:(0,F.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,F.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,F.jsx)(\"path\",{id:\"Vector\",d:\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\",fill:\"#252525\"}),(0,F.jsx)(\"path\",{id:\"Vector_2\",d:\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\",fill:\"#252525\"}),(0,F.jsx)(\"path\",{id:\"Vector_3\",d:\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\",fill:\"#252525\"}),(0,F.jsx)(\"path\",{id:\"Vector_4\",d:\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\",fill:\"#252525\"}),(0,F.jsx)(\"path\",{id:\"Vector_5\",d:\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\",fill:\"#252525\"})]})})});var ce=require(\"react/jsx-runtime\"),It=({width:e=16,height:t=16,className:o=\"\"})=>(0,ce.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:o,\"data-testid\":\"arrow-down-icon\",children:(0,ce.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function ie(e){if(typeof window>\"u\")return;let t=window.location.href,o={...e},i=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";o.event=i+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(o)}catch(n){console.error(\"Failed to track GTM event:\",n)}}var a=require(\"react/jsx-runtime\"),Bt=(e,t,o)=>{let i=o.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,a.jsx)(kt,{tabIndex:0,children:(0,a.jsx)(G.NsImage,{className:o,src:e.imageSrc,alt:e.imageAlt})}):(0,a.jsx)(c.Box,{className:i,children:(0,a.jsx)(Pt,{width:o.includes(\"mobile\")?\"144px\":\"246px\",height:o.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},Nt=(e,t,o,i)=>!e||!t?null:(0,a.jsx)(ut,{className:o?\"mobile-badges\":\"tablet-badges\",children:t&&(0,a.jsx)(yt,{className:o?\"mobile-badge\":\"tablet-badge\",hasWhiteBackground:i,tabIndex:0,children:(0,a.jsx)(St,{className:\"badge-value\",children:t})})}),qt=(e,t,o,i,n)=>{let{shopTitle:l,socialTitleText:r,email:d,showBadges:s,expirationDate:m,phone:y}=e;return(0,a.jsxs)(c.Box,{className:\"content-mobile\",children:[(0,a.jsx)(c.Typography,{tabIndex:0,className:\"body-title-mobile\",children:l}),!t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Typography,{tabIndex:0,className:\"social-title-text-mobile\",children:r}),ae(\"email\",d,\"email-text-mobile\"),ae(\"phone\",y,\"phone-text-mobile\"),(0,a.jsx)(c.Box,{className:\"social-icons-mobile\",children:o}),Nt(s,m??\"\",i,n)]})]})},Zt=(e,t,o,i,n)=>{let{shopTitle:l,shopDescription:r,socialTitleText:d,email:s,phone:m,showBadges:y,expirationDate:p}=e;return(0,a.jsxs)(c.Box,{className:\"content\",children:[(0,a.jsx)(c.Typography,{tabIndex:0,className:\"body-title\",children:l}),!t&&(0,a.jsxs)(a.Fragment,{children:[r?.length>480?(0,a.jsx)(c.Tooltip,{title:r,arrow:!0,children:(0,a.jsx)(c.Typography,{tabIndex:0,className:\"body-text\",children:r})}):(0,a.jsx)(c.Typography,{tabIndex:0,className:\"body-text\",children:r}),(0,a.jsxs)(c.Box,{className:\"social-media\",children:[(0,a.jsx)(c.Typography,{tabIndex:0,className:\"social-title-text\",children:d}),(0,a.jsxs)(c.Box,{className:\"social-icons\",children:[o,ae(\"email\",s,\"email-text\"),ae(\"phone\",m,\"phone-text\")]})]}),Nt(y,p??\"\",i,n)]})]})},Gt=e=>new Promise((t,o)=>{let i=new Image;i.crossOrigin=\"anonymous\",i.src=e,i.onload=()=>{let n=document.createElement(\"canvas\"),l=n.getContext(\"2d\");if(!l)return o(new Error(\"Canvas not supported\"));n.width=i.width,n.height=i.height,l.drawImage(i,0,0);let d=[l.getImageData(0,0,1,1).data,l.getImageData(i.width-1,0,1,1).data,l.getImageData(0,i.height-1,1,1).data,l.getImageData(i.width-1,i.height-1,1,1).data].every(s=>Array.prototype.slice.call(s)[3]<10);t(d)},i.onerror=()=>o(new Error(\"Failed to load image\"))}),Qt=e=>{if(!e)return!1;let t=e.replace(\"#\",\"\").toLowerCase();if(!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(t))return!1;let o=t;(t.length===3||t.length===4)&&(o=t.split(\"\").map(d=>d+d).join(\"\"));let i=Number.parseInt(o.substring(0,2),16),n=Number.parseInt(o.substring(2,4),16),l=Number.parseInt(o.substring(4,6),16),r=220;return i>=r&&n>=r&&l>=r},Ut=(e,t)=>({onClick:()=>{ie({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:o=>{(o.key===\"Enter\"||o.key===\" \")&&(o.preventDefault(),ie({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),ae=(e,t,o)=>{let i=e===\"email\"?\"mailto:\":\"tel:\",n=Ut(e,t);return(0,a.jsx)(c.Typography,{className:o,children:(0,a.jsx)(vt,{href:`${i}${t}`,...n,children:t})})};function ge({className:e,shopTitle:t,shopDescription:o,socialTitleText:i,imageDetails:n,email:l,phone:r,bannerProps:d,socialIcons:s,expirationDate:m,showBadges:y=!1}){let p=(0,c.useMediaQuery)(\"(max-width: 560px)\"),[C,T]=(0,I.useState)(!1),[B,P]=(0,I.useState)(!1),[k,j]=(0,I.useState)(!1),[M,g]=(0,I.useState)(!1),E=()=>{P(!B)};(0,I.useEffect)(()=>{(async()=>{if(n?.imageSrc){let v=await Gt(n.imageSrc);g(v)}else g(!1)})()},[n?.imageSrc]),(0,I.useEffect)(()=>{j(Qt(d?.backgroundColor))},[d?.backgroundColor]),(0,I.useEffect)(()=>{let b,v=window.scrollY,x=!1,H=!1,re=0,me=f=>{let K=Date.now();if(x!==f&&!H){if(K-re<100)return;H=!0,x=f,re=K,f&&P(!1),clearTimeout(b),T(f),b=setTimeout(()=>{H=!1,f&&window.scrollY<15&&window.scrollTo({top:p?20:30,behavior:\"smooth\"})},300)}},Rt=()=>{let f=window.scrollY;if(H){v=f;return}if(Math.abs(f-v)<.5)return;let Y=f>v,Mt=p?15:25,Et=p?8:12;Y&&f>Mt&&!x?me(!0):!Y&&f<Et&&x&&me(!1),v=f},Ft=()=>{let f=window.scrollY,Y=f>(p?5:10);x=Y,T(Y),v=f,re=Date.now()},V=null,xe=0,he=()=>{V||Date.now()-xe<16||(V=requestAnimationFrame(()=>{Rt(),xe=Date.now(),V=null}))};return Ft(),window.addEventListener(\"scroll\",he,{passive:!0}),()=>{window.removeEventListener(\"scroll\",he),V&&cancelAnimationFrame(V),clearTimeout(b)}},[p]);let Q=(0,I.useMemo)(()=>s?.map((b,v)=>(0,a.jsx)(Ct,{onClick:H=>{H.preventDefault(),ie({event:\"social_click\",social_platform:b.type,social_url:b.url,click_element:\"social_icon\"}),window.open(b.url,\"_blank\")},children:(0,a.jsx)(G.NsLink,{href:b.url,target:\"_blank\",children:(0,a.jsx)(G.NsImage,{src:`https://www.google.com/s2/favicons?domain=${b?.url}&sz=24`,alt:`${b.type} icon`,width:\"24\",height:\"24\"},b?.type+v)})},b?.type+v)),[s]),A=`${e} ${C?\"scrolled\":\"\"}`,O={shopTitle:t,shopDescription:o,socialTitleText:i,email:l,phone:r,showBadges:y,expirationDate:m},ne=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,U=p&&o&&o.length>ne();return p?(0,a.jsxs)(ft,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:d,isCircularImage:M,hasWhiteBackground:k,children:[(0,a.jsxs)(c.Box,{className:\"image-content-mobile\",children:[Bt(n,d??{},\"bg-image-mobile\"),qt(O,C,Q,p,k)]}),!C&&(0,a.jsxs)(c.Box,{className:\"expandable-description-mobile\",children:[(0,a.jsx)(c.Typography,{className:`description-content-mobile ${B||!U?\"expanded\":\"collapsed\"}`,children:o}),U&&(0,a.jsx)(wt,{onClick:E,children:(0,a.jsx)(It,{width:16,height:16,className:`arrow-icon-mobile ${B?\"expanded\":\"\"}`})})]})]}):(0,a.jsxs)(bt,{className:A,\"data-testid\":\"my-site-shop-header\",bannerProps:d,isCircularImage:M,hasWhiteBackground:k,children:[Bt(n,d??{},\"bg-image\"),Zt(O,C,Q,p,k)]})}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","export * from './common';\n","import React, { ReactElement, useState } from 'react';\nimport { NsImage } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport {\n PriceComponent,\n ProductCardContainer,\n ImageContainer,\n DefaultImage,\n ProductTitle,\n ProductBadgeContainer,\n AddToCartButton,\n CartIcon,\n} from './styles/NsProductCard.Styled';\nimport { useMediaQuery } from '@mui/material';\nimport { NsCardButton } from './types';\n\ntype NsProductCardProps = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly className?: string;\n readonly button?: NsCardButton & { disabled?: boolean };\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSellerBadge?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n readonly testId?: string;\n};\n\nconst NsProductCard = ({\n productTitle,\n imageDetails,\n className,\n button,\n onCardClick,\n productStatusBadge,\n directSellerBadge,\n mySitePriceComponent,\n testId,\n}: NsProductCardProps): ReactElement => {\n const [isButtonHovered, setIsButtonHovered] = useState(false);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const handleImageError = (e: React.SyntheticEvent<HTMLImageElement, Event>) => {\n const target = e.target as HTMLImageElement;\n const noImageFallback = imageDetails?.fallbackImage;\n if (noImageFallback && target.src !== noImageFallback) {\n target.src = noImageFallback;\n }\n };\n\n return (\n <ProductCardContainer\n className={className}\n onClick={onCardClick}\n tabIndex={0}\n data-testid=\"product-card\"\n isMobile={isMobile}\n >\n <ImageContainer bgColor={imageDetails?.bgColor} onError={handleImageError}>\n {imageDetails?.imageSrc ? (\n <NsImage\n data-testid={testId ?? 'test-product-image'}\n className={imageDetails.className ?? ''}\n src={imageDetails.imageSrc}\n alt={imageDetails.imageAlt}\n aria-label={imageDetails.areaLabel ?? imageDetails.imageAlt}\n width={'100%'}\n />\n ) : (\n <DefaultImage alt=\"\" />\n )}\n </ImageContainer>\n <ProductTitle title={productTitle} data-testid=\"product-title\">\n {productTitle}\n </ProductTitle>\n {directSellerBadge && <ProductBadgeContainer>{directSellerBadge}</ProductBadgeContainer>}\n <ProductBadgeContainer>{productStatusBadge}</ProductBadgeContainer>\n <PriceComponent>{mySitePriceComponent}</PriceComponent>\n {button?.showButton && (\n <AddToCartButton\n tabIndex={0}\n aria-roledescription=\":\"\n aria-label={button.buttonText || 'ADD TO CART'}\n data-testid=\"add-to-cart-button\"\n disabled={button?.disabled ?? false}\n isMobile={isMobile}\n isHovered={isButtonHovered}\n onClick={(e) => {\n e.stopPropagation();\n if (!button?.disabled) {\n button.onClick?.();\n }\n }}\n onMouseEnter={() => {\n if (!isMobile && !button?.disabled) {\n setIsButtonHovered(true);\n }\n }}\n onMouseLeave={() => {\n if (!isMobile) {\n setIsButtonHovered(false);\n }\n }}\n >\n <CartIcon className=\"cart-icon\" disabled={button?.disabled}>\n <svg width=\"24\" height=\"22\" viewBox=\"0 0 24 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\"\n fill={button?.disabled ? '#999' : '#ffffff'}\n />\n </svg>\n </CartIcon>\n {button.buttonText || 'ADD TO CART'}\n </AddToCartButton>\n )}\n </ProductCardContainer>\n );\n};\n\nexport default NsProductCard;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PriceComponent = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`;\n\nexport const ProductCardContainer = styled('button')<{ isMobile: boolean }>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${(props) => (props.isMobile ? '410px' : '513px')};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`;\n\nexport const ImageContainer = styled('div')<{\n bgColor?: string;\n}>`\n width: '240px';\n height: '240px';\n background: ${(props) => props.bgColor ?? '#f5f5f5'};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`;\n\nexport const DefaultImage = styled('img')`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`;\n\nexport const ProductTitle = styled('div')`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`;\n\nexport const ProductBadgeContainer = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`;\n\nexport const AddToCartButton = styled('button')<{\n disabled?: boolean;\n isMobile: boolean;\n isHovered: boolean;\n}>`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${(props) => (props.disabled ? '#999' : '#fff')};\n background-color: ${(props) => {\n if (props.disabled) return '#e0e0e0';\n if (!props.isMobile && props.isHovered) return '#888';\n return '#000';\n }};\n border: ${(props) => (props.disabled ? '1px solid #ccc' : 'none')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${(props) => (props.disabled ? 0.6 : 1)};\n transition: ${(props) => (props.isMobile ? 'none' : 'all 0.3s ease')};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`;\n\nexport const CartIcon = styled('span')<{ disabled?: boolean }>`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n`;\n","import React, { ReactElement, useCallback, ReactNode, useRef } from 'react';\nimport Slider from 'react-slick';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport 'slick-carousel/slick/slick.css';\nimport { NsCardButton, NsCarouselControl } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport NsProductCard from '../card/NsProductCard';\nimport {\n SlickContainer,\n ControlsContainer,\n ControlsHeaderRow,\n ScrollableContainer,\n CardList,\n ViewAllWrapper,\n ProductCountWrapper,\n ArrowsWrapper,\n CustomTypography,\n ViewAllLink,\n ProductInfoWrapper,\n CategoryNameWrapper,\n EmptyProductCategories,\n} from './NsProductCarousel.styled';\n\nexport type ProductCardEntry = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly button?: NsCardButton;\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSeller?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n};\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductCardCarouselProps<T = ProductCardEntry> {\n readonly entries: T[];\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly renderEntry?: (entry: T, index: number) => ReactNode;\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly categoryName?: string;\n readonly emptyProductMessage?: string;\n readonly productsCountLabel?: string;\n readonly isInitialDataLoading?: boolean;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nexport default function ProductCardCarousel({\n entries,\n renderEntry,\n settings = {},\n showControlButtons = true,\n allEntryLabel = 'View All',\n allEntryLink = '',\n categoryName,\n emptyProductMessage = 'No Products Available For The Selected Category',\n productsCountLabel = 'Products',\n isInitialDataLoading,\n history,\n}: ProductCardCarouselProps): ReactElement {\n const sliderRef = useRef<Slider>(null);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const prev = useCallback(() => {\n sliderRef.current?.slickPrev();\n }, []);\n\n const next = useCallback(() => {\n sliderRef.current?.slickNext();\n }, []);\n\n const renderProductEntry =\n renderEntry ??\n ((entry: ProductCardEntry, index: number) => (\n <NsProductCard\n key={`${entry.productTitle}-${index}`}\n productTitle={entry.productTitle}\n imageDetails={entry.imageDetails}\n button={entry.button}\n onCardClick={entry.onCardClick}\n productStatusBadge={entry.productStatusBadge}\n directSellerBadge={entry.directSeller}\n mySitePriceComponent={entry.mySitePriceComponent}\n />\n ));\n\n const sliderSettings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: Math.min(entries?.length ?? 0, 4),\n slidesToScroll: 4,\n swipe: true,\n draggable: true,\n arrows: true,\n responsive: [\n {\n breakpoint: 1320,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 3),\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 900,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 2),\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n ...settings,\n };\n\n const shouldShowNavigation = (entries?.length ?? 0) > sliderSettings.slidesToShow;\n\n const renderCarouselContent = () => {\n if (entries?.length === 0 && !isInitialDataLoading) {\n return <EmptyProductCategories>{emptyProductMessage}</EmptyProductCategories>;\n }\n\n if (isMobile) {\n return (\n <ScrollableContainer>\n <CardList>{entries.map((entry, index) => entry && renderProductEntry(entry, index))}</CardList>\n </ScrollableContainer>\n );\n }\n\n return (\n <Slider {...sliderSettings} ref={sliderRef}>\n {entries.map((entry, index) => entry && renderProductEntry(entry, index))}\n </Slider>\n );\n };\n\n return (\n <SlickContainer>\n {showControlButtons && (\n <ControlsContainer>\n <ControlsHeaderRow>\n <ProductInfoWrapper>\n <ProductCountWrapper>\n <CustomTypography variant=\"body-m\">\n {entries?.length ?? 0} {productsCountLabel}\n </CustomTypography>\n </ProductCountWrapper>\n {!isMobile && categoryName && <CategoryNameWrapper>{categoryName}</CategoryNameWrapper>}\n </ProductInfoWrapper>\n <ViewAllWrapper $isMobile={isMobile}>\n <ViewAllLink\n onClick={(e) => {\n if (history) {\n e.preventDefault();\n history.push(allEntryLink);\n }\n }}\n >\n {allEntryLabel}\n </ViewAllLink>\n </ViewAllWrapper>\n </ControlsHeaderRow>\n {!isMobile && (\n <ArrowsWrapper $isDisabled={!shouldShowNavigation}>\n <NsCarouselControl prev={prev} next={next} viewAllLabel={''} viewAllUrl={''} />\n </ArrowsWrapper>\n )}\n </ControlsContainer>\n )}\n {renderCarouselContent()}\n </SlickContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport Box, { BoxProps } from '@mui/material/Box';\nimport { NsTypography } from '@nuskin/foundation-ui-components';\n\nexport const SlickContainer: React.ComponentType<BoxProps> = styled(Box)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`;\nexport const ScrollableContainer = styled('div')`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`;\n\nexport const CardList = styled('div')`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`;\n\nexport const ControlsContainer: React.ComponentType<BoxProps> = styled(Box)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const ViewAllWrapper: React.ComponentType<BoxProps & { $isMobile?: boolean }> = styled(Box)<{\n $isMobile?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({ $isMobile }) => ($isMobile ? 0 : '24px')};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`;\n\nexport const ProductCountWrapper: React.ComponentType<BoxProps> = styled(Box)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`;\n\nexport const ArrowsWrapper: React.ComponentType<BoxProps & { $isDisabled?: boolean }> = styled(Box)<{\n $isDisabled?: boolean;\n}>`\n display: flex;\n align-items: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.3 : 1)};\n pointer-events: ${({ $isDisabled }) => ($isDisabled ? 'none' : 'auto')};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`;\nexport const Scrollablewrapper = styled('div')`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`;\nexport const CustomTypography = styled(NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`;\n\nexport const ViewAllLink = styled('a')`\n color: #000000;\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid #000000;\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: pointer;\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: #666666;\n border-bottom: 1px solid #666666;\n cursor: pointer;\n }\n`;\n\nexport const EmptyProductCategories = styled('div')`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`;\nexport const ControlsHeaderRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const ProductInfoWrapper = styled('div')`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`;\n\nexport const CategoryNameWrapper = styled('div')`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { useMediaQuery } from '@mui/material';\n\nimport { NsCategoryNavigation } from '../Nav-Category-Navigation';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport ProductCardCarousel, { ProductCardEntry } from './NsProductCarousel';\nimport {\n ProductTabCarouselContainer,\n TabsContainer,\n ContentContainer,\n NoTabsContainer,\n SpinnerContainer,\n} from './ProductTabCarousel.styled';\n\ninterface Category {\n label: string;\n categoryId: string;\n}\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductTabCarouselProps {\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly renderEntry?: (entry: ProductCardEntry) => React.ReactNode;\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly fetchCategories: () => Promise<Category[]>;\n readonly fetchProducts: (categoryId: string) => Promise<ProductCardEntry[]>;\n readonly emptyProductTabs?: string;\n readonly emptyProductMessage?: string;\n readonly showCustomCategory?: boolean;\n readonly productsCountLabel?: string;\n readonly getCategoryId: (categoryId: string) => Promise<Category[]>;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nconst ProductTabCarousel: React.FC<ProductTabCarouselProps> = ({\n allEntryLabel,\n allEntryLink,\n renderEntry,\n settings,\n showControlButtons = true,\n fetchCategories,\n fetchProducts,\n showCustomCategory = false,\n emptyProductTabs = 'No tabs available',\n emptyProductMessage,\n productsCountLabel,\n getCategoryId,\n history,\n}) => {\n const isMobile = useMediaQuery('(max-width:768px)');\n const [isLoadingInitialData, setIsLoadingInitialData] = useState(true);\n const [categories, setCategories] = useState<Category[]>([]);\n const [selectedTab, setSelectedTab] = useState(0);\n const [products, setProducts] = useState<ProductCardEntry[]>([]);\n const [loading, setLoading] = useState(false);\n const [shouldShowSpinner, setShouldShowSpinner] = useState(true);\n\n const checkForExistingSpinners = useCallback(() => {\n const existingSpinners = document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');\n setShouldShowSpinner(existingSpinners.length === 0);\n }, []);\n\n useEffect(() => {\n if (loading) {\n checkForExistingSpinners();\n }\n }, [loading, checkForExistingSpinners]);\n\n useEffect(() => {\n fetchCategories().then(setCategories);\n }, [fetchCategories]);\n\n useEffect(() => {\n if (categories.length > 0) {\n const categoryId = categories[selectedTab]?.categoryId;\n if (getCategoryId) {\n getCategoryId(categoryId);\n }\n\n setLoading(true);\n fetchProducts(categoryId)\n .then(setProducts)\n .finally(() => {\n setLoading(false);\n setIsLoadingInitialData(false);\n });\n }\n }, [categories, selectedTab, fetchProducts]);\n\n const itemArray = categories.map((cat) => ({\n label: cat.label,\n content: '',\n categoryId: cat.categoryId,\n }));\n\n return (\n <ProductTabCarouselContainer isMobile={isMobile}>\n {showCustomCategory &&\n (itemArray.length > 0 ? (\n <TabsContainer isMobile={isMobile}>\n <NsCategoryNavigation\n itemArray={itemArray}\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n />\n </TabsContainer>\n ) : (\n <NoTabsContainer>{emptyProductTabs}</NoTabsContainer>\n ))}\n <ContentContainer isMobile={isMobile}>\n {loading ? (\n <SpinnerContainer>{shouldShowSpinner && <NsSpinner />}</SpinnerContainer>\n ) : (\n <ProductCardCarousel\n isInitialDataLoading={isLoadingInitialData}\n entries={products}\n allEntryLabel={allEntryLabel}\n allEntryLink={allEntryLink}\n renderEntry={\n renderEntry\n ? (entry) => renderEntry({ ...entry, productStatusBadge: entry.productStatusBadge })\n : undefined\n }\n settings={settings}\n showControlButtons={showControlButtons}\n categoryName={categories[selectedTab]?.label}\n emptyProductMessage={emptyProductMessage}\n productsCountLabel={productsCountLabel}\n history={history}\n />\n )}\n </ContentContainer>\n </ProductTabCarouselContainer>\n );\n};\n\nexport default ProductTabCarousel;\n","import * as React from 'react';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport PropTypes from 'prop-types';\nimport { NsCategoryNavigationContainer } from './NsCategoryNavigation.styled';\nimport { useMediaQuery } from '@mui/material';\n\nfunction TabPanel(\n props: Readonly<{\n children?: React.ReactNode;\n value: number;\n index: number;\n [key: string]: unknown;\n }>,\n) {\n const { children, value, index, ...other } = props;\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n {...other}\n >\n {value === index && <Box className=\"tabPanel\">{children}</Box>}\n </div>\n );\n}\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.number.isRequired,\n value: PropTypes.number.isRequired,\n};\n\ninterface NsCategoryNavigationProps {\n itemArray: { label: string; content: React.ReactNode; categoryId: string }[];\n value?: number;\n onChange?: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nexport const NsCategoryNavigation: React.FC<Readonly<NsCategoryNavigationProps>> = ({\n itemArray,\n value: controlledValue,\n onChange,\n}) => {\n const [internalValue, setInternalValue] = React.useState(0);\n const isMobile = useMediaQuery('(max-width:768px)');\n const value = controlledValue ?? internalValue;\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n if (onChange) {\n onChange(event, newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n return (\n <NsCategoryNavigationContainer>\n <Box className=\"tabContainer\">\n <Tabs\n orientation={isMobile ? 'horizontal' : 'vertical'}\n variant=\"scrollable\"\n value={value}\n onChange={handleChange}\n aria-label=\"Vertical tabs example\"\n className=\"tabsStyle\"\n >\n {itemArray.map((item) => (\n <Tab key={item.categoryId} label={item.label} className=\"tabStyle\" />\n ))}\n </Tabs>\n {itemArray.map((item) => (\n <TabPanel\n key={item.categoryId}\n value={value}\n index={itemArray.findIndex((i) => i.categoryId === item.categoryId)}\n >\n {item.content}\n </TabPanel>\n ))}\n </Box>\n </NsCategoryNavigationContainer>\n );\n};\n","import { styled } from '@nuskin/foundation-theme';\nexport const NsCategoryNavigationContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean }>`\n display: flex;\n flex-direction: ${({ isMobile }) => (isMobile ? 'column' : 'row')};\n align-items: ${({ isMobile }) => (isMobile ? 'stretch' : 'flex-start')};\n width: 100%;\n max-width: 1920px;\n min-height: ${({ isMobile }) => (isMobile ? 'auto' : '800px')};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({ isMobile }) => (isMobile ? '10px 16px 0px 16px' : '50px 60px 0px 60px')};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`;\n\nexport const TabsContainer = styled('div')<{ isMobile?: boolean }>`\n min-width: ${({ isMobile }) => (isMobile ? '100%' : 'auto')};\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`;\n\nexport const ContentContainer = styled('div')<{ isMobile?: boolean }>`\n flex: 1;\n min-width: 0;\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`;\n\nexport const LoadingContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`;\n\nexport const NoTabsContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`;\nexport const SpinnerContainer = styled('div')`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;\n","import React, { ReactElement, useState, useEffect, useMemo } from 'react';\nimport { Typography, Box, useMediaQuery, Tooltip } from '@mui/material';\nimport { NsLink, NsImage } from '@nuskin/foundation-ui-components';\nimport {\n MysiteHeroContainer,\n MysiteHeroContainerMobile,\n BadgeContainer,\n Badge,\n ToggleButtonMobile,\n StyledSpan,\n ImgTabIndex,\n ContactLink,\n BadgeValue,\n} from '@/common/headers/MysiteHero.styled';\nimport { PlaceholderImage } from '../icon/icons/PlaceholderImage';\nimport { ArrowDownIcon } from '../icon/icons/ArrowDownIcon';\nimport { trackGTMEvent } from '../utils/gtmTracking';\n\ntype MysiteHeroProps = {\n readonly imageDetails?: {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n };\n readonly shopTitle: string;\n readonly shopDescription: string;\n readonly socialTitleText: string;\n readonly email: string;\n readonly phone: string;\n readonly className?: string;\n readonly bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n readonly socialIcons?: {\n type: string;\n url: string;\n }[];\n readonly expirationDate?: string;\n readonly showBadges?: boolean;\n};\n\ntype ImageDetails = {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n};\n\ntype BannerProps = {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n};\n\ntype ContentProps = {\n shopTitle: string;\n shopDescription: string;\n socialTitleText: string;\n email: string;\n phone: string;\n showBadges: boolean;\n expirationDate?: string;\n};\n\nconst renderImageContent = (imageDetails: ImageDetails | undefined, bannerProps: BannerProps, className: string) => {\n const placeholderClass = className.includes('mobile') ? 'placeholder-image-mobile' : 'placeholder-image';\n return imageDetails?.imageSrc ? (\n <ImgTabIndex tabIndex={0}>\n <NsImage className={className} src={imageDetails.imageSrc} alt={imageDetails.imageAlt} />\n </ImgTabIndex>\n ) : (\n <Box className={placeholderClass}>\n <PlaceholderImage\n width={className.includes('mobile') ? '144px' : '246px'}\n height={className.includes('mobile') ? '144px' : '246px'}\n backgroundColor={bannerProps?.backgroundColor ?? '#5F5F5F'}\n />\n </Box>\n );\n};\n\nconst renderBadges = (showBadges: boolean, expirationDate: string, isMobile: boolean, hasWhiteBackground: boolean) => {\n if (!showBadges || !expirationDate) return null;\n\n const badgeClass = isMobile ? 'mobile-badge' : 'tablet-badge';\n const containerClass = isMobile ? 'mobile-badges' : 'tablet-badges';\n\n return (\n <BadgeContainer className={containerClass}>\n {expirationDate && (\n <Badge className={badgeClass} hasWhiteBackground={hasWhiteBackground} tabIndex={0}>\n <BadgeValue className=\"badge-value\">{expirationDate}</BadgeValue>\n </Badge>\n )}\n </BadgeContainer>\n );\n};\n\nconst renderMobileContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, socialTitleText, email, showBadges, expirationDate, phone } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography tabIndex={0} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={0} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {renderContactLink('email', email, 'email-text-mobile')}\n {renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground)}\n </>\n )}\n </Box>\n );\n};\n\nconst renderDesktopContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate } = props;\n\n return (\n <Box className=\"content\">\n <Typography tabIndex={0} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={0} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={0} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={0} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {renderContactLink('email', email, 'email-text')}\n {renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground)}\n </>\n )}\n </Box>\n );\n};\n\nconst checkIfImageIsCircular = (url: string): Promise<boolean> => {\n return new Promise((resolve, reject) => {\n const imageContext = new Image();\n imageContext.crossOrigin = 'anonymous';\n imageContext.src = url;\n\n imageContext.onload = () => {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) return reject(new Error('Canvas not supported'));\n\n canvas.width = imageContext.width;\n canvas.height = imageContext.height;\n\n context.drawImage(imageContext, 0, 0);\n\n const corners = [\n context.getImageData(0, 0, 1, 1).data,\n context.getImageData(imageContext.width - 1, 0, 1, 1).data,\n context.getImageData(0, imageContext.height - 1, 1, 1).data,\n context.getImageData(imageContext.width - 1, imageContext.height - 1, 1, 1).data,\n ];\n\n const isCircular = corners.every((corner) => {\n const imageArray = Array.prototype.slice.call(corner);\n const alpha = imageArray[3];\n return alpha < 10;\n });\n resolve(isCircular);\n };\n imageContext.onerror = () => reject(new Error('Failed to load image'));\n });\n};\n\nconst isWhiteOrNearWhite = (color: string | undefined): boolean => {\n if (!color) return false;\n\n const hex = color.replace('#', '').toLowerCase();\n\n /* regex pattern for hex color format: 3 chars (#fff), 4 chars (#ffff), 6 chars (#ffffff), or 8 chars (#ffffffff)*/\n if (!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(hex)) return false;\n\n let fullHex = hex;\n if (hex.length === 3 || hex.length === 4) {\n fullHex = hex\n .split('')\n .map((char) => char + char)\n .join('');\n }\n\n const r = Number.parseInt(fullHex.substring(0, 2), 16);\n const g = Number.parseInt(fullHex.substring(2, 4), 16);\n const b = Number.parseInt(fullHex.substring(4, 6), 16);\n\n const threshold = 220;\n return r >= threshold && g >= threshold && b >= threshold;\n};\n\nconst createContactClickHandler = (contactType: 'email' | 'phone', contactValue: string) => ({\n onClick: () => {\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n globalThis.location.href = `${contactType === 'email' ? 'mailto' : 'tel'}:${contactValue}`;\n }\n },\n});\n\nconst renderContactLink = (contactType: 'email' | 'phone', contactValue: string, className: string) => {\n const protocol = contactType === 'email' ? 'mailto:' : 'tel:';\n const handlers = createContactClickHandler(contactType, contactValue);\n\n return (\n <Typography className={className}>\n <ContactLink href={`${protocol}${contactValue}`} {...handlers}>\n {contactValue}\n </ContactLink>\n </Typography>\n );\n};\nexport default function MysiteHero({\n className,\n shopTitle,\n shopDescription,\n socialTitleText,\n imageDetails,\n email,\n phone,\n bannerProps,\n socialIcons,\n expirationDate,\n showBadges = false,\n}: MysiteHeroProps): ReactElement {\n const isMobile = useMediaQuery('(max-width: 560px)');\n const [isScrolled, setIsScrolled] = useState(false);\n const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);\n const [hasWhiteBackground, setHasWhiteBackground] = useState(false);\n const [isImageCircular, setIsImageCircular] = useState(false);\n\n const toggleDescription = () => {\n setIsDescriptionExpanded(!isDescriptionExpanded);\n };\n\n useEffect(() => {\n const checkImage = async () => {\n if (imageDetails?.imageSrc) {\n const isCircular = await checkIfImageIsCircular(imageDetails.imageSrc);\n setIsImageCircular(isCircular);\n } else {\n setIsImageCircular(false);\n }\n };\n\n checkImage();\n }, [imageDetails?.imageSrc]);\n\n useEffect(() => {\n setHasWhiteBackground(isWhiteOrNearWhite(bannerProps?.backgroundColor));\n }, [bannerProps?.backgroundColor]);\n\n useEffect(() => {\n let debounceTimeout: ReturnType<typeof setTimeout>;\n let lastScrollY = window.scrollY;\n let currentScrollState = false;\n let isTransitioning = false;\n let lastUpdateTime = 0;\n\n const updateScrollState = (newState: boolean) => {\n const now = Date.now();\n\n if (currentScrollState !== newState && !isTransitioning) {\n if (now - lastUpdateTime < 100) {\n return;\n }\n\n isTransitioning = true;\n currentScrollState = newState;\n lastUpdateTime = now;\n\n if (newState) {\n setIsDescriptionExpanded(false);\n }\n\n clearTimeout(debounceTimeout);\n setIsScrolled(newState);\n\n debounceTimeout = setTimeout(() => {\n isTransitioning = false;\n\n if (newState && window.scrollY < 15) {\n window.scrollTo({\n top: isMobile ? 20 : 30,\n behavior: 'smooth',\n });\n }\n }, 300);\n }\n };\n\n const handleScroll = () => {\n const currentScrollY = window.scrollY;\n\n if (isTransitioning) {\n lastScrollY = currentScrollY;\n return;\n }\n\n const scrollDelta = Math.abs(currentScrollY - lastScrollY);\n\n if (scrollDelta < 0.5) {\n return;\n }\n\n const scrollingDown = currentScrollY > lastScrollY;\n\n const scrollDownThreshold = isMobile ? 15 : 25;\n const scrollUpThreshold = isMobile ? 8 : 12;\n\n if (scrollingDown && currentScrollY > scrollDownThreshold && !currentScrollState) {\n updateScrollState(true);\n } else if (!scrollingDown && currentScrollY < scrollUpThreshold && currentScrollState) {\n updateScrollState(false);\n }\n\n lastScrollY = currentScrollY;\n };\n\n const initializeState = () => {\n const initialScrollY = window.scrollY;\n const scrollThreshold = isMobile ? 5 : 10;\n const shouldStartCompact = initialScrollY > scrollThreshold;\n\n currentScrollState = shouldStartCompact;\n setIsScrolled(shouldStartCompact);\n lastScrollY = initialScrollY;\n lastUpdateTime = Date.now();\n };\n\n let rafId: number | null = null;\n let lastRafTime = 0;\n const throttledScrollHandler = () => {\n if (rafId) return;\n\n const now = Date.now();\n if (now - lastRafTime < 16) {\n return;\n }\n\n rafId = requestAnimationFrame(() => {\n handleScroll();\n lastRafTime = Date.now();\n rafId = null;\n });\n };\n\n initializeState();\n window.addEventListener('scroll', throttledScrollHandler, { passive: true });\n\n return () => {\n window.removeEventListener('scroll', throttledScrollHandler);\n if (rafId) cancelAnimationFrame(rafId);\n clearTimeout(debounceTimeout);\n };\n }, [isMobile]);\n\n const renderSocialMediaIcons = useMemo(() => {\n return socialIcons?.map((icon, index) => {\n const handleSocialClick = (e: React.MouseEvent) => {\n e.preventDefault();\n trackGTMEvent({\n event: 'social_click',\n social_platform: icon.type,\n social_url: icon.url,\n click_element: 'social_icon',\n });\n window.open(icon.url, '_blank');\n };\n\n return (\n <StyledSpan key={icon?.type + index} onClick={handleSocialClick}>\n <NsLink href={icon.url} target=\"_blank\">\n <NsImage\n key={icon?.type + index}\n src={`https://www.google.com/s2/favicons?domain=${icon?.url}&sz=24`}\n alt={`${icon.type} icon`}\n width=\"24\"\n height=\"24\"\n />\n </NsLink>\n </StyledSpan>\n );\n });\n }, [socialIcons]);\n\n const containerClass = `${className} ${isScrolled ? 'scrolled' : ''}`;\n const props = { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate };\n\n const getCharacterLimit = () => {\n if (window.innerWidth <= 380) return 50;\n if (window.innerWidth <= 415) return 56;\n if (window.innerWidth <= 460) return 62;\n return 80;\n };\n\n const shouldShowToggle = isMobile && shopDescription && shopDescription.length > getCharacterLimit();\n\n return isMobile ? (\n <MysiteHeroContainerMobile\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n <Box className=\"image-content-mobile\">\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image-mobile')}\n {renderMobileContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </Box>\n {!isScrolled && (\n <Box className=\"expandable-description-mobile\">\n <Typography\n className={`description-content-mobile ${isDescriptionExpanded || !shouldShowToggle ? 'expanded' : 'collapsed'}`}\n >\n {shopDescription}\n </Typography>\n {shouldShowToggle && (\n <ToggleButtonMobile onClick={toggleDescription}>\n <ArrowDownIcon\n width={16}\n height={16}\n className={`arrow-icon-mobile ${isDescriptionExpanded ? 'expanded' : ''}`}\n />\n </ToggleButtonMobile>\n )}\n </Box>\n )}\n </MysiteHeroContainerMobile>\n ) : (\n <MysiteHeroContainer\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image')}\n {renderDesktopContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </MysiteHeroContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport { Box, BoxProps } from '@mui/material';\n\ninterface StyledBoxProps extends BoxProps {\n bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n isCircularImage?: boolean;\n hasWhiteBackground?: boolean;\n}\n\ninterface BadgeProps extends BoxProps {\n hasWhiteBackground?: boolean;\n}\n\nconst getContactTextStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '600',\n lineHeight: '16px',\n letterSpacing: '0.12px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n});\n\nconst getSocialTitleStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '700',\n lineHeight: '16px',\n letterSpacing: '0.48px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n textTransform: 'uppercase' as const,\n paddingLeft: '5px',\n});\n\nconst getSocialIconsStyles = () => ({\n display: 'flex',\n flexDirection: 'row' as const,\n gap: '10px',\n alignItems: 'center',\n});\n\nconst getContactTextMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getContactTextStyles(hasWhiteBackground),\n paddingBottom: '11px',\n wordBreak: 'break-all' as const,\n overflowWrap: 'break-word' as const,\n paddingLeft: '5px',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n },\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '15px',\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '14px',\n paddingBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '12px',\n paddingBottom: '4px',\n },\n});\n\nconst getSocialTitleMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '11px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '14px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '12px',\n marginBottom: '5px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '11px',\n marginBottom: '4px',\n },\n});\n\nexport const MysiteHeroContainer = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n height: 'auto',\n flexDirection: 'row',\n alignItems: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content': {\n paddingTop: '0',\n justifyContent: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title': {\n fontSize: '26px',\n lineHeight: '34px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n\n '.bg-image': {\n width: '90px',\n height: '90px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n '& > div': {\n width: '90px',\n height: '90px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.content': {\n width: '70%',\n height: '100%',\n marginLeft: '2%',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image': {\n width: '252px',\n height: '252px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '3px' : '0px',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n '.body-title': {\n fontSize: '32px',\n lineHeight: '38px',\n marginBottom: '8px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-text': {\n fontSize: '16px',\n marginBottom: '12px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '22px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n WebkitLineClamp: 3,\n textOverflow: 'ellipsis',\n paddingLeft: '5px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.social-media': {\n display: 'flex',\n flexDirection: 'column',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.email-text': getContactTextStyles(hasWhiteBackground),\n '.phone-text': getContactTextStyles(hasWhiteBackground),\n '.social-title-text': {\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '8px',\n },\n '.social-icons': {\n ...getSocialIconsStyles(),\n paddingBottom: '8px',\n },\n }),\n);\n\nexport const MysiteHeroContainerMobile = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n flexDirection: 'column',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content-mobile': {\n paddingTop: '5px',\n width: '60%',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title-mobile': {\n fontSize: '18px',\n lineHeight: '28px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image-mobile': {\n width: '75px',\n height: '75px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image-mobile': {\n '& > div': {\n width: '75px !important',\n height: '75px !important',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.image-content-mobile': {\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n },\n '.content-mobile': {\n width: '55%',\n height: '100%',\n paddingTop: '10px',\n paddingRight: '10px',\n marginLeft: '8px',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n paddingTop: '8px',\n width: '100%',\n },\n '@media (max-width: 400px)': {\n paddingTop: '6px',\n width: '100%',\n height: '100%',\n },\n '@media (max-width: 375px)': {\n paddingTop: '4px',\n width: '100%',\n height: '100%',\n },\n },\n '.bg-image-mobile': {\n width: '144px',\n height: '144px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n objectFit: 'cover',\n objectPosition: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '2px' : '0px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '112px',\n height: '112px',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n '.placeholder-image-mobile': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n width: '144px',\n height: '144px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '110px !important',\n height: '110px !important',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n },\n '.body-title-mobile': {\n fontSize: '22px',\n lineHeight: '28px',\n marginBottom: '13px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontStyle: 'normal',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n fontSize: '16px',\n lineHeight: '24px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '16px',\n lineHeight: '22px',\n marginBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '14px',\n lineHeight: '20px',\n marginBottom: '4px',\n },\n },\n '.body-text-mobile': {\n fontSize: '14px',\n padding: '20px 25px 20px 25px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n backgroundColor: '#E0E0E0',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'all 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.expandable-description-mobile': {\n backgroundColor: '#E0E0E0',\n position: 'relative',\n },\n '.description-content-mobile': {\n fontSize: '14px',\n padding: '10px 15px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'max-height 0.3s ease-in-out, opacity 0.3s ease-in-out',\n overflow: 'hidden',\n position: 'relative',\n '&.collapsed': {\n maxHeight: '50px',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '20px',\n background: 'linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)',\n pointerEvents: 'none',\n },\n },\n '&.expanded': {\n maxHeight: 'none',\n whiteSpace: 'normal',\n display: 'block',\n '&::after': {\n display: 'none',\n },\n },\n },\n '.email-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.phone-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.social-title-text-mobile': getSocialTitleMobileStyles(hasWhiteBackground),\n '.social-icons-mobile': {\n ...getSocialIconsStyles(),\n paddingBottom: '10px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '& img': {\n width: '24px',\n height: '24px',\n '@media (max-width: 400px)': {\n width: '20px',\n height: '20px',\n },\n '@media (max-width: 375px)': {\n width: '18px',\n height: '18px',\n },\n },\n '@media (max-width: 420px)': {\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n paddingBottom: '4px',\n },\n '@media (max-width: 375px)': {\n paddingBottom: '3px',\n },\n },\n }),\n);\n\nexport const BadgeContainer = styled(Box)({\n display: 'flex',\n gap: '12px',\n marginBottom: '16px',\n paddingLeft: '5px',\n\n '&.mobile-badges': {\n flexDirection: 'column',\n gap: '8px',\n marginBottom: '12px',\n },\n\n '&.tablet-badges': {\n flexDirection: 'row',\n gap: '12px',\n marginBottom: '8px',\n },\n});\n\nexport const Badge = styled((props: BadgeProps) => <Box {...props} />)(({ hasWhiteBackground }) => ({\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n backdropFilter: 'blur(10px)',\n borderRadius: '20px',\n padding: '8px 16px',\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n border: '1px solid rgba(255, 255, 255, 0.3)',\n transition: 'all 0.3s ease',\n\n '&.mobile-badge': {\n padding: '6px 12px',\n borderRadius: '16px',\n fontSize: '12px',\n },\n\n '&.tablet-badge': {\n padding: '8px 16px',\n borderRadius: '20px',\n fontSize: '14px',\n },\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n transform: 'translateY(-1px)',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',\n },\n\n '.badge-text': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '400',\n opacity: 0.9,\n },\n\n '.badge-value': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '600',\n },\n}));\nexport const ToggleButtonMobile = styled('button')({\n backgroundColor: '#E0E0E0',\n border: '1px solid #252525',\n borderRadius: '10px',\n cursor: 'pointer',\n width: '40px',\n height: '20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: '10px auto 5px auto',\n transition: 'all 0.2s ease',\n '& .arrow-icon-mobile': {\n transition: 'transform 0.3s ease',\n '&.expanded': {\n transform: 'rotate(180deg)',\n },\n },\n});\nexport const StyledSpan = styled(Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`;\nexport const ImgTabIndex = styled('span')`\n line-height: 0.5;\n`;\n\nexport const ContactLink = styled('a')({\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit',\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const BadgeValue = styled('span')({});\n","import React from 'react';\nimport { Box } from '@mui/material';\n\ntype PlaceholderImageProps = {\n readonly width: string | number;\n readonly height: string | number;\n readonly backgroundColor: string;\n};\n\nexport const PlaceholderImage: React.FC<PlaceholderImageProps> = ({ width, height, backgroundColor }) => {\n return (\n <Box\n sx={{\n width,\n height,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor,\n }}\n data-testid=\"placeholder-image\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"129\" viewBox=\"0 0 128 129\" fill=\"none\">\n <g id=\"ns_logomark\">\n <path\n id=\"Vector\"\n d=\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_2\"\n d=\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_3\"\n d=\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_4\"\n d=\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_5\"\n d=\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\"\n fill=\"#252525\"\n />\n </g>\n </svg>\n </Box>\n );\n};\n","import React from 'react';\n\ntype ArrowDownIconProps = {\n readonly width?: string | number;\n readonly height?: string | number;\n readonly className?: string;\n};\n\nexport const ArrowDownIcon: React.FC<ArrowDownIconProps> = ({ width = 16, height = 16, className = '' }) => {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className={className}\n data-testid=\"arrow-down-icon\"\n >\n <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n </svg>\n );\n};\n","export interface GTMEvent {\n event: string;\n\n [key: string]: unknown;\n}\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n }\n}\n\nexport function trackGTMEvent(eventData: GTMEvent): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n const url = window.location.href;\n const updatedEventData = { ...eventData };\n\n const prefix = url.includes('personal-offer') ? 'postorefront_' : 'mysite_';\n updatedEventData.event = prefix + eventData.event;\n\n try {\n if (window.dataLayer) {\n window.dataLayer.push(updatedEventData);\n } else {\n console.error('GTM dataLayer not available, but event logged');\n window.dataLayer = [];\n window.dataLayer.push(updatedEventData);\n }\n } catch (error) {\n console.error('Failed to track GTM event:', error);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/gitlab-runner-data/builds/nextgen-development/mysite/npm/react-mysite-elements/dist/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../node_modules/@mui/icons-material/utils/createSvgIcon.js","../node_modules/@mui/icons-material/CalendarToday.js","../node_modules/@mui/icons-material/Public.js","../node_modules/@mui/icons-material/TrendingUp.js","../node_modules/@mui/icons-material/TrendingDown.js","../node_modules/@mui/icons-material/Remove.js","../node_modules/@mui/icons-material/ShoppingCart.js","../node_modules/@mui/icons-material/MoreVert.js","../node_modules/@mui/icons-material/Visibility.js","../node_modules/@mui/icons-material/ArrowBack.js","../node_modules/@mui/icons-material/Language.js","../node_modules/@mui/icons-material/ArrowUpward.js","../node_modules/@mui/icons-material/ArrowDownward.js","../node_modules/@mui/icons-material/ChevronLeft.js","../node_modules/@mui/icons-material/ChevronRight.js","../src/index.ts","../src/common/card/NsProductCard.tsx","../src/common/card/styles/NsProductCard.Styled.tsx","../src/common/carousel/NsProductCarousel.tsx","../src/common/carousel/NsProductCarousel.styled.ts","../src/common/carousel/ProductTabCarousel.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.tsx","../src/common/Nav-Category-Navigation/NsCategoryNavigation.styled.tsx","../src/common/carousel/ProductTabCarousel.styled.tsx","../src/common/headers/MysiteHero.tsx","../src/common/headers/MysiteHero.styled.tsx","../src/common/icon/icons/PlaceholderImage.tsx","../src/common/icon/icons/ArrowDownIcon.tsx","../src/common/utils/gtmTracking.ts","../src/common/shopping-dashboard/ShoppingDashboard.styled.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.tsx","../src/common/shopping-dashboard/shared/DashboardHeader.styled.tsx","../src/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.ts","../src/common/shopping-dashboard/shared/StatsCard.tsx","../src/common/shopping-dashboard/utils/trendUtils.tsx","../src/common/shopping-dashboard/shared/StatsCard.styled.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.tsx","../src/common/shopping-dashboard/shared/LoadingSkeletons.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.tsx","../src/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.styled.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.tsx","../src/common/shopping-dashboard/shared/WidgetMenu.styled.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.styled.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsChart.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsChart.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.tsx","../src/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.styled.tsx","../src/common/shopping-dashboard/ShoppingDashboard.tsx","../src/common/shopping-dashboard/MysiteDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.tsx","../src/common/shopping-dashboard/shared/PageHeader.tsx","../src/common/shopping-dashboard/shared/PageHeader.styled.tsx","../src/common/shopping-dashboard/shared/DataTable.tsx","../src/common/shopping-dashboard/shared/DataTable.styled.tsx","../src/common/shopping-dashboard/shared/Pagination.tsx","../src/common/shopping-dashboard/shared/Pagination.styled.tsx","../src/common/shopping-dashboard/utils/dataUtils.ts","../src/common/shopping-dashboard/utils/dateConstants.ts","../src/common/shopping-dashboard/utils/dateFormat.ts","../src/common/shopping-dashboard/shared/FullViewComponents.styled.tsx","../src/common/shopping-dashboard/shared/TopProducts/ProductsFullView.styled.tsx","../src/common/shopping-dashboard/shared/useViewport.ts","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.tsx","../src/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.tsx","../src/common/shopping-dashboard/shared/Signups/SignupsFullView.styled.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.tsx","../src/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.styled.tsx","../src/common/shopping-dashboard/ProductOfferDashboard.styled.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersPieChart.tsx","../src/common/shopping-dashboard/TranslationKeys/ProductOfferDashboardTranslationKeys.ts","../src/common/shopping-dashboard/ProductOfferDashboard.tsx","../src/common/shopping-dashboard/PoDashboardWithNavigation.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.tsx","../src/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.styled.tsx","../src/common/shopping-dashboard/shared/FilterBar.tsx","../src/common/shopping-dashboard/fixtures/mockDashboardData.ts","../src/common/shopping-dashboard/fixtures/mockProductOfferData.ts","../src/common/shopping-dashboard/utils/marketConstants.ts"],"names":["zp","Object","create","Wo","defineProperty","Bp","getOwnPropertyDescriptor","Ep","getOwnPropertyNames","Hp","getPrototypeOf","_p","prototype","hasOwnProperty","ge","e","t","exports","Wp","r","get","enumerable","ti","i","n","call","R","__esModule","value","jp","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","Oi","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","err","Error","name","isRequired","getShim","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require_prop_types","Fi","ReactIs","throwOnDirectAccess","require_interopRequireDefault","_interopRequireDefault","default","require_createSvgIcon","_utils","createSvgIcon","require","require_CalendarToday","Fe","_createSvgIcon","Ne","_jsxRuntime","_default","jsx","d","require_Public","require_TrendingUp","require_TrendingDown","require_Remove","require_ShoppingCart","require_MoreVert","require_Visibility","require_ArrowBack","require_Language","require_ArrowUpward","require_ArrowDownward","require_ChevronLeft","require_ChevronRight","index_exports","__export","CategoriesFullView","ConversionRateChart","ConversionRateFullView","DATE_RANGE_LABELS","DAYS_MAP","DashboardHeader","DataTable","FilterBar","MARKET_MULTIPLIERS","MysiteDashboardWithNavigation","MysiteHero","NsCategoryNavigation","NsProductCard","NsProductCard_default","PageHeader","Pagination","PoDashboardWithNavigation","ProductCarousel","ProductCardCarousel","ProductOfferDashboard","ProductOfferDashboardTranslationKeys","ProductTabCarousel","ProductTabCarousel_default","ProductsFullView","ShoppingDashboard","ShoppingDashboardTranslationKeys","SignupsChart","SignupsFullView","StatsCard","TopCategoriesPieChart","TopPerformingOffersFullView","TopPerformingOffersPieChart","TopSellingProductsList","WidgetMenu","applyMarketMultiplier","calculatePercentage","calculateTotalPages","formatDateRange","formatDateRangeLabel","formatDisplayDate","formatISODate","formatShortDate","getDateRangeLabel","getDaysFromDateRange","getMarketDisplayName","getMarketMultiplier","getTranslation","getTrendColor","getTrendIcon","mockCategories","mockConversionData","mockOrders","mockProductOfferStats","mockSignupData","mockSignupDetails","mockStats","mockTopOffers","mockTopProducts","paginateItems","sortByNumericProperty","__toCommonJS","import_react","import_foundation_ui_components","import_foundation_theme","PriceComponent","Rt","styled","ProductCardContainer","isMobile","ImageContainer","bgColor","DefaultImage","ProductTitle","ProductBadgeContainer","AddToCartButton","disabled","isHovered","CartIcon","import_material","import_jsx_runtime","productTitle","imageDetails","className","button","onCardClick","productStatusBadge","directSellerBadge","mySitePriceComponent","testId","di","useState","isButtonHovered","setIsButtonHovered","ci","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","Be","jsxs","onClick","tabIndex","children","onError","imageSrc","pi","NsImage","alt","imageAlt","areaLabel","width","title","showButton","buttonText","stopPropagation","onMouseEnter","onMouseLeave","height","viewBox","fill","xmlns","fillRule","clipRule","import_react_slick","import_useMediaQuery","import_Box","SlickContainer","$e","to","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","ui","NsTypography","ViewAllLink","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","Do","useRef","Pi","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","xe","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","Ti","Slider","ref","variant","preventDefault","push","Ri","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","Ii","NsCategoryNavigationContainer","Ai","div","TabPanel","other","Mt","role","hidden","id","wr","propTypes","Ko","itemArray","controlledValue","onChange","Bi","internalValue","setInternalValue","_i","Ei","Tabs","orientation","event","newValue","item","Hi","Tab","label","categoryId","findIndex","content","ProductTabCarouselContainer","Kt","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","Yi","Ue","isLoadingInitialData","setIsLoadingInitialData","setCategories","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","finally","cat","ht","_","Ji","NsSpinner","getContactTextStyles","hasWhiteBackground","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","color","textDecoration","getSocialTitleStyles","textTransform","paddingLeft","getSocialIconsStyles","display","flexDirection","gap","alignItems","getContactTextMobileStyles","paddingBottom","wordBreak","overflowWrap","getSocialTitleMobileStyles","marginBottom","transition","opacity","transform","MysiteHeroContainer","bt","qo","oo","bannerProps","isCircularImage","backgroundClip","background","backgroundColor","position","overflow","willChange","backfaceVisibility","top","left","right","boxShadow","paddingTop","justifyContent","fontFamily","headlineFont","padding","objectFit","objectPosition","marginLeft","marginRight","boxSizing","whiteSpace","textOverflow","paragraphFont","WebkitBoxOrient","WebkitLineClamp","MysiteHeroContainerMobile","paddingRight","maxHeight","bottom","pointerEvents","BadgeContainer","Badge","backdropFilter","borderRadius","border","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","xt","cn","sx","ArrowDownIcon","vr","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","z","Po","oe","renderBadges","showBadges","expirationDate","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","data","every","corner","Array","slice","onerror","isWhiteOrNearWhite","hex","replace","toLowerCase","test","fullHex","split","char","join","Number","parseInt","substring","g","b","threshold","createContactClickHandler","contactType","contactValue","contact_type","contact_value","click_element","onKeyDown","key","globalThis","protocol","handlers","socialIcons","pt","setIsScrolled","isDescriptionExpanded","setIsDescriptionExpanded","setHasWhiteBackground","isImageCircular","setIsImageCircular","toggleDescription","debounceTimeout","lastScrollY","scrollY","currentScrollState","isTransitioning","lastUpdateTime","updateScrollState","newState","now","Date","clearTimeout","setTimeout","scrollTo","behavior","handleScroll","currentScrollY","abs","scrollingDown","scrollDownThreshold","scrollUpThreshold","initializeState","initialScrollY","shouldStartCompact","rafId","lastRafTime","throttledScrollHandler","requestAnimationFrame","addEventListener","passive","removeEventListener","cancelAnimationFrame","useMemo","icon","social_platform","type","social_url","open","NsLink","containerClass","getCharacterLimit","innerWidth","shouldShowToggle","DashboardContainer","ao","StatsRow","WidgetContainer","TwoColumnGrid","ErrorContainer","import_CalendarToday","Pr","import_Public","yn","Ie","ColorUtils","getGenomeColor","HeaderContainer","theme","TitleSection","ShopTitle","DateRangeLabel","FiltersSection","FilterDropdownContainer","FilterLabel","StyledSelect","FilterIcon","LoadingIndicatorContainer","DesktopFiltersContainer","StyledCircularProgress","fallback","stats","revenue","volume","visits","subtitle","dcSv","conversionRate","trend","increased","decreased","unchanged","details","filter","dateRange","last7days","last30days","last90days","thisMonth","dateRangeLabel","market","all","us","ca","kr","au","nz","marketLabel","productSort","units","byUnits","byRevenue","byVolume","signupView","members","retail","brandAffiliates","showAll","showMembers","showRetail","showBrandAffiliates","categorySort","widget","topProducts","viewAll","empty","ariaLabel","titleAriaLabel","sortAriaLabel","noImageAriaLabel","unitsSuffix","revenueSuffix","dcSvSuffix","rank","formula","comparison","chartAriaLabel","filterAriaLabel","noData","noChange","tooltipOrders","tooltipVisits","ordersPerSiteVisits","signups","total","totalSignupsInPeriod","noTrendData","topCategories","menu","fullView","navigation","backToDashboard","backAriaLabel","dashboard","statsRow","dashboardFilters","loadingDashboard","dateRangeFilter","marketFilter","filterSuffix","columns","date","status","detailsTitle","orderId","customer","items","bv","orderTotal","totalSv","orderDetailsTitle","notAvailable","product","unitsSold","skuPrefix","noProducts","category","percentOfTotal","allCategoriesTitle","noCategoryData","dataTable","noDataAvailable","sortableColumn","pagination","previousPage","nextPage","goToPage","of","defaults","zeroTrend","noValue","dateRangeLabelProp","isLoading","onDateRangeChange","onMarketChange","handleDateRangeChange","newDateRange","handleMarketChange","newMarket","handleFilterKeyDown","blur","getDateRangeLabelText","U","as","Mn","htmlFor","Pn","CalendarTodayIcon","Rn","PublicIcon","import_TrendingUp","Xo","import_TrendingDown","ta","import_Remove","On","direction","aa","Ln","TrendingUpIcon","Vn","TrendingDownIcon","$n","RemoveIcon","Je","StatsCardContainer","StatsTitle","StatsValueContainer","StatsValue","StatsSubtitle","TrendContainer","TrendIcon","TrendText","StatsCardHeader","import_Skeleton","SkeletonCard","G","SkeletonHeader","SkeletonRow","StatsCardWrapper","StatsCardHeaderRow","StatsCardBody","StatsCardSubtitle","no","Skeleton","ProductRowInfo","ProductRowMetrics","ChartMetricRow","ChartMetricTrend","ChartAreaSkeleton","PieChartLayout","PieCircleSkeleton","LegendList","LegendRowWrapper","LegendRowInfo","DashboardLayout","DashboardHeaderRow","DashboardFilterGroup","StatsGrid","WidgetGrid","FullViewLayout","FullViewMetricCard","FullViewMetricCenter","FullViewChartArea","FullViewTableCard","FullViewTableRow","SummaryCardsGrid","StatsCardSkeleton","k","Z","ProductRowSkeleton","ProductsListSkeleton","rowKey","ChartWidgetSkeleton","LegendRowSkeleton","CategoriesPieChartSkeleton","FullViewChartSkeleton","FullViewTableSkeleton","StatsCardComponent","trendDirection","trendValue","qe","getTrendAriaLabel","directionText","pl","memo","displayName","import_ShoppingCart","cl","ne","ProductsListContainer","WidgetHeader","HeaderActionsContainer","WidgetTitle","SortDropdown","ProductsList","ProductItem","ProductRank","ProductImage","ProductImagePlaceholder","ProductInfo","ProductName","ProductSubtitle","ProductMetrics","ProductValue","ProductTrend","EmptyState","EmptyStateText","import_Menu","import_MenuItem","import_ListItemIcon","import_ListItemText","import_MoreVert","Pl","import_Visibility","Rl","import_IconButton","StyledIconButton","Ol","Ml","IconButton","widgetId","onFullView","Vl","anchorEl","setAnchorEl","handleClick","currentTarget","handleClose","handleFullView","Ze","size","Al","MoreVertIcon","$l","Menu","onClose","MenuListProps","anchorOrigin","vertical","horizontal","transformOrigin","Fl","MenuItem","Nl","ListItemIcon","zl","VisibilityIcon","Il","ListItemText","TopSellingProductsListComponent","maxProducts","onSortChange","onTitleClick","handleSortChange","newSort","formatValue","sortBy","toLocaleString","getSubtitle","getTrendValue","getTrendDirection","startsWith","displayedProducts","rankLabel","trendLabel","getTrendDirectionLabel","W","El","ShoppingCartIcon","imageUrl","toUpperCase","Bl","import_recharts","ye","ConversionRateContainer","ChartHeader","TitleRow","ChartTitle","FilterDropdown","MetricDisplay","MetricValue","MetricTrend","FormulaDisplay","ChartContainer","TooltipContainer","TooltipLabel","TooltipValue","TooltipDetails","MONTH_MAP","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","CHART_MARGIN","AXIS_TICK","LINE_DOT","ACTIVE_DOT","rateTickFormatter","dateStr","parts","CustomTooltip","active","payload","E","rate","toFixed","orders","siteVisits","ConversionRateChartComponent","conversionData","conversionFilter","onFilterChange","handleFilterChange","lo","newFilter","noDataText","noChangeText","currentRate","trendInfo","latestRate","previousRate","change","percentageChange","formattedChange","formattedData","shortDate","Ee","ResponsiveContainer","minHeight","LineChart","CartesianGrid","strokeDasharray","XAxis","dataKey","tick","tickLine","interval","YAxis","tickFormatter","domain","Line","stroke","strokeWidth","dot","activeDot","Le","SignupsContainer","Legend","LegendItem","LegendColor","LegendLabel","SERIES_COLORS","SignupsChartComponent","signupData","onViewChange","handleViewChange","po","newView","totalSignups","latestTotal","previousTotal","totalLabel","membersLabel","retailLabel","brandAffiliatesLabel","P","me","te","CategoriesContainer","ChartAndLegendContainer","ChartWrapper","DonutCenterOverlay","DonutCenterLabel","DonutCenterValue","DonutCenterTrend","LegendContainer","LegendInfo","LegendName","LegendValue","LegendPercentage","parseTrendPercent","cleanedValue","trim","parsedValue","isFinite","tooltipFormatter","TopCategoriesPieChartComponent","Oa","nextSortedCategories","sort","a","percentage","nextTotalRevenue","reduce","sum","weightedRevenueTrend","accumulator","weightedSum","weight","averageRevenueTrend","nextTrendDirection","nextFormattedTrend","sortedCategories","totalRevenue","formattedTrend","H","Ct","PieChart","Pie","cx","cy","innerRadius","outerRadius","nameKey","paddingAngle","Cell","formatter","EMPTY_TOP_PRODUCTS","EMPTY_CONVERSION_DATA","EMPTY_SIGNUP_DATA","EMPTY_CATEGORIES","onProductSortChange","onSignupViewChange","onConversionFilterChange","onCategorySortChange","onProductsTitleClick","onConversionTitleClick","onSignupsTitleClick","onCategoriesToTitleClick","resolvedTopProducts","resolvedConversionData","resolvedSignupData","resolvedCategories","we","metrics","import_ArrowBack","import_Language","gs","Te","PageHeaderWrapper","BackButtonWrapper","BackButton","LeftSection","Title","DateRange","MobileDateRange","FilterWrapper","MobileTitleWrapper","MobileTitle","onBack","filters","renderFilterIcon","iconType","le","Ms","Os","LanguageIcon","Rs","ArrowBackIcon","options","option","import_ArrowUpward","Ls","import_ArrowDownward","Vs","Xe","TableContainer","Table","TableHeader","TableHeaderCell","sortable","TableBody","TableRow","TableCell","EmptyTableCell","SortIconContainer","isActive","onSort","sortColumn","sortDirection","getRowKey","handleSort","columnKey","handleKeyDown","getAriaSort","Ae","column","Hs","ArrowDownwardIcon","Es","ArrowUpwardIcon","colSpan","row","rowIndex","render","import_ChevronLeft","_s","import_ChevronRight","Ws","Gt","PaginationContainer","PageButton","PageInfo","NavButton","currentPage","totalPages","onPageChange","itemsPerPage","totalItems","handlePrevious","handleNext","action","pageNumbers","from","pages","startItem","endItem","goToPageLabel","Ce","Ks","ChevronLeftIcon","page","Us","ChevronRightIcon","ceil","startIndex","endIndex","aVal","bVal","decimalPlaces","getMonth","getDate","start","end","toISOString","import_styles","Qs","PageContainer","Pe","ve","MetricChartCardSection","shadows","MetricSection","palette","text","primary","success","main","secondary","ComparisonText","ChartSection","TableSection","withCard","MobileCardName","MobileCardSubtext","MobileCardDetail","MobileCardStatus","warning","rd","ProductImageCell","ue","he","ProductSku","MobileCardsContainer","DesktopTableContainer","MobileProductCard","divider","MobileCardHeader","MobileProductRank","MobileProductImage","MobileProductDetails","MobileProductName","MobileProductSku","MobileMetricsGrid","MobileMetricItem","MobileMetricLabel","MobileMetricValue","MOBILE_VIEWPORT_QUERY","useIsMobileViewport","wd","noSsr","mapProductToRow","sku","padStart","image","He","setCurrentPage","setSortColumn","setSortDirection","isMobileView","handleBack","productRows","sortedRows","paginatedRows","I","Cd","MobileOrderCard","_e","We","MobileOrderHeader","MobileCustomerInfo","MobileCustomerName","MobileOrderDate","MobileOrderId","MobileOrderMetrics","MobileOrdersContainer","ComparisonTextMobile","je","firstRate","getConversionFilterLabel","conversionFilterLabel","paginatedOrders","getChartColor","M","Vd","$d","Ve","order","customerName","Fd","MobileSignupsContainer","mo","ho","MobileSignupCard","SignupTrendChartContainer","toNumeric","parsed","rt","normalizedSignupData","point","rawPoint","brandAffiliate","brand_affiliates","brand_affiliate","signupTotal","first","last","hasSignupTrendData","paginatedSignups","O","Ed","Hd","re","connectNulls","signup","_d","SummaryItemRow","bo","SummaryItemInfo","SummaryItemName","SummaryItemSubtext","SummaryItemPercentage","TopSection","Re","muiStyled","Se","SummaryContainer","SummaryItem","ColorDot","dotColor","SummaryInfo","SummaryName","SummaryValue","SummaryPercentage","MobileCategoriesContainer","MobileCategoryCard","it","totalRevenueTrendDirection","totalRevenueTrend","paginatedCategories","L","kt","DEFAULT_HISTORY_STATE_KEY","EMPTY_ORDERS","EMPTY_SIGNUPS","isRecord","isMysiteDashboardView","readViewFromState","state","stateKey","view","buildStateWithView","buildLocationWithState","pathname","search","hash","initialDateRange","initialMarket","initialProductSort","initialSignupView","initialConversionFilter","initialCategorySort","historyAdapter","historyStateKey","resetToDashboardOnMount","ee","currentView","setCurrentView","hasIntraDashboardHistoryRef","setDateRange","setMarket","setProductSort","setSignupView","setConversionFilter","setCategorySort","resolvedOrders","resolvedSignups","updateView","readCurrentView","writeCurrentView","mode","nextState","nextLocation","replaceState","pushState","listen","nextView","handlePopState","handleOpenFullView","goBack","back","nextDateRange","nextMarket","handleProductSortChange","nextProductSort","handleSignupViewChange","nextSignupView","handleConversionFilterChange","nextFilter","handleCategorySortChange","nextSort","handleProductsTitleClick","handleConversionTitleClick","handleSignupsTitleClick","handleCategoriesTitleClick","xo","PoDashboardContainer","yo","TopChartsRow","StatsCardStack","BottomChartsRow","offersPurchased","trendUp","trendDown","trendNeutral","comparedTo","offerSort","overall","emptyState","topPerformingOffers","statsCard","conversionChart","topOffers","widgetMenu","filterDateRange","filterMarket","backButton","columnName","columnRevenue","columnPercentage","columnTrend","trendZero","TopPerformingOffersPieChartComponent","offers","cr","nextSortedOffers","offer","sortedOffers","St","EMPTY_TOP_OFFERS","dashboardTitle","onOfferSortChange","onOffersTitleClick","resolvedTopOffers","ze","selectedMarket","cp","Me","De","MobileOffersContainer","MobileOfferCard","nt","paginatedOffers","V","Dt","isProductOfferDashboardView","allProducts","allOffers","initialOfferSort","ie","setOfferSort","resolvedAllProducts","resolvedAllOffers","handleOfferSortChange","handleOffersTitleClick","Io","wo","FilterContainer","Co","setDate","months","floor","firstNames","lastNames","String","toLocaleDateString","month","day","year","customerType","types","mockProductOfferStat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,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACI7S,GAAI,UACJlR,KAAM,wBACN+jB,QAAS,KACTka,WAAY,GACZ3oB,MAAO,UACP+O,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACA,CACI7S,GAAI,UACJlR,KAAM,wBACN+jB,QAAS,IACTka,WAAY,EACZ3oB,MAAO,UACP+O,MAAO,CAAEN,QAAS,OAAQ,CAC9B,EACJ,CCvGO,IAAM5f,GAAmD,CAC5D+gB,IAAK,EACLC,GAAI,IACJC,GAAI,GACJvmB,GAAI,IACJwmB,GAAI,GACJC,GAAI,GACJC,GAAI,EACR,EAGO,SAAS/e,GAAoBye,CAAAA,MACzB9gB,EAAP,MAAOA,CAAAA,EAAAA,EAAAA,CAAmB8gB,EAAM,UAAzB9gB,WAAAA,EAA8B,CACzC,CAGO,SAAS0B,GAAsBjH,CAAAA,CAAeqmB,CAAAA,EACjD,OAAOlW,KAAK0pC,KAAA,CAAM75C,EAAQ4H,GAAoBye,GAClD,CAGO,SAAS1e,GAAqB0e,CAAAA,MACW,EAS5C,MAT4C,CAAA,EAAA,CAAA,CACxCC,IAAK,cACLC,GAAI,KACJC,GAAI,SACJvmB,GAAI,QACJwmB,GAAI,QACJC,GAAI,YACJC,GAAI,aACR,CAAA,CAAA,CACaN,EAAM,UATyB,WAAA,EASpBA,CAC5B","sourcesContent":["\"use strict\";var zp=Object.create;var Wo=Object.defineProperty;var Bp=Object.getOwnPropertyDescriptor;var Ep=Object.getOwnPropertyNames;var Hp=Object.getPrototypeOf,_p=Object.prototype.hasOwnProperty;var ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wp=(e,t)=>{for(var r in t)Wo(e,r,{get:t[r],enumerable:!0})},ti=(e,t,r,i)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let n of Ep(t))!_p.call(e,n)&&n!==r&&Wo(e,n,{get:()=>t[n],enumerable:!(i=Bp(t,n))||i.enumerable});return e};var R=(e,t,r)=>(r=e!=null?zp(Hp(e)):{},ti(t||!e||!e.__esModule?Wo(r,\"default\",{value:e,enumerable:!0}):r,e)),jp=e=>ti(Wo({},\"__esModule\",{value:!0}),e);var Oi=ge((hg,Mi)=>{\"use strict\";var Up=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";Mi.exports=Up});var Fi=ge((bg,$i)=>{\"use strict\";var qp=Oi();function Li(){}function Vi(){}Vi.resetWarningCache=Li;$i.exports=function(){function e(i,n,s,u,m,w){if(w!==qp){var S=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw S.name=\"Invariant Violation\",S}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Vi,resetWarningCache:Li};return r.PropTypes=r,r}});var Ii=ge((wg,Ni)=>{\"use strict\";Ni.exports=Fi()();var xg,yg});var Fe=ge((Qg,Ro)=>{\"use strict\";function tc(e){return e&&e.__esModule?e:{default:e}}Ro.exports=tc,Ro.exports.__esModule=!0,Ro.exports.default=Ro.exports});var Ne=ge(Tr=>{\"use strict\";\"use client\";Object.defineProperty(Tr,\"__esModule\",{value:!0});Object.defineProperty(Tr,\"default\",{enumerable:!0,get:function(){return oc.createSvgIcon}});var oc=require(\"@mui/material/utils\")});var Pr=ge(Jo=>{\"use strict\";\"use client\";var ac=Fe();Object.defineProperty(Jo,\"__esModule\",{value:!0});Jo.default=void 0;var rc=ac(Ne()),ic=require(\"react/jsx-runtime\"),ef=Jo.default=(0,rc.default)((0,ic.jsx)(\"path\",{d:\"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z\"}),\"CalendarToday\")});var yn=ge(Zo=>{\"use strict\";\"use client\";var nc=Fe();Object.defineProperty(Zo,\"__esModule\",{value:!0});Zo.default=void 0;var lc=nc(Ne()),sc=require(\"react/jsx-runtime\"),of=Zo.default=(0,lc.default)((0,sc.jsx)(\"path\",{d:\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39\"}),\"Public\")});var Xo=ge(Qo=>{\"use strict\";\"use client\";var dc=Fe();Object.defineProperty(Qo,\"__esModule\",{value:!0});Qo.default=void 0;var pc=dc(Ne()),cc=require(\"react/jsx-runtime\"),cf=Qo.default=(0,pc.default)((0,cc.jsx)(\"path\",{d:\"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z\"}),\"TrendingUp\")});var ta=ge(ea=>{\"use strict\";\"use client\";var uc=Fe();Object.defineProperty(ea,\"__esModule\",{value:!0});ea.default=void 0;var gc=uc(Ne()),fc=require(\"react/jsx-runtime\"),gf=ea.default=(0,gc.default)((0,fc.jsx)(\"path\",{d:\"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z\"}),\"TrendingDown\")});var On=ge(oa=>{\"use strict\";\"use client\";var mc=Fe();Object.defineProperty(oa,\"__esModule\",{value:!0});oa.default=void 0;var hc=mc(Ne()),bc=require(\"react/jsx-runtime\"),mf=oa.default=(0,hc.default)((0,bc.jsx)(\"path\",{d:\"M19 13H5v-2h14z\"}),\"Remove\")});var cl=ge(da=>{\"use strict\";\"use client\";var Tc=Fe();Object.defineProperty(da,\"__esModule\",{value:!0});da.default=void 0;var Pc=Tc(Ne()),Rc=require(\"react/jsx-runtime\"),Pf=da.default=(0,Pc.default)((0,Rc.jsx)(\"path\",{d:\"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2\"}),\"ShoppingCart\")});var Pl=ge(ca=>{\"use strict\";\"use client\";var Mc=Fe();Object.defineProperty(ca,\"__esModule\",{value:!0});ca.default=void 0;var Oc=Mc(Ne()),Lc=require(\"react/jsx-runtime\"),Of=ca.default=(0,Oc.default)((0,Lc.jsx)(\"path\",{d:\"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"}),\"MoreVert\")});var Rl=ge(ua=>{\"use strict\";\"use client\";var Vc=Fe();Object.defineProperty(ua,\"__esModule\",{value:!0});ua.default=void 0;var $c=Vc(Ne()),Fc=require(\"react/jsx-runtime\"),Vf=ua.default=(0,$c.default)((0,Fc.jsx)(\"path\",{d:\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3\"}),\"Visibility\")});var us=ge(Va=>{\"use strict\";\"use client\";var tu=Fe();Object.defineProperty(Va,\"__esModule\",{value:!0});Va.default=void 0;var ou=tu(Ne()),au=require(\"react/jsx-runtime\"),wm=Va.default=(0,ou.default)((0,au.jsx)(\"path\",{d:\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z\"}),\"ArrowBack\")});var gs=ge($a=>{\"use strict\";\"use client\";var ru=Fe();Object.defineProperty($a,\"__esModule\",{value:!0});$a.default=void 0;var iu=ru(Ne()),nu=require(\"react/jsx-runtime\"),vm=$a.default=(0,iu.default)((0,nu.jsx)(\"path\",{d:\"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z\"}),\"Language\")});var Ls=ge(Fa=>{\"use strict\";\"use client\";var lu=Fe();Object.defineProperty(Fa,\"__esModule\",{value:!0});Fa.default=void 0;var su=lu(Ne()),du=require(\"react/jsx-runtime\"),Rm=Fa.default=(0,su.default)((0,du.jsx)(\"path\",{d:\"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z\"}),\"ArrowUpward\")});var Vs=ge(Na=>{\"use strict\";\"use client\";var pu=Fe();Object.defineProperty(Na,\"__esModule\",{value:!0});Na.default=void 0;var cu=pu(Ne()),uu=require(\"react/jsx-runtime\"),Om=Na.default=(0,cu.default)((0,uu.jsx)(\"path\",{d:\"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z\"}),\"ArrowDownward\")});var _s=ge(Ia=>{\"use strict\";\"use client\";var gu=Fe();Object.defineProperty(Ia,\"__esModule\",{value:!0});Ia.default=void 0;var fu=gu(Ne()),mu=require(\"react/jsx-runtime\"),Im=Ia.default=(0,fu.default)((0,mu.jsx)(\"path\",{d:\"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"}),\"ChevronLeft\")});var Ws=ge(Aa=>{\"use strict\";\"use client\";var hu=Fe();Object.defineProperty(Aa,\"__esModule\",{value:!0});Aa.default=void 0;var bu=hu(Ne()),xu=require(\"react/jsx-runtime\"),zm=Aa.default=(0,bu.default)((0,xu.jsx)(\"path\",{d:\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"}),\"ChevronRight\")});var Gu={};Wp(Gu,{CategoriesFullView:()=>dr,ConversionRateChart:()=>qt,ConversionRateFullView:()=>fo,DATE_RANGE_LABELS:()=>Wr,DAYS_MAP:()=>_r,DashboardHeader:()=>ro,DataTable:()=>et,FilterBar:()=>$p,MARKET_MULTIPLIERS:()=>Qr,MysiteDashboardWithNavigation:()=>np,MysiteHero:()=>kr,NsCategoryNavigation:()=>Uo,NsProductCard:()=>jo,PageHeader:()=>pe,Pagination:()=>tt,PoDashboardWithNavigation:()=>Mp,ProductCarousel:()=>To,ProductOfferDashboard:()=>ur,ProductOfferDashboardTranslationKeys:()=>$,ProductTabCarousel:()=>Zi,ProductsFullView:()=>go,ShoppingDashboard:()=>La,ShoppingDashboardTranslationKeys:()=>o,SignupsChart:()=>$o,SignupsFullView:()=>or,StatsCard:()=>wt,TopCategoriesPieChart:()=>Fo,TopPerformingOffersFullView:()=>fr,TopPerformingOffersPieChart:()=>No,TopSellingProductsList:()=>Ut,WidgetMenu:()=>Qe,applyMarketMultiplier:()=>Np,calculatePercentage:()=>Gs,calculateTotalPages:()=>ot,formatDateRange:()=>Js,formatDateRangeLabel:()=>ce,formatDisplayDate:()=>Ha,formatISODate:()=>Zs,formatShortDate:()=>jr,getDateRangeLabel:()=>Ea,getDaysFromDateRange:()=>Ys,getMarketDisplayName:()=>Ip,getMarketMultiplier:()=>Xr,getTranslation:()=>a,getTrendColor:()=>Fn,getTrendIcon:()=>yt,mockCategories:()=>Jr,mockConversionData:()=>br,mockOrders:()=>xr,mockProductOfferStats:()=>Zt,mockSignupData:()=>Yr,mockSignupDetails:()=>Zr,mockStats:()=>Gr,mockTopOffers:()=>Fp,mockTopProducts:()=>hr,paginateItems:()=>at,sortByNumericProperty:()=>qs});module.exports=jp(Gu);var di=require(\"react\"),pi=require(\"@nuskin/foundation-ui-components\");var Rt=require(\"@nuskin/foundation-theme\"),oi=(0,Rt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,ai=(0,Rt.styled)(\"button\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${e=>e.isMobile?\"410px\":\"513px\"};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`,ri=(0,Rt.styled)(\"div\")`\n width: '240px';\n height: '240px';\n background: ${e=>e.bgColor??\"#f5f5f5\"};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`,ii=(0,Rt.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,ni=(0,Rt.styled)(\"div\")`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`,yr=(0,Rt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,li=(0,Rt.styled)(\"button\")`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${e=>e.disabled?\"#999\":\"#fff\"};\n background-color: ${e=>e.disabled?\"#e0e0e0\":!e.isMobile&&e.isHovered?\"#888\":\"#000\"};\n border: ${e=>e.disabled?\"1px solid #ccc\":\"none\"};\n cursor: ${e=>e.disabled?\"not-allowed\":\"pointer\"};\n opacity: ${e=>e.disabled?.6:1};\n transition: ${e=>e.isMobile?\"none\":\"all 0.3s ease\"};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`,si=(0,Rt.styled)(\"span\")`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${e=>e.disabled?.5:1};\n`;var ci=require(\"@mui/material\"),Be=require(\"react/jsx-runtime\"),Kp=({productTitle:e,imageDetails:t,className:r,button:i,onCardClick:n,productStatusBadge:s,directSellerBadge:u,mySitePriceComponent:m,testId:w})=>{let[S,g]=(0,di.useState)(!1),d=(0,ci.useMediaQuery)(\"(max-width: 560px)\"),b=x=>{let D=x.target,p=t?.fallbackImage;p&&D.src!==p&&(D.src=p)};return(0,Be.jsxs)(ai,{className:r,onClick:n,tabIndex:0,\"data-testid\":\"product-card\",isMobile:d,children:[(0,Be.jsx)(ri,{bgColor:t?.bgColor,onError:b,children:t?.imageSrc?(0,Be.jsx)(pi.NsImage,{\"data-testid\":w??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,Be.jsx)(ii,{alt:\"\"})}),(0,Be.jsx)(ni,{title:e,\"data-testid\":\"product-title\",children:e}),u&&(0,Be.jsx)(yr,{children:u}),(0,Be.jsx)(yr,{children:s}),(0,Be.jsx)(oi,{children:m}),i?.showButton&&(0,Be.jsxs)(li,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":i.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:i?.disabled??!1,isMobile:d,isHovered:S,onClick:x=>{x.stopPropagation(),i?.disabled||i.onClick?.()},onMouseEnter:()=>{!d&&!i?.disabled&&g(!0)},onMouseLeave:()=>{d||g(!1)},children:[(0,Be.jsx)(si,{className:\"cart-icon\",disabled:i?.disabled,children:(0,Be.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,Be.jsx)(\"path\",{fillRule:\"evenodd\",clipRule:\"evenodd\",d:\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\",fill:i?.disabled?\"#999\":\"#ffffff\"})})}),i.buttonText||\"ADD TO CART\"]})]})},jo=Kp;var Do=require(\"react\"),Ti=R(require(\"react-slick\")),Pi=R(require(\"@mui/material/useMediaQuery\"));var Ri=require(\"@nuskin/foundation-ui-components\");var $e=require(\"@nuskin/foundation-theme\"),to=R(require(\"@mui/material/Box\")),ui=require(\"@nuskin/foundation-ui-components\"),gi=(0,$e.styled)(to.default)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`,fi=(0,$e.styled)(\"div\")`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`,mi=(0,$e.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,hi=(0,$e.styled)(to.default)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`,bi=(0,$e.styled)(to.default)`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({$isMobile:e})=>e?0:\"24px\"};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`,xi=(0,$e.styled)(to.default)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`,yi=(0,$e.styled)(to.default)`\n display: flex;\n align-items: center;\n opacity: ${({$isDisabled:e})=>e?.3:1};\n pointer-events: ${({$isDisabled:e})=>e?\"none\":\"auto\"};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`,ng=(0,$e.styled)(\"div\")`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`,wi=(0,$e.styled)(ui.NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`,Ci=(0,$e.styled)(\"a\")`\n color: #000000;\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid #000000;\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: pointer;\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: #666666;\n border-bottom: 1px solid #666666;\n cursor: pointer;\n }\n`,vi=(0,$e.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,ki=(0,$e.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,Si=(0,$e.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,Di=(0,$e.styled)(\"div\")`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;var xe=require(\"react/jsx-runtime\");function To({entries:e,renderEntry:t,settings:r={},showControlButtons:i=!0,allEntryLabel:n=\"View All\",allEntryLink:s=\"\",categoryName:u,emptyProductMessage:m=\"No Products Available For The Selected Category\",productsCountLabel:w=\"Products\",isInitialDataLoading:S,history:g}){let d=(0,Do.useRef)(null),b=(0,Pi.default)(\"(max-width: 560px)\"),x=(0,Do.useCallback)(()=>{d.current?.slickPrev()},[]),D=(0,Do.useCallback)(()=>{d.current?.slickNext()},[]),p=t??((C,F)=>(0,xe.jsx)(jo,{productTitle:C.productTitle,imageDetails:C.imageDetails,button:C.button,onCardClick:C.onCardClick,productStatusBadge:C.productStatusBadge,directSellerBadge:C.directSeller,mySitePriceComponent:C.mySitePriceComponent},`${C.productTitle}-${F}`)),f={dots:!0,infinite:!0,speed:500,slidesToShow:Math.min(e?.length??0,4),slidesToScroll:4,swipe:!0,draggable:!0,arrows:!0,responsive:[{breakpoint:1320,settings:{slidesToShow:Math.min(e?.length??0,3),slidesToScroll:3}},{breakpoint:900,settings:{slidesToShow:Math.min(e?.length??0,2),slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1}}],...r},h=(e?.length??0)>f.slidesToShow,v=()=>e?.length===0&&!S?(0,xe.jsx)(vi,{children:m}):b?(0,xe.jsx)(fi,{children:(0,xe.jsx)(mi,{children:e.map((C,F)=>C&&p(C,F))})}):(0,xe.jsx)(Ti.default,{...f,ref:d,children:e.map((C,F)=>C&&p(C,F))});return(0,xe.jsxs)(gi,{children:[i&&(0,xe.jsxs)(hi,{children:[(0,xe.jsxs)(ki,{children:[(0,xe.jsxs)(Si,{children:[(0,xe.jsx)(xi,{children:(0,xe.jsxs)(wi,{variant:\"body-m\",children:[e?.length??0,\" \",w]})}),!b&&u&&(0,xe.jsx)(Di,{children:u})]}),(0,xe.jsx)(bi,{$isMobile:b,children:(0,xe.jsx)(Ci,{onClick:C=>{g&&(C.preventDefault(),g.push(s))},children:n})})]}),!b&&(0,xe.jsx)(yi,{$isDisabled:!h,children:(0,xe.jsx)(Ri.NsCarouselControl,{prev:x,next:D,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),v()]})}var Ue=require(\"react\"),Yi=require(\"@mui/material\");var Bi=R(require(\"react\")),Ei=R(require(\"@mui/material/Tabs\")),Hi=R(require(\"@mui/material/Tab\")),wr=R(require(\"@mui/material/Box\")),Ko=R(Ii());var Ai=require(\"@nuskin/foundation-theme\"),zi=Ai.styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;var _i=require(\"@mui/material\"),Mt=require(\"react/jsx-runtime\");function Wi(e){let{children:t,value:r,index:i,...n}=e;return(0,Mt.jsx)(\"div\",{role:\"tabpanel\",hidden:r!==i,id:`vertical-tabpanel-${i}`,\"aria-labelledby\":`vertical-tab-${i}`,...n,children:r===i&&(0,Mt.jsx)(wr.default,{className:\"tabPanel\",children:t})})}Wi.propTypes={children:Ko.default.node,index:Ko.default.number.isRequired,value:Ko.default.number.isRequired};var Uo=({itemArray:e,value:t,onChange:r})=>{let[i,n]=Bi.useState(0),s=(0,_i.useMediaQuery)(\"(max-width:768px)\"),u=t??i;return(0,Mt.jsx)(zi,{children:(0,Mt.jsxs)(wr.default,{className:\"tabContainer\",children:[(0,Mt.jsx)(Ei.default,{orientation:s?\"horizontal\":\"vertical\",variant:\"scrollable\",value:u,onChange:(w,S)=>{r?r(w,S):n(S)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(w=>(0,Mt.jsx)(Hi.default,{label:w.label,className:\"tabStyle\"},w.categoryId))}),e.map(w=>(0,Mt.jsx)(Wi,{value:u,index:e.findIndex(S=>S.categoryId===w.categoryId),children:w.content},w.categoryId))]})})};var Ji=require(\"@nuskin/foundation-ui-components\");var Kt=require(\"@nuskin/foundation-theme\"),ji=(0,Kt.styled)(\"div\")`\n display: flex;\n flex-direction: ${({isMobile:e})=>e?\"column\":\"row\"};\n align-items: ${({isMobile:e})=>e?\"stretch\":\"flex-start\"};\n width: 100%;\n max-width: 1920px;\n min-height: ${({isMobile:e})=>e?\"auto\":\"800px\"};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({isMobile:e})=>e?\"10px 16px 0px 16px\":\"50px 60px 0px 60px\"};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`,Ki=(0,Kt.styled)(\"div\")`\n min-width: ${({isMobile:e})=>e?\"100%\":\"auto\"};\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`,Ui=(0,Kt.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n height: ${({isMobile:e})=>e?\"auto\":\"100%\"};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`,Tg=(0,Kt.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`,qi=(0,Kt.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`,Gi=(0,Kt.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var ht=require(\"react/jsx-runtime\"),Gp=({allEntryLabel:e,allEntryLink:t,renderEntry:r,settings:i,showControlButtons:n=!0,fetchCategories:s,fetchProducts:u,showCustomCategory:m=!1,emptyProductTabs:w=\"No tabs available\",emptyProductMessage:S,productsCountLabel:g,getCategoryId:d,history:b})=>{let x=(0,Yi.useMediaQuery)(\"(max-width:768px)\"),[D,p]=(0,Ue.useState)(!0),[f,h]=(0,Ue.useState)([]),[v,C]=(0,Ue.useState)(0),[F,j]=(0,Ue.useState)([]),[B,Q]=(0,Ue.useState)(!1),[l,c]=(0,Ue.useState)(!0),y=(0,Ue.useCallback)(()=>{let N=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');c(N.length===0)},[]);(0,Ue.useEffect)(()=>{B&&y()},[B,y]),(0,Ue.useEffect)(()=>{s().then(h)},[s]),(0,Ue.useEffect)(()=>{if(f.length>0){let N=f[v]?.categoryId;d&&d(N),Q(!0),u(N).then(j).finally(()=>{Q(!1),p(!1)})}},[f,v,u]);let T=f.map(N=>({label:N.label,content:\"\",categoryId:N.categoryId}));return(0,ht.jsxs)(ji,{isMobile:x,children:[m&&(T.length>0?(0,ht.jsx)(Ki,{isMobile:x,children:(0,ht.jsx)(Uo,{itemArray:T,value:v,onChange:(N,K)=>C(K)})}):(0,ht.jsx)(qi,{children:w})),(0,ht.jsx)(Ui,{isMobile:x,children:B?(0,ht.jsx)(Gi,{children:l&&(0,ht.jsx)(Ji.NsSpinner,{})}):(0,ht.jsx)(To,{isInitialDataLoading:D,entries:F,allEntryLabel:e,allEntryLink:t,renderEntry:r?N=>r({...N,productStatusBadge:N.productStatusBadge}):void 0,settings:i,showControlButtons:n,categoryName:f[v]?.label,emptyProductMessage:S,productsCountLabel:g,history:b})})]})},Zi=Gp;var pt=require(\"react\"),oe=require(\"@mui/material\"),Po=require(\"@nuskin/foundation-ui-components\");var bt=require(\"@nuskin/foundation-theme\"),oo=require(\"@mui/material\"),qo=require(\"react/jsx-runtime\"),Cr=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),Xi=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),en=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),Qi=e=>({...Cr(e),paddingBottom:\"11px\",wordBreak:\"break-all\",overflowWrap:\"break-word\",paddingLeft:\"5px\",\"& a\":{color:\"inherit\",textDecoration:\"none\"},\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"15px\",paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"14px\",paddingBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"12px\",paddingBottom:\"4px\"}}),Yp=e=>({...Xi(e),marginBottom:\"11px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"@media (max-width: 420px)\":{fontSize:\"11px\",lineHeight:\"14px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"10px\",lineHeight:\"12px\",marginBottom:\"5px\"},\"@media (max-width: 375px)\":{fontSize:\"8px\",lineHeight:\"11px\",marginBottom:\"4px\"}}),tn=(0,bt.styled)(e=>(0,qo.jsx)(oo.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:r})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",height:\"auto\",flexDirection:\"row\",alignItems:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content\":{paddingTop:\"0\",justifyContent:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title\":{fontSize:\"26px\",lineHeight:\"34px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"90px\",height:\"90px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{\"& > div\":{width:\"90px\",height:\"90px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".content\":{width:\"70%\",height:\"100%\",marginLeft:\"2%\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image\":{width:\"252px\",height:\"252px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"3px\":\"0px\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}},\".body-title\":{fontSize:\"32px\",lineHeight:\"38px\",marginBottom:\"8px\",fontWeight:\"400\",color:r?\"#000000\":\"#FFFFFF\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-text\":{fontSize:\"16px\",marginBottom:\"12px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"22px\",color:r?\"#000000\":\"#FFFFFF\",fontFamily:e?.paragraphFont??\"inherit\",display:\"-webkit-box\",WebkitBoxOrient:\"vertical\",overflow:\"hidden\",WebkitLineClamp:3,textOverflow:\"ellipsis\",paddingLeft:\"5px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".social-media\":{display:\"flex\",flexDirection:\"column\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\"},\".email-text\":Cr(r),\".phone-text\":Cr(r),\".social-title-text\":{...Xi(r),marginBottom:\"8px\"},\".social-icons\":{...en(),paddingBottom:\"8px\"}})),on=(0,bt.styled)(e=>(0,qo.jsx)(oo.Box,{...e}))(({bannerProps:e,isCircularImage:t,hasWhiteBackground:r})=>({backgroundClip:\"border-box\",display:\"flex\",background:e?.backgroundColor??\"#383838\",position:\"relative\",overflow:\"hidden\",width:\"100%\",flexDirection:\"column\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"transform, opacity\",transform:\"translateZ(0)\",backfaceVisibility:\"hidden\",\"&.scrolled\":{top:0,left:0,right:0,boxShadow:\"0 2px 8px rgba(0,0,0,0.2)\",\".content-mobile\":{paddingTop:\"5px\",width:\"60%\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".body-title-mobile\":{fontSize:\"18px\",lineHeight:\"28px\",marginBottom:\"0\",fontStyle:\"normal\",fontWeight:\"400\",fontFamily:e?.headlineFont??\"Lora\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"},\".bg-image-mobile\":{width:\"75px\",height:\"75px\",padding:t?\"2px\":\"0px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",objectFit:\"cover\",objectPosition:\"center\"},\".placeholder-image-mobile\":{\"& > div\":{width:\"75px !important\",height:\"75px !important\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\"}}},\".image-content-mobile\":{display:\"flex\",flexDirection:\"row\",width:\"100%\",justifyContent:\"center\",alignItems:\"center\"},\".content-mobile\":{width:\"55%\",height:\"100%\",paddingTop:\"10px\",paddingRight:\"10px\",marginLeft:\"8px\",marginRight:\"auto\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",position:\"relative\",boxSizing:\"border-box\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{paddingTop:\"8px\",width:\"100%\"},\"@media (max-width: 400px)\":{paddingTop:\"6px\",width:\"100%\",height:\"100%\"},\"@media (max-width: 375px)\":{paddingTop:\"4px\",width:\"100%\",height:\"100%\"}},\".bg-image-mobile\":{width:\"144px\",height:\"144px\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",objectFit:\"cover\",objectPosition:\"center\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",padding:t?\"2px\":\"0px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"112px\",height:\"112px\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}},\".placeholder-image-mobile\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",willChange:\"width, height, transform\",\"& > div\":{transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",width:\"144px\",height:\"144px\",\"@media (max-width: 420px)\":{width:\"120px\",height:\"120px\"},\"@media (max-width: 400px)\":{width:\"110px !important\",height:\"110px !important\"},\"@media (max-width: 375px)\":{width:\"90px\",height:\"90px\"}}},\".body-title-mobile\":{fontSize:\"22px\",lineHeight:\"28px\",marginBottom:\"13px\",fontWeight:\"400\",color:r?\"#000000\":\"#FFFFFF\",fontStyle:\"normal\",overflow:\"hidden\",whiteSpace:\"nowrap\",textOverflow:\"ellipsis\",fontFamily:e?.headlineFont??\"Lora\",paddingLeft:\"5px\",transition:\"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)\",\"@media (max-width: 420px)\":{fontSize:\"16px\",lineHeight:\"24px\",marginBottom:\"8px\"},\"@media (max-width: 400px)\":{fontSize:\"16px\",lineHeight:\"22px\",marginBottom:\"6px\"},\"@media (max-width: 375px)\":{fontSize:\"14px\",lineHeight:\"20px\",marginBottom:\"4px\"}},\".body-text-mobile\":{fontSize:\"14px\",padding:\"20px 25px 20px 25px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",backgroundColor:\"#E0E0E0\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"all 0.25s cubic-bezier(0.4, 0, 0.2, 1)\",opacity:1,transform:\"translateY(0)\"},\".expandable-description-mobile\":{backgroundColor:\"#E0E0E0\",position:\"relative\"},\".description-content-mobile\":{fontSize:\"14px\",padding:\"10px 15px\",fontStyle:\"normal\",fontWeight:\"400\",lineHeight:\"20px\",color:\"#252525\",fontFamily:e?.paragraphFont??\"inherit\",transition:\"max-height 0.3s ease-in-out, opacity 0.3s ease-in-out\",overflow:\"hidden\",position:\"relative\",\"&.collapsed\":{maxHeight:\"50px\",display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",\"&::after\":{content:'\"\"',position:\"absolute\",bottom:0,left:0,right:0,height:\"20px\",background:\"linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)\",pointerEvents:\"none\"}},\"&.expanded\":{maxHeight:\"none\",whiteSpace:\"normal\",display:\"block\",\"&::after\":{display:\"none\"}}},\".email-text-mobile\":Qi(r),\".phone-text-mobile\":Qi(r),\".social-title-text-mobile\":Yp(r),\".social-icons-mobile\":{...en(),paddingBottom:\"10px\",transition:\"opacity 0.3s ease-out, transform 0.3s ease-out\",opacity:1,transform:\"translateY(0)\",\"& img\":{width:\"24px\",height:\"24px\",\"@media (max-width: 400px)\":{width:\"20px\",height:\"20px\"},\"@media (max-width: 375px)\":{width:\"18px\",height:\"18px\"}},\"@media (max-width: 420px)\":{paddingBottom:\"8px\"},\"@media (max-width: 400px)\":{paddingBottom:\"4px\"},\"@media (max-width: 375px)\":{paddingBottom:\"3px\"}}})),an=(0,bt.styled)(oo.Box)({display:\"flex\",gap:\"12px\",marginBottom:\"16px\",paddingLeft:\"5px\",\"&.mobile-badges\":{flexDirection:\"column\",gap:\"8px\",marginBottom:\"12px\"},\"&.tablet-badges\":{flexDirection:\"row\",gap:\"12px\",marginBottom:\"8px\"}}),rn=(0,bt.styled)(e=>(0,qo.jsx)(oo.Box,{...e}))(({hasWhiteBackground:e})=>({backgroundColor:\"rgba(255, 255, 255, 0.2)\",backdropFilter:\"blur(10px)\",borderRadius:\"20px\",padding:\"8px 16px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",border:\"1px solid rgba(255, 255, 255, 0.3)\",transition:\"all 0.3s ease\",\"&.mobile-badge\":{padding:\"6px 12px\",borderRadius:\"16px\",fontSize:\"12px\"},\"&.tablet-badge\":{padding:\"8px 16px\",borderRadius:\"20px\",fontSize:\"14px\"},\"&:hover\":{backgroundColor:\"rgba(255, 255, 255, 0.3)\",transform:\"translateY(-1px)\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.1)\"},\".badge-text\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"400\",opacity:.9},\".badge-value\":{color:e?\"#000000\":\"#FFFFFF\",fontWeight:\"600\"}})),nn=(0,bt.styled)(\"button\")({backgroundColor:\"#E0E0E0\",border:\"1px solid #252525\",borderRadius:\"10px\",cursor:\"pointer\",width:\"40px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"10px auto 5px auto\",transition:\"all 0.2s ease\",\"& .arrow-icon-mobile\":{transition:\"transform 0.3s ease\",\"&.expanded\":{transform:\"rotate(180deg)\"}}}),ln=(0,bt.styled)(oo.Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`,sn=(0,bt.styled)(\"span\")`\n line-height: 0.5;\n`,dn=(0,bt.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),pn=(0,bt.styled)(\"span\")({});var cn=require(\"@mui/material\"),xt=require(\"react/jsx-runtime\"),un=({width:e,height:t,backgroundColor:r})=>(0,xt.jsx)(cn.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:r},\"data-testid\":\"placeholder-image\",children:(0,xt.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,xt.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,xt.jsx)(\"path\",{id:\"Vector\",d:\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\",fill:\"#252525\"}),(0,xt.jsx)(\"path\",{id:\"Vector_2\",d:\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\",fill:\"#252525\"}),(0,xt.jsx)(\"path\",{id:\"Vector_3\",d:\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\",fill:\"#252525\"}),(0,xt.jsx)(\"path\",{id:\"Vector_4\",d:\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\",fill:\"#252525\"}),(0,xt.jsx)(\"path\",{id:\"Vector_5\",d:\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\",fill:\"#252525\"})]})})});var vr=require(\"react/jsx-runtime\"),gn=({width:e=16,height:t=16,className:r=\"\"})=>(0,vr.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:r,\"data-testid\":\"arrow-down-icon\",children:(0,vr.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function Go(e){if(typeof window>\"u\")return;let t=window.location.href,r={...e},i=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";r.event=i+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(r)}catch(n){console.error(\"Failed to track GTM event:\",n)}}var z=require(\"react/jsx-runtime\"),fn=(e,t,r)=>{let i=r.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,z.jsx)(sn,{tabIndex:0,children:(0,z.jsx)(Po.NsImage,{className:r,src:e.imageSrc,alt:e.imageAlt})}):(0,z.jsx)(oe.Box,{className:i,children:(0,z.jsx)(un,{width:r.includes(\"mobile\")?\"144px\":\"246px\",height:r.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},mn=(e,t,r,i)=>!e||!t?null:(0,z.jsx)(an,{className:r?\"mobile-badges\":\"tablet-badges\",children:t&&(0,z.jsx)(rn,{className:r?\"mobile-badge\":\"tablet-badge\",hasWhiteBackground:i,tabIndex:0,children:(0,z.jsx)(pn,{className:\"badge-value\",children:t})})}),Jp=(e,t,r,i,n)=>{let{shopTitle:s,socialTitleText:u,email:m,showBadges:w,expirationDate:S,phone:g}=e;return(0,z.jsxs)(oe.Box,{className:\"content-mobile\",children:[(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"body-title-mobile\",children:s}),!t&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"social-title-text-mobile\",children:u}),Yo(\"email\",m,\"email-text-mobile\"),Yo(\"phone\",g,\"phone-text-mobile\"),(0,z.jsx)(oe.Box,{className:\"social-icons-mobile\",children:r}),mn(w,S??\"\",i,n)]})]})},Zp=(e,t,r,i,n)=>{let{shopTitle:s,shopDescription:u,socialTitleText:m,email:w,phone:S,showBadges:g,expirationDate:d}=e;return(0,z.jsxs)(oe.Box,{className:\"content\",children:[(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"body-title\",children:s}),!t&&(0,z.jsxs)(z.Fragment,{children:[u?.length>480?(0,z.jsx)(oe.Tooltip,{title:u,arrow:!0,children:(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"body-text\",children:u})}):(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"body-text\",children:u}),(0,z.jsxs)(oe.Box,{className:\"social-media\",children:[(0,z.jsx)(oe.Typography,{tabIndex:0,className:\"social-title-text\",children:m}),(0,z.jsxs)(oe.Box,{className:\"social-icons\",children:[r,Yo(\"email\",w,\"email-text\"),Yo(\"phone\",S,\"phone-text\")]})]}),mn(g,d??\"\",i,n)]})]})},Qp=e=>new Promise((t,r)=>{let i=new Image;i.crossOrigin=\"anonymous\",i.src=e,i.onload=()=>{let n=document.createElement(\"canvas\"),s=n.getContext(\"2d\");if(!s)return r(new Error(\"Canvas not supported\"));n.width=i.width,n.height=i.height,s.drawImage(i,0,0);let m=[s.getImageData(0,0,1,1).data,s.getImageData(i.width-1,0,1,1).data,s.getImageData(0,i.height-1,1,1).data,s.getImageData(i.width-1,i.height-1,1,1).data].every(w=>Array.prototype.slice.call(w)[3]<10);t(m)},i.onerror=()=>r(new Error(\"Failed to load image\"))}),Xp=e=>{if(!e)return!1;let t=e.replace(\"#\",\"\").toLowerCase();if(!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(t))return!1;let r=t;(t.length===3||t.length===4)&&(r=t.split(\"\").map(m=>m+m).join(\"\"));let i=Number.parseInt(r.substring(0,2),16),n=Number.parseInt(r.substring(2,4),16),s=Number.parseInt(r.substring(4,6),16),u=220;return i>=u&&n>=u&&s>=u},ec=(e,t)=>({onClick:()=>{Go({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:r=>{(r.key===\"Enter\"||r.key===\" \")&&(r.preventDefault(),Go({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),Yo=(e,t,r)=>{let i=e===\"email\"?\"mailto:\":\"tel:\",n=ec(e,t);return(0,z.jsx)(oe.Typography,{className:r,children:(0,z.jsx)(dn,{href:`${i}${t}`,...n,children:t})})};function kr({className:e,shopTitle:t,shopDescription:r,socialTitleText:i,imageDetails:n,email:s,phone:u,bannerProps:m,socialIcons:w,expirationDate:S,showBadges:g=!1}){let d=(0,oe.useMediaQuery)(\"(max-width: 560px)\"),[b,x]=(0,pt.useState)(!1),[D,p]=(0,pt.useState)(!1),[f,h]=(0,pt.useState)(!1),[v,C]=(0,pt.useState)(!1),F=()=>{p(!D)};(0,pt.useEffect)(()=>{(async()=>{if(n?.imageSrc){let T=await Qp(n.imageSrc);C(T)}else C(!1)})()},[n?.imageSrc]),(0,pt.useEffect)(()=>{h(Xp(m?.backgroundColor))},[m?.backgroundColor]),(0,pt.useEffect)(()=>{let y,T=window.scrollY,N=!1,K=!1,q=0,be=se=>{let ft=Date.now();if(N!==se&&!K){if(ft-q<100)return;K=!0,N=se,q=ft,se&&p(!1),clearTimeout(y),x(se),y=setTimeout(()=>{K=!1,se&&window.scrollY<15&&window.scrollTo({top:d?20:30,behavior:\"smooth\"})},300)}},Oe=()=>{let se=window.scrollY;if(K){T=se;return}if(Math.abs(se-T)<.5)return;let mt=se>T,Et=d?15:25,ko=d?8:12;mt&&se>Et&&!N?be(!0):!mt&&se<ko&&N&&be(!1),T=se},vo=()=>{let se=window.scrollY,mt=se>(d?5:10);N=mt,x(mt),T=se,q=Date.now()},lt=null,Qt=0,Lt=()=>{lt||Date.now()-Qt<16||(lt=requestAnimationFrame(()=>{Oe(),Qt=Date.now(),lt=null}))};return vo(),window.addEventListener(\"scroll\",Lt,{passive:!0}),()=>{window.removeEventListener(\"scroll\",Lt),lt&&cancelAnimationFrame(lt),clearTimeout(y)}},[d]);let j=(0,pt.useMemo)(()=>w?.map((y,T)=>(0,z.jsx)(ln,{onClick:K=>{K.preventDefault(),Go({event:\"social_click\",social_platform:y.type,social_url:y.url,click_element:\"social_icon\"}),window.open(y.url,\"_blank\")},children:(0,z.jsx)(Po.NsLink,{href:y.url,target:\"_blank\",children:(0,z.jsx)(Po.NsImage,{src:`https://www.google.com/s2/favicons?domain=${y?.url}&sz=24`,alt:`${y.type} icon`,width:\"24\",height:\"24\"},y?.type+T)})},y?.type+T)),[w]),B=`${e} ${b?\"scrolled\":\"\"}`,Q={shopTitle:t,shopDescription:r,socialTitleText:i,email:s,phone:u,showBadges:g,expirationDate:S},l=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,c=d&&r&&r.length>l();return d?(0,z.jsxs)(on,{className:B,\"data-testid\":\"my-site-shop-header\",bannerProps:m,isCircularImage:v,hasWhiteBackground:f,children:[(0,z.jsxs)(oe.Box,{className:\"image-content-mobile\",children:[fn(n,m??{},\"bg-image-mobile\"),Jp(Q,b,j,d,f)]}),!b&&(0,z.jsxs)(oe.Box,{className:\"expandable-description-mobile\",children:[(0,z.jsx)(oe.Typography,{className:`description-content-mobile ${D||!c?\"expanded\":\"collapsed\"}`,children:r}),c&&(0,z.jsx)(nn,{onClick:F,children:(0,z.jsx)(gn,{width:16,height:16,className:`arrow-icon-mobile ${D?\"expanded\":\"\"}`})})]})]}):(0,z.jsxs)(tn,{className:B,\"data-testid\":\"my-site-shop-header\",bannerProps:m,isCircularImage:v,hasWhiteBackground:f,children:[fn(n,m??{},\"bg-image\"),Zp(Q,b,j,d,f)]})}var ao=require(\"@nuskin/foundation-theme\"),Sr=(0,ao.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 24px;\n gap: 32px;\n }\n\n @media (min-width: 1080px) {\n padding: 32px;\n gap: 40px;\n }\n`,hn=(0,ao.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,bn=(0,ao.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,Dr=(0,ao.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,xn=(0,ao.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var Pn=R(Pr()),Rn=R(yn()),Mn=require(\"@nuskin/foundation-ui-components\");var Ie=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ct}=Ie.ColorUtils,wn=(0,Ie.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>ct(e,\"N20\")};\n border-radius: 12px;\n min-height: 64px;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px 32px;\n }\n`,Cn=(0,Ie.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`,vn=(0,Ie.styled)(\"h1\")`\n font-size: 20px;\n font-weight: 600;\n line-height: 1.3;\n color: ${({theme:e})=>ct(e,\"N100\")};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`,kn=(0,Ie.styled)(\"div\")`\n font-size: 13px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>ct(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Sn=(0,Ie.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,Rr=(0,Ie.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`,Mr=(0,Ie.styled)(\"label\")`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({theme:e})=>ct(e,\"N80\")};\n white-space: nowrap;\n display: none;\n\n @media (min-width: 1080px) {\n display: block;\n }\n`,Or=(0,Ie.styled)(\"select\")`\n display: flex;\n align-items: center;\n gap: 12px;\n height: 40px;\n padding: 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>ct(e,\"N70\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n padding-right: 32px;\n min-width: auto;\n\n &:hover {\n background-color: ${({theme:e})=>ct(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ct(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ct(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 160px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({theme:e})=>ct(e,\"N10\")};\n border: 1px solid ${({theme:e})=>ct(e,\"N40\")};\n border-radius: 8px;\n min-width: 180px;\n }\n`,Lr=(0,Ie.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>ct(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`,Dn=(0,Ie.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`,Tn=(0,Ie.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,rf=(0,Ie.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`;var o={title:{key:\"shoppingDashboard.title\",fallback:\"Shop Performance\"},error:{key:\"shoppingDashboard.error\",fallback:\"Error loading dashboard\"},stats:{revenue:{key:\"shoppingDashboard.stats.revenue\",fallback:\"Total Revenue\"},volume:{key:\"shoppingDashboard.stats.volume\",fallback:\"Volume\"},visits:{key:\"shoppingDashboard.stats.visits\",fallback:\"Site Visits\"},subtitle:{dcSv:{key:\"shoppingDashboard.stats.subtitle.dcSv\",fallback:\"DC-SV\"},conversionRate:{key:\"shoppingDashboard.stats.subtitle.conversionRate\",fallback:\"Conversion Rate\"}},trend:{increased:{key:\"shoppingDashboard.stats.trend.increased\",fallback:\"increased\"},decreased:{key:\"shoppingDashboard.stats.trend.decreased\",fallback:\"decreased\"},unchanged:{key:\"shoppingDashboard.stats.trend.unchanged\",fallback:\"unchanged\"}},details:{key:\"shoppingDashboard.stats.details\",fallback:\"details\"}},filter:{dateRange:{label:{key:\"shoppingDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"shoppingDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"shoppingDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"shoppingDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"shoppingDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},dateRangeLabel:{key:\"shoppingDashboard.filter.dateRangeLabel\",fallback:\"Date Range\"},market:{label:{key:\"shoppingDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"shoppingDashboard.filter.market.all\",fallback:\"All Markets\"},us:{key:\"shoppingDashboard.filter.market.us\",fallback:\"United States\"},ca:{key:\"shoppingDashboard.filter.market.ca\",fallback:\"Canada\"},jp:{key:\"shoppingDashboard.filter.market.jp\",fallback:\"Japan\"},kr:{key:\"shoppingDashboard.filter.market.kr\",fallback:\"Korea\"},au:{key:\"shoppingDashboard.filter.market.au\",fallback:\"Australia\"},nz:{key:\"shoppingDashboard.filter.market.nz\",fallback:\"New Zealand\"}},marketLabel:{key:\"shoppingDashboard.filter.marketLabel\",fallback:\"Market\"},productSort:{label:{key:\"shoppingDashboard.filter.productSort.label\",fallback:\"Sort By\"},units:{key:\"shoppingDashboard.filter.productSort.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.filter.productSort.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.filter.productSort.volume\",fallback:\"Volume\"},byUnits:{key:\"shoppingDashboard.filter.productSort.byUnits\",fallback:\"By: Units\"},byRevenue:{key:\"shoppingDashboard.filter.productSort.byRevenue\",fallback:\"By: Revenue\"},byVolume:{key:\"shoppingDashboard.filter.productSort.byVolume\",fallback:\"By: Volume\"}},signupView:{label:{key:\"shoppingDashboard.filter.signupView.label\",fallback:\"Show\"},all:{key:\"shoppingDashboard.filter.signupView.all\",fallback:\"All\"},members:{key:\"shoppingDashboard.filter.signupView.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.filter.signupView.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.filter.signupView.brandAffiliates\",fallback:\"Brand Affiliates\"},showAll:{key:\"shoppingDashboard.filter.signupView.showAll\",fallback:\"Show: All\"},showMembers:{key:\"shoppingDashboard.filter.signupView.showMembers\",fallback:\"Show: Members\"},showRetail:{key:\"shoppingDashboard.filter.signupView.showRetail\",fallback:\"Show: Retail\"},showBrandAffiliates:{key:\"shoppingDashboard.filter.signupView.showBrandAffiliates\",fallback:\"Show: Brand Affiliates\"}},categorySort:{byRevenue:{key:\"shoppingDashboard.filter.categorySort.byRevenue\",fallback:\"By: Revenue\"},byUnits:{key:\"shoppingDashboard.filter.categorySort.byUnits\",fallback:\"By: Units\"}}},widget:{topProducts:{title:{key:\"shoppingDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},viewAll:{key:\"shoppingDashboard.widget.topProducts.viewAll\",fallback:\"View All Products\"},units:{key:\"shoppingDashboard.widget.topProducts.units\",fallback:\"Units\"},revenue:{key:\"shoppingDashboard.widget.topProducts.revenue\",fallback:\"Revenue\"},loading:{key:\"shoppingDashboard.widget.topProducts.loading\",fallback:\"Loading products...\"},empty:{key:\"shoppingDashboard.widget.topProducts.empty\",fallback:\"No products available\"},ariaLabel:{key:\"shoppingDashboard.widget.topProducts.ariaLabel\",fallback:\"Top Selling Products widget\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topProducts.titleAriaLabel\",fallback:\"Click to view full top products details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topProducts.sortAriaLabel\",fallback:\"Sort products by\"},noImageAriaLabel:{key:\"shoppingDashboard.widget.topProducts.noImageAriaLabel\",fallback:\"No image available\"},unitsSuffix:{key:\"shoppingDashboard.widget.topProducts.unitsSuffix\",fallback:\"units\"},revenueSuffix:{key:\"shoppingDashboard.widget.topProducts.revenueSuffix\",fallback:\"revenue\"},dcSvSuffix:{key:\"shoppingDashboard.widget.topProducts.dcSvSuffix\",fallback:\"DC-SV\"},rank:{key:\"shoppingDashboard.widget.topProducts.rank\",fallback:\"Rank\"},trend:{key:\"shoppingDashboard.widget.topProducts.trend\",fallback:\"Trend\"}},conversionRate:{title:{key:\"shoppingDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},formula:{key:\"shoppingDashboard.widget.conversionRate.formula\",fallback:\"Orders \\xF7 Site visits\"},comparison:{key:\"shoppingDashboard.widget.conversionRate.comparison\",fallback:\"compared to this time last month\"},chartAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.chartAriaLabel\",fallback:\"Conversion Rate chart showing daily rates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.titleAriaLabel\",fallback:\"Click to view full conversion rate details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.conversionRate.filterAriaLabel\",fallback:\"Filter conversion rate by customer type\"},noData:{key:\"shoppingDashboard.widget.conversionRate.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.conversionRate.noChange\",fallback:\"No change\"},tooltipOrders:{key:\"shoppingDashboard.widget.conversionRate.tooltipOrders\",fallback:\"orders\"},tooltipVisits:{key:\"shoppingDashboard.widget.conversionRate.tooltipVisits\",fallback:\"visits\"},ordersPerSiteVisits:{key:\"shoppingDashboard.widget.conversionRate.ordersPerSiteVisits\",fallback:\"Orders / Site Visits\"}},signups:{title:{key:\"shoppingDashboard.widget.signups.title\",fallback:\"Sign-ups\"},total:{key:\"shoppingDashboard.widget.signups.total\",fallback:\"Total\"},members:{key:\"shoppingDashboard.widget.signups.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.widget.signups.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.widget.signups.brandAffiliates\",fallback:\"Brand Affiliates\"},chartAriaLabel:{key:\"shoppingDashboard.widget.signups.chartAriaLabel\",fallback:\"Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates\"},titleAriaLabel:{key:\"shoppingDashboard.widget.signups.titleAriaLabel\",fallback:\"Click to view full signups details page\"},filterAriaLabel:{key:\"shoppingDashboard.widget.signups.filterAriaLabel\",fallback:\"Filter signups view\"},noData:{key:\"shoppingDashboard.widget.signups.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.widget.signups.noChange\",fallback:\"No change\"},totalSignupsInPeriod:{key:\"shoppingDashboard.widget.signups.totalSignupsInPeriod\",fallback:\"Total sign-ups in period\"},noTrendData:{key:\"shoppingDashboard.widget.signups.noTrendData\",fallback:\"No sign-up trend data available.\"}},topCategories:{title:{key:\"shoppingDashboard.widget.topCategories.title\",fallback:\"Top Categories\"},revenue:{key:\"shoppingDashboard.widget.topCategories.revenue\",fallback:\"Revenue\"},units:{key:\"shoppingDashboard.widget.topCategories.units\",fallback:\"Units\"},empty:{key:\"shoppingDashboard.widget.topCategories.empty\",fallback:\"No category data available\"},chartAriaLabel:{key:\"shoppingDashboard.widget.topCategories.chartAriaLabel\",fallback:\"Top Categories donut chart showing revenue distribution by category\"},titleAriaLabel:{key:\"shoppingDashboard.widget.topCategories.titleAriaLabel\",fallback:\"Click to view full categories details page\"},sortAriaLabel:{key:\"shoppingDashboard.widget.topCategories.sortAriaLabel\",fallback:\"Sort categories by\"}},menu:{ariaLabel:{key:\"shoppingDashboard.widget.menu.ariaLabel\",fallback:\"widget options\"},fullView:{key:\"shoppingDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{backToDashboard:{key:\"shoppingDashboard.navigation.backToDashboard\",fallback:\"Back to Dashboard\"},backAriaLabel:{key:\"shoppingDashboard.navigation.backAriaLabel\",fallback:\"Back to dashboard\"}},ariaLabel:{dashboard:{key:\"shoppingDashboard.ariaLabel.dashboard\",fallback:\"Shopping Dashboard\"},statsRow:{key:\"shoppingDashboard.ariaLabel.statsRow\",fallback:\"Key performance metrics\"},dashboardFilters:{key:\"shoppingDashboard.ariaLabel.dashboardFilters\",fallback:\"Dashboard filters\"},loadingDashboard:{key:\"shoppingDashboard.ariaLabel.loadingDashboard\",fallback:\"Loading dashboard data\"},dateRangeFilter:{key:\"shoppingDashboard.ariaLabel.dateRangeFilter\",fallback:\"Date range filter, currently selected:\"},marketFilter:{key:\"shoppingDashboard.ariaLabel.marketFilter\",fallback:\"Market filter, currently selected:\"},filterSuffix:{key:\"shoppingDashboard.ariaLabel.filterSuffix\",fallback:\"filter\"}},fullView:{signups:{columns:{id:{key:\"shoppingDashboard.fullView.signups.columns.id\",fallback:\"ID\"},name:{key:\"shoppingDashboard.fullView.signups.columns.name\",fallback:\"Name\"},date:{key:\"shoppingDashboard.fullView.signups.columns.date\",fallback:\"Date\"},type:{key:\"shoppingDashboard.fullView.signups.columns.type\",fallback:\"Type\"},email:{key:\"shoppingDashboard.fullView.signups.columns.email\",fallback:\"Email\"},status:{key:\"shoppingDashboard.fullView.signups.columns.status\",fallback:\"Status\"}},detailsTitle:{key:\"shoppingDashboard.fullView.signups.detailsTitle\",fallback:\"Signup Details\"}},conversionRate:{columns:{orderId:{key:\"shoppingDashboard.fullView.conversionRate.columns.orderId\",fallback:\"Order ID\"},date:{key:\"shoppingDashboard.fullView.conversionRate.columns.date\",fallback:\"Date\"},customer:{key:\"shoppingDashboard.fullView.conversionRate.columns.customer\",fallback:\"Customer\"},type:{key:\"shoppingDashboard.fullView.conversionRate.columns.type\",fallback:\"Type\"},items:{key:\"shoppingDashboard.fullView.conversionRate.columns.items\",fallback:\"Items\"},total:{key:\"shoppingDashboard.fullView.conversionRate.columns.total\",fallback:\"Total\"},bv:{key:\"shoppingDashboard.fullView.conversionRate.columns.bv\",fallback:\"BV\"},orderTotal:{key:\"shoppingDashboard.fullView.conversionRate.columns.orderTotal\",fallback:\"Order Total\"},totalSv:{key:\"shoppingDashboard.fullView.conversionRate.columns.totalSv\",fallback:\"Total SV\"}},orderDetailsTitle:{key:\"shoppingDashboard.fullView.conversionRate.orderDetailsTitle\",fallback:\"Order Details\"},notAvailable:{key:\"shoppingDashboard.fullView.conversionRate.notAvailable\",fallback:\"N/A\"}},products:{columns:{rank:{key:\"shoppingDashboard.fullView.products.columns.rank\",fallback:\"#\"},product:{key:\"shoppingDashboard.fullView.products.columns.product\",fallback:\"Product\"},unitsSold:{key:\"shoppingDashboard.fullView.products.columns.unitsSold\",fallback:\"Units Sold\"},revenue:{key:\"shoppingDashboard.fullView.products.columns.revenue\",fallback:\"Revenue\"},volume:{key:\"shoppingDashboard.fullView.products.columns.volume\",fallback:\"Volume (DC-SV)\"}},skuPrefix:{key:\"shoppingDashboard.fullView.products.skuPrefix\",fallback:\"SKU\"},noProducts:{key:\"shoppingDashboard.fullView.products.noProducts\",fallback:\"No products available.\"}},categories:{columns:{category:{key:\"shoppingDashboard.fullView.categories.columns.category\",fallback:\"Category\"},revenue:{key:\"shoppingDashboard.fullView.categories.columns.revenue\",fallback:\"Revenue\"},percentOfTotal:{key:\"shoppingDashboard.fullView.categories.columns.percentOfTotal\",fallback:\"% of Total\"},trend:{key:\"shoppingDashboard.fullView.categories.columns.trend\",fallback:\"Trend\"}},allCategoriesTitle:{key:\"shoppingDashboard.fullView.categories.allCategoriesTitle\",fallback:\"All Categories\"},noCategoryData:{key:\"shoppingDashboard.fullView.categories.noCategoryData\",fallback:\"No category data available.\"}}},dataTable:{noDataAvailable:{key:\"shoppingDashboard.dataTable.noDataAvailable\",fallback:\"No data available\"},sortableColumn:{key:\"shoppingDashboard.dataTable.sortableColumn\",fallback:\", sortable column\"}},pagination:{previousPage:{key:\"shoppingDashboard.pagination.previousPage\",fallback:\"Previous page\"},nextPage:{key:\"shoppingDashboard.pagination.nextPage\",fallback:\"Next page\"},goToPage:{key:\"shoppingDashboard.pagination.goToPage\",fallback:\"Go to page\"},of:{key:\"shoppingDashboard.pagination.of\",fallback:\"of\"}},defaults:{zeroTrend:{key:\"shoppingDashboard.defaults.zeroTrend\",fallback:\"+0%\"},noValue:{key:\"shoppingDashboard.defaults.noValue\",fallback:\"--\"}}};function a(e){return e.fallback}var U=require(\"react/jsx-runtime\"),ro=({shopTitle:e,dateRange:t,market:r,dateRangeLabel:i,isLoading:n=!1,stats:s,onDateRangeChange:u,onMarketChange:m})=>{let w=b=>{let x=b.target.value;u?.(x)},S=b=>{let x=b.target.value;m?.(x)},g=b=>{b.key===\"Escape\"&&b.target.blur()},d=()=>i||(s?.dateRange?s.dateRange.label:a(o.filter.dateRange.last30days));return(0,U.jsxs)(wn,{as:\"header\",\"data-testid\":\"dashboard-header\",children:[(0,U.jsxs)(Cn,{children:[(0,U.jsx)(vn,{\"data-testid\":\"dashboard-shop-title\",children:e??s?.shopTitle??a(o.title)}),(0,U.jsx)(kn,{\"aria-live\":\"polite\",\"data-testid\":\"dashboard-date-range-label\",children:d()})]}),(0,U.jsx)(Sn,{\"aria-label\":a(o.ariaLabel.dashboardFilters),\"data-testid\":\"dashboard-filters-section\",children:(0,U.jsxs)(Tn,{children:[n&&(0,U.jsx)(Dn,{as:\"output\",\"aria-live\":\"polite\",\"aria-label\":a(o.ariaLabel.loadingDashboard),\"data-testid\":\"dashboard-loading-indicator\",children:(0,U.jsx)(Mn.NsSpinner,{})}),(0,U.jsxs)(Rr,{children:[(0,U.jsx)(Mr,{htmlFor:\"filter-date-range\",children:a(o.filter.dateRangeLabel)}),(0,U.jsx)(Lr,{\"aria-hidden\":\"true\",children:(0,U.jsx)(Pn.default,{})}),(0,U.jsxs)(Or,{id:\"filter-date-range\",\"data-testid\":\"filter-date-range\",value:t,onChange:w,onKeyDown:g,disabled:n,\"aria-label\":`${a(o.ariaLabel.dateRangeFilter)} ${a(o.filter.dateRange[t])}`,children:[(0,U.jsx)(\"option\",{value:\"last7days\",children:a(o.filter.dateRange.last7days)}),(0,U.jsx)(\"option\",{value:\"last30days\",children:a(o.filter.dateRange.last30days)}),(0,U.jsx)(\"option\",{value:\"last90days\",children:a(o.filter.dateRange.last90days)}),(0,U.jsx)(\"option\",{value:\"thisMonth\",children:a(o.filter.dateRange.thisMonth)})]})]}),(0,U.jsxs)(Rr,{children:[(0,U.jsx)(Mr,{htmlFor:\"filter-market\",children:a(o.filter.marketLabel)}),(0,U.jsx)(Lr,{\"aria-hidden\":\"true\",children:(0,U.jsx)(Rn.default,{})}),(0,U.jsxs)(Or,{id:\"filter-market\",\"data-testid\":\"filter-market\",value:r,onChange:S,onKeyDown:g,disabled:n,\"aria-label\":`${a(o.ariaLabel.marketFilter)} ${a(o.filter.market[r])}`,children:[(0,U.jsx)(\"option\",{value:\"all\",children:a(o.filter.market.all)}),(0,U.jsx)(\"option\",{value:\"us\",children:a(o.filter.market.us)}),(0,U.jsx)(\"option\",{value:\"ca\",children:a(o.filter.market.ca)}),(0,U.jsx)(\"option\",{value:\"jp\",children:a(o.filter.market.jp)}),(0,U.jsx)(\"option\",{value:\"kr\",children:a(o.filter.market.kr)}),(0,U.jsx)(\"option\",{value:\"au\",children:a(o.filter.market.au)}),(0,U.jsx)(\"option\",{value:\"nz\",children:a(o.filter.market.nz)})]})]})]})})]})};var pl=R(require(\"react\"));var Ln=R(Xo()),Vn=R(ta()),$n=R(On()),aa=require(\"react/jsx-runtime\");function yt(e){switch(e){case\"up\":return(0,aa.jsx)(Ln.default,{});case\"down\":return(0,aa.jsx)(Vn.default,{});case\"neutral\":default:return(0,aa.jsx)($n.default,{})}}function Fn(e){switch(e){case\"up\":return\"#4caf50\";case\"down\":return\"#f44336\";case\"neutral\":default:return\"#757575\"}}var Je=require(\"@nuskin/foundation-theme\"),{getGenomeColor:io}=Je.ColorUtils,Vr=(0,Je.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 12px;\n background-color: ${({theme:e})=>io(e,\"N20\")};\n border: 1px solid ${({theme:e})=>io(e,\"N30\")};\n border-radius: 8px;\n min-height: 120px;\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 140px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n min-height: 160px;\n }\n`,Nn=(0,Je.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>io(e,\"N70\")};\n margin-bottom: 4px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 13px;\n margin-bottom: 6px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`,In=(0,Je.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n margin-top: 8px;\n`,An=(0,Je.styled)(\"div\")`\n font-size: 24px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({theme:e})=>io(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 28px;\n }\n\n @media (min-width: 1080px) {\n font-size: 32px;\n }\n`,zn=(0,Je.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: normal;\n color: ${({theme:e})=>io(e,\"N70\")};\n padding-bottom: 2px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Bn=(0,Je.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":io(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-top: 12px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`,En=(0,Je.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`,Hn=(0,Je.styled)(\"span\")`\n white-space: nowrap;\n`,_n=(0,Je.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;var Z=R(require(\"@mui/material/Skeleton\"));var G=require(\"@nuskin/foundation-theme\"),no=R(require(\"@mui/material/Skeleton\")),ra=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,ia=(0,G.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Wn=(0,G.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`,jn=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`,Kn=(0,G.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Un=(0,G.styled)(\"div\")`\n margin-top: 8px;\n`,qn=(0,G.styled)(no.default)`\n margin-top: 4px;\n`,Gn=(0,G.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n`,Yn=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`,Jn=(0,G.styled)(\"div\")`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`,Zn=(0,G.styled)(\"div\")`\n padding-top: 4px;\n`,Qn=(0,G.styled)(no.default)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`,Xn=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`,el=(0,G.styled)(no.default)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`,tl=(0,G.styled)(\"div\")`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,ol=(0,G.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`,al=(0,G.styled)(\"div\")`\n flex: 1;\n`,xc=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`,yc=(0,G.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`,wc=(0,G.styled)(\"div\")`\n display: flex;\n gap: 16px;\n`,Cc=(0,G.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`,vc=(0,G.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`,$r=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,rl=(0,G.styled)(\"div\")`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,il=(0,G.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`,nl=(0,G.styled)(no.default)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`,Fr=(0,G.styled)(\"div\")`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,na=(0,G.styled)(no.default)`\n border-radius: 4px;\n`,ll=(0,G.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;var k=require(\"react/jsx-runtime\"),Mo=()=>(0,k.jsxs)(jn,{\"data-testid\":\"skeleton-stats-card\",children:[(0,k.jsxs)(Kn,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:80,height:18}),(0,k.jsx)(Z.default,{variant:\"text\",width:48,height:16})]}),(0,k.jsxs)(Un,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:120,height:36}),(0,k.jsx)(qn,{variant:\"text\",width:100,height:16})]})]}),kc=()=>(0,k.jsxs)(Wn,{children:[(0,k.jsx)(Z.default,{variant:\"rounded\",width:28,height:28}),(0,k.jsx)(Z.default,{variant:\"rounded\",width:50,height:50}),(0,k.jsxs)(Gn,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:\"70%\",height:18}),(0,k.jsx)(Z.default,{variant:\"text\",width:\"50%\",height:14})]}),(0,k.jsxs)(Yn,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:80,height:18}),(0,k.jsx)(Z.default,{variant:\"text\",width:48,height:14})]})]}),sl=()=>(0,k.jsxs)(ra,{\"data-testid\":\"skeleton-products-list\",children:[(0,k.jsxs)(ia,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:160,height:22}),(0,k.jsx)(Z.default,{variant:\"rounded\",width:100,height:32})]}),[\"product-1\",\"product-2\",\"product-3\",\"product-4\",\"product-5\"].map(e=>(0,k.jsx)(kc,{},e))]}),la=()=>(0,k.jsxs)(ra,{\"data-testid\":\"skeleton-chart-widget\",children:[(0,k.jsxs)(ia,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:140,height:22}),(0,k.jsx)(Z.default,{variant:\"rounded\",width:110,height:32})]}),(0,k.jsxs)(Jn,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:100,height:36}),(0,k.jsxs)(Zn,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:60,height:18}),(0,k.jsx)(Z.default,{variant:\"text\",width:140,height:14})]})]}),(0,k.jsx)(Qn,{variant:\"rounded\",width:\"100%\"})]}),Sc=()=>(0,k.jsxs)(ol,{children:[(0,k.jsx)(Z.default,{variant:\"circular\",width:12,height:12}),(0,k.jsxs)(al,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:\"60%\",height:16}),(0,k.jsx)(Z.default,{variant:\"text\",width:\"40%\",height:14})]}),(0,k.jsx)(Z.default,{variant:\"text\",width:36,height:18})]}),sa=()=>(0,k.jsxs)(ra,{\"data-testid\":\"skeleton-categories-pie\",children:[(0,k.jsxs)(ia,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:140,height:22}),(0,k.jsx)(Z.default,{variant:\"rounded\",width:100,height:32})]}),(0,k.jsxs)(Xn,{children:[(0,k.jsx)(el,{variant:\"circular\"}),(0,k.jsx)(tl,{children:[\"legend-1\",\"legend-2\",\"legend-3\",\"legend-4\",\"legend-5\"].map(e=>(0,k.jsx)(Sc,{},e))})]})]});var Nt=()=>(0,k.jsxs)($r,{\"data-testid\":\"skeleton-fullview-chart\",children:[(0,k.jsxs)(rl,{children:[(0,k.jsxs)(il,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:140,height:52}),(0,k.jsx)(Z.default,{variant:\"text\",width:80,height:24}),(0,k.jsx)(Z.default,{variant:\"text\",width:160,height:16})]}),(0,k.jsx)(nl,{variant:\"rounded\",width:\"100%\"})]}),(0,k.jsxs)(Fr,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:200,height:24}),[\"table-row-1\",\"table-row-2\",\"table-row-3\",\"table-row-4\",\"table-row-5\"].map(e=>(0,k.jsx)(na,{variant:\"rounded\",width:\"100%\",height:44},e))]})]}),dl=()=>(0,k.jsxs)($r,{\"data-testid\":\"skeleton-fullview-table\",children:[(0,k.jsxs)(ll,{children:[(0,k.jsx)(Mo,{}),(0,k.jsx)(Mo,{}),(0,k.jsx)(Mo,{})]}),(0,k.jsxs)(Fr,{children:[(0,k.jsx)(Z.default,{variant:\"text\",width:200,height:24}),(0,k.jsx)(na,{variant:\"rounded\",width:\"100%\",height:40}),[\"summary-row-1\",\"summary-row-2\",\"summary-row-3\",\"summary-row-4\",\"summary-row-5\",\"summary-row-6\",\"summary-row-7\",\"summary-row-8\"].map(e=>(0,k.jsx)(na,{variant:\"rounded\",width:\"100%\",height:44},e))]})]});var qe=require(\"react/jsx-runtime\"),Dc=({title:e,value:t,subtitle:r,trendDirection:i=\"neutral\",trendValue:n,testId:s,isLoading:u=!1})=>{if(u)return(0,qe.jsx)(Vr,{\"data-testid\":s,children:(0,qe.jsx)(Mo,{})});let m=()=>{let w=a(o.stats.trend.unchanged);return i===\"up\"?w=a(o.stats.trend.increased):i===\"down\"&&(w=a(o.stats.trend.decreased)),`${e} ${w} ${n??\"\"}`};return(0,qe.jsxs)(Vr,{as:\"article\",\"aria-label\":`${e}: ${t}`,\"data-testid\":s,children:[(0,qe.jsxs)(_n,{children:[(0,qe.jsx)(Nn,{id:`stats-title-${s}`,children:e}),n&&(0,qe.jsxs)(Bn,{as:\"output\",direction:i,\"aria-live\":\"polite\",\"aria-label\":m(),\"data-testid\":`stats-trend-${s}`,children:[(0,qe.jsx)(En,{\"aria-hidden\":\"true\",children:yt(i)}),(0,qe.jsx)(Hn,{children:n})]})]}),(0,qe.jsxs)(In,{children:[(0,qe.jsx)(An,{\"aria-describedby\":`stats-title-${s}`,\"data-testid\":`stats-value-${s}`,children:t}),r&&(0,qe.jsx)(zn,{\"aria-label\":`${e} ${a(o.stats.details)}: ${r}`,\"data-testid\":`stats-subtitle-${s}`,children:r})]})]})},wt=pl.default.memo(Dc);wt.displayName=\"StatsCard\";var Bl=R(require(\"react\")),El=R(cl());var ne=require(\"@nuskin/foundation-theme\"),{getGenomeColor:X}=ne.ColorUtils,pa=(0,ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>X(e,\"N20\")};\n border: 1px solid ${({theme:e})=>X(e,\"N30\")};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,Nr=(0,ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({theme:e})=>X(e,\"N40\")};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,ul=(0,ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Ir=(0,ne.styled)(\"h2\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({theme:e})=>X(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>X(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,gl=(0,ne.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>X(e,\"N20\")};\n border: 1px solid ${({theme:e})=>X(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>X(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>X(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>X(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>X(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,fl=(0,ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`,ml=(0,ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({theme:e})=>X(e,\"N20\")};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({theme:e})=>X(e,\"N40\")};\n }\n\n &:hover {\n background-color: ${({theme:e})=>X(e,\"N30\")};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`,hl=(0,ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({theme:e})=>X(e,\"A10\")};\n color: ${({theme:e})=>X(e,\"A80\")};\n border-radius: 4px;\n font-size: 12px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 13px;\n }\n`,bl=(0,ne.styled)(\"img\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`,xl=(0,ne.styled)(\"div\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({theme:e})=>X(e,\"N40\")};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e})=>X(e,\"N70\")};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`,yl=(0,ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`,wl=(0,ne.styled)(\"div\")`\n font-size: 13px;\n font-weight: 500;\n line-height: 1.3;\n color: ${({theme:e})=>X(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 14px;\n max-width: none;\n }\n`,Cl=(0,ne.styled)(\"div\")`\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>X(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,vl=(0,ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`,kl=(0,ne.styled)(\"div\")`\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({theme:e})=>X(e,\"N100\")};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Sl=(0,ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":X(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`,Dl=(0,ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>X(e,\"N70\")};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({theme:e})=>X(e,\"N50\")};\n }\n`,Tl=(0,ne.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>X(e,\"N70\")};\n`;var Vl=require(\"react\"),$l=R(require(\"@mui/material/Menu\")),Fl=R(require(\"@mui/material/MenuItem\")),Nl=R(require(\"@mui/material/ListItemIcon\")),Il=R(require(\"@mui/material/ListItemText\")),Al=R(Pl()),zl=R(Rl());var Ml=R(require(\"@mui/material/IconButton\")),Ol=require(\"@nuskin/foundation-theme\"),Ll=(0,Ol.styled)(Ml.default)(()=>({padding:\"4px\"}));var Ze=require(\"react/jsx-runtime\"),Qe=({widgetId:e,onFullView:t})=>{let[r,i]=(0,Vl.useState)(null),n=!!r,s=w=>{i(w.currentTarget)},u=()=>{i(null)},m=()=>{u(),t&&t()};return(0,Ze.jsxs)(Ze.Fragment,{children:[(0,Ze.jsx)(Ll,{\"data-testid\":`widget-menu-button-${e}`,\"aria-label\":a(o.widget.menu.ariaLabel),\"aria-controls\":n?\"widget-menu\":void 0,\"aria-haspopup\":\"true\",\"aria-expanded\":n?\"true\":void 0,onClick:s,size:\"small\",children:(0,Ze.jsx)(Al.default,{fontSize:\"small\"})}),(0,Ze.jsx)($l.default,{id:\"widget-menu\",\"data-testid\":`widget-menu-${e}`,anchorEl:r,open:n,onClose:u,MenuListProps:{\"aria-labelledby\":\"widget-options-button\"},anchorOrigin:{vertical:\"bottom\",horizontal:\"right\"},transformOrigin:{vertical:\"top\",horizontal:\"right\"},children:(0,Ze.jsxs)(Fl.default,{onClick:m,\"data-testid\":\"widget-menu-item-fullview\",children:[(0,Ze.jsx)(Nl.default,{children:(0,Ze.jsx)(zl.default,{fontSize:\"small\"})}),(0,Ze.jsx)(Il.default,{children:a(o.widget.menu.fullView)})]})})]})};var W=require(\"react/jsx-runtime\"),Nc=({products:e,productSort:t,isLoading:r=!1,maxProducts:i=5,onSortChange:n,onTitleClick:s})=>{let u=p=>{let f=p.target.value;n?.(f)},m=(p,f)=>{switch(f){case\"units\":return`${p.unitsSold.toLocaleString()} ${a(o.widget.topProducts.unitsSuffix)}`;case\"revenue\":return`$${p.revenue.toLocaleString()}`;case\"volume\":return`${p.volume.toLocaleString()} ${a(o.widget.topProducts.dcSvSuffix)}`;default:return`${p.unitsSold.toLocaleString()} ${a(o.widget.topProducts.unitsSuffix)}`}},w=(p,f)=>{switch(f){case\"units\":return`$${p.revenue.toLocaleString()} ${a(o.widget.topProducts.revenueSuffix)}`;case\"revenue\":return`${p.unitsSold.toLocaleString()} ${a(o.widget.topProducts.unitsSuffix)}`;case\"volume\":return`$${p.revenue.toLocaleString()} ${a(o.widget.topProducts.revenueSuffix)}`;default:return`$${p.revenue.toLocaleString()} ${a(o.widget.topProducts.revenueSuffix)}`}},S=(p,f)=>{let h=p.trend;if(!h)return\"\";switch(f){case\"units\":return h.units??\"\";case\"revenue\":return h.revenue??\"\";case\"volume\":return h.volume??\"\";default:return h.units??\"\"}},g=(p,f)=>{let h=S(p,f);return h?h.startsWith(\"+\")?\"up\":h.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\"},d=e.slice(0,i),b=a(o.widget.topProducts.rank),x=a(o.widget.topProducts.trend),D=p=>p===\"up\"?a(o.stats.trend.increased):p===\"down\"?a(o.stats.trend.decreased):a(o.stats.trend.unchanged);return r&&e.length===0?(0,W.jsx)(pa,{\"data-testid\":\"widget-top-products\",children:(0,W.jsx)(sl,{})}):e.length===0?(0,W.jsxs)(pa,{\"data-testid\":\"widget-top-products\",children:[(0,W.jsx)(Nr,{children:(0,W.jsx)(Ir,{children:a(o.widget.topProducts.title)})}),(0,W.jsxs)(Dl,{\"data-testid\":\"products-empty-state\",children:[(0,W.jsx)(El.default,{}),(0,W.jsx)(Tl,{children:a(o.widget.topProducts.empty)})]})]}):(0,W.jsxs)(pa,{as:\"section\",\"data-testid\":\"widget-top-products\",\"aria-label\":a(o.widget.topProducts.ariaLabel),children:[(0,W.jsxs)(Nr,{children:[(0,W.jsx)(Ir,{as:\"button\",onClick:s,\"aria-label\":a(o.widget.topProducts.titleAriaLabel),\"data-testid\":\"widget-title-top-products\",children:a(o.widget.topProducts.title)}),(0,W.jsxs)(ul,{children:[(0,W.jsxs)(gl,{id:\"product-sort\",\"data-testid\":\"product-sort-dropdown\",value:t,onChange:u,disabled:r,\"aria-label\":a(o.widget.topProducts.sortAriaLabel),children:[(0,W.jsx)(\"option\",{value:\"units\",children:a(o.filter.productSort.byUnits)}),(0,W.jsx)(\"option\",{value:\"revenue\",children:a(o.filter.productSort.byRevenue)}),(0,W.jsx)(\"option\",{value:\"volume\",children:a(o.filter.productSort.byVolume)})]}),(0,W.jsx)(Qe,{widgetId:\"top-products\",onFullView:s})]})]}),(0,W.jsx)(fl,{as:\"ul\",\"data-testid\":\"products-list\",children:d.map((p,f)=>{let h=g(p,t),v=S(p,t);return(0,W.jsxs)(ml,{as:\"li\",\"data-testid\":`product-item-${f}`,\"aria-label\":`${b} ${p.rank}: ${p.name}, ${m(p,t)}`,children:[(0,W.jsx)(hl,{\"aria-label\":`${b} ${p.rank}`,children:p.rank}),p.imageUrl?(0,W.jsx)(bl,{src:p.imageUrl,alt:p.name,loading:\"lazy\",onError:C=>{C.currentTarget.hidden=!0}}):(0,W.jsx)(xl,{\"aria-label\":a(o.widget.topProducts.noImageAriaLabel),children:p.name.substring(0,2).toUpperCase()}),(0,W.jsxs)(yl,{children:[(0,W.jsx)(wl,{title:p.name,children:p.name}),(0,W.jsx)(Cl,{children:w(p,t)})]}),(0,W.jsxs)(vl,{children:[(0,W.jsx)(kl,{children:m(p,t)}),v&&(0,W.jsxs)(Sl,{as:\"output\",direction:h,\"aria-live\":\"polite\",\"aria-label\":`${x}: ${D(h)} ${v}`,children:[(0,W.jsx)(\"span\",{\"aria-hidden\":\"true\",children:yt(h)}),(0,W.jsx)(\"span\",{children:v})]})]})]},p.id)})})]})},Ut=Bl.default.memo(Nc);Ut.displayName=\"TopSellingProductsList\";var lo=R(require(\"react\")),Ee=require(\"recharts\");var ye=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ae}=ye.ColorUtils,Ar=(0,ye.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>ae(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ae(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,Hl=(0,ye.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({theme:e})=>ae(e,\"N40\")};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,_l=(0,ye.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,Wl=(0,ye.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,jl=(0,ye.styled)(\"h2\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({theme:e})=>ae(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>ae(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Kl=(0,ye.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>ae(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ae(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>ae(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>ae(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ae(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ae(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Ul=(0,ye.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 8px;\n`,ql=(0,ye.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({theme:e})=>ae(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,Gl=(0,ye.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-top: 4px;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":ae(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 20px;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 20px;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>ae(e,\"N70\")};\n letter-spacing: 0.12px;\n }\n`,Yl=(0,ye.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>ae(e,\"N100\")};\n margin-bottom: 16px;\n letter-spacing: 0.12px;\n`,Jl=(0,ye.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>ae(e,\"N40\")};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({theme:e})=>ae(e,\"N70\")};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`,Zl=(0,ye.styled)(\"div\")`\n background-color: ${({theme:e})=>ae(e,\"N100\")};\n border: 1px solid ${({theme:e})=>ae(e,\"N40\")};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`,Ql=(0,ye.styled)(\"div\")`\n font-size: 11px;\n font-weight: 600;\n color: ${({theme:e})=>ae(e,\"N10\")};\n margin-bottom: 4px;\n`,Xl=(0,ye.styled)(\"div\")`\n font-size: 13px;\n font-weight: 700;\n color: ${({theme:e})=>ae(e,\"A10\")};\n`,es=(0,ye.styled)(\"div\")`\n font-size: 10px;\n font-weight: 400;\n color: ${({theme:e})=>ae(e,\"N30\")};\n margin-top: 2px;\n`;var E=require(\"react/jsx-runtime\"),Ic={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"},Ac={top:5,right:10,left:-10,bottom:5},ts={fontSize:10},zc={r:3,fill:\"#3B82F6\"},Bc={r:5},Ec=e=>`${e}%`;function Hc(e){let t=e.split(\" \");return t.length!==2?e:`${Ic[t[0]]||t[0]}/${t[1]}`}var _c=({active:e,payload:t})=>{if(!e||!t?.length)return null;let r=t[0].payload;return(0,E.jsxs)(Zl,{children:[(0,E.jsx)(Ql,{children:r.date}),(0,E.jsxs)(Xl,{children:[r.rate.toFixed(2),\"%\"]}),(0,E.jsxs)(es,{children:[r.orders,\" \",a(o.widget.conversionRate.tooltipOrders),\" /\",\" \",r.siteVisits.toLocaleString(),\" \",a(o.widget.conversionRate.tooltipVisits)]})]})},Wc=({conversionData:e,conversionFilter:t,isLoading:r=!1,title:i,onFilterChange:n,onTitleClick:s})=>{let u=lo.default.useCallback(D=>{let p=D.target.value;n?.(p)},[n]),m=a(o.widget.conversionRate.noData),w=a(o.widget.conversionRate.noChange),S=lo.default.useMemo(()=>e.length===0?0:e[e.length-1].rate,[e]),g=lo.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:m};let D=e[e.length-1].rate,p=e[0].rate,f=D-p,h=f/p*100;if(Math.abs(h)<.1)return{direction:\"neutral\",value:w};let v=f>0?\"up\":\"down\",C=`${f>0?\"+\":\"\"}${f.toFixed(2)}%`;return{direction:v,value:C}},[e,w,m]),d=lo.default.useMemo(()=>e.map(D=>({...D,shortDate:Hc(D.date)})),[e]),b=D=>D===\"up\"?a(o.stats.trend.increased):D===\"down\"?a(o.stats.trend.decreased):a(o.stats.trend.unchanged);if(r&&e.length===0)return(0,E.jsx)(Ar,{\"data-testid\":\"widget-conversion-rate\",children:(0,E.jsx)(la,{})});let x=a(o.widget.conversionRate.chartAriaLabel);return(0,E.jsxs)(Ar,{as:\"section\",\"data-testid\":\"widget-conversion-rate\",\"aria-label\":x,children:[(0,E.jsxs)(Hl,{children:[(0,E.jsxs)(_l,{children:[(0,E.jsx)(jl,{as:\"button\",onClick:s,\"aria-label\":a(o.widget.conversionRate.titleAriaLabel),\"data-testid\":\"widget-title-conversion-rate\",children:i??a(o.widget.conversionRate.title)}),(0,E.jsxs)(Wl,{children:[(0,E.jsxs)(Kl,{id:\"conversion-filter\",\"data-testid\":\"conversion-filter-dropdown\",value:t,onChange:u,disabled:r,\"aria-label\":a(o.widget.conversionRate.filterAriaLabel),children:[(0,E.jsx)(\"option\",{value:\"all\",children:a(o.filter.signupView.all)}),(0,E.jsx)(\"option\",{value:\"members\",children:a(o.filter.signupView.members)}),(0,E.jsx)(\"option\",{value:\"retail\",children:a(o.filter.signupView.retail)}),(0,E.jsx)(\"option\",{value:\"brandAffiliates\",children:a(o.filter.signupView.brandAffiliates)})]}),(0,E.jsx)(Qe,{widgetId:\"conversion-rate\",onFullView:s})]})]}),(0,E.jsx)(Yl,{\"data-testid\":\"conversion-formula\",children:a(o.widget.conversionRate.formula)})]}),(0,E.jsxs)(Ul,{children:[(0,E.jsxs)(ql,{\"aria-label\":`${a(o.widget.conversionRate.title)}: ${S.toFixed(2)}%`,\"data-testid\":\"conversion-metric-value\",children:[S.toFixed(2),\"%\"]}),g.value!==m&&(0,E.jsxs)(Gl,{as:\"output\",direction:g.direction,\"aria-live\":\"polite\",\"aria-label\":`${b(g.direction)} ${g.value}`,\"data-testid\":\"conversion-metric-trend\",children:[(0,E.jsxs)(\"div\",{className:\"trend-line\",children:[(0,E.jsx)(\"span\",{\"aria-hidden\":\"true\",children:yt(g.direction)}),(0,E.jsx)(\"span\",{className:\"change-value\",children:g.value.replace(\"%\",\"\")}),(0,E.jsx)(\"span\",{className:\"change-percent\",children:\"%\"})]}),(0,E.jsx)(\"div\",{className:\"comparison-text\",children:a(o.widget.conversionRate.comparison)})]})]}),(0,E.jsx)(Jl,{\"data-testid\":\"conversion-chart\",children:(0,E.jsx)(Ee.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,E.jsxs)(Ee.LineChart,{data:d,margin:Ac,children:[(0,E.jsx)(Ee.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,E.jsx)(Ee.XAxis,{dataKey:\"shortDate\",tick:ts,tickLine:!1,interval:\"preserveStartEnd\"}),(0,E.jsx)(Ee.YAxis,{tick:ts,tickLine:!1,tickFormatter:Ec,domain:[\"dataMin - 0.5\",\"dataMax + 0.5\"]}),(0,E.jsx)(Ee.Tooltip,{content:_c}),(0,E.jsx)(Ee.Line,{type:\"monotone\",dataKey:\"rate\",stroke:\"#3B82F6\",strokeWidth:2,dot:zc,activeDot:Bc})]})})})]})},qt=lo.default.memo(Wc);qt.displayName=\"ConversionRateChart\";var po=R(require(\"react\")),me=require(\"recharts\");var Le=require(\"@nuskin/foundation-theme\"),{getGenomeColor:fe}=Le.ColorUtils,zr=(0,Le.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>fe(e,\"N20\")};\n border: 1px solid ${({theme:e})=>fe(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,os=(0,Le.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({theme:e})=>fe(e,\"N40\")};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,as=(0,Le.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,rs=(0,Le.styled)(\"h2\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({theme:e})=>fe(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>fe(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,is=(0,Le.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>fe(e,\"N20\")};\n border: 1px solid ${({theme:e})=>fe(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>fe(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>fe(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>fe(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>fe(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,ns=(0,Le.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 16px;\n`,ls=(0,Le.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({theme:e})=>fe(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,ss=(0,Le.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-top: 4px;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":fe(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n .change-value {\n font-weight: 600;\n line-height: 20px;\n }\n .change-percent {\n font-weight: 400;\n line-height: 20px;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>fe(e,\"N70\")};\n letter-spacing: 0.12px;\n }\n`,ds=(0,Le.styled)(\"div\")`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({theme:e})=>fe(e,\"N40\")};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({theme:e})=>fe(e,\"N70\")};\n font-size: 10px;\n }\n`,ps=(0,Le.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>fe(e,\"N40\")};\n`,Oo=(0,Le.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>fe(e,\"N30\")};\n }\n`,Lo=(0,Le.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Vo=(0,Le.styled)(\"span\")`\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>fe(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;var P=require(\"react/jsx-runtime\"),ut={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#CBD6E0\"},jc={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"},Kc={top:5,right:10,left:-10,bottom:5},cs={fontSize:10},so={r:2};function Uc(e){let t=e.split(\" \");return t.length!==2?e:`${jc[t[0]]||t[0]}/${t[1]}`}var qc=({signupData:e,signupView:t,isLoading:r=!1,title:i,onViewChange:n,onTitleClick:s})=>{let u=po.default.useCallback(h=>{let v=h.target.value;n?.(v)},[n]),m=a(o.widget.signups.noData),w=a(o.widget.signups.noChange),S=po.default.useMemo(()=>e.length===0?0:e[e.length-1].total,[e]),g=po.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:m};let h=e[e.length-1].total,v=e[0].total,C=h-v,F=C/v*100;if(Math.abs(F)<.1)return{direction:\"neutral\",value:w};let j=C>0?\"up\":\"down\",B=`${C>0?\"+\":\"\"}${C} (${F.toFixed(1)}%)`;return{direction:j,value:B}},[w,m,e]),d=po.default.useMemo(()=>e.map(h=>({...h,shortDate:Uc(h.date)})),[e]),b=a(o.widget.signups.total),x=a(o.widget.signups.members),D=a(o.widget.signups.retail),p=a(o.widget.signups.brandAffiliates),f=h=>h===\"up\"?a(o.stats.trend.increased):h===\"down\"?a(o.stats.trend.decreased):a(o.stats.trend.unchanged);return r&&e.length===0?(0,P.jsx)(zr,{\"data-testid\":\"widget-signups\",children:(0,P.jsx)(la,{})}):(0,P.jsxs)(zr,{as:\"section\",\"data-testid\":\"widget-signups\",\"aria-label\":a(o.widget.signups.chartAriaLabel),children:[(0,P.jsxs)(os,{children:[(0,P.jsx)(rs,{as:\"button\",onClick:s,\"aria-label\":a(o.widget.signups.titleAriaLabel),\"data-testid\":\"widget-title-signups\",children:i??a(o.widget.signups.title)}),(0,P.jsxs)(as,{children:[(0,P.jsxs)(is,{id:\"signup-view\",\"data-testid\":\"signup-view-dropdown\",value:t,onChange:u,disabled:r,\"aria-label\":a(o.widget.signups.filterAriaLabel),children:[(0,P.jsx)(\"option\",{value:\"all\",children:a(o.filter.signupView.showAll)}),(0,P.jsx)(\"option\",{value:\"members\",children:a(o.filter.signupView.showMembers)}),(0,P.jsx)(\"option\",{value:\"retail\",children:a(o.filter.signupView.showRetail)}),(0,P.jsx)(\"option\",{value:\"brandAffiliates\",children:a(o.filter.signupView.showBrandAffiliates)})]}),(0,P.jsx)(Qe,{widgetId:\"signups\",onFullView:s})]})]}),(0,P.jsxs)(ns,{\"data-testid\":\"signups-metric-display\",children:[(0,P.jsx)(ls,{\"data-testid\":\"signups-metric-value\",\"aria-label\":`${b}: ${S.toLocaleString()}`,children:S.toLocaleString()}),g.value!==m&&(0,P.jsxs)(ss,{as:\"output\",\"data-testid\":\"signups-metric-trend\",direction:g.direction,\"aria-live\":\"polite\",\"aria-label\":`${f(g.direction)} ${g.value}`,children:[(0,P.jsxs)(\"div\",{className:\"trend-line\",children:[(0,P.jsx)(\"span\",{\"aria-hidden\":\"true\",children:yt(g.direction)}),(0,P.jsx)(\"span\",{className:\"change-value\",children:g.value.split(\" \")[0]}),(0,P.jsx)(\"span\",{className:\"change-percent\",children:g.value.split(\" \")[1]})]}),(0,P.jsx)(\"div\",{className:\"comparison-text\",children:a(o.widget.conversionRate.comparison)})]})]}),(0,P.jsx)(ds,{\"data-testid\":\"signups-chart\",children:(0,P.jsx)(me.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,P.jsxs)(me.LineChart,{data:d,margin:Kc,children:[(0,P.jsx)(me.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,P.jsx)(me.XAxis,{dataKey:\"shortDate\",tick:cs,tickLine:!1,interval:\"preserveStartEnd\"}),(0,P.jsx)(me.YAxis,{tick:cs,tickLine:!1}),(0,P.jsx)(me.Tooltip,{}),(t===\"all\"||t===\"members\")&&(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:t===\"all\"?\"total\":\"members\",stroke:t===\"all\"?ut.total:ut.members,strokeWidth:2,dot:so,name:t===\"all\"?b:x}),t===\"all\"&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:\"members\",stroke:ut.members,strokeWidth:2,dot:so,name:x}),(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:\"retail\",stroke:ut.retail,strokeWidth:2,dot:so,name:D}),(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:ut.brandAffiliates,strokeWidth:2,dot:so,name:p})]}),t===\"retail\"&&(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:\"retail\",stroke:ut.retail,strokeWidth:2,dot:so,name:D}),t===\"brandAffiliates\"&&(0,P.jsx)(me.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:ut.brandAffiliates,strokeWidth:2,dot:so,name:p})]})})}),t===\"all\"&&(0,P.jsxs)(ps,{\"data-testid\":\"signups-legend\",children:[(0,P.jsxs)(Oo,{\"data-testid\":\"legend-total\",children:[(0,P.jsx)(Lo,{color:ut.total}),(0,P.jsx)(Vo,{children:b})]}),(0,P.jsxs)(Oo,{\"data-testid\":\"legend-members\",children:[(0,P.jsx)(Lo,{color:ut.members}),(0,P.jsx)(Vo,{children:x})]}),(0,P.jsxs)(Oo,{\"data-testid\":\"legend-retail\",children:[(0,P.jsx)(Lo,{color:ut.retail}),(0,P.jsx)(Vo,{children:D})]}),(0,P.jsxs)(Oo,{\"data-testid\":\"legend-brandAffiliates\",children:[(0,P.jsx)(Lo,{color:ut.brandAffiliates}),(0,P.jsx)(Vo,{children:p})]})]})]})},$o=po.default.memo(qc);$o.displayName=\"SignupsChart\";var Oa=R(require(\"react\")),Ct=require(\"recharts\");var te=require(\"@nuskin/foundation-theme\"),{getGenomeColor:de}=te.ColorUtils,It=(0,te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>de(e,\"N20\")};\n border: 1px solid ${({theme:e})=>de(e,\"N30\")};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`,co=(0,te.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({theme:e})=>de(e,\"N40\")};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,ga=(0,te.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,uo=(0,te.styled)(\"h2\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({theme:e})=>de(e,\"N100\")};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({theme:e})=>de(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,fa=(0,te.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>de(e,\"N20\")};\n border: 1px solid ${({theme:e})=>de(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>de(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>de(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>de(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>de(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,ma=(0,te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n }\n`,ha=(0,te.styled)(\"div\")`\n position: relative;\n width: 100%;\n height: 200px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 200px;\n height: 200px;\n }\n`,ba=(0,te.styled)(\"div\")`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`,xa=(0,te.styled)(\"div\")`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>de(e,\"N70\")};\n`,ya=(0,te.styled)(\"div\")`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>de(e,\"N100\")};\n`,wa=(0,te.styled)(\"div\")`\n margin-top: 2px;\n font-size: 11px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":de(t,\"N70\")};\n`,Ca=(0,te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 1;\n`,va=(0,te.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>de(e,\"N30\")};\n }\n`,ka=(0,te.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Sa=(0,te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n`,Da=(0,te.styled)(\"div\")`\n font-size: 13px;\n font-weight: 500;\n color: ${({theme:e})=>de(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Ta=(0,te.styled)(\"div\")`\n font-size: 11px;\n font-weight: 400;\n color: ${({theme:e})=>de(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Pa=(0,te.styled)(\"div\")`\n font-size: 14px;\n font-weight: 600;\n color: ${({theme:e})=>de(e,\"N100\")};\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Ra=(0,te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({theme:e})=>de(e,\"N70\")};\n`,Ma=(0,te.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>de(e,\"N70\")};\n`;var H=require(\"react/jsx-runtime\");function Gc(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),r=Number(t);return Number.isFinite(r)?r:null}var Yc=e=>`$${e.toLocaleString()}`,Jc=({categories:e,categorySort:t,isLoading:r=!1,title:i,onSortChange:n,onTitleClick:s})=>{let u=Oa.default.useCallback(d=>{let b=d.target.value;n?.(b)},[n]),{sortedCategories:m,totalRevenue:w,trendDirection:S,formattedTrend:g}=Oa.default.useMemo(()=>{let d=[...e].sort((v,C)=>t===\"revenue\"?C.revenue-v.revenue:C.percentage-v.percentage),b=d.reduce((v,C)=>v+C.revenue,0),x=d.reduce((v,C)=>{let F=Gc(C.trend?.revenue);return F===null?v:{weightedSum:v.weightedSum+F*C.revenue,weight:v.weight+C.revenue}},{weightedSum:0,weight:0}),D=x.weight>0?x.weightedSum/x.weight:0,p=\"neutral\";D>0?p=\"up\":D<0&&(p=\"down\");let h=`${D>0?\"+\":\"\"}${D.toFixed(1)}%`;return{sortedCategories:d,totalRevenue:b,trendDirection:p,formattedTrend:h}},[e,t]);return r&&e.length===0?(0,H.jsx)(It,{\"data-testid\":\"widget-top-categories\",children:(0,H.jsx)(sa,{})}):e.length===0?(0,H.jsxs)(It,{\"data-testid\":\"widget-top-categories\",children:[(0,H.jsx)(co,{children:(0,H.jsx)(uo,{children:i??a(o.widget.topCategories.title)})}),(0,H.jsx)(Ra,{\"data-testid\":\"categories-empty-state\",children:(0,H.jsx)(Ma,{children:a(o.widget.topCategories.empty)})})]}):(0,H.jsxs)(It,{as:\"section\",\"data-testid\":\"widget-top-categories\",\"aria-label\":a(o.widget.topCategories.chartAriaLabel),children:[(0,H.jsxs)(co,{children:[(0,H.jsx)(uo,{as:\"button\",onClick:s,\"aria-label\":a(o.widget.topCategories.titleAriaLabel),\"data-testid\":\"widget-title-top-categories\",children:i??a(o.widget.topCategories.title)}),(0,H.jsxs)(ga,{children:[(0,H.jsxs)(fa,{id:\"category-sort\",\"data-testid\":\"category-sort-dropdown\",value:t,onChange:u,disabled:r,\"aria-label\":a(o.widget.topCategories.sortAriaLabel),children:[(0,H.jsx)(\"option\",{value:\"revenue\",children:a(o.filter.categorySort.byRevenue)}),(0,H.jsx)(\"option\",{value:\"units\",children:a(o.filter.categorySort.byUnits)})]}),(0,H.jsx)(Qe,{widgetId:\"top-categories\",onFullView:s})]})]}),(0,H.jsxs)(ma,{children:[(0,H.jsxs)(ha,{\"data-testid\":\"categories-chart\",children:[(0,H.jsx)(Ct.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,H.jsxs)(Ct.PieChart,{children:[(0,H.jsx)(Ct.Pie,{data:m,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:m.map(d=>(0,H.jsx)(Ct.Cell,{fill:d.color},`cell-${d.id}`))}),(0,H.jsx)(Ct.Tooltip,{formatter:Yc})]})}),(0,H.jsxs)(ba,{\"data-testid\":\"categories-donut-center\",children:[(0,H.jsx)(xa,{children:a(o.stats.revenue)}),(0,H.jsxs)(ya,{children:[\"$\",w.toLocaleString()]}),(0,H.jsx)(wa,{direction:S,children:g})]})]}),(0,H.jsx)(Ca,{\"data-testid\":\"categories-legend-container\",children:m.map((d,b)=>(0,H.jsxs)(va,{\"data-testid\":`category-legend-${b}`,children:[(0,H.jsx)(ka,{color:d.color}),(0,H.jsxs)(Sa,{children:[(0,H.jsx)(Da,{children:d.name}),(0,H.jsxs)(Ta,{children:[\"$\",d.revenue.toLocaleString()]})]}),(0,H.jsxs)(Pa,{children:[d.percentage,\"%\"]})]},d.id))})]})]})},Fo=Oa.default.memo(Jc);Fo.displayName=\"TopCategoriesPieChart\";var we=require(\"react/jsx-runtime\"),Zc=[],Qc=[],Xc=[],eu=[],La=({stats:e,topProducts:t,conversionData:r,signupData:i,categories:n,isLoading:s=!1,error:u,shopTitle:m,className:w,dateRange:S=\"last30days\",market:g=\"all\",productSort:d=\"units\",signupView:b=\"all\",conversionFilter:x=\"all\",categorySort:D=\"revenue\",onDateRangeChange:p,onMarketChange:f,onProductSortChange:h,onSignupViewChange:v,onConversionFilterChange:C,onCategorySortChange:F,onProductsTitleClick:j,onConversionTitleClick:B,onSignupsTitleClick:Q,onCategoriesToTitleClick:l})=>{let c=t??Zc,y=r??Qc,T=i??Xc,N=n??eu;if(u)return(0,we.jsx)(Sr,{as:\"main\",className:w,\"aria-label\":a(o.ariaLabel.dashboard),children:(0,we.jsxs)(xn,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,we.jsxs)(\"strong\",{children:[a(o.error),\":\"]}),\" \",u]})});let K=q=>q?q.startsWith(\"+\")?\"up\":q.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return(0,we.jsxs)(Sr,{as:\"main\",className:w,\"data-testid\":\"shopping-dashboard\",\"aria-label\":a(o.ariaLabel.dashboard),\"aria-busy\":s,children:[(0,we.jsx)(ro,{shopTitle:m,dateRange:S,market:g,isLoading:s,stats:e,onDateRangeChange:p,onMarketChange:f}),(0,we.jsxs)(hn,{as:\"section\",\"data-testid\":\"stats-row\",\"aria-label\":a(o.ariaLabel.statsRow),children:[(0,we.jsx)(wt,{title:a(o.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:K(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:s}),(0,we.jsx)(wt,{title:a(o.stats.volume),value:e?.metrics?.volume??\"0\",subtitle:a(o.stats.subtitle.dcSv),trendDirection:K(e?.trend?.volume),trendValue:e?.trend?.volume,testId:\"stats-card-volume\",isLoading:s}),(0,we.jsx)(wt,{title:a(o.stats.visits),value:e?.metrics?.siteVisits??\"0\",subtitle:`${e?.metrics?.conversionRate??\"0%\"} ${a(o.stats.subtitle.conversionRate)}`,trendDirection:K(e?.trend?.siteVisits),trendValue:e?.trend?.siteVisits,testId:\"stats-card-visits\",isLoading:s})]}),(0,we.jsxs)(bn,{\"data-testid\":\"widget-container\",children:[(0,we.jsxs)(Dr,{\"data-testid\":\"widget-row-1\",children:[(0,we.jsx)(Ut,{products:c,productSort:d,isLoading:s,maxProducts:5,onSortChange:h,onTitleClick:j}),(0,we.jsx)($o,{signupData:T,signupView:b,isLoading:s,onViewChange:v,onTitleClick:Q})]}),(0,we.jsxs)(Dr,{\"data-testid\":\"widget-row-2\",children:[(0,we.jsx)(qt,{conversionData:y,conversionFilter:x,isLoading:s,onFilterChange:C,onTitleClick:B}),(0,we.jsx)(Fo,{categories:N,categorySort:D,isLoading:s,onSortChange:F,onTitleClick:l})]})]})]})};var ee=R(require(\"react\"));var He=R(require(\"react\"));var Rs=R(us()),Ms=R(Pr()),Os=R(gs());var Te=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ge}=Te.ColorUtils,fs=(0,Te.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-bottom: 24px;\n`,ms=(0,Te.styled)(\"div\")`\n display: flex;\n align-items: center;\n`,hs=(0,Te.styled)(\"button\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({theme:e})=>Ge(e,\"N70\")};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({theme:e})=>Ge(e,\"N100\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Ge(e,\"A70\")};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`,bs=(0,Te.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({theme:e})=>Ge(e,\"N30\")};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`,xs=(0,Te.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`,ys=(0,Te.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ge(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,ws=(0,Te.styled)(\"p\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ge(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n`,Cs=(0,Te.styled)(\"p\")`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Ge(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`,vs=(0,Te.styled)(\"div\")`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`,ks=(0,Te.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Ss=(0,Te.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>Ge(e,\"N70\")};\n\n svg {\n font-size: 16px;\n }\n`,Ds=(0,Te.styled)(\"select\")`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>Ge(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({theme:e})=>Ge(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>Ge(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>Ge(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`,Ts=(0,Te.styled)(\"div\")`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Ps=(0,Te.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Ge(e,\"N100\")};\n margin: 0;\n`;var le=require(\"react/jsx-runtime\"),pe=({title:e,dateRange:t,onBack:r,filters:i,onFilterChange:n})=>{let s=u=>u?(0,le.jsxs)(Ss,{children:[u===\"calendar\"&&(0,le.jsx)(Ms.default,{}),u===\"globe\"&&(0,le.jsx)(Os.default,{})]}):null;return(0,le.jsxs)(fs,{\"data-testid\":\"page-header\",children:[(0,le.jsx)(ms,{children:(0,le.jsxs)(hs,{onClick:r,\"aria-label\":a(o.navigation.backAriaLabel),\"data-testid\":\"page-back-button\",type:\"button\",children:[(0,le.jsx)(Rs.default,{}),(0,le.jsx)(\"span\",{children:a(o.navigation.backToDashboard)})]})}),(0,le.jsx)(Ts,{children:(0,le.jsx)(Ps,{children:e})}),(0,le.jsxs)(bs,{children:[(0,le.jsxs)(xs,{children:[(0,le.jsx)(ys,{\"data-testid\":\"page-header-title\",children:e}),(0,le.jsx)(ws,{\"data-testid\":\"page-header-date-range\",children:t})]}),i&&i.length>0&&n&&(0,le.jsx)(vs,{\"data-testid\":\"page-header-filters\",children:i.map(u=>(0,le.jsxs)(ks,{children:[s(u.icon),(0,le.jsx)(Ds,{id:`filter-${u.key}`,value:u.value,onChange:m=>n(u.key,m.target.value),disabled:u.disabled,\"aria-label\":`${u.label} ${a(o.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${u.key}`,children:u.options.map(m=>(0,le.jsx)(\"option\",{value:m.value,children:u.label&&u.key===\"customerType\"?`${u.label} ${m.label}`:m.label},m.value))})]},u.key))}),(0,le.jsx)(Cs,{children:t})]})]})};var Es=R(Ls()),Hs=R(Vs());var Xe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ot}=Xe.ColorUtils,$s=(0,Xe.styled)(\"div\")`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({theme:e})=>Ot(e,\"N30\")};\n`,Fs=(0,Xe.styled)(\"table\")`\n width: 100%;\n border-collapse: collapse;\n`,Ns=(0,Xe.styled)(\"thead\")`\n background-color: ${({theme:e})=>Ot(e,\"N20\")};\n border-bottom: 2px solid ${({theme:e})=>Ot(e,\"N40\")};\n`,Is=(0,Xe.styled)(\"th\")`\n padding: 12px 16px;\n font-size: 14px;\n font-weight: 600;\n color: ${({theme:e})=>Ot(e,\"N100\")};\n text-align: left;\n cursor: ${({sortable:e})=>e?\"pointer\":\"default\"};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e,sortable:t})=>t?Ot(e,\"N30\"):\"transparent\"};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Ot(e,\"A70\")};\n outline-offset: -2px;\n }\n`,As=(0,Xe.styled)(\"tbody\")``,Br=(0,Xe.styled)(\"tr\")`\n border-bottom: 1px solid ${({theme:e})=>Ot(e,\"N30\")};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Ot(e,\"N20\")};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`,Er=(0,Xe.styled)(\"td\")`\n padding: 12px 16px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>Ot(e,\"N100\")};\n text-align: left;\n`,zs=(0,Xe.styled)(Er)`\n text-align: center;\n`,Bs=(0,Xe.styled)(\"span\")`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({isActive:e})=>e?1:.4};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;var Ae=require(\"react/jsx-runtime\"),et=({columns:e,data:t,sortable:r=!1,onSort:i,sortColumn:n,sortDirection:s=\"asc\",getRowKey:u})=>{let m=g=>{if(!r||!i)return;i(g,n===g&&s===\"asc\"?\"desc\":\"asc\")},w=(g,d)=>{(g.key===\"Enter\"||g.key===\" \")&&(g.preventDefault(),m(d))},S=g=>{if(n===g)return s===\"asc\"?\"ascending\":\"descending\"};return(0,Ae.jsx)($s,{\"data-testid\":\"data-table\",children:(0,Ae.jsxs)(Fs,{children:[(0,Ae.jsx)(Ns,{children:(0,Ae.jsx)(\"tr\",{children:e.map(g=>(0,Ae.jsxs)(Is,{sortable:r&&g.sortable,onClick:()=>g.sortable&&m(g.key),onKeyDown:d=>g.sortable&&w(d,g.key),tabIndex:r&&g.sortable?0:-1,\"aria-sort\":S(g.key),\"aria-label\":`${g.label}${g.sortable?a(o.dataTable.sortableColumn):\"\"}`,\"data-testid\":`table-header-${g.key}`,children:[g.label,r&&g.sortable&&(0,Ae.jsx)(Bs,{isActive:n===g.key,children:n===g.key&&s===\"desc\"?(0,Ae.jsx)(Hs.default,{}):(0,Ae.jsx)(Es.default,{})})]},g.key))})}),(0,Ae.jsx)(As,{children:t.length===0?(0,Ae.jsx)(Br,{\"data-testid\":\"table-empty-row\",children:(0,Ae.jsx)(zs,{colSpan:e.length,children:a(o.dataTable.noDataAvailable)})}):t.map((g,d)=>(0,Ae.jsx)(Br,{\"data-testid\":`table-row-${d}`,children:e.map(b=>(0,Ae.jsx)(Er,{\"data-testid\":`table-cell-${b.key}`,children:b.render?b.render(g[b.key],g):g[b.key]},b.key))},u?u(g,d):d))})]})})};var Ks=R(_s()),Us=R(Ws());var Gt=require(\"@nuskin/foundation-theme\"),{getGenomeColor:gt}=Gt.ColorUtils,js=(0,Gt.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`,za=(0,Gt.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e,isActive:t})=>t?gt(e,\"A80\"):gt(e,\"N20\")};\n color: ${({theme:e,isActive:t})=>t?\"#ffffff\":gt(e,\"N100\")};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e,isActive:t})=>t?gt(e,\"A70\"):gt(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>gt(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`,Ba=(0,Gt.styled)(\"span\")`\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>gt(e,\"N70\")};\n margin: 0 8px;\n`,Hr=(0,Gt.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e})=>gt(e,\"N20\")};\n color: ${({theme:e})=>gt(e,\"N100\")};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({theme:e})=>gt(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>gt(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;var Ce=require(\"react/jsx-runtime\"),tt=({currentPage:e,totalPages:t,onPageChange:r,itemsPerPage:i,totalItems:n})=>{let s=()=>{e>1&&r(e-1)},u=()=>{e<t&&r(e+1)},m=(x,D)=>{(x.key===\"Enter\"||x.key===\" \")&&(x.preventDefault(),D())},S=(()=>{if(t<=7)return Array.from({length:t},(D,p)=>p+1);let x=[];return e<=4?x.push(1,2,3,4,5):e>=t-3?x.push(t-4,t-3,t-2,t-1,t):x.push(e-1,e,e+1),x})(),g=i?(e-1)*i+1:null,d=i?Math.min(e*i,n??1/0):null,b=a(o.pagination.goToPage);return(0,Ce.jsxs)(js,{\"data-testid\":\"pagination\",children:[(0,Ce.jsx)(Hr,{onClick:s,onKeyDown:x=>m(x,s),disabled:e===1,\"aria-label\":a(o.pagination.previousPage),\"data-testid\":\"pagination-previous\",type:\"button\",children:(0,Ce.jsx)(Ks.default,{})}),t>7&&e>4&&(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)(za,{onClick:()=>r(1),isActive:!1,\"aria-label\":`${b} 1`,\"data-testid\":\"pagination-page-1\",type:\"button\",children:\"1\"}),(0,Ce.jsx)(Ba,{children:\"...\"})]}),S.map(x=>(0,Ce.jsx)(za,{onClick:()=>r(x),isActive:e===x,\"aria-label\":`${b} ${x}`,\"aria-current\":e===x?\"page\":void 0,\"data-testid\":`pagination-page-${x}`,type:\"button\",children:x},x)),t>7&&e<t-3&&(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)(Ba,{children:\"...\"}),(0,Ce.jsx)(za,{onClick:()=>r(t),isActive:!1,\"aria-label\":`${b} ${t}`,\"data-testid\":`pagination-page-${t}`,type:\"button\",children:t})]}),(0,Ce.jsx)(Hr,{onClick:u,onKeyDown:x=>m(x,u),disabled:e===t,\"aria-label\":a(o.pagination.nextPage),\"data-testid\":\"pagination-next\",type:\"button\",children:(0,Ce.jsx)(Us.default,{})}),i&&n&&(0,Ce.jsxs)(Ba,{as:\"output\",\"aria-live\":\"polite\",\"data-testid\":\"pagination-page-info\",children:[g,\"-\",d,\" \",a(o.pagination.of),\" \",n]})]})};function ot(e,t){return Math.ceil(e.length/t)}function at(e,t,r){let i=(t-1)*r,n=i+r;return e.slice(i,n)}function qs(e,t,r=\"desc\"){return[...e].sort((i,n)=>{let s=i[t],u=n[t];return r===\"asc\"?s-u:u-s})}function Gs(e,t,r=1){return t===0?\"0.0\":(e/t*100).toFixed(r)}var _r={last7days:7,last30days:30,last90days:90,thisMonth:31},Wr={last7days:\"Last 7 Days\",last30days:\"Last 30 Days\",last90days:\"Last 90 Days\",thisMonth:\"This Month\"};function Ys(e){return _r[e]??30}function Ea(e){return Wr[e]??\"Last 30 Days\"}function ce(e){return Ea(e)}function jr(e){return`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][e.getMonth()]} ${e.getDate()}`}function Ha(e){let t=new Date(e);return jr(t)}function Js(e,t){return`${Ha(e)} - ${Ha(t)}`}function Zs(e){return e.toISOString().split(\"T\")[0]}var Pe=require(\"@mui/material/styles\"),ve=require(\"@mui/material\"),Qs=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Xs}=Qs.ColorUtils,ke=(0,Pe.styled)(ve.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n max-width: 1400px;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`,_a=(0,Pe.styled)(ve.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>Xs(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`,Wa=(0,Pe.styled)(ve.Box)`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n }\n`,ja=(0,Pe.styled)(ve.Typography)`\n font-size: 3rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n line-height: 1.2;\n\n @media (max-width: 767px) {\n font-size: 2.5rem;\n }\n`,Ka=(0,Pe.styled)(ve.Box)`\n display: flex;\n align-items: center;\n gap: 4px;\n margin-top: 8px;\n font-size: 1.25rem;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n\n svg {\n font-size: 1.5rem;\n }\n\n @media (max-width: 767px) {\n font-size: 1rem;\n\n svg {\n font-size: 1.25rem;\n }\n }\n`,Gm=(0,Pe.styled)(ve.Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n\n @media (max-width: 767px) {\n font-size: 0.8125rem;\n }\n`,Ua=(0,Pe.styled)(ve.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`,At=(0,Pe.styled)(ve.Typography)`\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`,qa=(0,Pe.styled)(ve.Box)`\n width: 100%;\n height: 400px;\n\n @media (max-width: 767px) {\n height: 200px;\n }\n`,zt=(0,Pe.styled)(ve.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n ${({withCard:e=!0,theme:t})=>e&&`\n padding: 20px;\n background-color: ${Xs(t,\"N20\")};\n border-radius: 8px;\n box-shadow: ${t.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`,Ym=(0,Pe.styled)(ve.Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`,Bt=(0,Pe.styled)(ve.Typography)`\n text-align: center;\n color: ${({theme:e})=>e.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`,ed=(0,Pe.styled)(ve.Typography)`\n font-weight: 600;\n font-size: 14px;\n`,td=(0,Pe.styled)(ve.Typography)`\n font-size: 13px;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,od=(0,Pe.styled)(ve.Typography)`\n font-size: 13px;\n`,ad=(0,Pe.styled)(ve.Typography)`\n font-size: 13px;\n color: ${({theme:e,status:t})=>t===\"Active\"?e.palette.success.main:e.palette.warning.main};\n`;var ue=require(\"@mui/material/styles\"),he=require(\"@mui/material\"),rd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:yu}=rd.ColorUtils,id=(0,ue.styled)(he.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n`,nd=(0,ue.styled)(\"img\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n`,ld=(0,ue.styled)(he.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`,sd=(0,ue.styled)(he.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,dd=(0,ue.styled)(he.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Ga=(0,ue.styled)(he.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,pd=(0,ue.styled)(he.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,cd=(0,ue.styled)(he.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,ud=(0,ue.styled)(he.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>yu(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,gd=(0,ue.styled)(he.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`,fd=(0,ue.styled)(he.Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.primary.main};\n min-width: 24px;\n`,md=(0,ue.styled)(\"img\")`\n width: 48px;\n height: 48px;\n border-radius: 8px;\n object-fit: cover;\n`,hd=(0,ue.styled)(he.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,bd=(0,ue.styled)(he.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`,xd=(0,ue.styled)(he.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,yd=(0,ue.styled)(he.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n margin-top: 8px;\n padding-top: 8px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,Ya=(0,ue.styled)(he.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,Ja=(0,ue.styled)(he.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,Za=(0,ue.styled)(he.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;var wd=R(require(\"@mui/material/useMediaQuery\")),wu=\"(max-width:767px)\";function vt(){return(0,wd.default)(wu,{noSsr:!0})}var I=require(\"react/jsx-runtime\");function Cu(e){return{rank:e.rank,name:e.name,sku:`${a(o.fullView.products.skuPrefix)}-${e.id.replace(\"prod-\",\"\").padStart(3,\"0\")}`,image:e.imageUrl,units:e.unitsSold,revenue:e.revenue,volume:e.volume}}var go=({products:e,dateRange:t,market:r,productSort:i,isLoading:n=!1,onBack:s,onDateRangeChange:u,onMarketChange:m,onProductSortChange:w})=>{let[S,g]=(0,He.useState)(1),[d,b]=(0,He.useState)(i===\"revenue\"?\"revenue\":\"units\"),[x,D]=(0,He.useState)(\"desc\"),p=10,f=vt(),h=He.default.useCallback(()=>s?.(),[s]),v=He.default.useMemo(()=>[{key:\"dateRange\",label:a(o.filter.dateRange.label),value:t,icon:\"calendar\",options:[{value:\"last7days\",label:a(o.filter.dateRange.last7days)},{value:\"last30days\",label:a(o.filter.dateRange.last30days)},{value:\"last90days\",label:a(o.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(o.filter.dateRange.thisMonth)}]},{key:\"market\",label:a(o.filter.market.label),value:r,icon:\"globe\",options:[{value:\"all\",label:a(o.filter.market.all)},{value:\"us\",label:a(o.filter.market.us)},{value:\"ca\",label:a(o.filter.market.ca)},{value:\"jp\",label:a(o.filter.market.jp)},{value:\"kr\",label:a(o.filter.market.kr)},{value:\"au\",label:a(o.filter.market.au)},{value:\"nz\",label:a(o.filter.market.nz)}]},{key:\"sort\",label:a(o.filter.productSort.label),value:i,options:[{value:\"units\",label:a(o.filter.productSort.units)},{value:\"revenue\",label:a(o.filter.productSort.revenue)},{value:\"volume\",label:a(o.filter.productSort.volume)}]}],[t,r,i]),C=He.default.useCallback((y,T)=>{y===\"dateRange\"?u?.(T):y===\"market\"?m?.(T):y===\"sort\"&&(w?.(T),g(1))},[u,m,w]),F=He.default.useCallback((y,T)=>{b(y),D(T),g(1)},[]),j=He.default.useMemo(()=>e.map(Cu),[e]),B=He.default.useMemo(()=>[...j].sort((y,T)=>{let N=y[d],K=T[d];return x===\"asc\"?N-K:K-N}),[j,d,x]),Q=He.default.useMemo(()=>ot(B,p),[p,B]),l=He.default.useMemo(()=>at(B,S,p),[S,p,B]),c=He.default.useMemo(()=>[{key:\"rank\",label:a(o.fullView.products.columns.rank),sortable:!0},{key:\"name\",label:a(o.fullView.products.columns.product),sortable:!0,render:(y,T)=>(0,I.jsxs)(id,{children:[T.image&&(0,I.jsx)(nd,{src:T.image,alt:T.name}),(0,I.jsxs)(ld,{children:[(0,I.jsx)(sd,{children:T.name}),(0,I.jsx)(dd,{children:T.sku})]})]})},{key:\"units\",label:a(o.fullView.products.columns.unitsSold),sortable:!0,render:y=>(0,I.jsx)(Ga,{children:Number(y).toLocaleString()})},{key:\"revenue\",label:a(o.fullView.products.columns.revenue),sortable:!0,render:y=>(0,I.jsxs)(Ga,{children:[\"$\",Number(y).toLocaleString()]})},{key:\"volume\",label:a(o.fullView.products.columns.volume),sortable:!0,render:y=>(0,I.jsx)(Ga,{children:Number(y).toLocaleString()})}],[]);return n?(0,I.jsxs)(ke,{\"data-testid\":\"products-full-view\",children:[(0,I.jsx)(pe,{title:a(o.widget.topProducts.title),dateRange:ce(t),onBack:h,filters:v,onFilterChange:C}),(0,I.jsx)(dl,{})]}):e.length===0?(0,I.jsxs)(ke,{\"data-testid\":\"products-full-view\",children:[(0,I.jsx)(pe,{title:a(o.widget.topProducts.title),dateRange:ce(t),onBack:h,filters:v,onFilterChange:C}),(0,I.jsx)(Bt,{\"data-testid\":\"products-fullview-empty\",children:a(o.fullView.products.noProducts)})]}):(0,I.jsxs)(ke,{\"data-testid\":\"products-full-view\",children:[(0,I.jsx)(pe,{title:a(o.widget.topProducts.title),dateRange:ce(t),onBack:h,filters:v,onFilterChange:C}),f?(0,I.jsx)(pd,{\"data-testid\":\"products-fullview-mobile-cards\",children:l.map(y=>(0,I.jsxs)(ud,{children:[(0,I.jsxs)(gd,{children:[(0,I.jsxs)(fd,{children:[\"#\",y.rank]}),y.image&&(0,I.jsx)(md,{src:y.image,alt:y.name}),(0,I.jsxs)(hd,{children:[(0,I.jsx)(bd,{children:y.name}),(0,I.jsx)(xd,{children:y.sku})]})]}),(0,I.jsxs)(yd,{children:[(0,I.jsxs)(Ya,{children:[(0,I.jsx)(Ja,{children:a(o.widget.topProducts.units)}),(0,I.jsx)(Za,{children:y.units.toLocaleString()})]}),(0,I.jsxs)(Ya,{children:[(0,I.jsx)(Ja,{children:a(o.widget.topProducts.revenue)}),(0,I.jsxs)(Za,{children:[\"$\",y.revenue.toLocaleString()]})]}),(0,I.jsxs)(Ya,{children:[(0,I.jsx)(Ja,{children:a(o.filter.productSort.volume)}),(0,I.jsx)(Za,{children:y.volume.toLocaleString()})]})]})]},y.rank))}):(0,I.jsx)(cd,{\"data-testid\":\"products-fullview-desktop-table\",children:(0,I.jsx)(et,{columns:c,data:l,sortable:!0,onSort:F,sortColumn:d,sortDirection:x,getRowKey:y=>y.rank})}),Q>1&&(0,I.jsx)(tt,{currentPage:S,totalPages:Q,onPageChange:g,itemsPerPage:p,totalItems:B.length})]})};var je=R(require(\"react\")),Ve=require(\"recharts\"),Vd=R(Xo()),$d=R(ta());var _e=require(\"@mui/material/styles\"),We=require(\"@mui/material\"),Cd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:vu}=Cd.ColorUtils,vd=(0,_e.styled)(We.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>vu(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,kd=(0,_e.styled)(We.Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Sd=(0,_e.styled)(We.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,Dd=(0,_e.styled)(We.Typography)`\n font-size: 1rem;\n font-weight: 600;\n`,Td=(0,_e.styled)(We.Typography)`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Pd=(0,_e.styled)(\"a\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`,Rd=(0,_e.styled)(We.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,Qa=(0,_e.styled)(We.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`,Xa=(0,_e.styled)(We.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,er=(0,_e.styled)(We.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Md=(0,_e.styled)(We.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Od=(0,_e.styled)(We.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Ld=(0,_e.styled)(We.Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`;var M=require(\"react/jsx-runtime\"),fo=({conversionData:e,orders:t,dateRange:r,market:i,conversionFilter:n,isLoading:s=!1,onBack:u,onDateRangeChange:m,onMarketChange:w,onConversionFilterChange:S})=>{let[g,d]=(0,je.useState)(1),b=10,x=vt(),D=je.default.useCallback(()=>u?.(),[u]),p=je.default.useMemo(()=>e.length===0?0:e[e.length-1]?.rate||0,[e]),f=je.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:a(o.defaults.zeroTrend)};let c=e[0].rate,T=((e[e.length-1]?.rate||0)-c)/c*100,N=\"neutral\";return T>0?N=\"up\":T<0&&(N=\"down\"),{direction:N,value:`${T>=0?\"+\":\"\"}${T.toFixed(1)}%`}},[e]),h=je.default.useCallback(c=>c===\"members\"?a(o.filter.signupView.members):c===\"retail\"?a(o.filter.signupView.retail):c===\"brandAffiliates\"?a(o.filter.signupView.brandAffiliates):a(o.filter.signupView.all),[]),v=je.default.useMemo(()=>h(n),[n,h]),C=je.default.useMemo(()=>[{key:\"dateRange\",label:a(o.filter.dateRange.label),value:r,icon:\"calendar\",options:[{value:\"last7days\",label:a(o.filter.dateRange.last7days)},{value:\"last30days\",label:a(o.filter.dateRange.last30days)},{value:\"last90days\",label:a(o.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(o.filter.dateRange.thisMonth)}]},{key:\"market\",label:a(o.filter.market.label),value:i,icon:\"globe\",options:[{value:\"all\",label:a(o.filter.market.all)},{value:\"us\",label:a(o.filter.market.us)},{value:\"ca\",label:a(o.filter.market.ca)},{value:\"jp\",label:a(o.filter.market.jp)},{value:\"kr\",label:a(o.filter.market.kr)},{value:\"au\",label:a(o.filter.market.au)},{value:\"nz\",label:a(o.filter.market.nz)}]},{key:\"customerType\",label:a(o.filter.signupView.label),value:n,options:[{value:\"all\",label:a(o.filter.signupView.all)},{value:\"members\",label:a(o.filter.signupView.members)},{value:\"retail\",label:a(o.filter.signupView.retail)}]}],[n,r,i]),F=je.default.useCallback((c,y)=>{c===\"dateRange\"?m?.(y):c===\"market\"?w?.(y):c===\"customerType\"&&(S?.(y),d(1))},[S,m,w]),j=je.default.useMemo(()=>ot(t,b),[b,t]),B=je.default.useMemo(()=>at(t,g,b),[g,b,t]),Q=je.default.useMemo(()=>[{key:\"orderId\",label:a(o.fullView.conversionRate.columns.orderId),sortable:!0},{key:\"date\",label:a(o.fullView.conversionRate.columns.date),sortable:!0},{key:\"customerName\",label:a(o.fullView.conversionRate.columns.customer),sortable:!0},{key:\"customerType\",label:a(o.fullView.conversionRate.columns.type),sortable:!0},{key:\"items\",label:a(o.fullView.conversionRate.columns.items),sortable:!0},{key:\"total\",label:a(o.fullView.conversionRate.columns.total),sortable:!0,render:c=>`$${Number(c).toFixed(2)}`},{key:\"bv\",label:a(o.fullView.conversionRate.columns.bv),sortable:!0}],[]),l=je.default.useCallback(()=>n===\"members\"?\"#2e7d32\":n===\"retail\"?\"#ed6c02\":\"#1976d2\",[n]);return s?(0,M.jsxs)(ke,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,M.jsx)(pe,{title:a(o.widget.conversionRate.title),dateRange:ce(r),onBack:D,filters:C,onFilterChange:F}),(0,M.jsx)(Nt,{})]}):(0,M.jsxs)(ke,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,M.jsx)(pe,{title:a(o.widget.conversionRate.title),dateRange:ce(r),onBack:D,filters:C,onFilterChange:F}),(0,M.jsxs)(_a,{\"data-testid\":\"conversion-fullview-metric-chart\",children:[(0,M.jsxs)(Wa,{children:[(0,M.jsxs)(ja,{\"data-testid\":\"conversion-rate-value\",children:[p.toFixed(1),\"%\"]}),(0,M.jsxs)(Ka,{direction:f.direction,\"data-testid\":\"conversion-rate-trend\",children:[f.direction===\"up\"&&(0,M.jsx)(Vd.default,{}),f.direction===\"down\"&&(0,M.jsx)($d.default,{}),f.value]}),(0,M.jsx)(Ld,{children:a(o.widget.conversionRate.ordersPerSiteVisits)})]}),(0,M.jsx)(Ua,{children:(0,M.jsx)(qa,{\"data-testid\":\"conversion-fullview-chart\",children:(0,M.jsx)(Ve.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,M.jsxs)(Ve.LineChart,{data:e,children:[(0,M.jsx)(Ve.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,M.jsx)(Ve.XAxis,{dataKey:\"date\"}),(0,M.jsx)(Ve.YAxis,{tickFormatter:c=>`${c}%`,domain:[0,\"auto\"]}),(0,M.jsx)(Ve.Tooltip,{formatter:c=>typeof c==\"number\"?`${c.toFixed(2)}%`:typeof c==\"string\"?c:a(o.fullView.conversionRate.notAvailable)}),(0,M.jsx)(Ve.Legend,{}),(0,M.jsx)(Ve.Line,{type:\"monotone\",dataKey:\"rate\",stroke:l(),strokeWidth:2,name:`${a(o.widget.conversionRate.title)} (${v})`,dot:!1})]})})})})]}),(0,M.jsxs)(zt,{\"data-testid\":\"conversion-fullview-table-section\",children:[(0,M.jsxs)(At,{\"data-testid\":\"conversion-fullview-table-title\",children:[a(o.fullView.conversionRate.orderDetailsTitle),\" (\",t.length,\")\"]}),x?(0,M.jsx)(Md,{\"data-testid\":\"conversion-fullview-mobile-orders\",children:B.map(c=>(0,M.jsxs)(vd,{children:[(0,M.jsxs)(kd,{children:[(0,M.jsxs)(Sd,{children:[(0,M.jsx)(Dd,{children:c.customerName}),(0,M.jsx)(Td,{children:c.date})]}),(0,M.jsx)(Pd,{children:c.orderId})]}),(0,M.jsxs)(Rd,{children:[(0,M.jsxs)(Qa,{children:[(0,M.jsx)(Xa,{children:a(o.fullView.conversionRate.columns.items)}),(0,M.jsx)(er,{children:c.items})]}),(0,M.jsxs)(Qa,{children:[(0,M.jsx)(Xa,{children:a(o.fullView.conversionRate.columns.orderTotal)}),(0,M.jsxs)(er,{children:[\"$\",c.total.toFixed(2)]})]}),(0,M.jsxs)(Qa,{children:[(0,M.jsx)(Xa,{children:a(o.fullView.conversionRate.columns.totalSv)}),(0,M.jsx)(er,{children:c.bv})]})]})]},c.orderId))}):(0,M.jsx)(Od,{\"data-testid\":\"conversion-fullview-desktop-table\",children:(0,M.jsx)(et,{columns:Q,data:B,sortable:!0,getRowKey:c=>c.orderId})}),j>1&&(0,M.jsx)(tt,{currentPage:g,totalPages:j,onPageChange:d,itemsPerPage:b,totalItems:t.length})]})]})};var rt=R(require(\"react\")),re=require(\"recharts\"),Ed=R(Xo()),Hd=R(ta());var mo=require(\"@mui/material/styles\"),ho=require(\"@mui/material\"),Fd=require(\"@nuskin/foundation-theme\");var{getGenomeColor:ku}=Fd.ColorUtils,Nd=(0,mo.styled)(ho.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Id=(0,mo.styled)(ho.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Ad=(0,mo.styled)(ho.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({theme:e})=>ku(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,zd=(0,mo.styled)(qa)`\n min-height: 320px;\n\n @media (max-width: 767px) {\n min-height: 260px;\n height: 260px;\n }\n`,Bd=(0,mo.styled)(ho.Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`;var O=require(\"react/jsx-runtime\"),Yt={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#5F7388\"};function tr(e){if(typeof e==\"number\")return Number.isFinite(e)?e:0;if(typeof e==\"string\"){let t=Number(e.replace(/,/g,\"\"));return Number.isFinite(t)?t:0}return 0}var or=({signupData:e,signups:t,dateRange:r,market:i,signupView:n,isLoading:s=!1,onBack:u,onDateRangeChange:m,onMarketChange:w,onSignupViewChange:S})=>{let[g,d]=(0,rt.useState)(1),b=10,x=vt(),D=rt.default.useCallback(()=>u?.(),[u]),p=rt.default.useMemo(()=>e.map(l=>{let c=l,y=tr(c.members),T=tr(c.retail),N=tr(c.brandAffiliates??c.brandAffiliate??c.brand_affiliates??c.brand_affiliate),K=tr(c.total??c.all??c.signupTotal??c.value);return{...l,total:K>0?K:y+T+N,members:y,retail:T,brandAffiliates:N}}),[e]),f=rt.default.useMemo(()=>p.length===0?0:p[p.length-1].total,[p]),h=rt.default.useMemo(()=>{if(p.length<2)return{direction:\"neutral\",value:a(o.defaults.zeroTrend)};let l=p[0].total,c=p[p.length-1].total;if(l<=0)return{direction:\"neutral\",value:a(o.defaults.zeroTrend)};let y=(c-l)/l*100,T=\"neutral\";return y>0?T=\"up\":y<0&&(T=\"down\"),{direction:T,value:`${y>=0?\"+\":\"\"}${y.toFixed(1)}%`}},[p]),v=p.length>0,C=rt.default.useMemo(()=>[{key:\"dateRange\",label:a(o.filter.dateRange.label),value:r,icon:\"calendar\",options:[{value:\"last7days\",label:a(o.filter.dateRange.last7days)},{value:\"last30days\",label:a(o.filter.dateRange.last30days)},{value:\"last90days\",label:a(o.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(o.filter.dateRange.thisMonth)}]},{key:\"market\",label:a(o.filter.market.label),value:i,icon:\"globe\",options:[{value:\"all\",label:a(o.filter.market.all)},{value:\"us\",label:a(o.filter.market.us)},{value:\"ca\",label:a(o.filter.market.ca)},{value:\"jp\",label:a(o.filter.market.jp)},{value:\"kr\",label:a(o.filter.market.kr)},{value:\"au\",label:a(o.filter.market.au)},{value:\"nz\",label:a(o.filter.market.nz)}]},{key:\"signupView\",label:a(o.filter.signupView.label),value:n,options:[{value:\"all\",label:a(o.filter.signupView.all)},{value:\"members\",label:a(o.filter.signupView.members)},{value:\"retail\",label:a(o.filter.signupView.retail)},{value:\"brandAffiliates\",label:a(o.filter.signupView.brandAffiliates)}]}],[r,i,n]),F=rt.default.useCallback((l,c)=>{l===\"dateRange\"?m?.(c):l===\"market\"?w?.(c):l===\"signupView\"&&(S?.(c),d(1))},[m,w,S]),j=rt.default.useMemo(()=>ot(t,b),[t,b]),B=rt.default.useMemo(()=>at(t,g,b),[g,b,t]),Q=rt.default.useMemo(()=>[{key:\"id\",label:a(o.fullView.signups.columns.id),sortable:!0},{key:\"name\",label:a(o.fullView.signups.columns.name),sortable:!0},{key:\"date\",label:a(o.fullView.signups.columns.date),sortable:!0},{key:\"type\",label:a(o.fullView.signups.columns.type),sortable:!0},{key:\"email\",label:a(o.fullView.signups.columns.email),sortable:!0},{key:\"status\",label:a(o.fullView.signups.columns.status),sortable:!0}],[]);return s?(0,O.jsxs)(ke,{\"data-testid\":\"signups-full-view\",children:[(0,O.jsx)(pe,{title:a(o.widget.signups.title),dateRange:ce(r),onBack:D,filters:C,onFilterChange:F}),(0,O.jsx)(Nt,{})]}):(0,O.jsxs)(ke,{\"data-testid\":\"signups-full-view\",children:[(0,O.jsx)(pe,{title:a(o.widget.signups.title),dateRange:ce(r),onBack:D,filters:C,onFilterChange:F}),(0,O.jsxs)(_a,{\"data-testid\":\"signups-fullview-metric-chart\",children:[(0,O.jsxs)(Wa,{children:[(0,O.jsx)(ja,{\"data-testid\":\"signups-total\",children:f.toLocaleString()}),(0,O.jsxs)(Ka,{direction:h.direction,children:[h.direction===\"up\"&&(0,O.jsx)(Ed.default,{}),h.direction===\"down\"&&(0,O.jsx)(Hd.default,{}),h.value]}),(0,O.jsx)(Bd,{children:a(o.widget.signups.totalSignupsInPeriod)})]}),(0,O.jsx)(Ua,{children:v?(0,O.jsx)(zd,{\"data-testid\":\"signups-fullview-chart\",children:(0,O.jsx)(re.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:240,children:(0,O.jsxs)(re.LineChart,{data:p,children:[(0,O.jsx)(re.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,O.jsx)(re.XAxis,{dataKey:\"date\"}),(0,O.jsx)(re.YAxis,{}),(0,O.jsx)(re.Tooltip,{}),(0,O.jsx)(re.Legend,{}),n===\"all\"&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"total\",stroke:Yt.total,strokeWidth:2,name:a(o.widget.signups.total),dot:{r:2},connectNulls:!0}),(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"members\",stroke:Yt.members,strokeWidth:2,name:a(o.widget.signups.members),dot:{r:2},connectNulls:!0}),(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Yt.retail,strokeWidth:2,name:a(o.widget.signups.retail),dot:{r:2},connectNulls:!0}),(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Yt.brandAffiliates,strokeWidth:2,name:a(o.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]}),n===\"members\"&&(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"members\",stroke:Yt.members,strokeWidth:2,name:a(o.widget.signups.members),dot:{r:2},connectNulls:!0}),n===\"retail\"&&(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"retail\",stroke:Yt.retail,strokeWidth:2,name:a(o.widget.signups.retail),dot:{r:2},connectNulls:!0}),n===\"brandAffiliates\"&&(0,O.jsx)(re.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:Yt.brandAffiliates,strokeWidth:2,name:a(o.widget.signups.brandAffiliates),dot:{r:2},connectNulls:!0})]})})}):(0,O.jsx)(Bt,{\"data-testid\":\"signups-fullview-chart-empty\",children:a(o.widget.signups.noTrendData)})})]}),(0,O.jsxs)(zt,{\"data-testid\":\"signups-fullview-table-section\",children:[(0,O.jsx)(At,{\"data-testid\":\"signups-fullview-table-title\",children:`${a(o.fullView.signups.detailsTitle)} (${t.length})`}),x?(0,O.jsx)(Nd,{\"data-testid\":\"signups-fullview-mobile-cards\",children:B.map(l=>(0,O.jsxs)(Ad,{children:[(0,O.jsx)(ed,{children:l.name}),(0,O.jsxs)(td,{children:[l.date,\" - \",l.type]}),(0,O.jsx)(od,{children:l.email}),(0,O.jsx)(ad,{status:l.status,children:l.status})]},l.id))}):(0,O.jsx)(Id,{\"data-testid\":\"signups-fullview-desktop-table\",children:(0,O.jsx)(et,{columns:Q,data:B,sortable:!0,getRowKey:l=>l.id})}),j>1&&(0,O.jsx)(tt,{currentPage:g,totalPages:j,onPageChange:d,itemsPerPage:b,totalItems:t.length})]})]})};var it=R(require(\"react\")),kt=require(\"recharts\");var bo=require(\"@nuskin/foundation-theme\"),Re=require(\"@mui/material/styles\"),Se=require(\"@mui/material\"),_d=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Kr}=_d.ColorUtils,ar=(0,bo.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,rr=(0,bo.styled)(\"div\")`\n flex: 1;\n`,ir=(0,bo.styled)(\"span\")`\n font-weight: 600;\n`,nr=(0,bo.styled)(\"span\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,lr=(0,bo.styled)(\"span\")`\n font-weight: 600;\n`,Wd=(0,Re.styled)(Se.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>Kr(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`,jd=(0,Re.styled)(Se.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,Kd=(0,Re.styled)(Se.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,Ud=(0,Re.styled)(Se.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,qd=(0,Re.styled)(Se.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,Gd=(0,Re.styled)(Se.Typography)`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?t.palette.success.main:e===\"down\"?t.palette.error.main:t.palette.text.secondary};\n`,Yd=(0,Re.styled)(Se.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,Jd=(0,Re.styled)(Se.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Kr(e,\"N30\")};\n }\n`,sr=(0,Re.styled)(Se.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Zd=(0,Re.styled)(Se.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Qd=(0,Re.styled)(Se.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Xd=(0,Re.styled)(Se.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,ep=(0,Re.styled)(Se.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,tp=(0,Re.styled)(Se.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,op=(0,Re.styled)(Se.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,ap=(0,Re.styled)(Se.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Kr(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`;var L=require(\"react/jsx-runtime\");function Su(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),r=Number(t);return Number.isFinite(r)?r:null}var dr=({categories:e,dateRange:t,market:r,categorySort:i,isLoading:n=!1,onBack:s,onDateRangeChange:u,onMarketChange:m,onCategorySortChange:w})=>{let[S,g]=(0,it.useState)(1),d=10,b=vt(),x=it.default.useCallback(()=>s?.(),[s]),D=it.default.useMemo(()=>[{key:\"dateRange\",label:a(o.filter.dateRange.label),value:t,icon:\"calendar\",options:[{value:\"last7days\",label:a(o.filter.dateRange.last7days)},{value:\"last30days\",label:a(o.filter.dateRange.last30days)},{value:\"last90days\",label:a(o.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(o.filter.dateRange.thisMonth)}]},{key:\"market\",label:a(o.filter.market.label),value:r,icon:\"globe\",options:[{value:\"all\",label:a(o.filter.market.all)},{value:\"us\",label:a(o.filter.market.us)},{value:\"ca\",label:a(o.filter.market.ca)},{value:\"jp\",label:a(o.filter.market.jp)},{value:\"kr\",label:a(o.filter.market.kr)},{value:\"au\",label:a(o.filter.market.au)},{value:\"nz\",label:a(o.filter.market.nz)}]},{key:\"sort\",label:a(o.filter.productSort.label),value:i,options:[{value:\"revenue\",label:a(o.filter.productSort.revenue)},{value:\"units\",label:a(o.filter.productSort.units)}]}],[i,t,r]),p=it.default.useCallback((l,c)=>{l===\"dateRange\"?u?.(c):l===\"market\"?m?.(c):l===\"sort\"&&(w?.(c),g(1))},[w,u,m]),f=it.default.useMemo(()=>[...e].sort((l,c)=>i===\"revenue\"?c.revenue-l.revenue:c.percentage-l.percentage),[e,i]),{totalRevenue:h,totalRevenueTrendDirection:v,totalRevenueTrend:C}=it.default.useMemo(()=>{let l=f.reduce((q,be)=>q+be.revenue,0),c=f.reduce((q,be)=>{let Oe=Su(be.trend?.revenue);return Oe===null?q:{weightedSum:q.weightedSum+Oe*be.revenue,weight:q.weight+be.revenue}},{weightedSum:0,weight:0}),y=c.weight>0?c.weightedSum/c.weight:0,T=\"neutral\";y>0?T=\"up\":y<0&&(T=\"down\");let K=`${y>0?\"+\":\"\"}${y.toFixed(1)}%`;return{totalRevenue:l,totalRevenueTrendDirection:T,totalRevenueTrend:K}},[f]),F=it.default.useMemo(()=>f.slice(0,5),[f]),j=it.default.useMemo(()=>ot(f,d),[d,f]),B=it.default.useMemo(()=>at(f,S,d),[S,d,f]),Q=it.default.useMemo(()=>[{key:\"name\",label:a(o.fullView.categories.columns.category),sortable:!0,render:(l,c)=>(0,L.jsxs)(ar,{children:[(0,L.jsx)(sr,{dotColor:c.color}),(0,L.jsx)(\"span\",{children:c.name})]})},{key:\"revenue\",label:a(o.fullView.categories.columns.revenue),sortable:!0,render:l=>`$${Number(l).toLocaleString()}`},{key:\"percentage\",label:a(o.fullView.categories.columns.percentOfTotal),sortable:!0,render:l=>`${Number(l)}%`},{key:\"trend\",label:a(o.fullView.categories.columns.trend),render:(l,c)=>c.trend?.revenue??a(o.defaults.noValue)}],[]);return n?(0,L.jsxs)(ke,{\"data-testid\":\"categories-full-view\",children:[(0,L.jsx)(pe,{title:a(o.widget.topCategories.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,L.jsx)(Nt,{})]}):e.length===0?(0,L.jsxs)(ke,{\"data-testid\":\"categories-full-view\",children:[(0,L.jsx)(pe,{title:a(o.widget.topCategories.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,L.jsx)(Bt,{\"data-testid\":\"categories-fullview-empty\",children:a(o.fullView.categories.noCategoryData)})]}):(0,L.jsxs)(ke,{\"data-testid\":\"categories-full-view\",children:[(0,L.jsx)(pe,{title:a(o.widget.topCategories.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,L.jsxs)(Wd,{\"data-testid\":\"categories-fullview-top-section\",children:[(0,L.jsxs)(jd,{\"data-testid\":\"categories-fullview-chart\",children:[(0,L.jsx)(kt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,L.jsxs)(kt.PieChart,{children:[(0,L.jsx)(kt.Pie,{data:f,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:f.map(l=>(0,L.jsx)(kt.Cell,{fill:l.color},`cell-${l.id}`))}),(0,L.jsx)(kt.Tooltip,{formatter:l=>`$${l.toLocaleString()}`})]})}),(0,L.jsxs)(Kd,{\"data-testid\":\"categories-fullview-donut-center\",children:[(0,L.jsx)(Ud,{children:a(o.stats.revenue)}),(0,L.jsxs)(qd,{children:[\"$\",h.toLocaleString()]}),(0,L.jsx)(Gd,{direction:v,children:C})]})]}),(0,L.jsx)(Yd,{\"data-testid\":\"categories-fullview-summary\",children:F.map(l=>(0,L.jsxs)(Jd,{children:[(0,L.jsx)(sr,{dotColor:l.color}),(0,L.jsxs)(Zd,{children:[(0,L.jsx)(Qd,{children:l.name}),(0,L.jsxs)(Xd,{children:[\"$\",l.revenue.toLocaleString()]})]}),(0,L.jsxs)(ep,{children:[l.percentage,\"%\"]})]},l.id))})]}),(0,L.jsxs)(zt,{\"data-testid\":\"categories-fullview-table-section\",children:[(0,L.jsxs)(At,{\"data-testid\":\"categories-fullview-table-title\",children:[a(o.fullView.categories.allCategoriesTitle),\" (\",f.length,\")\"]}),b?(0,L.jsx)(op,{children:B.map(l=>(0,L.jsxs)(ap,{children:[(0,L.jsx)(sr,{dotColor:l.color}),(0,L.jsxs)(rr,{children:[(0,L.jsx)(ir,{children:l.name}),(0,L.jsxs)(nr,{children:[\"$\",l.revenue.toLocaleString()]})]}),(0,L.jsxs)(lr,{children:[l.percentage,\"%\"]})]},l.id))}):(0,L.jsx)(tp,{children:(0,L.jsx)(et,{columns:Q,data:B,sortable:!0,getRowKey:l=>l.id})}),j>1&&(0,L.jsx)(tt,{currentPage:S,totalPages:j,onPageChange:g,itemsPerPage:d,totalItems:f.length})]})]})};var xo=require(\"react/jsx-runtime\"),Du=\"shoppingDashboardView\",Tu=[],Pu=[],Ru=[],Mu=[],Ou=[],Lu=[];function ip(e){return typeof e==\"object\"&&e!==null}function Vu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"signups\"||e===\"categories\"}function pr(e,t){if(!ip(e))return\"dashboard\";let r=e[t];return Vu(r)?r:\"dashboard\"}function rp(e,t,r){return{...ip(e)?e:{},[t]:r}}function $u(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var np=({stats:e,topProducts:t,conversionData:r,signupData:i,categories:n,orders:s,signups:u,isLoading:m=!1,error:w,shopTitle:S,className:g,initialDateRange:d=\"last30days\",initialMarket:b=\"all\",initialProductSort:x=\"units\",initialSignupView:D=\"all\",initialConversionFilter:p=\"all\",initialCategorySort:f=\"revenue\",historyAdapter:h,historyStateKey:v=Du,resetToDashboardOnMount:C=!0,onDateRangeChange:F,onMarketChange:j,onProductSortChange:B,onSignupViewChange:Q,onConversionFilterChange:l,onCategorySortChange:c,onViewChange:y})=>{let[T,N]=ee.default.useState(\"dashboard\"),K=ee.default.useRef(!1),[q,be]=ee.default.useState(d),[Oe,vo]=ee.default.useState(b),[lt,Qt]=ee.default.useState(x),[Lt,se]=ee.default.useState(D),[ft,mt]=ee.default.useState(p),[Et,ko]=ee.default.useState(f),Ao=t??Tu,zo=r??Pu,Ye=i??Ru,So=n??Mu,Vt=s??Ou,$t=u??Lu,Ke=ee.default.useCallback(J=>{N(J),y?.(J)},[y]),Ht=ee.default.useCallback(()=>h?pr(h.location?.state,v):typeof window>\"u\"?\"dashboard\":pr(window.history.state,v),[h,v]),st=ee.default.useCallback((J,eo)=>{if(h){let _o=rp(h.location?.state,v,J),ei=$u(h.location,_o);if(eo===\"replace\"){h.replace(ei);return}h.push(ei);return}if(typeof window>\"u\")return;let jt=rp(window.history.state,v,J);if(eo===\"replace\"){window.history.replaceState(jt,\"\");return}window.history.pushState(jt,\"\")},[h,v]);ee.default.useEffect(()=>{if(C?(st(\"dashboard\",\"replace\"),K.current=!1,Ke(\"dashboard\")):Ke(Ht()),h)return h.listen((eo,jt)=>{if(jt===\"POP\"){let _o=pr(eo.state,v);K.current=_o!==\"dashboard\",Ke(_o)}});let J=eo=>{let jt=pr(eo.state,v);K.current=jt!==\"dashboard\",Ke(jt)};return window.addEventListener(\"popstate\",J),()=>{window.removeEventListener(\"popstate\",J)}},[h,v,Ht,C,Ke,st]);let dt=ee.default.useCallback(J=>{K.current=!0,st(J,\"push\"),Ke(J)},[Ke,st]),_t=ee.default.useCallback(()=>{if(T!==\"dashboard\"&&K.current){if(h){h.goBack();return}typeof window<\"u\"&&window.history.back();return}K.current=!1,st(\"dashboard\",\"replace\"),Ke(\"dashboard\")},[T,h,Ke,st]),Ft=ee.default.useCallback(J=>{be(J),F?.(J)},[F]),Wt=ee.default.useCallback(J=>{vo(J),j?.(J)},[j]),Bo=ee.default.useCallback(J=>{Qt(J),B?.(J)},[B]),Eo=ee.default.useCallback(J=>{se(J),Q?.(J)},[Q]),Y=ee.default.useCallback(J=>{mt(J),l?.(J)},[l]),Tt=ee.default.useCallback(J=>{ko(J),c?.(J)},[c]),Pt=ee.default.useCallback(()=>{dt(\"products\")},[dt]),Xt=ee.default.useCallback(()=>{dt(\"conversion-rate\")},[dt]),Ho=ee.default.useCallback(()=>{dt(\"signups\")},[dt]),Ap=ee.default.useCallback(()=>{dt(\"categories\")},[dt]);return T===\"products\"?(0,xo.jsx)(go,{products:Ao,dateRange:q,market:Oe,productSort:lt,isLoading:m,onBack:_t,onDateRangeChange:Ft,onMarketChange:Wt,onProductSortChange:Bo}):T===\"conversion-rate\"?(0,xo.jsx)(fo,{conversionData:zo,orders:Vt,dateRange:q,market:Oe,conversionFilter:ft,isLoading:m,onBack:_t,onDateRangeChange:Ft,onMarketChange:Wt,onConversionFilterChange:Y}):T===\"signups\"?(0,xo.jsx)(or,{signupData:Ye,signups:$t,dateRange:q,market:Oe,signupView:Lt,isLoading:m,onBack:_t,onDateRangeChange:Ft,onMarketChange:Wt,onSignupViewChange:Eo}):T===\"categories\"?(0,xo.jsx)(dr,{categories:So,dateRange:q,market:Oe,categorySort:Et,isLoading:m,onBack:_t,onDateRangeChange:Ft,onMarketChange:Wt,onCategorySortChange:Tt}):(0,xo.jsx)(La,{stats:e,topProducts:Ao,conversionData:zo,signupData:Ye,categories:So,isLoading:m,error:w,shopTitle:S,className:g,dateRange:q,market:Oe,productSort:lt,signupView:Lt,conversionFilter:ft,categorySort:Et,onDateRangeChange:Ft,onMarketChange:Wt,onProductSortChange:Bo,onSignupViewChange:Eo,onConversionFilterChange:Y,onCategorySortChange:Tt,onProductsTitleClick:Pt,onConversionTitleClick:Xt,onSignupsTitleClick:Ho,onCategoriesToTitleClick:Ap})};var yo=require(\"@nuskin/foundation-theme\"),Ur=(0,yo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`,lp=(0,yo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,sp=(0,yo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: stretch;\n }\n\n & > * {\n flex: 1;\n }\n`,dp=(0,yo.styled)(\"div\")`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`,pp=(0,yo.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var cr=R(require(\"react\")),St=require(\"recharts\");var $={title:{key:\"productOfferDashboard.title\",fallback:\"Performance Overview\"},error:{key:\"productOfferDashboard.error\",fallback:\"Failed to load dashboard data. Please try again.\"},stats:{revenue:{key:\"productOfferDashboard.stats.revenue\",fallback:\"Total Revenue\"},offersPurchased:{key:\"productOfferDashboard.stats.offersPurchased\",fallback:\"Offers Purchased\"},conversionRate:{key:\"productOfferDashboard.stats.conversionRate\",fallback:\"Conversion Rate\"},trendUp:{key:\"productOfferDashboard.stats.trendUp\",fallback:\"Trending up\"},trendDown:{key:\"productOfferDashboard.stats.trendDown\",fallback:\"Trending down\"},trendNeutral:{key:\"productOfferDashboard.stats.trendNeutral\",fallback:\"No change\"},comparedTo:{key:\"productOfferDashboard.stats.comparedTo\",fallback:\"compared to this time last month\"}},filter:{dateRange:{label:{key:\"productOfferDashboard.filter.dateRange.label\",fallback:\"Date Range\"},last7days:{key:\"productOfferDashboard.filter.dateRange.last7days\",fallback:\"Last 7 Days\"},last30days:{key:\"productOfferDashboard.filter.dateRange.last30days\",fallback:\"Last 30 Days\"},last90days:{key:\"productOfferDashboard.filter.dateRange.last90days\",fallback:\"Last 90 Days\"},thisMonth:{key:\"productOfferDashboard.filter.dateRange.thisMonth\",fallback:\"This Month\"}},market:{label:{key:\"productOfferDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"productOfferDashboard.filter.market.all\",fallback:\"All Markets\"}},offerSort:{byRevenue:{key:\"productOfferDashboard.filter.offerSort.byRevenue\",fallback:\"Revenue\"},byUnits:{key:\"productOfferDashboard.filter.offerSort.byUnits\",fallback:\"Units\"}},productSort:{byUnits:{key:\"productOfferDashboard.filter.productSort.byUnits\",fallback:\"Units\"},byRevenue:{key:\"productOfferDashboard.filter.productSort.byRevenue\",fallback:\"Revenue\"},byVolume:{key:\"productOfferDashboard.filter.productSort.byVolume\",fallback:\"Volume\"}},conversionFilter:{overall:{key:\"productOfferDashboard.filter.conversionFilter.overall\",fallback:\"Overall\"}}},widget:{topProducts:{title:{key:\"productOfferDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},emptyState:{key:\"productOfferDashboard.widget.topProducts.emptyState\",fallback:\"No products data available\"}},conversionRate:{title:{key:\"productOfferDashboard.widget.conversionRate.title\",fallback:\"Conversion Rate\"},subtitle:{key:\"productOfferDashboard.widget.conversionRate.subtitle\",fallback:\"Orders \\xF7 Site visits\"}},topPerformingOffers:{title:{key:\"productOfferDashboard.widget.topPerformingOffers.title\",fallback:\"Top Performing Offers\"},totalRevenue:{key:\"productOfferDashboard.widget.topPerformingOffers.totalRevenue\",fallback:\"Total revenue\"},emptyState:{key:\"productOfferDashboard.widget.topPerformingOffers.emptyState\",fallback:\"No offers data available\"}},menu:{fullView:{key:\"productOfferDashboard.widget.menu.fullView\",fallback:\"Full View\"}}},navigation:{back:{key:\"productOfferDashboard.navigation.back\",fallback:\"Back to Dashboard\"}},ariaLabel:{dashboard:{key:\"productOfferDashboard.ariaLabel.dashboard\",fallback:\"Product Offer Performance Dashboard\"},statsCard:{key:\"productOfferDashboard.ariaLabel.statsCard\",fallback:\"Performance metric\"},conversionChart:{key:\"productOfferDashboard.ariaLabel.conversionChart\",fallback:\"Conversion rate chart\"},topProducts:{key:\"productOfferDashboard.ariaLabel.topProducts\",fallback:\"Top selling products\"},topOffers:{key:\"productOfferDashboard.ariaLabel.topOffers\",fallback:\"Top performing offers chart\"},widgetMenu:{key:\"productOfferDashboard.ariaLabel.widgetMenu\",fallback:\"Widget options menu\"},filterDateRange:{key:\"productOfferDashboard.ariaLabel.filterDateRange\",fallback:\"Filter by date range\"},filterMarket:{key:\"productOfferDashboard.ariaLabel.filterMarket\",fallback:\"Filter by market\"},backButton:{key:\"productOfferDashboard.ariaLabel.backButton\",fallback:\"Back to dashboard overview\"}},fullView:{topOffers:{title:{key:\"productOfferDashboard.fullView.topOffers.title\",fallback:\"Top Performing Offers\"},columnName:{key:\"productOfferDashboard.fullView.topOffers.columnName\",fallback:\"Offer Name\"},columnRevenue:{key:\"productOfferDashboard.fullView.topOffers.columnRevenue\",fallback:\"Revenue\"},columnPercentage:{key:\"productOfferDashboard.fullView.topOffers.columnPercentage\",fallback:\"Share\"},columnTrend:{key:\"productOfferDashboard.fullView.topOffers.columnTrend\",fallback:\"Trend\"}}},defaults:{trendZero:{key:\"productOfferDashboard.defaults.trendZero\",fallback:\"+0%\"},noData:{key:\"productOfferDashboard.defaults.noData\",fallback:\"--\"}}};function A(e){return e.fallback}var _=require(\"react/jsx-runtime\");function Fu(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),r=Number(t);return Number.isFinite(r)?r:null}var Nu=e=>`$${e.toLocaleString()}`,Iu=({offers:e,offerSort:t,isLoading:r=!1,title:i,onSortChange:n,onTitleClick:s})=>{let u=cr.default.useCallback(d=>{let b=d.target.value;n?.(b)},[n]),{sortedOffers:m,totalRevenue:w,trendDirection:S,formattedTrend:g}=cr.default.useMemo(()=>{let d=[...e].sort((v,C)=>t===\"revenue\"?C.revenue-v.revenue:C.percentage-v.percentage),b=d.reduce((v,C)=>v+C.revenue,0),x=d.reduce((v,C)=>{let F=Fu(C.trend?.revenue);return F===null?v:{weightedSum:v.weightedSum+F*C.revenue,weight:v.weight+C.revenue}},{weightedSum:0,weight:0}),D=x.weight>0?x.weightedSum/x.weight:0,p=\"neutral\";D>0?p=\"up\":D<0&&(p=\"down\");let h=`${D>0?\"+\":\"\"}${D.toFixed(1)}%`;return{sortedOffers:d,totalRevenue:b,trendDirection:p,formattedTrend:h}},[e,t]);return r&&e.length===0?(0,_.jsx)(It,{\"data-testid\":\"widget-top-offers\",children:(0,_.jsx)(sa,{})}):e.length===0?(0,_.jsxs)(It,{\"data-testid\":\"widget-top-offers\",children:[(0,_.jsx)(co,{children:(0,_.jsx)(uo,{children:i??A($.widget.topPerformingOffers.title)})}),(0,_.jsx)(Ra,{\"data-testid\":\"top-offers-empty-state\",children:(0,_.jsx)(Ma,{children:A($.widget.topPerformingOffers.emptyState)})})]}):(0,_.jsxs)(It,{as:\"section\",\"data-testid\":\"widget-top-offers\",\"aria-label\":A($.ariaLabel.topOffers),children:[(0,_.jsxs)(co,{children:[(0,_.jsx)(uo,{as:\"button\",onClick:s,\"aria-label\":A($.ariaLabel.topOffers),\"data-testid\":\"widget-title-top-offers\",children:i??A($.widget.topPerformingOffers.title)}),(0,_.jsxs)(ga,{children:[(0,_.jsxs)(fa,{id:\"offer-sort\",\"data-testid\":\"offer-sort-dropdown\",value:t,onChange:u,disabled:r,\"aria-label\":A($.ariaLabel.topOffers),children:[(0,_.jsx)(\"option\",{value:\"revenue\",children:A($.filter.offerSort.byRevenue)}),(0,_.jsx)(\"option\",{value:\"units\",children:A($.filter.offerSort.byUnits)})]}),(0,_.jsx)(Qe,{widgetId:\"top-offers\",onFullView:s})]})]}),(0,_.jsxs)(ma,{children:[(0,_.jsxs)(ha,{\"data-testid\":\"top-offers-chart\",children:[(0,_.jsx)(St.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,_.jsxs)(St.PieChart,{children:[(0,_.jsx)(St.Pie,{data:m,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:m.map(d=>(0,_.jsx)(St.Cell,{fill:d.color},`cell-${d.id}`))}),(0,_.jsx)(St.Tooltip,{formatter:Nu})]})}),(0,_.jsxs)(ba,{\"data-testid\":\"top-offers-donut-center\",children:[(0,_.jsx)(xa,{children:A($.widget.topPerformingOffers.totalRevenue)}),(0,_.jsxs)(ya,{children:[\"$\",w.toLocaleString()]}),(0,_.jsx)(wa,{direction:S,children:g})]})]}),(0,_.jsx)(Ca,{\"data-testid\":\"top-offers-legend-container\",children:m.map((d,b)=>(0,_.jsxs)(va,{\"data-testid\":`offer-legend-${b}`,children:[(0,_.jsx)(ka,{color:d.color}),(0,_.jsxs)(Sa,{children:[(0,_.jsx)(Da,{children:d.name}),(0,_.jsxs)(Ta,{children:[\"$\",d.revenue.toLocaleString()]})]}),(0,_.jsxs)(Pa,{children:[d.percentage,\"%\"]})]},d.id))})]})]})},No=cr.default.memo(Iu);No.displayName=\"TopPerformingOffersPieChart\";var ze=require(\"react/jsx-runtime\"),Au=[],zu=[],Bu=[],ur=({stats:e,topProducts:t,conversionData:r,topOffers:i,isLoading:n=!1,error:s,dashboardTitle:u,className:m,dateRange:w=\"last30days\",market:S=\"all\",productSort:g=\"units\",conversionFilter:d=\"all\",offerSort:b=\"revenue\",onDateRangeChange:x,onMarketChange:D,onProductSortChange:p,onConversionFilterChange:f,onOfferSortChange:h,onProductsTitleClick:v,onConversionTitleClick:C,onOffersTitleClick:F})=>{let j=t??Au,B=r??zu,Q=i??Bu,l=c=>c?c.startsWith(\"+\")&&c!==\"+0%\"?\"up\":c.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return s?(0,ze.jsx)(Ur,{as:\"main\",className:m,\"aria-label\":A($.ariaLabel.dashboard),children:(0,ze.jsxs)(pp,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,ze.jsxs)(\"strong\",{children:[A($.error),\":\"]}),\" \",s]})}):(0,ze.jsxs)(Ur,{as:\"main\",className:m,\"data-testid\":\"product-offer-dashboard\",\"aria-label\":A($.ariaLabel.dashboard),\"aria-busy\":n,children:[(0,ze.jsx)(ro,{shopTitle:u??A($.title),dateRange:w,market:S,isLoading:n,stats:e?{shopTitle:e.shopTitle??\"\",dateRange:e.dateRange,selectedMarket:e.selectedMarket,metrics:{revenue:e.metrics.revenue,volume:\"\",siteVisits:\"\",conversionRate:e.metrics.conversionRate},trend:{}}:void 0,onDateRangeChange:x,onMarketChange:D}),(0,ze.jsxs)(lp,{\"data-testid\":\"top-charts-row\",children:[(0,ze.jsx)(qt,{conversionData:B,conversionFilter:d,isLoading:n,onFilterChange:f,onTitleClick:C}),(0,ze.jsxs)(sp,{\"data-testid\":\"stats-card-stack\",children:[(0,ze.jsx)(wt,{title:A($.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:l(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:n}),(0,ze.jsx)(wt,{title:A($.stats.offersPurchased),value:e?.metrics?.offersPurchased??\"0\",trendDirection:l(e?.trend?.offersPurchased),trendValue:e?.trend?.offersPurchased,testId:\"stats-card-offers-purchased\",isLoading:n})]})]}),(0,ze.jsxs)(dp,{\"data-testid\":\"bottom-charts-row\",children:[(0,ze.jsx)(Ut,{products:j,productSort:g,isLoading:n,maxProducts:5,onSortChange:p,onTitleClick:v}),(0,ze.jsx)(No,{offers:Q,offerSort:b,isLoading:n,onSortChange:h,onTitleClick:F})]})]})};var ie=R(require(\"react\"));var nt=R(require(\"react\")),Dt=require(\"recharts\");var Me=require(\"@mui/material/styles\"),De=require(\"@mui/material\"),cp=require(\"@nuskin/foundation-theme\"),{getGenomeColor:qr}=cp.ColorUtils,up=(0,Me.styled)(De.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>qr(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`,gp=(0,Me.styled)(De.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,fp=(0,Me.styled)(De.Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`,mp=(0,Me.styled)(De.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,hp=(0,Me.styled)(De.Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.text.primary};\n`,bp=(0,Me.styled)(De.Typography)`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({direction:e,theme:t})=>e===\"up\"?t.palette.success.main:e===\"down\"?t.palette.error.main:t.palette.text.secondary};\n`,xp=(0,Me.styled)(De.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,yp=(0,Me.styled)(De.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>qr(e,\"N30\")};\n }\n`,gr=(0,Me.styled)(De.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,wp=(0,Me.styled)(De.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Cp=(0,Me.styled)(De.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,vp=(0,Me.styled)(De.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,kp=(0,Me.styled)(De.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,Sp=(0,Me.styled)(De.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Dp=(0,Me.styled)(De.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Tp=(0,Me.styled)(De.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>qr(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`;var V=require(\"react/jsx-runtime\");function Eu(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),r=Number(t);return Number.isFinite(r)?r:null}var fr=({offers:e,dateRange:t,market:r,offerSort:i,isLoading:n=!1,onBack:s,onDateRangeChange:u,onMarketChange:m,onOfferSortChange:w})=>{let[S,g]=(0,nt.useState)(1),d=10,b=vt(),x=nt.default.useCallback(()=>s?.(),[s]),D=nt.default.useMemo(()=>[{key:\"dateRange\",label:A($.filter.dateRange.label),value:t,icon:\"calendar\",options:[{value:\"last7days\",label:A($.filter.dateRange.last7days)},{value:\"last30days\",label:A($.filter.dateRange.last30days)},{value:\"last90days\",label:A($.filter.dateRange.last90days)},{value:\"thisMonth\",label:A($.filter.dateRange.thisMonth)}]},{key:\"market\",label:A($.filter.market.label),value:r,icon:\"globe\",options:[{value:\"all\",label:A($.filter.market.all)}]},{key:\"sort\",label:A($.filter.offerSort.byRevenue),value:i,options:[{value:\"revenue\",label:A($.filter.offerSort.byRevenue)},{value:\"units\",label:A($.filter.offerSort.byUnits)}]}],[t,r,i]),p=nt.default.useCallback((l,c)=>{l===\"dateRange\"?u?.(c):l===\"market\"?m?.(c):l===\"sort\"&&(w?.(c),g(1))},[w,u,m]),f=nt.default.useMemo(()=>[...e].sort((l,c)=>i===\"revenue\"?c.revenue-l.revenue:c.percentage-l.percentage),[e,i]),{totalRevenue:h,totalRevenueTrendDirection:v,totalRevenueTrend:C}=nt.default.useMemo(()=>{let l=f.reduce((q,be)=>q+be.revenue,0),c=f.reduce((q,be)=>{let Oe=Eu(be.trend?.revenue);return Oe===null?q:{weightedSum:q.weightedSum+Oe*be.revenue,weight:q.weight+be.revenue}},{weightedSum:0,weight:0}),y=c.weight>0?c.weightedSum/c.weight:0,T=\"neutral\";y>0?T=\"up\":y<0&&(T=\"down\");let K=`${y>0?\"+\":\"\"}${y.toFixed(1)}%`;return{totalRevenue:l,totalRevenueTrendDirection:T,totalRevenueTrend:K}},[f]),F=nt.default.useMemo(()=>f.slice(0,5),[f]),j=nt.default.useMemo(()=>ot(f,d),[d,f]),B=nt.default.useMemo(()=>at(f,S,d),[S,d,f]),Q=nt.default.useMemo(()=>[{key:\"name\",label:A($.fullView.topOffers.columnName),sortable:!0,render:(l,c)=>(0,V.jsxs)(ar,{children:[(0,V.jsx)(gr,{dotColor:c.color}),(0,V.jsx)(\"span\",{children:c.name})]})},{key:\"revenue\",label:A($.fullView.topOffers.columnRevenue),sortable:!0,render:l=>`$${Number(l).toLocaleString()}`},{key:\"percentage\",label:A($.fullView.topOffers.columnPercentage),sortable:!0,render:l=>`${Number(l)}%`},{key:\"trend\",label:A($.fullView.topOffers.columnTrend),render:(l,c)=>c.trend?.revenue??A($.defaults.noData)}],[]);return n?(0,V.jsxs)(ke,{\"data-testid\":\"top-offers-full-view\",children:[(0,V.jsx)(pe,{title:A($.fullView.topOffers.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,V.jsx)(Nt,{})]}):e.length===0?(0,V.jsxs)(ke,{\"data-testid\":\"top-offers-full-view\",children:[(0,V.jsx)(pe,{title:A($.fullView.topOffers.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,V.jsx)(Bt,{\"data-testid\":\"top-offers-fullview-empty\",children:A($.widget.topPerformingOffers.emptyState)})]}):(0,V.jsxs)(ke,{\"data-testid\":\"top-offers-full-view\",children:[(0,V.jsx)(pe,{title:A($.fullView.topOffers.title),dateRange:ce(t),onBack:x,filters:D,onFilterChange:p}),(0,V.jsxs)(up,{\"data-testid\":\"top-offers-fullview-top-section\",children:[(0,V.jsxs)(gp,{\"data-testid\":\"top-offers-fullview-chart\",children:[(0,V.jsx)(Dt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,V.jsxs)(Dt.PieChart,{children:[(0,V.jsx)(Dt.Pie,{data:f,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:f.map(l=>(0,V.jsx)(Dt.Cell,{fill:l.color},`cell-${l.id}`))}),(0,V.jsx)(Dt.Tooltip,{formatter:l=>`$${l.toLocaleString()}`})]})}),(0,V.jsxs)(fp,{\"data-testid\":\"top-offers-fullview-donut-center\",children:[(0,V.jsx)(mp,{children:A($.widget.topPerformingOffers.totalRevenue)}),(0,V.jsxs)(hp,{children:[\"$\",h.toLocaleString()]}),(0,V.jsx)(bp,{direction:v,children:C})]})]}),(0,V.jsx)(xp,{\"data-testid\":\"top-offers-fullview-summary\",children:F.map(l=>(0,V.jsxs)(yp,{children:[(0,V.jsx)(gr,{dotColor:l.color}),(0,V.jsxs)(wp,{children:[(0,V.jsx)(Cp,{children:l.name}),(0,V.jsxs)(vp,{children:[\"$\",l.revenue.toLocaleString()]})]}),(0,V.jsxs)(kp,{children:[l.percentage,\"%\"]})]},l.id))})]}),(0,V.jsxs)(zt,{\"data-testid\":\"top-offers-table\",children:[(0,V.jsxs)(At,{\"data-testid\":\"top-offers-fullview-table-title\",children:[A($.fullView.topOffers.title),\" (\",f.length,\")\"]}),b?(0,V.jsx)(Dp,{children:B.map(l=>(0,V.jsxs)(Tp,{children:[(0,V.jsx)(gr,{dotColor:l.color}),(0,V.jsxs)(rr,{children:[(0,V.jsx)(ir,{children:l.name}),(0,V.jsxs)(nr,{children:[\"$\",l.revenue.toLocaleString()]})]}),(0,V.jsxs)(lr,{children:[l.percentage,\"%\"]})]},l.id))}):(0,V.jsx)(Sp,{children:(0,V.jsx)(et,{columns:Q,data:B,sortable:!0,getRowKey:l=>l.id})}),j>1&&(0,V.jsx)(tt,{currentPage:S,totalPages:j,onPageChange:g,itemsPerPage:d,totalItems:f.length,\"data-testid\":\"top-offers-pagination\"})]})]})};var Io=require(\"react/jsx-runtime\"),Hu=\"productOfferDashboardView\",_u=[],Wu=[],ju=[],Ku=[];function Rp(e){return typeof e==\"object\"&&e!==null}function Uu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"top-offers\"}function mr(e,t){if(!Rp(e))return\"dashboard\";let r=e[t];return Uu(r)?r:\"dashboard\"}function Pp(e,t,r){return{...Rp(e)?e:{},[t]:r}}function qu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var Mp=({stats:e,topProducts:t,conversionData:r,topOffers:i,isLoading:n=!1,error:s,dashboardTitle:u,className:m,allProducts:w,orders:S,allOffers:g,initialDateRange:d=\"last30days\",initialMarket:b=\"all\",initialProductSort:x=\"units\",initialConversionFilter:D=\"all\",initialOfferSort:p=\"revenue\",historyAdapter:f,historyStateKey:h=Hu,resetToDashboardOnMount:v=!0,onDateRangeChange:C,onMarketChange:F,onProductSortChange:j,onConversionFilterChange:B,onOfferSortChange:Q,onViewChange:l})=>{let[c,y]=ie.default.useState(\"dashboard\"),T=ie.default.useRef(!1),[N,K]=ie.default.useState(d),[q,be]=ie.default.useState(b),[Oe,vo]=ie.default.useState(x),[lt,Qt]=ie.default.useState(D),[Lt,se]=ie.default.useState(p),ft=t??_u,mt=r??Wu,Et=i??ju,ko=w??ft,Ao=S??Ku,zo=g??Et,Ye=ie.default.useCallback(Y=>{y(Y),l?.(Y)},[l]),So=ie.default.useCallback(()=>f?mr(f.location?.state,h):typeof window>\"u\"?\"dashboard\":mr(window.history.state,h),[f,h]),Vt=ie.default.useCallback((Y,Tt)=>{if(f){let Xt=Pp(f.location?.state,h,Y),Ho=qu(f.location,Xt);if(Tt===\"replace\"){f.replace(Ho);return}f.push(Ho);return}if(typeof window>\"u\")return;let Pt=Pp(window.history.state,h,Y);if(Tt===\"replace\"){window.history.replaceState(Pt,\"\");return}window.history.pushState(Pt,\"\")},[f,h]);ie.default.useEffect(()=>{if(v?(Vt(\"dashboard\",\"replace\"),T.current=!1,Ye(\"dashboard\")):Ye(So()),f)return f.listen((Tt,Pt)=>{if(Pt===\"POP\"){let Xt=mr(Tt.state,h);T.current=Xt!==\"dashboard\",Ye(Xt)}});let Y=Tt=>{let Pt=mr(Tt.state,h);T.current=Pt!==\"dashboard\",Ye(Pt)};return window.addEventListener(\"popstate\",Y),()=>{window.removeEventListener(\"popstate\",Y)}},[f,h,So,v,Ye,Vt]);let $t=ie.default.useCallback(Y=>{T.current=!0,Vt(Y,\"push\"),Ye(Y)},[Ye,Vt]),Ke=ie.default.useCallback(()=>{if(c!==\"dashboard\"&&T.current){if(f){f.goBack();return}typeof window<\"u\"&&window.history.back();return}T.current=!1,Vt(\"dashboard\",\"replace\"),Ye(\"dashboard\")},[c,f,Ye,Vt]),Ht=ie.default.useCallback(Y=>{K(Y),C?.(Y)},[C]),st=ie.default.useCallback(Y=>{be(Y),F?.(Y)},[F]),dt=ie.default.useCallback(Y=>{vo(Y),j?.(Y)},[j]),_t=ie.default.useCallback(Y=>{Qt(Y),B?.(Y)},[B]),Ft=ie.default.useCallback(Y=>{se(Y),Q?.(Y)},[Q]),Wt=ie.default.useCallback(()=>{$t(\"products\")},[$t]),Bo=ie.default.useCallback(()=>{$t(\"conversion-rate\")},[$t]),Eo=ie.default.useCallback(()=>{$t(\"top-offers\")},[$t]);return c===\"products\"?(0,Io.jsx)(go,{products:ko,dateRange:N,market:q,productSort:Oe,isLoading:n,onBack:Ke,onDateRangeChange:Ht,onMarketChange:st,onProductSortChange:dt}):c===\"conversion-rate\"?(0,Io.jsx)(fo,{conversionData:mt,orders:Ao,dateRange:N,market:q,conversionFilter:lt,isLoading:n,onBack:Ke,onDateRangeChange:Ht,onMarketChange:st,onConversionFilterChange:_t}):c===\"top-offers\"?(0,Io.jsx)(fr,{offers:zo,dateRange:N,market:q,offerSort:Lt,isLoading:n,onBack:Ke,onDateRangeChange:Ht,onMarketChange:st,onOfferSortChange:Ft}):(0,Io.jsx)(ur,{stats:e,topProducts:ft,conversionData:mt,topOffers:Et,isLoading:n,error:s,dashboardTitle:u,className:m,dateRange:N,market:q,productSort:Oe,conversionFilter:lt,offerSort:Lt,onDateRangeChange:Ht,onMarketChange:st,onProductSortChange:dt,onConversionFilterChange:_t,onOfferSortChange:Ft,onProductsTitleClick:Wt,onConversionTitleClick:Bo,onOffersTitleClick:Eo})};var wo=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Jt}=wo.ColorUtils,Op=(0,wo.styled)(\"div\")`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`,Lp=(0,wo.styled)(\"select\")`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({theme:e})=>Jt(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Jt(e,\"N40\")};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>Jt(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Jt(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>Jt(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>Jt(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`,Vp=(0,wo.styled)(\"label\")`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>Jt(e,\"N70\")};\n`;var Co=require(\"react/jsx-runtime\"),$p=({filters:e,onChange:t})=>(0,Co.jsx)(Op,{\"data-testid\":\"filter-bar\",children:e.map(r=>(0,Co.jsxs)(Vp,{htmlFor:`filter-${r.key}`,children:[r.label,(0,Co.jsx)(Lp,{id:`filter-${r.key}`,value:r.value,onChange:i=>t(r.key,i.target.value),disabled:r.disabled,\"aria-label\":`${r.label} ${a(o.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${r.key}`,children:r.options.map(i=>(0,Co.jsx)(\"option\",{value:i.value,children:i.label},i.value))})]},r.key))});var Gr={shopTitle:\"My NuSkin Shop\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$9,453\",volume:\"1,211\",siteVisits:\"17,935\",conversionRate:\"4.2%\"},trend:{revenue:\"+12.5%\",volume:\"+8.3%\",siteVisits:\"-2.1%\"}},hr=[{id:\"prod-001\",rank:1,name:\"ageLOC LumiSpa\",imageUrl:\"\",unitsSold:342,revenue:29580,volume:245,trend:{units:\"+15%\",revenue:\"+12%\",volume:\"+8%\"}},{id:\"prod-002\",rank:2,name:\"Pharmanex LifePak\",imageUrl:\"\",unitsSold:287,revenue:24395,volume:198,trend:{units:\"+8%\",revenue:\"+10%\",volume:\"+5%\"}},{id:\"prod-003\",rank:3,name:\"ageLOC Meta\",imageUrl:\"\",unitsSold:256,revenue:21760,volume:176,trend:{units:\"-3%\",revenue:\"-1%\",volume:\"-2%\"}},{id:\"prod-004\",rank:4,name:\"Nu Skin 180 System\",imageUrl:\"\",unitsSold:198,revenue:17820,volume:142,trend:{units:\"+22%\",revenue:\"+18%\",volume:\"+15%\"}},{id:\"prod-005\",rank:5,name:\"Epoch Baobab Body Butter\",imageUrl:\"\",unitsSold:176,revenue:8800,volume:88,trend:{units:\"+5%\",revenue:\"+3%\",volume:\"+2%\"}}],br=Array.from({length:30},(e,t)=>{let r=new Date(\"2026-03-01\");return r.setDate(r.getDate()+t),{date:`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][r.getMonth()]} ${r.getDate()}`,rate:Number((4+t%15*.1).toFixed(2)),orders:200+t*13%100,siteVisits:4e3+t*97%2e3}}),Yr=Array.from({length:30},(e,t)=>{let r=new Date(\"2026-03-01\");r.setDate(r.getDate()+t);let i=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],n=80+t*11%40,s=Math.floor(n*.4),u=Math.floor(n*.35),m=n-s-u;return{date:`${i[r.getMonth()]} ${r.getDate()}`,total:n,members:s,retail:u,brandAffiliates:m}}),Jr=[{id:\"cat-001\",name:\"Favorites\",revenue:45200,percentage:29,color:\"#C95D63\",trend:{revenue:\"+8%\",units:\"+10%\"}},{id:\"cat-002\",name:\"Daily Routine\",revenue:42100,percentage:27,color:\"#6C7A9B\",trend:{revenue:\"+12%\",units:\"+15%\"}},{id:\"cat-003\",name:\"Fit & Trim Body\",revenue:34300,percentage:22,color:\"#E8975E\",trend:{revenue:\"-3%\",units:\"-1%\"}},{id:\"cat-004\",name:\"Dull Skin\",revenue:24900,percentage:16,color:\"#5F8FC4\",trend:{revenue:\"+5%\",units:\"+7%\"}},{id:\"cat-005\",name:\"Acne\",revenue:9400,percentage:6,color:\"#A2C3B3\",trend:{revenue:\"+2%\",units:\"+3%\"}}],xr=Array.from({length:50},(e,t)=>{let r=[\"Sarah\",\"John\",\"Emma\",\"Michael\",\"Olivia\",\"William\",\"Ava\",\"James\"],i=[\"Smith\",\"Johnson\",\"Williams\",\"Brown\",\"Jones\",\"Garcia\",\"Miller\",\"Davis\"],n=new Date(\"2026-03-31\");return n.setDate(n.getDate()-t%30),{orderId:`ORD-${String(1e4+t).padStart(5,\"0\")}`,date:n.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),customerName:`${r[t%r.length]} ${i[t%i.length]}`,customerType:t%3===0?\"Retail\":\"Member\",items:t%5+1,total:Number((50+t*17%200+t%10*.1).toFixed(2)),bv:30+t*9%150}}),Zr=Array.from({length:30},(e,t)=>{let r=[\"Alice\",\"Bob\",\"Carol\",\"David\",\"Eva\",\"Frank\",\"Grace\",\"Henry\"],i=[\"Anderson\",\"Baker\",\"Clark\",\"Davis\",\"Evans\",\"Fisher\",\"Grant\",\"Hall\"],n=[\"Member\",\"Retail\",\"Brand Affiliate\"],s=new Date(\"2026-03-31\");return s.setDate(s.getDate()-t%30),{id:`SU-${String(1e3+t).padStart(4,\"0\")}`,name:`${r[t%r.length]} ${i[t%i.length]}`,date:s.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),type:n[t%n.length],email:`${r[t%r.length].toLowerCase()}.${i[t%i.length].toLowerCase()}@example.com`,status:t%4===0?\"Pending\":\"Active\"}});var Zt={shopTitle:\"Performance Overview\",dateRange:{start:\"2026-03-01\",end:\"2026-03-31\",label:\"Mar 1 - Mar 31\"},selectedMarket:\"all\",metrics:{revenue:\"$5,208\",offersPurchased:\"285\",conversionRate:\"4.2%\"},trend:{revenue:\"+2.3%\",offersPurchased:\"+3.7%\"}},Bb={...Zt,trend:{revenue:\"+5.1%\",offersPurchased:\"+12.5%\"}},Eb={...Zt,trend:{revenue:\"-1.8%\",offersPurchased:\"-3.7%\"}},Hb={...Zt,trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},_b={...Zt,metrics:{...Zt.metrics,offersPurchased:\"0\"},trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},Fp=[{id:\"offer-1\",name:\"Winter Skincare Bundle\",revenue:2800,percentage:29,color:\"#6B8E7B\",trend:{revenue:\"-4.2%\"}},{id:\"offer-2\",name:\"Supplement Starter Pack\",revenue:2500,percentage:27,color:\"#E8915A\",trend:{revenue:\"+3.1%\"}},{id:\"offer-3\",name:\"Holiday Special Bundle\",revenue:2100,percentage:22,color:\"#C75B5B\",trend:{revenue:\"-1.5%\"}},{id:\"offer-4\",name:\"LumiSpa Cleansing Kit\",revenue:1500,percentage:16,color:\"#5B8EC7\",trend:{revenue:\"+2.8%\"}},{id:\"offer-5\",name:\"Daily Wellness Bundle\",revenue:529,percentage:6,color:\"#9B8EC7\",trend:{revenue:\"+7.2%\"}}];var Qr={all:1,us:1.2,ca:.8,jp:1.5,kr:.9,au:.7,nz:.5};function Xr(e){return Qr[e]??1}function Np(e,t){return Math.round(e*Xr(t))}function Ip(e){return{all:\"All Markets\",us:\"US\",ca:\"Canada\",jp:\"Japan\",kr:\"Korea\",au:\"Australia\",nz:\"New Zealand\"}[e]??e}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z\"\n}), 'CalendarToday');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39\"\n}), 'Public');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z\"\n}), 'TrendingUp');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z\"\n}), 'TrendingDown');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19 13H5v-2h14z\"\n}), 'Remove');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2M1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2\"\n}), 'ShoppingCart');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2\"\n}), 'MoreVert');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3\"\n}), 'Visibility');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z\"\n}), 'ArrowBack');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z\"\n}), 'Language');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z\"\n}), 'ArrowUpward');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z\"\n}), 'ArrowDownward');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"\n}), 'ChevronLeft');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"\n}), 'ChevronRight');","export * from './common';\n","import React, { ReactElement, useState } from 'react';\nimport { NsImage } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport {\n PriceComponent,\n ProductCardContainer,\n ImageContainer,\n DefaultImage,\n ProductTitle,\n ProductBadgeContainer,\n AddToCartButton,\n CartIcon,\n} from './styles/NsProductCard.Styled';\nimport { useMediaQuery } from '@mui/material';\nimport { NsCardButton } from './types';\n\ntype NsProductCardProps = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly className?: string;\n readonly button?: NsCardButton & { disabled?: boolean };\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSellerBadge?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n readonly testId?: string;\n};\n\nconst NsProductCard = ({\n productTitle,\n imageDetails,\n className,\n button,\n onCardClick,\n productStatusBadge,\n directSellerBadge,\n mySitePriceComponent,\n testId,\n}: NsProductCardProps): ReactElement => {\n const [isButtonHovered, setIsButtonHovered] = useState(false);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const handleImageError = (e: React.SyntheticEvent<HTMLImageElement, Event>) => {\n const target = e.target as HTMLImageElement;\n const noImageFallback = imageDetails?.fallbackImage;\n if (noImageFallback && target.src !== noImageFallback) {\n target.src = noImageFallback;\n }\n };\n\n return (\n <ProductCardContainer\n className={className}\n onClick={onCardClick}\n tabIndex={0}\n data-testid=\"product-card\"\n isMobile={isMobile}\n >\n <ImageContainer bgColor={imageDetails?.bgColor} onError={handleImageError}>\n {imageDetails?.imageSrc ? (\n <NsImage\n data-testid={testId ?? 'test-product-image'}\n className={imageDetails.className ?? ''}\n src={imageDetails.imageSrc}\n alt={imageDetails.imageAlt}\n aria-label={imageDetails.areaLabel ?? imageDetails.imageAlt}\n width={'100%'}\n />\n ) : (\n <DefaultImage alt=\"\" />\n )}\n </ImageContainer>\n <ProductTitle title={productTitle} data-testid=\"product-title\">\n {productTitle}\n </ProductTitle>\n {directSellerBadge && <ProductBadgeContainer>{directSellerBadge}</ProductBadgeContainer>}\n <ProductBadgeContainer>{productStatusBadge}</ProductBadgeContainer>\n <PriceComponent>{mySitePriceComponent}</PriceComponent>\n {button?.showButton && (\n <AddToCartButton\n tabIndex={0}\n aria-roledescription=\":\"\n aria-label={button.buttonText || 'ADD TO CART'}\n data-testid=\"add-to-cart-button\"\n disabled={button?.disabled ?? false}\n isMobile={isMobile}\n isHovered={isButtonHovered}\n onClick={(e) => {\n e.stopPropagation();\n if (!button?.disabled) {\n button.onClick?.();\n }\n }}\n onMouseEnter={() => {\n if (!isMobile && !button?.disabled) {\n setIsButtonHovered(true);\n }\n }}\n onMouseLeave={() => {\n if (!isMobile) {\n setIsButtonHovered(false);\n }\n }}\n >\n <CartIcon className=\"cart-icon\" disabled={button?.disabled}>\n <svg width=\"24\" height=\"22\" viewBox=\"0 0 24 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0 1.86358C0 1.26109 0.488416 0.772675 1.09091 0.772675H3.48173C4.51054 0.772675 5.39955 1.49136 5.61511 2.49733L5.71309 2.95456H22.9091C23.245 2.95456 23.5622 3.10933 23.7689 3.37411C23.9757 3.63889 24.0489 3.98415 23.9674 4.31005L22.4053 10.5583C21.9197 12.5009 20.1743 13.8636 18.172 13.8636H8.05068L8.28444 14.9546H20.7273C21.3298 14.9546 21.8182 15.443 21.8182 16.0455C21.8182 16.648 21.3298 17.1364 20.7273 17.1364H19.6364H8.18182H7.40252C6.88811 17.1364 6.4436 16.777 6.33582 16.274L3.76449 4.27405L3.48173 2.95449H1.09091C0.488416 2.95449 0 2.46608 0 1.86358ZM8.18182 17.1364C6.97683 17.1364 6 18.1132 6 19.3182C6 20.5232 6.97683 21.5 8.18182 21.5C9.3868 21.5 10.3636 20.5232 10.3636 19.3182C10.3636 18.1132 9.3868 17.1364 8.18182 17.1364ZM19.6364 17.1364C18.4314 17.1364 17.4545 18.1132 17.4545 19.3182C17.4545 20.5232 18.4314 21.5 19.6364 21.5C20.8413 21.5 21.8182 20.5232 21.8182 19.3182C21.8182 18.1132 20.8413 17.1364 19.6364 17.1364ZM7.58317 11.6818H18.172C19.1732 11.6818 20.0459 11.0005 20.2887 10.0292L21.5119 5.13638H6.18062L7.58317 11.6818Z\"\n fill={button?.disabled ? '#999' : '#ffffff'}\n />\n </svg>\n </CartIcon>\n {button.buttonText || 'ADD TO CART'}\n </AddToCartButton>\n )}\n </ProductCardContainer>\n );\n};\n\nexport default NsProductCard;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PriceComponent = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`;\n\nexport const ProductCardContainer = styled('button')<{ isMobile: boolean }>`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n width: 240px;\n height: ${(props) => (props.isMobile ? '410px' : '513px')};\n overflow: hidden;\n cursor: pointer;\n border: 1px solid #ededed;\n background: var(--color-primary-n-10-primary-white, #fff);\n`;\n\nexport const ImageContainer = styled('div')<{\n bgColor?: string;\n}>`\n width: '240px';\n height: '240px';\n background: ${(props) => props.bgColor ?? '#f5f5f5'};\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 0;\n display: flex;\n align-items: normal;\n justify-content: center;\n position: relative;\n @media (max-width: 560px) {\n width: 200px;\n height: 200px;\n align-items: unset;\n }\n`;\n\nexport const DefaultImage = styled('img')`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`;\n\nexport const ProductTitle = styled('div')`\n width: 200px;\n margin-top: 16px;\n max-height: 66px;\n text-align: left;\n font-size: 16px;\n font-family: 'Inter', sans-serif;\n font-weight: 400;\n line-height: 22px;\n overflow: hidden;\n color: #666;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n @media (max-width: 560px) {\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n margin-top: 5px;\n max-height: 54px;\n line-height: 18px;\n }\n`;\n\nexport const ProductBadgeContainer = styled('div')`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`;\n\nexport const AddToCartButton = styled('button')<{\n disabled?: boolean;\n isMobile: boolean;\n isHovered: boolean;\n}>`\n width: 200px;\n height: 40px;\n border-radius: 4px;\n display: flex;\n align-items: center;\n gap: 10px;\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0.14px;\n text-transform: none;\n justify-content: flex-start;\n padding-left: 31px;\n overflow: hidden;\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n margin-top: 8px;\n margin-bottom: 10px;\n -webkit-appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n color: ${(props) => (props.disabled ? '#999' : '#fff')};\n background-color: ${(props) => {\n if (props.disabled) return '#e0e0e0';\n if (!props.isMobile && props.isHovered) return '#888';\n return '#000';\n }};\n border: ${(props) => (props.disabled ? '1px solid #ccc' : 'none')};\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${(props) => (props.disabled ? 0.6 : 1)};\n transition: ${(props) => (props.isMobile ? 'none' : 'all 0.3s ease')};\n\n @media (max-width: 560px) {\n margin: 5px 0;\n }\n`;\n\nexport const CartIcon = styled('span')<{ disabled?: boolean }>`\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n display: inline-block;\n background: none;\n transition: all 0.3s ease;\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n`;\n","import React, { ReactElement, useCallback, ReactNode, useRef } from 'react';\nimport Slider from 'react-slick';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport 'slick-carousel/slick/slick.css';\nimport { NsCardButton, NsCarouselControl } from '@nuskin/foundation-ui-components';\nimport { ProductImageType } from '../types/image';\nimport NsProductCard from '../card/NsProductCard';\nimport {\n SlickContainer,\n ControlsContainer,\n ControlsHeaderRow,\n ScrollableContainer,\n CardList,\n ViewAllWrapper,\n ProductCountWrapper,\n ArrowsWrapper,\n CustomTypography,\n ViewAllLink,\n ProductInfoWrapper,\n CategoryNameWrapper,\n EmptyProductCategories,\n} from './NsProductCarousel.styled';\n\nexport type ProductCardEntry = {\n readonly productTitle: string;\n readonly imageDetails?: ProductImageType;\n readonly button?: NsCardButton;\n readonly onCardClick?: () => void;\n readonly productStatusBadge?: React.ReactNode;\n readonly directSeller?: React.ReactNode;\n readonly mySitePriceComponent?: React.ReactNode;\n};\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductCardCarouselProps<T = ProductCardEntry> {\n readonly entries: T[];\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly renderEntry?: (entry: T, index: number) => ReactNode;\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly categoryName?: string;\n readonly emptyProductMessage?: string;\n readonly productsCountLabel?: string;\n readonly isInitialDataLoading?: boolean;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nexport default function ProductCardCarousel({\n entries,\n renderEntry,\n settings = {},\n showControlButtons = true,\n allEntryLabel = 'View All',\n allEntryLink = '',\n categoryName,\n emptyProductMessage = 'No Products Available For The Selected Category',\n productsCountLabel = 'Products',\n isInitialDataLoading,\n history,\n}: ProductCardCarouselProps): ReactElement {\n const sliderRef = useRef<Slider>(null);\n const isMobile = useMediaQuery('(max-width: 560px)');\n\n const prev = useCallback(() => {\n sliderRef.current?.slickPrev();\n }, []);\n\n const next = useCallback(() => {\n sliderRef.current?.slickNext();\n }, []);\n\n const renderProductEntry =\n renderEntry ??\n ((entry: ProductCardEntry, index: number) => (\n <NsProductCard\n key={`${entry.productTitle}-${index}`}\n productTitle={entry.productTitle}\n imageDetails={entry.imageDetails}\n button={entry.button}\n onCardClick={entry.onCardClick}\n productStatusBadge={entry.productStatusBadge}\n directSellerBadge={entry.directSeller}\n mySitePriceComponent={entry.mySitePriceComponent}\n />\n ));\n\n const sliderSettings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: Math.min(entries?.length ?? 0, 4),\n slidesToScroll: 4,\n swipe: true,\n draggable: true,\n arrows: true,\n responsive: [\n {\n breakpoint: 1320,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 3),\n slidesToScroll: 3,\n },\n },\n {\n breakpoint: 900,\n settings: {\n slidesToShow: Math.min(entries?.length ?? 0, 2),\n slidesToScroll: 2,\n },\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n arrows: false,\n },\n },\n ],\n ...settings,\n };\n\n const shouldShowNavigation = (entries?.length ?? 0) > sliderSettings.slidesToShow;\n\n const renderCarouselContent = () => {\n if (entries?.length === 0 && !isInitialDataLoading) {\n return <EmptyProductCategories>{emptyProductMessage}</EmptyProductCategories>;\n }\n\n if (isMobile) {\n return (\n <ScrollableContainer>\n <CardList>{entries.map((entry, index) => entry && renderProductEntry(entry, index))}</CardList>\n </ScrollableContainer>\n );\n }\n\n return (\n <Slider {...sliderSettings} ref={sliderRef}>\n {entries.map((entry, index) => entry && renderProductEntry(entry, index))}\n </Slider>\n );\n };\n\n return (\n <SlickContainer>\n {showControlButtons && (\n <ControlsContainer>\n <ControlsHeaderRow>\n <ProductInfoWrapper>\n <ProductCountWrapper>\n <CustomTypography variant=\"body-m\">\n {entries?.length ?? 0} {productsCountLabel}\n </CustomTypography>\n </ProductCountWrapper>\n {!isMobile && categoryName && <CategoryNameWrapper>{categoryName}</CategoryNameWrapper>}\n </ProductInfoWrapper>\n <ViewAllWrapper $isMobile={isMobile}>\n <ViewAllLink\n onClick={(e) => {\n if (history) {\n e.preventDefault();\n history.push(allEntryLink);\n }\n }}\n >\n {allEntryLabel}\n </ViewAllLink>\n </ViewAllWrapper>\n </ControlsHeaderRow>\n {!isMobile && (\n <ArrowsWrapper $isDisabled={!shouldShowNavigation}>\n <NsCarouselControl prev={prev} next={next} viewAllLabel={''} viewAllUrl={''} />\n </ArrowsWrapper>\n )}\n </ControlsContainer>\n )}\n {renderCarouselContent()}\n </SlickContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport Box, { BoxProps } from '@mui/material/Box';\nimport { NsTypography } from '@nuskin/foundation-ui-components';\n\nexport const SlickContainer: React.ComponentType<BoxProps> = styled(Box)`\n padding: 30px 0 60px;\n width: 100%;\n margin: auto;\n margin-top: 50px;\n position: relative;\n\n .slick-list {\n padding-left: 24px;\n padding-right: 24px;\n }\n .slick-slide {\n display: flex;\n justify-content: center;\n padding: 0 12px;\n box-sizing: border-box;\n }\n .slick-prev,\n .slick-next {\n display: none !important;\n }\n\n @media (max-width: 1200px) {\n max-width: 1024px;\n .slick-list {\n padding-left: 12px;\n padding-right: 12px;\n }\n .slick-slide {\n padding: 0 6px;\n }\n }\n @media (max-width: 700px) {\n max-width: 100vw;\n padding: 10px 0 50px;\n .slick-list {\n padding-left: 4px;\n padding-right: 4px;\n }\n .slick-slide {\n padding: 0 2px;\n }\n }\n @media (max-width: 560px) {\n padding: 10px 0 10px;\n margin-top: 25px;\n }\n`;\nexport const ScrollableContainer = styled('div')`\n overflow-x: auto;\n display: flex;\n scroll-snap-type: x mandatory;\n -webkit-overflow-scrolling: touch;\n gap: 16px;\n padding: 0 8px 16px;\n width: 100%;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n height: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #007bff;\n border-radius: 10px;\n }\n`;\n\nexport const CardList = styled('div')`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`;\n\nexport const ControlsContainer: React.ComponentType<BoxProps> = styled(Box)`\n position: absolute;\n bottom: calc(100% + 1px);\n right: 1px;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const ViewAllWrapper: React.ComponentType<BoxProps & { $isMobile?: boolean }> = styled(Box)<{\n $isMobile?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin-left: auto;\n margin-right: ${({ $isMobile }) => ($isMobile ? 0 : '24px')};\n\n @media (max-width: 560px) {\n margin-left: 0;\n order: 2;\n }\n`;\n\nexport const ProductCountWrapper: React.ComponentType<BoxProps> = styled(Box)`\n display: none;\n\n @media (max-width: 560px) {\n color: #666666;\n font-family: Inter;\n font-size: 14px !important;\n font-style: normal;\n font-weight: 600;\n line-height: 18px;\n display: flex;\n align-items: center;\n order: 1;\n }\n`;\n\nexport const ArrowsWrapper: React.ComponentType<BoxProps & { $isDisabled?: boolean }> = styled(Box)<{\n $isDisabled?: boolean;\n}>`\n display: flex;\n align-items: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.3 : 1)};\n pointer-events: ${({ $isDisabled }) => ($isDisabled ? 'none' : 'auto')};\n transition: opacity 0.3s ease;\n\n .carousal-prev-button,\n .carousal-next-button {\n transition: all 0.3s ease;\n border: 2px solid #000000;\n border-radius: 3px;\n padding: 9px;\n cursor: pointer;\n\n svg {\n transition: all 0.3s ease;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n\n &:hover {\n background-color: #f5f5f5;\n border: 2px solid #ddd;\n\n svg {\n opacity: 0.5;\n }\n\n svg polyline {\n stroke: #000000;\n fill: none;\n }\n }\n }\n\n @media (max-width: 560px) {\n display: none;\n }\n`;\nexport const Scrollablewrapper = styled('div')`\n @media (max-width: 560px) {\n overflow-y: hidden;\n scrollbar-width: thin;\n scrollbar-color: #007bff #eee;\n &::-webkit-scrollbar {\n width: 8px;\n }\n &::-webkit-scrollbar-track {\n background: #eee;\n }\n &::-webkit-scrollbar-thumb {\n background-color: red;\n border-radius: 8px;\n border: 2px solid #eee;\n }\n }\n`;\nexport const CustomTypography = styled(NsTypography)`\n color: #666666;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 22px;\n @media (max-width: 560px) {\n margin: 0 3px;\n }\n`;\n\nexport const ViewAllLink = styled('a')`\n color: #000000;\n font-family: Inter, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 22px;\n text-decoration: none;\n border-bottom: 1px solid #000000;\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: pointer;\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: #666666;\n border-bottom: 1px solid #666666;\n cursor: pointer;\n }\n`;\n\nexport const EmptyProductCategories = styled('div')`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`;\nexport const ControlsHeaderRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const ProductInfoWrapper = styled('div')`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`;\n\nexport const CategoryNameWrapper = styled('div')`\n font-family: 'Lora';\n font-weight: 400;\n font-size: 22px;\n margin-left: 16px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: 13px;\n`;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { useMediaQuery } from '@mui/material';\n\nimport { NsCategoryNavigation } from '../Nav-Category-Navigation';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport ProductCardCarousel, { ProductCardEntry } from './NsProductCarousel';\nimport {\n ProductTabCarouselContainer,\n TabsContainer,\n ContentContainer,\n NoTabsContainer,\n SpinnerContainer,\n} from './ProductTabCarousel.styled';\n\ninterface Category {\n label: string;\n categoryId: string;\n}\n\ninterface SlickSettings {\n dots?: boolean;\n infinite?: boolean;\n speed?: number;\n slidesToShow?: number;\n slidesToScroll?: number;\n swipe?: boolean;\n draggable?: boolean;\n arrows?: boolean;\n responsive?: Array<{\n breakpoint: number;\n settings: {\n slidesToShow?: number;\n slidesToScroll?: number;\n arrows?: boolean;\n };\n }>;\n}\n\ninterface ProductTabCarouselProps {\n readonly allEntryLabel?: string;\n readonly allEntryLink?: string;\n readonly renderEntry?: (entry: ProductCardEntry) => React.ReactNode;\n readonly settings?: SlickSettings;\n readonly showControlButtons?: boolean;\n readonly fetchCategories: () => Promise<Category[]>;\n readonly fetchProducts: (categoryId: string) => Promise<ProductCardEntry[]>;\n readonly emptyProductTabs?: string;\n readonly emptyProductMessage?: string;\n readonly showCustomCategory?: boolean;\n readonly productsCountLabel?: string;\n readonly getCategoryId: (categoryId: string) => Promise<Category[]>;\n readonly history?: {\n push: (path: string) => void;\n };\n}\n\nconst ProductTabCarousel: React.FC<ProductTabCarouselProps> = ({\n allEntryLabel,\n allEntryLink,\n renderEntry,\n settings,\n showControlButtons = true,\n fetchCategories,\n fetchProducts,\n showCustomCategory = false,\n emptyProductTabs = 'No tabs available',\n emptyProductMessage,\n productsCountLabel,\n getCategoryId,\n history,\n}) => {\n const isMobile = useMediaQuery('(max-width:768px)');\n const [isLoadingInitialData, setIsLoadingInitialData] = useState(true);\n const [categories, setCategories] = useState<Category[]>([]);\n const [selectedTab, setSelectedTab] = useState(0);\n const [products, setProducts] = useState<ProductCardEntry[]>([]);\n const [loading, setLoading] = useState(false);\n const [shouldShowSpinner, setShouldShowSpinner] = useState(true);\n\n const checkForExistingSpinners = useCallback(() => {\n const existingSpinners = document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');\n setShouldShowSpinner(existingSpinners.length === 0);\n }, []);\n\n useEffect(() => {\n if (loading) {\n checkForExistingSpinners();\n }\n }, [loading, checkForExistingSpinners]);\n\n useEffect(() => {\n fetchCategories().then(setCategories);\n }, [fetchCategories]);\n\n useEffect(() => {\n if (categories.length > 0) {\n const categoryId = categories[selectedTab]?.categoryId;\n if (getCategoryId) {\n getCategoryId(categoryId);\n }\n\n setLoading(true);\n fetchProducts(categoryId)\n .then(setProducts)\n .finally(() => {\n setLoading(false);\n setIsLoadingInitialData(false);\n });\n }\n }, [categories, selectedTab, fetchProducts]);\n\n const itemArray = categories.map((cat) => ({\n label: cat.label,\n content: '',\n categoryId: cat.categoryId,\n }));\n\n return (\n <ProductTabCarouselContainer isMobile={isMobile}>\n {showCustomCategory &&\n (itemArray.length > 0 ? (\n <TabsContainer isMobile={isMobile}>\n <NsCategoryNavigation\n itemArray={itemArray}\n value={selectedTab}\n onChange={(_, newValue) => setSelectedTab(newValue)}\n />\n </TabsContainer>\n ) : (\n <NoTabsContainer>{emptyProductTabs}</NoTabsContainer>\n ))}\n <ContentContainer isMobile={isMobile}>\n {loading ? (\n <SpinnerContainer>{shouldShowSpinner && <NsSpinner />}</SpinnerContainer>\n ) : (\n <ProductCardCarousel\n isInitialDataLoading={isLoadingInitialData}\n entries={products}\n allEntryLabel={allEntryLabel}\n allEntryLink={allEntryLink}\n renderEntry={\n renderEntry\n ? (entry) => renderEntry({ ...entry, productStatusBadge: entry.productStatusBadge })\n : undefined\n }\n settings={settings}\n showControlButtons={showControlButtons}\n categoryName={categories[selectedTab]?.label}\n emptyProductMessage={emptyProductMessage}\n productsCountLabel={productsCountLabel}\n history={history}\n />\n )}\n </ContentContainer>\n </ProductTabCarouselContainer>\n );\n};\n\nexport default ProductTabCarousel;\n","import * as React from 'react';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport PropTypes from 'prop-types';\nimport { NsCategoryNavigationContainer } from './NsCategoryNavigation.styled';\nimport { useMediaQuery } from '@mui/material';\n\nfunction TabPanel(\n props: Readonly<{\n children?: React.ReactNode;\n value: number;\n index: number;\n [key: string]: unknown;\n }>,\n) {\n const { children, value, index, ...other } = props;\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n {...other}\n >\n {value === index && <Box className=\"tabPanel\">{children}</Box>}\n </div>\n );\n}\nTabPanel.propTypes = {\n children: PropTypes.node,\n index: PropTypes.number.isRequired,\n value: PropTypes.number.isRequired,\n};\n\ninterface NsCategoryNavigationProps {\n itemArray: { label: string; content: React.ReactNode; categoryId: string }[];\n value?: number;\n onChange?: (event: React.SyntheticEvent, newValue: number) => void;\n}\n\nexport const NsCategoryNavigation: React.FC<Readonly<NsCategoryNavigationProps>> = ({\n itemArray,\n value: controlledValue,\n onChange,\n}) => {\n const [internalValue, setInternalValue] = React.useState(0);\n const isMobile = useMediaQuery('(max-width:768px)');\n const value = controlledValue ?? internalValue;\n const handleChange = (event: React.SyntheticEvent, newValue: number) => {\n if (onChange) {\n onChange(event, newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n return (\n <NsCategoryNavigationContainer>\n <Box className=\"tabContainer\">\n <Tabs\n orientation={isMobile ? 'horizontal' : 'vertical'}\n variant=\"scrollable\"\n value={value}\n onChange={handleChange}\n aria-label=\"Vertical tabs example\"\n className=\"tabsStyle\"\n >\n {itemArray.map((item) => (\n <Tab key={item.categoryId} label={item.label} className=\"tabStyle\" />\n ))}\n </Tabs>\n {itemArray.map((item) => (\n <TabPanel\n key={item.categoryId}\n value={value}\n index={itemArray.findIndex((i) => i.categoryId === item.categoryId)}\n >\n {item.content}\n </TabPanel>\n ))}\n </Box>\n </NsCategoryNavigationContainer>\n );\n};\n","import { styled } from '@nuskin/foundation-theme';\nexport const NsCategoryNavigationContainer = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n width: 100%;\n height: 100%;\n background-color: #fff;\n .tabsStyle {\n display: flex;\n padding-top: 8.533px;\n flex-direction: column;\n align-items: flex-start;\n gap: 12.8px;\n border-right: 1px;\n border-color: divider;\n width: 200px;\n & .Mui-selected {\n font-weight: 700;\n font-size: 14px;\n font-family: 'inter', sans-serif;\n font-style: normal;\n font-height: 20px;\n border-radius: 4px;\n }\n & .MuiTabs-indicator {\n left: 0;\n background-color: #5b81a5;\n color: #5b81a5;\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n }\n\n .tabContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n min-width: 100%;\n background-color: #fff;\n @media (max-width: 768px) {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n }\n\n .tabStyle {\n align-items: flex-start;\n display: flex;\n text-align: left;\n font-size: 14px;\n font-family: 'inter' sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n min-height: 20px;\n padding: 1px;\n padding-left: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n text-transform: none;\n }\n @media (max-width: 768px) {\n flex-direction: row;\n\n .tabsStyle {\n width: 100%;\n border-right: none;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding-top: 0px;\n }\n\n .tabStyle {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n border: 1px solid #ccc;\n border-radius: 70px;\n padding: 8px 16px;\n text-align: center;\n margin: 4px;\n background-color: #fff;\n cursor: pointer;\n color: black;\n font-family: Inter;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n }\n\n .tabStyle.Mui-selected {\n background-color: #5b81a5;\n color: #ffffff !important;\n font-weight: 700;\n border-radius: 70px;\n }\n }\n .tabPanel {\n padding: 8px;\n text-align: left;\n }\n`;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean }>`\n display: flex;\n flex-direction: ${({ isMobile }) => (isMobile ? 'column' : 'row')};\n align-items: ${({ isMobile }) => (isMobile ? 'stretch' : 'flex-start')};\n width: 100%;\n max-width: 1920px;\n min-height: ${({ isMobile }) => (isMobile ? 'auto' : '800px')};\n margin: 0 auto;\n box-sizing: border-box;\n overflow: visible;\n background: #fff;\n padding: ${({ isMobile }) => (isMobile ? '10px 16px 0px 16px' : '50px 60px 0px 60px')};\n\n @media (max-width: 768px) {\n padding: 10px 16px 0px 16px;\n min-height: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n padding: 30px 40px 0px 40px;\n gap: 20px;\n }\n\n transform: translateZ(0);\n will-change: auto;\n`;\n\nexport const TabsContainer = styled('div')<{ isMobile?: boolean }>`\n min-width: ${({ isMobile }) => (isMobile ? '100%' : 'auto')};\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n\n overflow-x: auto;\n overflow-y: visible;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-width: 200px;\n margin-right: 20px;\n }\n`;\n\nexport const ContentContainer = styled('div')<{ isMobile?: boolean }>`\n flex: 1;\n min-width: 0;\n height: ${({ isMobile }) => (isMobile ? 'auto' : '100%')};\n\n @media (max-width: 768px) {\n width: 100%;\n height: auto;\n min-height: 300px;\n\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n @media (min-width: 769px) and (max-width: 1024px) {\n min-height: 400px;\n }\n\n contain: layout style paint;\n transform: translateZ(0);\n`;\n\nexport const LoadingContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n padding: 20px;\n\n @media (max-width: 768px) {\n min-height: 150px;\n padding: 16px;\n }\n`;\n\nexport const NoTabsContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 40px 20px;\n color: #666;\n font-size: 16px;\n\n @media (max-width: 768px) {\n padding: 20px 16px;\n font-size: 14px;\n }\n`;\nexport const SpinnerContainer = styled('div')`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;\n","import React, { ReactElement, useState, useEffect, useMemo } from 'react';\nimport { Typography, Box, useMediaQuery, Tooltip } from '@mui/material';\nimport { NsLink, NsImage } from '@nuskin/foundation-ui-components';\nimport {\n MysiteHeroContainer,\n MysiteHeroContainerMobile,\n BadgeContainer,\n Badge,\n ToggleButtonMobile,\n StyledSpan,\n ImgTabIndex,\n ContactLink,\n BadgeValue,\n} from '@/common/headers/MysiteHero.styled';\nimport { PlaceholderImage } from '../icon/icons/PlaceholderImage';\nimport { ArrowDownIcon } from '../icon/icons/ArrowDownIcon';\nimport { trackGTMEvent } from '../utils/gtmTracking';\n\ntype MysiteHeroProps = {\n readonly imageDetails?: {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n };\n readonly shopTitle: string;\n readonly shopDescription: string;\n readonly socialTitleText: string;\n readonly email: string;\n readonly phone: string;\n readonly className?: string;\n readonly bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n readonly socialIcons?: {\n type: string;\n url: string;\n }[];\n readonly expirationDate?: string;\n readonly showBadges?: boolean;\n};\n\ntype ImageDetails = {\n imageSrc: string;\n imageAlt: string;\n bgColor: string;\n};\n\ntype BannerProps = {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n};\n\ntype ContentProps = {\n shopTitle: string;\n shopDescription: string;\n socialTitleText: string;\n email: string;\n phone: string;\n showBadges: boolean;\n expirationDate?: string;\n};\n\nconst renderImageContent = (imageDetails: ImageDetails | undefined, bannerProps: BannerProps, className: string) => {\n const placeholderClass = className.includes('mobile') ? 'placeholder-image-mobile' : 'placeholder-image';\n return imageDetails?.imageSrc ? (\n <ImgTabIndex tabIndex={0}>\n <NsImage className={className} src={imageDetails.imageSrc} alt={imageDetails.imageAlt} />\n </ImgTabIndex>\n ) : (\n <Box className={placeholderClass}>\n <PlaceholderImage\n width={className.includes('mobile') ? '144px' : '246px'}\n height={className.includes('mobile') ? '144px' : '246px'}\n backgroundColor={bannerProps?.backgroundColor ?? '#5F5F5F'}\n />\n </Box>\n );\n};\n\nconst renderBadges = (showBadges: boolean, expirationDate: string, isMobile: boolean, hasWhiteBackground: boolean) => {\n if (!showBadges || !expirationDate) return null;\n\n const badgeClass = isMobile ? 'mobile-badge' : 'tablet-badge';\n const containerClass = isMobile ? 'mobile-badges' : 'tablet-badges';\n\n return (\n <BadgeContainer className={containerClass}>\n {expirationDate && (\n <Badge className={badgeClass} hasWhiteBackground={hasWhiteBackground} tabIndex={0}>\n <BadgeValue className=\"badge-value\">{expirationDate}</BadgeValue>\n </Badge>\n )}\n </BadgeContainer>\n );\n};\n\nconst renderMobileContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, socialTitleText, email, showBadges, expirationDate, phone } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography tabIndex={0} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={0} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {renderContactLink('email', email, 'email-text-mobile')}\n {renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground)}\n </>\n )}\n </Box>\n );\n};\n\nconst renderDesktopContent = (\n props: ContentProps,\n isScrolled: boolean,\n renderSocialMediaIcons: React.ReactNode,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n) => {\n const { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate } = props;\n\n return (\n <Box className=\"content\">\n <Typography tabIndex={0} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={0} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={0} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={0} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {renderContactLink('email', email, 'email-text')}\n {renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground)}\n </>\n )}\n </Box>\n );\n};\n\nconst checkIfImageIsCircular = (url: string): Promise<boolean> => {\n return new Promise((resolve, reject) => {\n const imageContext = new Image();\n imageContext.crossOrigin = 'anonymous';\n imageContext.src = url;\n\n imageContext.onload = () => {\n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) return reject(new Error('Canvas not supported'));\n\n canvas.width = imageContext.width;\n canvas.height = imageContext.height;\n\n context.drawImage(imageContext, 0, 0);\n\n const corners = [\n context.getImageData(0, 0, 1, 1).data,\n context.getImageData(imageContext.width - 1, 0, 1, 1).data,\n context.getImageData(0, imageContext.height - 1, 1, 1).data,\n context.getImageData(imageContext.width - 1, imageContext.height - 1, 1, 1).data,\n ];\n\n const isCircular = corners.every((corner) => {\n const imageArray = Array.prototype.slice.call(corner);\n const alpha = imageArray[3];\n return alpha < 10;\n });\n resolve(isCircular);\n };\n imageContext.onerror = () => reject(new Error('Failed to load image'));\n });\n};\n\nconst isWhiteOrNearWhite = (color: string | undefined): boolean => {\n if (!color) return false;\n\n const hex = color.replace('#', '').toLowerCase();\n\n /* regex pattern for hex color format: 3 chars (#fff), 4 chars (#ffff), 6 chars (#ffffff), or 8 chars (#ffffffff)*/\n if (!/^[0-9a-f]{3,4}$|^[0-9a-f]{6}$|^[0-9a-f]{8}$/i.test(hex)) return false;\n\n let fullHex = hex;\n if (hex.length === 3 || hex.length === 4) {\n fullHex = hex\n .split('')\n .map((char) => char + char)\n .join('');\n }\n\n const r = Number.parseInt(fullHex.substring(0, 2), 16);\n const g = Number.parseInt(fullHex.substring(2, 4), 16);\n const b = Number.parseInt(fullHex.substring(4, 6), 16);\n\n const threshold = 220;\n return r >= threshold && g >= threshold && b >= threshold;\n};\n\nconst createContactClickHandler = (contactType: 'email' | 'phone', contactValue: string) => ({\n onClick: () => {\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n },\n onKeyDown: (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n trackGTMEvent({\n event: 'contact_click',\n contact_type: contactType,\n contact_value: contactValue,\n click_element: `${contactType}_link`,\n });\n globalThis.location.href = `${contactType === 'email' ? 'mailto' : 'tel'}:${contactValue}`;\n }\n },\n});\n\nconst renderContactLink = (contactType: 'email' | 'phone', contactValue: string, className: string) => {\n const protocol = contactType === 'email' ? 'mailto:' : 'tel:';\n const handlers = createContactClickHandler(contactType, contactValue);\n\n return (\n <Typography className={className}>\n <ContactLink href={`${protocol}${contactValue}`} {...handlers}>\n {contactValue}\n </ContactLink>\n </Typography>\n );\n};\nexport default function MysiteHero({\n className,\n shopTitle,\n shopDescription,\n socialTitleText,\n imageDetails,\n email,\n phone,\n bannerProps,\n socialIcons,\n expirationDate,\n showBadges = false,\n}: MysiteHeroProps): ReactElement {\n const isMobile = useMediaQuery('(max-width: 560px)');\n const [isScrolled, setIsScrolled] = useState(false);\n const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false);\n const [hasWhiteBackground, setHasWhiteBackground] = useState(false);\n const [isImageCircular, setIsImageCircular] = useState(false);\n\n const toggleDescription = () => {\n setIsDescriptionExpanded(!isDescriptionExpanded);\n };\n\n useEffect(() => {\n const checkImage = async () => {\n if (imageDetails?.imageSrc) {\n const isCircular = await checkIfImageIsCircular(imageDetails.imageSrc);\n setIsImageCircular(isCircular);\n } else {\n setIsImageCircular(false);\n }\n };\n\n checkImage();\n }, [imageDetails?.imageSrc]);\n\n useEffect(() => {\n setHasWhiteBackground(isWhiteOrNearWhite(bannerProps?.backgroundColor));\n }, [bannerProps?.backgroundColor]);\n\n useEffect(() => {\n let debounceTimeout: ReturnType<typeof setTimeout>;\n let lastScrollY = window.scrollY;\n let currentScrollState = false;\n let isTransitioning = false;\n let lastUpdateTime = 0;\n\n const updateScrollState = (newState: boolean) => {\n const now = Date.now();\n\n if (currentScrollState !== newState && !isTransitioning) {\n if (now - lastUpdateTime < 100) {\n return;\n }\n\n isTransitioning = true;\n currentScrollState = newState;\n lastUpdateTime = now;\n\n if (newState) {\n setIsDescriptionExpanded(false);\n }\n\n clearTimeout(debounceTimeout);\n setIsScrolled(newState);\n\n debounceTimeout = setTimeout(() => {\n isTransitioning = false;\n\n if (newState && window.scrollY < 15) {\n window.scrollTo({\n top: isMobile ? 20 : 30,\n behavior: 'smooth',\n });\n }\n }, 300);\n }\n };\n\n const handleScroll = () => {\n const currentScrollY = window.scrollY;\n\n if (isTransitioning) {\n lastScrollY = currentScrollY;\n return;\n }\n\n const scrollDelta = Math.abs(currentScrollY - lastScrollY);\n\n if (scrollDelta < 0.5) {\n return;\n }\n\n const scrollingDown = currentScrollY > lastScrollY;\n\n const scrollDownThreshold = isMobile ? 15 : 25;\n const scrollUpThreshold = isMobile ? 8 : 12;\n\n if (scrollingDown && currentScrollY > scrollDownThreshold && !currentScrollState) {\n updateScrollState(true);\n } else if (!scrollingDown && currentScrollY < scrollUpThreshold && currentScrollState) {\n updateScrollState(false);\n }\n\n lastScrollY = currentScrollY;\n };\n\n const initializeState = () => {\n const initialScrollY = window.scrollY;\n const scrollThreshold = isMobile ? 5 : 10;\n const shouldStartCompact = initialScrollY > scrollThreshold;\n\n currentScrollState = shouldStartCompact;\n setIsScrolled(shouldStartCompact);\n lastScrollY = initialScrollY;\n lastUpdateTime = Date.now();\n };\n\n let rafId: number | null = null;\n let lastRafTime = 0;\n const throttledScrollHandler = () => {\n if (rafId) return;\n\n const now = Date.now();\n if (now - lastRafTime < 16) {\n return;\n }\n\n rafId = requestAnimationFrame(() => {\n handleScroll();\n lastRafTime = Date.now();\n rafId = null;\n });\n };\n\n initializeState();\n window.addEventListener('scroll', throttledScrollHandler, { passive: true });\n\n return () => {\n window.removeEventListener('scroll', throttledScrollHandler);\n if (rafId) cancelAnimationFrame(rafId);\n clearTimeout(debounceTimeout);\n };\n }, [isMobile]);\n\n const renderSocialMediaIcons = useMemo(() => {\n return socialIcons?.map((icon, index) => {\n const handleSocialClick = (e: React.MouseEvent) => {\n e.preventDefault();\n trackGTMEvent({\n event: 'social_click',\n social_platform: icon.type,\n social_url: icon.url,\n click_element: 'social_icon',\n });\n window.open(icon.url, '_blank');\n };\n\n return (\n <StyledSpan key={icon?.type + index} onClick={handleSocialClick}>\n <NsLink href={icon.url} target=\"_blank\">\n <NsImage\n key={icon?.type + index}\n src={`https://www.google.com/s2/favicons?domain=${icon?.url}&sz=24`}\n alt={`${icon.type} icon`}\n width=\"24\"\n height=\"24\"\n />\n </NsLink>\n </StyledSpan>\n );\n });\n }, [socialIcons]);\n\n const containerClass = `${className} ${isScrolled ? 'scrolled' : ''}`;\n const props = { shopTitle, shopDescription, socialTitleText, email, phone, showBadges, expirationDate };\n\n const getCharacterLimit = () => {\n if (window.innerWidth <= 380) return 50;\n if (window.innerWidth <= 415) return 56;\n if (window.innerWidth <= 460) return 62;\n return 80;\n };\n\n const shouldShowToggle = isMobile && shopDescription && shopDescription.length > getCharacterLimit();\n\n return isMobile ? (\n <MysiteHeroContainerMobile\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n <Box className=\"image-content-mobile\">\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image-mobile')}\n {renderMobileContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </Box>\n {!isScrolled && (\n <Box className=\"expandable-description-mobile\">\n <Typography\n className={`description-content-mobile ${isDescriptionExpanded || !shouldShowToggle ? 'expanded' : 'collapsed'}`}\n >\n {shopDescription}\n </Typography>\n {shouldShowToggle && (\n <ToggleButtonMobile onClick={toggleDescription}>\n <ArrowDownIcon\n width={16}\n height={16}\n className={`arrow-icon-mobile ${isDescriptionExpanded ? 'expanded' : ''}`}\n />\n </ToggleButtonMobile>\n )}\n </Box>\n )}\n </MysiteHeroContainerMobile>\n ) : (\n <MysiteHeroContainer\n className={containerClass}\n data-testid=\"my-site-shop-header\"\n bannerProps={bannerProps}\n isCircularImage={isImageCircular}\n hasWhiteBackground={hasWhiteBackground}\n >\n {renderImageContent(imageDetails, bannerProps ?? {}, 'bg-image')}\n {renderDesktopContent(props, isScrolled, renderSocialMediaIcons, isMobile, hasWhiteBackground)}\n </MysiteHeroContainer>\n );\n}\n","import React from 'react';\nimport { styled } from '@nuskin/foundation-theme';\nimport { Box, BoxProps } from '@mui/material';\n\ninterface StyledBoxProps extends BoxProps {\n bannerProps?: {\n backgroundColor?: string;\n headlineFont?: string;\n paragraphFont?: string;\n };\n isCircularImage?: boolean;\n hasWhiteBackground?: boolean;\n}\n\ninterface BadgeProps extends BoxProps {\n hasWhiteBackground?: boolean;\n}\n\nconst getContactTextStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '600',\n lineHeight: '16px',\n letterSpacing: '0.12px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n});\n\nconst getSocialTitleStyles = (hasWhiteBackground: boolean | undefined) => ({\n fontSize: '12px',\n fontStyle: 'normal' as const,\n fontWeight: '700',\n lineHeight: '16px',\n letterSpacing: '0.48px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n textTransform: 'uppercase' as const,\n paddingLeft: '5px',\n});\n\nconst getSocialIconsStyles = () => ({\n display: 'flex',\n flexDirection: 'row' as const,\n gap: '10px',\n alignItems: 'center',\n});\n\nconst getContactTextMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getContactTextStyles(hasWhiteBackground),\n paddingBottom: '11px',\n wordBreak: 'break-all' as const,\n overflowWrap: 'break-word' as const,\n paddingLeft: '5px',\n '& a': {\n color: 'inherit',\n textDecoration: 'none',\n },\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '15px',\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '14px',\n paddingBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '12px',\n paddingBottom: '4px',\n },\n});\n\nconst getSocialTitleMobileStyles = (hasWhiteBackground: boolean | undefined) => ({\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '11px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '@media (max-width: 420px)': {\n fontSize: '11px',\n lineHeight: '14px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '10px',\n lineHeight: '12px',\n marginBottom: '5px',\n },\n '@media (max-width: 375px)': {\n fontSize: '8px',\n lineHeight: '11px',\n marginBottom: '4px',\n },\n});\n\nexport const MysiteHeroContainer = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n height: 'auto',\n flexDirection: 'row',\n alignItems: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content': {\n paddingTop: '0',\n justifyContent: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title': {\n fontSize: '26px',\n lineHeight: '34px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n\n '.bg-image': {\n width: '90px',\n height: '90px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n '& > div': {\n width: '90px',\n height: '90px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.content': {\n width: '70%',\n height: '100%',\n marginLeft: '2%',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image': {\n width: '252px',\n height: '252px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '3px' : '0px',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n '.body-title': {\n fontSize: '32px',\n lineHeight: '38px',\n marginBottom: '8px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-text': {\n fontSize: '16px',\n marginBottom: '12px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '22px',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n WebkitLineClamp: 3,\n textOverflow: 'ellipsis',\n paddingLeft: '5px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.social-media': {\n display: 'flex',\n flexDirection: 'column',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.email-text': getContactTextStyles(hasWhiteBackground),\n '.phone-text': getContactTextStyles(hasWhiteBackground),\n '.social-title-text': {\n ...getSocialTitleStyles(hasWhiteBackground),\n marginBottom: '8px',\n },\n '.social-icons': {\n ...getSocialIconsStyles(),\n paddingBottom: '8px',\n },\n }),\n);\n\nexport const MysiteHeroContainerMobile = styled((props: StyledBoxProps) => <Box {...props} />)(\n ({ bannerProps, isCircularImage, hasWhiteBackground }) => ({\n backgroundClip: 'border-box',\n display: 'flex',\n background: bannerProps?.backgroundColor ?? '#383838',\n position: 'relative',\n overflow: 'hidden',\n width: '100%',\n flexDirection: 'column',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'transform, opacity',\n transform: 'translateZ(0)',\n backfaceVisibility: 'hidden',\n '&.scrolled': {\n top: 0,\n left: 0,\n right: 0,\n boxShadow: '0 2px 8px rgba(0,0,0,0.2)',\n '.content-mobile': {\n paddingTop: '5px',\n width: '60%',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.body-title-mobile': {\n fontSize: '18px',\n lineHeight: '28px',\n marginBottom: '0',\n fontStyle: 'normal',\n fontWeight: '400',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n '.bg-image-mobile': {\n width: '75px',\n height: '75px',\n padding: isCircularImage ? '2px' : '0px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n objectFit: 'cover',\n objectPosition: 'center',\n },\n '.placeholder-image-mobile': {\n '& > div': {\n width: '75px !important',\n height: '75px !important',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n },\n },\n },\n '.image-content-mobile': {\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n justifyContent: 'center',\n alignItems: 'center',\n },\n '.content-mobile': {\n width: '55%',\n height: '100%',\n paddingTop: '10px',\n paddingRight: '10px',\n marginLeft: '8px',\n marginRight: 'auto',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n paddingTop: '8px',\n width: '100%',\n },\n '@media (max-width: 400px)': {\n paddingTop: '6px',\n width: '100%',\n height: '100%',\n },\n '@media (max-width: 375px)': {\n paddingTop: '4px',\n width: '100%',\n height: '100%',\n },\n },\n '.bg-image-mobile': {\n width: '144px',\n height: '144px',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n objectFit: 'cover',\n objectPosition: 'center',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n padding: isCircularImage ? '2px' : '0px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '112px',\n height: '112px',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n '.placeholder-image-mobile': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n willChange: 'width, height, transform',\n '& > div': {\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n width: '144px',\n height: '144px',\n '@media (max-width: 420px)': {\n width: '120px',\n height: '120px',\n },\n '@media (max-width: 400px)': {\n width: '110px !important',\n height: '110px !important',\n },\n '@media (max-width: 375px)': {\n width: '90px',\n height: '90px',\n },\n },\n },\n '.body-title-mobile': {\n fontSize: '22px',\n lineHeight: '28px',\n marginBottom: '13px',\n fontWeight: '400',\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontStyle: 'normal',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontFamily: bannerProps?.headlineFont ?? 'Lora',\n paddingLeft: '5px',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n '@media (max-width: 420px)': {\n fontSize: '16px',\n lineHeight: '24px',\n marginBottom: '8px',\n },\n '@media (max-width: 400px)': {\n fontSize: '16px',\n lineHeight: '22px',\n marginBottom: '6px',\n },\n '@media (max-width: 375px)': {\n fontSize: '14px',\n lineHeight: '20px',\n marginBottom: '4px',\n },\n },\n '.body-text-mobile': {\n fontSize: '14px',\n padding: '20px 25px 20px 25px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n backgroundColor: '#E0E0E0',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'all 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n opacity: 1,\n transform: 'translateY(0)',\n },\n '.expandable-description-mobile': {\n backgroundColor: '#E0E0E0',\n position: 'relative',\n },\n '.description-content-mobile': {\n fontSize: '14px',\n padding: '10px 15px',\n fontStyle: 'normal',\n fontWeight: '400',\n lineHeight: '20px',\n color: '#252525',\n fontFamily: bannerProps?.paragraphFont ?? 'inherit',\n transition: 'max-height 0.3s ease-in-out, opacity 0.3s ease-in-out',\n overflow: 'hidden',\n position: 'relative',\n '&.collapsed': {\n maxHeight: '50px',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '20px',\n background: 'linear-gradient(transparent, rgba(224, 224, 224, 0.8), #E0E0E0)',\n pointerEvents: 'none',\n },\n },\n '&.expanded': {\n maxHeight: 'none',\n whiteSpace: 'normal',\n display: 'block',\n '&::after': {\n display: 'none',\n },\n },\n },\n '.email-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.phone-text-mobile': getContactTextMobileStyles(hasWhiteBackground),\n '.social-title-text-mobile': getSocialTitleMobileStyles(hasWhiteBackground),\n '.social-icons-mobile': {\n ...getSocialIconsStyles(),\n paddingBottom: '10px',\n transition: 'opacity 0.3s ease-out, transform 0.3s ease-out',\n opacity: 1,\n transform: 'translateY(0)',\n '& img': {\n width: '24px',\n height: '24px',\n '@media (max-width: 400px)': {\n width: '20px',\n height: '20px',\n },\n '@media (max-width: 375px)': {\n width: '18px',\n height: '18px',\n },\n },\n '@media (max-width: 420px)': {\n paddingBottom: '8px',\n },\n '@media (max-width: 400px)': {\n paddingBottom: '4px',\n },\n '@media (max-width: 375px)': {\n paddingBottom: '3px',\n },\n },\n }),\n);\n\nexport const BadgeContainer = styled(Box)({\n display: 'flex',\n gap: '12px',\n marginBottom: '16px',\n paddingLeft: '5px',\n\n '&.mobile-badges': {\n flexDirection: 'column',\n gap: '8px',\n marginBottom: '12px',\n },\n\n '&.tablet-badges': {\n flexDirection: 'row',\n gap: '12px',\n marginBottom: '8px',\n },\n});\n\nexport const Badge = styled((props: BadgeProps) => <Box {...props} />)(({ hasWhiteBackground }) => ({\n backgroundColor: 'rgba(255, 255, 255, 0.2)',\n backdropFilter: 'blur(10px)',\n borderRadius: '20px',\n padding: '8px 16px',\n display: 'flex',\n alignItems: 'center',\n gap: '4px',\n border: '1px solid rgba(255, 255, 255, 0.3)',\n transition: 'all 0.3s ease',\n\n '&.mobile-badge': {\n padding: '6px 12px',\n borderRadius: '16px',\n fontSize: '12px',\n },\n\n '&.tablet-badge': {\n padding: '8px 16px',\n borderRadius: '20px',\n fontSize: '14px',\n },\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.3)',\n transform: 'translateY(-1px)',\n boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',\n },\n\n '.badge-text': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '400',\n opacity: 0.9,\n },\n\n '.badge-value': {\n color: hasWhiteBackground ? '#000000' : '#FFFFFF',\n fontWeight: '600',\n },\n}));\nexport const ToggleButtonMobile = styled('button')({\n backgroundColor: '#E0E0E0',\n border: '1px solid #252525',\n borderRadius: '10px',\n cursor: 'pointer',\n width: '40px',\n height: '20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n margin: '10px auto 5px auto',\n transition: 'all 0.2s ease',\n '& .arrow-icon-mobile': {\n transition: 'transform 0.3s ease',\n '&.expanded': {\n transform: 'rotate(180deg)',\n },\n },\n});\nexport const StyledSpan = styled(Box)`\n background: none;\n border: 2px solid transparent;\n cursor: pointer;\n padding: 2px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n transition: all 0.3s ease;\n\n &:hover {\n transform: scale(1.1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n }\n\n &:focus,\n &:focus-within {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);\n }\n\n &:hover svg {\n fill: #ffffff;\n }\n`;\nexport const ImgTabIndex = styled('span')`\n line-height: 0.5;\n`;\n\nexport const ContactLink = styled('a')({\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit',\n color: 'inherit',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline',\n },\n});\n\nexport const BadgeValue = styled('span')({});\n","import React from 'react';\nimport { Box } from '@mui/material';\n\ntype PlaceholderImageProps = {\n readonly width: string | number;\n readonly height: string | number;\n readonly backgroundColor: string;\n};\n\nexport const PlaceholderImage: React.FC<PlaceholderImageProps> = ({ width, height, backgroundColor }) => {\n return (\n <Box\n sx={{\n width,\n height,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor,\n }}\n data-testid=\"placeholder-image\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"129\" viewBox=\"0 0 128 129\" fill=\"none\">\n <g id=\"ns_logomark\">\n <path\n id=\"Vector\"\n d=\"M127.495 52.1946C125.663 47.9538 122.999 44.1171 119.661 40.9073C112.565 34.2835 102.562 31.7037 93.1175 34.0622C83.6733 36.4206 76.0882 43.3926 72.991 52.5619C71.4142 56.8414 70.6063 61.3627 70.6039 65.9196C70.6039 85.8227 70.6039 105.737 70.6039 125.662C70.6039 129.001 70.6039 129.001 66.9051 128.834C66.9051 128.2 66.9051 127.499 66.9051 126.831C66.9051 104.323 66.9051 81.8263 66.9051 59.3409C66.3415 45.3064 74.9302 32.5039 88.1888 27.6164C89.79 27.0612 91.4307 26.6259 93.0981 26.314C94.7114 25.98 96.4605 25.8465 98.0738 25.6461C96.0231 16.3291 78.9419 5.60953 65.0889 4.97504C50.3084 4.62252 36.6074 12.6365 29.7509 25.6461C31.331 25.8465 32.8779 25.9466 34.3569 26.2138C48.0999 28.544 58.7086 39.4998 60.5168 53.2298C60.8904 55.7285 61.0812 58.2508 61.0877 60.7769C61.0877 82.7507 61.0877 104.724 61.0877 126.697C61.0877 128.434 60.6842 129.169 58.8016 128.968C56.9183 128.768 57.1204 128.2 57.1204 126.965C57.1204 119.985 57.1204 113.006 57.1204 105.993C57.1204 92.1674 57.1204 78.3423 57.1204 64.5171C57.2385 56.3928 54.2457 48.5271 48.7477 42.5103C42.2429 35.5282 32.6539 32.2371 23.1959 33.7401C13.7379 35.243 5.66194 41.3411 1.67448 49.9906C1.23781 50.8254 0.867444 51.6937 0.262573 52.9293C5.79294 22.3996 32.4752 0.139867 63.7085 0.000656323C94.9411 -0.138555 121.824 21.8824 127.629 52.3616\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_2\"\n d=\"M86.0995 124.927C86.0995 124.293 86.0995 123.858 86.0995 123.425C86.0995 111.669 86.0995 100.049 86.0995 88.1269C85.8836 82.4231 88.0775 76.89 92.1523 72.8653C97.3131 67.9567 104.984 66.7091 111.452 69.7263C117.892 72.1185 122.166 78.225 122.178 85.0541C122.372 92.1747 119.781 99.0921 114.949 104.356C107.882 113.237 98.6134 120.141 88.05 124.392C87.4217 124.616 86.782 124.805 86.1335 124.96\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_3\"\n d=\"M41.8183 125.395C37.6149 123.224 33.6477 121.487 29.9828 119.25C21.5405 114.299 14.4778 107.331 9.43828 98.9796C6.53442 94.3985 5.34408 88.9493 6.07591 83.5852C7.056 75.2882 13.8859 68.8841 22.2829 68.3905C31.1231 67.2473 39.3527 73.0751 41.1455 81.7484C41.76 84.263 42.0762 86.8411 42.0868 89.4287C42.0868 100.516 42.0868 111.636 42.0868 122.823C42.0868 123.457 42.0867 124.059 41.8854 125.294\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_4\"\n d=\"M51.3337 127.431C47.9713 127.431 47.6681 127.198 47.6681 124.326V76.6386C48.1096 67.937 42.9747 59.906 34.8574 56.602C25.8992 52.8557 15.5485 54.8615 8.66523 61.6779C4.28638 66.6086 1.89197 72.9696 1.94049 79.5438C1.95423 80.2444 1.78037 80.9357 1.43588 81.5476C1.06552 79.9446 0.62885 78.2081 0.426687 76.7387C-0.724024 70.4463 0.471163 63.9529 3.78906 58.472C6.09291 54.6111 9.65016 51.6434 13.8762 50.0567C22.8587 46.555 32.9393 47.1785 41.4148 51.7598C47.6592 54.8694 51.5262 61.2882 51.3337 68.2232C51.5019 87.6249 51.3337 107.027 51.3337 126.396C51.3337 126.797 51.3337 127.164 51.3337 127.532\"\n fill=\"#252525\"\n />\n <path\n id=\"Vector_5\"\n d=\"M76.287 127.499V125.094C76.287 107.196 76.4883 89.2963 76.287 71.3966C76.0848 56.9034 84.2554 50.6588 95.7553 48.3545C101.535 47.2005 107.524 47.6393 113.071 49.6235C122.914 53.3319 128.994 63.1725 127.866 73.5672C127.631 76.2831 127.17 78.975 126.487 81.6151C125.916 78.2758 125.68 74.9364 124.772 71.597C122.808 64.3002 117.377 58.4174 110.228 55.8421C103.078 53.2668 95.1132 54.3239 88.8955 58.6734C83.0441 62.6207 79.7011 69.3237 80.086 76.3389C80.086 92.2349 80.086 108.131 80.086 124.026C80.086 127.366 80.086 127.366 76.2198 127.366\"\n fill=\"#252525\"\n />\n </g>\n </svg>\n </Box>\n );\n};\n","import React from 'react';\n\ntype ArrowDownIconProps = {\n readonly width?: string | number;\n readonly height?: string | number;\n readonly className?: string;\n};\n\nexport const ArrowDownIcon: React.FC<ArrowDownIconProps> = ({ width = 16, height = 16, className = '' }) => {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n className={className}\n data-testid=\"arrow-down-icon\"\n >\n <path d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n </svg>\n );\n};\n","export interface GTMEvent {\n event: string;\n\n [key: string]: unknown;\n}\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n }\n}\n\nexport function trackGTMEvent(eventData: GTMEvent): void {\n if (typeof window === 'undefined') {\n return;\n }\n\n const url = window.location.href;\n const updatedEventData = { ...eventData };\n\n const prefix = url.includes('personal-offer') ? 'postorefront_' : 'mysite_';\n updatedEventData.event = prefix + eventData.event;\n\n try {\n if (window.dataLayer) {\n window.dataLayer.push(updatedEventData);\n } else {\n console.error('GTM dataLayer not available, but event logged');\n window.dataLayer = [];\n window.dataLayer.push(updatedEventData);\n }\n } catch (error) {\n console.error('Failed to track GTM event:', error);\n }\n}\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const DashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 24px;\n gap: 32px;\n }\n\n @media (min-width: 1080px) {\n padding: 32px;\n gap: 40px;\n }\n`;\n\nexport const StatsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n gap: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TwoColumnGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport PublicIcon from '@mui/icons-material/Public';\nimport { NsSpinner } from '@nuskin/foundation-ui-components';\nimport {\n HeaderContainer,\n TitleSection,\n ShopTitle,\n DateRangeLabel,\n FiltersSection,\n FilterDropdownContainer,\n FilterLabel,\n StyledSelect,\n FilterIcon,\n LoadingIndicatorContainer,\n DesktopFiltersContainer,\n} from './DashboardHeader.styled';\nimport type { DateRangeOption, MarketOption, DashboardStats } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface DashboardHeaderProps {\n readonly shopTitle?: string;\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly dateRangeLabel?: string;\n readonly isLoading?: boolean;\n readonly stats?: DashboardStats | null;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n}\n\nexport const DashboardHeader: React.FC<DashboardHeaderProps> = ({\n shopTitle,\n dateRange,\n market,\n dateRangeLabel: dateRangeLabelProp,\n isLoading = false,\n stats,\n onDateRangeChange,\n onMarketChange,\n}) => {\n const handleDateRangeChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newDateRange = event.target.value as DateRangeOption;\n onDateRangeChange?.(newDateRange);\n };\n\n const handleMarketChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newMarket = event.target.value as MarketOption;\n onMarketChange?.(newMarket);\n };\n\n const handleFilterKeyDown = (event: React.KeyboardEvent<HTMLSelectElement>) => {\n if (event.key === 'Escape') {\n (event.target as HTMLSelectElement).blur();\n }\n };\n\n const getDateRangeLabelText = () => {\n if (dateRangeLabelProp) return dateRangeLabelProp;\n if (stats?.dateRange) return stats.dateRange.label;\n return getTranslation(Keys.filter.dateRange.last30days);\n };\n\n return (\n <HeaderContainer as=\"header\" data-testid=\"dashboard-header\">\n <TitleSection>\n <ShopTitle data-testid=\"dashboard-shop-title\">\n {shopTitle ?? stats?.shopTitle ?? getTranslation(Keys.title)}\n </ShopTitle>\n <DateRangeLabel aria-live=\"polite\" data-testid=\"dashboard-date-range-label\">\n {getDateRangeLabelText()}\n </DateRangeLabel>\n </TitleSection>\n\n <FiltersSection\n aria-label={getTranslation(Keys.ariaLabel.dashboardFilters)}\n data-testid=\"dashboard-filters-section\"\n >\n <DesktopFiltersContainer>\n {isLoading && (\n <LoadingIndicatorContainer\n as=\"output\"\n aria-live=\"polite\"\n aria-label={getTranslation(Keys.ariaLabel.loadingDashboard)}\n data-testid=\"dashboard-loading-indicator\"\n >\n <NsSpinner />\n </LoadingIndicatorContainer>\n )}\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-date-range\">\n {getTranslation(Keys.filter.dateRangeLabel)}\n </FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <CalendarTodayIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-date-range\"\n data-testid=\"filter-date-range\"\n value={dateRange}\n onChange={handleDateRangeChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.dateRangeFilter)} ${getTranslation(Keys.filter.dateRange[dateRange])}`}\n >\n <option value=\"last7days\">{getTranslation(Keys.filter.dateRange.last7days)}</option>\n <option value=\"last30days\">{getTranslation(Keys.filter.dateRange.last30days)}</option>\n <option value=\"last90days\">{getTranslation(Keys.filter.dateRange.last90days)}</option>\n <option value=\"thisMonth\">{getTranslation(Keys.filter.dateRange.thisMonth)}</option>\n </StyledSelect>\n </FilterDropdownContainer>\n\n <FilterDropdownContainer>\n <FilterLabel htmlFor=\"filter-market\">{getTranslation(Keys.filter.marketLabel)}</FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <PublicIcon />\n </FilterIcon>\n <StyledSelect\n id=\"filter-market\"\n data-testid=\"filter-market\"\n value={market}\n onChange={handleMarketChange}\n onKeyDown={handleFilterKeyDown}\n disabled={isLoading}\n aria-label={`${getTranslation(Keys.ariaLabel.marketFilter)} ${getTranslation(Keys.filter.market[market])}`}\n >\n <option value=\"all\">{getTranslation(Keys.filter.market.all)}</option>\n <option value=\"us\">{getTranslation(Keys.filter.market.us)}</option>\n <option value=\"ca\">{getTranslation(Keys.filter.market.ca)}</option>\n <option value=\"jp\">{getTranslation(Keys.filter.market.jp)}</option>\n <option value=\"kr\">{getTranslation(Keys.filter.market.kr)}</option>\n <option value=\"au\">{getTranslation(Keys.filter.market.au)}</option>\n <option value=\"nz\">{getTranslation(Keys.filter.market.nz)}</option>\n </StyledSelect>\n </FilterDropdownContainer>\n </DesktopFiltersContainer>\n </FiltersSection>\n </HeaderContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 12px;\n min-height: 64px;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 24px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px 32px;\n }\n`;\n\nexport const TitleSection = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`;\n\nexport const ShopTitle = styled('h1')`\n font-size: 20px;\n font-weight: 600;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`;\n\nexport const DateRangeLabel = styled('div')`\n font-size: 13px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`;\n\nexport const FilterDropdownContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`;\n\nexport const FilterLabel = styled('label')`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N80')};\n white-space: nowrap;\n display: none;\n\n @media (min-width: 1080px) {\n display: block;\n }\n`;\n\nexport const StyledSelect = styled('select')`\n display: flex;\n align-items: center;\n gap: 12px;\n height: 40px;\n padding: 8px 12px;\n background-color: transparent;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"%3e%3cpath d=\"M5.625 7.3125L9 10.6875L12.375 7.3125\" stroke=\"%235f5f5f\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/%3e%3c/svg%3e');\n background-repeat: no-repeat;\n background-position: right 8px center;\n padding-right: 32px;\n min-width: auto;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 160px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n min-width: 180px;\n }\n`;\n\nexport const FilterIcon = styled('span')`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`;\n\nexport const LoadingIndicatorContainer = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n overflow: hidden;\n\n svg,\n img,\n > * {\n width: 28px !important;\n height: 28px !important;\n max-width: 28px;\n max-height: 28px;\n }\n`;\n\nexport const DesktopFiltersContainer = styled('div')`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`;\n\nexport const StyledCircularProgress = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","/**\n * Translation Keys for Shopping Dashboard\n * i18n key mapping with fallback strings for internationalization support.\n */\n\nexport const ShoppingDashboardTranslationKeys = {\n title: {\n key: 'shoppingDashboard.title',\n fallback: 'Shop Performance',\n },\n error: {\n key: 'shoppingDashboard.error',\n fallback: 'Error loading dashboard',\n },\n stats: {\n revenue: {\n key: 'shoppingDashboard.stats.revenue',\n fallback: 'Total Revenue',\n },\n volume: {\n key: 'shoppingDashboard.stats.volume',\n fallback: 'Volume',\n },\n visits: {\n key: 'shoppingDashboard.stats.visits',\n fallback: 'Site Visits',\n },\n subtitle: {\n dcSv: {\n key: 'shoppingDashboard.stats.subtitle.dcSv',\n fallback: 'DC-SV',\n },\n conversionRate: {\n key: 'shoppingDashboard.stats.subtitle.conversionRate',\n fallback: 'Conversion Rate',\n },\n },\n trend: {\n increased: {\n key: 'shoppingDashboard.stats.trend.increased',\n fallback: 'increased',\n },\n decreased: {\n key: 'shoppingDashboard.stats.trend.decreased',\n fallback: 'decreased',\n },\n unchanged: {\n key: 'shoppingDashboard.stats.trend.unchanged',\n fallback: 'unchanged',\n },\n },\n details: {\n key: 'shoppingDashboard.stats.details',\n fallback: 'details',\n },\n },\n filter: {\n dateRange: {\n label: {\n key: 'shoppingDashboard.filter.dateRange.label',\n fallback: 'Date Range',\n },\n last7days: {\n key: 'shoppingDashboard.filter.dateRange.last7days',\n fallback: 'Last 7 Days',\n },\n last30days: {\n key: 'shoppingDashboard.filter.dateRange.last30days',\n fallback: 'Last 30 Days',\n },\n last90days: {\n key: 'shoppingDashboard.filter.dateRange.last90days',\n fallback: 'Last 90 Days',\n },\n thisMonth: {\n key: 'shoppingDashboard.filter.dateRange.thisMonth',\n fallback: 'This Month',\n },\n },\n dateRangeLabel: {\n key: 'shoppingDashboard.filter.dateRangeLabel',\n fallback: 'Date Range',\n },\n market: {\n label: {\n key: 'shoppingDashboard.filter.market.label',\n fallback: 'Market',\n },\n all: {\n key: 'shoppingDashboard.filter.market.all',\n fallback: 'All Markets',\n },\n us: {\n key: 'shoppingDashboard.filter.market.us',\n fallback: 'United States',\n },\n ca: {\n key: 'shoppingDashboard.filter.market.ca',\n fallback: 'Canada',\n },\n jp: {\n key: 'shoppingDashboard.filter.market.jp',\n fallback: 'Japan',\n },\n kr: {\n key: 'shoppingDashboard.filter.market.kr',\n fallback: 'Korea',\n },\n au: {\n key: 'shoppingDashboard.filter.market.au',\n fallback: 'Australia',\n },\n nz: {\n key: 'shoppingDashboard.filter.market.nz',\n fallback: 'New Zealand',\n },\n },\n marketLabel: {\n key: 'shoppingDashboard.filter.marketLabel',\n fallback: 'Market',\n },\n productSort: {\n label: {\n key: 'shoppingDashboard.filter.productSort.label',\n fallback: 'Sort By',\n },\n units: {\n key: 'shoppingDashboard.filter.productSort.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.filter.productSort.revenue',\n fallback: 'Revenue',\n },\n volume: {\n key: 'shoppingDashboard.filter.productSort.volume',\n fallback: 'Volume',\n },\n byUnits: {\n key: 'shoppingDashboard.filter.productSort.byUnits',\n fallback: 'By: Units',\n },\n byRevenue: {\n key: 'shoppingDashboard.filter.productSort.byRevenue',\n fallback: 'By: Revenue',\n },\n byVolume: {\n key: 'shoppingDashboard.filter.productSort.byVolume',\n fallback: 'By: Volume',\n },\n },\n signupView: {\n label: {\n key: 'shoppingDashboard.filter.signupView.label',\n fallback: 'Show',\n },\n all: {\n key: 'shoppingDashboard.filter.signupView.all',\n fallback: 'All',\n },\n members: {\n key: 'shoppingDashboard.filter.signupView.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.filter.signupView.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n showAll: {\n key: 'shoppingDashboard.filter.signupView.showAll',\n fallback: 'Show: All',\n },\n showMembers: {\n key: 'shoppingDashboard.filter.signupView.showMembers',\n fallback: 'Show: Members',\n },\n showRetail: {\n key: 'shoppingDashboard.filter.signupView.showRetail',\n fallback: 'Show: Retail',\n },\n showBrandAffiliates: {\n key: 'shoppingDashboard.filter.signupView.showBrandAffiliates',\n fallback: 'Show: Brand Affiliates',\n },\n },\n categorySort: {\n byRevenue: {\n key: 'shoppingDashboard.filter.categorySort.byRevenue',\n fallback: 'By: Revenue',\n },\n byUnits: {\n key: 'shoppingDashboard.filter.categorySort.byUnits',\n fallback: 'By: Units',\n },\n },\n },\n widget: {\n topProducts: {\n title: {\n key: 'shoppingDashboard.widget.topProducts.title',\n fallback: 'Top Selling Products',\n },\n viewAll: {\n key: 'shoppingDashboard.widget.topProducts.viewAll',\n fallback: 'View All Products',\n },\n units: {\n key: 'shoppingDashboard.widget.topProducts.units',\n fallback: 'Units',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topProducts.revenue',\n fallback: 'Revenue',\n },\n loading: {\n key: 'shoppingDashboard.widget.topProducts.loading',\n fallback: 'Loading products...',\n },\n empty: {\n key: 'shoppingDashboard.widget.topProducts.empty',\n fallback: 'No products available',\n },\n ariaLabel: {\n key: 'shoppingDashboard.widget.topProducts.ariaLabel',\n fallback: 'Top Selling Products widget',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.titleAriaLabel',\n fallback: 'Click to view full top products details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.sortAriaLabel',\n fallback: 'Sort products by',\n },\n noImageAriaLabel: {\n key: 'shoppingDashboard.widget.topProducts.noImageAriaLabel',\n fallback: 'No image available',\n },\n unitsSuffix: {\n key: 'shoppingDashboard.widget.topProducts.unitsSuffix',\n fallback: 'units',\n },\n revenueSuffix: {\n key: 'shoppingDashboard.widget.topProducts.revenueSuffix',\n fallback: 'revenue',\n },\n dcSvSuffix: {\n key: 'shoppingDashboard.widget.topProducts.dcSvSuffix',\n fallback: 'DC-SV',\n },\n rank: {\n key: 'shoppingDashboard.widget.topProducts.rank',\n fallback: 'Rank',\n },\n trend: {\n key: 'shoppingDashboard.widget.topProducts.trend',\n fallback: 'Trend',\n },\n },\n conversionRate: {\n title: {\n key: 'shoppingDashboard.widget.conversionRate.title',\n fallback: 'Conversion Rate',\n },\n formula: {\n key: 'shoppingDashboard.widget.conversionRate.formula',\n fallback: 'Orders \\u00F7 Site visits',\n },\n comparison: {\n key: 'shoppingDashboard.widget.conversionRate.comparison',\n fallback: 'compared to this time last month',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.chartAriaLabel',\n fallback: 'Conversion Rate chart showing daily rates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.titleAriaLabel',\n fallback: 'Click to view full conversion rate details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.conversionRate.filterAriaLabel',\n fallback: 'Filter conversion rate by customer type',\n },\n noData: {\n key: 'shoppingDashboard.widget.conversionRate.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.conversionRate.noChange',\n fallback: 'No change',\n },\n tooltipOrders: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipOrders',\n fallback: 'orders',\n },\n tooltipVisits: {\n key: 'shoppingDashboard.widget.conversionRate.tooltipVisits',\n fallback: 'visits',\n },\n ordersPerSiteVisits: {\n key: 'shoppingDashboard.widget.conversionRate.ordersPerSiteVisits',\n fallback: 'Orders / Site Visits',\n },\n },\n signups: {\n title: {\n key: 'shoppingDashboard.widget.signups.title',\n fallback: 'Sign-ups',\n },\n total: {\n key: 'shoppingDashboard.widget.signups.total',\n fallback: 'Total',\n },\n members: {\n key: 'shoppingDashboard.widget.signups.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.widget.signups.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.widget.signups.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.signups.chartAriaLabel',\n fallback: 'Signups multi-line chart showing Total, Members, Retail, and Brand Affiliates',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.signups.titleAriaLabel',\n fallback: 'Click to view full signups details page',\n },\n filterAriaLabel: {\n key: 'shoppingDashboard.widget.signups.filterAriaLabel',\n fallback: 'Filter signups view',\n },\n noData: {\n key: 'shoppingDashboard.widget.signups.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.widget.signups.noChange',\n fallback: 'No change',\n },\n totalSignupsInPeriod: {\n key: 'shoppingDashboard.widget.signups.totalSignupsInPeriod',\n fallback: 'Total sign-ups in period',\n },\n noTrendData: {\n key: 'shoppingDashboard.widget.signups.noTrendData',\n fallback: 'No sign-up trend data available.',\n },\n },\n topCategories: {\n title: {\n key: 'shoppingDashboard.widget.topCategories.title',\n fallback: 'Top Categories',\n },\n revenue: {\n key: 'shoppingDashboard.widget.topCategories.revenue',\n fallback: 'Revenue',\n },\n units: {\n key: 'shoppingDashboard.widget.topCategories.units',\n fallback: 'Units',\n },\n empty: {\n key: 'shoppingDashboard.widget.topCategories.empty',\n fallback: 'No category data available',\n },\n chartAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.chartAriaLabel',\n fallback: 'Top Categories donut chart showing revenue distribution by category',\n },\n titleAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.titleAriaLabel',\n fallback: 'Click to view full categories details page',\n },\n sortAriaLabel: {\n key: 'shoppingDashboard.widget.topCategories.sortAriaLabel',\n fallback: 'Sort categories by',\n },\n },\n menu: {\n ariaLabel: {\n key: 'shoppingDashboard.widget.menu.ariaLabel',\n fallback: 'widget options',\n },\n fullView: {\n key: 'shoppingDashboard.widget.menu.fullView',\n fallback: 'Full View',\n },\n },\n },\n navigation: {\n backToDashboard: {\n key: 'shoppingDashboard.navigation.backToDashboard',\n fallback: 'Back to Dashboard',\n },\n backAriaLabel: {\n key: 'shoppingDashboard.navigation.backAriaLabel',\n fallback: 'Back to dashboard',\n },\n },\n ariaLabel: {\n dashboard: {\n key: 'shoppingDashboard.ariaLabel.dashboard',\n fallback: 'Shopping Dashboard',\n },\n statsRow: {\n key: 'shoppingDashboard.ariaLabel.statsRow',\n fallback: 'Key performance metrics',\n },\n dashboardFilters: {\n key: 'shoppingDashboard.ariaLabel.dashboardFilters',\n fallback: 'Dashboard filters',\n },\n loadingDashboard: {\n key: 'shoppingDashboard.ariaLabel.loadingDashboard',\n fallback: 'Loading dashboard data',\n },\n dateRangeFilter: {\n key: 'shoppingDashboard.ariaLabel.dateRangeFilter',\n fallback: 'Date range filter, currently selected:',\n },\n marketFilter: {\n key: 'shoppingDashboard.ariaLabel.marketFilter',\n fallback: 'Market filter, currently selected:',\n },\n filterSuffix: {\n key: 'shoppingDashboard.ariaLabel.filterSuffix',\n fallback: 'filter',\n },\n },\n fullView: {\n signups: {\n columns: {\n id: { key: 'shoppingDashboard.fullView.signups.columns.id', fallback: 'ID' },\n name: { key: 'shoppingDashboard.fullView.signups.columns.name', fallback: 'Name' },\n date: { key: 'shoppingDashboard.fullView.signups.columns.date', fallback: 'Date' },\n type: { key: 'shoppingDashboard.fullView.signups.columns.type', fallback: 'Type' },\n email: { key: 'shoppingDashboard.fullView.signups.columns.email', fallback: 'Email' },\n status: { key: 'shoppingDashboard.fullView.signups.columns.status', fallback: 'Status' },\n },\n detailsTitle: {\n key: 'shoppingDashboard.fullView.signups.detailsTitle',\n fallback: 'Signup Details',\n },\n },\n conversionRate: {\n columns: {\n orderId: { key: 'shoppingDashboard.fullView.conversionRate.columns.orderId', fallback: 'Order ID' },\n date: { key: 'shoppingDashboard.fullView.conversionRate.columns.date', fallback: 'Date' },\n customer: { key: 'shoppingDashboard.fullView.conversionRate.columns.customer', fallback: 'Customer' },\n type: { key: 'shoppingDashboard.fullView.conversionRate.columns.type', fallback: 'Type' },\n items: { key: 'shoppingDashboard.fullView.conversionRate.columns.items', fallback: 'Items' },\n total: { key: 'shoppingDashboard.fullView.conversionRate.columns.total', fallback: 'Total' },\n bv: { key: 'shoppingDashboard.fullView.conversionRate.columns.bv', fallback: 'BV' },\n orderTotal: {\n key: 'shoppingDashboard.fullView.conversionRate.columns.orderTotal',\n fallback: 'Order Total',\n },\n totalSv: { key: 'shoppingDashboard.fullView.conversionRate.columns.totalSv', fallback: 'Total SV' },\n },\n orderDetailsTitle: {\n key: 'shoppingDashboard.fullView.conversionRate.orderDetailsTitle',\n fallback: 'Order Details',\n },\n notAvailable: {\n key: 'shoppingDashboard.fullView.conversionRate.notAvailable',\n fallback: 'N/A',\n },\n },\n products: {\n columns: {\n rank: { key: 'shoppingDashboard.fullView.products.columns.rank', fallback: '#' },\n product: { key: 'shoppingDashboard.fullView.products.columns.product', fallback: 'Product' },\n unitsSold: { key: 'shoppingDashboard.fullView.products.columns.unitsSold', fallback: 'Units Sold' },\n revenue: { key: 'shoppingDashboard.fullView.products.columns.revenue', fallback: 'Revenue' },\n volume: { key: 'shoppingDashboard.fullView.products.columns.volume', fallback: 'Volume (DC-SV)' },\n },\n skuPrefix: {\n key: 'shoppingDashboard.fullView.products.skuPrefix',\n fallback: 'SKU',\n },\n noProducts: {\n key: 'shoppingDashboard.fullView.products.noProducts',\n fallback: 'No products available.',\n },\n },\n categories: {\n columns: {\n category: { key: 'shoppingDashboard.fullView.categories.columns.category', fallback: 'Category' },\n revenue: { key: 'shoppingDashboard.fullView.categories.columns.revenue', fallback: 'Revenue' },\n percentOfTotal: {\n key: 'shoppingDashboard.fullView.categories.columns.percentOfTotal',\n fallback: '% of Total',\n },\n trend: { key: 'shoppingDashboard.fullView.categories.columns.trend', fallback: 'Trend' },\n },\n allCategoriesTitle: {\n key: 'shoppingDashboard.fullView.categories.allCategoriesTitle',\n fallback: 'All Categories',\n },\n noCategoryData: {\n key: 'shoppingDashboard.fullView.categories.noCategoryData',\n fallback: 'No category data available.',\n },\n },\n },\n dataTable: {\n noDataAvailable: {\n key: 'shoppingDashboard.dataTable.noDataAvailable',\n fallback: 'No data available',\n },\n sortableColumn: {\n key: 'shoppingDashboard.dataTable.sortableColumn',\n fallback: ', sortable column',\n },\n },\n pagination: {\n previousPage: {\n key: 'shoppingDashboard.pagination.previousPage',\n fallback: 'Previous page',\n },\n nextPage: {\n key: 'shoppingDashboard.pagination.nextPage',\n fallback: 'Next page',\n },\n goToPage: {\n key: 'shoppingDashboard.pagination.goToPage',\n fallback: 'Go to page',\n },\n of: {\n key: 'shoppingDashboard.pagination.of',\n fallback: 'of',\n },\n },\n defaults: {\n zeroTrend: {\n key: 'shoppingDashboard.defaults.zeroTrend',\n fallback: '+0%',\n },\n noValue: {\n key: 'shoppingDashboard.defaults.noValue',\n fallback: '--',\n },\n },\n} as const;\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\n/**\n * Get translation text from a translation key entry.\n * Returns the fallback string (future: integrate with i18n provider).\n */\nexport function getTranslation(entry: TranslationEntry): string {\n return entry.fallback;\n}\n","import React from 'react';\nimport { getTrendIcon } from '../utils/trendUtils';\nimport {\n StatsCardContainer,\n StatsTitle,\n StatsValueContainer,\n StatsValue,\n StatsSubtitle,\n TrendContainer,\n TrendIcon,\n TrendText,\n StatsCardHeader,\n} from './StatsCard.styled';\nimport { StatsCardSkeleton } from './LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface StatsCardProps {\n readonly title: string;\n readonly value: string;\n readonly subtitle?: string;\n readonly trendDirection?: 'up' | 'down' | 'neutral';\n readonly trendValue?: string;\n readonly testId?: string;\n readonly isLoading?: boolean;\n}\n\nconst StatsCardComponent: React.FC<StatsCardProps> = ({\n title,\n value,\n subtitle,\n trendDirection = 'neutral',\n trendValue,\n testId,\n isLoading = false,\n}) => {\n if (isLoading) {\n return (\n <StatsCardContainer data-testid={testId}>\n <StatsCardSkeleton />\n </StatsCardContainer>\n );\n }\n\n const getTrendAriaLabel = () => {\n let directionText = getTranslation(Keys.stats.trend.unchanged);\n if (trendDirection === 'up') directionText = getTranslation(Keys.stats.trend.increased);\n else if (trendDirection === 'down') directionText = getTranslation(Keys.stats.trend.decreased);\n\n return `${title} ${directionText} ${trendValue ?? ''}`;\n };\n\n return (\n <StatsCardContainer as=\"article\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <StatsCardHeader>\n <StatsTitle id={`stats-title-${testId}`}>{title}</StatsTitle>\n\n {trendValue && (\n <TrendContainer\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n <TrendIcon aria-hidden=\"true\">{getTrendIcon(trendDirection)}</TrendIcon>\n <TrendText>{trendValue}</TrendText>\n </TrendContainer>\n )}\n </StatsCardHeader>\n\n <StatsValueContainer>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {subtitle && (\n <StatsSubtitle\n aria-label={`${title} ${getTranslation(Keys.stats.details)}: ${subtitle}`}\n data-testid={`stats-subtitle-${testId}`}\n >\n {subtitle}\n </StatsSubtitle>\n )}\n </StatsValueContainer>\n </StatsCardContainer>\n );\n};\n\nexport const StatsCard = React.memo(StatsCardComponent);\nStatsCard.displayName = 'StatsCard';\n","/**\n * Trend Utilities\n *\n * Shared utilities for rendering trend indicators across dashboard widgets.\n * Centralizes trend icon logic to eliminate duplication.\n */\n\nimport React from 'react';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport type { TrendDirection } from '../shared/types';\n\n/**\n * Get trend icon component based on direction\n */\nexport function getTrendIcon(direction: TrendDirection): React.ReactNode {\n switch (direction) {\n case 'up':\n return <TrendingUpIcon />;\n case 'down':\n return <TrendingDownIcon />;\n case 'neutral':\n default:\n return <RemoveIcon />;\n }\n}\n\n/**\n * Get trend color based on direction\n */\nexport function getTrendColor(direction: TrendDirection): string {\n switch (direction) {\n case 'up':\n return '#4caf50';\n case 'down':\n return '#f44336';\n case 'neutral':\n default:\n return '#757575';\n }\n}\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const StatsCardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 8px;\n min-height: 120px;\n transition: box-shadow 0.2s ease;\n\n &:hover {\n box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n }\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 140px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n min-height: 160px;\n }\n`;\n\nexport const StatsTitle = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n margin-bottom: 4px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 13px;\n margin-bottom: 6px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`;\n\nexport const StatsValueContainer = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n margin-top: 8px;\n`;\n\nexport const StatsValue = styled('div')`\n font-size: 24px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 28px;\n }\n\n @media (min-width: 1080px) {\n font-size: 32px;\n }\n`;\n\nexport const StatsSubtitle = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: normal;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n padding-bottom: 2px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const TrendContainer = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n line-height: 1;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-top: 12px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`;\n\nexport const TrendIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const TrendText = styled('span')`\n white-space: nowrap;\n`;\n\nexport const StatsCardHeader = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n","import React from 'react';\nimport Skeleton from '@mui/material/Skeleton';\nimport {\n SkeletonCard,\n SkeletonHeader,\n SkeletonRow,\n StatsCardWrapper,\n StatsCardHeaderRow,\n StatsCardBody,\n StatsCardSubtitle,\n ProductRowInfo,\n ProductRowMetrics,\n ChartMetricRow,\n ChartMetricTrend,\n ChartAreaSkeleton,\n PieChartLayout,\n PieCircleSkeleton,\n LegendList,\n LegendRowWrapper,\n LegendRowInfo,\n DashboardLayout,\n DashboardHeaderRow,\n DashboardFilterGroup,\n StatsGrid,\n WidgetGrid,\n FullViewLayout,\n FullViewMetricCard,\n FullViewMetricCenter,\n FullViewChartArea,\n FullViewTableCard,\n FullViewTableRow,\n SummaryCardsGrid,\n} from './LoadingSkeletons.styled';\n\n/**\n * Shared loading skeleton components for the Shopping Dashboard.\n *\n * Each skeleton mirrors the real widget layout so the page does not\n * shift when data arrives.\n */\n\n/* ------------------------------------------------------------------ */\n/* StatsCard Skeleton */\n/* ------------------------------------------------------------------ */\n\nexport const StatsCardSkeleton: React.FC = () => (\n <StatsCardWrapper data-testid=\"skeleton-stats-card\">\n <StatsCardHeaderRow>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={16} />\n </StatsCardHeaderRow>\n <StatsCardBody>\n <Skeleton variant=\"text\" width={120} height={36} />\n <StatsCardSubtitle variant=\"text\" width={100} height={16} />\n </StatsCardBody>\n </StatsCardWrapper>\n);\n\n/* ------------------------------------------------------------------ */\n/* TopSellingProductsList Skeleton */\n/* ------------------------------------------------------------------ */\n\nconst ProductRowSkeleton: React.FC = () => (\n <SkeletonRow>\n <Skeleton variant=\"rounded\" width={28} height={28} />\n <Skeleton variant=\"rounded\" width={50} height={50} />\n <ProductRowInfo>\n <Skeleton variant=\"text\" width=\"70%\" height={18} />\n <Skeleton variant=\"text\" width=\"50%\" height={14} />\n </ProductRowInfo>\n <ProductRowMetrics>\n <Skeleton variant=\"text\" width={80} height={18} />\n <Skeleton variant=\"text\" width={48} height={14} />\n </ProductRowMetrics>\n </SkeletonRow>\n);\n\nexport const ProductsListSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-products-list\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={160} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n {['product-1', 'product-2', 'product-3', 'product-4', 'product-5'].map((rowKey) => (\n <ProductRowSkeleton key={rowKey} />\n ))}\n </SkeletonCard>\n);\n\n/* ------------------------------------------------------------------ */\n/* Chart Widget Skeleton (Signups / ConversionRate) */\n/* ------------------------------------------------------------------ */\n\nexport const ChartWidgetSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-chart-widget\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={110} height={32} />\n </SkeletonHeader>\n <ChartMetricRow>\n <Skeleton variant=\"text\" width={100} height={36} />\n <ChartMetricTrend>\n <Skeleton variant=\"text\" width={60} height={18} />\n <Skeleton variant=\"text\" width={140} height={14} />\n </ChartMetricTrend>\n </ChartMetricRow>\n <ChartAreaSkeleton variant=\"rounded\" width=\"100%\" />\n </SkeletonCard>\n);\n\n/* ------------------------------------------------------------------ */\n/* TopCategoriesPieChart Skeleton */\n/* ------------------------------------------------------------------ */\n\nconst LegendRowSkeleton: React.FC = () => (\n <LegendRowWrapper>\n <Skeleton variant=\"circular\" width={12} height={12} />\n <LegendRowInfo>\n <Skeleton variant=\"text\" width=\"60%\" height={16} />\n <Skeleton variant=\"text\" width=\"40%\" height={14} />\n </LegendRowInfo>\n <Skeleton variant=\"text\" width={36} height={18} />\n </LegendRowWrapper>\n);\n\nexport const CategoriesPieChartSkeleton: React.FC = () => (\n <SkeletonCard data-testid=\"skeleton-categories-pie\">\n <SkeletonHeader>\n <Skeleton variant=\"text\" width={140} height={22} />\n <Skeleton variant=\"rounded\" width={100} height={32} />\n </SkeletonHeader>\n <PieChartLayout>\n <PieCircleSkeleton variant=\"circular\" />\n <LegendList>\n {['legend-1', 'legend-2', 'legend-3', 'legend-4', 'legend-5'].map((rowKey) => (\n <LegendRowSkeleton key={rowKey} />\n ))}\n </LegendList>\n </PieChartLayout>\n </SkeletonCard>\n);\n\n/* ------------------------------------------------------------------ */\n/* Full Dashboard Skeleton */\n/* ------------------------------------------------------------------ */\n\nexport const DashboardSkeleton: React.FC = () => (\n <DashboardLayout data-testid=\"skeleton-dashboard\">\n <DashboardHeaderRow>\n <Skeleton variant=\"text\" width={200} height={32} />\n <DashboardFilterGroup>\n <Skeleton variant=\"rounded\" width={140} height={36} />\n <Skeleton variant=\"rounded\" width={140} height={36} />\n </DashboardFilterGroup>\n </DashboardHeaderRow>\n\n <StatsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </StatsGrid>\n\n <WidgetGrid>\n <ProductsListSkeleton />\n <ChartWidgetSkeleton />\n </WidgetGrid>\n\n <WidgetGrid>\n <ChartWidgetSkeleton />\n <CategoriesPieChartSkeleton />\n </WidgetGrid>\n </DashboardLayout>\n);\n\n/* ------------------------------------------------------------------ */\n/* Full View Skeletons */\n/* ------------------------------------------------------------------ */\n\nexport const FullViewChartSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-chart\">\n <FullViewMetricCard>\n <FullViewMetricCenter>\n <Skeleton variant=\"text\" width={140} height={52} />\n <Skeleton variant=\"text\" width={80} height={24} />\n <Skeleton variant=\"text\" width={160} height={16} />\n </FullViewMetricCenter>\n <FullViewChartArea variant=\"rounded\" width=\"100%\" />\n </FullViewMetricCard>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n {['table-row-1', 'table-row-2', 'table-row-3', 'table-row-4', 'table-row-5'].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n\nexport const FullViewTableSkeleton: React.FC = () => (\n <FullViewLayout data-testid=\"skeleton-fullview-table\">\n <SummaryCardsGrid>\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n <StatsCardSkeleton />\n </SummaryCardsGrid>\n\n <FullViewTableCard>\n <Skeleton variant=\"text\" width={200} height={24} />\n <FullViewTableRow variant=\"rounded\" width=\"100%\" height={40} />\n {[\n 'summary-row-1',\n 'summary-row-2',\n 'summary-row-3',\n 'summary-row-4',\n 'summary-row-5',\n 'summary-row-6',\n 'summary-row-7',\n 'summary-row-8',\n ].map((rowKey) => (\n <FullViewTableRow key={rowKey} variant=\"rounded\" width=\"100%\" height={44} />\n ))}\n </FullViewTableCard>\n </FullViewLayout>\n);\n","import { styled } from '@nuskin/foundation-theme';\nimport Skeleton from '@mui/material/Skeleton';\n\n/* ------------------------------------------------------------------ */\n/* Shared Layout Helpers */\n/* ------------------------------------------------------------------ */\n\nexport const SkeletonCard = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const SkeletonHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const SkeletonRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n padding: 14px 0;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* StatsCard Skeleton */\n/* ------------------------------------------------------------------ */\n\nexport const StatsCardWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 8px;\n min-height: 120px;\n\n @media (min-width: 600px) {\n padding: 20px;\n min-height: 140px;\n }\n @media (min-width: 900px) {\n padding: 24px;\n min-height: 160px;\n }\n`;\n\nexport const StatsCardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const StatsCardBody = styled('div')`\n margin-top: 8px;\n`;\n\nexport const StatsCardSubtitle = styled(Skeleton)`\n margin-top: 4px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Product Row */\n/* ------------------------------------------------------------------ */\n\nexport const ProductRowInfo = styled('div')`\n flex: 1;\n min-width: 0;\n`;\n\nexport const ProductRowMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Chart Widget */\n/* ------------------------------------------------------------------ */\n\nexport const ChartMetricRow = styled('div')`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`;\n\nexport const ChartMetricTrend = styled('div')`\n padding-top: 4px;\n`;\n\nexport const ChartAreaSkeleton = styled(Skeleton)`\n border-radius: 8px;\n height: 220px;\n\n @media (min-width: 600px) {\n height: 280px;\n }\n @media (min-width: 900px) {\n height: 340px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Categories Pie Chart */\n/* ------------------------------------------------------------------ */\n\nexport const PieChartLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n gap: 24px;\n }\n`;\n\nexport const PieCircleSkeleton = styled(Skeleton)`\n width: 100%;\n height: 200px;\n border-radius: 8px;\n flex-shrink: 0;\n\n @media (min-width: 600px) {\n width: 200px;\n border-radius: 50%;\n }\n`;\n\nexport const LegendList = styled('div')`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const LegendRowWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`;\n\nexport const LegendRowInfo = styled('div')`\n flex: 1;\n`;\n\n/* ------------------------------------------------------------------ */\n/* Full Dashboard Skeleton */\n/* ------------------------------------------------------------------ */\n\nexport const DashboardLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n @media (min-width: 600px) {\n gap: 32px;\n }\n @media (min-width: 900px) {\n gap: 40px;\n }\n`;\n\nexport const DashboardHeaderRow = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`;\n\nexport const DashboardFilterGroup = styled('div')`\n display: flex;\n gap: 16px;\n`;\n\nexport const StatsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n gap: 20px;\n }\n @media (min-width: 900px) {\n gap: 24px;\n }\n`;\n\nexport const WidgetGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 900px) {\n grid-template-columns: repeat(2, 1fr);\n gap: 24px;\n }\n`;\n\n/* ------------------------------------------------------------------ */\n/* Full View Skeletons */\n/* ------------------------------------------------------------------ */\n\nexport const FullViewLayout = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCard = styled('div')`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`;\n\nexport const FullViewMetricCenter = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`;\n\nexport const FullViewChartArea = styled(Skeleton)`\n border-radius: 8px;\n height: 260px;\n\n @media (min-width: 600px) {\n height: 320px;\n }\n @media (min-width: 900px) {\n height: 400px;\n }\n`;\n\nexport const FullViewTableCard = styled('div')`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nexport const FullViewTableRow = styled(Skeleton)`\n border-radius: 4px;\n`;\n\nexport const SummaryCardsGrid = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n\n @media (min-width: 600px) {\n grid-template-columns: repeat(3, 1fr);\n }\n`;\n","import React from 'react';\nimport ShoppingCartIcon from '@mui/icons-material/ShoppingCart';\nimport { getTrendIcon } from '../../utils/trendUtils';\nimport {\n ProductsListContainer,\n WidgetHeader,\n WidgetTitle,\n SortDropdown,\n HeaderActionsContainer,\n ProductsList,\n ProductItem,\n ProductRank,\n ProductImage,\n ProductImagePlaceholder,\n ProductInfo,\n ProductName,\n ProductSubtitle,\n ProductMetrics,\n ProductValue,\n ProductTrend,\n EmptyState,\n EmptyStateText,\n} from './TopSellingProductsList.styled';\nimport { WidgetMenu } from '../WidgetMenu';\nimport type { TopProduct, ProductSortOption } from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { ProductsListSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface TopSellingProductsListProps {\n readonly products: TopProduct[];\n readonly productSort: ProductSortOption;\n readonly isLoading?: boolean;\n readonly maxProducts?: number;\n readonly onSortChange?: (sort: ProductSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst TopSellingProductsListComponent: React.FC<TopSellingProductsListProps> = ({\n products,\n productSort,\n isLoading = false,\n maxProducts = 5,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as ProductSortOption;\n onSortChange?.(newSort);\n };\n\n const formatValue = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'revenue':\n return `$${product.revenue.toLocaleString()}`;\n case 'volume':\n return `${product.volume.toLocaleString()} ${getTranslation(Keys.widget.topProducts.dcSvSuffix)}`;\n default:\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n }\n };\n\n const getSubtitle = (product: TopProduct, sortBy: ProductSortOption) => {\n switch (sortBy) {\n case 'units':\n return `$${product.revenue.toLocaleString()} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n case 'revenue':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'volume':\n return `$${product.revenue.toLocaleString()} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n default:\n return `$${product.revenue.toLocaleString()} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n }\n };\n\n const getTrendValue = (product: TopProduct, sortBy: ProductSortOption) => {\n const trend = product.trend;\n if (!trend) return '';\n switch (sortBy) {\n case 'units':\n return trend.units ?? '';\n case 'revenue':\n return trend.revenue ?? '';\n case 'volume':\n return trend.volume ?? '';\n default:\n return trend.units ?? '';\n }\n };\n\n const getTrendDirection = (product: TopProduct, sortBy: ProductSortOption): TrendDirection => {\n const trendValue = getTrendValue(product, sortBy);\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n const displayedProducts = products.slice(0, maxProducts);\n const rankLabel = getTranslation(Keys.widget.topProducts.rank);\n const trendLabel = getTranslation(Keys.widget.topProducts.trend);\n\n const getTrendDirectionLabel = (direction: TrendDirection): string => {\n if (direction === 'up') return getTranslation(Keys.stats.trend.increased);\n if (direction === 'down') return getTranslation(Keys.stats.trend.decreased);\n return getTranslation(Keys.stats.trend.unchanged);\n };\n\n if (isLoading && products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <ProductsListSkeleton />\n </ProductsListContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <ProductsListContainer data-testid=\"widget-top-products\">\n <WidgetHeader>\n <WidgetTitle>{getTranslation(Keys.widget.topProducts.title)}</WidgetTitle>\n </WidgetHeader>\n <EmptyState data-testid=\"products-empty-state\">\n <ShoppingCartIcon />\n <EmptyStateText>{getTranslation(Keys.widget.topProducts.empty)}</EmptyStateText>\n </EmptyState>\n </ProductsListContainer>\n );\n }\n\n return (\n <ProductsListContainer\n as=\"section\"\n data-testid=\"widget-top-products\"\n aria-label={getTranslation(Keys.widget.topProducts.ariaLabel)}\n >\n <WidgetHeader>\n <WidgetTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topProducts.titleAriaLabel)}\n data-testid=\"widget-title-top-products\"\n >\n {getTranslation(Keys.widget.topProducts.title)}\n </WidgetTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"product-sort\"\n data-testid=\"product-sort-dropdown\"\n value={productSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topProducts.sortAriaLabel)}\n >\n <option value=\"units\">{getTranslation(Keys.filter.productSort.byUnits)}</option>\n <option value=\"revenue\">{getTranslation(Keys.filter.productSort.byRevenue)}</option>\n <option value=\"volume\">{getTranslation(Keys.filter.productSort.byVolume)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-products\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </WidgetHeader>\n\n <ProductsList as=\"ul\" data-testid=\"products-list\">\n {displayedProducts.map((product, index) => {\n const trendDirection = getTrendDirection(product, productSort);\n const trendValue = getTrendValue(product, productSort);\n\n return (\n <ProductItem\n as=\"li\"\n key={product.id}\n data-testid={`product-item-${index}`}\n aria-label={`${rankLabel} ${product.rank}: ${product.name}, ${formatValue(product, productSort)}`}\n >\n <ProductRank aria-label={`${rankLabel} ${product.rank}`}>{product.rank}</ProductRank>\n\n {product.imageUrl ? (\n <ProductImage\n src={product.imageUrl}\n alt={product.name}\n loading=\"lazy\"\n onError={(e) => {\n e.currentTarget.hidden = true;\n }}\n />\n ) : (\n <ProductImagePlaceholder\n aria-label={getTranslation(Keys.widget.topProducts.noImageAriaLabel)}\n >\n {product.name.substring(0, 2).toUpperCase()}\n </ProductImagePlaceholder>\n )}\n\n <ProductInfo>\n <ProductName title={product.name}>{product.name}</ProductName>\n <ProductSubtitle>{getSubtitle(product, productSort)}</ProductSubtitle>\n </ProductInfo>\n\n <ProductMetrics>\n <ProductValue>{formatValue(product, productSort)}</ProductValue>\n {trendValue && (\n <ProductTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={`${trendLabel}: ${getTrendDirectionLabel(trendDirection)} ${trendValue}`}\n >\n <span aria-hidden=\"true\">{getTrendIcon(trendDirection)}</span>\n <span>{trendValue}</span>\n </ProductTrend>\n )}\n </ProductMetrics>\n </ProductItem>\n );\n })}\n </ProductsList>\n </ProductsListContainer>\n );\n};\n\nexport const TopSellingProductsList = React.memo(TopSellingProductsListComponent);\nTopSellingProductsList.displayName = 'TopSellingProductsList';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductsListContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n min-height: 320px;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n\n @media (min-width: 768px) {\n padding: 20px;\n min-height: 400px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const WidgetHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const WidgetTitle = styled('h2')`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ProductsList = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n overflow: hidden;\n list-style: none;\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n gap: 14px;\n }\n`;\n\nexport const ProductItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n cursor: pointer;\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n list-style: none;\n\n &:not(:last-child) {\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n }\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);\n }\n\n @media (min-width: 768px) {\n padding: 14px;\n gap: 14px;\n }\n`;\n\nexport const ProductRank = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 24px;\n height: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n border-radius: 4px;\n font-size: 12px;\n font-weight: 600;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 13px;\n }\n`;\n\nexport const ProductImage = styled('img')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n }\n`;\n\nexport const ProductImagePlaceholder = styled('div')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N40')};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n font-weight: 500;\n\n @media (min-width: 768px) {\n width: 50px;\n height: 50px;\n font-size: 11px;\n }\n`;\n\nexport const ProductInfo = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`;\n\nexport const ProductName = styled('div')`\n font-size: 13px;\n font-weight: 500;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 18ch;\n\n @media (min-width: 768px) {\n font-size: 14px;\n max-width: none;\n }\n`;\n\nexport const ProductSubtitle = styled('div')`\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const ProductMetrics = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`;\n\nexport const ProductValue = styled('div')`\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const ProductTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 500;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#22C55E';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 12px;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({ theme }) => getGenomeColor(theme, 'N50')};\n }\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React, { useState } from 'react';\nimport Menu from '@mui/material/Menu';\nimport MenuItem from '@mui/material/MenuItem';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport ListItemText from '@mui/material/ListItemText';\nimport MoreVertIcon from '@mui/icons-material/MoreVert';\nimport VisibilityIcon from '@mui/icons-material/Visibility';\nimport { StyledIconButton } from './WidgetMenu.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface WidgetMenuProps {\n readonly widgetId?: string;\n readonly onFullView?: () => void;\n}\n\nexport const WidgetMenu: React.FC<WidgetMenuProps> = ({ widgetId, onFullView }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleFullView = () => {\n handleClose();\n if (onFullView) {\n onFullView();\n }\n };\n\n return (\n <>\n <StyledIconButton\n data-testid={`widget-menu-button-${widgetId}`}\n aria-label={getTranslation(Keys.widget.menu.ariaLabel)}\n aria-controls={open ? 'widget-menu' : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleClick}\n size=\"small\"\n >\n <MoreVertIcon fontSize=\"small\" />\n </StyledIconButton>\n <Menu\n id=\"widget-menu\"\n data-testid={`widget-menu-${widgetId}`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': 'widget-options-button',\n }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n >\n <MenuItem onClick={handleFullView} data-testid=\"widget-menu-item-fullview\">\n <ListItemIcon>\n <VisibilityIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.fullView)}</ListItemText>\n </MenuItem>\n </Menu>\n </>\n );\n};\n","import IconButton from '@mui/material/IconButton';\nimport { styled } from '@nuskin/foundation-theme';\n\nexport const StyledIconButton = styled(IconButton)(() => ({\n padding: '4px',\n}));\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport { getTrendIcon } from '../../utils/trendUtils';\nimport {\n ConversionRateContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n FormulaDisplay,\n ChartContainer,\n TooltipContainer,\n TooltipLabel,\n TooltipValue,\n TooltipDetails,\n TitleRow,\n HeaderActionsContainer,\n} from './ConversionRateChart.styled';\nimport type { ConversionDataPoint, ConversionFilterOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateChartProps {\n readonly conversionData: ConversionDataPoint[];\n readonly conversionFilter: ConversionFilterOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst MONTH_MAP: Record<string, string> = {\n Jan: '1',\n Feb: '2',\n Mar: '3',\n Apr: '4',\n May: '5',\n Jun: '6',\n Jul: '7',\n Aug: '8',\n Sep: '9',\n Oct: '10',\n Nov: '11',\n Dec: '12',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 3, fill: '#3B82F6' };\nconst ACTIVE_DOT = { r: 5 };\n\ninterface CustomTooltipProps {\n readonly active?: boolean;\n readonly payload?: Array<{ payload?: unknown }>;\n}\n\nconst rateTickFormatter = (value: number | string): string => `${value}%`;\n\nfunction formatShortDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nconst CustomTooltip: React.FC<CustomTooltipProps> = ({ active, payload }) => {\n if (!active || !payload?.length) return null;\n const data = payload[0].payload as ConversionDataPoint;\n return (\n <TooltipContainer>\n <TooltipLabel>{data.date}</TooltipLabel>\n <TooltipValue>{data.rate.toFixed(2)}%</TooltipValue>\n <TooltipDetails>\n {data.orders} {getTranslation(Keys.widget.conversionRate.tooltipOrders)} /{' '}\n {data.siteVisits.toLocaleString()} {getTranslation(Keys.widget.conversionRate.tooltipVisits)}\n </TooltipDetails>\n </TooltipContainer>\n );\n};\n\nconst ConversionRateChartComponent: React.FC<ConversionRateChartProps> = ({\n conversionData,\n conversionFilter,\n isLoading = false,\n title,\n onFilterChange,\n onTitleClick,\n}) => {\n const handleFilterChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newFilter = event.target.value as ConversionFilterOption;\n onFilterChange?.(newFilter);\n },\n [onFilterChange],\n );\n\n const noDataText = getTranslation(Keys.widget.conversionRate.noData);\n const noChangeText = getTranslation(Keys.widget.conversionRate.noChange);\n\n const currentRate = React.useMemo(() => {\n if (conversionData.length === 0) return 0;\n return conversionData[conversionData.length - 1].rate;\n }, [conversionData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (conversionData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestRate = conversionData[conversionData.length - 1].rate;\n const previousRate = conversionData[0].rate;\n const change = latestRate - previousRate;\n const percentageChange = (change / previousRate) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change.toFixed(2)}%`;\n return { direction, value: formattedChange };\n }, [conversionData, noChangeText, noDataText]);\n\n const formattedData = React.useMemo(\n () => conversionData.map((item) => ({ ...item, shortDate: formatShortDate(item.date) })),\n [conversionData],\n );\n\n const getTrendDirectionLabel = (direction: 'up' | 'down' | 'neutral'): string => {\n if (direction === 'up') return getTranslation(Keys.stats.trend.increased);\n if (direction === 'down') return getTranslation(Keys.stats.trend.decreased);\n return getTranslation(Keys.stats.trend.unchanged);\n };\n\n if (isLoading && conversionData.length === 0) {\n return (\n <ConversionRateContainer data-testid=\"widget-conversion-rate\">\n <ChartWidgetSkeleton />\n </ConversionRateContainer>\n );\n }\n\n const chartAriaLabel = getTranslation(Keys.widget.conversionRate.chartAriaLabel);\n\n return (\n <ConversionRateContainer as=\"section\" data-testid=\"widget-conversion-rate\" aria-label={chartAriaLabel}>\n <ChartHeader>\n <TitleRow>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.conversionRate.titleAriaLabel)}\n data-testid=\"widget-title-conversion-rate\"\n >\n {title ?? getTranslation(Keys.widget.conversionRate.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"conversion-filter\"\n data-testid=\"conversion-filter-dropdown\"\n value={conversionFilter}\n onChange={handleFilterChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.conversionRate.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.signupView.all)}</option>\n <option value=\"members\">{getTranslation(Keys.filter.signupView.members)}</option>\n <option value=\"retail\">{getTranslation(Keys.filter.signupView.retail)}</option>\n <option value=\"brandAffiliates\">\n {getTranslation(Keys.filter.signupView.brandAffiliates)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"conversion-rate\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </TitleRow>\n <FormulaDisplay data-testid=\"conversion-formula\">\n {getTranslation(Keys.widget.conversionRate.formula)}\n </FormulaDisplay>\n </ChartHeader>\n\n <MetricDisplay>\n <MetricValue\n aria-label={`${getTranslation(Keys.widget.conversionRate.title)}: ${currentRate.toFixed(2)}%`}\n data-testid=\"conversion-metric-value\"\n >\n {currentRate.toFixed(2)}%\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n data-testid=\"conversion-metric-trend\"\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.replace('%', '')}</span>\n <span className=\"change-percent\">%</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <ChartContainer data-testid=\"conversion-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis\n tick={AXIS_TICK}\n tickLine={false}\n tickFormatter={rateTickFormatter}\n domain={['dataMin - 0.5', 'dataMax + 0.5']}\n />\n <Tooltip content={CustomTooltip} />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke=\"#3B82F6\"\n strokeWidth={2}\n dot={LINE_DOT}\n activeDot={ACTIVE_DOT}\n />\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n </ConversionRateContainer>\n );\n};\n\nexport const ConversionRateChart = React.memo(ConversionRateChartComponent);\nConversionRateChart.displayName = 'ConversionRateChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ConversionRateContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const TitleRow = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 8px;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-top: 4px;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 20px;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 20px;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n }\n`;\n\nexport const FormulaDisplay = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 16px;\n letter-spacing: 0.12px;\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`;\n\nexport const TooltipContainer = styled('div')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`;\n\nexport const TooltipLabel = styled('div')`\n font-size: 11px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N10')};\n margin-bottom: 4px;\n`;\n\nexport const TooltipValue = styled('div')`\n font-size: 13px;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'A10')};\n`;\n\nexport const TooltipDetails = styled('div')`\n font-size: 10px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n margin-top: 2px;\n`;\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { getTrendIcon } from '../../utils/trendUtils';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n SignupsContainer,\n ChartHeader,\n ChartTitle,\n FilterDropdown,\n MetricDisplay,\n MetricValue,\n MetricTrend,\n ChartContainer,\n Legend,\n LegendItem,\n LegendColor,\n LegendLabel,\n HeaderActionsContainer,\n} from './SignupsChart.styled';\nimport type { SignupDataPoint, SignupViewOption } from '../../types.d';\nimport { ChartWidgetSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface SignupsChartProps {\n readonly signupData: SignupDataPoint[];\n readonly signupView: SignupViewOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onViewChange?: (view: SignupViewOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nconst SERIES_COLORS = {\n total: '#3B82F6',\n members: '#7B92A8',\n retail: '#A3B5C7',\n brandAffiliates: '#CBD6E0',\n};\n\nconst MONTH_MAP: Record<string, string> = {\n Jan: '1',\n Feb: '2',\n Mar: '3',\n Apr: '4',\n May: '5',\n Jun: '6',\n Jul: '7',\n Aug: '8',\n Sep: '9',\n Oct: '10',\n Nov: '11',\n Dec: '12',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 2 };\n\nfunction formatShortDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nconst SignupsChartComponent: React.FC<SignupsChartProps> = ({\n signupData,\n signupView,\n isLoading = false,\n title,\n onViewChange,\n onTitleClick,\n}) => {\n const handleViewChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newView = event.target.value as SignupViewOption;\n onViewChange?.(newView);\n },\n [onViewChange],\n );\n\n const noDataText = getTranslation(Keys.widget.signups.noData);\n const noChangeText = getTranslation(Keys.widget.signups.noChange);\n\n const totalSignups = React.useMemo(() => {\n if (signupData.length === 0) return 0;\n return signupData[signupData.length - 1].total;\n }, [signupData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (signupData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestTotal = signupData[signupData.length - 1].total;\n const previousTotal = signupData[0].total;\n const change = latestTotal - previousTotal;\n const percentageChange = (change / previousTotal) * 100;\n if (Math.abs(percentageChange) < 0.1) return { direction: 'neutral', value: noChangeText };\n const direction = change > 0 ? 'up' : 'down';\n const formattedChange = `${change > 0 ? '+' : ''}${change} (${percentageChange.toFixed(1)}%)`;\n return { direction, value: formattedChange };\n }, [noChangeText, noDataText, signupData]);\n\n const formattedData = React.useMemo(\n () => signupData.map((item) => ({ ...item, shortDate: formatShortDate(item.date) })),\n [signupData],\n );\n const totalLabel = getTranslation(Keys.widget.signups.total);\n const membersLabel = getTranslation(Keys.widget.signups.members);\n const retailLabel = getTranslation(Keys.widget.signups.retail);\n const brandAffiliatesLabel = getTranslation(Keys.widget.signups.brandAffiliates);\n\n const getTrendDirectionLabel = (direction: 'up' | 'down' | 'neutral'): string => {\n if (direction === 'up') return getTranslation(Keys.stats.trend.increased);\n if (direction === 'down') return getTranslation(Keys.stats.trend.decreased);\n return getTranslation(Keys.stats.trend.unchanged);\n };\n\n if (isLoading && signupData.length === 0) {\n return (\n <SignupsContainer data-testid=\"widget-signups\">\n <ChartWidgetSkeleton />\n </SignupsContainer>\n );\n }\n\n return (\n <SignupsContainer\n as=\"section\"\n data-testid=\"widget-signups\"\n aria-label={getTranslation(Keys.widget.signups.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.signups.titleAriaLabel)}\n data-testid=\"widget-title-signups\"\n >\n {title ?? getTranslation(Keys.widget.signups.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <FilterDropdown\n id=\"signup-view\"\n data-testid=\"signup-view-dropdown\"\n value={signupView}\n onChange={handleViewChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.signups.filterAriaLabel)}\n >\n <option value=\"all\">{getTranslation(Keys.filter.signupView.showAll)}</option>\n <option value=\"members\">{getTranslation(Keys.filter.signupView.showMembers)}</option>\n <option value=\"retail\">{getTranslation(Keys.filter.signupView.showRetail)}</option>\n <option value=\"brandAffiliates\">\n {getTranslation(Keys.filter.signupView.showBrandAffiliates)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"signups\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <MetricDisplay data-testid=\"signups-metric-display\">\n <MetricValue\n data-testid=\"signups-metric-value\"\n aria-label={`${totalLabel}: ${totalSignups.toLocaleString()}`}\n >\n {totalSignups.toLocaleString()}\n </MetricValue>\n {trendInfo.value !== noDataText && (\n <MetricTrend\n as=\"output\"\n data-testid=\"signups-metric-trend\"\n direction={trendInfo.direction}\n aria-live=\"polite\"\n aria-label={`${getTrendDirectionLabel(trendInfo.direction)} ${trendInfo.value}`}\n >\n <div className=\"trend-line\">\n <span aria-hidden=\"true\">{getTrendIcon(trendInfo.direction)}</span>\n <span className=\"change-value\">{trendInfo.value.split(' ')[0]}</span>\n <span className=\"change-percent\">{trendInfo.value.split(' ')[1]}</span>\n </div>\n <div className=\"comparison-text\">{getTranslation(Keys.widget.conversionRate.comparison)}</div>\n </MetricTrend>\n )}\n </MetricDisplay>\n\n <ChartContainer data-testid=\"signups-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={200}>\n <LineChart data={formattedData} margin={CHART_MARGIN}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"shortDate\" tick={AXIS_TICK} tickLine={false} interval=\"preserveStartEnd\" />\n <YAxis tick={AXIS_TICK} tickLine={false} />\n <Tooltip />\n {(signupView === 'all' || signupView === 'members') && (\n <Line\n type=\"monotone\"\n dataKey={signupView === 'all' ? 'total' : 'members'}\n stroke={signupView === 'all' ? SERIES_COLORS.total : SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={signupView === 'all' ? totalLabel : membersLabel}\n />\n )}\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n dot={LINE_DOT}\n name={membersLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n </>\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n dot={LINE_DOT}\n name={retailLabel}\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n dot={LINE_DOT}\n name={brandAffiliatesLabel}\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n\n {signupView === 'all' && (\n <Legend data-testid=\"signups-legend\">\n <LegendItem data-testid=\"legend-total\">\n <LegendColor color={SERIES_COLORS.total} />\n <LegendLabel>{totalLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-members\">\n <LegendColor color={SERIES_COLORS.members} />\n <LegendLabel>{membersLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-retail\">\n <LegendColor color={SERIES_COLORS.retail} />\n <LegendLabel>{retailLabel}</LegendLabel>\n </LegendItem>\n <LegendItem data-testid=\"legend-brandAffiliates\">\n <LegendColor color={SERIES_COLORS.brandAffiliates} />\n <LegendLabel>{brandAffiliatesLabel}</LegendLabel>\n </LegendItem>\n </Legend>\n )}\n </SignupsContainer>\n );\n};\n\nexport const SignupsChart = React.memo(SignupsChartComponent);\nSignupsChart.displayName = 'SignupsChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SignupsContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const MetricDisplay = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n margin-bottom: 16px;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1.2;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`;\n\nexport const MetricTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-top: 4px;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#DC2626';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 16px;\n height: 16px;\n }\n .change-value {\n font-weight: 600;\n line-height: 20px;\n }\n .change-percent {\n font-weight: 400;\n line-height: 20px;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n }\n`;\n\nexport const ChartContainer = styled('div')`\n width: 100%;\n height: 220px;\n margin-top: 16px;\n\n @media (min-width: 768px) {\n height: 280px;\n }\n @media (min-width: 1080px) {\n height: 340px;\n }\n\n .recharts-cartesian-grid-horizontal line,\n .recharts-cartesian-grid-vertical line {\n stroke: ${({ theme }) => getGenomeColor(theme, 'N40')};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({ theme }) => getGenomeColor(theme, 'N70')};\n font-size: 10px;\n }\n`;\n\nexport const Legend = styled('div')`\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendLabel = styled('span')`\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendPercentage,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from './TopCategoriesPieChart.styled';\nimport type { CategoryRevenue, CategorySortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface TopCategoriesPieChartProps {\n readonly categories: CategoryRevenue[];\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: CategorySortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nfunction parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nconst tooltipFormatter = (value: number): string => `$${value.toLocaleString()}`;\n\nconst TopCategoriesPieChartComponent: React.FC<TopCategoriesPieChartProps> = ({\n categories,\n categorySort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as CategorySortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedCategories, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedCategories = [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n });\n\n const nextTotalRevenue = nextSortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const weightedRevenueTrend = nextSortedCategories.reduce(\n (accumulator, category) => {\n const trendValue = parseTrendPercent(category.trend?.revenue);\n if (trendValue === null) return accumulator;\n\n return {\n weightedSum: accumulator.weightedSum + trendValue * category.revenue,\n weight: accumulator.weight + category.revenue,\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const averageRevenueTrend =\n weightedRevenueTrend.weight > 0 ? weightedRevenueTrend.weightedSum / weightedRevenueTrend.weight : 0;\n\n let nextTrendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (averageRevenueTrend > 0) nextTrendDirection = 'up';\n else if (averageRevenueTrend < 0) nextTrendDirection = 'down';\n\n const trendSign = averageRevenueTrend > 0 ? '+' : '';\n const nextFormattedTrend = `${trendSign}${averageRevenueTrend.toFixed(1)}%`;\n\n return {\n sortedCategories: nextSortedCategories,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [categories, categorySort]);\n\n if (isLoading && categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-categories\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topCategories.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"categories-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topCategories.empty)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-categories\"\n aria-label={getTranslation(Keys.widget.topCategories.chartAriaLabel)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.widget.topCategories.titleAriaLabel)}\n data-testid=\"widget-title-top-categories\"\n >\n {title ?? getTranslation(Keys.widget.topCategories.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"category-sort\"\n data-testid=\"category-sort-dropdown\"\n value={categorySort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.widget.topCategories.sortAriaLabel)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.categorySort.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.filter.categorySort.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-categories\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"categories-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={tooltipFormatter} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>${totalRevenue.toLocaleString()}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>{formattedTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"categories-legend-container\">\n {sortedCategories.map((category, index) => (\n <LegendItem key={category.id} data-testid={`category-legend-${index}`}>\n <LegendColor color={category.color} />\n <LegendInfo>\n <LegendName>{category.name}</LegendName>\n <LegendValue>${category.revenue.toLocaleString()}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{category.percentage}%</LegendPercentage>\n </LegendItem>\n ))}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopCategoriesPieChart = React.memo(TopCategoriesPieChartComponent);\nTopCategoriesPieChart.displayName = 'TopCategoriesPieChart';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const CategoriesContainer = styled('div')`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 12px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n padding: 20px;\n }\n @media (min-width: 1080px) {\n padding: 24px;\n }\n`;\n\nexport const ChartHeader = styled('div')`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`;\n\nexport const HeaderActionsContainer = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const ChartTitle = styled('h2')`\n font-size: 16px;\n font-weight: 600;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n border: 0;\n background: transparent;\n padding: 0;\n text-align: left;\n\n &:hover {\n text-decoration: underline;\n color: ${({ theme }) => getGenomeColor(theme, 'A80')};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SortDropdown = styled('select')`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const ChartAndLegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n }\n`;\n\nexport const ChartWrapper = styled('div')`\n position: relative;\n width: 100%;\n height: 200px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 200px;\n height: 200px;\n }\n`;\n\nexport const DonutCenterOverlay = styled('div')`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 96px;\n`;\n\nexport const DonutCenterLabel = styled('div')`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const DonutCenterValue = styled('div')`\n margin-top: 2px;\n font-size: 16px;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n`;\n\nexport const DonutCenterTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n margin-top: 2px;\n font-size: 11px;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return getGenomeColor(theme, 'N70');\n }};\n`;\n\nexport const LegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 1;\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const LegendColor = styled('div')<{ color: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ color }) => color};\n flex-shrink: 0;\n`;\n\nexport const LegendInfo = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n min-width: 0;\n`;\n\nexport const LegendName = styled('div')`\n font-size: 13px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const LegendValue = styled('div')`\n font-size: 11px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const LegendPercentage = styled('div')`\n font-size: 14px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const EmptyState = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 40px 20px;\n text-align: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const EmptyStateText = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport {\n DashboardContainer,\n StatsRow,\n WidgetContainer,\n TwoColumnGrid,\n ErrorContainer,\n} from './ShoppingDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { SignupsChart } from './shared/Signups/SignupsChart';\nimport { TopCategoriesPieChart } from './shared/TopCategories/TopCategoriesPieChart';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n} from './types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\n\nexport interface ShoppingDashboardProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n // Filter states\n readonly dateRange?: DateRangeOption;\n readonly market?: MarketOption;\n readonly productSort?: ProductSortOption;\n readonly signupView?: SignupViewOption;\n readonly conversionFilter?: ConversionFilterOption;\n readonly categorySort?: CategorySortOption;\n\n // Filter callbacks\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n\n // Navigation callbacks\n readonly onProductsTitleClick?: () => void;\n readonly onConversionTitleClick?: () => void;\n readonly onSignupsTitleClick?: () => void;\n readonly onCategoriesToTitleClick?: () => void;\n}\n\n/**\n * ShoppingDashboard Main Container Component\n *\n * Orchestrates all dashboard widgets. Pure presentational - receives all data via props.\n * The consuming application is responsible for data fetching and state management.\n */\nexport const ShoppingDashboard: React.FC<ShoppingDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n isLoading = false,\n error,\n shopTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n signupView = 'all',\n conversionFilter = 'all',\n categorySort = 'revenue',\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onSignupsTitleClick,\n onCategoriesToTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n\n // Error state\n if (error) {\n return (\n <DashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </DashboardContainer>\n );\n }\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+')) return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n return (\n <DashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"shopping-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={shopTitle}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n stats={stats}\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <StatsRow as=\"section\" data-testid=\"stats-row\" aria-label={getTranslation(Keys.ariaLabel.statsRow)}>\n <StatsCard\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.volume)}\n value={stats?.metrics?.volume ?? '0'}\n subtitle={getTranslation(Keys.stats.subtitle.dcSv)}\n trendDirection={getTrendDirection(stats?.trend?.volume)}\n trendValue={stats?.trend?.volume}\n testId=\"stats-card-volume\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.visits)}\n value={stats?.metrics?.siteVisits ?? '0'}\n subtitle={`${stats?.metrics?.conversionRate ?? '0%'} ${getTranslation(Keys.stats.subtitle.conversionRate)}`}\n trendDirection={getTrendDirection(stats?.trend?.siteVisits)}\n trendValue={stats?.trend?.siteVisits}\n testId=\"stats-card-visits\"\n isLoading={isLoading}\n />\n </StatsRow>\n\n <WidgetContainer data-testid=\"widget-container\">\n <TwoColumnGrid data-testid=\"widget-row-1\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <SignupsChart\n signupData={resolvedSignupData}\n signupView={signupView}\n isLoading={isLoading}\n onViewChange={onSignupViewChange}\n onTitleClick={onSignupsTitleClick}\n />\n </TwoColumnGrid>\n\n <TwoColumnGrid data-testid=\"widget-row-2\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <TopCategoriesPieChart\n categories={resolvedCategories}\n categorySort={categorySort}\n isLoading={isLoading}\n onSortChange={onCategorySortChange}\n onTitleClick={onCategoriesToTitleClick}\n />\n </TwoColumnGrid>\n </WidgetContainer>\n </DashboardContainer>\n );\n};\n\nexport default ShoppingDashboard;\n","import React from 'react';\nimport { ShoppingDashboard } from './ShoppingDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { SignupsFullView } from './shared/Signups/SignupsFullView';\nimport { CategoriesFullView } from './shared/TopCategories/CategoriesFullView';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n ProductSortOption,\n SignupViewOption,\n ConversionFilterOption,\n CategorySortOption,\n FullViewWidgetType,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nexport type MysiteDashboardView = 'dashboard' | FullViewWidgetType;\n\nexport interface MysiteDashboardHistoryLocation {\n readonly pathname?: string;\n readonly search?: string;\n readonly hash?: string;\n readonly state?: unknown;\n}\n\nexport interface MysiteDashboardHistoryAdapter {\n readonly location?: MysiteDashboardHistoryLocation;\n push(location: MysiteDashboardHistoryLocation): void;\n replace(location: MysiteDashboardHistoryLocation): void;\n goBack(): void;\n listen(listener: (location: MysiteDashboardHistoryLocation, action: string) => void): () => void;\n}\n\nexport interface MysiteDashboardWithNavigationProps {\n readonly stats?: DashboardStats | null;\n readonly topProducts?: TopProduct[];\n readonly conversionData?: ConversionDataPoint[];\n readonly signupData?: SignupDataPoint[];\n readonly categories?: CategoryRevenue[];\n readonly orders?: OrderHistory[];\n readonly signups?: SignupDetail[];\n readonly isLoading?: boolean;\n readonly error?: string | null;\n readonly shopTitle?: string;\n readonly className?: string;\n\n readonly initialDateRange?: DateRangeOption;\n readonly initialMarket?: MarketOption;\n readonly initialProductSort?: ProductSortOption;\n readonly initialSignupView?: SignupViewOption;\n readonly initialConversionFilter?: ConversionFilterOption;\n readonly initialCategorySort?: CategorySortOption;\n\n readonly historyAdapter?: MysiteDashboardHistoryAdapter;\n readonly historyStateKey?: string;\n readonly resetToDashboardOnMount?: boolean;\n\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n readonly onViewChange?: (view: MysiteDashboardView) => void;\n}\n\nconst DEFAULT_HISTORY_STATE_KEY = 'shoppingDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_SIGNUP_DATA: SignupDataPoint[] = [];\nconst EMPTY_CATEGORIES: CategoryRevenue[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\nconst EMPTY_SIGNUPS: SignupDetail[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isMysiteDashboardView(value: unknown): value is MysiteDashboardView {\n return (\n value === 'dashboard' ||\n value === 'products' ||\n value === 'conversion-rate' ||\n value === 'signups' ||\n value === 'categories'\n );\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): MysiteDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isMysiteDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(state: unknown, stateKey: string, view: MysiteDashboardView): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: MysiteDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): MysiteDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\nexport const MysiteDashboardWithNavigation: React.FC<MysiteDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n signupData,\n categories,\n orders,\n signups,\n isLoading = false,\n error,\n shopTitle,\n className,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialSignupView = 'all',\n initialConversionFilter = 'all',\n initialCategorySort = 'revenue',\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onViewChange,\n}) => {\n const [currentView, setCurrentView] = React.useState<MysiteDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [signupView, setSignupView] = React.useState<SignupViewOption>(initialSignupView);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [categorySort, setCategorySort] = React.useState<CategorySortOption>(initialCategorySort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedSignupData = signupData ?? EMPTY_SIGNUP_DATA;\n const resolvedCategories = categories ?? EMPTY_CATEGORIES;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedSignups = signups ?? EMPTY_SIGNUPS;\n\n const updateView = React.useCallback(\n (view: MysiteDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): MysiteDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: MysiteDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: FullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleSignupViewChange = React.useCallback(\n (nextSignupView: SignupViewOption) => {\n setSignupView(nextSignupView);\n onSignupViewChange?.(nextSignupView);\n },\n [onSignupViewChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleCategorySortChange = React.useCallback(\n (nextSort: CategorySortOption) => {\n setCategorySort(nextSort);\n onCategorySortChange?.(nextSort);\n },\n [onCategorySortChange],\n );\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleSignupsTitleClick = React.useCallback(() => {\n handleOpenFullView('signups');\n }, [handleOpenFullView]);\n\n const handleCategoriesTitleClick = React.useCallback(() => {\n handleOpenFullView('categories');\n }, [handleOpenFullView]);\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedTopProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={resolvedConversionData}\n orders={resolvedOrders}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'signups') {\n return (\n <SignupsFullView\n signupData={resolvedSignupData}\n signups={resolvedSignups}\n dateRange={dateRange}\n market={market}\n signupView={signupView}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onSignupViewChange={handleSignupViewChange}\n />\n );\n }\n\n if (currentView === 'categories') {\n return (\n <CategoriesFullView\n categories={resolvedCategories}\n dateRange={dateRange}\n market={market}\n categorySort={categorySort}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onCategorySortChange={handleCategorySortChange}\n />\n );\n }\n\n return (\n <ShoppingDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n signupData={resolvedSignupData}\n categories={resolvedCategories}\n isLoading={isLoading}\n error={error}\n shopTitle={shopTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n signupView={signupView}\n conversionFilter={conversionFilter}\n categorySort={categorySort}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onSignupViewChange={handleSignupViewChange}\n onConversionFilterChange={handleConversionFilterChange}\n onCategorySortChange={handleCategorySortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onSignupsTitleClick={handleSignupsTitleClick}\n onCategoriesToTitleClick={handleCategoriesTitleClick}\n />\n );\n};\n\nexport default MysiteDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PageHeader, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { paginateItems, calculateTotalPages } from '../../utils/dataUtils';\nimport { formatDateRangeLabel } from '../../utils/dateFormat';\nimport type { TopProduct, DateRangeOption, MarketOption, ProductSortOption } from '../../types.d';\nimport { FullViewTableSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, EmptyStateText } from '../FullViewComponents.styled';\nimport {\n ProductImageCell,\n ProductImage,\n ProductInfo,\n ProductName,\n ProductSku,\n MetricValue,\n MobileCardsContainer,\n DesktopTableContainer,\n MobileProductCard,\n MobileCardHeader,\n MobileProductRank,\n MobileProductImage,\n MobileProductDetails,\n MobileProductName,\n MobileProductSku,\n MobileMetricsGrid,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n} from './ProductsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\n// Product table interface\ninterface ProductRow {\n rank: number;\n name: string;\n sku: string;\n image: string;\n units: number;\n revenue: number;\n volume: number;\n}\n\nexport interface ProductsFullViewProps {\n readonly products: TopProduct[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly productSort: ProductSortOption;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onProductSortChange?: (sort: ProductSortOption) => void;\n}\n\nfunction mapProductToRow(product: TopProduct): ProductRow {\n return {\n rank: product.rank,\n name: product.name,\n sku: `${getTranslation(Keys.fullView.products.skuPrefix)}-${product.id.replace('prod-', '').padStart(3, '0')}`,\n image: product.imageUrl,\n units: product.unitsSold,\n revenue: product.revenue,\n volume: product.volume,\n };\n}\n\nexport const ProductsFullView: React.FC<ProductsFullViewProps> = ({\n products,\n dateRange,\n market,\n productSort,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const [sortColumn, setSortColumn] = useState<string>(productSort === 'revenue' ? 'revenue' : 'units');\n const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('desc');\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n {\n key: 'dateRange',\n label: getTranslation(Keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(Keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(Keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(Keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(Keys.filter.dateRange.thisMonth) },\n ],\n },\n {\n key: 'market',\n label: getTranslation(Keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: [\n { value: 'all', label: getTranslation(Keys.filter.market.all) },\n { value: 'us', label: getTranslation(Keys.filter.market.us) },\n { value: 'ca', label: getTranslation(Keys.filter.market.ca) },\n { value: 'jp', label: getTranslation(Keys.filter.market.jp) },\n { value: 'kr', label: getTranslation(Keys.filter.market.kr) },\n { value: 'au', label: getTranslation(Keys.filter.market.au) },\n { value: 'nz', label: getTranslation(Keys.filter.market.nz) },\n ],\n },\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: productSort,\n options: [\n { value: 'units', label: getTranslation(Keys.filter.productSort.units) },\n { value: 'revenue', label: getTranslation(Keys.filter.productSort.revenue) },\n { value: 'volume', label: getTranslation(Keys.filter.productSort.volume) },\n ],\n },\n ],\n [dateRange, market, productSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value as MarketOption);\n else if (key === 'sort') {\n onProductSortChange?.(value as ProductSortOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onProductSortChange],\n );\n\n const handleSort = React.useCallback((columnKey: string, direction: 'asc' | 'desc') => {\n setSortColumn(columnKey);\n setSortDirection(direction);\n setCurrentPage(1);\n }, []);\n\n const productRows = React.useMemo(() => products.map(mapProductToRow), [products]);\n\n // Sort\n const sortedRows = React.useMemo(\n () =>\n [...productRows].sort((a, b) => {\n const aVal = a[sortColumn as keyof ProductRow] as number;\n const bVal = b[sortColumn as keyof ProductRow] as number;\n return sortDirection === 'asc' ? aVal - bVal : bVal - aVal;\n }),\n [productRows, sortColumn, sortDirection],\n );\n\n const totalPages = React.useMemo(() => calculateTotalPages(sortedRows, itemsPerPage), [itemsPerPage, sortedRows]);\n const paginatedRows = React.useMemo(\n () => paginateItems(sortedRows, currentPage, itemsPerPage),\n [currentPage, itemsPerPage, sortedRows],\n );\n\n const columns: ColumnDef<ProductRow>[] = React.useMemo(\n () => [\n { key: 'rank', label: getTranslation(Keys.fullView.products.columns.rank), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.products.columns.product),\n sortable: true,\n render: (_: unknown, row: ProductRow) => (\n <ProductImageCell>\n {row.image && <ProductImage src={row.image} alt={row.name} />}\n <ProductInfo>\n <ProductName>{row.name}</ProductName>\n <ProductSku>{row.sku}</ProductSku>\n </ProductInfo>\n </ProductImageCell>\n ),\n },\n {\n key: 'units',\n label: getTranslation(Keys.fullView.products.columns.unitsSold),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.products.columns.revenue),\n sortable: true,\n render: (value: unknown) => <MetricValue>${Number(value).toLocaleString()}</MetricValue>,\n },\n {\n key: 'volume',\n label: getTranslation(Keys.fullView.products.columns.volume),\n sortable: true,\n render: (value: unknown) => <MetricValue>{Number(value).toLocaleString()}</MetricValue>,\n },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewTableSkeleton />\n </PageContainer>\n );\n }\n\n if (products.length === 0) {\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"products-fullview-empty\">\n {getTranslation(Keys.fullView.products.noProducts)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"products-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topProducts.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"products-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedRows}\n sortable\n onSort={handleSort}\n sortColumn={sortColumn}\n sortDirection={sortDirection}\n getRowKey={(row: ProductRow) => row.rank}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCardsContainer data-testid=\"products-fullview-mobile-cards\">\n {paginatedRows.map((row) => (\n <MobileProductCard key={row.rank}>\n <MobileCardHeader>\n <MobileProductRank>#{row.rank}</MobileProductRank>\n {row.image && <MobileProductImage src={row.image} alt={row.name} />}\n <MobileProductDetails>\n <MobileProductName>{row.name}</MobileProductName>\n <MobileProductSku>{row.sku}</MobileProductSku>\n </MobileProductDetails>\n </MobileCardHeader>\n <MobileMetricsGrid>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.units)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.units.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.widget.topProducts.revenue)}\n </MobileMetricLabel>\n <MobileMetricValue>${row.revenue.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.filter.productSort.volume)}\n </MobileMetricLabel>\n <MobileMetricValue>{row.volume.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n </MobileMetricsGrid>\n </MobileProductCard>\n ))}\n </MobileCardsContainer>\n )}\n\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedRows.length}\n />\n )}\n </PageContainer>\n );\n};\n","import React from 'react';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport CalendarTodayIcon from '@mui/icons-material/CalendarToday';\nimport LanguageIcon from '@mui/icons-material/Language';\nimport {\n PageHeaderWrapper,\n BackButtonWrapper,\n BackButton,\n HeaderContainer,\n LeftSection,\n Title,\n DateRange,\n MobileDateRange,\n FiltersSection,\n FilterWrapper,\n FilterIcon,\n FilterDropdown,\n MobileTitleWrapper,\n MobileTitle,\n} from './PageHeader.styled';\nimport type { FilterConfig } from './types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport type { FilterConfig } from './types';\n\nexport interface PageHeaderProps {\n readonly title: string;\n readonly dateRange: string;\n readonly onBack: () => void;\n readonly filters?: FilterConfig[];\n readonly onFilterChange?: (filterKey: string, value: string) => void;\n}\n\nexport const PageHeader: React.FC<PageHeaderProps> = ({ title, dateRange, onBack, filters, onFilterChange }) => {\n const renderFilterIcon = (iconType?: 'calendar' | 'globe') => {\n if (!iconType) return null;\n return (\n <FilterIcon>\n {iconType === 'calendar' && <CalendarTodayIcon />}\n {iconType === 'globe' && <LanguageIcon />}\n </FilterIcon>\n );\n };\n\n return (\n <PageHeaderWrapper data-testid=\"page-header\">\n <BackButtonWrapper>\n <BackButton\n onClick={onBack}\n aria-label={getTranslation(Keys.navigation.backAriaLabel)}\n data-testid=\"page-back-button\"\n type=\"button\"\n >\n <ArrowBackIcon />\n <span>{getTranslation(Keys.navigation.backToDashboard)}</span>\n </BackButton>\n </BackButtonWrapper>\n\n <MobileTitleWrapper>\n <MobileTitle>{title}</MobileTitle>\n </MobileTitleWrapper>\n\n <HeaderContainer>\n <LeftSection>\n <Title data-testid=\"page-header-title\">{title}</Title>\n <DateRange data-testid=\"page-header-date-range\">{dateRange}</DateRange>\n </LeftSection>\n\n {filters && filters.length > 0 && onFilterChange && (\n <FiltersSection data-testid=\"page-header-filters\">\n {filters.map((filter) => (\n <FilterWrapper key={filter.key}>\n {renderFilterIcon(filter.icon)}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onFilterChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {filter.label && filter.key === 'customerType'\n ? `${filter.label} ${option.label}`\n : option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterWrapper>\n ))}\n </FiltersSection>\n )}\n\n <MobileDateRange>{dateRange}</MobileDateRange>\n </HeaderContainer>\n </PageHeaderWrapper>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageHeaderWrapper = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-bottom: 24px;\n`;\n\nexport const BackButtonWrapper = styled('div')`\n display: flex;\n align-items: center;\n`;\n\nexport const BackButton = styled('button')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0;\n border: none;\n background-color: transparent;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n cursor: pointer;\n transition: color 0.2s ease;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n\n &:hover {\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n border-radius: 4px;\n }\n\n svg {\n font-size: 16px;\n }\n\n span {\n line-height: 1;\n }\n`;\n\nexport const HeaderContainer = styled('div')`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 16px;\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`;\n\nexport const LeftSection = styled('div')`\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const Title = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const DateRange = styled('p')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n`;\n\nexport const MobileDateRange = styled('p')`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n gap: 24px;\n align-items: center;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`;\n\nexport const FilterWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const FilterIcon = styled('span')`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n\n svg {\n font-size: 16px;\n }\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 120px;\n height: 32px;\n padding: 6px 8px;\n padding-right: 24px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: background-color 0.2s ease;\n appearance: none;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><path fill=\"%23667085\" d=\"M6 8L2 4h8L6 8z\"/></svg>');\n background-repeat: no-repeat;\n background-position: right 4px center;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 4px;\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n @media (max-width: 767px) {\n min-width: auto;\n width: auto;\n flex: none;\n padding-right: 24px;\n background-position: right 8px center;\n }\n`;\n\nexport const MobileTitleWrapper = styled('div')`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`;\n\nexport const MobileTitle = styled('h1')`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n`;\n","import React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport {\n TableContainer,\n Table,\n TableHeader,\n TableHeaderCell,\n TableBody,\n TableRow,\n TableCell,\n EmptyTableCell,\n SortIconContainer,\n} from './DataTable.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ColumnDef<TData = unknown> {\n key: string;\n label: string;\n sortable?: boolean;\n render?: (value: unknown, row: TData) => React.ReactNode;\n align?: 'left' | 'center' | 'right';\n}\n\nexport interface DataTableProps<TData = unknown> {\n readonly columns: ColumnDef<TData>[];\n readonly data: TData[];\n readonly sortable?: boolean;\n readonly onSort?: (columnKey: string, direction: 'asc' | 'desc') => void;\n readonly sortColumn?: string;\n readonly sortDirection?: 'asc' | 'desc';\n readonly getRowKey?: (row: TData, rowIndex: number) => React.Key;\n}\n\nexport const DataTable = <TData,>({\n columns,\n data,\n sortable = false,\n onSort,\n sortColumn,\n sortDirection = 'asc',\n getRowKey,\n}: DataTableProps<TData>) => {\n const handleSort = (columnKey: string) => {\n if (!sortable || !onSort) return;\n const newDirection = sortColumn === columnKey && sortDirection === 'asc' ? 'desc' : 'asc';\n onSort(columnKey, newDirection);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, columnKey: string) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleSort(columnKey);\n }\n };\n\n const getAriaSort = (columnKey: string): 'ascending' | 'descending' | undefined => {\n if (sortColumn !== columnKey) return undefined;\n return sortDirection === 'asc' ? 'ascending' : 'descending';\n };\n\n return (\n <TableContainer data-testid=\"data-table\">\n <Table>\n <TableHeader>\n <tr>\n {columns.map((column) => (\n <TableHeaderCell\n key={column.key}\n sortable={sortable && column.sortable}\n onClick={() => column.sortable && handleSort(column.key)}\n onKeyDown={(e) => column.sortable && handleKeyDown(e, column.key)}\n tabIndex={sortable && column.sortable ? 0 : -1}\n aria-sort={getAriaSort(column.key)}\n aria-label={`${column.label}${column.sortable ? getTranslation(Keys.dataTable.sortableColumn) : ''}`}\n data-testid={`table-header-${column.key}`}\n >\n {column.label}\n {sortable && column.sortable && (\n <SortIconContainer isActive={sortColumn === column.key}>\n {sortColumn === column.key && sortDirection === 'desc' ? (\n <ArrowDownwardIcon />\n ) : (\n <ArrowUpwardIcon />\n )}\n </SortIconContainer>\n )}\n </TableHeaderCell>\n ))}\n </tr>\n </TableHeader>\n <TableBody>\n {data.length === 0 ? (\n <TableRow data-testid=\"table-empty-row\">\n <EmptyTableCell colSpan={columns.length}>\n {getTranslation(Keys.dataTable.noDataAvailable)}\n </EmptyTableCell>\n </TableRow>\n ) : (\n data.map((row, rowIndex) => (\n <TableRow\n key={getRowKey ? getRowKey(row, rowIndex) : rowIndex}\n data-testid={`table-row-${rowIndex}`}\n >\n {columns.map((column) => (\n <TableCell key={column.key} data-testid={`table-cell-${column.key}`}>\n {column.render\n ? column.render((row as Record<string, unknown>)[column.key], row)\n : ((row as Record<string, unknown>)[column.key] as React.ReactNode)}\n </TableCell>\n ))}\n </TableRow>\n ))\n )}\n </TableBody>\n </Table>\n </TableContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TableContainer = styled('div')`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n`;\n\nexport const Table = styled('table')`\n width: 100%;\n border-collapse: collapse;\n`;\n\nexport const TableHeader = styled('thead')`\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-bottom: 2px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n`;\n\nexport const TableHeaderCell = styled('th')<{ sortable?: boolean }>`\n padding: 12px 16px;\n font-size: 14px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n text-align: left;\n cursor: ${({ sortable }) => (sortable ? 'pointer' : 'default')};\n user-select: none;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme, sortable }) => (sortable ? getGenomeColor(theme, 'N30') : 'transparent')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: -2px;\n }\n`;\n\nexport const TableBody = styled('tbody')``;\n\nexport const TableRow = styled('tr')`\n border-bottom: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`;\n\nexport const TableCell = styled('td')`\n padding: 12px 16px;\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n text-align: left;\n`;\n\nexport const EmptyTableCell = styled(TableCell)`\n text-align: center;\n`;\n\nexport const SortIconContainer = styled('span')<{ isActive?: boolean }>`\n display: inline-flex;\n margin-left: 6px;\n opacity: ${({ isActive }) => (isActive ? 1 : 0.4)};\n transition: opacity 0.2s ease;\n\n svg {\n font-size: 16px;\n }\n`;\n","import React from 'react';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport { PaginationContainer, PageButton, PageInfo, NavButton } from './Pagination.styled';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface PaginationProps {\n readonly currentPage: number;\n readonly totalPages: number;\n readonly onPageChange: (page: number) => void;\n readonly itemsPerPage?: number;\n readonly totalItems?: number;\n}\n\nexport const Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n itemsPerPage,\n totalItems,\n}) => {\n const handlePrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent, action: () => void) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n action();\n }\n };\n\n const getPageNumbers = (): number[] => {\n if (totalPages <= 7) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: number[] = [];\n if (currentPage <= 4) {\n pages.push(1, 2, 3, 4, 5);\n } else if (currentPage >= totalPages - 3) {\n pages.push(totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages);\n } else {\n pages.push(currentPage - 1, currentPage, currentPage + 1);\n }\n\n return pages;\n };\n\n const pageNumbers = getPageNumbers();\n const startItem = itemsPerPage ? (currentPage - 1) * itemsPerPage + 1 : null;\n const endItem = itemsPerPage ? Math.min(currentPage * itemsPerPage, totalItems ?? Infinity) : null;\n const goToPageLabel = getTranslation(Keys.pagination.goToPage);\n\n return (\n <PaginationContainer data-testid=\"pagination\">\n <NavButton\n onClick={handlePrevious}\n onKeyDown={(e) => handleKeyDown(e, handlePrevious)}\n disabled={currentPage === 1}\n aria-label={getTranslation(Keys.pagination.previousPage)}\n data-testid=\"pagination-previous\"\n type=\"button\"\n >\n <ChevronLeftIcon />\n </NavButton>\n\n {totalPages > 7 && currentPage > 4 && (\n <>\n <PageButton\n onClick={() => onPageChange(1)}\n isActive={false}\n aria-label={`${goToPageLabel} 1`}\n data-testid=\"pagination-page-1\"\n type=\"button\"\n >\n 1\n </PageButton>\n <PageInfo>...</PageInfo>\n </>\n )}\n\n {pageNumbers.map((page) => (\n <PageButton\n key={page}\n onClick={() => onPageChange(page)}\n isActive={currentPage === page}\n aria-label={`${goToPageLabel} ${page}`}\n aria-current={currentPage === page ? 'page' : undefined}\n data-testid={`pagination-page-${page}`}\n type=\"button\"\n >\n {page}\n </PageButton>\n ))}\n\n {totalPages > 7 && currentPage < totalPages - 3 && (\n <>\n <PageInfo>...</PageInfo>\n <PageButton\n onClick={() => onPageChange(totalPages)}\n isActive={false}\n aria-label={`${goToPageLabel} ${totalPages}`}\n data-testid={`pagination-page-${totalPages}`}\n type=\"button\"\n >\n {totalPages}\n </PageButton>\n </>\n )}\n\n <NavButton\n onClick={handleNext}\n onKeyDown={(e) => handleKeyDown(e, handleNext)}\n disabled={currentPage === totalPages}\n aria-label={getTranslation(Keys.pagination.nextPage)}\n data-testid=\"pagination-next\"\n type=\"button\"\n >\n <ChevronRightIcon />\n </NavButton>\n\n {itemsPerPage && totalItems && (\n <PageInfo as=\"output\" aria-live=\"polite\" data-testid=\"pagination-page-info\">\n {startItem}-{endItem} {getTranslation(Keys.pagination.of)} {totalItems}\n </PageInfo>\n )}\n </PaginationContainer>\n );\n};\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PaginationContainer = styled('div')`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`;\n\nexport const PageButton = styled('button')<{ isActive?: boolean }>`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A80') : getGenomeColor(theme, 'N20')};\n color: ${({ theme, isActive }) => (isActive ? '#ffffff' : getGenomeColor(theme, 'N100'))};\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme, isActive }) =>\n isActive ? getGenomeColor(theme, 'A70') : getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`;\n\nexport const PageInfo = styled('span')`\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n margin: 0 8px;\n`;\n\nexport const NavButton = styled('button')`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover:not(:disabled) {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n outline: 2px solid ${({ theme }) => getGenomeColor(theme, 'A70')};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n svg {\n font-size: 18px;\n }\n`;\n","/**\n * Data Utilities\n *\n * Shared functions for data manipulation across dashboard components.\n * Includes pagination, sorting, and filtering utilities.\n */\n\n/** Calculate total number of pages for pagination */\nexport function calculateTotalPages<T>(items: T[], itemsPerPage: number): number {\n return Math.ceil(items.length / itemsPerPage);\n}\n\n/** Get paginated slice of items for current page */\nexport function paginateItems<T>(items: T[], currentPage: number, itemsPerPage: number): T[] {\n const startIndex = (currentPage - 1) * itemsPerPage;\n const endIndex = startIndex + itemsPerPage;\n return items.slice(startIndex, endIndex);\n}\n\n/** Sort array by a numeric property */\nexport function sortByNumericProperty<T extends Record<string, unknown>>(\n items: T[],\n key: keyof T,\n direction: 'asc' | 'desc' = 'desc',\n): T[] {\n return [...items].sort((a, b) => {\n const aVal = a[key] as number;\n const bVal = b[key] as number;\n return direction === 'asc' ? aVal - bVal : bVal - aVal;\n });\n}\n\n/** Calculate percentage of a value relative to total */\nexport function calculatePercentage(value: number, total: number, decimalPlaces: number = 1): string {\n if (total === 0) return '0.0';\n return ((value / total) * 100).toFixed(decimalPlaces);\n}\n","/**\n * Date Constants\n *\n * Centralized date-related constants for dashboard filtering and display.\n */\n\nimport type { DateRangeOption } from '../types.d';\n\n/** Maps date range options to number of days */\nexport const DAYS_MAP: Record<DateRangeOption, number> = {\n last7days: 7,\n last30days: 30,\n last90days: 90,\n thisMonth: 31,\n};\n\n/** Maps date range options to human-readable labels */\nexport const DATE_RANGE_LABELS: Record<DateRangeOption, string> = {\n last7days: 'Last 7 Days',\n last30days: 'Last 30 Days',\n last90days: 'Last 90 Days',\n thisMonth: 'This Month',\n};\n\n/** Get number of days for a date range option */\nexport function getDaysFromDateRange(dateRange: DateRangeOption): number {\n return DAYS_MAP[dateRange] ?? 30;\n}\n\n/** Get human-readable label for a date range option */\nexport function getDateRangeLabel(dateRange: DateRangeOption): string {\n return DATE_RANGE_LABELS[dateRange] ?? 'Last 30 Days';\n}\n","/**\n * Date Format Utilities\n *\n * Shared functions for formatting dates and date ranges across dashboard components.\n */\n\nimport type { DateRangeOption } from '../types.d';\nimport { getDateRangeLabel } from './dateConstants';\n\n/** Format date range option to display label */\nexport function formatDateRangeLabel(dateRange: DateRangeOption): string {\n return getDateRangeLabel(dateRange);\n}\n\n/** Format Date object to \"MMM D\" format */\nexport function formatShortDate(date: Date): string {\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return `${months[date.getMonth()]} ${date.getDate()}`;\n}\n\n/** Format date string to display format */\nexport function formatDisplayDate(dateStr: string): string {\n const date = new Date(dateStr);\n return formatShortDate(date);\n}\n\n/** Format date range as \"MMM D - MMM D\" */\nexport function formatDateRange(start: string, end: string): string {\n return `${formatDisplayDate(start)} - ${formatDisplayDate(end)}`;\n}\n\n/** Format ISO date to standard format */\nexport function formatISODate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const PageContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n max-width: 1400px;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const MetricChartCardSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const MetricSection = styled(Box)`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n }\n`;\n\nexport const MetricValue = styled(Typography)`\n font-size: 3rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n line-height: 1.2;\n\n @media (max-width: 767px) {\n font-size: 2.5rem;\n }\n`;\n\nexport const MetricTrend = styled(Box)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n margin-top: 8px;\n font-size: 1.25rem;\n font-weight: 500;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n\n svg {\n font-size: 1.5rem;\n }\n\n @media (max-width: 767px) {\n font-size: 1rem;\n\n svg {\n font-size: 1.25rem;\n }\n }\n`;\n\nexport const ComparisonText = styled(Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n\n @media (max-width: 767px) {\n font-size: 0.8125rem;\n }\n`;\n\nexport const ChartSection = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0;\n\n @media (max-width: 767px) {\n gap: 8px;\n }\n`;\n\nexport const ChartTitle = styled(Typography)`\n font-size: 1.25rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n\n @media (max-width: 767px) {\n font-size: 1.125rem;\n }\n`;\n\nexport const ChartContainer = styled(Box)`\n width: 100%;\n height: 400px;\n\n @media (max-width: 767px) {\n height: 200px;\n }\n`;\n\nexport const TableSection = styled(Box)<{ withCard?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n ${({ withCard = true, theme }) =>\n withCard &&\n `\n padding: 20px;\n background-color: ${getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${theme.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`;\n\nexport const LoadingContainer = styled(Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`;\n\nexport const EmptyStateText = styled(Typography)`\n text-align: center;\n color: ${({ theme }) => theme.palette.text.secondary};\n font-size: 1rem;\n padding: 40px 20px;\n\n @media (max-width: 767px) {\n font-size: 0.875rem;\n padding: 32px 16px;\n }\n`;\n\nexport const MobileCardName = styled(Typography)`\n font-weight: 600;\n font-size: 14px;\n`;\n\nexport const MobileCardSubtext = styled(Typography)`\n font-size: 13px;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileCardDetail = styled(Typography)`\n font-size: 13px;\n`;\n\nexport const MobileCardStatus = styled(Typography)<{ status: string }>`\n font-size: 13px;\n color: ${({ theme, status }) => (status === 'Active' ? theme.palette.success.main : theme.palette.warning.main)};\n`;\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const ProductImageCell = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n`;\n\nexport const ProductImage = styled('img')`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n object-fit: cover;\n`;\n\nexport const ProductInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`;\n\nexport const ProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const ProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const MobileCardsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileProductCard = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n\nexport const MobileCardHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`;\n\nexport const MobileProductRank = styled(Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.primary.main};\n min-width: 24px;\n`;\n\nexport const MobileProductImage = styled('img')`\n width: 48px;\n height: 48px;\n border-radius: 8px;\n object-fit: cover;\n`;\n\nexport const MobileProductDetails = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const MobileProductName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`;\n\nexport const MobileProductSku = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n margin-top: 8px;\n padding-top: 8px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n","import useMediaQuery from '@mui/material/useMediaQuery';\n\nexport const MOBILE_VIEWPORT_QUERY = '(max-width:767px)';\n\nexport function useIsMobileViewport(): boolean {\n return useMediaQuery(MOBILE_VIEWPORT_QUERY, { noSsr: true });\n}\n","import React, { useState } from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { paginateItems, calculateTotalPages } from '../../utils/dataUtils';\nimport { formatDateRangeLabel } from '../../utils/dateFormat';\nimport type {\n ConversionDataPoint,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n ConversionFilterOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n ChartContainer,\n TableSection,\n} from '../FullViewComponents.styled';\nimport {\n MobileOrderCard,\n MobileOrderHeader,\n MobileCustomerInfo,\n MobileCustomerName,\n MobileOrderDate,\n MobileOrderId,\n MobileOrderMetrics,\n MobileMetricItem,\n MobileMetricLabel,\n MobileMetricValue,\n MobileOrdersContainer,\n DesktopTableContainer,\n ComparisonTextMobile,\n} from './ConversionRateFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface ConversionRateFullViewProps {\n readonly conversionData: ConversionDataPoint[];\n readonly orders: OrderHistory[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly conversionFilter: ConversionFilterOption;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;\n}\n\nexport const ConversionRateFullView: React.FC<ConversionRateFullViewProps> = ({\n conversionData,\n orders,\n dateRange,\n market,\n conversionFilter,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onConversionFilterChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const currentRate = React.useMemo(() => {\n if (conversionData.length === 0) return 0;\n return conversionData[conversionData.length - 1]?.rate || 0;\n }, [conversionData]);\n\n const trend = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (conversionData.length < 2) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const firstRate = conversionData[0].rate;\n const lastRate = conversionData[conversionData.length - 1]?.rate || 0;\n const change = ((lastRate - firstRate) / firstRate) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (change > 0) direction = 'up';\n else if (change < 0) direction = 'down';\n return { direction, value: `${change >= 0 ? '+' : ''}${change.toFixed(1)}%` };\n }, [conversionData]);\n\n const getConversionFilterLabel = React.useCallback((filter: ConversionFilterOption): string => {\n if (filter === 'members') return getTranslation(Keys.filter.signupView.members);\n if (filter === 'retail') return getTranslation(Keys.filter.signupView.retail);\n if (filter === 'brandAffiliates') return getTranslation(Keys.filter.signupView.brandAffiliates);\n return getTranslation(Keys.filter.signupView.all);\n }, []);\n\n const conversionFilterLabel = React.useMemo(\n () => getConversionFilterLabel(conversionFilter),\n [conversionFilter, getConversionFilterLabel],\n );\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n {\n key: 'dateRange',\n label: getTranslation(Keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(Keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(Keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(Keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(Keys.filter.dateRange.thisMonth) },\n ],\n },\n {\n key: 'market',\n label: getTranslation(Keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: [\n { value: 'all', label: getTranslation(Keys.filter.market.all) },\n { value: 'us', label: getTranslation(Keys.filter.market.us) },\n { value: 'ca', label: getTranslation(Keys.filter.market.ca) },\n { value: 'jp', label: getTranslation(Keys.filter.market.jp) },\n { value: 'kr', label: getTranslation(Keys.filter.market.kr) },\n { value: 'au', label: getTranslation(Keys.filter.market.au) },\n { value: 'nz', label: getTranslation(Keys.filter.market.nz) },\n ],\n },\n {\n key: 'customerType',\n label: getTranslation(Keys.filter.signupView.label),\n value: conversionFilter,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.signupView.all) },\n { value: 'members', label: getTranslation(Keys.filter.signupView.members) },\n { value: 'retail', label: getTranslation(Keys.filter.signupView.retail) },\n ],\n },\n ],\n [conversionFilter, dateRange, market],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value as MarketOption);\n else if (key === 'customerType') {\n onConversionFilterChange?.(value as ConversionFilterOption);\n setCurrentPage(1);\n }\n },\n [onConversionFilterChange, onDateRangeChange, onMarketChange],\n );\n\n const totalPages = React.useMemo(() => calculateTotalPages(orders, itemsPerPage), [itemsPerPage, orders]);\n const paginatedOrders = React.useMemo(\n () => paginateItems(orders, currentPage, itemsPerPage),\n [currentPage, itemsPerPage, orders],\n );\n\n const columns: ColumnDef<OrderHistory>[] = React.useMemo(\n () => [\n { key: 'orderId', label: getTranslation(Keys.fullView.conversionRate.columns.orderId), sortable: true },\n { key: 'date', label: getTranslation(Keys.fullView.conversionRate.columns.date), sortable: true },\n {\n key: 'customerName',\n label: getTranslation(Keys.fullView.conversionRate.columns.customer),\n sortable: true,\n },\n { key: 'customerType', label: getTranslation(Keys.fullView.conversionRate.columns.type), sortable: true },\n { key: 'items', label: getTranslation(Keys.fullView.conversionRate.columns.items), sortable: true },\n {\n key: 'total',\n label: getTranslation(Keys.fullView.conversionRate.columns.total),\n sortable: true,\n render: (value: unknown) => `$${Number(value).toFixed(2)}`,\n },\n { key: 'bv', label: getTranslation(Keys.fullView.conversionRate.columns.bv), sortable: true },\n ],\n [],\n );\n\n const getChartColor = React.useCallback(() => {\n if (conversionFilter === 'members') return '#2e7d32';\n if (conversionFilter === 'retail') return '#ed6c02';\n return '#1976d2';\n }, [conversionFilter]);\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"conversion-rate-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.conversionRate.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"conversion-fullview-metric-chart\">\n <MetricSection>\n <MetricValue data-testid=\"conversion-rate-value\">{currentRate.toFixed(1)}%</MetricValue>\n <MetricTrend direction={trend.direction} data-testid=\"conversion-rate-trend\">\n {trend.direction === 'up' && <TrendingUpIcon />}\n {trend.direction === 'down' && <TrendingDownIcon />}\n {trend.value}\n </MetricTrend>\n <ComparisonTextMobile>\n {getTranslation(Keys.widget.conversionRate.ordersPerSiteVisits)}\n </ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n <ChartContainer data-testid=\"conversion-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart data={conversionData}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis tickFormatter={(value) => `${value}%`} domain={[0, 'auto']} />\n <Tooltip\n formatter={(value: unknown) => {\n if (typeof value === 'number') return `${value.toFixed(2)}%`;\n if (typeof value === 'string') return value;\n return getTranslation(Keys.fullView.conversionRate.notAvailable);\n }}\n />\n <Legend />\n <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke={getChartColor()}\n strokeWidth={2}\n name={`${getTranslation(Keys.widget.conversionRate.title)} (${conversionFilterLabel})`}\n dot={false}\n />\n </LineChart>\n </ResponsiveContainer>\n </ChartContainer>\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"conversion-fullview-table-section\">\n <ChartTitle data-testid=\"conversion-fullview-table-title\">\n {getTranslation(Keys.fullView.conversionRate.orderDetailsTitle)} ({orders.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"conversion-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedOrders}\n sortable\n getRowKey={(row: OrderHistory) => row.orderId}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOrdersContainer data-testid=\"conversion-fullview-mobile-orders\">\n {paginatedOrders.map((order) => (\n <MobileOrderCard key={order.orderId}>\n <MobileOrderHeader>\n <MobileCustomerInfo>\n <MobileCustomerName>{order.customerName}</MobileCustomerName>\n <MobileOrderDate>{order.date}</MobileOrderDate>\n </MobileCustomerInfo>\n <MobileOrderId>{order.orderId}</MobileOrderId>\n </MobileOrderHeader>\n <MobileOrderMetrics>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.items)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.items}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.orderTotal)}\n </MobileMetricLabel>\n <MobileMetricValue>${order.total.toFixed(2)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>\n {getTranslation(Keys.fullView.conversionRate.columns.totalSv)}\n </MobileMetricLabel>\n <MobileMetricValue>{order.bv}</MobileMetricValue>\n </MobileMetricItem>\n </MobileOrderMetrics>\n </MobileOrderCard>\n ))}\n </MobileOrdersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={orders.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const MobileOrderCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const MobileOrderHeader = styled(Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;\n\nexport const MobileCustomerInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`;\n\nexport const MobileCustomerName = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const MobileOrderDate = styled(Typography)`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileOrderId = styled('a')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.primary.main};\n text-decoration: none;\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n`;\n\nexport const MobileOrderMetrics = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`;\n\nexport const MobileMetricLabel = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const MobileMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const MobileOrdersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n @media (max-width: 767px) {\n font-size: 0.75rem;\n }\n`;\n","import React, { useState } from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { paginateItems, calculateTotalPages } from '../../utils/dataUtils';\nimport { formatDateRangeLabel } from '../../utils/dateFormat';\nimport type { SignupDataPoint, SignupDetail, DateRangeOption, MarketOption, SignupViewOption } from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\n TableSection,\n EmptyStateText,\n MobileCardName,\n MobileCardSubtext,\n MobileCardDetail,\n MobileCardStatus,\n} from '../FullViewComponents.styled';\nimport {\n MobileSignupsContainer,\n DesktopTableContainer,\n MobileSignupCard,\n SignupTrendChartContainer,\n ComparisonTextMobile,\n} from './SignupsFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nconst SERIES_COLORS = { total: '#3B82F6', members: '#7B92A8', retail: '#A3B5C7', brandAffiliates: '#5F7388' };\n\nfunction toNumeric(value: unknown): number {\n if (typeof value === 'number') {\n return Number.isFinite(value) ? value : 0;\n }\n\n if (typeof value === 'string') {\n const parsed = Number(value.replace(/,/g, ''));\n return Number.isFinite(parsed) ? parsed : 0;\n }\n\n return 0;\n}\n\nexport interface SignupsFullViewProps {\n readonly signupData: SignupDataPoint[];\n readonly signups: SignupDetail[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly signupView: SignupViewOption;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onSignupViewChange?: (view: SignupViewOption) => void;\n}\n\nexport const SignupsFullView: React.FC<SignupsFullViewProps> = ({\n signupData,\n signups,\n dateRange,\n market,\n signupView,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onSignupViewChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const normalizedSignupData = React.useMemo(\n () =>\n signupData.map((point) => {\n const rawPoint = point as unknown as Record<string, unknown>;\n const members = toNumeric(rawPoint.members);\n const retail = toNumeric(rawPoint.retail);\n const brandAffiliates = toNumeric(\n rawPoint.brandAffiliates ??\n rawPoint.brandAffiliate ??\n rawPoint.brand_affiliates ??\n rawPoint.brand_affiliate,\n );\n const total = toNumeric(rawPoint.total ?? rawPoint.all ?? rawPoint.signupTotal ?? rawPoint.value);\n\n return {\n ...point,\n total: total > 0 ? total : members + retail + brandAffiliates,\n members,\n retail,\n brandAffiliates,\n };\n }),\n [signupData],\n );\n\n const totalSignups = React.useMemo(() => {\n if (normalizedSignupData.length === 0) return 0;\n return normalizedSignupData[normalizedSignupData.length - 1].total;\n }, [normalizedSignupData]);\n\n const trend = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (normalizedSignupData.length < 2)\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const first = normalizedSignupData[0].total;\n const last = normalizedSignupData[normalizedSignupData.length - 1].total;\n if (first <= 0) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const change = ((last - first) / first) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (change > 0) direction = 'up';\n else if (change < 0) direction = 'down';\n return { direction, value: `${change >= 0 ? '+' : ''}${change.toFixed(1)}%` };\n }, [normalizedSignupData]);\n\n const hasSignupTrendData = normalizedSignupData.length > 0;\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n {\n key: 'dateRange',\n label: getTranslation(Keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(Keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(Keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(Keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(Keys.filter.dateRange.thisMonth) },\n ],\n },\n {\n key: 'market',\n label: getTranslation(Keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: [\n { value: 'all', label: getTranslation(Keys.filter.market.all) },\n { value: 'us', label: getTranslation(Keys.filter.market.us) },\n { value: 'ca', label: getTranslation(Keys.filter.market.ca) },\n { value: 'jp', label: getTranslation(Keys.filter.market.jp) },\n { value: 'kr', label: getTranslation(Keys.filter.market.kr) },\n { value: 'au', label: getTranslation(Keys.filter.market.au) },\n { value: 'nz', label: getTranslation(Keys.filter.market.nz) },\n ],\n },\n {\n key: 'signupView',\n label: getTranslation(Keys.filter.signupView.label),\n value: signupView,\n options: [\n { value: 'all', label: getTranslation(Keys.filter.signupView.all) },\n { value: 'members', label: getTranslation(Keys.filter.signupView.members) },\n { value: 'retail', label: getTranslation(Keys.filter.signupView.retail) },\n { value: 'brandAffiliates', label: getTranslation(Keys.filter.signupView.brandAffiliates) },\n ],\n },\n ],\n [dateRange, market, signupView],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value as MarketOption);\n else if (key === 'signupView') {\n onSignupViewChange?.(value as SignupViewOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onSignupViewChange],\n );\n\n const totalPages = React.useMemo(() => calculateTotalPages(signups, itemsPerPage), [signups, itemsPerPage]);\n const paginatedSignups = React.useMemo(\n () => paginateItems(signups, currentPage, itemsPerPage),\n [currentPage, itemsPerPage, signups],\n );\n\n const columns: ColumnDef<SignupDetail>[] = React.useMemo(\n () => [\n { key: 'id', label: getTranslation(Keys.fullView.signups.columns.id), sortable: true },\n { key: 'name', label: getTranslation(Keys.fullView.signups.columns.name), sortable: true },\n { key: 'date', label: getTranslation(Keys.fullView.signups.columns.date), sortable: true },\n { key: 'type', label: getTranslation(Keys.fullView.signups.columns.type), sortable: true },\n { key: 'email', label: getTranslation(Keys.fullView.signups.columns.email), sortable: true },\n { key: 'status', label: getTranslation(Keys.fullView.signups.columns.status), sortable: true },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"signups-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.signups.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"signups-fullview-metric-chart\">\n <MetricSection>\n <MetricValue data-testid=\"signups-total\">{totalSignups.toLocaleString()}</MetricValue>\n <MetricTrend direction={trend.direction}>\n {trend.direction === 'up' && <TrendingUpIcon />}\n {trend.direction === 'down' && <TrendingDownIcon />}\n {trend.value}\n </MetricTrend>\n <ComparisonTextMobile>\n {getTranslation(Keys.widget.signups.totalSignupsInPeriod)}\n </ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n {hasSignupTrendData ? (\n <SignupTrendChartContainer data-testid=\"signups-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\" minHeight={240}>\n <LineChart data={normalizedSignupData}>\n <CartesianGrid strokeDasharray=\"3 3\" />\n <XAxis dataKey=\"date\" />\n <YAxis />\n <Tooltip />\n <Legend />\n {signupView === 'all' && (\n <>\n <Line\n type=\"monotone\"\n dataKey=\"total\"\n stroke={SERIES_COLORS.total}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.total)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n </>\n )}\n {signupView === 'members' && (\n <Line\n type=\"monotone\"\n dataKey=\"members\"\n stroke={SERIES_COLORS.members}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.members)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'retail' && (\n <Line\n type=\"monotone\"\n dataKey=\"retail\"\n stroke={SERIES_COLORS.retail}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.retail)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n {signupView === 'brandAffiliates' && (\n <Line\n type=\"monotone\"\n dataKey=\"brandAffiliates\"\n stroke={SERIES_COLORS.brandAffiliates}\n strokeWidth={2}\n name={getTranslation(Keys.widget.signups.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </SignupTrendChartContainer>\n ) : (\n <EmptyStateText data-testid=\"signups-fullview-chart-empty\">\n {getTranslation(Keys.widget.signups.noTrendData)}\n </EmptyStateText>\n )}\n </ChartSection>\n </MetricChartCardSection>\n\n <TableSection data-testid=\"signups-fullview-table-section\">\n <ChartTitle data-testid=\"signups-fullview-table-title\">{`${getTranslation(Keys.fullView.signups.detailsTitle)} (${signups.length})`}</ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"signups-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedSignups}\n sortable\n getRowKey={(row: SignupDetail) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileSignupsContainer data-testid=\"signups-fullview-mobile-cards\">\n {paginatedSignups.map((signup) => (\n <MobileSignupCard key={signup.id}>\n <MobileCardName>{signup.name}</MobileCardName>\n <MobileCardSubtext>\n {signup.date} - {signup.type}\n </MobileCardSubtext>\n <MobileCardDetail>{signup.email}</MobileCardDetail>\n <MobileCardStatus status={signup.status}>{signup.status}</MobileCardStatus>\n </MobileSignupCard>\n ))}\n </MobileSignupsContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={signups.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\nimport { ChartContainer } from '../FullViewComponents.styled';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const MobileSignupsContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileSignupCard = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n }\n`;\n\nexport const SignupTrendChartContainer = styled(ChartContainer)`\n min-height: 320px;\n\n @media (max-width: 767px) {\n min-height: 260px;\n height: 260px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin-top: 4px;\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { PageHeader, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { paginateItems, calculateTotalPages } from '../../utils/dataUtils';\nimport { formatDateRangeLabel } from '../../utils/dateFormat';\nimport type { CategoryRevenue, DateRangeOption, MarketOption, CategorySortOption } from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport {\n SummaryItemRow,\n SummaryItemInfo,\n SummaryItemName,\n SummaryItemSubtext,\n SummaryItemPercentage,\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryInfo,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n DesktopTableContainer,\n MobileCategoriesContainer,\n MobileCategoryCard,\n} from './CategoriesFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface CategoriesFullViewProps {\n readonly categories: CategoryRevenue[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onCategorySortChange?: (sort: CategorySortOption) => void;\n}\n\nfunction parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nexport const CategoriesFullView: React.FC<CategoriesFullViewProps> = ({\n categories,\n dateRange,\n market,\n categorySort,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onCategorySortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n {\n key: 'dateRange',\n label: getTranslation(Keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(Keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(Keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(Keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(Keys.filter.dateRange.thisMonth) },\n ],\n },\n {\n key: 'market',\n label: getTranslation(Keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: [\n { value: 'all', label: getTranslation(Keys.filter.market.all) },\n { value: 'us', label: getTranslation(Keys.filter.market.us) },\n { value: 'ca', label: getTranslation(Keys.filter.market.ca) },\n { value: 'jp', label: getTranslation(Keys.filter.market.jp) },\n { value: 'kr', label: getTranslation(Keys.filter.market.kr) },\n { value: 'au', label: getTranslation(Keys.filter.market.au) },\n { value: 'nz', label: getTranslation(Keys.filter.market.nz) },\n ],\n },\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: categorySort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.productSort.revenue) },\n { value: 'units', label: getTranslation(Keys.filter.productSort.units) },\n ],\n },\n ],\n [categorySort, dateRange, market],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value as MarketOption);\n else if (key === 'sort') {\n onCategorySortChange?.(value as CategorySortOption);\n setCurrentPage(1);\n }\n },\n [onCategorySortChange, onDateRangeChange, onMarketChange],\n );\n\n const sortedCategories = React.useMemo(\n () =>\n [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n }),\n [categories, categorySort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n const weightedRevenueTrend = sortedCategories.reduce(\n (accumulator, category) => {\n const trendValue = parseTrendPercent(category.trend?.revenue);\n if (trendValue === null) return accumulator;\n\n return {\n weightedSum: accumulator.weightedSum + trendValue * category.revenue,\n weight: accumulator.weight + category.revenue,\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const averageRevenueTrend =\n weightedRevenueTrend.weight > 0 ? weightedRevenueTrend.weightedSum / weightedRevenueTrend.weight : 0;\n\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (averageRevenueTrend > 0) direction = 'up';\n else if (averageRevenueTrend < 0) direction = 'down';\n\n const sign = averageRevenueTrend > 0 ? '+' : '';\n const trend = `${sign}${averageRevenueTrend.toFixed(1)}%`;\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: trend,\n };\n }, [sortedCategories]);\n\n const topCategories = React.useMemo(() => sortedCategories.slice(0, 5), [sortedCategories]);\n\n const totalPages = React.useMemo(\n () => calculateTotalPages(sortedCategories, itemsPerPage),\n [itemsPerPage, sortedCategories],\n );\n const paginatedCategories = React.useMemo(\n () => paginateItems(sortedCategories, currentPage, itemsPerPage),\n [currentPage, itemsPerPage, sortedCategories],\n );\n\n const columns: ColumnDef<CategoryRevenue>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.categories.columns.category),\n sortable: true,\n render: (_: unknown, row: CategoryRevenue) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <span>{row.name}</span>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.categories.columns.revenue),\n sortable: true,\n render: (value: unknown) => `$${Number(value).toLocaleString()}`,\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.categories.columns.percentOfTotal),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.categories.columns.trend),\n render: (_: unknown, row: CategoryRevenue) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noValue),\n },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (categories.length === 0) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"categories-fullview-empty\">\n {getTranslation(Keys.fullView.categories.noCategoryData)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"categories-fullview-top-section\">\n <ChartWrapper data-testid=\"categories-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedCategories}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => `$${value.toLocaleString()}`} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-fullview-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>${totalRevenue.toLocaleString()}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>{totalRevenueTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"categories-fullview-summary\">\n {topCategories.map((category) => (\n <SummaryItem key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryInfo>\n <SummaryName>{category.name}</SummaryName>\n <SummaryValue>${category.revenue.toLocaleString()}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{category.percentage}%</SummaryPercentage>\n </SummaryItem>\n ))}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"categories-fullview-table-section\">\n <ChartTitle data-testid=\"categories-fullview-table-title\">\n {getTranslation(Keys.fullView.categories.allCategoriesTitle)} ({sortedCategories.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedCategories}\n sortable\n getRowKey={(row: CategoryRevenue) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileCategoriesContainer>\n {paginatedCategories.map((category) => (\n <MobileCategoryCard key={category.id}>\n <ColorDot dotColor={category.color} />\n <SummaryItemInfo>\n <SummaryItemName>{category.name}</SummaryItemName>\n <SummaryItemSubtext>${category.revenue.toLocaleString()}</SummaryItemSubtext>\n </SummaryItemInfo>\n <SummaryItemPercentage>{category.percentage}%</SummaryItemPercentage>\n </MobileCategoryCard>\n ))}\n </MobileCategoriesContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedCategories.length}\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@nuskin/foundation-theme';\nimport { styled as muiStyled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const SummaryItemRow = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const SummaryItemInfo = styled('div')`\n flex: 1;\n`;\n\nexport const SummaryItemName = styled('span')`\n font-weight: 600;\n`;\n\nexport const SummaryItemSubtext = styled('span')`\n font-size: 0.875rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryItemPercentage = styled('span')`\n font-weight: 600;\n`;\n\nexport const TopSection = muiStyled(Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const ChartWrapper = muiStyled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = muiStyled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = muiStyled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = muiStyled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = muiStyled(Typography)<{ direction: 'up' | 'down' | 'neutral' }>`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n`;\n\nexport const SummaryContainer = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`;\n\nexport const SummaryItem = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = muiStyled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const SummaryName = muiStyled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const SummaryValue = muiStyled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryPercentage = muiStyled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`;\n\nexport const DesktopTableContainer = muiStyled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileCategoriesContainer = muiStyled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileCategoryCard = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n","import { styled } from '@nuskin/foundation-theme';\n\nexport const PoDashboardContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n box-sizing: border-box;\n\n @media (min-width: 768px) {\n gap: 24px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n }\n`;\n\nexport const TopChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const StatsCardStack = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n gap: 24px;\n justify-content: stretch;\n }\n\n & > * {\n flex: 1;\n }\n`;\n\nexport const BottomChartsRow = styled('div')`\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n\n @media (min-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n }\n`;\n\nexport const ErrorContainer = styled('div')`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;\n","import React from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport {\n CategoriesContainer,\n ChartHeader,\n ChartTitle,\n SortDropdown,\n ChartAndLegendContainer,\n ChartWrapper,\n LegendContainer,\n LegendItem,\n LegendColor,\n LegendInfo,\n LegendName,\n LegendValue,\n LegendPercentage,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from '../TopCategories/TopCategoriesPieChart.styled';\nimport type { TopPerformingOffer, OfferSortOption } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\n\nexport interface TopPerformingOffersPieChartProps {\n readonly offers: TopPerformingOffer[];\n readonly offerSort: OfferSortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly onSortChange?: (sort: OfferSortOption) => void;\n readonly onTitleClick?: () => void;\n}\n\nfunction parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nconst tooltipFormatter = (value: number): string => `$${value.toLocaleString()}`;\n\nconst TopPerformingOffersPieChartComponent: React.FC<TopPerformingOffersPieChartProps> = ({\n offers,\n offerSort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n}) => {\n const handleSortChange = React.useCallback(\n (event: React.ChangeEvent<HTMLSelectElement>) => {\n const newSort = event.target.value as OfferSortOption;\n onSortChange?.(newSort);\n },\n [onSortChange],\n );\n\n const { sortedOffers, totalRevenue, trendDirection, formattedTrend } = React.useMemo(() => {\n const nextSortedOffers = [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n });\n\n const nextTotalRevenue = nextSortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const weightedRevenueTrend = nextSortedOffers.reduce(\n (accumulator, offer) => {\n const trendValue = parseTrendPercent(offer.trend?.revenue);\n if (trendValue === null) return accumulator;\n\n return {\n weightedSum: accumulator.weightedSum + trendValue * offer.revenue,\n weight: accumulator.weight + offer.revenue,\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const averageRevenueTrend =\n weightedRevenueTrend.weight > 0 ? weightedRevenueTrend.weightedSum / weightedRevenueTrend.weight : 0;\n\n let nextTrendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (averageRevenueTrend > 0) nextTrendDirection = 'up';\n else if (averageRevenueTrend < 0) nextTrendDirection = 'down';\n\n const trendSign = averageRevenueTrend > 0 ? '+' : '';\n const nextFormattedTrend = `${trendSign}${averageRevenueTrend.toFixed(1)}%`;\n\n return {\n sortedOffers: nextSortedOffers,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [offers, offerSort]);\n\n if (isLoading && offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <CategoriesPieChartSkeleton />\n </CategoriesContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <CategoriesContainer data-testid=\"widget-top-offers\">\n <ChartHeader>\n <ChartTitle>{title ?? getTranslation(Keys.widget.topPerformingOffers.title)}</ChartTitle>\n </ChartHeader>\n <EmptyState data-testid=\"top-offers-empty-state\">\n <EmptyStateText>{getTranslation(Keys.widget.topPerformingOffers.emptyState)}</EmptyStateText>\n </EmptyState>\n </CategoriesContainer>\n );\n }\n\n return (\n <CategoriesContainer\n as=\"section\"\n data-testid=\"widget-top-offers\"\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <ChartHeader>\n <ChartTitle\n as=\"button\"\n onClick={onTitleClick}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n data-testid=\"widget-title-top-offers\"\n >\n {title ?? getTranslation(Keys.widget.topPerformingOffers.title)}\n </ChartTitle>\n <HeaderActionsContainer>\n <SortDropdown\n id=\"offer-sort\"\n data-testid=\"offer-sort-dropdown\"\n value={offerSort}\n onChange={handleSortChange}\n disabled={isLoading}\n aria-label={getTranslation(Keys.ariaLabel.topOffers)}\n >\n <option value=\"revenue\">{getTranslation(Keys.filter.offerSort.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.filter.offerSort.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-offers\" onFullView={onTitleClick} />\n </HeaderActionsContainer>\n </ChartHeader>\n\n <ChartAndLegendContainer>\n <ChartWrapper data-testid=\"top-offers-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"55%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={tooltipFormatter} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>${totalRevenue.toLocaleString()}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>{formattedTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <LegendContainer data-testid=\"top-offers-legend-container\">\n {sortedOffers.map((offer, index) => (\n <LegendItem key={offer.id} data-testid={`offer-legend-${index}`}>\n <LegendColor color={offer.color} />\n <LegendInfo>\n <LegendName>{offer.name}</LegendName>\n <LegendValue>${offer.revenue.toLocaleString()}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{offer.percentage}%</LegendPercentage>\n </LegendItem>\n ))}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopPerformingOffersPieChart = React.memo(TopPerformingOffersPieChartComponent);\nTopPerformingOffersPieChart.displayName = 'TopPerformingOffersPieChart';\n","/**\n * Translation Keys for the Product Offer Dashboard\n *\n * All user-visible strings must use these keys with fallback text.\n * Follow the same { key, fallback } pattern as ShoppingDashboardTranslationKeys.\n */\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport const ProductOfferDashboardTranslationKeys = {\n title: { key: 'productOfferDashboard.title', fallback: 'Performance Overview' },\n error: { key: 'productOfferDashboard.error', fallback: 'Failed to load dashboard data. Please try again.' },\n\n stats: {\n revenue: { key: 'productOfferDashboard.stats.revenue', fallback: 'Total Revenue' },\n offersPurchased: { key: 'productOfferDashboard.stats.offersPurchased', fallback: 'Offers Purchased' },\n conversionRate: { key: 'productOfferDashboard.stats.conversionRate', fallback: 'Conversion Rate' },\n trendUp: { key: 'productOfferDashboard.stats.trendUp', fallback: 'Trending up' },\n trendDown: { key: 'productOfferDashboard.stats.trendDown', fallback: 'Trending down' },\n trendNeutral: { key: 'productOfferDashboard.stats.trendNeutral', fallback: 'No change' },\n comparedTo: { key: 'productOfferDashboard.stats.comparedTo', fallback: 'compared to this time last month' },\n },\n\n filter: {\n dateRange: {\n label: { key: 'productOfferDashboard.filter.dateRange.label', fallback: 'Date Range' },\n last7days: { key: 'productOfferDashboard.filter.dateRange.last7days', fallback: 'Last 7 Days' },\n last30days: { key: 'productOfferDashboard.filter.dateRange.last30days', fallback: 'Last 30 Days' },\n last90days: { key: 'productOfferDashboard.filter.dateRange.last90days', fallback: 'Last 90 Days' },\n thisMonth: { key: 'productOfferDashboard.filter.dateRange.thisMonth', fallback: 'This Month' },\n },\n market: {\n label: { key: 'productOfferDashboard.filter.market.label', fallback: 'Market' },\n all: { key: 'productOfferDashboard.filter.market.all', fallback: 'All Markets' },\n },\n offerSort: {\n byRevenue: { key: 'productOfferDashboard.filter.offerSort.byRevenue', fallback: 'Revenue' },\n byUnits: { key: 'productOfferDashboard.filter.offerSort.byUnits', fallback: 'Units' },\n },\n productSort: {\n byUnits: { key: 'productOfferDashboard.filter.productSort.byUnits', fallback: 'Units' },\n byRevenue: { key: 'productOfferDashboard.filter.productSort.byRevenue', fallback: 'Revenue' },\n byVolume: { key: 'productOfferDashboard.filter.productSort.byVolume', fallback: 'Volume' },\n },\n conversionFilter: {\n overall: { key: 'productOfferDashboard.filter.conversionFilter.overall', fallback: 'Overall' },\n },\n },\n\n widget: {\n topProducts: {\n title: { key: 'productOfferDashboard.widget.topProducts.title', fallback: 'Top Selling Products' },\n emptyState: {\n key: 'productOfferDashboard.widget.topProducts.emptyState',\n fallback: 'No products data available',\n },\n },\n conversionRate: {\n title: { key: 'productOfferDashboard.widget.conversionRate.title', fallback: 'Conversion Rate' },\n subtitle: { key: 'productOfferDashboard.widget.conversionRate.subtitle', fallback: 'Orders ÷ Site visits' },\n },\n topPerformingOffers: {\n title: { key: 'productOfferDashboard.widget.topPerformingOffers.title', fallback: 'Top Performing Offers' },\n totalRevenue: {\n key: 'productOfferDashboard.widget.topPerformingOffers.totalRevenue',\n fallback: 'Total revenue',\n },\n emptyState: {\n key: 'productOfferDashboard.widget.topPerformingOffers.emptyState',\n fallback: 'No offers data available',\n },\n },\n menu: {\n fullView: { key: 'productOfferDashboard.widget.menu.fullView', fallback: 'Full View' },\n },\n },\n\n navigation: {\n back: { key: 'productOfferDashboard.navigation.back', fallback: 'Back to Dashboard' },\n },\n\n ariaLabel: {\n dashboard: {\n key: 'productOfferDashboard.ariaLabel.dashboard',\n fallback: 'Product Offer Performance Dashboard',\n },\n statsCard: { key: 'productOfferDashboard.ariaLabel.statsCard', fallback: 'Performance metric' },\n conversionChart: { key: 'productOfferDashboard.ariaLabel.conversionChart', fallback: 'Conversion rate chart' },\n topProducts: { key: 'productOfferDashboard.ariaLabel.topProducts', fallback: 'Top selling products' },\n topOffers: { key: 'productOfferDashboard.ariaLabel.topOffers', fallback: 'Top performing offers chart' },\n widgetMenu: { key: 'productOfferDashboard.ariaLabel.widgetMenu', fallback: 'Widget options menu' },\n filterDateRange: { key: 'productOfferDashboard.ariaLabel.filterDateRange', fallback: 'Filter by date range' },\n filterMarket: { key: 'productOfferDashboard.ariaLabel.filterMarket', fallback: 'Filter by market' },\n backButton: { key: 'productOfferDashboard.ariaLabel.backButton', fallback: 'Back to dashboard overview' },\n },\n\n fullView: {\n topOffers: {\n title: { key: 'productOfferDashboard.fullView.topOffers.title', fallback: 'Top Performing Offers' },\n columnName: { key: 'productOfferDashboard.fullView.topOffers.columnName', fallback: 'Offer Name' },\n columnRevenue: { key: 'productOfferDashboard.fullView.topOffers.columnRevenue', fallback: 'Revenue' },\n columnPercentage: { key: 'productOfferDashboard.fullView.topOffers.columnPercentage', fallback: 'Share' },\n columnTrend: { key: 'productOfferDashboard.fullView.topOffers.columnTrend', fallback: 'Trend' },\n },\n },\n\n defaults: {\n trendZero: { key: 'productOfferDashboard.defaults.trendZero', fallback: '+0%' },\n noData: { key: 'productOfferDashboard.defaults.noData', fallback: '--' },\n },\n} as const;\n\n/**\n * Get translation text from a translation entry.\n * Currently returns the fallback text. When an i18n provider is integrated,\n * this function will use the key to look up the translated string.\n */\nexport function getTranslation(entry: TranslationEntry): string {\n return entry.fallback;\n}\n","import React from 'react';\nimport {\n PoDashboardContainer,\n TopChartsRow,\n StatsCardStack,\n BottomChartsRow,\n ErrorContainer,\n} from './ProductOfferDashboard.styled';\nimport { DashboardHeader } from './shared/DashboardHeader';\nimport { StatsCard } from './shared/StatsCard';\nimport { TopSellingProductsList } from './shared/TopProducts/TopSellingProductsList';\nimport { ConversionRateChart } from './shared/ConversionRate/ConversionRateChart';\nimport { TopPerformingOffersPieChart } from './shared/TopPerformingOffers/TopPerformingOffersPieChart';\nimport type { ProductOfferDashboardProps, TopProduct, ConversionDataPoint, TopPerformingOffer } from './types.d';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from './TranslationKeys/ProductOfferDashboardTranslationKeys';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\n\n/**\n * ProductOfferDashboard Main Container Component\n *\n * Orchestrates all dashboard widgets for the Product Offer Performance view.\n * Pure presentational - receives all data via props.\n * The consuming application is responsible for data fetching and state management.\n *\n * Layout (desktop):\n * - Top row: Conversion Rate chart (left) | Total Revenue + Offers Purchased stacked (right)\n * - Bottom row: Top Selling Products (left) | Top Performing Offers donut (right)\n */\nexport const ProductOfferDashboard: React.FC<ProductOfferDashboardProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n dateRange = 'last30days',\n market = 'all',\n productSort = 'units',\n conversionFilter = 'all',\n offerSort = 'revenue',\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onOffersTitleClick,\n}) => {\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n\n const getTrendDirection = (trendValue?: string): 'up' | 'down' | 'neutral' => {\n if (!trendValue) return 'neutral';\n if (trendValue.startsWith('+') && trendValue !== '+0%') return 'up';\n if (trendValue.startsWith('-')) return 'down';\n return 'neutral';\n };\n\n // Error state\n if (error) {\n return (\n <PoDashboardContainer as=\"main\" className={className} aria-label={getTranslation(Keys.ariaLabel.dashboard)}>\n <ErrorContainer data-testid=\"dashboard-error\" role=\"alert\" aria-live=\"assertive\">\n <strong>{getTranslation(Keys.error)}:</strong> {error}\n </ErrorContainer>\n </PoDashboardContainer>\n );\n }\n\n return (\n <PoDashboardContainer\n as=\"main\"\n className={className}\n data-testid=\"product-offer-dashboard\"\n aria-label={getTranslation(Keys.ariaLabel.dashboard)}\n aria-busy={isLoading}\n >\n <DashboardHeader\n shopTitle={dashboardTitle ?? getTranslation(Keys.title)}\n dateRange={dateRange}\n market={market}\n isLoading={isLoading}\n stats={\n stats\n ? {\n shopTitle: stats.shopTitle ?? '',\n dateRange: stats.dateRange,\n selectedMarket: stats.selectedMarket,\n metrics: {\n revenue: stats.metrics.revenue,\n volume: '',\n siteVisits: '',\n conversionRate: stats.metrics.conversionRate,\n },\n trend: {},\n }\n : undefined\n }\n onDateRangeChange={onDateRangeChange}\n onMarketChange={onMarketChange}\n />\n\n <TopChartsRow data-testid=\"top-charts-row\">\n <ConversionRateChart\n conversionData={resolvedConversionData}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <StatsCardStack data-testid=\"stats-card-stack\">\n <StatsCard\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n title={getTranslation(Keys.stats.offersPurchased)}\n value={stats?.metrics?.offersPurchased ?? '0'}\n trendDirection={getTrendDirection(stats?.trend?.offersPurchased)}\n trendValue={stats?.trend?.offersPurchased}\n testId=\"stats-card-offers-purchased\"\n isLoading={isLoading}\n />\n </StatsCardStack>\n </TopChartsRow>\n\n <BottomChartsRow data-testid=\"bottom-charts-row\">\n <TopSellingProductsList\n products={resolvedTopProducts}\n productSort={productSort}\n isLoading={isLoading}\n maxProducts={5}\n onSortChange={onProductSortChange}\n onTitleClick={onProductsTitleClick}\n />\n <TopPerformingOffersPieChart\n offers={resolvedTopOffers}\n offerSort={offerSort}\n isLoading={isLoading}\n onSortChange={onOfferSortChange}\n onTitleClick={onOffersTitleClick}\n />\n </BottomChartsRow>\n </PoDashboardContainer>\n );\n};\n\nexport default ProductOfferDashboard;\n","import React from 'react';\nimport { ProductOfferDashboard } from './ProductOfferDashboard';\nimport { ProductsFullView } from './shared/TopProducts/ProductsFullView';\nimport { ConversionRateFullView } from './shared/ConversionRate/ConversionRateFullView';\nimport { TopPerformingOffersFullView } from './shared/TopPerformingOffers/TopPerformingOffersFullView';\nimport type {\n TopProduct,\n ConversionDataPoint,\n TopPerformingOffer,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n ProductSortOption,\n ConversionFilterOption,\n OfferSortOption,\n ProductOfferFullViewWidgetType,\n ProductOfferDashboardView,\n PoDashboardWithNavigationProps,\n ProductOfferDashboardHistoryLocation,\n} from './types.d';\n\ntype ViewMode = 'push' | 'replace';\n\nconst DEFAULT_HISTORY_STATE_KEY = 'productOfferDashboardView';\n\nconst EMPTY_TOP_PRODUCTS: TopProduct[] = [];\nconst EMPTY_CONVERSION_DATA: ConversionDataPoint[] = [];\nconst EMPTY_TOP_OFFERS: TopPerformingOffer[] = [];\nconst EMPTY_ORDERS: OrderHistory[] = [];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction isProductOfferDashboardView(value: unknown): value is ProductOfferDashboardView {\n return value === 'dashboard' || value === 'products' || value === 'conversion-rate' || value === 'top-offers';\n}\n\nfunction readViewFromState(state: unknown, stateKey: string): ProductOfferDashboardView {\n if (!isRecord(state)) {\n return 'dashboard';\n }\n\n const view = state[stateKey];\n return isProductOfferDashboardView(view) ? view : 'dashboard';\n}\n\nfunction buildStateWithView(\n state: unknown,\n stateKey: string,\n view: ProductOfferDashboardView,\n): Record<string, unknown> {\n const currentState = isRecord(state) ? state : {};\n\n return {\n ...currentState,\n [stateKey]: view,\n };\n}\n\nfunction buildLocationWithState(\n location: ProductOfferDashboardHistoryLocation | undefined,\n state: Record<string, unknown>,\n): ProductOfferDashboardHistoryLocation {\n return {\n pathname: location?.pathname,\n search: location?.search,\n hash: location?.hash,\n state,\n };\n}\n\n/**\n * PoDashboardWithNavigation\n *\n * Stateful navigation wrapper for the Product Offer Dashboard.\n * Manages dashboard/full-view switching with browser history integration,\n * filter state ownership, and back navigation.\n *\n * Follows the same pattern as MysiteDashboardWithNavigation but for the\n * Product Offer Dashboard with reduced view types (no signups/categories).\n */\nexport const PoDashboardWithNavigation: React.FC<PoDashboardWithNavigationProps> = ({\n stats,\n topProducts,\n conversionData,\n topOffers,\n isLoading = false,\n error,\n dashboardTitle,\n className,\n allProducts,\n orders,\n allOffers,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialConversionFilter = 'all',\n initialOfferSort = 'revenue',\n historyAdapter,\n historyStateKey = DEFAULT_HISTORY_STATE_KEY,\n resetToDashboardOnMount = true,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onConversionFilterChange,\n onOfferSortChange,\n onViewChange,\n}) => {\n const [currentView, setCurrentView] = React.useState<ProductOfferDashboardView>('dashboard');\n const hasIntraDashboardHistoryRef = React.useRef(false);\n const [dateRange, setDateRange] = React.useState<DateRangeOption>(initialDateRange);\n const [market, setMarket] = React.useState<MarketOption>(initialMarket);\n const [productSort, setProductSort] = React.useState<ProductSortOption>(initialProductSort);\n const [conversionFilter, setConversionFilter] = React.useState<ConversionFilterOption>(initialConversionFilter);\n const [offerSort, setOfferSort] = React.useState<OfferSortOption>(initialOfferSort);\n\n const resolvedTopProducts = topProducts ?? EMPTY_TOP_PRODUCTS;\n const resolvedConversionData = conversionData ?? EMPTY_CONVERSION_DATA;\n const resolvedTopOffers = topOffers ?? EMPTY_TOP_OFFERS;\n const resolvedAllProducts = allProducts ?? resolvedTopProducts;\n const resolvedOrders = orders ?? EMPTY_ORDERS;\n const resolvedAllOffers = allOffers ?? resolvedTopOffers;\n\n const updateView = React.useCallback(\n (view: ProductOfferDashboardView) => {\n setCurrentView(view);\n onViewChange?.(view);\n },\n [onViewChange],\n );\n\n const readCurrentView = React.useCallback((): ProductOfferDashboardView => {\n if (historyAdapter) {\n return readViewFromState(historyAdapter.location?.state, historyStateKey);\n }\n\n if (typeof window === 'undefined') {\n return 'dashboard';\n }\n\n return readViewFromState(window.history.state, historyStateKey);\n }, [historyAdapter, historyStateKey]);\n\n const writeCurrentView = React.useCallback(\n (view: ProductOfferDashboardView, mode: ViewMode) => {\n if (historyAdapter) {\n const nextState = buildStateWithView(historyAdapter.location?.state, historyStateKey, view);\n const nextLocation = buildLocationWithState(historyAdapter.location, nextState);\n\n if (mode === 'replace') {\n historyAdapter.replace(nextLocation);\n return;\n }\n\n historyAdapter.push(nextLocation);\n return;\n }\n\n if (typeof window === 'undefined') {\n return;\n }\n\n const nextState = buildStateWithView(window.history.state, historyStateKey, view);\n\n if (mode === 'replace') {\n window.history.replaceState(nextState, '');\n return;\n }\n\n window.history.pushState(nextState, '');\n },\n [historyAdapter, historyStateKey],\n );\n\n React.useEffect(() => {\n if (resetToDashboardOnMount) {\n writeCurrentView('dashboard', 'replace');\n hasIntraDashboardHistoryRef.current = false;\n updateView('dashboard');\n } else {\n updateView(readCurrentView());\n }\n\n if (historyAdapter) {\n return historyAdapter.listen((location, action) => {\n if (action === 'POP') {\n const nextView = readViewFromState(location.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n }\n });\n }\n\n const handlePopState = (event: PopStateEvent) => {\n const nextView = readViewFromState(event.state, historyStateKey);\n hasIntraDashboardHistoryRef.current = nextView !== 'dashboard';\n updateView(nextView);\n };\n\n window.addEventListener('popstate', handlePopState);\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [historyAdapter, historyStateKey, readCurrentView, resetToDashboardOnMount, updateView, writeCurrentView]);\n\n const handleOpenFullView = React.useCallback(\n (view: ProductOfferFullViewWidgetType) => {\n hasIntraDashboardHistoryRef.current = true;\n writeCurrentView(view, 'push');\n updateView(view);\n },\n [updateView, writeCurrentView],\n );\n\n const handleBack = React.useCallback(() => {\n if (currentView !== 'dashboard' && hasIntraDashboardHistoryRef.current) {\n if (historyAdapter) {\n historyAdapter.goBack();\n return;\n }\n\n if (typeof window !== 'undefined') {\n window.history.back();\n }\n\n return;\n }\n\n hasIntraDashboardHistoryRef.current = false;\n writeCurrentView('dashboard', 'replace');\n updateView('dashboard');\n }, [currentView, historyAdapter, updateView, writeCurrentView]);\n\n // --- Filter handlers ---\n\n const handleDateRangeChange = React.useCallback(\n (nextDateRange: DateRangeOption) => {\n setDateRange(nextDateRange);\n onDateRangeChange?.(nextDateRange);\n },\n [onDateRangeChange],\n );\n\n const handleMarketChange = React.useCallback(\n (nextMarket: MarketOption) => {\n setMarket(nextMarket);\n onMarketChange?.(nextMarket);\n },\n [onMarketChange],\n );\n\n const handleProductSortChange = React.useCallback(\n (nextProductSort: ProductSortOption) => {\n setProductSort(nextProductSort);\n onProductSortChange?.(nextProductSort);\n },\n [onProductSortChange],\n );\n\n const handleConversionFilterChange = React.useCallback(\n (nextFilter: ConversionFilterOption) => {\n setConversionFilter(nextFilter);\n onConversionFilterChange?.(nextFilter);\n },\n [onConversionFilterChange],\n );\n\n const handleOfferSortChange = React.useCallback(\n (nextSort: OfferSortOption) => {\n setOfferSort(nextSort);\n onOfferSortChange?.(nextSort);\n },\n [onOfferSortChange],\n );\n\n // --- Navigation callbacks ---\n\n const handleProductsTitleClick = React.useCallback(() => {\n handleOpenFullView('products');\n }, [handleOpenFullView]);\n\n const handleConversionTitleClick = React.useCallback(() => {\n handleOpenFullView('conversion-rate');\n }, [handleOpenFullView]);\n\n const handleOffersTitleClick = React.useCallback(() => {\n handleOpenFullView('top-offers');\n }, [handleOpenFullView]);\n\n // --- View rendering ---\n\n if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedAllProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n />\n );\n }\n\n if (currentView === 'conversion-rate') {\n return (\n <ConversionRateFullView\n conversionData={resolvedConversionData}\n orders={resolvedOrders}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onConversionFilterChange={handleConversionFilterChange}\n />\n );\n }\n\n if (currentView === 'top-offers') {\n return (\n <TopPerformingOffersFullView\n offers={resolvedAllOffers}\n dateRange={dateRange}\n market={market}\n offerSort={offerSort}\n isLoading={isLoading}\n onBack={handleBack}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onOfferSortChange={handleOfferSortChange}\n />\n );\n }\n\n return (\n <ProductOfferDashboard\n stats={stats}\n topProducts={resolvedTopProducts}\n conversionData={resolvedConversionData}\n topOffers={resolvedTopOffers}\n isLoading={isLoading}\n error={error}\n dashboardTitle={dashboardTitle}\n className={className}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n conversionFilter={conversionFilter}\n offerSort={offerSort}\n onDateRangeChange={handleDateRangeChange}\n onMarketChange={handleMarketChange}\n onProductSortChange={handleProductSortChange}\n onConversionFilterChange={handleConversionFilterChange}\n onOfferSortChange={handleOfferSortChange}\n onProductsTitleClick={handleProductsTitleClick}\n onConversionTitleClick={handleConversionTitleClick}\n onOffersTitleClick={handleOffersTitleClick}\n />\n );\n};\n\nexport default PoDashboardWithNavigation;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport { PageHeader, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { paginateItems, calculateTotalPages } from '../../utils/dataUtils';\nimport { formatDateRangeLabel } from '../../utils/dateFormat';\nimport type { TopPerformingOffer, DateRangeOption, MarketOption, OfferSortOption } from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport {\n SummaryItemRow,\n SummaryItemInfo,\n SummaryItemName,\n SummaryItemSubtext,\n SummaryItemPercentage,\n} from '../TopCategories/CategoriesFullView.styled';\nimport {\n TopSection,\n ChartWrapper,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n SummaryContainer,\n SummaryItem,\n ColorDot,\n SummaryInfo,\n SummaryName,\n SummaryValue,\n SummaryPercentage,\n DesktopTableContainer,\n MobileOffersContainer,\n MobileOfferCard,\n} from './TopPerformingOffersFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\n\nexport interface TopPerformingOffersFullViewProps {\n readonly offers: TopPerformingOffer[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly offerSort: OfferSortOption;\n readonly isLoading?: boolean;\n readonly onBack?: () => void;\n readonly onDateRangeChange?: (range: DateRangeOption) => void;\n readonly onMarketChange?: (market: MarketOption) => void;\n readonly onOfferSortChange?: (sort: OfferSortOption) => void;\n}\n\nfunction parseTrendPercent(value?: string): number | null {\n if (!value) return null;\n const cleanedValue = value.replace('%', '').trim();\n const parsedValue = Number(cleanedValue);\n return Number.isFinite(parsedValue) ? parsedValue : null;\n}\n\nexport const TopPerformingOffersFullView: React.FC<TopPerformingOffersFullViewProps> = ({\n offers,\n dateRange,\n market,\n offerSort,\n isLoading = false,\n onBack,\n onDateRangeChange,\n onMarketChange,\n onOfferSortChange,\n}) => {\n const [currentPage, setCurrentPage] = useState(1);\n const itemsPerPage = 10;\n const isMobileView = useIsMobileViewport();\n\n const handleBack = React.useCallback(() => onBack?.(), [onBack]);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n {\n key: 'dateRange',\n label: getTranslation(Keys.filter.dateRange.label),\n value: dateRange,\n icon: 'calendar',\n options: [\n { value: 'last7days', label: getTranslation(Keys.filter.dateRange.last7days) },\n { value: 'last30days', label: getTranslation(Keys.filter.dateRange.last30days) },\n { value: 'last90days', label: getTranslation(Keys.filter.dateRange.last90days) },\n { value: 'thisMonth', label: getTranslation(Keys.filter.dateRange.thisMonth) },\n ],\n },\n {\n key: 'market',\n label: getTranslation(Keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: [{ value: 'all', label: getTranslation(Keys.filter.market.all) }],\n },\n {\n key: 'sort',\n label: getTranslation(Keys.filter.offerSort.byRevenue),\n value: offerSort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.filter.offerSort.byRevenue) },\n { value: 'units', label: getTranslation(Keys.filter.offerSort.byUnits) },\n ],\n },\n ],\n [dateRange, market, offerSort],\n );\n\n const handleFilterChange = React.useCallback(\n (key: string, value: string) => {\n if (key === 'dateRange') onDateRangeChange?.(value as DateRangeOption);\n else if (key === 'market') onMarketChange?.(value as MarketOption);\n else if (key === 'sort') {\n onOfferSortChange?.(value as OfferSortOption);\n setCurrentPage(1);\n }\n },\n [onOfferSortChange, onDateRangeChange, onMarketChange],\n );\n\n const sortedOffers = React.useMemo(\n () =>\n [...offers].sort((a, b) => {\n if (offerSort === 'revenue') return b.revenue - a.revenue;\n return b.percentage - a.percentage;\n }),\n [offers, offerSort],\n );\n\n const { totalRevenue, totalRevenueTrendDirection, totalRevenueTrend } = React.useMemo(() => {\n const nextTotalRevenue = sortedOffers.reduce((sum, offer) => sum + offer.revenue, 0);\n\n const weightedRevenueTrend = sortedOffers.reduce(\n (accumulator, offer) => {\n const trendValue = parseTrendPercent(offer.trend?.revenue);\n if (trendValue === null) return accumulator;\n\n return {\n weightedSum: accumulator.weightedSum + trendValue * offer.revenue,\n weight: accumulator.weight + offer.revenue,\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const averageRevenueTrend =\n weightedRevenueTrend.weight > 0 ? weightedRevenueTrend.weightedSum / weightedRevenueTrend.weight : 0;\n\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (averageRevenueTrend > 0) direction = 'up';\n else if (averageRevenueTrend < 0) direction = 'down';\n\n const sign = averageRevenueTrend > 0 ? '+' : '';\n const trend = `${sign}${averageRevenueTrend.toFixed(1)}%`;\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: trend,\n };\n }, [sortedOffers]);\n\n const topOffers = React.useMemo(() => sortedOffers.slice(0, 5), [sortedOffers]);\n\n const totalPages = React.useMemo(\n () => calculateTotalPages(sortedOffers, itemsPerPage),\n [itemsPerPage, sortedOffers],\n );\n const paginatedOffers = React.useMemo(\n () => paginateItems(sortedOffers, currentPage, itemsPerPage),\n [currentPage, itemsPerPage, sortedOffers],\n );\n\n const columns: ColumnDef<TopPerformingOffer>[] = React.useMemo(\n () => [\n {\n key: 'name',\n label: getTranslation(Keys.fullView.topOffers.columnName),\n sortable: true,\n render: (_: unknown, row: TopPerformingOffer) => (\n <SummaryItemRow>\n <ColorDot dotColor={row.color} />\n <span>{row.name}</span>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.fullView.topOffers.columnRevenue),\n sortable: true,\n render: (value: unknown) => `$${Number(value).toLocaleString()}`,\n },\n {\n key: 'percentage',\n label: getTranslation(Keys.fullView.topOffers.columnPercentage),\n sortable: true,\n render: (value: unknown) => `${Number(value)}%`,\n },\n {\n key: 'trend',\n label: getTranslation(Keys.fullView.topOffers.columnTrend),\n render: (_: unknown, row: TopPerformingOffer) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noData),\n },\n ],\n [],\n );\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <FullViewChartSkeleton />\n </PageContainer>\n );\n }\n\n if (offers.length === 0) {\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n <EmptyStateText data-testid=\"top-offers-fullview-empty\">\n {getTranslation(Keys.widget.topPerformingOffers.emptyState)}\n </EmptyStateText>\n </PageContainer>\n );\n }\n\n return (\n <PageContainer data-testid=\"top-offers-full-view\">\n <PageHeader\n title={getTranslation(Keys.fullView.topOffers.title)}\n dateRange={formatDateRangeLabel(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <TopSection data-testid=\"top-offers-fullview-top-section\">\n <ChartWrapper data-testid=\"top-offers-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={sortedOffers}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius=\"50%\"\n outerRadius=\"85%\"\n dataKey=\"revenue\"\n nameKey=\"name\"\n paddingAngle={2}\n >\n {sortedOffers.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => `$${value.toLocaleString()}`} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-fullview-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>${totalRevenue.toLocaleString()}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>{totalRevenueTrend}</DonutCenterTrend>\n </DonutCenterOverlay>\n </ChartWrapper>\n\n <SummaryContainer data-testid=\"top-offers-fullview-summary\">\n {topOffers.map((offer) => (\n <SummaryItem key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryInfo>\n <SummaryName>{offer.name}</SummaryName>\n <SummaryValue>${offer.revenue.toLocaleString()}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{offer.percentage}%</SummaryPercentage>\n </SummaryItem>\n ))}\n </SummaryContainer>\n </TopSection>\n\n <TableSection data-testid=\"top-offers-table\">\n <ChartTitle data-testid=\"top-offers-fullview-table-title\">\n {getTranslation(Keys.fullView.topOffers.title)} ({sortedOffers.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer>\n <DataTable\n columns={columns}\n data={paginatedOffers}\n sortable\n getRowKey={(row: TopPerformingOffer) => row.id}\n />\n </DesktopTableContainer>\n ) : (\n <MobileOffersContainer>\n {paginatedOffers.map((offer) => (\n <MobileOfferCard key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryItemInfo>\n <SummaryItemName>{offer.name}</SummaryItemName>\n <SummaryItemSubtext>${offer.revenue.toLocaleString()}</SummaryItemSubtext>\n </SummaryItemInfo>\n <SummaryItemPercentage>{offer.percentage}%</SummaryItemPercentage>\n </MobileOfferCard>\n ))}\n </MobileOffersContainer>\n )}\n {totalPages > 1 && (\n <Pagination\n currentPage={currentPage}\n totalPages={totalPages}\n onPageChange={setCurrentPage}\n itemsPerPage={itemsPerPage}\n totalItems={sortedOffers.length}\n data-testid=\"top-offers-pagination\"\n />\n )}\n </TableSection>\n </PageContainer>\n );\n};\n","import { styled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\nimport { ColorUtils } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const TopSection = styled(Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n }\n`;\n\nexport const ChartWrapper = styled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`;\n\nexport const DonutCenterOverlay = styled(Box)`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n z-index: 1;\n width: 120px;\n`;\n\nexport const DonutCenterLabel = styled(Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const DonutCenterValue = styled(Typography)`\n margin-top: 2px;\n font-size: 1.25rem;\n line-height: 1.2;\n font-weight: 700;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const DonutCenterTrend = styled(Typography)<{ direction: 'up' | 'down' | 'neutral' }>`\n margin-top: 2px;\n font-size: 0.875rem;\n line-height: 1.2;\n font-weight: 600;\n color: ${({ direction, theme }) => {\n if (direction === 'up') return theme.palette.success.main;\n if (direction === 'down') return theme.palette.error.main;\n return theme.palette.text.secondary;\n }};\n`;\n\nexport const SummaryContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`;\n\nexport const SummaryItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n`;\n\nexport const ColorDot = styled(Box)<{ dotColor: string }>`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({ dotColor }) => dotColor};\n flex-shrink: 0;\n`;\n\nexport const SummaryInfo = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`;\n\nexport const SummaryName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`;\n\nexport const SummaryValue = styled(Typography)`\n font-size: 0.75rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n`;\n\nexport const SummaryPercentage = styled(Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`;\n\nexport const DesktopTableContainer = styled(Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`;\n\nexport const MobileOffersContainer = styled(Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`;\n\nexport const MobileOfferCard = styled(Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => theme.palette.divider};\n border-radius: 8px;\n`;\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const FilterContainer = styled('div')`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`;\n\nexport const FilterDropdown = styled('select')`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N40')};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({ theme }) => getGenomeColor(theme, 'N30')};\n }\n\n &:focus {\n border-color: ${({ theme }) => getGenomeColor(theme, 'A70')};\n box-shadow: 0 0 0 3px ${({ theme }) => getGenomeColor(theme, 'A20')};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`;\n\nexport const FilterLabel = styled('label')`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n","import React from 'react';\nimport { FilterContainer, FilterDropdown, FilterLabel } from './FilterBar.styled';\nimport type { FilterConfig } from './types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport interface FilterBarProps {\n readonly filters: FilterConfig[];\n readonly onChange: (filterKey: string, value: string) => void;\n}\n\nexport const FilterBar: React.FC<FilterBarProps> = ({ filters, onChange }) => {\n return (\n <FilterContainer data-testid=\"filter-bar\">\n {filters.map((filter) => (\n <FilterLabel key={filter.key} htmlFor={`filter-${filter.key}`}>\n {filter.label}\n <FilterDropdown\n id={`filter-${filter.key}`}\n value={filter.value}\n onChange={(e) => onChange(filter.key, e.target.value)}\n disabled={filter.disabled}\n aria-label={`${filter.label} ${getTranslation(Keys.ariaLabel.filterSuffix)}`}\n data-testid={`filter-dropdown-${filter.key}`}\n >\n {filter.options.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </FilterDropdown>\n </FilterLabel>\n ))}\n </FilterContainer>\n );\n};\n","import type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n} from '../types.d';\n\nexport const mockStats: DashboardStats = {\n shopTitle: 'My NuSkin Shop',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$9,453',\n volume: '1,211',\n siteVisits: '17,935',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+12.5%',\n volume: '+8.3%',\n siteVisits: '-2.1%',\n },\n};\n\nexport const mockTopProducts: TopProduct[] = [\n {\n id: 'prod-001',\n rank: 1,\n name: 'ageLOC LumiSpa',\n imageUrl: '',\n unitsSold: 342,\n revenue: 29580,\n volume: 245,\n trend: { units: '+15%', revenue: '+12%', volume: '+8%' },\n },\n {\n id: 'prod-002',\n rank: 2,\n name: 'Pharmanex LifePak',\n imageUrl: '',\n unitsSold: 287,\n revenue: 24395,\n volume: 198,\n trend: { units: '+8%', revenue: '+10%', volume: '+5%' },\n },\n {\n id: 'prod-003',\n rank: 3,\n name: 'ageLOC Meta',\n imageUrl: '',\n unitsSold: 256,\n revenue: 21760,\n volume: 176,\n trend: { units: '-3%', revenue: '-1%', volume: '-2%' },\n },\n {\n id: 'prod-004',\n rank: 4,\n name: 'Nu Skin 180 System',\n imageUrl: '',\n unitsSold: 198,\n revenue: 17820,\n volume: 142,\n trend: { units: '+22%', revenue: '+18%', volume: '+15%' },\n },\n {\n id: 'prod-005',\n rank: 5,\n name: 'Epoch Baobab Body Butter',\n imageUrl: '',\n unitsSold: 176,\n revenue: 8800,\n volume: 88,\n trend: { units: '+5%', revenue: '+3%', volume: '+2%' },\n },\n];\n\nexport const mockConversionData: ConversionDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n rate: Number((4 + (i % 15) * 0.1).toFixed(2)),\n orders: 200 + ((i * 13) % 100),\n siteVisits: 4000 + ((i * 97) % 2000),\n };\n});\n\nexport const mockSignupData: SignupDataPoint[] = Array.from({ length: 30 }, (_, i) => {\n const date = new Date('2026-03-01');\n date.setDate(date.getDate() + i);\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n const total = 80 + ((i * 11) % 40);\n const members = Math.floor(total * 0.4);\n const retail = Math.floor(total * 0.35);\n const brandAffiliates = total - members - retail;\n return {\n date: `${months[date.getMonth()]} ${date.getDate()}`,\n total,\n members,\n retail,\n brandAffiliates,\n };\n});\n\nexport const mockCategories: CategoryRevenue[] = [\n {\n id: 'cat-001',\n name: 'Favorites',\n revenue: 45200,\n percentage: 29,\n color: '#C95D63',\n trend: { revenue: '+8%', units: '+10%' },\n },\n {\n id: 'cat-002',\n name: 'Daily Routine',\n revenue: 42100,\n percentage: 27,\n color: '#6C7A9B',\n trend: { revenue: '+12%', units: '+15%' },\n },\n {\n id: 'cat-003',\n name: 'Fit & Trim Body',\n revenue: 34300,\n percentage: 22,\n color: '#E8975E',\n trend: { revenue: '-3%', units: '-1%' },\n },\n {\n id: 'cat-004',\n name: 'Dull Skin',\n revenue: 24900,\n percentage: 16,\n color: '#5F8FC4',\n trend: { revenue: '+5%', units: '+7%' },\n },\n {\n id: 'cat-005',\n name: 'Acne',\n revenue: 9400,\n percentage: 6,\n color: '#A2C3B3',\n trend: { revenue: '+2%', units: '+3%' },\n },\n];\n\nexport const mockOrders: OrderHistory[] = Array.from({ length: 50 }, (_, i) => {\n const firstNames = ['Sarah', 'John', 'Emma', 'Michael', 'Olivia', 'William', 'Ava', 'James'];\n const lastNames = ['Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n orderId: `ORD-${String(10000 + i).padStart(5, '0')}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n customerName: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n customerType: i % 3 === 0 ? 'Retail' : 'Member',\n items: (i % 5) + 1,\n total: Number((50 + ((i * 17) % 200) + (i % 10) * 0.1).toFixed(2)),\n bv: 30 + ((i * 9) % 150),\n };\n});\n\nexport const mockSignupDetails: SignupDetail[] = Array.from({ length: 30 }, (_, i) => {\n const firstNames = ['Alice', 'Bob', 'Carol', 'David', 'Eva', 'Frank', 'Grace', 'Henry'];\n const lastNames = ['Anderson', 'Baker', 'Clark', 'Davis', 'Evans', 'Fisher', 'Grant', 'Hall'];\n const types: ('Member' | 'Retail' | 'Brand Affiliate')[] = ['Member', 'Retail', 'Brand Affiliate'];\n const date = new Date('2026-03-31');\n date.setDate(date.getDate() - (i % 30));\n return {\n id: `SU-${String(1000 + i).padStart(4, '0')}`,\n name: `${firstNames[i % firstNames.length]} ${lastNames[i % lastNames.length]}`,\n date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }),\n type: types[i % types.length],\n email: `${firstNames[i % firstNames.length].toLowerCase()}.${lastNames[i % lastNames.length].toLowerCase()}@example.com`,\n status: i % 4 === 0 ? 'Pending' : 'Active',\n };\n});\n","/**\n * Mock data for the Product Offer Dashboard\n *\n * Used in Storybook stories and tests.\n */\nimport type { ProductOfferDashboardStats, TopPerformingOffer } from '../types.d';\n\n// Re-export existing shopping dashboard mock data for reused widgets\nexport { mockTopProducts, mockConversionData, mockOrders } from './mockDashboardData';\n\n/** Mock Product Offer Dashboard Stats */\nexport const mockProductOfferStats: ProductOfferDashboardStats = {\n shopTitle: 'Performance Overview',\n dateRange: {\n start: '2026-03-01',\n end: '2026-03-31',\n label: 'Mar 1 - Mar 31',\n },\n selectedMarket: 'all',\n metrics: {\n revenue: '$5,208',\n offersPurchased: '285',\n conversionRate: '4.2%',\n },\n trend: {\n revenue: '+2.3%',\n offersPurchased: '+3.7%',\n },\n};\n\n/** Mock Product Offer Stats with positive trend */\nexport const mockProductOfferStatsPositiveTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+5.1%',\n offersPurchased: '+12.5%',\n },\n};\n\n/** Mock Product Offer Stats with negative trend */\nexport const mockProductOfferStatsNegativeTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '-1.8%',\n offersPurchased: '-3.7%',\n },\n};\n\n/** Mock Product Offer Stats with neutral trend */\nexport const mockProductOfferStatsNeutralTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\n/** Mock Product Offer Stats with zero offers (edge case) */\nexport const mockProductOfferStatsZeroOffers: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n metrics: {\n ...mockProductOfferStats.metrics,\n offersPurchased: '0',\n },\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\n/** Mock Top Performing Offers (5 items matching Figma) */\nexport const mockTopOffers: TopPerformingOffer[] = [\n {\n id: 'offer-1',\n name: 'Winter Skincare Bundle',\n revenue: 2800,\n percentage: 29,\n color: '#6B8E7B',\n trend: { revenue: '-4.2%' },\n },\n {\n id: 'offer-2',\n name: 'Supplement Starter Pack',\n revenue: 2500,\n percentage: 27,\n color: '#E8915A',\n trend: { revenue: '+3.1%' },\n },\n {\n id: 'offer-3',\n name: 'Holiday Special Bundle',\n revenue: 2100,\n percentage: 22,\n color: '#C75B5B',\n trend: { revenue: '-1.5%' },\n },\n {\n id: 'offer-4',\n name: 'LumiSpa Cleansing Kit',\n revenue: 1500,\n percentage: 16,\n color: '#5B8EC7',\n trend: { revenue: '+2.8%' },\n },\n {\n id: 'offer-5',\n name: 'Daily Wellness Bundle',\n revenue: 529,\n percentage: 6,\n color: '#9B8EC7',\n trend: { revenue: '+7.2%' },\n },\n];\n","/**\n * Market Constants\n *\n * Centralized market multipliers for revenue/volume calculations.\n */\n\nimport type { MarketOption } from '../types.d';\n\n/** Revenue and volume multipliers for each market */\nexport const MARKET_MULTIPLIERS: Record<MarketOption, number> = {\n all: 1,\n us: 1.2,\n ca: 0.8,\n jp: 1.5,\n kr: 0.9,\n au: 0.7,\n nz: 0.5,\n};\n\n/** Get multiplier for a specific market */\nexport function getMarketMultiplier(market: MarketOption): number {\n return MARKET_MULTIPLIERS[market] ?? 1;\n}\n\n/** Apply market multiplier to a value */\nexport function applyMarketMultiplier(value: number, market: MarketOption): number {\n return Math.round(value * getMarketMultiplier(market));\n}\n\n/** Get human-readable display name for market */\nexport function getMarketDisplayName(market: MarketOption): string {\n const names: Record<MarketOption, string> = {\n all: 'All Markets',\n us: 'US',\n ca: 'Canada',\n jp: 'Japan',\n kr: 'Korea',\n au: 'Australia',\n nz: 'New Zealand',\n };\n return names[market] ?? market;\n}\n"]}
|