1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[171],{24224:(e,n,t)=>{t.d(n,{FZ:()=>c,Fk:()=>a,aE:()=>i,xb:()=>s});var l=t(58262),r=t(14232);let s=()=>(0,l.bZ)(),a=()=>(0,l.Lw)(),i=(0,r.createContext)(null),c=()=>(0,r.useContext)(i)},90171:(e,n,t)=>{t.d(n,{A:()=>et});var l=t(28888),r=t(37876),s=t(14394),a=t(619),i=t(29358),c=t(34780),u=t(14232),o=t(24224),d=t(74668),x=t(27929),m=t(69913),h=t(44271);function p(){let e=(0,l._)(["px-1 py-px rounded-md border w-fit \n ","\n "," bg-yellow-50 border-yellow-100\n "]);return p=function(){return e},e}function f(){let e=(0,l._)(["place"]);return f=function(){return e},e}function g(){let e=(0,l._)(["page"]);return g=function(){return e},e}function j(){let e=(0,l._)(["auto"]);return j=function(){return e},e}function b(){let e=(0,l._)(["auction"]);return b=function(){return e},e}function v(){let e=(0,l._)(["sku"]);return v=function(){return e},e}function w(){let e=(0,l._)(["text-xs text-gray-700 ",""]);return w=function(){return e},e}function N(){let e=(0,l._)(["price"]);return N=function(){return e},e}function _(){let e=(0,l._)(["monthly_sales"]);return _=function(){return e},e}function y(){let e=(0,l._)(["pcs"]);return y=function(){return e},e}function k(){let e=(0,l._)(["unknown_product"]);return k=function(){return e},e}function A(){let e=(0,l._)(["px-[0.5px] group cursor-pointer shrink-0 relative z-[1] h-10\n "," z-[2] hover:z-[3] !h-20 pt-10\n "]);return A=function(){return e},e}function z(){let e=(0,l._)(["w-full h-full rounded-full \n "," bg-green-500 group-hover:bg-green-600 | bg-[#d1ddd6] dark:bg-[#333635] group-hover:saturate-[1.2] group-hover:brightness-90 dark:group-hover:brightness-125\n "," bg-yellow-500 group-hover:bg-yellow-600\n "]);return z=function(){return e},e}function C(){let e=(0,l._)(["business.bidder.misc.missing_bid_explanation"]);return C=function(){return e},e}function P(){let e=(0,l._)(["business.bidder.misc.missing_bid_question"]);return P=function(){return e},e}let H=e=>{let{data:n,loading:t,currentSettings:l,showData:c="all"}=e,{campaign:H}=(l?o.FZ:()=>({campaign:null,keywords:null}))(),{t:F,format:I}=(0,a.t)(),M=(0,u.useMemo)(()=>[1,2,3,4,5].filter(e=>{var t;return(null!=(t=null==n?void 0:n.findIndex(n=>e===n.page))?t:-1)>=0}),[n]);return n&&0!==n.length?(0,r.jsxs)("div",{className:"relative w-full",children:[t&&(0,r.jsx)("div",{className:"flex absolute inset-0 justify-center items-center h-[132px]",children:(0,r.jsx)(s.A,{})}),!t&&(0,r.jsx)("div",{className:"w-full flex flex-col gap-y-6",children:(0,r.jsxs)("div",{className:"w-full flex flex-col gap-y-4 items-center",children:[(0,r.jsx)(h.A,{horizontal:!0,children:(0,r.jsx)("ol",{className:"w-full flex flex-row gap-x-2 items-end",children:M.map(e=>(0,r.jsxs)("li",{className:"flex-1",children:[(0,r.jsx)("ol",{className:"w-full flex flex-row items-end",children:n.filter(n=>n.page===e).map(e=>{var n,t,l,s;let a=!!(null==H||null==(n=H.products)?void 0:n.some(n=>e.sku===n.sku)),u=null!=(t=e.organicPosition)?t:"1000+";return"ad"!==c||e.isAdPosition?(0,r.jsx)("li",{className:"w-1",children:(0,r.jsx)(d.A,{disableHoverableContent:!0,sizing:"custom",className:"bg-white shadow-xl ring-black/5 ring-1 p-2 rounded-xl",content:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:(0,x.c)(p(),(0,i.YW)(e.isAdPosition).with(!0,()=>"bg-green-50 border-green-100").otherwise(()=>"bg-gray-50 border-gray-100"),a),children:(0,r.jsxs)("span",{className:"font-medium",children:[e.position,u!==e.position&&(0,r.jsxs)("span",{children:[" â ",u]})," ",F(f()),", ",e.page," ",F(g()),(0,i.YW)(e.adType).with("auto",()=>", ".concat(F(j()))).with("catalog_and_search",()=>", ".concat(F(b()))).otherwise(()=>""),e.isAdPosition&&", ".concat(F("ad")," ")]})}),e.name?(0,r.jsxs)("div",{className:"flex items-center mt-2 space-x-4",children:[e.image&&(0,r.jsx)("img",{width:"132",height:"176",src:e.image.replace("big","c246x328").replace("jpg","webp"),className:"h-44 rounded-md shrink-0"}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("span",{className:"text-xs",children:null!=(l=e.brandName)?l:"â"}),(0,r.jsx)("span",{className:"font-medium max-w-[15rem] truncate",children:e.name}),(0,r.jsxs)("span",{className:"text-xs text-gray-700",children:[F(v()),": ",e.sku]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"relative w-4 h-4 top-[3px] text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",children:[(0,r.jsx)("path",{d:"M9 17a2 2 0 11-4 0 2 2
10 014 0zM19 17a2 2 0 11-4 0 2 2 0 014 0z"}),(0,r.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 16V6a1 1 0 00-1-1H4a1 1 0 00-1 1v10a1 1 0 001 1h1m8-1a1 1 0 01-1 1H9m4-1V8a1 1 0 011-1h2.586a1 1 0 01.707.293l3.414 3.414a1 1 0 01.293.707V16a1 1 0 01-1 1h-1m-6-1a1 1 0 001 1h1M5 17a2 2 0 104 0m-4 0a2 2 0 114 0m6 0a2 2 0 104 0m-4 0a2 2 0 114 0"})]}),(0,r.jsxs)("span",{className:"mt-2 ml-1",children:[e.deliveryTimeInHours," ",F("hour",{count:e.deliveryTimeInHours})]})]}),(0,r.jsxs)("div",{className:"flex items-baseline",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"relative w-4 h-4 top-[3px] text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",children:(0,r.jsx)("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"})}),e.rating&&(0,r.jsx)("span",{className:"ml-1 text-sm font-medium text-gray-700",children:I.number(e.rating)}),(0,r.jsxs)("span",{className:(0,x.c)(w(),e.rating?"ml-1.5":"ml-1"),children:[I.number(e.reviewsCount)," ",F("review",{count:e.reviewsCount})]})]}),(0,r.jsxs)("span",{className:"mt-2 text-lg",children:[null!=(s=I.price(e.price))?s:"â"," ",(0,r.jsx)("span",{className:"text-xs text-gray-700 lowercase",children:F(N())})]}),(0,r.jsx)("span",{className:"text-xs text-gray-700",children:F(_())}),(0,r.jsxs)("span",{children:[I.number(e.sales)," ",F(y())," \xb7"," ",I.price(e.gmv)]})]})]}):(0,r.jsx)("span",{className:"italic",children:F(k())})]}),children:(0,r.jsxs)("div",{className:(0,x.c)(A(),a&&null!==e.image),children:[a&&null!==e.image&&(0,r.jsx)("div",{className:"absolute top-0 inset-x-0 mx-auto flex items-center justify-center pb-0.5",children:(0,r.jsx)(m.default,{src:e.image,className:"w-6 h-8 object-contain rounded",outerClassName:"bg-yellow-50 border border-yellow-200/80 group-hover:border-yellow-300 rounded-md p-0.5 overflow-hidden"})}),(0,r.jsx)("div",{className:(0,x.c)(z(),e.isAdPosition,a)})]})})},e.sku):(0,r.jsx)("li",{className:"w-1 h-20"},e.sku)})}),(0,r.jsxs)("p",{className:"w-full mt-1 text-xs text-gray-500",children:[e," ",F("page")]})]},e))})}),(0,r.jsxs)("div",{className:"flex items-center space-x-6",children:[H&&(0,r.jsxs)("div",{className:"flex items-center space-x-1.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}),(0,r.jsx)("div",{className:"text-xs text-gray-700 first-letter:uppercase",children:F("user_products")})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,r.jsx)("div",{className:"text-xs text-gray-700 first-letter:uppercase",children:F("products_with_ad")})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-1.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 bg-[#d1ddd6] dark:bg-[#333635] rounded-full"}),(0,r.jsx)("div",{className:"text-xs text-gray-700 first-letter:uppercase",children:F("products_without_ad")})]}),H&&!n.some(e=>{var n;return null==(n=H.products)?void 0:n.some(n=>n.sku===e.sku)})&&(0,r.jsx)(d.A,{sizing:"text",content:F(C()),children:(0,r.jsx)("div",{className:"text-xs text-gray-500 underline decoration-dashed underline-offset-4 cursor-default",children:F(P())})})]})]})})]}):null};var F=t(32653),I=t(24997),M=t(53815),T=t(39631),B=t(29053),S=t(89099),W=t(79925),Y=t.n(W);function Z(){let e=(0,l._)(["",""]);return Z=function(){return e},e}function E(){let e=(0,l._)(["flex flex-col w-full space-y-0.5 "," pl-14"]);return E=function(){return e},e}function V(){let e=(0,l._)(["position"]);return V=function(){return e},e}function K(){let e=(0,l._)(["place"]);return K=function(){return e},e}function q(){let e=(0,l._)(["price"]);return q=function(){return e},e}function D(){let e=(0,l._)(["delivery"]);return D=function(){return e},e}function L(){let e=(0,l._)(["sales_30_days"]);return L=function(){return e},e}let R=e=>{let{data:n}=e,t=(0,B.u)(),{t:l,format:s}=(0,a.t)(),{campaign:i}=((0,S.useRouter)().asPath.includes("bidder")?o.FZ:()=>({campaign:null}))(),c=(0,F.FB)(),m=(0,u.useMemo)(()=>[c.accessor("name",{header:()=>(0,r.jsx)("span",{className:"capitalize",children:l("product",{count:1})}),cell:e=>{var n;let{getValue:l,row:{original:{image:s,url:a,sku:i,sku:c},original:u}}=e;return(0,r.jsxs)("div",{className:"relative w-full",children:[s&&(0,r.jsx)("img",{src:s,className:"object-contain absolute top-0 bottom-0 left-0 m-auto w-12 h-12",alt:""}),(0,r.jsxs)("div",{className:(0,x.c)(E(),!!s),children:[l()&&(0,r.jsx)(d.A,{content:null!=(n=l())?n:"",className:"px-2 py-2",children:c?(0,r.jsx)("a",{href:"/products/info/".concat(t.currentMall.code,"/").concat(c,"/"),target:"_blank",rel:"noreferrer",className:"inline-block text-blue-500
1w-fit hover:text-blue-700",children:l()}):(0,r.jsx)("span",{className:"inline-block text-black w-fit",children:l()})}),(0,r.jsx)(M.A,{product:{mallUrl:a,retailerId:parseInt(i)}})]})]})},meta:{className:"bg-inherit",width:320}}),c.accessor("position",{header:l(V()),cell:e=>{var n;let{row:{original:t}}=e,s=null!=(n=t.organicPosition)?n:"1000+";return(0,r.jsx)("span",{className:"inline-flex flex-col",children:(0,r.jsxs)("span",{children:[t.position,s!==t.position&&(0,r.jsxs)("span",{children:[" â ",s]})," ",l(K())]})})}}),c.accessor("isAdPosition",{header:()=>(0,r.jsx)("span",{className:"capitalize",children:l("ad")}),cell:e=>{let{row:{original:n}}=e;return(0,r.jsx)("span",{className:"inline-flex items-center gap-2",children:(0,r.jsx)("span",{children:n.isAdPosition?(0,r.jsx)(Y(),{className:"w-4 h-4"}):null})})}}),c.accessor("price",{header:l(q()),cell:e=>{var n;let{row:{original:t}}=e;return(0,r.jsx)("span",{className:"inline-flex flex-col",children:(0,r.jsx)("span",{children:null!=(n=s.price(t.price))?n:"â"})})},meta:{className:"text-right"}}),c.accessor("deliveryTimeInHours",{header:l(D()),cell:e=>{let{row:{original:n}}=e;return(0,r.jsx)("span",{className:"inline-flex flex-col",children:(0,r.jsxs)("span",{children:[s.number(n.deliveryTimeInHours)," ",l("hour",{count:n.deliveryTimeInHours})]})})},meta:{className:"text-right"}}),c.accessor("gmv",{header:l(L()),cell:e=>{var n;let{row:{original:t}}=e;return(0,r.jsxs)("span",{className:"inline-flex flex-col",children:[(0,r.jsx)("span",{children:s.price(t.gmv)}),(0,r.jsx)("span",{children:l("business.bidder.misc.units",{count:t.sales,formattedCount:null!=(n=s.number(t.sales))?n:"?"})})]})},meta:{className:"text-right"}})],[]);return(0,r.jsx)(I.A,{className:"h-[500px]",children:(0,r.jsx)(T.A,{options:{className:"rounded-lg",data:n,containerHeight:500,columns:m,rowProps:e=>{var n,t;let{original:l}=e;return{className:(0,x.c)(Z(),l.sku===(null==i||null==(t=i.products)||null==(n=t[0])?void 0:n.sku)&&"bg-yellow-50 border border-yellow-200")}},columnAvailability:{}}})})};function U(){let e=(0,l._)(["all_results"]);return U=function(){return e},e}function G(){let e=(0,l._)(["only_ads"]);return G=function(){return e},e}function J(){let e=(0,l._)(["all_results"]);return J=function(){return e},e}function O(){let e=(0,l._)(["only_ads"]);return O=function(){return e},e}function Q(){let e=(0,l._)(["chart"]);return Q=function(){return e},e}function X(){let e=(0,l._)(["table"]);return X=function(){return e},e}function $(){let e=(0,l._)(["chart"]);return $=function(){return e},e}function ee(){let e=(0,l._)(["table"]);return ee=function(){return e},e}function en(){let e=(0,l._)(["no_data_for_chart"]);return en=function(){return e},e}let et=e=>{let{data:n,loading:t,prediction:l,currentSettings:o,masterClusterNormalForm:d}=e,{t:x}=(0,a.t)(),[m,h]=(0,u.useState)("all"),[p,f]=(0,u.useState)("chart"),g=n&&n.length>0?n.filter(e=>"all"===m||"ad"===m&&e.isAdPosition).map(e=>{let{index:n,...t}=e;return t}):null,j=n&&n.length>0;return(0,r.jsxs)(r.Fragment,{children:[(!t||j)&&(0,r.jsxs)("div",{className:"flex justify-center space-x-4 absolute top-3 right-6 z-20",children:[(0,r.jsx)(c.A,{options:[{label:x(U()),value:"all"},{label:x(G()),value:"ad"}],optionKey:"label",display:"label",compareBy:"label",selected:(0,i.YW)(m).with("all",()=>({label:x(J()),value:"all"})).with("ad",()=>({label:x(O()),value:"ad"})).run(),setSelected:e=>{let{value:n}=e;return h(n)}}),(0,r.jsx)(c.A,{options:[{label:x(Q()),value:"chart"},{label:x(X()),value:"table"}],optionKey:"label",display:"label",compareBy:"label",selected:(0,i.YW)(p).with("chart",()=>({label:x($()),value:"chart"})).with("table",()=>({label:x(ee()),value:"table"})).run(),setSelected:e=>{let{value:n}=e;return f(n)}})]}),(0,r.jsxs)("div",{className:"relative w-full min-h-[132px]",children:[t&&!j&&(0,r.jsx)("div",{className:"flex absolute inset-0 justify-center items-center h-[132px]",children:(0,r.jsx)(s.A,{})}),!t&&!j&&(0,r.jsx)("div",{className:"flex absolute inset-0 justify-center items-center mt-8 text-lg font-medium text-gray-400",children:x(en())}),j&&(0,r.jsx)(r.Fragment,{children:"chart"===p?(0,r.jsx)(H,{data:n,loading:t,prediction:l,currentSettings:o,masterClusterNormalForm:d,showData:m}):(0,r.jsx)(R,{data:g||[]})})]})]})}}}]); 2//# sourceMappingURL=171-c9056cfe867bb4c7.js.map
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.