1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c40b9fee-f0e5-420c-9113-0b1dff7d57d8",e._sentryDebugIdIdentifier="sentry-dbid-c40b9fee-f0e5-420c-9113-0b1dff7d57d8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69018],{97318:(e,t,n)=>{n.d(t,{n:()=>u});var a=n(300561),r=n(819470),o=n(271864),l=n(119218),i=n(12013),s=n(413237),c=(0,l.F)()?function(e){var t,n,l,s=(0,i.c)(4);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.Y)("path",{fill:"currentColor",d:"M15 13.63a4.9 4.9 0 0 1 4.88 4.87v2a.88.88 0 0 1-1.75 0v-2A3.13 3.13 0 0 0 15 15.38H9a3.13 3.13 0 0 0-3.12 3.12v2a.88.88 0 0 1-1.75 0v-2A4.9 4.9 0 0 1 9 13.63z"}),n=(0,o.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2.63a4.87 4.87 0 1 1 0 9.74 4.87 4.87 0 0 1 0-9.74m0 1.75a3.12 3.12 0 1 0 0 6.24 3.12 3.12 0 0 0 0-6.24",clipRule:"evenodd"}),s[0]=t,s[1]=n):(t=s[0],n=s[1]),s[2]!==e?(l=(0,o.FD)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n]})),s[2]=e,s[3]=l):l=s[3],l}:function(e){return(0,o.FD)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,o.Y)("path",{fill:"currentColor",d:"M15 13.63a4.9 4.9 0 0 1 4.88 4.87v2a.88.88 0 0 1-1.75 0v-2A3.13 3.13 0 0 0 15 15.38H9a3.13 3.13 0 0 0-3.12 3.12v2a.88.88 0 0 1-1.75 0v-2A4.9 4.9 0 0 1 9 13.63z"}),(0,o.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2.63a4.87 4.87 0 1 1 0 9.74 4.87 4.87 0 0 1 0-9.74m0 1.75a3.12 3.12 0 1 0 0 6.24 3.12 3.12 0 0 0 0-6.24",clipRule:"evenodd"})]}))},u=(0,s.w)(c,"UserIcon")},104495:(e,t,n)=>{n.d(t,{c:()=>i});var a=n(834175),r=n(504746),o=new Set(["TimeoutError","OptimusTimeoutError","GraphQLTimeoutError"]),l=[/\btimeout\b/i,/timeouterror/i,/\btimed out\b/i,/\betimedout\b/i,/signal timed out/i,/network connect timeout/i,/request timed out/i,/deadline exceeded/i],i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(!e||"object"!=typeof e||t.has(e))return!1;if(t.add(e),e instanceof r.M)return!0;if(e instanceof a.C)return null!=e.networkError&&i(e.networkError,t)||e.graphQLErrors.some(e=>i(e,t));if(o.has(e.name)||(e=>{if(!e||"object"!=typeof e)return!1;var t=[e.name,e.message].filter(Boolean).join("|");return l.some(e=>e.test(t))})(e)||e.cause&&i(e.cause,t)||e.original&&i(e.original,t))return!0;var n=e.reasons;return null!=n&&!!n.some(e=>i(e,t))}},109032:(e,t,n)=>{n.d(t,{C:()=>R});var a=n(300561),r=n(271864),o=n(119218),l=n(12013),i=n(464399),s=n(780437),c=n(819470),u=n(413237),d=(0,o.F)()?function(e){var t,n,o,i,s=(0,l.c)(5);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.Y)("path",{fill:"currentColor",d:"M20 18.13a.88.88 0 0 1 0 1.75H4a.88.88 0 0 1 0-1.75z"}),n=(0,r.Y)("path",{fill:"currentColor",d:"M20 11.13a.88.88 0 0 1 0 1.74H4a.88.88 0 0 1 0-1.74z"}),o=(0,r.Y)("path",{fill:"currentColor",d:"M20 4.13a.88.88 0 0 1 0 1.75H4a.87.87 0 1 1 0-1.75z"}),s[0]=t,s[1]=n,s[2]=o):(t=s[0],n=s[1],o=s[2]),s[3]!==e?(i=(0,r.FD)("svg",(0,c._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n,o]})),s[3]=e,s[4]=i):i=s[4],i}:function(e){return(0,r.FD)("svg",(0,c._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,r.Y)("path",{fill:"currentColor",d:"M20 18.13a.88.88 0 0 1 0 1.75H4a.88.88 0 0 1 0-1.75z"}),(0,r.Y)("path",{fill:"currentColor",d:"M20 11.13a.88.88 0 0 1 0 1.74H4a.88.88 0 0 1 0-1.74z"}),(0,r.Y)("path",{fill:"currentColor",d:"M20 4.13a.88.88 0 0 1 0 1.75H4a.87.87 0 1 1 0-1.75z"})]}))},f=(0,u.w)(d,"MenuIcon"),m=n(843088),p=n(779655),h=n(831781),b=n(97318),v=n(170412),g=n(469058),y=n(99027),x=n(558162),C=n(140404),w=(0,v.A)("outline-none","data-[focus-visible]:shadow-[0_0_0_2px_var(--color-turbo-container-default),0_0_0_5px_var(--color-turbo-border-accent)]","data-[focus-visible]:forced-colors:[outline-style:solid] data-[focus-visible]:forced-colors:outline-2 data-[focus-visible]:forced-colors:outline-offset-2 data-[focus-visible]:forced-colors:outline-[Highlight]"),_=(0,v.A)("before:pointer-events-none before:absolute before:inset-0 before:z-0 before:content-['']","before:bg-[var(--color-turbo-state-muted-hover)]","before:opacity-0 data-[hovered]:before:opacity-100 data-[pressed]:before:opacity-100","before:transition-opacity","forced-colors:before:hidden"),k=(0,v.A)("relative z-0 flex min-w-px flex-1 cursor-pointer flex-col items-center justify-end","gap-turbo-4 px-turbo-2 py-turbo-8 font-turbo no-underline","text-turbo-content-muted font-turbo-regular","aria-[current=page]:text-turbo-content-accent aria-[current=page]:font-turbo-semibold","data-[pressed]:scale-[0.99]","transition-[transform,color] motion-reduce:transition-none motion-reduce:data-[pressed]:scale-100","aria-[current=page]:forced-colors:text-[Highlight]!","[&_svg]:size-turbo-24 [&_svg]:shrink-0 [&_svg]:text-current",_,w),Y=(0,o.F)()?function(e){var t,n,o,i,s,u,d,f,m,p,h,b=(0,l.c)(22);b[0]!==e?(i=(0,x._)(e,["icon","label","hideLabel","isCurrent","className"]),n=e.icon,o=e.label,s=e.hideLabel,u=e.isCurrent,t=e.className,b[0]=e,b[1]=t,b[2]=n,b[3]=o,b[4]=i,b[5]=s,b[6]=u):(t=b[1],n=b[2],o=b[3],i=b[4],s=b[5],u=b[6]);var g=void 0!==s&&s,y=void 0!==u&&u?"page":void 0;b[7]!==t?(d=(0,v.A)(k,t),b[7]=t,b[8]=d):d=b[8],b[9]!==n?(f=(0,r.Y)("span",{"aria-hidden":!0,
1className:"relative z-10 flex size-turbo-24 items-center justify-center",children:n}),b[9]=n,b[10]=f):f=b[10];var w=g?"sr-only":"text-[10px]";return b[11]!==w?(m=(0,v.A)("relative z-10 w-full text-center leading-turbo-compact tracking-turbo-regular",w),b[11]=w,b[12]=m):m=b[12],b[13]!==o||b[14]!==m?(p=(0,r.Y)("span",{className:m,children:o}),b[13]=o,b[14]=m,b[15]=p):p=b[15],b[16]!==i||b[17]!==y||b[18]!==d||b[19]!==f||b[20]!==p?(h=(0,r.FD)(C.N,(0,c._)((0,a._)({},i),{"aria-current":y,className:d,children:[f,p]})),b[16]=i,b[17]=y,b[18]=d,b[19]=f,b[20]=p,b[21]=h):h=b[21],h}:function(e){var t=e.icon,n=e.label,o=e.hideLabel,l=e.isCurrent,i=e.className,s=(0,x._)(e,["icon","label","hideLabel","isCurrent","className"]);return(0,r.FD)(C.N,(0,c._)((0,a._)({},s),{"aria-current":void 0!==l&&l?"page":void 0,className:(0,v.A)(k,i),children:[(0,r.Y)("span",{"aria-hidden":!0,className:"relative z-10 flex size-turbo-24 items-center justify-center",children:t}),(0,r.Y)("span",{className:(0,v.A)("relative z-10 w-full text-center leading-turbo-compact tracking-turbo-regular",void 0!==o&&o?"sr-only":"text-[10px]"),children:n})]}))},S=(0,v.A)("relative flex w-full flex-col bg-turbo-container-default pt-turbo-4","pb-[env(safe-area-inset-bottom,0px)]","shadow-[0_-20px_10px_rgba(0,0,0,0.02),0_-5px_5.5px_rgba(0,0,0,0.02)]","forced-colors:border forced-colors:border-[ButtonText]"),F=(0,o.F)()?function(e){var t,n,a,o=(0,l.c)(8),i=e.className,s=e.children,c=e["aria-label"];return o[0]!==i?(t=(0,v.A)(S,i),o[0]=i,o[1]=t):t=o[1],o[2]!==s?(n=(0,r.Y)("div",{className:"flex w-full items-stretch px-turbo-4",children:s}),o[2]=s,o[3]=n):n=o[3],o[4]!==c||o[5]!==t||o[6]!==n?(a=(0,r.Y)("nav",{className:t,"aria-label":c,children:n}),o[4]=c,o[5]=t,o[6]=n,o[7]=a):a=o[7],a}:function(e){var t=e.className,n=e.children,a=e["aria-label"];return(0,r.Y)("nav",{className:(0,v.A)(S,t),"aria-label":a,children:(0,r.Y)("div",{className:"flex w-full items-stretch px-turbo-4",children:n})})},N=n(874492),L=(0,o.F)()?function(e){var t,n,a,o,c,u,d=(0,l.c)(100),x=e.isAuthenticated,C=e.onTabPress,w=e.hidden,_=void 0!==w&&w,k=(0,i.Bd)("navigation").t,S=(0,g.useRouter)();if(d[0]!==_||d[1]!==x||d[2]!==C||d[3]!==S||d[4]!==k){var L,R,T,z,D,A,I,E,M,B,j,P,H,O,V,U,K,q,X,Z,$,W,G,J,Q,ee,et,en=(0,N.h6)(),ea=(0,N.tG)(),er=(0,N.ah)(),eo=(0,N.Yo)(),el=(0,N.Xj)(),ei=(0,N.v1)(S.pathname,S.asPath),es=x?el:ei;T=y.pg,d[20]!==S?(I=e=>{S.push(e)},d[20]=S,d[21]=I):I=d[21];var ec=_?"invisible translate-y-full":"visible translate-y-0";d[22]!==ec?(z=(0,v.A)("fixed inset-x-0 bottom-0 z-50 transition-[translate,visibility] duration-300 ease-in-out",ec),d[22]=ec,d[23]=z):z=d[23],D="consumer-mweb-nav-footer",d[24]!==_?(A=e=>{null==e||e.toggleAttribute("inert",_)},d[24]=_,d[25]=A):A=d[25],R=F,d[26]!==k?(j=k("consumer-mweb-nav-aria-label",null,{default:"Navigation"}),d[26]=k,d[27]=j):j=d[27],d[28]===Symbol.for("react.memo_cache_sentinel")?(U=(0,r.Y)(p.W,{}),d[28]=U):U=d[28];var eu=(0,N.Pt)(S.pathname,en);d[29]!==k?(K=k("consumer-menu-explore",null,{default:"Explore"}),d[29]=k,d[30]=K):K=d[30],d[31]!==C?(q=()=>null==C?void 0:C("home"),d[31]=C,d[32]=q):q=d[32],d[33]!==en||d[34]!==eu||d[35]!==K||d[36]!==q?(P=(0,r.Y)(Y,{href:en,icon:U,isCurrent:eu,label:K,onPress:q}),d[33]=en,d[34]=eu,d[35]=K,d[36]=q,d[37]=P):P=d[37],d[38]===Symbol.for("react.memo_cache_sentinel")?(X=(0,r.Y)(s.C,{}),d[38]=X):X=d[38];var ed=(0,N.Pt)(S.pathname,ea);d[39]!==k?(Z=k("consumer-menu-favorites",null,{default:"Favorites"}),d[39]=k,d[40]=Z):Z=d[40],d[41]!==C?($=()=>null==C?void 0:C("favourites"),d[41]=C,d[42]=$):$=d[42],d[43]!==ea||d[44]!==ed||d[45]!==Z||d[46]!==$?(H=(0,r.Y)(Y,{href:ea,icon:X,isCurrent:ed,label:Z,onPress:$}),d[43]=ea,d[44]=ed,d[45]=Z,d[46]=$,d[47]=H):H=d[47],d[48]===Symbol.for("react.memo_cache_sentinel")?(W=(0,r.Y)(h.g,{}),d[48]=W):W=d[48];var ef=(0,N.Pt)(S.pathname,er);d[49]!==k?(G=k("bottom-bar-menu-sell",null,{default:"Sell"}),d[49]=k,d[50]=G):G=d[50],d[51]!==C?(J=()=>null==C?void 0:C("sell"),d[51]=C,d[52]=J):J=d[52],d[53]!==er||d[54]!==ef||d[55]!==G||d[56]!==J?(O=(0,r.Y)(Y,{href:er,icon:W,isCurrent:ef,label:G,onPress:J}),d[53]=er,d[54]=ef,d[55]=G,d[56]=J,d[57]=O):O=d[57],d[58]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,r.Y)(m.b,{}
1),d[58]=Q):Q=d[58];var em=(0,N.Pt)(S.pathname,eo);d[59]!==k?(ee=k("bottom-bar-menu-chat",null,{default:"Chat"}),d[59]=k,d[60]=ee):ee=d[60],d[61]!==C?(et=()=>null==C?void 0:C("messages"),d[61]=C,d[62]=et):et=d[62],d[63]!==eo||d[64]!==em||d[65]!==ee||d[66]!==et?(V=(0,r.Y)(Y,{href:eo,icon:Q,isCurrent:em,label:ee,onPress:et}),d[63]=eo,d[64]=em,d[65]=ee,d[66]=et,d[67]=V):V=d[67],L=Y,E=es,d[68]!==x?(M=x?(0,r.Y)(f,{}):(0,r.Y)(b.n,{}),d[68]=x,d[69]=M):M=d[69],B=(0,N.Pt)(S.pathname,es),d[0]=_,d[1]=x,d[2]=C,d[3]=S,d[4]=k,d[5]=L,d[6]=R,d[7]=T,d[8]=z,d[9]=D,d[10]=A,d[11]=I,d[12]=E,d[13]=M,d[14]=B,d[15]=j,d[16]=P,d[17]=H,d[18]=O,d[19]=V}else L=d[5],R=d[6],T=d[7],z=d[8],D=d[9],A=d[10],I=d[11],E=d[12],M=d[13],B=d[14],j=d[15],P=d[16],H=d[17],O=d[18],V=d[19];return d[70]!==x||d[71]!==k?(t=x?k("consumer-menu-title",null,{default:"Menu"}):k("consumer-menu-login",null,{default:"Log in"}),d[70]=x,d[71]=k,d[72]=t):t=d[72],d[73]!==x||d[74]!==C?(n=()=>null==C?void 0:C(x?"menu":"login"),d[73]=x,d[74]=C,d[75]=n):n=d[75],d[76]!==L||d[77]!==t||d[78]!==n||d[79]!==E||d[80]!==M||d[81]!==B?(a=(0,r.Y)(L,{href:E,icon:M,isCurrent:B,label:t,onPress:n}),d[76]=L,d[77]=t,d[78]=n,d[79]=E,d[80]=M,d[81]=B,d[82]=a):a=d[82],d[83]!==R||d[84]!==a||d[85]!==j||d[86]!==P||d[87]!==H||d[88]!==O||d[89]!==V?(o=(0,r.FD)(R,{"aria-label":j,children:[P,H,O,V,a]}),d[83]=R,d[84]=a,d[85]=j,d[86]=P,d[87]=H,d[88]=O,d[89]=V,d[90]=o):o=d[90],d[91]!==z||d[92]!==D||d[93]!==A||d[94]!==o?(c=(0,r.Y)("div",{className:z,"data-testid":D,ref:A,children:o}),d[91]=z,d[92]=D,d[93]=A,d[94]=o,d[95]=c):c=d[95],d[96]!==T||d[97]!==I||d[98]!==c?(u=(0,r.Y)(T,{navigate:I,children:c}),d[96]=T,d[97]=I,d[98]=c,d[99]=u):u=d[99],u}:function(e){var t=e.isAuthenticated,n=e.onTabPress,a=e.hidden,o=void 0!==a&&a,l=(0,i.Bd)("navigation").t,c=(0,g.useRouter)(),u=(0,N.h6)(),d=(0,N.tG)(),x=(0,N.ah)(),C=(0,N.Yo)(),w=(0,N.Xj)(),_=(0,N.v1)(c.pathname,c.asPath),k=t?w:_;return(0,r.Y)(y.pg,{navigate:e=>{c.push(e)},children:(0,r.Y)("div",{className:(0,v.A)("fixed inset-x-0 bottom-0 z-50 transition-[translate,visibility] duration-300 ease-in-out",o?"invisible translate-y-full":"visible translate-y-0"),"data-testid":"consumer-mweb-nav-footer",ref:e=>{null==e||e.toggleAttribute("inert",o)},children:(0,r.FD)(F,{"aria-label":l("consumer-mweb-nav-aria-label",null,{default:"Navigation"}),children:[(0,r.Y)(Y,{href:u,icon:(0,r.Y)(p.W,{}),isCurrent:(0,N.Pt)(c.pathname,u),label:l("consumer-menu-explore",null,{default:"Explore"}),onPress:()=>null==n?void 0:n("home")}),(0,r.Y)(Y,{href:d,icon:(0,r.Y)(s.C,{}),isCurrent:(0,N.Pt)(c.pathname,d),label:l("consumer-menu-favorites",null,{default:"Favorites"}),onPress:()=>null==n?void 0:n("favourites")}),(0,r.Y)(Y,{href:x,icon:(0,r.Y)(h.g,{}),isCurrent:(0,N.Pt)(c.pathname,x),label:l("bottom-bar-menu-sell",null,{default:"Sell"}),onPress:()=>null==n?void 0:n("sell")}),(0,r.Y)(Y,{href:C,icon:(0,r.Y)(m.b,{}),isCurrent:(0,N.Pt)(c.pathname,C),label:l("bottom-bar-menu-chat",null,{default:"Chat"}),onPress:()=>null==n?void 0:n("messages")}),(0,r.Y)(Y,{href:k,icon:t?(0,r.Y)(f,{}):(0,r.Y)(b.n,{}),isCurrent:(0,N.Pt)(c.pathname,k),label:t?l("consumer-menu-title",null,{default:"Menu"}):l("consumer-menu-login",null,{default:"Log in"}),onPress:()=>null==n?void 0:n(t?"menu":"login")})]})})})},R=(0,o.F)()?function(e){var t,n,o=(0,l.c)(3);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=["navigation"],o[0]=t):t=o[0],o[1]!==e?(n=(0,r.Y)(i.Ei,{namespaces:t,children:(0,r.Y)(L,(0,a._)({},e))}),o[1]=e,o[2]=n):n=o[2],n}:function(e){return(0,r.Y)(i.Ei,{namespaces:["navigation"],children:(0,r.Y)(L,(0,a._)({},e))})}},189885:(e,t,n)=>{n.d(t,{A:()=>c});var a,r=n(934085),o=n(761876),l=new WeakMap;async function i(e,t){if(void 0!==e[t])return Promise.resolve();var n=l.get(e);if(n||(n=new Map,l.set(e,n)),n.has(t))return n.get(t);var a=void 0,r=new Promise(n=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:()=>a,set(e){a=e,n()}})});return n.set(t,r),r.then(()=>{n.delete(t),0===n.size&&l.delete(e);try{Object.defineProperty(e,t,{writable:!0,configurable:!0,enumerable:!0,value:a})}catch(e){}}),r}var s=n(138209);let c=()=>{var e=(0,r.h)()(o.RuZ);return{dispatchHotjarEvent:(0,s.useCallback)(async t=>{var n=window;if(n.hj){n.hj("event",t),e&&setTimeout(()=>{var e=document.getElementById("__next");(null==e?void 0:e.hasAttribute("inert"))&&(e.removeAttribute("inert"),e.removeAttribute("data-hj-inert"))},500);return}a||(a=i(n,"hj")),await a,n.hj("event",t)},[e])}}},244420:(e,t,n)=>{n.d(t,{By:()=>r,Mh:()=>i,SA:()=>l,XB:()=>s,XS:()=>c,_T:()=>
1o,dI:()=>a});var a=161,r=163,o=167,l=169,i=165,s=179,c=181},344525:(e,t,n)=>{n.d(t,{D:()=>u});var a=n(300561),r=n(819470),o=n(271864),l=n(119218),i=n(12013),s=n(413237),c=(0,l.F)()?function(e){var t,n,l=(0,i.c)(3);return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.Y)("path",{fill:"currentColor",d:"M18.64 7.75A.88.88 0 0 1 19.88 9l-7.26 7.26a.9.9 0 0 1-1.24 0L4.12 8.99a.88.88 0 0 1 1.24-1.24L12 14.4z"}),l[0]=t):t=l[0],l[1]!==e?(n=(0,o.Y)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:t})),l[1]=e,l[2]=n):n=l[2],n}:function(e){return(0,o.Y)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:(0,o.Y)("path",{fill:"currentColor",d:"M18.64 7.75A.88.88 0 0 1 19.88 9l-7.26 7.26a.9.9 0 0 1-1.24 0L4.12 8.99a.88.88 0 0 1 1.24-1.24L12 14.4z"})}))},u=(0,s.w)(c,"ChevronDownIcon")},345149:(e,t,n)=>{n.d(t,{s:()=>o});var a=n(934085),r=n(761876);function o(){return!0===(0,a.h)()(r.B4s)}},493402:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(346686),r=(0,a.UG)("\n fragment filters on Query @_unmask {\n filters: screenComponents(\n categoryId: $categoryId\n screen: $screen\n platform: WEB\n withCrosslistedAds: true\n ) {\n ... on ScreenComponentsError {\n message\n errorCode\n }\n ... on ScreenComponentsOutput {\n components {\n __typename\n id\n name\n type\n parentID\n description\n icon\n tag\n placeholder\n displayConfig {\n __typename\n renderAs\n hasMultiple\n inputMode\n renderAs\n suffix\n }\n }\n states(eager: true) {\n __typename\n filterId\n conditions {\n __typename\n filterId\n value\n type\n }\n ... on DisabledFilterState {\n __typename\n hidden\n }\n ... on OpenForInputFilterState {\n __typename\n values {\n __typename\n name\n values {\n __typename\n id\n name\n description\n counter\n }\n }\n defaultSelectedValues\n }\n }\n }\n }\n }\n"),o=(0,a.UG)("\n fragment sortOptions on Query @_unmask {\n sortOptions: screenComponents(\n categoryId: $categoryId\n screen: $sortingScreenName\n platform: WEB\n withCrosslistedAds: true\n ) {\n ... on ScreenComponentsOutput {\n states {\n ... on OpenForInputFilterState {\n values {\n values {\n id\n name\n }\n }\n defaultSelectedValues\n }\n }\n }\n ... on ScreenComponentsError {\n message\n }\n }\n }\n");let l=(0,a.UG)("\n query screenComponents(\n $screen: ID\n $categoryId: ID!\n $includeSortOptions: Boolean!\n $sortingScreenName: ID\n ) {\n ...filters\n ...sortOptions @include(if: $includeSortOptions)\n }\n ",[r,o])},499002:(e,t,n)=>{n.d(t,{VA:()=>ek,Xe:()=>eV,sc:()=>nU,zf:()=>t4,Rh:()=>e2,$d:()=>t8,LK:()=>nM,KZ:()=>nB,FS:()=>nP,QA:()=>nO,R0:()=>tG,Ne:()=>na,kZ:()=>F,GR:()=>nW,Ak:()=>nQ,Vr:()=>tx,Hg:()=>nK,y2:()=>nq,rM:()=>nm,Yf:()=>nH});var a,r=n(300561),o=n(819470),l=n(558162),i=n(271864),s=n(119218),c=n(12013),u=n(698319),d=n(464399),f=n(138209),m=(e,t,n,a)=>{(0,f.useLayoutEffect)(()=>{if(n){var r=null,o=null,l=()=>{var n=t.current,a=null==e?void 0:e.current;if(n&&a){o=n,r||"undefined"==typeof ResizeObserver||(r=new ResizeObserver(l)).observe(a);var i=a.getBoundingClientRect(),s=globalThis.innerHeight-24;if(n.style.zIndex="20",i.bottom>=s){n.style.position="fixed",n.style.top="".concat(i.top,"px"),n.style.bottom="".concat(24,"px"),n.style.left="".concat(i.left,"px"),n.style.right="auto",n.style.width="".concat(i.width,"px");return}n.style.position="absolute",n.style.top="0px",n.style.bottom="0px",n.style.left="0px",n.style.right="0px",n.style.width="auto"}};l();var i=globalThis.requestAnimationFrame(l);globalThis.addEventListener("scroll",l,{passive:!0}),globalThis.addEventListener("resize",l,{passive:!0});var s=null==a?void 0:a(l),c=(e=>{var t=!1,n=()=>{t||(t=!0,globalThis.requestAnimationFrame(()=>{t=!1,e()}))},a="undefined"==typeof MutationObserver?null:new MutationObserver(n);null==a||a.observe(document.body,{childList:!0,subtree:!0});var r=null;return"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(n)).observe(document.documentElement),()=>{null==a||a.disconnect(),null==r||r.disconnect()}})(l);return()=>{globalThis.cancelAnimationFrame(i),globalThis.removeEventListener("scroll",l),globalThis.removeEventListener("resize",l),null==r||r.disconnect(),null==s||s(),c(),o&&(o.style.position="",o.style.top="",o.style.bottom="",o.style.left="",o.style.right="",o.style.width="",o.style.zIndex="")}}},[e,n,a,t])};function p(e){return"".concat("chatassistant:history:").concat(e)}function h(e){return"".concat("chatassistant:context:").concat(e)}function b(e){return"".concat("chatassistant:session:").concat(e)}function v(e){return"".concat("chatassistant:last-applied-filters:").concat(e)}function g(e){return"".concat("chatassistant:feedback:").concat(e)}function y(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.value}function x(e){return"object"==typeof e&&null!==e&&"string"==typeof e.id&&"string"==typeof e.content&&("user"===e.role||"assistant"===e.role)&&(void 0===e.displayContent||"string"==typeof e.displayContent)}function C(e){try{var t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(x)}catch(e){return[]}}function w(e){if(void 0===globalThis.window)return[];try{var t=globalThis.window.sessionStorage.getItem(p(e));if(!t)return[];return C(t)}catch(e){return[]}}function _(e,t){if(void 0!==globalThis.window)try{globalThis.window.sessionStorage.setItem(p(e),JSON.stringify(t))}catch(e){return}}function k(e,t){if(void 0!==globalThis.window)try{globalThis.window.sessionStorage.setItem(h(e),JSON.stringify(t))}catch(e){return}}function Y(e){if(void 0===globalThis.window)return[];try{var t=globalThis.window.sessionStorage.getItem(v(e));if(!t)return[];try{var n=JSON.parse(t);if(!Array.isArray(n))return[];return n.filter(y)}catch(e){return[]}}catch(e){return[]}}function S(e,t){if(void 0!==globalThis.window)try{globalThis.window.sessionStorage.setItem(v(e),JSON.stringify(t))}catch(e){return}}function F(e){if(void 0===globalThis.window)return null;try{var t=globalThis.window.sessionStorage.getItem(b(e));if(!t)return null;return t}catch(e){return null}}function N(e,t){if(void 0!==globalThis.window)try{globalThis.window.sessionStorage.setItem(b(e),t)}catch(e){return}}function L(e){if(void 0===globalThis.window)return null;try{var t=globalThis.window.sessionStorage.getItem(g(e));if(!t)return null;try{var n=JSON.parse(t);return"object"==typeof n&&null!==n&&"string"==typeof n.messageId&&("up"===n.action||"down"===n.action)?n:null}catch(e){return null}}catch(e){return null}}function R(e,t,n){var a=(0,u._)((0,f.useState)({storageKey:e,feedback:null}
1),2),r=a[0],o=a[1],l=r.storageKey===e?r.feedback:null;return(0,f.useEffect)(()=>{var t=!1;return queueMicrotask(()=>{var n=L(e);!t&&n&&o({storageKey:e,feedback:n})}),()=>{t=!0}},[e]),{activeAction:(null==l?void 0:l.messageId)===t?l.action:null,handleFeedback:(0,f.useCallback)(a=>{var r=null!=l?l:L(e),i=(null==r?void 0:r.messageId)===t&&r.action===a?null:{messageId:t,action:a};i&&(null==n||n(i.action)),function(e,t){if(void 0!==globalThis.window)try{var n=g(e);if(null===t)return void globalThis.window.sessionStorage.removeItem(n);globalThis.window.sessionStorage.setItem(n,JSON.stringify(t))}catch(e){return}}(e,i),o({storageKey:e,feedback:i})},[t,n,e,l])}}var T=n(279393),z=n(278322),D=(0,T.F)("",{variants:{variant:{"icon-clear":"inline-flex size-full min-h-turbo-48 min-w-turbo-48 shrink-0 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-transparent p-0 text-turbo-content-default hover:bg-turbo-state-default-hover active:bg-turbo-state-default-hover disabled:cursor-not-allowed disabled:text-turbo-content-default-disabled disabled:hover:bg-transparent disabled:active:bg-transparent","icon-feedback":"flex size-[32px] cursor-pointer appearance-none items-center justify-center rounded-[8px] border-0 bg-background-primary p-0 text-foreground-secondary hover:bg-turbo-state-default-hover hover:text-foreground-primary active:bg-turbo-state-default-hover [&[aria-pressed=true]]:text-foreground-primary focus-visible:bg-turbo-state-default-hover","icon-feedback-mobile":"inline-flex min-h-turbo-40 min-w-turbo-40 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-transparent p-0 text-turbo-content-default hover:bg-turbo-state-default-hover active:bg-turbo-state-default-hover [&[aria-pressed=true]]:text-turbo-content-default focus-visible:bg-turbo-state-default-hover","icon-elevated":"inline-flex size-[40px] shrink-0 cursor-pointer appearance-none items-center justify-center rounded-full border-0 bg-turbo-container-elevated p-0 text-turbo-content-inverse shadow-[0_20px_6px_0_rgba(0,0,0,0.04),0_9px_4.5px_0_rgba(0,0,0,0.07),0_2px_2.5px_0_rgba(0,0,0,0.08)] backdrop-blur-[6px] transition-[background-color,transform] data-[hovered]:bg-[rgba(20,20,20,0.65)] data-[pressed]:scale-95",retry:"inline-flex h-turbo-40 min-h-turbo-40 w-full min-w-turbo-40 shrink-0 cursor-pointer appearance-none items-center justify-center gap-[6px] rounded-turbo-s border-0 bg-turbo-state-default-hover px-turbo-16 py-turbo-8 text-turbo-body-base leading-[1.25] font-turbo-medium tracking-turbo-regular text-turbo-content-default data-[hovered]:bg-turbo-state-default-hover data-[pressed]:bg-turbo-state-default-hover",secondary:"inline-flex min-h-[48px] min-w-[48px] flex-1 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-[#ecf1f3] px-200 text-body-base leading-none font-medium tracking-[0] whitespace-nowrap text-[#242526] outline-none",primary:"inline-flex min-h-[48px] min-w-[48px] flex-1 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-[#242526] px-200 py-150 text-body-base leading-[1.25] font-medium tracking-[0] whitespace-nowrap text-[#ffffff] outline-none","mobile-filter":"inline-flex h-turbo-32 min-h-turbo-32 min-w-turbo-40 shrink-0 cursor-pointer appearance-none items-center justify-center gap-[6px] rounded-turbo-xs border border-turbo-border-default bg-turbo-container-default py-[6px] pr-turbo-16 pl-[14px] text-turbo-body-small leading-[1.25] font-turbo-medium tracking-turbo-regular whitespace-nowrap text-turbo-content-default data-[hovered]:border-turbo-border-strong [&[aria-pressed=true]]:border-turbo-border-strong [&[aria-pressed=true]]:bg-turbo-state-default-hover","mobile-floating":"inline-flex min-h-turbo-56 cursor-pointer appearance-none items-center justify-center gap-turbo-8 overflow-clip rounded-full border border-turbo-border-elevated bg-turbo-container-elevated px-turbo-24 py-turbo-8 text-turbo-body-base leading-[1.4] font-turbo-medium tracking-turbo-regular whitespace-nowrap text-turbo-content-inverse shadow-[0_0_0_0.762px_rgba(255,255,255,0.1),0_8px_16px_0_rgba(0,0,0,0.05),0_4px_10px_0_rgba(0,0,0,0.07),0_2px_6px_0_rgba(0,0,0,0.09),0_1px_3px_0_rgba(0,0,0,0.1)] backdrop-blur-[4px] data-[pressed]:scale-95","mobile-inline-link":"inl
1ine-flex min-h-turbo-40 min-w-turbo-40 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-transparent px-turbo-12 py-turbo-8 text-turbo-body-base leading-[1.25] font-turbo-medium tracking-turbo-regular text-turbo-content-default data-[hovered]:bg-turbo-state-default-hover","mobile-inline-expand":"inline-flex min-h-turbo-48 w-full min-w-turbo-48 cursor-pointer appearance-none items-center justify-center rounded-turbo-s border-0 bg-[rgba(18,80,105,0.08)] px-turbo-16 py-turbo-12 text-turbo-body-base leading-[1.25] font-turbo-medium tracking-turbo-regular text-turbo-content-default data-[hovered]:bg-[rgba(18,80,105,0.14)]"},focusRing:{turbo:"focus:outline-none focus-visible:shadow-[0_0_0_2px_var(--color-turbo-container-default),0_0_0_5px_var(--color-turbo-border-accent)]",contrast:"data-focus-visible:shadow-[0_0_0_2px_#ffffff,0_0_0_5px_#0066cc]"}},defaultVariants:{focusRing:"turbo"}}),A=(0,f.forwardRef)((0,s.F)()?function(e,t){var n,a,s,u,d,f=(0,c.c)(12);f[0]!==e?(a=(0,l._)(e,["variant","className"]),s=e.variant,n=e.className,f[0]=e,f[1]=n,f[2]=a,f[3]=s):(n=f[1],a=f[2],s=f[3]);var m="turbo";return("secondary"===s||"primary"===s||"retry"===s)&&(m="contrast"),f[4]!==n||f[5]!==m||f[6]!==s?(u=D({variant:s,focusRing:m,className:n}),f[4]=n,f[5]=m,f[6]=s,f[7]=u):u=f[7],f[8]!==a||f[9]!==t||f[10]!==u?(d=(0,i.Y)(z.$,(0,o._)((0,r._)({ref:t},a),{className:u})),f[8]=a,f[9]=t,f[10]=u,f[11]=d):d=f[11],d}:function(e,t){var n=e.variant,a=e.className,s=(0,l._)(e,["variant","className"]),c="turbo";return("secondary"===n||"primary"===n||"retry"===n)&&(c="contrast"),(0,i.Y)(z.$,(0,o._)((0,r._)({ref:t},s),{className:D({variant:n,focusRing:c,className:a})}))}),I=n(378721),E="max-w-[240px] whitespace-nowrap rounded-[12px] bg-[rgba(0,0,0,0.8)] px-200 py-100 text-center text-body-small leading-none font-regular tracking-wide text-[#ffffff] shadow-[0_20px_12px_0_rgba(0,0,0,0.04),0_9px_9px_0_rgba(0,0,0,0.07),0_2px_5px_0_rgba(0,0,0,0.08)] backdrop-blur-[4px]",M="max-w-[240px] whitespace-nowrap rounded-[8px] bg-[rgba(0,0,0,0.8)] px-[10px] py-100 text-center text-[12px] leading-[14px] font-regular tracking-wide text-[#ffffff] shadow-[0_20px_12px_0_rgba(0,0,0,0.04),0_9px_9px_0_rgba(0,0,0,0.07),0_2px_5px_0_rgba(0,0,0,0.08)] backdrop-blur-[2px]",B=(0,s.F)()?function(e){var t,n,a=(0,c.c)(7),r=e.content,o=e.children,l=e.size,s=e.isEnabled,u=e.isOpen;if(!(void 0===s||s))return o;var d="compact"===(void 0===l?"default":l)?M:E;return a[0]!==r||a[1]!==d?(t=(0,i.Y)(I.m_,{placement:"bottom",offset:8,className:d,children:r}),a[0]=r,a[1]=d,a[2]=t):t=a[2],a[3]!==o||a[4]!==u||a[5]!==t?(n=(0,i.FD)(I.k$,{delay:0,closeDelay:0,isOpen:u,children:[o,t]}),a[3]=o,a[4]=u,a[5]=t,a[6]=n):n=a[6],n}:function(e){var t=e.content,n=e.children,a=e.size,r=e.isEnabled,o=e.isOpen;return void 0===r||r?(0,i.FD)(I.k$,{delay:0,closeDelay:0,isOpen:o,children:[n,(0,i.Y)(I.m_,{placement:"bottom",offset:8,className:"compact"===(void 0===a?"default":a)?M:E,children:t})]}):n},j="M8.99194 17.1562C8.5394 17.1505 8.094 17.0424 7.68897 16.8405C7.28396 16.6386 6.92942 16.3481 6.65259 15.9901C6.37576 15.6321 6.18358 15.2157 6.09009 14.7728C5.99689 14.3312 6.00513 13.8745 6.11279 13.4362L6.11206 13.4354L6.66504 11.1562H3.12744C2.79272 11.1561 2.46223 11.0781 2.16284 10.9284C1.86359 10.7787 1.60336 10.561 1.40259 10.2934C1.20187 10.0257 1.06625 9.71504 1.00635 9.38589C0.953941 9.09765 0.96074 8.80192 1.02612 8.51723L1.05762 8.39638L2.80518 2.39638C2.93581 1.94851 3.20831 1.55498 3.58154 1.27505C3.95476 0.995175 4.4085 0.84365 4.875 0.84365H15C15.5719 0.84365 16.1205 1.07062 16.5249 1.475C16.9293 1.87937 17.1563 2.42804 17.1563 2.9999V8.9999C17.1562 9.57176 16.9293 10.1204 16.5249 10.5248C16.1205 10.9292 15.5719 11.1562 15 11.1562H12.9302L12.8137 11.1642C12.6979 11.1804 12.5864 11.2208 12.4863 11.2829C12.353 11.3656 12.2449 11.4837 12.175 11.6242L12.1743 11.6264L9.58667 16.7936L9.53906 16.8742C9.416 17.0515 9.21174 17.1588 8.99194 17.1562ZM11.0002 11.0412L10.9995 11.0404C11.178 10.6813 11.4534 10.3788 11.7942 10.1674C11.89 10.108 11.9906 10.0578 12.0938 10.0143V2.15615H4.875C4.69253 2.15615 4.5149 2.21518 4.3689 2.32461C4.22294 2.43408 4.11609 2.58819 4.06494 2.76333L2.31738 8.76333C2.28072 8.88906 2.27418 9.02192 2.29761 9.15078C2.32103 9.27953 2.37367 9.40129 2.45215 9.506C2.53073 9.61076 2.63312 9.69572 2.75024 9.75429C2.86738 9.81286 2.99648 9.84364 3.12744 9.84365H7.5C7.70121 9.84365 7.8912 9.93603 8.01563 10.0941C8.13997 10.2523 8.1853 10.4589 8.13794 10.6544L7.38794 13.7445L7.38721 13.7475C7.3262 13.9947 7.32143 14.2527 7.37402 14.5019C7.42667 14.7512 7.5353 14.9858 7.69116 15.1874C7.84698 15.3888 8.04626 15.5528 8.27417 15.6664C8.38485 15.7216 8.50135 15.7634 8.62061 15.7931L11.0002 11.0412ZM15 9.84365C15.2238 9.84365 15.4387 9.75504 15.5969 9.59682C15.7551 9.4386 15.8437 9.22366 15.8438 8.9999V2.9999C15.8438 2.77614 15.7551 2.56121 15.5969 2.40298C15.4387 2.24474 15.2238 2.15615 15 2.15615H13.4063V9.84365H15Z",P=(0,s.F)()?function(e){var t,n,a=(0,c.c)(5),r=e.isFilled,o=r?"assistant-message-feedback-down-filled":void 0;return a[0]!==r?(t=r?(0,i.FD)(i.FK,{children:[(0,i.Y)("path",{d:"M13.4063 1.12495H15C15.4973 1.12495 15.9741 1.32264 16.3257 1.67427C16.6773 2.0259 16.875 2.50267 16.875 2.99995V8.99995C16.875 9.49723 16.6773 9.974 16.3257 10.3256C15.9741 10.6773 15.4973 10.8749 15 10.8749H13.4063V1.12495Z",fill:"currentColor"}),(0,i.Y)("path",{d:"M8.99561 16.8749C8.58542 16.8699 8.18133 16.7723 7.81421 16.5893C7.44712 16.4063 7.12615 16.1426 6.87524 15.8181C6.
162434 15.4936 6.45022 15.1164 6.36548 14.715C6.28088 14.3143 6.28812 13.8998 6.38599 13.5021L7.02246 10.8749H3.12744C2.83638 10.8749 2.54915 10.8074 2.28882 10.6772C2.02848 10.547 1.80208 10.3578 1.62744 10.1249C1.4528 9.89209 1.33454 9.62178 1.28247 9.3354C1.2304 9.04901 1.24564 8.75424 1.32715 8.4748L3.07471 2.4748C3.18831 2.08536 3.42546 1.74336 3.75 1.49995C4.07455 1.25653 4.46931 1.12495 4.875 1.12495H12.0937V11.2492C12.0263 11.3242 11.9684 11.4078 11.9231 11.499V11.5004L9.33545 16.6677C9.27118 16.796 9.13913 16.8766 8.99561 16.8749Z",fill:"currentColor"})]}):(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:j,fill:"currentColor"}),a[0]=r,a[1]=t):t=a[1],a[2]!==o||a[3]!==t?(n=(0,i.Y)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,"data-testid":o,children:t}),a[2]=o,a[3]=t,a[4]=n):n=a[4],n}:function(e){var t=e.isFilled;return(0,i.Y)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,"data-testid":t?"assistant-message-feedback-down-filled":void 0,children:t?(0,i.FD)(i.FK,{children:[(0,i.Y)("path",{d:"M13.4063 1.12495H15C15.4973 1.12495 15.9741 1.32264 16.3257 1.67427C16.6773 2.0259 16.875 2.50267 16.875 2.99995V8.99995C16.875 9.49723 16.6773 9.974 16.3257 10.3256C15.9741 10.6773 15.4973 10.8749 15 10.8749H13.4063V1.12495Z",fill:"currentColor"}),(0,i.Y)("path",{d:"M8.99561 16.8749C8.58542 16.8699 8.18133 16.7723 7.81421 16.5893C7.44712 16.4063 7.12615 16.1426 6.87524 15.8181C6.62434 15.4936 6.45022 15.1164 6.36548 14.715C6.28088 14.3143 6.28812 13.8998 6.38599 13.5021L7.02246 10.8749H3.12744C2.83638 10.8749 2.54915 10.8074 2.28882 10.6772C2.02848 10.547 1.80208 10.3578 1.62744 10.1249C1.4528 9.89209 1.33454 9.62178 1.28247 9.3354C1.2304 9.04901 1.24564 8.75424 1.32715 8.4748L3.07471 2.4748C3.18831 2.08536 3.42546 1.74336 3.75 1.49995C4.07455 1.25653 4.46931 1.12495 4.875 1.12495H12.0937V11.2492C12.0263 11.3242 11.9684 11.4078 11.9231 11.499V11.5004L9.33545 16.6677C9.27118 16.796 9.13913 16.8766 8.99561 16.8749Z",fill:"currentColor"})]}):(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:j,fill:"currentColor"})})},H="M9.00806 0.84375C9.4606 0.849354 9.906 0.957491 10.311 1.15942C10.716 1.36135 11.0706 1.65176 11.3474 2.00977C11.6242 2.3678 11.8164 2.78424 11.9099 3.22705C12.0031 3.66866 11.9949 4.12544 11.8872 4.56372L11.8879 4.56445L11.335 6.84375H14.8726C15.2073 6.84376 15.5378 6.92184 15.8372 7.
107153C16.1364 7.22122 16.3966 7.43886 16.5974 7.70654C16.7981 7.97421 16.9337 8.28486 16.9937 8.61401C17.0461 8.90225 17.0393 9.19798 16.9739 9.48267L16.9424 9.60352L15.1948 15.6035C15.0642 16.0514 14.7917 16.4449 14.4185 16.7249C14.0452 17.0047 13.5915 17.1563 13.125 17.1563H3C2.42813 17.1563 1.87947 16.9293 1.4751 16.5249C1.07074 16.1205 0.84375 15.5719 0.84375 15V9C0.843763 8.42814 1.07073 7.87946 1.4751 7.4751C1.87947 7.07074 2.42814 6.84375 3 6.84375H5.06982L5.18628 6.83569C5.30206 6.81947 5.41358 6.77909 5.51367 6.71704C5.64702 6.63435 5.7551 6.51623 5.82495 6.37573L5.82568 6.37354L8.41333 1.2063L8.46094 1.12573C8.584 0.94844 8.78827 0.841052 9.00806 0.84375ZM6.99976 6.95874L7.00049 6.95947C6.82201 7.31865 6.54664 7.62111 6.20581 7.83252C6.10997 7.89195 6.00938 7.94214 5.90625 7.9856V15.8438H13.125C13.3075 15.8438 13.4851 15.7847 13.6311 15.6753C13.7771 15.5658 13.8839 15.4117 13.9351 15.2366L15.6826 9.23657C15.7193 9.11084 15.7258 8.97798 15.7024 8.84912C15.679 8.72037 15.6263 8.59861 15.5479 8.4939C15.4693 8.38914 15.3669 8.30418 15.2498 8.24561C15.1326 8.18704 15.0035 8.15626 14.8726 8.15625H10.5C10.2988 8.15625 10.1088 8.06387 9.98438 7.90576C9.86003 7.74761 9.8147 7.54097 9.86206 7.34546L10.6121 4.25537L10.6128 4.25244C10.6738 4.00517 10.6786 3.74725 10.626 3.49805C10.5733 3.24873 10.4647 3.01408 10.3088 2.8125C10.153 2.61106 9.95374 2.44715 9.72583 2.3335C9.61515 2.27832 9.49865 2.23648 9.37939 2.20679L6.99976 6.95874ZM3 8.15625C2.77624 8.15625 2.56131 8.24486 2.40308 8.40308C2.24485 8.5613 2.15626 8.77624 2.15625 9V15C2.15625 15.2238 2.24486 15.4387 2.40308 15.5969C2.56131 15.7552 2.77622 15.8438 3 15.8438H4.59375V8.15625H3Z",O=(0,s.F)()?function(e){var t,n,a=(0,c.c)(5),r=e.isFilled,o=r?"assistant-message-feedback-up-filled":void 0;return a[0]!==r?(t=r?(0,i.FD)(i.FK,{children:[(0,i.Y)("path",{d:"M4.59375 16.875H3C2.50272 16.875 2.02595 16.6773 1.67432 16.3256C1.32269 15.974 1.125 15.4972 1.125 15V8.99995C1.125 8.50267 1.32269 8.0259 1.67432 7.67427C2.02595 7.32264 2.50272 7.12495 3 7.12495H4.59375V16.875Z",fill:"currentColor"}),(0,i.Y)("path",{d:"M9.00439 1.12495C9.41458 1.13003 9.81867 1.22756 10.1858 1.41059C10.5529 1.59361 10.8738 1.85735 11.1248 2.18184C11.3757 2.50634 11.5498 2.88352 11.6345 3.28486C11.7191 3.68557 11.7119 4.10009 11.614 4.49775L10.9775 7.12495H14.8726C15.1636 7.12496 15.4508 7.19254 15.7112 7.3227C15.9715 7.45288 16.1979 7.6421 16.3726 7.87495C16.5472 8.10781 16.6655 8.37812 16.7175 8.6645C16.7696 8.95089 16.7544 9.24566 16.6729 9.5251L14.9253 15.5251C14.8117 15.9145 14.5745 16.2565 14.25 16.5C13.9254 16.7434 13.5307 16.875 13.125 16.875H5.90625V6.75068C5.97368 6.67567 6.03158 6.59209 6.0769 6.50093V6.49946L8.66455 1.33223C8.72882 1.20387 8.86087 1.12327 9.00439 1.12495Z",fill:"currentColor"})]}):(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:H,fill:"currentColor"}),a[0]=r,a[1]=t):t=a[1],a[2]!==o||a[3]!==t?(n=(0,i.Y)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,"data-testid":o,children:t}),a[2]=o,a[3]=t,a[4]=n):n=a[4],n}:function(e){var t=e.isFilled;return(0,i.Y)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,"data-testid":t?"assistant-message-feedback-up-filled":void 0,children:t?(0,i.FD)(i.FK,{children:[(0,i.Y)("path",{d:"M4.59375 16.875H3C2.50272 16.875 2.02595 16.6773 1.67432 16.3256C1.32269 15.974 1.125 15.4972 1.125 15V8.99995C1.125 8.50267 1.32269 8.0259 1.67432 7.67427C2.02595 7.32264 2.50272 7.12495 3 7.12495H4.59375V16.875Z",fill:"currentColor"}),(0,i.Y)("path",{d:"M9.00439 1.12495C9.41458 1.13003 9.81867 1.22756 10.1858 1.41059C10.5529 1.59361 10.8738 1.85735 11.1248 2.18184C11.3757 2.50634 11.5498 2.88352 11.6345 3.28486C11.7191 3.68557 11.7119 4.10009 11.614 4.49775L10.9775 7.12495H14.8726C15.1636 7.12496 15.4508 7.19254 15.7112 7.3227C15.9715 7.45288 16.1979 7.6421 16.3726 7.87495C16.5472 8.10781 16.6655 8.37812 16.7175 8.6645C16.7696 8.95089 16.7544 9.24566 16.6729 9.5251L14.9253 15.5251C14.8117 15.9145 14.5745 16.2565 14.25 16.5C13.9254 16.7434 13.5307 16.875 13.125 16.875H5.90625V6.75068C5.97368 6.67567 6.03158 6.59209 6.0769 6.50093V6.49946L8.66455 1.33223C8.72882 1.20387 8.86087 1.12327 9.00439 1.12495Z",fill:"currentColor"})]}):(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:H,fill:"currentColor"})})},V=(0,s.F)()?function(e){var t,n,a,r=(0,c.c)(13),o=e.testId,l=e.tooltipTestId,s=e.label,u=e.isSelected,d=e.onClick,f=e.children,m=e.buttonVariant,p=e.showTooltip;r[0]!==m||r[1]!==f||r[2]!==u||r[3]!==s||r[4]!==d||r[5]!==o?(t=(0,i.Y)(A,{variant:m,"aria-label":s,"aria-pressed":u,"data-testid":o,onPress:d,children:f}),r[0]=m,r[1]=f,r[2]=u,r[3]=s,r[4]=d,r[5]=o,r[6]=t):t=r[6];var h=t;
1return p?(r[7]!==s||r[8]!==l?(n=(0,i.Y)("span",{"data-testid":l,children:s}),r[7]=s,r[8]=l,r[9]=n):n=r[9],r[10]!==h||r[11]!==n?(a=(0,i.Y)(B,{size:"compact",content:n,children:h}),r[10]=h,r[11]=n,r[12]=a):a=r[12],a):h}:function(e){var t=e.testId,n=e.tooltipTestId,a=e.label,r=e.isSelected,o=e.onClick,l=e.children,s=e.buttonVariant,c=e.showTooltip,u=(0,i.Y)(A,{variant:s,"aria-label":a,"aria-pressed":r,"data-testid":t,onPress:o,children:l});return c?(0,i.Y)(B,{size:"compact",content:(0,i.Y)("span",{"data-testid":n,children:a}),children:u}):u},U=(0,s.F)()?function(e){var t,n,a,r,o,l,s,u,f,m,p=(0,c.c)(30),h=e.storageKey,b=e.messageId,v=e.hasSuggestedChipsBelow,g=e.onSelect,y=e.variant,x=(0,d.Bd)("buyer-chat-assistant").t,C=R(h,b,g),w=C.activeAction,_=C.handleFeedback,k="mobile-inline"===(void 0===y?"default":y),Y=k?"icon-feedback-mobile":"icon-feedback";t=void 0!==v&&v?"mt-[10px] mb-[16px] flex h-[32px] items-center gap-[2px]":k?"flex items-center":"mt-[10px] flex h-[32px] items-center gap-[2px]",p[0]!==x?(n=x("feedback-tooltip-good-answer",null,{fallback:"Good response"}),p[0]=x,p[1]=n):n=p[1];var S=n;p[2]!==x?(a=x("feedback-tooltip-needs-improvement",null,{fallback:"Needs improvement"}),p[2]=x,p[3]=a):a=p[3];var F=a,N="up"===w;p[4]!==_?(r=()=>_("up"),p[4]=_,p[5]=r):r=p[5];var L=!k,T="up"===w;p[6]!==T?(o=(0,i.Y)(O,{isFilled:T}),p[6]=T,p[7]=o):o=p[7],p[8]!==Y||p[9]!==S||p[10]!==N||p[11]!==r||p[12]!==L||p[13]!==o?(l=(0,i.Y)(V,{testId:"assistant-message-feedback-up",tooltipTestId:"assistant-message-feedback-up-tooltip",label:S,isSelected:N,onClick:r,buttonVariant:Y,showTooltip:L,children:o}),p[8]=Y,p[9]=S,p[10]=N,p[11]=r,p[12]=L,p[13]=o,p[14]=l):l=p[14];var z="down"===w;p[15]!==_?(s=()=>_("down"),p[15]=_,p[16]=s):s=p[16];var D=!k,A="down"===w;return p[17]!==A?(u=(0,i.Y)(P,{isFilled:A}),p[17]=A,p[18]=u):u=p[18],p[19]!==Y||p[20]!==F||p[21]!==z||p[22]!==s||p[23]!==D||p[24]!==u?(f=(0,i.Y)(V,{testId:"assistant-message-feedback-down",tooltipTestId:"assistant-message-feedback-down-tooltip",label:F,isSelected:z,onClick:s,buttonVariant:Y,showTooltip:D,children:u}),p[19]=Y,p[20]=F,p[21]=z,p[22]=s,p[23]=D,p[24]=u,p[25]=f):f=p[25],p[26]!==t||p[27]!==l||p[28]!==f?(m=(0,i.FD)("div",{"data-testid":"assistant-message-feedback",className:t,children:[l,f]}),p[26]=t,p[27]=l,p[28]=f,p[29]=m):m=p[29],m}:function(e){var t=e.storageKey,n=e.messageId,a=e.hasSuggestedChipsBelow,r=e.onSelect,o=e.variant,l=(0,d.Bd)("buyer-chat-assistant").t,s=R(t,n,r),c=s.activeAction,u=s.handleFeedback,f="mobile-inline"===(void 0===o?"default":o),m=f?"icon-feedback-mobile":"icon-feedback",p=l("feedback-tooltip-good-answer",null,{fallback:"Good response"}),h=l("feedback-tooltip-needs-improvement",null,{fallback:"Needs improvement"});return(0,i.FD)("div",{"data-testid":"assistant-message-feedback",className:void 0!==a&&a?"mt-[10px] mb-[16px] flex h-[32px] items-center gap-[2px]":f?"flex items-center":"mt-[10px] flex h-[32px] items-center gap-[2px]",children:[(0,i.Y)(V,{testId:"assistant-message-feedback-up",tooltipTestId:"assistant-message-feedback-up-tooltip",label:p,isSelected:"up"===c,onClick:()=>u("up"),buttonVariant:m,showTooltip:!f,children:(0,i.Y)(O,{isFilled:"up"===c})}),(0,i.Y)(V,{testId:"assistant-message-feedback-down",tooltipTestId:"assistant-message-feedback-down-tooltip",label:h,isSelected:"down"===c,onClick:()=>u("down"),buttonVariant:m,showTooltip:!f,children:(0,i.Y)(P,{isFilled:"down"===c})})]})},K=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c)(7);return u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{d:"M9.75 0C9.97747 0 10.1981 0.0792812 10.373 0.224609C10.5478 0.369831 10.6662 0.571588 10.708 0.794922L11.7324 6.21289C11.8052 6.59801 11.9924 6.95234 12.2695 7.22949C12.5466 7.50661 12.901 7.69382 13.2861 7.7666L18.7041 8.79102C18.9274 8.83279 19.1292 8.95127 19.2744 9.12598C19.4197 9.30093 19.5 9.5216 19.5 9.74902C19.5 9.97649 19.4197 10.1971 19.2744 10.3721C19.1292 10.5468 18.9275 10.6652 18.7041 10.707L13.2861 11.7314C12.901 11.8042 12.5467 11.9914 12.2695 12.2686C11.9924 12.5457 11.8052 12.9001 11.7324 13.2852L10.708 18.7031C10.6662 18.9265 10.5478 19.1282 10.373 19.2734C10.1981 19.4188 9.97747 19.499 9.75 19.499C9.52255 19.499 9.30193 19.4188 9.12695 19.2734C8.95223 19.1282 8.83376 18.9265 8.79199 18.7031L7.76758 13.2852C7.69479 12.9001 7.50758
112.5457 7.23047 12.2686C6.95333 11.9914 6.59897 11.8042 6.21387 11.7314L0.795898 10.707C0.572543 10.6652 0.370818 10.5468 0.225586 10.3721C0.0802577 10.1971 0 9.97649 0 9.74902C0.0000266713 9.5216 0.0802821 9.30093 0.225586 9.12598C0.370819 8.95127 0.572584 8.83281 0.795898 8.79102L6.21387 7.7666C6.59899 7.69383 6.95333 7.50664 7.23047 7.22949C7.50761 6.95234 7.69482 6.59803 7.76758 6.21289L8.79199 0.794922C8.8338 0.571608 8.95223 0.369831 9.12695 0.224609C9.30193 0.0792926 9.52255 0.000012463 9.75 0Z",fill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==n?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 19.5 19.499",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:a})),u[4]=t,u[5]=n,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:t,height:t,viewBox:"0 0 19.5 19.499",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),{children:(0,i.Y)("path",{d:"M9.75 0C9.97747 0 10.1981 0.0792812 10.373 0.224609C10.5478 0.369831 10.6662 0.571588 10.708 0.794922L11.7324 6.21289C11.8052 6.59801 11.9924 6.95234 12.2695 7.22949C12.5466 7.50661 12.901 7.69382 13.2861 7.7666L18.7041 8.79102C18.9274 8.83279 19.1292 8.95127 19.2744 9.12598C19.4197 9.30093 19.5 9.5216 19.5 9.74902C19.5 9.97649 19.4197 10.1971 19.2744 10.3721C19.1292 10.5468 18.9275 10.6652 18.7041 10.707L13.2861 11.7314C12.901 11.8042 12.5467 11.9914 12.2695 12.2686C11.9924 12.5457 11.8052 12.9001 11.7324 13.2852L10.708 18.7031C10.6662 18.9265 10.5478 19.1282 10.373 19.2734C10.1981 19.4188 9.97747 19.499 9.75 19.499C9.52255 19.499 9.30193 19.4188 9.12695 19.2734C8.95223 19.1282 8.83376 18.9265 8.79199 18.7031L7.76758 13.2852C7.69479 12.9001 7.50758 12.5457 7.23047 12.2686C6.95333 11.9914 6.59897 11.8042 6.21387 11.7314L0.795898 10.707C0.572543 10.6652 0.370818 10.5468 0.225586 10.3721C0.0802577 10.1971 0 9.97649 0 9.74902C0.0000266713 9.5216 0.0802821 9.30093 0.225586 9.12598C0.370819 8.95127 0.572584 8.83281 0.795898 8.79102L6.21387 7.7666C6.59899 7.69383 6.95333 7.50664 7.23047 7.22949C7.50761 6.95234 7.69482 6.59803 7.76758 6.21289L8.79199 0.794922C8.8338 0.571608 8.95223 0.369831 9.12695 0.224609C9.30193 0.0792926 9.52255 0.000012463 9.75 0Z",fill:"currentColor"})}))},q="M16.5521 0C17.4413 0.000286519 18.2931 0.354492 18.9219 0.983236L24.3929 6.45199C25.0219 7.08078 25.3747 7.93354 25.375 8.82292V16.5521C25.3747 17.4413 25.0205 18.2931 24.3918 18.9219L18.923 24.3929L18.9219 24.3918C18.2931 25.0205 17.4413 25.3747 16.5521 25.375H8.82292C7.93354 25.3747 7.08078 25.0207 6.45199 24.3918L0.982096 18.923L0.983236 18.9219C0.354492 18.2931 0.000286519 17.4413 0 16.5521V8.82292C0.000286578 7.93354 0.35425 7.08078 0.983236 6.45199L6.45199 0.982096C7.08078 0.353111 7.93354 0.000286578 8.82292 0H16.5521ZM12.6875 16.0998C11.9948 16.0998 11.4331 16.6615 11.4331 17.3542C11.4331 18.0468 11.9948 18.6086 12.6875 18.6086H12.6989C13.3915 18.6086 13.9533 18.0468 13.9533 17.3542C13.9533 16.6615 13.3915 16.0998 12.6989 16.0998H12.6875ZM12.6875 6.76644C11.9948 6.76644 11.4331 7.32818 11.4331 8.02083V12.6875C11.4331 13.3802 11.9948 13.9419 12.6875 13.9419C13.3802 13.9419 13.9419 13.3802 13.9419 12.6875V8.02083C13.9419 7.32818 13.3802 6.76644 12.6875 6.76644Z",X=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c)(7);return u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{transform:"translate(".concat(1.3125," ").concat(1.3125,")"),fillRule:"evenodd",clipRule:"evenodd",d:q,f
1ill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==n?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 ".concat(28," ").concat(28),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},t),{children:a})),u[4]=t,u[5]=n,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:t,height:t,viewBox:"0 0 ".concat(28," ").concat(28),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},n),{children:(0,i.Y)("path",{transform:"translate(".concat(1.3125," ").concat(1.3125,")"),fillRule:"evenodd",clipRule:"evenodd",d:q,fill:"currentColor"})}))},Z=(24-19.7502)/2,$="M9.875 0C11.8281 0 13.7374 0.578997 15.3613 1.66406C16.9852 2.74907 18.2506 4.29143 18.998 6.0957C19.7455 7.90012 19.9416 9.8862 19.5605 11.8018C19.1795 13.7173 18.2384 15.4764 16.8574 16.8574C15.4764 18.2384 13.7173 19.1795 11.8018 19.5605C9.8862 19.9416 7.90012 19.7455 6.0957 18.998C4.29143 18.2506 2.74907 16.9852 1.66406 15.3613C0.578997 13.7374 0 11.8281 0 9.875C0 9.39175 0.391751 9 0.875 9C1.35825 9 1.75 9.39175 1.75 9.875C1.75 11.4818 2.22649 13.0526 3.11914 14.3887C4.01193 15.7248 5.28098 16.7669 6.76562 17.3818C8.25022 17.9968 9.88392 18.1572 11.46 17.8438C13.0361 17.5302 14.4838 16.7564 15.6201 15.6201C16.7564 14.4838 17.5302 13.0361 17.8438 11.46C18.1572 9.88392 17.9968 8.25022 17.3818 6.76562C16.7669 5.28098 15.7248 4.01193 14.3887 3.11914C13.0529 2.22667 11.4825 1.75019 9.87598 1.75C7.58656 1.75921 5.38923 2.65284 3.74316 4.24414L2.9873 5H5.875C6.35825 5 6.75 5.39175 6.75 5.875C6.75 6.35825 6.35825 6.75 5.875 6.75H0.875C0.817019 6.75 0.759208 6.74385 0.702148 6.73242C0.694617 6.73091 0.687148 6.72924 0.679688 6.72754C0.631825 6.71664 0.584891 6.70164 0.539062 6.68262C0.52989 6.6788 0.52073 6.67502 0.511719 6.6709C0.419111 6.62869 0.332012 6.57029 0.255859 6.49414C0.174578 6.41286 0.112925 6.31939 0.0703125 6.21973C0.0689315 6.21651 0.0677496 6.2132 0.0664062 6.20996C0.0221647 6.10292 0 5.98906 0 5.875V0.875C0 0.391751 0.391751 0 0.875 0C1.35825 0 1.75 0.391751 1.75 0.875V3.76172L2.52637 2.98633C4.49768 1.08061 7.13022 0.0103145 9.87207 0H9.875Z",W=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c)(7);return u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{transform:"translate(".concat(Z," ").concat(Z,")"),d:$,fill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==n?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 ".concat(24," ").concat(24),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},t),{children:a})),u[4]=t,u[5]=n,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:t,height:t,viewBox:"0 0 ".concat(24," ").concat(24),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},n),{children:(0,i.Y)("path",{transform:"translate(".concat(Z," ").concat(Z,")"),d:$,fill:"currentColor"})}))},G=(20-13.1246)/2,J="M6.56285 0C6.96554 0.0000253395 7.29202 0.326475 7.29202 0.729167V10.6348L11.8802 6.04655C12.165 5.76182 12.6274 5.7618 12.9121 6.04655C13.1969 6.3313 13.1969 6.7937 12.9121 7.07845L7.0788 12.9118C7.01517 12.9754 6.94218 13.0239 6.86477 13.0591C6.85726 13.0625 6.84964 13.0657 6.84199 13.0688C6.80377 13.0847 6.76471 13.0972 6.7248 13.1063C6.71858 13.1077 6.71236 13.1091 6.70608 13.1104C6.61123 13.1293 6.51365 13.1293 6.41881 13.1104C6.41169 13.1089 6.40469 13.1071 6.39765 13.1055C6.38074 13.1016 6.36385 13.0976 6.34719 13.0924C6.34334 13.0913 6.33963 13.0896 6.3358 13.0884C6.23024 13.0539 6.13074 12.9956 6.0469 12.9118L0.213568 7.07845C-0.0711893 6.79369 -0.0711893 6.33131 0.213568 6.04655C0.498327 5.76182 0.960719 5.7618 1.24547 6.04655L5.83368 10.6348V0.729167C5.83368 0.326459 6.16014 0 6.56285 0Z",Q="M8.75 0C13.582 0 17.5 3.918 17.5 8.75C17.5 10.7891 16.7188 12.6406 15.4531 14.0078L19.707 18.2617C20.0977 18.6523 20.0977 19.2852 19.707 19.6758C19.3164 20.0664 18.6836 20.0664 18.293 19.6758L14.0391 15.4219C12.6719 16.6875 10.8203 17.4688 8.78125 17.4688C3.94922 17.4688 0.03125 13.5508 0.03125 8.71875C0.03125 3.88672 3.94922 0 8.78125 0H8.75ZM8.75 2.5C5.29688 2.5 2.5 5.29688 2.5 8.75C2.5 12.2031 5.29688 15 8.75 15C12.2031 15 15 12.2031 15 8.75C15 5.29688 12.2031 2.5 8.75 2.5Z",ee=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c
1)(7);return u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{d:Q,fill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==n?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},t),{children:a})),u[4]=t,u[5]=n,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},n),{children:(0,i.Y)("path",{d:Q,fill:"currentColor"})}))},et=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c)(7);return u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]),u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{transform:"translate(".concat(3.43715," ").concat(G,")"),d:J,fill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==n?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 ".concat(20," ").concat(20),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},t),{children:a})),u[4]=t,u[5]=n,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:t,height:t,viewBox:"0 0 ".concat(20," ").concat(20),fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block"},n),{children:(0,i.Y)("path",{transform:"translate(".concat(3.43715," ").concat(G,")"),d:J,fill:"currentColor"})}))},en=(0,s.F)()?function(e){var t,n,a,r,o,l,s=(0,c.c)(13),u=e.message,f=e.retryLabel,m=e.onRetry,p=(0,d.Bd)("buyer-chat-assistant").t;s[0]!==f||s[1]!==p?(t=null!=f?f:p("try-again",null,{fallback:"Try again"}),s[0]=f,s[1]=p,s[2]=t):t=s[2];var h=t;return s[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.Y)(X,{size:28,className:"size-[28px] shrink-0"}),s[3]=n):n=s[3],s[4]!==u?(a=(0,i.FD)("div",{className:"flex w-full flex-col items-center gap-turbo-10",children:[n,(0,i.Y)("p",{className:"m-0 w-full text-center text-turbo-body-base leading-turbo-regular font-turbo-regular tracking-turbo-regular",children:u})]}),s[4]=u,s[5]=a):a=s[5],s[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.Y)(W,{size:16,className:"size-turbo-16 shrink-0"}),s[6]=r):r=s[6],s[7]!==m||s[8]!==h?(o=(0,i.FD)(A,{variant:"retry",onPress:m,children:[r,h]}),s[7]=m,s[8]=h,s[9]=o):o=s[9],s[10]!==a||s[11]!==o?(l=(0,i.FD)("div",{role:"alert",className:"flex flex-col items-center gap-turbo-20 overflow-clip rounded-turbo-l bg-turbo-container-accent-muted-disabled p-turbo-16 text-turbo-content-default",children:[a,o]}),s[10]=a,s[11]=o,s[12]=l):l=s[12],l}:function(e){var t=e.message,n=e.retryLabel,a=e.onRetry,r=(0,d.Bd)("buyer-chat-assistant").t,o=null!=n?n:r("try-again",null,{fallback:"Try again"});return(0,i.FD)("div",{role:"alert",className:"flex flex-col items-center gap-turbo-20 overflow-clip rounded-turbo-l bg-turbo-container-accent-muted-disabled p-turbo-16 text-turbo-content-default",children:[(0,i.FD)("div",{className:"flex w-full flex-col items-center gap-turbo-10",children:[(0,i.Y)(X,{size:28,className:"size-[28px] shrink-0"}),(0,i.Y)("p",{className:"m-0 w-full text-center text-turbo-body-base leading-turbo-regular font-turbo-regular tracking-turbo-regular",children:t})]}),(0,i.FD)(A,{variant:"retry",onPress:a,children:[(0,i.Y)(W,{size:16,className:"size-turbo-16 shrink-0"}),o]})]})},ea=n(542835),er=n(289621),eo=n(413237),el=(0,s.F)()?function(e){var t,n,a,l,s=(0,c.c)(5);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)("path",{fill:"currentColor",d:"M12.01 15.13a.88.88 0 0 1 0 1.74H12a.88.88 0 0 1 0-1.75z"}),n=(0,i.Y)("path",{fill:"currentColor",d:"M12 7.13c.48 0 .88.39.88.87v4a.88.88 0 0 1-1.76 0V8c0-.48.4-.87.88-.87"}),a=(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1.13a10.87 10.87 0 1 1 0 21.74 10.87 10.87 0 0 1 0-21.74m0 1.75a9.12 9.12 0 1 0 0 18.24 9.12 9.12 0 0 0 0-18.24",clipRule:"evenodd"}),s[0]=t,s[1]=n,s[2]=a):(t=s[0],n=s[1],a=s[2]),s[3]!==e?(l=(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n,a]})),s[3]=e,s[4]=l):l=s[4],l}:function(e){return(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,i.Y)("path",{fill:"currentColor",d:"M12.01 15.13a.88.88 0 0 1 0 1.74H12a.88.88 0 0 1 0-1.75z"}),(0,i.Y)("path",{fill:"currentColor",d:"M12 7.13c.48 0 .88.39.88.87v4a.88.88 0 0 1-1.76 0V8c0-.48.4-.87.88-.87"}),(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1.13a10.87 10.87 0 1 1 0 21.74 10.87 10.87 0 0 1 0-21.74m0 1.75
1a9.12 9.12 0 1 0 0 18.24 9.12 9.12 0 0 0 0-18.24",clipRule:"evenodd"})]}))},ei=(0,eo.w)(el,"AlertCircleIcon"),es=n(170412);function ec(e){var t=e.trim();return t.length>0&&t.length<=500}var eu=Math.ceil(22.4);function ed(e){var t=Math.max(e,eu);return{height:Math.min(t,132),overflowY:t>132?"auto":"hidden"}}function ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||t.includes("\n")||e>eu}var em="M6.49992 0L6.60246 0.00488281C6.62357 0.00703397 6.64427 0.0112056 6.66496 0.0146484C6.67505 0.016329 6.6852 0.0175407 6.69524 0.0195313C6.70775 0.0220113 6.72001 0.025378 6.73235 0.0283203C6.75191 0.0329813 6.77163 0.0371146 6.79094 0.0429688C6.81052 0.0489175 6.82951 0.0563791 6.84856 0.0634766C6.8583 0.0670971 6.86821 0.0702842 6.87785 0.0742188C6.89341 0.080576 6.9086 0.0876201 6.92375 0.0947266C6.96845 0.115653 7.01181 0.140063 7.05364 0.167969C7.10874 0.204718 7.1603 0.246305 7.20696 0.292969L12.707 5.79297C13.0975 6.18349 13.0975 6.81652 12.707 7.20703C12.3164 7.59755 11.6834 7.59753 11.2929 7.20703L7.49992 3.41406V16C7.49992 16.5522 7.05216 16.9999 6.49992 17C5.94764 17 5.49992 16.5523 5.49992 16V3.41406L1.70696 7.20703C1.31644 7.59755 0.68342 7.59753 0.292894 7.20703C-0.0976312 6.81651 -0.0976312 6.18349 0.292894 5.79297L5.79289 0.292969C5.86105 0.224823 5.93889 0.166388 6.02434 0.120117C6.03808 0.112682 6.05233 0.106354 6.06633 0.0996094C6.1116 0.0777735 6.1582 0.0578687 6.20696 0.0429688C6.22723 0.0367824 6.24793 0.0322136 6.26848 0.0273438C6.27983 0.0246552 6.29117 0.0218295 6.30266 0.0195313L6.30852 0.0185547L6.39739 0.00488281C6.43105 0.00145862 6.46535 -1.5111e-09 6.49992 0Z",ep="M15.8333 2.5H4.16667C3.24619 2.5 2.5 3.24619 2.5 4.16667V15.8333C2.5 16.7538 3.24619 17.5 4.16667 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V4.16667C17.5 3.24619 16.7538 2.5 15.8333 2.5Z",eh=(0,T.F)(["overflow-clip bg-turbo-container-default","ring-1 ring-turbo-border-elevated focus-within:ring-[rgba(0,0,0,0.19)] forced-colors:[outline-style:solid] forced-colors:outline-1 forced-colors:outline-[ButtonText]","shadow-[0_16px_4.5px_0_rgba(0,0,0,0.01),0_7px_3.5px_0_rgba(0,0,0,0.02),0_2px_2px_0_rgba(0,0,0,0.02)]"],{variants:{expanded:{true:"flex flex-col gap-100 p-150",false:"flex h-turbo-64 items-center overflow-clip rounded-full pr-150"},variant:{chat:"","home-search":""},lineGap:{default:"gap-100",single:"gap-turbo-10"},padding:{default:"pl-300",single:"pl-turbo-20"}},compoundVariants:[{expanded:!0,variant:"chat",className:"rounded-turbo-xxxl"},{expanded:!0,variant:"home-search",className:"rounded-xl"}],defaultVariants:{expanded:!1,variant:"chat"}}),eb=(0,T.F)(["w-full resize-none overflow-y-hidden border-0 bg-transparent p-0","[font-family:inherit] text-turbo-body-base leading-turbo-regular font-turbo-regular tracking-turbo-regular","text-turbo-content-default transition-[height] duration-200 ease-out outline-none","placeholder:text-turbo-content-placeholder disabled:cursor-not-allowed disabled:opacity-60","motion-reduce:transition-none"],{variants:{pendingShimmer:{true:["caret-transparent motion-reduce:text-turbo-content-placeholder","motion-safe:animate-thinking-text-shimmer","motion-safe:bg-[linear-gradient(90deg,var(--color-turbo-content-placeholder)_0%,var(--color-turbo-content-default-disabled)_25%,var(--color-turbo-content-placeholder)_50%,var(--color-turbo-content-default-disabled)_75%,var(--color-turbo-content-placeholder)_100%)]","motion-safe:bg-size-[200%_100%] motion-safe:bg-local motion-safe:bg-clip-text","motion-safe:text-transparent motion-safe:[-webkit-text-fill-color:transparent]","motion-safe:[animation-duration:2.8s]"],false:""}},defaultVariants:{pendingShimmer:!1}}),ev=(0,s.F)()?function(){var e,t=(0,c.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 12.9998 17",width:13,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block",children:(0,i.Y)("path",{d:em,fill:"currentColor"})}),t[0]=e):e=t[0],e}:function(){return(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 12.9998 17",width:13,height:17,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block",children:(0,i.Y)("path",{d:em,fill:"currentColor"})})},eg=(0,s.F)()?function(){var e,t=(0,c.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 20 20",width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block",children:(0,i.Y)("path",{d:ep,fill:"currentColor"})}),t[0]=e):e=t[0],e}:function(){return(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 20 20",width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"block",children:(0,i.Y)("path",{d:ep,fill:"currentColor"})})},ey=(0,s.F)()?function(e){var t,n=(0,c.c)(2),a=e.children;return n[0]!==a?(t=(0,i.Y)("span",{className:"flex size-[20px] shrink-0 items-center justify-center overflow-clip",children:a}),n[0]=a,n[1]=t):t=n[1],t}:function(e){var t=e.children;return(0,i.Y)("span",{className:"flex size-[20px] shrink-0 items-center justify-center overflow-clip",children:t})},ex=(0,s.F)()?function(e){var t,n,a=(0,c.c)(2);return"home-search"===e.variant?(a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)(ei,{"aria-hidden":!0,size:16}),a[0]=t):t=a[0],t):(a[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.Y)(ea.A,{size:"icon-small","aria-hidden":!0,
1color:"text-turbo-content-error"}),a[1]=n):n=a[1],n)}:function(e){return"home-search"===e.variant?(0,i.Y)(ei,{"aria-hidden":!0,size:16}):(0,i.Y)(ea.A,{size:"icon-small","aria-hidden":!0,color:"text-turbo-content-error"})};function eC(e){var t=ed(eu),n=t.height,a=t.overflowY;e.style.height="".concat(n,"px"),e.style.overflowY=a}function ew(e){var t=e.style.height;e.style.height="auto";var n=ed(e.scrollHeight),a=n.height,r=n.overflowY;return t&&(e.style.height=t,e.getBoundingClientRect()),e.style.height="".concat(a,"px"),e.style.overflowY=r,a}function e_(e){e.currentTarget!==document.activeElement&&(e.preventDefault(),e.currentTarget.focus({preventScroll:!0}))}var ek=(0,s.F)()?function(e){var t,n,a,o,l,s,m,p,h,b,v,g,y,x,C,w,_,k,Y,S,F,N,L,R,T,z,D,A,I=(0,c.c)(95),E=e.defaultValue,M=e.leadingIcon,B=e.placeholder,j=e.sendLabel,P=e.loadingLabel,H=e.stopLabel,O=e.loading,V=e.variant,U=e.loadingAffordance,K=e.onSend,q=e.onValueChange,X=e.onFocus,Z=e.onBlur,$=e.preventFocusScroll,W=e.textareaRef,G=e.onStopClick,J=e.onCharacterLimitReached,Q=void 0!==O&&O,ee=void 0===V?"chat":V,et=void 0===U?"stop":U,en=(0,d.Bd)("buyer-chat-assistant").t;I[0]!==B||I[1]!==en?(t=null!=B?B:en("describe-your-needs",null,{fallback:"Describe your needs"}),I[0]=B,I[1]=en,I[2]=t):t=I[2];var ea=t;I[3]!==j||I[4]!==en?(n=null!=j?j:en("send-message",null,{fallback:"Send message"}),I[3]=j,I[4]=en,I[5]=n):n=I[5];var eo=n;I[6]!==P||I[7]!==en?(a=null!=P?P:en("loading-response",null,{fallback:"AI is responding"}),I[6]=P,I[7]=en,I[8]=a):a=I[8];var el=a;I[9]!==H||I[10]!==en?(o=null!=H?H:en("stop-generating",null,{fallback:"Stop generating"}),I[9]=H,I[10]=en,I[11]=o):o=I[11];var ei=o,eu=(0,u._)((0,f.useState)(void 0===E?"":E),2),ed=eu[0],em=eu[1],ep=(0,u._)((0,f.useState)(!1),2),ek=ep[0],eY=ep[1],eS=(0,f.useRef)(null),eF=(0,f.useId)();I[12]!==ed?(l=ed.trim(),I[12]=ed,I[13]=l):l=I[13];var eN=l.length,eL=eN>=460,eR=eN>500;I[14]!==Q||I[15]!==ed?(s=ec(ed)&&!Q,I[14]=Q,I[15]=ed,I[16]=s):s=I[16];var eT=s,ez=ek||eL;I[17]!==eR||I[18]!==en||I[19]!==eN?(m=eR?en("character-limit-exceeded",{count:eN,max:500},{fallback:"".concat(eN," of ").concat(500," characters â limit exceeded")}):void 0,I[17]=eR,I[18]=en,I[19]=eN,I[20]=m):m=I[20];var eD=m;I[21]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{var e=eS.current;if(null==e?void 0:e.value){var t=ew(e);eY(n=>ef(t,e.value,n))}},I[21]=p):p=I[21],I[22]!==ez?(h=[ez],I[22]=ez,I[23]=h):h=I[23],(0,f.useLayoutEffect)(p,h);var eA=(0,f.useRef)(!1);I[24]!==W?(b=e=>{if(eS.current=e,W&&(W.current=e),e){if(e.value)return void ew(e);eC(e)}},I[24]=W,I[25]=b):b=I[25];var eI=b;I[26]!==Q||I[27]!==et||I[28]!==K||I[29]!==q||I[30]!==ed?(v=()=>{var e=ed.trim();if(ec(ed)&&!Q&&(K(e),"pending"!==et)){em(""),null==q||q(""),eY(!1);var t=eS.current;t&&eC(t)}},I[26]=Q,I[27]=et,I[28]=K,I[29]=q,I[30]=ed,I[31]=v):v=I[31];var eE=v;I[32]!==J||I[33]!==q?(g=e=>{var t=e.currentTarget,n=t.value;if(!n){eC(t),em(""),null==q||q(""),eY(!1),eA.current=!1;return}var a=n.trim().length>500;a&&!eA.current&&(null==J||J()),eA.current=a;var r=ew(t);em(n),null==q||q(n),eY(e=>ef(r,n,e))},I[32]=J,I[33]=q,I[34]=g):g=I[34];var eM=g;I[35]!==eE?(y=e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),eE())},I[35]=eE,I[36]=y):y=I[36];var eB=y,ej=(0,f.useRef)(!1);I[37]!==ed?(x=()=>{if(ej.current){ej.current=!1;var e=eS.current;(null==e?void 0:e.value)&&eY(ef(ew(e),ed))}},C=[ed],I[37]=ed,I[38]=x,I[39]=C):(x=I[38],C=I[39]),(0,f.useLayoutEffect)(x,C),I[40]!==G||I[41]!==q?(w=()=>{var e=null==G?void 0:G();e&&(ej.current=!0,em(e),null==q||q(e))},I[40]=G,I[41]=q,I[42]=w):w=I[42];var eP=w;I[43]===Symbol.for("react.memo_cache_sentinel")?(_=(0,i.Y)(ey,{children:(0,i.Y)(eg,{})}),I[43]=_):_=I[43],I[44]!==eP||I[45]!==ei?(k=(0,i.Y)("button",{type:"button",className:"flex size-500 shrink-0 cursor-pointer items-center justify-center rounded-full border-none bg-turbo-container-muted p-0 text-turbo-content-default","aria-label":ei,onClick:eP,children:_}),I[44]=eP,I[45]=ei,I[46]=k):k=I[46];var eH=k,eO=Q&&"pending"===et,eV=eO&&!!ed,eU=null!=eo?eo:"Send message";Q&&(eU=null!=el?el:"AI is responding");var eK="home-search"===ee;I[47]!==eK?(Y=(0,es.A)("size-500 min-h-500! min-w-500! shrink-0 rounded-full! p-0! text-turbo-content-on-accent shadow-[inset_0_0_0_0_var(--color-turbo-state-accent-hover)] transition-shadow data-[disabled]:!text-turbo-content-default-disabled data-[hovered]:shadow-[inset_0_0_0_9999px_var(--color-turbo-state-accent-hover)] data-[pressed]:!scale-100",{"home-search-send-pending":eK}),I[47]=eK,I[48]=Y):Y=I[48],I[49]===Symbol.for("react.memo_cache_sentinel")?(S=(0,i.Y)(ey,{
1children:(0,i.Y)(ev,{})}),I[49]=S):S=I[49];var eq=!eT&&!eO;I[50]!==eU||I[51]!==eE||I[52]!==eO||I[53]!==Y||I[54]!==eq?(F=(0,i.Y)(er.$,{variant:"accent",size:"small",layout:"icon-only",className:Y,"aria-label":eU,icon:S,loading:eO,disabled:eq,onClick:eE}),I[50]=eU,I[51]=eE,I[52]=eO,I[53]=Y,I[54]=eq,I[55]=F):F=I[55];var eX=F;Q&&"stop"===et&&(eX=eH);var eZ=M?"single":"default";I[56]!==eZ||I[57]!==ez||I[58]!==ee?(N=eh((0,r._)({expanded:ez,variant:ee},!ez&&{lineGap:eZ,padding:eZ})),I[56]=eZ,I[57]=ez,I[58]=ee,I[59]=N):N=I[59],I[60]!==M||I[61]!==ez?(L=!ez&&M?(0,i.Y)("span",{className:"flex size-[20px] shrink-0 items-center justify-center text-turbo-content-muted",children:M}):null,I[60]=M,I[61]=ez,I[62]=L):L=I[62];var e$=ez?"w-full p-100":"flex min-h-0 min-w-0 flex-1 items-center";I[63]!==eV?(R=eb({pendingShimmer:eV}),I[63]=eV,I[64]=R):R=I[64];var eW=!!eR||void 0,eG=eL?eF:void 0,eJ=void 0!==$&&$?e_:void 0;return I[65]!==eM||I[66]!==eB||I[67]!==Q||I[68]!==Z||I[69]!==X||I[70]!==ea||I[71]!==eI||I[72]!==R||I[73]!==eW||I[74]!==eG||I[75]!==eJ||I[76]!==ed?(T=(0,i.Y)("textarea",{name:"buyer-chat-assistant-input",ref:eI,rows:1,className:R,placeholder:ea,value:ed,readOnly:Q,"aria-label":ea,"aria-invalid":eW,"aria-describedby":eG,onChange:eM,onKeyDown:eB,onPointerDown:eJ,onFocus:X,onBlur:Z}),I[65]=eM,I[66]=eB,I[67]=Q,I[68]=Z,I[69]=X,I[70]=ea,I[71]=eI,I[72]=R,I[73]=eW,I[74]=eG,I[75]=eJ,I[76]=ed,I[77]=T):T=I[77],I[78]!==e$||I[79]!==T?(z=(0,i.Y)("div",{className:e$,children:T}),I[78]=e$,I[79]=T,I[80]=z):z=I[80],I[81]!==eX||I[82]!==eD||I[83]!==eF||I[84]!==eR||I[85]!==eL||I[86]!==eN||I[87]!==ez||I[88]!==ee?(D=ez?(0,i.FD)("div",{className:"flex w-full items-center gap-200 pl-100",children:[eL?(0,i.FD)("div",{id:eF,"aria-live":"polite","aria-label":eD,className:"flex min-w-0 flex-1 items-center gap-[6px] text-turbo-body-small leading-turbo-regular font-turbo-regular tracking-turbo-regular ".concat(eR?"text-turbo-content-error":"text-turbo-content-placeholder"),children:[eR?(0,i.Y)(ex,{variant:ee}):null,(0,i.FD)("span",{className:"truncate",children:[eN,"/",500]})]}):(0,i.Y)("div",{className:"min-w-0 flex-1"}),eX]}):eX,I[81]=eX,I[82]=eD,I[83]=eF,I[84]=eR,I[85]=eL,I[86]=eN,I[87]=ez,I[88]=ee,I[89]=D):D=I[89],I[90]!==N||I[91]!==L||I[92]!==z||I[93]!==D?(A=(0,i.FD)("div",{className:N,children:[L,z,D]}),I[90]=N,I[91]=L,I[92]=z,I[93]=D,I[94]=A):A=I[94],A}:function(e){var t=e.defaultValue,n=e.leadingIcon,a=e.placeholder,o=e.sendLabel,l=e.loadingLabel,s=e.stopLabel,c=e.loading,m=void 0!==c&&c,p=e.variant,h=void 0===p?"chat":p,b=e.loadingAffordance,v=void 0===b?"stop":b,g=e.onSend,y=e.onValueChange,x=e.onFocus,C=e.onBlur,w=e.preventFocusScroll,_=e.textareaRef,k=e.onStopClick,Y=e.onCharacterLimitReached,S=(0,d.Bd)("buyer-chat-assistant").t,F=null!=a?a:S("describe-your-needs",null,{fallback:"Describe your needs"}),N=null!=o?o:S("send-message",null,{fallback:"Send message"}),L=null!=l?l:S("loading-response",null,{fallback:"AI is responding"}),R=null!=s?s:S("stop-generating",null,{fallback:"Stop generating"}),T=(0,u._)((0,f.useState)(void 0===t?"":t),2),z=T[0],D=T[1],A=(0,u._)((0,f.useState)(!1),2),I=A[0],E=A[1],M=(0,f.useRef)(null),B=(0,f.useId)(),j=z.trim().length,P=j>=460,H=j>500,O=ec(z)&&!m,V=I||P,U=H?S("character-limit-exceeded",{count:j,max:500},{fallback:"".concat(j," of ").concat(500," characters â limit exceeded")}):void 0;(0,f.useLayoutEffect)(()=>{var e=M.current;if(null==e?void 0:e.value){var t=ew(e);E(n=>ef(t,e.value,n))}},[V]);var K=(0,f.useRef)(!1),q=(0,f.useCallback)(e=>{if(M.current=e,_&&(_.current=e),e){if(e.value)return void ew(e);eC(e)}},[_]),X=(0,f.useCallback)(()=>{var e=z.trim();if(ec(z)&&!m&&(g(e),"pending"!==v)){D(""),null==y||y(""),E(!1);var t=M.current;t&&eC(t)}},[m,v,g,y,z]),Z=(0,f.useCallback)(e=>{var t=e.currentTarget,n=t.value;if(!n){eC(t),D(""),null==y||y(""),E(!1),K.current=!1;return}var a=n.trim().length>500;a&&!K.current&&(null==Y||Y()),K.current=a;var r=ew(t);D(n),null==y||y(n),E(e=>ef(r,n,e))},[Y,y]),$=(0,f.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),X())},[X]),W=(0,f.useRef)(!1);(0,f.useLayoutEffect)(()=>
1{if(W.current){W.current=!1;var e=M.current;(null==e?void 0:e.value)&&E(ef(ew(e),z))}},[z]);var G=(0,f.useCallback)(()=>{var e=null==k?void 0:k();e&&(W.current=!0,D(e),null==y||y(e))},[k,y]),J=(0,i.Y)("button",{type:"button",className:"flex size-500 shrink-0 cursor-pointer items-center justify-center rounded-full border-none bg-turbo-container-muted p-0 text-turbo-content-default","aria-label":R,onClick:G,children:(0,i.Y)(ey,{children:(0,i.Y)(eg,{})})}),Q=m&&"pending"===v,ee=Q&&!!z,et=null!=N?N:"Send message";m&&(et=null!=L?L:"AI is responding");var en=(0,i.Y)(er.$,{variant:"accent",size:"small",layout:"icon-only",className:(0,es.A)("size-500 min-h-500! min-w-500! shrink-0 rounded-full! p-0! text-turbo-content-on-accent shadow-[inset_0_0_0_0_var(--color-turbo-state-accent-hover)] transition-shadow data-[disabled]:!text-turbo-content-default-disabled data-[hovered]:shadow-[inset_0_0_0_9999px_var(--color-turbo-state-accent-hover)] data-[pressed]:!scale-100",{"home-search-send-pending":"home-search"===h}),"aria-label":et,icon:(0,i.Y)(ey,{children:(0,i.Y)(ev,{})}),loading:Q,disabled:!O&&!Q,onClick:X});m&&"stop"===v&&(en=J);var ea=n?"single":"default";return(0,i.FD)("div",{className:eh((0,r._)({expanded:V,variant:h},!V&&{lineGap:ea,padding:ea})),children:[!V&&n?(0,i.Y)("span",{className:"flex size-[20px] shrink-0 items-center justify-center text-turbo-content-muted",children:n}):null,(0,i.Y)("div",{className:V?"w-full p-100":"flex min-h-0 min-w-0 flex-1 items-center",children:(0,i.Y)("textarea",{name:"buyer-chat-assistant-input",ref:q,rows:1,className:eb({pendingShimmer:ee}),placeholder:F,value:z,readOnly:m,"aria-label":F,"aria-invalid":!!H||void 0,"aria-describedby":P?B:void 0,onChange:Z,onKeyDown:$,onPointerDown:void 0!==w&&w?e_:void 0,onFocus:x,onBlur:C})}),V?(0,i.FD)("div",{className:"flex w-full items-center gap-200 pl-100",children:[P?(0,i.FD)("div",{id:B,"aria-live":"polite","aria-label":U,className:"flex min-w-0 flex-1 items-center gap-[6px] text-turbo-body-small leading-turbo-regular font-turbo-regular tracking-turbo-regular ".concat(H?"text-turbo-content-error":"text-turbo-content-placeholder"),children:[H?(0,i.Y)(ex,{variant:h}):null,(0,i.FD)("span",{className:"truncate",children:[j,"/",500]})]}):(0,i.Y)("div",{className:"min-w-0 flex-1"}),en]}):en]})},eY=n(647418),eS=["p","strong","em","ul","ol","li","br"],eF={p:e=>{var t=e.children;return(0,i.Y)("p",{className:"m-0",children:t})},strong:e=>{var t=e.children;return(0,i.Y)("strong",{className:"font-turbo-semibold",children:t})},ul:e=>{var t=e.children;return(0,i.Y)("ul",{className:"m-0 list-disc pl-300",children:t})},ol:e=>{var t=e.children;return(0,i.Y)("ol",{className:"m-0 list-decimal pl-300",children:t})},li:e=>{var t=e.children;return(0,i.Y)("li",{className:"mb-0.5 last:mb-0",children:t})}},eN=(0,f.memo)((0,s.F)()?function(e){var t,n=(0,c.c)(2),a=e.content;return n[0]!==a?(t=(0,i.Y)("div",{className:"flex max-w-full flex-col gap-[14px] text-body-base leading-wide tracking-regular wrap-break-word text-foreground-primary",children:(0,i.Y)(eY.oz,{allowedElements:eS,unwrapDisallowed:!0,skipHtml:!0,components:eF,children:a})}),n[0]=a,n[1]=t):t=n[1],t}:function(e){var t=e.content;return(0,i.Y)("div",{className:"flex max-w-full flex-col gap-[14px] text-body-base leading-wide tracking-regular wrap-break-word text-foreground-primary",children:(0,i.Y)(eY.oz,{allowedElements:eS,unwrapDisallowed:!0,skipHtml:!0,components:eF,children:t})})}),eL=(0,s.F)()?function(e){var t,n,a,r,o,l=(0,c.c)(20),s=e.message,u=e.contentClassName,f=(0,d.Bd)("buyer-chat-assistant").t;if("user"===s.role){var m,p,h,b,v=null!=(m=s.displayContent)?m:s.content;l[0]!==f?(p=f("message-from-you",null,{fallback:"You:"}),l[0]=f,l[1]=p):p=l[1];var g=p;return l[2]!==g?(h=(0,i.Y)("span",{className:"sr-only",children:g}),l[2]=g,l[3]=h):h=l[3],l[4]!==h||l[5]!==v?(b=(0,i.Y)("div",{className:"flex w-full flex-col items-end pl-[32px]",children:(0,i.FD)("div",{className:"max-w-full rounded-large rounded-br-small bg-background-accent-subtle px-200 py-[14px] text-body-base leading-wide tracking-regular wrap-break-word text-foreground-primary",children:[h,v]})}),l[4]=h,l[5]=v,l[6]=b):b=l[6],b}l[7]!==f?(t=f("message-from-assistant",null,{fallback:"Assistant:"}),l[7]=f,l[8]=t):t=l[8];var y=t;return l[9]!==y?(n=(0,i.Y)("span",{className:"sr-only",children:y}),l[9]=y,l[10]=n):n=l[10],l[11]!==s.content?(a=(0,i.Y)(eN,{content:s.content}
1),l[11]=s.content,l[12]=a):a=l[12],l[13]!==u||l[14]!==a?(r=(0,i.Y)("div",{"data-testid":"chat-message-assistant-content",className:u,children:a}),l[13]=u,l[14]=a,l[15]=r):r=l[15],l[16]!==s.id||l[17]!==n||l[18]!==r?(o=(0,i.FD)("div",{"data-testid":"chat-message-assistant","data-message-id":s.id,children:[n,r]}),l[16]=s.id,l[17]=n,l[18]=r,l[19]=o):o=l[19],o}:function(e){var t=e.message,n=e.contentClassName,a=(0,d.Bd)("buyer-chat-assistant").t;if("user"===t.role){var r,o=null!=(r=t.displayContent)?r:t.content,l=a("message-from-you",null,{fallback:"You:"});return(0,i.Y)("div",{className:"flex w-full flex-col items-end pl-[32px]",children:(0,i.FD)("div",{className:"max-w-full rounded-large rounded-br-small bg-background-accent-subtle px-200 py-[14px] text-body-base leading-wide tracking-regular wrap-break-word text-foreground-primary",children:[(0,i.Y)("span",{className:"sr-only",children:l}),o]})})}var s=a("message-from-assistant",null,{fallback:"Assistant:"});return(0,i.FD)("div",{"data-testid":"chat-message-assistant","data-message-id":t.id,children:[(0,i.Y)("span",{className:"sr-only",children:s}),(0,i.Y)("div",{"data-testid":"chat-message-assistant-content",className:n,children:(0,i.Y)(eN,{content:t.content})})]})},eR=(0,T.F)("m-0 text-center font-primary",{variants:{variant:{panel:"mt-150 px-200 text-body-extra-small leading-body-extra-small font-regular tracking-wide text-foreground-secondary",compact:"mt-turbo-10 text-turbo-footnote leading-turbo-regular font-turbo-regular tracking-turbo-regular text-turbo-content-muted"}},defaultVariants:{variant:"panel"}}),eT=(0,s.F)()?function(e){var t,n,a,r=(0,c.c)(7),o=e.privacyPolicyUrl,l=e.variant;return o?(r[0]!==l?(t=eR({variant:l}),r[0]=l,r[1]=t):t=r[1],r[2]!==o?(n=(0,i.Y)(d.x6,{i18nKey:"buyer-chat-assistant:privacy-policy-notice",components:{link:(0,i.Y)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-inherit underline decoration-solid"})}}),r[2]=o,r[3]=n):n=r[3],r[4]!==t||r[5]!==n?(a=(0,i.Y)("p",{className:t,"data-testid":"chat-panel-privacy-policy",children:n}),r[4]=t,r[5]=n,r[6]=a):a=r[6],a):null}:function(e){var t=e.privacyPolicyUrl,n=e.variant;return t?(0,i.Y)("p",{className:eR({variant:n}),"data-testid":"chat-panel-privacy-policy",children:(0,i.Y)(d.x6,{i18nKey:"buyer-chat-assistant:privacy-policy-notice",components:{link:(0,i.Y)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-inherit underline decoration-solid"})}})}):null},ez=(0,s.F)()?function(e){var t,n,a,r,o=(0,c.c)(14),l=e.chips,s=e.disabled,u=e.variant,f=e.onChipClick,m=void 0!==s&&s,p=(0,d.Bd)("buyer-chat-assistant").t;if(!l.length)return null;var h="entry"===(void 0===u?"default":u);o[0]!==p?(t=p("suggested-prompts-label",null,{fallback:"Suggestions for search"}),o[0]=p,o[1]=t):t=o[1];var b=t;return o[2]!==l||o[3]!==m||o[4]!==h||o[5]!==f?(o[7]!==m||o[8]!==h||o[9]!==f?(a=e=>(0,i.Y)("button",{type:"button",disabled:m,className:h?"font-normal inline-flex min-h-[40px] cursor-pointer items-center justify-center rounded-full border border-solid border-[color:var(--color-turbo-border-default,#d5dbde)] bg-[color:var(--color-turbo-container-default,#ffffff)] px-turbo-16 py-turbo-8 text-left text-[16px] leading-[1.25] tracking-[0] text-[color:var(--color-turbo-content-default,#242526)] transition-colors hover:border-[color:var(--color-turbo-border-strong,#242526)] disabled:cursor-not-allowed disabled:opacity-50":"inline-flex max-w-5/6 cursor-pointer rounded-full border border-border-medium bg-background-primary px-200 py-100 text-left text-body-small leading-body-small text-foreground-primary transition-colors hover:border-foreground-primary disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>f(e),children:e.label},e.label),o[7]=m,o[8]=h,o[9]=f,o[10]=a):a=o[10],n=l.map(a),o[2]=l,o[3]=m,o[4]=h,o[5]=f,o[6]=n):n=o[6],o[11]!==b||o[12]!==n?(r=(0,i.Y)("div",{role:"group","aria-label":b,className:"flex flex-col items-start gap-100",children:n}),o[11]=b,o[12]=n,o[13]=r):r=o[13],r}:function(e){var t=e.chips,n=e.disabled,a=void 0!==n&&n,r=e.variant,o=e.onChipClick,l=(0,d.Bd)("buyer-chat-assistant").t;if(!t.length)return null;var s="entry"===(void 0===r?"default":r),c=l("suggested-prompts-label",null,{fallback:"Suggestions for search"});return(0,i.Y)("div",{role:"group","aria-label":c,className:"flex flex-col items-start gap-100",children:t.map(e=>(0,i.Y)("button",{type:"button",disabled:a,className:s?"font-normal inline-flex min-h-[40px] cursor-pointer items-center justify-center rounded-full border border-solid border-[color:var(--color-turbo-border-default,#d5dbde)] bg-[color:var(--color-turbo-container-default,#ffffff)] px-turbo-16 py-turbo-8 text-left text-[16px] leading-[1.25] tracking-[0] text-[color:var(--color-turbo-content-default,#242526)] transition-colors hover:border-[color:var(--color-turbo-border-strong,#242526)] disabled:cursor-not-allowed disabled:opacity-50":"inline-flex max-w-5/6 cursor-pointer rounded-full border border-border-medium bg-background-primary px-200 py-100 text-left text-body-small leading-body-small text-foreground-primary transition-colors hover:border-foreground-primary disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>o(e),children:e.label},e.label))})},eD=(0,s.F)()?function(e){var t,n,a,r,o=(0,c.c)(10),l=e.message,s=e.tone,u=(0,d.Bd)("buyer-chat-assistant").t;o[0]!==l||o[1]!==u?(t=null!=l?l:u("thinking",null,{fallback:"Thinking"}),o[0]=l,o[1]=u,o[2]=t):t=o[2];var f=t,m="muted"===(void 0===s?"muted":s),p="flex items-center gap-turbo-8 text-turbo-body-base leading-turbo-regular tracking-turbo-regular ".concat(m?"text-turbo-content-muted":"text-turbo-content-default");o[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.Y)("span",{className:"inline-flex size-turbo-20 shrink-0 animate-spin items-center justify-center [animation-duration:1.6s] motion-reduce:animate-none","data-testid":"chat-panel-loading-icon",children:(0,i.Y)(K,{size:16})}),o[3]=n):n=o[3];var h="inline-block animate-thinking-text-shimmer bg-size-[200%_100%] bg-clip-text text-transparent [animation-duration:2.8s] motion-reduce:animate-none motion-reduce:bg-none ".concat(m?"bg-[linear-gradient(90deg,var(--color-turbo-content-muted)_0%,var(--color-turbo-content-default-disabled)_25%,var(--color-turbo-content-muted)_50%,var(--color-turbo-content-default-disabled)_75%,var(--color-turbo-content-muted)_100%)] motion-reduce:text-turbo-content-muted":"bg-[linear-gradient(90deg,var(--color-turbo-content-default)_0%,var(--color-turbo-content-placeholder)_25%,var(--color-turbo-content-default)_50%,var(--color-turbo-content-placeholder)_75%,var(--color-turbo-content-default)_100%)] motion-reduce:text-turbo-content-default");return o[4]!==f||o[5]!==h?(a=(0,i.Y)("span",{className:h,"data-testid":"chat-panel-loading-message",children:f}),o[4]=f,o[5]=h,o[6]=a):a=o[6],o[7]!==p||o[8]!==a?(r=(0,i.FD)("div",{className:p,role:"status","aria-live":"polite",children:[n,a]}),o[7]=p,o[8]=a,o[9]=r):r=o[9],r}:function(e){var t=e.message,n=e.tone,a=(0,d.Bd)("buyer-chat-assistant").t,r=null!=t?t:a("thinking",null,{fallback:"Thinking"}),o="muted"===(void 0===n?"muted":n);return(0,i.FD)("div",{className:"flex items-center gap-turbo-8 text-turbo-body-base leading-turbo-regular tracking-turbo-regular ".concat(o?"text-turbo-content-muted":"text-turbo-content-default"),role:"status","aria-live":"polite",children:[(0,i.Y)("span",{className:"inline-flex size-turbo-20 shrink-0 animate-spin items-center justify-center [animation-duration:1.6s] motion-reduce:animate-none","data-testid":"chat-panel-loading-icon",children:(0,i.Y)(K,{size:16})}),(0,i.Y)("span",{className:"inline-block animate-thinking-text-shimmer bg-size-[200%_100%] bg-clip-text text-transparent [animation-duration:2.8s] motion-reduce:animate-none motion-reduce:bg-none ".concat(o?"bg-[linear-gradient(90deg,var(--color-turbo-content-muted)_0%,var(--color-turbo-content-default-disabled)_25%,var(--color-turbo-content-muted)_50%,var(--color-turbo-content-default-disabled)_75%,var(--color-turbo-content-muted)_100%)] motion-reduce:text-turbo-content-muted":"bg-[linear-gradient(90deg,var(--color-turbo-content-default)_0%,var(--color-turbo-content-placeholder)_25%,var(--color-turbo-content-default)_50%,var(--color-turbo-content-placeholder)_75%,var(--color-turbo-content-default)_100%)] motion-reduce:text-turbo-content-default"),"data-testid":"chat-panel-loading-message",children:r})]})},eA=[],eI="[scrollbar-color:#d5dbde_transparent] [scrollbar-width:thin] forced-colors:[forced-color-adjust:auto] [&::-webkit-scrollbar]:w-[8px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[#d5dbde] [&::-webkit-scrollbar-thumb:hover]:bg-[#9a9fa2] [&::-webkit-scrollbar-track]:bg-transparent";function eE(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=8}function eM(e,t){e&&t&&(e.scrollTop=e.scrollHeight)}function eB(){var e,t,n;return null!=(n=null==(e=(t=globalThis).matchMedia)?void 0:e.call(t,"(prefers-reduced-motion: reduce)").matches)&&n}function ej(e){var t;return null!=(t=e.findLast(e=>"assistant"===e.role))?t:null}function eP(e,t){if(!e)return null;var n,a=e.querySelector('[data-message-id="'.concat(CSS.escape(t),'"] [data-testid="chat-message-assistant-content"]'));return null!=(n=null==a?void 0:a.textContent)?n:null}function eH(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}function eO(e){var t=e.errorMessage,n=e.feedbackStorageKey,a=e.historyLoaded,r=e.loading,o=e.messages,l=e.onChipClick,s=e.onRetry,c=e.suggestedChips,u=!!(t&&s),d=a&&!r&&!u&&c.length>0&&l,f=a&&0===o.length,m=o.at(-1),p=d&&!f&&(null==m?void 0:m.role)==="assistant",h=!!n&&a&&!r&&!u&&(null==m?void 0:m.role)==="assistant",b=d&&!f?(0,i.Y)(ez,{chips:c,disabled:r,onChipClick:d}):null;return{groupChipsWithLastAssistant:p,showChips:d,showEntryState:f,showFeedback:h,suggestedChipsElement:b}}var eV=(0,s.F)()?function(e){var t,n,a,r,o,l,s,p,h,b,v,g,y,x,C,w,_,k,Y,S,F=(0,c.c)(162),N=e.messages,L=e.loading,R=e.historyLoaded,T=e.suggestedChips,z=e.errorMessage,D=e.inputPlaceholder,I=e.inputSendLabel,E=e.inputLoa
1dingLabel,M=e.inputStopLabel,B=e.loadingMessage,j=e.retryLabel,P=e.privacyPolicyUrl,H=e.presentation,O=e.layout,V=e.onEntryScrollToContent,q=e.feedbackStorageKey,X=e.dockAnchorRef,Z=e.dockLayoutShiftSubscribe,$=e.onSendMessage,W=e.onChipClick,G=e.onRetry,J=e.inputRef,Q=e.onInputFocus,ee=e.inputDefaultValue,ea=e.onInputValueChange,er=e.onStopClick,eo=e.onCharacterLimitReached,el=e.onMessageFeedbackSelect,ei=e.latestReplyViewTransitionClassName,es=void 0!==L&&L,ec=void 0===R||R,eu=void 0===T?eA:T,ed=void 0===z?null:z,ef=void 0===O?"fixed":O,em=void 0===X?null:X,ep=(0,d.Bd)("buyer-chat-assistant").t,eh=(0,f.useRef)(null),eb=(0,f.useRef)(null),ev=(0,f.useRef)(null),eg=(0,f.useRef)(null),ey=(0,f.useRef)(null),ex=(0,f.useRef)(!0),eC=(0,f.useRef)(!1),ew=(0,f.useRef)(!1),e_=(0,f.useRef)(null),eY=(0,u._)((0,f.useState)(!1),2),eS=eY[0],eF=eY[1],eN=(0,u._)((0,f.useState)(!1),2),eR=eN[0],eV=eN[1],eU=(0,u._)((0,f.useState)(!0),2),eK=eU[0],eq=eU[1],eX=(0,u._)((0,f.useState)(96),2),eZ=eX[0],e$=eX[1],eW=(0,u._)((0,f.useState)(64),2),eG=eW[0],eJ=eW[1],eQ=(0,u._)((0,f.useState)(!1),2),e0=eQ[0],e1=eQ[1],e2=(0,u._)((0,f.useState)(!1),2),e3=e2[0],e4=e2[1],e6="fill"===ef,e5="sheet"===(void 0===H?"docked":H);F[0]!==Q?(tr=()=>{e4(!0),null==Q||Q()},F[0]=Q,F[1]=tr):tr=F[1];var e8=tr;F[2]===Symbol.for("react.memo_cache_sentinel")?(to=()=>{e4(!1)},F[2]=to):to=F[2];var e7=to;F[3]===Symbol.for("react.memo_cache_sentinel")?(tl=()=>{var e=eb.current;if(e&&"undefined"!=typeof ResizeObserver){var t=new ResizeObserver(()=>{e1(e.clientHeight<520)});return t.observe(e),()=>t.disconnect()}},ti=[],F[3]=tl,F[4]=ti):(tl=F[3],ti=F[4]),(0,f.useLayoutEffect)(tl,ti),F[5]===Symbol.for("react.memo_cache_sentinel")?(ts=()=>{var e=ev.current,t=eg.current;if(e&&t){var n=()=>{var n=e.offsetHeight,a=t.offsetHeight;n>0&&e$(n),a>0&&eJ(a)};if(n(),"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(n);return a.observe(e),a.observe(t),()=>a.disconnect()}}},F[5]=ts):ts=F[5],F[6]!==ef||F[7]!==P?(tc=[ef,P],F[6]=ef,F[7]=P,F[8]=tc):tc=F[8],(0,f.useLayoutEffect)(ts,tc);var e9=eZ-eG/2,te=eZ+24;m(em,eb,e6&&!!em,Z),F[9]===Symbol.for("react.memo_cache_sentinel")?(tu=e=>{var t=null!=e?e:eh.current;if(t&&(0!==t.scrollHeight||0!==t.clientHeight)){var n=eE(t);eF(t.scrollTop>0),eV(t.scrollHeight>t.clientHeight),eq(n),ex.current=n}},F[9]=tu):tu=F[9];var tt=tu;F[10]===Symbol.for("react.memo_cache_sentinel")?(td=e=>{tt(e.currentTarget)},F[10]=td):td=F[10];var tn=td;F[11]!==ec||F[12]!==N?(tf=()=>{var e=eh.current;if(e){if(!ec)return void tt();if(0===N.length){e.scrollTop=0,eC.current=!0,tt();return}eM(e,!eC.current||ex.current),eC.current=!0,tt()}},F[11]=ec,F[12]=N,F[13]=tf):tf=F[13],F[14]!==ed||F[15]!==ec||F[16]!==es||F[17]!==N||F[18]!==te||F[19]!==eu?(tm=[ed,ec,es,N,te,eu,tt],F[14]=ed,F[15]=ec,F[16]=es,F[17]=N,F[18]=te,F[19]=eu,F[20]=tm):tm=F[20],(0,f.useLayoutEffect)(tf,tm),F[21]===Symbol.for("react.memo_cache_sentinel")?(tp=()=>{var e=eh.current;if(e){if("function"==typeof e.scrollTo)return void e.scrollTo({top:e.scrollHeight,behavior:eB()?"auto":"smooth"});e.scrollTop=e.scrollHeight,tt()}},F[21]=tp):tp=F[21];var ta=tp;if(F[22]!==ec||F[23]!==N?(th=()=>{if(ec){var e,t=ej(N);if(!t){e_.current=null,ew.current=!0,ey.current&&(ey.current.textContent="");return}var n=t.content,a="".concat(t.id,":").concat(n);if(!ew.current){ew.current=!0,e_.current=a;return}if(a!==e_.current){var r=(null==(e=eP(eh.current,t.id))?void 0:e.trim())||n.trim();r&&(e_.current=a,ey.current&&(ey.current.textContent=r))}}},tb=[ec,N],F[22]=ec,F[23]=N,F[24]=th,F[25]=tb):(th=F[24],tb=F[25]),(0,f.useEffect)(th,tb),F[26]!==ed||F[27]!==q||F[28]!==e8||F[29]!==ec||F[30]!==ee||F[31]!==E||F[32]!==D||F[33]!==J||F[34]!==I||F[35]!==M||F[36]!==e3||F[37]!==e0||F[38]!==e5||F[39]!==ei||F[40]!==es||F[41]!==N||F[42]!==eo||F[43]!==W||F[44]!==Q||F[45]!==ea||F[46]!==el||F[47]!==G||F[48]!==$||F[49]!==er||F[50]!==P||F[51]!==eu||F[52]!==ep){var tr,to,tl,ti,ts,tc,tu,td,tf,tm,tp,th,tb,tv,tg,ty,tx,tC,tw,t_,tk,tY,tS,tF,tN,tL,tR,tT,tz,tD,tA,tI,tE=eO({errorMessage:ed,feedbackStorageKey:q,historyLoaded:ec,loading:es,messages:N,onChipClick:W,onRetry:G,suggestedChips:eu}),tM=tE.groupChipsWithLastAssistant,tB=tE.showChips,tj=tE.showEntryState,tP=tE.showFeedback,tH=tE.suggestedChipsElement;ty=tM,tk=tj,tY=tH,tw=e5?"overflow-y-scroll overscroll-contain":tk?"overflow-y-hidden overscroll-auto":"overflow-y-auto overscroll-contain";var tO=e5?e8:Q,tV=e5?e7:void 0;F[65]!==ee||F[66]!==E||F[67]!==D||F[68]!==J||F[69]!==I||F[70]!==M||F[71]!==es||F[72]!==eo||F[73]!==ea||F[74]!==$||F[75]!==er||F[76]!==tO||F[77]!==tV?(tL=(0,i.Y)(ek,{loading:es,placeholder:D,sendLabel:I,loadingLabel:E,stopLabel:M,defaultValue:ee,textareaRef:J,onSend:$,onValueChange:ea,onFocus:tO,onBlur:tV,onStopClick:er,onCharacterLimitReached:eo}),F[65]=ee,F[66]=E,F[67]=D,F[68]=J,F[69]=I,F[70]=M,F[71]=es,F[72]=eo,F[73]=ea,F[74]=$,F[75]=er,F[76]=tO,F[77]=tV,F[78]=tL):tL=F[78],tg=tL,F[79]===Symbol.for("react.memo_cache_sentinel")?(tR=(0,i.Y)("div",{ref:ey,className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"chat-panel-assistant-announcement"}),F[79]=tR):tR=F[79],tv=tR,F[80]!==e3||F[81]!==e5||F[82]!==P?(tT=P?e5?(0,i.Y)("div",{className:eH(e3&&"pointer-events-none invisible"),children:(0,i.Y)(eT,{privacyPolicyUrl:P})}):(0,i.Y)(eT,{privacyPolicyUrl:P}):null,F[80]=e3,F[81]=e5,F[82]=P,F[83]=tT):tT=F[83],tC=tT,F[84]!==ep?(tz=ep("entry-chat-title-new",null,{fallback:"Let's find your next car"}),F[84]=ep,F[85]=tz):tz=F[85];var tU=tz;F[86]!==ep?(tD=ep("entry-chat-subtitle",null,{fallback:"Type what you're looking for, or ask questions you might have"}),F[86]=ep,F[87]=tD):tD=F[87];var tK=tD;F[88]!==ep?(tA=ep("chat-messages-label",null,{fallback:"Chat messages"}),F[88]=ep,F[89]=tA):tA=F[89];var tq=tA;F[90]!==ep?(tI=ep("go-to-latest-message",null,{fallback:"Go to latest message"}),F[90]=ep,F[91]=tI):tI=F[91],t_=tI,tx=tk&&e0,tS=tk?"flex min-h-0 flex-1 flex-col":"mt-auto flex flex-col gap-300",tF=tk?(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{className:"flex shrink-0 grow items-center justify-center px-400 pt-300 pb-700",children:(0,i.FD)("div",{className:"relative flex max-w-full flex-col items-center gap-100",children:[(0,i.Y)("div",{"aria-hidden":!0,
1className:eH("pointer-events-none absolute top-0 left-1/2 size-[146px] -translate-x-1/2 -translate-y-[42%] transition-opacity duration-300",tx?"opacity-0":"opacity-100"),"data-testid":"chat-panel-entry-gradient",children:(0,i.Y)("div",{className:"absolute inset-[-76.71%] flex items-center justify-center",children:(0,i.Y)("div",{className:"size-[146px] rounded-full bg-[#289EFF] opacity-[0.15] blur-[56px]"})})}),(0,i.Y)(K,{size:24,className:"relative shrink-0 text-[#0061de]"}),(0,i.Y)("h2",{className:"relative m-0 text-center text-[20px] leading-[1.4] font-medium text-[#242526]","data-testid":"chat-panel-entry-title",children:tU}),(0,i.Y)("p",{className:"font-normal relative m-0 max-w-[280px] text-center text-[14px] leading-[1.4] text-[#5e6466]","data-testid":"chat-panel-entry-subtitle",children:tK})]})}),tB?(0,i.Y)("div",{className:"min-h-[40px] shrink","data-testid":"chat-panel-entry-chips",children:(0,i.Y)(ez,{chips:eu,disabled:es,onChipClick:tB,variant:"entry"})}):null]}):null,tN=ec?(0,i.Y)("section",{"aria-label":tq,className:"flex flex-col gap-300",children:N.map((e,t)=>{var n=t===N.length-1&&"assistant"===e.role,a=n?ei:void 0;return n&&(ty||tP)?(0,i.FD)("div",{className:eH("flex flex-col",ty&&!tP&&"gap-200"),"data-testid":"chat-panel-assistant-reply",children:[(0,i.Y)(eL,{message:e,contentClassName:a}),tP&&q?(0,i.Y)(U,{storageKey:q,messageId:e.id,hasSuggestedChipsBelow:!!ty,onSelect:el},e.id):null,ty?tY:null]},e.id):a?(0,i.Y)("div",{"data-testid":"chat-panel-assistant-reply",children:(0,i.Y)(eL,{message:e,contentClassName:a})},e.id):(0,i.Y)(eL,{message:e},e.id)})}):null,F[26]=ed,F[27]=q,F[28]=e8,F[29]=ec,F[30]=ee,F[31]=E,F[32]=D,F[33]=J,F[34]=I,F[35]=M,F[36]=e3,F[37]=e0,F[38]=e5,F[39]=ei,F[40]=es,F[41]=N,F[42]=eo,F[43]=W,F[44]=Q,F[45]=ea,F[46]=el,F[47]=G,F[48]=$,F[49]=er,F[50]=P,F[51]=eu,F[52]=ep,F[53]=tv,F[54]=tg,F[55]=ty,F[56]=tx,F[57]=tC,F[58]=tw,F[59]=t_,F[60]=tk,F[61]=tY,F[62]=tS,F[63]=tF,F[64]=tN}else tv=F[53],tg=F[54],ty=F[55],tx=F[56],tC=F[57],tw=F[58],t_=F[59],tk=F[60],tY=F[61],tS=F[62],tF=F[63],tN=F[64];F[92]!==e5||F[93]!==es||F[94]!==B?(t=es?(0,i.Y)(eD,{message:B,tone:e5?"default":"muted"}):null,F[92]=e5,F[93]=es,F[94]=B,F[95]=t):t=F[95],F[96]!==ed||F[97]!==G||F[98]!==j?(n=ed&&G?(0,i.Y)(en,{message:ed,retryLabel:j,onRetry:G}):null,F[96]=ed,F[97]=G,F[98]=j,F[99]=n):n=F[99];var tX=!tk&&!ty&&tY;F[100]!==tS||F[101]!==tF||F[102]!==tN||F[103]!==t||F[104]!==n||F[105]!==tX?(a=(0,i.FD)("div",{className:tS,children:[tF,tN,t,n,tX]}),F[100]=tS,F[101]=tF,F[102]=tN,F[103]=t,F[104]=n,F[105]=tX,F[106]=a):a=F[106];var tZ=a,t$=eS||tk&&!tx?"opacity-100":"opacity-0";
1F[107]!==t$?(r=eH("pointer-events-none absolute inset-x-0 top-0 z-10 h-turbo-56 bg-linear-to-b from-background-primary via-background-primary/80 via-50% to-background-primary/10 transition-opacity duration-150",t$),F[107]=t$,F[108]=r):r=F[108],F[109]!==r?(o=(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"chat-panel-top-fade",className:r}),F[109]=r,F[110]=o):o=F[110];var tW=o;F[111]!==e9?(l=(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"chat-panel-bottom-mask",className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 bg-background-primary",style:{height:e9}}),F[111]=e9,F[112]=l):l=F[112];var tG=l;F[113]!==tg?(s=(0,i.Y)("div",{ref:eg,"data-testid":"chat-panel-input-pill",children:tg}),F[113]=tg,F[114]=s):s=F[114];var tJ=s,tQ=tx&&!!V;F[115]!==eZ||F[116]!==eK||F[117]!==eR||F[118]!==V||F[119]!==t_||F[120]!==tQ?(p=tQ||eR&&!eK?(0,i.Y)("div",{className:"absolute left-1/2 z-20 -translate-x-1/2",style:{bottom:eZ+16},children:(0,i.Y)(A,{variant:"icon-elevated","aria-label":t_,onPress:tQ?V:ta,children:(0,i.Y)(et,{size:20})})}):null,F[115]=eZ,F[116]=eK,F[117]=eR,F[118]=V,F[119]=t_,F[120]=tQ,F[121]=p):p=F[121];var t0=p;F[122]!==tZ?(h=(0,i.Y)("div",{"data-testid":"chat-panel-scroll-content",className:"flex min-h-full flex-col",children:tZ}),F[122]=tZ,F[123]=h):h=F[123];var t1=h;if(e6)return F[124]!==tw?(b=eH(eI,"min-h-0 flex-1 overflow-x-hidden pt-300 [touch-action:pan-y]",tw),F[124]=tw,F[125]=b):b=F[125],F[126]!==te?(v={paddingBottom:te},F[126]=te,F[127]=v):v=F[127],F[128]!==t1||F[129]!==b||F[130]!==v?(g=(0,i.Y)("div",{ref:eh,"data-testid":"chat-panel-scroll",className:b,style:v,onScroll:tn,children:t1}),F[128]=t1,F[129]=b,F[130]=v,F[131]=g):g=F[131],F[132]!==tJ||F[133]!==tC?(y=(0,i.FD)("div",{ref:ev,className:"absolute inset-x-0 bottom-0 z-20","data-testid":"chat-panel-input",children:[tJ,tC]}),F[132]=tJ,F[133]=tC,F[134]=y):y=F[134],F[135]!==tv||F[136]!==tG||F[137]!==t0||F[138]!==g||F[139]!==y||F[140]!==tW?(x=(0,i.FD)("div",{ref:eb,"data-testid":"chat-panel-viewport",className:"relative flex min-h-0 w-full flex-1 flex-col",children:[tv,g,tW,tG,t0,y]}),F[135]=tv,F[136]=tG,F[137]=t0,F[138]=g,F[139]=y,F[140]=tW,F[141]=x):x=F[141],x;var t2=tk?"overflow-y-hidden":"overflow-y-auto";return F[142]!==t2?(C=eH(eI,"h-full min-h-0 overflow-x-hidden overscroll-contain pt-300 [touch-action:pan-y]",t2),F[142]=t2,F[143]=C):C=F[143],F[144]!==te?(w={paddingBottom:te},F[144]=te,F[145]=w):w=F[145],F[146]!==t1||F[147]!==C||F[148]!==w?(_=(0,i.Y)("div",{ref:eh,"data-testid":"chat-panel-scroll",className:C,style:w,onScroll:tn,children:t1}),F[146]=t1,F[147]=C,F[148]=w,F[149]=_):_=F[149],F[150]!==tJ||F[151]!==tC?(k=(0,i.FD)("div",{ref:ev,className:"absolute inset-x-0 bottom-0 z-20 pb-300","data-testid":"chat-panel-input",children:[tJ,tC]}),F[150]=tJ,F[151]=tC,F[152]=k):k=F[152],F[153]!==tG||F[154]!==t0||F[155]!==_||F[156]!==k||F[157]!==tW?(Y=(0,i.FD)("div",{className:"relative h-[520px] shrink-0 overflow-x-hidden","data-testid":"chat-panel-viewport",children:[_,tW,tG,t0,k]}),F[153]=tG,F[154]=t0,F[155]=_,F[156]=k,F[157]=tW,F[158]=Y):Y=F[158],F[159]!==tv||F[160]!==Y?(S=(0,i.FD)("div",{className:"relative flex w-full flex-col",children:[tv,Y]}),F[159]=tv,F[160]=Y,F[161]=S):S=F[161],S}:function(e){var t,n=e.messages,a=e.loading,r=void 0!==a&&a,o=e.historyLoaded,l=void 0===o||o,s=e.suggestedChips,c=void 0===s?eA:s,p=e.errorMessage,h=void 0===p?null:p,b=e.inputPlaceholder,v=e.inputSendLabel,g=e.inputLoadingLabel,y=e.inputStopLabel,x=e.loadingMessage,C=e.retryLabel,w=e.privacyPolicyUrl,_=e.presentation,k=e.layout,Y=void 0===k?"fixed":k,S=e.onEntryScrollToContent,F=e.feedbackStorageKey,N=e.dockAnchorRef,L=void 0===N?null:N,R=e.dockLayoutShiftSubscribe,T=e.onSendMessage,z=e.onChipClick,D=e.onRetry,I=e.inputRef,E=e.onInputFocus,M=e.inputDefaultValue,B=e.onInputValueChange,j=e.onStopClick,P=e.onCharacterLimitReached,H=e.onMessageFeedbackSelect,O=e.latestReplyViewTransitionClassName,V=(0,d.Bd)("buyer-chat-assistant").t,q=(0,f.useRef)(null),X=(0,f.useRef)(null),Z=(0,f.useRef)(null),$=(0,f.useRef)(null),W=(0,f.useRef)(null),G=(0,f.useRef)(!0),J=(0,f.useRef)(!1),Q=(0,f.useRef)(!1),ee=(0,f.useRef)(null),ea=(0,u._)((0,f.useState)(!1),2),er=ea[0],eo=ea[1],el=(0,u._)((0,f.useState)(!1),2),ei=el[0],es=el[1],ec=(0,u._)((0,f.useState)(!0),2),eu=ec[0],ed=ec[1],ef=(0,u._)((0,f.useState)(96),2),em=ef[0],ep=ef[1],eh=(0,u._)((0,f.useState)(64),2),eb=eh[0],ev=eh[1],eg=(0,u._)((0,f.useState)(!1),2),ey=eg[0],ex=eg[1],eC=(0,u._)((0,f.useState)(!1),2),ew=eC[0],e_=eC[1],eY="fill"===Y,eS="sheet"===(void 0===_?"docked":_),eF=(0,f.useCallback)(()=>{e_(!0),null==E||E()},[E]),eN=(0,f.useCallback)(()=>{e_(!1)},[]);(0,f.useLayoutEffect)(()=>{var e=X.current;if(e&&"undefined"!=typeof ResizeObserver){var t=new ResizeObserver(()=>{ex(e.clientHeight<520)});return t.observe(e),()=>t.disconnect()}},[]),(0,f.useLayoutEffect)(()=>{var e=Z.current,t=$.current;if(e&&t){var n=()=>{var n=e.offsetHeight,a=t.offsetHeight;n>0&&ep(n),a>0&&ev(a)};if(n(),"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(n);return a.observe(e),a.observe(t),()=>a.disconnect()}}},[Y,w]);var eR=em+24;m(L,X,eY&&!!L,R);var eV=(0,f.useCallback)(e=>{var t=null!=e?e:q.current;if(t&&(0!==t.scrollHeight||0!==t.clientHeight)){var n=eE(t);eo(t.scrollTop>0),es(t.scrollHeight>t.clientHeight),ed(n),G.current=n}},[]),eU=(0,f.useCallback)(e=>{eV(e.currentTarget)},[eV]);(0,f.useLayoutEffect)(()=>{var e=q.current;if(e){if(!l)return void eV();if(0===n.length){e.scrollTop=0,J.current=!0,eV();return}eM(e,!J.current||G.current),J.current=!0,eV()}},[h,l,r,n,eR,c,eV]);var eK=(0,f.useCallback)(()=>{var e=q.current;if(e){if("function"==typeof e.scrollTo)return void e.scrollTo({top:e.scrollHeight,behavior:eB()?"auto":"smooth"});e.scrollTop=e.scrollHeight,eV()}},[eV]);(0,f.useEffect)(()=>
1{if(l){var e,t=ej(n);if(!t){ee.current=null,Q.current=!0,W.current&&(W.current.textContent="");return}var a=t.content,r="".concat(t.id,":").concat(a);if(!Q.current){Q.current=!0,ee.current=r;return}if(r!==ee.current){var o=(null==(e=eP(q.current,t.id))?void 0:e.trim())||a.trim();o&&(ee.current=r,W.current&&(W.current.textContent=o))}}},[l,n]);var eq=eO({errorMessage:h,feedbackStorageKey:F,historyLoaded:l,loading:r,messages:n,onChipClick:z,onRetry:D,suggestedChips:c}),eX=eq.groupChipsWithLastAssistant,eZ=eq.showChips,e$=eq.showEntryState,eW=eq.showFeedback,eG=eq.suggestedChipsElement;t=eS?"overflow-y-scroll overscroll-contain":e$?"overflow-y-hidden overscroll-auto":"overflow-y-auto overscroll-contain";var eJ=(0,i.Y)(ek,{loading:r,placeholder:b,sendLabel:v,loadingLabel:g,stopLabel:y,defaultValue:M,textareaRef:I,onSend:T,onValueChange:B,onFocus:eS?eF:E,onBlur:eS?eN:void 0,onStopClick:j,onCharacterLimitReached:P}),eQ=(0,i.Y)("div",{ref:W,className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"chat-panel-assistant-announcement"}),e0=w?eS?(0,i.Y)("div",{className:eH(ew&&"pointer-events-none invisible"),children:(0,i.Y)(eT,{privacyPolicyUrl:w})}):(0,i.Y)(eT,{privacyPolicyUrl:w}):null,e1=V("entry-chat-title-new",null,{fallback:"Let's find your next car"}),e2=V("entry-chat-subtitle",null,{fallback:"Type what you're looking for, or ask questions you might have"}),e3=V("chat-messages-label",null,{fallback:"Chat messages"}),e4=V("go-to-latest-message",null,{fallback:"Go to latest message"}),e6=e$&&ey,e5=(0,i.FD)("div",{className:e$?"flex min-h-0 flex-1 flex-col":"mt-auto flex flex-col gap-300",children:[e$?(0,i.FD)(i.FK,{children:[(0,i.Y)("div",{className:"flex shrink-0 grow items-center justify-center px-400 pt-300 pb-700",children:(0,i.FD)("div",{className:"relative flex max-w-full flex-col items-center gap-100",children:[(0,i.Y)("div",{"aria-hidden":!0,className:eH("pointer-events-none absolute top-0 left-1/2 size-[146px] -translate-x-1/2 -translate-y-[42%] transition-opacity duration-300",e6?"opacity-0":"opacity-100"),"data-testid":"chat-panel-entry-gradient",children:(0,i.Y)("div",{className:"absolute inset-[-76.71%] flex items-center justify-center",children:(0,i.Y)("div",{className:"size-[146px] rounded-full bg-[#289EFF] opacity-[0.15] blur-[56px]"})})}),(0,i.Y)(K,{size:24,className:"relative shrink-0 text-[#0061de]"}),(0,i.Y)("h2",{className:"relative m-0 text-center text-[20px] leading-[1.4] font-medium text-[#242526]","data-testid":"chat-panel-entry-title",children:e1}),(0,i.Y)("p",{className:"font-normal relative m-0 max-w-[280px] text-center text-[14px] leading-[1.4] text-[#5e6466]","data-testid":"chat-panel-entry-subtitle",children:e2})]})}),eZ?(0,i.Y)("div",{className:"min-h-[40px] shrink","data-testid":"chat-panel-entry-chips",children:(0,i.Y)(ez,{chips:c,disabled:r,onChipClick:eZ,variant:"entry"})}):null]}):null,l?(0,i.Y)("section",{"aria-label":e3,className:"flex flex-col gap-300",children:n.map((e,t)=>{var a=t===n.length-1&&"assistant"===e.role,r=a?O:void 0;return a&&(eX||eW)?(0,i.FD)("div",{className:eH("flex flex-col",eX&&!eW&&"gap-200"),"data-testid":"chat-panel-assistant-reply",children:[(0,i.Y)(eL,{message:e,contentClassName:r}),eW&&F?(0,i.Y)(U,{storageKey:F,messageId:e.id,hasSuggestedChipsBelow:!!eX,onSelect:H},e.id):null,eX?eG:null]},e.id):r?(0,i.Y)("div",{"data-testid":"chat-panel-assistant-reply",children:(0,i.Y)(eL,{message:e,contentClassName:r})},e.id):(0,i.Y)(eL,{message:e},e.id)})}):null,r?(0,i.Y)(eD,{message:x,tone:eS?"default":"muted"}):null,h&&D?(0,i.Y)(en,{message:h,retryLabel:C,onRetry:D}):null,!e$&&!eX&&eG]}),e8=(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"chat-panel-top-fade",className:eH("pointer-events-none absolute inset-x-0 top-0 z-10 h-turbo-56 bg-linear-to-b from-background-primary via-background-primary/80 via-50% to-background-primary/10 transition-opacity duration-150",er||e$&&!e6?"opacity-100":"opacity-0")}),e7=(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"chat-panel-bottom-mask",className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 bg-background-primary",style:{height:em-eb/2}}),e9=(0,i.Y)("div",{ref:$,"data-testid":"chat-panel-input-pill",children:eJ}),te=e6&&!!S,tt=te||ei&&!eu?(0,i.Y)("div",{className:"absolute left-1/2 z-20 -translate-x-1/2",style:{bottom:em+16},children:(0,i.Y)(A,{variant:"icon-elevated","aria-label":e4,onPress:te?S:eK,children:(0,i.Y)(et,{size:20})})}):null,tn=(0,i.Y)("div",{"data-testid":"chat-panel-scroll-content",className:"flex min-h-full flex-col",children:e5});return eY?(0,i.FD)("div",{ref:X,"data-testid":"chat-panel-viewport",className:"relative flex min-h-0 w-full flex-1 flex-col",children:[eQ,(0,i.Y)("div",{ref:q,"data-testid":"chat-panel-scroll",className:eH(eI,"min-h-0 flex-1 overflow-x-hidden pt-300 [touch-action:pan-y]",t),style:{paddingBottom:eR},onScroll:eU,children:tn}),e8,e7,tt,(0,i.FD)("div",{ref:Z,className:"absolute inset-x-0 bottom-0 z-20","data-testid":"chat-panel-input",children:[e9,e0]})]}):(0,i.FD)("div",{className:"relative flex w-full flex-col",children:[eQ,(0,i.FD)("div",{className:"relative h-[520px] shrink-0 overflow-x-hidden","data-testid":"chat-panel-viewport",children:[(0,i.Y)("div",{ref:q,"data-testid":"chat-panel-scroll",className:eH(eI,"h-full min-h-0 overflow-x-hidden overscroll-contain pt-300 [touch-action:pan-y]",e$?"overflow-y-hidden":"overflow-y-auto"),style:{paddingBottom:eR},onScroll:eU,children:tn}),e8,e7,tt,(0,i.FD)("div",{ref:Z,className:"absolute inset-x-0 bottom-0 z-20 pb-300","data-testid":"chat-panel-input",children:[e9,e0]})]})]})};function eU(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();var e,t=new Uint32Array(1);return"undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues?(crypto.getRandomValues(t),"chat-".concat(Date.now(),"-").concat((null!=(e=t[0])?e:0).toString(36))):"chat-".concat(Date.now(),"-0")}function eK(e){var t=e.findLastIndex(e=>"assistant"===e.role);return -1===t?[]:e.slice(0,t+1)}var eq=e=>({message:e.label}),eX=[];function eZ(e){var t=(0,f.useRef)(0);(0,f.useEffect)(()=>
1{if(e&&"undefined"!=typeof document){t.current=window.scrollY;var n=document.body.style,a=n.position,r=n.top,o=n.width;return n.position="fixed",n.top="-".concat(t.current,"px"),n.width="100%",()=>{n.position=a,n.top=r,n.width=o,window.scrollTo(0,t.current)}}},[e])}var e$={bottomOffset:0,documentBottom:0};function eW(){var e=function(){var e=window.visualViewport;if(!e)return{bottomOffset:0,documentBottom:window.scrollY+window.innerHeight};var t=window.innerHeight-e.height-e.offsetTop,n=t<=24?0:t;return{bottomOffset:n,documentBottom:window.scrollY+window.innerHeight-n}}();return e.bottomOffset===(null==a?void 0:a.bottomOffset)&&e.documentBottom===(null==a?void 0:a.documentBottom)?a:a=e}function eG(){var e=null!=a?a:eW(),t=window.scrollY+window.innerHeight-e.bottomOffset;return t===e.documentBottom?e:a=(0,o._)((0,r._)({},e),{documentBottom:t})}function eJ(){return()=>void 0}function eQ(e){var t,n,r,o=window.visualViewport,l=()=>{cancelAnimationFrame(t),cancelAnimationFrame(n),clearTimeout(r),t=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{r=window.setTimeout(()=>{var t=a;eW()!==t&&e()},30)})})},i=()=>{var t=a;eG()!==t&&e()};return null==o||o.addEventListener("resize",l),null==o||o.addEventListener("scroll",i),window.addEventListener("resize",l),window.addEventListener("scroll",i),()=>{null==o||o.removeEventListener("resize",l),null==o||o.removeEventListener("scroll",i),window.removeEventListener("resize",l),window.removeEventListener("scroll",i),cancelAnimationFrame(t),cancelAnimationFrame(n),clearTimeout(r),a=void 0}}function e0(e){var t=e&&!0;return(0,f.useSyncExternalStore)(t?eQ:eJ,()=>t?eG():e$,()=>e$)}function e1(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var e2=(0,s.F)()?function(e){var t,n,a,r,o,l,s,m,p,h,b,v,g,y,x,C,w,_,k,Y,S,F,N,L,R=(0,c.c)(63),T=e.placeholder,z=e.loading,D=e.errorMessage,I=e.onFocus,E=e.onDockedChange,M=e.onSend,B=(0,d.Bd)("buyer-chat-assistant").t,j=(0,u._)((0,f.useState)(!1),2),P=j[0],H=j[1],O=(0,u._)((0,f.useState)(!1),2),V=O[0],U=O[1],q=(0,f.useRef)(null),X=(0,f.useRef)(null),Z=(0,f.useRef)(!1),$=e0(P).bottomOffset;eZ(P),R[0]!==B?(t=B("home-mobile-search-or-divider",null,{fallback:"or"}),R[0]=B,R[1]=t):t=R[1];var W=t;R[2]!==B?(n=B("ai-search-tab",null,{fallback:"AI search"}),R[2]=B,R[3]=n):n=R[3];var G=n;R[4]!==E?(a=e=>{H(e),null==E||E(e)},R[4]=E,R[5]=a):a=R[5];var J=a;R[6]!==P?(r=()=>{if(P){var e=e=>{var t=e.target;e1(t)&&t.closest("[data-home-buyer-chat-composer]")&&(Z.current=!0,window.requestAnimationFrame(()=>{Z.current=!1}))};return document.addEventListener("pointerdown",e,!0),()=>{document.removeEventListener("pointerdown",e,!0)}}},o=[P],R[6]=P,R[7]=r,R[8]=o):(r=R[7],o=R[8]),(0,f.useEffect)(r,o),R[9]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{var e=q.current;if(e){var t=new IntersectionObserver(e=>{var t=e[0];t&&U(!t.isIntersecting)},{threshold:0});return t.observe(e),()=>{t.disconnect()}}},s=[],R[9]=l,R[10]=s):(l=R[9],s=R[10]),(0,f.useEffect)(l,s),R[11]!==J||R[12]!==I?(m=()=>{J(!0),null==I||I()},R[11]=J,R[12]=I,R[13]=m):m=R[13];var Q=m;R[14]!==J?(p=e=>{if(!Z.current){var t=e.relatedTarget;e1(t)&&t.closest("[data-home-buyer-chat-composer]")||window.requestAnimationFrame(()=>{if(!Z.current){var e=document.activeElement;null!=e&&e.closest("[data-home-buyer-chat-composer]")||J(!1)}})}},R[14]=J,R[15]=p):p=R[15];var et=p;R[16]!==J||R[17]!==I?(h=()=>{J(!0),window.requestAnimationFrame(()=>{var e;null==(e=X.current)||e.focus({preventScroll:!0})}),null==I||I()},R[16]=J,R[17]=I,R[18]=h):h=R[18];var en=h;R[19]===Symbol.for("react.memo_cache_sentinel")?(b=(0,i.Y)(ee,{size:20,className:"text-turbo-content-muted"}),R[19]=b):b=R[19];var ea=b,er=V&&!P;R[20]!==P?(v=P?(0,i.Y)("div",{"aria-hidden":!0,className:"h-turbo-64"}):null,R[20]=P,R[21]=v):v=R[21],R[22]!==P?(g=(0,es.A)("w-full",{"pointer-events-none fixed inset-x-0 bottom-(--buyer-chat-keyboard-offset,0px) z-40 flex justify-center px-turbo-12 pb-turbo-12 pt-[152px] backdrop-blur-sm":P}),R[22]=P,R[23]=g):g=R[23],R[24]!==$||R[25]!==P?(y=P?{"--buyer-chat-keyboard-offset":"".concat($,"px")}:void 0,R[24]=$,R[25]=P,R[26]=y):y=R[26],R[27]!==P?(x=(0,es.A)("w-full min-w-0",{"pointer-events-auto":P}),R[27]=P,R[28]=x):x=R[28];var eo=P?void 0:ea;return R[29]!==et||R[30]!==Q||R[31]!==P||R[32]!==z||R[33]!==M||R[34]!==T||R[35]!==eo?(C=(0,i.Y)(ek,{placeholder:T,loading:z,loadingAffordance:"pending",leadingIcon:eo,preventFocusScroll:P,textareaRef:X,onFocus:Q,onBlur:et,onSend:M}),R[29]=et,R[30]=Q,R[31]=P,R[32]=z,R[33]=M,R[34]=T,R[35]=eo,R[36]=C):C=R[36],R[37]!==x||R[38]!==C?(w=(0,i.Y)("div",{className:x,children:C}),R[37]=x,R[38]=C,R[39]=w):w=R[39],R[40]!==g||R[41]!==y||R[42]!==w?(_=(0,i.Y)("div",{"data-home-buyer-chat-composer":!0,className:g,style:y,children:w}),R[40]=g,R[41]=y,R[42]=w,R[43]=_):_=R[43],R[44]!==P||R[45]!==W?(k=P?null:(0,i.Y)("p",{className:"text-center text-turbo-body-small leading-[1.15] text-turbo-content-muted",children:W}),R[44]=P,R[45]=W,R[46]=k):k=R[46],R[47]!==v||R[48]!==_||R[49]!==k?(Y=(0,i.FD)("div",{ref:q,className:"relative flex flex-col gap-turbo-14","data-home-buyer-chat-inline-input":!0,children:[v,_,k]}),R[47]=v,R[48]=_,R[49]=k,R[50]=Y):Y=R[50],R[51]!==D?(S=D?(0,i.Y)("p",{className:"text-turbo-14 text-foreground-status-error",role:"alert",children:D}):null,R[51]=D,R[52]=S):S=R[52],R[53]!==Y||R[54]!==S?(F=(0,i.FD)("div",{className:"flex flex-col gap-turbo-16",children:[Y,S]}),R[53]=Y,R[54]=S,R[55]=F):F=R[55],R[56]!==G||R[57]!==er||R[58]!==en?(N=er?(0,i.Y)("div",{className:"pointer-events-none fixed inset-x-0 bottom-turbo-24 z-30 flex justify-center px-turbo-24",children:(0,i.FD)(A,{type:"button",variant:"mobile-floating",className:"pointer-events-auto","aria-label":G,onPress:en,children:[(0,i.Y)(K,{size:16}),G]})}):null,R[56]=G,R[57]=er,R[58]=en,R[59]=N):N=R[59],R[60]!==F||R[61]!==N?(L=(0,i.FD)(i.FK,{children:[F,N]}),R[60]=F,R[61]=N,R[62]=L):L=R[62],L}:function(e){var t=e.placeholder,n=e.loading,a=e.errorMessage,r=e.onFocus,o=e.onDockedChange,l=e.onSend,s=(0,d.Bd)("buyer-chat-assistant").t,c=(0,u._)((0,f.useState)(!1),2),m=c[0],p=c[1],h=(0,u._)((0,f.useState)(!1),2),b=h[0],v=h[1],g=(0,f.useRef)(null),y=(0,f.useRef)(null),x=(0,f.useRef)(!1),C=e0(m).bottomOffset;eZ(m);var w=s("home-mobile-search-or-divider",null,{fallback:"or"}),_=s("ai-search-tab",null,{fallback:"AI search"}),k=(0,f.useCallback)(e=>{p(e),null==o||o(e)},[o]);(0,f.useEffect)(()=>
1{if(m){var e=e=>{var t=e.target;e1(t)&&t.closest("[data-home-buyer-chat-composer]")&&(x.current=!0,window.requestAnimationFrame(()=>{x.current=!1}))};return document.addEventListener("pointerdown",e,!0),()=>{document.removeEventListener("pointerdown",e,!0)}}},[m]),(0,f.useEffect)(()=>{var e=g.current;if(e){var t=new IntersectionObserver(e=>{var t=e[0];t&&v(!t.isIntersecting)},{threshold:0});return t.observe(e),()=>{t.disconnect()}}},[]);var Y=(0,f.useCallback)(()=>{k(!0),null==r||r()},[k,r]),S=(0,f.useCallback)(e=>{if(!x.current){var t=e.relatedTarget;e1(t)&&t.closest("[data-home-buyer-chat-composer]")||window.requestAnimationFrame(()=>{if(!x.current){var e=document.activeElement;null!=e&&e.closest("[data-home-buyer-chat-composer]")||k(!1)}})}},[k]),F=(0,f.useCallback)(()=>{k(!0),window.requestAnimationFrame(()=>{var e;null==(e=y.current)||e.focus({preventScroll:!0})}),null==r||r()},[k,r]),N=(0,i.Y)(ee,{size:20,className:"text-turbo-content-muted"}),L=b&&!m;return(0,i.FD)(i.FK,{children:[(0,i.FD)("div",{className:"flex flex-col gap-turbo-16",children:[(0,i.FD)("div",{ref:g,className:"relative flex flex-col gap-turbo-14","data-home-buyer-chat-inline-input":!0,children:[m?(0,i.Y)("div",{"aria-hidden":!0,className:"h-turbo-64"}):null,(0,i.Y)("div",{"data-home-buyer-chat-composer":!0,className:(0,es.A)("w-full",{"pointer-events-none fixed inset-x-0 bottom-(--buyer-chat-keyboard-offset,0px) z-40 flex justify-center px-turbo-12 pb-turbo-12 pt-[152px] backdrop-blur-sm":m}),style:m?{"--buyer-chat-keyboard-offset":"".concat(C,"px")}:void 0,children:(0,i.Y)("div",{className:(0,es.A)("w-full min-w-0",{"pointer-events-auto":m}),children:(0,i.Y)(ek,{placeholder:t,loading:n,loadingAffordance:"pending",leadingIcon:m?void 0:N,preventFocusScroll:m,textareaRef:y,onFocus:Y,onBlur:S,onSend:l})})}),m?null:(0,i.Y)("p",{className:"text-center text-turbo-body-small leading-[1.15] text-turbo-content-muted",children:w})]}),a?(0,i.Y)("p",{className:"text-turbo-14 text-foreground-status-error",role:"alert",children:a}):null]}),L?(0,i.Y)("div",{className:"pointer-events-none fixed inset-x-0 bottom-turbo-24 z-30 flex justify-center px-turbo-24",children:(0,i.FD)(A,{type:"button",variant:"mobile-floating",className:"pointer-events-auto","aria-label":_,onPress:F,children:[(0,i.Y)(K,{size:16}),_]})}):null]})},e3=(0,s.F)()?function(e){var t,n,a,r=(0,c.c)(6),o=e.onOpen,l=(0,d.Bd)("buyer-chat-assistant").t;r[0]!==l?(t=l("mobile-ai-search",null,{fallback:"AI Search"}),r[0]=l,r[1]=t):t=r[1];var s=t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.Y)(K,{size:16}),r[2]=n):n=r[2],r[3]!==s||r[4]!==o?(a=(0,i.FD)(A,{variant:"mobile-filter",onPress:o,children:[n,s]}),r[3]=s,r[4]=o,r[5]=a):a=r[5],a}:function(e){var t=e.onOpen,n=(0,(0,d.Bd)("buyer-chat-assistant").t)("mobile-ai-search",null,{fallback:"AI Search"});return(0,i.FD)(A,{variant:"mobile-filter",onPress:t,children:[(0,i.Y)(K,{size:16}),n]})},e4=(0,s.F)()?function(e){var t,n,a,r,o,l,s,m,p,h,b,v,g,y,x,C=(0,c.c)(42),w=e.defaultValue,_=e.suggestions,k=e.onSendMessage,Y=e.onStop,S=e.onChipClick,F=e.onCharacterLimitReached,N=e.onInputFocus,L=e.onDraftChange,R=e.privacyPolicyUrl,T=e.loading,z=e.autoFocus,D=void 0!==T&&T,A=void 0===z||z,I=(0,d.Bd)("buyer-chat-assistant").t;C[0]!==I?(t=I("mobile-ai-search",null,{fallback:"AI Search"}),C[0]=I,C[1]=t):t=C[1];var E=t,M=(0,f.useRef)(null),B=(0,u._)((0,f.useState)(null!=w?w:""),2),j=B[0],P=B[1];C[2]!==I?(n=I("mobile-stop-searching",null,{fallback:"Stop searching"}),C[2]=I,C[3]=n):n=C[3];var H=n;C[4]!==k?(a=e=>{var t;k(e),null==(t=M.current)||t.blur()},C[4]=k,C[5]=a):a=C[5];var O=a;C[6]!==Y?(r=()=>(Y(),null),C[6]=Y,C[7]=r):r=C[7];var V=r;C[8]!==A?(o=()=>{var e;A&&(null==(e=M.current)||e.focus({preventScroll:!0}))},l=[A],C[8]=A,C[9]=o,C[10]=l):(o=C[9],l=C[10]),(0,f.useLayoutEffect)(o,l),C[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.FD)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 -z-20 h-[260px]",children:[(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-60% backdrop-blur-[1px]"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-40% mask-t-to-75% backdrop-blur-[2px]"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-20% mask-t-to-50% backdrop-blur-xs"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-to-25% backdrop-blur-sm group-focus-within:-bottom-[var(--buyer-chat-keyboard-offset,0px)] group-focus-within:mask-[linear-gradient(to_top,black_0_var(--buyer-chat-keyboard-offset,0px),transparent_calc(var(--buyer-chat-keyboard-offset,0px)+65px))]"})]}
1),s=(0,i.Y)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-turbo-12 bottom-0 -z-10 h-[260px] bg-linear-to-t from-[rgba(148,201,255,0.6)] to-transparent blur-[18px] group-focus-within:-bottom-[var(--buyer-chat-keyboard-offset,0px)] group-focus-within:h-[calc(260px+var(--buyer-chat-keyboard-offset,0px))] group-focus-within:bg-[linear-gradient(to_top,rgba(148,201,255,0.6)_0_var(--buyer-chat-keyboard-offset,0px),transparent_calc(var(--buyer-chat-keyboard-offset,0px)+260px))]"}),C[11]=s,C[12]=m):(s=C[11],m=C[12]),C[13]!==j||C[14]!==D||C[15]!==S||C[16]!==_?(p=!D&&0===j.length&&null!=_&&_.length>0&&S?(0,i.Y)("div",{className:"w-full px-turbo-12",children:(0,i.Y)(ez,{chips:_,variant:"entry",onChipClick:S})}):null,C[13]=j,C[14]=D,C[15]=S,C[16]=_,C[17]=p):p=C[17];var U="".concat(D?"loading":"composing","-").concat(null!=w?w:"");return C[18]!==I?(h=I("mobile-input-placeholder",null,{fallback:"Type what you're looking for..."}),C[18]=I,C[19]=h):h=C[19],C[20]!==L?(b=e=>{P(e),null==L||L(e)},C[20]=L,C[21]=b):b=C[21],C[22]!==w||C[23]!==O||C[24]!==V||C[25]!==D||C[26]!==F||C[27]!==N||C[28]!==H||C[29]!==U||C[30]!==h||C[31]!==b?(v=(0,i.Y)(ek,{defaultValue:w,preventFocusScroll:!0,loading:D,stopLabel:H,placeholder:h,textareaRef:M,onSend:O,onValueChange:b,onStopClick:V,onCharacterLimitReached:F,onFocus:N}
1,U),C[22]=w,C[23]=O,C[24]=V,C[25]=D,C[26]=F,C[27]=N,C[28]=H,C[29]=U,C[30]=h,C[31]=b,C[32]=v):v=C[32],C[33]!==R?(g=(0,i.Y)(eT,{privacyPolicyUrl:R,variant:"compact"}),C[33]=R,C[34]=g):g=C[34],C[35]!==v||C[36]!==g?(y=(0,i.FD)("div",{className:"w-full",children:[v,g]}),C[35]=v,C[36]=g,C[37]=y):y=C[37],C[38]!==E||C[39]!==p||C[40]!==y?(x=(0,i.FD)("form",{"aria-label":E,className:"group relative flex w-full flex-col items-center gap-turbo-16 px-turbo-12 pb-turbo-12",children:[m,s,p,y]}),C[38]=E,C[39]=p,C[40]=y,C[41]=x):x=C[41],x}:function(e){var t=e.defaultValue,n=e.suggestions,a=e.onSendMessage,r=e.onStop,o=e.onChipClick,l=e.onCharacterLimitReached,s=e.onInputFocus,c=e.onDraftChange,m=e.privacyPolicyUrl,p=e.loading,h=void 0!==p&&p,b=e.autoFocus,v=void 0===b||b,g=(0,d.Bd)("buyer-chat-assistant").t,y=g("mobile-ai-search",null,{fallback:"AI Search"}),x=(0,f.useRef)(null),C=(0,u._)((0,f.useState)(null!=t?t:""),2),w=C[0],_=C[1],k=g("mobile-stop-searching",null,{fallback:"Stop searching"}),Y=(0,f.useCallback)(e=>{var t;a(e),null==(t=x.current)||t.blur()},[a]),S=(0,f.useCallback)(()=>(r(),null),[r]);return(0,f.useLayoutEffect)(()=>{var e;v&&(null==(e=x.current)||e.focus({preventScroll:!0}))},[v]),(0,i.FD)("form",{"aria-label":y,className:"group relative flex w-full flex-col items-center gap-turbo-16 px-turbo-12 pb-turbo-12",children:[(0,i.FD)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 -z-20 h-[260px]",children:[(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-60% backdrop-blur-[1px]"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-40% mask-t-to-75% backdrop-blur-[2px]"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-from-20% mask-t-to-50% backdrop-blur-xs"}),(0,i.Y)("div",{className:"absolute inset-0 mask-t-to-25% backdrop-blur-sm group-focus-within:-bottom-[var(--buyer-chat-keyboard-offset,0px)] group-focus-within:mask-[linear-gradient(to_top,black_0_var(--buyer-chat-keyboard-offset,0px),transparent_calc(var(--buyer-chat-keyboard-offset,0px)+65px))]"})]}),(0,i.Y)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-turbo-12 bottom-0 -z-10 h-[260px] bg-linear-to-t from-[rgba(148,201,255,0.6)] to-transparent blur-[18px] group-focus-within:-bottom-[var(--buyer-chat-keyboard-offset,0px)] group-focus-within:h-[calc(260px+var(--buyer-chat-keyboard-offset,0px))] group-focus-within:bg-[linear-gradient(to_top,rgba(148,201,255,0.6)_0_var(--buyer-chat-keyboard-offset,0px),transparent_calc(var(--buyer-chat-keyboard-offset,0px)+260px))]"}),!h&&0===w.length&&null!=n&&n.length>0&&o?(0,i.Y)("div",{className:"w-full px-turbo-12",children:(0,i.Y)(ez,{chips:n,variant:"entry",onChipClick:o})}):null,(0,i.FD)("div",{className:"w-full",children:[(0,i.Y)(ek,{defaultValue:t,preventFocusScroll:!0,loading:h,stopLabel:k,placeholder:g("mobile-input-placeholder",null,{fallback:"Type what you're looking for..."}),textareaRef:x,onSend:Y,onValueChange:e=>{_(e),null==c||c(e)},onStopClick:S,onCharacterLimitReached:l,onFocus:s},"".concat(h?"loading":"composing","-").concat(null!=t?t:"")),(0,i.Y)(eT,{privacyPolicyUrl:m,variant:"compact"})]})]})},e6=(0,s.F)()?function(e){var t,n,a=(0,c.c)(27),o=e.state,l=e.onOpen,s=e.onSendMessage,u=e.onStop,f=e.onChipClick,m=e.onCharacterLimitReached,p=e.onInputFocus,h=e.onDraftChange,b=e.openButtonRef,v=e.privacyPolicyUrl,g=(0,d.Bd)("buyer-chat-assistant").t;a[0]!==g?(w=g("mobile-write-follow-up",null,{fallback:"Write follow-up"}),a[0]=g,a[1]=w):w=a[1];var y=w;a[2]!==g?(_=g("mobile-ai-search",null,{fallback:"AI Search"}),a[2]=g,a[3]=_):_=a[3];var x=_;a[4]!==m||a[5]!==f||a[6]!==h||a[7]!==p||a[8]!==s||a[9]!==u||a[10]!==v?(k={onSendMessage:s,onStop:u,onChipClick:f,onCharacterLimitReached:m,onInputFocus:p,onDraftChange:h,privacyPolicyUrl:v},a[4]=m,a[5]=f,a[6]=h,a[7]=p,a[8]=s,a[9]=u,a[10]=v,a[11]=k):k=a[11];var C=k;if("composing"===o.type){var w,_,k,Y,S,F="composing-".concat(null!=(Y=o.defaultValue)?Y:"");return a[12]!==C||a[13]!==o||a[14]!==F?(S=(0,i.Y)(e4,(0,r._)({},o,C),F),a[12]=C,a[13]=o,a[14]=F,a[15]=S):S=a[15],S}if("loading"===o.type){a[16]!==g?(N=g("mobile-stop-searching",null,{fallback:"Stop searching"}),a[16]=g,a[17]=N):N=a[17];var N,L,R,T=N;return a[18]===Symbol.for("react.memo_cache_sentinel")?(L=(0,i.Y)("span",{"aria-hidden":!0,
1className:"size-[14px] shrink-0 rounded-[2px] bg-current"}),a[18]=L):L=a[18],a[19]!==u||a[20]!==T?(R=(0,i.FD)(A,{variant:"mobile-floating",onPress:u,children:[L,T]}),a[19]=u,a[20]=T,a[21]=R):R=a[21],R}a[22]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)(K,{size:16}),a[22]=t):t=a[22];var z=o.hasConversation?y:x;return a[23]!==l||a[24]!==b||a[25]!==z?(n=(0,i.FD)(A,{ref:b,variant:"mobile-floating",onPress:l,children:[t,z]}),a[23]=l,a[24]=b,a[25]=z,a[26]=n):n=a[26],n}:function(e){var t,n=e.state,a=e.onOpen,o=e.onSendMessage,l=e.onStop,s=e.onChipClick,c=e.onCharacterLimitReached,u=e.onInputFocus,f=e.onDraftChange,m=e.openButtonRef,p=e.privacyPolicyUrl,h=(0,d.Bd)("buyer-chat-assistant").t,b=h("mobile-write-follow-up",null,{fallback:"Write follow-up"}),v=h("mobile-ai-search",null,{fallback:"AI Search"});if("composing"===n.type)return(0,i.Y)(e4,(0,r._)({},n,{onSendMessage:o,onStop:l,onChipClick:s,onCharacterLimitReached:c,onInputFocus:u,onDraftChange:f,privacyPolicyUrl:p}),"composing-".concat(null!=(t=n.defaultValue)?t:""));if("loading"===n.type){var g=h("mobile-stop-searching",null,{fallback:"Stop searching"});return(0,i.FD)(A,{variant:"mobile-floating",onPress:l,children:[(0,i.Y)("span",{"aria-hidden":!0,className:"size-[14px] shrink-0 rounded-[2px] bg-current"}),g]})}return(0,i.FD)(A,{ref:m,variant:"mobile-floating",onPress:a,children:[(0,i.Y)(K,{size:16}),n.hasConversation?b:v]})},e5=n(991080),e8="pointer-events-none flex h-[48px] items-center justify-center overflow-hidden rounded-[12px] bg-[rgba(0,0,0,0.8)] px-200 shadow-[0px_20px_12px_0px_rgba(0,0,0,0.04),0px_9px_9px_0px_rgba(0,0,0,0.07),0px_2px_5px_0px_rgba(0,0,0,0.08)] backdrop-blur-[4px] transition-opacity duration-300 ease-[ease] motion-reduce:transition-none",e7="".concat(e8," absolute top-200 left-1/2 z-40 -translate-x-1/2"),e9="".concat(e8," fixed left-1/2 z-[1003] -translate-x-1/2"),te=(0,s.F)()?function(e){var t,n,a,o,l,s,d,m,p=(0,c.c)(20),h=e.message,b=e.onHidden,v=e.leading,g=e.placement,y=e.viewportTopPx,x=void 0===g?"inline":g,C=void 0===y?16:y,w=(0,u._)((0,f.useState)(0),2),_=w[0],k=w[1];p[0]!==b?(t=()=>{var e=0,t=!1,n=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>{t||k(1)})}),a=globalThis.setTimeout(()=>{t||k(0)},4300),r=globalThis.setTimeout(()=>{t||b()},4600);return()=>{t=!0,cancelAnimationFrame(n),cancelAnimationFrame(e),globalThis.clearTimeout(a),globalThis.clearTimeout(r)}},n=[b],p[0]=b,p[1]=t,p[2]=n):(t=p[1],n=p[2]),(0,f.useEffect)(t,n);var Y="".concat("viewport-top"===x?e9:e7," buyer-chat-mweb-text-size-adjust");p[3]!==x||p[4]!==C?(a="viewport-top"===x?{top:"".concat(C,"px")}:void 0,p[3]=x,p[4]=C,p[5]=a):a=p[5],p[6]!==_||p[7]!==a?(o=(0,r._)({opacity:_},a),p[6]=_,p[7]=a,p[8]=o):o=p[8],p[9]!==h?(l=(0,i.Y)("span",{className:"max-w-[320px] truncate text-body-small leading-[1.4] font-regular tracking-[0] text-[#ffffff]",children:h}),p[9]=h,p[10]=l):l=p[10],p[11]!==v||p[12]!==l?(s=(0,i.FD)("div",{className:"flex items-center gap-[6px]",children:[v,l]}),p[11]=v,p[12]=l,p[13]=s):s=p[13],p[14]!==Y||p[15]!==o||p[16]!==s?(d=(0,i.Y)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:Y,style:o,children:s}),p[14]=Y,p[15]=o,p[16]=s,p[17]=d):d=p[17];var S=d;return"viewport-top"===x&&"undefined"!=typeof document?(p[18]!==S?(m=(0,e5.createPortal)(S,document.body),p[18]=S,p[19]=m):m=p[19],m):S}:function(e){var t=e.message,n=e.onHidden,a=e.leading,o=e.placement,l=void 0===o?"inline":o,s=e.viewportTopPx,c=(0,u._)((0,f.useState)(0),2),d=c[0],m=c[1];(0,f.useEffect)(()=>{var e=0,t=!1,a=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>{t||m(1)})}),r=globalThis.setTimeout(()=>{t||m(0)},4300),o=globalThis.setTimeout(()=>{t||n()},4600);return()=>{t=!0,cancelAnimationFrame(a),cancelAnimationFrame(e),globalThis.clearTimeout(r),globalThis.clearTimeout(o)}},[n]);var p=(0,i.Y)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"".concat("viewport-top"===l?e9:e7," buyer-chat-mweb-text-size-adjust"),style:(0,r._)({opacity:d},"viewport-top"===l?{top:"".concat(void 0===s?16:s,"px")}
1:void 0),children:(0,i.FD)("div",{className:"flex items-center gap-[6px]",children:[a,(0,i.Y)("span",{className:"max-w-[320px] truncate text-body-small leading-[1.4] font-regular tracking-[0] text-[#ffffff]",children:t})]})});return"viewport-top"===l&&"undefined"!=typeof document?(0,e5.createPortal)(p,document.body):p},tt=(0,s.F)()?function(e){var t,n,a,r,o,l,s,m,p,h,b,v,g,y,x,C,w,_=(0,c.c)(49),k=e.state,Y=e.onExpand,S=e.onMessageFeedbackSelect,F=e.getFeedbackToastTop,N=e.expandButtonRef,L=e.replyViewTransitionClassName,R=(0,d.Bd)("buyer-chat-assistant").t,T=(0,f.useRef)(null),z=(0,u._)((0,f.useState)(!1),2),D=z[0],I=z[1],E=(0,u._)((0,f.useState)(null),2),M=E[0],B=E[1];_[0]!==k.type?(t=()=>{var e=T.current;if(e&&"reply"===k.type){var t=()=>I(e.scrollHeight>e.clientHeight);if(t(),"undefined"!=typeof ResizeObserver){var n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()}}},_[0]=k.type,_[1]=t):t=_[1],_[2]!==k?(n=[k],_[2]=k,_[3]=n):n=_[3],(0,f.useLayoutEffect)(t,n),_[4]!==F||_[5]!==S?(a=e=>{null==S||S(e),B(e=>{var t,n;return{key:(null!=(t=null==e?void 0:e.key)?t:0)+1,viewportTopPx:null!=(n=null==F?void 0:F())?n:16}})},_[4]=F,_[5]=S,_[6]=a):a=_[6];var j=a;if("loading"===k.type)return _[7]!==k.message?(r=(0,i.Y)("div",{className:"rounded-turbo-l bg-turbo-container-accent-muted p-turbo-20",children:(0,i.Y)(eD,{message:k.message,tone:"default"})}),_[7]=k.message,_[8]=r):r=_[8],r;if("error"===k.type)return _[9]!==k.message||_[10]!==k.onRetry||_[11]!==k.retryLabel?(o=(0,i.Y)(en,{message:k.message,retryLabel:k.retryLabel,onRetry:k.onRetry}),_[9]=k.message,_[10]=k.onRetry,_[11]=k.retryLabel,_[12]=o):o=_[12],o;_[13]!==R?(l=R("chat-messages-label",null,{fallback:"Chat messages"}),_[13]=R,_[14]=l):l=_[14];var P=l;_[15]!==R?(s=R("mobile-view-chat",null,{fallback:"View chat"}),_[15]=R,_[16]=s):s=_[16];var H=s;_[17]!==R?(m=R("mobile-show-more",null,{fallback:"Show more"}),_[17]=R,_[18]=m):m=_[18];var O=m;_[19]!==R?(p=R("mobile-feedback-toast",null,{fallback:"Thank you for sharing feedback!"}),_[19]=R,_[20]=p):p=_[20];var V=p;_[21]===Symbol.for("react.memo_cache_sentinel")?(h=(0,i.Y)("span",{className:"flex size-turbo-20 shrink-0 items-center justify-center text-turbo-content-default",children:(0,i.Y)(K,{size:16})}),_[21]=h):h=_[21];var q=L?"min-w-0 flex-1 ".concat(L):"min-w-0 flex-1";return _[22]!==k.content?(b=(0,i.Y)(eN,{content:k.content}),_[22]=k.content,_[23]=b):b=_[23],_[24]!==b||_[25]!==q?(v=(0,i.Y)("div",{className:q,"data-testid":"mobile-inline-chat-reply",children:b}),_[24]=b,_[25]=q,_[26]=v):v=_[26],_[27]!==D?(g=D?(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"mobile-inline-chat-fade",className:"pointer-events-none absolute inset-x-0 bottom-0 h-turbo-56 bg-linear-to-t from-turbo-container-accent-muted via-turbo-container-accent-muted/90 via-40% to-turbo-container-accent-muted/10"}):null,_[27]=D,_[28]=g):g=_[28],_[29]!==v||_[30]!==g?(y=(0,i.FD)("div",{ref:T,"data-testid":"mobile-inline-chat-preview",className:"relative flex max-h-[180px] gap-turbo-10 overflow-hidden",children:[h,v,g]}),_[29]=v,_[30]=g,_[31]=y):y=_[31],_[32]!==N||_[33]!==j||_[34]!==D||_[35]!==Y||_[36]!==O||_[37]!==k.feedbackStorageKey||_[38]!==k.messageId||_[39]!==H?(x=D?(0,i.Y)("div",{className:"pt-turbo-4",children:(0,i.Y)(A,{ref:N,variant:"mobile-inline-expand",onPress:()=>Y("show_more"),children:O})}):(0,i.FD)("div",{className:"flex items-center justify-between pt-turbo-12 pl-turbo-24",children:[(0,i.Y)(U,{storageKey:k.feedbackStorageKey,messageId:k.messageId,onSelect:j,variant:"mobile-inline"}),(0,i.Y)(A,{ref:N,variant:"mobile-inline-link",onPress:()=>Y("view_chat"),children:H})]}),_[32]=N,_[33]=j,_[34]=D,_[35]=Y,_[36]=O,_[37]=k.feedbackStorageKey,_[38]=k.messageId,_[39]=H,_[40]=x):x=_[40],_[41]!==V||_[42]!==M?(C=M?(0,i.Y)(te,{message:V,placement:"viewport-top",viewportTopPx:M.viewportTopPx,onHidden:()=>B(null)},M.key):null,_[41]=V,_[42]=M,_[43]=C):C=_[43],_[44]!==P||_[45]!==y||_[46]!==x||_[47]!==C?(w=(0,i.FD)("section",{"aria-label":P,className:"relative flex flex-col overflow-hidden rounded-turbo-l bg-turbo-container-accent-muted px-turbo-20 pt-turbo-20 pb-turbo-16",children:[y,x,C]}),_[44]=P,_[45]=y,_[46]=x,_[47]=C,_[48]=w):w=_[48],w}:function(e){var t=e.state,n=e.onExpand,a=e.onMessageFeedbackSelect,r=e.getFeedbackToastTop,o=e.expandButtonRef,l=e.replyViewTransitionClassName,s=(0,d.Bd)("buyer-chat-assistant").t,c=(0,f.useRef)(null),m=(0,u._)((0,f.useState)(!1),2),p=m[0],h=m[1],b=(0,u._)((0,f.useState)(null),2),v=b[0],g=b[1];(0,f.useLayoutEffect)(()=>{var e=c.current;if(e&&"reply"===t.type){var n=()=>h(e.scrollHeight>e.clientHeight);if(n(),"undefined"!=typeof ResizeObserver){var a=new ResizeObserver(n);return a.observe(e),()=>a.disconnect()}}},[t]);var y=(0,f.useCallback)(e=>{null==a||a(e),g(e=>{var t,n;return{key:(null!=(t=null==e?void 0:e.key)?t:0)+1,viewportTopPx:null!=(n=null==r?void 0:r())?n:16}})},[r,a]);if("loading"===t.type)return(0,i.Y)("div",{className:"rounded-turbo-l bg-turbo-container-accent-muted p-turbo-20",children:(0,i.Y)(eD,{message:t.message,tone:"default"})});if("error"===t.type)return(0,i.Y)(en,{message:t.message,retryLabel:t.retryLabel,onRetry:t.onRetry});var x=s("chat-messages-label",null,{fallback:"Chat messages"}),C=s("mobile-view-chat",null,{fallback:"View chat"}),w=s("mobile-show-more",null,{fallback:"Show more"}
1),_=s("mobile-feedback-toast",null,{fallback:"Thank you for sharing feedback!"});return(0,i.FD)("section",{"aria-label":x,className:"relative flex flex-col overflow-hidden rounded-turbo-l bg-turbo-container-accent-muted px-turbo-20 pt-turbo-20 pb-turbo-16",children:[(0,i.FD)("div",{ref:c,"data-testid":"mobile-inline-chat-preview",className:"relative flex max-h-[180px] gap-turbo-10 overflow-hidden",children:[(0,i.Y)("span",{className:"flex size-turbo-20 shrink-0 items-center justify-center text-turbo-content-default",children:(0,i.Y)(K,{size:16})}),(0,i.Y)("div",{className:l?"min-w-0 flex-1 ".concat(l):"min-w-0 flex-1","data-testid":"mobile-inline-chat-reply",children:(0,i.Y)(eN,{content:t.content})}),p?(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"mobile-inline-chat-fade",className:"pointer-events-none absolute inset-x-0 bottom-0 h-turbo-56 bg-linear-to-t from-turbo-container-accent-muted via-turbo-container-accent-muted/90 via-40% to-turbo-container-accent-muted/10"}):null]}),p?(0,i.Y)("div",{className:"pt-turbo-4",children:(0,i.Y)(A,{ref:o,variant:"mobile-inline-expand",onPress:()=>n("show_more"),children:w})}):(0,i.FD)("div",{className:"flex items-center justify-between pt-turbo-12 pl-turbo-24",children:[(0,i.Y)(U,{storageKey:t.feedbackStorageKey,messageId:t.messageId,onSelect:y,variant:"mobile-inline"}),(0,i.Y)(A,{ref:o,variant:"mobile-inline-link",onPress:()=>n("view_chat"),children:C})]}),v?(0,i.Y)(te,{message:_,placement:"viewport-top",viewportTopPx:v.viewportTopPx,onHidden:()=>g(null)},v.key):null]})},tn=(0,s.F)()?function(e){var t,n,a=(0,c.c)(3),r=e.size,o=void 0===r?16:r;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a[0]=t):t=a[0],a[1]!==o?(n=(0,i.Y)("svg",{"aria-hidden":!0,width:o,height:o,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0 text-[#ffffff]",children:t}),a[1]=o,a[2]=n):n=a[2],n}:function(e){var t=e.size,n=void 0===t?16:t;return(0,i.Y)("svg",{"aria-hidden":!0,width:n,height:n,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0 text-[#ffffff]",children:(0,i.Y)("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},ta=(0,s.F)()?function(e){var t,n,a=(0,c.c)(4),r=e.message,o=e.onHidden;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)(tn,{}),a[0]=t):t=a[0],a[1]!==r||a[2]!==o?(n=(0,i.Y)(te,{message:r,onHidden:o,leading:t}),a[1]=r,a[2]=o,a[3]=n):n=a[3],n}:function(e){var t=e.message,n=e.onHidden;return(0,i.Y)(te,{message:t,onHidden:n,leading:(0,i.Y)(tn,{})})},tr="M8.81836 2.43148C9.32488 0.619773 11.2319 -0.411633 13.0254 0.156088C15.0597 0.800121 15.9696 3.1662 14.8916 5.00765L12.5879 8.9432C12.5264 9.04815 12.572 9.18321 12.6846 9.22933L15.1719 10.2479C16.0356 10.6018 16.5995 11.4433 16.5996 12.3768V13.4285C16.5996 15.8904 17.5192 17.9336 19.2412 19.0828C19.6818 19.3768 19.7476 19.8746 19.6602 20.2098C19.5715 20.5491 19.2515 20.9793 18.6826 20.9793H4.36914C3.62317 20.9793 2.85023 20.6832 2.33398 20.0438C0.921921 18.2947 0.10375 16.1348 0.00878906 13.8807L0 13.4285C0.00017802 10.9079 1.12246 8.61897 2.58008 6.85628C3.22136 6.08091 4.27267 5.90386 5.12988 6.26253L7.26465 7.15609C7.37558 7.20251 7.50181 7.14105 7.53418 7.02523L8.81836 2.43148ZM2.31641 10.2557C1.86739 11.2557 1.59971 12.327 1.59961 13.4285C1.59778 15.4772 2.30112 17.457 3.57812 19.0389C3.74458 19.2451 4.02832 19.3787 4.36914 19.3787H6.47754C5.60772 18.2973 4.97681 17.0362 4.6377 15.6776C4.54416 15.3027 4.77176 14.9228 5.14648 14.8289C5.5214 14.7354 5.9013 14.963 5.99512 15.3377C6.38238 16.8897 7.21507 18.2931 8.38672 19.3787H11.2305C10.9344 18.909 10.7102 18.3943 10.5742 17.8494C10.4807 17.4746 10.7083 17.0947 11.083 17.0008C11.4579 16.9073 11.8378 17.1348 11.9316 17.5096C12.1102 18.2252 12.4918 18.8728 13.0264 19.3787H17.1338C16.118 18.2954 15.4763 16.919 15.1846 15.4041L2.31641 10.2557ZM12.543 1.68148C11.6123 1.38686 10.6223 1.92204 10.3594 2.86214L9.0752 7.45589C8.7839
11 8.49818 7.64582 9.0493 6.64746 8.63167L4.51172 7.7391C4.23232 7.6222 3.95764 7.70183 3.81348 7.87581C3.53622 8.21111 3.27722 8.564 3.04004 8.9305L15.0049 13.7166C15.0024 13.6209 15 13.5248 15 13.4285V12.3768C14.9999 12.0928 14.8282 11.8361 14.5654 11.7284L12.0781 10.7098C11.0652 10.2949 10.654 9.07928 11.207 8.1346L13.5117 4.19906C14.0709 3.24357 13.5983 2.01585 12.543 1.68148Z",to=(0,s.F)()?function(e){var t,n,a,s,u=(0,c.c)(7);u[0]!==e?(t=(0,l._)(e,["size"]),n=e.size,u[0]=e,u[1]=t,u[2]=n):(t=u[1],n=u[2]);var d=void 0===n?24:n;return u[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:tr,fill:"currentColor"}),u[3]=a):a=u[3],u[4]!==t||u[5]!==d?(s=(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:d,height:d,viewBox:"0 0 19.6936 20.9793",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),{children:a})),u[4]=t,u[5]=d,u[6]=s):s=u[6],s}:function(e){var t=e.size,n=void 0===t?24:t,a=(0,l._)(e,["size"]);return(0,i.Y)("svg",(0,o._)((0,r._)({"aria-hidden":!0,width:n,height:n,viewBox:"0 0 19.6936 20.9793",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),{children:(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:tr,fill:"currentColor"})}))},tl=(0,f.forwardRef)((0,s.F)()?function(e,t){var n,a,r,o,l=(0,c.c)(12),s=e.ariaLabel,u=e.tooltipLabel,d=e.disabled,f=e.onClick;l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.Y)(to,{"aria-hidden":!0}),l[0]=n):n=l[0],l[1]!==s||l[2]!==d||l[3]!==f||l[4]!==t?(a=(0,i.Y)(A,{ref:t,variant:"icon-clear","aria-label":s,isDisabled:d,onPress:f,children:n}),l[1]=s,l[2]=d,l[3]=f,l[4]=t,l[5]=a):a=l[5];var m=a;l[6]!==u?(r=(0,i.Y)("span",{children:u}),l[6]=u,l[7]=r):r=l[7];var p=!d;return l[8]!==m||l[9]!==r||l[10]!==p?(o=(0,i.Y)(B,{content:r,isEnabled:p,children:m}),l[8]=m,l[9]=r,l[10]=p,l[11]=o):o=l[11],o}:function(e,t){var n=e.ariaLabel,a=e.tooltipLabel,r=e.disabled,o=e.onClick,l=(0,i.Y)(A,{ref:t,variant:"icon-clear","aria-label":n,isDisabled:r,onPress:o,children:(0,i.Y)(to,{"aria-hidden":!0})});return(0,i.Y)(B,{content:(0,i.Y)("span",{children:a}),isEnabled:!r,children:l})}),ti=n(632076),ts=n(685303),tc=n(699426),tu="fixed inset-0 z-[1100] flex items-center justify-center bg-[rgba(28,32,34,0.32)] p-200",td="w-[384px] min-w-[320px] max-w-[min(384px,95vw)] overflow-hidden rounded-[28px] bg-[#ffffff] shadow-[0px_189px_56.5px_rgba(0,0,0,0.03),0px_84px_42px_rgba(0,0,0,0.04),0px_21px_23px_rgba(0,0,0,0.05)] ring-1 ring-[rgba(0,0,0,0.06)] outline-none forced-colors:[outline-style:solid] forced-colors:outline-1 forced-colors:outline-[ButtonText]",tf=(0,s.F)()?function(e){var t,n,a,r,o=(0,c.c)(16),l=e.isOpen,s=e.title,u=e.description,d=e.cancelLabel,m=e.confirmLabel,p=e.onClose,h=e.onConfirm,b=(0,f.useId)();return o[0]!==p?(t=e=>{e||p()},o[0]=p,o[1]=t):t=o[1],o[2]!==d||o[3]!==m||o[4]!==u||o[5]!==b||o[6]!==h||o[7]!==s?(n=e=>{var t=e.close;return(0,i.FD)("div",{className:"flex w-full flex-col gap-[28px] rounded-[24px] bg-[#ffffff] p-200",children:[(0,i.FD)("div",{className:"flex w-full flex-col gap-200 px-150 pt-150 text-center tracking-[0]",children:[(0,i.Y)(ti.D,{slot:"title",className:"m-0 w-full text-headline-small leading-[1.4] font-medium text-[#242526]",children:s}),(0,i.Y)("p",{id:b,className:"m-0 w-full text-body-small leading-[1.4] font-regular text-[#5e6466]",children:u})]}),(0,i.FD)("div",{className:"flex w-full gap-150",children:[(0,i.Y)(A,{ref:tm,variant:"secondary",onPress:t,children:d}),(0,i.Y)(A,{variant:"primary",onPress:()=>{h(),t()},children:m})]})]})},o[2]=d,o[3]=m,o[4]=u,o[5]=b,o[6]=h,o[7]=s,o[8]=n):n=o[8],o[9]!==b||o[10]!==n?(a=(0,i.Y)(ts.aF,{className:td,children:(0,i.Y)(tc.lG,{role:"alertdialog","aria-describedby":b,className:"outline-none",children:n})}),o[9]=b,o[10]=n,o[11]=a):a=o[11],o[12]!==l||o[13]!==t||o[14]!==a?(r=(0,i.Y)(ts.mH,{isOpen:l,onOpenChange:t,isDismissable:!0,className:"".concat(tu," buyer-chat-mweb-text-size-adjust"),children:a}),o[12]=l,o[13]=t,o[14]=a,o[15]=r):r=o[15],r}:function(e){var t=e.isOpen,n=e.title,a=e.description,r=e.cancelLabel,o=e.confirmLabel,l=e.onClose,s=e.onConfirm,c=(0,f.useId)(),u=(0,f.useCallback)(e=>{null==e||e.focus()},[]);return(0,i.Y)(ts.mH,{isOpen:t,onOpenChange:e=>{e||l()},isDismissable:!0,className:"".concat(tu," buyer-chat-mweb-text-size-adjust"),children:(0,i.Y)(ts.aF,{className:td,children:(0,i.Y)(tc.lG,{role:"alertdialog","aria-describedby":c,className:"outline-none",children:e=>{var t=e.close;return(0,i.FD)("div",{className:"flex w-full flex-col gap-[28px] rounded-[24px] bg-[#ffffff] p-200",children:[(0,i.FD)("div",{className:"flex w-full flex-col gap-200 px-150 pt-150 text-center tracking-[0]",children:[(0,i.Y)(ti.D,{slot:"title",className:"m-0 w-full text-headline-small leading-[1.4] font-medium text-[#242526]",children:n}),(0,i.Y)("p",{id:c,className:"m-0 w-full text-body-small leading-[1.4] font-regular text-[#5e6466]",children:a})]}),(0,i.FD)("div",{className:"flex w-full gap-150",children:[(0,i.Y)(A,{ref:u,variant:"secondary",onPress:t,children:r}),(0,i.Y)(A,{variant:"primary",onPress:()=>{s(),t()},children:o})]})]})}})})})};function tm(e){null==e||e.focus()}var tp=(0,s.F)()?function(e){var t,n=(0,c.c)(2);return n[0]!==e?(t=(0,i.Y)(tf,(0,r._)({},e)),n[0]=e,n[1]=t):t=n[1],t}:function(e){return(0,i.Y)(tf,(0,r._)({},e))},th=(0,s.F)()?function(){var e,t=(0,c.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"size-turbo-24",children:(0,i.Y)("path",{d:"m5 5 14 14M19 5 5 19",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),t[0]=e):e=t[0],e}:function(){return(0,i.Y)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"size-turbo-24",children:(0,i.Y)("path",{d:"m5 5 14 14M19 5 5 19",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})},tb=(0,s.F)()?function(e){var t,n,a,s,m,p,h,b,v,g,y,x,C,w,_,k,Y,S,F,N,L,R,T,z,D,I,E,M,B,j,P,H,O,V,U=(0,c.c)(79);U[0]!==e?(n=(0,l._)(e,["canClearConversation","onClearConversation","onClose","onOpenClearDialog","onDismissClearDialog","title","closeButtonRef","inputRef","latestReplyViewTransitionClassName"]),t=e.canClearConversation,p=e.onClearConversation,h=e.onClose,v=e.onOpenClearDialog,b=e.onDismissClearDialog,g=e.title,a=e.closeButtonRef,s=e.inputRef,m=e.latestReplyViewTransitionClassName,U[0]=e,U[1]=t,U[2]=n,U[3]=a,U[4]=s,U[5]=m,U[6]=p,U[7]=h,U[8]=b,U[9]=v,U[10]=g):(t=U[1],n=U[2],a=U[3],s=U[4],m=U[5],p=U[6],h=U[7],b=U[8],v=U[9],g=U[10]);var K=(0,d.Bd)("buyer-chat-assistant").t,q=(0,f.useRef)(null),X=(0,f.useRef)(null),Z=(0,f.useRef)(!1),$=(0,u._)((0,f.useState)(!1),2),W=$[0],G=$[1],J=(0,u._)((0,f.useState)(0),2),Q=J[0],ee=J[1],et=null!=s?s:q;U[11]!==g||U[12]!==K?(y=null!=g?g:K("mobile-expanded-title",null,{fallback:"Cars"}),U[11]=g,U[12]=K,U[13]=y):y=U[13];var en=y;U[14]!==K?(x=K("mobile-expanded-history",null,{fallback:"AI chat history"}),U[14]=K,U[15]=x):x=U[15];var ea=x;U[16]!==K?(C=K("mobile-expanded-close",null,{fallback:"Close AI chat history"}),U[16]=K,U[17]=C):C=U[17];var er=C;U[18]!==K?(w=K("clear-conversation-button-label",null,{fallback:"Clear conversation"}),U[18]=K,U[19]=w):w=U[19];var eo=w;U[20]!==K?(_=K("clear-conversation-dialog-title",null,{fallback:"Clear chat history and filters?"}),U[20]=K,U[21]=_):_=U[21];var el=_;U[22]!==K?(k=K("clear-conversation-dialog-description",null,{fallback:"Clearing the chat wipes all context and applied filters. This can't be und
1one and previous messages will be permanently deleted."}),U[22]=K,U[23]=k):k=U[23];var ei=k;U[24]!==K?(Y=K("clear-conversation-dialog-cancel",null,{fallback:"Cancel"}),U[24]=K,U[25]=Y):Y=U[25];var es=Y;U[26]!==K?(S=K("clear-conversation-dialog-confirm",null,{fallback:"Clear history"}),U[26]=K,U[27]=S):S=U[27];var ec=S;U[28]!==K?(F=K("clear-conversation-toast",null,{fallback:"Chat cleared"}),U[28]=K,U[29]=F):F=U[29];var eu=F;U[30]!==a||U[31]!==b?(N=()=>{if(G(!1),Z.current){Z.current=!1,queueMicrotask(()=>{var e;return null==a||null==(e=a.current)?void 0:e.focus()});return}null==b||b(),queueMicrotask(()=>{var e;return null==(e=X.current)?void 0:e.focus()})},U[30]=a,U[31]=b,U[32]=N):N=U[32];var ed=N;U[33]!==v?(L=()=>{G(!0),null==v||v()},U[33]=v,U[34]=L):L=U[34];var ef=L;U[35]!==p?(R=()=>{Z.current=!0,p(),ee(tv)},U[35]=p,U[36]=R):R=U[36];var em=R;U[37]!==en?(T=(0,i.Y)("h2",{className:"m-0 text-turbo-headline-small leading-[1.4] font-turbo-semibold text-turbo-content-default",children:en}),U[37]=en,U[38]=T):T=U[38],U[39]!==ea?(z=(0,i.Y)("p",{className:"m-0 mt-turbo-4 text-turbo-body-base leading-[1.4] text-turbo-content-default",children:ea}),U[39]=ea,U[40]=z):z=U[40],U[41]!==T||U[42]!==z?(D=(0,i.FD)("div",{className:"min-w-0 flex-1",children:[T,z]}),U[41]=T,U[42]=z,U[43]=D):D=U[43];var ep=!t;return U[44]!==eo||U[45]!==ef||U[46]!==ep?(I=(0,i.Y)("div",{className:"size-turbo-48",children:(0,i.Y)(tl,{ref:X,ariaLabel:eo,tooltipLabel:eo,disabled:ep,onClick:ef})}),U[44]=eo,U[45]=ef,U[46]=ep,U[47]=I):I=U[47],U[48]===Symbol.for("react.memo_cache_sentinel")?(E=(0,i.Y)(th,{}),U[48]=E):E=U[48],U[49]!==a||U[50]!==er||U[51]!==h?(M=(0,i.Y)("div",{className:"size-turbo-48",children:(0,i.Y)(A,{ref:a,variant:"icon-clear","aria-label":er,onPress:h,children:E})}),U[49]=a,U[50]=er,U[51]=h,U[52]=M):M=U[52],U[53]===Symbol.for("react.memo_cache_sentinel")?(B=(0,i.Y)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-full h-turbo-48 bg-linear-to-b from-turbo-container-default via-turbo-container-default/80 via-40% to-turbo-container-default/10"}),U[53]=B):B=U[53],U[54]!==D||U[55]!==I||U[56]!==M?(j=(0,i.FD)("header",{className:"relative z-30 flex shrink-0 items-start bg-turbo-container-default px-turbo-24 pt-turbo-16",children:[D,I,M,B]}),U[54]=D,U[55]=I,U[56]=M,U[57]=j):j=U[57],U[58]!==n||U[59]!==m||U[60]!==et?(P=(0,i.Y)(eV,(0,o._)((0,r._)({},n),{presentation:"sheet",layout:"fill",inputRef:et,latestReplyViewTransitionClassName:m})),U[58]=n,U[59]=m,U[60]=et,U[61]=P):P=U[61],U[62]!==es||U[63]!==ec||U[64]!==ei||U[65]!==el||U[66]!==em||U[67]!==ed||U[68]!==W?(H=(0,i.Y)(tp,{isOpen:W,title:el,description:ei,cancelLabel:es,confirmLabel:ec,onClose:ed,onConfirm:em}),U[62]=es,U[63]=ec,U[64]=ei,U[65]=el,U[66]=em,U[67]=ed,U[68]=W,U[69]=H):H=U[69],U[70]!==eu||U[71]!==Q?(O=Q>0?(0,i.Y)(ta,{message:eu,onHidden:()=>ee(0)},Q):null,U[70]=eu,U[71]=Q,U[72]=O):O=U[72],U[73]!==ea||U[74]!==j||U[75]!==P||U[76]!==H||U[77]!==O?(V=(0,i.FD)("section",{"aria-label":ea,className:"relative flex min-h-0 w-full flex-1 flex-col bg-turbo-container-default [&_[data-testid=chat-panel-input]]:px-turbo-16 [&_[data-testid=chat-panel-input]]:pb-turbo-12 [&_[data-testid=chat-panel-scroll]]:px-turbo-24",children:[j,P,H,O]}),U[73]=ea,U[74]=j,U[75]=P,U[76]=H,U[77]=O,U[78]=V):V=U[78],V}:function(e){var t=e.canClearConversation,n=e.onClearConversation,a=e.onClose,s=e.onOpenClearDialog,c=e.onDismissClearDialog,m=e.title,p=e.closeButtonRef,h=e.inputRef,b=e.latestReplyViewTransitionClassName,v=(0,l._)(e,["canClearConversation","onClearConversation","onClose","onOpenClearDialog","onDismissClearDialog","title","closeButtonRef","inputRef","latestReplyViewTransitionClassName"]),g=(0,d.Bd)("buyer-chat-assistant").t,y=(0,f.useRef)(null),x=(0,f.useRef)(null),C=(0,f.useRef)(!1),w=(0,u._)((0,f.useState)(!1),2),_=w[0],k=w[1],Y=(0,u._)((0,f.useState)(0),2),S=Y[0],F=Y[1],N=null!=m?m:g("mobile-expanded-title",null,{fallback:"Cars"}),L=g("mobile-expanded-history",null,{fallback:"AI chat history"}),R=g("mobile-expanded-close",null,{fallback:"Close AI chat history"}),T=g("clear-conversation-button-label",null,{fallback:"Clear conversation"}),z=g("clear-conversation-dialog-title",null,{fallback:"Clear chat history and filters?"}),D=g("clear-conversation-dialog-description",null,{fallback:"Clearing the chat wipes all context and applied filters. This can't be und
1one and previous messages will be permanently deleted."}),I=g("clear-conversation-dialog-cancel",null,{fallback:"Cancel"}),E=g("clear-conversation-dialog-confirm",null,{fallback:"Clear history"}),M=g("clear-conversation-toast",null,{fallback:"Chat cleared"}),B=(0,f.useCallback)(()=>{if(k(!1),C.current){C.current=!1,queueMicrotask(()=>{var e;return null==p||null==(e=p.current)?void 0:e.focus()});return}null==c||c(),queueMicrotask(()=>{var e;return null==(e=x.current)?void 0:e.focus()})},[p,c]),j=(0,f.useCallback)(()=>{k(!0),null==s||s()},[s]),P=(0,f.useCallback)(()=>{C.current=!0,n(),F(e=>e+1)},[n]);return(0,i.FD)("section",{"aria-label":L,className:"relative flex min-h-0 w-full flex-1 flex-col bg-turbo-container-default [&_[data-testid=chat-panel-input]]:px-turbo-16 [&_[data-testid=chat-panel-input]]:pb-turbo-12 [&_[data-testid=chat-panel-scroll]]:px-turbo-24",children:[(0,i.FD)("header",{className:"relative z-30 flex shrink-0 items-start bg-turbo-container-default px-turbo-24 pt-turbo-16",children:[(0,i.FD)("div",{className:"min-w-0 flex-1",children:[(0,i.Y)("h2",{className:"m-0 text-turbo-headline-small leading-[1.4] font-turbo-semibold text-turbo-content-default",children:N}),(0,i.Y)("p",{className:"m-0 mt-turbo-4 text-turbo-body-base leading-[1.4] text-turbo-content-default",children:L})]}),(0,i.Y)("div",{className:"size-turbo-48",children:(0,i.Y)(tl,{ref:x,ariaLabel:T,tooltipLabel:T,disabled:!t,onClick:j})}),(0,i.Y)("div",{className:"size-turbo-48",children:(0,i.Y)(A,{ref:p,variant:"icon-clear","aria-label":R,onPress:a,children:(0,i.Y)(th,{})})}),(0,i.Y)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-full h-turbo-48 bg-linear-to-b from-turbo-container-default via-turbo-container-default/80 via-40% to-turbo-container-default/10"})]}),(0,i.Y)(eV,(0,o._)((0,r._)({},v),{presentation:"sheet",layout:"fill",inputRef:null!=h?h:y,latestReplyViewTransitionClassName:b})),(0,i.Y)(tp,{isOpen:_,title:z,description:D,cancelLabel:I,confirmLabel:E,onClose:B,onConfirm:P}),S>0?(0,i.Y)(ta,{message:M,onHidden:()=>F(0)},S):null]})};function tv(e){return e+1}var tg=(0,f.createContext)(null),ty=tg.Provider,tx=((0,s.F)(),()=>(0,f.useContext)(tg)),tC="--listing-buyer-chat-sticky-top",tw="--listing-sidebar-sticky-bottom-gutter",t_="--listing-buyer-chat-sidebar-height",tk="--listing-buyer-chat-sidebar-containing-block-height",tY="top-[var(--listing-buyer-chat-sticky-top)] h-[var(--listing-buyer-chat-sidebar-height)] transition-[top] duration-150 ease-in-out",tS=e=>{e.style.height="",e.style.alignSelf="",e.style.removeProperty(tk)},tF="listing:sidebar:active-tab",tN=new Set(["filters","ai-search"]),tL="filters",tR=new Set,tT=null;function tz(){return tL}function tD(e){return tR.add(e),()=>{tR.delete(e)}}function tA(){if(void 0===globalThis.window)return tL;if(null!==tT)return tT;try{var e=globalThis.window.sessionStorage.getItem(tF);if(e&&tN.has(e))return e}catch(e){}return tL}function tI(e){if(void 0!==globalThis.window){try{globalThis.window.sessionStorage.setItem(tF,e),tT=null}catch(t){tT=e}tR.forEach(e=>e())}}
1var tE=(0,s.F)()?function(e){var t,n,a,l=(0,c.c)(4);return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M17 13.13a3.88 3.88 0 1 1-3.77 4.74H5a.88.88 0 0 1 0-1.75h8.23c.4-1.71 1.93-3 3.77-3m0 1.74a2.13 2.13 0 1 0 0 4.26 2.13 2.13 0 0 0 0-4.25",clipRule:"evenodd"}),n=(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 3.13a3.9 3.9 0 0 1 3.77 3H19a.88.88 0 0 1 0 1.75h-8.23A3.88 3.88 0 1 1 7 3.13m0 1.75a2.13 2.13 0 1 0 0 4.25 2.13 2.13 0 0 0 0-4.26",clipRule:"evenodd"}),l[0]=t,l[1]=n):(t=l[0],n=l[1]),l[2]!==e?(a=(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n]})),l[2]=e,l[3]=a):a=l[3],a}:function(e){return(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M17 13.13a3.88 3.88 0 1 1-3.77 4.74H5a.88.88 0 0 1 0-1.75h8.23c.4-1.71 1.93-3 3.77-3m0 1.74a2.13 2.13 0 1 0 0 4.26 2.13 2.13 0 0 0 0-4.25",clipRule:"evenodd"}),(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 3.13a3.9 3.9 0 0 1 3.77 3H19a.88.88 0 0 1 0 1.75h-8.23A3.88 3.88 0 1 1 7 3.13m0 1.75a2.13 2.13 0 1 0 0 4.25 2.13 2.13 0 0 0 0-4.26",clipRule:"evenodd"})]}))},tM=(0,eo.w)(tE,"FilterIcon"),tB=(0,s.F)()?function(e){var t,n,a,l=(0,c.c
1)(4);return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1.58a1.76 1.76 0 0 1 1.74 1.44l1 5.34a1.1 1.1 0 0 0 .9.9l5.34 1a1.77 1.77 0 0 1 1.03 2.86q-.4.49-1.03.6l-5.34 1.02a1.1 1.1 0 0 0-.85.73l-.04.16-1.01 5.34a1.76 1.76 0 0 1-3.47 0l-1-5.34a1.1 1.1 0 0 0-.9-.9l-5.34-1a1.76 1.76 0 0 1 0-3.47l5.34-1a1.1 1.1 0 0 0 .9-.9l1-5.34A1.76 1.76 0 0 1 12 1.58m0 1.6a.2.2 0 0 0-.15.13l-1.01 5.35a2.7 2.7 0 0 1-2.17 2.17l-5.34 1a.16.16 0 0 0-.1.26l.04.04.05.02 5.35 1.01a2.7 2.7 0 0 1 2.17 2.17l1 5.34a.2.2 0 0 0 .16.14q.06 0 .1-.04l.06-.1 1.01-5.34a2.7 2.7 0 0 1 2.17-2.17l5.35-1a.16.16 0 0 0 .1-.27l-.1-.05-5.35-1.01a2.7 2.7 0 0 1-2.17-2.17l-1-5.35-.06-.1z",clipRule:"evenodd"}),n=(0,i.Y)("path",{fill:"currentColor",d:"M19.42 1.58a.3.3 0 0 1 .3.25l.3 1.66a.6.6 0 0 0 .49.48l1.66.32a.3.3 0 0 1 0 .59l-1.66.31a.6.6 0 0 0-.48.48l-.32 1.67a.3.3 0 0 1-.59 0l-.31-1.67a.6.6 0 0 0-.48-.48l-1.67-.32a.3.3 0 0 1 0-.58l1.67-.32a.6.6 0 0 0 .48-.48l.32-1.66a.3.3 0 0 1 .29-.25"}),l[0]=t,l[1]=n):(t=l[0],n=l[1]),l[2]!==e?(a=(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n]})),l[2]=e,l[3]=a):a=l[3],a}:function(e){return(0,i.FD)("svg",(0,o._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,i.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 1.58a1.76 1.76 0 0 1 1.74 1.44l1 5.34a1.1 1.1 0 0 0 .9.9l5.34 1a1.77 1.77 0 0 1 1.03 2.86q-.4.49-1.03.6l-5.34 1.02a1.1 1.1 0 0 0-.85.73l-.04.16-1.01 5.34a1.76 1.76 0 0 1-3.47 0l-1-5.34a1.1 1.1 0 0 0-.9-.9l-5.34-1a1.76 1.76 0 0 1 0-3.47l5.34-1a1.1 1.1 0 0 0 .9-.9l1-5.34A1.76 1.76 0 0 1 12 1.58m0 1.6a.2.2 0 0 0-.15.13l-1.01 5.35a2.7 2.7 0 0 1-2.17 2.17l-5.34 1a.16.16 0 0 0-.1.26l.04.04.05.02 5.35 1.01a2.7 2.7 0 0 1 2.17 2.17l1 5.34a.2.2 0 0 0 .16.14q.06 0 .1-.04l.06-.1 1.01-5.34a2.7 2.7 0 0 1 2.17-2.17l5.35-1a.16.16 0 0 0 .1-.27l-.1-.05-5.35-1.01a2.7 2.7 0 0 1-2.17-2.17l-1-5.35-.06-.1z",clipRule:"evenodd"}),(0,i.Y)("path",{fill:"currentColor",d:"M19.42 1.58a.3.3 0 0 1 .3.25l.3 1.66a.6.6 0 0 0 .49.48l1.66.32a.3.3 0 0 1 0 .59l-1.66.31a.6.6 0 0 0-.48.48l-.32 1.67a.3.3 0 0 1-.59 0l-.31-1.67a.6.6 0 0 0-.48-.48l-1.67-.32a.3.3 0 0 1 0-.58l1.67-.32a.6.6 0 0 0 .48-.48l.32-1.66a.3.3 0 0 1 .29-.25"})]}))},tj=(0,eo.w)(tB,"SparklesIcon"),tP={filters:"filters-tab","ai-search":"ai-search-tab"},tH={filters:"filters-panel","ai-search":"ai-search-panel"},tO=(0,T.F)("relative overflow-visible",{variants:{size:{large:"h-[48px] w-full",small:"h-[40px] w-fit min-w-[198px]"}},defaultVariants:{size:"large"}}),tV=(0,T.F)("relative grid grid-cols-[repeat(2,minmax(max-content,1fr))] items-center gap-[2px]",{variants:{size:{large:"h-[48px] w-full",small:"h-[40px] w-full"}},defaultVariants:{size:"large"}}),tU=(0,T.F)(["relative z-10 box-border flex w-full flex-1 cursor-pointer appearance-none items-center justify-center gap-[4px] rounded-turbo-s border border-solid font-inherit font-medium tracking-[0] whitespace-nowrap text-turbo-content-default outline-none transition-[background-color,border-color,box-shadow,height]","focus-visible:shadow-[0_0_0_2px_var(--color-turbo-container-default),0_0_0_5px_var(--color-turbo-border-accent)]"],{variants:{size:{large:"px-200 text-[16px] leading-[1.25]",small:"px-[14px] text-[14px] leading-[1.15]"},active:{true:(0,es.A)("pointer-events-none border-turbo-border-default bg-turbo-container-default","shadow-[0_4px_2px_rgba(0,0,0,0.02),0_1px_1px_rgba(0,0,0,0.02)]"),false:"border-transparent bg-transparent hover:bg-turbo-state-default-hover"}},compoundVariants:[{size:"large",active:!0,className:"h-[48px]"},{size:"large",active:!1,className:"h-[44px]"},{size:"small",active:!0,className:"h-[40px]"},{size:"small",active:!1,className:"h-[40px]"}],defaultVariants:{size:"large",active:!1}}),tK="absolute -top-turbo-12 right-[-6px] z-20 inline-flex min-h-turbo-24 origin-center shrink-0 items-center justify-center rounded-turbo-xs bg-turbo-container-accent px-[6px] py-turbo-4 font-inherit text-turbo-footnote leading-turbo-compact font-turbo-medium tracking-turbo-regular text-turbo-content-inverse will-change-[transform,opacity] motion-reduce:animate-none";function tq(){var e,t,n;return null!=(n=null==(e=(t=globalThis).matchMedia)?void 0:e.call(t,"(prefers-reduced-motion: reduce)").matches)&&n}
1var tX=(0,s.F)()?function(e){var t,n,a,r,o,l=(0,c.c)(9),s=e.label,d=e.visible,m=(0,u._)((0,f.useState)(d?"shown":"hidden"),2),p=m[0],h=m[1];d&&"shown"!==p?h("shown"):d||"shown"!==p||h(tq()?"hidden":"exiting"),l[0]!==p?(t=()=>{if("exiting"===p){var e=globalThis.setTimeout(()=>{h(t$)},160);return()=>{globalThis.clearTimeout(e)}}},n=[p],l[0]=p,l[1]=t,l[2]=n):(t=l[1],n=l[2]),(0,f.useEffect)(t,n),l[3]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{e.target===e.currentTarget&&h(tZ)},l[3]=a):a=l[3];var b=a;if("hidden"===p)return null;var v="exiting"===p?"animate-new-badge-exit":"animate-new-badge-enter";return l[4]!==v?(r=(0,es.A)(tK,v),l[4]=v,l[5]=r):r=l[5],l[6]!==s||l[7]!==r?(o=(0,i.Y)("span",{"aria-hidden":!0,className:r,onAnimationEnd:b,children:s}),l[6]=s,l[7]=r,l[8]=o):o=l[8],o}:function(e){var t=e.label,n=e.visible,a=(0,u._)((0,f.useState)(n?"shown":"hidden"),2),r=a[0],o=a[1];n&&"shown"!==r?o("shown"):n||"shown"!==r||o(tq()?"hidden":"exiting"),(0,f.useEffect)(()=>{if("exiting"===r){var e=globalThis.setTimeout(()=>{o(e=>"exiting"===e?"hidden":e)},160);return()=>{globalThis.clearTimeout(e)}}},[r]);var l=(0,f.useCallback)(e=>{e.target===e.currentTarget&&o(e=>"exiting"===e?"hidden":e)},[]);return"hidden"===r?null:(0,i.Y)("span",{"aria-hidden":!0,className:(0,es.A)(tK,"exiting"===r?"animate-new-badge-exit":"animate-new-badge-enter"),onAnimationEnd:l,children:t})};function tZ(e){return"exiting"===e?"hidden":e}function t$(e){return"exiting"===e?"hidden":e}var tW=(0,s.F)()?function(e){var t,n,a=(0,c.c)(13),r=e.id,o=e.isActive,l=e.label,s=e.panelId,u=e.buttonRef,d=e.tabIndex,f=e.size,m=e.onClick,p=e.children;return a[0]!==o||a[1]!==f?(t=tU({size:f,active:o}),a[0]=o,a[1]=f,a[2]=t):t=a[2],a[3]!==u||a[4]!==p||a[5]!==r||a[6]!==o||a[7]!==l||a[8]!==m||a[9]!==s||a[10]!==t||a[11]!==d?(n=(0,i.Y)("button",{id:r,ref:u,role:"tab",type:"button","aria-label":l,"aria-selected":o,"aria-controls":s,tabIndex:d,className:t,onClick:m,children:p}),a[3]=u,a[4]=p,a[5]=r,a[6]=o,a[7]=l,a[8]=m,a[9]=s,a[10]=t,a[11]=d,a[12]=n):n=a[12],n}:function(e){var t=e.id,n=e.isActive,a=e.label,r=e.panelId,o=e.buttonRef,l=e.tabIndex,s=e.size,c=e.onClick,u=e.children;return(0,i.Y)("button",{id:t,ref:o,role:"tab",type:"button","aria-label":a,"aria-selected":n,"aria-controls":r,tabIndex:l,className:tU({size:s,active:n}),onClick:c,children:u})},tG=(0,s.F)()?function(e){var t,n,a,r,o,l,s,u,d,m,p,h,b,v,g,y,x=(0,c.c)(46),C=e.activeTab,w=e.appliedFilterCount,_=e.labels,k=e.onTabChange,Y=e.size,S=void 0===Y?"large":Y;x[0]!==w||x[1]!==_?(t=w>0?_.filtersWithCount(w):_.filters,x[0]=w,x[1]=_,x[2]=t):t=x[2];var F=t,N=(0,f.useRef)(null),L=(0,f.useRef)(null);x[3]!==C||x[4]!==k?(n=e=>{if("ArrowLeft"===e.key||"ArrowRight"===e.key){var t="filters"===C?"ai-search":"filters",n="filters"===t?N.current:L.current;e.preventDefault(),null==n||n.focus(),k(t)}},x[3]=C,x[4]=k,x[5]=n):n=x[5];var R=n;x[6]!==S?(a=tO({size:S}),x[6]=S,x[7]=a):a=x[7];var T="large"===S?"py-[2px]":"py-px";x[8]!==T?(r=(0,es.A)("pointer-events-none absolute inset-0 flex items-center",T),x[8]=T,x[9]=r):r=x[9],x[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.Y)("div",{className:"h-full w-full rounded-turbo-s bg-turbo-container-muted-disabled"}),x[10]=o):o=x[10],x[11]!==r?(l=(0,i.Y)("div",{"aria-hidden":!0,className:r,children:o}),x[11]=r,x[12]=l):l=x[12],x[13]!==S?(s=tV({size:S}),x[13]=S,x[14]=s):s=x[14];var z="filters"===C,D="filters"===C?0:-1;x[15]!==k?(u=()=>k("filters"),x[15]=k,x[16]=u):u=x[16],x[17]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.Y)(tM,{"aria-hidden":!0,size:16,className:"block shrink-0"}),x[17]=d):d=x[17],x[18]!==F||x[19]!==S||x[20]!==z||x[21]!==D||x[22]!==u?(m=(0,i.FD)(tW,{id:tP.filters,buttonRef:N,isActive:z,label:F,panelId:tH.filters,tabIndex:D,size:S,onClick:u,children:[d,F]}),x[18]=F,x[19]=S,x[20]=z,x[21]=D,x[22]=u,x[23]=m):m=x[23];var A="ai-search"===C,I="ai-search"===C?0:-1;x[24]!==k?(p=()=>k("ai-search"),x[24]=k,x[25]=p):p=x[25],x[26]===Symbol.for("react.memo_cache_sentinel")?(h=(0,i.Y)(tj,{"aria-hidden":!0,size:16,className:"block shrink-0"}),x[26]=h):h=x[26];var E="filters"===C;return x[27]!==_.newBadge||x[28]!==E?(b=(0,i.Y)(tX,{label:_.newBadge,visible:E}),x[27]=_.newBadge,x[28]=E,x[29]=b):b=x[29],x[30]!==_.aiSearch||x[31]!==S||x[32]!==A||x[33]!==I||x[34]!==p||x[35]!==b?(v=(0,i.FD)(tW,{id:tP["ai-search"],buttonRef:L,isActive:A,label:_.aiSearch,panelId:tH["ai-search"],tabIndex:I,size:S,onClick:p,children:[h,_.aiSearch,b]}),x[30]=_.aiSearch,x[31]=S,x[32]=A,x[33]=I,x[34]=p,x[35]=b,x[36]=v):v=x[36],x[37]!==R||x[38]!==m||x[39]!==v||x[40]!==s?(g=(0,i.FD)("div",{role:"tablist",className:s,onKeyDown:R,children:[m,v]}),x[37]=R,x[38]=m,x[39]=v,x[40]=s,x[41]=g):g=x[41],x[42]!==g||x[43]!==a||x[44]!==l?(y=(0,i.FD)("div",{className:a,children:[l,g]}),x[42]=g,x[43]=a,x[44]=l,x[45]=y):y=x[45],y}:function(e){var t=e.activeTab,n=e.appliedFilterCount,a=e.labels,r=e.onTabChange,o=e.size,l=void 0===o?"large":o,s=n>0?a.filtersWithCount(n):a.filters,c=(0,f.useRef)(null),u=(0,f.useRef)(null),d=(0,f.useCallback)(e=>{if("ArrowLeft"===e.key||"ArrowRight"===e.key){var n="filters"===t?"ai-search":"filters",a="filters"===n?c.current:u.current;e.preventDefault(),null==a||a.focus(),r(n)}},[t,r]);return(0,i.FD)("div",{className:tO({size:l}
1),children:[(0,i.Y)("div",{"aria-hidden":!0,className:(0,es.A)("pointer-events-none absolute inset-0 flex items-center","large"===l?"py-[2px]":"py-px"),children:(0,i.Y)("div",{className:"h-full w-full rounded-turbo-s bg-turbo-container-muted-disabled"})}),(0,i.FD)("div",{role:"tablist",className:tV({size:l}),onKeyDown:d,children:[(0,i.FD)(tW,{id:tP.filters,buttonRef:c,isActive:"filters"===t,label:s,panelId:tH.filters,tabIndex:"filters"===t?0:-1,size:l,onClick:()=>r("filters"),children:[(0,i.Y)(tM,{"aria-hidden":!0,size:16,className:"block shrink-0"}),s]}),(0,i.FD)(tW,{id:tP["ai-search"],buttonRef:u,isActive:"ai-search"===t,label:a.aiSearch,panelId:tH["ai-search"],tabIndex:"ai-search"===t?0:-1,size:l,onClick:()=>r("ai-search"),children:[(0,i.Y)(tj,{"aria-hidden":!0,size:16,className:"block shrink-0"}),a.aiSearch,(0,i.Y)(tX,{label:a.newBadge,visible:"filters"===t})]})]})]})},tJ=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.getBoundingClientRect(),a=n.top,r=n.bottom,o=n.left,l=n.right,i=window.innerHeight,s=window.innerWidth;return r>t&&a<i&&l>0&&o<s};function tQ(e){var t=e.activeTab,n=e.filtersRef,a=e.getFiltersScrollTopOffsetPx,r=e.scrollToTop,o=(0,f.useRef)(null),l=(0,f.useRef)(r),i=(0,f.useRef)(a);(0,f.useEffect)(()=>{l.current=r,i.current=a},[a,r]),(0,f.useEffect)(()=>{var e=o.current;if("filters"===t&&"ai-search"===e){var a=requestAnimationFrame(()=>{var e=n.current;e&&!tJ(e,i.current())&&l.current(),o.current=t});return()=>{cancelAnimationFrame(a)}}o.current=t},[t,n])}var t0=()=>()=>void 0,t1=(e,t)=>{var n=e.current;n&&(e=>{e.style.removeProperty(tC),e.style.removeProperty(tw),e.style.removeProperty(t_)})(n);var a=t;a||(a=null==n?void 0:n.parentElement),a&&tS(a)},t2=(e,t,n,a)=>{var r=((e,t)=>(0,f.useSyncExternalStore)(t?e.subscribeStickyLayoutChanges:t0,e.getStickyTopOffsetPx,e.getStickyTopOffsetPx))(a,n),o=(0,f.useRef)(r),l=(0,f.useRef)(r),i=(0,f.useRef)(null);(0,f.useLayoutEffect)(()=>{if(!n){i.current=null,t1(e);return}var r=!0,l=null,s=()=>{var n,a=e.current;if(r&&a){var i=a.parentElement,s=o.current;if(i&&t){var c=i.getBoundingClientRect();((e,t)=>{var n="".concat(t,"px");e.style.height!==n&&(e.style.height=n),e.style.setProperty(tk,n),"start"!==e.style.alignSelf&&(e.style.alignSelf="start")})(i,n=Math.round(t.getBoundingClientRect().bottom-c.top)),l=i}else i&&tS(i);var u=void 0===globalThis.window?0:Math.max(0,globalThis.window.innerHeight-s-24),d=void 0===n?u:Math.max(0,Math.min(u,n));((e,t)=>{((e,t)=>{e.style.setProperty(tC,"".concat(t,"px")),e.style.setProperty(tw,"".concat(24,"px"))})(e,Number.parseInt(t[tC],10));var n=t[t_];e.style.getPropertyValue(t_)!==n&&e.style.setProperty(t_,n)})(a,{[tC]:"".concat(s,"px"),[tw]:"".concat(24,"px"),[t_]:"".concat(d,"px")})}};i.current=s,s(),globalThis.addEventListener("resize",s,{passive:!0});var c=a.subscribeStickyLayoutChanges(s),u=null;return"undefined"!=typeof ResizeObserver&&t&&(u=new ResizeObserver(s)).observe(t),()=>{r=!1,i.current=null,globalThis.removeEventListener("resize",s),c(),null==u||u.disconnect(),t1(e,l)}},[e,t,n,a]),(0,f.useLayoutEffect)(()=>{o.current=r;var e,t=l.current;l.current=r,t!==r&&(null==(e=i.current)||e.call(i))},[r])},t3=e=>{(0,f.useLayoutEffect)(()=>{if(e){var t=document.documentElement,n=t.style.overscrollBehaviorY;return t.style.overscrollBehaviorY="none",()=>{t.style.overscrollBehaviorY=n}}},[e])},t4=(0,s.F)()?function(e){var t,n,a,r,o,l,s,d,m,p,h,b,v,g,y,x,C,w,_,k,Y,S,F=(0,c.c)(67),N=e.chat,L=e.banner,R=e.children,T=e.appliedFilterCount,z=e.resultsBoundary,D=e.labels,A=e.page,I=e.onTabChange,E=(0,f.useRef)(null),M=(0,f.useRef)(null),B=(0,f.useRef)(null),j=(0,u._)((0,f.useState)(null),2),P=j[0],H=j[1],O=(0,u._)((0,f.useState)(null),2),V=O[0],U=O[1];F[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{B.current=e,U(e)},F[0]=t):t=F[0];var K=t,q=(0,f.useSyncExternalStore)(tD,tA,tz),X=(0,u._)((0,f.useState)(null),2),Z=X[0],$=X[1],W=null!=Z?Z:q;F[1]!==I?(n=e=>{$(e),tI(e),null==I||I(e)},F[1]=I,F[2]=n):n=F[2];var G=n;F[3]!==W||F[4]!==A.getFiltersScrollTopOffsetPx||F[5]!==A.scrollToTop?(a={activeTab:W,filtersRef:E,getFiltersScrollTopOffsetPx:A.getFiltersScrollTopOffsetPx,scrollToTop:A.scrollToTop},F[3]=W,F[4]=A.getFiltersScrollTopOffsetPx,F[5]=A.scrollToTop,F[6]=a):a=F[6],tQ(a);var J="filters"===W,Q="ai-search"===W;t2(M,z,Q,A),t3(Q),F[7]!==V||F[8]!==P?(r={ref:B,trailingActionsHost:P,chatPanelHost:V},F[7]=V,F[8]=P,F[9]=r):r=F[9];var ee=r,et=L;(0,f.isValidElement)(L)&&(F[10]!==L||F[11]!==Q?(o=(0,f.cloneElement)(L,{isHidden:
1Q}),F[10]=L,F[11]=Q,F[12]=o):o=F[12],et=o);var en=Q&&"sticky z-10 flex min-h-0 flex-col self-start",ea=Q&&tY;F[13]!==en||F[14]!==ea?(l=(0,es.A)(en,ea),F[13]=en,F[14]=ea,F[15]=l):l=F[15];var er=Q?"listing-sidebar-ai-chat":void 0,eo="filters"===W?"mb-300":"relative z-30 shrink-0 bg-background-primary",el="ai-search"===W&&"flex items-stretch gap-turbo-8";F[16]!==el?(s=(0,es.A)(el),F[16]=el,F[17]=s):s=F[17];var ei="ai-search"===W&&"min-w-0 flex-1";F[18]!==ei?(d=(0,es.A)(ei),F[18]=ei,F[19]=d):d=F[19],F[20]!==W||F[21]!==T||F[22]!==G||F[23]!==D?(m=(0,i.Y)(tG,{activeTab:W,appliedFilterCount:T,labels:D,onTabChange:G}),F[20]=W,F[21]=T,F[22]=G,F[23]=D,F[24]=m):m=F[24],F[25]!==d||F[26]!==m?(p=(0,i.Y)("div",{className:d,children:m}),F[25]=d,F[26]=m,F[27]=p):p=F[27],F[28]!==W?(h="ai-search"===W?(0,i.Y)("div",{ref:H,className:"flex h-turbo-48 w-turbo-48 shrink-0 items-center justify-center","data-testid":"listing-sidebar-ai-search-trailing-actions"}):null,F[28]=W,F[29]=h):h=F[29],F[30]!==s||F[31]!==p||F[32]!==h?(b=(0,i.FD)("div",{className:s,children:[p,h]}),F[30]=s,F[31]=p,F[32]=h,F[33]=b):b=F[33],F[34]!==b||F[35]!==eo?(v=(0,i.Y)("div",{className:eo,children:b}),F[34]=b,F[35]=eo,F[36]=v):v=F[36];var ec=Q&&"flex min-h-0 flex-1 flex-col";F[37]!==ec?(g=(0,es.A)(ec),F[37]=ec,F[38]=g):g=F[38];var eu=Q?"listing-sidebar-ai-chat-body":void 0,ed=!J&&"hidden";F[39]!==ed?(y=(0,es.A)(ed),F[39]=ed,F[40]=y):y=F[40];var ef=!J;F[41]!==R||F[42]!==y||F[43]!==ef?(x=(0,i.Y)("div",{id:tH.filters,ref:E,role:"tabpanel",className:y,"aria-labelledby":tP.filters,"aria-hidden":ef,children:R}),F[41]=R,F[42]=y,F[43]=ef,F[44]=x):x=F[44];var em=Q?"relative flex min-h-0 flex-1 flex-col":"hidden";F[45]!==em?(C=(0,es.A)(em),F[45]=em,F[46]=C):C=F[46];var ep=!Q;return F[47]!==N||F[48]!==ee?(w=(0,i.Y)(ty,{value:ee,children:N}),F[47]=N,F[48]=ee,F[49]=w):w=F[49],F[50]!==C||F[51]!==ep||F[52]!==w?(_=(0,i.Y)("div",{id:tH["ai-search"],ref:K,role:"tabpanel",className:C,"aria-labelledby":tP["ai-search"],"aria-hidden":ep,children:w}),F[50]=C,F[51]=ep,F[52]=w,F[53]=_):_=F[53],F[54]!==g||F[55]!==eu||F[56]!==x||F[57]!==_?(k=(0,i.FD)("div",{className:g,"data-testid":eu,children:[x,_]}),F[54]=g,F[55]=eu,F[56]=x,F[57]=_,F[58]=k):k=F[58],F[59]!==v||F[60]!==k||F[61]!==l||F[62]!==er?(Y=(0,i.FD)("aside",{ref:M,className:l,"data-testid":er,children:[v,k]}),F[59]=v,F[60]=k,F[61]=l,F[62]=er,F[63]=Y):Y=F[63],F[64]!==et||F[65]!==Y?(S=(0,i.FD)(i.FK,{children:[Y,et]}),F[64]=et,F[65]=Y,F[66]=S):S=F[66],S}:function(e){var t=e.chat,n=e.banner,a=e.children,r=e.appliedFilterCount,o=e.resultsBoundary,l=e.labels,s=e.page,c=e.onTabChange,d=(0,f.useRef)(null),m=(0,f.useRef)(null),p=(0,f.useRef)(null),h=(0,u._)((0,f.useState)(null),2),b=h[0],v=h[1],g=(0,u._)((0,f.useState)(null),2),y=g[0],x=g[1],C=(0,f.useCallback)(e=>{p.current=e,x(e)},[]),w=(0,f.useSyncExternalStore)(tD,tA,tz),_=(0,u._)((0,f.useState)(null),2),k=_[0],Y=_[1],S=null!=k?k:w,F=(0,f.useCallback)(e=>{Y(e),tI(e),null==c||c(e)},[c]);tQ({activeTab:S,filtersRef:d,getFiltersScrollTopOffsetPx:s.getFiltersScrollTopOffsetPx,scrollToTop:s.scrollToTop});var N="filters"===S,L="ai-search"===S;t2(m,o,L,s),t3(L);var R=(0,f.useMemo)(()=>({ref:p,trailingActionsHost:b,chatPanelHost:y}),[y,b]),T=n;return(0,f.isValidElement)(n)&&(T=(0,f.cloneElement)(n,{isHidden:L})),(0,i.FD)(i.FK,{children:[(0,i.FD)("aside",{ref:m,className:(0,es.A)(L&&"sticky z-10 flex min-h-0 flex-col self-start",L&&tY),"data-testid":L?"listing-sidebar-ai-chat":void 0,children:[(0,i.Y)("div",{className:"filters"===S?"mb-300":"relative z-30 shrink-0 bg-background-primary",children:(0,i.FD)("div",{className:(0,es.A)("ai-search"===S&&"flex items-stretch gap-turbo-8"),children:[(0,i.Y)("div",{className:(0,es.A)("ai-search"===S&&"min-w-0 flex-1"),children:(0,i.Y)(tG,{activeTab:S,appliedFilterCount:r,labels:l,onTabChange:F})}),"ai-search"===S?(0,i.Y)("div",{ref:v,className:"flex h-turbo-48 w-turbo-48 shrink-0 items-center justify-center","data-testid":"listing-sidebar-ai-search-trailing-actions"}):null]})}),(0,i.FD)("div",{className:(0,es.A)(L&&"flex min-h-0 flex-1 flex-col"),"data-testid":L?"listing-sidebar-ai-chat-body":void 0,children:[(0,i.Y)("div",{id:tH.filters,ref:d,role:"tabpanel",className:(0,es.A)(!N&&"hidden"),"aria-labelledby":tP.filters,"aria-hidden":!N,children:a}),(0,i.Y)("div",{id:tH["ai-search"],ref:C,role:"tabpanel",className:(0,es.A)(L?"relative flex min-h-0 flex-1 flex-col":"hidden"),"aria-labelledby":tP["ai-search"],"aria-hidden":!L,children:(0,i.Y)(ty,{value:R,children:t})})]})]}),T]})},t6=n(503472),t5=n(383055),t8="listing:cars",t7="chatassistant:page-origin-handoff",t9=null,ne=!1;function nt(){try{var e=sessionStorage.getItem(t7);if(!e)return null;var t=JSON.parse(e);if("object"!=typeof t||null===t||"homepage"!==t.from&&"listing"!==t.from||"string"!=typeof t.sourceHref||!t.sourceHref||void 0!==t.targetHref&&"string"!=typeof t.targetHref)return null;return t}catch(e){return null}}function nn(e,t){if((null==t9?void 0:t9.page)===e)return t9.origin;var n=nt();try{sessionStorage.removeItem(t7)}catch(e){}var a=(null==n?void 0:n.sourceHref)===document.referrer,r=t||(null==n?void 0:n.targetHref)&&n.targetHref===window.location.href||a,o=n&&n.from!==e&&r?"from_".concat(n.from):e;return t9={page:e,origin:o},ne=!1,o}
1function na(e,t){try{if(!t&&ne&&(null==(n=nt())?void 0:n.targetHref))return;var n,a=(0,r._)({from:e,sourceHref:window.location.href},t&&{targetHref:new URL(t,window.location.href).href});sessionStorage.setItem(t7,JSON.stringify(a)),ne=!0}catch(e){}}var nr=(0,n(346686).UG)("\n query BuyerChatAssistantTurn(\n $input: BuyerChatAssistantInput!\n $includeUrl: Boolean! = false\n ) {\n aiBuyerChatAssistant(input: $input) {\n __typename\n ... on BuyerChatAssistantOutput {\n sessionId\n responseText\n url @include(if: $includeUrl)\n appliedFilters {\n name\n value\n }\n sortedBy\n suggestedFilterPrompts {\n label\n message\n }\n conversationState {\n messages {\n role\n content\n }\n }\n }\n ... on BuyerChatAssistantError {\n message\n }\n ... on BuyerChatAssistantBadInput {\n message\n }\n ... on BuyerChatAssistantNotAvailable {\n message\n }\n }\n }\n");function no(e){return e.map(e=>({name:e.name,value:e.value}))}function nl(e){return e.conversationState.messages.map((t,n)=>({id:"".concat(e.sessionId,"-").concat(n,"-").concat(t.role.toLowerCase()),role:"ASSISTANT"===t.role?"assistant":"user",content:t.content}))}function ni(e,t){var n=function(e){if(void 0===globalThis.window)return[];try{var t=globalThis.window.sessionStorage.getItem(h(e));if(!t)return[];return C(t)}catch(e){return[]}}(e);return n.length>0?n:t}function ns(e){var t=e.messages,n=e.currentFilters,a=e.lastChatAppliedFilters,o=e.sortedBy;return(0,r._)({messages:t.map(e=>({role:"assistant"===e.role?"ASSISTANT":"USER",content:e.content})),currentFilters:no(n),lastChatAppliedFilters:a},void 0===o?{}:{sortedBy:o})}async function nc(e,t){var n,a=t.sessionId,o=t.message,l=t.conversationState,i=t.includeUrl,s=t.signal,c=t.pageOrigin,u=(0,r._)({input:{sessionId:a,message:o,conversationState:l,pageOrigin:c}},i?{includeUrl:!0}:{}),d=await (n=e.query(nr,u,{requestPolicy:"network-only",fetchOptions:{timeout:3e4}}),new Promise((e,t)=>{if(null==s?void 0:s.aborted)return void t(new DOMException("Aborted","AbortError"));var a=null,r=!1,o=()=>{null==a||a.unsubscribe(),t(new DOMException("Aborted","AbortError"))};null==s||s.addEventListener("abort",o,{once:!0}),a=n.subscribe(t=>{t.stale||t.hasNext||(r=!0,null==s||s.removeEventListener("abort",o),null==a||a.unsubscribe(),e(t))}),r&&a.unsubscribe()})),f=d.data,m=d.error;if(m)throw m;var p=null==f?void 0:f.aiBuyerChatAssistant;if(!p)throw Error("Missing aiBuyerChatAssistant response");return"BuyerChatAssistantOutput"!==p.__typename||0===p.conversationState.messages.length?{status:"error"}:{status:"ok",output:p}}var nu=n(469058),nd=n.n(nu);function nf(e){(0,f.useEffect)(()=>{"function"==typeof performance.getEntriesByType&&performance.getEntriesByType("navigation").some(e=>"back_forward"===e.type)?nn(e,!0):nn(e,!1);var t=!1,n=!1,a=!1,r=null,o=()=>{nd().events.off("routeChangeError",i),nd().events.off("routeChangeComplete",s)},l=(a,o)=>{o.shallow||(na(e,a),r=a,t=!0,n=!1)},i=(e,l)=>{if(l===r){try{sessionStorage.removeItem(t7)}catch(e){}ne=!1,r=null,t=!1,n=!0,a&&o()}},s=e=>{e===r&&(r=null,n=!0,a&&o())},c=()=>{na(e),t9=null,ne=!1},u=t=>{t.persisted&&(t9=null,nn(e,!0))};return nd().events.on("routeChangeStart",l),nd().events.on("routeChangeError",i),nd().events.on("routeChangeComplete",s),window.addEventListener("pagehide",c),window.addEventListener("pageshow",u),()=>{nd().events.off("routeChangeStart",l),window.removeEventListener("pagehide",c),window.removeEventListener("pageshow",u),a=!0,t&&(t9=null),(!t||n)&&o()}},[e])}function nm(e){var t,n,a,l,i,s,c,m,y,x,C,L,R,T,z,D,A,I,E,M,B,j,P,H,O,V,U,K,q,X,Z,$,W,G,J,Q,ee,et,en,ea,er,eo,el,ei,es,eu,ed,ef,em,ep,eh,eb,ev,eg,ey,ex,eC,ew,e_,ek,eY,eS,eF=e.appliedFilters,eN=e.location,eL=e.sortedBy,eR=e.onApplyFilters,eT=e.onError,ez=e.onSessionIdChange;nf("listing");var eD=(0,d.Bd)("buyer-chat-assistant").t,eA=(0,t5.tH)(),eI=(0,f.useRef)({}),eE=(0,f.useMemo)(()=>[{label:eD("prompt-car-for-city-life",null,{fallback:"A car for city life"}),icon:"search"},{label:eD("prompt-automatic-suv-under",null,{fallback:"Automatic SUV under â¬25k"}),icon:"search"}
1,{label:eD("prompt-help-me-choose",null,{fallback:"Help me choose"}),icon:"chat"}],[eD]),eM=eD("there-was-an-error-sending-prompt",null,{fallback:"There was an error sending your prompt, please try again."}),eB=eD("there-was-an-error-generating-response",null,{fallback:"There was an error generating a response, please try again."}),ej=(0,f.useCallback)(async e=>{var t,n,a,r,o,l,i,s,c,u,d,f=e.message,m=e.history,p=e.sessionId,h=e.signal,b=(s=ni(t8,m),c=Y(t8),ns({messages:s,currentFilters:(d=new Set((u=no(eF)).map(e=>e.name)),(null==eN?void 0:eN.city)&&d.has("city_id")&&!d.has("city")&&u.push({name:"city",value:eN.city}),(null==eN?void 0:eN.voivodeship)&&(d.has("city_id")||d.has("region_id"))&&!d.has("voivodeship")&&u.push({name:"voivodeship",value:eN.voivodeship}),u),lastChatAppliedFilters:c,sortedBy:eL})),v=await nc(eA,{sessionId:p,message:f,conversationState:b,signal:h,pageOrigin:nn("listing",!1)});return"error"===v.status?{status:"error"}:(t=v.output,n=eR,a=eI,r=t8,o=Object.fromEntries(t.suggestedFilterPrompts.map(e=>[e.label,e.message])),k(r,nl(t)),l=[...t.appliedFilters],i={status:"ok",sessionId:t.sessionId,reply:t.responseText,suggestedChips:t.suggestedFilterPrompts.map(e=>({label:e.label})),afterMessagesPersisted:()=>{var e;n(l,null!=(e=t.sortedBy)?e:null),S(r,no(l))}},a.current=o,i)},[eF,eN,eR,eL,eA]),eP=(n=(t={storageKey:t8,sendTurn:ej,errorMessage:eM,sendPromptErrorMessage:eM,generateResponseErrorMessage:eB,initialChips:eE,resolveChipPrompt:(0,f.useCallback)(e=>{var t,n=null!=(t=eI.current[e.label])?t:e.label;return n===e.label?{message:n}:{message:n,displayContent:e.label}},[]),onError:eT,onSessionIdChange:ez}).storageKey,a=t.sendTurn,l=t.errorMessage,i=t.sendPromptErrorMessage,s=t.generateResponseErrorMessage,m=void 0===(c=t.initialChips)?eX:c,x=void 0===(y=t.resolveChipPrompt)?eq:y,C=t.onError,L=t.onSessionIdChange,R=(0,f.useId)(),M=(z=(T=(0,u._)((0,f.useState)({storageKey:n,messages:[],historyLoaded:!1}),2))[0],D=T[1],z.storageKey!==n&&D({storageKey:n,messages:[],historyLoaded:!1}),(0,f.useEffect)(()=>{var e=!1;return queueMicrotask(()=>{e||D(e=>e.storageKey!==n?e:{storageKey:n,messages:w(n),historyLoaded:!0})}),()=>{e=!0}},[n]),A=(0,f.useCallback)(e=>{_(n,e),D(t=>t.storageKey===n?(0,o._)((0,r._)({},t),{messages:e}):t)},[n]),I=(0,f.useCallback)(e=>{D(t=>t.storageKey===n?(0,o._)((0,r._)({},t),{messages:e}):t)},[n]),E={messages:z.messages,replaceMessages:A,setTransientMessages:I,historyLoaded:z.historyLoaded}).messages,B=E.replaceMessages,j=E.setTransientMessages,P=E.historyLoaded,O=(H=(0,u._)((0,f.useState)(m),2))[0],V=H[1],K=(U=(0,u._)((0,f.useState)(!1),2))[0],q=U[1],Z=(X=(0,u._)((0,f.useState)(!1),2))[0],$=X[1],G=(W=(0,u._)((0,f.useState)(null),2))[0],J=W[1],ee=(Q=(0,u._)((0,f.useState)(n),2))[0],et=Q[1],ee!==n&&(et(n),V(m),q(!1),$(!1),J(null)),K||Z||O.length===m.length&&O.every((e,t)=>{var n,a;return e.label===(null==(n=m[t])?void 0:n.label)&&e.icon===(null==(a=m[t])?void 0:a.icon)})||V(m),en=(0,f.useRef)(null),ea=(0,f.useRef)(null),er=(0,f.useRef)(""),eo=(0,f.useRef)(void 0),el=(0,f.useRef)(null),ei=(0,f.useRef)(!1),es=(0,f.useRef)(0),eu=(0,f.useRef)(null),ed=(0,f.useRef)(a),ef=(0,f.useRef)(x),em=(0,f.useRef)(C),ep=(0,f.useRef)(L),eh=(0,f.useRef)(O),eb=(0,f.useRef)(K),(0,f.useEffect)(()=>{ed.current=a},[a]),(0,f.useEffect)(()=>{ef.current=x},[x]),(0,f.useEffect)(()=>{em.current=C},[C]),(0,f.useEffect)(()=>{ep.current=L},[L]),(0,f.useEffect)(()=>{eh.current=O},[O]),(0,f.useEffect)(()=>{eb.current=K},[K]),ev=(0,f.useCallback)(e=>{if(en.current!==e&&(en.current=e,e)){var t;null==(t=ep.current)||t.call(ep,e)}},[]),(0,f.useEffect)(()=>{es.current+=1,ei.current=!1,ev(null),ea.current=null,er.current="",eo.current=void 0,el.current=null},[ev,n]),(0,f.useEffect)(()=>()=>{es.current+=1,ei.current=!1},[]),eg=(0,f.useCallback)(()=>{ea.current=n,ev(F(n))},[ev,n]),ey=(0,f.useCallback)(()=>{var e=w(n),t=eK(e);return t.length!==e.length&&B(t),t},[B,n]),(0,f.useEffect)(()=>{P&&(ei.current||ey(),eg())},[P,ey,n,eg]),ex=(0,f.useCallback)(async function(e,t){var a,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.trim(),u=e.trim();if((er.current=u,eo.current=t,el.current=c,ec(e))&&!ei.current){var d=es.current+1;es.current=d,ei.current=!0;var f=new AbortController;eu.current=f,ea.current!==n&&eg();var m=null!=(_=en.current)?_:eU();ev(m);var p=eh.current,h=eb.current;V([]),J(null),$(!0);var b=eK(w(n)),v=!1,g=()=>{j(b),V(p),q(h)};try{var y,x,C,_,k,Y,S=await ed.current({sessionId:m,message:u,history:b,signal:f.
1signal});if(es.current!==d){v=!0;return}if(f.signal.aborted)return void g();if("error"===S.status){V(p),q(h),J(null!=s?s:l),null==(k=em.current)||k.call(em,"generating_results");return}(ev(S.sessionId),N(n,S.sessionId),S.messages)?B((y=S.messages,x=new Map(b.flatMap(e=>e.displayContent?[[e.id,e.displayContent]]:[])),C=y.findLastIndex(e=>"user"===e.role&&e.content===u),y.map((e,n)=>{var a,l=t&&n===C?t:null!=(a=e.displayContent)?a:x.get(e.id);return l?(0,o._)((0,r._)({},e),{displayContent:l}):e}))):B([...b,(0,r._)({id:"".concat(R,"-user-").concat(Date.now()),role:"user",content:u},t?{displayContent:t}:void 0),{id:"".concat(R,"-assistant-").concat(Date.now()),role:"assistant",content:S.reply}]),q(!0),V(S.suggestedChips);try{null==(Y=S.afterMessagesPersisted)||Y.call(S)}catch(e){}}catch(e){if(es.current!==d){v=!0;return}if(f.signal.aborted)return void g();V(p),q(h),J(null!=i?i:l),null==(a=em.current)||a.call(em,"prompt_sending")}finally{v||(ei.current=!1,$(!1))}}},[l,s,R,B,i,j,ev,n,eg]),eC=(0,f.useCallback)(()=>{var e;return ei.current?(null==(e=eu.current)||e.abort(),el.current):null},[]),ew=(0,f.useCallback)(e=>{!ei.current&&ec(e)&&(j([...ey(),{id:"".concat(R,"-user-").concat(Date.now()),role:"user",content:e}]),ex(e))},[R,ey,j,ex]),e_=(0,f.useCallback)(e=>{if(!ei.current){var t=ef.current(e),n=t.message,a=t.displayContent;ec(n)&&(j([...ey(),(0,r._)({id:"".concat(R,"-user-").concat(Date.now()),role:"user",content:n},a?{displayContent:a}:void 0)]),ex(n,a,null))}},[R,ey,j,ex]),ek=(0,f.useCallback)(()=>{ex(er.current,eo.current,el.current)},[ex]),eY=(0,f.useCallback)(()=>{if(ei.current){var e;null==(e=eu.current)||e.abort(),es.current+=1,ei.current=!1,$(!1)}!function(e){if(void 0!==globalThis.window)try{globalThis.window.sessionStorage.removeItem(p(e)),globalThis.window.sessionStorage.removeItem(h(e)),globalThis.window.sessionStorage.removeItem(b(e)),globalThis.window.sessionStorage.removeItem(v(e)),globalThis.window.sessionStorage.removeItem(g(e))}catch(e){return}}(n),B([]),J(null),q(!1),V(m),er.current="",eo.current=void 0,el.current=null;var t=eU();N(n,t),ea.current=n,ev(t)},[m,B,ev,n]),eS=P&&!K&&eK(M).length>0,{messages:M,loading:Z,errorMessage:G,historyLoaded:P,suggestedChips:eS?[]:O,sendMessage:ew,chipClick:e_,retry:ek,stop:eC,canClearConversation:P&&!Z&&M.length>0,clearConversation:eY}),eH=eP.messages,eO=eP.loading,eV=eP.errorMessage,eZ=eP.historyLoaded,e$=eP.suggestedChips,eW=eP.sendMessage,eG=eP.chipClick,eJ=eP.retry,eQ=eP.stop,e0=eP.canClearConversation,e1=eP.clearConversation,e2=(0,f.useCallback)(()=>{eI.current={},e1()},[e1]);return{messages:eH,loading:eO,historyLoaded:eZ,suggestedChips:e$,errorMessage:eV,inputPlaceholder:eD("describe-your-needs",null,{fallback:"Describe your needs"}),inputSendLabel:eD("send-message",null,{fallback:"Send message"}),inputLoadingLabel:eD("loading-response",null,{fallback:"AI is responding"}),inputStopLabel:eD("stop-generating",null,{fallback:"Stop generating"}),loadingMessage:eD("thinking",null,{fallback:"Thinking"}),retryLabel:eD("try-again",null,{fallback:"Try again"}),feedbackStorageKey:t8,onSendMessage:eW,onChipClick:eG,onRetry:eJ,onStopTurn:eQ,canClearConversation:e0,clearConversation:e2}}var np=n(236616),nh=(0,np.eU)({mode:"idle"}),nb=(0,np.eU)(null),nv=(0,np.eU)(null),ng=(0,np.eU)(""),ny=(0,np.eU)(!1),nx=(0,np.eU)(null),nC=(0,np.eU)(null),nw=(0,np.eU)(null),n_=(0,np.eU)(null),nk=(0,np.eU)(!1);function nY(e,t,n,a,r,o,l){e({mode:"idle"}),t(""),n(!1),a(null),r(!1),o(null),l(null)}var nS="buyer-chat-mweb-reply-vt",nF="buyer-chat-mweb-sheet-vt",nN="buyer-chat-mweb-vt-active";function nL(){document.documentElement.classList.remove(nN)}function nR(e,t){var n,a,r,o,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=l.skipAnimation,s=l.onAnimatedStart,c=null==(o=document.startViewTransition)?void 0:o.bind(document);if(void 0!==i&&i||!c||null!=(r=null==(n=(a=globalThis).matchMedia)?void 0:n.call(a,"(prefers-reduced-motion: reduce)").matches)&&r){e(),t();return}null==s||s();try{document.documentElement.classList.add(nN),document.documentElement.offsetHeight;var u=c(e),d=()=>{nL(),t()};u.finished.then(d,d)}catch(n){nL(),e(),t()}}function nT(e){if("undefined"==typeof document||"fixed"!==document.body.style.position)return Math.round(e);var t=Number.parseFloat(document.body.style.top)||0;return Math.round(e-window.scrollY-t)}function nz(){var e,t;null==(t=document.activeElement)||null==(e=t.blur)||e.call(t)}function nD(){var e,t,n=document.querySelector(".".concat(nS));if(!n)return!1;var a=n.getBoundingClientRect(),r=a.top,o=a.bottom,l=null!=(t=null==(e=window.visualVie
1wport)?void 0:e.height)?t:window.innerHeight;return o>0&&r<l}var nA=(0,s.F)()?function(){var e,t=(0,c.c)(4),n=(0,u._)((0,t6.fp)(ny),2),a=n[0],r=n[1],o=(0,t6.Xr)(nh);return t[0]!==a||t[1]!==r||t[2]!==o?(e=(e,t)=>{var n=void 0===t?{}:t,l=n.animate,i=n.onAccepted,s=n.onCommitted,c=n.onFinished;if(a)return!1;null==i||i();var u=!1;return nR(()=>{u||(u=!0,(0,e5.flushSync)(()=>{o(e),r(!1)}),null==s||s())},()=>{null==c||c()},{skipAnimation:!(void 0===l||l),onAnimatedStart:()=>r(!0)}),!0},t[0]=a,t[1]=r,t[2]=o,t[3]=e):e=t[3],e}:function(){var e=(0,u._)((0,t6.fp)(ny),2),t=e[0],n=e[1],a=(0,t6.Xr)(nh);return(0,f.useCallback)(function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.animate,l=r.onAccepted,i=r.onCommitted,s=r.onFinished;if(t)return!1;null==l||l();var c=!1;return nR(()=>{c||(c=!0,(0,e5.flushSync)(()=>{a(e),n(!1)}),null==i||i())},()=>{null==s||s()},{skipAnimation:!(void 0===o||o),onAnimatedStart:()=>n(!0)}),!0},[t,n,a])},nI=(0,s.F)()?function(e){var t,n=(0,c.c)(8),a=(0,t6.Pj)(),r=(0,t6.Xr)(nx),o=(0,t6.Xr)(nk),l=(0,t6.md)(n_),i=(0,t6.md)(nv),s=nA();return n[0]!==l||n[1]!==i||n[2]!==e||n[3]!==o||n[4]!==r||n[5]!==a||n[6]!==s?(t=()=>{var t=nD();s({mode:"expanded",animateReply:t},{animate:t,onAccepted:()=>{null==i||i.onOpenExpanded(),r(e),o(!1)},onFinished:()=>{if("expanded"===a.get(nh).mode){var e;null==l||null==(e=l.current)||e.focus({preventScroll:!0})}}})},n[0]=l,n[1]=i,n[2]=e,n[3]=o,n[4]=r,n[5]=a,n[6]=s,n[7]=t):t=n[7],t}:function(e){var t=(0,t6.Pj)(),n=(0,t6.Xr)(nx),a=(0,t6.Xr)(nk),r=(0,t6.md)(n_),o=(0,t6.md)(nv),l=nA();return(0,f.useCallback)(()=>{var i=nD();l({mode:"expanded",animateReply:i},{animate:i,onAccepted:()=>{null==o||o.onOpenExpanded(),n(e),a(!1)},onFinished:()=>{if("expanded"===t.get(nh).mode){var e;null==r||null==(e=r.current)||e.focus({preventScroll:!0})}}})},[r,o,e,a,n,t,l])},nE=(0,s.F)()?function(e){var t,n=(0,c.c)(11),a=void 0!==e&&e,r=(0,t6.Pj)(),o=(0,t6.md)(nh),l=(0,t6.md)(nx),i=(0,t6.md)(nC),s=(0,t6.md)(nw),u=(0,t6.md)(nk),d=(0,t6.md)(nv),f=nA();return n[0]!==i||n[1]!==s||n[2]!==a||n[3]!==d||n[4]!==o.animateReply||n[5]!==o.mode||n[6]!==u||n[7]!==l||n[8]!==r||n[9]!==f?(t=()=>{var e=r.get(ng);f(e.trim()?{mode:"composing",defaultValue:e,autoFocus:a}:{mode:a?"composing":"idle"},{animate:"expanded"===o.mode&&o.animateReply,onCommitted:()=>null==d?void 0:d.onCloseExpanded(u),onFinished:()=>{if("idle"===r.get(nh).mode){var e,t,n="inline"===l?s:i;null==(e=null!=(t=null==n?void 0:n.current)?t:null==i?void 0:i.current)||e.focus({preventScroll:!0})}}})},n[0]=i,n[1]=s,n[2]=a,n[3]=d,n[4]=o.animateReply,n[5]=o.mode,n[6]=u,n[7]=l,n[8]=r,n[9]=f,n[10]=t):t=n[10],t}:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,t6.Pj)(),n=(0,t6.md)(nh),a=(0,t6.md)(nx),r=(0,t6.md)(nC),o=(0,t6.md)(nw),l=(0,t6.md)(nk),i=(0,t6.md)(nv),s=nA();return(0,f.useCallback)(()=>{var c=t.get(ng);s(c.trim()?{mode:"composing",defaultValue:c,autoFocus:e}:{mode:e?"composing":"idle"},{animate:"expanded"===n.mode&&n.animateReply,onCommitted:()=>null==i?void 0:i.onCloseExpanded(l),onFinished:()=>{if("idle"===t.get(nh).mode){var e,n,l="inline"===a?o:r;null==(e=null!=(n=null==l?void 0:l.current)?n:null==r?void 0:r.current)||e.focus({preventScroll:!0})}}})},[r,o,e,i,n,l,a,t,s])},nM=(0,s.F)()?function(e){var t,n=(0,c.c)(5),a=e.analytics,r=(0,u._)((0,t6.fp)(nh),2),o=r[0],l=r[1],s=nE(!0),d="expanded"===o.mode;return n[0]!==a||n[1]!==s||n[2]!==d||n[3]!==l?(t=(0,i.Y)(e3,{onOpen:()=>{var e;if(null==a||null==(e=a.onOpenFilters)||e.call(a,"filter_bar"),d)return void s();l({mode:"composing"})}}),n[0]=a,n[1]=s,n[2]=d,n[3]=l,n[4]=t):t=n[4],t}:function(e){var t=e.analytics,n=(0,u._)((0,t6.fp)(nh),2),a=n[0],r=n[1],o=nE(!0),l="expanded"===a.mode;return(0,i.Y)(e3,{onOpen:()=>{var e;if(null==t||null==(e=t.onOpenFilters)||e.call(t,"filter_bar"),l)return void o();r({mode:"composing"})}})},nB=(0,s.F)()?function(e){var t,n,a,r,o,l=(0,c.c)(36),s=e.analytics,u=e.getFeedbackToastTop,d=(0,t6.md)(nb),m=(0,t6.md)(nh),p=(0,t6.md)(nw),h=(0,f.useRef)(null),b=nI("inline");l[0]!==s||l[1]!==b?(y=e=>{var t;null==s||null==(t=s.onOpenFilters)||t.call(s,e),b()},l[0]=s,l[1]=b,l[2]=y):y=l[2];var v=y;l[3]!==(null==d?void 0:d.loading)?(x=()=>
1{if(null==d?void 0:d.loading){var e;null==(e=h.current)||e.scrollIntoView({behavior:"smooth",block:"center"})}},l[3]=null==d?void 0:d.loading,l[4]=x):x=l[4];var g=null==d?void 0:d.loading;if(l[5]!==g?(C=[g],l[5]=g,l[6]=C):C=l[6],(0,f.useLayoutEffect)(x,C),!d||"expanded"===m.mode)return null;if(d.loading){l[7]===Symbol.for("react.memo_cache_sentinel")?(w={paddingBlock:"var(--spacing-turbo-16)"},l[7]=w):w=l[7];var y,x,C,w,_,k,Y=null!=p?p:void 0;return l[8]!==d.loadingMessage?(_={type:"loading",message:d.loadingMessage},l[8]=d.loadingMessage,l[9]=_):_=l[9],l[10]!==v||l[11]!==Y||l[12]!==_?(k=(0,i.Y)("div",{ref:h,style:w,children:(0,i.Y)(tt,{expandButtonRef:Y,state:_,onExpand:v})}),l[10]=v,l[11]=Y,l[12]=_,l[13]=k):k=l[13],k}if(d.errorMessage){l[14]===Symbol.for("react.memo_cache_sentinel")?(S={paddingBlock:"var(--spacing-turbo-16)"},l[14]=S):S=l[14];var S,F,N,L=null!=p?p:void 0;return l[15]!==d.errorMessage||l[16]!==d.onRetry||l[17]!==d.retryLabel?(F={type:"error",message:d.errorMessage,retryLabel:d.retryLabel,onRetry:d.onRetry},l[15]=d.errorMessage,l[16]=d.onRetry,l[17]=d.retryLabel,l[18]=F):F=l[18],l[19]!==v||l[20]!==L||l[21]!==F?(N=(0,i.Y)("div",{style:S,children:(0,i.Y)(tt,{expandButtonRef:L,state:F,onExpand:v})}),l[19]=v,l[20]=L,l[21]=F,l[22]=N):N=l[22],N}l[23]!==d.messages?(t=d.messages.findLast(nj),l[23]=d.messages,l[24]=t):t=l[24];var R=t;if(!R||!d.historyLoaded)return null;l[25]===Symbol.for("react.memo_cache_sentinel")?(n={paddingBlock:"var(--spacing-turbo-16)"},l[25]=n):n=l[25];var T=null!=p?p:void 0,z=null!=(a=R.displayContent)?a:R.content;l[26]!==d.feedbackStorageKey||l[27]!==R.id||l[28]!==z?(r={type:"reply",messageId:R.id,content:z,feedbackStorageKey:d.feedbackStorageKey},l[26]=d.feedbackStorageKey,l[27]=R.id,l[28]=z,l[29]=r):r=l[29];var D=null==s?void 0:s.onMessageFeedbackSelect;return l[30]!==u||l[31]!==v||l[32]!==D||l[33]!==T||l[34]!==r?(o=(0,i.Y)("div",{style:n,children:(0,i.Y)(tt,{expandButtonRef:T,replyViewTransitionClassName:nS,state:r,onMessageFeedbackSelect:D,getFeedbackToastTop:u,onExpand:v})}),l[30]=u,l[31]=v,l[32]=D,l[33]=T,l[34]=r,l[35]=o):o=l[35],o}:function(e){var t,n=e.analytics,a=e.getFeedbackToastTop,r=(0,t6.md)(nb),o=(0,t6.md)(nh),l=(0,t6.md)(nw),s=(0,f.useRef)(null),c=nI("inline"),u=(0,f.useCallback)(e=>{var t;null==n||null==(t=n.onOpenFilters)||t.call(n,e),c()},[n,c]);if((0,f.useLayoutEffect)(()=>{if(null==r?void 0:r.loading){var e;null==(e=s.current)||e.scrollIntoView({behavior:"smooth",block:"center"})}},[null==r?void 0:r.loading]),!r||"expanded"===o.mode)return null;if(r.loading)return(0,i.Y)("div",{ref:s,style:{paddingBlock:"var(--spacing-turbo-16)"},children:(0,i.Y)(tt,{expandButtonRef:null!=l?l:void 0,state:{type:"loading",message:r.loadingMessage},onExpand:u})});if(r.errorMessage)return(0,i.Y)("div",{style:{paddingBlock:"var(--spacing-turbo-16)"},children:(0,i.Y)(tt,{expandButtonRef:null!=l?l:void 0,state:{type:"error",message:r.errorMessage,retryLabel:r.retryLabel,onRetry:r.onRetry},onExpand:u})});var d=r.messages.findLast(e=>"assistant"===e.role);return d&&r.historyLoaded?(0,i.Y)("div",{style:{paddingBlock:"var(--spacing-turbo-16)"},children:(0,i.Y)(tt,{expandButtonRef:null!=l?l:void 0,replyViewTransitionClassName:nS,state:{type:"reply",messageId:d.id,content:null!=(t=d.displayContent)?t:d.content,feedbackStorageKey:r.feedbackStorageKey},onMessageFeedbackSelect:null==n?void 0:n.onMessageFeedbackSelect,getFeedbackToastTop:a,onExpand:u})}):null};function nj(e){return"assistant"===e.role}var nP=(0,s.F)()?function(e){var t,n,a,s,m,p,h,b,v,g,y,x,C,w,_,k,Y,S,F=(0,c.c)(81),N=e.chat,L=e.title,R=e.privacyPolicyUrl,T=e.expandedTop,z=e.onClearPageFilters,D=e.analytics,A=e.isCompactEntryHidden,I=(0,d.Bd)("buyer-chat-assistant").t,E=(0,u._)((0,t6.fp)(nh),2),M=E[0],B=E[1],j=(0,t6.md)(ng),P=(0,t6.Xr)(ng),H=(0,t6.Xr)(nk),O=(0,t6.Xr)(nx),V=(0,t6.md)(nC),U=(0,t6.Xr)(n_),K=(0,f.useRef)(null),q=nE(),X="expanded"===M.mode;F[0]!==U?(t=()=>{U(K)},n=[U],F[0]=U,F[1]=t,F[2]=n):(t=F[1],n=F[2]),(0,f.useLayoutEffect)(t,n),F[3]!==X||F[4]!==B?(a=()=>{X||B({mode:"idle"})},F[3]=X,F[4]=B,F[5]=a):a=F[5];var Z=a;F[6]!==D||F[7]!==N||F[8]!==Z||F[9]!==P?(s=e=>{var t;nz(),N.onSendMessage(e),null==D||null==(t=D.onSendMessage)||t.call(D),P(""),Z()},F[6]=D,F[7]=N,F[8]=Z,F[9]=P,F[10]=s):s=F[10];var $=s;F[11]!==D||F[12]!==N||F[13]!==Z||F[14]!==P?(m=e=>{var t,n;nz(),null==(t=N.onChipClick)||t.call(N,e),null==D||null==(n=D.onChipSelect)||n.call(D,e),P(""),Z()},F[11]=D,F[12]=N,F[13]=Z,F[14]=P,F[15]=m):m=F[15];var W=m;F[16]!==D||F[17]!==N||F[18]!==X||F[19]!==P||F[20]!==B?(p=()=>{var e,t,n=N.loading,a=null!=(e=N.onStopTurn())?e:null;
1return(n&&(null==D||null==(t=D.onStop)||t.call(D)),a)?(P(a),X||B({mode:"composing",defaultValue:a,autoFocus:!1}),a):(X||B({mode:"idle"}),null)},F[16]=D,F[17]=N,F[18]=X,F[19]=P,F[20]=B,F[21]=p):p=F[21];var G=p;F[22]!==D||F[23]!==N||F[24]!==X||F[25]!==z||F[26]!==P||F[27]!==B||F[28]!==H||F[29]!==O?(h=()=>{var e;null==D||null==(e=D.onClearConversationConfirm)||e.call(D),N.clearConversation(),X&&(O("entry"),H(!0)),z(),P(""),B({mode:"expanded",animateReply:!1})},F[22]=D,F[23]=N,F[24]=X,F[25]=z,F[26]=P,F[27]=B,F[28]=H,F[29]=O,F[30]=h):h=F[30];var J=h,Q=N.messages.length>0;F[31]!==D||F[32]!==B?(b=()=>{var e;null==D||null==(e=D.onOpenFilters)||e.call(D,"sticky_button"),B({mode:"composing"})},F[31]=D,F[32]=B,F[33]=b):b=F[33];var ee=b;F[34]!==P||F[35]!==B?(v=()=>{P(""),B({mode:"idle"})},F[34]=P,F[35]=B,F[36]=v):v=F[36];var et=v;"composing"===M.mode?(F[37]!==N.loading||F[38]!==M.autoFocus||F[39]!==M.defaultValue?(y={type:"composing",defaultValue:M.defaultValue,autoFocus:M.autoFocus,loading:N.loading},F[37]=N.loading,F[38]=M.autoFocus,F[39]=M.defaultValue,F[40]=y):y=F[40],g=y):N.loading?(F[41]===Symbol.for("react.memo_cache_sentinel")?(x={type:"loading"},F[41]=x):x=F[41],g=x):(F[42]!==Q?(C={type:"idle",hasConversation:Q},F[42]=Q,F[43]=C):C=F[43],g=C);var en="composing"===g.type,ea=void 0!==A&&A&&!en,er=e0(en||X),eo=er.bottomOffset,el=er.documentBottom;F[44]!==el||F[45]!==en?(w=en?nT(el):void 0,F[44]=el,F[45]=en,F[46]=w):w=F[46];var ei=w;if(F[47]!==N){N.onSendMessage,N.onChipClick,N.onStopTurn,N.clearConversation;var ec=N.canClearConversation,eu=(0,l._)(N,["onSendMessage","onChipClick","onStopTurn","clearConversation","canClearConversation"]);_=ec,k=eu,F[47]=N,F[48]=_,F[49]=k}else _=F[48],k=F[49];F[50]!==(null==D?void 0:D.onCharacterLimitReached)||F[51]!==(null==D?void 0:D.onDismissClearDialog)||F[52]!==(null==D?void 0:D.onInputFocus)||F[53]!==(null==D?void 0:D.onMessageFeedbackSelect)||F[54]!==(null==D?void 0:D.onOpenClearDialog)||F[55]!==_||F[56]!==N.suggestedChips||F[57]!==k||F[58]!==q||F[59]!==ei||F[60]!==j||F[61]!==V||F[62]!==g||F[63]!==T||F[64]!==W||F[65]!==J||F[66]!==et||F[67]!==ee||F[68]!==$||F[69]!==G||F[70]!==ea||F[71]!==en||F[72]!==X||F[73]!==eo||F[74]!==R||F[75]!==P||F[76]!==I||F[77]!==L?(Y=X?(0,i.Y)("div",{className:"fixed inset-x-0 z-[1001] flex justify-center bg-turbo-container-default ".concat(nF),style:{top:T,bottom:eo},children:(0,i.Y)("div",{className:"flex h-full min-h-0 w-full max-w-[768px]",children:(0,i.Y)(tb,(0,o._)((0,r._)({},k),{title:L,suggestedChips:N.suggestedChips,privacyPolicyUrl:R,canClearConversation:_,onClearConversation:J,onOpenClearDialog:null==D?void 0:D.onOpenClearDialog,onDismissClearDialog:null==D?void 0:D.onDismissClearDialog,onClose:q,onSendMessage:$,onChipClick:W,onStopClick:G,onInputFocus:null==D?void 0:D.onInputFocus,onCharacterLimitReached:null==D?void 0:D.onCharacterLimitReached,onMessageFeedbackSelect:null==D?void 0:D.onMessageFeedbackSelect,inputDefaultValue:j,onInputValueChange:P,closeButtonRef:K,latestReplyViewTransitionClassName:nS}))})}):(0,i.FD)(i.FK,{children:[en?(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"mobile-chat-dismiss-layer",className:"fixed inset-0 z-1101",onClick:et}):null,(0,i.Y)("div",{role:"group","aria-label":I("mobile-ai-search",null,{fallback:"AI Search"}),"aria-hidden":ea||void 0,"data-testid":"mobile-chat-compact-entry",className:(0,es.A)("pointer-events-none inset-x-0 flex justify-center",{"absolute z-1102 h-0":en,"fixed z-1000 px-turbo-24 transition-[translate,visibility] duration-300 ease-in-out":!en,"invisible translate-y-[200%]":ea,"visible translate-y-0":!en&&!ea}),style:{bottom:en?void 0:24,top:ei,"--buyer-chat-keyboard-offset":"".concat(eo,"px")},children:(0,i.Y)("div",{className:(0,es.A)("pointer-events-auto w-full",{"flex max-w-[600px] justify-center":!en,"absolute inset-x-0 bottom-0":en}),children:(0,i.Y)(e6,{state:g,privacyPolicyUrl:R,onOpen:ee,onSendMessage:$,onStop:G,onChipClick:W,onInputFocus:null==D?void 0:D.onInputFocus,onCharacterLimitReached:null==D?void 0:D.onCharacterLimitReached,onDraftChange:P,openButtonRef:null!=V?V:void 0})})})]}),F[50]=null==D?void 0:D.onCharacterLimitReached,F[51]=null==D?void 0:D.onDismissClearDialog,F[52]=null==D?void 0:D.onInputFocus,F[53]=null==D?void 0:D.onMessageFeedbackSelect,F[54]=null==D?void 0:D.onOpenClearDialog,F[55]=_,F[56]=N.suggestedChips,F[57]=k,F[58]=q,F[59]=ei,F[60]=j,F[61]=V,F[62]=g,F[63]=T,F[64]=W,F[65]=J,F[66]=et,F[67]=ee,F[68]=$,F[69]=G,F[70]=ea,F[71]=en,F[72]=X,F[73]=eo,F[74]=R,F[75]=P,F[76]=I,F[77]=L,F[78]=Y):Y=F[78];var ed=Y;return"undefined"==typeof document?null:(F[79]!==ed?(S=(0,e5.createPortal)((0,i.Y)("div",{className:"buyer-chat-mweb-text-size-adjust contents",children:ed}),document.body),F[79]=ed,F[80]=S):S=F[80],S)}:function(e){var t,n=e.chat,a=e.title,s=e.privacyPolicyUrl,c=e.expandedTo
1p,m=e.onClearPageFilters,p=e.analytics,h=e.isCompactEntryHidden,b=(0,d.Bd)("buyer-chat-assistant").t,v=(0,u._)((0,t6.fp)(nh),2),g=v[0],y=v[1],x=(0,t6.md)(ng),C=(0,t6.Xr)(ng),w=(0,t6.Xr)(nk),_=(0,t6.Xr)(nx),k=(0,t6.md)(nC),Y=(0,t6.Xr)(n_),S=(0,f.useRef)(null),F=nE(),N="expanded"===g.mode;(0,f.useLayoutEffect)(()=>{Y(S)},[Y]);var L=(0,f.useCallback)(()=>{N||y({mode:"idle"})},[N,y]),R=(0,f.useCallback)(e=>{var t;nz(),n.onSendMessage(e),null==p||null==(t=p.onSendMessage)||t.call(p),C(""),L()},[p,n,L,C]),T=(0,f.useCallback)(e=>{var t,a;nz(),null==(t=n.onChipClick)||t.call(n,e),null==p||null==(a=p.onChipSelect)||a.call(p,e),C(""),L()},[p,n,L,C]),z=(0,f.useCallback)(()=>{var e,t,a=n.loading,r=null!=(e=n.onStopTurn())?e:null;return(a&&(null==p||null==(t=p.onStop)||t.call(p)),r)?(C(r),N||y({mode:"composing",defaultValue:r,autoFocus:!1}),r):(N||y({mode:"idle"}),null)},[p,n,N,C,y]),D=(0,f.useCallback)(()=>{var e;null==p||null==(e=p.onClearConversationConfirm)||e.call(p),n.clearConversation(),N&&(_("entry"),w(!0)),m(),C(""),y({mode:"expanded",animateReply:!1})},[p,n,N,m,C,y,w,_]),A=n.messages.length>0,I=(0,f.useCallback)(()=>{var e;null==p||null==(e=p.onOpenFilters)||e.call(p,"sticky_button"),y({mode:"composing"})},[p,y]),E=(0,f.useCallback)(()=>{C(""),y({mode:"idle"})},[C,y]),M="composing"===(t="composing"===g.mode?{type:"composing",defaultValue:g.defaultValue,autoFocus:g.autoFocus,loading:n.loading}:n.loading?{type:"loading"}:{type:"idle",hasConversation:A}).type,B=void 0!==h&&h&&!M,j=e0(M||N),P=j.bottomOffset,H=j.documentBottom,O=M?nT(H):void 0;n.onSendMessage,n.onChipClick,n.onStopTurn,n.clearConversation;var V=n.canClearConversation,U=(0,l._)(n,["onSendMessage","onChipClick","onStopTurn","clearConversation","canClearConversation"]),K=N?(0,i.Y)("div",{className:"fixed inset-x-0 z-[1001] flex justify-center bg-turbo-container-default ".concat(nF),style:{top:c,bottom:P},children:(0,i.Y)("div",{className:"flex h-full min-h-0 w-full max-w-[768px]",children:(0,i.Y)(tb,(0,o._)((0,r._)({},U),{title:a,suggestedChips:n.suggestedChips,privacyPolicyUrl:s,canClearConversation:V,onClearConversation:D,onOpenClearDialog:null==p?void 0:p.onOpenClearDialog,onDismissClearDialog:null==p?void 0:p.onDismissClearDialog,onClose:F,onSendMessage:R,onChipClick:T,onStopClick:z,onInputFocus:null==p?void 0:p.onInputFocus,onCharacterLimitReached:null==p?void 0:p.onCharacterLimitReached,onMessageFeedbackSelect:null==p?void 0:p.onMessageFeedbackSelect,inputDefaultValue:x,onInputValueChange:C,closeButtonRef:S,latestReplyViewTransitionClassName:nS}))})}):(0,i.FD)(i.FK,{children:[M?(0,i.Y)("div",{"aria-hidden":!0,"data-testid":"mobile-chat-dismiss-layer",className:"fixed inset-0 z-1101",onClick:E}):null,(0,i.Y)("div",{role:"group","aria-label":b("mobile-ai-search",null,{fallback:"AI Search"}),"aria-hidden":B||void 0,"data-testid":"mobile-chat-compact-entry",className:(0,es.A)("pointer-events-none inset-x-0 flex justify-center",{"absolute z-1102 h-0":M,"fixed z-1000 px-turbo-24 transition-[translate,visibility] duration-300 ease-in-out":!M,"invisible translate-y-[200%]":B,"visible translate-y-0":!M&&!B}),style:{bottom:M?void 0:24,top:O,"--buyer-chat-keyboard-offset":"".concat(P,"px")},children:(0,i.Y)("div",{className:(0,es.A)("pointer-events-auto w-full",{"flex max-w-[600px] justify-center":!M,"absolute inset-x-0 bottom-0":M}),children:(0,i.Y)(e6,{state:t,privacyPolicyUrl:s,onOpen:I,onSendMessage:R,onStop:z,onChipClick:T,onInputFocus:null==p?void 0:p.onInputFocus,onCharacterLimitReached:null==p?void 0:p.onCharacterLimitReached,onDraftChange:C,openButtonRef:null!=k?k:void 0})})})]});return"undefined"==typeof document?null:(0,e5.createPortal)((0,i.Y)("div",{className:"buyer-chat-mweb-text-size-adjust contents",children:K}),document.body)},nH=(0,s.F)()?function(e){var t,n,a,l,i,s,u,d,m,p,h,b,v,g,y,x=(0,c.c)(47),C=e.appliedFilters,w=e.location,_=e.sortedBy,k=e.onApplyFilters,Y=e.onError,S=e.onSessionIdChange,F=e.pageEffects,N=e.onExpandedChange,L=e.onReadyChange,R=e.onRetryTracking,T=(0,t6.md)(nh),z=(0,t6.Pj)(),D=(0,t6.Xr)(nh),A=(0,t6.Xr)(nb),I=(0,t6.Xr)(ng),E=(0,t6.Xr)(ny),M=(0,t6.Xr)(nx),B=(0,t6.Xr)(nC),j=(0,t6.Xr)(nw),P=(0,t6.Xr)(nk),H=(0,t6.Xr)(nv),O=(0,f.useRef)(null),V=(0,f.useRef)(null);x[0]!==k||x[1]!==P||x[2]!==z?(t=(e,t)=>
1{var n="expanded"===z.get(nh).mode;n&&P(!0),k(e,t,n)},x[0]=k,x[1]=P,x[2]=z,x[3]=t):t=x[3];var U=t;x[4]!==C||x[5]!==U||x[6]!==w||x[7]!==Y||x[8]!==S||x[9]!==_?(n={appliedFilters:C,location:w,sortedBy:_,onApplyFilters:U,onError:Y,onSessionIdChange:S},x[4]=C,x[5]=U,x[6]=w,x[7]=Y,x[8]=S,x[9]=_,x[10]=n):n=x[10];var K=nm(n);x[11]!==K||x[12]!==R?(a=()=>{null==R||R(),K.onRetry()},x[11]=K,x[12]=R,x[13]=a):a=x[13],x[14]!==K||x[15]!==a?(l=(0,o._)((0,r._)({},K),{onRetry:a}),x[14]=K,x[15]=a,x[16]=l):l=x[16];var q=l;x[17]!==A||x[18]!==q?(i=()=>{A(q)},s=[A,q],x[17]=A,x[18]=q,x[19]=i,x[20]=s):(i=x[19],s=x[20]),(0,f.useLayoutEffect)(i,s),x[21]!==B||x[22]!==j?(u=()=>{B(O),j(V)},d=[B,j],x[21]=B,x[22]=j,x[23]=u,x[24]=d):(u=x[23],d=x[24]),(0,f.useLayoutEffect)(u,d),x[25]!==F||x[26]!==H?(p=()=>{H(F)},m=[F,H],x[25]=F,x[26]=H,x[27]=m,x[28]=p):(m=x[27],p=x[28]),(0,f.useLayoutEffect)(p,m),x[29]!==L||x[30]!==A||x[31]!==I||x[32]!==H||x[33]!==D||x[34]!==P||x[35]!==M||x[36]!==E?(h=()=>(null==L||L(!0),()=>{null==L||L(!1),nY(D,I,E,M,P,A,H)}),b=[L,A,I,H,D,P,M,E],x[29]=L,x[30]=A,x[31]=I,x[32]=H,x[33]=D,x[34]=P,x[35]=M,x[36]=E,x[37]=h,x[38]=b):(h=x[37],b=x[38]),(0,f.useEffect)(h,b),x[39]!==N||x[40]!==T.mode?(v=()=>{N("expanded"===T.mode)},g=[N,T.mode],x[39]=N,x[40]=T.mode,x[41]=v,x[42]=g):(v=x[41],g=x[42]),(0,f.useLayoutEffect)(v,g);var X="expanded"===T.mode,Z="composing"===T.mode;return x[43]!==X||x[44]!==Z||x[45]!==q?(y={chat:q,isExpanded:X,isComposing:Z},x[43]=X,x[44]=Z,x[45]=q,x[46]=y):y=x[46],y}:function(e){var t=e.appliedFilters,n=e.location,a=e.sortedBy,l=e.onApplyFilters,i=e.onError,s=e.onSessionIdChange,c=e.pageEffects,u=e.onExpandedChange,d=e.onReadyChange,m=e.onRetryTracking,p=(0,t6.md)(nh),h=(0,t6.Pj)(),b=(0,t6.Xr)(nh),v=(0,t6.Xr)(nb),g=(0,t6.Xr)(ng),y=(0,t6.Xr)(ny),x=(0,t6.Xr)(nx),C=(0,t6.Xr)(nC),w=(0,t6.Xr)(nw),_=(0,t6.Xr)(nk),k=(0,t6.Xr)(nv),Y=(0,f.useRef)(null),S=(0,f.useRef)(null),F=nm({appliedFilters:t,location:n,sortedBy:a,onApplyFilters:(0,f.useCallback)((e,t)=>{var n="expanded"===h.get(nh).mode;n&&_(!0),l(e,t,n)},[l,_,h]),onError:i,onSessionIdChange:s}),N=(0,f.useMemo)(()=>(0,o._)((0,r._)({},F),{onRetry:()=>{null==m||m(),F.onRetry()}}),[F,m]);return(0,f.useLayoutEffect)(()=>{v(N)},[v,N]),(0,f.useLayoutEffect)(()=>{C(Y),w(S)},[C,w]),(0,f.useLayoutEffect)(()=>{k(c)},[c,k]),(0,f.useEffect)(()=>(null==d||d(!0),()=>{null==d||d(!1),nY(b,g,y,x,_,v,k)}),[d,v,g,k,b,_,x,y]),(0,f.useLayoutEffect)(()=>{u("expanded"===p.mode)},[u,p.mode]),{chat:N,isExpanded:"expanded"===p.mode,isComposing:"composing"===p.mode}},nO=(0,s.F)()?function(e){var t,n=(0,c.c)(2),a=e.children;return n[0]!==a?(t=(0,i.Y)("div",{className:"buyer-chat-mweb-text-size-adjust contents",children:a}),n[0]=a,n[1]=t):t=n[1],t}:function(e){var t=e.children;return(0,i.Y)("div",{className:"buyer-chat-mweb-text-size-adjust contents",children:t})},nV=f.useLayoutEffect,nU=(0,s.F)()?function(e){var t,n,a,r,o,l,s,d,m,p,h,b=(0,c.c)(37),v=e.portalHost,g=e.toastHost,y=e.canClear,x=e.labels,C=e.onClear,w=e.onFocusChatInput,_=e.onOpenClearDialog,k=e.onDismissClearDialog,Y=(0,f.useId)(),S=(0,f.useRef)(null),F=(0,f.useRef)(!1),N=(0,f.useRef)(!1),L=(0,u._)((0,f.useState)(!1),2),R=L[0],T=L[1],z=(0,u._)((0,f.useState)(null),2),D=z[0],A=z[1];b[0]!==y||b[1]!==w?(t=()=>{N.current&&!y&&(N.current=!1,queueMicrotask(w))},n=[y,w],b[0]=y,b[1]=w,b[2]=t,b[3]=n):(t=b[2],n=b[3]),nV(t,n),b[4]!==y||b[5]!==_?(a=()=>{y&&(T(!0),null==_||_())},b[4]=y,b[5]=_,b[6]=a):a=b[6];var I=a;b[7]!==k?(r=()=>{T(!1),F.current||null==k||k(),F.current=!1,N.current||queueMicrotask(()=>{var e;return null==(e=S.current)?void 0:e.focus()})},b[7]=k,b[8]=r):r=b[8];var E=r;b[9]!==C||b[10]!==Y?(o=()=>{F.current=!0,T(!1),N.current=!0,C(),A("".concat(Y,"-").concat(Date.now()))},b[9]=C,b[10]=Y,b[11]=o):o=b[11];var M=o;b[12]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{A(null)},b[12]=l):l=b[12];var B=l,j=!y;b[13]!==I||b[14]!==x.buttonAriaLabel||b[15]!==x.tooltip||b[16]!==j?(s=(0,i.Y)(tl,{ref:S,ariaLabel:x.buttonAriaLabel,tooltipLabel:x.tooltip,disabled:j,onClick:I}),b[13]=I,b[14]=x.buttonAriaLabel,b[15]=x.tooltip,b[16]=j,b[17]=s):s=b[17];var P=s;return b[18]!==P||b[19]!==v?(d=v?(0,e5.createPortal)(P,v):null,b[18]=P,b[19]=v,b[20]=d):d=b[20],b[21]!==E||b[22]!==M||b[23]!==R||b[24]!==x.dialogCancel||b[25]!==x.dialogConfirm||b[26]!==x.dialogDescription||b[27]!==x.dialogTitle?(m=(0,i.Y)(tp,{isOpen:R,title:x.dialogTitle,description:x.dialogDescription,cancelLabel:x.dialogCancel,confirmLabel:x.dialogConfirm,onClose:E,onConfirm:M}),b[21]=E,b[22]=M,b[23]=R,b[24]=x.dialogCancel,b[25]=x.dialogConfirm,b[26]=x.dialogDescription,b[27]=x.dialogTitle,b[28]=m):m=b[28],b[29]!==x.toastMessage||b[30]!==g||b[31]!==D?(p=g&&D?(0,e5.createPortal)((0,i.Y)(ta,{message:x.toastMessage,onHidden:B},D),g):null,b[29]=x.toastMessage,b[30]=g,b[31]=D,b[32]=p):p=b[32],b[33]!==m||b[34]!==p||b[35]!==d?(h=(0,i.FD)(i.FK,{children:[d,m,p]}),b[33]=m,b[34]=p,b[35]=d,b[36]=h):h=b[36],h}:function(e){var t=e.portalHost,n=e.toastHost,a=e.canClear,r=e.labels,o=e.onClear,l=e.onFocusChatInput,s=e.onOpenClearDialog,c=e.onDismissClearDialog,d=(0,f.useId)(),m=(0,f.useRef)(null),p=(0,f.useRef)(!1),h=(0,f.useRef)(!1),b=(0,u._)((0,f.useState)(!1),2),v=b[0],g=b[1],y=(0,u._)((0,f.useState)(null),2),x=y[0],C=y[1];nV(()=>{h.current&&!a&&(h.current=!1,queueMicrotask(l))},[a,l]);var w=(0,f.useCallback)(()=>{a&&(g(!0),null==s||s())},[a,s]),_=(0,f.useCallback)(()=>{g(!1),p.current||null==c||c(),p.current=!1,h.current||queueMicrotask(()=>{var e;return null==(e=m.current)?void 0:e.focus()})},[c]),k=(0,f.useCallback)(()=>{p.current=!0,g(!1),h.current=!0,o(),C("".concat(d,"-").concat(Date.now()))},[o,d]),Y=(0,f.useCallback)(()=>{C(null)},[]),S=(0,i.Y)(tl,{ref:m,ariaLabel:r.buttonAriaLabel,tooltipLabel:r.tooltip,disabled:!a,onClick:w});return(0,i.FD)(i.FK,{children:[t?(0,e5.createPortal)(S,t):null,(0,i.Y)(tp,{isOpen:v,title:r.dialogTitle,description:r.dialogDescription,cancelLabel:r.dialogCancel,confirmLabel:r.dialogConfirm,onClose:_,onConfirm:k}),n&&x?(0,e5.createPortal)((0,i.Y)(ta,{message:r.toastMessage,onHidden:Y},x),n):null]})};function nK(e){var t=e.categoryId;nf("homepage");var n=(0,d.Bd)("buyer-chat-assistant").t,a=(0,t5.tH)(),r=(0,u._)((0,f.useState)(!1),2),o=r[0],l=r[1],i=(0,u._)((0,f.useState)(null),2),s=i[0],c=i[1],m=(0,f.useRef)(!1),p=n("there-was-an-error-sending-prompt",null,{fallback:"There was an error sending your prompt, please try again."});return{submitPrompt:(0,f.useCallback)(async e=>{var n=e.trim();if(!ec(n)||m.current)return{status:"error"};m.current=!0,l(!0),c(null);try{var r,o,i=null!=(r=F(t8))?r:eU(),s=w(t8),u=ni(t8,s),d=ns({messages:u,currentFilters:[{name:"category_id",value:t}],lastChatAppliedFilters:Y(t8)}
1),f=await nc(a,{sessionId:i,message:n,conversationState:d,includeUrl:!0,pageOrigin:nn("homepage",!1)});if("error"===f.status)return c(p),{status:"error"};var h=f.output,b=Date.now(),v=[{id:"".concat(h.sessionId,"-user-").concat(b),role:"user",content:n},{id:"".concat(h.sessionId,"-assistant-").concat(b),role:"assistant",content:h.responseText}];return N(t8,h.sessionId),_(t8,[...s,...v]),k(t8,nl(h)),S(t8,no(h.appliedFilters)),tI("ai-search"),{status:"ok",url:null!=(o=h.url)?o:"",appliedFilters:[...h.appliedFilters]}}catch(e){return c(p),{status:"error"}}finally{m.current=!1,l(!1)}},[t,p,a]),loading:o,errorMessage:s}}function nq(e){return(0,f.useMemo)(()=>({enabled:e,extraData:e?{touch_point_page:"home",touch_point_button:"manual_search"}:{}}),[e])}n(345149);var nX=n(135259);function nZ(e,t){var n=e.touchPointPage,a=e.onSessionIdChange,o=(0,nX.z1)().trackEvent,l=(0,f.useRef)(null),i=(0,f.useCallback)(function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=t.current;o(e,"click",(0,r._)({touch_point_page:n},a,l?{chat_id:l}:{}))},[t,n,o]),s=(0,f.useCallback)(e=>{t.current=e,null==a||a(e)},[a,t]);return{handleSessionIdChange:s,onError:(0,f.useCallback)(e=>{l.current=e,i("ai_assistant_error",{touch_point_button:e})},[i]),onRetry:(0,f.useCallback)(()=>{l.current&&i("ai_assistant_try_again",{touch_point_button:l.current})},[i]),trackBuyerChatEvent:i}}var n$="caraceter_limit";function nW(e){var t=nZ(e,(0,f.useRef)(null)),n=t.handleSessionIdChange,a=t.onError,r=t.onRetry,o=t.trackBuyerChatEvent;return(0,f.useMemo)(()=>({handleSessionIdChange:n,onError:a,onRetry:r,onClearConversationConfirm:()=>o("ai_clear_chat_confirm"),onOpenClearDialog:()=>o("ai_clear_chat_select"),onDismissClearDialog:()=>o("ai_clear_chat_close"),onSendMessage:()=>o("ai_assistant_send",{touch_point_button:"text"}),onChipSelect:e=>o("ai_chip_select",{touch_point_button:e.label}),onInputFocus:()=>o("ai_assistant_start",{touch_point_button:"text"}),onStop:()=>o("ai_assistant_stop",{touch_point_button:"text"}),onCharacterLimitReached:()=>o("ai_assistant_error",{touch_point_button:n$}),onMessageFeedbackSelect:e=>o("ai_feedback_select",{touch_point_button:"up"===e?"thumbs_up":"thumbs_down"})}),[n,a,r,o])}var nG={current:null};function nJ(){nG.current=null}function nQ(e){var t=nZ(e,nG),n=t.handleSessionIdChange,a=t.onError,r=t.onRetry,o=t.trackBuyerChatEvent;return(0,f.useMemo)(()=>({analytics:{onOpenFilters:e=>o("ai_open_filters",{touch_point_button:e}),onInputFocus:()=>o("ai_assistant_start",{touch_point_button:"text"}),onSendMessage:()=>o("ai_assistant_send",{touch_point_button:"text"}),onChipSelect:e=>o("ai_chip_select",{touch_point_button:e.label}),onStop:()=>o("ai_assistant_stop"),onCharacterLimitReached:()=>o("ai_assistant_error",{touch_point_button:n$}),onMessageFeedbackSelect:e=>o("ai_feedback_select",{touch_point_button:"up"===e?"thumbs_up":"thumbs_down"}),onOpenClearDialog:()=>o("ai_clear_chat_select"),onDismissClearDialog:()=>o("ai_clear_chat_close"),onClearConversationConfirm:()=>o("ai_clear_chat_confirm")},handleSessionIdChange:n,onError:a,onRetry:r,resetSessionId:nJ}),[n,a,r,o])}(0,s.F)()},542216:(e,t,n)=>{n.d(t,{J2:()=>o,Pf:()=>d,Qs:()=>l,W8:()=>u,Wd:()=>a,jl:()=>i,jq:()=>c,oP:()=>r,tO:()=>s});var a=29,r=31,o=65,l=1,i=9,s=57,c=73,u=659,d=660},584624:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(423141),r=n(742025);let o=(0,n(346686).UG)("\n query getAdvertSearchSummaryExp(\n $criteria: AdvertSearchCriteria!\n $shouldSkipUrl: Boolean = false\n $shouldSkipCount: Boolean = false\n $experiments: [Experiment!]\n ) {\n advertSearchSummaryExp(\n criteria: $criteria\n experiments: $experiments\n withCrosslistedAds: true\n ) {\n url @skip(if: $shouldSkipUrl)\n totalCount @skip(if: $shouldSkipCount)\n }\n }\n"),l=async function(e){var t,n=await (0,a.Uq)(1e4).query(o,e).toPromise(),l=n.data,i=n.error;if(i||!l||(null==l?void 0:l.advertSearchSummaryExp)===null)throw(0,r.v)("An error has occurred while fetching adverts search summary with SAS",{occurrence:JSON.stringify(i)}),i;return null!=(t=l.advertSearchSummaryExp)?t:void 0}},610196:e=>{e.exports=JSON.parse('{"advert-pathname":"/osobowe/oferta","car-valuation":"/wycena-samochodu","market-data":"/mojekonto/shop/market-data","cluster-detail":"/mojekonto/shop/market-data/cluster","appraisal-tool":"/mojekonto/kupuj/wyceny","sourcing-tool":"/professionals-listing","overview":"/mojekonto/przeglad/","preferences":"/mojekonto/preferences","user-administration":"/mojekonto/user-a
1dministration","parts-settings":"/mojekonto/platnosc-i-dostawa","subscriptions":"/mojekonto/subscriptions/overview","subscriptions-overview":"/mojekonto/subscriptions/overview","subscriptions-benefits":"/mojekonto/subscriptions/benefits","statistics":"/mojekonto/statystyki","active-ads":"/mojekonto/active","waiting-ads":"/mojekonto/waiting","archived-ads":"/mojekonto/archive","moderated-ads":"/mojekonto/moderated","draft-ads":"/mojekonto/draft","messages":"/mojekonto/messages","financing-leads":"/mojekonto/financing-leads","new-cars-leads":"/mojekonto/new-cars-leads","selling":"/mojekonto/messages/selling","buying":"/mojekonto/messages/buying","archived":"/mojekonto/messages/archived","inventory-management":"/mojekonto/inventory-management","leads":"/mojekonto/leads","leads-management":"/mojekonto/leads-management","leads-from-favs":"/mojekonto/favorite-leads","calls":"/mojekonto/calls","payments":"/mojekonto/newinvoices","dealerWallet":"/mojekonto/dealerwallet","invoices":"/mojekonto/newinvoices","credits":"/mojekonto/operacjenasrodkach","private-history":"/mojekonto/portfel","wallet-top-up":"/mojekonto/doladowaniesrodkow","reviews":"/mojekonto/opinii","reviews-ask-for-reviews-tab":"/mojekonto/opinii/qrcode","inactiveAds":"/mojekonto/archive","favorites":"/obserwowane","saved-searches":"/twoje-obserwowane-wyszukiwania","professional-saved-searches":"/twoje-asystent-obserwowane-wyszukiwania","account":"/mojekonto/","accountOverview":"/mojekonto/przeglad/","authentication":"/authentication","logout":"/konto/wyloguj/","signUp":"/konto/rejestracja","signUpAsDealer":"/konto/rejestracja-dealer","upgradePackage":"/mojekonto/wybierzpakiety","messageDetail":"/mojekonto/odpowiedz-na-ogloszenie","postingForm":"/nowe-ogloszenie","editAd":"/nowe-ogloszenie/edit","wallet":"/mojekonto/portfel","invoice":"/mojekonto/invoice","einvoice":"/mojekonto/einvoice","dealerInvoices":"/mojekonto/invoices","calltracking":"/mojekonto/calltracking","insights":"/mojekonto/insights","carBuyingRedirect":"/redirect/321sprzedane/","selectCategory":"/nowe-ogloszenie/selectcategory","changepackage":"/mojekonto/changepackage","newpayment":"/platnosci/new-payment","oldPayment":"/platnosci/multipay","benefitCenter":"/mojekonto/subscriptions","dealerRatings":"/shop/reviews/","postAd":"/osobowe/nowe-ogloszenie","packageComparison":"/mojekonto/package-comparison","newRoutePayment":"/platnosci/payment","listing":"/osobowe","financing-flow":"/finansowanie","partner-financing-flow":"/finansowanie/partnera","dealer-financing-flow":"/finansowanie/dealera","financing-redirect":"/finansowanie/redirect","menu":"/menu","dashboard":"/mojekonto/dashboard","business-information":"/mojekonto/preferences#business-information","dealership-services":"/mojekonto/preferences#dealership-services","profile-information":"/mojekonto/profile","notifications":"/mojekonto/preferences#notifications","request-personal-data":"/mojekonto/preferences#request-personal-data","update-password":"/mojekonto/preferences#reset-password","delete-account":"/mojekonto/preferences#delete-personal-data","mobile-account":"/menu","post-login":"/post-login","dealerships":"/mojekonto/dealerships","business-restricted-access":"/mojekonto/business-restricted-access","pending-approval":"/mojekonto/pending-approval","ai-video":"/mojekonto/ai-video","financing-management":"/mojekonto/financing-management","financing-configurator":"/mojekonto/financing-configurator"}')},636051:(e,t,n)=>{n.d(t,{H:()=>s});var a=n(934085),r=n(761876),o=n(620703),l=n(382662),i={variant:null,isEnabled:!1},s=async e=>{var t,n=e.isDesktop,s=e.isWebView,c=e.res;if(n||s||!(null!=(t=(0,a.BG)({res:c})(r.n40))&&t))return i;var u=(0,l.F5)(o.Wf);return u?{variant:u,isEnabled:"b"===u}:i}},742949:(e,t,n)=>{n.d(t,{z:()=>l});var a=n(104495),r=new Set(["AbortError"]),o=[/^AbortError:/i,/the operation was aborted/i,/request aborted/i,/user aborted a request/i],l=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(!e||"object"!=typeof e||n.has(e))return!1;if(n.add(e),(0,a.c)(e))return!1;if(r.has(e.name))return!0;var i=null!=(t=e.message)?t:"";if(o.some(e=>e.test(i))||e.cause&&l(e.cause,n))return!0;var s=e.reasons;return null!=s&&!!s.some(e=>l(e,n))}}
1,788554:(e,t,n)=>{n.d(t,{K:()=>c});var a=n(300561),r=n(819470),o=n(244420),l=n(934085),i=n(761876),s=n(138209);function c(e,t){var n=(0,l.h)(),c=n(i.zt_),u=n(i.F_M);return(0,s.useMemo)(()=>u&&"redirect-faq-link"!==t?e.filter(e=>Number(e.id)!==o.dI&&Number(e.parentId)!==o.dI):c?e.filter(e=>Number(e.parentId)!==o.dI).map(e=>Number(e.id)!==o.dI?e:"nav"===t?(0,r._)((0,a._)({},e),{disabled:!0,uriPath:void 0}):"modal"===t?(0,r._)((0,a._)({},e),{active:!1,uriPath:void 0}):e):e,[e,c,u,t])}},797748:(e,t,n)=>{n.d(t,{K:()=>a}),n(784272),n(777050),n(641973);var a=!1},831781:(e,t,n)=>{n.d(t,{g:()=>u});var a=n(300561),r=n(819470),o=n(271864),l=n(119218),i=n(12013),s=n(413237),c=(0,l.F)()?function(e){var t,n,l,s=(0,i.c)(4);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.Y)("path",{fill:"currentColor",d:"M7.87 6.54a1.33 1.33 0 1 1 0 2.66 1.33 1.33 0 0 1 0-2.66"}),n=(0,o.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.24 1.94c.72 0 1.4.29 1.92.8l7.99 8a3.1 3.1 0 0 1 0 4.36l-6.05 6.05a3.1 3.1 0 0 1-4.37 0l-8-8c-.5-.5-.79-1.2-.79-1.91V4.66a2.7 2.7 0 0 1 2.72-2.72zM4.66 3.7a.96.96 0 0 0-.97.97v6.58q0 .4.29.68l7.98 7.99.1.09a1.35 1.35 0 0 0 1.81-.1l6.04-6.03a1.35 1.35 0 0 0 0-1.9l-8-8a1 1 0 0 0-.67-.28z",clipRule:"evenodd"}),s[0]=t,s[1]=n):(t=s[0],n=s[1]),s[2]!==e?(l=(0,o.FD)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[t,n]})),s[2]=e,s[3]=l):l=s[3],l}:function(e){return(0,o.FD)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:[(0,o.Y)("path",{fill:"currentColor",d:"M7.87 6.54a1.33 1.33 0 1 1 0 2.66 1.33 1.33 0 0 1 0-2.66"}),(0,o.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.24 1.94c.72 0 1.4.29 1.92.8l7.99 8a3.1 3.1 0 0 1 0 4.36l-6.05 6.05a3.1 3.1 0 0 1-4.37 0l-8-8c-.5-.5-.79-1.2-.79-1.91V4.66a2.7 2.7 0 0 1 2.72-2.72zM4.66 3.7a.96.96 0 0 0-.97.97v6.58q0 .4.29.68l7.98 7.99.1.09a1.35 1.35 0 0 0 1.81-.1l6.04-6.03a1.35 1.35 0 0 0 0-1.9l-8-8a1 1 0 0 0-.67-.28z",clipRule:"evenodd"})]}))},u=(0,s.w)(c,"TagIcon")},874492:(e,t,n)=>{n.d(t,{Pt:()=>f,Xj:()=>u,Yo:()=>c,ah:()=>s,h6:()=>l,tG:()=>i,v1:()=>d});var a=n(610196),r=n(466248),o="from=postAdButton";function l(){try{return(0,r.L0)("home")}catch(e){return"/"}}function i(){return a.favorites||""}function s(){var e="/opcje-sprzedazy";if(!e)return"/?".concat(o);var t=e.includes("?")?"&":"?";return"".concat(e).concat(t).concat(o)}function c(){return a.messages||""}function u(){return a.menu||""}function d(e,t){var n,r="/"===e?encodeURIComponent(null!=(n=a["post-login"])?n:""):encodeURIComponent(t),o=a.authentication||"/authentication";return"".concat(o,"?redirectUrl=").concat(r)}function f(e,t){var n=e.split("?")[0]||"/",a=t.split("?")[0]||"/";return"/"===a?"/"===n:n===a||n.startsWith("".concat(a,"/"))}},882863:(e,t,n)=>{n.d(t,{H:()=>v});var a=n(300561),r=n(698319),o=n(271864),l=n(119218),i=n(12013),s=n(934085),c=n(761876),u=n(464399),d=n(514979),f=n(170412),m=n(608987),p=n(138209),h=n(109032),b=(0,l.F)()?e=>{var t,n=(0,i.c)(2),a=e.children;return n[0]!==a?(t=(0,o.Y)("main",{className:"mx-auto max-w-page",children:a}),n[0]=a,n[1]=t):t=n[1],t}:e=>{var t=e.children;return(0,o.Y)("main",{className:"mx-auto max-w-page",children:t})},v=e=>{var t=e.children,n=e.title,l=e.className,i=e.testId,v=e.header,g=e.sideMenuContent,y=e.subHeaderContent,x=e.footer,C=e.isInMobileBrowser,w=void 0!==C&&C,_=e.cookiesBanner,k=e.ContentContainer,Y=e.showNavFooter,S=e.isNavFooterHidden,F=e.isAuthenticated,N=e.onTabPress,L=e.mwebHeaderDockedHeight,R=e.mwebHeader,T=e.mwebFooter,z=e.bottomBar,D=e.SeoContent,A=void 0===D?(0,o.Y)(m.bV,{title:n,openGraph:{title:n},robotsProps:{maxImagePreview:"large"}}):D,I=(0,r._)((0,p.useState)(!1),2),E=I[0],M=I[1],B=(0,u.Bd)("navigation").t,j=()=>M(e=>!e),P=(0,d.Gu)(),H=P.hasIdentified,O=P.isDesktop,V=(0,s._T)(c.nsN),U=(0,s._T)(c.n40),K=void 0!==Y&&Y&&U&&H&&!w&&!O,q=!w&&H&&!O,X=K||q&&!!z;return(0,o.FD)("div",{className:(0,f.A)(l,w?"[--layout-header-height:0px]":"[--layout-header-height:56px] lg:[--layout-header-height:64px]",E?"overflow-hidden":"overflow-visible"),"data-testid":void 0===i?"consumer-layout":i,style:(0,a._)({}
1,L&&!w?{"--layout-header-height":L}:{},X?{"--layout-bottom-bar-height":"calc(var(--spacing-turbo-4) + var(--spacing-turbo-8) + var(--spacing-turbo-24) + var(--spacing-turbo-4) + 10px + var(--spacing-turbo-8) + env(safe-area-inset-bottom, 0px))"}:{}),children:[A,(0,o.Y)("aside",{className:(0,f.A)("fixed inset-y-0 left-0 z-[1100] w-[260px] overflow-y-auto bg-white shadow-[0_-1px_6px_0_rgba(20,35,85,0.15)]",E?"block":"hidden"),children:H&&!O?void 0===g?null:g:null}),(0,o.FD)("div",{className:(0,f.A)("relative bg-turbo-container-default transition-transform duration-300",E&&"translate-x-[260px]",X&&"pb-[var(--layout-bottom-bar-height)]"),children:[!w&&(null==v?void 0:v(j)),q&&R,void 0===y?null:y,(0,o.Y)(void 0===k?b:k,{children:t}),!w&&(void 0===x?null:x),q&&T,!V&&(void 0===_?null:_),(0,o.Y)("button",{type:"button","aria-label":B("navigation-close-menu",null,{default:"Close menu"}),onClick:j,className:(0,f.A)("button-preflight absolute inset-0 z-[1100] border-0 bg-background-primary/60",E?"block":"hidden")})]}),K?(0,o.Y)(h.C,{hidden:void 0!==S&&S,isAuthenticated:void 0!==F&&F,onTabPress:N}):null,q?z:null]})}},915123:(e,t,n)=>{n.d(t,{t:()=>a});var a=function(e){return e.FreeText="q",e.BrandProgram="brand_program_id",e.Make="filter_enum_make",e.Model="filter_enum_model",e.YearFrom="filter_float_year:from",e.YearTo="filter_float_year:to",e.RegistrationYear="filter_float_first_registration_year",e.AcceptFinancing="filter_enum_accept_funding",e.FinancialOption="filter_enum_financial_option",e.ItemCondition="new_used",e.CategoryId="category_id",e.SubcategoryId="subcategory_id",e.OfferType="offer_type",e.HasVin="filter_enum_has_vin",e.CityId="city_id",e.Subregi
1onId="subregion_id",e.RegionId="region_id",e.StandId="stand_id",e.EngineCode="filter_enum_engine_code",e.Damaged="filter_enum_damaged",e.CountryOfOrigin="filter_enum_country_origin",e.PartsCategory="filter_enum_parts-category",e.ShowPir="filter_enum_show_pir",e}({})},954610:(e,t,n)=>{n.d(t,{M:()=>u});var a=n(300561),r=n(819470),o=n(271864),l=n(119218),i=n(12013),s=n(413237),c=(0,l.F)()?function(e){var t,n,l=(0,i.c)(3);return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.Y)("path",{fill:"currentColor",d:"M11.38 7.75a.9.9 0 0 1 1.24 0l7.26 7.26a.88.88 0 0 1-1.24 1.24L12 9.6l-6.64 6.64A.88.88 0 0 1 4.12 15z"}),l[0]=t):t=l[0],l[1]!==e?(n=(0,o.Y)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:t})),l[1]=e,l[2]=n):n=l[2],n}:function(e){return(0,o.Y)("svg",(0,r._)((0,a._)({fill:"none",viewBox:"0 0 24 24"},e),{children:(0,o.Y)("path",{fill:"currentColor",d:"M11.38 7.75a.9.9 0 0 1 1.24 0l7.26 7.26a.88.88 0 0 1-1.24 1.24L12 9.6l-6.64 6.64A.88.88 0 0 1 4.12 15z"})}))},u=(0,s.w)(c,"ChevronUpIcon")}}]);
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.