1"use strict";(self.webpackChunkdatahawk_front=self.webpackChunkdatahawk_front||[]).push([[216],{89216:(B,T,c)=>{c.d(T,{G:()=>Ia});var p=c(33415),u=c(34929),r=(()=>{return(t=r||(r={})).ESSENTIAL_LEVERAGE_AMAZON_ANALYTICS_AND_DATA_CONNECTIONS_V1_0_0="essential_leverage_amazon_analytics_and_data_connections_v1.0.0",t.ESSENTIAL_REACH_AMAZON_MULTI_CHANNEL_V1_0_0="essential_reach_amazon_multi_channel_v1.0.0",t.ESSENTIAL_IMPROVE_YOUR_IMAGES_V1_0_0="essential_improve_your_images_v1.0.0",t.ESSENTIAL_IMPROVE_YOUR_SEO_V1_0_0="essential_improve_your_seo_v1.0.0",t.ESSENTIAL_MARKET_RESEARCH_PART1_V1_0_0="essential_market_research_part1_v1.0.0",t.ESSENTIAL_BUSINESS_GUIDELINES_V1_0_0="essential_business_guidelines_v1.0.0",t.ESSENTIAL_CHECK_AMAZONS_BEGINNER_GUIDE_V1_0_0="essential_check_amazons_beginner_guide_v1.0.0",t.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART1_V1_0_0="essential_sponsored_product_ads_part1_v1.0.0",t.ESSENTIAL_AMAZON_SEO_GUIDELINES_V1_0_0="essential_amazon_seo_guidelines_v1.0.0",t.ESSENTIAL_MAKE_THE_MOST_AMAZON_BUSINESS_PART1_V1_0_0="essential_make_the_most_amazon_business_part1_v1.0.0",t.ESSENTIAL_BUY_BOX_V1_0_0="essential_buy_box_v1.0.0",t.ESSENTIAL_UNDERSTANDING_A9_AND_RANKING_V1_0_0="essential_understanding_a9_and_ranking_v1.0.0",t.ESSENTIAL_TRINITY_AMAZON_PRODUCT_PRICING_V1_0_0="essential_trinity_amazon_product_pricing_v1.0.0",t.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART2_V1_0_0="essential_sponsored_product_ads_part2_v1.0.0",t.ESSENTIAL_LOGISTICS_V1_0_0="essential_logistics_v1.0.0",t.ESSENTIAL_MARKET_RESEARCH_PART2_V1_0_0="essential_market_research_part2_v1.0.0",t.ESSENTIAL_PRODUCT_VIDEO_GUIDELINES_V1_0_0="essential_product_video_guidelines_v1.0.0",t.ESSENTIAL_LISTING_QUALITY_SCORE_V1_0_0="essential_listing_quality_score_v1.0.0",t.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART3_V1_0_0="essential_sponsored_product_ads_part3_v1.0.0",t.ESSENTIAL_AMAZON_FBA_CHECKLIST_FOR_SELLERS_V1_0_0="essential_amazon_fba_checklist_for_sellers_v1.0.0",t.ESSENTIAL_OPTIMIZE_SEO_PPC_CAMPAINGS_V1_0_0="essential_optimize_seo_ppc_campaings_v1.0.0",t.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART1_V1_0_0="essential_product_launch_tips_strategy_part1_v1.0.0",t.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART4_V1_0_0="essential_sponsored_product_ads_part4_v1.0.0",t.ESSENTIAL_HOW_TO_USE_AMAZON_FOR_MARKET_RESEARCH_V1_0_0="essential_how_to_use_amazon_for_market_research_v1.0.0",t.ESSENTIAL_CREATE_A_COMPELLING_AMAZON_STOREFRONT_V1_0_0="essential_create_a_compelling_amazon_storefront_v1.0.0",t.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART3_V1_0_0="essential_product_launch_tips_strategy_part3_v1.0.0",t.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART5_V1_0_0="essential_sponsored_product_ads_part5_v1.0.0",t.ESSENTIAL_SALES_RANK_V1_0_0="essential_sales_rank_v1.0.0",t.ESSENTIAL_UNDERSTANDING_YOUR_AMAZON_AUDIENCE_V1_0_0="essential_understanding_your_amazon_audience_v1.0.0",t.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART2_V1_0_0="essential_product_launch_tips_strategy_part2_v1.0.0",t.ESSENTIAL_MAKE_THE_MOST_AMAZON_BUSINESS_PART2_V1_0_0="essential_make_the_most_amazon_business_part2_v1.0.0",t.ESSENTIAL_INVENTORY_V1_0_0="essential_inventory_v1.0.0",t.ORGANIC_SEARCH_OPTIMIZATION_V1_0_0="organic_search_optimization_v1.0.0",t.ORGANIC_SEARCH_OPTIMIZATION_V1_1_0="organic_search_optimization_v1.1.0",t.ORGANIC_SEARCH_OPTIMIZATION_V1_2_0="organic_search_optimization_v1.2.0",t.ORGANIC_SEARCH_OPTIMIZATION_V2_0_0="organic_search_optimization_v2.0.0",t.COMPETITION_MONITORING_V1_0_0="competition_monitoring_v1.0.0",t.COMPETITION_MONITORING_V2_0_0="competition_monitoring_v2.0.0",t.COMPETITION_MONITORING_V2_1_0="competition_monitoring_v2.1.0",t.INEFFECTIVE_CAMPAIGNS_SP_V1_0_0="ineffective_campaigns_sp_v1.0.0",t.INEFFECTIVE_CAMPAIGNS_SP_V1_1_0="ineffective_campaigns_sp_v1.1.0",t.PERFORMING_CAMPAIGNS_SP_V1_0_1="performing_campaigns_sp_v1.0.1",t.PERFORMING_CAMPAIGNS_SP_V1_1_0="performing_campaigns_sp_v1.1.0",t.ANOMALY_SALES_GROSS_SALES_V1_0_0="anomaly_sales_gross_sales_v1.0.0",t.ANOMALY_SALES_GROSS_SALES_V1_0_1="anomaly_sales_gross_sales_v1.0.1",t.ANOMALY_SALES_GROSS_SALES_V1_1_0="anomaly_sales_gross_sales_v1.1.0",t.ANOMALY_FINANCE_GROSS_SALES_V3_0_0="anomaly_finance_gross_sales_v3.0.0",t.ANOMALY_FINANCE_GROSS_SALES_V4_0_0="anomaly_finance_gross_sales_v4.0.0",t.ANOMALY_SALES_UNITS_SOLD_V1_0_0="anomaly_s
1ales_units_sold_v1.0.0",t.ANOMALY_SALES_UNITS_SOLD_V1_1_0="anomaly_sales_units_sold_v1.1.0",t.ANOMALY_FINANCE_UNIT_SOLD_V3_0_0="anomaly_finance_unit_sold_v3.0.0",t.ANOMALY_FINANCE_UNIT_SOLD_V4_0_0="anomaly_finance_unit_sold_v4.0.0",t.ANOMALY_FINANCE_SELLING_PRICE_V3_0_0="anomaly_finance_selling_price_v3.0.0",t.ANOMALY_FINANCE_SELLING_PRICE_V4_0_0="anomaly_finance_selling_price_v4.0.0",t.ANOMALY_ADS_SPEND_V3_0_0="anomaly_ads_spend_v3.0.0",t.ANOMALY_ADS_SPEND_V4_0_0="anomaly_ads_spend_v4.0.0",t.ANOMALY_ADS_GROSS_SALES_V3_0_0="anomaly_ads_gross_sales_v3.0.0",t.ANOMALY_ADS_GROSS_SALES_V4_0_0="anomaly_ads_gross_sales_v4.0.0",t.ANOMALY_ADS_ROAS_V3_0_0="anomaly_ads_roas_v3.0.0",t.ANOMALY_ADS_ROAS_V4_0_0="anomaly_ads_roas_v4.0.0",t.ANOMALY_SEO_REACH_SCORE_V3_0_0="anomaly_seo_reach_score_v3.0.0",t.ANOMALY_SEO_REACH_SCORE_V4_0_0="anomaly_seo_reach_score_v4.0.0",t.ANOMALY_SEO_PRODUCT_RANKING_V3_0_0="anomaly_seo_product_ranking_v3.0.0",t.ANOMALY_SEO_PRODUCT_RANKING_V4_0_0="anomaly_seo_product_ranking_v4.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_TITLE_V3_0_0="anomaly_product_listing_quality_score_title_v3.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_TITLE_V4_0_0="anomaly_product_listing_quality_score_title_v4.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_A_PLUS_V3_0_0="anomaly_product_listing_quality_score_a_plus_v3.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_A_PLUS_V4_0_0="anomaly_product_listing_quality_score_a_plus_v4.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_IMAGE_V3_0_0="anomaly_product_listing_quality_score_image_v3.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_IMAGE_V4_0_0="anomaly_product_listing_quality_score_image_v4.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_BULLET_POINTS_V3_0_0="anomaly_product_listing_quality_score_bullets_point_v3.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_BULLET_POINTS_V4_0_0="anomaly_product_listing_quality_score_bullets_point_v4.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_DESCRIPTION_V3_0_0="anomaly_product_listing_quality_score_description_v3.0.0",t.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_DESCRIPTION_V4_0_0="anomaly_product_listing_quality_score_description_v4.0.0",t.ANOMALY_PRODUCT_RATING_SCORE_V3_0_0="anomaly_product_rating_score_v3.0.0",t.ANOMALY_PRODUCT_RATING_SCORE_V4_0_0="anomaly_product_rating_score_v4.0.0",t.ANOMALY_FINANCE_FULFILLMENT_FEE_V3_0_0="anomaly_finance_fulfillment_fee_v3.0.0",t.ANOMALY_FINANCE_FULFILLMENT_FEE_V4_0_0="anomaly_finance_fulfillment_fee_v4.0.0",t.ANOMALY_FINANCE_SHIPPING_FEE_V3_0_0="anomaly_finance_shipping_fee_v3.0.0",t.ANOMALY_FINANCE_SHIPPING_FEE_V4_0_0="anomaly_finance_shipping_fee_v4.0.0",t.ANOMALY_FINANCE_STORAGE_FEE_V3_0_0="anomaly_finance_storage_fee_v3.0.0",t.ANOMALY_FINANCE_STORAGE_FEE_V4_0_0="anomaly_finance_storage_fee_v4.0.0",t.ANOMALY_FINANCE_TAX_V3_0_0="anomaly_finance_tax_v3.0.0",t.ANOMALY_FINANCE_TAX_V4_0_0="anomaly_finance_tax_v4.0.0",t.ANOMALY_EXPENSES_FULFILLMENT_FEE_V3_0_0="anomaly_expenses_fulfillment_fee_v3.0.0",t.ANOMALY_EXPENSES_FULFILLMENT_FEE_V4_0_0="anomaly_expenses_fulfillment_fee_v4.0.0",t.ANOMALY_EXPENSES_SHIPPING_FEE_V3_0_0="anomaly_expenses_shipping_fee_v3.0.0",t.ANOMALY_EXPENSES_SHIPPING_FEE_V4_0_0="anomaly_expenses_shipping_fee_v4.0.0",t.ANOMALY_EXPENSES_STORAGE_FEE_V3_0_0="anomaly_expenses_storage_fee_v3.0.0",t.ANOMALY_EXPENSES_STORAGE_FEE_V4_0_0="anomaly_expenses_storage_fee_v4.0.0",t.ANOMALY_EXPENSES_TAX_V3_0_0="anomaly_expenses_tax_v3.0.0",t.ANOMALY_EXPENSES_TAX_V4_0_0="anomaly_expenses_tax_v4.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_PRICE_V3_0_0="anomaly_market_category_median_price_v3.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_PRICE_V4_0_0="anomaly_market_category_median_price_v4.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_V3_0_0="anomaly_market_category_median_rating_v3.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_V4_0_0="anomaly_market_category_median_rating_v4.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_COUNT_V3_0_0="anomaly_market_category_median_rating_count_v3.0.0",t.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_COUNT_V4_0_0="anomaly_market_category_median_rating_count_v4.0.0",t.ANOMALY_MARKET_SALES_RANK_V3_0_0="anomaly_market_sales_rank_v3.0.0",t.ANOMALY_MARKET_SALES_RANK_V4_0_0="anomaly_market_sales_rank_v4.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_PRICE_V3_0_0="anomaly_market_monitoring_category_median_price_v3.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_PRICE_V4_0_0="anomaly_market_monitoring_category_median_price_v4.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_V3_0_0="anomaly_market_monitoring_category_median_rating_v3.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_V4_0_0="anomaly_market_monitoring_category_median_rating_v4.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_COUNT_V3_0_0="anomaly_market_monitoring_category_median_rating_count_v3.0.0",t.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_COUNT_V4_0_0="anomaly_market_monitoring_category_median_rating_count_v4.0.0",t.ANOMALY_MARKET_MONITORING_SALES_RANK_V3_0_0="anomaly_market_monitoring_sales_rank_v3.0.0",t.ANOMALY_MARKET_MONITORING_SALES_RANK_V4_0_0="anomaly_market_monitoring_sales_rank_v4.0.0",r;var t})(),h=c(15331),x=c(52832);class C extends x.L{constructor(){super(...arguments),this.availableEntityTypes=new Set,this.availableRelationTypes=new Set}}var Le=c(56908),Z=c.n(Le),A=(()=>{return(t=A||(A={})).ACCOUNT="account",t.ANOMALY="anomaly",t.PRODUCT="product",t.KEYWORD="keyword",t.CAMPAIGN="campaign",t.BROWSE_NODE="browseNode",t.BROWSE_NODE_ALT="browse_node",t.MARKETPLACE="marketplace",t.NONE="none",A;var t})(),E=(()=>{return(t=E||(E={})).ANOMALY="anomaly",t.VARIATION="variation",t.NONE="none",E;var t})(),ge=c(27677);class Ue extends h.U{createInsightInstance(i){return new C(i)}createInsight(i){const n=super.createInsight(i);return n.hasErrors||(n.referenceDate=Z().utc(n.entityRelationData.dimensions.dateRange.referenceDate.date).toDate()),n}validateData(i){const n=i.rawInsight.data,o=n.relations.filter(g=>g.relationType===E.VARIATION).map(g=>"parent"===g.attributes.type?g.entityId:g.relatedEntityId),l=n.entities.filter(g=>g.entityType===A.PRODUCT&&!g.attributes.channelProductId).filter(g=>!o.find(I=>g.entityId===I)).map(g=>({entity:g,attributes:["channelProductId"]})),d=[],m=n.relations.filter(g=>n.entities.find(I=>I.entityId===g.entityId)?n.entities.find(I=>I.entityId===g.relatedEntityId)?!(!g.attributes.impactedEntityId||n.entities.find(I=>I.entityId===g.attributes.impactedEntityId)||(d.push({relation:g,missingEntity:"impactedEntityId",entityId:g.attributes.impactedEntityId}),0)):(d.push({relation:g,missingEntity:"relatedEntityId",entityId:g.relatedEntityId}),!0):(d.push({relation:g,missingEntity:"entityId",entityId:g.entityId}),!0));return i.errorInfo={...i.errorInfo,incompleteRelations:m,missingEntitiesFromRelation:d,incompleteData:l},!l.length&&!m.length}transformData(i){i.data=i.entityRelationData=i.rawInsight.data,i.availableEntityTypes=new Set(i.entityRelationData.entities.map(n=>n.entityType)),i.availableRelationTypes=new Set(i.entityRelationData.relations.map(n=>n.relationType))}processTitleBase(i){return[]}processTitleDimensions(i){const n=i?.entityRelationData?.dimensions,a=n?.channelProductId??0,o=n.marketplaceKey,s=n.accountId,l=n.accountName,d=l?`${l} (${s})`:`${s}`,m=[];return a&&m.push(`ASIN ${a}`),o&&m.push(o),s&&m.push(d),m}processTitleDate(i){const n=[],a=i.entityRelationData?.dimensions?.dateRange?.referenceDate;return a?.type&&(a?.type===ge.Q.Weekly&&n.push(`Week ${Z().utc(a?.date).format("W")}`),a?.type===ge.Q.Daily&&n.push(Z().utc(a?.date).format("MMM D, y"))),n}}var ze=c(53059);const k=t=>i=>(t.definitionKeys.forEach(n=>ze.M.registerStrategy(n,t,i)),i);var e=c(22560);class G{constructor(){this.feedbackEvent=new e.vpe}}var _=c(94666);class Ye{}var f=c(66391),D=c(60915),Ve=c(50253),Fe=c(68951),y=(()=>{return(t=y||(y={})).PositiveInteger="positive_integer",t.Price="price",t.Amount="amount",t.Star="star",t.Rank="rank",t.Percentage="percentage",t.Ratio="ratio",y;var t})(),ue=c(61097),he=c(64209),Be=c(53064),Ze=c(60193),ye=c(31548);function De(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"div",4),e.NdJ("chartInit",function(o){e.CHM(n);const s=e.oxw(2);return e.KtG(s.onChartInit(o))}),e.qZA()}if(2&t){const n=e.oxw(2);e.Q6J("options",n.chartOptions)("loading",!0)}}function Qe(t,i){if(1&t&&(e.ynx(0),e._UZ(1,"dh-loader",2),e.YNc(2,De,1,2,"div",3),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Q6J("loading",!n.inView)("small",!0),e.xp6(1),e.Q6J("ngIf",n.inView)}}function Ge(t,i){1&t&&(e.TgZ(0,"div",5),e._uU(1," Evolution chart not displayed due to limited historical data. Coming soon as more data is collected. "),e.qZA())}class M{constructor(i,n,a,o,s,l){this.elementRef=i,this.scrollDispatcher=n,this.cdr=a,this.currencyPipe=o,this.numberPipe=s,this.percentPipe=l,this.chartOptions={...D.M,backgroundColor:"rgba(0, 0, 0, 0.2)",legend:{textStyle:{fontSize:11,fontFamily:"Inter",color:"#BDD6E6"},itemStyle:{opacity:0}
1,data:[{name:"Observed value",lineStyle:{color:"#2BB3FF"},itemStyle:{color:"#2BB3FF"}},{name:"Expected value",lineStyle:{color:"#7A92A5",type:"dashed"}},{name:"Confidence range",lineStyle:{color:"#324464",opacity:.5,width:12}}],bottom:16},xAxis:{...D.M.xAxis[0],splitLine:{show:!1,lineStyle:{color:"#698092",opacity:.5}},axisLabel:{...D.M.xAxis[0].axisLabel,fontSize:10,fontFamily:"Inter",color:"#BDD6E6",margin:6,lineHeight:18}},yAxis:{...D.M.yAxis[0],splitLine:{show:!0,lineStyle:{color:"#698092",opacity:.5}},minInterval:1,inverse:!1,axisLabel:{fontSize:10,fontFamily:"Inter",formatter:d=>this.formattedValue(d),color:"#BDD6E6"}},visualMap:[],tooltip:{...D.M.tooltip,trigger:"axis",position:(d,m,g,I,me)=>({top:d[1],left:d[0]-(d[0]<me.viewSize[0]/2?0:g.offsetWidth)}),axisPointer:{animation:!0,type:"none"},formatter:d=>{const m=this.datavalues.find(g=>g.name===d[0]?.data?.name)?.value?.isAnomaly;return`On <b>${Z()(d[3].value[0]).format("MMM D")}</b>`+(m?' - <span style="color: #F3EA62;font-weight: var(--dh-text-semi-bold);">Anomaly detected</span>':"")+`<br/>${d[3].marker} ${this.insight.entityTypeLabel}: <b>${this.formattedValue(d[3].value[1])}</b><br/>${d[2].marker} Expected value: <b>${this.formattedValue(d[2].value[1])}</b><br/><span style="display: inline-block; background-color: #324464; opacity: 0.5; width: 16px; height: 12px"></span> Confidence range: <b>${this.formattedValue(d[0].value[1])}</b> to <b>${this.formattedValue(d[0].value[1]+d[1].value[1])}</b>`},backgroundColor:"rgba(18,42,59,0.75)",borderColor:"#425969",textStyle:{color:"#fff"},borderWidth:1},grid:{containLabel:!0,top:24,bottom:64,left:24,right:24}},this.destroy$=new Ve.x,this.inView=!1,this.hasGraph=!1,this.positiveIsGood=!0,this.datavalues=[]}ngAfterViewInit(){this.scrollDispatcher.scrolled().pipe((0,Fe.R)(this.destroy$)).subscribe(i=>{i&&!this.inView&&this.detectDisplay(i)}),requestAnimationFrame(()=>this.detectDisplay(this.scrollDispatcher.getAncestorScrollContainers(this.elementRef)[0]))}ngOnChanges(i){if(this.insight&&this.relation&&(this.anomalyEntity=this.insight.entityRelationData.entities.find(n=>n.entityId===this.relation.entityId),this.positiveIsGood=this.anomalyEntity?.attributes?.positiveIsGood),this.relation){this.chartOptions.yAxis.inverse=!this.positiveIsGood;const n=[];(this.relation?.attributes?.charts??[]).forEach(a=>{n.find(o=>o.ds===a.ds)||n.push(a)}),n?.length>=7?(this.hasGraph=!0,n.sort((a,o)=>new Date(a?.ds).getTime()-new Date(o?.ds).getTime()),this.datavalues=n.map(a=>({name:a.ds,value:a})),this.loadChart()):this.hasGraph=!1}else this.hasGraph=!1;this.cdr.detectChanges()}loadChart(){requestAnimationFrame(()=>{this.chart&&this.inView&&this.chart.setOption({series:this.getSeries()})})}getSeries(){const i=this.getLowerBoundData(this.anomalyEntity?.attributes?.metricUnit,Math.floor(Math.min(...this.datavalues.filter(a=>null!==a.value.lower).map(a=>a.value.lower),...this.datavalues.filter(a=>null!==a.value.observed).map(a=>a.value.observed)))),n=this.getHigherBoundData(this.anomalyEntity?.attributes?.metricUnit,Math.ceil(Math.max(...this.datavalues.filter(a=>null!==a.value.upper).map(a=>a.value.upper),...this.datavalues.filter(a=>null!==a.value.observed).map(a=>a.value.observed))));return this.datavalues.filter(a=>a.value.isAnomaly).length&&this.chart.setOption({visualMap:[this.prepareVisualMap()]}),this.chart.setOption({yAxis:{...this.chartOptions.yAxis,min:i,max:n}}),[...this.getConfidenceRange(),this.getExpectedLine(),this.getObservedLine()]}getConfidenceRange(){return[{name:"L",type:"line",smooth:!0,data:this.datavalues.filter(i=>null!==i.value.lower).map((i,n)=>({name:`${i.name}`,value:[i.name,i.value.lower,n]})),lineStyle:{opacity:0},stack:"confidence-band",symbol:"none",yAxisIndex:0},{name:"Confidence range",type:"line",smooth:!0,data:this.datavalues.filter(i=>null!==i.value.upper).map((i,n)=>({name:`${i.name}`,value:[i.name,null!==i.value.upper?i.value.upper-this.getLowerBoundData(this.anomalyEntity?.attributes?.metricUnit,i.value.lower):null,n]})),lineStyle:{opacity:0},areaStyle:{color:"#324464",opacity:.5},stack:"confidence-band",symbol:"none",yAxisIndex:0}]}getExpectedLine(){return{name:"Expected value",type:"line",smooth:!0,data:this.datavalues.filter(i=>null!==i.value.expected).map((i,n)=>({name:`${i.name}`,value:[i.name,i.value.expected,n]})),lineStyle:{type:"dashed"},itemStyle:{color:"#7A92A5"},showSymbol:!1,yAxisIndex:0}}getObservedLine(){return{name:"Observed value",type:"line",showSymbol:!1,animationDuration:300,markPoint:{symbol:"circle",symbolSize:6,itemStyle:{color:"#F3EA62"},data:this.datavalues.filter(i=>i.value.isAnomaly).map(i=>({name:i.name,coord:[i.name,i.value.observed]}))},smooth:!0,data:this.datavalues.filter(i=>null!==i.value.observed).map((i,n)=>({name:`${i.name}`,value:[i.name,i.value.observed,n]})),itemStyle:{color:"#2BB3FF"},yAxisIndex:0}}onChartInit(i){this.chart=i,this.loadChart()}ngOnDestroy(){this.destroy$.next(null),this.destroy$.complete()}detectDisplay(i){if(i){const n=this.elementRef.nativeElement,a=i.getElementRef().nativeElement;n.getBoundingClientRect().top-a.getBoundingClientRect().top<a.offsetHeight&&(this.inView=!0,this.cdr.detectChanges(),this.loadChart())}}prepareVisualMap(){const i={seriesIndex:3,show:!1,dimension:0,pieces:[{lt:0,color:"black"}],outOfRange:{color:"#2BB3FF"}};
1return this.datavalues.forEach((n,a,o)=>{if(n.value.isAnomaly&&null!==n.value.observed&&null!==n.value.expected){const s={color:"#F3EA62"};if(a){const l=this.getPreviousValuedDate(o,a-1);s.gt=new Date(l).getTime()}else s.gte=new Date(n.name).getTime();s.lte=new Date(n.name).getTime(),i.pieces.push(s)}}),i}formattedValue(i){let n=i=this.getBoundedData(this.anomalyEntity?.attributes?.metricUnit,i);switch(this.anomalyEntity?.attributes?.metricUnit){case y.Price:case y.Amount:n=this.currencyPipe.transform(i,this.marketplaces.find(a=>a.marketplaceKey===this.insight.entityRelationData.dimensions.marketplaceKey)?.currencyCode,"symbol","1.2-2");break;case y.Ratio:n=`${this.numberPipe.transform(i,"1.0-2")}x`;break;case y.Star:n=this.numberPipe.transform(i,"1.0-2");break;case y.Percentage:n=this.percentPipe.transform(i/100,"1.0-2");break;default:n=this.numberPipe.transform(Math.ceil(i),"1.0-2")}return n}getBoundedData(i,n){return this.getLowerBoundData(i,this.getHigherBoundData(i,n))}getLowerBoundData(i,n){let a=n;switch(i){case y.Price:case y.Amount:case y.Ratio:case y.PositiveInteger:case y.Star:a=Math.max(n,0);break;case y.Rank:a=Math.max(n,1)}return a}getHigherBoundData(i,n){let a=n;return i===y.Star&&(a=Math.min(n,5)),a}getPreviousValuedDate(i,n){let a=i[n];for(;n&&(null===a.value.observed||null===a.value.expected);)a=i[n-=1];return a.name}}M.\u0275fac=function(i){return new(i||M)(e.Y36(e.SBq),e.Y36(Be.mF),e.Y36(e.sBO),e.Y36(_.H9),e.Y36(_.JJ),e.Y36(_.Zx))},M.\u0275cmp=e.Xpm({type:M,selectors:[["dh-anomaly-insight-graph-render"]],hostVars:2,hostBindings:function(i,n){2&i&&e.ekj("has-graph",n.hasGraph)},inputs:{insight:"insight",relation:"relation"},features:[e.TTD],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["noGraph",""],[3,"loading","small"],["echarts","",3,"options","loading","chartInit",4,"ngIf"],["echarts","",3,"options","loading","chartInit"],[1,"no-graph"]],template:function(i,n){if(1&i&&(e.YNc(0,Qe,3,3,"ng-container",0),e.YNc(1,Ge,2,0,"ng-template",null,1,e.W1O)),2&i){const a=e.MAs(2);e.Q6J("ngIf",n.hasGraph)("ngIfElse",a)}},dependencies:[Ze.R,_.O5,ye._w],styles:["[_nghost-%COMP%]{display:block;height:60px}.has-graph[_nghost-%COMP%], div[echarts][_ngcontent-%COMP%]{height:240px}div.no-graph[_ngcontent-%COMP%]{height:60px;display:grid;justify-content:center;align-items:center;background:var(--dh-main-dark-6)}"],changeDetection:0}),(0,u.gn)([(0,ue.cB)(he.a.marketplacesReferentialFull)],M.prototype,"marketplaces",void 0);class R{constructor(){this.entityOptions={}}}function Ke(t,i){if(1&t&&(e.ynx(0),e.GkF(1,5),e.BQk()),2&t){const n=e.oxw(3);e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}function Je(t,i){if(1&t&&(e.TgZ(0,"div",7),e._UZ(1,"dh-entity-relation-ui-brick-relation",8),e.qZA()),2&t){const n=i.$implicit,a=e.oxw(5);e.xp6(1),e.Q6J("insight",a.insight)("anomalyEntity",a.anomalyEntity)("relation",n)}}function qe(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Je,2,3,"div",6),e.BQk()),2&t){const n=i.ngIf;e.xp6(1),e.Q6J("ngForOf",n)}}
1function He(t,i){if(1&t&&(e.ynx(0),e.YNc(1,qe,2,1,"ng-container",3),e.ALo(2,"walkthroughRelations"),e.ALo(3,"variationChildEntity"),e.BQk()),2&t){const n=i.$implicit,a=e.oxw(3);e.xp6(1),e.Q6J("ngIf",e.xi3(2,1,e.xi3(3,4,n,a.insight),a.insight))}}function We(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Ke,2,1,"ng-container",3),e.YNc(2,He,4,7,"ng-container",4),e.ALo(3,"productVariations"),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",n.contentTemplate),e.xp6(1),e.Q6J("ngForOf",e.xi3(3,2,n.entity,n.insight))}}function je(t,i){if(1&t&&e._UZ(0,"dh-entity-relation-ui-brick-relation",8),2&t){const n=i.$implicit,a=e.oxw(5);e.Q6J("insight",a.insight)("anomalyEntity",a.anomalyEntity)("relation",n)}}function $e(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",7),e.YNc(2,je,1,3,"dh-entity-relation-ui-brick-relation",9),e.qZA(),e.BQk()),2&t){const n=i.ngIf;e.xp6(2),e.Q6J("ngForOf",n)}}function Xe(t,i){if(1&t&&(e.ynx(0),e.YNc(1,$e,3,1,"ng-container",3),e.ALo(2,"walkthroughRelations"),e.ALo(3,"variationChildEntity"),e.BQk()),2&t){const n=i.$implicit,a=e.oxw(3);e.xp6(1),e.Q6J("ngIf",e.xi3(2,1,e.xi3(3,4,n,a.insight),a.insight))}}function et(t,i){if(1&t&&(e.YNc(0,Xe,4,7,"ng-container",4),e.ALo(1,"productVariations")),2&t){const n=e.oxw(2);e.Q6J("ngForOf",e.xi3(1,1,n.entity,n.insight))}}function tt(t,i){if(1&t&&(e.ynx(0),e.YNc(1,We,4,5,"ng-container",0),e.YNc(2,et,2,4,"ng-template",null,2,e.W1O),e.BQk()),2&t){const n=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("ngIf",a.entity.attributes.channelProductId)("ngIfElse",n)}}function nt(t,i){if(1&t&&(e.ynx(0),e.GkF(1,5),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}function it(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"div",10)(1,"dh-product-card",11),e.NdJ("tracked",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.updateTrack(o.entity))}),e.qZA()(),e.YNc(2,nt,2,1,"ng-container",3)}if(2&t){const n=e.oxw();e.xp6(1),e.Q6J("name",n.entity.attributes.name)("tooltip",n.entity.attributes.name)("channelProductId",n.entity.attributes.channelProductId)("userProductId",n.entity.attributes.userProductId)("pictureUrl",n.entity.attributes.pictureUrl)("externalUrl",n.entity.attributes.externalUrl)("marketplaceKey",n.insight.entityRelationData.dimensions.marketplaceKey)("showMarketplace",!n.entityOptions.hideMarketplace)("isTracked",n.entity.attributes.isTracked),e.xp6(1),e.Q6J("ngIf",n.contentTemplate)}}let fe=(()=>{class t extends R{constructor(){super()}updateTrack(n){n.attributes.isTracked=!0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-product"]],features:[e.qOj],decls:4,vars:5,consts:[[4,"ngIf","ngIfElse"],["product",""],["noParentVariant",""],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"ngTemplateOutlet"],["class","insight-group-block",4,"ngFor","ngForOf"],[1,"insight-group-block"],[3,"insight","anomalyEntity","relation"],[3,"insight","anomalyEntity","relation",4,"ngFor","ngForOf"],[1,"product-block"],[3,"name","tooltip","channelProductId","userProductId","pictureUrl","externalUrl","marketplaceKey","showMarketplace","isTracked","tracked"]],template:function(n,a){if(1&n&&(e.YNc(0,tt,4,2,"ng-container",0),e.ALo(1,"productVariations"),e.YNc(2,it,3,10,"ng-template",null,1,e.W1O)),2&n){const o=e.MAs(3);e.Q6J("ngIf",e.xi3(1,2,a.entity,a.insight).length)("ngIfElse",o)}},styles:[".insight-group-block[_ngcontent-%COMP%]{background-color:var(--dh-main-dark-5);border-radius:11px;padding:var(--dh-space-s);margin-bottom:var(--dh-space-s)}.asin[_ngcontent-%COMP%]{margin-left:4px}.product-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px}"],changeDetection:0}),t})(),at=(()=>{class t extends R{constructor(){super()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-anomaly"]],features:[e.qOj],decls:0,vars:0,template:function(n,a){},changeDetection:0}),t})();var b=c(55508),K=c(32668),J=c(5713),S=c(72693);function ot(t,i){if(1&t&&(e.TgZ(0,"span",14),e._uU(1," Campaign ID: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&t){const n=e.oxw(2);e.xp6(3),e.Oqu(n.entity.entityId)}}function rt(t,i){if(1&t&&(e.TgZ(0,"div",15)(1,"span",16),e._uU(2),e.qZA()()),2&t){const n=e.oxw(2);e.xp6(1),e.MGl("dhTooltip","Seller Id: ",n.insight.entityRelationData.dimensions.accountId,""),e.xp6(1),e.Oqu(n.insight.entityRelationData.dimensions.entity
1Id)}}function st(t,i){if(1&t&&(e.TgZ(0,"span",17),e._UZ(1,"dh-marketplace",18),e.ALo(2,"getMarketplaceByKey"),e.qZA()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("marketplace",e.lcZ(2,3,n.entity.attributes.marketplaceKey))("alignToBaseline",!0)("showMarketplaceName",!1)}}function ct(t,i){if(1&t&&(e.ynx(0),e.GkF(1,19),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}function lt(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",2)(2,"dh-entity-common-layout"),e.ynx(3,3),e.TgZ(4,"div",4),e._UZ(5,"dh-ui-icon",5),e.qZA(),e.BQk(),e.ynx(6,6),e.TgZ(7,"div",7),e._uU(8," Campaign: "),e.TgZ(9,"span",8),e._uU(10),e.qZA()(),e.BQk(),e.ynx(11,9),e.YNc(12,ot,4,1,"span",10),e.YNc(13,rt,3,2,"div",11),e.YNc(14,st,3,5,"span",12),e.BQk(),e.qZA()(),e.YNc(15,ct,2,1,"ng-container",13),e.BQk()),2&t){const n=e.oxw();let a;e.xp6(10),e.Oqu(null!==(a=n.entity.attributes.campaignName)&&void 0!==a?a:n.entity.entityId),e.xp6(2),e.Q6J("ngIf",n.entity.attributes.campaignName),e.xp6(1),e.Q6J("ngIf",n.insight.entityRelationData.dimensions.accountId),e.xp6(1),e.Q6J("ngIf",!n.entityOptions.hideMarketplace&&n.entity.attributes.marketplaceKey),e.xp6(1),e.Q6J("ngIf",n.contentTemplate)}}function _t(t,i){if(1&t&&(e.TgZ(0,"span",21),e._uU(1," (Campaign ID: "),e.TgZ(2,"span",8),e._uU(3),e.qZA(),e._uU(4,")"),e.qZA()),2&t){const n=e.oxw(2);e.xp6(3),e.Oqu(n.entity.entityId)}}function dt(t,i){if(1&t&&(e.TgZ(0,"div",7),e._uU(1," Campaign: "),e.TgZ(2,"span",8),e._uU(3),e.qZA(),e.YNc(4,_t,5,1,"span",20),e.qZA()),2&t){const n=e.oxw();let a;e.xp6(3),e.Oqu(null!==(a=n.entity.attributes.campaignName)&&void 0!==a?a:n.entity.entityId),e.xp6(1),e.Q6J("ngIf",n.entity.attributes.campaignName)}}let pt=(()=>{class t extends R{constructor(){super()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-campaign"]],features:[e.qOj],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["inlineView",""],[1,"campaign-block"],["picture",""],["dhTooltip","Campaign",1,"dh-picture"],["className","fas fa-chart-line","size","xl"],["mainline",""],[1,"name"],[1,"emphasis"],["secondline",""],["class","campaign-id",4,"ngIf"],["class","account",4,"ngIf"],["class","marketplace",4,"ngIf"],[4,"ngIf"],[1,"campaign-id"],[1,"account"],["tooltipPlacement","bottom-start",1,"badge","badge-light",3,"dhTooltip"],[1,"marketplace"],[3,"marketplace","alignToBaseline","showMarketplaceName"],[3,"ngTemplateOutlet"],["class","name-simple__campaign-id",4,"ngIf"],[1,"name-simple__campaign-id"]],template:function(n,a){if(1&n&&(e.YNc(0,lt,16,5,"ng-container",0),e.YNc(1,dt,5,2,"ng-template",null,1,e.W1O)),2&n){const o=e.MAs(2);e.Q6J("ngIf",!a.inline)("ngIfElse",o)}},dependencies:[f.oJ,b.N,K.R,J.H,_.O5,_.tP,S.MQ],styles:["[_nghost-%COMP%]{display:block}.campaign-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px}.dh-picture[_ngcontent-%COMP%]{width:54px;height:54px;display:flex;align-items:center;justify-content:center;background-color:var(--dh-main-dark-5)}.name[_ngcontent-%COMP%], .campaign-id[_ngcontent-%COMP%]{overflow:hidden;color:var(--dh-main-neutral-2)}.name[_ngcontent-%COMP%] .emphasis[_ngcontent-%COMP%], .campaign-id[_ngcontent-%COMP%] .emphasis[_ngcontent-%COMP%]{font-size:var(--dh-text-xs-font-size);font-weight:var(--dh-text-semi-bold);color:var(--dh-main-light-2)}.campaign-id[_ngcontent-%COMP%]{white-space:nowrap}.account[_ngcontent-%COMP%]{display:flex;align-items:center}.account[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{font-size:var(--dh-text-xxs-font-size);font-weight:var(--dh-text-light-bold)}.marketplace[_ngcontent-%COMP%]{font-size:var(--dh-text-xs-font-size);color:var(--dh-main-neutral-2);align-self:center}"]}),t})();function mt(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"span",5),e._uU(2),e.qZA(),e._uU(3," ("),e.TgZ(4,"span",5),e._uU(5),e.qZA(),e._uU(6,") "),e.BQk()),2&t){const n=e.oxw();e.xp6(2),e.Oqu(n.entity.attributes.accountName),e.xp6(3),e.Oqu(n.entity.attributes.accountId)}}function gt(t,i){if(1&t&&(e.TgZ(0,"span",5),e._uU(1),e.qZA()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(n.entity.attributes.accountId)}}function ut(t,i){if(1&t&&(e.ynx(0),e.GkF(1,6),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}let ht=(()=>{class t extends R{constructor(){super()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-account"]],features:[e.qOj],decls:7,vars:3,consts:[[1,"account-card","account-block"],[1,"name"],[4,"ngIf","ngIfElse"],["noAccountName",""],[4,"ngIf"],[1,"emphasis"],[3,"ngTemplateOutlet"]],template:function(n,a){if(1&n&&(e.TgZ(0,"div",0)(1,"div",1),e._uU(2," Account: "),e.YNc(3,mt,7,2,"ng-container",2),e.YNc(4,gt,2,1,"ng-template",null,3,e.W1O),e.qZA()(),e.YNc(6,ut,2,1,"ng-container",4)),2&n){const o=e.MAs(5);e.xp6(3),e.Q6J("ngIf",a.entity.attributes.accountName)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",a.contentTemplate)}},dependencies:[_.O5,_.tP],styles:[".account-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;color:var(--dh-main-neutral-2)}.account-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .emphasis[_ngcontent-%COMP%]{font-size:var(--dh-text-xs-font-size);font-weight:var(--dh-text-semi-bold);color:var(--dh-main-light-2)}.account-card[_ngcontent-%COMP%] .name__campaign-id[_ngcontent-%COMP%]{white-space:nowrap}.account-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px}"]}),t})();var yt=c(26168);function ft(t,i){if(1&t&&(e.TgZ(0,"span",11),e._UZ(1,"dh-marketplace",12),e.ALo(2,"getMarketplaceByKey"),e.qZA()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("marketplace",e.lcZ(2,2,n.entity.attributes.marketplaceKey))("alignToBaseline",!0)}}function At(t,i){if(1&t&&(e.ynx(0),e.GkF(1,13),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}function vt(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",2)(2,"dh-entity-common-layout"),e.ynx(3,3),e.TgZ(4,"div",4),e._UZ(5,"dh-ui-icon",5),e.qZA(),e.BQk(),e.ynx(6,6),e._uU(7," Category: "),e._UZ(8,"dh-browse-node",7),e.BQk(),e.ynx(9,8),e._uU(10," Marketplace: "),e.YNc(11,ft,3,4,"span",9),e.BQk(),e.qZA()(),e.YNc(12,At,2,1,"ng-container",10),e.BQk()),2&t){const n=e.oxw();e.xp6(8),e.Q6J("label",n.entity.attributes.browseNodeName)("browseNodeId",n.entity.entityId)("marketplaceKey",n.entity.attributes.marketplaceKey)("showLabelTootip",!0)("inline",!0),e.xp6(3),e.Q6J("ngIf",!n.entityOptions.hideMarketplace&&n.entity.attributes.marketplaceKey),e.xp6(1),e.Q6J("ngIf",n.contentTemplate)}}function Ct(t,i){if(1&t&&e._UZ(0,"dh-browse-node",7),2&t){const n=e.oxw();e.Q6J("label",n.entity.attributes.browseNodeName)("browseNodeId",n.entity.entityId)("marketplaceKey",n.entity.attributes.marketplaceKey)("showLabelTootip",!0)("inline",!0)}}let Ae=(()=>{class t extends R{constructor(){super()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-browse-node"]],features:[e.qOj],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["inlineView",""],[1,"browse-node-block"],["picture",""],["dhTooltip","Category",1,"dh-picture"],["className","fas fa-shapes","size","xl"],["mainline",""],["tooltipPlacement","bottom",3,"label","browseNodeId","marketplaceKey","showLabelTootip","inline"],["secondline",""],["class","marketplace",4,"ngIf"],[4,"ngIf"],[1,"marketplace"],[3,"marketplace","alignToBaseline"],[3,"ngTemplateOutlet"]],template:function(n,a){if(1&n&&(e.YNc(0,vt,13,7,"ng-container",0),e.YNc(1,Ct,1,5,"ng-template",null,1,e.W1O)),2&n){const o=e.MAs(2);e.Q6J("ngIf",!a.inline)("ngIfElse",o)}},dependencies:[f.oJ,b.N,yt.c,K.R,J.H,_.O5,_.tP,S.MQ],styles:[".browse-node-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px}.dh-picture[_ngcontent-%COMP%]{width:54px;height:54px;display:flex;align-items:center;justify-content:center;background-color:var(--dh-main-dark-5)}"]}),t})();var Et=c(94776);function Tt(t,i){if(1&t&&(e.ynx(0),e.GkF(1,2),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}let xt=(()=>{class t extends R{constructor(){super()}updateTrack(n){n.isTracked=!0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-keyword"]],features:[e.qOj],decls:2,vars:7,consts:[[3,"value","marketplaceKey","userKeywordId","isTracked","ready","canTrack","tracked"],[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(n,a){if(1&n&&(e.TgZ(0,"dh-keyword",0),e.NdJ("tracked",function(){return a.updateTrack(a.entity.attributes)}),e.qZA(),e.YNc(1,Tt,2,1,"ng-container",1)),2&n){let o;e.Q6J("value",null!==(o=a.entity.attributes.keyword)&&void 0!==o?o:a.entity.attributes.name)("marketplaceKey",a.entity.attributes.marketplaceKey)("userKeywordId",a.entity.attributes.userKeywordId)("isTracked",a.entity.attributes.isTracked)("ready",!0)("canTrack",!0),e.xp6(1),e.Q6J("ngIf",a.contentTemplate)}},dependencies:[Et.g,_.O5,_.tP],styles:["[_nghost-%COMP%]{display:inline-block;max-width:100%}"],changeDetection:0}),t})();function Ot(t,i){if(1&t&&(e.TgZ(0,"span",5),e._uU(1," Marketplace: "),e._UZ(2,"dh-marketplace",10),e.ALo(3,"getMarketplaceByKey"),e.qZA()),2&t){const n=e.oxw();e.xp6(2),e.Q6J("showChannel",!1)("showMarketplaceFlag",!1)("marketplace",e.lcZ(3,4,n.entity.attributes.marketplaceKey))("alignToBaseline",!0)}}function kt(t,i){if(1&t&&(e.ynx(0),e.GkF(1,11),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",n.contentTemplate)}}const wt=["content"],ve={[A.ACCOUNT]:ht,[A.ANOMALY]:at,[A.PRODUCT]:fe,[A.CAMPAIGN]:pt,[A.MARKETPLACE]:(()=>{class t extends R{constructor(){super()}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity-marketplace"]],features:[e.qOj],decls:14,vars:19,consts:[[1,"marketplace-card","marketplace-block"],["picture",""],["dhTooltip","Marketplace",1,"dh-picture"],[3,"showMarketplaceName","showChannel","showMarketplaceTooltip","marketplace","alignToBaseline","flagSize","flagCentered","noGap"],["mainline",""],[1,"marketplace"],[1,"emphasis",3,"showMarketplaceName","showMarketplaceFlag","showChannelName","marketplace","alignToBaseline"],["secondline",""],["class","marketplace",4,"ngIf"],[4,"ngIf"],[1,"emphasis",3,"showChannel","showMarketplaceFlag","marketplace","alignToBaseline"],[3,"ngTemplateOutlet"]],template:function(n,a){1&n&&(e.TgZ(0,"div",0)(1,"dh-entity-common-layout"),e.ynx(2,1),e.TgZ(3,"div",2),e._UZ(4,"dh-marketplace",3),e.ALo(5,"getMarketplaceByKey"),e.qZA(),e.BQk(),e.ynx(6,4),e.TgZ(7,"div",5),e._uU(8," Channel: "),e._UZ(9,"dh-marketplace",6),e.ALo(10,"getMarketplaceByKey"),e.qZA(),e.BQk(),e.ynx(11,7),e.YNc(12,Ot,4,6,"span",8),e.BQk(),e.qZA()(),e.YNc(13,kt,2,1,"ng-container",9)),2&n&&(e.xp6(4),e.Q6J("showMarketplaceName",!1)("showChannel",!1)("showMarketplaceTooltip",!1)("marketplace",e.lcZ(5,15,a.entity.attributes.marketplaceKey))("alignToBaseline",!0)("flagSize",24)("flagCentered",!0)("noGap",!0),e.xp6(
15),e.Q6J("showMarketplaceName",!1)("showMarketplaceFlag",!1)("showChannelName",!0)("marketplace",e.lcZ(10,17,a.entity.attributes.marketplaceKey))("alignToBaseline",!0),e.xp6(3),e.Q6J("ngIf",!a.entityOptions.hideMarketplace&&a.entity.attributes.marketplaceKey),e.xp6(1),e.Q6J("ngIf",a.contentTemplate))},dependencies:[b.N,K.R,J.H,_.O5,_.tP,S.MQ],styles:["[_nghost-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;justify-content:stretch}.marketplace-card[_ngcontent-%COMP%]{display:inline-block}.marketplace-card[_ngcontent-%COMP%] .marketplace[_ngcontent-%COMP%]{font-size:var(--dh-text-xs-font-size);color:var(--dh-main-neutral-2)}.marketplace-card[_ngcontent-%COMP%] .emphasis[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold);color:var(--dh-main-light-2)}.marketplace-block[_ngcontent-%COMP%]{flex:1 1 auto;border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px}.dh-picture[_ngcontent-%COMP%]{width:54px;height:54px;display:flex;align-items:center;justify-content:center;background-color:var(--dh-main-dark-5)}"],changeDetection:0}),t})(),[A.BROWSE_NODE]:Ae,[A.BROWSE_NODE_ALT]:Ae,[A.KEYWORD]:xt};let Nt=(()=>{class t{constructor(n,a){this.elementRef=n,this.viewContainerRef=a,this.entityOptions={},this.inline=!1}ngOnInit(){this.updateView()}ngAfterViewInit(){this.updateView()}updateView(){if(this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.entity?.entityType&&!this.componentRef){if(!ve[this.entity?.entityType])throw new Error(`No UI Brick found for entity "${this.entity?.entityType}"`);this.componentRef=this.viewContainerRef.createComponent(ve[this.entity.entityType]),this.elementRef.nativeElement.appendChild(this.componentRef.location.nativeElement),this.componentRef.instance.insight=this.insight,this.componentRef.instance.entity=this.entity,this.componentRef.instance.anomalyEntity=this.anomalyEntity,this.componentRef.instance.contentTemplate=this.content,this.componentRef.instance.entityOptions=this.entityOptions,this.componentRef.instance.inline=this.inline,this.componentRef.changeDetectorRef.detectChanges()}}}return t.\u0275fac=function(n){return new(n||t)(e.Y36(e.SBq),e.Y36(e.s_b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-entity"]],contentQueries:function(n,a,o){if(1&n&&e.Suo(o,wt,5,e.Rgc),2&n){let s;e.iGM(s=e.CRH())&&(a.content=s.first)}},hostVars:2,hostBindings:function(n,a){2&n&&e.ekj("inline",a.inline)},inputs:{insight:"insight",entity:"entity",anomalyEntity:"anomalyEntity",entityOptions:"entityOptions",inline:"inline"},decls:0,vars:0,template:function(n,a){},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:stretch}.inline[_nghost-%COMP%]{display:inline}"],changeDetection:0}),t})();var Ce=c(53868);function Rt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"getMarketplaceByKey"),e.BQk()),2&t){const n=e.oxw();let a;e.xp6(1),e.Oqu(e.gM2(2,1,n.value,null==(a=e.lcZ(3,6,n.marketplaceKey))?null:a.currencyCode,"symbol","1.2-2"))}}function bt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"getMarketplaceByKey"),e.BQk()),2&t){const n=e.oxw();let a;e.xp6(1),e.Oqu(e.gM2(2,1,n.value,null==(a=e.lcZ(3,6,n.marketplaceKey))?null:a.currencyCode,"symbol","1.2-2"))}}function Pt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.hij("",e.xi3(2,1,n.value,"1.0-2"),"x")}}function Mt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,n.value,"1.0-2"))}}function St(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"percent"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,n.value/100,"1.0-2"))}}function Lt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"ceil"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,e.lcZ(3,4,n.value),"1.0-2"))}}function Ut(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"ceil"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,e.lcZ(3,4,n.value),"1.0-2"))}}function zt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"ceil"),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.Oqu(e.xi3(2,1,e.lcZ(3,4,n.value),"1.0-2"))}}let Yt=(()=>{class t{constructor(){this.InsightMetricUnit=y}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-insight-value-render"]],inputs:{metricUnit:"metricUnit",value:"value",marketplaceKey:"marketplaceKey"},decls:9,vars:8,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(n,a){1&n&&(e.ynx(0,0),e.YNc(1,Rt,4,8,"ng-container",1),e.YNc(2,bt,4,8,"ng-container",1),e.YNc(3,Pt,3,4,"ng-container",1),e.YNc(4,Mt,3,4,"ng-container",1),e.YNc(5,St,3,4,"ng-container",1),e.YNc(6,Lt,4,6,"ng-container",1),e.YNc(7,Ut,4,6,"ng-container",1),e.YNc(8,zt,4,6,"ng-container",2),e.BQk()),2&n&&(e.Q6J("ngSwitch",a.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Price),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Amount),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Ratio),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Star),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Percentage),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.PositiveInteger),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Rank))},dependencies:[_.RF,_.n9,_.ED,Ce.K,S.MQ,_.JJ,_.Zx,_.H9],styles:["[_nghost-%COMP%]{display:inline}"],changeDetection:0}),t})();var Ee=c(4122);function Vt(t,i){if(1&t&&e._UZ(0,"i",4),2&t){const n=e.oxw();e.ekj("fa-arrow-down",n.value<0)("fa-arrow-up",n.value>0)}}function Ft(t,i){1&t&&(e.ynx(0),e._uU(1,"higher"),e.BQk())}function Bt(t,i){1&t&&(e.ynx(0),e._uU(1,"lower"),e.BQk())}function Zt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"optionalDecimal"),e.ALo(3,"abs"),e.ALo(4,"abs"),e.YNc(5,Ft,2,0,"ng-container",7),e.YNc(6,Bt,2,0,"ng-container",7),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.AsE("",e.lcZ(2,4,e.lcZ(3,6,n.value))," rank",e.lcZ(4,8,n.value)>
11?"s":""," "),e.xp6(4),e.Q6J("ngIf",n.value<0),e.xp6(1),e.Q6J("ngIf",n.value>0)}}function Dt(t,i){if(1&t&&(e._uU(0),e.ALo(1,"optionalDecimal"),e.ALo(2,"abs")),2&t){const n=e.oxw(2);e.AsE("",n.value>0?"-":"+","",e.lcZ(1,2,e.lcZ(2,4,n.value)),"")}}function Qt(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Zt,7,10,"ng-container",5),e.YNc(2,Dt,3,6,"ng-template",null,6,e.W1O),e.BQk()),2&t){const n=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("ngIf",a.asSentencePart)("ngIfElse",n)}}function Gt(t,i){1&t&&(e.ynx(0),e._uU(1,"lower"),e.BQk())}function Kt(t,i){1&t&&(e.ynx(0),e._uU(1,"higher"),e.BQk())}function Jt(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.ALo(3,"abs"),e.YNc(4,Gt,2,0,"ng-container",7),e.YNc(5,Kt,2,0,"ng-container",7),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,3,e.lcZ(3,6,n.value),"1.0-2")," "),e.xp6(3),e.Q6J("ngIf",n.value<0),e.xp6(1),e.Q6J("ngIf",n.value>0)}}function qt(t,i){if(1&t&&(e._uU(0),e.ALo(1,"number")),2&t){const n=e.oxw(2);e.AsE("",n.value>0?"+":"","",e.xi3(1,2,n.value,"1.0-2"),"")}}function Ht(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Jt,6,8,"ng-container",5),e.YNc(2,qt,2,5,"ng-template",null,6,e.W1O),e.BQk()),2&t){const n=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("ngIf",a.asSentencePart)("ngIfElse",n)}}function Wt(t,i){1&t&&(e.ynx(0),e._uU(1,"lower"),e.BQk())}function jt(t,i){1&t&&(e.ynx(0),e._uU(1,"higher"),e.BQk())}function $t(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"percent"),e.ALo(3,"abs"),e.YNc(4,Wt,2,0,"ng-container",7),e.YNc(5,jt,2,0,"ng-container",7),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.hij("",e.xi3(2,3,e.lcZ(3,6,n.value/100),"1.0-2")," "),e.xp6(3),e.Q6J("ngIf",n.value<0),e.xp6(1),e.Q6J("ngIf",n.value>0)}}function Xt(t,i){if(1&t&&(e._uU(0),e.ALo(1,"percent")),2&t){const n=e.oxw(2);e.AsE("",n.value>0?"+":"","",e.xi3(1,2,n.value/100,"1.0-2"),"")}}function en(t,i){if(1&t&&(e.ynx(0),e.YNc(1,$t,6,8,"ng-container",5),e.YNc(2,Xt,2,5,"ng-template",null,6,e.W1O),e.BQk()),2&t){const n=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("ngIf",a.asSentencePart)("ngIfElse",n)}}let tn=(()=>{class t{constructor(){this.InsightMetricUnit=y,this.inline=!1,this.titleTag=!1}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-insight-value-variation-render"]],hostVars:6,hostBindings:function(n,a){2&n&&e.ekj("with-background",a.withBackground)("inline",a.inline)("title-tag",a.titleTag)},inputs:{value:"value",metricUnit:"metricUnit",asSentencePart:"asSentencePart",withIcon:"withIcon",withBackground:"withBackground",inline:"inline",titleTag:"titleTag"},decls:5,vars:4,consts:[["class","up fas",3,"fa-arrow-down","fa-arrow-up",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"up","fas"],[4,"ngIf","ngIfElse"],["raw",""],[4,"ngIf"]],template:function(n,a){1&n&&(e.YNc(0,Vt,1,4,"i",0),e.ynx(1,1),e.YNc(2,Qt,4,2,"ng-container",2),e.YNc(3,Ht,4,2,"ng-container",2),e.YNc(4,en,4,2,"ng-container",3),e.BQk()),2&n&&(e.Q6J("ngIf",a.withIcon),e.xp6(1),e.Q6J("ngSwitch",a.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Rank),e.xp6(1),e.Q6J("ngSwitchCase",a.InsightMetricUnit.Star))},dependencies:[_.O5,_.RF,_.n9,_.ED,Ee.w,S.Td,_.JJ,_.Zx],styles:["[_nghost-%COMP%]{display:block;font-weight:var(--dh-text-semi-bold);color:var(--dh-yellow-8)!important}[_nghost-%COMP%] i[_ngcontent-%COMP%]{rotate:-45deg}.with-background[_nghost-%COMP%]{background-color:var(--dh-yellow-10)}.positive-sentiment[_nghost-%COMP%] i[_ngcontent-%COMP%]{rotate:45deg}.inline[_nghost-%COMP%]{display:inline}.title-tag[_nghost-%COMP%]{display:inline-flex;font-size:var(--dh-heading-s-font-size);line-height:var(--dh-heading-m-line-height);margin-left:var(--dh-space-s);padding-left:4px;padding-right:7px;border-radius:7px}.title-tag[_nghost-%COMP%] i[_ngcontent-%COMP%]{align-items:center;align-self:center;display:flex;height:28px;justify-content:center;margin-right:4px;width:28px}"],changeDetection:0}),t})(),nn=(()=>{class t{transform(n,a){return a.entityRelationData.entities.find(o=>o.entityId===n.relatedEntityId)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"relatedEntity",type:t,pure:!0}),t})(),an=(()=>{class t{transform(n,a){return a.entityRelationData.entities.find(o=>o.entityId===n)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"impactedEntity",type:t,pure:!0}),t})(),on=(()=>{class t{transform(n,a){return a.entityRelationData.entities.find(o=>
1o.entityId===n.entityId)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"parentEntity",type:t,pure:!0}),t})(),rn=(()=>{class t{transform(n){switch(n){case"keyword":return"Keyword";case"browse_node":return"Category";default:return""}}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"getEntityTypeName",type:t,pure:!0}),t})(),sn=(()=>{class t{transform(n){const a=n?.attributes?.category,o=n?.attributes?.metric;let s=!1;return("ads"===a&&"roas"===o||"finance"===a&&"gross_sales"===o)&&(s=!0),s}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"canDisplayAnomalyRootCauseAnalysis",type:t,pure:!0}),t})();function cn(t,i){if(1&t&&(e.TgZ(0,"div",12)(1,"div",7),e._uU(2),e.ALo(3,"getEntityTypeName"),e.ALo(4,"impactedEntity"),e.qZA(),e.TgZ(5,"div",13),e._UZ(6,"dh-entity-relation-ui-brick-entity",14),e.ALo(7,"impactedEntity"),e.qZA()()),2&t){const n=e.oxw();e.xp6(2),e.hij(" For ",e.lcZ(3,5,e.xi3(4,7,n.relation.attributes.impactedEntityId,n.insight).entityType)," "),e.xp6(4),e.Q6J("insight",n.insight)("anomalyEntity",n.anomalyEntity)("entity",e.xi3(7,10,n.relation.attributes.impactedEntityId,n.insight))("inline",!0)}}function ln(t,i){if(1&t&&(e._UZ(0,"dh-entity-relation-insight-value-variation-render",18),e.ALo(1,"parentEntity")),2&t){const n=e.oxw(2);e.Q6J("value",n.relation.attributes.valueVariation)("inline",!0)("metricUnit",e.xi3(1,3,n.relation,n.insight).attributes.metricUnit)}}function _n(t,i){if(1&t&&(e.TgZ(0,"span",19)(1,"a",20),e._uU(2,"Learn why"),e.qZA()()),2&t){const n=e.oxw(2);e.xp6(1),e.Q6J("href",n.rcaLink,e.LSH)}}function dn(t,i){if(1&t&&(e.TgZ(0,"div",6)(1,"div",7),e._uU(2,"Anomaly"),e.qZA(),e.TgZ(3,"div",15),e.YNc(4,ln,2,6,"dh-entity-relation-insight-value-variation-render",16),e.YNc(5,_n,3,1,"span",17),e.ALo(6,"canDisplayAnomalyRootCauseAnalysis"),e.qZA()()),2&t){const n=e.oxw();e.xp6(4),e.Q6J("ngIf",n.relation.attributes.expectedValue),e.xp6(1),e.Q6J("ngIf",e.lcZ(6,2,n.isFeatureAnomalyRootCauseAnalysisEnabled&&n.insight.tokenForExternalApi&&n.anomalyEntity))}}const mn=["content"],gn={[E.ANOMALY]:(()=>{class t extends Ye{constructor(){super(...arguments),this.isFeatureAnomalyRootCauseAnalysisEnabled=!1}get rcaLink(){const a=new URL("https://rca-datahawk.streamlit.app/");a.searchParams.set("auth_token",this.insight.tokenForExternalApi),a.searchParams.set("workspace_id",this.insight.rawInsight.data.dimensions.workspaceId),a.searchParams.set("category",this.anomalyEntity.attributes.category),a.searchParams.set("metric",this.anomalyEntity.attributes.metric);const o=this.insight.data.relations.find(d=>d.entityId===this.anomalyEntity.entityId),s=this.insight.data.entities.find(d=>d.entityId===o.relatedEntityId),l=this.anomalyEntity.attributes.dimension;return l.forEach(d=>a.searchParams.append("dimension_names",d)),l.forEach(d=>{const m=d.replace(/_([a-z])/g,(I,me)=>me.toUpperCase());a.searchParams.append("dimension_values",s.attributes[d]||s.attributes[m]||this.insight.header.dimensions[d]||this.insight.header.dimensions[m])}),a.searchParams.set("anomaly_date",this.insight.header.dateRangeTo),a.toString()}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-relation-anomaly"]],features:[e.qOj],decls:21,vars:24,consts:[[1,"entity-summary"],[1,"entity-info"],[1,"entity"],[3,"insight","anomalyEntity","entity"],[1,"anomaly-info"],["class","impacted-entity tile",4,"ngIf"],[1,"tile"],[1,"tile-title"],[3,"metricUnit","value","marketplaceKey"],["class","tile",4,"ngIf"],[1,"graph"],[3,"insight","relation"],[1,"impacted-entity","tile"],[1,"tile-impacted-entity"],[3,"insight","anomalyEntity","entity","inline"],[1,"tile-value"],[3,"value","inline","metricUnit",4,"ngIf"],["class","rca-link",4,"ngIf"],[3,"value","inline","metricUnit"],[1,"rca-link"],["appInsightsTrackEvent","App | Click - Intelligence | Insights | Details | Anomaly Root Cause Analysis","nz-button","","nzType","outline","nzSize","small","target","_blank",3,"href"]],template:function(n,a){if(1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"dh-entity-relation-ui-brick-entity",3),e.ALo(4,"relatedEntity"),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,cn,8,13,"div",5),e.TgZ(7,"div",6)(8,"div",7),e._uU(9,"Observed"),e.qZA(),e._UZ(10,"dh-entity-relation-insight-value-render",8),e.ALo(11,"relatedEntity"),e.qZA(),e.TgZ(12,"div",6)(13,"div",7),e._uU(14,"Expected"),e.qZA(),e._UZ(15,"dh-entity-relation-insight-value-render",8),e.ALo(16,"relatedEntity"),e.qZA(),e.YNc(17,dn,7,4,"div",9),e.ALo(18,"canDisplayAnomalyRootCauseAnalysis"),e.qZA()(),e.TgZ(19,"div",10),e._UZ(20,"dh-anomaly-insight-graph-render",11),e.qZA()),2&n){let o,s;e.xp6(3),e.Q6J("insight",a.insight)("anomalyEntity",a.anomalyEntity)("entity",e.xi3(4,13,a.relation,a.insight)),e.xp6(3),e.Q6J("ngIf",a.relation.attributes.impactedEntityId),e.xp6(4),e.Q6J("metricUnit",a.anomalyEntity.attributes.metricUnit)("value",a.relation.attributes.metricValue)("marketplaceKey",null!==(o=e.xi3(11,16,a.relation,a.insight).attributes.marketplaceKey)&&void 0!==o?o:a.insight.entityRelationData.dimensions.marketplaceKey),e.xp6(
15),e.Q6J("metricUnit",a.anomalyEntity.attributes.metricUnit)("value",a.relation.attributes.expectedValue)("marketplaceKey",null!==(s=e.xi3(16,19,a.relation,a.insight).attributes.marketplaceKey)&&void 0!==s?s:a.insight.entityRelationData.dimensions.marketplaceKey),e.xp6(2),e.Q6J("ngIf",a.relation.attributes.expectedValue||e.lcZ(18,22,a.isFeatureAnomalyRootCauseAnalysisEnabled&&a.insight.tokenForExternalApi&&a.anomalyEntity)),e.xp6(3),e.Q6J("insight",a.insight)("relation",a.relation)}},dependencies:[_.O5,f.r0,M,Nt,Yt,tn,nn,an,on,rn,sn],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--dh-space-s)}[_nghost-%COMP%] .tile[_ngcontent-%COMP%]{text-align:center;min-width:64px}@media (min-width: 1249px){[_nghost-%COMP%] .tile[_ngcontent-%COMP%]{max-width:220px}}[_nghost-%COMP%] .tile[_ngcontent-%COMP%] dh-entity-relation-insight-value-render[_ngcontent-%COMP%], [_nghost-%COMP%] .tile[_ngcontent-%COMP%] dh-entity-relation-insight-value-variation-render[_ngcontent-%COMP%]{font-size:var(--dh-heading-xs-font-size);line-height:var(--dh-heading-xs-line-height);color:var(--dh-main-light-2);padding-top:var(--dh-space-xxs)}[_nghost-%COMP%] .tile-title[_ngcontent-%COMP%]{font-size:var(--dh-text-xs-font-size);line-height:var(--dh-text-xs-line-height);white-space:nowrap}[_nghost-%COMP%] .tile-value[_ngcontent-%COMP%]{padding-top:var(--dh-space-xxs)}[_nghost-%COMP%] .tile-value[_ngcontent-%COMP%] .rca-link[_ngcontent-%COMP%]{padding:0 var(--dh-space-xs);vertical-align:bottom}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:var(--dh-space-s)}@media (max-width: 1250px){[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%]{flex-direction:column}}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .entity-info[_ngcontent-%COMP%]{flex:1 1 auto;gap:var(--dh-space-xs);display:flex;flex-direction:row;min-height:70px}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .entity-info[_ngcontent-%COMP%] > .entity[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;justify-content:stretch}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .entity-info[_ngcontent-%COMP%] > .entity[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 1 auto}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .anomaly-info[_ngcontent-%COMP%]{flex:0 0 auto;gap:var(--dh-space-s);display:flex;flex-direction:row;background-color:var(--dh-card-alternate-background-color);border-radius:7px;padding:var(--dh-space-xs);justify-content:space-evenly;min-height:70px}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .anomaly-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;border:0}[_nghost-%COMP%] .entity-summary[_ngcontent-%COMP%] > .anomaly-info[_ngcontent-%COMP%] .tile-impacted-entity[_ngcontent-%COMP%]{margin-top:var(--dh-space-xxs)}"],changeDetection:0}),t})()};let Te=(()=>{class t{constructor(n,a){this.elementRef=n,this.viewContainerRef=a}ngOnInit(){this.updateView()}ngOnChanges(n){}updateView(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.relation?.relationType&&!this.componentRef&&(this.componentRef=this.viewContainerRef.createComponent(gn[this.relation.relationType]),this.elementRef.nativeElement.appendChild(this.componentRef.location.nativeElement),this.componentRef.instance.insight=this.insight,this.componentRef.instance.anomalyEntity=this.anomalyEntity,this.componentRef.instance.relation=this.relation,this.componentRef.instance.contentTemplate=this.content,this.componentRef.changeDetectorRef.detectChanges())}}return t.\u0275fac=function(n){return new(n||t)(e.Y36(e.SBq),e.Y36(e.s_b))},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-ui-brick-relation"]],contentQueries:function(n,a,o){if(1&n&&e.Suo(o,mn,5,e.Rgc),2&n){let s;e.iGM(s=e.CRH())&&(a.content=s.first)}},inputs:{insight:"insight",relation:"relation",anomalyEntity:"anomalyEntity"},features:[e.TTD],decls:0,vars:0,template:function(n,a){},styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%]:not(:last-child){margin-bottom:var(--dh-space-m)}"],changeDetection:0}),t})(),un=(()=>{class t{transform(n){return n?.reduce((a,o)=>a+o.relations.length,0)??0}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"getEntitiesWithRelationsCount",type:t,pure:!0}),t})();function hn(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",5)(2,"div",6),e._uU(3),e.qZA(),e._UZ(4,"dh-entity-relation-ui-brick-relation",7),e.qZA(),e.BQk()),2&t){const n=i.$implicit,a=e.oxw().$implicit,o=e.oxw(2);e.xp6(3),e.Oqu(o.insight.entityTypeLabel),e.xp6(1),e.Q6J("insight",o.insight)("relation",n)("anomalyEntity",a.entity)}}function yn(t,i){if(1&t&&(e.ynx(0),e.YNc(1,hn,5,4,"ng-container",4),e.BQk()),2&t){const n=i.$implicit;e.xp6(1),e.Q6J("ngForOf",n.relations)}}function fn(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",1)(2,"p",2)(3,"span",3),e._uU(4),e.qZA(),e._uU(5),e.ALo(6,"date"),e.qZA(),e.YNc(7,yn,2,1,"ng-container",4),e.qZA(),e.BQk()),2&t){const n=i.ngIf,a=e.oxw();e.xp6(4),e.Oqu(n),e.xp6(1),e.lnq(" ",a.insight.entityTypeLabel," ",n>1?"anomalies were":"anomaly was"," detected for ",e.xi3(6,5,a.insight.referenceDate,"longDate")," : "),e.xp6(2),e.Q6J("ngForOf",a.entitiesWithRelations)}}let An=(()=>{class t{constructor(){}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-entity-relation-insight-detail-render"]],inputs:{entitiesWithRelations:"entitiesWithRelations",insight:"insight"},decls:2,vars:3,consts:[[4,"ngIf"],[1,"liquid-text"],[1,"anomaly-intro"],[1,"anomaly-count"],[4,"ngFor","ngForOf"],[1,"insight-group-block"],[1,"insight-group-title"],[3,"insight","relation","anomalyEntity"]],template:function(n,a){1&n&&(e.YNc(0,fn,8,8,"ng-container",0),e.ALo(1,"getEntitiesWithRelationsCount")),2&n&&e.Q6J("ngIf",e.lcZ(1,1,a.entitiesWithRelations))},dependencies:[_.sg,_.O5,Te,_.uU,un],styles:[".anomaly-intro[_ngcontent-%COMP%]{margin-top:var(--dh-space-l);margin-bottom:var(--dh-space-m)}.insight-group-block[_ngcontent-%COMP%]{background-color:var(--dh-main-dark-5);border-radius:11px;padding:var(--dh-space-s);margin-bottom:var(--dh-space-l)}.insight-group-title[_ngcontent-%COMP%]{margin-bottom:var(--dh-space-s);font-size:var(--dh-text-xs-font-size);line-height:1;font-weight:var(--dh-text-semi-bold);text-transform:uppercase}.anomaly-count[_ngcontent-%COMP%]{color:var(--dh-main-light-1);font-weight:var(--dh-text-semi-bold)}dh-country-flag[_ngcontent-%COMP%]{margin-right:4px;margin-left:4px}.icon-sheet[_ngcontent-%COMP%]{position:relative;top:4px}.icon-right[_ngcontent-%COMP%]{margin-left:4px}.compare-better[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold);color:var(--dh-secondary-3)}.compare-worse[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold);color:var(--dh-red-6)}.emphasis[_ngcontent-%COMP%]{color:var(--dh-main-light-2);font-weight:var(--dh-text-semi-bold)}.child[_ngcontent-%COMP%]{background-color:var(--dh-card-background-color);border:solid 1px var(--dh-main-dark-1);margin-bottom:var(--dh-space-m);padding:var(--dh-space-s)}.child[_ngcontent-%COMP%] .child-sentence[_ngcontent-%COMP%] > dh-product-card[_ngcontent-%COMP%]{margin-bottom:4px}.child[_ngcontent-%COMP%] .child[_ngcontent-%COMP%]{grid-column:1/3;border:0;padding:0;margin:0;background-color:transparent}.child[_ngcontent-%COMP%] .child[_ngcontent-%COMP%] + .child[_ngcontent-%COMP%]{margin-top:var(--dh-space-xxs);padding-top:var(--dh-space-xxs);border-top:solid 1px var(--dh-main-dark-1)}.child[_ngcontent-%COMP%] > .child.child-sentence[_ngcontent-%COMP%]{margin-top:0}.child[_ngcontent-%COMP%]:has(.child.child-sentence){padding-top:0;padding-bottom:0;border:transparent;background-color:transparent}.product-summary[_ngcontent-%COMP%], .product-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px;margin-top:var(--dh-space-xxs);margin-bottom:var(--dh-space-xxs)}.product-summary[_ngcontent-%COMP%]{margin-top:var(--dh-space-s);margin-bottom:var(--dh-space-m)}"],changeDetection:0}),t})(),vn=(()=>{class t{transform(n,a,o){return n.entityRelationData.entities.filter(s=>s.entityType===a).map(s=>({entity:s,dimensionCount:s.attributes?.dimension?.length,relations:n.entityRelationData.relations.filter(l=>
1l.entityId===s.entityId&&o)})).sort((s,l)=>s.dimensionCount-l.dimensionCount)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"entitiesWithRelations",type:t,pure:!0}),t})();function Cn(t,i){if(1&t&&(e.ynx(0),e._UZ(1,"dh-entity-relation-insight-detail-render",1),e.BQk()),2&t){const n=i.ngIf,a=e.oxw();e.xp6(1),e.Q6J("insight",a.insight)("entitiesWithRelations",n)}}let En=(()=>{class t extends G{constructor(n){super(),this.cdr=n,this.EntityRelationDataEntityType=A,this.EntityRelationDataRelationType=E}updateInsight(n){this.insight=n,this.cdr.detectChanges()}}return t.\u0275fac=function(n){return new(n||t)(e.Y36(e.sBO))},t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-anomaly-entity-relation-insight-render"]],inputs:{insight:"insight"},features:[e.qOj],decls:2,vars:5,consts:[[4,"ngIf"],[3,"insight","entitiesWithRelations"]],template:function(n,a){1&n&&(e.YNc(0,Cn,2,2,"ng-container",0),e.ALo(1,"entitiesWithRelations")),2&n&&e.Q6J("ngIf",e.Dn7(1,1,a.insight,a.EntityRelationDataEntityType.ANOMALY,a.EntityRelationDataRelationType.ANOMALY))},dependencies:[_.O5,An,vn],changeDetection:0}),t})();const xe=JSON.parse('{"W":{"anomaly_product_rating_score":"Product Rating Score"},"O":{"gross_sales":"Gross Sales","unit_sold":"Units Sold","selling_price":"Average selling price","spend":"Ad Spend","ad_sales":"Ad Sales","roas":"RoAS","reach_score":"Reach Score","sales_rank":" Sales rank","product_ranking":" Product ranking","listing_quality_score_title":"LQS - Title","listing_quality_score_a_plus":"LQS - A++ Content","listing_quality_score_image":"LQS - Image","listing_quality_score_bullets_point":"LQS - Bullet Points","listing_quality_score_description":"LQS - Description","fulfillment_fee":"Fulfillment fees","shipping_fee":"Shipping fees","storage_fee":"Storage fees","tax":"Taxes","category_median_price":"Median Price - Top 100 per Category","category_median_rating":"Median Rating Score - Top 100 per Category","category_median_rating_count":"Median Number of Ratings - Top 100 per Category","rating_score":"Median Rating Score - Top 100 per Category","ratings_count":"Median Number of Ratings - Top 100 per Category"}}');let q=class extends Ue{transformData(i){super.transformData(i),i.entityRelationData.relations.forEach(o=>{if(o.relationType===E.ANOMALY){const s=i.entityRelationData.entities.find(l=>l.entityId===o.entityId);switch((i.insightDefinitionKey===r.ANOMALY_MARKET_SALES_RANK_V3_0_0||i.insightDefinitionKey===r.ANOMALY_SEO_PRODUCT_RANKING_V3_0_0)&&(s.attributes.metricUnit=y.Rank),o.attributes.positiveSentiment=s.attributes.positiveIsGood?o.attributes.metricValue>=o.attributes.expectedValue:o.attributes.metricValue<=o.attributes.expectedValue,s.attributes.metricUnit){case y.Star:o.attributes.valueVariation=(o.attributes.metricValue??0)-(o.attributes.expectedValue??0);break;case y.Rank:o.attributes.valueVariation=(o.attributes.metricValue??0)-Math.ceil(o.attributes.expectedValue??0);break;default:o.attributes.valueVariation=((o.attributes.metricValue??0)-(o.attributes.expectedValue??1))/(o.attributes.expectedValue??1)*100,o.attributes.valueVariation>=100&&(o.attributes.valueVariation=Math.round(o.attributes.valueVariation))}}}),i.mainWalkthroughRelationType=E.ANOMALY;const n=i.entityRelationData.entities.filter(o=>o.entityType===A.ANOMALY).sort((o,s)=>o.attributes?.dimension?.length-s.attributes?.dimension?.length),a=n[0];i.entityTypeLabel=i.rawInsight.title??xe.W[i?.entityRelationData?.dimensions?.definition?.definitionName]??xe.O[a?.attributes?.metric],i.multiLevelDisplay=n.length<=1&&i.entityRelationData.relations.filter(o=>o.entityId===n?.[0]?.entityId&&o.relationType===E.ANOMALY)?.length<=1||!n.every(o=>o.attributes.dimension.length===a.attributes.dimension.length)}processTitleBase(i){return i.entityTypeLabel?[i.entityTypeLabel]:[]}};q=(0,u.gn)([k({definitionKeys:[r.ANOMALY_FINANCE_GROSS_SALES_V3_0_0,r.ANOMALY_FINANCE_GROSS_SALES_V4_0_0,r.ANOMALY_FINANCE_UNIT_SOLD_V3_0_0,r.ANOMALY_FINANCE_UNIT_SOLD_V4_0_0,r.ANOMALY_FINANCE_SELLING_PRICE_V3_0_0,r.ANOMALY_FINANCE_SELLING_PRICE_V4_0_0,r.ANOMALY_ADS_GROSS_SALES_V3_0_0,r.ANOMALY_ADS_GROSS_SALES_V4_0_0,r.ANOMALY_ADS_SPEND_V3_0_0,r.ANOMALY_ADS_SPEND_V4_0_0,r.ANOMALY_ADS_ROAS_V3_0_0,r.ANOMALY_ADS_ROAS_V4_0_0,r.ANOMALY_SEO_REACH_SCORE_V3_0_0,r.ANOMALY_SEO_REACH_SCORE_V4_0_0,r.ANOMALY_SEO_PRODUCT_RANKING_V3_0_0,r.ANOMALY_SEO_PRODUCT_RANKING_V4_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_TITLE_V3_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_TITLE_V4_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_A_PLUS_V3_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_A_PLUS_V4_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_IMAGE_V3_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_IMAGE_V4_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_BULLET_POINTS_V3_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_BULLET_POINTS_V4_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_DESCRIPTION_V3_0_0,r.ANOMALY_PRODUCT_LISTING_QUALITY_SCORE_DESCRIPTION_V4_0_0,r.ANOMALY_PRODUCT_RATING_SCORE_V3_0_0,r.ANOMALY_PRODUCT_RATING_SCORE_V4_0_0,r.ANOMALY_FINANCE_FULFILLMENT_FEE_V3_0_0,r.ANOMALY_FINANCE_FULFILLMENT_FEE_V4_0_0,r.ANOMALY_FINANCE_SHIPPING_FEE_V3_0_0,r.ANOMALY_FINANCE_SHIPPING_FEE_V4_0_0,r.ANOMALY_FINANCE_STORAGE_FEE_V3_0_0,r.ANOMALY_FINANCE_STORAGE_FEE_V4_0_0,r.ANOMALY_FINANCE_TAX_V3_0_0,r.ANOMALY_FINANCE_TAX_V4_0_0,r.ANOMALY_EXPENSES_FULFILLMENT_FEE_V3_0_0,r.ANOMALY_EXPENSES_FULFILLMENT_FEE_V4_0_0,r.ANOMALY_EXPENSES_SHIPPING_FEE_V3_0_0,r.ANOMALY_EXPENSES_SHIPPING_FEE_V4_0_0,r.ANOMALY_EXPENSES_STORAGE_FEE_V3_0_0,r.ANOMALY_EXPENSES_STORAGE_FEE_V4_0_0,r.ANOMALY_EXPENSES_TAX_V3_0_0,r.ANOMALY_EXPENSES_TAX_V4_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_PRICE_V3_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_PRICE_V4_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_V3_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_V4_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_COUNT_V3_0_0,r.ANOMALY_MARKET_CATEGORY_MEDIAN_RATING_COUNT_V4_0_0,r.ANOMALY_MARKET_SALES_RANK_V3_0_0,r.ANOMALY_MARKET_SALES_RANK_V4_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_PRICE_V3_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_PRICE_V4_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_V3_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_V4_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_COUNT_V3_0_0,r.ANOMALY_MARKET_MONITORING_CATEGORY_MEDIAN_RATING_COUNT_V4_0_0,r.ANOMALY_MARKET_MONITORING_SALES_RANK_V3_0_0,r.ANOMALY_MARKET_MONITORING_SALES_RANK_V4_0_0],title:"",component:En})],q);let H=class extends h.U{};H=(0,u.gn)([k({definitionKeys:[r.INEFFECTIVE_CAMPAIGNS_SP_V1_0_0,r.INEFFECTIVE_CAMPAIGNS_SP_V1_1_0],title:"Sponsored Products Bidding Recommendations: Review ineffective Ads campaigns",template:'markdown "insight-intro" "We detected optimization opportunities for the campaigns below."\n\nads-campaign-list ineffective renderData.data.campaigns insight\n\nmarkdown "top-space" "Learn more about our Ads recommendations in this article: [Findings: Types and FAQs](https://docs.datahawk.co/docs/insights-findings#review-ineffective-sponsored-product-ads-campaigns)."\n'})],H);var Oe=c(96834),Tn=c(76374);function xn(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"a",10),e.NdJ("click",function(){e.CHM(n);const o=e.oxw().$implicit,s=e.oxw();return e.KtG(s.scrollTo(o.anchor))}),e._uU(1),e.qZA()}if(2&t){const n=e.oxw().$implicit;e.xp6(1),e.Oqu(n.title)}}function On(t,i){if(1&t&&(e.ynx(0),e.YNc(1,xn,2,1,"a",9),e.BQk()),2&t){const n=i.$implicit,a=e.oxw();e.xp6(1),e.Q6J("ngIf",!a.insight.data||(null==a.insight.data||null==a.insight.data[n.id]?null:a.insight.data[n.id].length))}}function kn(t,i){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"h2",11),e._uU(2,"New competitive products"),e.qZA(),e.TgZ(3,"div")(4,"dh-competitors-list",12),e.NdJ("feedbackEvent",function(o){e.CHM(n);const s=e.oxw();return e.KtG(s.onFeedbackEvent(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(4),e.Q6J("insight",n.insight)("competitors",n.insight.data.newCompetitorsProducts)("feedbackData",n.feedbackData)}}function In(t,i){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"h2",13),e._uU(2,"Emerging competitive products"),e.qZA(),e.TgZ(3,"div")(4,"dh-competitors-list",12),e.NdJ("feedbackEvent",function(o){e.CHM(n);const s=e.oxw();return e.KtG(s.onFeedbackEvent(o))}),e.qZA()(),e.BQk()}if(2&t){const n=e.oxw();e.xp6(4),e.Q6J("insight",n.insight)("competitors",n.insight.data.surfacingCompetitorsProducts)("feedbackData",n.feedbackData)}}const Nn=function(){return{linkText:"here",link:"https://docs.datahawk.co/docs/insights-findings#competitive-products-weekly-digest"}};let Rn=(()=>{class t extends G{constructor(){super(...arguments),this.sections=[{id:"newCompetitorsProducts",title:"New competitive products",anchor:"new-competitive-products"},{id:"surfacingCompetitorsProducts",title:"Emerging competitive products",anchor:"emerging-competitive-products"}],this.feedbackEvent=new e.vpe}scrollTo(n){window.document.getElementById(n).scrollIntoView()}onFeedbackEvent(n){this.feedbackEvent.emit({entityId:n.competitor.productKey,feedback:n.feedback,relatedEntityIds:n.competitor.productsImpacted.map(a=>a.productKey)})}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-competition-monitoring-insight-render-render"]],inputs:{insight:"insight",feedbackData:"feedbackData"},outputs:{feedbackEvent:"feedbackEvent"},features:[e.qOj],decls:16,vars:5,consts:[[1,"liquid-rendered-content"],[1,"insight-intro"],[1,"toc"],[1,"toc-title"],[1,"toc-links"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"top-space"],["target","_blank","dhTrackClickEvent","App | Click - Intelligence | Insights | Essential insight link","href","https://docs.datahawk.co/docs/insights-findings#competitive-products-weekly-digest",3,"dhTrackClickEventParam
1s"],["class","toc-link",3,"click",4,"ngIf"],[1,"toc-link",3,"click"],["id","new-competitive-products"],[3,"insight","competitors","feedbackData","feedbackEvent"],["id","emerging-competitive-products"]],template:function(n,a){1&n&&(e.TgZ(0,"div",0)(1,"p",1),e._uU(2,"We detected new and emerging products in your market."),e.qZA(),e.TgZ(3,"div",2)(4,"div",3),e._uU(5,"Table of contents"),e.qZA(),e.TgZ(6,"div",4),e.YNc(7,On,2,1,"ng-container",5),e.qZA()(),e._UZ(8,"hr"),e.YNc(9,kn,5,3,"ng-container",6),e.YNc(10,In,5,3,"ng-container",6),e.TgZ(11,"p",7),e._uU(12," Learn more about our competition monitoring recommendations "),e.TgZ(13,"a",8),e._uU(14,"here"),e.qZA(),e._uU(15,". "),e.qZA()()),2&n&&(e.xp6(7),e.Q6J("ngForOf",a.sections),e.xp6(2),e.Q6J("ngIf",null==a.insight.data||null==a.insight.data.newCompetitorsProducts?null:a.insight.data.newCompetitorsProducts.length),e.xp6(1),e.Q6J("ngIf",null==a.insight.data||null==a.insight.data.surfacingCompetitorsProducts?null:a.insight.data.surfacingCompetitorsProducts.length),e.xp6(3),e.Q6J("dhTrackClickEventParams",e.DdM(4,Nn)))},dependencies:[Oe.EK,_.sg,_.O5,Tn.P]}),t})(),W=class extends h.U{};W=(0,u.gn)([k({definitionKeys:[r.COMPETITION_MONITORING_V1_0_0,r.COMPETITION_MONITORING_V2_0_0,r.COMPETITION_MONITORING_V2_1_0],title:"Competition Monitoring",component:Rn})],W);class bn extends x.L{constructor(i){super(i)}}class ke extends h.U{constructor(){super(...arguments),this._anomalyLabel="Anomaly",this._dimensions=[{type:"marketplace",size:2,test:i=>2===Object.entries(i).length&&i.accountId&&i.marketplaceKey},{type:"product",size:3,test:i=>3===Object.entries(i).length&&i.accountId&&i.marketplaceKey&&i.productKey}]}createInsightInstance(i){return new bn(i)}validateData(i){return!0}transformData(i){super.transformData(i),i.anomalyInsightLevel="marketplace",i.anomalyInsightTypeText=this._anomalyLabel;const a=this.preprocessDimensions(i.data.anomalies);a.forEach(l=>{!l.changePercentage&&l.expectedValue&&(l.changePercentage=((l.metricValue??0)-(l.expectedValue??1))/(l.expectedValue??1)*100)});const o=[];a.filter(l=>"marketplace"===l._frontendMetadata.type).map(l=>{o.push(l)});const s=[...o];if(a.filter(l=>"product"===l._frontendMetadata.type).map(l=>{if(l.parent?.productKey){const d=a.find(m=>m.dimensions.productKey===l.parent.productKey)??o.find(m=>m.dimensions.productKey===l.parent.productKey);if(d)d.children.push(l);else{const m=JSON.parse(JSON.stringify(l.parent));m.dimensions={accountId:l.dimensions.accountId,marketplaceKey:l.dimensions.marketplaceKey,productKey:m.productKey},m._frontendMetadata={type:"product",virtual:!0},m.children=[l],(s.find(g=>g.marketplaceKey===l.marketplaceKey)?.children??o).push(m)}}else(s.find(d=>d.marketplaceKey===l.marketplaceKey)?.children??o).push(l)}),1===o.length&&"product"===o[0]._frontendMetadata.type&&(i.anomalyInsightLevel="product",o[0]._frontendMetadata.virtual)){const l=o[0].children;o.length=0,o.push(...l)}if(o.length>1&&o.every(l=>"product"===l._frontendMetadata.type)){i.anomalyInsightLevel="product",i.significantChanges=o.map(d=>d?.children?.length||1).reduce((d,m)=>d+m,0);const l={marketplaceKey:o[0].marketplaceKey,accountId:o[0].accountId,_frontendMetadata:{type:"marketplace"},children:[...o]};o.length=0,o.push(l)}i.data.anomalies=o}validateTransformedData(i){return!!i.data.anomalies?.length}preprocessDimensions(i){const n=i.map(a=>{a._frontendMetadata={type:null},a.children=[];const o=this._dimensions.find(s=>s.test(a.dimensions));return o&&(a._frontendMetadata.dimensionLevel=o.size,a._frontendMetadata.type=o.type),a});return n.sort((a,o)=>a._frontendMetadata.dimensionLevel-o._frontendMetadata.dimensionLevel),n}processTitleBase(i){const n=i?.data?.anomalies?.[0],a=1===i?.data?.anomalies?.length&&"product"===n?._frontendMetadata.type,o=n?.children?.map(m=>m?.children?.length||1).reduce((m,g)=>m+g,0),l=n?.changePercentage??0,d=[this._anomalyLabel];if(a||"product"!==i.anomalyInsightLevel)if(n?.expectedValue){const m=new _.JJ("en-US").transform(Math.abs(l),l%1?"1.2-2":"1.0-0");d.push(`${m}% ${l>0?"higher":"lower"}`)}else d.push("Significant change");else d.push(`${o} significant changes`);return d}processTitleDimensions(i){const a=i?.data?.anomalies?.[0]?.channelProductId??0,o=i?.data?.metadata?.marketplaceKey,s=i?.data?.metadata?.accountId,l=i?.data?.metadata?.accountName,d=l?`${l} (${s})`:`${s}`,m=[];return a&&m.push(`ASIN ${a}`),o&&m.push(o),s&&m.push(d),m}}var Pn=c(12911),Mn=c(23630),j=c(69706),Sn=c(57161),Ln=c(95533),Un=c(12951),Ie=c(75942);function zn(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.BQk()),2&t){const n=e.oxw();e.xp6(1),e.AsE(" ",n.insight.anomalyInsightTypeText,": ",n.insight.significantChanges," significant changes ")}}function Yn(t,i){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"optionalDecimal"),e.qZA()),2&t){const n=e.oxw(3);e.xp6(1),e.AsE("",n.insight.data.anomalies[0].changePercentage>0?"+":"","",e.lcZ(2,2,n.insight.data.anomalies[0].changePercentage),"%")}}function Vn(t,i){if(1&t&&(e.TgZ(0,"span",23),e._UZ(1,"i",24),e.YNc(2,Yn,3,4,"span",5),e.qZA()),2&t){const n=e.oxw(2);e.ekj("trend--sentiment-negative",n.insight.data.anomalies[0].changePercentage<0)("trend--sentiment-positive",n.insight.data.anomalies[0].changePercentage>0),e.xp6(1),e.ekj("fa-arrow-down",n.insight.data.anomalies[0].changePercentage<0)("fa-arrow-up",n.insight.data.anomalies[0].changePercentage>0),e.xp6(1),e.Q6J("ngIf",n.insight.data.anomalies[0].expectedValue)}}function Fn(t,i){1&t&&(e.TgZ(0,"span"),e._uU(1,"Significant change"),e.qZA())}function Bn(t,i){if(1&t&&(e._uU(0),e.YNc(1,Vn,3,9,"span",22),e.YNc(2,Fn,2,0,"span",5)),2&t){const n=e.oxw();e.hij(" ",n.insight.anomalyInsightTypeText," "),e.xp6(1),e.Q6J("ngIf",n.insight.data.anomalies[0].expectedValue),e.xp6(1),e.Q6J("ngIf",!n.insight.data.anomalies[0].expectedValue)}}const L=function(t,i,n){return{productId:t,marketplaceKey:i,insightDefinitionKey:n}};function Zn(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"div",25)(1,"dh-product-card",26),e.NdJ("tracked",function(){e.CHM(n);const o=e.oxw();return e.KtG(o.updateTrack(o.insight.data.anomalies[0]))}),e.qZA()()}if(2&t){const n=e.oxw();e.xp6(1),e.Q6J("name",n.insight.data.anomalies[0].name)("tooltip",n.insight.data.anomalies[0].name)("channelProductId",n.insight.data.anomalies[0].channelProductId)("userProductId",n.insight.data.anomalies[0].userProductId)("pictureUrl",n.insight.data.anomalies[0].pictureUrl)("externalUrl",n.insight.data.anomalies[0].externalUrl)("marketplaceKey",n.insight.data.anomalies[0].marketplaceKey)("showMarketplace",!1)("appInsightsClickEventParam
1s",e.kEZ(11,L,n.insight.data.anomalies[0].channelProductId,n.insight.data.anomalies[0].marketplaceKey,n.insight.insightDefinitionKey))("appInsightsTrackEventParams",e.kEZ(15,L,n.insight.data.anomalies[0].channelProductId,n.insight.data.anomalies[0].marketplaceKey,n.insight.insightDefinitionKey))("isTracked",n.insight.data.anomalies[0].isTracked)}}function Dn(t,i){1&t&&e.GkF(0)}function Qn(t,i){1&t&&e.GkF(0)}function Gn(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",6),e._uU(2,"Found in:"),e.qZA(),e.TgZ(3,"div",7),e.YNc(4,Dn,1,0,"ng-container",27),e.qZA(),e.TgZ(5,"div",6),e._uU(6,"Measured for Account:"),e.qZA(),e.TgZ(7,"div",28),e.YNc(8,Qn,1,0,"ng-container",29),e.qZA(),e.BQk()),2&t){const n=e.oxw(),a=e.MAs(46),o=e.MAs(34);e.xp6(4),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",n.insight.data.anomalies[0]),e.xp6(4),e.Q6J("ngTemplateOutlet",o)}}function Kn(t,i){1&t&&e.GkF(0)}function Jn(t,i){1&t&&e.GkF(0)}function qn(t,i){1&t&&e.GkF(0)}function Hn(t,i){1&t&&e.GkF(0)}const v=function(t){return{item:t}};function Wn(t,i){if(1&t&&(e.TgZ(0,"div",32)(1,"span",33),e.YNc(2,Kn,1,0,"ng-container",27),e.qZA(),e._uU(3," is "),e.YNc(4,Jn,1,0,"ng-container",27),e._uU(5," than expected value "),e.TgZ(6,"span",33),e.YNc(7,qn,1,0,"ng-container",27),e.qZA(),e._uU(8," in "),e.TgZ(9,"span",33),e.YNc(10,Hn,1,0,"ng-container",27),e.qZA()()),2&t){const n=e.oxw(2),a=e.MAs(40),o=e.MAs(44),s=e.MAs(42),l=e.MAs(46);e.xp6(2),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(8,v,n.insight.data.anomalies[0])),e.xp6(2),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.VKq(10,v,n.insight.data.anomalies[0])),e.xp6(3),e.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",e.VKq(12,v,n.insight.data.anomalies[0])),e.xp6(3),e.Q6J("ngTemplateOutlet",l)("ngTemplateOutletContext",n.insight.data.anomalies[0])}}function jn(t,i){1&t&&e.GkF(0)}function $n(t,i){1&t&&e.GkF(0)}function Xn(t,i){1&t&&e.GkF(0)}function ei(t,i){if(1&t&&(e.TgZ(0,"div",32),e._uU(1," Observed value "),e.TgZ(2,"span",33),e.YNc(3,jn,1,0,"ng-container",27),e.qZA(),e._uU(4," is "),e.TgZ(5,"span",34),e._uU(6,"higher"),e.qZA(),e._uU(7," than expected value "),e.TgZ(8,"span",33),e.YNc(9,$n,1,0,"ng-container",27),e.qZA(),e._uU(10," in "),e.TgZ(11,"span",33),e.YNc(12,Xn,1,0,"ng-container",27),e.qZA()()),2&t){const n=e.oxw(2),a=e.MAs(40),o=e.MAs(42),s=e.MAs(46);e.xp6(3),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(6,v,n.insight.data.anomalies[0])),e.xp6(6),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",e.VKq(8,v,n.insight.data.anomalies[0])),e.xp6(3),e.Q6J("ngTemplateOutlet",s)("ngTemplateOutletContext",n.insight.data.anomalies[0])}}function ti(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",6),e._uU(2,"What happened:"),e.qZA(),e.YNc(3,Wn,11,14,"div",30),e.YNc(4,ei,13,10,"ng-template",null,31,e.W1O),e.BQk()),2&t){const n=e.MAs(5),a=e.oxw();e.xp6(3),e.Q6J("ngIf",a.insight.data.anomalies[0].expectedValue)("ngIfElse",n)}}function ni(t,i){1&t&&e.GkF(0)}function ii(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"div",6),e._uU(2,"Measured for Account:"),e.qZA(),e.TgZ(3,"div",7),e.YNc(4,ni,1,0,"ng-container",29),e.qZA(),e.BQk()),2&t){e.oxw();const n=e.MAs(34);e.xp6(4),e.Q6J("ngTemplateOutlet",n)}}function ai(t,i){1&t&&e._UZ(0,"dh-ui-icon",35)}function oi(t,i){1&t&&e._UZ(0,"dh-ui-icon",36),2&t&&e.Q6J("spin",!0)}function ri(t,i){1&t&&(e.ynx(0),e._uU(1,"also"),e.BQk())}function si(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"div",43)(1,"dh-product-card",44),e.NdJ("tracked",function(){e.CHM(n);const o=e.oxw().$implicit,s=e.oxw(2);return e.KtG(s.updateTrack(o))}),e.qZA()()}if(2&t){const n=e.oxw().$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("name",n.name)("tooltip",n.name)("channelProductId",n.channelProductId)("userProductId",n.userProductId)("pictureUrl",n.pictureUrl)("externalUrl",n.externalUrl)("marketplaceKey",n.marketplaceKey)("appInsightsClickEventParams",e.kEZ(10,L,n.channelProductId,n.marketplaceKey,a.insight.insightDefinitionKey))("appInsightsTrackEventParams",e.kEZ(14,L,n.channelProductId,n.marketplaceKey,a.insight.insightDefinitionKey))("isTracked",n.isTracked)}}function ci(t,i){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e._UZ(2,"dh-asin",45),e._uU(3," show(s) activity "),e.qZA()),2&t){const n=e.oxw().$implicit;e.xp6(1),e.hij(" ",null==n||null==n.children?null:n.children.length," variant(s) of "),e.xp6(1),e.Q6J("asin",n.channelProductId)("externalUrl",n.externalUrl)}}function li(t,i){1&t&&e.GkF(0)}function _i(t,i){if(1&t&&(e.ynx(0),e.YNc(1,li,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(3).$implicit;e.oxw(2);const a=e.MAs(36);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function di(t,i){1&t&&e.GkF(0)}function pi(t,i){if(1&t&&(e.ynx(0),e.YNc(1,di,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(3).$implicit;e.oxw(2);const a=e.MAs(38);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function mi(t,i){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"optionalDecimal"),e.qZA(),e._uU(5,", "),e.ynx(6,46),e.YNc(7,_i,2,4,"ng-container",47),e.YNc(8,pi,2,4,"ng-container",48),e.BQk(),e.qZA()),2&t){const n=e.oxw(2).$implicit,a=e.oxw(2);e.xp6(1),e.hij(" ",a.insight.anomalyInsightTypeText,": "),e.xp6(1),e.ekj("c
1ompare-better",n.changePercentage>0)("compare-worse",n.changePercentage<0),e.xp6(1),e.AsE("",n.changePercentage>0?"+":"","",e.lcZ(4,9,n.changePercentage),"%"),e.xp6(3),e.Q6J("ngSwitch",null==a.insight.data||null==a.insight.data.metadata?null:a.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function gi(t,i){1&t&&e.GkF(0)}function ui(t,i){if(1&t&&(e.ynx(0),e.YNc(1,gi,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(3).$implicit;e.oxw(2);const a=e.MAs(36);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function hi(t,i){1&t&&e.GkF(0)}function yi(t,i){if(1&t&&(e.ynx(0),e.YNc(1,hi,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(3).$implicit;e.oxw(2);const a=e.MAs(38);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function fi(t,i){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.ynx(2,46),e.YNc(3,ui,2,4,"ng-container",47),e.YNc(4,yi,2,4,"ng-container",48),e.BQk(),e.qZA()),2&t){const n=e.oxw(4);e.xp6(1),e.hij(" ",n.insight.anomalyInsightTypeText,": "),e.xp6(1),e.Q6J("ngSwitch",null==n.insight.data||null==n.insight.data.metadata?null:n.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function Ai(t,i){if(1&t&&(e.ynx(0),e.YNc(1,mi,9,11,"div",5),e.YNc(2,fi,5,3,"div",5),e.BQk()),2&t){const n=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",n.expectedValue),e.xp6(1),e.Q6J("ngIf",!n.expectedValue)}}function vi(t,i){1&t&&e.GkF(0)}function Ci(t,i){if(1&t&&(e.ynx(0),e.YNc(1,vi,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(2).$implicit;e.oxw(3);const a=e.MAs(36);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function Ei(t,i){1&t&&e.GkF(0)}function Ti(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Ei,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(2).$implicit;e.oxw(3);const a=e.MAs(38);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function xi(t,i){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"optionalDecimal"),e.qZA(),e._uU(5,", "),e.ynx(6,46),e.YNc(7,Ci,2,4,"ng-container",47),e.YNc(8,Ti,2,4,"ng-container",48),e.BQk(),e.qZA()),2&t){const n=e.oxw().$implicit,a=e.oxw(3);e.xp6(1),e.hij(" ",a.insight.anomalyInsightTypeText,": "),e.xp6(1),e.ekj("compare-better",n.changePercentage>0)("compare-worse",n.changePercentage<0),e.xp6(1),e.AsE("",n.changePercentage>0?"+":"","",e.lcZ(4,9,n.changePercentage),"%"),e.xp6(3),e.Q6J("ngSwitch",null==a.insight.data||null==a.insight.data.metadata?null:a.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function Oi(t,i){1&t&&e.GkF(0)}function ki(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Oi,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(2).$implicit;e.oxw(3);const a=e.MAs(36);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function Ii(t,i){1&t&&e.GkF(0)}function wi(t,i){if(1&t&&(e.ynx(0),e.YNc(1,Ii,1,0,"ng-container",27),e.BQk()),2&t){const n=e.oxw(2).$implicit;e.oxw(3);const a=e.MAs(38);e.xp6(1),e.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",e.VKq(2,v,n))}}function Ni(t,i){if(1&t&&(e.TgZ(0,"div"),e._uU(1),e.ynx(2,46),e.YNc(3,ki,2,4,"ng-container",47),e.YNc(4,wi,2,4,"ng-container",48),e.BQk(),e.qZA()),2&t){const n=e.oxw(4);e.xp6(1),e.hij(" ",n.insight.anomalyInsightTypeText,": "),e.xp6(1),e.Q6J("ngSwitch",null==n.insight.data||null==n.insight.data.metadata?null:n.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function Ri(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"div",39)(1,"div",40)(2,"div",43)(3,"dh-product-card",49),e.NdJ("tracked",function(){const s=e.CHM(n).$implicit,l=e.oxw(3);return e.KtG(l.updateTrack(s))}),e.qZA()(),e.TgZ(4,"div",42),e.YNc(5,xi,9,11,"div",5),e.YNc(6,Ni,5,3,"div",5),e.qZA()()()}if(2&t){const n=i.$implicit,a=e.oxw(3);e.xp6(3),e.Q6J("name",n.name)("tooltip",n.name)("channelProductId",n.channelProductId)("userProductId",n.userProductId)("pictureUrl",n.pictureUrl)("externalUrl",n.externalUrl)("marketplaceKey",n.marketplaceKey)("appInsightsTrackEventParams",e.kEZ(12,L,n.channelProductId,n.marketplaceKey,a.insight.insightDefinitionKey))("appInsightsClickEventParam
1s",e.kEZ(16,L,n.channelProductId,n.marketplaceKey,a.insight.insightDefinitionKey))("isTracked",n.isTracked),e.xp6(2),e.Q6J("ngIf",n.expectedValue),e.xp6(1),e.Q6J("ngIf",!n.expectedValue)}}function bi(t,i){if(1&t&&(e.TgZ(0,"div",39)(1,"div",40),e.YNc(2,si,2,18,"div",41),e.TgZ(3,"div",42),e.YNc(4,ci,4,3,"div",5),e.YNc(5,Ai,3,2,"ng-container",5),e.qZA()(),e.YNc(6,Ri,7,20,"div",38),e.qZA()),2&t){const n=i.$implicit;e.xp6(1),e.ekj("child",!n.children.length),e.xp6(1),e.Q6J("ngIf",!n._frontendMetadata.virtual),e.xp6(2),e.Q6J("ngIf",n._frontendMetadata.virtual),e.xp6(1),e.Q6J("ngIf",!n._frontendMetadata.virtual),e.xp6(1),e.Q6J("ngForOf",n.children)}}function Pi(t,i){if(1&t&&(e.ynx(0),e.TgZ(1,"p",37),e._uU(2," The following items "),e.YNc(3,ri,2,0,"ng-container",5),e._uU(4," show significant changes for this metric "),e.qZA(),e.YNc(5,bi,7,6,"div",38),e.BQk()),2&t){const n=e.oxw();e.xp6(3),e.Q6J("ngIf",n.insight.data.anomalies[0].metricValue),e.xp6(2),e.Q6J("ngForOf",n.insight.data.anomalies[0].children)}}function Mi(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.BQk()),2&t){const n=e.oxw(2);e.xp6(1),e.AsE(" ",n.insight.data.metadata.accountName," (",n.insight.data.metadata.accountId,") ")}}function Si(t,i){if(1&t&&e._uU(0),2&t){const n=e.oxw(2);e.hij(" ",n.insight.data.metadata.accountId," ")}}function Li(t,i){if(1&t&&(e.YNc(0,Mi,2,2,"ng-container",0),e.YNc(1,Si,1,1,"ng-template",null,50,e.W1O)),2&t){const n=e.MAs(2),a=e.oxw();e.Q6J("ngIf",a.insight.data.metadata.accountName)("ngIfElse",n)}}function Ui(t,i){if(1&t&&(e.TgZ(0,"span",51),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"getMarketplaceByKey"),e.qZA(),e._uU(4," vs expected "),e.TgZ(5,"span",51),e._uU(6),e.ALo(7,"currency"),e.ALo(8,"getMarketplaceByKey"),e.qZA()),2&t){const n=i.item,a=e.oxw();let o,s;e.xp6(1),e.Oqu(e.gM2(2,2,n.metricValue,null==(o=e.lcZ(3,7,a.insight.data.metadata.marketplaceKey))?null:o.currencyCode,"symbol","1.2-2")),e.xp6(5),e.Oqu(e.gM2(7,9,n.expectedValue,null==(s=e.lcZ(8,14,a.insight.data.metadata.marketplaceKey))?null:s.currencyCode,"symbol","1.2-2"))}}function zi(t,i){if(1&t&&(e.TgZ(0,"span",51),e._uU(1),e.ALo(2,"ceil"),e.qZA(),e._uU(3," vs expected "),e.TgZ(4,"span",51),e._uU(5),e.ALo(6,"ceil"),e.qZA()),2&t){const n=i.item;e.xp6(1),e.Oqu(e.lcZ(2,2,n.metricValue)),e.xp6(4),e.Oqu(e.lcZ(6,4,n.expectedValue))}}function Yi(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"getMarketplaceByKey"),e.BQk()),2&t){const n=e.oxw().item,a=e.oxw();let o;e.xp6(1),e.hij(" ",e.gM2(2,1,n.metricValue,null==(o=e.lcZ(3,6,a.insight.data.metadata.marketplaceKey))?null:o.currencyCode,"symbol","1.2-2")," ")}}function Vi(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.BQk()),2&t){const n=e.oxw().item;e.xp6(1),e.hij(" ",e.lcZ(2,1,n.metricValue)," ")}}function Fi(t,i){if(1&t&&(e.ynx(0,46),e.YNc(1,Yi,4,8,"ng-container",47),e.YNc(2,Vi,3,3,"ng-container",48),e.BQk()),2&t){const n=e.oxw();e.Q6J("ngSwitch",null==n.insight.data||null==n.insight.data.metadata?null:n.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function Bi(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"getMarketplaceByKey"),e.BQk()),2&t){const n=e.oxw().item,a=e.oxw();let o;e.xp6(1),e.hij(" ",e.gM2(2,1,n.expectedValue,null==(o=e.lcZ(3,6,a.insight.data.metadata.marketplaceKey))?null:o.currencyCode,"symbol","1.2-2")," ")}}function Zi(t,i){if(1&t&&(e.ynx(0),e._uU(1),e.ALo(2,"number"),e.BQk()),2&t){const n=e.oxw().item;e.xp6(1),e.hij(" ",e.lcZ(2,1,n.expectedValue)," ")}}function Di(t,i){if(1&t&&(e.ynx(0,46),e.YNc(1,Bi,4,8,"ng-container",47),e.YNc(2,Zi,3,3,"ng-container",48),e.BQk()),2&t){const n=e.oxw();e.Q6J("ngSwitch",null==n.insight.data||null==n.insight.data.metadata?null:n.insight.data.metadata.metricUnit),e.xp6(1),e.Q6J("ngSwitchCase","price")}}function Qi(t,i){1&t&&(e.ynx(0),e._uU(1,"lower"),e.BQk())}function Gi(t,i){1&t&&(e.ynx(0),e._uU(1,"higher"),e.BQk())}function Ki(t,i){if(1&t&&(e.TgZ(0,"span",52),e._uU(1),e.ALo(2,"optionalDecimal"),e.YNc(3,Qi,2,0,"ng-container",5),e.YNc(4,Gi,2,0,"ng-container",5),e.qZA()),2&t){const n=i.item;e.ekj("trend-inline--sentiment-negative",n.changePercentage<0)("trend-inline--sentiment-positive",n.changePercentage>0),e.xp6(1),e.hij(" ",e.lcZ(2,7,n.changePercentage<0?-n.changePercentage:n.changePercentage),"% "),e.xp6(2),e.Q6J("ngIf",n.changePercentage<0),e.xp6(1),e.Q6J("ngIf",n.changePercentage>0)}}function Ji(t,i){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"getMarketplaceByKey"),e.qZA(),e._UZ(3,"dh-country-flag",53),e.ALo(4,"getMarketplaceByKey"),e.ALo(5,"getMarketplaceByKey"),e.TgZ(6,"span"),e._uU(7),e.ALo(8,"getMarketplaceByKey"),e.qZA()),2&t){const n=i.marketplaceKey;let a,o,s,l;e.xp6(1),e.Oqu(null==(a=e.lcZ(2,4,n))?null:a.channel),e.xp6(2),e.Q6J("countryCode",null==(o=e.lcZ(4,6,n)
1)?null:o.countryCode)("dhTooltip",null==(s=e.lcZ(5,8,n))?null:s.name),e.xp6(4),e.Oqu(null==(l=e.lcZ(8,10,n))?null:l.countryCode)}}const we=function(t){return{insightDefinitionKey:t}},qi=function(t){return[t,"analytics"]};class P extends G{constructor(i,n,a,o){super(),this.cdr=i,this.analyticsService=n,this.router=a,this.store=o,this.loading=!1}updateInsight(i){this.insight=i,this.cdr.detectChanges()}redirectToSheet(i){const n=this.store.selectSnapshot(Pn.k.getActiveSpreadsheetId);n?(this.loading=!0,this.analyticsService.fetchSheetURL(n,i).then(({sheetUrl:a})=>{a&&window.open(a,"_blank")}).finally(()=>{this.loading=!1})):this.router.navigate([this.baseApplicationUrl,"destinations","new"],{queryParams:{platform:"Spreadsheet"}})}updateTrack(i){i.isTracked=!0}}P.\u0275fac=function(i){return new(i||P)(e.Y36(e.sBO),e.Y36(Mn.y),e.Y36(j.F0),e.Y36(Sn.yh))},P.\u0275cmp=e.Xpm({type:P,selectors:[["dh-anomaly-insight-render"]],inputs:{insight:"insight"},features:[e.qOj],decls:47,vars:24,consts:[[4,"ngIf","ngIfElse"],["singleItem",""],[1,"liquid-text","anomaly-summary"],["class","product-summary emphasis-text",4,"ngIf"],[1,"summary-grid"],[4,"ngIf"],[1,"anomaly-summary--label"],[1,"anomaly-summary--value","emphasis-text"],["dhTooltip","Analysis saves you time by running group-bys across your most-queried properties, and measuring the relevance of every segment."],["nz-button","","nzType","link","dhTrackClickEvent","App | Click - Intelligence | Insights | Profit and Loss Automated Dashboard",3,"dhTrackClickEventParams","click"],["size","m",1,"icon-sheet"],[1,"nav-title"],["class","icon-right","className","fas fa-fw fa-external-link-alt","size","s",4,"ngIf"],["class","icon-right","className","fas fa-spinner",3,"spin",4,"ngIf"],["nz-button","","nzType","link","dhTrackClickEvent","App | Click - Intelligence | Insights | Sales Tracker",3,"dhTrackClickEventParams","routerLink"],["account",""],["priceValues",""],["numberValues",""],["observedValue",""],["expectedValue",""],["valueVariation",""],["marketplace",""],["class","trend",3,"trend--sentiment-negative","trend--sentiment-positive",4,"ngIf"],[1,"trend"],[1,"up","fas"],[1,"product-summary","emphasis-text"],["appInsightsClickEvent","App | Click - Intelligence | Insights | Click Product","appInsightsTrackEvent","App | Click - Intelligence | Insights | Track Product",3,"name","tooltip","channelProductId","userProductId","pictureUrl","externalUrl","marketplaceKey","showMarketplace","appInsightsClickEventParams","appInsightsTrackEventParams","isTracked","tracked"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"anomaly-summary--value","row-span-2","emphasis-text"],[4,"ngTemplateOutlet"],["class","anomaly-summary--value",4,"ngIf","ngIfElse"],["noExpectedValue",""],[1,"anomaly-summary--value"],[1,"emphasis-text"],[1,"trend-inline","trend-inline--sentiment-positive"],["className","fas fa-fw fa-external-link-alt","size","s",1,"icon-right"],["className","fas fa-spinner",1,"icon-right",3,"spin"],[1,"emphasis"],["class","child",4,"ngFor","ngForOf"],[1,"child"],[1,"child-sentence"],["class","product-block",4,"ngIf"],[1,"liquid-text"],[1,"product-block"],["appInsightsClickEvent","App | Click - Intelligence | Insights | Click Product","appInsightsTrackEvent","App | Click - Intelligence | Insights | Track Product",3,"name","tooltip","channelProductId","userProductId","pictureUrl","externalUrl","marketplaceKey","appInsightsClickEventParams","appInsightsTrackEventParams","isTracked","tracked"],[1,"asin",3,"asin","externalUrl"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["appInsightsTrackEvent","App | Click - Intelligence | Insights | Track Product","appInsightsClickEvent","App | Click - Intelligence | Insights | Click Product",3,"name","tooltip","channelProductId","userProductId","pictureUrl","externalUrl","marketplaceKey","appInsightsTrackEventParams","appInsightsClickEventParams","isTracked","tracked"],["noAccountName",""],[1,"value"],[1,"trend-inline"],["fontSize","15",3,"countryCode","dhTooltip"]],template:function(i,n){if(1&i&&(e.TgZ(0,"h1"),e.YNc(1,zn,2,2,"ng-container",0),e.YNc(2,Bn,3,3,"ng-template",null,1,e.W1O),e.qZA(),e.TgZ(4,"div",2),e.YNc(5,Zn,2,19,"div",3),e.TgZ(6,"div",4),e.YNc(7,Gn,9,3,"ng-container",5),e.YNc(8,ti,6,2,"ng-container",5),e.TgZ(9,"div",6),e._uU(10,"When:"),e.qZA(),e.TgZ(11,"div",7),e._uU(12),e.ALo(13,"date"),e.qZA(),e.YNc(14,ii,5,1,"ng-container",5),e.qZA()(),e.TgZ(15,"h1")(16,"span",8),e._uU(17,"Analysis"),e.qZA()(),e.TgZ(18,"p"),e._uU(19," For the account/marketplace view, please check your "),e.TgZ(20,"a",9),e.NdJ("click",function(){return n.redirectToS
1heet("Profit and Loss Automated Dashboard")}),e._UZ(21,"dh-ui-sheet-icon",10),e.TgZ(22,"span",11),e._uU(23,"Profit & Loss dashboard"),e.qZA(),e.YNc(24,ai,1,0,"dh-ui-icon",12),e.YNc(25,oi,1,1,"dh-ui-icon",13),e.qZA(),e._uU(26,"."),e._UZ(27,"br"),e._uU(28," If you want to analyze specific products, please use the "),e.TgZ(29,"a",14),e._uU(30,"Sales Tracker"),e.qZA(),e._uU(31," in Product Analysis.\n"),e.qZA(),e.YNc(32,Pi,6,2,"ng-container",5),e.YNc(33,Li,3,2,"ng-template",null,15,e.W1O),e.YNc(35,Ui,9,16,"ng-template",null,16,e.W1O),e.YNc(37,zi,7,6,"ng-template",null,17,e.W1O),e.YNc(39,Fi,3,2,"ng-template",null,18,e.W1O),e.YNc(41,Di,3,2,"ng-template",null,19,e.W1O),e.YNc(43,Ki,5,9,"ng-template",null,20,e.W1O),e.YNc(45,Ji,9,12,"ng-template",null,21,e.W1O)),2&i){const a=e.MAs(3);e.xp6(1),e.Q6J("ngIf",n.insight.significantChanges)("ngIfElse",a),e.xp6(3),e.ekj("anomaly-summary-wide",n.insight.significantChanges),e.xp6(1),e.Q6J("ngIf","product"===(null==n.insight.data.anomalies[0]||null==n.insight.data.anomalies[0]._frontendMetadata?null:n.insight.data.anomalies[0]._frontendMetadata.type)),e.xp6(2),e.Q6J("ngIf",n.insight.significantChanges),e.xp6(1),e.Q6J("ngIf",!n.insight.significantChanges),e.xp6(4),e.hij(" ",e.xi3(13,15,n.insight.referenceDate,"MMM d, y")," "),e.xp6(2),e.Q6J("ngIf",!n.insight.significantChanges),e.xp6(6),e.Q6J("dhTrackClickEventParams",e.VKq(18,we,n.insight.insightDefinitionKey)),e.xp6(4),e.Q6J("ngIf",!n.loading),e.xp6(1),e.Q6J("ngIf",n.loading),e.xp6(4),e.Q6J("dhTrackClickEventParams",e.VKq(20,we,n.insight.insightDefinitionKey))("routerLink",e.VKq(22,qi,n.baseApplicationUrl)),e.xp6(3),e.Q6J("ngIf",null==n.insight.data.anomalies[0]||null==n.insight.data.anomalies[0].children?null:n.insight.data.anomalies[0].children.length)}},dependencies:[f.oJ,f.sc,Oe.EK,Ln.h,Un.qU,b.N,Ie.Y,j.rH,_.sg,_.O5,_.tP,_.RF,_.n9,_.ED,f.r0,Ee.w,Ce.K,S.MQ,_.JJ,_.H9,_.uU],styles:["dh-country-flag[_ngcontent-%COMP%]{margin-right:4px;margin-left:4px}.icon-sheet[_ngcontent-%COMP%]{position:relative;top:4px}.icon-right[_ngcontent-%COMP%]{margin-left:4px}.child[_ngcontent-%COMP%]{background-color:var(--dh-card-background-color);border:solid 1px var(--dh-main-dark-1);margin-bottom:var(--dh-space-m);padding:var(--dh-space-s)}.child[_ngcontent-%COMP%] .child-sentence[_ngcontent-%COMP%] > dh-product-card[_ngcontent-%COMP%]{margin-bottom:4px}.child[_ngcontent-%COMP%] .child[_ngcontent-%COMP%]{grid-column:1/3;border:0;padding:0;margin:0;background-color:transparent}.child[_ngcontent-%COMP%] .child[_ngcontent-%COMP%] + .child[_ngcontent-%COMP%]{margin-top:var(--dh-space-xxs);padding-top:var(--dh-space-xxs);border-top:solid 1px var(--dh-main-dark-1)}.child[_ngcontent-%COMP%] > .child.child-sentence[_ngcontent-%COMP%]{margin-top:0}.child[_ngcontent-%COMP%]:has(.child.child-sentence){padding-top:0;padding-bottom:0;border:transparent;background-color:transparent}.compare-better[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold);color:var(--dh-secondary-3)}.compare-worse[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold);color:var(--dh-red-6)}.value[_ngcontent-%COMP%], .emphasis[_ngcontent-%COMP%]{color:var(--dh-main-light-2);font-weight:var(--dh-text-semi-bold)}.asin[_ngcontent-%COMP%]{margin-left:4px}.involved[_ngcontent-%COMP%]{display:flex;flex-direction:row}.involved[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:0 0 auto}.involved-what[_ngcontent-%COMP%]{margin-left:4px;flex:1 1 auto;overflow:hidden}.involved[_ngcontent-%COMP%] dh-product-card[_ngcontent-%COMP%]{align-items:baseline}.trend[_ngcontent-%COMP%]{display:inline-flex;font-size:var(--dh-heading-s-font-size);line-height:var(--dh-heading-m-line-height);margin-left:var(--dh-space-s);padding-left:4px;padding-right:7px;border-radius:7px}.trend[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{align-items:center;align-self:center;display:flex;height:28px;justify-content:center;margin-right:4px;width:28px}.trend.trend--sentiment-positive[_ngcontent-%COMP%]{color:var(--dh-secondary-3);background-color:var(--dh-lime-2)}.trend.trend--sentiment-positive[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{rotate:45deg}.trend.trend.trend--sentiment-negative[_ngcontent-%COMP%]{color:var(--dh-red-6);background-color:var(--dh-volcano-2)}.trend.trend.trend--sentiment-negative[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{rotate:-45deg}.trend-inline[_ngcontent-%COMP%]{font-weight:var(--dh-text-semi-bold)}.trend-inline.trend-inline--sentiment-positive[_ngcontent-%COMP%]{color:var(--dh-secondary-3)}.trend-inline.trend-inline--sentiment-negative[_ngcontent-%COMP%]{color:var(--dh-red-6)}.product-summary[_ngcontent-%COMP%], .product-block[_ngcontent-%COMP%]{border:0;background-color:var(--dh-card-alternate-background-color);padding:var(--dh-space-xs);border-radius:7px;margin-top:var(--dh-space-xxs);margin-bottom:var(--dh-space-xxs)}.product-summary[_ngcontent-%COMP%]{margin-top:var(--dh-space-s);margin-bottom:var(--dh-space-m)}.anomaly-summary[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:min-content 1fr;gap:var(--dh-space-xs);-moz-column-gap:var(--dh-space-s);column-gap:var(--dh-space-s)}.anomaly-summary-wide[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%]{grid-template-columns:min-content max-content min-content 1fr}.anomaly-summary--label[_ngcontent-%COMP%]{white-space:nowrap}
1.anomaly-summary--value[_ngcontent-%COMP%]{min-width:200px}.anomaly-summary[_ngcontent-%COMP%] .row-span-2[_ngcontent-%COMP%]{grid-row-end:span 2}"],changeDetection:0}),(0,u.gn)([(0,ue.cB)(he.a.baseApplicationUrl)],P.prototype,"baseApplicationUrl",void 0);let $=class extends ke{constructor(){super(...arguments),this._anomalyLabel="Units Sold"}};$=(0,u.gn)([k({definitionKeys:[r.ANOMALY_SALES_UNITS_SOLD_V1_0_0,r.ANOMALY_SALES_UNITS_SOLD_V1_1_0],title:"Unexpected variation on Unit sold",component:P})],$);let X=class extends h.U{};X=(0,u.gn)([k({definitionKeys:[r.PERFORMING_CAMPAIGNS_SP_V1_0_1,r.PERFORMING_CAMPAIGNS_SP_V1_1_0],title:"Top-performing Campaign Optimization",template:'markdown "insight-intro" "We detected optimization opportunities for the campaigns below."\n\nads-campaign-list performing renderData.data.campaigns insight\n\nmarkdown "top-space" "Learn more about our Ads recommendations in this article: [Findings: Types and FAQs](https://docs.datahawk.co/docs/insights-findings#review-top-performing-sponsored-product-ads-campaigns)."'})],X);let ee=class extends h.U{};ee=(0,u.gn)([k({definitionKeys:[r.ORGANIC_SEARCH_OPTIMIZATION_V1_0_0,r.ORGANIC_SEARCH_OPTIMIZATION_V1_1_0],title:"Organic Search Optimization",template:'\nmarkdown "# Improve your listings organically\n\nWe recommend generating our Keyword Research report for the products below. Click on Review Recommendations to access the report\'s page, then use the keywords recommended in the \\"Keyword | Keyword Suggestion\\" section to improve your search results organically.\n\nLearn more about our optimal keyword recommendations to boost SEO performance [here](https://docs.datahawk.co/docs/insights-findings#improve-your-listings-organically).\n"\n\ntable-of-contents data ["seo_potential_products", "sales_potential_products", "best_seller_products"] ["Visibility on few keywords", "Low performance against competitors", "Top performers"]\n\ndivider\nassign x = renderData.data | asKVreorder: "seoPotentialProducts", "salesPotentialProducts", "bestSellerProducts"\nfor item in x\n if item[1] and item[1].length \n markdown "subtitle" "## {{ item[0] | recommendationTypeTitle }}"\n markdown "{{ item[0] | recommendationTypeDescription }}"\n product-list item insight\n unless forloop.last\n divider\n endunless\n endif\nendfor\n'})],ee);let te=class extends h.U{};te=(0,u.gn)([k({definitionKeys:[r.ORGANIC_SEARCH_OPTIMIZATION_V1_2_0,r.ORGANIC_SEARCH_OPTIMIZATION_V2_0_0],title:"Organic Search Optimization",template:'\nmarkdown "insight-intro" "We detected that these products rank for a low number of keywords."\n\nassign x = renderData.data | asKVreorder: "seoPotentialProducts"\nfor item in x\n if item[1] and item[1].length \n product-list item insight\n endif\nendfor\n\nmarkdown "top-space" "Learn more about our optimal keyword recommendations to boost SEO performance [here](https://docs.datahawk.co/docs/insights-findings#improve-your-listings-organically)."\n'})],te);var Hi=c(1801),Wi=c(29174),Ne=c(65644),ne=c(12857),w=c(81071),Re=c(28154),ie=c(5020),be=c(22533);const ji=[ne.S,Ne.cD,w.LV,Re.Wr,ie.X,be.o7];let $i=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[ji,p.m,ne.S,Ne.cD,w.LV,Re.Wr,ie.X,be.o7]}),t})(),ae=class extends ke{constructor(){super(...arguments),this._anomalyLabel="Gross Sales"}};ae=(0,u.gn)([k({definitionKeys:[r.ANOMALY_SALES_GROSS_SALES_V1_0_0,r.ANOMALY_SALES_GROSS_SALES_V1_0_1,r.ANOMALY_SALES_GROSS_SALES_V1_1_0],title:"Unexpected variation on Gross Sales",component:P})],ae);const Xi=JSON.parse('{"essential_leverage_amazon_analytics_and_data_connections_v1.0.0":"The five key benefits of combining digital shelf analytics with data connections include: enhancing advertising initiatives, reducing financial losses, optimizing pricing strategies, increasing organic search performance, and maximizing productivity.\\n\\n## **Enhance Advertising Initiatives**\\n\\nA profitable advertising campaign relies on the examination of historical and contemporary data. There is\xa0[PPC software](https://datahawk.co/advertising)\xa0out there that crunches millions of advertising-related data points on a regular basis reflective of your Amazon or Walmart ads performance so that you can better pilot future ad campaigns.\\n\\n## **Reduce Financial Losses**\\n\\
1nAnalyzing digital shelf analytics can help Amazon and Walmart businesses diminish financial losses. For instance, predictive analytics, such as\xa0[sales estimator tools](https://datahawk.co/market/amazon-sales-estimator)\xa0that use historical sales data, can help eCommerce businesses accurately forecast how successful a product will be and mitigate the risk of a product flop.\\n\\n## **Optimized Pricing Strategy**\\n\\nBy analyzing up-to-date data on your competitors\u2019 product prices, you can determine what products are being bought, at what price, and at what frequency. Such insights can help you optimize your own pricing strategy and price your product accordingly and timely to stay competitive.\\n\\n## **Increase Organic Search Performance**\\n\\nData analytics\xa0[tools for keywords](https://datahawk.co/seo/amazon-keyword-ranking)\xa0allow brands and sellers to better pilot their SEO performance by providing them with their own and their competitors\u2019 up-to-date ranking data to determine precisely at which point in time which keywords are driving the most traffic.\\n\\n## **Maximize Productivity**\\n\\nData connections and analytics can also help eCommerce businesses optimize operational efficiency by enabling them to extract their business data at scale with greater autonomy and eliminating the need to sync and update their data manually.\\n\\nRead more about it in this article: ****[Leveraging Amazon Analytics and Data Connections to Improve Business Performance](https://datahawk.co/blog/amazon-data-connections)****","essential_reach_amazon_multi_channel_v1.0.0":"## **Why Is Amazon the Best Place to Start?**\\n\\n### **Sellers Can Fully Leverage the Amazon Multi-Channel Fulfillment Program**\\n\\nThe\xa0[Amazon Multi-Channel Fulfillment (MCF) Program](https://datahawk.co/blog/edu-amazon-multi-channel-fulfillment)\xa0is the ultimate starting point for newbies to handle multiple digital channels.\xa0[MCF](https://sell.amazon.com/fulfillment-by-amazon/fba-multi-channel)\xa0allows Amazon sellers to use their pooled inventory as a means to fulfill orders from their other channels, including their personal websites.\\n\\n### **Amazon Provides Access to Multiple Marketing Channels**\\n\\nAmazon has mass ownership of multiple websites, and as a result, their advertising options are already multi-channel among various digital options. That means you do not necessarily have to rely on only Amazon ads when going through their advertising platform.\\n\\n## ****Three Tips for Leveraging Amazon Multi-Channel Fulfillment****\\n\\n### ****1. Treat It Like a Standard Amazon Sale****\\n\\nAmazon still handles Amazon MCF. As a result, be sure to familiarize yourself with its terms of service. \\n\\n- Amazon provides a specific fee calculator to\xa0[MCF sellers](https://sellercentral.amazon.com/mcf/#fees).\\n- MCF orders are still delivered in Amazon-branded packaging, but you can choose to request a \u201cblank box.\u201d\\n- Amazon allows you to ship with Amazon Logistics for a 5% surcharge. However, you can choose to exclude MCF from shipping with Amazon Logistics.\\n- Amazon MCF has more restrictions than FBA on getting reimbursed for lost or damaged goods.\\n- Amazon cannot reimburse you for MCF fulfillment fees.\\n\\n### 2. ****Be Vigilant When Tracking Inventory****\\n\\nSMCF means that you have multiple storefronts where inventory appears. If you manage to gain success on your off-site endeavors, that is great! However, that also means you need to keep a close eye on inventory.\\n\\n### **3. Do Not Rely Exclusively on Amazon Multi-Channel Retailing**\\n\\nWhile Amazon MCF is a step in the right direction, it relies on Amazon. If your goal is to diversify, you will need to include a third-party option.\\n\\n[Walmart Marketplace](https://datahawk.co/blog/how-to-win-the-walmart-buy-box)\xa0will not work with Amazon, and other smaller companies like Newegg or Etsy do not have the same level of Amazon integration. If you know your niche is needed on other sites, do not rely exclusively on Amazon to make your sales.\\n\\nRead more about it in this article: ****[Multi-Channel Retailing Strategies for Amazon and Walmart](https://datahawk.co/blog/multi-channel-retailing-amazon-walmart)****","essential_improve_your_images_v1.0.0":"\\nProduct images are the first thing prospective buyers will see when browsing listings. The image needs to display precisely what the item is without being confusing. Our visually-driven society relies heavily on product pictures to determine relevancy and quality.\\n\\nOptimized images play an integral role in product listings. You can place a direct description of the item (which can include target keywords) within the images through [ALT descriptions](https://www.amazon.com/gp/help/customer/display.html?nodeId=202106490).\\n\\nAnother essential aspect of optimizing your images stems from quality.\xa0[Amazon\u2019s requirements for images](https://www.amazon.com/gp/help/customer/display.html?nodeId=202073580)\xa0include the following:\\n\\n\u2022 Must be a professional photograph of the product.\\n\u2022 It cannot include additional items.\\n\u2022 Backgroun
1ds must be completely white.\\n\u2022 The image cannot contain insert images or additional graphics.\\n\u2022 If selling books, your first image must be of the front cover.\\n\u2022 It needs to be in TIFF, JPEG, GIF, or PNG format.\\n\u2022 It must be 1000 pixels (or larger ) in width or height.\\n\u2022 File names need to include UPC, ASIN, or GTIN.\\n\u2022 It must have RGB or CMYK color modes.\\nYour goal is to create simple, direct, high-quality images of your product. The design of your product is also just as important as the quality of the photograph.\\n\\nRead more about it in this article: ****[Boost SEO: Create a Winning Amazon Product Details Page](https://datahawk.co/blog/how-to-create-a-winning-amazon-product-details-page)****","essential_improve_your_seo_v1.0.0":"## ****Include only the most important keywords and focus on what works****\\n\\nThe keywords used on Amazon are different from the ones typed into Google, so you need a tool (like\xa0[Amazon seller tools](https://datahawk.co/amazon-seller-software)) that focuses only on Amazon\u2019s search database. These specialized tools will give you more details about the search volume of every related keyword. Eliminate all keywords except the most valuable ones, and use them in the backend of your listings.\\n\\n## ****Don\u2019t overstuff keywords****\\n\\nIt might seem logical to incorporate the same valuable keywords in every product listing, but that will only have a negative effect. So, instead of using the same keyword multiple times on the same page, use each keyword only once. That will increase your rank much more than overstuffing the listings with the same keyword.\\n\\n## ****Forget about punctuation but think logically****\\n\\nDon\u2019t add punctuation to your keywords list. Instead, leave an empty space between two keywords to separate them. Pay attention to the order of the keywords. The combination of the keywords needs to make sense. If you would like assistance in this, check out the Amazon search bar\u2019s autofill features.\\n\\n## ****Keep a close eye on keyword performance****\\n\\nYou must revisit your listings and check how the keywords are doing. Some of them will be great; others will slip under the radar.\\n\\n## ****Be Responsive When Factors Change****\\n\\nAs trends change and the A9 algorithm favors one over another, you\u2019ll find that some keywords make more sales than others. You can use testing environments available through\xa0[Amazon Advertising](https://advertising.amazon.com/) to see how customers respond to a given keyword. The [Amazon Search Terms Report](https://sellercentral.amazon.com/gp/help/external/5NXWNY8HUD3VDCW) can also tell you how you rank among other competitors.\\n********\\n\\nRead more about it in these articles: ****[Top Ways to Choose Amazon Backend Keywords](https://datahawk.co/blog/backend-keywords-amazon-seo-guide)** & ****[Top Tips for Optimizing Your Backend Search Terms](https://datahawk.co/blog/amazon-backend-search-terms)****","essential_sponsored_product_ads_part1_v1.0.0":"Many sellers who use sponsored products on Amazon succeed due to their ability to adapt. They understand the best times to invest or re-evaluate their strategy. This is referred to as SMART bidding.\\n\\n## **How SMART Goals = Smart Bids**\\n\\n[SMART goals](https://www.mindtools.com/pages/article/smart-goals.htm)\xa0tell us that targets must have five areas:\\n\\n- **S**pecific \u2013 Define what you want to accomplish (i.e., your ad campaign needs to get sales)\\n- **M**easurable \u2013 Define how much you want to achieve (you need to make 100 sales)\\n- **A**chievable \u2013 Your goal needs to be reasonable\\n- **R**elevant \u2013 Your goal needs to match your skill set and needs to be worth it\\n- **T**ime-specific \u2013 Your plan needs accomplishing within a specific time frame\\n\\nWhen creating Amazon ads, you need to define how you will respond in any given situation. This means creating overall goals and what-if scenarios.\\n\\nHere are a few examples of what you can do:\\n\\n- If my listing ranks in the top two, continue to be the top bidder\\n- If the cost of this bid exceeds $250 per day, must re-evaluate prospective sales\\n- If sales go under 200 per week, address alternative keywords\\n- If ranking number one under Amazon SEO, shift
110% of the advertising budget to product two\\n\\nThese scenarios apply to all sellers, both new and experienced.\xa0Once you meet sales goals, revisit the product listing to pursue future goals. To remain successful with Amazon Sponsored Products Ads, you have to be an active decision-maker.\\n\\nIt\u2019s crucial to set significant goals and break them down into weekly, quarterly, and yearly goals. As you grow as an eCommerce specialist, you\u2019ll get better at establishing time, expense, and sales thresholds. It\u2019s a crucial part of your Amazon advertising strategy.\\n\\nRead more about it in this article: ****[How You Can Effectively Use Amazon Sponsored Products Ads](https://datahawk.co/blog/amazon-sponsored-product-ads)****","essential_buy_box_v1.0.0":"\\n## **Mind the FBA**\\n\\n**FBA stands for Fulfillment By Amazon.**\xa0It is by far the biggest thing that impacts whether you will get the Amazon Buy Box or not. Amazon\u2019s fulfillment service is the metric that spans all of the variables; utilizing\xa0**FBA within your product and business is the best way to get a shot at the Amazon Buy Box.**\\n\\nFBA does cost some money and is by no means spare change. You need to ask yourself if you have accomplished everything else before you consider FBA. Think of FBA like a final coat of polish on a car. It would be incredible if you prepared y
1our paint but mediocre if you applied only the polish.\\n\\n## **Mind the SFP**\\n\\n**SFP stands for Seller Fulfilled Prime**, which offers sellers with top-performing fulfillment the chance to fulfill their existing orders and accompany Amazon Prime at the same time.\\n\\nSFP is the overall most balanced method, combining control potential and Amazon Buy Box eligibility. Unfortunately, this feature is not easy to achieve and requires proper metrics to even apply for it. But since it doesn\u2019t ravage your budget, it is a good thing to keep in mind when trying out for the Amazon Buy Box.\\n\\n## **Adjust the Landing Price**\\n\\n**Adjusting the landing price of your product is the simplest way to get your product to be Amazon Buy Box-worthy.**\xa0The landing price entails the total cost of your product, plus the shipping, customs, and handling fees.\\n\\nThe lower the price, the bigger the share of the Amazon Buy Box. As this is a consumer-oriented feature, try to square off your price to make it more appealing to both consumers and the Amazon algorithm (to keep track of your competitors, try our advanced\xa0[Amazon price alert](https://datahawk.co/product/amazon-product-alerts)\xa0tool).\\n\\n## **Shipping**\\n\\n**The second most significant thing that is often looked at by consumers, and the algorithm, is the shipping time.**\\n\\nThis metric is strongly favored if short and actively antagonized if long. This exact reason is why one-day shipping is such a popular feature.\\n\\nFor certain products and categories, faster shipping is preferred. However, cutting down on the shipping time of your product is probably the quickest way to get favored by the Amazon Buy Box algorithm and secure your place in the Amazon ecosystem.\\n\\nThere is no one way to win the Amazon Buy Box. There are, however, a series of actions and [data-driven solutions](https://datahawk.co/blog/how-to-win-the-walmart-buy-box). Nevertheless, winning the Amazon Buy Box is by no means unattainable. It just requires mastering the following categories:\\n\\n- Prime seller listings\\n- Offering inexpensive yet reasonable pricing\\n- Maintaining a robust inventory\\n- Selling products in new conditions\\n- Keeping a positive seller-buyer repertoire\\n\\nRead more about it in this article: ****[Your Guide to Winning the Amazon Buy Box in 2022](https://datahawk.co/blog/how-to-win-the-amazon-buy-box-in-2020)****","essential_understanding_a9_and_ranking_v1.0.0":"## **What does A9 in Amazon A9 Algorithm stand for?**\\n\\nCreated by Amazon in 2003 as an independent company focused on developing technology for search and advertising. \\n\\n[A9.com](http://a9.com/)\xa0initially operated a search portal which was discontinued in 2008. Today, the A9 team develops and manages the technology that provides search and advertising on Amazon marketplaces and other retail sites owned by Amazon.\\n\\n## **Amazon A9 Algorithm Ranking Factors**\\n\\
1nHere are the Amazon A9 ranking algorithm factors and how each of them fits the Amazon A9 optimization strategy.\\n\\n### **Direct Factors**\\n\\nThe direct factors that play a vital role in ranking your products on Amazon are as follows:\\n\\n- Product title, description, and copy \u2013 these are the three aspects that make text match relevance.\\n- Product availability \u2013 If you run out of stock, your products\u2019 rankings will decrease and eventually disappear from the search results.\\n- The price \u2013 A9 compares your product prices against the competition. If you price your products much higher, the competitors\u2019 products will appear above yours in the search results.\\n\\n### **Indirect Factors**\\n\\nWhile the direct factors can be affected by optimizing your products better for A9, indirect factors cannot. However, they still remain important factors for Amazon ranking Algorithm. These are:\\n\\n- Sales velocity ([how many products you\u2019ve sold in a given period](https://datahawk.co/amazon-seller-dashboard))\\n- Relative sales velocity (how many products you sell compared to your competitors)\\n- Images\\n- Advertising\\n- Promotions\\n- Reviews\\n- Fulfillment method\\n\\nRead more about it in this article: ****[Amazon A9 Algorithm: Your SEO Guide To Higher Product Ranking](https://datahawk.co/blog/amazon-ranking-algorithm)****","essential_trinity_amazon_product_pricing_v1.0.0":"\\nCorrectly pricing your product is the only way to ensure that you will get the Amazon Buy Box. The primary metric that is looked upon by the Amazon Buy Box algorithm is the overall price of your product. So, if your product is competitively priced and fulfills all the parameters, it is almost guaranteed that it is Amazon Buy Box eligible.\\n\\n***Manual Pricing:***\xa0Manual pricing and repricing are when a seller manually updates the price of a product. It is the perfect method for people selling original or unique goods. However, if you are a reseller, this might be a waste of time.\\n\\n***Rule-Based Pricing:***\xa0Pricing and repricing your products based on the rules is yet another way to win the Amazon Buy Box eligibility. This process entails examining your competition and repricing according to them. One cent less can make a world of difference in such a competitive market. Setting up rules is not a straightforward process, and you do need to know what you are doing.\\n\\nAnother thing that you might kick off is a never-ending spiral of price cuts. Cutting down on the price of a product is a good thing in the short term but creates long-term losses for everyone involved. Rule-based pricing is best when left to professionals, which you can find on numerous websites. So, while they might add another fee, they will save you money in the long run and get you that Amazon Buy Box.\\n\\n***Algorithm Pricing**:*\xa0Pricing and repricing your ASINs through an algorithm is the highest tech option of the bunch. The algorithm considers all the different factors that might find themselves in the Amazon Buy Box Eligibility sheet. Employing the algorithm within your repricing technique is by far the best way to get your products Amazon Buy Box eligible and increase your existing shares.\\n\\nIt is not there solely to get you to Amazon Buy Box eligibility but to secure, protect, and maintain your existing profits. Essentially,\xa0**the algorithm prefers the Amazon Buy Box, yet it functions in such a way that it saves you money.**\\n\\n**Algorithmic pricing is the most expensive of all the repricing options and might set you back by quite a lot. So, if you are a smaller reseller or a hand-crafted store, this is not for you.**\\n\\n**[>> Top 5 Use Cases to manage lost Buy Box on Amazon](https://datahawk.co/blog/analyze-amazon-buybox-with-datahawk)**\\n\\n>> It is essential to get\xa0**notified of the changes on the product\u2019s Buy Box status, Buy Box winner, number of sellers winning the Buy Box, and prices.**\xa0You will never miss out on any change by using\xa0[Amazon Buy Box Alert](https://datahawk.co/amazon-asin-tracker/buybox)\xa0by DataHawk.\\n\\nAre you wondering why your products are not selling? Read this article!","essential_sponsored_product_ads_part2_v1.0.0":"## ****Optimize Your Search Terms****\\n\\
1nSponsored products on Amazon can potentially expose your product to a broader audience. However, you shouldn\'t limit yourself to Amazon PPC. Instead, it would be best to prioritize utilizing all of Amazon\'s features.\\nAmazon SEO, or search engine optimization, allows sellers to create product listings that target relevant keywords that meet the buyer\'s intent. Fulfilling a buyer\'s desires means creating listings that utilize keywords effectively while addressing all potential doubts they may have once they find your product through your product description content. You can do this through the short multi-step process:\\n\\n## **A Quick Step-By-Step Process on How You Can Optimize Your Listing**\\n\\n1. Look up Amazon reviews of competing products before creating your product listing.\\n2. Utilize people\u2019s positives and negatives to make your product listing.\\n3. Build those using regularly seen keywords you find in those articles.\\n4. Utilize an\xa0[Amazon SEO tool](https://datahawk.co/seo)\xa0to determine how your competitors target associated keywords.\\n\\nDataHawk\u2019s\xa0[Amazon Keyword Research tool](https://datahawk.co/seo/amazon-keyword-research)\xa0combined with positive Amazon reviews, will allow you to optimize your description to target keywords and address buyers\u2019 concerns. This process works regardless of what your product category is.\\n\\nCombine this with your Amazon advertising efforts, and you can eventually grow to top rankings with your target keywords. Once you rank high in those keywords, aggressively paying towards Amazon PPC is one way to remain actively competitive.\\n\\nRead more about it in this article: ****[How You Can Effectively Use Amazon Sponsored Products Ads](https://datahawk.co/blog/amazon-sponsored-product-ads)****","essential_logistics_v1.0.0":"There are a few things that eCommerce retailers can do to optimize inventory management. Here are some solutions to properly managing your supply chain strategy:\\n\\n## **Ensure Product Availability**\\n\\nAmazon inventory visibility plays a crucial role and helps retailers monitor how many orders they receive per day. By tracking availability, you\u2019ll know whether there\u2019s room for incoming orders before anything gets shipped out. Reviewing product availability prevents extra costs by controlling excess inventory levels and long lead times from suppliers when sales happen too quickly due to a lack of Amazon supply chain management capabilities.\\n\\n## ****Provide Quality Service****\\n\\nOne way to help with providing quality service is by using Amazon FBA (fulfillment by Amazon) as your order fulfillment partner. Amazon will store your products in one of its many warehouses, pick, pack and ship the orders for you, and do all of this promptly so that customers are happy with their purchase experience.\\n\\n## **Receive Quality Customer Reviews**\\n\\nFocus on delivering exceptional service across the entire Amazon supply chain management process. By the end, your customers should be delighted with their purchase experience and leave\xa0[positive Amazon reviews](https://datahawk.co/blog/best-ways-to-get-more-amazon-fba-reviews). Positive reviews will help increase your sales volume over time, too, as word of mouth is crucial in purchasing decisions at Amazon.\\n\\n## **Control Excess Inventory Costs**\\n\\nAmazon supply chain management also aims to control excess inventory costs. This can help increase your bottom line in the short term by preventing overstock situations and decreasing\xa0[Amazon warehouse rental fees](https://datahawk.co/blog/2020-guide-to-amazon-fees-and-fba-calculator). However, it\u2019s important not to let this go too far, or else Amazon stock levels will fall too low. \\n\\nRead more about it in this article: ****[Understanding Amazon Supply Chain Challenges and Solutions](https://datahawk.co/blog/amazon-supply-chain-solutions)****","essential_product_video_guidelines_v1.0.0":"## Types of videos that could be used for Amazon Products:\\n\\n1. **Product Highlight Videos** deal with a clean white background with a 360-degree view with close-up shots of the product in use.\\n2. **Customer Experience
1Videos s**how the potential customers what other customers felt about your products. There could be an experience to share or maybe explain the benefits that customers might get while engaging with the product.\\n3. **Explainer Videos** are used mostly when you are selling something that solves a problem for the customers, a video that shows how the product is used is the key to these videos.\xa0Having a great script is the epicenter of these types of videos and it can be represented either spoken live or words shown on screen.\\n4. **Comparison Videos** draw ****a comparison between your products and others. ****You don\u2019t necessarily need to mention your competitors, but you can let the customer know what they have been missing by not using your product.\\n\\n## **Best Practices For Videos**\\n\\n### **The Script**\\n\\nThe impact of words can be the real differentiator between you and others.\xa0List what makes your product different from the others and how you have shown up with a much better solution. You also need to consider narration. Will there be an on-camera narrator or an off-camera voice-over?\\n\\n### **The Music**\\n\\nMusic speaks and having a great piece could make a difference in the way how customers perceive a particular brand. Your\xa0**Amazon Listing\u2019s**\xa0music must be complementary to the rest of the presentation. Please remember NOT TO USE COPYRIGHT MUSIC without PERMISSION. Also, there are various websites available that offer royalty-free music.\\n\\n### **Choose the right Hero Product**\\n\\nHaving high-quality graphics or using your brand colors in the background is a great way to start off.\xa0If you are filming, it\u2019s always good to have multiple copies of your product; Use the best-looking ones as \u201cHero Product\u201d and revolve the script around them.\\n\\nRead more about it in this article: ****[Boost your Amazon Listings with Amazon Product Videos](https://datahawk.co/blog/boost-your-amazon-listings-with-amazon-product-videos)****","essential_sponsored_product_ads_part3_v1.0.0":"## ****Choose The Right Targets****\\n\\nTargets, like SEO keywords, involve finding effective keywords that boost your sales. To determine what keywords are the most effective, you must test them.\\n\\nTo test the effectiveness of Amazon ads with particular keyword targets, you\u2019ve got one of two options:\\n\\n- Cast a wide investment net for various keywords\\n- Utilize\xa0[Amazon Advertising Tool](https://datahawk.co/advertising)\xa0that can provide you with historical data\\n\\n### **Option One: Casting a Wide Net**\\n\\nA big part of an effective Amazon advertising strategy goes back to knowledge. By testing out a variety of options, you can find out what works?\\n\\n\u201cCasting a wide net\u201d refers to creating a campaign with a range of keyword targets. Each of them should meet Amazon\u2019s competitive requirements. This means you need to bid enough to maintain a good position.\xa0Ideally, you should give yourself a few days or a week to see the results of the campaigns. Amazon Seller Central\u2019s advertisement subheading will provide you with data about the number of clicks and conversions behind those advertising campaigns.\\n\\nThe idea is to take the data from these campaigns and find which products receive the most sales. Those that receive the most sales should receive more funding from your daily advertising budget.\xa0You will also want to weigh that against your ACoS. When comparing conversion rates to ACoS, this determines whether your advertising costs are worth the spend.\\n\\n### **Option Two: Investing in an Amazon Advertising Tool**\\n\\nAdvertising campaigns can also be supported by tools that contain this historical data. Amazon\u2019s Advertising Tool is a really great way you can improve the performance of your sponsored ads.\\n\\nThe point is to find relevant search terms related to PPC campaigns that work. With historical data and additional metrics, you\u2019ll be able to see how similar products create effective ads.\\n\\nDataHawk\u2019s ad tools break down the following information:\\n\\n- Impressions\\n- CTR (Click-through rate)\\n- Ad spend\\n- CPC (Cost-per-click)\\n- Ad sales weight (the earnings amount per ad sold)\\n\\nThis information combines organic sales, organic sales weight, and post-ad margins to tell you the effectiveness of completed campaigns.\\n\\nIdeally, you\u2019ll be able to reduce your Amazon CPC by increasing your SEO. More organic search in one area means more ad budget to spend on another product. You can also use ad spend to increase prospective sales in products with proven effectiveness.\\n\\nOne key metric in determining effectiveness goes back to ACoS.\\n\\nRead more about it in this article: ****[How You Can Effectively Use Amazon Sponsored Products Ads](https://datahawk.co/blog/amazon-sponsored-product-ads)****","essential_amazon_fba_checklist_for_sellers_v1.0.0":"The list of\xa0**best practices for Amazon FBA**\xa0is a mile long, but there are a few tried-and-true that everyone should consider adding to their daily work:\\n\\n## **Nail Down Your Elevator Pitch and UVP**\\n\\nWhenever someone asks you about your product line, you should describe why you built it, what it is, and whom it is intended for in 30 seconds flat. This elevator pitch should roll right off the tip of your tongue. Along these lines, you should be able to answer the majority of questions you receive about your brand or products right off. This combination of knowledge is y
1our unique value proposition (UVP). Your UVP is the core DNA of your brand.\\n\\n## **Build a Brand You Can Proudly Stand Behind**\\n\\nEnsure everything you promote about your brand makes it clear to potential customers why they should purchase from you and not the competition.\xa0When the items in your product line start to become synonymous with your brand, that\u2019s when you know you\u2019re gaining some traction. \\n\\n## **Make Sure You\u2019re Registered as a Professional Seller**\\n\\nWhen you\u2019re registered as a professional seller, you\u2019re able to save money on the commission of each item sold on Amazon. More importantly, you can upload items that aren\u2019t available to other non-registered sellers on the platform.\\n\\n## **Ensure Product-Market Fit**\\n\\nYou have to do some deep due diligence to ensure there\u2019s a need for your product in the marketplace.\\n\\nSurvey your potential customer base. Do some focus groups. Allow people to try out samples of the product and give you their feedback to incorporate that into a final version.\\n\\n## **Don\u2019t Be Afraid to Flex Your Pricing**\\n\\nIf you stay too stubborn with your assumptions of what price should be rather than what the market is telling you they are comfortable with, you\u2019ll only lose out in the end.\\n\\nRead more about it in this article: ****[Make Selling with Amazon FBA a Profitable Experience](https://datahawk.co/blog/make-selling-with-amazon-fba-a-profitable-experience)****","essential_product_launch_tips_strategy_part1_v1.0.0":"## Choose a Unique Product\\n\\nWhat could be different about your chosen product?\\n\\nYour product does not need to be a 5-in-1 to become unique. Instead, you should focus on value-added reasons your product is outstanding. \\n\\n### ****Have a Lower Price****\\n\\nAmazon already requires you to have the lowest possible price to\xa0[remain competitive](https://datahawk.co/blog/competitive-tips-for-selling-on-amazon). Walmart provides you with an excellent method for how being a price leader can work.\\n\\nHaving a lower price usually requires a more considerable potential upfront investment. Buying things locally and negotiating takes time and effort, but you won\u2019t have to pay shipping costs. Regardless of how low your price is, keeping your profit margins in mind is vital. \\n\\n### ****Offer Fast Delivery (Become an Amazon FBA Seller)****\\n\\n[Amazon FBA](https://datahawk.co/blog/make-selling-with-amazon-fba-a-profitable-experience), or Fulfillment By Amazon, enables you to transfer logistical problems to Amazon. Amazon is much faster when it comes to shipping items. You typically see those items arrive within one or two days.\\n\\nFaster delivery is a\xa0[competitive advantage](https://datahawk.co/blog/competitive-tips-for-selling-on-amazon)\xa0everywhere. But on Amazon, everyone does have access to this method of differentiation, so you will ideally want to combine it with one (or more) of the other options on this list.\\n\\n### **Offer Unique Product Features**\\n\\nOne quick way you can draw attention is by mentioning features, ideally, ones that are something that makes your product stand out from the competition.\\n\\nWith Amazon sellers, this can be somewhat tricky, as entry-level sales can make it hard to innovate. This is especially true if you participate in dropshipping, wholesale work, or any form of online or retail arbitrage. \\n\\nYou have better luck with\xa0[private label selling](https://datahawk.co/blog/private-label-selling-on-amazon). Private label selling means that you are the sole provider of a unique product. However, this will not stop the manufacturer from selling numerous similar effects to other sellers.\\n\\nIf you have a truly unique idea, you\u2019ll want to seek out a PLR manufacturer who can help you with prototyping. You\u2019ll find the cost higher, but if you know how to advertise it for your customer\u2019s benefit, you can potentially draw a lot of attention.\\n\\nRead more about it in this article: ****[Your Guide to the Perfect Amazon Product Launch Strategy](https://datahawk.co/blog/amazon-product-launch-strategy)****","essential_sponsored_product_ads_part4_v1.0.0":"## ****Monitor ACoS****\\n\\
1nOne campaign goal you could have is to have an incredibly low ACoS. However, ACoS is the ultimate determining factor for FBA Sellers. Why? Because FBA (Fulfillment By Amazon) Sellers have all of their shipment and storage handled by Amazon.\\n\\nAs a result, fees associated with the shipment and storage for FBA Sellers are easy to track. This makes advertising costs a variable cost that you must pay attention to.\\n\\n## **Break-Even Analysis on ACoS**\\n\\nYour first step in determining ACoS is finding the break-even point. It determines when expenses equal revenue.\\n\\nDetermine a total break-even point through the following means:\\n\\n- Gather your fixed costs and divide them among the number of units made.\\n- Take your variable costs and determine different points they can land.\\n\\n## **What is a Good ACoS on Amazon?**\\n\\nIdeally, you want your ACoS to be below 20 percent. This means for every $1 of revenue you have, $.20 should be spent on Amazon advertising.\\n\\nThis rate varies depending upon the competitiveness of your field. You might find that new competitors to your product listing category are willing to outspend you, and you will have to compete for top positions.\\n\\nRead more about it in this article: ****[How You Can Effectively Use Amazon Sponsored Products Ads](https://datahawk.co/blog/amazon-sponsored-product-ads)****","essential_create_a_compelling_amazon_storefront_v1.0.0":"## Ensure you do these\\n\\n- **Pay attention to pricing**\\n \\n Amazon does factor pricing into its algorithm. So you will want to price your product competitively. If you come in too high, you will not be shown high in search results. Amazon tends to feature the best price offer. \\n \\n- **Follow Amazon\u2019s rules and policies**\\n- **Optimize your CTA\u2019s**\\n- **Proofread all of your content**\\n- **Provide only true and accurate statements about your products** (This includes mentioning how long warranties and product quality guarantees are valid)\\n- **Follow these image size guidelines**\\n \\n 1. Logo image (banner at the top): 3,000 x 600 pixels\\n 2. Full-width images: minimum 3,000 pixels width, can be any height\\n 3. Square images: minimum 1,500 x 1,500 pixels\\n 4. Rectangle: minimum 1,500 x 750 pixels\\n \\n- **Customer service counts**\\n \\n Sellers who have positive reviews, offer fast delivery, and provide accurate product descriptions are prioritized in Amazon\u2019s search results. So focus on answering questions completely in your descriptions, nailing down your shipping logistics, and collecting as many positive reviews as possible!\\n \\n\\n## **Examples of properly optimized storefronts**\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n","essential_product_launch_tips_strategy_part3_v1.0.0":"### **Tug at People\'s Heartstrings (Establish an Emotional Connection)**\\n\\
1nThe importance of brand storytelling is an essential strategy on Amazon. Telling a brand story is a great way to connect with your audience. \\n\\nIncluding a \u2018Thank You\u2019 card with all of the products you send (especially your first ones) is an excellent way to connect with people. \\n\\nIt is up to you to find a way to make the prospective customer feel special. Whether it comes from making them feel like a part of a legacy or thanking them for the purchase, a little effort goes a long way.\\n\\n### **Create an Offer Built Around What Your Customers Want**\\n\\nBuilding product offers your customers want is a process. You will need to comb your knowledge of what customers want and what makes a good product into creating an offer. The offer is the totality of what your product brings to the table.\\n\\nIt answers the buyer persona\u2019s needs with compelling product descriptions and boosts sales potential by standing out, being convenient, and creating the best possible deal. A good product offer will go through the complete picture.\\n\\n### **Turning Features Into Benefits**\\n\\
1nFor example, a moisture-wicking t-shirt is something people who have looked up t-shirts before might already know but you can never assume that. Instead of focusing on the buzzwords and jargon, you need to work on translation. In this case, moisture-wicking \u201ckeeps you cool and dry,\u201d which translates a feature into a benefit.\\n\\nWhether technical or straightforward, many prospective buyers like to know what they are getting into. With profitable products, you\u2019ll find that the best ones explain things thoroughly.\\n\\nRead more about different Product Launch Strategies in this article: ****[Your Guide to the Perfect Amazon Product Launch Strategy](https://datahawk.co/blog/amazon-product-launch-strategy)****","essential_sponsored_product_ads_part5_v1.0.0":"## **Make Data-Driven Decisions**\\n\\nMuch of this article delves into the importance of using information and data. Without data, any manual campaigns won\u2019t hit their mark. You must build your choices on data, not \u201cgut feelings.\u201d\\nProduct targeting for specific keywords involves finding relevant shoppers interested in your product. You can determine these customers by using a combination of qualitative and quantitative data.\\n\\nThe best sellers in your product category are those with consistent, proven success cases. \\n\\n## **Use Qualitative Data**\\n\\nYou\u2019ll notice common themes among top producers, such as high-quality images, bullet points that highlight specific aspects of the product, (relatively) lower price points, etc. These are all things you can emulate. Qualitative data cites common phrases and excellent sales copy. \\n\\n## **Use Quantitative Data**\\n\\nUsing historical data from past campaigns gives you the numbers behind what campaigns do and don\u2019t work. A combination of third-party and first-party tools will inform you of essential data behind sponsored product advertising. Quantitative data such as the number of people searching your target keyword, Average Cost of Goods Sold (ACOGS) based on previous experience, the number of clicks and impressions related to your latest Amazon ads, prospective sales based on historical data, etc., help you understand what actually works. But not all decisions must be based on short-term product-based advertising. Eventually, your long-term goal needs to be establishing a consistently profitable business.\\n\\nRead more about it in this article: ****[How You Can Effectively Use Amazon Sponsored Products Ads](https://datahawk.co/blog/amazon-sponsored-product-ads)****","essential_understanding_your_amazon_audience_v1.0.0":"An eCommerce Buyer Persona is designed to give eCommerce brands, sellers, and agencies the fuel they need to adapt their SEO and\xa0[Amazon advertising strategies](https://datahawk.co/blog/amazon-2021-advertising-benchmarks-competitive-insights) to their ideal customers.\\n\\nAlthough they are fictional and generalized, buyer personas\u2019 are a detailed representation of your ideal customer. They contain unique demographics that include identifiers such as race, ethnicity, gender, age, marital status, income, education, and geographics.\\n\\n## **Surveys**\\n\\nTo start building your eCommerce buyer persona, survey existing customers. Keep in mind recipients are more likely to respond to surveys if they are multiple-choice and not excessively long. Typically, a buyer persona survey should contain 8-10 questions, each with no more than six multiple-choice options. \\n\\n## **Interviews**\\n\\nTo obtain the most qualified leads, you should know details about your buyer personas\u2019 business to better understand how competitive their market may be. When conducting interviews, either in person or over the phone, it may be helpful to ask questions about their day-to-day lives that can welcome valuable insights to help you develop your persona.\\n\\nKnowing how much your customers make may also indicate how much they are willing to splurge and allows you to determine what they can afford and, in turn, helps you price your products competitively.\\n\\n## **Focus Groups**\\n\\nFocus groups are perhaps the most useful form of market information gathering. They typically involve a small group of people with similar traits and experiences gathered together in a moderated setting to obtain information about a particular product or subject at large.\\n\\n## ****Adapting Strategies to Target Your Amazon Buyer Persona****\\n\\
1nBuilding your buyer persona is only half the battle. To fully leverage the many benefits of having a comprehensive eCommerce buyer persona, one must also adapt their selling and advertising efforts to accommodate a particular buyer persona\u2019s shopping behavior.\\n\\nRead more about it in this article: [What Is an eCommerce Buyer Persona and Why You Need One](https://datahawk.co/blog/what-is-an-ecommerce-buyer-persona-and-why-you-need-one)","essential_product_launch_tips_strategy_part2_v1.0.0":"### **Offer Better Customer Support**\\n\\nAmazon does much customer support for you, but that doesn\u2019t necessarily mean you cannot offer more. \\n\\nHowever, Amazon does have specific rules against you discouraging people from leaving negative feedback. Amazon is big on allowing customers to share real experiences. As a learning opportunity, you should seek out those honest responses.\\n\\nGood customer support never takes this negative customer feedback as a personal attack. Take any negative feedback as a learning opportunity.\\n\\nIf you notice trends in your feedback, you might have to re-evaluate the product and rerelease it under the next version. In that case, having a new ASIN will enable you to refresh from negative reviews. This note is essential if you get enough of a negative customer experience to have to start over.\\n\\n### **Become a Trusted Source of Expertise**\\n\\nPeople are less likely to buy from sellers who have no idea what they are doing. Increasing your potential sales as a source of expertise is mainly grown from creating an off-site presence. This expertise comes from the ownership of a blog and an email marketing campaign.\\n\\nTo increase organic sales, a common form of doing this like an expert is answering all your niche questions. So, if you are a company that sells electric grills, having a list of blogs devoted to recipes for your electric grill can be a great idea.\\n\\nDirect email marketing is another method for those who seek out your expertise. In this case, it will most likely be from people already aware of your product. Remember, if you plug in, make sure that it comes with something people can use.\\n\\n### **Creating a Promotional Campaign for Your Product**\\n\\nAnother way to meet customer appeal is through discount codes and coupons. Discounts, by default, encourage people to buy sooner. This is especially true if you establish a sense of urgency. You can do this directly on Amazon by applying your new product to lightning deals.\\n\\nOtherwise, if you have a social media presence, you can choose to promote a discount code.\\n\\nEncourage your social media followers by expressing the announcement of your new product. This is something that Amazon doesn\u2019t typically allow, so establishing social media is necessary for sellers to gain growth.\\n\\nRead more about different Product Launch Strategies in this article: ****[Your Guide to the Perfect Amazon Product Launch Strategy](https://datahawk.co/blog/amazon-product-launch-strategy)****"}');let oe=class extends h.U{createInsightInstance(i){return new x.L(i)}createInsight(i){const n=this.createInsightInstance(i);return n.title=()=>i.title,n.referenceDate=Z().utc(i.lastContentUpdate).toDate(),n.template=`markdown "${(Xi[i.insightDefinitionKey]??"This insight will be described soon").replace(/"/g,'\\"')}"`,n}};oe=(0,u.gn)([k({definitionKeys:[r.ESSENTIAL_LEVERAGE_AMAZON_ANALYTICS_AND_DATA_CONNECTIONS_V1_0_0,r.ESSENTIAL_REACH_AMAZON_MULTI_CHANNEL_V1_0_0,r.ESSENTIAL_IMPROVE_YOUR_IMAGES_V1_0_0,r.ESSENTIAL_IMPROVE_YOUR_SEO_V1_0_0,r.ESSENTIAL_MARKET_RESEARCH_PART1_V1_0_0,r.ESSENTIAL_BUSINESS_GUIDELINES_V1_0_0,r.ESSENTIAL_CHECK_AMAZONS_BEGINNER_GUIDE_V1_0_0,r.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART1_V1_0_0,r.ESSENTIAL_AMAZON_SEO_GUIDELINES_V1_0_0,r.ESSENTIAL_MAKE_THE_MOST_AMAZON_BUSINESS_PART1_V1_0_0,r.ESSENTIAL_BUY_BOX_V1_0_0,r.ESSENTIAL_UNDERSTANDING_A9_AND_RANKING_V1_0_0,r.ESSENTIAL_TRINITY_AMAZON_PRODUCT_PRICING_V1_0_0,r.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART2_V1_0_0,r.ESSENTIAL_LOGISTICS_V1_0_0,r.ESSENTIAL_MARKET_RESEARCH_PART2_V1_0_0,r.ESSENTIAL_PRODUCT_VIDEO_GUIDELINES_V1_0_0,r.ESSENTIAL_LISTING_QUALITY_SCORE_V1_0_0,r.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART3_V1_0_0,r.ESSENTIAL_AMAZON_FBA_CHECKLIST_FOR_SELLERS_V1_0_0,r.ESSENTIAL_OPTIMIZE_SEO_PPC_CAMPAINGS_V1_0_0,r.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART1_V1_0_0,r.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART4_V1_0_0,r.ESSENTIAL_HOW_TO_USE_AMAZON_FOR_MARKET_RESEARCH_V1_0_0,r.ESSENTIAL_CREATE_A_COMPELLING_AMAZON_STOREFRONT_V1_0_0,r.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART3_V1_0_0,r.ESSENTIAL_SPONSORED_PRODUCT_ADS_PART5_V1_0_0,r.ESSENTIAL_SALES_RANK_V1_0_0,r.ESSENTIAL_UNDERSTANDING_YOUR_AMAZON_AUDIENCE_V1_0_0,r.ESSENTIAL_PRODUCT_LAUNCH_TIPS_STRATEGY_PART2_V1_0_0,r.ESSENTIAL_MAKE_THE_MOST_AMAZON_BUSINESS_PART2_V1_0_0,r.ESSENTIAL_INVENTORY_V1_0_0],title:"",template:""})],oe);let ea=(()=>{class t{transform(n,a,o){return a.entityRelationData.relations.filter(s=>s.relationType===(o??a.mainWalkthroughRelationType)&&s.relatedEntityId===n.entity
1Id)}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"walkthroughRelations",type:t,pure:!0}),t})();var Q=c(47290),O=(()=>{return(t=O||(O={})).BUSINESS="business",t.FINANCE="finance",t.ADS="ads",t.SEO="seo",t.PRODUCT="product",t.MARKET="market",O;var t})();const ta=[{label:"Finance",value:O.FINANCE},{label:"Ads",value:O.ADS},{label:"SEO",value:O.SEO},{label:"Product",value:O.PRODUCT},{label:"Market",value:O.MARKET},{label:"Business",value:O.BUSINESS}];var U=c(2508);let na=(()=>{class t{transform(n){return ta.find(a=>a.value===n)?.label??""}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"practiceLabel",type:t,pure:!0}),t})();function ia(t,i){if(1&t&&(e._UZ(0,"nz-option",6),e.ALo(1,"practiceLabel"),e.ALo(2,"lowercase")),2&t){const n=i.$implicit;e.Q6J("nzLabel",e.lcZ(1,2,n.value))("nzValue",e.lcZ(2,4,n.value))}}function aa(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"span",8),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.onFilterUpdate(null))}),e._UZ(1,"dh-ui-icon",9),e.qZA()}}function oa(t,i){if(1&t&&e.YNc(0,aa,2,0,"span",7),2&t){const n=e.oxw();e.Q6J("ngIf",n.value)}}let ra=(()=>{class t extends Q.i{constructor(){super(...arguments),this.insightPractices=O}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-insight-practice-filter"]],features:[e.qOj],decls:8,vars:6,consts:[["data-intercom-target","Insights | Practice filter",1,"filter-item__container","filter-practice","filter-size-s"],["nzBorderless","","nzAllowClear","","nzPlaceHolder","Practice","nzShowSearch","",1,"filter-select",3,"ngModel","nzDropdownMatchSelectWidth","nzClearIcon","ngModelChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["inputClearTpl",""],["dhTooltip","Remove filter",1,"remove-filter",3,"click"],["className","fa fa-times-circle"],[3,"nzLabel","nzValue"],["class","ant-input-clear-icon","dhTooltip","Clear value",3,"click",4,"ngIf"],["dhTooltip","Clear value",1,"ant-input-clear-icon",3,"click"],["size","xs","className","fa fa-times"]],template:function(n,a){if(1&n&&(e.TgZ(0,"div",0)(1,"nz-select",1),e.NdJ("ngModelChange",function(s){return a.onFilterUpdate(s)}),e.YNc(2,ia,3,6,"nz-option",2),e.ALo(3,"keyvalue"),e.qZA(),e.YNc(4,oa,1,1,"ng-template",null,3,e.W1O),e.TgZ(6,"span",4),e.NdJ("click",function(){return a.onRemoveFilter()}),e._UZ(7,"dh-ui-icon",5),e.qZA()()),2&n){const o=e.MAs(5);e.xp6(1),e.Q6J("ngModel",a.value)("nzDropdownMatchSelectWidth",!1)("nzClearIcon",o),e.xp6(1),e.Q6J("ngForOf",e.lcZ(3,4,a.insightPractices))}},dependencies:[U.JJ,U.On,f.oJ,b.N,_.sg,_.O5,w.Ip,w.Vq,_.i8,_.Nd,na],styles:[".filter-practice[_ngcontent-%COMP%]{flex:0 0 18ch;overflow:hidden;display:inline-flex}.filter-practice[_ngcontent-%COMP%] > nz-select[_ngcontent-%COMP%]{flex:1 1 auto}.filter-practice[_ngcontent-%COMP%] .remove-filter[_ngcontent-%COMP%]{flex:0 0 32px;display:flex;align-items:center;cursor:pointer}.filter-select[_ngcontent-%COMP%] .ant-select-selector{height:38px;border-radius:5px;border:1px solid var(--dh-main-dark-2)!important;background:transparent!important}"],changeDetection:0}),t})();var z=c(40060),Y=c(78772),V=c(7408),F=c(31595);let re=class extends V.n{};re=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_PRACTICE,component:ra,isPersistedInLocalStorage:!0,title:"Practice",iconClass:"dh-app-icon-practice",filterField:"practice",urlParams:["practice"],urlParamsFields:[F.B.PRACTICE]})],re);let sa=(()=>{class t extends Q.i{}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-insight-hide-closed-filter"]],features:[e.qOj],decls:5,vars:0,consts:[[1,"filter-item__container","fixed-filter","filter-size-s"],[1,"static-filter"],["dhTooltip","Remove filter",1,"remove-filter",3,"click"],["className","fa fa-times-circle"]],template:function(n,a){1&n&&(e.TgZ(0,"div",0)(1,"span",1),e._uU(2,"Hide closed"),e.qZA(),e.TgZ(3,"span",2),e.NdJ("click",function(){return a.onRemoveFilter()}),e._UZ(4,"dh-ui-icon",3),e.qZA()())},dependencies:[f.oJ,b.N],styles:["[_nghost-%COMP%] > div[_ngcontent-%COMP%]{display:flex}.static-filter[_ngcontent-%COMP%]{flex:1 1 auto;white-space:nowrap;color:var(--dh-main-neutral-2);height:38px;background-color:transparent;font-size:var(--dh-text-s-font-size);font-weight:var(--dh-text-semi-bold);display:flex;align-items:center;padding-left:var(--dh-space-s);-webkit-user-select:none;user-select:none}.remove-filter[_ngcontent-%COMP%]{flex:0 0 32px;display:flex;align-items:center;cursor:pointer}"]}),t})();var Pe=c(53471);let se=class extends V.n{buildRequestPayload(i,n){i?.hideClosed&&(n.statuses=[Pe._.NEW,Pe._.IN_PROGRESS])}};se=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_HIDE_CLOSED,component:sa,isPersistedInLocalStorage:!0,title:"Hide closed",iconClass:"far fa-circle",filterField:"hideClosed",urlParam
1s:["hideClosed"],defaultValue:!0,urlParamsFields:[F.B.INSIGHT_HIDE_CLOSED]})],se);var Me=c(81704);function ca(t,i){if(1&t&&(e._UZ(0,"nz-option",4),e.ALo(1,"lowercase")),2&t){const n=i.$implicit;e.Q6J("nzLabel",n.label)("nzValue",e.lcZ(1,2,n.value))}}function la(t,i){if(1&t&&(e.TgZ(0,"div",7),e._UZ(1,"dh-ui-icon",8),e._uU(2),e.qZA()),2&t){const n=e.oxw(2).$implicit,a=e.oxw();e.xp6(1),e.Q6J("className",a.config.iconClass),e.xp6(1),e.hij(" ",n.nzLabel," ")}}function _a(t,i){if(1&t&&(e.ynx(0),e.YNc(1,la,3,2,"div",6),e.ALo(2,"lowercase"),e.ALo(3,"lowercase"),e.BQk()),2&t){const n=i.$implicit,a=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,n.value)===e.lcZ(3,3,a.nzValue))}}function da(t,i){if(1&t&&e.YNc(0,_a,4,5,"ng-container",5),2&t){const n=e.oxw();e.Q6J("ngForOf",n.listOfSortingOptions)}}let pa=(()=>{class t extends Q.i{constructor(){super(...arguments),this.listOfSortingOptions=Me.N}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-insight-sorting-filter"]],features:[e.qOj],decls:6,vars:7,consts:[["data-intercom-target","Insights | Sorting",1,"filter-sorting","filter-item__container","filter-size-m"],[1,"filter-select",3,"ngModel","nzDropdownMatchSelectWidth","nzCustomTemplate","nzOpen","ngModelChange","nzOpenChange"],[3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["selectedSortTemplate",""],[3,"nzLabel","nzValue"],[4,"ngFor","ngForOf"],["class","selected-range",4,"ngIf"],[1,"selected-range"],[3,"className"]],template:function(n,a){if(1&n&&(e.TgZ(0,"div",0)(1,"nz-select",1),e.NdJ("ngModelChange",function(s){return a.onFilterUpdate(s)})("nzOpenChange",function(s){return a.isSelectOpen=s}),e.ALo(2,"lowercase"),e.YNc(3,ca,2,4,"nz-option",2),e.qZA()(),e.YNc(4,da,1,1,"ng-template",null,3,e.W1O)),2&n){const o=e.MAs(5);e.xp6(1),e.Q6J("ngModel",e.lcZ(2,5,a.value))("nzDropdownMatchSelectWidth",!1)("nzCustomTemplate",o)("nzOpen",a.isSelectOpen),e.xp6(2),e.Q6J("ngForOf",a.listOfSortingOptions)}},dependencies:[U.JJ,U.On,f.oJ,_.sg,_.O5,w.Ip,w.Vq,_.i8],styles:["[_nghost-%COMP%]{width:20ch;display:flex;flex-direction:row;gap:var(--dh-space-xxs)}.filter-sorting[_ngcontent-%COMP%]{overflow:hidden;flex:1 1 auto}.filter-sorting[_ngcontent-%COMP%] > nz-select[_ngcontent-%COMP%]{width:100%}.filter-select[_ngcontent-%COMP%] .ant-select-selector{height:38px;border-radius:5px;border:1px solid var(--dh-main-dark-2)!important;background:transparent!important}.selected-range[_ngcontent-%COMP%]{display:inline-flex}.selected-range[_ngcontent-%COMP%] dh-ui-icon[_ngcontent-%COMP%]{margin-right:8px}"]}),t})(),ce=class extends V.n{};ce=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_SORTING,component:pa,isPersistedInLocalStorage:!0,title:"Sort",iconClass:"fa fa-sort",filterField:"sorting",urlParams:["sorting"],defaultValue:Me.K.NEWEST,urlParamsFields:[F.B.INSIGHT_SORTING]})],ce);var le=c(9642),ma=c(5889),ga=c(45271),ua=c(56320);function ha(t,i){if(1&t&&(e._UZ(0,"dh-ui-icon",6),e.ALo(1,"insightCategoryDhUiIcon"),e.ALo(2,"insightCategoryIcon")),2&t){const n=e.oxw().$implicit,a=e.oxw();e.Q6J("dhUiIcon",e.lcZ(1,3,n.name))("className",e.lcZ(2,5,n.name))("size",a.IconSize.SM)}}function ya(t,i){if(1&t){const n=e.EpF();e.ynx(0),e.TgZ(1,"nz-tag",4),e.NdJ("nzCheckedChange",function(){const s=e.CHM(n).$implicit,l=e.oxw();return e.KtG(l.onFilterUpdate(s.name))}),e.ALo(2,"insightCategoryClass"),e.YNc(3,ha,3,7,"dh-ui-icon",5),e._uU(4),e.qZA(),e.BQk()}if(2&t){const n=i.$implicit,a=e.oxw();e.xp6(1),e.Tol(e.lcZ(2,5,n.name)),e.Q6J("nzChecked",a.value===n.name),e.xp6(2),e.Q6J("ngIf",n.icon),e.xp6(1),e.hij(" ",n.label," ")}}let fa=(()=>{class t extends Q.i{constructor(){super(...arguments),this.IconSize=f.Jh,this.categoriesTags=[{label:"Anomalies",name:le.O.Anomalies,icon:!0},{label:"Findings",name:le.O.Findings,icon:!0},{label:"Good Practices",name:le.O.GoodPractices,icon:!0}]}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-insight-category-filter"]],features:[e.qOj],decls:5,vars:3,consts:[["data-intercom-target","Insights | Categories",1,"insight-categories"],[1,"insight-category-all",3,"nzChecked","nzMode","nzCheckedChange"],[4,"ngFor","ngForOf"],[1,"category-divider"],["nzMode","checkable",3,"nzChecked","nzCheckedChange"],["class","tag-icon",3,"dhUiIcon","className","size",4,"ngIf"],[1,"tag-icon",3,"dhUiIcon","className","size"]],template:function(n,a){1&n&&(e.TgZ(0,"div",0)(1,"nz-tag",1),e.NdJ("nzCheckedChange",function(){return a.onFilterUpdate(null)}),e._uU(2," All "),e.qZA(),e.YNc(3,ya,5,7,"ng-container",2),e.qZA(),e._UZ(4,"nz-divider",3)),2&n&&(e.xp6(1),e.Q6J("nzChecked",!a.value)("nzMode",a.value?"checkable":"default"),e.xp6(2),e.Q6J("ngForOf",a.categoriesTags))},dependencies:[f.oJ,_.sg,_.O5,ne.g,ie.j,ma.y,ga._,ua.b],styles:["[_nghost-%COMP%]{width:100%}nz-tag[_ngcontent-%COMP%]{min-width:70px;height:47px;border:0;border-radius:0;margin:0;padding:var(--dh-space-xs) var(--dh-space-s);text-align:center;font-size:var(--dh-text-s-font-size);line-height:var(--dh-text-s-line-height);font-weight:var(--dh-text-semi-bold);color:var(--dh-main-neutral-2);border-bottom:solid 5px transparent;transition:color .3s ease,border-color .3s ease}nz-tag.insight-category-findings[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{--insight-category-findings-stop-color-1: #2F926A;--insight-category-findings-stop-color-2: #AAFFDD}nz-tag.insight-category-error[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{--insight-category-error-stop-color-1: #FF3322;--insight-category-error-stop-color-2: #DD0000}nz-tag.insight-category-anomalies[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{--insight-category-anomalies-stop-color-1: #F3EA62;--insight-category-anomalies-stop-color-2: #FFBB73}nz-tag.insight-category-goodPractices[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{--insight-category-goodPractices-stop-color-1: #BBB5FF;--insight-category-goodPractices-stop-color-2: #7D71FF}nz-tag.ant-tag-checkable[_ngcontent-%COMP%]:not(.ant-tag-checkable-checked):hover{color:var(--dh-main-light-2)}nz-tag[_ngcontent-%COMP%]:hover, nz-tag.ant-tag-checkable-checked[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active{color:var(--dh-main-light-2);background-color:transparent}nz-tag[_ngcontent-%COMP%]:hover.insight-category-all, nz-tag.ant-tag-checkable-checked.insight-category-all[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active.insight-category-all{background-color:#2b90ff20;border-bottom-color:var(--dh-primary-3)}nz-tag[_ngcontent-%COMP%]:hover.insight-category-findings, nz-tag.ant-tag-checkable-checked.insight-category-findings[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active.insight-category-findings{background-color:#7ad4af20;border-bottom-color:#7ad4af}nz-tag[_ngcontent-%COMP%]:hover.insight-category-error, nz-tag.ant-tag-checkable-checked.insight-category-error[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active.insight-category-error{background-color:#ff332220;border-bottom-color:#f32}nz-tag[_ngcontent-%COMP%]:hover.insight-category-anomalies, nz-tag.ant-tag-checkable-checked.insight-category-anomalies[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active.insight-category-anomalies{background-color:#f3ea6220;border-bottom-color:#f3ea62}nz-tag[_ngcontent-%COMP%]:hover.insight-category-goodPractices, nz-tag.ant-tag-checkable-checked.insight-category-goodPractices[_ngcontent-%COMP%], nz-tag[_ngcontent-%COMP%] .ant-tag-checkable[_ngcontent-%COMP%]:active.insight-category-goodPractices{background-color:#6557fe20;border-bottom-color:#6557fe}.category-divider[_ngcontent-%COMP%]{margin-top:0}.tag-icon[_ngcontent-%COMP%]{padding-right:8px}"]}),t})(),_e=class extends V.n{};_e=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_CATEGORY,component:fa,isPersistedInLocalStorage:!0,title:"Category",iconClass:"fa fa-briefcase",filterField:"categories",urlParam
1s:["categories"],fullWidthFilter:!0,urlParamsFields:[F.B.INSIGHT_CATEGORY]})],_e);var N=(()=>{return(t=N||(N={})).TODAY="today",t.YESTERDAY="yesterday",t.LAST7DAYS="last7Days",t.LAST14DAYS="last14Days",t.LASTMONTH="lastMonth",N;var t})();function Aa(t,i){if(1&t&&e._UZ(0,"nz-option",7),2&t){const n=i.$implicit;e.Q6J("nzValue",n.id)("nzLabel",n.title)}}function va(t,i){if(1&t&&(e.TgZ(0,"div",10),e._UZ(1,"dh-ui-icon",11),e._uU(2),e.qZA()),2&t){const n=e.oxw(2).$implicit,a=e.oxw();e.xp6(1),e.Q6J("className",a.config.iconClass)("dhTooltip",a.config.title),e.xp6(1),e.hij(" ",n.nzLabel," ")}}function Ca(t,i){if(1&t&&(e.ynx(0),e.YNc(1,va,3,3,"div",9),e.BQk()),2&t){const n=i.$implicit,a=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",n.id===a.nzValue)}}function Ea(t,i){if(1&t&&e.YNc(0,Ca,2,1,"ng-container",8),2&t){const n=e.oxw();e.Q6J("ngForOf",n.dateRanges)}}function Ta(t,i){if(1&t){const n=e.EpF();e.TgZ(0,"span",13),e.NdJ("click",function(){e.CHM(n);const o=e.oxw(2);return e.KtG(o.onFilterUpdate(null))}),e._UZ(1,"dh-ui-icon",14),e.qZA()}}function xa(t,i){if(1&t&&e.YNc(0,Ta,2,0,"span",12),2&t){const n=e.oxw();e.Q6J("ngIf",n.value)}}let Se=(()=>{class t extends Q.i{constructor(){super(...arguments),this.dateRanges=[{id:N.TODAY,title:"Today"},{id:N.YESTERDAY,title:"Yesterday"},{id:N.LAST7DAYS,title:"Last 7 days"},{id:N.LAST14DAYS,title:"Last 14 days"},{id:N.LASTMONTH,title:"Last month"}]}}return t.\u0275fac=function(){let i;return function(a){return(i||(i=e.n5z(t)))(a||t)}}(),t.\u0275cmp=e.Xpm({type:t,selectors:[["dh-date-range-filter-base"]],features:[e.qOj],decls:9,vars:6,consts:[[1,"filter-item__container","filter-size-m"],["nzAllowClear","","nzBorderless","",1,"filter-select",3,"nzPlaceHolder","ngModel","nzCustomTemplate","nzDropdownMatchSelectWidth","nzClearIcon","ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["selectRangeTemplate",""],["inputClearTpl",""],["dhTooltip","Remove filter",1,"remove-filter",3,"click"],["className","fa fa-times-circle"],[3,"nzValue","nzLabel"],[4,"ngFor","ngForOf"],["class","selected-range",4,"ngIf"],[1,"selected-range"],[3,"className","dhTooltip"],["class","ant-input-clear-icon","dhTooltip","Clear value",3,"click",4,"ngIf"],["dhTooltip","Clear value",1,"ant-input-clear-icon",3,"click"],["size","xs","className","fa fa-times"]],template:function(n,a){if(1&n&&(e.TgZ(0,"div",0)(1,"nz-select",1),e.NdJ("ngModelChange",function(s){return a.onFilterUpdate(s)}),e.YNc(2,Aa,1,2,"nz-option",2),e.qZA(),e.YNc(3,Ea,1,1,"ng-template",null,3,e.W1O),e.YNc(5,xa,1,1,"ng-template",null,4,e.W1O),e.TgZ(7,"span",5),e.NdJ("click",function(){return a.onRemoveFilter()}),e._UZ(8,"dh-ui-icon",6),e.qZA()()),2&n){const o=e.MAs(4),s=e.MAs(6);e.xp6(1),e.Q6J("nzPlaceHolder",a.config.placeholder)("ngModel",a.value)("nzCustomTemplate",o)("nzDropdownMatchSelectWidth",!1)("nzClearIcon",s),e.xp6(1),e.Q6J("ngForOf",a.dateRanges)}},dependencies:[_.sg,_.O5,U.JJ,U.On,f.oJ,b.N,w.Ip,w.Vq],styles:["[_nghost-%COMP%] > div[_ngcontent-%COMP%]{display:flex}.filter-select[_ngcontent-%COMP%]{flex:1 1 auto;white-space:nowrap;color:var(--dh-main-neutral-2);height:38px;background-color:transparent;font-size:var(--dh-text-s-font-size);display:flex;align-items:center}.remove-filter[_ngcontent-%COMP%]{flex:0 0 32px;display:flex;align-items:center;cursor:pointer}.selected-range[_ngcontent-%COMP%]{display:inline-flex}.selected-range[_ngcontent-%COMP%] dh-ui-icon[_ngcontent-%COMP%]{margin-right:8px}"]}),t})(),de=class extends V.n{};de=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_EVENT_DATE,component:Se,placeholder:"Event date",isPersistedInLocalStorage:!0,title:"Event Date",iconClass:"dh-app-icon-calendar-check",filterField:"eventDate",urlParams:["eventDate"],urlParamsFields:[F.B.dynamicUrlParamsStringField({name:"eventDate"})]})],de);let pe=class extends V.n{};pe=(0,u.gn)([(0,z.w)({id:Y.W.INSIGHT_SEND_DATE,component:Se,placeholder:"Send date",isPersistedInLocalStorage:!0,title:"Send Date",iconClass:"dh-app-icon-calendar-mail",filterField:"sendDate",urlParams:["sendDate"],urlParamsFields:[F.B.dynamicUrlParamsStringField({name:"sendDate"})]})],pe);let Oa=(()=>{class t{transform(n,a){return a.availableRelationTypes.has(E.VARIATION)?a.entityRelationData.relations.filter(o=>o.relationType===E.VARIATION&&n.entityId===o.entityId&&"parent"===o.attributes.type||o.relationType===E.VARIATION&&n.entityId===o.relatedEntityId&&"child"===o.attributes.type):[]}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"productVariations",type:t,pure:!0}),t})(),ka=(()=>{class t{transform(n,a){return"parent"===n.attributes.type?a.entityRelationData.entities.find(o=>o.entityId===n.relatedEntityId):"child"===n.attributes.type?a.entityRelationData.entities.find(o=>
1o.entityId===n.entityId):null}}return t.\u0275fac=function(n){return new(n||t)},t.\u0275pipe=e.Yjl({name:"variationChildEntity",type:t,pure:!0}),t})(),Ia=(()=>{class t{}return t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({providers:[re,se,ce,_e,de,pe,ae,$,q,W,H,ee,te,X,oe,_.H9,_.Zx,_.JJ],imports:[p.m,Hi.h,j.Bz,_.ez,Wi.m,f.$t,$i,f.u4,f.OJ,ye.Ns.forRoot({echarts:()=>c.e(545).then(c.bind(c,23545))})]}),t})();e.B6R(fe,function(){return[Ie.Y,_.sg,_.O5,_.tP,Te]},function(){return[ea,Oa,ka]})},81704:(B,T,c)=>{c.d(T,{K:()=>p,N:()=>u});var p=(()=>{return(r=p||(p={})).NEWEST="newest",r.OLDEST="oldest",r.MOST_RELEVANT="mostRelevant",r.MOST_IMPACTFUL="mostImpactful",r.LEAST_EFFORT="lestEffort",p;var r})();const u=[{label:"Newest",value:p.NEWEST,hide:!0},{label:"Oldest",value:p.OLDEST}]},53471:(B,T,c)=>{c.d(T,{_:()=>p,n:()=>u});var p=(()=>{return(r=p||(p={})).NEW="new",r.IN_PROGRESS="inProgress",r.DONE="done",r.EXPECTED="expected",r.NO_ACTION_NEEDED="noActionNeeded",p;var r})();const u=[{label:"New",value:p.NEW,hide:!0},{label:"Investigating",value:p.IN_PROGRESS},{label:"Done",value:p.DONE},{label:"Expected",value:p.EXPECTED},{label:"No action needed",value:p.NO_ACTION_NEEDED}]},5889:(B,T,c)=>{c.d(T,{y:()=>u});var p=c(22560);let u=(()=>{class r{transform(x){return"insight-category-"+x}}return r.\u0275fac=function(x){return new(x||r)},r.\u0275pipe=p.Yjl({name:"insightCategoryClass",type:r,pure:!0}),r})()},45271:(B,T,c)=>{c.d(T,{_:()=>r});var p=c(9642),u=c(22560);let r=(()=>{class h{constructor(){this.insightCategoryIconMap={[p.O.All]:"",[p.O.Opportunities]:"",[p.O.Warnings]:"",[p.O.GoodPractices]:"insight-category-goodPractices",[p.O.Findings]:"insight-category-findings",[p.O.Anomalies]:"insight-category-anomalies",[p.O.Error]:"",[p.O.Empty]:""}}transform(C){return this.insightCategoryIconMap[C]?this.insightCategoryIconMap[C]:this.insightCategoryIconMap[p.O.Empty]}}return h.\u0275fac=function(C){return new(C||h)},h.\u0275pipe=u.Yjl({name:"insightCategoryDhUiIcon",type:h,pure:!0}),h})()},56320:(B,T,c)=>{c.d(T,{b:()=>r});var p=c(9642),u=c(22560);let r=(()=>{class h{constructor(){this.insightCategoryIconMap={[p.O.All]:"fas",[p.O.Opportunities]:"",[p.O.Warnings]:"",[p.O.GoodPractices]:"",[p.O.Findings]:"",[p.O.Anomalies]:"",[p.O.Empty]:"fas fa-alien",[p.O.Error]:"fas fa-times-circle"}}transform(C){return null!=this.insightCategoryIconMap[C]?this.insightCategoryIconMap[C]:this.insightCategoryIconMap[p.O.Empty]}}return h.\u0275fac=function(C){return new(C||h)},h.\u0275pipe=u.Yjl({name:"insightCategoryIcon",type:h,pure:!0}),h})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.