@nuskin/react-mysite-elements 1.5.0-ui-fixes.6 → 1.5.0-ui-fixes.8

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/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","../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/translationResolver.ts","../src/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.ts","../src/common/shopping-dashboard/utils/marketOptions.ts","../src/common/shopping-dashboard/shared/StatsCard.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/utils/trendUtils.tsx","../src/common/shopping-dashboard/utils/dataUtils.ts","../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/utils/dateConstants.ts","../src/common/shopping-dashboard/utils/dateFormat.ts","../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/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/TranslationContext.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"],"names":["dc","Object","create","Xo","defineProperty","pc","getOwnPropertyDescriptor","cc","getOwnPropertyNames","uc","getPrototypeOf","gc","prototype","hasOwnProperty","ha","e","t","exports","fc","o","get","enumerable","cn","n","i","call","M","__esModule","value","mc","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","En","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","Un","ReactIs","throwOnDirectAccess","index_exports","__export","CategoriesFullView","ConversionRateChart","ConversionRateFullView","DATE_RANGE_LABELS","DAYS_MAP","DashboardHeader","DataTable","FilterBar","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","TranslationProvider","WidgetMenu","buildDefaultMarketOptions","calculatePercentage","calculateTotalPages","formatDateRange","formatDateRangeLabel","formatDisplayDate","formatISODate","formatShortDate","getDateRangeLabel","getDaysFromDateRange","getTranslation","getTranslationResolver","getTrendColor","getTrendIcon","mockCategories","mockConversionData","mockOrders","mockProductOfferStats","mockSignupData","mockSignupDetails","mockStats","mockTopOffers","mockTopProducts","paginateItems","resolveMarketOptions","resolveTranslation","setTranslationResolver","sortByNumericProperty","useTranslation","useTranslationResolver","__toCommonJS","import_react","require","import_foundation_ui_components","import_foundation_theme","PriceComponent","Bt","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","yn","useState","isButtonHovered","setIsButtonHovered","Cn","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","je","jsxs","onClick","tabIndex","children","jsx","onError","imageSrc","wn","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","_e","so","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","vn","NsTypography","ViewAllLink","$disabled","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","Ao","useRef","An","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","ve","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","Vn","Slider","ref","variant","preventDefault","push","zn","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","Gn","NsCategoryNavigationContainer","jn","div","TabPanel","other","Et","role","hidden","id","ba","propTypes","tr","itemArray","controlledValue","onChange","Jn","internalValue","setInternalValue","Qn","Zn","Tabs","orientation","event","newValue","item","qn","Tab","label","categoryId","findIndex","content","getMinHeight","$hasCategories","ProductTabCarouselContainer","to","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","ni","Ye","isLoadingInitialData","setIsLoadingInitialData","setCategories","isCategoriesLoaded","setIsCategoriesLoaded","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","data","finally","cat","yt","_","ii","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","wt","rr","po","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","minHeight","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","Ct","bi","sx","ArrowDownIcon","va","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","W","Bo","ue","renderBadges","showBadges","expirationDate","totalSavings","badgeClass","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","component","trim","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","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","ut","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","co","StatsRow","WidgetContainer","TwoColumnGrid","ErrorContainer","import_CalendarToday","import_Public","Ue","ColorUtils","getGenomeColor","HeaderContainer","theme","TitleSection","ShopTitle","DateRangeLabel","FiltersSection","FilterDropdownContainer","FilterLabel","StyledSelect","FilterIcon","LoadingIndicatorContainer","DesktopFiltersContainer","StyledCircularProgress","activeResolver","resolver","fallback","result","stats","revenue","visits","trend","increased","decreased","unchanged","details","filter","dateRange","last7days","last30days","last90days","thisMonth","market","all","productSort","signupView","showAll","showMembers","showRetail","showBrandAffiliates","conversionType","standard","subscription","widget","topProducts","viewAll","empty","ariaLabel","titleAriaLabel","sortAriaLabel","noImageAriaLabel","unitsSuffix","revenueSuffix","rank","conversionRate","formula","comparison","chartAriaLabel","filterAriaLabel","tooltipOrders","tooltipVisits","ordersPerSiteVisits","signups","total","totalSignupsInPeriod","noTrendData","topCategories","menu","fullView","viewDetails","exportData","navigation","backToDashboard","backAriaLabel","dashboard","statsRow","dashboardFilters","loadingDashboard","dateRangeFilter","marketFilter","filterSuffix","columns","status","detailsTitle","orderId","customer","items","bv","totalSv","orderDetailsTitle","notAvailable","product","unitsSold","volume","skuPrefix","noProducts","category","percentOfTotal","allCategoriesTitle","noCategoryData","dataTable","noDataAvailable","sortableColumn","pagination","previousPage","nextPage","goToPage","of","defaults","zeroTrend","noValue","noData","noChange","byRevenue","byUnits","byVolume","byTrend","members","retail","brandAffiliates","units","date","dcSv","markets","useMarketOptions","Ii","dateRangeLabel","dateRangeLabelProp","isLoading","onDateRangeChange","onMarketChange","marketOptions","handleDateRangeChange","newDateRange","handleMarketChange","newMarket","handleFilterKeyDown","blur","getDateRangeLabelText","ne","as","Ai","htmlFor","Ni","CalendarTodayIcon","Vi","PublicIcon","find","opt","String","option","import_ShowChart","import_TrendingUp","import_TrendingDown","ke","StatsCardContainer","$layout","SplitTitle","SplitRow","LegendColumn","SplitTrend","direction","LegendCaption","StatsTitle","StatsValueContainer","StatsValue","ValueSubtitleWrapper","StatsSubtitle","TrendContainer","TrendIcon","TrendText","StatsCardHeader","import_Skeleton","SkeletonCard","q","SkeletonHeader","SkeletonRow","StatsCardWrapper","StatsCardHeaderRow","StatsCardBody","StatsCardSubtitle","fo","Skeleton","ProductRowInfo","ProductRowMetrics","ChartMetricRow","ChartMetricTrend","ChartAreaSkeleton","PieChartLayout","PieCircleSkeleton","LegendList","LegendRowWrapper","LegendRowInfo","DashboardLayout","DashboardHeaderRow","DashboardFilterGroup","StatsGrid","WidgetGrid","FullViewLayout","FullViewMetricCard","FullViewMetricCenter","FullViewChartArea","FullViewTableCard","FullViewTableRow","SummaryCardsGrid","StatsCardSkeleton","D","ee","ProductRowSkeleton","ProductsListSkeleton","rowKey","ChartWidgetSkeleton","LegendRowSkeleton","CategoriesPieChartSkeleton","FullViewChartSkeleton","FullViewTableSkeleton","StatsCardComponent","subtitle","caption","layout","trendDirection","trendValue","le","getTrendAriaLabel","directionText","getTrendChartIcon","iconSize","bl","TrendingUpIcon","yl","TrendingDownIcon","xl","ShowChartIcon","hl","memo","displayName","import_ShoppingCart","import_ArrowUpward","import_ArrowDownward","import_Remove","parseTrendPercent","cleanedValue","parsedValue","isFinite","resolveTrendDirection","calculateWeightedRevenueTrend","getRevenue","getTrend","reduce","accumulator","weightedSum","weight","average","formatted","toFixed","getTrendDirectionLabel","gr","wl","ArrowUpwardIcon","Cl","ArrowDownwardIcon","vl","RemoveIcon","itemsPerPage","ceil","currentPage","startIndex","endIndex","sort","a","aVal","bVal","decimalPlaces","usePaginatedItems","totalPages","Va","pageItems","formatMoney","currencyCode","locale","fractionDigits","amount","Intl","NumberFormat","style","currency","minimumFractionDigits","maximumFractionDigits","format","toLocaleString","capitalizeFirstLetter","text","charAt","toUpperCase","fe","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","import_Visibility","import_FileDownload","import_IconButton","StyledIconButton","Wl","Hl","IconButton","widgetId","onFullView","onExport","Ul","anchorEl","setAnchorEl","buttonId","menuId","handleClick","currentTarget","handleClose","handleFullView","handleExport","Ee","size","Gl","MoreVertIcon","Kl","Menu","onClose","MenuListProps","anchorOrigin","vertical","horizontal","transformOrigin","Ha","MenuItem","Wa","ListItemIcon","jl","VisibilityIcon","_a","ListItemText","Yl","FileDownloadIcon","TopSellingProductsListComponent","maxProducts","onSortChange","onTitleClick","handleSortChange","newSort","formatValue","sortBy","getSubtitle","getTrendValue","getTrendDirection","startsWith","J","Ql","Xl","ql","displayedProducts","rankLabel","trendLabel","Zl","ShoppingCartIcon","imageUrl","Jl","import_recharts","Se","ConversionRateContainer","ChartHeader","TitleRow","ChartTitle","FilterDropdown","MetricDisplay","MetricValue","MetricTrend","FormulaDisplay","ChartContainer","TooltipContainer","TooltipLabel","TooltipValue","TooltipDetails","getMonth","getDate","AXIS_MONTH_MAP","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","formatAxisDate","dateStr","parts","start","end","toISOString","calculateDateRangeFromOption","dateRangeOption","today","year","getFullYear","month","startDate","endDate","CHART_MARGIN","AXIS_TICK","LINE_DOT","ACTIVE_DOT","rateTickFormatter","CustomTooltip","active","payload","Y","rate","orders","siteVisits","ConversionRateChartComponent","conversionData","conversionFilter","summaryRate","summaryChangePct","onFilterChange","handleFilterChange","ho","newFilter","noDataText","noChangeText","currentRate","at","trendInfo","latestRate","previousRate","change","percentageChange","formattedChange","formattedData","shortDate","Je","ResponsiveContainer","LineChart","CartesianGrid","strokeDasharray","XAxis","dataKey","tick","tickLine","interval","YAxis","tickFormatter","domain","Line","stroke","strokeWidth","dot","activeDot","He","SignupsContainer","Legend","LegendItem","LegendColor","LegendLabel","SERIES_COLORS","SignupsChartComponent","signupData","onViewChange","handleViewChange","bo","newView","totalSignups","latestTotal","previousTotal","totalLabel","membersLabel","retailLabel","brandAffiliatesLabel","$","we","re","CategoriesContainer","ChartAndLegendContainer","ChartWrapper","DonutCenterOverlay","DonutCenterLabel","DonutCenterValue","DonutCenterTrend","LegendContainer","LegendInfo","LegendName","LegendValue","LegendPercentage","LegendValueWrapper","LegendTrendInline","LegendTrend","TopCategoriesPieChartComponent","categorySort","sortedCategories","Nr","nextSortedCategories","nextTotalRevenue","sum","nextTrendDirection","nextFormattedTrend","totalRevenue","formattedTrend","getTrendGraphIcon","Fs","Ls","renderCustomLabel","cx","cy","midAngle","innerRadius","outerRadius","percentage","RADIAN","PI","radius","x","cos","y","sin","textAnchor","dominantBaseline","Tt","PieChart","Pie","nameKey","paddingAngle","labelLine","Cell","formatter","EMPTY_TOP_PRODUCTS","EMPTY_CONVERSION_DATA","EMPTY_SIGNUP_DATA","EMPTY_CATEGORIES","categoriesSummaryChangePct","onProductSortChange","onSignupViewChange","onConversionFilterChange","onCategorySortChange","onProductsTitleClick","onConversionTitleClick","onSignupsTitleClick","onCategoriesToTitleClick","onProductsExport","onConversionExport","onSignupsExport","onCategoriesExport","resolvedTopProducts","resolvedConversionData","resolvedSignupData","resolvedCategories","Pe","metrics","import_ArrowBack","import_Language","Ne","PageHeaderWrapper","BackButtonWrapper","BackButton","LeftSection","Title","DateRange","MobileDateRange","FilterWrapper","MobileTitleWrapper","MobileTitle","buildDateRangeFilter","keys","options","buildMarketFilter","onBack","filters","renderFilterIcon","iconType","he","Ys","Js","LanguageIcon","js","ArrowBackIcon","it","TableContainer","Table","TableHeader","TableHeaderCell","sortable","TableBody","TableRow","TableCell","EmptyTableCell","SortIconContainer","isActive","onSort","sortColumn","sortDirection","getRowKey","handleSort","columnKey","handleKeyDown","getAriaSort","Ke","column","scope","ad","rd","colSpan","row","rowIndex","render","import_ChevronLeft","import_ChevronRight","ao","PaginationContainer","PageButton","PageInfo","NavButton","onPageChange","totalItems","handlePrevious","handleNext","action","pageNumbers","from","pages","startItem","endItem","goToPageLabel","Re","ChevronLeftIcon","page","ld","ChevronRightIcon","import_styles","sd","PageContainer","Ve","Ae","MetricChartCardSection","shadows","MetricSection","palette","primary","success","main","secondary","ComparisonText","ChartSection","TableSection","withCard","MobileCardName","MobileCardSubtext","MobileCardDetail","MobileCardStatus","warning","fd","ze","Oe","ProductSku","MobileCardsContainer","DesktopTableContainer","MobileProductCard","divider","MobileCardHeader","MobileProductRank","MobileProductDetails","MobileProductName","MobileProductSku","MobileMetricsGrid","MobileMetricItem","MobileMetricLabel","MobileMetricValue","MOBILE_VIEWPORT_QUERY","useIsMobileViewport","Pd","noSsr","mapProductToRow","sku","padStart","dt","setCurrentPage","setSortColumn","setSortDirection","isMobileView","handleBack","productRows","sortedRows","paginatedRows","G","Rd","ConversionTrendChartContainer","Ce","Fe","MobileOrderCard","MobileOrderHeader","MobileCustomerInfo","MobileCustomerName","MobileOrderDate","MobileOrderId","MobileOrderMetrics","MobileOrdersContainer","ChartWithLegendWrapper","ChartLegendContainer","ComparisonTextMobile","OrderIdColumnCell","tt","changePercent","getConversionFilterLabel","conversionFilterLabel","filteredOrders","order","customerType","paginatedOrders","I","getChartColor","flexWrap","_d","Ud","Ze","customerName","Kd","MobileSignupsContainer","Ot","Ft","MobileSignupCard","SignupTrendChartContainer","NameColumnCell","toNumeric","parsed","normalizeSignupDataInput","input","isArray","apiResponse","daily","brandAffiliate","brand_affiliates","brand_affiliate","Lt","normalizedSignupData","point","rawPoint","signupTotal","absoluteChange","first","last","round","hasSignupTrendData","paginatedSignups","R","ep","tp","be","connectNulls","Xd","signup","Wt","SummaryItemRow","SummaryItemInfo","SummaryItemName","SummaryItemSubtext","SummaryItemPercentage","TopSection","Le","muiStyled","$e","SummaryContainer","SummaryItem","ColorDot","dotColor","SummaryInfo","SummaryName","SummaryValue","SummaryPercentage","MobileCategoriesContainer","MobileCategoryCard","SummaryTrendIcon","CategoryNameColumnCell","$t","A","vp","kp","parseFloat","isNaN","totalRevenueTrendDirection","totalRevenueTrend","paginatedCategories","It","translate","tn","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","ie","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","ko","PoDashboardContainer","So","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","sortedOffers","oa","nextSortedOffers","offer","j","Nt","legendTrendDirection","EMPTY_TOP_OFFERS","dashboardTitle","conversionSummaryRate","conversionSummaryChangePct","onOfferSortChange","onOffersTitleClick","resolvedTopOffers","Ge","selectedMarket","$p","ae","oe","SummaryTrend","TableTrendCell","MobileOffersContainer","MobileOfferCard","MobileOfferHeader","MobileOfferName","MobileOfferMetricsGrid","MobileOfferMetricItem","MobileOfferMetricLabel","MobileOfferMetricValue","MobileOfferTrendValue","Vt","paginatedOffers","O","columnTrendDirection","At","summaryTrendDirection","trendPercent","isProductOfferDashboardView","allProducts","allOffers","conversionFullViewData","conversionFullViewRate","conversionFullViewChangePct","initialOfferSort","ge","setOfferSort","resolvedAllProducts","resolvedAllOffers","handleOfferSortChange","handleOffersTitleClick","Jo","To","FilterContainer","Do","setDate","mockConversionDataStandard","mockConversionDataSubscription","months","floor","firstNames","lastNames","toLocaleDateString","day","types","mockProductOfferStatsPositiveTrend","mockProductOfferStatsNegativeTrend","mockProductOfferStatsNeutralTrend","mockProductOfferStatsZeroOffers"],"mappings":"AAAA,yqwFAAa,IAAIA,GAAGC,OAAOC,MAAM,CAAC,IAAIC,GAAGF,OAAOG,cAAc,CAAC,IAAIC,GAAGJ,OAAOK,wBAAwB,CAAC,IAAIC,GAAGN,OAAOO,mBAAmB,CAAC,IAAIC,GAAGR,OAAOS,cAAc,CAACC,GAAGV,OAAOW,SAAS,CAACC,cAAc,CAAC,IAAIC,GAAG,SAACC,E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S,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,0BACNsjB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,yBACNsjB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,wBACNsjB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJ9P,KAAM,wBACNsjB,QAAS,IACTsgB,WAAY,EACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACJ","sourcesContent":["\"use strict\";var dc=Object.create;var Xo=Object.defineProperty;var pc=Object.getOwnPropertyDescriptor;var cc=Object.getOwnPropertyNames;var uc=Object.getPrototypeOf,gc=Object.prototype.hasOwnProperty;var ha=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fc=(e,t)=>{for(var o in t)Xo(e,o,{get:t[o],enumerable:!0})},cn=(e,t,o,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of cc(t))!gc.call(e,i)&&i!==o&&Xo(e,i,{get:()=>t[i],enumerable:!(n=pc(t,i))||n.enumerable});return e};var M=(e,t,o)=>(o=e!=null?dc(uc(e)):{},cn(t||!e||!e.__esModule?Xo(o,\"default\",{value:e,enumerable:!0}):o,e)),mc=e=>cn(Xo({},\"__esModule\",{value:!0}),e);var En=ha((Ku,Bn)=>{\"use strict\";var xc=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";Bn.exports=xc});var Un=ha((Gu,_n)=>{\"use strict\";var bc=En();function Hn(){}function Wn(){}Wn.resetWarningCache=Hn;_n.exports=function(){function e(n,i,l,s,p,x){if(x!==bc){var y=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 y.name=\"Invariant Violation\",y}}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:Wn,resetWarningCache:Hn};return o.PropTypes=o,o}});var Gn=ha((Ju,Kn)=>{\"use strict\";Kn.exports=Un()();var ju,Yu});var ku={};fc(ku,{CategoriesFullView:()=>ea,ConversionRateChart:()=>ro,ConversionRateFullView:()=>vo,DATE_RANGE_LABELS:()=>Ga,DAYS_MAP:()=>Ka,DashboardHeader:()=>go,DataTable:()=>lt,FilterBar:()=>lc,MysiteDashboardWithNavigation:()=>Rp,MysiteHero:()=>ka,NsCategoryNavigation:()=>or,NsProductCard:()=>er,PageHeader:()=>xe,Pagination:()=>st,PoDashboardWithNavigation:()=>rc,ProductCarousel:()=>zo,ProductOfferDashboard:()=>ra,ProductOfferDashboardTranslationKeys:()=>E,ProductTabCarousel:()=>li,ProductsFullView:()=>Co,ShoppingDashboard:()=>Vr,ShoppingDashboardTranslationKeys:()=>r,SignupsChart:()=>Ko,SignupsFullView:()=>qr,StatsCard:()=>vt,TopCategoriesPieChart:()=>Go,TopPerformingOffersFullView:()=>la,TopPerformingOffersPieChart:()=>Yo,TopSellingProductsList:()=>oo,TranslationProvider:()=>Sp,WidgetMenu:()=>nt,buildDefaultMarketOptions:()=>Oa,calculatePercentage:()=>Tl,calculateTotalPages:()=>Aa,formatDateRange:()=>Ya,formatDateRangeLabel:()=>ms,formatDisplayDate:()=>hr,formatISODate:()=>xr,formatShortDate:()=>ja,getDateRangeLabel:()=>mr,getDaysFromDateRange:()=>fs,getTranslation:()=>a,getTranslationResolver:()=>$i,getTrendColor:()=>kl,getTrendIcon:()=>at,mockCategories:()=>sn,mockConversionData:()=>Po,mockOrders:()=>pa,mockProductOfferStats:()=>lo,mockSignupData:()=>ln,mockSignupDetails:()=>dn,mockStats:()=>nn,mockTopOffers:()=>sc,mockTopProducts:()=>da,paginateItems:()=>za,resolveMarketOptions:()=>Fa,resolveTranslation:()=>Kt,setTranslationResolver:()=>uo,sortByNumericProperty:()=>Sl,useTranslation:()=>Tp,useTranslationResolver:()=>no});module.exports=mc(ku);var yn=require(\"react\"),wn=require(\"@nuskin/foundation-ui-components\");var Bt=require(\"@nuskin/foundation-theme\"),un=(0,Bt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,gn=(0,Bt.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`,fn=(0,Bt.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`,mn=(0,Bt.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,hn=(0,Bt.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`,xa=(0,Bt.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,xn=(0,Bt.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`,bn=(0,Bt.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 Cn=require(\"@mui/material\"),je=require(\"react/jsx-runtime\"),hc=({productTitle:e,imageDetails:t,className:o,button:n,onCardClick:i,productStatusBadge:l,directSellerBadge:s,mySitePriceComponent:p,testId:x})=>{let[y,u]=(0,yn.useState)(!1),m=(0,Cn.useMediaQuery)(\"(max-width: 560px)\"),C=c=>{let T=c.target,F=t?.fallbackImage;F&&T.src!==F&&(T.src=F)};return(0,je.jsxs)(gn,{className:o,onClick:i,tabIndex:0,\"data-testid\":\"product-card\",isMobile:m,children:[(0,je.jsx)(fn,{bgColor:t?.bgColor,onError:C,children:t?.imageSrc?(0,je.jsx)(wn.NsImage,{\"data-testid\":x??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,je.jsx)(mn,{alt:\"\"})}),(0,je.jsx)(hn,{title:e,\"data-testid\":\"product-title\",children:e}),s&&(0,je.jsx)(xa,{children:s}),(0,je.jsx)(xa,{children:l}),(0,je.jsx)(un,{children:p}),n?.showButton&&(0,je.jsxs)(xn,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":n.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:n?.disabled??!1,isMobile:m,isHovered:y,onClick:c=>{c.stopPropagation(),n?.disabled||n.onClick?.()},onMouseEnter:()=>{!m&&!n?.disabled&&u(!0)},onMouseLeave:()=>{m||u(!1)},children:[(0,je.jsx)(bn,{className:\"cart-icon\",disabled:n?.disabled,children:(0,je.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,je.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:n?.disabled?\"#999\":\"#ffffff\"})})}),n.buttonText||\"ADD TO CART\"]})]})},er=hc;var Ao=require(\"react\"),Vn=M(require(\"react-slick\")),An=M(require(\"@mui/material/useMediaQuery\"));var zn=require(\"@nuskin/foundation-ui-components\");var _e=require(\"@nuskin/foundation-theme\"),so=M(require(\"@mui/material/Box\")),vn=require(\"@nuskin/foundation-ui-components\"),kn=(0,_e.styled)(so.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`,Sn=(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`,Tn=(0,_e.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,Dn=(0,_e.styled)(so.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`,Pn=(0,_e.styled)(so.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`,Rn=(0,_e.styled)(so.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`,Mn=(0,_e.styled)(so.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`,Nu=(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`,On=(0,_e.styled)(vn.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`,Fn=(0,_e.styled)(\"a\")`\n color: ${({$disabled:e})=>e?\"#999999\":\"#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 ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n pointer-events: ${({$disabled:e})=>e?\"none\":\"auto\"};\n opacity: ${({$disabled:e})=>e?.5:1};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n }\n`,Ln=(0,_e.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,$n=(0,_e.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,In=(0,_e.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,Nn=(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 ve=require(\"react/jsx-runtime\");function zo({entries:e,renderEntry:t,settings:o={},showControlButtons:n=!0,allEntryLabel:i=\"View All\",allEntryLink:l=\"\",categoryName:s,emptyProductMessage:p=\"No Products Available For The Selected Category\",productsCountLabel:x=\"Products\",isInitialDataLoading:y,history:u}){let m=(0,Ao.useRef)(null),C=(0,An.default)(\"(max-width: 560px)\"),c=(0,Ao.useCallback)(()=>{m.current?.slickPrev()},[]),T=(0,Ao.useCallback)(()=>{m.current?.slickNext()},[]),F=t??((k,S)=>(0,ve.jsx)(er,{productTitle:k.productTitle,imageDetails:k.imageDetails,button:k.button,onCardClick:k.onCardClick,productStatusBadge:k.productStatusBadge,directSellerBadge:k.directSeller,mySitePriceComponent:k.mySitePriceComponent},`${k.productTitle}-${S}`)),d={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},h=(e?.length??0)>d.slidesToShow,w=()=>e?.length===0&&!y?(0,ve.jsx)(Ln,{children:p}):C?(0,ve.jsx)(Sn,{children:(0,ve.jsx)(Tn,{children:e.map((k,S)=>k&&F(k,S))})}):(0,ve.jsx)(Vn.default,{...d,ref:m,children:e.map((k,S)=>k&&F(k,S))});return(0,ve.jsxs)(kn,{children:[n&&(0,ve.jsxs)(Dn,{children:[(0,ve.jsxs)($n,{children:[(0,ve.jsxs)(In,{children:[(0,ve.jsx)(Rn,{children:(0,ve.jsxs)(On,{variant:\"body-m\",children:[e?.length??0,\" \",x]})}),!C&&s&&(0,ve.jsx)(Nn,{children:s})]}),(0,ve.jsx)(Pn,{$isMobile:C,children:(0,ve.jsx)(Fn,{$disabled:(e?.length??0)===0,onClick:k=>{k.preventDefault(),(e?.length??0)>0&&u&&u.push(l)},children:i})})]}),!C&&(0,ve.jsx)(Mn,{$isDisabled:!h,children:(0,ve.jsx)(zn.NsCarouselControl,{prev:c,next:T,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),w()]})}var Ye=require(\"react\"),ni=require(\"@mui/material\");var Jn=M(require(\"react\")),Zn=M(require(\"@mui/material/Tabs\")),qn=M(require(\"@mui/material/Tab\")),ba=M(require(\"@mui/material/Box\")),tr=M(Gn());var jn=require(\"@nuskin/foundation-theme\"),Yn=jn.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 Qn=require(\"@mui/material\"),Et=require(\"react/jsx-runtime\");function Xn(e){let{children:t,value:o,index:n,...i}=e;return(0,Et.jsx)(\"div\",{role:\"tabpanel\",hidden:o!==n,id:`vertical-tabpanel-${n}`,\"aria-labelledby\":`vertical-tab-${n}`,...i,children:o===n&&(0,Et.jsx)(ba.default,{className:\"tabPanel\",children:t})})}Xn.propTypes={children:tr.default.node,index:tr.default.number.isRequired,value:tr.default.number.isRequired};var or=({itemArray:e,value:t,onChange:o})=>{let[n,i]=Jn.useState(0),l=(0,Qn.useMediaQuery)(\"(max-width:768px)\"),s=t??n;return(0,Et.jsx)(Yn,{children:(0,Et.jsxs)(ba.default,{className:\"tabContainer\",children:[(0,Et.jsx)(Zn.default,{orientation:l?\"horizontal\":\"vertical\",variant:\"scrollable\",value:s,onChange:(x,y)=>{o?o(x,y):i(y)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(x=>(0,Et.jsx)(qn.default,{label:x.label,className:\"tabStyle\"},x.categoryId))}),e.map(x=>(0,Et.jsx)(Xn,{value:s,index:e.findIndex(y=>y.categoryId===x.categoryId),children:x.content},x.categoryId))]})})};var ii=require(\"@nuskin/foundation-ui-components\");var to=require(\"@nuskin/foundation-theme\"),yc=({isMobile:e,$hasCategories:t})=>e?\"auto\":t?\"800px\":\"auto\",ei=(0,to.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: ${yc};\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`,ti=(0,to.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`,oi=(0,to.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,to.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`,ri=(0,to.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`,ai=(0,to.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var yt=require(\"react/jsx-runtime\"),wc=({allEntryLabel:e,allEntryLink:t,renderEntry:o,settings:n,showControlButtons:i=!0,fetchCategories:l,fetchProducts:s,showCustomCategory:p=!1,emptyProductTabs:x=\"No tabs available\",emptyProductMessage:y,productsCountLabel:u,getCategoryId:m,history:C})=>{let c=(0,ni.useMediaQuery)(\"(max-width:768px)\"),[T,F]=(0,Ye.useState)(!0),[d,h]=(0,Ye.useState)([]),[w,k]=(0,Ye.useState)(!1),[S,N]=(0,Ye.useState)(0),[B,z]=(0,Ye.useState)([]),[H,Z]=(0,Ye.useState)(!1),[V,f]=(0,Ye.useState)(!0),v=(0,Ye.useCallback)(()=>{let g=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');f(g.length===0)},[]);(0,Ye.useEffect)(()=>{H&&v()},[H,v]),(0,Ye.useEffect)(()=>{l().then(g=>{h(g),k(!0)})},[l]),(0,Ye.useEffect)(()=>{if(w)if(d.length>0){let g=d[S]?.categoryId;m&&m(g),Z(!0),s(g).then(z).finally(()=>{Z(!1),F(!1)})}else Z(!1)},[d,S,s,w]);let P=d.map(g=>({label:g.label,content:\"\",categoryId:g.categoryId}));return(0,yt.jsxs)(ei,{isMobile:c,$hasCategories:d.length>0,children:[p&&(P.length>0?(0,yt.jsx)(ti,{isMobile:c,children:(0,yt.jsx)(or,{itemArray:P,value:S,onChange:(g,b)=>N(b)})}):(0,yt.jsx)(ri,{children:x})),(0,yt.jsx)(oi,{isMobile:c,children:H?(0,yt.jsx)(ai,{children:V&&(0,yt.jsx)(ii.NsSpinner,{})}):(0,yt.jsx)(zo,{isInitialDataLoading:T,entries:B,allEntryLabel:e,allEntryLink:t,renderEntry:o?g=>o({...g,productStatusBadge:g.productStatusBadge}):void 0,settings:n,showControlButtons:i,categoryName:d[S]?.label,emptyProductMessage:y,productsCountLabel:u,history:C})})]})},li=wc;var ut=require(\"react\"),ue=require(\"@mui/material\"),Bo=require(\"@nuskin/foundation-ui-components\");var wt=require(\"@nuskin/foundation-theme\"),po=require(\"@mui/material\"),rr=require(\"react/jsx-runtime\"),ya=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),di=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),pi=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),si=e=>({...ya(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\"}}),Cc=e=>({...di(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\"}}),ci=(0,wt.styled)(e=>(0,rr.jsx)(po.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\":ya(o),\".phone-text\":ya(o),\".social-title-text\":{...di(o),marginBottom:\"8px\"},\".social-icons\":{...pi(),paddingBottom:\"8px\"}})),ui=(0,wt.styled)(e=>(0,rr.jsx)(po.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\":si(o),\".phone-text-mobile\":si(o),\".social-title-text-mobile\":Cc(o),\".social-icons-mobile\":{...pi(),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\"}}})),gi=(0,wt.styled)(po.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\"}}),wa=(0,wt.styled)(e=>(0,rr.jsx)(po.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\"},\"&.total-savings-badge\":{backgroundColor:\"#4A6987\",border:\"none\",borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\",backdropFilter:\"none\",\".badge-value\":{color:\"#FFFFFF\"},\"&:hover\":{backgroundColor:\"#4A6987\",transform:\"none\",boxShadow:\"none\"}},\"&.expiration-badge\":{borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\"},\"&: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\"}})),fi=(0,wt.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)\"}}}),mi=(0,wt.styled)(po.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`,hi=(0,wt.styled)(\"span\")`\n line-height: 0.5;\n`,xi=(0,wt.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),Ca=(0,wt.styled)(\"span\")({});var bi=require(\"@mui/material\"),Ct=require(\"react/jsx-runtime\"),yi=({width:e,height:t,backgroundColor:o})=>(0,Ct.jsx)(bi.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:o},\"data-testid\":\"placeholder-image\",children:(0,Ct.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,Ct.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,Ct.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,Ct.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,Ct.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,Ct.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,Ct.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 va=require(\"react/jsx-runtime\"),wi=({width:e=16,height:t=16,className:o=\"\"})=>(0,va.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:o,\"data-testid\":\"arrow-down-icon\",children:(0,va.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function ar(e){if(typeof window>\"u\")return;let t=window.location.href,o={...e},n=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";o.event=n+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(o)}catch(i){console.error(\"Failed to track GTM event:\",i)}}var W=require(\"react/jsx-runtime\"),Ci=(e,t,o)=>{let n=o.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,W.jsx)(hi,{tabIndex:0,children:(0,W.jsx)(Bo.NsImage,{className:o,src:e.imageSrc,alt:e.imageAlt})}):(0,W.jsx)(ue.Box,{className:n,children:(0,W.jsx)(yi,{width:o.includes(\"mobile\")?\"144px\":\"246px\",height:o.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},vi=(e,t,o,n,i)=>{if(!e||!t&&!i)return null;let l=o?\"mobile-badge\":\"tablet-badge\";return(0,W.jsxs)(gi,{className:o?\"mobile-badges\":\"tablet-badges\",children:[i&&(0,W.jsx)(wa,{className:`${l} total-savings-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,W.jsx)(Ca,{className:\"badge-value\",children:i})}),t&&(0,W.jsx)(wa,{className:`${l} expiration-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,W.jsx)(Ca,{className:\"badge-value\",children:t})})]})},vc=(e,t,o,n,i)=>{let{shopTitle:l,socialTitleText:s,email:p,showBadges:x,expirationDate:y,phone:u,totalSavings:m}=e;return(0,W.jsxs)(ue.Box,{className:\"content-mobile\",children:[(0,W.jsx)(ue.Typography,{component:\"h1\",tabIndex:l?.trim()?0:-1,className:\"body-title-mobile\",children:l}),!t&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"social-title-text-mobile\",children:s}),p?.trim()&&nr(\"email\",p,\"email-text-mobile\"),u?.trim()&&nr(\"phone\",u,\"phone-text-mobile\"),(0,W.jsx)(ue.Box,{className:\"social-icons-mobile\",children:o}),vi(x,y??\"\",n,i,m)]})]})},kc=(e,t,o,n,i)=>{let{shopTitle:l,shopDescription:s,socialTitleText:p,email:x,phone:y,showBadges:u,expirationDate:m,totalSavings:C}=e;return(0,W.jsxs)(ue.Box,{className:\"content\",children:[(0,W.jsx)(ue.Typography,{component:\"h1\",tabIndex:l?.trim()?0:-1,className:\"body-title\",children:l}),!t&&(0,W.jsxs)(W.Fragment,{children:[s?.length>480?(0,W.jsx)(ue.Tooltip,{title:s,arrow:!0,children:(0,W.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"body-text\",children:s})}):(0,W.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"body-text\",children:s}),(0,W.jsxs)(ue.Box,{className:\"social-media\",children:[(0,W.jsx)(ue.Typography,{tabIndex:p?.trim()?0:-1,className:\"social-title-text\",children:p}),(0,W.jsxs)(ue.Box,{className:\"social-icons\",children:[o,x?.trim()&&nr(\"email\",x,\"email-text\"),y?.trim()&&nr(\"phone\",y,\"phone-text\")]})]}),vi(u,m??\"\",n,i,C)]})]})},Sc=e=>new Promise((t,o)=>{let n=new Image;n.crossOrigin=\"anonymous\",n.src=e,n.onload=()=>{let i=document.createElement(\"canvas\"),l=i.getContext(\"2d\");if(!l)return o(new Error(\"Canvas not supported\"));i.width=n.width,i.height=n.height,l.drawImage(n,0,0);let p=[l.getImageData(0,0,1,1).data,l.getImageData(n.width-1,0,1,1).data,l.getImageData(0,n.height-1,1,1).data,l.getImageData(n.width-1,n.height-1,1,1).data].every(x=>Array.prototype.slice.call(x)[3]<10);t(p)},n.onerror=()=>o(new Error(\"Failed to load image\"))}),Tc=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(p=>p+p).join(\"\"));let n=Number.parseInt(o.substring(0,2),16),i=Number.parseInt(o.substring(2,4),16),l=Number.parseInt(o.substring(4,6),16),s=220;return n>=s&&i>=s&&l>=s},Dc=(e,t)=>({onClick:()=>{ar({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:o=>{(o.key===\"Enter\"||o.key===\" \")&&(o.preventDefault(),ar({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),nr=(e,t,o)=>{let n=e===\"email\"?\"mailto:\":\"tel:\",i=Dc(e,t);return(0,W.jsx)(ue.Typography,{className:o,children:(0,W.jsx)(xi,{href:`${n}${t}`,...i,children:t})})};function ka({className:e,shopTitle:t,shopDescription:o,socialTitleText:n,imageDetails:i,email:l,phone:s,bannerProps:p,socialIcons:x,expirationDate:y,showBadges:u=!1,totalSavings:m}){let C=(0,ue.useMediaQuery)(\"(max-width: 560px)\"),[c,T]=(0,ut.useState)(!1),[F,d]=(0,ut.useState)(!1),[h,w]=(0,ut.useState)(!1),[k,S]=(0,ut.useState)(!1),N=()=>{d(!F)};(0,ut.useEffect)(()=>{(async()=>{if(i?.imageSrc){let v=await Sc(i.imageSrc);S(v)}else S(!1)})()},[i?.imageSrc]),(0,ut.useEffect)(()=>{w(Tc(p?.backgroundColor))},[p?.backgroundColor]),(0,ut.useEffect)(()=>{let f,v=window.scrollY,P=!1,g=!1,b=0,L=pe=>{let Qe=Date.now();if(P!==pe&&!g){if(Qe-b<100)return;g=!0,P=pe,b=Qe,pe&&d(!1),clearTimeout(f),T(pe),f=setTimeout(()=>{g=!1,pe&&window.scrollY<15&&window.scrollTo({top:C?20:30,behavior:\"smooth\"})},300)}},ce=()=>{let pe=window.scrollY;if(g){v=pe;return}if(Math.abs(pe-v)<.5)return;let pt=pe>v,zt=C?15:25,Ro=C?8:12;pt&&pe>zt&&!P?L(!0):!pt&&pe<Ro&&P&&L(!1),v=pe},de=()=>{let pe=window.scrollY,pt=pe>(C?5:10);P=pt,T(pt),v=pe,b=Date.now()},te=null,Be=0,ot=()=>{te||Date.now()-Be<16||(te=requestAnimationFrame(()=>{ce(),Be=Date.now(),te=null}))};return de(),window.addEventListener(\"scroll\",ot,{passive:!0}),()=>{window.removeEventListener(\"scroll\",ot),te&&cancelAnimationFrame(te),clearTimeout(f)}},[C]);let B=(0,ut.useMemo)(()=>x?.map((f,v)=>(0,W.jsx)(mi,{onClick:g=>{g.preventDefault(),ar({event:\"social_click\",social_platform:f.type,social_url:f.url,click_element:\"social_icon\"}),window.open(f.url,\"_blank\")},children:(0,W.jsx)(Bo.NsLink,{href:f.url,target:\"_blank\",children:(0,W.jsx)(Bo.NsImage,{src:`https://www.google.com/s2/favicons?domain=${f?.url}&sz=24`,alt:`${f.type} icon`,width:\"24\",height:\"24\"},f?.type+v)})},f?.type+v)),[x]),z=`${e} ${c?\"scrolled\":\"\"}`,H={shopTitle:t,shopDescription:o,socialTitleText:n,email:l,phone:s,showBadges:u,expirationDate:y,totalSavings:m},Z=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,V=C&&o&&o.length>Z();return C?(0,W.jsxs)(ui,{className:z,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:k,hasWhiteBackground:h,children:[(0,W.jsxs)(ue.Box,{className:\"image-content-mobile\",children:[Ci(i,p??{},\"bg-image-mobile\"),vc(H,c,B,C,h)]}),!c&&(0,W.jsxs)(ue.Box,{className:\"expandable-description-mobile\",children:[(0,W.jsx)(ue.Typography,{className:`description-content-mobile ${F||!V?\"expanded\":\"collapsed\"}`,children:o}),V&&(0,W.jsx)(fi,{onClick:N,children:(0,W.jsx)(wi,{width:16,height:16,className:`arrow-icon-mobile ${F?\"expanded\":\"\"}`})})]})]}):(0,W.jsxs)(ci,{className:z,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:k,hasWhiteBackground:h,children:[Ci(i,p??{},\"bg-image\"),kc(H,c,B,C,h)]})}var co=require(\"@nuskin/foundation-theme\"),Sa=(0,co.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\n }\n`,ki=(0,co.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`,Si=(0,co.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`,Ta=(0,co.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`,Ti=(0,co.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var Ni=M(require(\"@mui/icons-material/CalendarToday\")),Vi=M(require(\"@mui/icons-material/Public\")),Ai=require(\"@nuskin/foundation-ui-components\");var Ue=require(\"@nuskin/foundation-theme\"),{getGenomeColor:gt}=Ue.ColorUtils,Di=(0,Ue.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px;\n background-color: ${({theme:e})=>gt(e,\"N20\")};\n border-radius: 12px;\n min-height: auto;\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: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\n }\n`,Pi=(0,Ue.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`,Ri=(0,Ue.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>gt(e,\"N100\")};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`,Mi=(0,Ue.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>gt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,Oi=(0,Ue.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n }\n`,Da=(0,Ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`,Pa=(0,Ue.styled)(\"label\")`\n font-size: 14px;\n font-weight: 500;\n line-height: 1.4;\n color: ${({theme:e})=>gt(e,\"N80\")};\n white-space: nowrap;\n display: none;\n margin-bottom: 0 !important;\n\n @media (min-width: 768px) {\n display: block;\n }\n`,Ra=(0,Ue.styled)(\"select\")`\n height: 40px;\n padding: 8px 32px 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})=>gt(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 min-width: 100px;\n max-width: 100%;\n white-space: nowrap;\n flex-shrink: 0;\n\n &:hover {\n background-color: ${({theme:e})=>gt(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>gt(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>gt(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n @media (min-width: 768px) {\n min-width: 140px;\n }\n\n @media (min-width: 1080px) {\n background-color: ${({theme:e})=>gt(e,\"N10\")};\n border: 1px solid ${({theme:e})=>gt(e,\"N40\")};\n border-radius: 8px;\n min-width: 160px;\n }\n`,Ma=(0,Ue.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>gt(e,\"N70\")};\n\n svg {\n width: 16px;\n height: 16px;\n }\n`,Fi=(0,Ue.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`,Li=(0,Ue.styled)(\"div\")`\n display: flex;\n flex-wrap: nowrap;\n gap: 12px;\n align-items: center;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n overflow-x: visible;\n }\n\n @media (min-width: 1080px) {\n gap: 20px;\n }\n`,Pg=(0,Ue.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`;var ir;function uo(e){ir=e}function $i(){return ir}function Kt(e){if(!ir)return e.fallback;let t;try{t=ir(e.key,e.fallback)}catch{t=void 0}return typeof t==\"string\"&&t.length>0?t:e.fallback}var r={title:{key:\"shoppingDashboard.title\",fallback:\"Shop Performance\"},error:{key:\"shoppingDashboard.error\",fallback:\"Error loading dashboard\"},stats:{revenue:{key:\"shoppingDashboard.stats.revenue\",fallback:\"Total Revenue\"},visits:{key:\"shoppingDashboard.stats.visits\",fallback:\"Site Visits\"},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\"}},market:{label:{key:\"shoppingDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"shoppingDashboard.filter.market.all\",fallback:\"All Markets\"}},productSort:{label:{key:\"shoppingDashboard.filter.productSort.label\",fallback:\"Sort By\"}},signupView:{label:{key:\"shoppingDashboard.filter.signupView.label\",fallback:\"Show\"},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\"}},conversionType:{standard:{key:\"shoppingDashboard.filter.conversionType.standard\",fallback:\"Standard\"},subscription:{key:\"shoppingDashboard.filter.conversionType.subscription\",fallback:\"Subscription\"}}},widget:{topProducts:{title:{key:\"shoppingDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},viewAll:{key:\"shoppingDashboard.widget.topProducts.viewAll\",fallback:\"View All Products\"},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\"},rank:{key:\"shoppingDashboard.widget.topProducts.rank\",fallback:\"Rank\"}},conversionRate:{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\"},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\"},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\"},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\"},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\"},viewDetails:{key:\"shoppingDashboard.widget.menu.viewDetails\",fallback:\"View Details\"},exportData:{key:\"shoppingDashboard.widget.menu.exportData\",fallback:\"Export Data\"}}},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\"},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\"},customer:{key:\"shoppingDashboard.fullView.conversionRate.columns.customer\",fallback:\"Customer\"},items:{key:\"shoppingDashboard.fullView.conversionRate.columns.items\",fallback:\"Items\"},total:{key:\"shoppingDashboard.fullView.conversionRate.columns.total\",fallback:\"Order Total\"},bv:{key:\"shoppingDashboard.fullView.conversionRate.columns.bv\",fallback:\"BV\"},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\"},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\"},percentOfTotal:{key:\"shoppingDashboard.fullView.categories.columns.percentOfTotal\",fallback:\"% of Total\"}},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:\"--\"},noData:{key:\"shoppingDashboard.defaults.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.defaults.noChange\",fallback:\"No change\"},byRevenue:{key:\"shoppingDashboard.defaults.byRevenue\",fallback:\"By: Revenue\"},byUnits:{key:\"shoppingDashboard.defaults.byUnits\",fallback:\"By: Units\"},byVolume:{key:\"shoppingDashboard.defaults.byVolume\",fallback:\"By: Volume\"},byTrend:{key:\"shoppingDashboard.defaults.byTrend\",fallback:\"By: Trend\"},all:{key:\"shoppingDashboard.defaults.all\",fallback:\"All\"},members:{key:\"shoppingDashboard.defaults.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.defaults.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.defaults.brandAffiliates\",fallback:\"Brand Affiliates\"},revenue:{key:\"shoppingDashboard.defaults.revenue\",fallback:\"Revenue\"},units:{key:\"shoppingDashboard.defaults.units\",fallback:\"Units\"},volume:{key:\"shoppingDashboard.defaults.volume\",fallback:\"Volume\"},conversionRate:{key:\"shoppingDashboard.defaults.conversionRate\",fallback:\"Conversion Rate\"},trend:{key:\"shoppingDashboard.defaults.trend\",fallback:\"Trend\"},date:{key:\"shoppingDashboard.defaults.date\",fallback:\"Date\"},type:{key:\"shoppingDashboard.defaults.type\",fallback:\"Type\"},dcSv:{key:\"shoppingDashboard.defaults.dcSv\",fallback:\"DC-SV\"}}};function a(e){return Kt(e)}var Ii=require(\"react\");function Oa(){return[{value:\"all\",label:a(r.filter.market.all)}]}function Fa(e){return e&&e.length>0?e:Oa()}function rt(e){return(0,Ii.useMemo)(()=>Fa(e),[e])}var ne=require(\"react/jsx-runtime\"),go=({shopTitle:e,dateRange:t,market:o,dateRangeLabel:n,isLoading:i=!1,stats:l,markets:s,onDateRangeChange:p,onMarketChange:x})=>{let y=rt(s),u=T=>{let F=T.target.value;p?.(F)},m=T=>{let F=T.target.value;x?.(F)},C=T=>{T.key===\"Escape\"&&T.target.blur()},c=()=>n||(l?.dateRange?l.dateRange.label:a(r.filter.dateRange.last30days));return(0,ne.jsxs)(Di,{as:\"header\",\"data-testid\":\"dashboard-header\",children:[(0,ne.jsxs)(Pi,{children:[(0,ne.jsx)(Ri,{\"data-testid\":\"dashboard-shop-title\",children:e??l?.shopTitle??a(r.title)}),(0,ne.jsx)(Mi,{\"aria-live\":\"polite\",\"data-testid\":\"dashboard-date-range-label\",children:c()})]}),(0,ne.jsx)(Oi,{\"aria-label\":a(r.ariaLabel.dashboardFilters),\"data-testid\":\"dashboard-filters-section\",children:(0,ne.jsxs)(Li,{children:[i&&(0,ne.jsx)(Fi,{as:\"output\",\"aria-live\":\"polite\",\"aria-label\":a(r.ariaLabel.loadingDashboard),\"data-testid\":\"dashboard-loading-indicator\",children:(0,ne.jsx)(Ai.NsSpinner,{})}),(0,ne.jsxs)(Da,{children:[(0,ne.jsx)(Pa,{htmlFor:\"filter-date-range\",children:a(r.filter.dateRange.label)}),(0,ne.jsx)(Ma,{\"aria-hidden\":\"true\",children:(0,ne.jsx)(Ni.default,{})}),(0,ne.jsxs)(Ra,{id:\"filter-date-range\",\"data-testid\":\"filter-date-range\",value:t,onChange:u,onKeyDown:C,disabled:i,\"aria-label\":`${a(r.ariaLabel.dateRangeFilter)} ${a(r.filter.dateRange[t])}`,children:[(0,ne.jsx)(\"option\",{value:\"last7days\",children:a(r.filter.dateRange.last7days)}),(0,ne.jsx)(\"option\",{value:\"last30days\",children:a(r.filter.dateRange.last30days)}),(0,ne.jsx)(\"option\",{value:\"last90days\",children:a(r.filter.dateRange.last90days)}),(0,ne.jsx)(\"option\",{value:\"thisMonth\",children:a(r.filter.dateRange.thisMonth)})]})]}),(0,ne.jsxs)(Da,{children:[(0,ne.jsx)(Pa,{htmlFor:\"filter-market\",children:a(r.filter.market.label)}),(0,ne.jsx)(Ma,{\"aria-hidden\":\"true\",children:(0,ne.jsx)(Vi.default,{})}),(0,ne.jsx)(Ra,{id:\"filter-market\",\"data-testid\":\"filter-market\",value:o,onChange:m,onKeyDown:C,disabled:i,\"aria-label\":`${a(r.ariaLabel.marketFilter)} ${y.find(T=>T.value===o)?.label??String(o)}`,children:y.map(T=>(0,ne.jsx)(\"option\",{value:T.value,children:T.label},T.value))})]})]})})]})};var hl=M(require(\"react\")),xl=M(require(\"@mui/icons-material/ShowChart\")),bl=M(require(\"@mui/icons-material/TrendingUp\")),yl=M(require(\"@mui/icons-material/TrendingDown\"));var ke=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ht}=ke.ColorUtils,lr=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({$layout:e})=>e===\"split\"?\"8px\":\"0\"};\n padding: ${({$layout:e})=>e===\"split\"?\"12px\":\"10px\"};\n background-color: ${({theme:e})=>Ht(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Ht(e,\"N30\")};\n border-radius: 8px;\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\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: ${({$layout:e})=>e===\"split\"?\"16px\":\"12px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n\n @media (min-width: 1080px) {\n padding: ${({$layout:e})=>e===\"split\"?\"16px\":\"14px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n`,zi=(0,ke.styled)(\"div\")`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Bi=(0,ke.styled)(\"div\")`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`,Ei=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`,Hi=(0,ke.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#9b131a\":Ht(e,\"N70\")};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`,Wi=(0,ke.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({theme:e})=>Ht(e,\"N70\")};\n`,_i=(0,ke.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`,Ui=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n`,La=(0,ke.styled)(\"div\")`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Ht(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`,Ki=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`,Gi=(0,ke.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({theme:e})=>Ht(e,\"N70\")};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,ji=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\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\":Ht(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`,zg=(0,ke.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`,$a=(0,ke.styled)(\"span\")`\n white-space: nowrap;\n`,Yi=(0,ke.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;var ee=M(require(\"@mui/material/Skeleton\"));var q=require(\"@nuskin/foundation-theme\"),fo=M(require(\"@mui/material/Skeleton\")),sr=(0,q.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`,dr=(0,q.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`,Ji=(0,q.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`,Zi=(0,q.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`,qi=(0,q.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Qi=(0,q.styled)(\"div\")`\n margin-top: 8px;\n`,Xi=(0,q.styled)(fo.default)`\n margin-top: 4px;\n`,el=(0,q.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n`,tl=(0,q.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`,ol=(0,q.styled)(\"div\")`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`,rl=(0,q.styled)(\"div\")`\n padding-top: 4px;\n`,al=(0,q.styled)(fo.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`,nl=(0,q.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`,il=(0,q.styled)(fo.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`,ll=(0,q.styled)(\"div\")`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,sl=(0,q.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`,dl=(0,q.styled)(\"div\")`\n flex: 1;\n`,Pc=(0,q.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`,Rc=(0,q.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`,Mc=(0,q.styled)(\"div\")`\n display: flex;\n gap: 16px;\n`,Oc=(0,q.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`,Fc=(0,q.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`,Ia=(0,q.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,pl=(0,q.styled)(\"div\")`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,cl=(0,q.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`,ul=(0,q.styled)(fo.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`,Na=(0,q.styled)(\"div\")`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,pr=(0,q.styled)(fo.default)`\n border-radius: 4px;\n`,gl=(0,q.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 D=require(\"react/jsx-runtime\"),Eo=()=>(0,D.jsxs)(Zi,{\"data-testid\":\"skeleton-stats-card\",children:[(0,D.jsxs)(qi,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,D.jsx)(ee.default,{variant:\"text\",width:48,height:16})]}),(0,D.jsxs)(Qi,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:120,height:36}),(0,D.jsx)(Xi,{variant:\"text\",width:100,height:16})]})]}),Lc=()=>(0,D.jsxs)(Ji,{children:[(0,D.jsx)(ee.default,{variant:\"rounded\",width:28,height:28}),(0,D.jsx)(ee.default,{variant:\"rounded\",width:50,height:50}),(0,D.jsxs)(el,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:\"70%\",height:18}),(0,D.jsx)(ee.default,{variant:\"text\",width:\"50%\",height:14})]}),(0,D.jsxs)(tl,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:80,height:18}),(0,D.jsx)(ee.default,{variant:\"text\",width:48,height:14})]})]}),fl=()=>(0,D.jsxs)(sr,{\"data-testid\":\"skeleton-products-list\",children:[(0,D.jsxs)(dr,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:160,height:22}),(0,D.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),[\"product-1\",\"product-2\",\"product-3\",\"product-4\",\"product-5\"].map(e=>(0,D.jsx)(Lc,{},e))]}),cr=()=>(0,D.jsxs)(sr,{\"data-testid\":\"skeleton-chart-widget\",children:[(0,D.jsxs)(dr,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,D.jsx)(ee.default,{variant:\"rounded\",width:110,height:32})]}),(0,D.jsxs)(ol,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:100,height:36}),(0,D.jsxs)(rl,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:60,height:18}),(0,D.jsx)(ee.default,{variant:\"text\",width:140,height:14})]})]}),(0,D.jsx)(al,{variant:\"rounded\",width:\"100%\"})]}),$c=()=>(0,D.jsxs)(sl,{children:[(0,D.jsx)(ee.default,{variant:\"circular\",width:12,height:12}),(0,D.jsxs)(dl,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:\"60%\",height:16}),(0,D.jsx)(ee.default,{variant:\"text\",width:\"40%\",height:14})]}),(0,D.jsx)(ee.default,{variant:\"text\",width:36,height:18})]}),ur=()=>(0,D.jsxs)(sr,{\"data-testid\":\"skeleton-categories-pie\",children:[(0,D.jsxs)(dr,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:140,height:22}),(0,D.jsx)(ee.default,{variant:\"rounded\",width:100,height:32})]}),(0,D.jsxs)(nl,{children:[(0,D.jsx)(il,{variant:\"circular\"}),(0,D.jsx)(ll,{children:[\"legend-1\",\"legend-2\",\"legend-3\",\"legend-4\",\"legend-5\"].map(e=>(0,D.jsx)($c,{},e))})]})]});var Gt=()=>(0,D.jsxs)(Ia,{\"data-testid\":\"skeleton-fullview-chart\",children:[(0,D.jsxs)(pl,{children:[(0,D.jsxs)(cl,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:140,height:52}),(0,D.jsx)(ee.default,{variant:\"text\",width:80,height:24}),(0,D.jsx)(ee.default,{variant:\"text\",width:160,height:16})]}),(0,D.jsx)(ul,{variant:\"rounded\",width:\"100%\"})]}),(0,D.jsxs)(Na,{children:[(0,D.jsx)(ee.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,D.jsx)(pr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]}),ml=()=>(0,D.jsxs)(Ia,{\"data-testid\":\"skeleton-fullview-table\",children:[(0,D.jsxs)(gl,{children:[(0,D.jsx)(Eo,{}),(0,D.jsx)(Eo,{}),(0,D.jsx)(Eo,{})]}),(0,D.jsxs)(Na,{children:[(0,D.jsx)(ee.default,{variant:\"text\",width:200,height:24}),(0,D.jsx)(pr,{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,D.jsx)(pr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]});var le=require(\"react/jsx-runtime\"),Ic=({title:e,value:t,subtitle:o,caption:n,layout:i=\"default\",trendDirection:l=\"neutral\",trendValue:s,testId:p,isLoading:x=!1})=>{if(x)return(0,le.jsx)(lr,{$layout:i,\"data-testid\":p,children:(0,le.jsx)(Eo,{})});let y=()=>{let m=a(r.stats.trend.unchanged);return l===\"up\"?m=a(r.stats.trend.increased):l===\"down\"&&(m=a(r.stats.trend.decreased)),`${e} ${m} ${s??\"\"}`},u=m=>l===\"up\"?(0,le.jsx)(bl.default,{sx:{fontSize:m},\"aria-hidden\":\"true\"}):l===\"down\"?(0,le.jsx)(yl.default,{sx:{fontSize:m},\"aria-hidden\":\"true\"}):(0,le.jsx)(xl.default,{sx:{fontSize:m},\"aria-hidden\":\"true\"});return i===\"split\"?(0,le.jsxs)(lr,{as:\"article\",$layout:\"split\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)(zi,{id:`stats-title-${p}`,children:e}),(0,le.jsxs)(Bi,{children:[(0,le.jsx)(La,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),(s??n)&&(0,le.jsxs)(Ei,{children:[s&&(0,le.jsxs)(Hi,{as:\"output\",direction:l,\"aria-live\":\"polite\",\"aria-label\":y(),\"data-testid\":`stats-trend-${p}`,children:[u(\"18px\"),(0,le.jsx)($a,{children:s})]}),n&&(0,le.jsx)(Wi,{\"data-testid\":`stats-caption-${p}`,children:n})]})]})]}):(0,le.jsxs)(lr,{as:\"article\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,le.jsx)(Yi,{children:(0,le.jsx)(_i,{id:`stats-title-${p}`,children:e})}),(0,le.jsxs)(Ui,{children:[(0,le.jsxs)(Ki,{children:[(0,le.jsx)(La,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),o&&(0,le.jsx)(Gi,{\"aria-label\":`${e} ${a(r.stats.details)}: ${o}`,\"data-testid\":`stats-subtitle-${p}`,children:o})]}),s&&(0,le.jsxs)(ji,{as:\"output\",direction:l,\"aria-live\":\"polite\",\"aria-label\":y(),\"data-testid\":`stats-trend-${p}`,children:[u(\"16px\"),(0,le.jsx)($a,{children:s})]})]})]})},vt=hl.default.memo(Ic);vt.displayName=\"StatsCard\";var Jl=M(require(\"react\")),Zl=M(require(\"@mui/icons-material/ShoppingCart\")),ql=M(require(\"@mui/icons-material/ShowChart\")),Ql=M(require(\"@mui/icons-material/TrendingUp\")),Xl=M(require(\"@mui/icons-material/TrendingDown\"));var wl=M(require(\"@mui/icons-material/ArrowUpward\")),Cl=M(require(\"@mui/icons-material/ArrowDownward\")),vl=M(require(\"@mui/icons-material/Remove\"));var gr=require(\"react/jsx-runtime\");function kt(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),o=Number(t);return Number.isFinite(o)?o:null}function jt(e){let t=kt(e);return t===null?\"neutral\":t>0?\"up\":t<0?\"down\":\"neutral\"}function Yt(e,t,o){let{weightedSum:n,weight:i}=e.reduce((p,x)=>{let y=kt(o(x));return y===null?p:{weightedSum:p.weightedSum+y*t(x),weight:p.weight+t(x)}},{weightedSum:0,weight:0}),l=i>0?n/i:0,s=\"neutral\";return l>0?s=\"up\":l<0&&(s=\"down\"),{direction:s,formatted:`${l>0?\"+\":\"\"}${l.toFixed(1)}%`}}function mo(e){return e===\"up\"?a(r.stats.trend.increased):e===\"down\"?a(r.stats.trend.decreased):a(r.stats.trend.unchanged)}function at(e){switch(e){case\"up\":return(0,gr.jsx)(wl.default,{});case\"down\":return(0,gr.jsx)(Cl.default,{});case\"neutral\":default:return(0,gr.jsx)(vl.default,{})}}function kl(e){switch(e){case\"up\":return\"#4caf50\";case\"down\":return\"#f44336\";case\"neutral\":default:return\"#757575\"}}var Va=require(\"react\");function Aa(e,t){return Math.ceil(e.length/t)}function za(e,t,o){let n=(t-1)*o,i=n+o;return e.slice(n,i)}function Sl(e,t,o=\"desc\"){return[...e].sort((n,i)=>{let l=n[t],s=i[t];return o===\"asc\"?l-s:s-l})}function Tl(e,t,o=1){return t===0?\"0.0\":(e/t*100).toFixed(o)}function St(e,t,o){let n=(0,Va.useMemo)(()=>Aa(e,o),[e,o]),i=(0,Va.useMemo)(()=>za(e,t,o),[e,t,o]);return{totalPages:n,pageItems:i}}function Q(e,t,o=\"en-US\",n){let i=Number.isFinite(e)?e:0;if(t)try{return new Intl.NumberFormat(o,{style:\"currency\",currency:t,...n!==void 0?{minimumFractionDigits:n,maximumFractionDigits:n}:{minimumFractionDigits:0,maximumFractionDigits:2}}).format(i)}catch{}return n!==void 0?`$${i.toFixed(n)}`:`$${i.toLocaleString()}`}function Ho(e){return!e||e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var fe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:se}=fe.ColorUtils,fr=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(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`,Ba=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Dl=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Ea=(0,fe.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(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})=>se(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,Pl=(0,fe.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>se(e,\"N20\")};\n border: 1px solid ${({theme:e})=>se(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>se(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>se(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>se(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>se(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Rl=(0,fe.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,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({theme:e})=>se(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})=>se(e,\"N40\")};\n }\n\n &:hover {\n background-color: ${({theme:e})=>se(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`,Ol=(0,fe.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})=>se(e,\"A10\")};\n color: ${({theme:e})=>se(e,\"A80\")};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`,Fl=(0,fe.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`,Ll=(0,fe.styled)(\"div\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({theme:e})=>se(e,\"N40\")};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e})=>se(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`,$l=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`,Il=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>se(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: 16px;\n max-width: none;\n }\n`,Nl=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>se(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Vl=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`,Al=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({theme:e})=>se(e,\"N100\")};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,zl=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":se(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`,Bl=(0,fe.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})=>se(e,\"N70\")};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({theme:e})=>se(e,\"N50\")};\n }\n`,El=(0,fe.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>se(e,\"N70\")};\n`;var Ul=require(\"react\"),Kl=M(require(\"@mui/material/Menu\")),Ha=M(require(\"@mui/material/MenuItem\")),Wa=M(require(\"@mui/material/ListItemIcon\")),_a=M(require(\"@mui/material/ListItemText\")),Gl=M(require(\"@mui/icons-material/MoreVert\")),jl=M(require(\"@mui/icons-material/Visibility\")),Yl=M(require(\"@mui/icons-material/FileDownload\"));var Hl=M(require(\"@mui/material/IconButton\")),Wl=require(\"@nuskin/foundation-theme\"),_l=(0,Wl.styled)(Hl.default)(()=>({padding:\"4px\",color:\"#252525\",\"&:hover\":{backgroundColor:\"rgba(37, 37, 37, 0.08)\"}}));var Ee=require(\"react/jsx-runtime\"),nt=({widgetId:e,onFullView:t,onExport:o})=>{let[n,i]=(0,Ul.useState)(null),l=!!n,s=`widget-menu-button-${e}`,p=`widget-menu-${e}`,x=C=>{i(C.currentTarget)},y=()=>{i(null)},u=()=>{y(),t&&t()},m=()=>{y(),o&&o()};return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsx)(_l,{id:s,\"data-testid\":`widget-menu-button-${e}`,\"aria-label\":a(r.widget.menu.ariaLabel),\"aria-controls\":l?p:void 0,\"aria-haspopup\":\"true\",\"aria-expanded\":l?\"true\":void 0,onClick:x,size:\"small\",children:(0,Ee.jsx)(Gl.default,{fontSize:\"small\"})}),(0,Ee.jsxs)(Kl.default,{id:p,\"data-testid\":`widget-menu-${e}`,anchorEl:n,open:l,onClose:y,MenuListProps:{\"aria-labelledby\":s},anchorOrigin:{vertical:\"bottom\",horizontal:\"right\"},transformOrigin:{vertical:\"top\",horizontal:\"right\"},children:[(0,Ee.jsxs)(Ha.default,{onClick:u,\"data-testid\":\"widget-menu-item-viewdetails\",children:[(0,Ee.jsx)(Wa.default,{children:(0,Ee.jsx)(jl.default,{fontSize:\"small\"})}),(0,Ee.jsx)(_a.default,{children:a(r.widget.menu.viewDetails)})]}),(0,Ee.jsxs)(Ha.default,{onClick:m,\"data-testid\":\"widget-menu-item-export\",children:[(0,Ee.jsx)(Wa.default,{children:(0,Ee.jsx)(Yl.default,{fontSize:\"small\"})}),(0,Ee.jsx)(_a.default,{children:a(r.widget.menu.exportData)})]})]})]})};var J=require(\"react/jsx-runtime\"),Nc=({products:e,productSort:t,isLoading:o=!1,maxProducts:n=5,onSortChange:i,onTitleClick:l,onExport:s})=>{let p=d=>{let h=d.target.value;i?.(h)},x=(d,h)=>{switch(h){case\"units\":return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"revenue\":return Q(d.revenue,d.currencyCode);case\"volume\":return`${d.volume.toLocaleString()} ${a(r.defaults.dcSv)}`;default:return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`}},y=(d,h)=>{switch(h){case\"units\":return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;case\"revenue\":return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"volume\":return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;default:return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`}},u=(d,h)=>{let w=d.trend;if(!w)return\"\";switch(h){case\"units\":return w.units??\"\";case\"revenue\":return w.revenue??\"\";case\"volume\":return w.volume??\"\";default:return w.units??\"\"}},m=(d,h)=>{let w=u(d,h);return w?w.startsWith(\"+\")?\"up\":w.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\"},C=d=>d===\"up\"?(0,J.jsx)(Ql.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):d===\"down\"?(0,J.jsx)(Xl.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):(0,J.jsx)(ql.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}),c=e.slice(0,n),T=a(r.widget.topProducts.rank),F=a(r.defaults.trend);return o&&e.length===0?(0,J.jsx)(fr,{\"data-testid\":\"widget-top-products\",children:(0,J.jsx)(fl,{})}):e.length===0?(0,J.jsxs)(fr,{\"data-testid\":\"widget-top-products\",children:[(0,J.jsx)(Ba,{children:(0,J.jsx)(Ea,{children:a(r.widget.topProducts.title)})}),(0,J.jsxs)(Bl,{\"data-testid\":\"products-empty-state\",children:[(0,J.jsx)(Zl.default,{}),(0,J.jsx)(El,{children:a(r.widget.topProducts.empty)})]})]}):(0,J.jsxs)(fr,{as:\"section\",\"data-testid\":\"widget-top-products\",\"aria-label\":a(r.widget.topProducts.ariaLabel),children:[(0,J.jsxs)(Ba,{children:[(0,J.jsx)(Ea,{as:\"button\",onClick:l,\"aria-label\":a(r.widget.topProducts.titleAriaLabel),\"data-testid\":\"widget-title-top-products\",children:a(r.widget.topProducts.title)}),(0,J.jsxs)(Dl,{children:[(0,J.jsxs)(Pl,{id:\"product-sort\",\"data-testid\":\"product-sort-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":a(r.widget.topProducts.sortAriaLabel),children:[(0,J.jsx)(\"option\",{value:\"units\",children:a(r.defaults.byUnits)}),(0,J.jsx)(\"option\",{value:\"revenue\",children:a(r.defaults.byRevenue)}),(0,J.jsx)(\"option\",{value:\"volume\",children:a(r.defaults.byVolume)})]}),(0,J.jsx)(nt,{widgetId:\"top-products\",onFullView:l,onExport:s})]})]}),(0,J.jsx)(Rl,{as:\"ul\",\"data-testid\":\"products-list\",children:c.map((d,h)=>{let w=m(d,t),k=u(d,t);return(0,J.jsxs)(Ml,{as:\"li\",\"data-testid\":`product-item-${h}`,\"aria-label\":`${T} ${d.rank}: ${d.name}, ${x(d,t)}`,children:[(0,J.jsx)(Ol,{\"aria-label\":`${T} ${d.rank}`,children:d.rank}),d.imageUrl?(0,J.jsx)(Fl,{src:d.imageUrl,alt:d.name,loading:\"lazy\",onError:S=>{S.currentTarget.hidden=!0}}):(0,J.jsx)(Ll,{\"aria-label\":a(r.widget.topProducts.noImageAriaLabel),children:d.name.substring(0,2).toUpperCase()}),(0,J.jsxs)($l,{children:[(0,J.jsx)(Il,{title:d.name,children:d.name}),(0,J.jsx)(Nl,{children:y(d,t)})]}),(0,J.jsxs)(Vl,{children:[(0,J.jsx)(Al,{children:x(d,t)}),k&&(0,J.jsxs)(zl,{as:\"output\",direction:w,\"aria-live\":\"polite\",\"aria-label\":`${F}: ${mo(w)} ${k}`,children:[C(w),(0,J.jsx)(\"span\",{children:k})]})]})]},d.id)})})]})},oo=Jl.default.memo(Nc);oo.displayName=\"TopSellingProductsList\";var ho=M(require(\"react\")),Je=require(\"recharts\");var Se=require(\"@nuskin/foundation-theme\"),{getGenomeColor:me}=Se.ColorUtils,Ua=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>me(e,\"N20\")};\n border: 1px solid ${({theme:e})=>me(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`,es=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,ts=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,os=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,rs=(0,Se.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>me(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})=>me(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,as=(0,Se.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>me(e,\"N20\")};\n border: 1px solid ${({theme:e})=>me(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>me(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>me(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>me(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>me(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,ns=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,is=(0,Se.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>me(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,ls=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":me(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>me(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,ss=(0,Se.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>me(e,\"N100\")};\n margin-bottom: 8px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`,ds=(0,Se.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})=>me(e,\"N40\")};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({theme:e})=>me(e,\"N70\")};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`,ps=(0,Se.styled)(\"div\")`\n background-color: ${({theme:e})=>me(e,\"N100\")};\n border: 1px solid ${({theme:e})=>me(e,\"N40\")};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`,cs=(0,Se.styled)(\"div\")`\n font-size: 11px;\n font-weight: 600;\n color: ${({theme:e})=>me(e,\"N10\")};\n margin-bottom: 4px;\n`,us=(0,Se.styled)(\"div\")`\n font-size: 13px;\n font-weight: 700;\n color: ${({theme:e})=>me(e,\"A10\")};\n`,gs=(0,Se.styled)(\"div\")`\n font-size: 10px;\n font-weight: 400;\n color: ${({theme:e})=>me(e,\"N30\")};\n margin-top: 2px;\n`;var Ka={last7days:7,last30days:30,last90days:90,thisMonth:31},Ga={last7days:\"Last 7 Days\",last30days:\"Last 30 Days\",last90days:\"Last 90 Days\",thisMonth:\"This Month\"};function fs(e){return Ka[e]??30}function mr(e){return Ga[e]??\"Last 30 Days\"}function ms(e){return mr(e)}function ja(e){return`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][e.getMonth()]} ${e.getDate()}`}var Vc={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};function br(e){let t=e.split(\" \");return t.length!==2?e:`${Vc[t[0]]||t[0]}/${t[1]}`}function hr(e){let t=new Date(e);return ja(t)}function Ya(e,t){return`${hr(e)} - ${hr(t)}`}function xr(e){return e.toISOString().split(\"T\")[0]}function Te(e){let t=new Date,o=t.getFullYear(),n=t.getMonth(),i=t.getDate(),l,s=new Date(o,n,i);switch(e){case\"last7days\":l=new Date(o,n,i-7);break;case\"last30days\":l=new Date(o,n,i-30);break;case\"last90days\":l=new Date(o,n,i-90);break;case\"thisMonth\":l=new Date(o,n,1),s=new Date(o,n+1,0);break;default:return\"N/A\"}return Ya(xr(l),xr(s))}var Y=require(\"react/jsx-runtime\"),Ac={top:5,right:10,left:-10,bottom:5},hs={fontSize:10},zc={r:3,fill:\"#3B82F6\"},Bc={r:5},Ec=e=>`${e}%`,Hc=({active:e,payload:t})=>{if(!e||!t?.length)return null;let o=t[0].payload;return(0,Y.jsxs)(ps,{children:[(0,Y.jsx)(cs,{children:o.date}),(0,Y.jsxs)(us,{children:[(o.rate??0).toFixed(2),\"%\"]}),(0,Y.jsxs)(gs,{children:[o.orders??0,\" \",a(r.widget.conversionRate.tooltipOrders),\" /\",\" \",(o.siteVisits??0).toLocaleString(),\" \",a(r.widget.conversionRate.tooltipVisits)]})]})},Wc=({conversionData:e,conversionFilter:t,isLoading:o=!1,title:n,summaryRate:i,summaryChangePct:l,onFilterChange:s,onTitleClick:p,onExport:x})=>{let y=ho.default.useCallback(d=>{let h=d.target.value;s?.(h)},[s]),u=a(r.defaults.noData),m=a(r.defaults.noChange),C=ho.default.useMemo(()=>typeof i==\"number\"&&Number.isFinite(i)?i:e.at(-1)?.rate??0,[i,e]),c=ho.default.useMemo(()=>{if(l!==void 0){if(l===null||Math.abs(l)<.1)return{direction:\"neutral\",value:m};let B=l>0?\"up\":\"down\",z=`${l>0?\"+\":\"\"}${l.toFixed(2)}%`;return{direction:B,value:z}}if(e.length<2)return{direction:\"neutral\",value:u};let d=e.at(-1)?.rate??0,h=e[0].rate;if(h===0)return{direction:\"neutral\",value:m};let w=d-h,k=w/h*100;if(Math.abs(k)<.1)return{direction:\"neutral\",value:m};let S=w>0?\"up\":\"down\",N=`${w>0?\"+\":\"\"}${w.toFixed(2)}%`;return{direction:S,value:N}},[l,e,m,u]),T=ho.default.useMemo(()=>e.map(d=>({...d,shortDate:br(d.date)})),[e]);if(o&&e.length===0)return(0,Y.jsx)(Ua,{\"data-testid\":\"widget-conversion-rate\",children:(0,Y.jsx)(cr,{})});let F=a(r.widget.conversionRate.chartAriaLabel);return(0,Y.jsxs)(Ua,{as:\"section\",\"data-testid\":\"widget-conversion-rate\",\"aria-label\":F,children:[(0,Y.jsx)(es,{children:(0,Y.jsxs)(ts,{children:[(0,Y.jsx)(rs,{as:\"button\",onClick:p,\"aria-label\":a(r.widget.conversionRate.titleAriaLabel),\"data-testid\":\"widget-title-conversion-rate\",children:n??a(r.defaults.conversionRate)}),(0,Y.jsxs)(os,{children:[(0,Y.jsxs)(as,{id:\"conversion-filter\",\"data-testid\":\"conversion-filter-dropdown\",value:t,onChange:y,disabled:o,\"aria-label\":a(r.widget.conversionRate.filterAriaLabel),children:[(0,Y.jsx)(\"option\",{value:\"all\",children:a(r.defaults.all)}),(0,Y.jsx)(\"option\",{value:\"standard\",children:a(r.filter.conversionType.standard)}),(0,Y.jsx)(\"option\",{value:\"subscription\",children:a(r.filter.conversionType.subscription)})]}),(0,Y.jsx)(nt,{widgetId:\"conversion-rate\",onFullView:p,onExport:x})]})]})}),(0,Y.jsxs)(ns,{children:[(0,Y.jsxs)(is,{\"aria-label\":`${a(r.defaults.conversionRate)}: ${C.toFixed(2)}%`,\"data-testid\":\"conversion-metric-value\",children:[C.toFixed(2),\"%\"]}),c.value!==u&&(0,Y.jsxs)(ls,{as:\"output\",direction:c.direction,\"aria-live\":\"polite\",\"aria-label\":`${mo(c.direction)} ${c.value}`,\"data-testid\":\"conversion-metric-trend\",children:[(0,Y.jsxs)(\"div\",{className:\"trend-line\",children:[(0,Y.jsx)(\"span\",{\"aria-hidden\":\"true\",children:at(c.direction)}),(0,Y.jsx)(\"span\",{className:\"change-value\",children:c.value.replace(\"%\",\"\")}),(0,Y.jsx)(\"span\",{className:\"change-percent\",children:\"%\"})]}),(0,Y.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,Y.jsx)(ss,{\"data-testid\":\"conversion-formula\",children:a(r.widget.conversionRate.formula)}),(0,Y.jsx)(ds,{\"data-testid\":\"conversion-chart\",children:(0,Y.jsx)(Je.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,Y.jsxs)(Je.LineChart,{data:T,margin:Ac,children:[(0,Y.jsx)(Je.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,Y.jsx)(Je.XAxis,{dataKey:\"shortDate\",tick:hs,tickLine:!1,interval:\"preserveStartEnd\"}),(0,Y.jsx)(Je.YAxis,{tick:hs,tickLine:!1,tickFormatter:Ec,domain:[\"dataMin - 0.5\",\"dataMax + 0.5\"]}),(0,Y.jsx)(Je.Tooltip,{content:Hc}),(0,Y.jsx)(Je.Line,{type:\"monotone\",dataKey:\"rate\",stroke:\"#3B82F6\",strokeWidth:2,dot:zc,activeDot:Bc})]})})})]})},ro=ho.default.memo(Wc);ro.displayName=\"ConversionRateChart\";var bo=M(require(\"react\")),we=require(\"recharts\");var He=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Ie}=He.ColorUtils,Ja=(0,He.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>Ie(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Ie(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`,xs=(0,He.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,bs=(0,He.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,ys=(0,He.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>Ie(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})=>Ie(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,ws=(0,He.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>Ie(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Ie(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Ie(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Ie(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>Ie(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>Ie(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Cs=(0,He.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,vs=(0,He.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Ie(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,ks=(0,He.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":Ie(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>Ie(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,Ss=(0,He.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})=>Ie(e,\"N40\")};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({theme:e})=>Ie(e,\"N70\")};\n font-size: 10px;\n }\n`,Ts=(0,He.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`,Wo=(0,He.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})=>Ie(e,\"N30\")};\n }\n`,_o=(0,He.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Uo=(0,He.styled)(\"span\")`\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>Ie(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;var $=require(\"react/jsx-runtime\"),ft={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#CBD6E0\"},_c={top:5,right:10,left:-10,bottom:5},Ds={fontSize:10},xo={r:2},Uc=({signupData:e,signupView:t,isLoading:o=!1,title:n,onViewChange:i,onTitleClick:l,onExport:s})=>{let p=bo.default.useCallback(h=>{let w=h.target.value;i?.(w)},[i]),x=a(r.defaults.noData),y=a(r.defaults.noChange),u=bo.default.useMemo(()=>e.length===0?0:e[e.length-1].total,[e]),m=bo.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:x};let h=e[e.length-1].total,w=e[0].total,k=h-w,S=k/w*100;if(Math.abs(S)<.1)return{direction:\"neutral\",value:y};let N=k>0?\"up\":\"down\",B=`${k>0?\"+\":\"\"}${k} (${S.toFixed(1)}%)`;return{direction:N,value:B}},[y,x,e]),C=bo.default.useMemo(()=>e.map(h=>({...h,shortDate:br(h.date)})),[e]),c=a(r.widget.signups.total),T=a(r.defaults.members),F=a(r.defaults.retail),d=a(r.defaults.brandAffiliates);return o&&e.length===0?(0,$.jsx)(Ja,{\"data-testid\":\"widget-signups\",children:(0,$.jsx)(cr,{})}):(0,$.jsxs)(Ja,{as:\"section\",\"data-testid\":\"widget-signups\",\"aria-label\":a(r.widget.signups.chartAriaLabel),children:[(0,$.jsxs)(xs,{children:[(0,$.jsx)(ys,{as:\"button\",onClick:l,\"aria-label\":a(r.widget.signups.titleAriaLabel),\"data-testid\":\"widget-title-signups\",children:n??a(r.widget.signups.title)}),(0,$.jsxs)(bs,{children:[(0,$.jsxs)(ws,{id:\"signup-view\",\"data-testid\":\"signup-view-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":a(r.widget.signups.filterAriaLabel),children:[(0,$.jsx)(\"option\",{value:\"all\",children:a(r.filter.signupView.showAll)}),(0,$.jsx)(\"option\",{value:\"members\",children:a(r.filter.signupView.showMembers)}),(0,$.jsx)(\"option\",{value:\"retail\",children:a(r.filter.signupView.showRetail)}),(0,$.jsx)(\"option\",{value:\"brandAffiliates\",children:a(r.filter.signupView.showBrandAffiliates)})]}),(0,$.jsx)(nt,{widgetId:\"signups\",onFullView:l,onExport:s})]})]}),(0,$.jsxs)(Cs,{\"data-testid\":\"signups-metric-display\",children:[(0,$.jsx)(vs,{\"data-testid\":\"signups-metric-value\",\"aria-label\":`${c}: ${u.toLocaleString()}`,children:u.toLocaleString()}),m.value!==x&&(0,$.jsxs)(ks,{as:\"output\",\"data-testid\":\"signups-metric-trend\",direction:m.direction,\"aria-live\":\"polite\",\"aria-label\":`${mo(m.direction)} ${m.value}`,children:[(0,$.jsxs)(\"div\",{className:\"trend-line\",children:[(0,$.jsx)(\"span\",{\"aria-hidden\":\"true\",children:at(m.direction)}),(0,$.jsx)(\"span\",{className:\"change-value\",children:m.value.split(\" \")[0]}),(0,$.jsx)(\"span\",{className:\"change-percent\",children:m.value.split(\" \")[1]})]}),(0,$.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,$.jsx)(Ss,{\"data-testid\":\"signups-chart\",children:(0,$.jsx)(we.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,$.jsxs)(we.LineChart,{data:C,margin:_c,children:[(0,$.jsx)(we.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,$.jsx)(we.XAxis,{dataKey:\"shortDate\",tick:Ds,tickLine:!1,interval:\"preserveStartEnd\"}),(0,$.jsx)(we.YAxis,{tick:Ds,tickLine:!1}),(0,$.jsx)(we.Tooltip,{}),(t===\"all\"||t===\"members\")&&(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:t===\"all\"?\"total\":\"members\",stroke:t===\"all\"?ft.total:ft.members,strokeWidth:2,dot:xo,name:t===\"all\"?c:T}),t===\"all\"&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:\"members\",stroke:ft.members,strokeWidth:2,dot:xo,name:T}),(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:\"retail\",stroke:ft.retail,strokeWidth:2,dot:xo,name:F}),(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:ft.brandAffiliates,strokeWidth:2,dot:xo,name:d})]}),t===\"retail\"&&(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:\"retail\",stroke:ft.retail,strokeWidth:2,dot:xo,name:F}),t===\"brandAffiliates\"&&(0,$.jsx)(we.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:ft.brandAffiliates,strokeWidth:2,dot:xo,name:d})]})})}),t===\"all\"&&(0,$.jsxs)(Ts,{\"data-testid\":\"signups-legend\",children:[(0,$.jsxs)(Wo,{\"data-testid\":\"legend-total\",children:[(0,$.jsx)(_o,{color:ft.total}),(0,$.jsx)(Uo,{children:c})]}),(0,$.jsxs)(Wo,{\"data-testid\":\"legend-members\",children:[(0,$.jsx)(_o,{color:ft.members}),(0,$.jsx)(Uo,{children:T})]}),(0,$.jsxs)(Wo,{\"data-testid\":\"legend-retail\",children:[(0,$.jsx)(_o,{color:ft.retail}),(0,$.jsx)(Uo,{children:F})]}),(0,$.jsxs)(Wo,{\"data-testid\":\"legend-brandAffiliates\",children:[(0,$.jsx)(_o,{color:ft.brandAffiliates}),(0,$.jsx)(Uo,{children:d})]})]})]})},Ko=bo.default.memo(Uc);Ko.displayName=\"SignupsChart\";var Nr=M(require(\"react\")),Tt=require(\"recharts\"),Fs=M(require(\"@mui/icons-material/TrendingUp\")),Ls=M(require(\"@mui/icons-material/TrendingDown\"));var re=require(\"@nuskin/foundation-theme\"),{getGenomeColor:De}=re.ColorUtils,Jt=(0,re.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`,yo=(0,re.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,yr=(0,re.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,wo=(0,re.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,wr=(0,re.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`,Cr=(0,re.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`,vr=(0,re.styled)(\"div\")`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`,kr=(0,re.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`,Sr=(0,re.styled)(\"div\")`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>De(e,\"N70\")};\n`,Tr=(0,re.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`,Dr=(0,re.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\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\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Pr=(0,re.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`,Rr=(0,re.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({theme:e})=>De(e,\"N30\")};\n }\n`,Mr=(0,re.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Or=(0,re.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`,Fr=(0,re.styled)(\"div\")`\n font-size: 13px;\n font-weight: 600;\n color: ${({theme:e})=>De(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Lr=(0,re.styled)(\"div\")`\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>De(e,\"N100\")};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Ps=(0,re.styled)(\"div\")`\n display: none;\n`,Rs=(0,re.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`,Ms=(0,re.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Os=(0,re.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,$r=(0,re.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`,Ir=(0,re.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>De(e,\"N70\")};\n`;var _=require(\"react/jsx-runtime\"),Kc=({categories:e,categorySort:t,isLoading:o=!1,title:n,summaryChangePct:i,onSortChange:l,onTitleClick:s,onExport:p})=>{let x=Nr.default.useCallback(d=>{let h=d.target.value;l?.(h)},[l]),{sortedCategories:y,totalRevenue:u,trendDirection:m,formattedTrend:C}=Nr.default.useMemo(()=>{let d=[...e].sort((S,N)=>t===\"revenue\"?N.revenue-S.revenue:(kt(N.trend?.revenue)??-1/0)-(kt(S.trend?.revenue)??-1/0)),h=d.reduce((S,N)=>S+N.revenue,0),w,k;if(i!=null)Math.abs(i)<.1?(k=\"0%\",w=\"neutral\"):(w=i>0?\"up\":\"down\",k=`${i>0?\"+\":\"\"}${i.toFixed(1)}%`);else{let{direction:S,formatted:N}=Yt(d,B=>B.revenue,B=>B.trend?.revenue);w=S,k=N}return{sortedCategories:d,totalRevenue:h,trendDirection:w,formattedTrend:k}},[e,t,i]),c=d=>d===\"up\"?(0,_.jsx)(Fs.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):d===\"down\"?(0,_.jsx)(Ls.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):null,T=d=>{let{cx:h,cy:w,midAngle:k,innerRadius:S,outerRadius:N,percentage:B}=d,z=Math.PI/180,H=S+(N-S)/2,Z=h+H*Math.cos(-k*z),V=w+H*Math.sin(-k*z);return(0,_.jsx)(\"text\",{x:Z,y:V,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"central\",fontSize:\"10\",fontWeight:\"600\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0.2\",style:{lineHeight:\"12px\"},children:`${B}%`})},F=y[0]?.currencyCode;return o&&e.length===0?(0,_.jsx)(Jt,{\"data-testid\":\"widget-top-categories\",children:(0,_.jsx)(ur,{})}):e.length===0?(0,_.jsxs)(Jt,{\"data-testid\":\"widget-top-categories\",children:[(0,_.jsx)(yo,{children:(0,_.jsx)(wo,{children:n??a(r.widget.topCategories.title)})}),(0,_.jsx)($r,{\"data-testid\":\"categories-empty-state\",children:(0,_.jsx)(Ir,{children:a(r.widget.topCategories.empty)})})]}):(0,_.jsxs)(Jt,{as:\"section\",\"data-testid\":\"widget-top-categories\",\"aria-label\":a(r.widget.topCategories.chartAriaLabel),children:[(0,_.jsxs)(yo,{children:[(0,_.jsx)(wo,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topCategories.titleAriaLabel),\"data-testid\":\"widget-title-top-categories\",children:n??a(r.widget.topCategories.title)}),(0,_.jsxs)(yr,{children:[(0,_.jsxs)(wr,{id:\"category-sort\",\"data-testid\":\"category-sort-dropdown\",value:t,onChange:x,disabled:o,\"aria-label\":a(r.widget.topCategories.sortAriaLabel),children:[(0,_.jsx)(\"option\",{value:\"revenue\",children:a(r.defaults.byRevenue)}),(0,_.jsx)(\"option\",{value:\"trend\",children:a(r.defaults.byTrend)})]}),(0,_.jsx)(nt,{widgetId:\"top-categories\",onFullView:s,onExport:p})]})]}),(0,_.jsxs)(Cr,{children:[(0,_.jsxs)(vr,{\"data-testid\":\"categories-chart\",children:[(0,_.jsx)(Tt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,_.jsxs)(Tt.PieChart,{children:[(0,_.jsx)(Tt.Pie,{data:y,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:T,labelLine:!1,children:y.map(d=>(0,_.jsx)(Tt.Cell,{fill:d.color},`cell-${d.id}`))}),(0,_.jsx)(Tt.Tooltip,{formatter:d=>Q(d,F)})]})}),(0,_.jsxs)(kr,{\"data-testid\":\"categories-donut-center\",children:[(0,_.jsx)(Sr,{children:a(r.stats.revenue)}),(0,_.jsx)(Tr,{children:Q(u,F)}),(0,_.jsxs)(Dr,{direction:m,children:[c(m),(0,_.jsx)(\"span\",{children:C})]})]})]}),(0,_.jsx)(Pr,{\"data-testid\":\"categories-legend-container\",children:y.map((d,h)=>(0,_.jsxs)(Rr,{\"data-testid\":`category-legend-${h}`,children:[(0,_.jsx)(Mr,{color:d.color}),(0,_.jsxs)(Or,{children:[(0,_.jsx)(Fr,{children:d.name.charAt(0).toUpperCase()+d.name.slice(1)}),(0,_.jsxs)(Rs,{children:[(0,_.jsxs)(Lr,{children:[Q(d.revenue,d.currencyCode),\" (\",d.percentage,\"%)\"]}),d.trend?.revenue?(0,_.jsx)(Ms,{direction:jt(d.trend?.revenue),\"data-testid\":`category-legend-trend-${h}`,\"aria-label\":d.trend.revenue,children:c(jt(d.trend?.revenue))}):null]})]})]},d.id))})]})]})},Go=Nr.default.memo(Kc);Go.displayName=\"TopCategoriesPieChart\";var Pe=require(\"react/jsx-runtime\"),Gc=[],jc=[],Yc=[],Jc=[],Vr=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,isLoading:l=!1,error:s,shopTitle:p,className:x,dateRange:y=\"last30days\",market:u=\"all\",productSort:m=\"units\",signupView:C=\"all\",conversionFilter:c=\"all\",categorySort:T=\"revenue\",categoriesSummaryChangePct:F,markets:d,onDateRangeChange:h,onMarketChange:w,onProductSortChange:k,onSignupViewChange:S,onConversionFilterChange:N,onCategorySortChange:B,onProductsTitleClick:z,onConversionTitleClick:H,onSignupsTitleClick:Z,onCategoriesToTitleClick:V,onProductsExport:f,onConversionExport:v,onSignupsExport:P,onCategoriesExport:g})=>{let b=t??Gc,L=o??jc,ce=n??Yc,de=i??Jc;if(s)return(0,Pe.jsx)(Sa,{as:\"main\",className:x,\"aria-label\":a(r.ariaLabel.dashboard),children:(0,Pe.jsxs)(Ti,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Pe.jsxs)(\"strong\",{children:[a(r.error),\":\"]}),\" \",s]})});let te=Be=>Be?Be.startsWith(\"+\")?\"up\":Be.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return(0,Pe.jsxs)(Sa,{as:\"main\",className:x,\"data-testid\":\"shopping-dashboard\",\"aria-label\":a(r.ariaLabel.dashboard),\"aria-busy\":l,children:[(0,Pe.jsx)(go,{shopTitle:p,dateRange:y,market:u,isLoading:l,stats:e,markets:d,onDateRangeChange:h,onMarketChange:w}),(0,Pe.jsxs)(ki,{as:\"section\",\"data-testid\":\"stats-row\",\"aria-label\":a(r.ariaLabel.statsRow),children:[(0,Pe.jsx)(vt,{title:a(r.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:te(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:l}),(0,Pe.jsx)(vt,{title:a(r.defaults.volume),value:e?.metrics?.volume??\"0\",subtitle:a(r.defaults.dcSv),trendDirection:te(e?.trend?.volume),trendValue:e?.trend?.volume,testId:\"stats-card-volume\",isLoading:l}),(0,Pe.jsx)(vt,{title:a(r.stats.visits),value:e?.metrics?.siteVisits??\"0\",subtitle:`${e?.metrics?.conversionRate??\"0%\"} ${a(r.defaults.conversionRate)}`,trendDirection:te(e?.trend?.siteVisits),trendValue:e?.trend?.siteVisits,testId:\"stats-card-visits\",isLoading:l})]}),(0,Pe.jsxs)(Si,{\"data-testid\":\"widget-container\",children:[(0,Pe.jsxs)(Ta,{\"data-testid\":\"widget-row-1\",children:[(0,Pe.jsx)(oo,{products:b,productSort:m,isLoading:l,maxProducts:5,onSortChange:k,onTitleClick:z,onExport:f}),(0,Pe.jsx)(Ko,{signupData:ce,signupView:C,isLoading:l,onViewChange:S,onTitleClick:Z,onExport:P})]}),(0,Pe.jsxs)(Ta,{\"data-testid\":\"widget-row-2\",children:[(0,Pe.jsx)(ro,{conversionData:L,conversionFilter:c,isLoading:l,onFilterChange:N,onTitleClick:H,onExport:v}),(0,Pe.jsx)(Go,{categories:de,categorySort:T,isLoading:l,summaryChangePct:F,onSortChange:B,onTitleClick:V,onExport:g})]})]})]})};var ie=M(require(\"react\"));var dt=M(require(\"react\"));var js=M(require(\"@mui/icons-material/ArrowBack\")),Ys=M(require(\"@mui/icons-material/CalendarToday\")),Js=M(require(\"@mui/icons-material/Language\"));var Ne=require(\"@nuskin/foundation-theme\"),{getGenomeColor:et}=Ne.ColorUtils,$s=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,Is=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n`,Ns=(0,Ne.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})=>et(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})=>et(e,\"N100\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>et(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`,Vs=(0,Ne.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})=>et(e,\"N30\")};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`,As=(0,Ne.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`,zs=(0,Ne.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>et(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Bs=(0,Ne.styled)(\"p\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>et(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n`,Es=(0,Ne.styled)(\"p\")`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>et(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`,Hs=(0,Ne.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`,Ws=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,_s=(0,Ne.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>et(e,\"N70\")};\n\n svg {\n font-size: 16px;\n }\n`,Us=(0,Ne.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})=>et(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})=>et(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>et(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>et(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`,Ks=(0,Ne.styled)(\"div\")`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Gs=(0,Ne.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>et(e,\"N100\")};\n margin: 0;\n`;var he=require(\"react/jsx-runtime\");function Dt(e,t){return{key:\"dateRange\",label:a(t.filter.dateRange.label),value:e,icon:\"calendar\",options:[{value:\"last7days\",label:a(t.filter.dateRange.last7days)},{value:\"last30days\",label:a(t.filter.dateRange.last30days)},{value:\"last90days\",label:a(t.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(t.filter.dateRange.thisMonth)}]}}function Pt(e,t,o){return{key:\"market\",label:a(o.filter.market.label),value:e,icon:\"globe\",options:t.map(n=>({value:n.value,label:n.label}))}}var xe=({title:e,dateRange:t,onBack:o,filters:n,onFilterChange:i})=>{let l=s=>s?(0,he.jsxs)(_s,{children:[s===\"calendar\"&&(0,he.jsx)(Ys.default,{}),s===\"globe\"&&(0,he.jsx)(Js.default,{})]}):null;return(0,he.jsxs)($s,{\"data-testid\":\"page-header\",children:[(0,he.jsx)(Is,{children:(0,he.jsxs)(Ns,{onClick:o,\"aria-label\":a(r.navigation.backAriaLabel),\"data-testid\":\"page-back-button\",type:\"button\",children:[(0,he.jsx)(js.default,{}),(0,he.jsx)(\"span\",{children:a(r.navigation.backToDashboard)})]})}),(0,he.jsx)(Ks,{children:(0,he.jsx)(Gs,{children:e})}),(0,he.jsxs)(Vs,{children:[(0,he.jsxs)(As,{children:[(0,he.jsx)(zs,{\"data-testid\":\"page-header-title\",children:e}),(0,he.jsx)(Bs,{\"data-testid\":\"page-header-date-range\",children:t})]}),n&&n.length>0&&i&&(0,he.jsx)(Hs,{\"data-testid\":\"page-header-filters\",children:n.map(s=>(0,he.jsxs)(Ws,{children:[l(s.icon),(0,he.jsx)(Us,{id:`filter-${s.key}`,value:s.value,onChange:p=>i(s.key,p.target.value),disabled:s.disabled,\"aria-label\":`${s.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${s.key}`,children:s.options.map(p=>(0,he.jsx)(\"option\",{value:p.value,children:s.label&&s.key===\"customerType\"?`${s.label} ${p.label}`:p.label},p.value))})]},s.key))}),(0,he.jsx)(Es,{children:t})]})]})};var rd=M(require(\"@mui/icons-material/ArrowUpward\")),ad=M(require(\"@mui/icons-material/ArrowDownward\"));var it=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Rt}=it.ColorUtils,Zs=(0,it.styled)(\"div\")`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({theme:e})=>Rt(e,\"N30\")};\n`,qs=(0,it.styled)(\"table\")`\n width: 100%;\n border-collapse: collapse;\n`,Qs=(0,it.styled)(\"thead\")`\n background-color: ${({theme:e})=>Rt(e,\"N20\")};\n border-bottom: 2px solid ${({theme:e})=>Rt(e,\"N40\")};\n`,Xs=(0,it.styled)(\"th\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({theme:e})=>Rt(e,\"N20\")};\n color: ${({theme:e})=>Rt(e,\"N70\")};\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})=>Rt(e,\"N20\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Rt(e,\"A70\")};\n outline-offset: -2px;\n }\n`,ed=(0,it.styled)(\"tbody\")``,Za=(0,it.styled)(\"tr\")`\n border-bottom: 1px solid ${({theme:e})=>Rt(e,\"N30\")};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Rt(e,\"N20\")};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`,qa=(0,it.styled)(\"td\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Rt(e,\"N70\")};\n text-align: left;\n`,td=(0,it.styled)(qa)`\n text-align: center;\n`,od=(0,it.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 Ke=require(\"react/jsx-runtime\"),lt=({columns:e,data:t,sortable:o=!1,onSort:n,sortColumn:i,sortDirection:l=\"asc\",getRowKey:s})=>{let p=u=>{if(!o||!n)return;n(u,i===u&&l===\"asc\"?\"desc\":\"asc\")},x=(u,m)=>{(u.key===\"Enter\"||u.key===\" \")&&(u.preventDefault(),p(m))},y=u=>{if(i===u)return l===\"asc\"?\"ascending\":\"descending\"};return(0,Ke.jsx)(Zs,{\"data-testid\":\"data-table\",children:(0,Ke.jsxs)(qs,{children:[(0,Ke.jsx)(Qs,{children:(0,Ke.jsx)(\"tr\",{children:e.map(u=>(0,Ke.jsxs)(Xs,{scope:\"col\",sortable:o&&u.sortable,onClick:()=>u.sortable&&p(u.key),onKeyDown:m=>u.sortable&&x(m,u.key),tabIndex:o&&u.sortable?0:-1,\"aria-sort\":y(u.key),\"aria-label\":`${u.label}${u.sortable?a(r.dataTable.sortableColumn):\"\"}`,\"data-testid\":`table-header-${u.key}`,children:[u.label,o&&u.sortable&&(0,Ke.jsx)(od,{isActive:i===u.key,children:i===u.key&&l===\"desc\"?(0,Ke.jsx)(ad.default,{}):(0,Ke.jsx)(rd.default,{})})]},u.key))})}),(0,Ke.jsx)(ed,{children:t.length===0?(0,Ke.jsx)(Za,{\"data-testid\":\"table-empty-row\",children:(0,Ke.jsx)(td,{colSpan:e.length,children:a(r.dataTable.noDataAvailable)})}):t.map((u,m)=>(0,Ke.jsx)(Za,{\"data-testid\":`table-row-${m}`,children:e.map(C=>(0,Ke.jsx)(qa,{\"data-testid\":`table-cell-${C.key}`,children:C.render?C.render(u[C.key],u):u[C.key]},C.key))},s?s(u,m):m))})]})})};var id=M(require(\"@mui/icons-material/ChevronLeft\")),ld=M(require(\"@mui/icons-material/ChevronRight\"));var ao=require(\"@nuskin/foundation-theme\"),{getGenomeColor:mt}=ao.ColorUtils,nd=(0,ao.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`,Ar=(0,ao.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e,isActive:t})=>t?mt(e,\"A80\"):mt(e,\"N20\")};\n color: ${({theme:e,isActive:t})=>t?\"#ffffff\":mt(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?mt(e,\"A70\"):mt(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>mt(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`,zr=(0,ao.styled)(\"span\")`\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>mt(e,\"N70\")};\n margin: 0 8px;\n`,Qa=(0,ao.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e})=>mt(e,\"N20\")};\n color: ${({theme:e})=>mt(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})=>mt(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>mt(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 Re=require(\"react/jsx-runtime\"),st=({currentPage:e,totalPages:t,onPageChange:o,itemsPerPage:n,totalItems:i})=>{let l=()=>{e>1&&o(e-1)},s=()=>{e<t&&o(e+1)},p=(c,T)=>{(c.key===\"Enter\"||c.key===\" \")&&(c.preventDefault(),T())},y=(()=>{if(t<=7)return Array.from({length:t},(T,F)=>F+1);let c=[];return e<=4?c.push(1,2,3,4,5):e>=t-3?c.push(t-4,t-3,t-2,t-1,t):c.push(e-1,e,e+1),c})(),u=n?(e-1)*n+1:null,m=n?Math.min(e*n,i??1/0):null,C=a(r.pagination.goToPage);return(0,Re.jsxs)(nd,{\"data-testid\":\"pagination\",children:[(0,Re.jsx)(Qa,{onClick:l,onKeyDown:c=>p(c,l),disabled:e===1,\"aria-label\":a(r.pagination.previousPage),\"data-testid\":\"pagination-previous\",type:\"button\",children:(0,Re.jsx)(id.default,{})}),t>7&&e>4&&(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ar,{onClick:()=>o(1),isActive:!1,\"aria-label\":`${C} 1`,\"data-testid\":\"pagination-page-1\",type:\"button\",children:\"1\"}),(0,Re.jsx)(zr,{children:\"...\"})]}),y.map(c=>(0,Re.jsx)(Ar,{onClick:()=>o(c),isActive:e===c,\"aria-label\":`${C} ${c}`,\"aria-current\":e===c?\"page\":void 0,\"data-testid\":`pagination-page-${c}`,type:\"button\",children:c},c)),t>7&&e<t-3&&(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(zr,{children:\"...\"}),(0,Re.jsx)(Ar,{onClick:()=>o(t),isActive:!1,\"aria-label\":`${C} ${t}`,\"data-testid\":`pagination-page-${t}`,type:\"button\",children:t})]}),(0,Re.jsx)(Qa,{onClick:s,onKeyDown:c=>p(c,s),disabled:e===t,\"aria-label\":a(r.pagination.nextPage),\"data-testid\":\"pagination-next\",type:\"button\",children:(0,Re.jsx)(ld.default,{})}),n&&i&&(0,Re.jsxs)(zr,{as:\"output\",\"aria-live\":\"polite\",\"data-testid\":\"pagination-page-info\",children:[u,\"-\",m,\" \",a(r.pagination.of),\" \",i]})]})};var Ve=require(\"@mui/material/styles\"),Ae=require(\"@mui/material\"),sd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:dd}=sd.ColorUtils,Me=(0,Ve.styled)(Ae.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`,Br=(0,Ve.styled)(Ae.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>dd(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`,Er=(0,Ve.styled)(Ae.Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`,Hr=(0,Ve.styled)(Ae.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({theme:e})=>e.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`,Wr=(0,Ve.styled)(Ae.Box)`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`,am=(0,Ve.styled)(Ae.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`,_r=(0,Ve.styled)(Ae.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`,Zt=(0,Ve.styled)(\"h2\")`\n margin: 0;\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`,nm=(0,Ve.styled)(Ae.Box)`\n width: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`,qt=(0,Ve.styled)(Ae.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({withCard:e=!0,theme:t})=>e&&`\n padding: 20px;\n background-color: ${dd(t,\"N20\")};\n border-radius: 8px;\n box-shadow: ${t.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`,im=(0,Ve.styled)(Ae.Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`,Qt=(0,Ve.styled)(Ae.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`,pd=(0,Ve.styled)(Ae.Typography)`\n font-weight: 600;\n font-size: 14px;\n`,cd=(0,Ve.styled)(Ae.Typography)`\n font-size: 13px;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,ud=(0,Ve.styled)(Ae.Typography)`\n font-size: 13px;\n`,gd=(0,Ve.styled)(Ae.Typography)`\n font-size: 13px;\n color: ${({theme:e,status:t})=>t===\"Active\"?e.palette.success.main:e.palette.warning.main};\n`;var ze=require(\"@mui/material/styles\"),Oe=require(\"@mui/material\"),fd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Xa}=fd.ColorUtils,md=(0,ze.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`,hd=(0,ze.styled)(Oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,xd=(0,ze.styled)(Oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Ur=(0,ze.styled)(Oe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Xa(e,\"N70\")};\n`,bd=(0,ze.styled)(Oe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,yd=(0,ze.styled)(Oe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,wd=(0,ze.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>Xa(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,Cd=(0,ze.styled)(Oe.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`,vd=(0,ze.styled)(Oe.Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.primary.main};\n min-width: 24px;\n`,kd=(0,ze.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Sd=(0,ze.styled)(Oe.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`,Td=(0,ze.styled)(Oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Dd=(0,ze.styled)(Oe.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,Kr=(0,ze.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,Gr=(0,ze.styled)(Oe.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,jr=(0,ze.styled)(Oe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Xa(e,\"N70\")};\n`;var Pd=M(require(\"@mui/material/useMediaQuery\")),Zc=\"(max-width:767px)\";function Mt(){return(0,Pd.default)(Zc,{noSsr:!0})}var G=require(\"react/jsx-runtime\");function qc(e){return{rank:e.rank,name:e.name,sku:`${a(r.fullView.products.skuPrefix)}-${e.id.replace(\"prod-\",\"\").padStart(3,\"0\")}`,units:e.unitsSold,revenue:e.revenue,volume:e.volume}}var Co=({products:e,dateRange:t,market:o,productSort:n,markets:i,isLoading:l=!1,onBack:s,onDateRangeChange:p,onMarketChange:x,onProductSortChange:y})=>{let[u,m]=(0,dt.useState)(1),[C,c]=(0,dt.useState)(n===\"revenue\"?\"revenue\":\"units\"),[T,F]=(0,dt.useState)(\"desc\"),d=10,h=Mt(),w=dt.default.useCallback(()=>s?.(),[s]),k=rt(i),S=dt.default.useMemo(()=>[Dt(t,r),Pt(o,k,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"units\",label:a(r.defaults.units)},{value:\"revenue\",label:a(r.defaults.revenue)},{value:\"volume\",label:a(r.defaults.volume)}]}],[t,o,k,n]),N=dt.default.useCallback((P,g)=>{P===\"dateRange\"?p?.(g):P===\"market\"?x?.(g):P===\"sort\"&&(y?.(g),m(1))},[p,x,y]),B=dt.default.useCallback((P,g)=>{c(P),F(g),m(1)},[]),z=dt.default.useMemo(()=>e.map(qc),[e]),H=dt.default.useMemo(()=>[...z].sort((P,g)=>{let b=P[C],L=g[C];return T===\"asc\"?b-L:L-b}),[z,C,T]),{totalPages:Z,pageItems:V}=St(H,u,d),f=e[0]?.currencyCode,v=dt.default.useMemo(()=>[{key:\"rank\",label:a(r.fullView.products.columns.rank),sortable:!0},{key:\"name\",label:a(r.fullView.products.columns.product),sortable:!0,render:(P,g)=>(0,G.jsxs)(md,{children:[(0,G.jsx)(hd,{children:g.name}),(0,G.jsx)(xd,{children:g.sku})]})},{key:\"units\",label:a(r.fullView.products.columns.unitsSold),sortable:!0,render:P=>(0,G.jsx)(Ur,{children:Number(P).toLocaleString()})},{key:\"revenue\",label:a(r.defaults.revenue),sortable:!0,render:P=>(0,G.jsx)(Ur,{children:Q(Number(P),f)})},{key:\"volume\",label:a(r.fullView.products.columns.volume),sortable:!0,render:P=>(0,G.jsx)(Ur,{children:Number(P).toLocaleString()})}],[f]);return l?(0,G.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,G.jsx)(xe,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:w,filters:S,onFilterChange:N}),(0,G.jsx)(ml,{})]}):e.length===0?(0,G.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,G.jsx)(xe,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:w,filters:S,onFilterChange:N}),(0,G.jsx)(Qt,{\"data-testid\":\"products-fullview-empty\",children:a(r.fullView.products.noProducts)})]}):(0,G.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,G.jsx)(xe,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:w,filters:S,onFilterChange:N}),h?(0,G.jsx)(bd,{\"data-testid\":\"products-fullview-mobile-cards\",children:V.map(P=>(0,G.jsxs)(wd,{children:[(0,G.jsxs)(Cd,{children:[(0,G.jsxs)(vd,{children:[\"#\",P.rank]}),(0,G.jsxs)(kd,{children:[(0,G.jsx)(Sd,{children:P.name}),(0,G.jsx)(Td,{children:P.sku})]})]}),(0,G.jsxs)(Dd,{children:[(0,G.jsxs)(Kr,{children:[(0,G.jsx)(Gr,{children:a(r.defaults.units)}),(0,G.jsx)(jr,{children:P.units.toLocaleString()})]}),(0,G.jsxs)(Kr,{children:[(0,G.jsx)(Gr,{children:a(r.defaults.revenue)}),(0,G.jsx)(jr,{children:Q(P.revenue,f)})]}),(0,G.jsxs)(Kr,{children:[(0,G.jsx)(Gr,{children:a(r.defaults.volume)}),(0,G.jsx)(jr,{children:P.volume.toLocaleString()})]})]})]},P.rank))}):(0,G.jsx)(yd,{\"data-testid\":\"products-fullview-desktop-table\",children:(0,G.jsx)(lt,{columns:v,data:V,sortable:!0,onSort:B,sortColumn:C,sortDirection:T,getRowKey:P=>P.rank})}),Z>1&&(0,G.jsx)(st,{currentPage:u,totalPages:Z,onPageChange:m,itemsPerPage:d,totalItems:H.length})]})};var tt=M(require(\"react\")),Ze=require(\"recharts\"),_d=M(require(\"@mui/icons-material/ArrowUpward\")),Ud=M(require(\"@mui/icons-material/ArrowDownward\"));var Ce=require(\"@mui/material/styles\"),Fe=require(\"@mui/material\"),Rd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Qc}=Rd.ColorUtils,Md=(0,Ce.styled)(Fe.Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,Od=(0,Ce.styled)(Fe.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})=>Qc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Fd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Ld=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,$d=(0,Ce.styled)(Fe.Typography)`\n font-size: 1rem;\n font-weight: 600;\n`,Id=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Nd=(0,Ce.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`,Vd=(0,Ce.styled)(Fe.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`,Yr=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`,Jr=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Zr=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Ad=(0,Ce.styled)(Fe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,zd=(0,Ce.styled)(Fe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Bd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Ed=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,Hd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,vm=(0,Ce.styled)(Fe.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`,Wd=(0,Ce.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var I=require(\"react/jsx-runtime\"),vo=({conversionData:e,orders:t,summaryRate:o,summaryChangePct:n,dateRange:i,market:l,conversionFilter:s,markets:p,isLoading:x=!1,onBack:y,onDateRangeChange:u,onMarketChange:m,onConversionFilterChange:C})=>{let[c,T]=(0,tt.useState)(1),F=10,d=Mt(),h=tt.default.useCallback(()=>y?.(),[y]),w=rt(p),k=tt.default.useMemo(()=>typeof o==\"number\"&&Number.isFinite(o)?o:e.at(-1)?.rate??0,[o,e]),S=tt.default.useMemo(()=>{if(n!==void 0){if(n===null)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let de=\"neutral\";return n>0?de=\"up\":n<0&&(de=\"down\"),{direction:de,value:`${n>=0?\"+\":\"\"}${n.toFixed(1)}%`}}if(e.length<2)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let g=e.at(-1)?.rate??0,b=e[0].rate;if(b===0)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let L=(g-b)/b*100;if(Math.abs(L)<.1)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let ce=\"neutral\";return L>0?ce=\"up\":L<0&&(ce=\"down\"),{direction:ce,value:`${L>=0?\"+\":\"\"}${L.toFixed(1)}%`}},[n,e]),N=tt.default.useCallback(g=>g===\"standard\"?a(r.filter.conversionType.standard):g===\"subscription\"?a(r.filter.conversionType.subscription):a(r.defaults.all),[]),B=tt.default.useMemo(()=>N(s),[s,N]),z=tt.default.useMemo(()=>[Dt(i,r),Pt(l,w,r),{key:\"customerType\",label:a(r.filter.signupView.label),value:s,options:[{value:\"all\",label:a(r.defaults.all)},{value:\"standard\",label:a(r.filter.conversionType.standard)},{value:\"subscription\",label:a(r.filter.conversionType.subscription)}]}],[s,i,l,w]),H=tt.default.useCallback((g,b)=>{g===\"dateRange\"?u?.(b):g===\"market\"?m?.(b):g===\"customerType\"&&(C?.(b),T(1))},[C,u,m]),Z=tt.default.useMemo(()=>s===\"all\"?t:t.filter(g=>g.customerType.toLowerCase()===s),[t,s]),{totalPages:V,pageItems:f}=St(Z,c,F),v=tt.default.useMemo(()=>[{key:\"orderId\",label:a(r.fullView.conversionRate.columns.orderId),sortable:!0,render:g=>(0,I.jsx)(Wd,{children:g})},{key:\"date\",label:a(r.defaults.date),sortable:!0},{key:\"customerName\",label:a(r.fullView.conversionRate.columns.customer),sortable:!0},{key:\"customerType\",label:a(r.defaults.type),sortable:!0},{key:\"items\",label:a(r.fullView.conversionRate.columns.items),sortable:!0},{key:\"total\",label:a(r.fullView.conversionRate.columns.total),sortable:!0,render:(g,b)=>Q(Number(g),b.currencyCode,void 0,2)},{key:\"bv\",label:a(r.fullView.conversionRate.columns.bv),sortable:!0}],[]),P=tt.default.useCallback(()=>s===\"standard\"?\"#2e7d32\":s===\"subscription\"?\"#ed6c02\":\"#1976d2\",[s]);return x?(0,I.jsxs)(Me,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,I.jsx)(xe,{title:a(r.defaults.conversionRate),dateRange:Te(i),onBack:h,filters:z,onFilterChange:H}),(0,I.jsx)(Gt,{})]}):(0,I.jsxs)(Me,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,I.jsx)(xe,{title:a(r.defaults.conversionRate),dateRange:Te(i),onBack:h,filters:z,onFilterChange:H}),(0,I.jsxs)(Br,{\"data-testid\":\"conversion-fullview-metric-chart\",children:[(0,I.jsx)(Er,{children:(0,I.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"0px\",flexWrap:\"wrap\"},children:[(0,I.jsxs)(Hr,{\"data-testid\":\"conversion-rate-value\",style:{marginRight:\"6px\"},children:[k.toFixed(1),\"%\"]}),(0,I.jsxs)(Wr,{direction:S.direction,\"data-testid\":\"conversion-rate-trend\",children:[S.direction===\"up\"&&(0,I.jsx)(_d.default,{}),S.direction===\"down\"&&(0,I.jsx)(Ud.default,{}),(0,I.jsx)(\"span\",{style:{fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:600,fontSize:\"14px\",lineHeight:\"20px\",letterSpacing:\"0em\"},children:S.value}),(0,I.jsx)(\"span\",{style:{marginLeft:\"2px\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:400,fontSize:\"12px\",lineHeight:\"16px\",letterSpacing:\"0.01em\",color:\"#5F5F5F\"},children:\"compared to this time last month\"})]})]})}),(0,I.jsx)(_r,{children:(0,I.jsxs)(Bd,{children:[(0,I.jsx)(Md,{\"data-testid\":\"conversion-fullview-chart\",children:(0,I.jsx)(Ze.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,I.jsxs)(Ze.LineChart,{data:e,margin:{top:10,right:10,left:0,bottom:0},children:[(0,I.jsx)(Ze.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,I.jsx)(Ze.XAxis,{dataKey:\"date\"}),(0,I.jsx)(Ze.YAxis,{tickFormatter:g=>`${g}%`,domain:[0,\"auto\"]}),(0,I.jsx)(Ze.Tooltip,{formatter:g=>typeof g==\"number\"?`${g.toFixed(2)}%`:typeof g==\"string\"?g:a(r.fullView.conversionRate.notAvailable)}),(0,I.jsx)(Ze.Line,{type:\"monotone\",dataKey:\"rate\",stroke:P(),strokeWidth:2,name:`${a(r.defaults.conversionRate)} (${B})`,dot:!1})]})})}),(0,I.jsx)(Ed,{children:(0,I.jsx)(Hd,{style:{color:P()},children:`${a(r.defaults.conversionRate)} (${B})`})})]})})]}),(0,I.jsxs)(qt,{\"data-testid\":\"conversion-fullview-table-section\",children:[(0,I.jsxs)(Zt,{\"data-testid\":\"conversion-fullview-table-title\",children:[a(r.fullView.conversionRate.orderDetailsTitle),\" (\",Z.length,\")\"]}),d?(0,I.jsx)(Ad,{\"data-testid\":\"conversion-fullview-mobile-orders\",children:f.map(g=>(0,I.jsxs)(Od,{children:[(0,I.jsxs)(Fd,{children:[(0,I.jsxs)(Ld,{children:[(0,I.jsx)($d,{children:g.customerName}),(0,I.jsx)(Id,{children:g.date})]}),(0,I.jsx)(Nd,{children:g.orderId})]}),(0,I.jsxs)(Vd,{children:[(0,I.jsxs)(Yr,{children:[(0,I.jsx)(Jr,{children:a(r.fullView.conversionRate.columns.items)}),(0,I.jsx)(Zr,{children:g.items})]}),(0,I.jsxs)(Yr,{children:[(0,I.jsx)(Jr,{children:a(r.fullView.conversionRate.columns.total)}),(0,I.jsxs)(Zr,{children:[\"$\",g.total.toFixed(2)]})]}),(0,I.jsxs)(Yr,{children:[(0,I.jsx)(Jr,{children:a(r.fullView.conversionRate.columns.totalSv)}),(0,I.jsx)(Zr,{children:g.bv})]})]})]},g.orderId))}):(0,I.jsx)(zd,{\"data-testid\":\"conversion-fullview-desktop-table\",children:(0,I.jsx)(lt,{columns:v,data:f,getRowKey:g=>g.orderId})}),V>1&&(0,I.jsx)(st,{currentPage:c,totalPages:V,onPageChange:T,itemsPerPage:F,totalItems:Z.length})]})]})};var Lt=M(require(\"react\")),Xd=require(\"@mui/material\"),be=require(\"recharts\"),ep=M(require(\"@mui/icons-material/TrendingUp\")),tp=M(require(\"@mui/icons-material/TrendingDown\"));var Ot=require(\"@mui/material/styles\"),Ft=require(\"@mui/material\"),Kd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Xc}=Kd.ColorUtils,Gd=(0,Ot.styled)(Ft.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,jd=(0,Ot.styled)(Ft.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Yd=(0,Ot.styled)(Ft.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})=>Xc(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Jd=(0,Ot.styled)(Ft.Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,Zd=(0,Ot.styled)(Ft.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n`,qd=(0,Ot.styled)(Ft.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,jo=(0,Ot.styled)(Ft.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,Xt=(0,Ot.styled)(Ft.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,Qd=(0,Ot.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var R=require(\"react/jsx-runtime\"),qe={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#5F7388\"};function eo(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}function eu(e){if(Array.isArray(e))return e;let t=e;return Array.isArray(t.daily)?t.daily.map(o=>({date:String(o.date??\"\"),total:eo(o.total),members:eo(o.members),retail:eo(o.retail),brandAffiliates:eo(o.brandAffiliates??o.brandAffiliate??o.brand_affiliates??o.brand_affiliate)})):[]}var qr=({signupData:e,signups:t,dateRange:o,market:n,signupView:i,markets:l,isLoading:s=!1,onBack:p,onDateRangeChange:x,onMarketChange:y,onSignupViewChange:u})=>{let[m,C]=(0,Lt.useState)(1),c=10,T=Mt(),F=Lt.default.useCallback(()=>p?.(),[p]),d=rt(l),h=Lt.default.useMemo(()=>eu(e).map(f=>{let v=f,P=eo(v.members),g=eo(v.retail),b=eo(v.brandAffiliates??v.brandAffiliate??v.brand_affiliates??v.brand_affiliate),L=eo(v.total??v.all??v.signupTotal??v.value);return{...f,total:L>0?L:P+g+b,members:P,retail:g,brandAffiliates:b}}),[e]),w=Lt.default.useMemo(()=>h.length===0?0:h[h.length-1].total,[h]),k=Lt.default.useMemo(()=>{if(h.length<2)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let V=h[0].total,f=h[h.length-1].total;if(V<=0)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let v=f-V,P=v/V*100,g=\"neutral\";return P>0?g=\"up\":P<0&&(g=\"down\"),{direction:g,absoluteChange:Math.round(v),percentageChange:`${P>=0?\"+\":\"\"}${P.toFixed(1)}%`}},[h,r]),S=h.length>0,N=Lt.default.useMemo(()=>[Dt(o,r),Pt(n,d,r),{key:\"signupView\",label:a(r.filter.signupView.label),value:i,options:[{value:\"all\",label:a(r.defaults.all)},{value:\"members\",label:a(r.defaults.members)},{value:\"retail\",label:a(r.defaults.retail)},{value:\"brandAffiliates\",label:a(r.defaults.brandAffiliates)}]}],[o,n,d,i]),B=Lt.default.useCallback((V,f)=>{V===\"dateRange\"?x?.(f):V===\"market\"?y?.(f):V===\"signupView\"&&(u?.(f),C(1))},[x,y,u]),{totalPages:z,pageItems:H}=St(t,m,c),Z=Lt.default.useMemo(()=>[{key:\"id\",label:a(r.fullView.signups.columns.id),sortable:!0},{key:\"name\",label:a(r.fullView.signups.columns.name),sortable:!0,render:V=>(0,R.jsx)(Qd,{children:V})},{key:\"date\",label:a(r.defaults.date),sortable:!0},{key:\"type\",label:a(r.defaults.type),sortable:!0},{key:\"email\",label:a(r.fullView.signups.columns.email),sortable:!0},{key:\"status\",label:a(r.fullView.signups.columns.status),sortable:!0}],[]);return s?(0,R.jsxs)(Me,{\"data-testid\":\"signups-full-view\",children:[(0,R.jsx)(xe,{title:a(r.widget.signups.title),dateRange:Te(o),onBack:F,filters:N,onFilterChange:B}),(0,R.jsx)(Gt,{})]}):(0,R.jsxs)(Me,{\"data-testid\":\"signups-full-view\",children:[(0,R.jsx)(xe,{title:a(r.widget.signups.title),dateRange:Te(o),onBack:F,filters:N,onFilterChange:B}),(0,R.jsxs)(Br,{\"data-testid\":\"signups-fullview-metric-chart\",children:[(0,R.jsxs)(Er,{children:[(0,R.jsx)(Hr,{\"data-testid\":\"signups-total\",children:w.toLocaleString()}),(0,R.jsxs)(Wr,{direction:k.direction,children:[k.direction===\"up\"&&(0,R.jsx)(ep.default,{}),k.direction===\"down\"&&(0,R.jsx)(tp.default,{}),k.direction!==\"neutral\"&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(\"span\",{style:{fontWeight:600,lineHeight:1},children:[k.absoluteChange>0?\"+\":\"\",k.absoluteChange]}),(0,R.jsx)(\"span\",{style:{fontWeight:400,lineHeight:1},children:k.percentageChange})]}),k.direction===\"neutral\"&&(0,R.jsx)(\"span\",{children:k.percentageChange})]}),(0,R.jsx)(Zd,{children:a(r.widget.conversionRate.comparison)})]}),(0,R.jsx)(_r,{children:S?(0,R.jsxs)(qd,{children:[(0,R.jsx)(Jd,{\"data-testid\":\"signups-fullview-chart\",children:(0,R.jsx)(be.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:240,children:(0,R.jsxs)(be.LineChart,{data:h,children:[(0,R.jsx)(be.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,R.jsx)(be.XAxis,{dataKey:\"date\"}),(0,R.jsx)(be.YAxis,{}),(0,R.jsx)(be.Tooltip,{}),i===\"all\"&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"total\",stroke:qe.total,strokeWidth:2,name:a(r.widget.signups.total),dot:{r:2},connectNulls:!0}),(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"members\",stroke:qe.members,strokeWidth:2,name:a(r.defaults.members),dot:{r:2},connectNulls:!0}),(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"retail\",stroke:qe.retail,strokeWidth:2,name:a(r.defaults.retail),dot:{r:2},connectNulls:!0}),(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:qe.brandAffiliates,strokeWidth:2,name:a(r.defaults.brandAffiliates),dot:{r:2},connectNulls:!0})]}),i===\"members\"&&(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"members\",stroke:qe.members,strokeWidth:2,name:a(r.defaults.members),dot:{r:2},connectNulls:!0}),i===\"retail\"&&(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"retail\",stroke:qe.retail,strokeWidth:2,name:a(r.defaults.retail),dot:{r:2},connectNulls:!0}),i===\"brandAffiliates\"&&(0,R.jsx)(be.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:qe.brandAffiliates,strokeWidth:2,name:a(r.defaults.brandAffiliates),dot:{r:2},connectNulls:!0})]})})}),(0,R.jsxs)(Xd.Box,{children:[i===\"all\"&&(0,R.jsxs)(jo,{children:[(0,R.jsx)(Xt,{style:{color:qe.total},children:a(r.widget.signups.total)}),(0,R.jsx)(Xt,{style:{color:qe.members},children:a(r.defaults.members)}),(0,R.jsx)(Xt,{style:{color:qe.retail},children:a(r.defaults.retail)}),(0,R.jsx)(Xt,{style:{color:qe.brandAffiliates},children:a(r.defaults.brandAffiliates)})]}),i===\"members\"&&(0,R.jsx)(jo,{children:(0,R.jsx)(Xt,{style:{color:qe.members},children:a(r.defaults.members)})}),i===\"retail\"&&(0,R.jsx)(jo,{children:(0,R.jsx)(Xt,{style:{color:qe.retail},children:a(r.defaults.retail)})}),i===\"brandAffiliates\"&&(0,R.jsx)(jo,{children:(0,R.jsx)(Xt,{style:{color:qe.brandAffiliates},children:a(r.defaults.brandAffiliates)})})]})]}):(0,R.jsx)(Qt,{\"data-testid\":\"signups-fullview-chart-empty\",children:a(r.widget.signups.noTrendData)})})]}),(0,R.jsxs)(qt,{\"data-testid\":\"signups-fullview-table-section\",children:[(0,R.jsx)(Zt,{\"data-testid\":\"signups-fullview-table-title\",children:`${a(r.fullView.signups.detailsTitle)} (${t.length})`}),T?(0,R.jsx)(Gd,{\"data-testid\":\"signups-fullview-mobile-cards\",children:H.map(V=>(0,R.jsxs)(Yd,{children:[(0,R.jsx)(pd,{children:V.name}),(0,R.jsxs)(cd,{children:[V.date,\" - \",V.type]}),(0,R.jsx)(ud,{children:V.email}),(0,R.jsx)(gd,{status:V.status,children:V.status})]},V.id))}):(0,R.jsx)(jd,{\"data-testid\":\"signups-fullview-desktop-table\",children:(0,R.jsx)(lt,{columns:Z,data:H,getRowKey:V=>V.id})}),z>1&&(0,R.jsx)(st,{currentPage:m,totalPages:z,onPageChange:C,itemsPerPage:c,totalItems:t.length})]})]})};var $t=M(require(\"react\")),It=require(\"recharts\"),vp=M(require(\"@mui/icons-material/TrendingUp\")),kp=M(require(\"@mui/icons-material/TrendingDown\"));var Wt=require(\"@nuskin/foundation-theme\"),Le=require(\"@mui/material/styles\"),$e=require(\"@mui/material\"),{getGenomeColor:en}=Wt.ColorUtils,Qr=(0,Wt.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,op=(0,Wt.styled)(\"div\")`\n flex: 1;\n`,rp=(0,Wt.styled)(\"span\")`\n font-weight: 600;\n`,ap=(0,Wt.styled)(\"span\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,np=(0,Wt.styled)(\"span\")`\n font-weight: 600;\n`,ip=(0,Le.styled)($e.Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({theme:e})=>en(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`,lp=(0,Le.styled)($e.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,sp=(0,Le.styled)($e.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`,dp=(0,Le.styled)($e.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,pp=(0,Le.styled)($e.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`,cp=(0,Le.styled)($e.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\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\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":t.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,up=(0,Le.styled)($e.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`,gp=(0,Le.styled)($e.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({theme:e})=>en(e,\"N30\")};\n }\n`,Xr=(0,Le.styled)($e.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Jm=(0,Le.styled)($e.Box)`\n display: none;\n`,fp=(0,Le.styled)($e.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`,mp=(0,Le.styled)($e.Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`,hp=(0,Le.styled)($e.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({theme:e})=>e.palette.text.primary};\n`,xp=(0,Le.styled)($e.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,bp=(0,Le.styled)($e.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,yp=(0,Le.styled)($e.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>en(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,wp=(0,Le.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Cp=(0,Wt.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var A=require(\"react/jsx-runtime\"),ea=({categories:e,dateRange:t,market:o,categorySort:n,summaryChangePct:i,markets:l,isLoading:s=!1,onBack:p,onDateRangeChange:x,onMarketChange:y,onCategorySortChange:u})=>{let[m,C]=(0,$t.useState)(1),c=10,T=Mt(),F=$t.default.useCallback(()=>p?.(),[p]),d=rt(l),h=$t.default.useMemo(()=>[Dt(t,r),Pt(o,d,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"revenue\",label:a(r.defaults.byRevenue)},{value:\"trend\",label:a(r.defaults.byTrend)}]}],[n,t,o,d]),w=$t.default.useCallback((b,L)=>{b===\"dateRange\"?x?.(L):b===\"market\"?y?.(L):b===\"sort\"&&(u?.(L),C(1))},[u,x,y]),k=b=>{let{cx:L,cy:ce,midAngle:de,innerRadius:te,outerRadius:Be,percentage:ot}=b,pe=Math.PI/180,Qe=te+(Be-te)*.45,pt=L+Qe*Math.cos(-de*pe),zt=ce+Qe*Math.sin(-de*pe);return(0,A.jsx)(\"text\",{x:pt,y:zt,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"middle\",fontSize:\"12\",fontWeight:\"700\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0\",style:{lineHeight:\"14px\",pointerEvents:\"none\"},children:`${ot}%`})},S=b=>b===\"up\"?(0,A.jsx)(vp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):b===\"down\"?(0,A.jsx)(kp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):null,N=b=>{if(!b)return\"neutral\";let L=Number.parseFloat(b);return Number.isNaN(L)?\"neutral\":L>0?\"up\":L<0?\"down\":\"neutral\"},B=$t.default.useMemo(()=>[...e].sort((b,L)=>n===\"revenue\"?L.revenue-b.revenue:(kt(L.trend?.revenue)??-1/0)-(kt(b.trend?.revenue)??-1/0)),[e,n]),{totalRevenue:z,totalRevenueTrendDirection:H,totalRevenueTrend:Z}=$t.default.useMemo(()=>{let b=B.reduce((de,te)=>de+te.revenue,0),L,ce;if(i!=null)Math.abs(i)<.1?(ce=\"0%\",L=\"neutral\"):(L=i>0?\"up\":\"down\",ce=`${i>0?\"+\":\"\"}${i.toFixed(1)}%`);else{let{direction:de,formatted:te}=Yt(B,Be=>Be.revenue,Be=>Be.trend?.revenue);L=de,ce=te}return{totalRevenue:b,totalRevenueTrendDirection:L,totalRevenueTrend:ce}},[B,i]),V=$t.default.useMemo(()=>B.slice(0,5),[B]),{totalPages:f,pageItems:v}=St(B,m,c),P=$t.default.useMemo(()=>[{key:\"name\",label:a(r.fullView.categories.columns.category),sortable:!0,render:(b,L)=>(0,A.jsxs)(Qr,{children:[(0,A.jsx)(Xr,{dotColor:L.color}),(0,A.jsx)(Cp,{children:Ho(L.name)})]})},{key:\"revenue\",label:a(r.defaults.revenue),sortable:!0,render:(b,L)=>Q(Number(b),L.currencyCode)},{key:\"percentage\",label:a(r.fullView.categories.columns.percentOfTotal),sortable:!0,render:b=>`${Number(b)}%`},{key:\"trend\",label:a(r.defaults.trend),render:(b,L)=>L.trend?.revenue??a(r.defaults.noValue)}],[]),g=B[0]?.currencyCode;return s?(0,A.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,A.jsx)(xe,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:h,onFilterChange:w}),(0,A.jsx)(Gt,{})]}):e.length===0?(0,A.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,A.jsx)(xe,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:h,onFilterChange:w}),(0,A.jsx)(Qt,{\"data-testid\":\"categories-fullview-empty\",children:a(r.fullView.categories.noCategoryData)})]}):(0,A.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,A.jsx)(xe,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:h,onFilterChange:w}),(0,A.jsxs)(ip,{\"data-testid\":\"categories-fullview-top-section\",children:[(0,A.jsxs)(lp,{\"data-testid\":\"categories-fullview-chart\",children:[(0,A.jsx)(It.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,A.jsxs)(It.PieChart,{children:[(0,A.jsx)(It.Pie,{data:B,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:k,labelLine:!1,children:B.map(b=>(0,A.jsx)(It.Cell,{fill:b.color},`cell-${b.id}`))}),(0,A.jsx)(It.Tooltip,{formatter:b=>Q(b,g)})]})}),(0,A.jsxs)(sp,{\"data-testid\":\"categories-fullview-donut-center\",children:[(0,A.jsx)(dp,{children:a(r.stats.revenue)}),(0,A.jsx)(pp,{children:Q(z,g)}),(0,A.jsxs)(cp,{direction:H,children:[S(H),(0,A.jsx)(\"span\",{children:Z})]})]})]}),(0,A.jsx)(up,{\"data-testid\":\"categories-fullview-summary\",children:V.map(b=>(0,A.jsxs)(gp,{children:[(0,A.jsx)(Xr,{dotColor:b.color}),(0,A.jsx)(fp,{children:Ho(b.name)}),(0,A.jsx)(mp,{children:Q(b.revenue,b.currencyCode)}),(0,A.jsxs)(hp,{children:[\"(\",b.percentage,\"%)\"]}),b.trend?.revenue?(0,A.jsx)(wp,{direction:N(b.trend.revenue),children:S(N(b.trend.revenue))}):null]},b.id))})]}),(0,A.jsxs)(qt,{\"data-testid\":\"categories-fullview-table-section\",children:[(0,A.jsxs)(Zt,{\"data-testid\":\"categories-fullview-table-title\",children:[a(r.fullView.categories.allCategoriesTitle),\" (\",B.length,\")\"]}),T?(0,A.jsx)(bp,{children:v.map(b=>(0,A.jsxs)(yp,{children:[(0,A.jsx)(Xr,{dotColor:b.color}),(0,A.jsxs)(op,{children:[(0,A.jsx)(rp,{children:b.name}),(0,A.jsx)(ap,{children:Q(b.revenue,b.currencyCode)})]}),(0,A.jsxs)(np,{children:[b.percentage,\"%\"]})]},b.id))}):(0,A.jsx)(xp,{children:(0,A.jsx)(lt,{columns:P,data:v,sortable:!0,getRowKey:b=>b.id})}),f>1&&(0,A.jsx)(st,{currentPage:m,totalPages:f,onPageChange:C,itemsPerPage:c,totalItems:B.length})]})]})};var tn=M(require(\"react\"));function no(e){uo(e),tn.default.useEffect(()=>(uo(e),()=>{uo(void 0)}),[e])}var Sp=({translate:e,children:t})=>(no(e),t??null);function Tp(){return tn.default.useCallback(e=>Kt(e),[])}var ko=require(\"react/jsx-runtime\"),tu=\"shoppingDashboardView\",ou=[],ru=[],au=[],nu=[],iu=[],lu=[];function Pp(e){return typeof e==\"object\"&&e!==null}function su(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"signups\"||e===\"categories\"}function ta(e,t){if(!Pp(e))return\"dashboard\";let o=e[t];return su(o)?o:\"dashboard\"}function Dp(e,t,o){return{...Pp(e)?e:{},[t]:o}}function du(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var Rp=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,categoriesSummaryChangePct:l,orders:s,signups:p,isLoading:x=!1,error:y,shopTitle:u,className:m,translate:C,initialDateRange:c=\"last30days\",initialMarket:T=\"all\",initialProductSort:F=\"units\",initialSignupView:d=\"all\",initialConversionFilter:h=\"all\",initialCategorySort:w=\"revenue\",markets:k,historyAdapter:S,historyStateKey:N=tu,resetToDashboardOnMount:B=!0,onDateRangeChange:z,onMarketChange:H,onProductSortChange:Z,onSignupViewChange:V,onConversionFilterChange:f,onCategorySortChange:v,onViewChange:P})=>{no(C);let[g,b]=ie.default.useState(\"dashboard\"),L=ie.default.useRef(!1),[ce,de]=ie.default.useState(c),[te,Be]=ie.default.useState(T),[ot,pe]=ie.default.useState(F),[Qe,pt]=ie.default.useState(d),[zt,Ro]=ie.default.useState(h),[Mo,ca]=ie.default.useState(w),Oo=t??ou,Fo=o??ru,Lo=n??au,Zo=i??nu,ua=s??iu,ga=p??lu,ye=ie.default.useCallback(K=>{b(K),P?.(K)},[P]),$o=ie.default.useCallback(()=>S?ta(S.location?.state,N):typeof window>\"u\"?\"dashboard\":ta(window.history.state,N),[S,N]),Xe=ie.default.useCallback((K,ct)=>{if(S){let Qo=Dp(S.location?.state,N,K),pn=du(S.location,Qo);if(ct===\"replace\"){S.replace(pn);return}S.push(pn);return}if(typeof window>\"u\")return;let bt=Dp(window.history.state,N,K);if(ct===\"replace\"){window.history.replaceState(bt,\"\");return}window.history.pushState(bt,\"\")},[S,N]);ie.default.useEffect(()=>{if(B?(Xe(\"dashboard\",\"replace\"),L.current=!1,ye(\"dashboard\")):ye($o()),S)return S.listen((ct,bt)=>{if(bt===\"POP\"){let Qo=ta(ct.state,N);L.current=Qo!==\"dashboard\",ye(Qo)}});let K=ct=>{let bt=ta(ct.state,N);L.current=bt!==\"dashboard\",ye(bt)};return window.addEventListener(\"popstate\",K),()=>{window.removeEventListener(\"popstate\",K)}},[S,N,$o,B,ye,Xe]);let We=ie.default.useCallback(K=>{L.current=!0,Xe(K,\"push\"),ye(K)},[ye,Xe]),_t=ie.default.useCallback(()=>{if(g!==\"dashboard\"&&L.current){if(S){S.goBack();return}typeof window<\"u\"&&window.history.back();return}L.current=!1,Xe(\"dashboard\",\"replace\"),ye(\"dashboard\")},[g,S,ye,Xe]),ht=ie.default.useCallback(K=>{de(K),z?.(K)},[z]),xt=ie.default.useCallback(K=>{Be(K),H?.(K)},[H]),Io=ie.default.useCallback(K=>{pe(K),Z?.(K)},[Z]),No=ie.default.useCallback(K=>{pt(K),V?.(K)},[V]),Vo=ie.default.useCallback(K=>{Ro(K),f?.(K)},[f]),qo=ie.default.useCallback(K=>{ca(K),v?.(K)},[v]),fa=ie.default.useCallback(()=>{We(\"products\")},[We]),ma=ie.default.useCallback(()=>{We(\"conversion-rate\")},[We]),X=ie.default.useCallback(()=>{We(\"signups\")},[We]),Ut=ie.default.useCallback(()=>{We(\"categories\")},[We]);return g===\"products\"?(0,ko.jsx)(Co,{products:Oo,dateRange:ce,market:te,productSort:ot,markets:k,isLoading:x,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onProductSortChange:Io}):g===\"conversion-rate\"?(0,ko.jsx)(vo,{conversionData:Fo,orders:ua,dateRange:ce,market:te,conversionFilter:zt,markets:k,isLoading:x,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onConversionFilterChange:Vo}):g===\"signups\"?(0,ko.jsx)(qr,{signupData:Lo,signups:ga,dateRange:ce,market:te,signupView:Qe,markets:k,isLoading:x,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onSignupViewChange:No}):g===\"categories\"?(0,ko.jsx)(ea,{categories:Zo,dateRange:ce,market:te,categorySort:Mo,summaryChangePct:l,markets:k,isLoading:x,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onCategorySortChange:qo}):(0,ko.jsx)(Vr,{stats:e,topProducts:Oo,conversionData:Fo,signupData:Lo,categories:Zo,categoriesSummaryChangePct:l,isLoading:x,error:y,shopTitle:u,className:m,dateRange:ce,market:te,productSort:ot,signupView:Qe,conversionFilter:zt,categorySort:Mo,markets:k,onDateRangeChange:ht,onMarketChange:xt,onProductSortChange:Io,onSignupViewChange:No,onConversionFilterChange:Vo,onCategorySortChange:qo,onProductsTitleClick:fa,onConversionTitleClick:ma,onSignupsTitleClick:X,onCategoriesToTitleClick:Ut})};var So=require(\"@nuskin/foundation-theme\"),on=(0,So.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`,Mp=(0,So.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`,Op=(0,So.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: flex-start;\n }\n`,Fp=(0,So.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`,Lp=(0,So.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var oa=M(require(\"react\")),Nt=require(\"recharts\");var E={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:\"--\"},byRevenue:{key:\"productOfferDashboard.defaults.byRevenue\",fallback:\"Revenue\"},byUnits:{key:\"productOfferDashboard.defaults.byUnits\",fallback:\"Units\"},byVolume:{key:\"productOfferDashboard.defaults.byVolume\",fallback:\"Volume\"}}};function U(e){return Kt(e)}var j=require(\"react/jsx-runtime\"),pu=({offers:e,offerSort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:l,onExport:s})=>{let p=oa.default.useCallback(c=>{let T=c.target.value;i?.(T)},[i]),{sortedOffers:x,totalRevenue:y,trendDirection:u,formattedTrend:m}=oa.default.useMemo(()=>{let c=[...e].sort((h,w)=>t===\"revenue\"?w.revenue-h.revenue:w.percentage-h.percentage),T=c.reduce((h,w)=>h+w.revenue,0),{direction:F,formatted:d}=Yt(c,h=>h.revenue,h=>h.trend?.revenue);return{sortedOffers:c,totalRevenue:T,trendDirection:F,formattedTrend:d}},[e,t]),C=x[0]?.currencyCode;return o&&e.length===0?(0,j.jsx)(Jt,{\"data-testid\":\"widget-top-offers\",children:(0,j.jsx)(ur,{})}):e.length===0?(0,j.jsxs)(Jt,{\"data-testid\":\"widget-top-offers\",children:[(0,j.jsx)(yo,{children:(0,j.jsx)(wo,{children:n??U(E.widget.topPerformingOffers.title)})}),(0,j.jsx)($r,{\"data-testid\":\"top-offers-empty-state\",children:(0,j.jsx)(Ir,{children:U(E.widget.topPerformingOffers.emptyState)})})]}):(0,j.jsxs)(Jt,{as:\"section\",\"data-testid\":\"widget-top-offers\",\"aria-label\":U(E.ariaLabel.topOffers),children:[(0,j.jsxs)(yo,{children:[(0,j.jsx)(wo,{as:\"button\",onClick:l,\"aria-label\":U(E.ariaLabel.topOffers),\"data-testid\":\"widget-title-top-offers\",children:n??U(E.widget.topPerformingOffers.title)}),(0,j.jsxs)(yr,{children:[(0,j.jsxs)(wr,{id:\"offer-sort\",\"data-testid\":\"offer-sort-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":U(E.ariaLabel.topOffers),children:[(0,j.jsx)(\"option\",{value:\"revenue\",children:U(E.defaults.byRevenue)}),(0,j.jsx)(\"option\",{value:\"units\",children:U(E.defaults.byUnits)})]}),(0,j.jsx)(nt,{widgetId:\"top-offers\",onFullView:l,onExport:s})]})]}),(0,j.jsxs)(Cr,{children:[(0,j.jsxs)(vr,{\"data-testid\":\"top-offers-chart\",children:[(0,j.jsx)(Nt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,j.jsxs)(Nt.PieChart,{children:[(0,j.jsx)(Nt.Pie,{data:x,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:x.map(c=>(0,j.jsx)(Nt.Cell,{fill:c.color},`cell-${c.id}`))}),(0,j.jsx)(Nt.Tooltip,{formatter:c=>Q(c,C)})]})}),(0,j.jsxs)(kr,{\"data-testid\":\"top-offers-donut-center\",children:[(0,j.jsx)(Sr,{children:U(E.widget.topPerformingOffers.totalRevenue)}),(0,j.jsx)(Tr,{children:Q(y,C)}),(0,j.jsx)(Dr,{direction:u,children:m})]})]}),(0,j.jsx)(Pr,{\"data-testid\":\"top-offers-legend-container\",children:x.map((c,T)=>{let F=jt(c.trend?.revenue);return(0,j.jsxs)(Rr,{\"data-testid\":`offer-legend-${T}`,children:[(0,j.jsx)(Mr,{color:c.color}),(0,j.jsxs)(Or,{children:[(0,j.jsx)(Fr,{children:Ho(c.name)}),(0,j.jsx)(Lr,{children:Q(c.revenue,c.currencyCode)})]}),(0,j.jsxs)(Ps,{children:[c.percentage,\"%\"]}),c.trend?.revenue?(0,j.jsx)(Os,{direction:F,\"data-testid\":`offer-legend-trend-${T}`,\"aria-label\":c.trend.revenue,children:at(F)}):null]},c.id)})})]})]})},Yo=oa.default.memo(pu);Yo.displayName=\"TopPerformingOffersPieChart\";var Ge=require(\"react/jsx-runtime\"),cu=[],uu=[],gu=[],ra=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:l,dashboardTitle:s,className:p,dateRange:x=\"last30days\",market:y=\"all\",productSort:u=\"units\",conversionFilter:m=\"all\",offerSort:C=\"revenue\",conversionSummaryRate:c,conversionSummaryChangePct:T,markets:F,onDateRangeChange:d,onMarketChange:h,onProductSortChange:w,onConversionFilterChange:k,onOfferSortChange:S,onProductsTitleClick:N,onConversionTitleClick:B,onOffersTitleClick:z})=>{let H=t??cu,Z=o??uu,V=n??gu,f=v=>v?v.startsWith(\"+\")&&v!==\"+0%\"?\"up\":v.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return l?(0,Ge.jsx)(on,{as:\"main\",className:p,\"aria-label\":U(E.ariaLabel.dashboard),children:(0,Ge.jsxs)(Lp,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Ge.jsxs)(\"strong\",{children:[U(E.error),\":\"]}),\" \",l]})}):(0,Ge.jsxs)(on,{as:\"main\",className:p,\"data-testid\":\"product-offer-dashboard\",\"aria-label\":U(E.ariaLabel.dashboard),\"aria-busy\":i,children:[(0,Ge.jsx)(go,{shopTitle:s??U(E.title),dateRange:x,market:y,isLoading:i,markets:F,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:d,onMarketChange:h}),(0,Ge.jsxs)(Mp,{\"data-testid\":\"top-charts-row\",children:[(0,Ge.jsx)(ro,{conversionData:Z,conversionFilter:m,isLoading:i,summaryRate:c,summaryChangePct:T,onFilterChange:k,onTitleClick:B}),(0,Ge.jsxs)(Op,{\"data-testid\":\"stats-card-stack\",children:[(0,Ge.jsx)(vt,{layout:\"split\",title:U(E.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:f(e?.trend?.revenue),trendValue:e?.trend?.revenue,caption:U(E.stats.comparedTo),testId:\"stats-card-revenue\",isLoading:i}),(0,Ge.jsx)(vt,{layout:\"split\",title:U(E.stats.offersPurchased),value:e?.metrics?.offersPurchased??\"0\",trendDirection:f(e?.trend?.offersPurchased),trendValue:e?.trend?.offersPurchased,caption:U(E.stats.comparedTo),testId:\"stats-card-offers-purchased\",isLoading:i})]})]}),(0,Ge.jsxs)(Fp,{\"data-testid\":\"bottom-charts-row\",children:[(0,Ge.jsx)(oo,{products:H,productSort:u,isLoading:i,maxProducts:5,onSortChange:w,onTitleClick:N}),(0,Ge.jsx)(Yo,{offers:V,offerSort:C,isLoading:i,onSortChange:S,onTitleClick:z})]})]})};var ge=M(require(\"react\"));var Vt=M(require(\"react\")),At=require(\"recharts\");var ae=require(\"@mui/material/styles\"),oe=require(\"@mui/material\"),$p=require(\"@nuskin/foundation-theme\"),{getGenomeColor:rn}=$p.ColorUtils,Ip=(0,ae.styled)(oe.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>rn(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`,Np=(0,ae.styled)(oe.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`,Vp=(0,ae.styled)(oe.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`,Ap=(0,ae.styled)(oe.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,zp=(0,ae.styled)(oe.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,ae.styled)(oe.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`,Ep=(0,ae.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,Hp=(0,ae.styled)(oe.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})=>rn(e,\"N30\")};\n }\n`,aa=(0,ae.styled)(oe.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,Wp=(0,ae.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,_p=(0,ae.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Up=(0,ae.styled)(oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Kp=(0,ae.styled)(oe.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,Gp=(0,ae.styled)(oe.Box)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,jp=(0,ae.styled)(oe.Box)`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Yp=(0,ae.styled)(oe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Jp=(0,ae.styled)(oe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Zp=(0,ae.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>rn(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,qp=(0,ae.styled)(oe.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Qp=(0,ae.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n word-break: break-word;\n`,Xp=(0,ae.styled)(oe.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,na=(0,ae.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,ia=(0,ae.styled)(oe.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,an=(0,ae.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,ec=(0,ae.styled)(oe.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\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 width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;var O=require(\"react/jsx-runtime\"),la=({offers:e,dateRange:t,market:o,offerSort:n,markets:i,isLoading:l=!1,onBack:s,onDateRangeChange:p,onMarketChange:x,onOfferSortChange:y})=>{let[u,m]=(0,Vt.useState)(1),C=10,c=Mt(),T=Vt.default.useCallback(()=>s?.(),[s]),F=rt(i),d=Vt.default.useMemo(()=>[Dt(t,E),Pt(o,F,E),{key:\"sort\",label:U(E.defaults.byRevenue),value:n,options:[{value:\"revenue\",label:U(E.defaults.byRevenue)},{value:\"units\",label:U(E.defaults.byUnits)}]}],[t,o,F,n]),h=Vt.default.useCallback((f,v)=>{f===\"dateRange\"?p?.(v):f===\"market\"?x?.(v):f===\"sort\"&&(y?.(v),m(1))},[y,p,x]),w=Vt.default.useMemo(()=>[...e].sort((f,v)=>n===\"revenue\"?v.revenue-f.revenue:v.percentage-f.percentage),[e,n]),{totalRevenue:k,totalRevenueTrendDirection:S,totalRevenueTrend:N}=Vt.default.useMemo(()=>{let f=w.reduce((g,b)=>g+b.revenue,0),{direction:v,formatted:P}=Yt(w,g=>g.revenue,g=>g.trend?.revenue);return{totalRevenue:f,totalRevenueTrendDirection:v,totalRevenueTrend:P}},[w]),B=Vt.default.useMemo(()=>w.slice(0,5),[w]),{totalPages:z,pageItems:H}=St(w,u,C),Z=Vt.default.useMemo(()=>[{key:\"name\",label:U(E.fullView.topOffers.columnName),sortable:!0,render:(f,v)=>(0,O.jsxs)(Qr,{children:[(0,O.jsx)(aa,{dotColor:v.color}),(0,O.jsx)(\"span\",{children:v.name})]})},{key:\"revenue\",label:U(E.fullView.topOffers.columnRevenue),sortable:!0,render:(f,v)=>Q(Number(f),v.currencyCode)},{key:\"percentage\",label:U(E.fullView.topOffers.columnPercentage),sortable:!0,render:f=>`${Number(f)}%`},{key:\"trend\",label:U(E.fullView.topOffers.columnTrend),render:(f,v)=>{if(!v.trend?.revenue)return U(E.defaults.noData);let P=jt(v.trend.revenue);return(0,O.jsxs)(jp,{direction:P,children:[at(P),(0,O.jsx)(\"span\",{children:v.trend.revenue})]})}}],[]),V=w[0]?.currencyCode;return l?(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(xe,{title:U(E.fullView.topOffers.title),dateRange:Te(t),onBack:T,filters:d,onFilterChange:h}),(0,O.jsx)(Gt,{})]}):e.length===0?(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(xe,{title:U(E.fullView.topOffers.title),dateRange:Te(t),onBack:T,filters:d,onFilterChange:h}),(0,O.jsx)(Qt,{\"data-testid\":\"top-offers-fullview-empty\",children:U(E.widget.topPerformingOffers.emptyState)})]}):(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(xe,{title:U(E.fullView.topOffers.title),dateRange:Te(t),onBack:T,filters:d,onFilterChange:h}),(0,O.jsxs)(Ip,{\"data-testid\":\"top-offers-fullview-top-section\",children:[(0,O.jsxs)(Np,{\"data-testid\":\"top-offers-fullview-chart\",children:[(0,O.jsx)(At.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,O.jsxs)(At.PieChart,{children:[(0,O.jsx)(At.Pie,{data:w,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:w.map(f=>(0,O.jsx)(At.Cell,{fill:f.color},`cell-${f.id}`))}),(0,O.jsx)(At.Tooltip,{formatter:f=>Q(f,V)})]})}),(0,O.jsxs)(Vp,{\"data-testid\":\"top-offers-fullview-donut-center\",children:[(0,O.jsx)(Ap,{children:U(E.widget.topPerformingOffers.totalRevenue)}),(0,O.jsx)(zp,{children:Q(k,V)}),(0,O.jsx)(Bp,{direction:S,children:N})]})]}),(0,O.jsx)(Ep,{\"data-testid\":\"top-offers-fullview-summary\",children:B.map(f=>{let v=jt(f.trend?.revenue);return(0,O.jsxs)(Hp,{children:[(0,O.jsx)(aa,{dotColor:f.color}),(0,O.jsxs)(Wp,{children:[(0,O.jsx)(_p,{children:f.name}),(0,O.jsx)(Up,{children:Q(f.revenue,f.currencyCode)})]}),(0,O.jsxs)(Kp,{children:[f.percentage,\"%\"]}),f.trend?.revenue?(0,O.jsx)(Gp,{direction:v,\"aria-label\":f.trend.revenue,children:at(v)}):null]},f.id)})})]}),(0,O.jsxs)(qt,{\"data-testid\":\"top-offers-table\",children:[(0,O.jsxs)(Zt,{\"data-testid\":\"top-offers-fullview-table-title\",children:[U(E.fullView.topOffers.title),\" (\",w.length,\")\"]}),c?(0,O.jsx)(Jp,{children:H.map(f=>{let v=kt(f.trend?.revenue),P=\"neutral\";return v!==null&&v>0?P=\"up\":v!==null&&v<0&&(P=\"down\"),(0,O.jsxs)(Zp,{children:[(0,O.jsxs)(qp,{children:[(0,O.jsx)(aa,{dotColor:f.color}),(0,O.jsx)(Qp,{children:f.name})]}),(0,O.jsxs)(Xp,{children:[(0,O.jsxs)(na,{children:[(0,O.jsx)(ia,{children:U(E.fullView.topOffers.columnRevenue)}),(0,O.jsx)(an,{children:Q(f.revenue,f.currencyCode)})]}),(0,O.jsxs)(na,{children:[(0,O.jsx)(ia,{children:U(E.fullView.topOffers.columnPercentage)}),(0,O.jsxs)(an,{children:[f.percentage,\"%\"]})]}),(0,O.jsxs)(na,{children:[(0,O.jsx)(ia,{children:U(E.fullView.topOffers.columnTrend)}),(0,O.jsx)(ec,{direction:P,children:f.trend?.revenue?(0,O.jsxs)(O.Fragment,{children:[at(P),(0,O.jsx)(\"span\",{children:f.trend.revenue})]}):U(E.defaults.noData)})]})]})]},f.id)})}):(0,O.jsx)(Yp,{children:(0,O.jsx)(lt,{columns:Z,data:H,sortable:!0,getRowKey:f=>f.id})}),z>1&&(0,O.jsx)(st,{currentPage:u,totalPages:z,onPageChange:m,itemsPerPage:C,totalItems:w.length,\"data-testid\":\"top-offers-pagination\"})]})]})};var Jo=require(\"react/jsx-runtime\"),fu=\"productOfferDashboardView\",mu=[],hu=[],xu=[],bu=[];function oc(e){return typeof e==\"object\"&&e!==null}function yu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"top-offers\"}function sa(e,t){if(!oc(e))return\"dashboard\";let o=e[t];return yu(o)?o:\"dashboard\"}function tc(e,t,o){return{...oc(e)?e:{},[t]:o}}function wu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var rc=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:l,dashboardTitle:s,className:p,allProducts:x,orders:y,allOffers:u,conversionSummaryRate:m,conversionSummaryChangePct:C,conversionFullViewData:c,conversionFullViewRate:T,conversionFullViewChangePct:F,initialDateRange:d=\"last30days\",initialMarket:h=\"all\",initialProductSort:w=\"units\",initialConversionFilter:k=\"all\",initialOfferSort:S=\"revenue\",markets:N,translate:B,historyAdapter:z,historyStateKey:H=fu,resetToDashboardOnMount:Z=!0,onDateRangeChange:V,onMarketChange:f,onProductSortChange:v,onConversionFilterChange:P,onOfferSortChange:g,onViewChange:b})=>{no(B);let[L,ce]=ge.default.useState(\"dashboard\"),de=ge.default.useRef(!1),[te,Be]=ge.default.useState(d),[ot,pe]=ge.default.useState(h),[Qe,pt]=ge.default.useState(w),[zt,Ro]=ge.default.useState(k),[Mo,ca]=ge.default.useState(S),Oo=t??mu,Fo=o??hu,Lo=n??xu,Zo=x??Oo,ua=y??bu,ga=u??Lo,ye=ge.default.useCallback(X=>{ce(X),b?.(X)},[b]),$o=ge.default.useCallback(()=>z?sa(z.location?.state,H):typeof window>\"u\"?\"dashboard\":sa(window.history.state,H),[z,H]),Xe=ge.default.useCallback((X,Ut)=>{if(z){let ct=tc(z.location?.state,H,X),bt=wu(z.location,ct);if(Ut===\"replace\"){z.replace(bt);return}z.push(bt);return}if(typeof window>\"u\")return;let K=tc(window.history.state,H,X);if(Ut===\"replace\"){window.history.replaceState(K,\"\");return}window.history.pushState(K,\"\")},[z,H]);ge.default.useEffect(()=>{if(Z?(Xe(\"dashboard\",\"replace\"),de.current=!1,ye(\"dashboard\")):ye($o()),z)return z.listen((Ut,K)=>{if(K===\"POP\"){let ct=sa(Ut.state,H);de.current=ct!==\"dashboard\",ye(ct)}});let X=Ut=>{let K=sa(Ut.state,H);de.current=K!==\"dashboard\",ye(K)};return window.addEventListener(\"popstate\",X),()=>{window.removeEventListener(\"popstate\",X)}},[z,H,$o,Z,ye,Xe]);let We=ge.default.useCallback(X=>{de.current=!0,Xe(X,\"push\"),ye(X)},[ye,Xe]),_t=ge.default.useCallback(()=>{if(L!==\"dashboard\"&&de.current){if(z){z.goBack();return}typeof window<\"u\"&&window.history.back();return}de.current=!1,Xe(\"dashboard\",\"replace\"),ye(\"dashboard\")},[L,z,ye,Xe]),ht=ge.default.useCallback(X=>{Be(X),V?.(X)},[V]),xt=ge.default.useCallback(X=>{pe(X),f?.(X)},[f]),Io=ge.default.useCallback(X=>{pt(X),v?.(X)},[v]),No=ge.default.useCallback(X=>{Ro(X),P?.(X)},[P]),Vo=ge.default.useCallback(X=>{ca(X),g?.(X)},[g]),qo=ge.default.useCallback(()=>{We(\"products\")},[We]),fa=ge.default.useCallback(()=>{We(\"conversion-rate\")},[We]),ma=ge.default.useCallback(()=>{We(\"top-offers\")},[We]);return L===\"products\"?(0,Jo.jsx)(Co,{products:Zo,dateRange:te,market:ot,productSort:Qe,markets:N,isLoading:i,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onProductSortChange:Io}):L===\"conversion-rate\"?(0,Jo.jsx)(vo,{conversionData:c??Fo,orders:ua,summaryRate:T??m,summaryChangePct:F??C,dateRange:te,market:ot,conversionFilter:zt,markets:N,isLoading:i,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onConversionFilterChange:No}):L===\"top-offers\"?(0,Jo.jsx)(la,{offers:ga,dateRange:te,market:ot,offerSort:Mo,markets:N,isLoading:i,onBack:_t,onDateRangeChange:ht,onMarketChange:xt,onOfferSortChange:Vo}):(0,Jo.jsx)(ra,{stats:e,topProducts:Oo,conversionData:Fo,topOffers:Lo,isLoading:i,error:l,dashboardTitle:s,className:p,dateRange:te,market:ot,productSort:Qe,conversionFilter:zt,offerSort:Mo,conversionSummaryRate:m,conversionSummaryChangePct:C,markets:N,onDateRangeChange:ht,onMarketChange:xt,onProductSortChange:Io,onConversionFilterChange:No,onOfferSortChange:Vo,onProductsTitleClick:qo,onConversionTitleClick:fa,onOffersTitleClick:ma})};var To=require(\"@nuskin/foundation-theme\"),{getGenomeColor:io}=To.ColorUtils,ac=(0,To.styled)(\"div\")`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`,nc=(0,To.styled)(\"select\")`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({theme:e})=>io(e,\"N20\")};\n border: 1px solid ${({theme:e})=>io(e,\"N40\")};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>io(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>io(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>io(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>io(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`,ic=(0,To.styled)(\"label\")`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>io(e,\"N70\")};\n`;var Do=require(\"react/jsx-runtime\"),lc=({filters:e,onChange:t})=>(0,Do.jsx)(ac,{\"data-testid\":\"filter-bar\",children:e.map(o=>(0,Do.jsxs)(ic,{htmlFor:`filter-${o.key}`,children:[o.label,(0,Do.jsx)(nc,{id:`filter-${o.key}`,value:o.value,onChange:n=>t(o.key,n.target.value),disabled:o.disabled,\"aria-label\":`${o.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${o.key}`,children:o.options.map(n=>(0,Do.jsx)(\"option\",{value:n.value,children:n.label},n.value))})]},o.key))});var nn={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%\"}},da=[{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%\"}}],Po=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");return o.setDate(o.getDate()+t),{date:`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][o.getMonth()]} ${o.getDate()}`,rate:Number((4+t%15*.1).toFixed(2)),orders:200+t*13%100,siteVisits:4e3+t*97%2e3}}),Cu=Po.map(e=>({...e,rate:Number((e.rate*1.35).toFixed(2)),orders:Math.round(e.orders*.7)})),vu=Po.map(e=>({...e,rate:Number((e.rate*.55).toFixed(2)),orders:Math.round(e.orders*.3)})),ln=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");o.setDate(o.getDate()+t);let n=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],i=80+t*11%40,l=Math.floor(i*.4),s=Math.floor(i*.35),p=i-l-s;return{date:`${n[o.getMonth()]} ${o.getDate()}`,total:i,members:l,retail:s,brandAffiliates:p}}),sn=[{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%\"}}],pa=Array.from({length:50},(e,t)=>{let o=[\"Sarah\",\"John\",\"Emma\",\"Michael\",\"Olivia\",\"William\",\"Ava\",\"James\"],n=[\"Smith\",\"Johnson\",\"Williams\",\"Brown\",\"Jones\",\"Garcia\",\"Miller\",\"Davis\"],i=new Date(\"2026-03-31\");return i.setDate(i.getDate()-t%30),{orderId:`ORD-${String(1e4+t).padStart(5,\"0\")}`,date:i.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),customerName:`${o[t%o.length]} ${n[t%n.length]}`,customerType:t%3===0?\"Subscription\":\"Standard\",items:t%5+1,total:Number((50+t*17%200+t%10*.1).toFixed(2)),bv:30+t*9%150}}),dn=Array.from({length:30},(e,t)=>{let o=[\"Alice\",\"Bob\",\"Carol\",\"David\",\"Eva\",\"Frank\",\"Grace\",\"Henry\"],n=[\"Anderson\",\"Baker\",\"Clark\",\"Davis\",\"Evans\",\"Fisher\",\"Grant\",\"Hall\"],i=[\"Member\",\"Retail\",\"Brand Affiliate\"],l=new Date(\"2026-03-31\");return l.setDate(l.getDate()-t%30),{id:`SU-${String(1e3+t).padStart(4,\"0\")}`,name:`${o[t%o.length]} ${n[t%n.length]}`,date:l.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),type:i[t%i.length],email:`${o[t%o.length].toLowerCase()}.${n[t%n.length].toLowerCase()}@example.com`,status:t%4===0?\"Pending\":\"Active\"}});var lo={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%\"}},cx={...lo,trend:{revenue:\"+5.1%\",offersPurchased:\"+12.5%\"}},ux={...lo,trend:{revenue:\"-1.8%\",offersPurchased:\"-3.7%\"}},gx={...lo,trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},fx={...lo,metrics:{...lo.metrics,offersPurchased:\"0\"},trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},sc=[{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%\"}}];\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 $disabled={(entries?.length ?? 0) === 0}\n onClick={(e) => {\n e.preventDefault();\n if ((entries?.length ?? 0) > 0 && history) {\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')<{ $disabled?: boolean }>`\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#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 ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n pointer-events: ${({ $disabled }) => ($disabled ? 'none' : 'auto')};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : '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 [isCategoriesLoaded, setIsCategoriesLoaded] = useState(false);\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((data) => {\n setCategories(data);\n setIsCategoriesLoaded(true);\n });\n }, [fetchCategories]);\n\n useEffect(() => {\n if (!isCategoriesLoaded) return;\n\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 } else {\n setLoading(false);\n }\n }, [categories, selectedTab, fetchProducts, isCategoriesLoaded]);\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} $hasCategories={categories.length > 0}>\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\nconst getMinHeight = ({ isMobile, $hasCategories }: { isMobile?: boolean; $hasCategories?: boolean }) => {\n if (isMobile) return 'auto';\n return $hasCategories ? '800px' : 'auto';\n};\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean; $hasCategories?: 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: ${getMinHeight};\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 readonly totalSavings?: string;\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 totalSavings?: 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 = (\n showBadges: boolean,\n expirationDate: string,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n totalSavings?: string,\n) => {\n if (!showBadges || (!expirationDate && !totalSavings)) 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 {totalSavings && (\n <Badge\n className={`${badgeClass} total-savings-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{totalSavings}</BadgeValue>\n </Badge>\n )}\n {expirationDate && (\n <Badge\n className={`${badgeClass} expiration-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\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, totalSavings } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {email?.trim() && renderContactLink('email', email, 'email-text-mobile')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\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, totalSavings } =\n props;\n\n return (\n <Box className=\"content\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {email?.trim() && renderContactLink('email', email, 'email-text')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\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 totalSavings,\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 = {\n shopTitle,\n shopDescription,\n socialTitleText,\n email,\n phone,\n showBadges,\n expirationDate,\n totalSavings,\n };\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 '&.total-savings-badge': {\n backgroundColor: '#4A6987',\n border: 'none',\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n backdropFilter: 'none',\n '.badge-value': {\n color: '#FFFFFF',\n },\n '&:hover': {\n backgroundColor: '#4A6987',\n transform: 'none',\n boxShadow: 'none',\n },\n },\n\n '&.expiration-badge': {\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\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: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\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, MarketFilterOption, DashboardStats } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { useMarketOptions } from '../utils/marketOptions';\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\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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 markets,\n onDateRangeChange,\n onMarketChange,\n}) => {\n const marketOptions = useMarketOptions(markets);\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;\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.dateRange.label)}\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.market.label)}</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)} ${\n marketOptions.find((opt) => opt.value === market)?.label ?? String(market)\n }`}\n >\n {marketOptions.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\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: 12px 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 12px;\n min-height: auto;\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: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\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: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`;\n\nexport const DateRangeLabel = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\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 margin-bottom: 0 !important;\n\n @media (min-width: 768px) {\n display: block;\n }\n`;\n\nexport const StyledSelect = styled('select')`\n height: 40px;\n padding: 8px 32px 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 min-width: 100px;\n max-width: 100%;\n white-space: nowrap;\n flex-shrink: 0;\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: 140px;\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: 160px;\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: nowrap;\n gap: 12px;\n align-items: center;\n width: 100%;\n overflow-x: auto;\n\n @media (min-width: 768px) {\n width: auto;\n gap: 16px;\n overflow-x: visible;\n }\n\n @media (min-width: 1080px) {\n gap: 20px;\n }\n`;\n\nexport const StyledCircularProgress = styled('div')`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","export type TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport type TranslateFn = (key: string, fallback: string) => string;\n\nlet activeResolver: TranslateFn | undefined;\n\nexport function setTranslationResolver(resolver: TranslateFn | undefined): void {\n activeResolver = resolver;\n}\n\nexport function getTranslationResolver(): TranslateFn | undefined {\n return activeResolver;\n}\n\nexport function resolveTranslation(entry: TranslationEntry): string {\n if (!activeResolver) {\n return entry.fallback;\n }\n let result: string | undefined;\n try {\n result = activeResolver(entry.key, entry.fallback);\n } catch {\n result = undefined;\n }\n return typeof result === 'string' && result.length > 0 ? result : entry.fallback;\n}\n","import { resolveTranslation } from './translationResolver';\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 visits: {\n key: 'shoppingDashboard.stats.visits',\n fallback: 'Site Visits',\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\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 },\n\n productSort: {\n label: {\n key: 'shoppingDashboard.filter.productSort.label',\n fallback: 'Sort By',\n },\n },\n signupView: {\n label: {\n key: 'shoppingDashboard.filter.signupView.label',\n fallback: 'Show',\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 conversionType: {\n standard: {\n key: 'shoppingDashboard.filter.conversionType.standard',\n fallback: 'Standard',\n },\n subscription: {\n key: 'shoppingDashboard.filter.conversionType.subscription',\n fallback: 'Subscription',\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 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 rank: {\n key: 'shoppingDashboard.widget.topProducts.rank',\n fallback: 'Rank',\n },\n },\n conversionRate: {\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 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 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 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 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 viewDetails: {\n key: 'shoppingDashboard.widget.menu.viewDetails',\n fallback: 'View Details',\n },\n exportData: {\n key: 'shoppingDashboard.widget.menu.exportData',\n fallback: 'Export Data',\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 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 customer: { key: 'shoppingDashboard.fullView.conversionRate.columns.customer', fallback: 'Customer' },\n items: { key: 'shoppingDashboard.fullView.conversionRate.columns.items', fallback: 'Items' },\n total: { key: 'shoppingDashboard.fullView.conversionRate.columns.total', fallback: 'Order Total' },\n bv: { key: 'shoppingDashboard.fullView.conversionRate.columns.bv', fallback: 'BV' },\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 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 percentOfTotal: {\n key: 'shoppingDashboard.fullView.categories.columns.percentOfTotal',\n fallback: '% of Total',\n },\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 noData: {\n key: 'shoppingDashboard.defaults.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.defaults.noChange',\n fallback: 'No change',\n },\n byRevenue: {\n key: 'shoppingDashboard.defaults.byRevenue',\n fallback: 'By: Revenue',\n },\n byUnits: {\n key: 'shoppingDashboard.defaults.byUnits',\n fallback: 'By: Units',\n },\n byVolume: {\n key: 'shoppingDashboard.defaults.byVolume',\n fallback: 'By: Volume',\n },\n byTrend: {\n key: 'shoppingDashboard.defaults.byTrend',\n fallback: 'By: Trend',\n },\n all: {\n key: 'shoppingDashboard.defaults.all',\n fallback: 'All',\n },\n members: {\n key: 'shoppingDashboard.defaults.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.defaults.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.defaults.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n revenue: {\n key: 'shoppingDashboard.defaults.revenue',\n fallback: 'Revenue',\n },\n units: {\n key: 'shoppingDashboard.defaults.units',\n fallback: 'Units',\n },\n volume: {\n key: 'shoppingDashboard.defaults.volume',\n fallback: 'Volume',\n },\n conversionRate: {\n key: 'shoppingDashboard.defaults.conversionRate',\n fallback: 'Conversion Rate',\n },\n trend: {\n key: 'shoppingDashboard.defaults.trend',\n fallback: 'Trend',\n },\n date: {\n key: 'shoppingDashboard.defaults.date',\n fallback: 'Date',\n },\n type: {\n key: 'shoppingDashboard.defaults.type',\n fallback: 'Type',\n },\n dcSv: {\n key: 'shoppingDashboard.defaults.dcSv',\n fallback: 'DC-SV',\n },\n },\n} as const;\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import { useMemo } from 'react';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport type { MarketFilterOption } from '../types.d';\n\nexport function buildDefaultMarketOptions(): MarketFilterOption[] {\n return [{ value: 'all', label: getTranslation(Keys.filter.market.all) }];\n}\n\nexport function resolveMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n if (markets && markets.length > 0) {\n return markets;\n }\n return buildDefaultMarketOptions();\n}\n\nexport function useMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n return useMemo(() => resolveMarketOptions(markets), [markets]);\n}\n","import React from 'react';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport {\n StatsCardContainer,\n StatsTitle,\n StatsValueContainer,\n StatsValue,\n StatsSubtitle,\n ValueSubtitleWrapper,\n TrendContainer,\n TrendText,\n StatsCardHeader,\n SplitTitle,\n SplitRow,\n LegendColumn,\n SplitTrend,\n LegendCaption,\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 caption?: string;\n readonly layout?: 'default' | 'split';\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 caption,\n layout = 'default',\n trendDirection = 'neutral',\n trendValue,\n testId,\n isLoading = false,\n}) => {\n if (isLoading) {\n return (\n <StatsCardContainer $layout={layout} 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 const getTrendChartIcon = (iconSize: string) => {\n if (trendDirection === 'up') {\n return <TrendingUpIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n if (trendDirection === 'down') {\n return <TrendingDownIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n };\n\n if (layout === 'split') {\n return (\n <StatsCardContainer as=\"article\" $layout=\"split\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <SplitTitle id={`stats-title-${testId}`}>{title}</SplitTitle>\n <SplitRow>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {(trendValue ?? caption) && (\n <LegendColumn>\n {trendValue && (\n <SplitTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('18px')}\n <TrendText>{trendValue}</TrendText>\n </SplitTrend>\n )}\n {caption && (\n <LegendCaption data-testid={`stats-caption-${testId}`}>{caption}</LegendCaption>\n )}\n </LegendColumn>\n )}\n </SplitRow>\n </StatsCardContainer>\n );\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 </StatsCardHeader>\n\n <StatsValueContainer>\n <ValueSubtitleWrapper>\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 </ValueSubtitleWrapper>\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 {getTrendChartIcon('16px')}\n <TrendText>{trendValue}</TrendText>\n </TrendContainer>\n )}\n </StatsValueContainer>\n </StatsCardContainer>\n );\n};\n\nexport const StatsCard = React.memo(StatsCardComponent);\nStatsCard.displayName = 'StatsCard';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const StatsCardContainer = styled('div')<{ $layout?: 'default' | 'split' }>`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({ $layout }) => ($layout === 'split' ? '8px' : '0')};\n padding: ${({ $layout }) => ($layout === 'split' ? '12px' : '10px')};\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 8px;\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\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: ${({ $layout }) => ($layout === 'split' ? '16px' : '12px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n\n @media (min-width: 1080px) {\n padding: ${({ $layout }) => ($layout === 'split' ? '16px' : '14px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n`;\n\nexport const SplitTitle = styled('div')`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SplitRow = styled('div')`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`;\n\nexport const LegendColumn = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`;\n\nexport const SplitTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#9b131a';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const LegendCaption = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const StatsTitle = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\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 justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n`;\n\nexport const StatsValue = styled('div')`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\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 ValueSubtitleWrapper = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`;\n\nexport const StatsSubtitle = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const TrendContainer = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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 ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\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 readonly onExport?: () => void;\n}\n\nconst TopSellingProductsListComponent: React.FC<TopSellingProductsListProps> = ({\n products,\n productSort,\n isLoading = false,\n maxProducts = 5,\n onSortChange,\n onTitleClick,\n onExport,\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 formatMoney(product.revenue, product.currencyCode);\n case 'volume':\n return `${product.volume.toLocaleString()} ${getTranslation(Keys.defaults.dcSv)}`;\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 `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n case 'revenue':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'volume':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n default:\n return `${formatMoney(product.revenue, product.currencyCode)} ${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 getTrendChartIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n };\n\n const displayedProducts = products.slice(0, maxProducts);\n const rankLabel = getTranslation(Keys.widget.topProducts.rank);\n const trendLabel = getTranslation(Keys.defaults.trend);\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.defaults.byUnits)}</option>\n <option value=\"revenue\">{getTranslation(Keys.defaults.byRevenue)}</option>\n <option value=\"volume\">{getTranslation(Keys.defaults.byVolume)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-products\" onFullView={onTitleClick} onExport={onExport} />\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 {getTrendChartIcon(trendDirection)}\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 React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport type { TrendDirection } from '../shared/types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport function 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 function resolveTrendDirection(value?: string): TrendDirection {\n const parsedValue = parseTrendPercent(value);\n if (parsedValue === null) return 'neutral';\n if (parsedValue > 0) return 'up';\n if (parsedValue < 0) return 'down';\n return 'neutral';\n}\n\nexport function calculateWeightedRevenueTrend<T>(\n items: readonly T[],\n getRevenue: (item: T) => number,\n getTrend: (item: T) => string | undefined,\n): { direction: TrendDirection; formatted: string } {\n const { weightedSum, weight } = items.reduce(\n (accumulator, item) => {\n const trendValue = parseTrendPercent(getTrend(item));\n if (trendValue === null) return accumulator;\n return {\n weightedSum: accumulator.weightedSum + trendValue * getRevenue(item),\n weight: accumulator.weight + getRevenue(item),\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const average = weight > 0 ? weightedSum / weight : 0;\n let direction: TrendDirection = 'neutral';\n if (average > 0) direction = 'up';\n else if (average < 0) direction = 'down';\n\n return { direction, formatted: `${average > 0 ? '+' : ''}${average.toFixed(1)}%` };\n}\n\nexport function 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\nexport function getTrendIcon(direction: TrendDirection): React.ReactNode {\n switch (direction) {\n case 'up':\n return <ArrowUpwardIcon />;\n case 'down':\n return <ArrowDownwardIcon />;\n case 'neutral':\n default:\n return <RemoveIcon />;\n }\n}\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 { useMemo } from 'react';\n\nexport function calculateTotalPages<T>(items: T[], itemsPerPage: number): number {\n return Math.ceil(items.length / itemsPerPage);\n}\n\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\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\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\nexport function usePaginatedItems<T>(\n items: T[],\n currentPage: number,\n itemsPerPage: number,\n): { totalPages: number; pageItems: T[] } {\n const totalPages = useMemo(() => calculateTotalPages(items, itemsPerPage), [items, itemsPerPage]);\n const pageItems = useMemo(\n () => paginateItems(items, currentPage, itemsPerPage),\n [items, currentPage, itemsPerPage],\n );\n return { totalPages, pageItems };\n}\n\nexport function formatMoney(\n value: number,\n currencyCode?: string,\n locale: string = 'en-US',\n fractionDigits?: number,\n): string {\n const amount = Number.isFinite(value) ? value : 0;\n if (currencyCode) {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n ...(fractionDigits !== undefined\n ? { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits }\n : { minimumFractionDigits: 0, maximumFractionDigits: 2 }),\n }).format(amount);\n } catch {}\n }\n return fractionDigits !== undefined ? `$${amount.toFixed(fractionDigits)}` : `$${amount.toLocaleString()}`;\n}\n\nexport function capitalizeFirstLetter(text: string): string {\n if (!text || text.length === 0) return text;\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\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: 16px;\n max-width: none;\n }\n`;\n\nexport const ProductSubtitle = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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 FileDownloadIcon from '@mui/icons-material/FileDownload';\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 readonly onExport?: () => void;\n}\n\nexport const WidgetMenu: React.FC<WidgetMenuProps> = ({ widgetId, onFullView, onExport }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n const buttonId = `widget-menu-button-${widgetId}`;\n const menuId = `widget-menu-${widgetId}`;\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 const handleExport = () => {\n handleClose();\n if (onExport) {\n onExport();\n }\n };\n\n return (\n <>\n <StyledIconButton\n id={buttonId}\n data-testid={`widget-menu-button-${widgetId}`}\n aria-label={getTranslation(Keys.widget.menu.ariaLabel)}\n aria-controls={open ? menuId : 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={menuId}\n data-testid={`widget-menu-${widgetId}`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': buttonId,\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-viewdetails\">\n <ListItemIcon>\n <VisibilityIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.viewDetails)}</ListItemText>\n </MenuItem>\n <MenuItem onClick={handleExport} data-testid=\"widget-menu-item-export\">\n <ListItemIcon>\n <FileDownloadIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.exportData)}</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 color: '#252525',\n '&:hover': {\n backgroundColor: 'rgba(37, 37, 37, 0.08)',\n },\n}));\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport { getTrendIcon, getTrendDirectionLabel } 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 { formatAxisDate } from '../../utils/dateFormat';\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 summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onTitleClick?: () => void;\n readonly onExport?: () => void;\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\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 ?? 0).toFixed(2)}%</TooltipValue>\n <TooltipDetails>\n {data.orders ?? 0} {getTranslation(Keys.widget.conversionRate.tooltipOrders)} /{' '}\n {(data.siteVisits ?? 0).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 summaryRate,\n summaryChangePct,\n onFilterChange,\n onTitleClick,\n onExport,\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.defaults.noData);\n const noChangeText = getTranslation(Keys.defaults.noChange);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null || Math.abs(summaryChangePct) < 0.1) {\n return { direction: 'neutral', value: noChangeText };\n }\n const direction = summaryChangePct > 0 ? 'up' : 'down';\n const formatted = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(2)}%`;\n return { direction, value: formatted };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: noChangeText };\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 }, [summaryChangePct, conversionData, noChangeText, noDataText]);\n\n const formattedData = React.useMemo(\n () => conversionData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [conversionData],\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.defaults.conversionRate)}\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.defaults.all)}</option>\n <option value=\"standard\">{getTranslation(Keys.filter.conversionType.standard)}</option>\n <option value=\"subscription\">\n {getTranslation(Keys.filter.conversionType.subscription)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"conversion-rate\" onFullView={onTitleClick} onExport={onExport} />\n </HeaderActionsContainer>\n </TitleRow>\n </ChartHeader>\n\n <MetricDisplay>\n <MetricValue\n aria-label={`${getTranslation(Keys.defaults.conversionRate)}: ${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 <FormulaDisplay data-testid=\"conversion-formula\">\n {getTranslation(Keys.widget.conversionRate.formula)}\n </FormulaDisplay>\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 align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\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: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\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: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\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: 8px;\n margin-top: 0;\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 type { DateRangeOption } from '../types.d';\n\nexport const DAYS_MAP: Record<DateRangeOption, number> = {\n last7days: 7,\n last30days: 30,\n last90days: 90,\n thisMonth: 31,\n};\n\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\nexport function getDaysFromDateRange(dateRange: DateRangeOption): number {\n return DAYS_MAP[dateRange] ?? 30;\n}\n\nexport function getDateRangeLabel(dateRange: DateRangeOption): string {\n return DATE_RANGE_LABELS[dateRange] ?? 'Last 30 Days';\n}\n","import type { DateRangeOption } from '../types.d';\nimport { getDateRangeLabel } from './dateConstants';\n\nexport function formatDateRangeLabel(dateRange: DateRangeOption): string {\n return getDateRangeLabel(dateRange);\n}\n\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\nconst AXIS_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\nexport function formatAxisDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${AXIS_MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nexport function formatDisplayDate(dateStr: string): string {\n const date = new Date(dateStr);\n return formatShortDate(date);\n}\n\nexport function formatDateRange(start: string, end: string): string {\n return `${formatDisplayDate(start)} - ${formatDisplayDate(end)}`;\n}\n\nexport function formatISODate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n\n/**\n * Extract and format the date range from an array of data objects.\n * Handles various date field names: 'date', 'Date', 'dateTime', etc.\n * Falls back to calculating from dateRange option if no date data is available.\n * @param data Array of objects with date information\n * @param fallbackLabel Fallback label if no dates found\n * @returns Formatted date range string (e.g., \"May 30 - Aug 27\")\n */\nexport function getActualDateRange(data: unknown[], fallbackLabel: string = 'N/A'): string {\n if (!Array.isArray(data) || data.length === 0) return fallbackLabel;\n\n try {\n // Extract first and last dates from data\n const first = data[0] as Record<string, unknown>;\n const last = data[data.length - 1] as Record<string, unknown>;\n\n // Try various date field names\n const dateFieldNames = ['date', 'Date', 'dateTime', 'eventDate', 'timestamp'];\n let startDateStr: string | undefined;\n let endDateStr: string | undefined;\n\n for (const fieldName of dateFieldNames) {\n if (first[fieldName] && !startDateStr) {\n startDateStr = String(first[fieldName]);\n }\n if (last[fieldName] && !endDateStr) {\n endDateStr = String(last[fieldName]);\n }\n }\n\n if (startDateStr && endDateStr) {\n return formatDateRange(startDateStr, endDateStr);\n }\n } catch {\n // Silently fail and return fallback\n }\n\n return fallbackLabel;\n}\n\n/**\n * Calculate and format the date range based on a DateRangeOption.\n * Used for components without time-series data (e.g., TopProducts, TopCategories)\n * @param dateRangeOption The selected date range option\n * @returns Formatted date range string (e.g., \"Aug 28 - Sep 27\" for last30days)\n */\nexport function calculateDateRangeFromOption(dateRangeOption: DateRangeOption): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = today.getMonth();\n const date = today.getDate();\n\n let startDate: Date;\n let endDate = new Date(year, month, date);\n\n switch (dateRangeOption) {\n case 'last7days':\n startDate = new Date(year, month, date - 7);\n break;\n case 'last30days':\n startDate = new Date(year, month, date - 30);\n break;\n case 'last90days':\n startDate = new Date(year, month, date - 90);\n break;\n case 'thisMonth':\n startDate = new Date(year, month, 1);\n endDate = new Date(year, month + 1, 0); // Last day of current month\n break;\n default:\n return 'N/A';\n }\n\n return formatDateRange(formatISODate(startDate), formatISODate(endDate));\n}\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { getTrendIcon, getTrendDirectionLabel } 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 { formatAxisDate } from '../../utils/dateFormat';\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 readonly onExport?: () => void;\n}\n\nconst SERIES_COLORS = {\n total: '#3B82F6',\n members: '#7B92A8',\n retail: '#A3B5C7',\n brandAffiliates: '#CBD6E0',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 2 };\n\nconst SignupsChartComponent: React.FC<SignupsChartProps> = ({\n signupData,\n signupView,\n isLoading = false,\n title,\n onViewChange,\n onTitleClick,\n onExport,\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.defaults.noData);\n const noChangeText = getTranslation(Keys.defaults.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: formatAxisDate(item.date) })),\n [signupData],\n );\n const totalLabel = getTranslation(Keys.widget.signups.total);\n const membersLabel = getTranslation(Keys.defaults.members);\n const retailLabel = getTranslation(Keys.defaults.retail);\n const brandAffiliatesLabel = getTranslation(Keys.defaults.brandAffiliates);\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} onExport={onExport} />\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\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: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\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: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\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 justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\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 TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\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 LegendValueWrapper,\n LegendTrendInline,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from './TopCategoriesPieChart.styled';\nimport type { CategoryRevenue, CategorySortOption, TrendDirection } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopCategoriesPieChartProps {\n readonly categories: CategoryRevenue[];\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly summaryChangePct?: number | null;\n readonly onSortChange?: (sort: CategorySortOption) => void;\n readonly onTitleClick?: () => void;\n readonly onExport?: () => void;\n}\n\nconst TopCategoriesPieChartComponent: React.FC<TopCategoriesPieChartProps> = ({\n categories,\n categorySort,\n isLoading = false,\n title,\n summaryChangePct,\n onSortChange,\n onTitleClick,\n onExport,\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 (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) - (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n });\n\n const nextTotalRevenue = nextSortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n let nextTrendDirection: TrendDirection;\n let nextFormattedTrend: string;\n\n // Use the provided summaryChangePct if available, otherwise calculate from items\n if (summaryChangePct !== undefined && summaryChangePct !== null) {\n if (Math.abs(summaryChangePct) < 0.1) {\n nextFormattedTrend = '0%';\n nextTrendDirection = 'neutral';\n } else {\n nextTrendDirection = summaryChangePct > 0 ? 'up' : 'down';\n nextFormattedTrend = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%`;\n }\n } else {\n const { direction, formatted } = calculateWeightedRevenueTrend(\n nextSortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n nextTrendDirection = direction;\n nextFormattedTrend = formatted;\n }\n\n return {\n sortedCategories: nextSortedCategories,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [categories, categorySort, summaryChangePct]);\n\n const getTrendGraphIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label in the middle of the donut ring\n const radius = innerRadius + (outerRadius - innerRadius) / 2;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize=\"10\"\n fontWeight=\"600\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0.2\"\n style={{ lineHeight: '12px' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const currencyCode = sortedCategories[0]?.currencyCode;\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.defaults.byRevenue)}</option>\n <option value=\"trend\">{getTranslation(Keys.defaults.byTrend)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-categories\" onFullView={onTitleClick} onExport={onExport} />\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 label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>\n {getTrendGraphIcon(trendDirection)}\n <span>{formattedTrend}</span>\n </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>\n {category.name.charAt(0).toUpperCase() + category.name.slice(1)}\n </LegendName>\n <LegendValueWrapper>\n <LegendValue>\n {formatMoney(category.revenue, category.currencyCode)} ({category.percentage}%)\n </LegendValue>\n {category.trend?.revenue ? (\n <LegendTrendInline\n direction={resolveTrendDirection(category.trend?.revenue)}\n data-testid={`category-legend-trend-${index}`}\n aria-label={category.trend.revenue}\n >\n {getTrendGraphIcon(resolveTrendDirection(category.trend?.revenue))}\n </LegendTrendInline>\n ) : null}\n </LegendValueWrapper>\n </LegendInfo>\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const ChartWrapper = styled('div')`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\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 display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\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 svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\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: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`;\n\nexport const LegendName = styled('div')`\n font-size: 13px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const LegendValue = styled('div')`\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const LegendPercentage = styled('div')`\n display: none;\n`;\n\nexport const LegendValueWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`;\n\nexport const LegendTrendInline = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendTrend = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 16px;\n height: 16px;\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 MarketFilterOption,\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 readonly dateRange?: DateRangeOption;\n readonly market?: MarketOption;\n readonly productSort?: ProductSortOption;\n readonly signupView?: SignupViewOption;\n readonly conversionFilter?: ConversionFilterOption;\n readonly categorySort?: CategorySortOption;\n readonly categoriesSummaryChangePct?: number | null;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\n readonly onProductsTitleClick?: () => void;\n readonly onConversionTitleClick?: () => void;\n readonly onSignupsTitleClick?: () => void;\n readonly onCategoriesToTitleClick?: () => void;\n\n readonly onProductsExport?: () => void;\n readonly onConversionExport?: () => void;\n readonly onSignupsExport?: () => void;\n readonly onCategoriesExport?: () => void;\n}\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 categoriesSummaryChangePct,\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onSignupsTitleClick,\n onCategoriesToTitleClick,\n onProductsExport,\n onConversionExport,\n onSignupsExport,\n onCategoriesExport,\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 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 markets={markets}\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.defaults.volume)}\n value={stats?.metrics?.volume ?? '0'}\n subtitle={getTranslation(Keys.defaults.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.defaults.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 onExport={onProductsExport}\n />\n <SignupsChart\n signupData={resolvedSignupData}\n signupView={signupView}\n isLoading={isLoading}\n onViewChange={onSignupViewChange}\n onTitleClick={onSignupsTitleClick}\n onExport={onSignupsExport}\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 onExport={onConversionExport}\n />\n <TopCategoriesPieChart\n categories={resolvedCategories}\n categorySort={categorySort}\n isLoading={isLoading}\n summaryChangePct={categoriesSummaryChangePct}\n onSortChange={onCategorySortChange}\n onTitleClick={onCategoriesToTitleClick}\n onExport={onCategoriesExport}\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 { useTranslationResolver } from './TranslationContext';\nimport type { TranslateFn } from './TranslationKeys/translationResolver';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\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 categoriesSummaryChangePct?: number | null;\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 translate?: TranslateFn;\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 markets?: ReadonlyArray<MarketFilterOption>;\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 categoriesSummaryChangePct,\n orders,\n signups,\n isLoading = false,\n error,\n shopTitle,\n className,\n translate,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialSignupView = 'all',\n initialConversionFilter = 'all',\n initialCategorySort = 'revenue',\n markets,\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 useTranslationResolver(translate);\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 markets={markets}\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 markets={markets}\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 markets={markets}\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 summaryChangePct={categoriesSummaryChangePct}\n markets={markets}\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 categoriesSummaryChangePct={categoriesSummaryChangePct}\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 markets={markets}\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, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type { TopProduct, DateRangeOption, MarketOption, MarketFilterOption, ProductSortOption } from '../../types.d';\nimport { FullViewTableSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n ProductInfo,\n ProductName,\n ProductSku,\n MetricValue,\n MobileCardsContainer,\n DesktopTableContainer,\n MobileProductCard,\n MobileCardHeader,\n MobileProductRank,\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\ninterface ProductRow {\n rank: number;\n name: string;\n sku: 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 markets?: ReadonlyArray<MarketFilterOption>;\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 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 markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: productSort,\n options: [\n { value: 'units', label: getTranslation(Keys.defaults.units) },\n { value: 'revenue', label: getTranslation(Keys.defaults.revenue) },\n { value: 'volume', label: getTranslation(Keys.defaults.volume) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\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 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, pageItems: paginatedRows } = usePaginatedItems(sortedRows, currentPage, itemsPerPage);\n\n const currencyCode = products[0]?.currencyCode;\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 <ProductInfo>\n <ProductName>{row.name}</ProductName>\n <ProductSku>{row.sku}</ProductSku>\n </ProductInfo>\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.defaults.revenue),\n sortable: true,\n render: (value: unknown) => <MetricValue>{formatMoney(Number(value), currencyCode)}</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 [currencyCode],\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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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 <MobileProductDetails>\n <MobileProductName>{row.name}</MobileProductName>\n <MobileProductSku>{row.sku}</MobileProductSku>\n </MobileProductDetails>\n </MobileCardHeader>\n <MobileMetricsGrid>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.units)}</MobileMetricLabel>\n <MobileMetricValue>{row.units.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.revenue)}</MobileMetricLabel>\n <MobileMetricValue>{formatMoney(row.revenue, currencyCode)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.volume)}</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 type { DateRangeOption, MarketOption, MarketFilterOption } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport type { FilterConfig } from './types';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport interface DateRangeMarketKeys {\n readonly filter: {\n readonly dateRange: {\n readonly label: TranslationEntry;\n readonly last7days: TranslationEntry;\n readonly last30days: TranslationEntry;\n readonly last90days: TranslationEntry;\n readonly thisMonth: TranslationEntry;\n };\n readonly market: {\n readonly label: TranslationEntry;\n };\n };\n}\n\nexport function buildDateRangeFilter(dateRange: DateRangeOption, keys: DateRangeMarketKeys): FilterConfig {\n return {\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\nexport function buildMarketFilter(\n market: MarketOption,\n marketOptions: ReadonlyArray<MarketFilterOption>,\n keys: DateRangeMarketKeys,\n): FilterConfig {\n return {\n key: 'market',\n label: getTranslation(keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: marketOptions.map((option) => ({ value: option.value, label: option.label })),\n };\n}\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`;\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 scope=\"col\"\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 }) => getGenomeColor(theme, 'N20')};\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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","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 width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\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: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({ theme }) => theme.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`;\n\nexport const MetricTrend = styled(Box)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\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 flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`;\n\nexport const ComparisonText = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\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('h2')`\n margin: 0;\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: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`;\n\nexport const TableSection = styled(Box)<{ withCard?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\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 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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 flex-direction: column;\n align-items: stretch;\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 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 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: 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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 } from 'recharts';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n ConversionDataPoint,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ConversionFilterOption,\n} from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\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 OrderIdColumnCell,\n ConversionTrendChartContainer,\n ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\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 markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\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 summaryRate,\n summaryChangePct,\n dateRange,\n market,\n conversionFilter,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trend = React.useMemo((): { direction: TrendDirection; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null)\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n let direction: TrendDirection = 'neutral';\n if (summaryChangePct > 0) direction = 'up';\n else if (summaryChangePct < 0) direction = 'down';\n return { direction, value: `${summaryChangePct >= 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%` };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const changePercent = ((latestRate - previousRate) / previousRate) * 100;\n if (Math.abs(changePercent) < 0.1) {\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n }\n let direction: TrendDirection = 'neutral';\n if (changePercent > 0) direction = 'up';\n else if (changePercent < 0) direction = 'down';\n return { direction, value: `${changePercent >= 0 ? '+' : ''}${changePercent.toFixed(1)}%` };\n }, [summaryChangePct, conversionData]);\n\n const getConversionFilterLabel = React.useCallback((filter: ConversionFilterOption): string => {\n if (filter === 'standard') return getTranslation(Keys.filter.conversionType.standard);\n if (filter === 'subscription') return getTranslation(Keys.filter.conversionType.subscription);\n return getTranslation(Keys.defaults.all);\n }, []);\n\n const conversionFilterLabel = React.useMemo(\n () => getConversionFilterLabel(conversionFilter),\n [conversionFilter, getConversionFilterLabel],\n );\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'customerType',\n label: getTranslation(Keys.filter.signupView.label),\n value: conversionFilter,\n options: [\n { value: 'all', label: getTranslation(Keys.defaults.all) },\n { value: 'standard', label: getTranslation(Keys.filter.conversionType.standard) },\n { value: 'subscription', label: getTranslation(Keys.filter.conversionType.subscription) },\n ],\n },\n ],\n [conversionFilter, dateRange, market, marketOptions],\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);\n else if (key === 'customerType') {\n onConversionFilterChange?.(value as ConversionFilterOption);\n setCurrentPage(1);\n }\n },\n [onConversionFilterChange, onDateRangeChange, onMarketChange],\n );\n\n const filteredOrders = React.useMemo(() => {\n if (conversionFilter === 'all') return orders;\n return orders.filter((order) => order.customerType.toLowerCase() === conversionFilter);\n }, [orders, conversionFilter]);\n\n const { totalPages, pageItems: paginatedOrders } = usePaginatedItems(filteredOrders, currentPage, itemsPerPage);\n\n const columns: ColumnDef<OrderHistory>[] = React.useMemo(\n () => [\n {\n key: 'orderId',\n label: getTranslation(Keys.fullView.conversionRate.columns.orderId),\n sortable: true,\n render: (value) => <OrderIdColumnCell>{value as React.ReactNode}</OrderIdColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.defaults.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.defaults.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, row: OrderHistory) =>\n formatMoney(Number(value), row.currencyCode, undefined, 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 === 'standard') return '#2e7d32';\n if (conversionFilter === 'subscription') 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.defaults.conversionRate)}\n dateRange={calculateDateRangeFromOption(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.defaults.conversionRate)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"conversion-fullview-metric-chart\">\n <MetricSection>\n <div style={{ display: 'flex', alignItems: 'center', gap: '0px', flexWrap: 'wrap' }}>\n <MetricValue data-testid=\"conversion-rate-value\" style={{ marginRight: '6px' }}>\n {currentRate.toFixed(1)}%\n </MetricValue>\n <MetricTrend direction={trend.direction} data-testid=\"conversion-rate-trend\">\n {trend.direction === 'up' && <ArrowUpwardIcon />}\n {trend.direction === 'down' && <ArrowDownwardIcon />}\n <span\n style={{\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 600,\n fontSize: '14px',\n lineHeight: '20px',\n letterSpacing: '0em',\n }}\n >\n {trend.value}\n </span>\n <span\n style={{\n marginLeft: '2px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px',\n letterSpacing: '0.01em',\n color: '#5F5F5F',\n }}\n >\n compared to this time last month\n </span>\n </MetricTrend>\n </div>\n </MetricSection>\n\n <ChartSection>\n <ChartWithLegendWrapper>\n <ConversionTrendChartContainer data-testid=\"conversion-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart data={conversionData} margin={{ top: 10, right: 10, left: 0, bottom: 0 }}>\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 <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke={getChartColor()}\n strokeWidth={2}\n name={`${getTranslation(Keys.defaults.conversionRate)} (${conversionFilterLabel})`}\n dot={false}\n />\n </LineChart>\n </ResponsiveContainer>\n </ConversionTrendChartContainer>\n <ChartLegendContainer>\n <LegendItem style={{ color: getChartColor() }}>\n {`${getTranslation(Keys.defaults.conversionRate)} (${conversionFilterLabel})`}\n </LegendItem>\n </ChartLegendContainer>\n </ChartWithLegendWrapper>\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)} ({filteredOrders.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"conversion-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedOrders}\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.total)}\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={filteredOrders.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 ConversionTrendChartContainer = styled(Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\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 ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\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\nexport const OrderIdColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { Box } from '@mui/material';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport type {\n SignupDataPoint,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n SignupViewOption,\n} 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 ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\n NameColumnCell,\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\n/**\n * Transform API response format to SignupDataPoint array\n * Handles both direct array format and nested API response with 'daily' array\n */\nfunction normalizeSignupDataInput(input: unknown): SignupDataPoint[] {\n // If it's already an array, return it\n if (Array.isArray(input)) {\n return input;\n }\n\n // Handle API response format with 'daily' array\n const apiResponse = input as Record<string, unknown>;\n if (Array.isArray(apiResponse.daily)) {\n return (apiResponse.daily as Array<Record<string, unknown>>).map((item) => ({\n date: String(item.date ?? ''),\n total: toNumeric(item.total),\n members: toNumeric(item.members),\n retail: toNumeric(item.retail),\n brandAffiliates: toNumeric(\n item.brandAffiliates ?? item.brandAffiliate ?? item.brand_affiliates ?? item.brand_affiliate,\n ),\n }));\n }\n\n // Fallback to empty array\n return [];\n}\n\nexport interface SignupsFullViewProps {\n /**\n * Signup data - can be either:\n * 1. Direct array of SignupDataPoint (camelCase format)\n * 2. API response object with 'daily' array (snake_case format)\n */\n readonly signupData: SignupDataPoint[] | { daily?: Array<Record<string, unknown>>; [key: string]: unknown };\n readonly signups: SignupDetail[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly signupView: SignupViewOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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 markets,\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 marketOptions = useMarketOptions(markets);\n\n const normalizedSignupData = React.useMemo(() => {\n // First, transform API response format to array if needed\n const dataArray = normalizeSignupDataInput(signupData);\n\n // Then, normalize field names and values\n return dataArray.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 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((): {\n direction: 'up' | 'down' | 'neutral';\n absoluteChange: number;\n percentageChange: string;\n } => {\n if (normalizedSignupData.length < 2)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const first = normalizedSignupData[0].total;\n const last = normalizedSignupData[normalizedSignupData.length - 1].total;\n if (first <= 0)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const absoluteChange = last - first;\n const percentageChange = (absoluteChange / first) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (percentageChange > 0) direction = 'up';\n else if (percentageChange < 0) direction = 'down';\n return {\n direction,\n absoluteChange: Math.round(absoluteChange),\n percentageChange: `${percentageChange >= 0 ? '+' : ''}${percentageChange.toFixed(1)}%`,\n };\n }, [normalizedSignupData, Keys]);\n\n const hasSignupTrendData = normalizedSignupData.length > 0;\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'signupView',\n label: getTranslation(Keys.filter.signupView.label),\n value: signupView,\n options: [\n { value: 'all', label: getTranslation(Keys.defaults.all) },\n { value: 'members', label: getTranslation(Keys.defaults.members) },\n { value: 'retail', label: getTranslation(Keys.defaults.retail) },\n { value: 'brandAffiliates', label: getTranslation(Keys.defaults.brandAffiliates) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\n else if (key === 'signupView') {\n onSignupViewChange?.(value as SignupViewOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onSignupViewChange],\n );\n\n const { totalPages, pageItems: paginatedSignups } = usePaginatedItems(signups, currentPage, itemsPerPage);\n\n const columns: ColumnDef<SignupDetail>[] = React.useMemo(\n () => [\n { key: 'id', label: getTranslation(Keys.fullView.signups.columns.id), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.signups.columns.name),\n sortable: true,\n render: (value) => <NameColumnCell>{value as React.ReactNode}</NameColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.defaults.date), sortable: true },\n { key: 'type', label: getTranslation(Keys.defaults.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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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.direction !== 'neutral' && (\n <>\n <span style={{ fontWeight: 600, lineHeight: 1 }}>\n {trend.absoluteChange > 0 ? '+' : ''}\n {trend.absoluteChange}\n </span>\n <span style={{ fontWeight: 400, lineHeight: 1 }}>{trend.percentageChange}</span>\n </>\n )}\n {trend.direction === 'neutral' && <span>{trend.percentageChange}</span>}\n </MetricTrend>\n <ComparisonTextMobile>{getTranslation(Keys.widget.conversionRate.comparison)}</ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n {hasSignupTrendData ? (\n <ChartWithLegendWrapper>\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 {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.defaults.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.defaults.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.defaults.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.defaults.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.defaults.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.defaults.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </SignupTrendChartContainer>\n <Box>\n {signupView === 'all' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.total }}>\n {getTranslation(Keys.widget.signups.total)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.defaults.members)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.defaults.retail)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.defaults.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'members' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.defaults.members)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'retail' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.defaults.retail)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'brandAffiliates' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.defaults.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n </Box>\n </ChartWithLegendWrapper>\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 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';\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(Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n`;\n\nexport const ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`;\n\nexport const NameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney, capitalizeFirstLetter } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n CategorySortOption,\n TrendDirection,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\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 SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrendIcon,\n DesktopTableContainer,\n MobileCategoriesContainer,\n MobileCategoryCard,\n CategoryNameColumnCell,\n} from './CategoriesFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\n\nexport interface CategoriesFullViewProps {\n readonly categories: CategoryRevenue[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly categorySort: CategorySortOption;\n readonly summaryChangePct?: number | null;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\nexport const CategoriesFullView: React.FC<CategoriesFullViewProps> = ({\n categories,\n dateRange,\n market,\n categorySort,\n summaryChangePct,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: categorySort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.defaults.byRevenue) },\n { value: 'trend', label: getTranslation(Keys.defaults.byTrend) },\n ],\n },\n ],\n [categorySort, dateRange, market, marketOptions],\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);\n else if (key === 'sort') {\n onCategorySortChange?.(value as CategorySortOption);\n setCurrentPage(1);\n }\n },\n [onCategorySortChange, onDateRangeChange, onMarketChange],\n );\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label more towards center of the donut ring, slightly inward\n const radius = innerRadius + (outerRadius - innerRadius) * 0.45;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize=\"12\"\n fontWeight=\"700\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0\"\n style={{ lineHeight: '14px', pointerEvents: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const getTrendIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n const resolveTrendDirection = (trendValue?: string): TrendDirection => {\n if (!trendValue) return 'neutral';\n const parsed = Number.parseFloat(trendValue);\n if (Number.isNaN(parsed)) return 'neutral';\n if (parsed > 0) return 'up';\n if (parsed < 0) return 'down';\n return 'neutral';\n };\n\n const sortedCategories = React.useMemo(\n () =>\n [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) -\n (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\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 let nextTrendDirection: TrendDirection;\n let nextFormattedTrend: string;\n\n // Use the provided summaryChangePct if available, otherwise calculate from items\n if (summaryChangePct !== undefined && summaryChangePct !== null) {\n if (Math.abs(summaryChangePct) < 0.1) {\n nextFormattedTrend = '0%';\n nextTrendDirection = 'neutral';\n } else {\n nextTrendDirection = summaryChangePct > 0 ? 'up' : 'down';\n nextFormattedTrend = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%`;\n }\n } else {\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n nextTrendDirection = direction;\n nextFormattedTrend = formatted;\n }\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: nextTrendDirection,\n totalRevenueTrend: nextFormattedTrend,\n };\n }, [sortedCategories, summaryChangePct]);\n\n const topCategories = React.useMemo(() => sortedCategories.slice(0, 5), [sortedCategories]);\n\n const { totalPages, pageItems: paginatedCategories } = usePaginatedItems(\n sortedCategories,\n currentPage,\n itemsPerPage,\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 <CategoryNameColumnCell>{capitalizeFirstLetter(row.name)}</CategoryNameColumnCell>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.defaults.revenue),\n sortable: true,\n render: (value: unknown, row: CategoryRevenue) => formatMoney(Number(value), row.currencyCode),\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.defaults.trend),\n render: (_: unknown, row: CategoryRevenue) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noValue),\n },\n ],\n [],\n );\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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 label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-fullview-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>\n {getTrendIcon(totalRevenueTrendDirection)}\n <span>{totalRevenueTrend}</span>\n </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 <SummaryName>{capitalizeFirstLetter(category.name)}</SummaryName>\n <SummaryValue>{formatMoney(category.revenue, category.currencyCode)}</SummaryValue>\n <SummaryPercentage>({category.percentage}%)</SummaryPercentage>\n {category.trend?.revenue ? (\n <SummaryTrendIcon direction={resolveTrendDirection(category.trend.revenue)}>\n {getTrendIcon(resolveTrendDirection(category.trend.revenue))}\n </SummaryTrendIcon>\n ) : null}\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>\n {formatMoney(category.revenue, category.currencyCode)}\n </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, ColorUtils } from '@nuskin/foundation-theme';\nimport { styled as muiStyled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\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: 32px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`;\n\nexport const ChartWrapper = muiStyled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\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 display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\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 '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const SummaryContainer = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`;\n\nexport const SummaryItem = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\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: none;\n`;\n\nexport const SummaryName = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nexport const SummaryValue = muiStyled(Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`;\n\nexport const SummaryPercentage = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({ theme }) => theme.palette.text.primary};\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\nexport const SummaryTrendIcon = muiStyled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const CategoryNameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React from 'react';\nimport {\n resolveTranslation,\n setTranslationResolver,\n type TranslateFn,\n type TranslationEntry,\n} from './TranslationKeys/translationResolver';\n\nexport function useTranslationResolver(translate?: TranslateFn): void {\n setTranslationResolver(translate);\n\n React.useEffect(() => {\n setTranslationResolver(translate);\n return () => {\n setTranslationResolver(undefined);\n };\n }, [translate]);\n}\n\nexport interface TranslationProviderProps {\n readonly translate?: TranslateFn;\n readonly children?: React.ReactNode;\n}\n\nexport const TranslationProvider: React.FC<TranslationProviderProps> = ({ translate, children }) => {\n useTranslationResolver(translate);\n return children ?? null;\n};\n\nexport function useTranslation(): (entry: TranslationEntry) => string {\n return React.useCallback((entry: TranslationEntry) => resolveTranslation(entry), []);\n}\n\nexport type { TranslateFn, TranslationEntry };\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: flex-start;\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 LegendTrend,\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';\nimport { getTrendIcon, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney, capitalizeFirstLetter } from '../../utils/dataUtils';\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 readonly onExport?: () => void;\n}\n\nconst TopPerformingOffersPieChartComponent: React.FC<TopPerformingOffersPieChartProps> = ({\n offers,\n offerSort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n onExport,\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 { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n sortedOffers: nextSortedOffers,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [offers, offerSort]);\n\n const currencyCode = sortedOffers[0]?.currencyCode;\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.defaults.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.defaults.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-offers\" onFullView={onTitleClick} onExport={onExport} />\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={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</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 const legendTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <LegendItem key={offer.id} data-testid={`offer-legend-${index}`}>\n <LegendColor color={offer.color} />\n <LegendInfo>\n <LegendName>{capitalizeFirstLetter(offer.name)}</LegendName>\n <LegendValue>{formatMoney(offer.revenue, offer.currencyCode)}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{offer.percentage}%</LegendPercentage>\n {offer.trend?.revenue ? (\n <LegendTrend\n direction={legendTrendDirection}\n data-testid={`offer-legend-trend-${index}`}\n aria-label={offer.trend.revenue}\n >\n {getTrendIcon(legendTrendDirection)}\n </LegendTrend>\n ) : null}\n </LegendItem>\n );\n })}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopPerformingOffersPieChart = React.memo(TopPerformingOffersPieChartComponent);\nTopPerformingOffersPieChart.displayName = 'TopPerformingOffersPieChart';\n","import { resolveTranslation } from './translationResolver';\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 byRevenue: { key: 'productOfferDashboard.defaults.byRevenue', fallback: 'Revenue' },\n byUnits: { key: 'productOfferDashboard.defaults.byUnits', fallback: 'Units' },\n byVolume: { key: 'productOfferDashboard.defaults.byVolume', fallback: 'Volume' },\n },\n} as const;\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\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\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 conversionSummaryRate,\n conversionSummaryChangePct,\n markets,\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 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 markets={markets}\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 summaryRate={conversionSummaryRate}\n summaryChangePct={conversionSummaryChangePct}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <StatsCardStack data-testid=\"stats-card-stack\">\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.offersPurchased)}\n value={stats?.metrics?.offersPurchased ?? '0'}\n trendDirection={getTrendDirection(stats?.trend?.offersPurchased)}\n trendValue={stats?.trend?.offersPurchased}\n caption={getTranslation(Keys.stats.comparedTo)}\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 { useTranslationResolver } from './TranslationContext';\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\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 conversionSummaryRate,\n conversionSummaryChangePct,\n conversionFullViewData,\n conversionFullViewRate,\n conversionFullViewChangePct,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialConversionFilter = 'all',\n initialOfferSort = 'revenue',\n markets,\n translate,\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 useTranslationResolver(translate);\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 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 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 if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedAllProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\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={conversionFullViewData ?? resolvedConversionData}\n orders={resolvedOrders}\n summaryRate={conversionFullViewRate ?? conversionSummaryRate}\n summaryChangePct={conversionFullViewChangePct ?? conversionSummaryChangePct}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\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 markets={markets}\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 conversionSummaryRate={conversionSummaryRate}\n conversionSummaryChangePct={conversionSummaryChangePct}\n markets={markets}\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, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n TopPerformingOffer,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n OfferSortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { SummaryItemRow } 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 SummaryTrend,\n TableTrendCell,\n DesktopTableContainer,\n MobileOffersContainer,\n MobileOfferCard,\n MobileOfferHeader,\n MobileOfferName,\n MobileOfferMetricsGrid,\n MobileOfferMetricItem,\n MobileOfferMetricLabel,\n MobileOfferMetricValue,\n MobileOfferTrendValue,\n} from './TopPerformingOffersFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport {\n getTrendIcon,\n parseTrendPercent,\n resolveTrendDirection,\n calculateWeightedRevenueTrend,\n} from '../../utils/trendUtils';\n\nexport interface TopPerformingOffersFullViewProps {\n readonly offers: TopPerformingOffer[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly offerSort: OfferSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\nexport const TopPerformingOffersFullView: React.FC<TopPerformingOffersFullViewProps> = ({\n offers,\n dateRange,\n market,\n offerSort,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.defaults.byRevenue),\n value: offerSort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.defaults.byRevenue) },\n { value: 'units', label: getTranslation(Keys.defaults.byUnits) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\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 { direction, formatted } = calculateWeightedRevenueTrend(\n sortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedOffers]);\n\n const topOffers = React.useMemo(() => sortedOffers.slice(0, 5), [sortedOffers]);\n\n const { totalPages, pageItems: paginatedOffers } = usePaginatedItems(sortedOffers, currentPage, itemsPerPage);\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, row: TopPerformingOffer) => formatMoney(Number(value), row.currencyCode),\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 if (!row.trend?.revenue) return getTranslation(Keys.defaults.noData);\n const columnTrendDirection = resolveTrendDirection(row.trend.revenue);\n return (\n <TableTrendCell direction={columnTrendDirection}>\n {getTrendIcon(columnTrendDirection)}\n <span>{row.trend.revenue}</span>\n </TableTrendCell>\n );\n },\n },\n ],\n [],\n );\n\n const currencyCode = sortedOffers[0]?.currencyCode;\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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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) => formatMoney(value, currencyCode)} />\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>{formatMoney(totalRevenue, currencyCode)}</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 const summaryTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <SummaryItem key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryInfo>\n <SummaryName>{offer.name}</SummaryName>\n <SummaryValue>{formatMoney(offer.revenue, offer.currencyCode)}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{offer.percentage}%</SummaryPercentage>\n {offer.trend?.revenue ? (\n <SummaryTrend direction={summaryTrendDirection} aria-label={offer.trend.revenue}>\n {getTrendIcon(summaryTrendDirection)}\n </SummaryTrend>\n ) : null}\n </SummaryItem>\n );\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 const trendPercent = parseTrendPercent(offer.trend?.revenue);\n let trendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (trendPercent !== null && trendPercent > 0) trendDirection = 'up';\n else if (trendPercent !== null && trendPercent < 0) trendDirection = 'down';\n\n return (\n <MobileOfferCard key={offer.id}>\n <MobileOfferHeader>\n <ColorDot dotColor={offer.color} />\n <MobileOfferName>{offer.name}</MobileOfferName>\n </MobileOfferHeader>\n <MobileOfferMetricsGrid>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnRevenue)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>\n {formatMoney(offer.revenue, offer.currencyCode)}\n </MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnPercentage)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>{offer.percentage}%</MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnTrend)}\n </MobileOfferMetricLabel>\n <MobileOfferTrendValue direction={trendDirection}>\n {offer.trend?.revenue ? (\n <>\n {getTrendIcon(trendDirection)}\n <span>{offer.trend.revenue}</span>\n </>\n ) : (\n getTranslation(Keys.defaults.noData)\n )}\n </MobileOfferTrendValue>\n </MobileOfferMetricItem>\n </MobileOfferMetricsGrid>\n </MobileOfferCard>\n );\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';\nimport type { TrendDirection } from '../types';\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: TrendDirection }>`\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 SummaryTrend = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const TableTrendCell = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\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 flex-direction: column;\n align-items: stretch;\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 MobileOfferHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const MobileOfferName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n word-break: break-word;\n`;\n\nexport const MobileOfferMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileOfferMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileOfferMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileOfferMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const MobileOfferTrendValue = styled(Typography)<{ direction: TrendDirection }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\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 width: 14px;\n height: 14px;\n font-size: 14px;\n }\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 mockConversionDataStandard: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 1.35).toFixed(2)),\n orders: Math.round(point.orders * 0.7),\n}));\n\nexport const mockConversionDataSubscription: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 0.55).toFixed(2)),\n orders: Math.round(point.orders * 0.3),\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 ? 'Subscription' : 'Standard',\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","import type { ProductOfferDashboardStats, TopPerformingOffer } from '../types.d';\n\nexport { mockTopProducts, mockConversionData, mockOrders } from './mockDashboardData';\n\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\nexport const mockProductOfferStatsPositiveTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+5.1%',\n offersPurchased: '+12.5%',\n },\n};\n\nexport const mockProductOfferStatsNegativeTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '-1.8%',\n offersPurchased: '-3.7%',\n },\n};\n\nexport const mockProductOfferStatsNeutralTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\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\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"]}
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","../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/translationResolver.ts","../src/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.ts","../src/common/shopping-dashboard/utils/marketOptions.ts","../src/common/shopping-dashboard/shared/StatsCard.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/utils/trendUtils.tsx","../src/common/shopping-dashboard/utils/dataUtils.ts","../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/utils/dateConstants.ts","../src/common/shopping-dashboard/utils/dateFormat.ts","../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/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/TranslationContext.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/hooks/useProductOfferWidgetExports.ts","../src/common/shopping-dashboard/utils/excelExport.ts","../src/common/shopping-dashboard/utils/productOfferExport.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"],"names":["bc","Object","create","nr","defineProperty","yc","getOwnPropertyDescriptor","wc","getOwnPropertyNames","Cc","getPrototypeOf","vc","prototype","hasOwnProperty","va","e","t","exports","kc","o","get","enumerable","wn","n","i","call","M","__esModule","value","Sc","require_ReactPropTypesSecret","__commonJSMin","module","ReactPropTypesSecret","require_factoryWithThrowingShims","emptyFunction","emptyFunctionWithReset","Jn","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","Qn","ReactIs","throwOnDirectAccess","index_exports","__export","CategoriesFullView","ConversionRateChart","ConversionRateFullView","DATE_RANGE_LABELS","DAYS_MAP","DashboardHeader","DataTable","FilterBar","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","TranslationProvider","WidgetMenu","buildDefaultMarketOptions","calculatePercentage","calculateTotalPages","exportRowsToExcel","exportTopPerformingOffers","exportTopProducts","formatDateRange","formatDateRangeLabel","formatDisplayDate","formatISODate","formatShortDate","getDateRangeLabel","getDaysFromDateRange","getTranslation","getTranslationResolver","getTrendColor","getTrendIcon","mockCategories","mockConversionData","mockOrders","mockProductOfferStats","mockSignupData","mockSignupDetails","mockStats","mockTopOffers","mockTopProducts","normalizeExcelFileName","normalizeExcelSheetName","paginateItems","resolveMarketOptions","resolveTranslation","setTranslationResolver","sortByNumericProperty","useProductOfferWidgetExports","useTranslation","useTranslationResolver","__toCommonJS","import_react","require","import_foundation_ui_components","import_foundation_theme","PriceComponent","At","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","Rn","useState","isButtonHovered","setIsButtonHovered","On","useMediaQuery","handleImageError","target","noImageFallback","fallbackImage","src","je","jsxs","onClick","tabIndex","children","jsx","onError","imageSrc","Mn","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","We","go","Box","ScrollableContainer","CardList","ControlsContainer","ViewAllWrapper","$isMobile","ProductCountWrapper","ArrowsWrapper","$isDisabled","Scrollablewrapper","CustomTypography","Fn","NsTypography","ViewAllLink","$disabled","EmptyProductCategories","ControlsHeaderRow","ProductInfoWrapper","CategoryNameWrapper","entries","renderEntry","settings","showControlButtons","allEntryLabel","allEntryLink","categoryName","emptyProductMessage","productsCountLabel","isInitialDataLoading","history","sliderRef","Vo","useRef","Gn","prev","useCallback","current","slickPrev","next","slickNext","renderProductEntry","entry","index","ve","directSeller","sliderSettings","dots","infinite","speed","slidesToShow","Math","min","length","slidesToScroll","swipe","draggable","arrows","responsive","breakpoint","shouldShowNavigation","renderCarouselContent","map","Kn","Slider","ref","variant","preventDefault","push","jn","NsCarouselControl","viewAllLabel","viewAllUrl","React","import_Tabs","import_Tab","import_prop_types","ti","NsCategoryNavigationContainer","oi","div","TabPanel","other","zt","role","hidden","id","Sa","propTypes","lr","itemArray","controlledValue","onChange","ai","internalValue","setInternalValue","li","ni","Tabs","orientation","event","newValue","item","ii","Tab","label","categoryId","findIndex","content","getMinHeight","$hasCategories","ProductTabCarouselContainer","ao","TabsContainer","ContentContainer","LoadingContainer","NoTabsContainer","SpinnerContainer","fetchCategories","fetchProducts","showCustomCategory","emptyProductTabs","getCategoryId","categories","fi","Ye","isLoadingInitialData","setIsLoadingInitialData","setCategories","isCategoriesLoaded","setIsCategoriesLoaded","selectedTab","setSelectedTab","products","setProducts","loading","setLoading","shouldShowSpinner","setShouldShowSpinner","checkForExistingSpinners","existingSpinners","document","querySelectorAll","useEffect","then","data","finally","cat","xt","_","mi","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","dr","fo","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","minHeight","ToggleButtonMobile","cursor","margin","StyledSpan","ImgTabIndex","ContactLink","BadgeValue","PlaceholderImage","yt","Pi","sx","ArrowDownIcon","Ra","trackGTMEvent","eventData","window","url","href","updatedEventData","prefix","includes","dataLayer","console","error","renderImageContent","placeholderClass","B","Ao","ue","renderBadges","showBadges","expirationDate","totalSavings","badgeClass","renderMobileContent","isScrolled","renderSocialMediaIcons","shopTitle","socialTitleText","email","phone","Typography","component","trim","Fragment","renderContactLink","renderDesktopContent","shopDescription","Tooltip","arrow","checkIfImageIsCircular","Promise","resolve","reject","imageContext","Image","crossOrigin","onload","canvas","createElement","context","getContext","drawImage","isCircular","getImageData","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","ut","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","mo","StatsRow","WidgetContainer","TwoColumnGrid","ErrorContainer","import_CalendarToday","import_Language","_e","ColorUtils","getGenomeColor","HeaderContainer","theme","TitleSection","ShopTitle","DateRangeLabel","FiltersSection","FilterDropdownContainer","FilterLabel","StyledSelect","FilterIcon","LoadingIndicatorContainer","DesktopFiltersContainer","StyledCircularProgress","activeResolver","resolver","fallback","result","stats","revenue","visits","trend","increased","decreased","unchanged","details","filter","dateRange","last7days","last30days","last90days","thisMonth","market","all","productSort","signupView","showAll","showMembers","showRetail","showBrandAffiliates","conversionType","standard","subscription","widget","topProducts","viewAll","empty","ariaLabel","titleAriaLabel","sortAriaLabel","noImageAriaLabel","unitsSuffix","revenueSuffix","rank","conversionRate","formula","comparison","chartAriaLabel","filterAriaLabel","tooltipOrders","tooltipVisits","ordersPerSiteVisits","signups","total","totalSignupsInPeriod","noTrendData","topCategories","menu","fullView","viewDetails","exportData","navigation","backToDashboard","backAriaLabel","dashboard","statsRow","dashboardFilters","loadingDashboard","dateRangeFilter","marketFilter","filterSuffix","columns","status","detailsTitle","orderId","customer","items","bv","totalSv","orderDetailsTitle","notAvailable","product","unitsSold","volume","skuPrefix","noProducts","category","percentOfTotal","allCategoriesTitle","noCategoryData","dataTable","noDataAvailable","sortableColumn","pagination","previousPage","nextPage","goToPage","of","defaults","zeroTrend","noValue","noData","noChange","byRevenue","byUnits","byVolume","byTrend","members","retail","brandAffiliates","units","date","dcSv","markets","useMarketOptions","_i","dateRangeLabel","dateRangeLabelProp","isLoading","onDateRangeChange","onMarketChange","marketOptions","handleDateRangeChange","newDateRange","handleMarketChange","newMarket","handleFilterKeyDown","blur","getDateRangeLabelText","le","as","Gi","htmlFor","Ui","CalendarTodayIcon","Ki","LanguageIcon","find","opt","String","option","import_ShowChart","import_TrendingUp","import_TrendingDown","ke","StatsCardContainer","$layout","SplitTitle","SplitRow","LegendColumn","SplitTrend","direction","LegendCaption","StatsTitle","StatsValueContainer","StatsValue","ValueSubtitleWrapper","StatsSubtitle","TrendContainer","TrendIcon","TrendText","StatsCardHeader","import_Skeleton","SkeletonCard","X","SkeletonHeader","SkeletonRow","StatsCardWrapper","StatsCardHeaderRow","StatsCardBody","StatsCardSubtitle","bo","Skeleton","ProductRowInfo","ProductRowMetrics","ChartMetricRow","ChartMetricTrend","ChartAreaSkeleton","PieChartLayout","PieCircleSkeleton","LegendList","LegendRowWrapper","LegendRowInfo","DashboardLayout","DashboardHeaderRow","DashboardFilterGroup","StatsGrid","WidgetGrid","FullViewLayout","FullViewMetricCard","FullViewMetricCenter","FullViewChartArea","FullViewTableCard","FullViewTableRow","SummaryCardsGrid","StatsCardSkeleton","P","te","ProductRowSkeleton","ProductsListSkeleton","rowKey","ChartWidgetSkeleton","LegendRowSkeleton","CategoriesPieChartSkeleton","FullViewChartSkeleton","FullViewTableSkeleton","StatsCardComponent","subtitle","caption","layout","trendDirection","trendValue","pe","getTrendAriaLabel","directionText","getTrendChartIcon","iconSize","Pl","TrendingUpIcon","Rl","TrendingDownIcon","Dl","ShowChartIcon","Tl","memo","displayName","import_ShoppingCart","import_ArrowUpward","import_ArrowDownward","import_Remove","parseTrendPercent","cleanedValue","parsedValue","isFinite","resolveTrendDirection","calculateWeightedRevenueTrend","getRevenue","getTrend","reduce","accumulator","weightedSum","weight","average","formatted","toFixed","getTrendDirectionLabel","yr","Ml","ArrowUpwardIcon","Ol","ArrowDownwardIcon","Fl","RemoveIcon","itemsPerPage","ceil","currentPage","startIndex","endIndex","sort","a","aVal","bVal","decimalPlaces","usePaginatedItems","totalPages","Wa","pageItems","formatMoney","currencyCode","locale","fractionDigits","amount","Intl","NumberFormat","style","currency","minimumFractionDigits","maximumFractionDigits","format","toLocaleString","capitalizeFirstLetter","text","charAt","toUpperCase","fe","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","import_Visibility","import_FileDownload","import_IconButton","StyledIconButton","ql","Zl","IconButton","widgetId","onFullView","onExport","Ql","anchorEl","setAnchorEl","buttonId","menuId","handleClick","currentTarget","handleClose","handleFullView","handleExport","ze","size","ts","MoreVertIcon","es","Menu","onClose","MenuListProps","anchorOrigin","vertical","horizontal","transformOrigin","ja","MenuItem","Ya","ListItemIcon","os","VisibilityIcon","Ja","ListItemText","rs","FileDownloadIcon","TopSellingProductsListComponent","maxProducts","onSortChange","onTitleClick","handleSortChange","newSort","formatValue","sortBy","getSubtitle","getTrendValue","getTrendDirection","startsWith","j","ls","ss","is","displayedProducts","rankLabel","trendLabel","ns","ShoppingCartIcon","imageUrl","import_recharts","Se","ConversionRateContainer","ChartHeader","TitleRow","ChartTitle","FilterDropdown","MetricDisplay","MetricValue","MetricTrend","FormulaDisplay","ChartContainer","TooltipContainer","TooltipLabel","TooltipValue","TooltipDetails","getMonth","getDate","AXIS_MONTH_MAP","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","formatAxisDate","dateStr","parts","start","end","toISOString","calculateDateRangeFromOption","dateRangeOption","today","year","getFullYear","month","startDate","endDate","CHART_MARGIN","AXIS_TICK","LINE_DOT","ACTIVE_DOT","rateTickFormatter","CustomTooltip","active","payload","K","rate","orders","siteVisits","ConversionRateChartComponent","conversionData","conversionFilter","summaryRate","summaryChangePct","onFilterChange","handleFilterChange","wo","newFilter","noDataText","noChangeText","currentRate","at","trendInfo","latestRate","previousRate","change","percentageChange","formattedChange","formattedData","shortDate","Je","ResponsiveContainer","LineChart","CartesianGrid","strokeDasharray","XAxis","dataKey","tick","tickLine","interval","YAxis","tickFormatter","domain","Line","stroke","strokeWidth","dot","activeDot","Be","SignupsContainer","Legend","LegendItem","LegendColor","LegendLabel","SERIES_COLORS","SignupsChartComponent","signupData","onViewChange","handleViewChange","vo","newView","totalSignups","latestTotal","previousTotal","totalLabel","membersLabel","retailLabel","brandAffiliatesLabel","I","we","ae","CategoriesContainer","ChartAndLegendContainer","ChartWrapper","DonutCenterOverlay","DonutCenterLabel","DonutCenterValue","DonutCenterTrend","LegendContainer","LegendInfo","LegendName","LegendValue","LegendPercentage","LegendValueWrapper","LegendTrendInline","LegendTrend","TopCategoriesPieChartComponent","categorySort","sortedCategories","Hr","nextSortedCategories","nextTotalRevenue","sum","nextTrendDirection","nextFormattedTrend","totalRevenue","formattedTrend","getTrendGraphIcon","H","Bs","Hs","renderCustomLabel","cx","cy","midAngle","innerRadius","outerRadius","percentage","RADIAN","PI","radius","x","cos","y","sin","textAnchor","dominantBaseline","kt","PieChart","Pie","nameKey","paddingAngle","labelLine","Cell","formatter","EMPTY_TOP_PRODUCTS","EMPTY_CONVERSION_DATA","EMPTY_SIGNUP_DATA","EMPTY_CATEGORIES","categoriesSummaryChangePct","onProductSortChange","onSignupViewChange","onConversionFilterChange","onCategorySortChange","onProductsTitleClick","onConversionTitleClick","onSignupsTitleClick","onCategoriesToTitleClick","onProductsExport","onConversionExport","onSignupsExport","onCategoriesExport","resolvedTopProducts","resolvedConversionData","resolvedSignupData","resolvedCategories","Pe","metrics","import_ArrowBack","Ne","PageHeaderWrapper","BackButtonWrapper","BackButton","LeftSection","Title","DateRange","MobileDateRange","FilterWrapper","MobileTitleWrapper","MobileTitle","buildDateRangeFilter","keys","options","buildMarketFilter","onBack","filters","renderFilterIcon","iconType","he","rd","ad","od","ArrowBackIcon","nt","TableContainer","Table","TableHeader","TableHeaderCell","sortable","TableBody","TableRow","TableCell","EmptyTableCell","SortIconContainer","isActive","onSort","sortColumn","sortDirection","getRowKey","handleSort","columnKey","handleKeyDown","getAriaSort","Ue","column","scope","gd","ud","colSpan","row","rowIndex","render","import_ChevronLeft","import_ChevronRight","lo","PaginationContainer","PageButton","PageInfo","NavButton","onPageChange","totalItems","handlePrevious","handleNext","action","pageNumbers","from","pages","startItem","endItem","goToPageLabel","Re","md","ChevronLeftIcon","page","hd","ChevronRightIcon","import_styles","xd","PageContainer","Ve","Ee","MetricChartCardSection","shadows","MetricSection","palette","primary","success","main","secondary","ComparisonText","ChartSection","TableSection","withCard","MobileCardName","MobileCardSubtext","MobileCardDetail","MobileCardStatus","warning","kd","Ae","Oe","ProductSku","MobileCardsContainer","DesktopTableContainer","MobileProductCard","divider","MobileCardHeader","MobileProductRank","MobileProductDetails","MobileProductName","MobileProductSku","MobileMetricsGrid","MobileMetricItem","MobileMetricLabel","MobileMetricValue","MOBILE_VIEWPORT_QUERY","useIsMobileViewport","Vd","noSsr","mapProductToRow","sku","padStart","st","setCurrentPage","setSortColumn","setSortDirection","isMobileView","handleBack","productRows","sortedRows","paginatedRows","Ed","ConversionTrendChartContainer","Ce","Fe","MobileOrderCard","MobileOrderHeader","MobileCustomerInfo","MobileCustomerName","MobileOrderDate","MobileOrderId","MobileOrderMetrics","MobileOrdersContainer","ChartWithLegendWrapper","ChartLegendContainer","ComparisonTextMobile","OrderIdColumnCell","Qe","changePercent","getConversionFilterLabel","conversionFilterLabel","filteredOrders","order","customerType","paginatedOrders","$","getChartColor","flexWrap","Xd","Qd","Ze","customerName","ep","MobileSignupsContainer","Rt","Mt","MobileSignupCard","SignupTrendChartContainer","NameColumnCell","toNumeric","parsed","normalizeSignupDataInput","input","isArray","apiResponse","daily","brandAffiliate","brand_affiliates","brand_affiliate","Ot","normalizedSignupData","point","rawPoint","signupTotal","absoluteChange","first","last","round","hasSignupTrendData","paginatedSignups","R","dp","pp","ye","connectNulls","sp","signup","Ht","SummaryItemRow","SummaryItemInfo","SummaryItemName","SummaryItemSubtext","SummaryItemPercentage","TopSection","Le","muiStyled","Ie","SummaryContainer","SummaryItem","ColorDot","dotColor","SummaryInfo","SummaryName","SummaryValue","SummaryPercentage","MobileCategoriesContainer","MobileCategoryCard","SummaryTrendIcon","CategoryNameColumnCell","Ft","E","Fp","Lp","parseFloat","isNaN","totalRevenueTrendDirection","totalRevenueTrend","paginatedCategories","Lt","translate","sn","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","se","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","Po","PoDashboardContainer","Ro","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","sortedOffers","sa","nextSortedOffers","offer","U","It","legendTrendDirection","INVALID_SHEET_NAME_CHARS","fileName","trimmedFileName","resolvedFileName","endsWith","sheetName","normalizedSheetName","rows","xlsx","worksheetRows","worksheet","workbook","worksheetRow","forEach","header","utils","json_to_sheet","book_new","book_append_sheet","writeFile","topProductColumns","topOfferColumns","topProductsExportData","topOffersExportData","showTopProductsExportOption","showTopOffersExportOption","offerRows","canExportProducts","canExportOffers","onTopProductsExport","un","onTopOffersExport","EMPTY_TOP_OFFERS","dashboardTitle","conversionSummaryRate","conversionSummaryChangePct","onOfferSortChange","onOffersTitleClick","resolvedTopOffers","Ke","selectedMarket","Wp","ne","oe","SummaryTrend","TableTrendCell","MobileOffersContainer","MobileOfferCard","MobileOfferHeader","MobileOfferName","MobileOfferMetricsGrid","MobileOfferMetricItem","MobileOfferMetricLabel","MobileOfferMetricValue","MobileOfferTrendValue","$t","paginatedOffers","O","columnTrendDirection","Nt","summaryTrendDirection","trendPercent","isProductOfferDashboardView","allProducts","allOffers","conversionFullViewData","conversionFullViewRate","conversionFullViewChangePct","initialOfferSort","ge","setOfferSort","resolvedAllProducts","resolvedAllOffers","handleOfferSortChange","handleOffersTitleClick","Jo","Mo","FilterContainer","Oo","setDate","mockConversionDataStandard","mockConversionDataSubscription","months","floor","firstNames","lastNames","toLocaleDateString","day","types","mockProductOfferStatsPositiveTrend","mockProductOfferStatsNegativeTrend","mockProductOfferStatsNeutralTrend","mockProductOfferStatsZeroOffers"],"mappings":"AAAA,m/wFAAa,IAAIA,GAAGC,OAAOC,MAAM,CAAC,IAAIC,GAAGF,OAAOG,cAAc,CAAC,IAAIC,GAAGJ,OAAOK,wBAAwB,CAAC,IAAIC,GAAGN,OAAOO,mBAAmB,CAAC,IAAIC,GAAGR,OAAOS,cAAc,CAACC,GAAGV,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,GAAGY,EAAEI,EAAE,CAACC,IAAIJ,CAAC,CAACG,EAAE,CAACE,WAAW,CAAC,CAAC,EAAE,EAAEC,GAAG,SAACP,EAAEC,EAAEG,EAAEI,OAAwD,OAAA,QAAA,YAAnD,GAAGP,GAAG,CAAA,OAAOA,4BAAP,EAAOA,EAAAA,GAAG,UAAU,OAAOA,GAAG,gCAAe,IAAIQ,EAAJ,OAAe,EAACb,GAAGc,IAAI,CAACV,EAAES,IAAIA,IAAIL,GAAGhB,GAAGY,EAAES,EAAE,CAACJ,IAAI,kBAAIJ,CAAC,CAACQ,EAAE,EAACH,WAAW,CAAEE,CAAAA,EAAElB,GAAGW,EAAEQ,EAAC,GAAID,EAAEF,UAAU,IAAnG,QAAI,EAASd,GAAGS,sBAAZ,IAAA,GAAA,EAAA,gBAAA,oBAAA,OAAA,oBAAA,GAAA,gBAAA,uBAAA,SAAA,IAAkG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ACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJpQ,KAAM,0BACN4jB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJpQ,KAAM,yBACN4jB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJpQ,KAAM,wBACN4jB,QAAS,KACTsgB,WAAY,GACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACA,CACIxT,GAAI,UACJpQ,KAAM,wBACN4jB,QAAS,IACTsgB,WAAY,EACZrvB,MAAO,UACPiP,MAAO,CAAEF,QAAS,OAAQ,CAC9B,EACJ","sourcesContent":["\"use strict\";var bc=Object.create;var nr=Object.defineProperty;var yc=Object.getOwnPropertyDescriptor;var wc=Object.getOwnPropertyNames;var Cc=Object.getPrototypeOf,vc=Object.prototype.hasOwnProperty;var va=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kc=(e,t)=>{for(var o in t)nr(e,o,{get:t[o],enumerable:!0})},wn=(e,t,o,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let i of wc(t))!vc.call(e,i)&&i!==o&&nr(e,i,{get:()=>t[i],enumerable:!(n=yc(t,i))||n.enumerable});return e};var M=(e,t,o)=>(o=e!=null?bc(Cc(e)):{},wn(t||!e||!e.__esModule?nr(o,\"default\",{value:e,enumerable:!0}):o,e)),Sc=e=>wn(nr({},\"__esModule\",{value:!0}),e);var Jn=va((rg,Yn)=>{\"use strict\";var Dc=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\";Yn.exports=Dc});var Qn=va((ag,Xn)=>{\"use strict\";var Pc=Jn();function Zn(){}function qn(){}qn.resetWarningCache=Zn;Xn.exports=function(){function e(n,i,l,s,p,m){if(m!==Pc){var b=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 b.name=\"Invariant Violation\",b}}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:qn,resetWarningCache:Zn};return o.PropTypes=o,o}});var ti=va((lg,ei)=>{\"use strict\";ei.exports=Qn()();var ng,ig});var Nu={};kc(Nu,{CategoriesFullView:()=>ia,ConversionRateChart:()=>io,ConversionRateFullView:()=>Do,DATE_RANGE_LABELS:()=>Xa,DAYS_MAP:()=>qa,DashboardHeader:()=>xo,DataTable:()=>it,FilterBar:()=>hc,MysiteDashboardWithNavigation:()=>Ep,MysiteHero:()=>Ma,NsCategoryNavigation:()=>sr,NsProductCard:()=>ir,PageHeader:()=>be,Pagination:()=>lt,PoDashboardWithNavigation:()=>uc,ProductCarousel:()=>Eo,ProductOfferDashboard:()=>ua,ProductOfferDashboardTranslationKeys:()=>z,ProductTabCarousel:()=>hi,ProductsFullView:()=>To,ShoppingDashboard:()=>Wr,ShoppingDashboardTranslationKeys:()=>r,SignupsChart:()=>Uo,SignupsFullView:()=>ra,StatsCard:()=>wt,TopCategoriesPieChart:()=>Ko,TopPerformingOffersFullView:()=>ha,TopPerformingOffersPieChart:()=>jo,TopSellingProductsList:()=>no,TranslationProvider:()=>Ip,WidgetMenu:()=>at,buildDefaultMarketOptions:()=>Va,calculatePercentage:()=>$l,calculateTotalPages:()=>_a,exportRowsToExcel:()=>Yo,exportTopPerformingOffers:()=>pa,exportTopProducts:()=>da,formatDateRange:()=>en,formatDateRangeLabel:()=>Ss,formatDisplayDate:()=>vr,formatISODate:()=>kr,formatShortDate:()=>Qa,getDateRangeLabel:()=>Cr,getDaysFromDateRange:()=>ks,getTranslation:()=>a,getTranslationResolver:()=>Wi,getTrendColor:()=>Ll,getTrendIcon:()=>rt,mockCategories:()=>xn,mockConversionData:()=>Fo,mockOrders:()=>ya,mockProductOfferStats:()=>co,mockSignupData:()=>hn,mockSignupDetails:()=>bn,mockStats:()=>mn,mockTopOffers:()=>xc,mockTopProducts:()=>ba,normalizeExcelFileName:()=>pn,normalizeExcelSheetName:()=>cn,paginateItems:()=>Ua,resolveMarketOptions:()=>Ea,resolveTranslation:()=>Gt,setTranslationResolver:()=>ho,sortByNumericProperty:()=>Il,useProductOfferWidgetExports:()=>ca,useTranslation:()=>$p,useTranslationResolver:()=>so});module.exports=Sc(Nu);var Rn=require(\"react\"),Mn=require(\"@nuskin/foundation-ui-components\");var At=require(\"@nuskin/foundation-theme\"),Cn=(0,At.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 5px;\n`,vn=(0,At.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`,kn=(0,At.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`,Sn=(0,At.styled)(\"img\")`\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n display: block;\n`,Tn=(0,At.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`,ka=(0,At.styled)(\"div\")`\n width: 200px;\n text-align: left;\n margin-bottom: 12px;\n @media (max-width: 560px) {\n margin-bottom: 8px;\n }\n`,Dn=(0,At.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`,Pn=(0,At.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 On=require(\"@mui/material\"),je=require(\"react/jsx-runtime\"),Tc=({productTitle:e,imageDetails:t,className:o,button:n,onCardClick:i,productStatusBadge:l,directSellerBadge:s,mySitePriceComponent:p,testId:m})=>{let[b,u]=(0,Rn.useState)(!1),h=(0,On.useMediaQuery)(\"(max-width: 560px)\"),C=g=>{let D=g.target,F=t?.fallbackImage;F&&D.src!==F&&(D.src=F)};return(0,je.jsxs)(vn,{className:o,onClick:i,tabIndex:0,\"data-testid\":\"product-card\",isMobile:h,children:[(0,je.jsx)(kn,{bgColor:t?.bgColor,onError:C,children:t?.imageSrc?(0,je.jsx)(Mn.NsImage,{\"data-testid\":m??\"test-product-image\",className:t.className??\"\",src:t.imageSrc,alt:t.imageAlt,\"aria-label\":t.areaLabel??t.imageAlt,width:\"100%\"}):(0,je.jsx)(Sn,{alt:\"\"})}),(0,je.jsx)(Tn,{title:e,\"data-testid\":\"product-title\",children:e}),s&&(0,je.jsx)(ka,{children:s}),(0,je.jsx)(ka,{children:l}),(0,je.jsx)(Cn,{children:p}),n?.showButton&&(0,je.jsxs)(Dn,{tabIndex:0,\"aria-roledescription\":\":\",\"aria-label\":n.buttonText||\"ADD TO CART\",\"data-testid\":\"add-to-cart-button\",disabled:n?.disabled??!1,isMobile:h,isHovered:b,onClick:g=>{g.stopPropagation(),n?.disabled||n.onClick?.()},onMouseEnter:()=>{!h&&!n?.disabled&&u(!0)},onMouseLeave:()=>{h||u(!1)},children:[(0,je.jsx)(Pn,{className:\"cart-icon\",disabled:n?.disabled,children:(0,je.jsx)(\"svg\",{width:\"24\",height:\"22\",viewBox:\"0 0 24 22\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:(0,je.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:n?.disabled?\"#999\":\"#ffffff\"})})}),n.buttonText||\"ADD TO CART\"]})]})},ir=Tc;var Vo=require(\"react\"),Kn=M(require(\"react-slick\")),Gn=M(require(\"@mui/material/useMediaQuery\"));var jn=require(\"@nuskin/foundation-ui-components\");var We=require(\"@nuskin/foundation-theme\"),go=M(require(\"@mui/material/Box\")),Fn=require(\"@nuskin/foundation-ui-components\"),Ln=(0,We.styled)(go.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`,In=(0,We.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=(0,We.styled)(\"div\")`\n display: flex;\n scroll-snap-align: start;\n justify-content: center;\n gap: 15px;\n`,Nn=(0,We.styled)(go.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`,Vn=(0,We.styled)(go.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`,En=(0,We.styled)(go.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`,An=(0,We.styled)(go.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`,ju=(0,We.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`,zn=(0,We.styled)(Fn.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`,Bn=(0,We.styled)(\"a\")`\n color: ${({$disabled:e})=>e?\"#999999\":\"#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 ${({$disabled:e})=>e?\"#999999\":\"#000000\"};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n pointer-events: ${({$disabled:e})=>e?\"none\":\"auto\"};\n opacity: ${({$disabled:e})=>e?.5:1};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n border-bottom: 1px solid ${({$disabled:e})=>e?\"#999999\":\"#666666\"};\n cursor: ${({$disabled:e})=>e?\"not-allowed\":\"pointer\"};\n }\n`,Hn=(0,We.styled)(\"div\")`\n padding-top: 20px;\n font-size: 20px;\n text-align: center;\n`,Wn=(0,We.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,_n=(0,We.styled)(\"div\")`\n display: flex;\n align-items: center;\n flex: 1;\n min-width: 0;\n`,Un=(0,We.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 ve=require(\"react/jsx-runtime\");function Eo({entries:e,renderEntry:t,settings:o={},showControlButtons:n=!0,allEntryLabel:i=\"View All\",allEntryLink:l=\"\",categoryName:s,emptyProductMessage:p=\"No Products Available For The Selected Category\",productsCountLabel:m=\"Products\",isInitialDataLoading:b,history:u}){let h=(0,Vo.useRef)(null),C=(0,Gn.default)(\"(max-width: 560px)\"),g=(0,Vo.useCallback)(()=>{h.current?.slickPrev()},[]),D=(0,Vo.useCallback)(()=>{h.current?.slickNext()},[]),F=t??((k,S)=>(0,ve.jsx)(ir,{productTitle:k.productTitle,imageDetails:k.imageDetails,button:k.button,onCardClick:k.onCardClick,productStatusBadge:k.productStatusBadge,directSellerBadge:k.directSeller,mySitePriceComponent:k.mySitePriceComponent},`${k.productTitle}-${S}`)),d={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},x=(e?.length??0)>d.slidesToShow,v=()=>e?.length===0&&!b?(0,ve.jsx)(Hn,{children:p}):C?(0,ve.jsx)(In,{children:(0,ve.jsx)($n,{children:e.map((k,S)=>k&&F(k,S))})}):(0,ve.jsx)(Kn.default,{...d,ref:h,children:e.map((k,S)=>k&&F(k,S))});return(0,ve.jsxs)(Ln,{children:[n&&(0,ve.jsxs)(Nn,{children:[(0,ve.jsxs)(Wn,{children:[(0,ve.jsxs)(_n,{children:[(0,ve.jsx)(En,{children:(0,ve.jsxs)(zn,{variant:\"body-m\",children:[e?.length??0,\" \",m]})}),!C&&s&&(0,ve.jsx)(Un,{children:s})]}),(0,ve.jsx)(Vn,{$isMobile:C,children:(0,ve.jsx)(Bn,{$disabled:(e?.length??0)===0,onClick:k=>{k.preventDefault(),(e?.length??0)>0&&u&&u.push(l)},children:i})})]}),!C&&(0,ve.jsx)(An,{$isDisabled:!x,children:(0,ve.jsx)(jn.NsCarouselControl,{prev:g,next:D,viewAllLabel:\"\",viewAllUrl:\"\"})})]}),v()]})}var Ye=require(\"react\"),fi=require(\"@mui/material\");var ai=M(require(\"react\")),ni=M(require(\"@mui/material/Tabs\")),ii=M(require(\"@mui/material/Tab\")),Sa=M(require(\"@mui/material/Box\")),lr=M(ti());var oi=require(\"@nuskin/foundation-theme\"),ri=oi.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 li=require(\"@mui/material\"),zt=require(\"react/jsx-runtime\");function si(e){let{children:t,value:o,index:n,...i}=e;return(0,zt.jsx)(\"div\",{role:\"tabpanel\",hidden:o!==n,id:`vertical-tabpanel-${n}`,\"aria-labelledby\":`vertical-tab-${n}`,...i,children:o===n&&(0,zt.jsx)(Sa.default,{className:\"tabPanel\",children:t})})}si.propTypes={children:lr.default.node,index:lr.default.number.isRequired,value:lr.default.number.isRequired};var sr=({itemArray:e,value:t,onChange:o})=>{let[n,i]=ai.useState(0),l=(0,li.useMediaQuery)(\"(max-width:768px)\"),s=t??n;return(0,zt.jsx)(ri,{children:(0,zt.jsxs)(Sa.default,{className:\"tabContainer\",children:[(0,zt.jsx)(ni.default,{orientation:l?\"horizontal\":\"vertical\",variant:\"scrollable\",value:s,onChange:(m,b)=>{o?o(m,b):i(b)},\"aria-label\":\"Vertical tabs example\",className:\"tabsStyle\",children:e.map(m=>(0,zt.jsx)(ii.default,{label:m.label,className:\"tabStyle\"},m.categoryId))}),e.map(m=>(0,zt.jsx)(si,{value:s,index:e.findIndex(b=>b.categoryId===m.categoryId),children:m.content},m.categoryId))]})})};var mi=require(\"@nuskin/foundation-ui-components\");var ao=require(\"@nuskin/foundation-theme\"),Rc=({isMobile:e,$hasCategories:t})=>e?\"auto\":t?\"800px\":\"auto\",di=(0,ao.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: ${Rc};\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`,pi=(0,ao.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`,ci=(0,ao.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`,gg=(0,ao.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`,ui=(0,ao.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,ao.styled)(\"div\")`\n padding: 10px;\n display: flex;\n justify-content: center;\n`;var xt=require(\"react/jsx-runtime\"),Mc=({allEntryLabel:e,allEntryLink:t,renderEntry:o,settings:n,showControlButtons:i=!0,fetchCategories:l,fetchProducts:s,showCustomCategory:p=!1,emptyProductTabs:m=\"No tabs available\",emptyProductMessage:b,productsCountLabel:u,getCategoryId:h,history:C})=>{let g=(0,fi.useMediaQuery)(\"(max-width:768px)\"),[D,F]=(0,Ye.useState)(!0),[d,x]=(0,Ye.useState)([]),[v,k]=(0,Ye.useState)(!1),[S,N]=(0,Ye.useState)(0),[A,J]=(0,Ye.useState)([]),[Y,Z]=(0,Ye.useState)(!1),[V,c]=(0,Ye.useState)(!0),w=(0,Ye.useCallback)(()=>{let f=document.querySelectorAll('[data-testid*=\"spinner\"], .ns-spinner, [class*=\"spinner\"]');c(f.length===0)},[]);(0,Ye.useEffect)(()=>{Y&&w()},[Y,w]),(0,Ye.useEffect)(()=>{l().then(f=>{x(f),k(!0)})},[l]),(0,Ye.useEffect)(()=>{if(v)if(d.length>0){let f=d[S]?.categoryId;h&&h(f),Z(!0),s(f).then(J).finally(()=>{Z(!1),F(!1)})}else Z(!1)},[d,S,s,v]);let T=d.map(f=>({label:f.label,content:\"\",categoryId:f.categoryId}));return(0,xt.jsxs)(di,{isMobile:g,$hasCategories:d.length>0,children:[p&&(T.length>0?(0,xt.jsx)(pi,{isMobile:g,children:(0,xt.jsx)(sr,{itemArray:T,value:S,onChange:(f,y)=>N(y)})}):(0,xt.jsx)(ui,{children:m})),(0,xt.jsx)(ci,{isMobile:g,children:Y?(0,xt.jsx)(gi,{children:V&&(0,xt.jsx)(mi.NsSpinner,{})}):(0,xt.jsx)(Eo,{isInitialDataLoading:D,entries:A,allEntryLabel:e,allEntryLink:t,renderEntry:o?f=>o({...f,productStatusBadge:f.productStatusBadge}):void 0,settings:n,showControlButtons:i,categoryName:d[S]?.label,emptyProductMessage:b,productsCountLabel:u,history:C})})]})},hi=Mc;var ut=require(\"react\"),ue=require(\"@mui/material\"),Ao=require(\"@nuskin/foundation-ui-components\");var bt=require(\"@nuskin/foundation-theme\"),fo=require(\"@mui/material\"),dr=require(\"react/jsx-runtime\"),Ta=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"600\",lineHeight:\"16px\",letterSpacing:\"0.12px\",color:e?\"#000000\":\"#FFFFFF\",\"& a\":{color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}}),bi=e=>({fontSize:\"12px\",fontStyle:\"normal\",fontWeight:\"700\",lineHeight:\"16px\",letterSpacing:\"0.48px\",color:e?\"#000000\":\"#FFFFFF\",textTransform:\"uppercase\",paddingLeft:\"5px\"}),yi=()=>({display:\"flex\",flexDirection:\"row\",gap:\"10px\",alignItems:\"center\"}),xi=e=>({...Ta(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\"}}),Oc=e=>({...bi(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\"}}),wi=(0,bt.styled)(e=>(0,dr.jsx)(fo.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\":Ta(o),\".phone-text\":Ta(o),\".social-title-text\":{...bi(o),marginBottom:\"8px\"},\".social-icons\":{...yi(),paddingBottom:\"8px\"}})),Ci=(0,bt.styled)(e=>(0,dr.jsx)(fo.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\":xi(o),\".phone-text-mobile\":xi(o),\".social-title-text-mobile\":Oc(o),\".social-icons-mobile\":{...yi(),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\"}}})),vi=(0,bt.styled)(fo.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\"}}),Da=(0,bt.styled)(e=>(0,dr.jsx)(fo.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\"},\"&.total-savings-badge\":{backgroundColor:\"#4A6987\",border:\"none\",borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\",backdropFilter:\"none\",\".badge-value\":{color:\"#FFFFFF\"},\"&:hover\":{backgroundColor:\"#4A6987\",transform:\"none\",boxShadow:\"none\"}},\"&.expiration-badge\":{borderRadius:\"8px\",padding:\"8px 16px\",gap:\"4px\",minHeight:\"32px\"},\"&: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\"}})),ki=(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)\"}}}),Si=(0,bt.styled)(fo.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`,Ti=(0,bt.styled)(\"span\")`\n line-height: 0.5;\n`,Di=(0,bt.styled)(\"a\")({fontSize:\"inherit\",fontFamily:\"inherit\",fontWeight:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",color:\"inherit\",textDecoration:\"none\",\"&:hover\":{textDecoration:\"underline\"}}),Pa=(0,bt.styled)(\"span\")({});var Pi=require(\"@mui/material\"),yt=require(\"react/jsx-runtime\"),Ri=({width:e,height:t,backgroundColor:o})=>(0,yt.jsx)(Pi.Box,{sx:{width:e,height:t,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:o},\"data-testid\":\"placeholder-image\",children:(0,yt.jsx)(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"128\",height:\"129\",viewBox:\"0 0 128 129\",fill:\"none\",children:(0,yt.jsxs)(\"g\",{id:\"ns_logomark\",children:[(0,yt.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,yt.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,yt.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,yt.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,yt.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 Ra=require(\"react/jsx-runtime\"),Mi=({width:e=16,height:t=16,className:o=\"\"})=>(0,Ra.jsx)(\"svg\",{width:e,height:t,viewBox:\"0 0 24 24\",fill:\"currentColor\",className:o,\"data-testid\":\"arrow-down-icon\",children:(0,Ra.jsx)(\"path\",{d:\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\"})});function pr(e){if(typeof window>\"u\")return;let t=window.location.href,o={...e},n=t.includes(\"personal-offer\")?\"postorefront_\":\"mysite_\";o.event=n+e.event;try{window.dataLayer||(console.error(\"GTM dataLayer not available, but event logged\"),window.dataLayer=[]),window.dataLayer.push(o)}catch(i){console.error(\"Failed to track GTM event:\",i)}}var B=require(\"react/jsx-runtime\"),Oi=(e,t,o)=>{let n=o.includes(\"mobile\")?\"placeholder-image-mobile\":\"placeholder-image\";return e?.imageSrc?(0,B.jsx)(Ti,{tabIndex:0,children:(0,B.jsx)(Ao.NsImage,{className:o,src:e.imageSrc,alt:e.imageAlt})}):(0,B.jsx)(ue.Box,{className:n,children:(0,B.jsx)(Ri,{width:o.includes(\"mobile\")?\"144px\":\"246px\",height:o.includes(\"mobile\")?\"144px\":\"246px\",backgroundColor:t?.backgroundColor??\"#5F5F5F\"})})},Fi=(e,t,o,n,i)=>{if(!e||!t&&!i)return null;let l=o?\"mobile-badge\":\"tablet-badge\";return(0,B.jsxs)(vi,{className:o?\"mobile-badges\":\"tablet-badges\",children:[i&&(0,B.jsx)(Da,{className:`${l} total-savings-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(Pa,{className:\"badge-value\",children:i})}),t&&(0,B.jsx)(Da,{className:`${l} expiration-badge`,hasWhiteBackground:n,tabIndex:0,children:(0,B.jsx)(Pa,{className:\"badge-value\",children:t})})]})},Fc=(e,t,o,n,i)=>{let{shopTitle:l,socialTitleText:s,email:p,showBadges:m,expirationDate:b,phone:u,totalSavings:h}=e;return(0,B.jsxs)(ue.Box,{className:\"content-mobile\",children:[(0,B.jsx)(ue.Typography,{component:\"h1\",tabIndex:l?.trim()?0:-1,className:\"body-title-mobile\",children:l}),!t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"social-title-text-mobile\",children:s}),p?.trim()&&cr(\"email\",p,\"email-text-mobile\"),u?.trim()&&cr(\"phone\",u,\"phone-text-mobile\"),(0,B.jsx)(ue.Box,{className:\"social-icons-mobile\",children:o}),Fi(m,b??\"\",n,i,h)]})]})},Lc=(e,t,o,n,i)=>{let{shopTitle:l,shopDescription:s,socialTitleText:p,email:m,phone:b,showBadges:u,expirationDate:h,totalSavings:C}=e;return(0,B.jsxs)(ue.Box,{className:\"content\",children:[(0,B.jsx)(ue.Typography,{component:\"h1\",tabIndex:l?.trim()?0:-1,className:\"body-title\",children:l}),!t&&(0,B.jsxs)(B.Fragment,{children:[s?.length>480?(0,B.jsx)(ue.Tooltip,{title:s,arrow:!0,children:(0,B.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"body-text\",children:s})}):(0,B.jsx)(ue.Typography,{tabIndex:s?.trim()?0:-1,className:\"body-text\",children:s}),(0,B.jsxs)(ue.Box,{className:\"social-media\",children:[(0,B.jsx)(ue.Typography,{tabIndex:p?.trim()?0:-1,className:\"social-title-text\",children:p}),(0,B.jsxs)(ue.Box,{className:\"social-icons\",children:[o,m?.trim()&&cr(\"email\",m,\"email-text\"),b?.trim()&&cr(\"phone\",b,\"phone-text\")]})]}),Fi(u,h??\"\",n,i,C)]})]})},Ic=e=>new Promise((t,o)=>{let n=new Image;n.crossOrigin=\"anonymous\",n.src=e,n.onload=()=>{let i=document.createElement(\"canvas\"),l=i.getContext(\"2d\");if(!l)return o(new Error(\"Canvas not supported\"));i.width=n.width,i.height=n.height,l.drawImage(n,0,0);let p=[l.getImageData(0,0,1,1).data,l.getImageData(n.width-1,0,1,1).data,l.getImageData(0,n.height-1,1,1).data,l.getImageData(n.width-1,n.height-1,1,1).data].every(m=>Array.prototype.slice.call(m)[3]<10);t(p)},n.onerror=()=>o(new Error(\"Failed to load image\"))}),$c=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(p=>p+p).join(\"\"));let n=Number.parseInt(o.substring(0,2),16),i=Number.parseInt(o.substring(2,4),16),l=Number.parseInt(o.substring(4,6),16),s=220;return n>=s&&i>=s&&l>=s},Nc=(e,t)=>({onClick:()=>{pr({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`})},onKeyDown:o=>{(o.key===\"Enter\"||o.key===\" \")&&(o.preventDefault(),pr({event:\"contact_click\",contact_type:e,contact_value:t,click_element:`${e}_link`}),globalThis.location.href=`${e===\"email\"?\"mailto\":\"tel\"}:${t}`)}}),cr=(e,t,o)=>{let n=e===\"email\"?\"mailto:\":\"tel:\",i=Nc(e,t);return(0,B.jsx)(ue.Typography,{className:o,children:(0,B.jsx)(Di,{href:`${n}${t}`,...i,children:t})})};function Ma({className:e,shopTitle:t,shopDescription:o,socialTitleText:n,imageDetails:i,email:l,phone:s,bannerProps:p,socialIcons:m,expirationDate:b,showBadges:u=!1,totalSavings:h}){let C=(0,ue.useMediaQuery)(\"(max-width: 560px)\"),[g,D]=(0,ut.useState)(!1),[F,d]=(0,ut.useState)(!1),[x,v]=(0,ut.useState)(!1),[k,S]=(0,ut.useState)(!1),N=()=>{d(!F)};(0,ut.useEffect)(()=>{(async()=>{if(i?.imageSrc){let w=await Ic(i.imageSrc);S(w)}else S(!1)})()},[i?.imageSrc]),(0,ut.useEffect)(()=>{v($c(p?.backgroundColor))},[p?.backgroundColor]),(0,ut.useEffect)(()=>{let c,w=window.scrollY,T=!1,f=!1,y=0,L=ee=>{let He=Date.now();if(T!==ee&&!f){if(He-y<100)return;f=!0,T=ee,y=He,ee&&d(!1),clearTimeout(c),D(ee),c=setTimeout(()=>{f=!1,ee&&window.scrollY<15&&window.scrollTo({top:C?20:30,behavior:\"smooth\"})},300)}},re=()=>{let ee=window.scrollY;if(f){w=ee;return}if(Math.abs(ee-w)<.5)return;let dt=ee>w,pt=C?15:25,Lo=C?8:12;dt&&ee>pt&&!T?L(!0):!dt&&ee<Lo&&T&&L(!1),w=ee},de=()=>{let ee=window.scrollY,dt=ee>(C?5:10);T=dt,D(dt),w=ee,y=Date.now()},ie=null,xe=0,Vt=()=>{ie||Date.now()-xe<16||(ie=requestAnimationFrame(()=>{re(),xe=Date.now(),ie=null}))};return de(),window.addEventListener(\"scroll\",Vt,{passive:!0}),()=>{window.removeEventListener(\"scroll\",Vt),ie&&cancelAnimationFrame(ie),clearTimeout(c)}},[C]);let A=(0,ut.useMemo)(()=>m?.map((c,w)=>(0,B.jsx)(Si,{onClick:f=>{f.preventDefault(),pr({event:\"social_click\",social_platform:c.type,social_url:c.url,click_element:\"social_icon\"}),window.open(c.url,\"_blank\")},children:(0,B.jsx)(Ao.NsLink,{href:c.url,target:\"_blank\",children:(0,B.jsx)(Ao.NsImage,{src:`https://www.google.com/s2/favicons?domain=${c?.url}&sz=24`,alt:`${c.type} icon`,width:\"24\",height:\"24\"},c?.type+w)})},c?.type+w)),[m]),J=`${e} ${g?\"scrolled\":\"\"}`,Y={shopTitle:t,shopDescription:o,socialTitleText:n,email:l,phone:s,showBadges:u,expirationDate:b,totalSavings:h},Z=()=>window.innerWidth<=380?50:window.innerWidth<=415?56:window.innerWidth<=460?62:80,V=C&&o&&o.length>Z();return C?(0,B.jsxs)(Ci,{className:J,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:k,hasWhiteBackground:x,children:[(0,B.jsxs)(ue.Box,{className:\"image-content-mobile\",children:[Oi(i,p??{},\"bg-image-mobile\"),Fc(Y,g,A,C,x)]}),!g&&(0,B.jsxs)(ue.Box,{className:\"expandable-description-mobile\",children:[(0,B.jsx)(ue.Typography,{className:`description-content-mobile ${F||!V?\"expanded\":\"collapsed\"}`,children:o}),V&&(0,B.jsx)(ki,{onClick:N,children:(0,B.jsx)(Mi,{width:16,height:16,className:`arrow-icon-mobile ${F?\"expanded\":\"\"}`})})]})]}):(0,B.jsxs)(wi,{className:J,\"data-testid\":\"my-site-shop-header\",bannerProps:p,isCircularImage:k,hasWhiteBackground:x,children:[Oi(i,p??{},\"bg-image\"),Lc(Y,g,A,C,x)]})}var mo=require(\"@nuskin/foundation-theme\"),Oa=(0,mo.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\n }\n`,Li=(0,mo.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`,Ii=(0,mo.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`,Fa=(0,mo.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`,$i=(0,mo.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var Ui=M(require(\"@mui/icons-material/CalendarToday\")),Ki=M(require(\"@mui/icons-material/Language\")),Gi=require(\"@nuskin/foundation-ui-components\");var _e=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Kt}=_e.ColorUtils,Ni=(0,_e.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px;\n background-color: ${({theme:e})=>Kt(e,\"N20\")};\n border-radius: 12px;\n min-height: auto;\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: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\n }\n`,Vi=(0,_e.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: baseline;\n gap: 12px;\n flex-wrap: wrap;\n`,Ei=(0,_e.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>Kt(e,\"N100\")};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`,Ai=(0,_e.styled)(\"div\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>Kt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,zi=(0,_e.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 24px;\n width: 100%;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,La=(0,_e.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n position: relative;\n`,Ia=(0,_e.styled)(\"label\")`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0 !important;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n`,$a=(0,_e.styled)(\"select\")`\n min-width: 120px;\n height: 32px;\n padding: 6px 24px 6px 8px;\n background-color: transparent;\n border: none;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: ${({theme:e})=>Kt(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 white-space: nowrap;\n flex-shrink: 0;\n\n &:hover {\n background-color: ${({theme:e})=>Kt(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>Kt(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>Kt(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 background-position: right 8px center;\n }\n`,Na=(0,_e.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>Kt(e,\"N70\")};\n\n svg {\n font-size: 16px;\n width: 16px;\n height: 16px;\n }\n`,Bi=(0,_e.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`,Hi=(0,_e.styled)(\"div\")`\n display: flex;\n flex-wrap: nowrap;\n gap: 24px;\n align-items: center;\n width: 100%;\n\n @media (min-width: 768px) {\n width: auto;\n }\n`,zg=(0,_e.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`;var ur;function ho(e){ur=e}function Wi(){return ur}function Gt(e){if(!ur)return e.fallback;let t;try{t=ur(e.key,e.fallback)}catch{t=void 0}return typeof t==\"string\"&&t.length>0?t:e.fallback}var r={title:{key:\"shoppingDashboard.title\",fallback:\"Shop Performance\"},error:{key:\"shoppingDashboard.error\",fallback:\"Error loading dashboard\"},stats:{revenue:{key:\"shoppingDashboard.stats.revenue\",fallback:\"Total Revenue\"},visits:{key:\"shoppingDashboard.stats.visits\",fallback:\"Site Visits\"},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\"}},market:{label:{key:\"shoppingDashboard.filter.market.label\",fallback:\"Market\"},all:{key:\"shoppingDashboard.filter.market.all\",fallback:\"All Markets\"}},productSort:{label:{key:\"shoppingDashboard.filter.productSort.label\",fallback:\"Sort By\"}},signupView:{label:{key:\"shoppingDashboard.filter.signupView.label\",fallback:\"Show\"},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\"}},conversionType:{standard:{key:\"shoppingDashboard.filter.conversionType.standard\",fallback:\"Standard\"},subscription:{key:\"shoppingDashboard.filter.conversionType.subscription\",fallback:\"Subscription\"}}},widget:{topProducts:{title:{key:\"shoppingDashboard.widget.topProducts.title\",fallback:\"Top Selling Products\"},viewAll:{key:\"shoppingDashboard.widget.topProducts.viewAll\",fallback:\"View All Products\"},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\"},rank:{key:\"shoppingDashboard.widget.topProducts.rank\",fallback:\"Rank\"}},conversionRate:{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\"},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\"},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\"},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\"},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\"},viewDetails:{key:\"shoppingDashboard.widget.menu.viewDetails\",fallback:\"View Details\"},exportData:{key:\"shoppingDashboard.widget.menu.exportData\",fallback:\"Export Data\"}}},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\"},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\"},customer:{key:\"shoppingDashboard.fullView.conversionRate.columns.customer\",fallback:\"Customer\"},items:{key:\"shoppingDashboard.fullView.conversionRate.columns.items\",fallback:\"Items\"},total:{key:\"shoppingDashboard.fullView.conversionRate.columns.total\",fallback:\"Order Total\"},bv:{key:\"shoppingDashboard.fullView.conversionRate.columns.bv\",fallback:\"BV\"},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\"},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\"},percentOfTotal:{key:\"shoppingDashboard.fullView.categories.columns.percentOfTotal\",fallback:\"% of Total\"}},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:\"--\"},noData:{key:\"shoppingDashboard.defaults.noData\",fallback:\"No data\"},noChange:{key:\"shoppingDashboard.defaults.noChange\",fallback:\"No change\"},byRevenue:{key:\"shoppingDashboard.defaults.byRevenue\",fallback:\"By: Revenue\"},byUnits:{key:\"shoppingDashboard.defaults.byUnits\",fallback:\"By: Units\"},byVolume:{key:\"shoppingDashboard.defaults.byVolume\",fallback:\"By: Volume\"},byTrend:{key:\"shoppingDashboard.defaults.byTrend\",fallback:\"By: Trend\"},all:{key:\"shoppingDashboard.defaults.all\",fallback:\"All\"},members:{key:\"shoppingDashboard.defaults.members\",fallback:\"Members\"},retail:{key:\"shoppingDashboard.defaults.retail\",fallback:\"Retail\"},brandAffiliates:{key:\"shoppingDashboard.defaults.brandAffiliates\",fallback:\"Brand Affiliates\"},revenue:{key:\"shoppingDashboard.defaults.revenue\",fallback:\"Revenue\"},units:{key:\"shoppingDashboard.defaults.units\",fallback:\"Units\"},volume:{key:\"shoppingDashboard.defaults.volume\",fallback:\"Volume\"},conversionRate:{key:\"shoppingDashboard.defaults.conversionRate\",fallback:\"Conversion Rate\"},trend:{key:\"shoppingDashboard.defaults.trend\",fallback:\"Trend\"},date:{key:\"shoppingDashboard.defaults.date\",fallback:\"Date\"},type:{key:\"shoppingDashboard.defaults.type\",fallback:\"Type\"},dcSv:{key:\"shoppingDashboard.defaults.dcSv\",fallback:\"DC-SV\"}}};function a(e){return Gt(e)}var _i=require(\"react\");function Va(){return[{value:\"all\",label:a(r.filter.market.all)}]}function Ea(e){return e&&e.length>0?e:Va()}function ot(e){return(0,_i.useMemo)(()=>Ea(e),[e])}var le=require(\"react/jsx-runtime\"),xo=({shopTitle:e,dateRange:t,market:o,dateRangeLabel:n,isLoading:i=!1,stats:l,markets:s,onDateRangeChange:p,onMarketChange:m})=>{let b=ot(s),u=D=>{let F=D.target.value;p?.(F)},h=D=>{let F=D.target.value;m?.(F)},C=D=>{D.key===\"Escape\"&&D.target.blur()},g=()=>n||(l?.dateRange?l.dateRange.label:a(r.filter.dateRange.last30days));return(0,le.jsxs)(Ni,{as:\"header\",\"data-testid\":\"dashboard-header\",children:[(0,le.jsxs)(Vi,{children:[(0,le.jsx)(Ei,{\"data-testid\":\"dashboard-shop-title\",children:e??l?.shopTitle??a(r.title)}),(0,le.jsx)(Ai,{\"aria-live\":\"polite\",\"data-testid\":\"dashboard-date-range-label\",children:g()})]}),(0,le.jsx)(zi,{\"aria-label\":a(r.ariaLabel.dashboardFilters),\"data-testid\":\"dashboard-filters-section\",children:(0,le.jsxs)(Hi,{children:[i&&(0,le.jsx)(Bi,{as:\"output\",\"aria-live\":\"polite\",\"aria-label\":a(r.ariaLabel.loadingDashboard),\"data-testid\":\"dashboard-loading-indicator\",children:(0,le.jsx)(Gi.NsSpinner,{})}),(0,le.jsxs)(La,{children:[(0,le.jsx)(Ia,{htmlFor:\"filter-date-range\",children:a(r.filter.dateRange.label)}),(0,le.jsx)(Na,{\"aria-hidden\":\"true\",children:(0,le.jsx)(Ui.default,{})}),(0,le.jsxs)($a,{id:\"filter-date-range\",\"data-testid\":\"filter-date-range\",value:t,onChange:u,onKeyDown:C,disabled:i,\"aria-label\":`${a(r.ariaLabel.dateRangeFilter)} ${a(r.filter.dateRange[t])}`,children:[(0,le.jsx)(\"option\",{value:\"last7days\",children:a(r.filter.dateRange.last7days)}),(0,le.jsx)(\"option\",{value:\"last30days\",children:a(r.filter.dateRange.last30days)}),(0,le.jsx)(\"option\",{value:\"last90days\",children:a(r.filter.dateRange.last90days)}),(0,le.jsx)(\"option\",{value:\"thisMonth\",children:a(r.filter.dateRange.thisMonth)})]})]}),(0,le.jsxs)(La,{children:[(0,le.jsx)(Ia,{htmlFor:\"filter-market\",children:a(r.filter.market.label)}),(0,le.jsx)(Na,{\"aria-hidden\":\"true\",children:(0,le.jsx)(Ki.default,{})}),(0,le.jsx)($a,{id:\"filter-market\",\"data-testid\":\"filter-market\",value:o,onChange:h,onKeyDown:C,disabled:i,\"aria-label\":`${a(r.ariaLabel.marketFilter)} ${b.find(D=>D.value===o)?.label??String(o)}`,children:b.map(D=>(0,le.jsx)(\"option\",{value:D.value,children:D.label},D.value))})]})]})})]})};var Tl=M(require(\"react\")),Dl=M(require(\"@mui/icons-material/ShowChart\")),Pl=M(require(\"@mui/icons-material/TrendingUp\")),Rl=M(require(\"@mui/icons-material/TrendingDown\"));var ke=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Bt}=ke.ColorUtils,gr=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({$layout:e})=>e===\"split\"?\"8px\":\"0\"};\n padding: ${({$layout:e})=>e===\"split\"?\"12px\":\"10px\"};\n background-color: ${({theme:e})=>Bt(e,\"N20\")};\n border: 1px solid ${({theme:e})=>Bt(e,\"N30\")};\n border-radius: 8px;\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\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: ${({$layout:e})=>e===\"split\"?\"16px\":\"12px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n\n @media (min-width: 1080px) {\n padding: ${({$layout:e})=>e===\"split\"?\"16px\":\"14px\"};\n min-height: ${({$layout:e})=>e===\"split\"?\"110px\":\"auto\"};\n }\n`,ji=(0,ke.styled)(\"div\")`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>Bt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`,Yi=(0,ke.styled)(\"div\")`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`,Ji=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`,Zi=(0,ke.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#9b131a\":Bt(e,\"N70\")};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`,qi=(0,ke.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({theme:e})=>Bt(e,\"N70\")};\n`,Xi=(0,ke.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({theme:e})=>Bt(e,\"N100\")};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\n }\n\n @media (min-width: 1080px) {\n font-size: 14px;\n }\n`,Qi=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n`,Aa=(0,ke.styled)(\"div\")`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>Bt(e,\"N100\")};\n\n @media (min-width: 768px) {\n font-size: 24px;\n }\n\n @media (min-width: 1080px) {\n font-size: 28px;\n }\n`,el=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`,tl=(0,ke.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({theme:e})=>Bt(e,\"N70\")};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,ol=(0,ke.styled)(\"div\")`\n display: flex;\n flex-direction: row;\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\":Bt(e,\"N70\")};\n\n svg {\n width: 14px;\n height: 14px;\n }\n\n @media (min-width: 768px) {\n font-size: 14px;\n\n svg {\n width: 18px;\n height: 18px;\n }\n }\n`,Zg=(0,ke.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n`,za=(0,ke.styled)(\"span\")`\n white-space: nowrap;\n`,rl=(0,ke.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`;var te=M(require(\"@mui/material/Skeleton\"));var X=require(\"@nuskin/foundation-theme\"),bo=M(require(\"@mui/material/Skeleton\")),fr=(0,X.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`,mr=(0,X.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`,al=(0,X.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`,nl=(0,X.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`,il=(0,X.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,ll=(0,X.styled)(\"div\")`\n margin-top: 8px;\n`,sl=(0,X.styled)(bo.default)`\n margin-top: 4px;\n`,dl=(0,X.styled)(\"div\")`\n flex: 1;\n min-width: 0;\n`,pl=(0,X.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n`,cl=(0,X.styled)(\"div\")`\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin-bottom: 16px;\n`,ul=(0,X.styled)(\"div\")`\n padding-top: 4px;\n`,gl=(0,X.styled)(bo.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`,fl=(0,X.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`,ml=(0,X.styled)(bo.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`,hl=(0,X.styled)(\"div\")`\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,xl=(0,X.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px;\n`,bl=(0,X.styled)(\"div\")`\n flex: 1;\n`,Vc=(0,X.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`,Ec=(0,X.styled)(\"div\")`\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n`,Ac=(0,X.styled)(\"div\")`\n display: flex;\n gap: 16px;\n`,zc=(0,X.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`,Bc=(0,X.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`,Ba=(0,X.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,yl=(0,X.styled)(\"div\")`\n padding: 24px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n`,wl=(0,X.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 16px 0;\n gap: 8px;\n`,Cl=(0,X.styled)(bo.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`,Ha=(0,X.styled)(\"div\")`\n padding: 20px;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,hr=(0,X.styled)(bo.default)`\n border-radius: 4px;\n`,vl=(0,X.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 P=require(\"react/jsx-runtime\"),zo=()=>(0,P.jsxs)(nl,{\"data-testid\":\"skeleton-stats-card\",children:[(0,P.jsxs)(il,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:80,height:18}),(0,P.jsx)(te.default,{variant:\"text\",width:48,height:16})]}),(0,P.jsxs)(ll,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:120,height:36}),(0,P.jsx)(sl,{variant:\"text\",width:100,height:16})]})]}),Hc=()=>(0,P.jsxs)(al,{children:[(0,P.jsx)(te.default,{variant:\"rounded\",width:28,height:28}),(0,P.jsx)(te.default,{variant:\"rounded\",width:50,height:50}),(0,P.jsxs)(dl,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:\"70%\",height:18}),(0,P.jsx)(te.default,{variant:\"text\",width:\"50%\",height:14})]}),(0,P.jsxs)(pl,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:80,height:18}),(0,P.jsx)(te.default,{variant:\"text\",width:48,height:14})]})]}),kl=()=>(0,P.jsxs)(fr,{\"data-testid\":\"skeleton-products-list\",children:[(0,P.jsxs)(mr,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:160,height:22}),(0,P.jsx)(te.default,{variant:\"rounded\",width:100,height:32})]}),[\"product-1\",\"product-2\",\"product-3\",\"product-4\",\"product-5\"].map(e=>(0,P.jsx)(Hc,{},e))]}),xr=()=>(0,P.jsxs)(fr,{\"data-testid\":\"skeleton-chart-widget\",children:[(0,P.jsxs)(mr,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:140,height:22}),(0,P.jsx)(te.default,{variant:\"rounded\",width:110,height:32})]}),(0,P.jsxs)(cl,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:100,height:36}),(0,P.jsxs)(ul,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:60,height:18}),(0,P.jsx)(te.default,{variant:\"text\",width:140,height:14})]})]}),(0,P.jsx)(gl,{variant:\"rounded\",width:\"100%\"})]}),Wc=()=>(0,P.jsxs)(xl,{children:[(0,P.jsx)(te.default,{variant:\"circular\",width:12,height:12}),(0,P.jsxs)(bl,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:\"60%\",height:16}),(0,P.jsx)(te.default,{variant:\"text\",width:\"40%\",height:14})]}),(0,P.jsx)(te.default,{variant:\"text\",width:36,height:18})]}),br=()=>(0,P.jsxs)(fr,{\"data-testid\":\"skeleton-categories-pie\",children:[(0,P.jsxs)(mr,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:140,height:22}),(0,P.jsx)(te.default,{variant:\"rounded\",width:100,height:32})]}),(0,P.jsxs)(fl,{children:[(0,P.jsx)(ml,{variant:\"circular\"}),(0,P.jsx)(hl,{children:[\"legend-1\",\"legend-2\",\"legend-3\",\"legend-4\",\"legend-5\"].map(e=>(0,P.jsx)(Wc,{},e))})]})]});var jt=()=>(0,P.jsxs)(Ba,{\"data-testid\":\"skeleton-fullview-chart\",children:[(0,P.jsxs)(yl,{children:[(0,P.jsxs)(wl,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:140,height:52}),(0,P.jsx)(te.default,{variant:\"text\",width:80,height:24}),(0,P.jsx)(te.default,{variant:\"text\",width:160,height:16})]}),(0,P.jsx)(Cl,{variant:\"rounded\",width:\"100%\"})]}),(0,P.jsxs)(Ha,{children:[(0,P.jsx)(te.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,P.jsx)(hr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]}),Sl=()=>(0,P.jsxs)(Ba,{\"data-testid\":\"skeleton-fullview-table\",children:[(0,P.jsxs)(vl,{children:[(0,P.jsx)(zo,{}),(0,P.jsx)(zo,{}),(0,P.jsx)(zo,{})]}),(0,P.jsxs)(Ha,{children:[(0,P.jsx)(te.default,{variant:\"text\",width:200,height:24}),(0,P.jsx)(hr,{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,P.jsx)(hr,{variant:\"rounded\",width:\"100%\",height:44},e))]})]});var pe=require(\"react/jsx-runtime\"),_c=({title:e,value:t,subtitle:o,caption:n,layout:i=\"default\",trendDirection:l=\"neutral\",trendValue:s,testId:p,isLoading:m=!1})=>{if(m)return(0,pe.jsx)(gr,{$layout:i,\"data-testid\":p,children:(0,pe.jsx)(zo,{})});let b=()=>{let h=a(r.stats.trend.unchanged);return l===\"up\"?h=a(r.stats.trend.increased):l===\"down\"&&(h=a(r.stats.trend.decreased)),`${e} ${h} ${s??\"\"}`},u=h=>l===\"up\"?(0,pe.jsx)(Pl.default,{sx:{fontSize:h},\"aria-hidden\":\"true\"}):l===\"down\"?(0,pe.jsx)(Rl.default,{sx:{fontSize:h},\"aria-hidden\":\"true\"}):(0,pe.jsx)(Dl.default,{sx:{fontSize:h},\"aria-hidden\":\"true\"});return i===\"split\"?(0,pe.jsxs)(gr,{as:\"article\",$layout:\"split\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,pe.jsx)(ji,{id:`stats-title-${p}`,children:e}),(0,pe.jsxs)(Yi,{children:[(0,pe.jsx)(Aa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),(s??n)&&(0,pe.jsxs)(Ji,{children:[s&&(0,pe.jsxs)(Zi,{as:\"output\",direction:l,\"aria-live\":\"polite\",\"aria-label\":b(),\"data-testid\":`stats-trend-${p}`,children:[u(\"18px\"),(0,pe.jsx)(za,{children:s})]}),n&&(0,pe.jsx)(qi,{\"data-testid\":`stats-caption-${p}`,children:n})]})]})]}):(0,pe.jsxs)(gr,{as:\"article\",\"aria-label\":`${e}: ${t}`,\"data-testid\":p,children:[(0,pe.jsx)(rl,{children:(0,pe.jsx)(Xi,{id:`stats-title-${p}`,children:e})}),(0,pe.jsxs)(Qi,{children:[(0,pe.jsxs)(el,{children:[(0,pe.jsx)(Aa,{\"aria-describedby\":`stats-title-${p}`,\"data-testid\":`stats-value-${p}`,children:t}),o&&(0,pe.jsx)(tl,{\"aria-label\":`${e} ${a(r.stats.details)}: ${o}`,\"data-testid\":`stats-subtitle-${p}`,children:o})]}),s&&(0,pe.jsxs)(ol,{as:\"output\",direction:l,\"aria-live\":\"polite\",\"aria-label\":b(),\"data-testid\":`stats-trend-${p}`,children:[u(\"16px\"),(0,pe.jsx)(za,{children:s})]})]})]})},wt=Tl.default.memo(_c);wt.displayName=\"StatsCard\";var as=M(require(\"react\")),ns=M(require(\"@mui/icons-material/ShoppingCart\")),is=M(require(\"@mui/icons-material/ShowChart\")),ls=M(require(\"@mui/icons-material/TrendingUp\")),ss=M(require(\"@mui/icons-material/TrendingDown\"));var Ml=M(require(\"@mui/icons-material/ArrowUpward\")),Ol=M(require(\"@mui/icons-material/ArrowDownward\")),Fl=M(require(\"@mui/icons-material/Remove\"));var yr=require(\"react/jsx-runtime\");function Ct(e){if(!e)return null;let t=e.replace(\"%\",\"\").trim(),o=Number(t);return Number.isFinite(o)?o:null}function Yt(e){let t=Ct(e);return t===null?\"neutral\":t>0?\"up\":t<0?\"down\":\"neutral\"}function Jt(e,t,o){let{weightedSum:n,weight:i}=e.reduce((p,m)=>{let b=Ct(o(m));return b===null?p:{weightedSum:p.weightedSum+b*t(m),weight:p.weight+t(m)}},{weightedSum:0,weight:0}),l=i>0?n/i:0,s=\"neutral\";return l>0?s=\"up\":l<0&&(s=\"down\"),{direction:s,formatted:`${l>0?\"+\":\"\"}${l.toFixed(1)}%`}}function yo(e){return e===\"up\"?a(r.stats.trend.increased):e===\"down\"?a(r.stats.trend.decreased):a(r.stats.trend.unchanged)}function rt(e){switch(e){case\"up\":return(0,yr.jsx)(Ml.default,{});case\"down\":return(0,yr.jsx)(Ol.default,{});case\"neutral\":default:return(0,yr.jsx)(Fl.default,{})}}function Ll(e){switch(e){case\"up\":return\"#4caf50\";case\"down\":return\"#f44336\";case\"neutral\":default:return\"#757575\"}}var Wa=require(\"react\");function _a(e,t){return Math.ceil(e.length/t)}function Ua(e,t,o){let n=(t-1)*o,i=n+o;return e.slice(n,i)}function Il(e,t,o=\"desc\"){return[...e].sort((n,i)=>{let l=n[t],s=i[t];return o===\"asc\"?l-s:s-l})}function $l(e,t,o=1){return t===0?\"0.0\":(e/t*100).toFixed(o)}function vt(e,t,o){let n=(0,Wa.useMemo)(()=>_a(e,o),[e,o]),i=(0,Wa.useMemo)(()=>Ua(e,t,o),[e,t,o]);return{totalPages:n,pageItems:i}}function Q(e,t,o=\"en-US\",n){let i=Number.isFinite(e)?e:0;if(t)try{return new Intl.NumberFormat(o,{style:\"currency\",currency:t,...n!==void 0?{minimumFractionDigits:n,maximumFractionDigits:n}:{minimumFractionDigits:0,maximumFractionDigits:2}}).format(i)}catch{}return n!==void 0?`$${i.toFixed(n)}`:`$${i.toLocaleString()}`}function Bo(e){return!e||e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}var fe=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ce}=fe.ColorUtils,wr=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>ce(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ce(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`,Ka=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Nl=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Ga=(0,fe.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>ce(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})=>ce(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,Vl=(0,fe.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>ce(e,\"N20\")};\n border: 1px solid ${({theme:e})=>ce(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>ce(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>ce(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>ce(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>ce(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,El=(0,fe.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`,Al=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px;\n background-color: ${({theme:e})=>ce(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})=>ce(e,\"N40\")};\n }\n\n &:hover {\n background-color: ${({theme:e})=>ce(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`,zl=(0,fe.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})=>ce(e,\"A10\")};\n color: ${({theme:e})=>ce(e,\"A80\")};\n border-radius: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\n }\n`,Bl=(0,fe.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`,Hl=(0,fe.styled)(\"div\")`\n width: 40px;\n height: 40px;\n border-radius: 8px;\n background-color: ${({theme:e})=>ce(e,\"N40\")};\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({theme:e})=>ce(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`,Wl=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n min-width: 0;\n`,_l=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({theme:e})=>ce(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: 16px;\n max-width: none;\n }\n`,Ul=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>ce(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`,Kl=(0,fe.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 4px;\n flex-shrink: 0;\n`,Gl=(0,fe.styled)(\"div\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.2;\n color: ${({theme:e})=>ce(e,\"N100\")};\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`,jl=(0,fe.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 11px;\n font-weight: 500;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#22C55E\":t===\"down\"?\"#DC2626\":ce(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`,Yl=(0,fe.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})=>ce(e,\"N70\")};\n\n svg {\n width: 48px;\n height: 48px;\n color: ${({theme:e})=>ce(e,\"N50\")};\n }\n`,Jl=(0,fe.styled)(\"div\")`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({theme:e})=>ce(e,\"N70\")};\n`;var Ql=require(\"react\"),es=M(require(\"@mui/material/Menu\")),ja=M(require(\"@mui/material/MenuItem\")),Ya=M(require(\"@mui/material/ListItemIcon\")),Ja=M(require(\"@mui/material/ListItemText\")),ts=M(require(\"@mui/icons-material/MoreVert\")),os=M(require(\"@mui/icons-material/Visibility\")),rs=M(require(\"@mui/icons-material/FileDownload\"));var Zl=M(require(\"@mui/material/IconButton\")),ql=require(\"@nuskin/foundation-theme\"),Xl=(0,ql.styled)(Zl.default)(()=>({padding:\"4px\",color:\"#252525\",\"&:hover\":{backgroundColor:\"rgba(37, 37, 37, 0.08)\"}}));var ze=require(\"react/jsx-runtime\"),at=({widgetId:e,onFullView:t,onExport:o})=>{let[n,i]=(0,Ql.useState)(null),l=!!n,s=`widget-menu-button-${e}`,p=`widget-menu-${e}`,m=C=>{i(C.currentTarget)},b=()=>{i(null)},u=()=>{b(),t&&t()},h=()=>{b(),o&&o()};return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(Xl,{id:s,\"data-testid\":`widget-menu-button-${e}`,\"aria-label\":a(r.widget.menu.ariaLabel),\"aria-controls\":l?p:void 0,\"aria-haspopup\":\"true\",\"aria-expanded\":l?\"true\":void 0,onClick:m,size:\"small\",children:(0,ze.jsx)(ts.default,{fontSize:\"small\"})}),(0,ze.jsxs)(es.default,{id:p,\"data-testid\":`widget-menu-${e}`,anchorEl:n,open:l,onClose:b,MenuListProps:{\"aria-labelledby\":s},anchorOrigin:{vertical:\"bottom\",horizontal:\"right\"},transformOrigin:{vertical:\"top\",horizontal:\"right\"},children:[(0,ze.jsxs)(ja.default,{onClick:u,\"data-testid\":\"widget-menu-item-viewdetails\",children:[(0,ze.jsx)(Ya.default,{children:(0,ze.jsx)(os.default,{fontSize:\"small\"})}),(0,ze.jsx)(Ja.default,{children:a(r.widget.menu.viewDetails)})]}),o&&(0,ze.jsxs)(ja.default,{onClick:h,\"data-testid\":\"widget-menu-item-export\",children:[(0,ze.jsx)(Ya.default,{children:(0,ze.jsx)(rs.default,{fontSize:\"small\"})}),(0,ze.jsx)(Ja.default,{children:a(r.widget.menu.exportData)})]})]})]})};var j=require(\"react/jsx-runtime\"),Uc=({products:e,productSort:t,isLoading:o=!1,maxProducts:n=5,onSortChange:i,onTitleClick:l,onExport:s})=>{let p=d=>{let x=d.target.value;i?.(x)},m=(d,x)=>{switch(x){case\"units\":return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"revenue\":return Q(d.revenue,d.currencyCode);case\"volume\":return`${d.volume.toLocaleString()} ${a(r.defaults.dcSv)}`;default:return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`}},b=(d,x)=>{switch(x){case\"units\":return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;case\"revenue\":return`${d.unitsSold.toLocaleString()} ${a(r.widget.topProducts.unitsSuffix)}`;case\"volume\":return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`;default:return`${Q(d.revenue,d.currencyCode)} ${a(r.widget.topProducts.revenueSuffix)}`}},u=(d,x)=>{let v=d.trend;if(!v)return\"\";switch(x){case\"units\":return v.units??\"\";case\"revenue\":return v.revenue??\"\";case\"volume\":return v.volume??\"\";default:return v.units??\"\"}},h=(d,x)=>{let v=u(d,x);return v?v.startsWith(\"+\")?\"up\":v.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\"},C=d=>d===\"up\"?(0,j.jsx)(ls.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):d===\"down\"?(0,j.jsx)(ss.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):(0,j.jsx)(is.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}),g=e.slice(0,n),D=a(r.widget.topProducts.rank),F=a(r.defaults.trend);return o&&e.length===0?(0,j.jsx)(wr,{\"data-testid\":\"widget-top-products\",children:(0,j.jsx)(kl,{})}):e.length===0?(0,j.jsxs)(wr,{\"data-testid\":\"widget-top-products\",children:[(0,j.jsx)(Ka,{children:(0,j.jsx)(Ga,{children:a(r.widget.topProducts.title)})}),(0,j.jsxs)(Yl,{\"data-testid\":\"products-empty-state\",children:[(0,j.jsx)(ns.default,{}),(0,j.jsx)(Jl,{children:a(r.widget.topProducts.empty)})]})]}):(0,j.jsxs)(wr,{as:\"section\",\"data-testid\":\"widget-top-products\",\"aria-label\":a(r.widget.topProducts.ariaLabel),children:[(0,j.jsxs)(Ka,{children:[(0,j.jsx)(Ga,{as:\"button\",onClick:l,\"aria-label\":a(r.widget.topProducts.titleAriaLabel),\"data-testid\":\"widget-title-top-products\",children:a(r.widget.topProducts.title)}),(0,j.jsxs)(Nl,{children:[(0,j.jsxs)(Vl,{id:\"product-sort\",\"data-testid\":\"product-sort-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":a(r.widget.topProducts.sortAriaLabel),children:[(0,j.jsx)(\"option\",{value:\"units\",children:a(r.defaults.byUnits)}),(0,j.jsx)(\"option\",{value:\"revenue\",children:a(r.defaults.byRevenue)}),(0,j.jsx)(\"option\",{value:\"volume\",children:a(r.defaults.byVolume)})]}),(0,j.jsx)(at,{widgetId:\"top-products\",onFullView:l,onExport:s})]})]}),(0,j.jsx)(El,{as:\"ul\",\"data-testid\":\"products-list\",children:g.map((d,x)=>{let v=h(d,t),k=u(d,t);return(0,j.jsxs)(Al,{as:\"li\",\"data-testid\":`product-item-${x}`,\"aria-label\":`${D} ${d.rank}: ${d.name}, ${m(d,t)}`,children:[(0,j.jsx)(zl,{\"aria-label\":`${D} ${d.rank}`,children:d.rank}),d.imageUrl?(0,j.jsx)(Bl,{src:d.imageUrl,alt:d.name,loading:\"lazy\",onError:S=>{S.currentTarget.hidden=!0}}):(0,j.jsx)(Hl,{\"aria-label\":a(r.widget.topProducts.noImageAriaLabel),children:d.name.substring(0,2).toUpperCase()}),(0,j.jsxs)(Wl,{children:[(0,j.jsx)(_l,{title:d.name,children:d.name}),(0,j.jsx)(Ul,{children:b(d,t)})]}),(0,j.jsxs)(Kl,{children:[(0,j.jsx)(Gl,{children:m(d,t)}),k&&(0,j.jsxs)(jl,{as:\"output\",direction:v,\"aria-live\":\"polite\",\"aria-label\":`${F}: ${yo(v)} ${k}`,children:[C(v),(0,j.jsx)(\"span\",{children:k})]})]})]},d.id)})})]})},no=as.default.memo(Uc);no.displayName=\"TopSellingProductsList\";var wo=M(require(\"react\")),Je=require(\"recharts\");var Se=require(\"@nuskin/foundation-theme\"),{getGenomeColor:me}=Se.ColorUtils,Za=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>me(e,\"N20\")};\n border: 1px solid ${({theme:e})=>me(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`,ds=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,ps=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n`,cs=(0,Se.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,us=(0,Se.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>me(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})=>me(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,gs=(0,Se.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>me(e,\"N20\")};\n border: 1px solid ${({theme:e})=>me(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>me(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>me(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>me(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>me(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,fs=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,ms=(0,Se.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>me(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,hs=(0,Se.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":me(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>me(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,xs=(0,Se.styled)(\"div\")`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n color: ${({theme:e})=>me(e,\"N100\")};\n margin-bottom: 8px;\n margin-top: 0;\n letter-spacing: 0.12px;\n`,bs=(0,Se.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})=>me(e,\"N40\")};\n stroke-width: 1px;\n }\n\n .recharts-text {\n fill: ${({theme:e})=>me(e,\"N70\")};\n font-size: 10px;\n }\n\n .recharts-tooltip-wrapper {\n z-index: 100;\n }\n`,ys=(0,Se.styled)(\"div\")`\n background-color: ${({theme:e})=>me(e,\"N100\")};\n border: 1px solid ${({theme:e})=>me(e,\"N40\")};\n border-radius: 6px;\n padding: 8px 12px;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);\n`,ws=(0,Se.styled)(\"div\")`\n font-size: 11px;\n font-weight: 600;\n color: ${({theme:e})=>me(e,\"N10\")};\n margin-bottom: 4px;\n`,Cs=(0,Se.styled)(\"div\")`\n font-size: 13px;\n font-weight: 700;\n color: ${({theme:e})=>me(e,\"A10\")};\n`,vs=(0,Se.styled)(\"div\")`\n font-size: 10px;\n font-weight: 400;\n color: ${({theme:e})=>me(e,\"N30\")};\n margin-top: 2px;\n`;var qa={last7days:7,last30days:30,last90days:90,thisMonth:31},Xa={last7days:\"Last 7 Days\",last30days:\"Last 30 Days\",last90days:\"Last 90 Days\",thisMonth:\"This Month\"};function ks(e){return qa[e]??30}function Cr(e){return Xa[e]??\"Last 30 Days\"}function Ss(e){return Cr(e)}function Qa(e){return`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][e.getMonth()]} ${e.getDate()}`}var Kc={Jan:\"1\",Feb:\"2\",Mar:\"3\",Apr:\"4\",May:\"5\",Jun:\"6\",Jul:\"7\",Aug:\"8\",Sep:\"9\",Oct:\"10\",Nov:\"11\",Dec:\"12\"};function Sr(e){let t=e.split(\" \");return t.length!==2?e:`${Kc[t[0]]||t[0]}/${t[1]}`}function vr(e){let t=new Date(e);return Qa(t)}function en(e,t){return`${vr(e)} - ${vr(t)}`}function kr(e){return e.toISOString().split(\"T\")[0]}function Te(e){let t=new Date,o=t.getFullYear(),n=t.getMonth(),i=t.getDate(),l,s=new Date(o,n,i);switch(e){case\"last7days\":l=new Date(o,n,i-7);break;case\"last30days\":l=new Date(o,n,i-30);break;case\"last90days\":l=new Date(o,n,i-90);break;case\"thisMonth\":l=new Date(o,n,1),s=new Date(o,n+1,0);break;default:return\"N/A\"}return en(kr(l),kr(s))}var K=require(\"react/jsx-runtime\"),Gc={top:5,right:10,left:-10,bottom:5},Ts={fontSize:10},jc={r:3,fill:\"#3B82F6\"},Yc={r:5},Jc=e=>`${e}%`,Zc=({active:e,payload:t})=>{if(!e||!t?.length)return null;let o=t[0].payload;return(0,K.jsxs)(ys,{children:[(0,K.jsx)(ws,{children:o.date}),(0,K.jsxs)(Cs,{children:[(o.rate??0).toFixed(2),\"%\"]}),(0,K.jsxs)(vs,{children:[o.orders??0,\" \",a(r.widget.conversionRate.tooltipOrders),\" /\",\" \",(o.siteVisits??0).toLocaleString(),\" \",a(r.widget.conversionRate.tooltipVisits)]})]})},qc=({conversionData:e,conversionFilter:t,isLoading:o=!1,title:n,summaryRate:i,summaryChangePct:l,onFilterChange:s,onTitleClick:p,onExport:m})=>{let b=wo.default.useCallback(d=>{let x=d.target.value;s?.(x)},[s]),u=a(r.defaults.noData),h=a(r.defaults.noChange),C=wo.default.useMemo(()=>typeof i==\"number\"&&Number.isFinite(i)?i:e.at(-1)?.rate??0,[i,e]),g=wo.default.useMemo(()=>{if(l!==void 0){if(l===null||Math.abs(l)<.1)return{direction:\"neutral\",value:h};let A=l>0?\"up\":\"down\",J=`${l>0?\"+\":\"\"}${l.toFixed(2)}%`;return{direction:A,value:J}}if(e.length<2)return{direction:\"neutral\",value:u};let d=e.at(-1)?.rate??0,x=e[0].rate;if(x===0)return{direction:\"neutral\",value:h};let v=d-x,k=v/x*100;if(Math.abs(k)<.1)return{direction:\"neutral\",value:h};let S=v>0?\"up\":\"down\",N=`${v>0?\"+\":\"\"}${v.toFixed(2)}%`;return{direction:S,value:N}},[l,e,h,u]),D=wo.default.useMemo(()=>e.map(d=>({...d,shortDate:Sr(d.date)})),[e]);if(o&&e.length===0)return(0,K.jsx)(Za,{\"data-testid\":\"widget-conversion-rate\",children:(0,K.jsx)(xr,{})});let F=a(r.widget.conversionRate.chartAriaLabel);return(0,K.jsxs)(Za,{as:\"section\",\"data-testid\":\"widget-conversion-rate\",\"aria-label\":F,children:[(0,K.jsx)(ds,{children:(0,K.jsxs)(ps,{children:[(0,K.jsx)(us,{as:\"button\",onClick:p,\"aria-label\":a(r.widget.conversionRate.titleAriaLabel),\"data-testid\":\"widget-title-conversion-rate\",children:n??a(r.defaults.conversionRate)}),(0,K.jsxs)(cs,{children:[(0,K.jsxs)(gs,{id:\"conversion-filter\",\"data-testid\":\"conversion-filter-dropdown\",value:t,onChange:b,disabled:o,\"aria-label\":a(r.widget.conversionRate.filterAriaLabel),children:[(0,K.jsx)(\"option\",{value:\"all\",children:a(r.defaults.all)}),(0,K.jsx)(\"option\",{value:\"standard\",children:a(r.filter.conversionType.standard)}),(0,K.jsx)(\"option\",{value:\"subscription\",children:a(r.filter.conversionType.subscription)})]}),(0,K.jsx)(at,{widgetId:\"conversion-rate\",onFullView:p,onExport:m})]})]})}),(0,K.jsxs)(fs,{children:[(0,K.jsxs)(ms,{\"aria-label\":`${a(r.defaults.conversionRate)}: ${C.toFixed(2)}%`,\"data-testid\":\"conversion-metric-value\",children:[C.toFixed(2),\"%\"]}),g.value!==u&&(0,K.jsxs)(hs,{as:\"output\",direction:g.direction,\"aria-live\":\"polite\",\"aria-label\":`${yo(g.direction)} ${g.value}`,\"data-testid\":\"conversion-metric-trend\",children:[(0,K.jsxs)(\"div\",{className:\"trend-line\",children:[(0,K.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(g.direction)}),(0,K.jsx)(\"span\",{className:\"change-value\",children:g.value.replace(\"%\",\"\")}),(0,K.jsx)(\"span\",{className:\"change-percent\",children:\"%\"})]}),(0,K.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,K.jsx)(xs,{\"data-testid\":\"conversion-formula\",children:a(r.widget.conversionRate.formula)}),(0,K.jsx)(bs,{\"data-testid\":\"conversion-chart\",children:(0,K.jsx)(Je.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,K.jsxs)(Je.LineChart,{data:D,margin:Gc,children:[(0,K.jsx)(Je.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,K.jsx)(Je.XAxis,{dataKey:\"shortDate\",tick:Ts,tickLine:!1,interval:\"preserveStartEnd\"}),(0,K.jsx)(Je.YAxis,{tick:Ts,tickLine:!1,tickFormatter:Jc,domain:[\"dataMin - 0.5\",\"dataMax + 0.5\"]}),(0,K.jsx)(Je.Tooltip,{content:Zc}),(0,K.jsx)(Je.Line,{type:\"monotone\",dataKey:\"rate\",stroke:\"#3B82F6\",strokeWidth:2,dot:jc,activeDot:Yc})]})})})]})},io=wo.default.memo(qc);io.displayName=\"ConversionRateChart\";var vo=M(require(\"react\")),we=require(\"recharts\");var Be=require(\"@nuskin/foundation-theme\"),{getGenomeColor:$e}=Be.ColorUtils,tn=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n padding: 16px;\n background-color: ${({theme:e})=>$e(e,\"N20\")};\n border: 1px solid ${({theme:e})=>$e(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`,Ds=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Ps=(0,Be.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Rs=(0,Be.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\n color: ${({theme:e})=>$e(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})=>$e(e,\"A80\")};\n }\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,Ms=(0,Be.styled)(\"select\")`\n height: 32px;\n padding: 4px 8px;\n background-color: ${({theme:e})=>$e(e,\"N20\")};\n border: 1px solid ${({theme:e})=>$e(e,\"N40\")};\n border-radius: 6px;\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>$e(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>$e(e,\"N30\")};\n }\n &:focus {\n border-color: ${({theme:e})=>$e(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>$e(e,\"A20\")};\n }\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Os=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`,Fs=(0,Be.styled)(\"div\")`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({theme:e})=>$e(e,\"N100\")};\n margin: 0;\n padding: 0;\n\n @media (min-width: 768px) {\n font-size: 32px;\n }\n`,Ls=(0,Be.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\n color: ${({theme:e,direction:t})=>t===\"up\"?\"#066100\":t===\"down\"?\"#DC2626\":$e(e,\"N70\")};\n\n svg {\n width: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>$e(e,\"N70\")};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\n }\n`,Is=(0,Be.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})=>$e(e,\"N40\")};\n stroke-width: 1px;\n }\n .recharts-text {\n fill: ${({theme:e})=>$e(e,\"N70\")};\n font-size: 10px;\n }\n`,$s=(0,Be.styled)(\"div\")`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\n`,Ho=(0,Be.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})=>$e(e,\"N30\")};\n }\n`,Wo=(0,Be.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,_o=(0,Be.styled)(\"span\")`\n font-size: 12px;\n font-weight: 400;\n color: ${({theme:e})=>$e(e,\"N70\")};\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;var I=require(\"react/jsx-runtime\"),gt={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#CBD6E0\"},Xc={top:5,right:10,left:-10,bottom:5},Ns={fontSize:10},Co={r:2},Qc=({signupData:e,signupView:t,isLoading:o=!1,title:n,onViewChange:i,onTitleClick:l,onExport:s})=>{let p=vo.default.useCallback(x=>{let v=x.target.value;i?.(v)},[i]),m=a(r.defaults.noData),b=a(r.defaults.noChange),u=vo.default.useMemo(()=>e.length===0?0:e[e.length-1].total,[e]),h=vo.default.useMemo(()=>{if(e.length<2)return{direction:\"neutral\",value:m};let x=e[e.length-1].total,v=e[0].total,k=x-v,S=k/v*100;if(Math.abs(S)<.1)return{direction:\"neutral\",value:b};let N=k>0?\"up\":\"down\",A=`${k>0?\"+\":\"\"}${k} (${S.toFixed(1)}%)`;return{direction:N,value:A}},[b,m,e]),C=vo.default.useMemo(()=>e.map(x=>({...x,shortDate:Sr(x.date)})),[e]),g=a(r.widget.signups.total),D=a(r.defaults.members),F=a(r.defaults.retail),d=a(r.defaults.brandAffiliates);return o&&e.length===0?(0,I.jsx)(tn,{\"data-testid\":\"widget-signups\",children:(0,I.jsx)(xr,{})}):(0,I.jsxs)(tn,{as:\"section\",\"data-testid\":\"widget-signups\",\"aria-label\":a(r.widget.signups.chartAriaLabel),children:[(0,I.jsxs)(Ds,{children:[(0,I.jsx)(Rs,{as:\"button\",onClick:l,\"aria-label\":a(r.widget.signups.titleAriaLabel),\"data-testid\":\"widget-title-signups\",children:n??a(r.widget.signups.title)}),(0,I.jsxs)(Ps,{children:[(0,I.jsxs)(Ms,{id:\"signup-view\",\"data-testid\":\"signup-view-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":a(r.widget.signups.filterAriaLabel),children:[(0,I.jsx)(\"option\",{value:\"all\",children:a(r.filter.signupView.showAll)}),(0,I.jsx)(\"option\",{value:\"members\",children:a(r.filter.signupView.showMembers)}),(0,I.jsx)(\"option\",{value:\"retail\",children:a(r.filter.signupView.showRetail)}),(0,I.jsx)(\"option\",{value:\"brandAffiliates\",children:a(r.filter.signupView.showBrandAffiliates)})]}),(0,I.jsx)(at,{widgetId:\"signups\",onFullView:l,onExport:s})]})]}),(0,I.jsxs)(Os,{\"data-testid\":\"signups-metric-display\",children:[(0,I.jsx)(Fs,{\"data-testid\":\"signups-metric-value\",\"aria-label\":`${g}: ${u.toLocaleString()}`,children:u.toLocaleString()}),h.value!==m&&(0,I.jsxs)(Ls,{as:\"output\",\"data-testid\":\"signups-metric-trend\",direction:h.direction,\"aria-live\":\"polite\",\"aria-label\":`${yo(h.direction)} ${h.value}`,children:[(0,I.jsxs)(\"div\",{className:\"trend-line\",children:[(0,I.jsx)(\"span\",{\"aria-hidden\":\"true\",children:rt(h.direction)}),(0,I.jsx)(\"span\",{className:\"change-value\",children:h.value.split(\" \")[0]}),(0,I.jsx)(\"span\",{className:\"change-percent\",children:h.value.split(\" \")[1]})]}),(0,I.jsx)(\"div\",{className:\"comparison-text\",children:a(r.widget.conversionRate.comparison)})]})]}),(0,I.jsx)(Is,{\"data-testid\":\"signups-chart\",children:(0,I.jsx)(we.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:200,children:(0,I.jsxs)(we.LineChart,{data:C,margin:Xc,children:[(0,I.jsx)(we.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,I.jsx)(we.XAxis,{dataKey:\"shortDate\",tick:Ns,tickLine:!1,interval:\"preserveStartEnd\"}),(0,I.jsx)(we.YAxis,{tick:Ns,tickLine:!1}),(0,I.jsx)(we.Tooltip,{}),(t===\"all\"||t===\"members\")&&(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:t===\"all\"?\"total\":\"members\",stroke:t===\"all\"?gt.total:gt.members,strokeWidth:2,dot:Co,name:t===\"all\"?g:D}),t===\"all\"&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:\"members\",stroke:gt.members,strokeWidth:2,dot:Co,name:D}),(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:\"retail\",stroke:gt.retail,strokeWidth:2,dot:Co,name:F}),(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:gt.brandAffiliates,strokeWidth:2,dot:Co,name:d})]}),t===\"retail\"&&(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:\"retail\",stroke:gt.retail,strokeWidth:2,dot:Co,name:F}),t===\"brandAffiliates\"&&(0,I.jsx)(we.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:gt.brandAffiliates,strokeWidth:2,dot:Co,name:d})]})})}),t===\"all\"&&(0,I.jsxs)($s,{\"data-testid\":\"signups-legend\",children:[(0,I.jsxs)(Ho,{\"data-testid\":\"legend-total\",children:[(0,I.jsx)(Wo,{color:gt.total}),(0,I.jsx)(_o,{children:g})]}),(0,I.jsxs)(Ho,{\"data-testid\":\"legend-members\",children:[(0,I.jsx)(Wo,{color:gt.members}),(0,I.jsx)(_o,{children:D})]}),(0,I.jsxs)(Ho,{\"data-testid\":\"legend-retail\",children:[(0,I.jsx)(Wo,{color:gt.retail}),(0,I.jsx)(_o,{children:F})]}),(0,I.jsxs)(Ho,{\"data-testid\":\"legend-brandAffiliates\",children:[(0,I.jsx)(Wo,{color:gt.brandAffiliates}),(0,I.jsx)(_o,{children:d})]})]})]})},Uo=vo.default.memo(Qc);Uo.displayName=\"SignupsChart\";var Hr=M(require(\"react\")),kt=require(\"recharts\"),Bs=M(require(\"@mui/icons-material/TrendingUp\")),Hs=M(require(\"@mui/icons-material/TrendingDown\"));var ae=require(\"@nuskin/foundation-theme\"),{getGenomeColor:De}=ae.ColorUtils,Zt=(0,ae.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`,ko=(0,ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n margin-bottom: 20px;\n }\n`,Tr=(0,ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,So=(0,ae.styled)(\"h2\")`\n font-size: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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\n @media (min-width: 1080px) {\n font-size: 18px;\n }\n`,Dr=(0,ae.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`,Pr=(0,ae.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`,Rr=(0,ae.styled)(\"div\")`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n`,Mr=(0,ae.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`,Or=(0,ae.styled)(\"div\")`\n font-size: 10px;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>De(e,\"N70\")};\n`,Fr=(0,ae.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`,Lr=(0,ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\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\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Ir=(0,ae.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`,$r=(0,ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\n\n &:hover {\n background-color: ${({theme:e})=>De(e,\"N30\")};\n }\n`,Nr=(0,ae.styled)(\"div\")`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({color:e})=>e};\n flex-shrink: 0;\n`,Vr=(0,ae.styled)(\"div\")`\n display: flex;\n flex-direction: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`,Er=(0,ae.styled)(\"div\")`\n font-size: 13px;\n font-weight: 600;\n color: ${({theme:e})=>De(e,\"N100\")};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`,Ar=(0,ae.styled)(\"div\")`\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>De(e,\"N100\")};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`,Vs=(0,ae.styled)(\"div\")`\n display: none;\n`,Es=(0,ae.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`,As=(0,ae.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,zs=(0,ae.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,zr=(0,ae.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`,Br=(0,ae.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\"),eu=({categories:e,categorySort:t,isLoading:o=!1,title:n,summaryChangePct:i,onSortChange:l,onTitleClick:s,onExport:p})=>{let m=Hr.default.useCallback(d=>{let x=d.target.value;l?.(x)},[l]),{sortedCategories:b,totalRevenue:u,trendDirection:h,formattedTrend:C}=Hr.default.useMemo(()=>{let d=[...e].sort((S,N)=>t===\"revenue\"?N.revenue-S.revenue:(Ct(N.trend?.revenue)??-1/0)-(Ct(S.trend?.revenue)??-1/0)),x=d.reduce((S,N)=>S+N.revenue,0),v,k;if(i!=null)Math.abs(i)<.1?(k=\"0%\",v=\"neutral\"):(v=i>0?\"up\":\"down\",k=`${i>0?\"+\":\"\"}${i.toFixed(1)}%`);else{let{direction:S,formatted:N}=Jt(d,A=>A.revenue,A=>A.trend?.revenue);v=S,k=N}return{sortedCategories:d,totalRevenue:x,trendDirection:v,formattedTrend:k}},[e,t,i]),g=d=>d===\"up\"?(0,H.jsx)(Bs.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):d===\"down\"?(0,H.jsx)(Hs.default,{sx:{fontSize:\"14px\"},\"aria-hidden\":\"true\"}):null,D=d=>{let{cx:x,cy:v,midAngle:k,innerRadius:S,outerRadius:N,percentage:A}=d,J=Math.PI/180,Y=S+(N-S)/2,Z=x+Y*Math.cos(-k*J),V=v+Y*Math.sin(-k*J);return(0,H.jsx)(\"text\",{x:Z,y:V,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"central\",fontSize:\"10\",fontWeight:\"600\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0.2\",style:{lineHeight:\"12px\"},children:`${A}%`})},F=b[0]?.currencyCode;return o&&e.length===0?(0,H.jsx)(Zt,{\"data-testid\":\"widget-top-categories\",children:(0,H.jsx)(br,{})}):e.length===0?(0,H.jsxs)(Zt,{\"data-testid\":\"widget-top-categories\",children:[(0,H.jsx)(ko,{children:(0,H.jsx)(So,{children:n??a(r.widget.topCategories.title)})}),(0,H.jsx)(zr,{\"data-testid\":\"categories-empty-state\",children:(0,H.jsx)(Br,{children:a(r.widget.topCategories.empty)})})]}):(0,H.jsxs)(Zt,{as:\"section\",\"data-testid\":\"widget-top-categories\",\"aria-label\":a(r.widget.topCategories.chartAriaLabel),children:[(0,H.jsxs)(ko,{children:[(0,H.jsx)(So,{as:\"button\",onClick:s,\"aria-label\":a(r.widget.topCategories.titleAriaLabel),\"data-testid\":\"widget-title-top-categories\",children:n??a(r.widget.topCategories.title)}),(0,H.jsxs)(Tr,{children:[(0,H.jsxs)(Dr,{id:\"category-sort\",\"data-testid\":\"category-sort-dropdown\",value:t,onChange:m,disabled:o,\"aria-label\":a(r.widget.topCategories.sortAriaLabel),children:[(0,H.jsx)(\"option\",{value:\"revenue\",children:a(r.defaults.byRevenue)}),(0,H.jsx)(\"option\",{value:\"trend\",children:a(r.defaults.byTrend)})]}),(0,H.jsx)(at,{widgetId:\"top-categories\",onFullView:s,onExport:p})]})]}),(0,H.jsxs)(Pr,{children:[(0,H.jsxs)(Rr,{\"data-testid\":\"categories-chart\",children:[(0,H.jsx)(kt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,H.jsxs)(kt.PieChart,{children:[(0,H.jsx)(kt.Pie,{data:b,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:D,labelLine:!1,children:b.map(d=>(0,H.jsx)(kt.Cell,{fill:d.color},`cell-${d.id}`))}),(0,H.jsx)(kt.Tooltip,{formatter:d=>Q(d,F)})]})}),(0,H.jsxs)(Mr,{\"data-testid\":\"categories-donut-center\",children:[(0,H.jsx)(Or,{children:a(r.stats.revenue)}),(0,H.jsx)(Fr,{children:Q(u,F)}),(0,H.jsxs)(Lr,{direction:h,children:[g(h),(0,H.jsx)(\"span\",{children:C})]})]})]}),(0,H.jsx)(Ir,{\"data-testid\":\"categories-legend-container\",children:b.map((d,x)=>(0,H.jsxs)($r,{\"data-testid\":`category-legend-${x}`,children:[(0,H.jsx)(Nr,{color:d.color}),(0,H.jsxs)(Vr,{children:[(0,H.jsx)(Er,{children:d.name.charAt(0).toUpperCase()+d.name.slice(1)}),(0,H.jsxs)(Es,{children:[(0,H.jsxs)(Ar,{children:[Q(d.revenue,d.currencyCode),\" (\",d.percentage,\"%)\"]}),d.trend?.revenue?(0,H.jsx)(As,{direction:Yt(d.trend?.revenue),\"data-testid\":`category-legend-trend-${x}`,\"aria-label\":d.trend.revenue,children:g(Yt(d.trend?.revenue))}):null]})]})]},d.id))})]})]})},Ko=Hr.default.memo(eu);Ko.displayName=\"TopCategoriesPieChart\";var Pe=require(\"react/jsx-runtime\"),tu=[],ou=[],ru=[],au=[],Wr=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,isLoading:l=!1,error:s,shopTitle:p,className:m,dateRange:b=\"last30days\",market:u=\"all\",productSort:h=\"units\",signupView:C=\"all\",conversionFilter:g=\"all\",categorySort:D=\"revenue\",categoriesSummaryChangePct:F,markets:d,onDateRangeChange:x,onMarketChange:v,onProductSortChange:k,onSignupViewChange:S,onConversionFilterChange:N,onCategorySortChange:A,onProductsTitleClick:J,onConversionTitleClick:Y,onSignupsTitleClick:Z,onCategoriesToTitleClick:V,onProductsExport:c,onConversionExport:w,onSignupsExport:T,onCategoriesExport:f})=>{let y=t??tu,L=o??ou,re=n??ru,de=i??au;if(s)return(0,Pe.jsx)(Oa,{as:\"main\",className:m,\"aria-label\":a(r.ariaLabel.dashboard),children:(0,Pe.jsxs)($i,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Pe.jsxs)(\"strong\",{children:[a(r.error),\":\"]}),\" \",s]})});let ie=xe=>xe?xe.startsWith(\"+\")?\"up\":xe.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return(0,Pe.jsxs)(Oa,{as:\"main\",className:m,\"data-testid\":\"shopping-dashboard\",\"aria-label\":a(r.ariaLabel.dashboard),\"aria-busy\":l,children:[(0,Pe.jsx)(xo,{shopTitle:p,dateRange:b,market:u,isLoading:l,stats:e,markets:d,onDateRangeChange:x,onMarketChange:v}),(0,Pe.jsxs)(Li,{as:\"section\",\"data-testid\":\"stats-row\",\"aria-label\":a(r.ariaLabel.statsRow),children:[(0,Pe.jsx)(wt,{title:a(r.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:ie(e?.trend?.revenue),trendValue:e?.trend?.revenue,testId:\"stats-card-revenue\",isLoading:l}),(0,Pe.jsx)(wt,{title:a(r.defaults.volume),value:e?.metrics?.volume??\"0\",subtitle:a(r.defaults.dcSv),trendDirection:ie(e?.trend?.volume),trendValue:e?.trend?.volume,testId:\"stats-card-volume\",isLoading:l}),(0,Pe.jsx)(wt,{title:a(r.stats.visits),value:e?.metrics?.siteVisits??\"0\",subtitle:`${e?.metrics?.conversionRate??\"0%\"} ${a(r.defaults.conversionRate)}`,trendDirection:ie(e?.trend?.siteVisits),trendValue:e?.trend?.siteVisits,testId:\"stats-card-visits\",isLoading:l})]}),(0,Pe.jsxs)(Ii,{\"data-testid\":\"widget-container\",children:[(0,Pe.jsxs)(Fa,{\"data-testid\":\"widget-row-1\",children:[(0,Pe.jsx)(no,{products:y,productSort:h,isLoading:l,maxProducts:5,onSortChange:k,onTitleClick:J,onExport:c}),(0,Pe.jsx)(Uo,{signupData:re,signupView:C,isLoading:l,onViewChange:S,onTitleClick:Z,onExport:T})]}),(0,Pe.jsxs)(Fa,{\"data-testid\":\"widget-row-2\",children:[(0,Pe.jsx)(io,{conversionData:L,conversionFilter:g,isLoading:l,onFilterChange:N,onTitleClick:Y,onExport:w}),(0,Pe.jsx)(Ko,{categories:de,categorySort:D,isLoading:l,summaryChangePct:F,onSortChange:A,onTitleClick:V,onExport:f})]})]})]})};var se=M(require(\"react\"));var st=M(require(\"react\"));var od=M(require(\"@mui/icons-material/ArrowBack\")),rd=M(require(\"@mui/icons-material/CalendarToday\")),ad=M(require(\"@mui/icons-material/Language\"));var Ne=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Xe}=Ne.ColorUtils,Ws=(0,Ne.styled)(\"div\")`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`,_s=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n`,Us=(0,Ne.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})=>Xe(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})=>Xe(e,\"N100\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Xe(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`,Ks=(0,Ne.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})=>Xe(e,\"N30\")};\n gap: 24px;\n\n @media (max-width: 767px) {\n align-items: flex-end;\n gap: 16px;\n }\n`,Gs=(0,Ne.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`,js=(0,Ne.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Xe(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,Ys=(0,Ne.styled)(\"p\")`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Xe(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n`,Js=(0,Ne.styled)(\"p\")`\n display: none;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n color: ${({theme:e})=>Xe(e,\"N100\")};\n margin: 0;\n white-space: nowrap;\n\n @media (max-width: 767px) {\n display: block;\n flex-shrink: 0;\n }\n`,Zs=(0,Ne.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`,qs=(0,Ne.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,Xs=(0,Ne.styled)(\"span\")`\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({theme:e})=>Xe(e,\"N70\")};\n\n svg {\n font-size: 16px;\n }\n`,Qs=(0,Ne.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})=>Xe(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})=>Xe(e,\"N20\")};\n border-radius: 4px;\n }\n\n &:focus {\n background-color: ${({theme:e})=>Xe(e,\"N20\")};\n border-radius: 4px;\n outline: 2px solid ${({theme:e})=>Xe(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`,ed=(0,Ne.styled)(\"div\")`\n display: none;\n\n @media (max-width: 767px) {\n display: block;\n margin-bottom: 16px;\n }\n`,td=(0,Ne.styled)(\"h1\")`\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n color: ${({theme:e})=>Xe(e,\"N100\")};\n margin: 0;\n`;var he=require(\"react/jsx-runtime\");function St(e,t){return{key:\"dateRange\",label:a(t.filter.dateRange.label),value:e,icon:\"calendar\",options:[{value:\"last7days\",label:a(t.filter.dateRange.last7days)},{value:\"last30days\",label:a(t.filter.dateRange.last30days)},{value:\"last90days\",label:a(t.filter.dateRange.last90days)},{value:\"thisMonth\",label:a(t.filter.dateRange.thisMonth)}]}}function Tt(e,t,o){return{key:\"market\",label:a(o.filter.market.label),value:e,icon:\"globe\",options:t.map(n=>({value:n.value,label:n.label}))}}var be=({title:e,dateRange:t,onBack:o,filters:n,onFilterChange:i})=>{let l=s=>s?(0,he.jsxs)(Xs,{children:[s===\"calendar\"&&(0,he.jsx)(rd.default,{}),s===\"globe\"&&(0,he.jsx)(ad.default,{})]}):null;return(0,he.jsxs)(Ws,{\"data-testid\":\"page-header\",children:[(0,he.jsx)(_s,{children:(0,he.jsxs)(Us,{onClick:o,\"aria-label\":a(r.navigation.backAriaLabel),\"data-testid\":\"page-back-button\",type:\"button\",children:[(0,he.jsx)(od.default,{}),(0,he.jsx)(\"span\",{children:a(r.navigation.backToDashboard)})]})}),(0,he.jsx)(ed,{children:(0,he.jsx)(td,{children:e})}),(0,he.jsxs)(Ks,{children:[(0,he.jsxs)(Gs,{children:[(0,he.jsx)(js,{\"data-testid\":\"page-header-title\",children:e}),(0,he.jsx)(Ys,{\"data-testid\":\"page-header-date-range\",children:t})]}),n&&n.length>0&&i&&(0,he.jsx)(Zs,{\"data-testid\":\"page-header-filters\",children:n.map(s=>(0,he.jsxs)(qs,{children:[l(s.icon),(0,he.jsx)(Qs,{id:`filter-${s.key}`,value:s.value,onChange:p=>i(s.key,p.target.value),disabled:s.disabled,\"aria-label\":`${s.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${s.key}`,children:s.options.map(p=>(0,he.jsx)(\"option\",{value:p.value,children:s.label&&s.key===\"customerType\"?`${s.label} ${p.label}`:p.label},p.value))})]},s.key))}),(0,he.jsx)(Js,{children:t})]})]})};var ud=M(require(\"@mui/icons-material/ArrowUpward\")),gd=M(require(\"@mui/icons-material/ArrowDownward\"));var nt=require(\"@nuskin/foundation-theme\"),{getGenomeColor:Dt}=nt.ColorUtils,nd=(0,nt.styled)(\"div\")`\n width: 100%;\n overflow-x: auto;\n border-radius: 8px;\n border: 1px solid ${({theme:e})=>Dt(e,\"N30\")};\n`,id=(0,nt.styled)(\"table\")`\n width: 100%;\n border-collapse: collapse;\n`,ld=(0,nt.styled)(\"thead\")`\n background-color: ${({theme:e})=>Dt(e,\"N20\")};\n border-bottom: 2px solid ${({theme:e})=>Dt(e,\"N40\")};\n`,sd=(0,nt.styled)(\"th\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({theme:e})=>Dt(e,\"N20\")};\n color: ${({theme:e})=>Dt(e,\"N70\")};\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})=>Dt(e,\"N20\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>Dt(e,\"A70\")};\n outline-offset: -2px;\n }\n`,dd=(0,nt.styled)(\"tbody\")``,on=(0,nt.styled)(\"tr\")`\n border-bottom: 1px solid ${({theme:e})=>Dt(e,\"N30\")};\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>Dt(e,\"N20\")};\n }\n\n &:last-child {\n border-bottom: none;\n }\n`,rn=(0,nt.styled)(\"td\")`\n padding: 12px 16px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>Dt(e,\"N70\")};\n text-align: left;\n`,pd=(0,nt.styled)(rn)`\n text-align: center;\n`,cd=(0,nt.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 Ue=require(\"react/jsx-runtime\"),it=({columns:e,data:t,sortable:o=!1,onSort:n,sortColumn:i,sortDirection:l=\"asc\",getRowKey:s})=>{let p=u=>{if(!o||!n)return;n(u,i===u&&l===\"asc\"?\"desc\":\"asc\")},m=(u,h)=>{(u.key===\"Enter\"||u.key===\" \")&&(u.preventDefault(),p(h))},b=u=>{if(i===u)return l===\"asc\"?\"ascending\":\"descending\"};return(0,Ue.jsx)(nd,{\"data-testid\":\"data-table\",children:(0,Ue.jsxs)(id,{children:[(0,Ue.jsx)(ld,{children:(0,Ue.jsx)(\"tr\",{children:e.map(u=>(0,Ue.jsxs)(sd,{scope:\"col\",sortable:o&&u.sortable,onClick:()=>u.sortable&&p(u.key),onKeyDown:h=>u.sortable&&m(h,u.key),tabIndex:o&&u.sortable?0:-1,\"aria-sort\":b(u.key),\"aria-label\":`${u.label}${u.sortable?a(r.dataTable.sortableColumn):\"\"}`,\"data-testid\":`table-header-${u.key}`,children:[u.label,o&&u.sortable&&(0,Ue.jsx)(cd,{isActive:i===u.key,children:i===u.key&&l===\"desc\"?(0,Ue.jsx)(gd.default,{}):(0,Ue.jsx)(ud.default,{})})]},u.key))})}),(0,Ue.jsx)(dd,{children:t.length===0?(0,Ue.jsx)(on,{\"data-testid\":\"table-empty-row\",children:(0,Ue.jsx)(pd,{colSpan:e.length,children:a(r.dataTable.noDataAvailable)})}):t.map((u,h)=>(0,Ue.jsx)(on,{\"data-testid\":`table-row-${h}`,children:e.map(C=>(0,Ue.jsx)(rn,{\"data-testid\":`table-cell-${C.key}`,children:C.render?C.render(u[C.key],u):u[C.key]},C.key))},s?s(u,h):h))})]})})};var md=M(require(\"@mui/icons-material/ChevronLeft\")),hd=M(require(\"@mui/icons-material/ChevronRight\"));var lo=require(\"@nuskin/foundation-theme\"),{getGenomeColor:ft}=lo.ColorUtils,fd=(0,lo.styled)(\"div\")`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 24px;\n`,_r=(0,lo.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e,isActive:t})=>t?ft(e,\"A80\"):ft(e,\"N20\")};\n color: ${({theme:e,isActive:t})=>t?\"#ffffff\":ft(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?ft(e,\"A70\"):ft(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ft(e,\"A70\")};\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n`,Ur=(0,lo.styled)(\"span\")`\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>ft(e,\"N70\")};\n margin: 0 8px;\n`,an=(0,lo.styled)(\"button\")`\n width: 32px;\n height: 32px;\n border-radius: 4px;\n border: none;\n background-color: ${({theme:e})=>ft(e,\"N20\")};\n color: ${({theme:e})=>ft(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})=>ft(e,\"N30\")};\n }\n\n &:focus {\n outline: 2px solid ${({theme:e})=>ft(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 Re=require(\"react/jsx-runtime\"),lt=({currentPage:e,totalPages:t,onPageChange:o,itemsPerPage:n,totalItems:i})=>{let l=()=>{e>1&&o(e-1)},s=()=>{e<t&&o(e+1)},p=(g,D)=>{(g.key===\"Enter\"||g.key===\" \")&&(g.preventDefault(),D())},b=(()=>{if(t<=7)return Array.from({length:t},(D,F)=>F+1);let g=[];return e<=4?g.push(1,2,3,4,5):e>=t-3?g.push(t-4,t-3,t-2,t-1,t):g.push(e-1,e,e+1),g})(),u=n?(e-1)*n+1:null,h=n?Math.min(e*n,i??1/0):null,C=a(r.pagination.goToPage);return(0,Re.jsxs)(fd,{\"data-testid\":\"pagination\",children:[(0,Re.jsx)(an,{onClick:l,onKeyDown:g=>p(g,l),disabled:e===1,\"aria-label\":a(r.pagination.previousPage),\"data-testid\":\"pagination-previous\",type:\"button\",children:(0,Re.jsx)(md.default,{})}),t>7&&e>4&&(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(_r,{onClick:()=>o(1),isActive:!1,\"aria-label\":`${C} 1`,\"data-testid\":\"pagination-page-1\",type:\"button\",children:\"1\"}),(0,Re.jsx)(Ur,{children:\"...\"})]}),b.map(g=>(0,Re.jsx)(_r,{onClick:()=>o(g),isActive:e===g,\"aria-label\":`${C} ${g}`,\"aria-current\":e===g?\"page\":void 0,\"data-testid\":`pagination-page-${g}`,type:\"button\",children:g},g)),t>7&&e<t-3&&(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ur,{children:\"...\"}),(0,Re.jsx)(_r,{onClick:()=>o(t),isActive:!1,\"aria-label\":`${C} ${t}`,\"data-testid\":`pagination-page-${t}`,type:\"button\",children:t})]}),(0,Re.jsx)(an,{onClick:s,onKeyDown:g=>p(g,s),disabled:e===t,\"aria-label\":a(r.pagination.nextPage),\"data-testid\":\"pagination-next\",type:\"button\",children:(0,Re.jsx)(hd.default,{})}),n&&i&&(0,Re.jsxs)(Ur,{as:\"output\",\"aria-live\":\"polite\",\"data-testid\":\"pagination-page-info\",children:[u,\"-\",h,\" \",a(r.pagination.of),\" \",i]})]})};var Ve=require(\"@mui/material/styles\"),Ee=require(\"@mui/material\"),xd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:bd}=xd.ColorUtils,Me=(0,Ve.styled)(Ee.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\n gap: 16px;\n }\n`,Kr=(0,Ve.styled)(Ee.Box)`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>bd(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`,Gr=(0,Ve.styled)(Ee.Box)`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`,jr=(0,Ve.styled)(Ee.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({theme:e})=>e.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`,Yr=(0,Ve.styled)(Ee.Box)`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\n color: ${({theme:e,direction:t})=>t===\"up\"?e.palette.success.main:t===\"down\"?e.palette.error.main:e.palette.text.secondary};\n flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`,hm=(0,Ve.styled)(Ee.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\n }\n`,Jr=(0,Ve.styled)(Ee.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`,qt=(0,Ve.styled)(\"h2\")`\n margin: 0;\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`,xm=(0,Ve.styled)(Ee.Box)`\n width: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`,Xt=(0,Ve.styled)(Ee.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n\n ${({withCard:e=!0,theme:t})=>e&&`\n padding: 20px;\n background-color: ${bd(t,\"N20\")};\n border-radius: 8px;\n box-shadow: ${t.shadows[1]};\n\n @media (max-width: 767px) {\n padding: 16px;\n }\n `}\n`,bm=(0,Ve.styled)(Ee.Box)`\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 400px;\n`,Qt=(0,Ve.styled)(Ee.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`,yd=(0,Ve.styled)(Ee.Typography)`\n font-weight: 600;\n font-size: 14px;\n`,wd=(0,Ve.styled)(Ee.Typography)`\n font-size: 13px;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Cd=(0,Ve.styled)(Ee.Typography)`\n font-size: 13px;\n`,vd=(0,Ve.styled)(Ee.Typography)`\n font-size: 13px;\n color: ${({theme:e,status:t})=>t===\"Active\"?e.palette.success.main:e.palette.warning.main};\n`;var Ae=require(\"@mui/material/styles\"),Oe=require(\"@mui/material\"),kd=require(\"@nuskin/foundation-theme\"),{getGenomeColor:nn}=kd.ColorUtils,Sd=(0,Ae.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n`,Td=(0,Ae.styled)(Oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,Dd=(0,Ae.styled)(Oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Zr=(0,Ae.styled)(Oe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>nn(e,\"N70\")};\n`,Pd=(0,Ae.styled)(Oe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Rd=(0,Ae.styled)(Oe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Md=(0,Ae.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>nn(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,Od=(0,Ae.styled)(Oe.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n`,Fd=(0,Ae.styled)(Oe.Typography)`\n font-size: 1rem;\n font-weight: 700;\n color: ${({theme:e})=>e.palette.primary.main};\n min-width: 24px;\n`,Ld=(0,Ae.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Id=(0,Ae.styled)(Oe.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n`,$d=(0,Ae.styled)(Oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Nd=(0,Ae.styled)(Oe.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,qr=(0,Ae.styled)(Oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,Xr=(0,Ae.styled)(Oe.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,Qr=(0,Ae.styled)(Oe.Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({theme:e})=>nn(e,\"N70\")};\n`;var Vd=M(require(\"@mui/material/useMediaQuery\")),nu=\"(max-width:767px)\";function Pt(){return(0,Vd.default)(nu,{noSsr:!0})}var _=require(\"react/jsx-runtime\");function iu(e){return{rank:e.rank,name:e.name,sku:`${a(r.fullView.products.skuPrefix)}-${e.id.replace(\"prod-\",\"\").padStart(3,\"0\")}`,units:e.unitsSold,revenue:e.revenue,volume:e.volume}}var To=({products:e,dateRange:t,market:o,productSort:n,markets:i,isLoading:l=!1,onBack:s,onDateRangeChange:p,onMarketChange:m,onProductSortChange:b})=>{let[u,h]=(0,st.useState)(1),[C,g]=(0,st.useState)(n===\"revenue\"?\"revenue\":\"units\"),[D,F]=(0,st.useState)(\"desc\"),d=10,x=Pt(),v=st.default.useCallback(()=>s?.(),[s]),k=ot(i),S=st.default.useMemo(()=>[St(t,r),Tt(o,k,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"units\",label:a(r.defaults.units)},{value:\"revenue\",label:a(r.defaults.revenue)},{value:\"volume\",label:a(r.defaults.volume)}]}],[t,o,k,n]),N=st.default.useCallback((T,f)=>{T===\"dateRange\"?p?.(f):T===\"market\"?m?.(f):T===\"sort\"&&(b?.(f),h(1))},[p,m,b]),A=st.default.useCallback((T,f)=>{g(T),F(f),h(1)},[]),J=st.default.useMemo(()=>e.map(iu),[e]),Y=st.default.useMemo(()=>[...J].sort((T,f)=>{let y=T[C],L=f[C];return D===\"asc\"?y-L:L-y}),[J,C,D]),{totalPages:Z,pageItems:V}=vt(Y,u,d),c=e[0]?.currencyCode,w=st.default.useMemo(()=>[{key:\"rank\",label:a(r.fullView.products.columns.rank),sortable:!0},{key:\"name\",label:a(r.fullView.products.columns.product),sortable:!0,render:(T,f)=>(0,_.jsxs)(Sd,{children:[(0,_.jsx)(Td,{children:f.name}),(0,_.jsx)(Dd,{children:f.sku})]})},{key:\"units\",label:a(r.fullView.products.columns.unitsSold),sortable:!0,render:T=>(0,_.jsx)(Zr,{children:Number(T).toLocaleString()})},{key:\"revenue\",label:a(r.defaults.revenue),sortable:!0,render:T=>(0,_.jsx)(Zr,{children:Q(Number(T),c)})},{key:\"volume\",label:a(r.fullView.products.columns.volume),sortable:!0,render:T=>(0,_.jsx)(Zr,{children:Number(T).toLocaleString()})}],[c]);return l?(0,_.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,_.jsx)(be,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:v,filters:S,onFilterChange:N}),(0,_.jsx)(Sl,{})]}):e.length===0?(0,_.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,_.jsx)(be,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:v,filters:S,onFilterChange:N}),(0,_.jsx)(Qt,{\"data-testid\":\"products-fullview-empty\",children:a(r.fullView.products.noProducts)})]}):(0,_.jsxs)(Me,{\"data-testid\":\"products-full-view\",children:[(0,_.jsx)(be,{title:a(r.widget.topProducts.title),dateRange:Te(t),onBack:v,filters:S,onFilterChange:N}),x?(0,_.jsx)(Pd,{\"data-testid\":\"products-fullview-mobile-cards\",children:V.map(T=>(0,_.jsxs)(Md,{children:[(0,_.jsxs)(Od,{children:[(0,_.jsxs)(Fd,{children:[\"#\",T.rank]}),(0,_.jsxs)(Ld,{children:[(0,_.jsx)(Id,{children:T.name}),(0,_.jsx)($d,{children:T.sku})]})]}),(0,_.jsxs)(Nd,{children:[(0,_.jsxs)(qr,{children:[(0,_.jsx)(Xr,{children:a(r.defaults.units)}),(0,_.jsx)(Qr,{children:T.units.toLocaleString()})]}),(0,_.jsxs)(qr,{children:[(0,_.jsx)(Xr,{children:a(r.defaults.revenue)}),(0,_.jsx)(Qr,{children:Q(T.revenue,c)})]}),(0,_.jsxs)(qr,{children:[(0,_.jsx)(Xr,{children:a(r.defaults.volume)}),(0,_.jsx)(Qr,{children:T.volume.toLocaleString()})]})]})]},T.rank))}):(0,_.jsx)(Rd,{\"data-testid\":\"products-fullview-desktop-table\",children:(0,_.jsx)(it,{columns:w,data:V,sortable:!0,onSort:A,sortColumn:C,sortDirection:D,getRowKey:T=>T.rank})}),Z>1&&(0,_.jsx)(lt,{currentPage:u,totalPages:Z,onPageChange:h,itemsPerPage:d,totalItems:Y.length})]})};var Qe=M(require(\"react\")),Ze=require(\"recharts\"),Xd=M(require(\"@mui/icons-material/ArrowUpward\")),Qd=M(require(\"@mui/icons-material/ArrowDownward\"));var Ce=require(\"@mui/material/styles\"),Fe=require(\"@mui/material\"),Ed=require(\"@nuskin/foundation-theme\"),{getGenomeColor:lu}=Ed.ColorUtils,Ad=(0,Ce.styled)(Fe.Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,zd=(0,Ce.styled)(Fe.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})=>lu(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,Bd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n`,Hd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n`,Wd=(0,Ce.styled)(Fe.Typography)`\n font-size: 1rem;\n font-weight: 600;\n`,_d=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,Ud=(0,Ce.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`,Kd=(0,Ce.styled)(Fe.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`,ea=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n text-align: center;\n`,ta=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,oa=(0,Ce.styled)(Fe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Gd=(0,Ce.styled)(Fe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,jd=(0,Ce.styled)(Fe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Yd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Jd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,Zd=(0,Ce.styled)(Fe.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,$m=(0,Ce.styled)(Fe.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`,qd=(0,Ce.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var $=require(\"react/jsx-runtime\"),Do=({conversionData:e,orders:t,summaryRate:o,summaryChangePct:n,dateRange:i,market:l,conversionFilter:s,markets:p,isLoading:m=!1,onBack:b,onDateRangeChange:u,onMarketChange:h,onConversionFilterChange:C})=>{let[g,D]=(0,Qe.useState)(1),F=10,d=Pt(),x=Qe.default.useCallback(()=>b?.(),[b]),v=ot(p),k=Qe.default.useMemo(()=>typeof o==\"number\"&&Number.isFinite(o)?o:e.at(-1)?.rate??0,[o,e]),S=Qe.default.useMemo(()=>{if(n!==void 0){if(n===null)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let de=\"neutral\";return n>0?de=\"up\":n<0&&(de=\"down\"),{direction:de,value:`${n>=0?\"+\":\"\"}${n.toFixed(1)}%`}}if(e.length<2)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let f=e.at(-1)?.rate??0,y=e[0].rate;if(y===0)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let L=(f-y)/y*100;if(Math.abs(L)<.1)return{direction:\"neutral\",value:a(r.defaults.zeroTrend)};let re=\"neutral\";return L>0?re=\"up\":L<0&&(re=\"down\"),{direction:re,value:`${L>=0?\"+\":\"\"}${L.toFixed(1)}%`}},[n,e]),N=Qe.default.useCallback(f=>f===\"standard\"?a(r.filter.conversionType.standard):f===\"subscription\"?a(r.filter.conversionType.subscription):a(r.defaults.all),[]),A=Qe.default.useMemo(()=>N(s),[s,N]),J=Qe.default.useMemo(()=>[St(i,r),Tt(l,v,r),{key:\"customerType\",label:a(r.filter.signupView.label),value:s,options:[{value:\"all\",label:a(r.defaults.all)},{value:\"standard\",label:a(r.filter.conversionType.standard)},{value:\"subscription\",label:a(r.filter.conversionType.subscription)}]}],[s,i,l,v]),Y=Qe.default.useCallback((f,y)=>{f===\"dateRange\"?u?.(y):f===\"market\"?h?.(y):f===\"customerType\"&&(C?.(y),D(1))},[C,u,h]),Z=Qe.default.useMemo(()=>s===\"all\"?t:t.filter(f=>f.customerType.toLowerCase()===s),[t,s]),{totalPages:V,pageItems:c}=vt(Z,g,F),w=Qe.default.useMemo(()=>[{key:\"orderId\",label:a(r.fullView.conversionRate.columns.orderId),sortable:!0,render:f=>(0,$.jsx)(qd,{children:f})},{key:\"date\",label:a(r.defaults.date),sortable:!0},{key:\"customerName\",label:a(r.fullView.conversionRate.columns.customer),sortable:!0},{key:\"customerType\",label:a(r.defaults.type),sortable:!0},{key:\"items\",label:a(r.fullView.conversionRate.columns.items),sortable:!0},{key:\"total\",label:a(r.fullView.conversionRate.columns.total),sortable:!0,render:(f,y)=>Q(Number(f),y.currencyCode,void 0,2)},{key:\"bv\",label:a(r.fullView.conversionRate.columns.bv),sortable:!0}],[]),T=Qe.default.useCallback(()=>s===\"standard\"?\"#2e7d32\":s===\"subscription\"?\"#ed6c02\":\"#1976d2\",[s]);return m?(0,$.jsxs)(Me,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(be,{title:a(r.defaults.conversionRate),dateRange:Te(i),onBack:x,filters:J,onFilterChange:Y}),(0,$.jsx)(jt,{})]}):(0,$.jsxs)(Me,{\"data-testid\":\"conversion-rate-full-view\",children:[(0,$.jsx)(be,{title:a(r.defaults.conversionRate),dateRange:Te(i),onBack:x,filters:J,onFilterChange:Y}),(0,$.jsxs)(Kr,{\"data-testid\":\"conversion-fullview-metric-chart\",children:[(0,$.jsx)(Gr,{children:(0,$.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"0px\",flexWrap:\"wrap\"},children:[(0,$.jsxs)(jr,{\"data-testid\":\"conversion-rate-value\",style:{marginRight:\"6px\"},children:[k.toFixed(1),\"%\"]}),(0,$.jsxs)(Yr,{direction:S.direction,\"data-testid\":\"conversion-rate-trend\",children:[S.direction===\"up\"&&(0,$.jsx)(Xd.default,{}),S.direction===\"down\"&&(0,$.jsx)(Qd.default,{}),(0,$.jsx)(\"span\",{style:{fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:600,fontSize:\"14px\",lineHeight:\"20px\",letterSpacing:\"0em\"},children:S.value}),(0,$.jsx)(\"span\",{style:{marginLeft:\"2px\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",fontWeight:400,fontSize:\"12px\",lineHeight:\"16px\",letterSpacing:\"0.01em\",color:\"#5F5F5F\"},children:\"compared to this time last month\"})]})]})}),(0,$.jsx)(Jr,{children:(0,$.jsxs)(Yd,{children:[(0,$.jsx)(Ad,{\"data-testid\":\"conversion-fullview-chart\",children:(0,$.jsx)(Ze.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,$.jsxs)(Ze.LineChart,{data:e,margin:{top:10,right:10,left:0,bottom:0},children:[(0,$.jsx)(Ze.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,$.jsx)(Ze.XAxis,{dataKey:\"date\"}),(0,$.jsx)(Ze.YAxis,{tickFormatter:f=>`${f}%`,domain:[0,\"auto\"]}),(0,$.jsx)(Ze.Tooltip,{formatter:f=>typeof f==\"number\"?`${f.toFixed(2)}%`:typeof f==\"string\"?f:a(r.fullView.conversionRate.notAvailable)}),(0,$.jsx)(Ze.Line,{type:\"monotone\",dataKey:\"rate\",stroke:T(),strokeWidth:2,name:`${a(r.defaults.conversionRate)} (${A})`,dot:!1})]})})}),(0,$.jsx)(Jd,{children:(0,$.jsx)(Zd,{style:{color:T()},children:`${a(r.defaults.conversionRate)} (${A})`})})]})})]}),(0,$.jsxs)(Xt,{\"data-testid\":\"conversion-fullview-table-section\",children:[(0,$.jsxs)(qt,{\"data-testid\":\"conversion-fullview-table-title\",children:[a(r.fullView.conversionRate.orderDetailsTitle),\" (\",Z.length,\")\"]}),d?(0,$.jsx)(Gd,{\"data-testid\":\"conversion-fullview-mobile-orders\",children:c.map(f=>(0,$.jsxs)(zd,{children:[(0,$.jsxs)(Bd,{children:[(0,$.jsxs)(Hd,{children:[(0,$.jsx)(Wd,{children:f.customerName}),(0,$.jsx)(_d,{children:f.date})]}),(0,$.jsx)(Ud,{children:f.orderId})]}),(0,$.jsxs)(Kd,{children:[(0,$.jsxs)(ea,{children:[(0,$.jsx)(ta,{children:a(r.fullView.conversionRate.columns.items)}),(0,$.jsx)(oa,{children:f.items})]}),(0,$.jsxs)(ea,{children:[(0,$.jsx)(ta,{children:a(r.fullView.conversionRate.columns.total)}),(0,$.jsxs)(oa,{children:[\"$\",f.total.toFixed(2)]})]}),(0,$.jsxs)(ea,{children:[(0,$.jsx)(ta,{children:a(r.fullView.conversionRate.columns.totalSv)}),(0,$.jsx)(oa,{children:f.bv})]})]})]},f.orderId))}):(0,$.jsx)(jd,{\"data-testid\":\"conversion-fullview-desktop-table\",children:(0,$.jsx)(it,{columns:w,data:c,getRowKey:f=>f.orderId})}),V>1&&(0,$.jsx)(lt,{currentPage:g,totalPages:V,onPageChange:D,itemsPerPage:F,totalItems:Z.length})]})]})};var Ot=M(require(\"react\")),sp=require(\"@mui/material\"),ye=require(\"recharts\"),dp=M(require(\"@mui/icons-material/TrendingUp\")),pp=M(require(\"@mui/icons-material/TrendingDown\"));var Rt=require(\"@mui/material/styles\"),Mt=require(\"@mui/material\"),ep=require(\"@nuskin/foundation-theme\"),{getGenomeColor:su}=ep.ColorUtils,tp=(0,Rt.styled)(Mt.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,op=(0,Rt.styled)(Mt.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,rp=(0,Rt.styled)(Mt.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})=>su(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n }\n`,ap=(0,Rt.styled)(Mt.Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`,np=(0,Rt.styled)(Mt.Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n`,ip=(0,Rt.styled)(Mt.Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`,Go=(0,Rt.styled)(Mt.Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`,eo=(0,Rt.styled)(Mt.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({theme:e})=>e.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`,lp=(0,Rt.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var R=require(\"react/jsx-runtime\"),qe={total:\"#3B82F6\",members:\"#7B92A8\",retail:\"#A3B5C7\",brandAffiliates:\"#5F7388\"};function to(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}function du(e){if(Array.isArray(e))return e;let t=e;return Array.isArray(t.daily)?t.daily.map(o=>({date:String(o.date??\"\"),total:to(o.total),members:to(o.members),retail:to(o.retail),brandAffiliates:to(o.brandAffiliates??o.brandAffiliate??o.brand_affiliates??o.brand_affiliate)})):[]}var ra=({signupData:e,signups:t,dateRange:o,market:n,signupView:i,markets:l,isLoading:s=!1,onBack:p,onDateRangeChange:m,onMarketChange:b,onSignupViewChange:u})=>{let[h,C]=(0,Ot.useState)(1),g=10,D=Pt(),F=Ot.default.useCallback(()=>p?.(),[p]),d=ot(l),x=Ot.default.useMemo(()=>du(e).map(c=>{let w=c,T=to(w.members),f=to(w.retail),y=to(w.brandAffiliates??w.brandAffiliate??w.brand_affiliates??w.brand_affiliate),L=to(w.total??w.all??w.signupTotal??w.value);return{...c,total:L>0?L:T+f+y,members:T,retail:f,brandAffiliates:y}}),[e]),v=Ot.default.useMemo(()=>x.length===0?0:x[x.length-1].total,[x]),k=Ot.default.useMemo(()=>{if(x.length<2)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let V=x[0].total,c=x[x.length-1].total;if(V<=0)return{direction:\"neutral\",absoluteChange:0,percentageChange:a(r.defaults.zeroTrend)};let w=c-V,T=w/V*100,f=\"neutral\";return T>0?f=\"up\":T<0&&(f=\"down\"),{direction:f,absoluteChange:Math.round(w),percentageChange:`${T>=0?\"+\":\"\"}${T.toFixed(1)}%`}},[x,r]),S=x.length>0,N=Ot.default.useMemo(()=>[St(o,r),Tt(n,d,r),{key:\"signupView\",label:a(r.filter.signupView.label),value:i,options:[{value:\"all\",label:a(r.defaults.all)},{value:\"members\",label:a(r.defaults.members)},{value:\"retail\",label:a(r.defaults.retail)},{value:\"brandAffiliates\",label:a(r.defaults.brandAffiliates)}]}],[o,n,d,i]),A=Ot.default.useCallback((V,c)=>{V===\"dateRange\"?m?.(c):V===\"market\"?b?.(c):V===\"signupView\"&&(u?.(c),C(1))},[m,b,u]),{totalPages:J,pageItems:Y}=vt(t,h,g),Z=Ot.default.useMemo(()=>[{key:\"id\",label:a(r.fullView.signups.columns.id),sortable:!0},{key:\"name\",label:a(r.fullView.signups.columns.name),sortable:!0,render:V=>(0,R.jsx)(lp,{children:V})},{key:\"date\",label:a(r.defaults.date),sortable:!0},{key:\"type\",label:a(r.defaults.type),sortable:!0},{key:\"email\",label:a(r.fullView.signups.columns.email),sortable:!0},{key:\"status\",label:a(r.fullView.signups.columns.status),sortable:!0}],[]);return s?(0,R.jsxs)(Me,{\"data-testid\":\"signups-full-view\",children:[(0,R.jsx)(be,{title:a(r.widget.signups.title),dateRange:Te(o),onBack:F,filters:N,onFilterChange:A}),(0,R.jsx)(jt,{})]}):(0,R.jsxs)(Me,{\"data-testid\":\"signups-full-view\",children:[(0,R.jsx)(be,{title:a(r.widget.signups.title),dateRange:Te(o),onBack:F,filters:N,onFilterChange:A}),(0,R.jsxs)(Kr,{\"data-testid\":\"signups-fullview-metric-chart\",children:[(0,R.jsxs)(Gr,{children:[(0,R.jsx)(jr,{\"data-testid\":\"signups-total\",children:v.toLocaleString()}),(0,R.jsxs)(Yr,{direction:k.direction,children:[k.direction===\"up\"&&(0,R.jsx)(dp.default,{}),k.direction===\"down\"&&(0,R.jsx)(pp.default,{}),k.direction!==\"neutral\"&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(\"span\",{style:{fontWeight:600,lineHeight:1},children:[k.absoluteChange>0?\"+\":\"\",k.absoluteChange]}),(0,R.jsx)(\"span\",{style:{fontWeight:400,lineHeight:1},children:k.percentageChange})]}),k.direction===\"neutral\"&&(0,R.jsx)(\"span\",{children:k.percentageChange})]}),(0,R.jsx)(np,{children:a(r.widget.conversionRate.comparison)})]}),(0,R.jsx)(Jr,{children:S?(0,R.jsxs)(ip,{children:[(0,R.jsx)(ap,{\"data-testid\":\"signups-fullview-chart\",children:(0,R.jsx)(ye.ResponsiveContainer,{width:\"100%\",height:\"100%\",minHeight:240,children:(0,R.jsxs)(ye.LineChart,{data:x,children:[(0,R.jsx)(ye.CartesianGrid,{strokeDasharray:\"3 3\"}),(0,R.jsx)(ye.XAxis,{dataKey:\"date\"}),(0,R.jsx)(ye.YAxis,{}),(0,R.jsx)(ye.Tooltip,{}),i===\"all\"&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"total\",stroke:qe.total,strokeWidth:2,name:a(r.widget.signups.total),dot:{r:2},connectNulls:!0}),(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"members\",stroke:qe.members,strokeWidth:2,name:a(r.defaults.members),dot:{r:2},connectNulls:!0}),(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"retail\",stroke:qe.retail,strokeWidth:2,name:a(r.defaults.retail),dot:{r:2},connectNulls:!0}),(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:qe.brandAffiliates,strokeWidth:2,name:a(r.defaults.brandAffiliates),dot:{r:2},connectNulls:!0})]}),i===\"members\"&&(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"members\",stroke:qe.members,strokeWidth:2,name:a(r.defaults.members),dot:{r:2},connectNulls:!0}),i===\"retail\"&&(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"retail\",stroke:qe.retail,strokeWidth:2,name:a(r.defaults.retail),dot:{r:2},connectNulls:!0}),i===\"brandAffiliates\"&&(0,R.jsx)(ye.Line,{type:\"monotone\",dataKey:\"brandAffiliates\",stroke:qe.brandAffiliates,strokeWidth:2,name:a(r.defaults.brandAffiliates),dot:{r:2},connectNulls:!0})]})})}),(0,R.jsxs)(sp.Box,{children:[i===\"all\"&&(0,R.jsxs)(Go,{children:[(0,R.jsx)(eo,{style:{color:qe.total},children:a(r.widget.signups.total)}),(0,R.jsx)(eo,{style:{color:qe.members},children:a(r.defaults.members)}),(0,R.jsx)(eo,{style:{color:qe.retail},children:a(r.defaults.retail)}),(0,R.jsx)(eo,{style:{color:qe.brandAffiliates},children:a(r.defaults.brandAffiliates)})]}),i===\"members\"&&(0,R.jsx)(Go,{children:(0,R.jsx)(eo,{style:{color:qe.members},children:a(r.defaults.members)})}),i===\"retail\"&&(0,R.jsx)(Go,{children:(0,R.jsx)(eo,{style:{color:qe.retail},children:a(r.defaults.retail)})}),i===\"brandAffiliates\"&&(0,R.jsx)(Go,{children:(0,R.jsx)(eo,{style:{color:qe.brandAffiliates},children:a(r.defaults.brandAffiliates)})})]})]}):(0,R.jsx)(Qt,{\"data-testid\":\"signups-fullview-chart-empty\",children:a(r.widget.signups.noTrendData)})})]}),(0,R.jsxs)(Xt,{\"data-testid\":\"signups-fullview-table-section\",children:[(0,R.jsx)(qt,{\"data-testid\":\"signups-fullview-table-title\",children:`${a(r.fullView.signups.detailsTitle)} (${t.length})`}),D?(0,R.jsx)(tp,{\"data-testid\":\"signups-fullview-mobile-cards\",children:Y.map(V=>(0,R.jsxs)(rp,{children:[(0,R.jsx)(yd,{children:V.name}),(0,R.jsxs)(wd,{children:[V.date,\" - \",V.type]}),(0,R.jsx)(Cd,{children:V.email}),(0,R.jsx)(vd,{status:V.status,children:V.status})]},V.id))}):(0,R.jsx)(op,{\"data-testid\":\"signups-fullview-desktop-table\",children:(0,R.jsx)(it,{columns:Z,data:Y,getRowKey:V=>V.id})}),J>1&&(0,R.jsx)(lt,{currentPage:h,totalPages:J,onPageChange:C,itemsPerPage:g,totalItems:t.length})]})]})};var Ft=M(require(\"react\")),Lt=require(\"recharts\"),Fp=M(require(\"@mui/icons-material/TrendingUp\")),Lp=M(require(\"@mui/icons-material/TrendingDown\"));var Ht=require(\"@nuskin/foundation-theme\"),Le=require(\"@mui/material/styles\"),Ie=require(\"@mui/material\"),{getGenomeColor:ln}=Ht.ColorUtils,aa=(0,Ht.styled)(\"div\")`\n display: flex;\n align-items: center;\n gap: 8px;\n`,cp=(0,Ht.styled)(\"div\")`\n flex: 1;\n`,up=(0,Ht.styled)(\"span\")`\n font-weight: 600;\n`,gp=(0,Ht.styled)(\"span\")`\n font-size: 0.875rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,fp=(0,Ht.styled)(\"span\")`\n font-weight: 600;\n`,mp=(0,Le.styled)(Ie.Box)`\n display: flex;\n gap: 32px;\n padding: 24px;\n background-color: ${({theme:e})=>ln(e,\"N20\")};\n border-radius: 8px;\n box-shadow: ${({theme:e})=>e.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`,hp=(0,Le.styled)(Ie.Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 767px) {\n width: 100%;\n height: 220px;\n }\n`,xp=(0,Le.styled)(Ie.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`,bp=(0,Le.styled)(Ie.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,yp=(0,Le.styled)(Ie.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`,wp=(0,Le.styled)(Ie.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\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\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":t.palette.text.secondary};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,Cp=(0,Le.styled)(Ie.Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`,vp=(0,Le.styled)(Ie.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\n\n &:hover {\n background-color: ${({theme:e})=>ln(e,\"N30\")};\n }\n`,na=(0,Le.styled)(Ie.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,lh=(0,Le.styled)(Ie.Box)`\n display: none;\n`,kp=(0,Le.styled)(Ie.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`,Sp=(0,Le.styled)(Ie.Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`,Tp=(0,Le.styled)(Ie.Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({theme:e})=>e.palette.text.primary};\n`,Dp=(0,Le.styled)(Ie.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,Pp=(0,Le.styled)(Ie.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,Rp=(0,Le.styled)(Ie.Box)`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>ln(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,Mp=(0,Le.styled)(\"span\")`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({direction:e})=>e===\"up\"?\"#2e7d32\":e===\"down\"?\"#d32f2f\":\"#757575\"};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`,Op=(0,Ht.styled)(\"span\")`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;var E=require(\"react/jsx-runtime\"),ia=({categories:e,dateRange:t,market:o,categorySort:n,summaryChangePct:i,markets:l,isLoading:s=!1,onBack:p,onDateRangeChange:m,onMarketChange:b,onCategorySortChange:u})=>{let[h,C]=(0,Ft.useState)(1),g=10,D=Pt(),F=Ft.default.useCallback(()=>p?.(),[p]),d=ot(l),x=Ft.default.useMemo(()=>[St(t,r),Tt(o,d,r),{key:\"sort\",label:a(r.filter.productSort.label),value:n,options:[{value:\"revenue\",label:a(r.defaults.byRevenue)},{value:\"trend\",label:a(r.defaults.byTrend)}]}],[n,t,o,d]),v=Ft.default.useCallback((y,L)=>{y===\"dateRange\"?m?.(L):y===\"market\"?b?.(L):y===\"sort\"&&(u?.(L),C(1))},[u,m,b]),k=y=>{let{cx:L,cy:re,midAngle:de,innerRadius:ie,outerRadius:xe,percentage:Vt}=y,ee=Math.PI/180,He=ie+(xe-ie)*.45,dt=L+He*Math.cos(-de*ee),pt=re+He*Math.sin(-de*ee);return(0,E.jsx)(\"text\",{x:dt,y:pt,fill:\"white\",textAnchor:\"middle\",dominantBaseline:\"middle\",fontSize:\"12\",fontWeight:\"700\",fontFamily:\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",letterSpacing:\"0\",style:{lineHeight:\"14px\",pointerEvents:\"none\"},children:`${Vt}%`})},S=y=>y===\"up\"?(0,E.jsx)(Fp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):y===\"down\"?(0,E.jsx)(Lp.default,{sx:{fontSize:\"16px\"},\"aria-hidden\":\"true\"}):null,N=y=>{if(!y)return\"neutral\";let L=Number.parseFloat(y);return Number.isNaN(L)?\"neutral\":L>0?\"up\":L<0?\"down\":\"neutral\"},A=Ft.default.useMemo(()=>[...e].sort((y,L)=>n===\"revenue\"?L.revenue-y.revenue:(Ct(L.trend?.revenue)??-1/0)-(Ct(y.trend?.revenue)??-1/0)),[e,n]),{totalRevenue:J,totalRevenueTrendDirection:Y,totalRevenueTrend:Z}=Ft.default.useMemo(()=>{let y=A.reduce((de,ie)=>de+ie.revenue,0),L,re;if(i!=null)Math.abs(i)<.1?(re=\"0%\",L=\"neutral\"):(L=i>0?\"up\":\"down\",re=`${i>0?\"+\":\"\"}${i.toFixed(1)}%`);else{let{direction:de,formatted:ie}=Jt(A,xe=>xe.revenue,xe=>xe.trend?.revenue);L=de,re=ie}return{totalRevenue:y,totalRevenueTrendDirection:L,totalRevenueTrend:re}},[A,i]),V=Ft.default.useMemo(()=>A.slice(0,5),[A]),{totalPages:c,pageItems:w}=vt(A,h,g),T=Ft.default.useMemo(()=>[{key:\"name\",label:a(r.fullView.categories.columns.category),sortable:!0,render:(y,L)=>(0,E.jsxs)(aa,{children:[(0,E.jsx)(na,{dotColor:L.color}),(0,E.jsx)(Op,{children:Bo(L.name)})]})},{key:\"revenue\",label:a(r.defaults.revenue),sortable:!0,render:(y,L)=>Q(Number(y),L.currencyCode)},{key:\"percentage\",label:a(r.fullView.categories.columns.percentOfTotal),sortable:!0,render:y=>`${Number(y)}%`},{key:\"trend\",label:a(r.defaults.trend),render:(y,L)=>L.trend?.revenue??a(r.defaults.noValue)}],[]),f=A[0]?.currencyCode;return s?(0,E.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,E.jsx)(be,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:x,onFilterChange:v}),(0,E.jsx)(jt,{})]}):e.length===0?(0,E.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,E.jsx)(be,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:x,onFilterChange:v}),(0,E.jsx)(Qt,{\"data-testid\":\"categories-fullview-empty\",children:a(r.fullView.categories.noCategoryData)})]}):(0,E.jsxs)(Me,{\"data-testid\":\"categories-full-view\",children:[(0,E.jsx)(be,{title:a(r.widget.topCategories.title),dateRange:Te(t),onBack:F,filters:x,onFilterChange:v}),(0,E.jsxs)(mp,{\"data-testid\":\"categories-fullview-top-section\",children:[(0,E.jsxs)(hp,{\"data-testid\":\"categories-fullview-chart\",children:[(0,E.jsx)(Lt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,E.jsxs)(Lt.PieChart,{children:[(0,E.jsx)(Lt.Pie,{data:A,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,label:k,labelLine:!1,children:A.map(y=>(0,E.jsx)(Lt.Cell,{fill:y.color},`cell-${y.id}`))}),(0,E.jsx)(Lt.Tooltip,{formatter:y=>Q(y,f)})]})}),(0,E.jsxs)(xp,{\"data-testid\":\"categories-fullview-donut-center\",children:[(0,E.jsx)(bp,{children:a(r.stats.revenue)}),(0,E.jsx)(yp,{children:Q(J,f)}),(0,E.jsxs)(wp,{direction:Y,children:[S(Y),(0,E.jsx)(\"span\",{children:Z})]})]})]}),(0,E.jsx)(Cp,{\"data-testid\":\"categories-fullview-summary\",children:V.map(y=>(0,E.jsxs)(vp,{children:[(0,E.jsx)(na,{dotColor:y.color}),(0,E.jsx)(kp,{children:Bo(y.name)}),(0,E.jsx)(Sp,{children:Q(y.revenue,y.currencyCode)}),(0,E.jsxs)(Tp,{children:[\"(\",y.percentage,\"%)\"]}),y.trend?.revenue?(0,E.jsx)(Mp,{direction:N(y.trend.revenue),children:S(N(y.trend.revenue))}):null]},y.id))})]}),(0,E.jsxs)(Xt,{\"data-testid\":\"categories-fullview-table-section\",children:[(0,E.jsxs)(qt,{\"data-testid\":\"categories-fullview-table-title\",children:[a(r.fullView.categories.allCategoriesTitle),\" (\",A.length,\")\"]}),D?(0,E.jsx)(Pp,{children:w.map(y=>(0,E.jsxs)(Rp,{children:[(0,E.jsx)(na,{dotColor:y.color}),(0,E.jsxs)(cp,{children:[(0,E.jsx)(up,{children:y.name}),(0,E.jsx)(gp,{children:Q(y.revenue,y.currencyCode)})]}),(0,E.jsxs)(fp,{children:[y.percentage,\"%\"]})]},y.id))}):(0,E.jsx)(Dp,{children:(0,E.jsx)(it,{columns:T,data:w,sortable:!0,getRowKey:y=>y.id})}),c>1&&(0,E.jsx)(lt,{currentPage:h,totalPages:c,onPageChange:C,itemsPerPage:g,totalItems:A.length})]})]})};var sn=M(require(\"react\"));function so(e){ho(e),sn.default.useEffect(()=>(ho(e),()=>{ho(void 0)}),[e])}var Ip=({translate:e,children:t})=>(so(e),t??null);function $p(){return sn.default.useCallback(e=>Gt(e),[])}var Po=require(\"react/jsx-runtime\"),pu=\"shoppingDashboardView\",cu=[],uu=[],gu=[],fu=[],mu=[],hu=[];function Vp(e){return typeof e==\"object\"&&e!==null}function xu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"signups\"||e===\"categories\"}function la(e,t){if(!Vp(e))return\"dashboard\";let o=e[t];return xu(o)?o:\"dashboard\"}function Np(e,t,o){return{...Vp(e)?e:{},[t]:o}}function bu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var Ep=({stats:e,topProducts:t,conversionData:o,signupData:n,categories:i,categoriesSummaryChangePct:l,orders:s,signups:p,isLoading:m=!1,error:b,shopTitle:u,className:h,translate:C,initialDateRange:g=\"last30days\",initialMarket:D=\"all\",initialProductSort:F=\"units\",initialSignupView:d=\"all\",initialConversionFilter:x=\"all\",initialCategorySort:v=\"revenue\",markets:k,historyAdapter:S,historyStateKey:N=pu,resetToDashboardOnMount:A=!0,onDateRangeChange:J,onMarketChange:Y,onProductSortChange:Z,onSignupViewChange:V,onConversionFilterChange:c,onCategorySortChange:w,onViewChange:T})=>{so(C);let[f,y]=se.default.useState(\"dashboard\"),L=se.default.useRef(!1),[re,de]=se.default.useState(g),[ie,xe]=se.default.useState(D),[Vt,ee]=se.default.useState(F),[He,dt]=se.default.useState(d),[pt,Lo]=se.default.useState(x),[Io,wa]=se.default.useState(v),$o=t??cu,Zo=o??uu,No=n??gu,qo=i??fu,Xo=s??mu,Qo=p??hu,et=se.default.useCallback(q=>{y(q),T?.(q)},[T]),er=se.default.useCallback(()=>S?la(S.location?.state,N):typeof window>\"u\"?\"dashboard\":la(window.history.state,N),[S,N]),Wt=se.default.useCallback((q,Ut)=>{if(S){let ct=Np(S.location?.state,N,q),ht=bu(S.location,ct);if(Ut===\"replace\"){S.replace(ht);return}S.push(ht);return}if(typeof window>\"u\")return;let G=Np(window.history.state,N,q);if(Ut===\"replace\"){window.history.replaceState(G,\"\");return}window.history.pushState(G,\"\")},[S,N]);se.default.useEffect(()=>{if(A?(Wt(\"dashboard\",\"replace\"),L.current=!1,et(\"dashboard\")):et(er()),S)return S.listen((Ut,G)=>{if(G===\"POP\"){let ct=la(Ut.state,N);L.current=ct!==\"dashboard\",et(ct)}});let q=Ut=>{let G=la(Ut.state,N);L.current=G!==\"dashboard\",et(G)};return window.addEventListener(\"popstate\",q),()=>{window.removeEventListener(\"popstate\",q)}},[S,N,er,A,et,Wt]);let mt=se.default.useCallback(q=>{L.current=!0,Wt(q,\"push\"),et(q)},[et,Wt]),Ge=se.default.useCallback(()=>{if(f!==\"dashboard\"&&L.current){if(S){S.goBack();return}typeof window<\"u\"&&window.history.back();return}L.current=!1,Wt(\"dashboard\",\"replace\"),et(\"dashboard\")},[f,S,et,Wt]),_t=se.default.useCallback(q=>{de(q),J?.(q)},[J]),tt=se.default.useCallback(q=>{xe(q),Y?.(q)},[Y]),Et=se.default.useCallback(q=>{ee(q),Z?.(q)},[Z]),uo=se.default.useCallback(q=>{dt(q),V?.(q)},[V]),oo=se.default.useCallback(q=>{Lo(q),c?.(q)},[c]),ro=se.default.useCallback(q=>{wa(q),w?.(q)},[w]),tr=se.default.useCallback(()=>{mt(\"products\")},[mt]),or=se.default.useCallback(()=>{mt(\"conversion-rate\")},[mt]),rr=se.default.useCallback(()=>{mt(\"signups\")},[mt]),Ca=se.default.useCallback(()=>{mt(\"categories\")},[mt]);return f===\"products\"?(0,Po.jsx)(To,{products:$o,dateRange:re,market:ie,productSort:Vt,markets:k,isLoading:m,onBack:Ge,onDateRangeChange:_t,onMarketChange:tt,onProductSortChange:Et}):f===\"conversion-rate\"?(0,Po.jsx)(Do,{conversionData:Zo,orders:Xo,dateRange:re,market:ie,conversionFilter:pt,markets:k,isLoading:m,onBack:Ge,onDateRangeChange:_t,onMarketChange:tt,onConversionFilterChange:oo}):f===\"signups\"?(0,Po.jsx)(ra,{signupData:No,signups:Qo,dateRange:re,market:ie,signupView:He,markets:k,isLoading:m,onBack:Ge,onDateRangeChange:_t,onMarketChange:tt,onSignupViewChange:uo}):f===\"categories\"?(0,Po.jsx)(ia,{categories:qo,dateRange:re,market:ie,categorySort:Io,summaryChangePct:l,markets:k,isLoading:m,onBack:Ge,onDateRangeChange:_t,onMarketChange:tt,onCategorySortChange:ro}):(0,Po.jsx)(Wr,{stats:e,topProducts:$o,conversionData:Zo,signupData:No,categories:qo,categoriesSummaryChangePct:l,isLoading:m,error:b,shopTitle:u,className:h,dateRange:re,market:ie,productSort:Vt,signupView:He,conversionFilter:pt,categorySort:Io,markets:k,onDateRangeChange:_t,onMarketChange:tt,onProductSortChange:Et,onSignupViewChange:uo,onConversionFilterChange:oo,onCategorySortChange:ro,onProductsTitleClick:tr,onConversionTitleClick:or,onSignupsTitleClick:rr,onCategoriesToTitleClick:Ca})};var Ro=require(\"@nuskin/foundation-theme\"),dn=(0,Ro.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`,Ap=(0,Ro.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`,zp=(0,Ro.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: flex-start;\n }\n`,Bp=(0,Ro.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`,Hp=(0,Ro.styled)(\"div\")`\n padding: 24px;\n text-align: center;\n color: #d32f2f;\n background-color: #ffebee;\n border-radius: 8px;\n`;var sa=M(require(\"react\")),It=require(\"recharts\");var z={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:\"--\"},byRevenue:{key:\"productOfferDashboard.defaults.byRevenue\",fallback:\"Revenue\"},byUnits:{key:\"productOfferDashboard.defaults.byUnits\",fallback:\"Units\"},byVolume:{key:\"productOfferDashboard.defaults.byVolume\",fallback:\"Volume\"}}};function W(e){return Gt(e)}var U=require(\"react/jsx-runtime\"),yu=({offers:e,offerSort:t,isLoading:o=!1,title:n,onSortChange:i,onTitleClick:l,onExport:s})=>{let p=sa.default.useCallback(g=>{let D=g.target.value;i?.(D)},[i]),{sortedOffers:m,totalRevenue:b,trendDirection:u,formattedTrend:h}=sa.default.useMemo(()=>{let g=[...e].sort((x,v)=>t===\"revenue\"?v.revenue-x.revenue:v.percentage-x.percentage),D=g.reduce((x,v)=>x+v.revenue,0),{direction:F,formatted:d}=Jt(g,x=>x.revenue,x=>x.trend?.revenue);return{sortedOffers:g,totalRevenue:D,trendDirection:F,formattedTrend:d}},[e,t]),C=m[0]?.currencyCode;return o&&e.length===0?(0,U.jsx)(Zt,{\"data-testid\":\"widget-top-offers\",children:(0,U.jsx)(br,{})}):e.length===0?(0,U.jsxs)(Zt,{\"data-testid\":\"widget-top-offers\",children:[(0,U.jsx)(ko,{children:(0,U.jsx)(So,{children:n??W(z.widget.topPerformingOffers.title)})}),(0,U.jsx)(zr,{\"data-testid\":\"top-offers-empty-state\",children:(0,U.jsx)(Br,{children:W(z.widget.topPerformingOffers.emptyState)})})]}):(0,U.jsxs)(Zt,{as:\"section\",\"data-testid\":\"widget-top-offers\",\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,U.jsxs)(ko,{children:[(0,U.jsx)(So,{as:\"button\",onClick:l,\"aria-label\":W(z.ariaLabel.topOffers),\"data-testid\":\"widget-title-top-offers\",children:n??W(z.widget.topPerformingOffers.title)}),(0,U.jsxs)(Tr,{children:[(0,U.jsxs)(Dr,{id:\"offer-sort\",\"data-testid\":\"offer-sort-dropdown\",value:t,onChange:p,disabled:o,\"aria-label\":W(z.ariaLabel.topOffers),children:[(0,U.jsx)(\"option\",{value:\"revenue\",children:W(z.defaults.byRevenue)}),(0,U.jsx)(\"option\",{value:\"units\",children:W(z.defaults.byUnits)})]}),(0,U.jsx)(at,{widgetId:\"top-offers\",onFullView:l,onExport:s})]})]}),(0,U.jsxs)(Pr,{children:[(0,U.jsxs)(Rr,{\"data-testid\":\"top-offers-chart\",children:[(0,U.jsx)(It.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,U.jsxs)(It.PieChart,{children:[(0,U.jsx)(It.Pie,{data:m,cx:\"50%\",cy:\"50%\",innerRadius:\"55%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:m.map(g=>(0,U.jsx)(It.Cell,{fill:g.color},`cell-${g.id}`))}),(0,U.jsx)(It.Tooltip,{formatter:g=>Q(g,C)})]})}),(0,U.jsxs)(Mr,{\"data-testid\":\"top-offers-donut-center\",children:[(0,U.jsx)(Or,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,U.jsx)(Fr,{children:Q(b,C)}),(0,U.jsx)(Lr,{direction:u,children:h})]})]}),(0,U.jsx)(Ir,{\"data-testid\":\"top-offers-legend-container\",children:m.map((g,D)=>{let F=Yt(g.trend?.revenue);return(0,U.jsxs)($r,{\"data-testid\":`offer-legend-${D}`,children:[(0,U.jsx)(Nr,{color:g.color}),(0,U.jsxs)(Vr,{children:[(0,U.jsx)(Er,{children:Bo(g.name)}),(0,U.jsx)(Ar,{children:Q(g.revenue,g.currencyCode)})]}),(0,U.jsxs)(Vs,{children:[g.percentage,\"%\"]}),g.trend?.revenue?(0,U.jsx)(zs,{direction:F,\"data-testid\":`offer-legend-trend-${D}`,\"aria-label\":g.trend.revenue,children:rt(F)}):null]},g.id)})})]})]})},jo=sa.default.memo(yu);jo.displayName=\"TopPerformingOffersPieChart\";var un=M(require(\"react\"));var wu=/[\\\\/?*[\\]:]/g;function pn(e){let t=e.trim(),o=t.length>0?t:\"export\";return o.toLowerCase().endsWith(\".xlsx\")?o:`${o}.xlsx`}function cn(e){let t=e.replace(wu,\" \").trim();return(t.length>0?t:\"Export\").slice(0,31)}async function Yo({rows:e,columns:t,fileName:o,sheetName:n}){let i=await import(\"xlsx\"),l=e.map(m=>{let b={};return t.forEach(u=>{b[u.header]=u.value(m)??\"\"}),b}),s=i.utils.json_to_sheet(l),p=i.utils.book_new();i.utils.book_append_sheet(p,s,cn(n)),i.writeFile(p,pn(o))}var Cu=[{header:\"Rank\",value:e=>e.rank},{header:\"Product ID\",value:e=>e.id},{header:\"Product Name\",value:e=>e.name},{header:\"Units Sold\",value:e=>e.unitsSold},{header:\"Total Revenue\",value:e=>e.revenue},{header:\"Currency\",value:e=>e.currencyCode},{header:\"Volume DC-SV\",value:e=>e.volume},{header:\"Trend\",value:e=>e.trend?.units??e.trend?.revenue??e.trend?.volume}],vu=[{header:\"Offer ID\",value:e=>e.id},{header:\"Offer Name\",value:e=>e.name},{header:\"Total Revenue\",value:e=>e.revenue},{header:\"Currency\",value:e=>e.currencyCode},{header:\"Total Volume\",value:e=>e.volume??e.units},{header:\"Share %\",value:e=>e.percentage},{header:\"Trend\",value:e=>e.trend?.revenue??e.trend?.units}];function da(e){return Yo({rows:e,columns:Cu,fileName:\"top-selling-products\",sheetName:\"Top Selling Products\"})}function pa(e){return Yo({rows:e,columns:vu,fileName:\"top-performing-offers\",sheetName:\"Top Performing Offers\"})}function ca({topProducts:e,topOffers:t,topProductsExportData:o,topOffersExportData:n,showTopProductsExportOption:i=!0,showTopOffersExportOption:l=!0,isLoading:s=!1}){let p=o??e,m=n??t,b=i&&!s&&p.length>0,u=l&&!s&&m.length>0,h=un.default.useCallback(()=>da(p),[p]),C=un.default.useCallback(()=>pa(m),[m]);return{onTopProductsExport:b?h:void 0,onTopOffersExport:u?C:void 0}}var Ke=require(\"react/jsx-runtime\"),ku=[],Su=[],Tu=[],ua=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:l,dashboardTitle:s,className:p,dateRange:m=\"last30days\",market:b=\"all\",productSort:u=\"units\",conversionFilter:h=\"all\",offerSort:C=\"revenue\",conversionSummaryRate:g,conversionSummaryChangePct:D,topProductsExportData:F,topOffersExportData:d,showTopProductsExportOption:x=!0,showTopOffersExportOption:v=!0,markets:k,onDateRangeChange:S,onMarketChange:N,onProductSortChange:A,onConversionFilterChange:J,onOfferSortChange:Y,onProductsTitleClick:Z,onConversionTitleClick:V,onOffersTitleClick:c})=>{let w=t??ku,T=o??Su,f=n??Tu,{onTopProductsExport:y,onTopOffersExport:L}=ca({topProducts:w,topOffers:f,topProductsExportData:F,topOffersExportData:d,showTopProductsExportOption:x,showTopOffersExportOption:v,isLoading:i}),re=de=>de?de.startsWith(\"+\")&&de!==\"+0%\"?\"up\":de.startsWith(\"-\")?\"down\":\"neutral\":\"neutral\";return l?(0,Ke.jsx)(dn,{as:\"main\",className:p,\"aria-label\":W(z.ariaLabel.dashboard),children:(0,Ke.jsxs)(Hp,{\"data-testid\":\"dashboard-error\",role:\"alert\",\"aria-live\":\"assertive\",children:[(0,Ke.jsxs)(\"strong\",{children:[W(z.error),\":\"]}),\" \",l]})}):(0,Ke.jsxs)(dn,{as:\"main\",className:p,\"data-testid\":\"product-offer-dashboard\",\"aria-label\":W(z.ariaLabel.dashboard),\"aria-busy\":i,children:[(0,Ke.jsx)(xo,{shopTitle:s??W(z.title),dateRange:m,market:b,isLoading:i,markets:k,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:S,onMarketChange:N}),(0,Ke.jsxs)(Ap,{\"data-testid\":\"top-charts-row\",children:[(0,Ke.jsx)(io,{conversionData:T,conversionFilter:h,isLoading:i,summaryRate:g,summaryChangePct:D,onFilterChange:J,onTitleClick:V}),(0,Ke.jsxs)(zp,{\"data-testid\":\"stats-card-stack\",children:[(0,Ke.jsx)(wt,{layout:\"split\",title:W(z.stats.revenue),value:e?.metrics?.revenue??\"$0\",trendDirection:re(e?.trend?.revenue),trendValue:e?.trend?.revenue,caption:W(z.stats.comparedTo),testId:\"stats-card-revenue\",isLoading:i}),(0,Ke.jsx)(wt,{layout:\"split\",title:W(z.stats.offersPurchased),value:e?.metrics?.offersPurchased??\"0\",trendDirection:re(e?.trend?.offersPurchased),trendValue:e?.trend?.offersPurchased,caption:W(z.stats.comparedTo),testId:\"stats-card-offers-purchased\",isLoading:i})]})]}),(0,Ke.jsxs)(Bp,{\"data-testid\":\"bottom-charts-row\",children:[(0,Ke.jsx)(no,{products:w,productSort:u,isLoading:i,maxProducts:5,onSortChange:A,onTitleClick:Z,onExport:y}),(0,Ke.jsx)(jo,{offers:f,offerSort:C,isLoading:i,onSortChange:Y,onTitleClick:c,onExport:L})]})]})};var ge=M(require(\"react\"));var $t=M(require(\"react\")),Nt=require(\"recharts\");var ne=require(\"@mui/material/styles\"),oe=require(\"@mui/material\"),Wp=require(\"@nuskin/foundation-theme\"),{getGenomeColor:gn}=Wp.ColorUtils,_p=(0,ne.styled)(oe.Box)`\n display: flex;\n gap: 24px;\n padding: 24px;\n background-color: ${({theme:e})=>gn(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`,Up=(0,ne.styled)(oe.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`,Kp=(0,ne.styled)(oe.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`,Gp=(0,ne.styled)(oe.Typography)`\n font-size: 0.75rem;\n line-height: 1.2;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,jp=(0,ne.styled)(oe.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`,Yp=(0,ne.styled)(oe.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`,Jp=(0,ne.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex: 1;\n`,Zp=(0,ne.styled)(oe.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})=>gn(e,\"N30\")};\n }\n`,ga=(0,ne.styled)(oe.Box)`\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background-color: ${({dotColor:e})=>e};\n flex-shrink: 0;\n`,qp=(0,ne.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1;\n`,Xp=(0,ne.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n`,Qp=(0,ne.styled)(oe.Typography)`\n font-size: 0.75rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n`,ec=(0,ne.styled)(oe.Typography)`\n font-size: 1rem;\n font-weight: 600;\n flex-shrink: 0;\n`,tc=(0,ne.styled)(oe.Box)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,oc=(0,ne.styled)(oe.Box)`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`,rc=(0,ne.styled)(oe.Box)`\n display: block;\n @media (max-width: 767px) {\n display: none;\n }\n`,ac=(0,ne.styled)(oe.Box)`\n display: none;\n @media (max-width: 767px) {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n`,nc=(0,ne.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n padding: 16px;\n background-color: ${({theme:e})=>gn(e,\"N20\")};\n border: 1px solid ${({theme:e})=>e.palette.divider};\n border-radius: 8px;\n`,ic=(0,ne.styled)(oe.Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`,lc=(0,ne.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({theme:e})=>e.palette.text.primary};\n word-break: break-word;\n`,sc=(0,ne.styled)(oe.Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({theme:e})=>e.palette.divider};\n`,fa=(0,ne.styled)(oe.Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`,ma=(0,ne.styled)(oe.Typography)`\n font-size: 0.625rem;\n color: ${({theme:e})=>e.palette.text.secondary};\n text-transform: uppercase;\n`,fn=(0,ne.styled)(oe.Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({theme:e})=>e.palette.text.primary};\n`,dc=(0,ne.styled)(oe.Typography)`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\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 width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;var O=require(\"react/jsx-runtime\"),ha=({offers:e,dateRange:t,market:o,offerSort:n,markets:i,isLoading:l=!1,onBack:s,onDateRangeChange:p,onMarketChange:m,onOfferSortChange:b})=>{let[u,h]=(0,$t.useState)(1),C=10,g=Pt(),D=$t.default.useCallback(()=>s?.(),[s]),F=ot(i),d=$t.default.useMemo(()=>[St(t,z),Tt(o,F,z),{key:\"sort\",label:W(z.defaults.byRevenue),value:n,options:[{value:\"revenue\",label:W(z.defaults.byRevenue)},{value:\"units\",label:W(z.defaults.byUnits)}]}],[t,o,F,n]),x=$t.default.useCallback((c,w)=>{c===\"dateRange\"?p?.(w):c===\"market\"?m?.(w):c===\"sort\"&&(b?.(w),h(1))},[b,p,m]),v=$t.default.useMemo(()=>[...e].sort((c,w)=>n===\"revenue\"?w.revenue-c.revenue:w.percentage-c.percentage),[e,n]),{totalRevenue:k,totalRevenueTrendDirection:S,totalRevenueTrend:N}=$t.default.useMemo(()=>{let c=v.reduce((f,y)=>f+y.revenue,0),{direction:w,formatted:T}=Jt(v,f=>f.revenue,f=>f.trend?.revenue);return{totalRevenue:c,totalRevenueTrendDirection:w,totalRevenueTrend:T}},[v]),A=$t.default.useMemo(()=>v.slice(0,5),[v]),{totalPages:J,pageItems:Y}=vt(v,u,C),Z=$t.default.useMemo(()=>[{key:\"name\",label:W(z.fullView.topOffers.columnName),sortable:!0,render:(c,w)=>(0,O.jsxs)(aa,{children:[(0,O.jsx)(ga,{dotColor:w.color}),(0,O.jsx)(\"span\",{children:w.name})]})},{key:\"revenue\",label:W(z.fullView.topOffers.columnRevenue),sortable:!0,render:(c,w)=>Q(Number(c),w.currencyCode)},{key:\"percentage\",label:W(z.fullView.topOffers.columnPercentage),sortable:!0,render:c=>`${Number(c)}%`},{key:\"trend\",label:W(z.fullView.topOffers.columnTrend),render:(c,w)=>{if(!w.trend?.revenue)return W(z.defaults.noData);let T=Yt(w.trend.revenue);return(0,O.jsxs)(oc,{direction:T,children:[rt(T),(0,O.jsx)(\"span\",{children:w.trend.revenue})]})}}],[]),V=v[0]?.currencyCode;return l?(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(be,{title:W(z.fullView.topOffers.title),dateRange:Te(t),onBack:D,filters:d,onFilterChange:x}),(0,O.jsx)(jt,{})]}):e.length===0?(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(be,{title:W(z.fullView.topOffers.title),dateRange:Te(t),onBack:D,filters:d,onFilterChange:x}),(0,O.jsx)(Qt,{\"data-testid\":\"top-offers-fullview-empty\",children:W(z.widget.topPerformingOffers.emptyState)})]}):(0,O.jsxs)(Me,{\"data-testid\":\"top-offers-full-view\",children:[(0,O.jsx)(be,{title:W(z.fullView.topOffers.title),dateRange:Te(t),onBack:D,filters:d,onFilterChange:x}),(0,O.jsxs)(_p,{\"data-testid\":\"top-offers-fullview-top-section\",children:[(0,O.jsxs)(Up,{\"data-testid\":\"top-offers-fullview-chart\",children:[(0,O.jsx)(Nt.ResponsiveContainer,{width:\"100%\",height:\"100%\",children:(0,O.jsxs)(Nt.PieChart,{children:[(0,O.jsx)(Nt.Pie,{data:v,cx:\"50%\",cy:\"50%\",innerRadius:\"50%\",outerRadius:\"85%\",dataKey:\"revenue\",nameKey:\"name\",paddingAngle:2,children:v.map(c=>(0,O.jsx)(Nt.Cell,{fill:c.color},`cell-${c.id}`))}),(0,O.jsx)(Nt.Tooltip,{formatter:c=>Q(c,V)})]})}),(0,O.jsxs)(Kp,{\"data-testid\":\"top-offers-fullview-donut-center\",children:[(0,O.jsx)(Gp,{children:W(z.widget.topPerformingOffers.totalRevenue)}),(0,O.jsx)(jp,{children:Q(k,V)}),(0,O.jsx)(Yp,{direction:S,children:N})]})]}),(0,O.jsx)(Jp,{\"data-testid\":\"top-offers-fullview-summary\",children:A.map(c=>{let w=Yt(c.trend?.revenue);return(0,O.jsxs)(Zp,{children:[(0,O.jsx)(ga,{dotColor:c.color}),(0,O.jsxs)(qp,{children:[(0,O.jsx)(Xp,{children:c.name}),(0,O.jsx)(Qp,{children:Q(c.revenue,c.currencyCode)})]}),(0,O.jsxs)(ec,{children:[c.percentage,\"%\"]}),c.trend?.revenue?(0,O.jsx)(tc,{direction:w,\"aria-label\":c.trend.revenue,children:rt(w)}):null]},c.id)})})]}),(0,O.jsxs)(Xt,{\"data-testid\":\"top-offers-table\",children:[(0,O.jsxs)(qt,{\"data-testid\":\"top-offers-fullview-table-title\",children:[W(z.fullView.topOffers.title),\" (\",v.length,\")\"]}),g?(0,O.jsx)(ac,{children:Y.map(c=>{let w=Ct(c.trend?.revenue),T=\"neutral\";return w!==null&&w>0?T=\"up\":w!==null&&w<0&&(T=\"down\"),(0,O.jsxs)(nc,{children:[(0,O.jsxs)(ic,{children:[(0,O.jsx)(ga,{dotColor:c.color}),(0,O.jsx)(lc,{children:c.name})]}),(0,O.jsxs)(sc,{children:[(0,O.jsxs)(fa,{children:[(0,O.jsx)(ma,{children:W(z.fullView.topOffers.columnRevenue)}),(0,O.jsx)(fn,{children:Q(c.revenue,c.currencyCode)})]}),(0,O.jsxs)(fa,{children:[(0,O.jsx)(ma,{children:W(z.fullView.topOffers.columnPercentage)}),(0,O.jsxs)(fn,{children:[c.percentage,\"%\"]})]}),(0,O.jsxs)(fa,{children:[(0,O.jsx)(ma,{children:W(z.fullView.topOffers.columnTrend)}),(0,O.jsx)(dc,{direction:T,children:c.trend?.revenue?(0,O.jsxs)(O.Fragment,{children:[rt(T),(0,O.jsx)(\"span\",{children:c.trend.revenue})]}):W(z.defaults.noData)})]})]})]},c.id)})}):(0,O.jsx)(rc,{children:(0,O.jsx)(it,{columns:Z,data:Y,sortable:!0,getRowKey:c=>c.id})}),J>1&&(0,O.jsx)(lt,{currentPage:u,totalPages:J,onPageChange:h,itemsPerPage:C,totalItems:v.length,\"data-testid\":\"top-offers-pagination\"})]})]})};var Jo=require(\"react/jsx-runtime\"),Du=\"productOfferDashboardView\",Pu=[],Ru=[],Mu=[],Ou=[];function cc(e){return typeof e==\"object\"&&e!==null}function Fu(e){return e===\"dashboard\"||e===\"products\"||e===\"conversion-rate\"||e===\"top-offers\"}function xa(e,t){if(!cc(e))return\"dashboard\";let o=e[t];return Fu(o)?o:\"dashboard\"}function pc(e,t,o){return{...cc(e)?e:{},[t]:o}}function Lu(e,t){return{pathname:e?.pathname,search:e?.search,hash:e?.hash,state:t}}var uc=({stats:e,topProducts:t,conversionData:o,topOffers:n,isLoading:i=!1,error:l,dashboardTitle:s,className:p,allProducts:m,orders:b,allOffers:u,conversionSummaryRate:h,conversionSummaryChangePct:C,conversionFullViewData:g,conversionFullViewRate:D,conversionFullViewChangePct:F,topProductsExportData:d,topOffersExportData:x,showTopProductsExportOption:v=!0,showTopOffersExportOption:k=!0,initialDateRange:S=\"last30days\",initialMarket:N=\"all\",initialProductSort:A=\"units\",initialConversionFilter:J=\"all\",initialOfferSort:Y=\"revenue\",markets:Z,translate:V,historyAdapter:c,historyStateKey:w=Du,resetToDashboardOnMount:T=!0,onDateRangeChange:f,onMarketChange:y,onProductSortChange:L,onConversionFilterChange:re,onOfferSortChange:de,onViewChange:ie})=>{so(V);let[xe,Vt]=ge.default.useState(\"dashboard\"),ee=ge.default.useRef(!1),[He,dt]=ge.default.useState(S),[pt,Lo]=ge.default.useState(N),[Io,wa]=ge.default.useState(A),[$o,Zo]=ge.default.useState(J),[No,qo]=ge.default.useState(Y),Xo=t??Pu,Qo=o??Ru,et=n??Mu,er=m??Xo,Wt=b??Ou,mt=u??et,Ge=ge.default.useCallback(G=>{Vt(G),ie?.(G)},[ie]),_t=ge.default.useCallback(()=>c?xa(c.location?.state,w):typeof window>\"u\"?\"dashboard\":xa(window.history.state,w),[c,w]),tt=ge.default.useCallback((G,ct)=>{if(c){let ar=pc(c.location?.state,w,G),yn=Lu(c.location,ar);if(ct===\"replace\"){c.replace(yn);return}c.push(yn);return}if(typeof window>\"u\")return;let ht=pc(window.history.state,w,G);if(ct===\"replace\"){window.history.replaceState(ht,\"\");return}window.history.pushState(ht,\"\")},[c,w]);ge.default.useEffect(()=>{if(T?(tt(\"dashboard\",\"replace\"),ee.current=!1,Ge(\"dashboard\")):Ge(_t()),c)return c.listen((ct,ht)=>{if(ht===\"POP\"){let ar=xa(ct.state,w);ee.current=ar!==\"dashboard\",Ge(ar)}});let G=ct=>{let ht=xa(ct.state,w);ee.current=ht!==\"dashboard\",Ge(ht)};return window.addEventListener(\"popstate\",G),()=>{window.removeEventListener(\"popstate\",G)}},[c,w,_t,T,Ge,tt]);let Et=ge.default.useCallback(G=>{ee.current=!0,tt(G,\"push\"),Ge(G)},[Ge,tt]),uo=ge.default.useCallback(()=>{if(xe!==\"dashboard\"&&ee.current){if(c){c.goBack();return}typeof window<\"u\"&&window.history.back();return}ee.current=!1,tt(\"dashboard\",\"replace\"),Ge(\"dashboard\")},[xe,c,Ge,tt]),oo=ge.default.useCallback(G=>{dt(G),f?.(G)},[f]),ro=ge.default.useCallback(G=>{Lo(G),y?.(G)},[y]),tr=ge.default.useCallback(G=>{wa(G),L?.(G)},[L]),or=ge.default.useCallback(G=>{Zo(G),re?.(G)},[re]),rr=ge.default.useCallback(G=>{qo(G),de?.(G)},[de]),Ca=ge.default.useCallback(()=>{Et(\"products\")},[Et]),q=ge.default.useCallback(()=>{Et(\"conversion-rate\")},[Et]),Ut=ge.default.useCallback(()=>{Et(\"top-offers\")},[Et]);return xe===\"products\"?(0,Jo.jsx)(To,{products:er,dateRange:He,market:pt,productSort:Io,markets:Z,isLoading:i,onBack:uo,onDateRangeChange:oo,onMarketChange:ro,onProductSortChange:tr}):xe===\"conversion-rate\"?(0,Jo.jsx)(Do,{conversionData:g??Qo,orders:Wt,summaryRate:D??h,summaryChangePct:F??C,dateRange:He,market:pt,conversionFilter:$o,markets:Z,isLoading:i,onBack:uo,onDateRangeChange:oo,onMarketChange:ro,onConversionFilterChange:or}):xe===\"top-offers\"?(0,Jo.jsx)(ha,{offers:mt,dateRange:He,market:pt,offerSort:No,markets:Z,isLoading:i,onBack:uo,onDateRangeChange:oo,onMarketChange:ro,onOfferSortChange:rr}):(0,Jo.jsx)(ua,{stats:e,topProducts:Xo,conversionData:Qo,topOffers:et,isLoading:i,error:l,dashboardTitle:s,className:p,dateRange:He,market:pt,productSort:Io,conversionFilter:$o,offerSort:No,conversionSummaryRate:h,conversionSummaryChangePct:C,topProductsExportData:d,topOffersExportData:x,showTopProductsExportOption:v,showTopOffersExportOption:k,markets:Z,onDateRangeChange:oo,onMarketChange:ro,onProductSortChange:tr,onConversionFilterChange:or,onOfferSortChange:rr,onProductsTitleClick:Ca,onConversionTitleClick:q,onOffersTitleClick:Ut})};var Mo=require(\"@nuskin/foundation-theme\"),{getGenomeColor:po}=Mo.ColorUtils,gc=(0,Mo.styled)(\"div\")`\n display: flex;\n gap: 12px;\n margin-bottom: 24px;\n flex-wrap: wrap;\n`,fc=(0,Mo.styled)(\"select\")`\n min-width: 160px;\n height: 40px;\n padding: 8px 12px;\n background-color: ${({theme:e})=>po(e,\"N20\")};\n border: 1px solid ${({theme:e})=>po(e,\"N40\")};\n border-radius: 8px;\n font-size: 14px;\n font-weight: 400;\n color: ${({theme:e})=>po(e,\"N100\")};\n cursor: pointer;\n outline: none;\n transition: all 0.2s ease;\n\n &:hover {\n background-color: ${({theme:e})=>po(e,\"N30\")};\n }\n\n &:focus {\n border-color: ${({theme:e})=>po(e,\"A70\")};\n box-shadow: 0 0 0 3px ${({theme:e})=>po(e,\"A20\")};\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n`,mc=(0,Mo.styled)(\"label\")`\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n color: ${({theme:e})=>po(e,\"N70\")};\n`;var Oo=require(\"react/jsx-runtime\"),hc=({filters:e,onChange:t})=>(0,Oo.jsx)(gc,{\"data-testid\":\"filter-bar\",children:e.map(o=>(0,Oo.jsxs)(mc,{htmlFor:`filter-${o.key}`,children:[o.label,(0,Oo.jsx)(fc,{id:`filter-${o.key}`,value:o.value,onChange:n=>t(o.key,n.target.value),disabled:o.disabled,\"aria-label\":`${o.label} ${a(r.ariaLabel.filterSuffix)}`,\"data-testid\":`filter-dropdown-${o.key}`,children:o.options.map(n=>(0,Oo.jsx)(\"option\",{value:n.value,children:n.label},n.value))})]},o.key))});var mn={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%\"}},ba=[{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%\"}}],Fo=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");return o.setDate(o.getDate()+t),{date:`${[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"][o.getMonth()]} ${o.getDate()}`,rate:Number((4+t%15*.1).toFixed(2)),orders:200+t*13%100,siteVisits:4e3+t*97%2e3}}),Iu=Fo.map(e=>({...e,rate:Number((e.rate*1.35).toFixed(2)),orders:Math.round(e.orders*.7)})),$u=Fo.map(e=>({...e,rate:Number((e.rate*.55).toFixed(2)),orders:Math.round(e.orders*.3)})),hn=Array.from({length:30},(e,t)=>{let o=new Date(\"2026-03-01\");o.setDate(o.getDate()+t);let n=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],i=80+t*11%40,l=Math.floor(i*.4),s=Math.floor(i*.35),p=i-l-s;return{date:`${n[o.getMonth()]} ${o.getDate()}`,total:i,members:l,retail:s,brandAffiliates:p}}),xn=[{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%\"}}],ya=Array.from({length:50},(e,t)=>{let o=[\"Sarah\",\"John\",\"Emma\",\"Michael\",\"Olivia\",\"William\",\"Ava\",\"James\"],n=[\"Smith\",\"Johnson\",\"Williams\",\"Brown\",\"Jones\",\"Garcia\",\"Miller\",\"Davis\"],i=new Date(\"2026-03-31\");return i.setDate(i.getDate()-t%30),{orderId:`ORD-${String(1e4+t).padStart(5,\"0\")}`,date:i.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),customerName:`${o[t%o.length]} ${n[t%n.length]}`,customerType:t%3===0?\"Subscription\":\"Standard\",items:t%5+1,total:Number((50+t*17%200+t%10*.1).toFixed(2)),bv:30+t*9%150}}),bn=Array.from({length:30},(e,t)=>{let o=[\"Alice\",\"Bob\",\"Carol\",\"David\",\"Eva\",\"Frank\",\"Grace\",\"Henry\"],n=[\"Anderson\",\"Baker\",\"Clark\",\"Davis\",\"Evans\",\"Fisher\",\"Grant\",\"Hall\"],i=[\"Member\",\"Retail\",\"Brand Affiliate\"],l=new Date(\"2026-03-31\");return l.setDate(l.getDate()-t%30),{id:`SU-${String(1e3+t).padStart(4,\"0\")}`,name:`${o[t%o.length]} ${n[t%n.length]}`,date:l.toLocaleDateString(\"en-US\",{month:\"short\",day:\"numeric\",year:\"numeric\"}),type:i[t%i.length],email:`${o[t%o.length].toLowerCase()}.${n[t%n.length].toLowerCase()}@example.com`,status:t%4===0?\"Pending\":\"Active\"}});var co={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%\"}},Mx={...co,trend:{revenue:\"+5.1%\",offersPurchased:\"+12.5%\"}},Ox={...co,trend:{revenue:\"-1.8%\",offersPurchased:\"-3.7%\"}},Fx={...co,trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},Lx={...co,metrics:{...co.metrics,offersPurchased:\"0\"},trend:{revenue:\"+0%\",offersPurchased:\"+0%\"}},xc=[{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%\"}}];\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 $disabled={(entries?.length ?? 0) === 0}\n onClick={(e) => {\n e.preventDefault();\n if ((entries?.length ?? 0) > 0 && history) {\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')<{ $disabled?: boolean }>`\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#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 ${({ $disabled }) => ($disabled ? '#999999' : '#000000')};\n padding-bottom: 4px;\n transition: all 0.3s ease;\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};\n pointer-events: ${({ $disabled }) => ($disabled ? 'none' : 'auto')};\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n\n @media (max-width: 560px) {\n font-size: 14px;\n line-height: 18px;\n }\n\n &:hover {\n color: ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n border-bottom: 1px solid ${({ $disabled }) => ($disabled ? '#999999' : '#666666')};\n cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : '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 [isCategoriesLoaded, setIsCategoriesLoaded] = useState(false);\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((data) => {\n setCategories(data);\n setIsCategoriesLoaded(true);\n });\n }, [fetchCategories]);\n\n useEffect(() => {\n if (!isCategoriesLoaded) return;\n\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 } else {\n setLoading(false);\n }\n }, [categories, selectedTab, fetchProducts, isCategoriesLoaded]);\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} $hasCategories={categories.length > 0}>\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\nconst getMinHeight = ({ isMobile, $hasCategories }: { isMobile?: boolean; $hasCategories?: boolean }) => {\n if (isMobile) return 'auto';\n return $hasCategories ? '800px' : 'auto';\n};\n\nexport const ProductTabCarouselContainer = styled('div')<{ isMobile?: boolean; $hasCategories?: 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: ${getMinHeight};\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 readonly totalSavings?: string;\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 totalSavings?: 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 = (\n showBadges: boolean,\n expirationDate: string,\n isMobile: boolean,\n hasWhiteBackground: boolean,\n totalSavings?: string,\n) => {\n if (!showBadges || (!expirationDate && !totalSavings)) 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 {totalSavings && (\n <Badge\n className={`${badgeClass} total-savings-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\n <BadgeValue className=\"badge-value\">{totalSavings}</BadgeValue>\n </Badge>\n )}\n {expirationDate && (\n <Badge\n className={`${badgeClass} expiration-badge`}\n hasWhiteBackground={hasWhiteBackground}\n tabIndex={0}\n >\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, totalSavings } = props;\n\n return (\n <Box className=\"content-mobile\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title-mobile\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text-mobile\">\n {socialTitleText}\n </Typography>\n {email?.trim() && renderContactLink('email', email, 'email-text-mobile')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text-mobile')}\n <Box className=\"social-icons-mobile\">{renderSocialMediaIcons}</Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\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, totalSavings } =\n props;\n\n return (\n <Box className=\"content\">\n <Typography component=\"h1\" tabIndex={shopTitle?.trim() ? 0 : -1} className=\"body-title\">\n {shopTitle}\n </Typography>\n {!isScrolled && (\n <>\n {shopDescription?.length > 480 ? (\n <Tooltip title={shopDescription} arrow>\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n </Tooltip>\n ) : (\n <Typography tabIndex={shopDescription?.trim() ? 0 : -1} className=\"body-text\">\n {shopDescription}\n </Typography>\n )}\n <Box className=\"social-media\">\n <Typography tabIndex={socialTitleText?.trim() ? 0 : -1} className=\"social-title-text\">\n {socialTitleText}\n </Typography>\n <Box className=\"social-icons\">\n {renderSocialMediaIcons}\n {email?.trim() && renderContactLink('email', email, 'email-text')}\n {phone?.trim() && renderContactLink('phone', phone, 'phone-text')}\n </Box>\n </Box>\n {renderBadges(showBadges, expirationDate ?? '', isMobile, hasWhiteBackground, totalSavings)}\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 totalSavings,\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 = {\n shopTitle,\n shopDescription,\n socialTitleText,\n email,\n phone,\n showBadges,\n expirationDate,\n totalSavings,\n };\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 '&.total-savings-badge': {\n backgroundColor: '#4A6987',\n border: 'none',\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\n backdropFilter: 'none',\n '.badge-value': {\n color: '#FFFFFF',\n },\n '&:hover': {\n backgroundColor: '#4A6987',\n transform: 'none',\n boxShadow: 'none',\n },\n },\n\n '&.expiration-badge': {\n borderRadius: '8px',\n padding: '8px 16px',\n gap: '4px',\n minHeight: '32px',\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: 20px;\n width: 100%;\n box-sizing: border-box;\n padding: 16px;\n\n @media (min-width: 768px) {\n gap: 24px;\n padding: 20px;\n }\n\n @media (min-width: 1080px) {\n gap: 24px;\n padding: 24px;\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 LanguageIcon from '@mui/icons-material/Language';\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, MarketFilterOption, DashboardStats } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { useMarketOptions } from '../utils/marketOptions';\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\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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 markets,\n onDateRangeChange,\n onMarketChange,\n}) => {\n const marketOptions = useMarketOptions(markets);\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;\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.dateRange.label)}\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.market.label)}</FilterLabel>\n <FilterIcon aria-hidden=\"true\">\n <LanguageIcon />\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)} ${\n marketOptions.find((opt) => opt.value === market)?.label ?? String(market)\n }`}\n >\n {marketOptions.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\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: 12px 16px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 12px;\n min-height: auto;\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: 16px 20px;\n gap: 16px;\n }\n\n @media (min-width: 1080px) {\n padding: 16px 24px;\n gap: 20px;\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: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n\n @media (min-width: 1080px) {\n font-size: 16px;\n }\n`;\n\nexport const DateRangeLabel = styled('div')`\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 16px;\n }\n`;\n\nexport const FiltersSection = styled('div')`\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 24px;\n width: 100%;\n flex-shrink: 0;\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\n// Kept in the DOM (visually hidden) so the select stays labelled for assistive tech.\nexport const FilterLabel = styled('label')`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: 0 !important;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n`;\n\nexport const StyledSelect = styled('select')`\n min-width: 120px;\n height: 32px;\n padding: 6px 24px 6px 8px;\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 white-space: nowrap;\n flex-shrink: 0;\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 background-position: right 8px center;\n }\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 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: nowrap;\n gap: 24px;\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","export type TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport type TranslateFn = (key: string, fallback: string) => string;\n\nlet activeResolver: TranslateFn | undefined;\n\nexport function setTranslationResolver(resolver: TranslateFn | undefined): void {\n activeResolver = resolver;\n}\n\nexport function getTranslationResolver(): TranslateFn | undefined {\n return activeResolver;\n}\n\nexport function resolveTranslation(entry: TranslationEntry): string {\n if (!activeResolver) {\n return entry.fallback;\n }\n let result: string | undefined;\n try {\n result = activeResolver(entry.key, entry.fallback);\n } catch {\n result = undefined;\n }\n return typeof result === 'string' && result.length > 0 ? result : entry.fallback;\n}\n","import { resolveTranslation } from './translationResolver';\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 visits: {\n key: 'shoppingDashboard.stats.visits',\n fallback: 'Site Visits',\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\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 },\n\n productSort: {\n label: {\n key: 'shoppingDashboard.filter.productSort.label',\n fallback: 'Sort By',\n },\n },\n signupView: {\n label: {\n key: 'shoppingDashboard.filter.signupView.label',\n fallback: 'Show',\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 conversionType: {\n standard: {\n key: 'shoppingDashboard.filter.conversionType.standard',\n fallback: 'Standard',\n },\n subscription: {\n key: 'shoppingDashboard.filter.conversionType.subscription',\n fallback: 'Subscription',\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 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 rank: {\n key: 'shoppingDashboard.widget.topProducts.rank',\n fallback: 'Rank',\n },\n },\n conversionRate: {\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 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 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 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 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 viewDetails: {\n key: 'shoppingDashboard.widget.menu.viewDetails',\n fallback: 'View Details',\n },\n exportData: {\n key: 'shoppingDashboard.widget.menu.exportData',\n fallback: 'Export Data',\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 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 customer: { key: 'shoppingDashboard.fullView.conversionRate.columns.customer', fallback: 'Customer' },\n items: { key: 'shoppingDashboard.fullView.conversionRate.columns.items', fallback: 'Items' },\n total: { key: 'shoppingDashboard.fullView.conversionRate.columns.total', fallback: 'Order Total' },\n bv: { key: 'shoppingDashboard.fullView.conversionRate.columns.bv', fallback: 'BV' },\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 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 percentOfTotal: {\n key: 'shoppingDashboard.fullView.categories.columns.percentOfTotal',\n fallback: '% of Total',\n },\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 noData: {\n key: 'shoppingDashboard.defaults.noData',\n fallback: 'No data',\n },\n noChange: {\n key: 'shoppingDashboard.defaults.noChange',\n fallback: 'No change',\n },\n byRevenue: {\n key: 'shoppingDashboard.defaults.byRevenue',\n fallback: 'By: Revenue',\n },\n byUnits: {\n key: 'shoppingDashboard.defaults.byUnits',\n fallback: 'By: Units',\n },\n byVolume: {\n key: 'shoppingDashboard.defaults.byVolume',\n fallback: 'By: Volume',\n },\n byTrend: {\n key: 'shoppingDashboard.defaults.byTrend',\n fallback: 'By: Trend',\n },\n all: {\n key: 'shoppingDashboard.defaults.all',\n fallback: 'All',\n },\n members: {\n key: 'shoppingDashboard.defaults.members',\n fallback: 'Members',\n },\n retail: {\n key: 'shoppingDashboard.defaults.retail',\n fallback: 'Retail',\n },\n brandAffiliates: {\n key: 'shoppingDashboard.defaults.brandAffiliates',\n fallback: 'Brand Affiliates',\n },\n revenue: {\n key: 'shoppingDashboard.defaults.revenue',\n fallback: 'Revenue',\n },\n units: {\n key: 'shoppingDashboard.defaults.units',\n fallback: 'Units',\n },\n volume: {\n key: 'shoppingDashboard.defaults.volume',\n fallback: 'Volume',\n },\n conversionRate: {\n key: 'shoppingDashboard.defaults.conversionRate',\n fallback: 'Conversion Rate',\n },\n trend: {\n key: 'shoppingDashboard.defaults.trend',\n fallback: 'Trend',\n },\n date: {\n key: 'shoppingDashboard.defaults.date',\n fallback: 'Date',\n },\n type: {\n key: 'shoppingDashboard.defaults.type',\n fallback: 'Type',\n },\n dcSv: {\n key: 'shoppingDashboard.defaults.dcSv',\n fallback: 'DC-SV',\n },\n },\n} as const;\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import { useMemo } from 'react';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport type { MarketFilterOption } from '../types.d';\n\nexport function buildDefaultMarketOptions(): MarketFilterOption[] {\n return [{ value: 'all', label: getTranslation(Keys.filter.market.all) }];\n}\n\nexport function resolveMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n if (markets && markets.length > 0) {\n return markets;\n }\n return buildDefaultMarketOptions();\n}\n\nexport function useMarketOptions(\n markets: ReadonlyArray<MarketFilterOption> | undefined,\n): ReadonlyArray<MarketFilterOption> {\n return useMemo(() => resolveMarketOptions(markets), [markets]);\n}\n","import React from 'react';\nimport ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport {\n StatsCardContainer,\n StatsTitle,\n StatsValueContainer,\n StatsValue,\n StatsSubtitle,\n ValueSubtitleWrapper,\n TrendContainer,\n TrendText,\n StatsCardHeader,\n SplitTitle,\n SplitRow,\n LegendColumn,\n SplitTrend,\n LegendCaption,\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 caption?: string;\n readonly layout?: 'default' | 'split';\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 caption,\n layout = 'default',\n trendDirection = 'neutral',\n trendValue,\n testId,\n isLoading = false,\n}) => {\n if (isLoading) {\n return (\n <StatsCardContainer $layout={layout} 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 const getTrendChartIcon = (iconSize: string) => {\n if (trendDirection === 'up') {\n return <TrendingUpIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n if (trendDirection === 'down') {\n return <TrendingDownIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: iconSize }} aria-hidden=\"true\" />;\n };\n\n if (layout === 'split') {\n return (\n <StatsCardContainer as=\"article\" $layout=\"split\" aria-label={`${title}: ${value}`} data-testid={testId}>\n <SplitTitle id={`stats-title-${testId}`}>{title}</SplitTitle>\n <SplitRow>\n <StatsValue aria-describedby={`stats-title-${testId}`} data-testid={`stats-value-${testId}`}>\n {value}\n </StatsValue>\n {(trendValue ?? caption) && (\n <LegendColumn>\n {trendValue && (\n <SplitTrend\n as=\"output\"\n direction={trendDirection}\n aria-live=\"polite\"\n aria-label={getTrendAriaLabel()}\n data-testid={`stats-trend-${testId}`}\n >\n {getTrendChartIcon('18px')}\n <TrendText>{trendValue}</TrendText>\n </SplitTrend>\n )}\n {caption && (\n <LegendCaption data-testid={`stats-caption-${testId}`}>{caption}</LegendCaption>\n )}\n </LegendColumn>\n )}\n </SplitRow>\n </StatsCardContainer>\n );\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 </StatsCardHeader>\n\n <StatsValueContainer>\n <ValueSubtitleWrapper>\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 </ValueSubtitleWrapper>\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 {getTrendChartIcon('16px')}\n <TrendText>{trendValue}</TrendText>\n </TrendContainer>\n )}\n </StatsValueContainer>\n </StatsCardContainer>\n );\n};\n\nexport const StatsCard = React.memo(StatsCardComponent);\nStatsCard.displayName = 'StatsCard';\n","import { ColorUtils, styled } from '@nuskin/foundation-theme';\n\nconst { getGenomeColor } = ColorUtils;\n\nexport const StatsCardContainer = styled('div')<{ $layout?: 'default' | 'split' }>`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n box-sizing: border-box;\n gap: ${({ $layout }) => ($layout === 'split' ? '8px' : '0')};\n padding: ${({ $layout }) => ($layout === 'split' ? '12px' : '10px')};\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border: 1px solid ${({ theme }) => getGenomeColor(theme, 'N30')};\n border-radius: 8px;\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\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: ${({ $layout }) => ($layout === 'split' ? '16px' : '12px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n\n @media (min-width: 1080px) {\n padding: ${({ $layout }) => ($layout === 'split' ? '16px' : '14px')};\n min-height: ${({ $layout }) => ($layout === 'split' ? '110px' : 'auto')};\n }\n`;\n\nexport const SplitTitle = styled('div')`\n width: 100%;\n font-size: 16px;\n font-weight: 400;\n line-height: 1.4;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n`;\n\nexport const SplitRow = styled('div')`\n display: flex;\n align-items: flex-end;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n`;\n\nexport const LegendColumn = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;\n gap: 2px;\n`;\n\nexport const SplitTrend = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n flex-shrink: 0;\n color: ${({ theme, direction }) => {\n if (direction === 'up') return '#066100';\n if (direction === 'down') return '#9b131a';\n return getGenomeColor(theme, 'N70');\n }};\n\n svg {\n width: 24px;\n height: 24px;\n }\n`;\n\nexport const LegendCaption = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n letter-spacing: 0.12px;\n text-align: right;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n`;\n\nexport const StatsTitle = styled('div')`\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n letter-spacing: 0;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin-bottom: 2px;\n text-transform: capitalize;\n\n @media (min-width: 768px) {\n font-size: 14px;\n margin-bottom: 4px;\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 justify-content: space-between;\n gap: 2px;\n margin-top: 10px;\n width: 100%;\n`;\n\nexport const StatsValue = styled('div')`\n font-size: 20px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\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 ValueSubtitleWrapper = styled('div')`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n`;\n\nexport const StatsSubtitle = styled('div')`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n padding-bottom: 0;\n\n @media (min-width: 768px) {\n font-size: 12px;\n }\n`;\n\nexport const TrendContainer = styled('div')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n flex-direction: row;\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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 ShowChartIcon from '@mui/icons-material/ShowChart';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { getTrendDirectionLabel } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\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 readonly onExport?: () => void;\n}\n\nconst TopSellingProductsListComponent: React.FC<TopSellingProductsListProps> = ({\n products,\n productSort,\n isLoading = false,\n maxProducts = 5,\n onSortChange,\n onTitleClick,\n onExport,\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 formatMoney(product.revenue, product.currencyCode);\n case 'volume':\n return `${product.volume.toLocaleString()} ${getTranslation(Keys.defaults.dcSv)}`;\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 `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n case 'revenue':\n return `${product.unitsSold.toLocaleString()} ${getTranslation(Keys.widget.topProducts.unitsSuffix)}`;\n case 'volume':\n return `${formatMoney(product.revenue, product.currencyCode)} ${getTranslation(Keys.widget.topProducts.revenueSuffix)}`;\n default:\n return `${formatMoney(product.revenue, product.currencyCode)} ${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 getTrendChartIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return <ShowChartIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n };\n\n const displayedProducts = products.slice(0, maxProducts);\n const rankLabel = getTranslation(Keys.widget.topProducts.rank);\n const trendLabel = getTranslation(Keys.defaults.trend);\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.defaults.byUnits)}</option>\n <option value=\"revenue\">{getTranslation(Keys.defaults.byRevenue)}</option>\n <option value=\"volume\">{getTranslation(Keys.defaults.byVolume)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-products\" onFullView={onTitleClick} onExport={onExport} />\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 {getTrendChartIcon(trendDirection)}\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 React from 'react';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport RemoveIcon from '@mui/icons-material/Remove';\nimport type { TrendDirection } from '../shared/types';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport function 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 function resolveTrendDirection(value?: string): TrendDirection {\n const parsedValue = parseTrendPercent(value);\n if (parsedValue === null) return 'neutral';\n if (parsedValue > 0) return 'up';\n if (parsedValue < 0) return 'down';\n return 'neutral';\n}\n\nexport function calculateWeightedRevenueTrend<T>(\n items: readonly T[],\n getRevenue: (item: T) => number,\n getTrend: (item: T) => string | undefined,\n): { direction: TrendDirection; formatted: string } {\n const { weightedSum, weight } = items.reduce(\n (accumulator, item) => {\n const trendValue = parseTrendPercent(getTrend(item));\n if (trendValue === null) return accumulator;\n return {\n weightedSum: accumulator.weightedSum + trendValue * getRevenue(item),\n weight: accumulator.weight + getRevenue(item),\n };\n },\n { weightedSum: 0, weight: 0 },\n );\n\n const average = weight > 0 ? weightedSum / weight : 0;\n let direction: TrendDirection = 'neutral';\n if (average > 0) direction = 'up';\n else if (average < 0) direction = 'down';\n\n return { direction, formatted: `${average > 0 ? '+' : ''}${average.toFixed(1)}%` };\n}\n\nexport function 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\nexport function getTrendIcon(direction: TrendDirection): React.ReactNode {\n switch (direction) {\n case 'up':\n return <ArrowUpwardIcon />;\n case 'down':\n return <ArrowDownwardIcon />;\n case 'neutral':\n default:\n return <RemoveIcon />;\n }\n}\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 { useMemo } from 'react';\n\nexport function calculateTotalPages<T>(items: T[], itemsPerPage: number): number {\n return Math.ceil(items.length / itemsPerPage);\n}\n\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\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\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\nexport function usePaginatedItems<T>(\n items: T[],\n currentPage: number,\n itemsPerPage: number,\n): { totalPages: number; pageItems: T[] } {\n const totalPages = useMemo(() => calculateTotalPages(items, itemsPerPage), [items, itemsPerPage]);\n const pageItems = useMemo(\n () => paginateItems(items, currentPage, itemsPerPage),\n [items, currentPage, itemsPerPage],\n );\n return { totalPages, pageItems };\n}\n\nexport function formatMoney(\n value: number,\n currencyCode?: string,\n locale: string = 'en-US',\n fractionDigits?: number,\n): string {\n const amount = Number.isFinite(value) ? value : 0;\n if (currencyCode) {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n ...(fractionDigits !== undefined\n ? { minimumFractionDigits: fractionDigits, maximumFractionDigits: fractionDigits }\n : { minimumFractionDigits: 0, maximumFractionDigits: 2 }),\n }).format(amount);\n } catch {}\n }\n return fractionDigits !== undefined ? `$${amount.toFixed(fractionDigits)}` : `$${amount.toLocaleString()}`;\n}\n\nexport function capitalizeFirstLetter(text: string): string {\n if (!text || text.length === 0) return text;\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: 0;\n vertical-align: middle;\n\n @media (min-width: 768px) {\n min-width: 28px;\n height: 28px;\n font-size: 16px;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 16px;\n font-weight: 400;\n line-height: 22px;\n letter-spacing: 0;\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: 16px;\n max-width: none;\n }\n`;\n\nexport const ProductSubtitle = styled('div')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\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 FileDownloadIcon from '@mui/icons-material/FileDownload';\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 readonly onExport?: () => void;\n}\n\nexport const WidgetMenu: React.FC<WidgetMenuProps> = ({ widgetId, onFullView, onExport }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n const buttonId = `widget-menu-button-${widgetId}`;\n const menuId = `widget-menu-${widgetId}`;\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 const handleExport = () => {\n handleClose();\n if (onExport) {\n onExport();\n }\n };\n\n return (\n <>\n <StyledIconButton\n id={buttonId}\n data-testid={`widget-menu-button-${widgetId}`}\n aria-label={getTranslation(Keys.widget.menu.ariaLabel)}\n aria-controls={open ? menuId : 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={menuId}\n data-testid={`widget-menu-${widgetId}`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={{\n 'aria-labelledby': buttonId,\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-viewdetails\">\n <ListItemIcon>\n <VisibilityIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.viewDetails)}</ListItemText>\n </MenuItem>\n {onExport && (\n <MenuItem onClick={handleExport} data-testid=\"widget-menu-item-export\">\n <ListItemIcon>\n <FileDownloadIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText>{getTranslation(Keys.widget.menu.exportData)}</ListItemText>\n </MenuItem>\n )}\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 color: '#252525',\n '&:hover': {\n backgroundColor: 'rgba(37, 37, 37, 0.08)',\n },\n}));\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { WidgetMenu } from '../WidgetMenu';\nimport { getTrendIcon, getTrendDirectionLabel } 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 { formatAxisDate } from '../../utils/dateFormat';\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 summaryRate?: number;\n readonly summaryChangePct?: number | null;\n readonly onFilterChange?: (filter: ConversionFilterOption) => void;\n readonly onTitleClick?: () => void;\n readonly onExport?: () => void;\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\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 ?? 0).toFixed(2)}%</TooltipValue>\n <TooltipDetails>\n {data.orders ?? 0} {getTranslation(Keys.widget.conversionRate.tooltipOrders)} /{' '}\n {(data.siteVisits ?? 0).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 summaryRate,\n summaryChangePct,\n onFilterChange,\n onTitleClick,\n onExport,\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.defaults.noData);\n const noChangeText = getTranslation(Keys.defaults.noChange);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trendInfo = React.useMemo((): { direction: 'up' | 'down' | 'neutral'; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null || Math.abs(summaryChangePct) < 0.1) {\n return { direction: 'neutral', value: noChangeText };\n }\n const direction = summaryChangePct > 0 ? 'up' : 'down';\n const formatted = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(2)}%`;\n return { direction, value: formatted };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: noDataText };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: noChangeText };\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 }, [summaryChangePct, conversionData, noChangeText, noDataText]);\n\n const formattedData = React.useMemo(\n () => conversionData.map((item) => ({ ...item, shortDate: formatAxisDate(item.date) })),\n [conversionData],\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.defaults.conversionRate)}\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.defaults.all)}</option>\n <option value=\"standard\">{getTranslation(Keys.filter.conversionType.standard)}</option>\n <option value=\"subscription\">\n {getTranslation(Keys.filter.conversionType.subscription)}\n </option>\n </FilterDropdown>\n <WidgetMenu widgetId=\"conversion-rate\" onFullView={onTitleClick} onExport={onExport} />\n </HeaderActionsContainer>\n </TitleRow>\n </ChartHeader>\n\n <MetricDisplay>\n <MetricValue\n aria-label={`${getTranslation(Keys.defaults.conversionRate)}: ${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 <FormulaDisplay data-testid=\"conversion-formula\">\n {getTranslation(Keys.widget.conversionRate.formula)}\n </FormulaDisplay>\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 align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n padding-bottom: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\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: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\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: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\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: 8px;\n margin-top: 0;\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 type { DateRangeOption } from '../types.d';\n\nexport const DAYS_MAP: Record<DateRangeOption, number> = {\n last7days: 7,\n last30days: 30,\n last90days: 90,\n thisMonth: 31,\n};\n\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\nexport function getDaysFromDateRange(dateRange: DateRangeOption): number {\n return DAYS_MAP[dateRange] ?? 30;\n}\n\nexport function getDateRangeLabel(dateRange: DateRangeOption): string {\n return DATE_RANGE_LABELS[dateRange] ?? 'Last 30 Days';\n}\n","import type { DateRangeOption } from '../types.d';\nimport { getDateRangeLabel } from './dateConstants';\n\nexport function formatDateRangeLabel(dateRange: DateRangeOption): string {\n return getDateRangeLabel(dateRange);\n}\n\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\nconst AXIS_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\nexport function formatAxisDate(dateStr: string): string {\n const parts = dateStr.split(' ');\n if (parts.length !== 2) return dateStr;\n return `${AXIS_MONTH_MAP[parts[0]] || parts[0]}/${parts[1]}`;\n}\n\nexport function formatDisplayDate(dateStr: string): string {\n const date = new Date(dateStr);\n return formatShortDate(date);\n}\n\nexport function formatDateRange(start: string, end: string): string {\n return `${formatDisplayDate(start)} - ${formatDisplayDate(end)}`;\n}\n\nexport function formatISODate(date: Date): string {\n return date.toISOString().split('T')[0];\n}\n\n/**\n * Extract and format the date range from an array of data objects.\n * Handles various date field names: 'date', 'Date', 'dateTime', etc.\n * Falls back to calculating from dateRange option if no date data is available.\n * @param data Array of objects with date information\n * @param fallbackLabel Fallback label if no dates found\n * @returns Formatted date range string (e.g., \"May 30 - Aug 27\")\n */\nexport function getActualDateRange(data: unknown[], fallbackLabel: string = 'N/A'): string {\n if (!Array.isArray(data) || data.length === 0) return fallbackLabel;\n\n try {\n // Extract first and last dates from data\n const first = data[0] as Record<string, unknown>;\n const last = data[data.length - 1] as Record<string, unknown>;\n\n // Try various date field names\n const dateFieldNames = ['date', 'Date', 'dateTime', 'eventDate', 'timestamp'];\n let startDateStr: string | undefined;\n let endDateStr: string | undefined;\n\n for (const fieldName of dateFieldNames) {\n if (first[fieldName] && !startDateStr) {\n startDateStr = String(first[fieldName]);\n }\n if (last[fieldName] && !endDateStr) {\n endDateStr = String(last[fieldName]);\n }\n }\n\n if (startDateStr && endDateStr) {\n return formatDateRange(startDateStr, endDateStr);\n }\n } catch {\n // Silently fail and return fallback\n }\n\n return fallbackLabel;\n}\n\n/**\n * Calculate and format the date range based on a DateRangeOption.\n * Used for components without time-series data (e.g., TopProducts, TopCategories)\n * @param dateRangeOption The selected date range option\n * @returns Formatted date range string (e.g., \"Aug 28 - Sep 27\" for last30days)\n */\nexport function calculateDateRangeFromOption(dateRangeOption: DateRangeOption): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = today.getMonth();\n const date = today.getDate();\n\n let startDate: Date;\n let endDate = new Date(year, month, date);\n\n switch (dateRangeOption) {\n case 'last7days':\n startDate = new Date(year, month, date - 7);\n break;\n case 'last30days':\n startDate = new Date(year, month, date - 30);\n break;\n case 'last90days':\n startDate = new Date(year, month, date - 90);\n break;\n case 'thisMonth':\n startDate = new Date(year, month, 1);\n endDate = new Date(year, month + 1, 0); // Last day of current month\n break;\n default:\n return 'N/A';\n }\n\n return formatDateRange(formatISODate(startDate), formatISODate(endDate));\n}\n","import React from 'react';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport { getTrendIcon, getTrendDirectionLabel } 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 { formatAxisDate } from '../../utils/dateFormat';\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 readonly onExport?: () => void;\n}\n\nconst SERIES_COLORS = {\n total: '#3B82F6',\n members: '#7B92A8',\n retail: '#A3B5C7',\n brandAffiliates: '#CBD6E0',\n};\n\nconst CHART_MARGIN = { top: 5, right: 10, left: -10, bottom: 5 };\nconst AXIS_TICK = { fontSize: 10 };\nconst LINE_DOT = { r: 2 };\n\nconst SignupsChartComponent: React.FC<SignupsChartProps> = ({\n signupData,\n signupView,\n isLoading = false,\n title,\n onViewChange,\n onTitleClick,\n onExport,\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.defaults.noData);\n const noChangeText = getTranslation(Keys.defaults.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: formatAxisDate(item.date) })),\n [signupData],\n );\n const totalLabel = getTranslation(Keys.widget.signups.total);\n const membersLabel = getTranslation(Keys.defaults.members);\n const retailLabel = getTranslation(Keys.defaults.retail);\n const brandAffiliatesLabel = getTranslation(Keys.defaults.brandAffiliates);\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} onExport={onExport} />\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: center;\n gap: 10px;\n margin-bottom: 16px;\n flex-wrap: nowrap;\n width: 100%;\n`;\n\nexport const MetricValue = styled('div')`\n font-size: 28px;\n font-weight: 700;\n line-height: 1;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n margin: 0;\n padding: 0;\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: row;\n gap: 6px;\n align-items: center;\n padding-top: 0;\n flex-wrap: nowrap;\n white-space: nowrap;\n\n .trend-line {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n line-height: 1;\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: 13px;\n height: 13px;\n flex-shrink: 0;\n }\n .change-value {\n font-weight: 600;\n line-height: 1;\n }\n .change-percent {\n font-weight: 400;\n line-height: 1;\n }\n }\n\n .comparison-text {\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\n letter-spacing: 0.12px;\n margin: 0;\n padding: 0;\n white-space: normal;\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 justify-content: center;\n gap: 16px;\n margin-top: 16px;\n padding-top: 0;\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 TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\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 LegendValueWrapper,\n LegendTrendInline,\n DonutCenterOverlay,\n DonutCenterLabel,\n DonutCenterValue,\n DonutCenterTrend,\n EmptyState,\n EmptyStateText,\n HeaderActionsContainer,\n} from './TopCategoriesPieChart.styled';\nimport type { CategoryRevenue, CategorySortOption, TrendDirection } from '../../types.d';\nimport { CategoriesPieChartSkeleton } from '../LoadingSkeletons';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney } from '../../utils/dataUtils';\n\nexport interface TopCategoriesPieChartProps {\n readonly categories: CategoryRevenue[];\n readonly categorySort: CategorySortOption;\n readonly isLoading?: boolean;\n readonly title?: string;\n readonly summaryChangePct?: number | null;\n readonly onSortChange?: (sort: CategorySortOption) => void;\n readonly onTitleClick?: () => void;\n readonly onExport?: () => void;\n}\n\nconst TopCategoriesPieChartComponent: React.FC<TopCategoriesPieChartProps> = ({\n categories,\n categorySort,\n isLoading = false,\n title,\n summaryChangePct,\n onSortChange,\n onTitleClick,\n onExport,\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 (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) - (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\n });\n\n const nextTotalRevenue = nextSortedCategories.reduce((sum, category) => sum + category.revenue, 0);\n\n let nextTrendDirection: TrendDirection;\n let nextFormattedTrend: string;\n\n // Use the provided summaryChangePct if available, otherwise calculate from items\n if (summaryChangePct !== undefined && summaryChangePct !== null) {\n if (Math.abs(summaryChangePct) < 0.1) {\n nextFormattedTrend = '0%';\n nextTrendDirection = 'neutral';\n } else {\n nextTrendDirection = summaryChangePct > 0 ? 'up' : 'down';\n nextFormattedTrend = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%`;\n }\n } else {\n const { direction, formatted } = calculateWeightedRevenueTrend(\n nextSortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n nextTrendDirection = direction;\n nextFormattedTrend = formatted;\n }\n\n return {\n sortedCategories: nextSortedCategories,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [categories, categorySort, summaryChangePct]);\n\n const getTrendGraphIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '14px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label in the middle of the donut ring\n const radius = innerRadius + (outerRadius - innerRadius) / 2;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n fontSize=\"10\"\n fontWeight=\"600\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0.2\"\n style={{ lineHeight: '12px' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const currencyCode = sortedCategories[0]?.currencyCode;\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.defaults.byRevenue)}</option>\n <option value=\"trend\">{getTranslation(Keys.defaults.byTrend)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-categories\" onFullView={onTitleClick} onExport={onExport} />\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 label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={trendDirection}>\n {getTrendGraphIcon(trendDirection)}\n <span>{formattedTrend}</span>\n </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>\n {category.name.charAt(0).toUpperCase() + category.name.slice(1)}\n </LegendName>\n <LegendValueWrapper>\n <LegendValue>\n {formatMoney(category.revenue, category.currencyCode)} ({category.percentage}%)\n </LegendValue>\n {category.trend?.revenue ? (\n <LegendTrendInline\n direction={resolveTrendDirection(category.trend?.revenue)}\n data-testid={`category-legend-trend-${index}`}\n aria-label={category.trend.revenue}\n >\n {getTrendGraphIcon(resolveTrendDirection(category.trend?.revenue))}\n </LegendTrendInline>\n ) : null}\n </LegendValueWrapper>\n </LegendInfo>\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: 0;\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: 18px;\n font-weight: 400;\n line-height: 31.18px;\n letter-spacing: 0;\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 @media (min-width: 1080px) {\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: 20px;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n @media (min-width: 768px) {\n flex-direction: row;\n gap: 24px;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const ChartWrapper = styled('div')`\n position: relative;\n width: 100%;\n height: 220px;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n width: 260px;\n height: 260px;\n flex: 0 0 auto;\n }\n\n @media (min-width: 1080px) {\n width: 280px;\n height: 280px;\n flex: 0 0 auto;\n }\n\n /* Style recharts pie labels (percentages inside segments) */\n svg text {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n text[class*='recharts'] {\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 12px;\n font-weight: 700;\n fill: white;\n text-anchor: middle;\n dominant-baseline: middle;\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 display: flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n margin-top: 4px;\n font-size: 12px;\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 svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendContainer = styled('div')`\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex: 0 1 auto;\n\n @media (min-width: 768px) {\n gap: 10px;\n }\n`;\n\nexport const LegendItem = styled('div')`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n\n @media (min-width: 768px) {\n gap: 10px;\n padding: 6px 0;\n }\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: row;\n gap: 4px;\n flex: 1;\n min-width: 0;\n align-items: center;\n`;\n\nexport const LegendName = styled('div')`\n font-size: 13px;\n font-weight: 600;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-shrink: 0;\n\n @media (min-width: 768px) {\n font-size: 14px;\n }\n`;\n\nexport const LegendValue = styled('div')`\n font-size: 12px;\n font-weight: 500;\n color: ${({ theme }) => getGenomeColor(theme, 'N100')};\n flex-shrink: 0;\n white-space: nowrap;\n\n @media (min-width: 768px) {\n font-size: 13px;\n }\n`;\n\nexport const LegendPercentage = styled('div')`\n display: none;\n`;\n\nexport const LegendValueWrapper = styled('div')`\n display: flex;\n align-items: center;\n gap: 4px;\n flex: 1;\n min-width: 0;\n`;\n\nexport const LegendTrendInline = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const LegendTrend = styled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 16px;\n height: 16px;\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 MarketFilterOption,\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 readonly dateRange?: DateRangeOption;\n readonly market?: MarketOption;\n readonly productSort?: ProductSortOption;\n readonly signupView?: SignupViewOption;\n readonly conversionFilter?: ConversionFilterOption;\n readonly categorySort?: CategorySortOption;\n readonly categoriesSummaryChangePct?: number | null;\n\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\n readonly onProductsTitleClick?: () => void;\n readonly onConversionTitleClick?: () => void;\n readonly onSignupsTitleClick?: () => void;\n readonly onCategoriesToTitleClick?: () => void;\n\n readonly onProductsExport?: () => void;\n readonly onConversionExport?: () => void;\n readonly onSignupsExport?: () => void;\n readonly onCategoriesExport?: () => void;\n}\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 categoriesSummaryChangePct,\n markets,\n onDateRangeChange,\n onMarketChange,\n onProductSortChange,\n onSignupViewChange,\n onConversionFilterChange,\n onCategorySortChange,\n onProductsTitleClick,\n onConversionTitleClick,\n onSignupsTitleClick,\n onCategoriesToTitleClick,\n onProductsExport,\n onConversionExport,\n onSignupsExport,\n onCategoriesExport,\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 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 markets={markets}\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.defaults.volume)}\n value={stats?.metrics?.volume ?? '0'}\n subtitle={getTranslation(Keys.defaults.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.defaults.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 onExport={onProductsExport}\n />\n <SignupsChart\n signupData={resolvedSignupData}\n signupView={signupView}\n isLoading={isLoading}\n onViewChange={onSignupViewChange}\n onTitleClick={onSignupsTitleClick}\n onExport={onSignupsExport}\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 onExport={onConversionExport}\n />\n <TopCategoriesPieChart\n categories={resolvedCategories}\n categorySort={categorySort}\n isLoading={isLoading}\n summaryChangePct={categoriesSummaryChangePct}\n onSortChange={onCategorySortChange}\n onTitleClick={onCategoriesToTitleClick}\n onExport={onCategoriesExport}\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 { useTranslationResolver } from './TranslationContext';\nimport type { TranslateFn } from './TranslationKeys/translationResolver';\nimport type {\n DashboardStats,\n TopProduct,\n ConversionDataPoint,\n SignupDataPoint,\n CategoryRevenue,\n OrderHistory,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\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 categoriesSummaryChangePct?: number | null;\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 translate?: TranslateFn;\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 markets?: ReadonlyArray<MarketFilterOption>;\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 categoriesSummaryChangePct,\n orders,\n signups,\n isLoading = false,\n error,\n shopTitle,\n className,\n translate,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialSignupView = 'all',\n initialConversionFilter = 'all',\n initialCategorySort = 'revenue',\n markets,\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 useTranslationResolver(translate);\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 markets={markets}\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 markets={markets}\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 markets={markets}\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 summaryChangePct={categoriesSummaryChangePct}\n markets={markets}\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 categoriesSummaryChangePct={categoriesSummaryChangePct}\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 markets={markets}\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, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type { TopProduct, DateRangeOption, MarketOption, MarketFilterOption, ProductSortOption } from '../../types.d';\nimport { FullViewTableSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n ProductInfo,\n ProductName,\n ProductSku,\n MetricValue,\n MobileCardsContainer,\n DesktopTableContainer,\n MobileProductCard,\n MobileCardHeader,\n MobileProductRank,\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\ninterface ProductRow {\n rank: number;\n name: string;\n sku: 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 markets?: ReadonlyArray<MarketFilterOption>;\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 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 markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: productSort,\n options: [\n { value: 'units', label: getTranslation(Keys.defaults.units) },\n { value: 'revenue', label: getTranslation(Keys.defaults.revenue) },\n { value: 'volume', label: getTranslation(Keys.defaults.volume) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\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 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, pageItems: paginatedRows } = usePaginatedItems(sortedRows, currentPage, itemsPerPage);\n\n const currencyCode = products[0]?.currencyCode;\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 <ProductInfo>\n <ProductName>{row.name}</ProductName>\n <ProductSku>{row.sku}</ProductSku>\n </ProductInfo>\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.defaults.revenue),\n sortable: true,\n render: (value: unknown) => <MetricValue>{formatMoney(Number(value), currencyCode)}</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 [currencyCode],\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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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 <MobileProductDetails>\n <MobileProductName>{row.name}</MobileProductName>\n <MobileProductSku>{row.sku}</MobileProductSku>\n </MobileProductDetails>\n </MobileCardHeader>\n <MobileMetricsGrid>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.units)}</MobileMetricLabel>\n <MobileMetricValue>{row.units.toLocaleString()}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.revenue)}</MobileMetricLabel>\n <MobileMetricValue>{formatMoney(row.revenue, currencyCode)}</MobileMetricValue>\n </MobileMetricItem>\n <MobileMetricItem>\n <MobileMetricLabel>{getTranslation(Keys.defaults.volume)}</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 type { DateRangeOption, MarketOption, MarketFilterOption } from '../types.d';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../TranslationKeys/ShoppingDashboardTranslationKeys';\n\nexport type { FilterConfig } from './types';\n\ntype TranslationEntry = { readonly key: string; readonly fallback: string };\n\nexport interface DateRangeMarketKeys {\n readonly filter: {\n readonly dateRange: {\n readonly label: TranslationEntry;\n readonly last7days: TranslationEntry;\n readonly last30days: TranslationEntry;\n readonly last90days: TranslationEntry;\n readonly thisMonth: TranslationEntry;\n };\n readonly market: {\n readonly label: TranslationEntry;\n };\n };\n}\n\nexport function buildDateRangeFilter(dateRange: DateRangeOption, keys: DateRangeMarketKeys): FilterConfig {\n return {\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\nexport function buildMarketFilter(\n market: MarketOption,\n marketOptions: ReadonlyArray<MarketFilterOption>,\n keys: DateRangeMarketKeys,\n): FilterConfig {\n return {\n key: 'market',\n label: getTranslation(keys.filter.market.label),\n value: market,\n icon: 'globe',\n options: marketOptions.map((option) => ({ value: option.value, label: option.label })),\n };\n}\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`;\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 scope=\"col\"\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 }) => getGenomeColor(theme, 'N20')};\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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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","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 width: 100%;\n box-sizing: border-box;\n\n @media (max-width: 767px) {\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: row;\n align-items: center;\n padding: 16px 0;\n gap: 10px;\n flex-wrap: nowrap;\n width: 100%;\n\n @media (max-width: 767px) {\n padding: 8px 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n`;\n\nexport const MetricValue = styled(Typography)`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 32px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: 0em;\n color: ${({ theme }) => theme.palette.text.primary};\n margin: 0;\n padding: 0;\n\n @media (max-width: 767px) {\n font-size: 28px;\n line-height: 1;\n }\n`;\n\nexport const MetricTrend = styled(Box)<{ direction: 'up' | 'down' | 'neutral' }>`\n display: flex;\n align-items: center;\n gap: 4px;\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 13px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.01em;\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 flex-wrap: nowrap;\n white-space: nowrap;\n\n svg {\n font-size: 13px;\n flex-shrink: 0;\n width: 13px;\n height: 13px;\n }\n\n span {\n display: inline;\n line-height: 1;\n }\n\n @media (max-width: 767px) {\n font-size: 13px;\n line-height: 1;\n flex-wrap: nowrap;\n\n svg {\n font-size: 13px;\n width: 13px;\n height: 13px;\n }\n }\n`;\n\nexport const ComparisonText = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n @media (max-width: 767px) {\n font-size: 12px;\n line-height: 1.3;\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('h2')`\n margin: 0;\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: 90%;\n height: 450px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 250px;\n margin-bottom: 0;\n }\n`;\n\nexport const TableSection = styled(Box)<{ withCard?: boolean }>`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\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 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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 flex-direction: column;\n align-items: stretch;\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 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 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: 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-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n letter-spacing: 0;\n vertical-align: middle;\n color: ${({ theme }) => getGenomeColor(theme, 'N70')};\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 } from 'recharts';\nimport ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';\nimport ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n ConversionDataPoint,\n OrderHistory,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n ConversionFilterOption,\n} from '../../types.d';\nimport type { TrendDirection } from '../types';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport {\n PageContainer,\n MetricChartCardSection,\n MetricSection,\n MetricValue,\n MetricTrend,\n ChartSection,\n ChartTitle,\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 OrderIdColumnCell,\n ConversionTrendChartContainer,\n ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\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 markets?: ReadonlyArray<MarketFilterOption>;\n readonly isLoading?: boolean;\n readonly summaryRate?: number;\n readonly summaryChangePct?: number | null;\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 summaryRate,\n summaryChangePct,\n dateRange,\n market,\n conversionFilter,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const currentRate = React.useMemo(() => {\n if (typeof summaryRate === 'number' && Number.isFinite(summaryRate)) return summaryRate;\n return conversionData.at(-1)?.rate ?? 0;\n }, [summaryRate, conversionData]);\n\n const trend = React.useMemo((): { direction: TrendDirection; value: string } => {\n if (summaryChangePct !== undefined) {\n if (summaryChangePct === null)\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n let direction: TrendDirection = 'neutral';\n if (summaryChangePct > 0) direction = 'up';\n else if (summaryChangePct < 0) direction = 'down';\n return { direction, value: `${summaryChangePct >= 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%` };\n }\n if (conversionData.length < 2) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const latestRate = conversionData.at(-1)?.rate ?? 0;\n const previousRate = conversionData[0].rate;\n if (previousRate === 0) return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n const changePercent = ((latestRate - previousRate) / previousRate) * 100;\n if (Math.abs(changePercent) < 0.1) {\n return { direction: 'neutral', value: getTranslation(Keys.defaults.zeroTrend) };\n }\n let direction: TrendDirection = 'neutral';\n if (changePercent > 0) direction = 'up';\n else if (changePercent < 0) direction = 'down';\n return { direction, value: `${changePercent >= 0 ? '+' : ''}${changePercent.toFixed(1)}%` };\n }, [summaryChangePct, conversionData]);\n\n const getConversionFilterLabel = React.useCallback((filter: ConversionFilterOption): string => {\n if (filter === 'standard') return getTranslation(Keys.filter.conversionType.standard);\n if (filter === 'subscription') return getTranslation(Keys.filter.conversionType.subscription);\n return getTranslation(Keys.defaults.all);\n }, []);\n\n const conversionFilterLabel = React.useMemo(\n () => getConversionFilterLabel(conversionFilter),\n [conversionFilter, getConversionFilterLabel],\n );\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'customerType',\n label: getTranslation(Keys.filter.signupView.label),\n value: conversionFilter,\n options: [\n { value: 'all', label: getTranslation(Keys.defaults.all) },\n { value: 'standard', label: getTranslation(Keys.filter.conversionType.standard) },\n { value: 'subscription', label: getTranslation(Keys.filter.conversionType.subscription) },\n ],\n },\n ],\n [conversionFilter, dateRange, market, marketOptions],\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);\n else if (key === 'customerType') {\n onConversionFilterChange?.(value as ConversionFilterOption);\n setCurrentPage(1);\n }\n },\n [onConversionFilterChange, onDateRangeChange, onMarketChange],\n );\n\n const filteredOrders = React.useMemo(() => {\n if (conversionFilter === 'all') return orders;\n return orders.filter((order) => order.customerType.toLowerCase() === conversionFilter);\n }, [orders, conversionFilter]);\n\n const { totalPages, pageItems: paginatedOrders } = usePaginatedItems(filteredOrders, currentPage, itemsPerPage);\n\n const columns: ColumnDef<OrderHistory>[] = React.useMemo(\n () => [\n {\n key: 'orderId',\n label: getTranslation(Keys.fullView.conversionRate.columns.orderId),\n sortable: true,\n render: (value) => <OrderIdColumnCell>{value as React.ReactNode}</OrderIdColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.defaults.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.defaults.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, row: OrderHistory) =>\n formatMoney(Number(value), row.currencyCode, undefined, 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 === 'standard') return '#2e7d32';\n if (conversionFilter === 'subscription') 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.defaults.conversionRate)}\n dateRange={calculateDateRangeFromOption(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.defaults.conversionRate)}\n dateRange={calculateDateRangeFromOption(dateRange)}\n onBack={handleBack}\n filters={filters}\n onFilterChange={handleFilterChange}\n />\n\n <MetricChartCardSection data-testid=\"conversion-fullview-metric-chart\">\n <MetricSection>\n <div style={{ display: 'flex', alignItems: 'center', gap: '0px', flexWrap: 'wrap' }}>\n <MetricValue data-testid=\"conversion-rate-value\" style={{ marginRight: '6px' }}>\n {currentRate.toFixed(1)}%\n </MetricValue>\n <MetricTrend direction={trend.direction} data-testid=\"conversion-rate-trend\">\n {trend.direction === 'up' && <ArrowUpwardIcon />}\n {trend.direction === 'down' && <ArrowDownwardIcon />}\n <span\n style={{\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 600,\n fontSize: '14px',\n lineHeight: '20px',\n letterSpacing: '0em',\n }}\n >\n {trend.value}\n </span>\n <span\n style={{\n marginLeft: '2px',\n fontFamily: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",\n fontWeight: 400,\n fontSize: '12px',\n lineHeight: '16px',\n letterSpacing: '0.01em',\n color: '#5F5F5F',\n }}\n >\n compared to this time last month\n </span>\n </MetricTrend>\n </div>\n </MetricSection>\n\n <ChartSection>\n <ChartWithLegendWrapper>\n <ConversionTrendChartContainer data-testid=\"conversion-fullview-chart\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart data={conversionData} margin={{ top: 10, right: 10, left: 0, bottom: 0 }}>\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 <Line\n type=\"monotone\"\n dataKey=\"rate\"\n stroke={getChartColor()}\n strokeWidth={2}\n name={`${getTranslation(Keys.defaults.conversionRate)} (${conversionFilterLabel})`}\n dot={false}\n />\n </LineChart>\n </ResponsiveContainer>\n </ConversionTrendChartContainer>\n <ChartLegendContainer>\n <LegendItem style={{ color: getChartColor() }}>\n {`${getTranslation(Keys.defaults.conversionRate)} (${conversionFilterLabel})`}\n </LegendItem>\n </ChartLegendContainer>\n </ChartWithLegendWrapper>\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)} ({filteredOrders.length})\n </ChartTitle>\n {!isMobileView ? (\n <DesktopTableContainer data-testid=\"conversion-fullview-desktop-table\">\n <DataTable\n columns={columns}\n data={paginatedOrders}\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.total)}\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={filteredOrders.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 ConversionTrendChartContainer = styled(Box)`\n width: 100%;\n height: 370px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\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 ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\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\nexport const OrderIdColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { Box } from '@mui/material';\nimport { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport type {\n SignupDataPoint,\n SignupDetail,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n SignupViewOption,\n} 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 ChartWithLegendWrapper,\n ChartLegendContainer,\n LegendItem,\n NameColumnCell,\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\n/**\n * Transform API response format to SignupDataPoint array\n * Handles both direct array format and nested API response with 'daily' array\n */\nfunction normalizeSignupDataInput(input: unknown): SignupDataPoint[] {\n // If it's already an array, return it\n if (Array.isArray(input)) {\n return input;\n }\n\n // Handle API response format with 'daily' array\n const apiResponse = input as Record<string, unknown>;\n if (Array.isArray(apiResponse.daily)) {\n return (apiResponse.daily as Array<Record<string, unknown>>).map((item) => ({\n date: String(item.date ?? ''),\n total: toNumeric(item.total),\n members: toNumeric(item.members),\n retail: toNumeric(item.retail),\n brandAffiliates: toNumeric(\n item.brandAffiliates ?? item.brandAffiliate ?? item.brand_affiliates ?? item.brand_affiliate,\n ),\n }));\n }\n\n // Fallback to empty array\n return [];\n}\n\nexport interface SignupsFullViewProps {\n /**\n * Signup data - can be either:\n * 1. Direct array of SignupDataPoint (camelCase format)\n * 2. API response object with 'daily' array (snake_case format)\n */\n readonly signupData: SignupDataPoint[] | { daily?: Array<Record<string, unknown>>; [key: string]: unknown };\n readonly signups: SignupDetail[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly signupView: SignupViewOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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 markets,\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 marketOptions = useMarketOptions(markets);\n\n const normalizedSignupData = React.useMemo(() => {\n // First, transform API response format to array if needed\n const dataArray = normalizeSignupDataInput(signupData);\n\n // Then, normalize field names and values\n return dataArray.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 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((): {\n direction: 'up' | 'down' | 'neutral';\n absoluteChange: number;\n percentageChange: string;\n } => {\n if (normalizedSignupData.length < 2)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const first = normalizedSignupData[0].total;\n const last = normalizedSignupData[normalizedSignupData.length - 1].total;\n if (first <= 0)\n return {\n direction: 'neutral',\n absoluteChange: 0,\n percentageChange: getTranslation(Keys.defaults.zeroTrend),\n };\n const absoluteChange = last - first;\n const percentageChange = (absoluteChange / first) * 100;\n let direction: 'up' | 'down' | 'neutral' = 'neutral';\n if (percentageChange > 0) direction = 'up';\n else if (percentageChange < 0) direction = 'down';\n return {\n direction,\n absoluteChange: Math.round(absoluteChange),\n percentageChange: `${percentageChange >= 0 ? '+' : ''}${percentageChange.toFixed(1)}%`,\n };\n }, [normalizedSignupData, Keys]);\n\n const hasSignupTrendData = normalizedSignupData.length > 0;\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'signupView',\n label: getTranslation(Keys.filter.signupView.label),\n value: signupView,\n options: [\n { value: 'all', label: getTranslation(Keys.defaults.all) },\n { value: 'members', label: getTranslation(Keys.defaults.members) },\n { value: 'retail', label: getTranslation(Keys.defaults.retail) },\n { value: 'brandAffiliates', label: getTranslation(Keys.defaults.brandAffiliates) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\n else if (key === 'signupView') {\n onSignupViewChange?.(value as SignupViewOption);\n setCurrentPage(1);\n }\n },\n [onDateRangeChange, onMarketChange, onSignupViewChange],\n );\n\n const { totalPages, pageItems: paginatedSignups } = usePaginatedItems(signups, currentPage, itemsPerPage);\n\n const columns: ColumnDef<SignupDetail>[] = React.useMemo(\n () => [\n { key: 'id', label: getTranslation(Keys.fullView.signups.columns.id), sortable: true },\n {\n key: 'name',\n label: getTranslation(Keys.fullView.signups.columns.name),\n sortable: true,\n render: (value) => <NameColumnCell>{value as React.ReactNode}</NameColumnCell>,\n },\n { key: 'date', label: getTranslation(Keys.defaults.date), sortable: true },\n { key: 'type', label: getTranslation(Keys.defaults.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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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.direction !== 'neutral' && (\n <>\n <span style={{ fontWeight: 600, lineHeight: 1 }}>\n {trend.absoluteChange > 0 ? '+' : ''}\n {trend.absoluteChange}\n </span>\n <span style={{ fontWeight: 400, lineHeight: 1 }}>{trend.percentageChange}</span>\n </>\n )}\n {trend.direction === 'neutral' && <span>{trend.percentageChange}</span>}\n </MetricTrend>\n <ComparisonTextMobile>{getTranslation(Keys.widget.conversionRate.comparison)}</ComparisonTextMobile>\n </MetricSection>\n\n <ChartSection>\n {hasSignupTrendData ? (\n <ChartWithLegendWrapper>\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 {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.defaults.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.defaults.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.defaults.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.defaults.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.defaults.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.defaults.brandAffiliates)}\n dot={{ r: 2 }}\n connectNulls\n />\n )}\n </LineChart>\n </ResponsiveContainer>\n </SignupTrendChartContainer>\n <Box>\n {signupView === 'all' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.total }}>\n {getTranslation(Keys.widget.signups.total)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.defaults.members)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.defaults.retail)}\n </LegendItem>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.defaults.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'members' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.members }}>\n {getTranslation(Keys.defaults.members)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'retail' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.retail }}>\n {getTranslation(Keys.defaults.retail)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n {signupView === 'brandAffiliates' && (\n <ChartLegendContainer>\n <LegendItem style={{ color: SERIES_COLORS.brandAffiliates }}>\n {getTranslation(Keys.defaults.brandAffiliates)}\n </LegendItem>\n </ChartLegendContainer>\n )}\n </Box>\n </ChartWithLegendWrapper>\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 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';\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(Box)`\n width: 100%;\n height: 320px;\n margin-bottom: 0;\n\n @media (max-width: 767px) {\n height: 260px;\n }\n`;\n\nexport const ComparisonTextMobile = styled(Typography)`\n margin: 0;\n padding: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.3;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n`;\n\nexport const ChartWithLegendWrapper = styled(Box)`\n display: flex;\n flex-direction: row;\n gap: 24px;\n align-items: flex-end;\n width: 100%;\n\n @media (max-width: 767px) {\n flex-direction: column;\n gap: 12px;\n align-items: flex-start;\n }\n`;\n\nexport const ChartLegendContainer = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 0;\n margin-bottom: 40px;\n padding: 0;\n flex-shrink: 0;\n min-width: 160px;\n\n @media (max-width: 767px) {\n margin-top: 16px;\n margin-bottom: 0;\n min-width: auto;\n }\n`;\n\nexport const LegendItem = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n color: ${({ theme }) => theme.palette.text.secondary};\n white-space: nowrap;\n\n &::before {\n content: '';\n width: 12px;\n height: 12px;\n border-radius: 50%;\n flex-shrink: 0;\n background-color: currentColor;\n }\n\n @media (max-width: 767px) {\n font-size: 12px;\n }\n`;\n\nexport const NameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React, { useState } from 'react';\nimport { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts';\nimport TrendingUpIcon from '@mui/icons-material/TrendingUp';\nimport TrendingDownIcon from '@mui/icons-material/TrendingDown';\nimport { PageHeader, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney, capitalizeFirstLetter } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n CategoryRevenue,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n CategorySortOption,\n TrendDirection,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { useMarketOptions } from '../../utils/marketOptions';\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 SummaryName,\n SummaryValue,\n SummaryPercentage,\n SummaryTrendIcon,\n DesktopTableContainer,\n MobileCategoriesContainer,\n MobileCategoryCard,\n CategoryNameColumnCell,\n} from './CategoriesFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ShoppingDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ShoppingDashboardTranslationKeys';\nimport { parseTrendPercent, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\n\nexport interface CategoriesFullViewProps {\n readonly categories: CategoryRevenue[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly categorySort: CategorySortOption;\n readonly summaryChangePct?: number | null;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\nexport const CategoriesFullView: React.FC<CategoriesFullViewProps> = ({\n categories,\n dateRange,\n market,\n categorySort,\n summaryChangePct,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.filter.productSort.label),\n value: categorySort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.defaults.byRevenue) },\n { value: 'trend', label: getTranslation(Keys.defaults.byTrend) },\n ],\n },\n ],\n [categorySort, dateRange, market, marketOptions],\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);\n else if (key === 'sort') {\n onCategorySortChange?.(value as CategorySortOption);\n setCurrentPage(1);\n }\n },\n [onCategorySortChange, onDateRangeChange, onMarketChange],\n );\n\n interface CustomLabelProps {\n cx: number;\n cy: number;\n midAngle: number;\n innerRadius: number;\n outerRadius: number;\n percentage: number;\n }\n\n const renderCustomLabel = (props: CustomLabelProps) => {\n // eslint-disable-next-line react/prop-types\n const { cx, cy, midAngle, innerRadius, outerRadius, percentage } = props;\n const RADIAN = Math.PI / 180;\n // Position label more towards center of the donut ring, slightly inward\n const radius = innerRadius + (outerRadius - innerRadius) * 0.45;\n const x = cx + radius * Math.cos(-midAngle * RADIAN);\n const y = cy + radius * Math.sin(-midAngle * RADIAN);\n\n return (\n <text\n x={x}\n y={y}\n fill=\"white\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize=\"12\"\n fontWeight=\"700\"\n fontFamily=\"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\"\n letterSpacing=\"0\"\n style={{ lineHeight: '14px', pointerEvents: 'none' }}\n >\n {`${percentage}%`}\n </text>\n );\n };\n\n const getTrendIcon = (direction: TrendDirection) => {\n if (direction === 'up') {\n return <TrendingUpIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n if (direction === 'down') {\n return <TrendingDownIcon sx={{ fontSize: '16px' }} aria-hidden=\"true\" />;\n }\n return null;\n };\n\n const resolveTrendDirection = (trendValue?: string): TrendDirection => {\n if (!trendValue) return 'neutral';\n const parsed = Number.parseFloat(trendValue);\n if (Number.isNaN(parsed)) return 'neutral';\n if (parsed > 0) return 'up';\n if (parsed < 0) return 'down';\n return 'neutral';\n };\n\n const sortedCategories = React.useMemo(\n () =>\n [...categories].sort((a, b) => {\n if (categorySort === 'revenue') return b.revenue - a.revenue;\n return (\n (parseTrendPercent(b.trend?.revenue) ?? -Infinity) -\n (parseTrendPercent(a.trend?.revenue) ?? -Infinity)\n );\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 let nextTrendDirection: TrendDirection;\n let nextFormattedTrend: string;\n\n // Use the provided summaryChangePct if available, otherwise calculate from items\n if (summaryChangePct !== undefined && summaryChangePct !== null) {\n if (Math.abs(summaryChangePct) < 0.1) {\n nextFormattedTrend = '0%';\n nextTrendDirection = 'neutral';\n } else {\n nextTrendDirection = summaryChangePct > 0 ? 'up' : 'down';\n nextFormattedTrend = `${summaryChangePct > 0 ? '+' : ''}${summaryChangePct.toFixed(1)}%`;\n }\n } else {\n const { direction, formatted } = calculateWeightedRevenueTrend(\n sortedCategories,\n (category) => category.revenue,\n (category) => category.trend?.revenue,\n );\n nextTrendDirection = direction;\n nextFormattedTrend = formatted;\n }\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: nextTrendDirection,\n totalRevenueTrend: nextFormattedTrend,\n };\n }, [sortedCategories, summaryChangePct]);\n\n const topCategories = React.useMemo(() => sortedCategories.slice(0, 5), [sortedCategories]);\n\n const { totalPages, pageItems: paginatedCategories } = usePaginatedItems(\n sortedCategories,\n currentPage,\n itemsPerPage,\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 <CategoryNameColumnCell>{capitalizeFirstLetter(row.name)}</CategoryNameColumnCell>\n </SummaryItemRow>\n ),\n },\n {\n key: 'revenue',\n label: getTranslation(Keys.defaults.revenue),\n sortable: true,\n render: (value: unknown, row: CategoryRevenue) => formatMoney(Number(value), row.currencyCode),\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.defaults.trend),\n render: (_: unknown, row: CategoryRevenue) =>\n row.trend?.revenue ?? getTranslation(Keys.defaults.noValue),\n },\n ],\n [],\n );\n\n const currencyCode = sortedCategories[0]?.currencyCode;\n\n if (isLoading) {\n return (\n <PageContainer data-testid=\"categories-full-view\">\n <PageHeader\n title={getTranslation(Keys.widget.topCategories.title)}\n dateRange={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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 label={renderCustomLabel}\n labelLine={false}\n >\n {sortedCategories.map((entry) => (\n <Cell key={`cell-${entry.id}`} fill={entry.color} />\n ))}\n </Pie>\n <Tooltip formatter={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"categories-fullview-donut-center\">\n <DonutCenterLabel>{getTranslation(Keys.stats.revenue)}</DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</DonutCenterValue>\n <DonutCenterTrend direction={totalRevenueTrendDirection}>\n {getTrendIcon(totalRevenueTrendDirection)}\n <span>{totalRevenueTrend}</span>\n </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 <SummaryName>{capitalizeFirstLetter(category.name)}</SummaryName>\n <SummaryValue>{formatMoney(category.revenue, category.currencyCode)}</SummaryValue>\n <SummaryPercentage>({category.percentage}%)</SummaryPercentage>\n {category.trend?.revenue ? (\n <SummaryTrendIcon direction={resolveTrendDirection(category.trend.revenue)}>\n {getTrendIcon(resolveTrendDirection(category.trend.revenue))}\n </SummaryTrendIcon>\n ) : null}\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>\n {formatMoney(category.revenue, category.currencyCode)}\n </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, ColorUtils } from '@nuskin/foundation-theme';\nimport { styled as muiStyled } from '@mui/material/styles';\nimport { Box, Typography } from '@mui/material';\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: 32px;\n padding: 24px;\n background-color: ${({ theme }) => getGenomeColor(theme, 'N20')};\n border-radius: 8px;\n box-shadow: ${({ theme }) => theme.shadows[1]};\n align-items: center;\n justify-content: center;\n width: 100%;\n box-sizing: border-box;\n margin: 0 auto;\n\n @media (max-width: 767px) {\n flex-direction: column;\n padding: 16px;\n gap: 16px;\n align-items: flex-start;\n justify-content: flex-start;\n }\n`;\n\nexport const ChartWrapper = muiStyled(Box)`\n position: relative;\n width: 280px;\n height: 280px;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\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 display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\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 '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return theme.palette.text.secondary;\n }};\n\n svg {\n width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const SummaryContainer = muiStyled(Box)`\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 0;\n`;\n\nexport const SummaryItem = muiStyled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 8px;\n border-radius: 6px;\n transition: background-color 0.2s ease;\n white-space: nowrap;\n min-width: 0;\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: none;\n`;\n\nexport const SummaryName = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n flex-shrink: 0;\n min-width: 0;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nexport const SummaryValue = muiStyled(Typography)`\n font-size: 0.75rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.secondary};\n flex-shrink: 0;\n white-space: nowrap;\n`;\n\nexport const SummaryPercentage = muiStyled(Typography)`\n font-size: 0.8125rem;\n font-weight: 500;\n flex-shrink: 0;\n color: ${({ theme }) => theme.palette.text.primary};\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\nexport const SummaryTrendIcon = muiStyled('span')<{ direction: 'up' | 'down' | 'neutral' }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: ${({ direction }) => {\n if (direction === 'up') return '#2e7d32';\n if (direction === 'down') return '#d32f2f';\n return '#757575';\n }};\n\n svg {\n width: 14px;\n height: 14px;\n font-size: 14px;\n }\n`;\n\nexport const CategoryNameColumnCell = styled('span')`\n font-family:\n 'Inter',\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n sans-serif;\n font-weight: 600;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0%;\n vertical-align: middle;\n color: #252525;\n`;\n","import React from 'react';\nimport {\n resolveTranslation,\n setTranslationResolver,\n type TranslateFn,\n type TranslationEntry,\n} from './TranslationKeys/translationResolver';\n\nexport function useTranslationResolver(translate?: TranslateFn): void {\n setTranslationResolver(translate);\n\n React.useEffect(() => {\n setTranslationResolver(translate);\n return () => {\n setTranslationResolver(undefined);\n };\n }, [translate]);\n}\n\nexport interface TranslationProviderProps {\n readonly translate?: TranslateFn;\n readonly children?: React.ReactNode;\n}\n\nexport const TranslationProvider: React.FC<TranslationProviderProps> = ({ translate, children }) => {\n useTranslationResolver(translate);\n return children ?? null;\n};\n\nexport function useTranslation(): (entry: TranslationEntry) => string {\n return React.useCallback((entry: TranslationEntry) => resolveTranslation(entry), []);\n}\n\nexport type { TranslateFn, TranslationEntry };\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: flex-start;\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 LegendTrend,\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';\nimport { getTrendIcon, resolveTrendDirection, calculateWeightedRevenueTrend } from '../../utils/trendUtils';\nimport { formatMoney, capitalizeFirstLetter } from '../../utils/dataUtils';\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 readonly onExport?: () => void;\n}\n\nconst TopPerformingOffersPieChartComponent: React.FC<TopPerformingOffersPieChartProps> = ({\n offers,\n offerSort,\n isLoading = false,\n title,\n onSortChange,\n onTitleClick,\n onExport,\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 { direction: nextTrendDirection, formatted: nextFormattedTrend } = calculateWeightedRevenueTrend(\n nextSortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n sortedOffers: nextSortedOffers,\n totalRevenue: nextTotalRevenue,\n trendDirection: nextTrendDirection,\n formattedTrend: nextFormattedTrend,\n };\n }, [offers, offerSort]);\n\n const currencyCode = sortedOffers[0]?.currencyCode;\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.defaults.byRevenue)}</option>\n <option value=\"units\">{getTranslation(Keys.defaults.byUnits)}</option>\n </SortDropdown>\n <WidgetMenu widgetId=\"top-offers\" onFullView={onTitleClick} onExport={onExport} />\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={(value: number) => formatMoney(value, currencyCode)} />\n </PieChart>\n </ResponsiveContainer>\n <DonutCenterOverlay data-testid=\"top-offers-donut-center\">\n <DonutCenterLabel>\n {getTranslation(Keys.widget.topPerformingOffers.totalRevenue)}\n </DonutCenterLabel>\n <DonutCenterValue>{formatMoney(totalRevenue, currencyCode)}</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 const legendTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <LegendItem key={offer.id} data-testid={`offer-legend-${index}`}>\n <LegendColor color={offer.color} />\n <LegendInfo>\n <LegendName>{capitalizeFirstLetter(offer.name)}</LegendName>\n <LegendValue>{formatMoney(offer.revenue, offer.currencyCode)}</LegendValue>\n </LegendInfo>\n <LegendPercentage>{offer.percentage}%</LegendPercentage>\n {offer.trend?.revenue ? (\n <LegendTrend\n direction={legendTrendDirection}\n data-testid={`offer-legend-trend-${index}`}\n aria-label={offer.trend.revenue}\n >\n {getTrendIcon(legendTrendDirection)}\n </LegendTrend>\n ) : null}\n </LegendItem>\n );\n })}\n </LegendContainer>\n </ChartAndLegendContainer>\n </CategoriesContainer>\n );\n};\n\nexport const TopPerformingOffersPieChart = React.memo(TopPerformingOffersPieChartComponent);\nTopPerformingOffersPieChart.displayName = 'TopPerformingOffersPieChart';\n","import { resolveTranslation } from './translationResolver';\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 byRevenue: { key: 'productOfferDashboard.defaults.byRevenue', fallback: 'Revenue' },\n byUnits: { key: 'productOfferDashboard.defaults.byUnits', fallback: 'Units' },\n byVolume: { key: 'productOfferDashboard.defaults.byVolume', fallback: 'Volume' },\n },\n} as const;\n\nexport function getTranslation(entry: TranslationEntry): string {\n return resolveTranslation(entry);\n}\n","import React from 'react';\nimport type { TopPerformingOffer, TopProduct } from '../types.d';\nimport { exportTopPerformingOffers, exportTopProducts } from '../utils/productOfferExport';\n\nexport interface ProductOfferWidgetExportOptions {\n readonly topProducts: readonly TopProduct[];\n readonly topOffers: readonly TopPerformingOffer[];\n readonly topProductsExportData?: readonly TopProduct[];\n readonly topOffersExportData?: readonly TopPerformingOffer[];\n readonly showTopProductsExportOption?: boolean;\n readonly showTopOffersExportOption?: boolean;\n readonly isLoading?: boolean;\n}\n\nexport interface ProductOfferWidgetExportHandlers {\n readonly onTopProductsExport?: () => Promise<void>;\n readonly onTopOffersExport?: () => Promise<void>;\n}\n\nexport function useProductOfferWidgetExports({\n topProducts,\n topOffers,\n topProductsExportData,\n topOffersExportData,\n showTopProductsExportOption = true,\n showTopOffersExportOption = true,\n isLoading = false,\n}: ProductOfferWidgetExportOptions): ProductOfferWidgetExportHandlers {\n const productRows = topProductsExportData ?? topProducts;\n const offerRows = topOffersExportData ?? topOffers;\n\n const canExportProducts = showTopProductsExportOption && !isLoading && productRows.length > 0;\n const canExportOffers = showTopOffersExportOption && !isLoading && offerRows.length > 0;\n\n const onTopProductsExport = React.useCallback(() => exportTopProducts(productRows), [productRows]);\n const onTopOffersExport = React.useCallback(() => exportTopPerformingOffers(offerRows), [offerRows]);\n\n return {\n onTopProductsExport: canExportProducts ? onTopProductsExport : undefined,\n onTopOffersExport: canExportOffers ? onTopOffersExport : undefined,\n };\n}\n","export type ExcelCellValue = string | number | boolean | Date | null | undefined;\n\nexport interface ExcelExportColumn<TItem> {\n readonly header: string;\n readonly value: (item: TItem) => ExcelCellValue;\n}\n\nexport interface ExcelExportOptions<TItem> {\n readonly rows: readonly TItem[];\n readonly columns: readonly ExcelExportColumn<TItem>[];\n readonly fileName: string;\n readonly sheetName: string;\n}\n\nconst INVALID_SHEET_NAME_CHARS = /[\\\\/?*[\\]:]/g;\nconst MAX_SHEET_NAME_LENGTH = 31;\n\nexport function normalizeExcelFileName(fileName: string): string {\n const trimmedFileName = fileName.trim();\n const resolvedFileName = trimmedFileName.length > 0 ? trimmedFileName : 'export';\n return resolvedFileName.toLowerCase().endsWith('.xlsx') ? resolvedFileName : `${resolvedFileName}.xlsx`;\n}\n\nexport function normalizeExcelSheetName(sheetName: string): string {\n const normalizedSheetName = sheetName.replace(INVALID_SHEET_NAME_CHARS, ' ').trim();\n const resolvedSheetName = normalizedSheetName.length > 0 ? normalizedSheetName : 'Export';\n return resolvedSheetName.slice(0, MAX_SHEET_NAME_LENGTH);\n}\n\nexport async function exportRowsToExcel<TItem>({\n rows,\n columns,\n fileName,\n sheetName,\n}: ExcelExportOptions<TItem>): Promise<void> {\n const xlsx = await import('xlsx');\n const worksheetRows = rows.map((row) => {\n const worksheetRow: Record<string, ExcelCellValue> = {};\n\n columns.forEach((column) => {\n worksheetRow[column.header] = column.value(row) ?? '';\n });\n\n return worksheetRow;\n });\n\n const worksheet = xlsx.utils.json_to_sheet(worksheetRows);\n const workbook = xlsx.utils.book_new();\n\n xlsx.utils.book_append_sheet(workbook, worksheet, normalizeExcelSheetName(sheetName));\n xlsx.writeFile(workbook, normalizeExcelFileName(fileName));\n}\n","import type { TopPerformingOffer, TopProduct } from '../types.d';\nimport type { ExcelExportColumn } from './excelExport';\nimport { exportRowsToExcel } from './excelExport';\n\nconst topProductColumns: readonly ExcelExportColumn<TopProduct>[] = [\n { header: 'Rank', value: (product) => product.rank },\n { header: 'Product ID', value: (product) => product.id },\n { header: 'Product Name', value: (product) => product.name },\n { header: 'Units Sold', value: (product) => product.unitsSold },\n { header: 'Total Revenue', value: (product) => product.revenue },\n { header: 'Currency', value: (product) => product.currencyCode },\n { header: 'Volume DC-SV', value: (product) => product.volume },\n { header: 'Trend', value: (product) => product.trend?.units ?? product.trend?.revenue ?? product.trend?.volume },\n];\n\nconst topOfferColumns: readonly ExcelExportColumn<TopPerformingOffer>[] = [\n { header: 'Offer ID', value: (offer) => offer.id },\n { header: 'Offer Name', value: (offer) => offer.name },\n { header: 'Total Revenue', value: (offer) => offer.revenue },\n { header: 'Currency', value: (offer) => offer.currencyCode },\n { header: 'Total Volume', value: (offer) => offer.volume ?? offer.units },\n { header: 'Share %', value: (offer) => offer.percentage },\n { header: 'Trend', value: (offer) => offer.trend?.revenue ?? offer.trend?.units },\n];\n\nexport function exportTopProducts(rows: readonly TopProduct[]): Promise<void> {\n return exportRowsToExcel({\n rows,\n columns: topProductColumns,\n fileName: 'top-selling-products',\n sheetName: 'Top Selling Products',\n });\n}\n\nexport function exportTopPerformingOffers(offers: readonly TopPerformingOffer[]): Promise<void> {\n return exportRowsToExcel({\n rows: offers,\n columns: topOfferColumns,\n fileName: 'top-performing-offers',\n sheetName: 'Top Performing Offers',\n });\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 { useProductOfferWidgetExports } from './hooks/useProductOfferWidgetExports';\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\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 conversionSummaryRate,\n conversionSummaryChangePct,\n topProductsExportData,\n topOffersExportData,\n showTopProductsExportOption = true,\n showTopOffersExportOption = true,\n markets,\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 const { onTopProductsExport, onTopOffersExport } = useProductOfferWidgetExports({\n topProducts: resolvedTopProducts,\n topOffers: resolvedTopOffers,\n topProductsExportData,\n topOffersExportData,\n showTopProductsExportOption,\n showTopOffersExportOption,\n isLoading,\n });\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 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 markets={markets}\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 summaryRate={conversionSummaryRate}\n summaryChangePct={conversionSummaryChangePct}\n onFilterChange={onConversionFilterChange}\n onTitleClick={onConversionTitleClick}\n />\n <StatsCardStack data-testid=\"stats-card-stack\">\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.revenue)}\n value={stats?.metrics?.revenue ?? '$0'}\n trendDirection={getTrendDirection(stats?.trend?.revenue)}\n trendValue={stats?.trend?.revenue}\n caption={getTranslation(Keys.stats.comparedTo)}\n testId=\"stats-card-revenue\"\n isLoading={isLoading}\n />\n <StatsCard\n layout=\"split\"\n title={getTranslation(Keys.stats.offersPurchased)}\n value={stats?.metrics?.offersPurchased ?? '0'}\n trendDirection={getTrendDirection(stats?.trend?.offersPurchased)}\n trendValue={stats?.trend?.offersPurchased}\n caption={getTranslation(Keys.stats.comparedTo)}\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 onExport={onTopProductsExport}\n />\n <TopPerformingOffersPieChart\n offers={resolvedTopOffers}\n offerSort={offerSort}\n isLoading={isLoading}\n onSortChange={onOfferSortChange}\n onTitleClick={onOffersTitleClick}\n onExport={onTopOffersExport}\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 { useTranslationResolver } from './TranslationContext';\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\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 conversionSummaryRate,\n conversionSummaryChangePct,\n conversionFullViewData,\n conversionFullViewRate,\n conversionFullViewChangePct,\n topProductsExportData,\n topOffersExportData,\n showTopProductsExportOption = true,\n showTopOffersExportOption = true,\n initialDateRange = 'last30days',\n initialMarket = 'all',\n initialProductSort = 'units',\n initialConversionFilter = 'all',\n initialOfferSort = 'revenue',\n markets,\n translate,\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 useTranslationResolver(translate);\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 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 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 if (currentView === 'products') {\n return (\n <ProductsFullView\n products={resolvedAllProducts}\n dateRange={dateRange}\n market={market}\n productSort={productSort}\n markets={markets}\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={conversionFullViewData ?? resolvedConversionData}\n orders={resolvedOrders}\n summaryRate={conversionFullViewRate ?? conversionSummaryRate}\n summaryChangePct={conversionFullViewChangePct ?? conversionSummaryChangePct}\n dateRange={dateRange}\n market={market}\n conversionFilter={conversionFilter}\n markets={markets}\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 markets={markets}\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 conversionSummaryRate={conversionSummaryRate}\n conversionSummaryChangePct={conversionSummaryChangePct}\n topProductsExportData={topProductsExportData}\n topOffersExportData={topOffersExportData}\n showTopProductsExportOption={showTopProductsExportOption}\n showTopOffersExportOption={showTopOffersExportOption}\n markets={markets}\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, buildDateRangeFilter, buildMarketFilter, type FilterConfig } from '../PageHeader';\nimport { DataTable, type ColumnDef } from '../DataTable';\nimport { Pagination } from '../Pagination';\nimport { usePaginatedItems, formatMoney } from '../../utils/dataUtils';\nimport { calculateDateRangeFromOption } from '../../utils/dateFormat';\nimport type {\n TopPerformingOffer,\n DateRangeOption,\n MarketOption,\n MarketFilterOption,\n OfferSortOption,\n} from '../../types.d';\nimport { FullViewChartSkeleton } from '../LoadingSkeletons';\nimport { useMarketOptions } from '../../utils/marketOptions';\nimport { PageContainer, TableSection, ChartTitle, EmptyStateText } from '../FullViewComponents.styled';\nimport { SummaryItemRow } 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 SummaryTrend,\n TableTrendCell,\n DesktopTableContainer,\n MobileOffersContainer,\n MobileOfferCard,\n MobileOfferHeader,\n MobileOfferName,\n MobileOfferMetricsGrid,\n MobileOfferMetricItem,\n MobileOfferMetricLabel,\n MobileOfferMetricValue,\n MobileOfferTrendValue,\n} from './TopPerformingOffersFullView.styled';\nimport { useIsMobileViewport } from '../useViewport';\nimport {\n getTranslation,\n ProductOfferDashboardTranslationKeys as Keys,\n} from '../../TranslationKeys/ProductOfferDashboardTranslationKeys';\nimport {\n getTrendIcon,\n parseTrendPercent,\n resolveTrendDirection,\n calculateWeightedRevenueTrend,\n} from '../../utils/trendUtils';\n\nexport interface TopPerformingOffersFullViewProps {\n readonly offers: TopPerformingOffer[];\n readonly dateRange: DateRangeOption;\n readonly market: MarketOption;\n readonly offerSort: OfferSortOption;\n readonly markets?: ReadonlyArray<MarketFilterOption>;\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\nexport const TopPerformingOffersFullView: React.FC<TopPerformingOffersFullViewProps> = ({\n offers,\n dateRange,\n market,\n offerSort,\n markets,\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 marketOptions = useMarketOptions(markets);\n\n const filters: FilterConfig[] = React.useMemo(\n () => [\n buildDateRangeFilter(dateRange, Keys),\n buildMarketFilter(market, marketOptions, Keys),\n {\n key: 'sort',\n label: getTranslation(Keys.defaults.byRevenue),\n value: offerSort,\n options: [\n { value: 'revenue', label: getTranslation(Keys.defaults.byRevenue) },\n { value: 'units', label: getTranslation(Keys.defaults.byUnits) },\n ],\n },\n ],\n [dateRange, market, marketOptions, 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);\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 { direction, formatted } = calculateWeightedRevenueTrend(\n sortedOffers,\n (offer) => offer.revenue,\n (offer) => offer.trend?.revenue,\n );\n\n return {\n totalRevenue: nextTotalRevenue,\n totalRevenueTrendDirection: direction,\n totalRevenueTrend: formatted,\n };\n }, [sortedOffers]);\n\n const topOffers = React.useMemo(() => sortedOffers.slice(0, 5), [sortedOffers]);\n\n const { totalPages, pageItems: paginatedOffers } = usePaginatedItems(sortedOffers, currentPage, itemsPerPage);\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, row: TopPerformingOffer) => formatMoney(Number(value), row.currencyCode),\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 if (!row.trend?.revenue) return getTranslation(Keys.defaults.noData);\n const columnTrendDirection = resolveTrendDirection(row.trend.revenue);\n return (\n <TableTrendCell direction={columnTrendDirection}>\n {getTrendIcon(columnTrendDirection)}\n <span>{row.trend.revenue}</span>\n </TableTrendCell>\n );\n },\n },\n ],\n [],\n );\n\n const currencyCode = sortedOffers[0]?.currencyCode;\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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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={calculateDateRangeFromOption(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) => formatMoney(value, currencyCode)} />\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>{formatMoney(totalRevenue, currencyCode)}</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 const summaryTrendDirection = resolveTrendDirection(offer.trend?.revenue);\n return (\n <SummaryItem key={offer.id}>\n <ColorDot dotColor={offer.color} />\n <SummaryInfo>\n <SummaryName>{offer.name}</SummaryName>\n <SummaryValue>{formatMoney(offer.revenue, offer.currencyCode)}</SummaryValue>\n </SummaryInfo>\n <SummaryPercentage>{offer.percentage}%</SummaryPercentage>\n {offer.trend?.revenue ? (\n <SummaryTrend direction={summaryTrendDirection} aria-label={offer.trend.revenue}>\n {getTrendIcon(summaryTrendDirection)}\n </SummaryTrend>\n ) : null}\n </SummaryItem>\n );\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 const trendPercent = parseTrendPercent(offer.trend?.revenue);\n let trendDirection: 'up' | 'down' | 'neutral' = 'neutral';\n if (trendPercent !== null && trendPercent > 0) trendDirection = 'up';\n else if (trendPercent !== null && trendPercent < 0) trendDirection = 'down';\n\n return (\n <MobileOfferCard key={offer.id}>\n <MobileOfferHeader>\n <ColorDot dotColor={offer.color} />\n <MobileOfferName>{offer.name}</MobileOfferName>\n </MobileOfferHeader>\n <MobileOfferMetricsGrid>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnRevenue)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>\n {formatMoney(offer.revenue, offer.currencyCode)}\n </MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnPercentage)}\n </MobileOfferMetricLabel>\n <MobileOfferMetricValue>{offer.percentage}%</MobileOfferMetricValue>\n </MobileOfferMetricItem>\n <MobileOfferMetricItem>\n <MobileOfferMetricLabel>\n {getTranslation(Keys.fullView.topOffers.columnTrend)}\n </MobileOfferMetricLabel>\n <MobileOfferTrendValue direction={trendDirection}>\n {offer.trend?.revenue ? (\n <>\n {getTrendIcon(trendDirection)}\n <span>{offer.trend.revenue}</span>\n </>\n ) : (\n getTranslation(Keys.defaults.noData)\n )}\n </MobileOfferTrendValue>\n </MobileOfferMetricItem>\n </MobileOfferMetricsGrid>\n </MobileOfferCard>\n );\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';\nimport type { TrendDirection } from '../types';\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: TrendDirection }>`\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 SummaryTrend = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\n`;\n\nexport const TableTrendCell = styled(Box)<{ direction: TrendDirection }>`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 600;\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 width: 16px;\n height: 16px;\n font-size: 16px;\n }\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 flex-direction: column;\n align-items: stretch;\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 MobileOfferHeader = styled(Box)`\n display: flex;\n align-items: center;\n gap: 8px;\n`;\n\nexport const MobileOfferName = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.text.primary};\n word-break: break-word;\n`;\n\nexport const MobileOfferMetricsGrid = styled(Box)`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid ${({ theme }) => theme.palette.divider};\n`;\n\nexport const MobileOfferMetricItem = styled(Box)`\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: center;\n`;\n\nexport const MobileOfferMetricLabel = styled(Typography)`\n font-size: 0.625rem;\n color: ${({ theme }) => theme.palette.text.secondary};\n text-transform: uppercase;\n`;\n\nexport const MobileOfferMetricValue = styled(Typography)`\n font-size: 0.875rem;\n font-weight: 500;\n color: ${({ theme }) => theme.palette.text.primary};\n`;\n\nexport const MobileOfferTrendValue = styled(Typography)<{ direction: TrendDirection }>`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n font-size: 0.875rem;\n font-weight: 600;\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 width: 14px;\n height: 14px;\n font-size: 14px;\n }\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 mockConversionDataStandard: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 1.35).toFixed(2)),\n orders: Math.round(point.orders * 0.7),\n}));\n\nexport const mockConversionDataSubscription: ConversionDataPoint[] = mockConversionData.map((point) => ({\n ...point,\n rate: Number((point.rate * 0.55).toFixed(2)),\n orders: Math.round(point.orders * 0.3),\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 ? 'Subscription' : 'Standard',\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","import type { ProductOfferDashboardStats, TopPerformingOffer } from '../types.d';\n\nexport { mockTopProducts, mockConversionData, mockOrders } from './mockDashboardData';\n\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\nexport const mockProductOfferStatsPositiveTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+5.1%',\n offersPurchased: '+12.5%',\n },\n};\n\nexport const mockProductOfferStatsNegativeTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '-1.8%',\n offersPurchased: '-3.7%',\n },\n};\n\nexport const mockProductOfferStatsNeutralTrend: ProductOfferDashboardStats = {\n ...mockProductOfferStats,\n trend: {\n revenue: '+0%',\n offersPurchased: '+0%',\n },\n};\n\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\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"]}