PageSourceSearch

https://amacar.ai/js/CarDetailsView-dgCj9JzN.js

js amacar.ai collected 2026-10-05 14:49:20 UTC 34,647 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-BTyX9Bkx.js";import{a as c,f as Q,u as ee}from"./react-vendor-B-HIfH2A.js";import{u as se}from"./redux-vendor-D8FX55GR.js";import{as as te,K as B,B as ae,v as L,a as le,W as F,ah as re}from"./index-CT6Pp-vm.js";import{C as ie,a as ne,b as me,d as de,e as ce}from"./carousel-DyFXyiTr.js";import{A as xe}from"./embla-carousel-autoplay.esm-CjDxzJE7.js";import{i as V,aa as oe,aj as q,G as R,D as he,ag as ge,V as pe,A as ue,k as fe,$ as P,t as G,b as be}from"./utils-vendor-DCFpBG9B.js";import{m as f}from"./animation-vendor-BxO5ZFqu.js";const je=({box:N,imageDims:o,index:$,description:h})=>{const[g,I]=c.useState({placement:"top",left:0,maxWidth:400}),v=c.useRef(null),y=c.useRef(null),[_,b]=c.useState(!1);if(!o.width||!o.height)return null;const A=N.x*o.width,C=N.y*o.height,k=N.width*o.width,T=N.height*o.height,M=()=>{if(!v.current||!y.current)return{placement:"top",left:0,maxWidth:400};const m=v.current.getBoundingClientRect();let a=v.current,d=null;for(;a&&a.parentElement;){a=a.parentElement;const D=a.className||"",O=a.getAttribute("style")||"";if(a.getAttribute("data-image-container")==="true"||(D.includes("aspect-")||O.includes("aspect"))&&a.querySelector("img")){d=a;break}}if(!d)for(a=v.current;a&&a.parentElement;){a=a.parentElement;const D=a.className||"";if(a.getAttribute("data-carousel-container")==="true"||D.includes("lg:col-span-2")||D.includes("carousel")){d=a;break}}const i=d?d.getBoundingClientRect():{left:0,right:window.innerWidth,top:0,bottom:window.innerHeight,width:window.innerWidth},p=m.top-i.top,z=i.bottom-m.bottom,n=m.left-i.left,u=i.right-m.right,j=i.width||i.right-i.left;let w="top";p<150+20&&z>p&&(w="bottom");const s=20,t=Math.min(j-s*2,400);let l=-t/2+12;const x=l+t,K=l;x>u-s&&(l=u-t-s),K<-n+s&&(l=-n+s);const U=-n+s,X=u-t-s;l=Math.max(U,Math.min(X,l));const Y=n+l-s,Z=u-l-s,J=Math.min(t,Math.max(Y,Z)*2-40);return{placement:w,left:l,maxWidth:Math.max(200,Math.min(J,t))}};c.useEffect(()=>{if(_){const m=setTimeout(()=>{const a=M();I(a)},10);return()=>clearTimeout(m)}},[_,o,N]);const E={position:"absolute",left:`${A}px`,top:`${C}px`,width:`${k}px`,height:`${T}px`,border:"3px solid #ef4444",boxShadow:"0 0 15px rgba(239, 68, 68, 0.7)",pointerEvents:"none",zIndex:_?15:10},S={position:"absolute",top:"-1.8rem",left:"0",pointerEvents:"auto"},W={position:"absolute",left:`${g.left}px`,[g.placement==="top"?"bottom":"top"]:"100%",marginBottom:g.placement==="top"?"0.5rem":"0",marginTop:g.placement==="bottom"?"0.5rem":"0",width:`${g.maxWidth}px`,maxWidth:`${g.maxWidth}px`,minWidth:"200px",maxHeight:"300px",overflowY:"auto",overflowX:"hidden",wordWrap:"break-word",overflowWrap:"break-word",whiteSpace:"normal"};return e.jsx("div",{style:E,className:"z-10",children:e.jsxs("div",{className:"relative group",style:S,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:[e.jsx("span",{ref:v,className:"bg-red-500 text-white font-bold text-sm py-1 px-2 rounded-md cursor-pointer flex items-center justify-center w-6 h-6",style:{textShadow:"1px 1px 1px rgba(0, 0, 0, 0.6)"},children:$+1}),e.jsx("div",{ref:y,style:W,className:"bg-gray-900 text-white text-sm rounded-md shadow-xl p-3 opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-50",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:e.jsx("div",{style:{wordBreak:"break-word",overflowWrap:"break-word",hyphens:"auto",whiteSpace:"normal"},className:"leading-relaxed",children:h})})]})})},Se=()=>{const{state:N}=Q(),o=ee(),$=se(),h=N?.productId,[g,I]=c.useState(null),[v,y]=c.useState(!0),[_,b]=c.useState(null),[A,C]=c.useState(null),[k,T]=c.useState({});c.useEffect(()=>{console.log("productId",h),(async()=>{if(!h){b("No product ID available"),y(!1);return}try{y(!0),b(null),console.log("productId",h),console.log("before api call");const t=await le.get(`/vehicle/details/${h}`);t.data.success?(I(t.data.vehicle),C(t.data.vehicle?.auction?.remaining_seconds||0),console.log("response.data.vehicle",t.data.vehicle),console.log("vehicleData",g)):b(t.data.message||"Failed to fetch vehicle details")}catch(t){console.error("Error fetching vehicle details:",t),b(t.response?.data?.message||t.message||"Failed to fetch vehicle details")}finally{y(!1)}})()},[h]),c.useEffect(()=>{if(A===null||A<=0)return;const s=setInterval(()=>{C(t=>t<=1?(clearInterval(s),0):t-1)},1e3);return()=>clearInterval(s)},[A]);const M=s=>{if(!s)return"N/A";const t=Math.floor(s/86400),r=Math.floor(s%86400/3600),l=Math.floor(s%3600/60),x=s%60;return t>0?`${t}d ${r}h ${l}m ${x}s`:r>0?`${r}h ${l}m ${x}s`:l>0?`${l}m ${x}s`:`${x}s`},E=s=>{switch(s){case"accepted":return e.jsx(G,{className:"w-4 h-4 text-green-500"});case"rejected":return e.jsx(be,{className:"w-4 h-4 text-red-500"});
1case"pending":return e.jsx(P,{className:"w-4 h-4 text-yellow-500"});default:return e.jsx(P,{className:"w-4 h-4 text-gray-500"})}},S=s=>{switch(s){case"accepted":return"Accepted";case"rejected":return"Rejected";case"pending":return"Pending";default:return"Unknown"}},W={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},m={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};if(v)return e.jsx("div",{className:"mt-16 min-h-screen bg-gradient-hero",children:e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs("div",{className:"animate-pulse space-y-6 sm:space-y-8",children:[e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pt-4 sm:pt-6 lg:pt-8",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"h-6 sm:h-8 lg:h-10 bg-gray-200 rounded w-64 sm:w-80 lg:w-96 mb-2"}),e.jsx("div",{className:"h-4 sm:h-5 lg:h-6 bg-gray-200 rounded w-48 sm:w-64 lg:w-80"})]}),e.jsx("div",{className:"h-8 sm:h-10 w-full sm:w-20 bg-gray-200 rounded-lg"})]})}),e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsx("div",{className:"aspect-[4/3] sm:aspect-[3/2] lg:aspect-[4/3] w-full bg-gray-200 rounded-lg sm:rounded-xl"})}),e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-lg sm:rounded-xl p-3 sm:p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 sm:mb-4",children:[e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-gray-200 rounded-lg"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 sm:h-5 bg-gray-200 rounded w-24 sm:w-32 mb-1"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-20 sm:w-24"})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[1,2,3,4].map(s=>e.jsxs("div",{className:"bg-gray-100 p-2 sm:p-3 rounded-lg",children:[e.jsx("div",{className:"h-3 bg-gray-200 rounded w-12 sm:w-16 mb-2"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-16 sm:w-20"})]},s))})]}),e.jsxs("div",{className:"bg-white rounded-lg sm:rounded-xl p-3 sm:p-4 shadow-sm border-2 border-gray-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 sm:mb-4",children:[e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-gray-200 rounded-lg"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 sm:h-5 bg-gray-200 rounded w-20 sm:w-24 mb-1"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-16 sm:w-20"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-gray-100 p-2 sm:p-3 rounded-lg",children:[e.jsx("div",{className:"h-3 bg-gray-200 rounded w-16 sm:w-20 mb-2"}),e.jsx("div",{className:"h-5 sm:h-6 bg-gray-200 rounded w-24 sm:w-32"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"bg-gray-100 p-2 sm:p-3 rounded-lg",children:[e.jsx("div",{className:"h-3 bg-gray-200 rounded w-10 sm:w-12 mb-2"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-12 sm:w-16"})]}),e.jsxs("div",{className:"bg-gray-100 p-2 sm:p-3 rounded-lg",children:[e.jsx("div",{className:"h-3 bg-gray-200 rounded w-12 sm:w-16 mb-2"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-16 sm:w-20"})]})]})]})]})]})]})}),e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:e.jsxs("div",{className:"lg:col-span-3 bg-white rounded-lg sm:rounded-xl p-4 sm:p-6 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gray-200 rounded-lg sm:rounded-xl"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-5 sm:h-6 bg-gray-200 rounded w-32 sm:w-40 mb-2"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-40 sm:w-48"})]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[1,2,3,4].map(s=>
1e.jsxs("div",{className:"bg-gray-100 p-3 sm:p-4 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"w-4 h-4 sm:w-5 sm:h-5 bg-gray-200 rounded"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-20 sm:w-24"})]}),e.jsx("div",{className:"space-y-2",children:[1,2,3].map(t=>e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between gap-1 sm:gap-0",children:[e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-16 sm:w-20"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-20 sm:w-24"})]},t))})]},s))})]})})}),e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsxs("div",{className:"bg-white rounded-lg sm:rounded-xl p-4 sm:p-6 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gray-200 rounded-lg sm:rounded-xl"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-5 sm:h-6 bg-gray-200 rounded w-40 sm:w-48 mb-2"}),e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-48 sm:w-56"})]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[1,2,3,4,5,6,7,8].map(s=>e.jsxs("div",{className:"bg-gray-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("div",{className:"h-3 sm:h-4 bg-gray-200 rounded w-16 sm:w-20 mb-2"}),e.jsx("div",{className:"h-4 sm:h-5 bg-gray-200 rounded w-20 sm:w-24"})]},s))})]})})]})})});if(_)return e.jsx("div",{className:"min-h-screen bg-gradient-hero p-8",children:e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-24 h-24 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(V,{className:"w-12 h-12 text-red-500"})}),e.jsx("h3",{className:"text-xl font-semibold text-neutral-800 mb-2",children:"Error Loading Vehicle Details"}),e.jsx("p",{className:"text-neutral-600 mb-6",children:_}),e.jsx("button",{onClick:()=>window.location.reload(),className:"btn-primary",children:"Try Again"})]})})});if(!g)return e.jsx("div",{className:"min-h-screen bg-gradient-hero p-8",children:e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-24 h-24 bg-neutral-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx(V,{className:"w-12 h-12 text-neutral-400"})}),e.jsx("h3",{className:"text-xl font-semibold text-neutral-800 mb-2",children:"No Vehicle Data"}),e.jsx("p",{className:"text-neutral-600",children:"No vehicle details available for this product."})]})})});const{basic_info:a,location:d,cash_offer:i,auction:p,user:z,condition_assessment:n,bids:u,images:j}=g,w=s=>{if(!s)return!1;const t=new Date(s),x=(new Date-t)/(1e3*60*60*24);return x>=0&&x<=7},H=()=>{if(!w(i?.offer_date)){F.error("This offer has expired");return}if(!h){F.error("Product ID is required");return}$(re(h)),o("/local-auction",{state:{productId:h,vin:a?.vin,zipCode:d?.zip_code}})};return e.jsx("div",{className:"mt-8 lg:mt-16 min-h-screen bg-gradient-hero",children:e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs(f.div,{variants:W,initial:"hidden",animate:"visible",className:"space-y-6 sm:space-y-8",children:[e.jsx(f.div,{variants:m,className:"px-4 sm:px-6 lg:px-8 pt-4 sm:pt-6 lg:pt-8",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-neutral-800 mb-2 truncate",children:a?.title?te(a.title):"Vehicle Details"}),e.jsx("p",{className:"text-neutral-600 text-sm sm:text-base lg:text-lg",children:"Complete vehicle information and auction details"})]}),e.jsxs("button",{onClick:()=>o(-1),className:"cursor-pointer flex items-center justify-center gap-2 px-3 sm:px-4 py-2 bg-white hover:bg-neutral-50 border border-neutral-200 rounded-lg shadow-sm transition-colors duration-200 w-full sm:w-auto",children:[e.jsx(oe,{className:"w-4 h-4 text-neutral-600"}),e.jsx("span",{className:"text-neutral-700 font-medium text-sm sm:text-base",children:"Back"})]})]})}),e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:[j&&j.length>0?e.jsx(f.div,{variants:m,className:"lg:col-span-2 relative",style:{overflow:"visible"},ref:s=>{s&&s.setAttribute("data-carousel-container","true")},children:e.jsxs(ie,{className:"shadow-lg w-full",opts:{align:"start",loop:!0}
1,plugins:[xe({delay:3e3,stopOnInteraction:!1,stopOnMouseEnter:!0})],children:[e.jsx(ne,{children:j.map((s,t)=>e.jsx(me,{children:e.jsxs("div",{className:"aspect-[4/3] sm:aspect-[3/2] lg:aspect-[4/3] w-full rounded-lg sm:rounded-xl shadow-sm relative",style:{overflow:"visible",position:"relative"},ref:r=>{r&&r.setAttribute("data-image-container","true")},children:[e.jsx("div",{className:"w-full h-full rounded-lg sm:rounded-xl overflow-hidden",style:{position:"relative"},children:e.jsx("img",{src:s.url,alt:s.name||`Vehicle image ${t+1}`,className:"w-full h-full object-contain",loading:t===0?"eager":"lazy",decoding:"async",onLoad:r=>{const l=r.target;T(x=>({...x,[s.attachment_id]:{width:l.clientWidth,height:l.clientHeight}}))},onError:r=>{r.target.style.display="none",r.target.nextSibling.style.display="flex"}})}),s.damage_data?.hasDamage&&s.damage_data?.damages&&s.damage_data.damages.length>0&&k[s.attachment_id]&&s.damage_data.damages.map((r,l)=>e.jsx(je,{box:r.boundingBox,imageDims:k[s.attachment_id],index:l,description:r.description},l)),e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-neutral-100 to-neutral-200 flex items-center justify-center",style:{display:"none"},children:e.jsx(q,{className:"w-12 h-12 sm:w-16 sm:h-16 text-neutral-400"})})]})},s.attachment_id||t))}),e.jsx(de,{className:"left-1 sm:left-2 bg-white/90 hover:bg-white shadow-lg border-0 cursor-pointer w-8 h-8 sm:w-10 sm:h-10"}),e.jsx(ce,{className:"right-1 sm:right-2 bg-white/90 hover:bg-white shadow-lg border-0 cursor-pointer w-8 h-8 sm:w-10 sm:h-10"})]})}):e.jsx(f.div,{variants:m,className:"lg:col-span-2",children:e.jsx("div",{className:"aspect-[4/3] sm:aspect-[3/2] lg:aspect-[4/3] w-full bg-gradient-to-br from-neutral-100 to-neutral-200 rounded-lg sm:rounded-xl flex items-center justify-center shadow-sm",children:e.jsxs("div",{className:"text-center",children:[e.jsx(q,{className:"w-12 h-12 sm:w-16 sm:h-16 text-neutral-400 mx-auto mb-2 sm:mb-4"}),e.jsx("p",{className:"text-neutral-600 text-sm sm:text-base",children:"No images available"})]})})}),e.jsxs("div",{className:"space-y-4 sm:space-y-6",children:[e.jsxs(f.div,{variants:m,className:"card p-3 sm:p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 sm:mb-4",children:[e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center",children:e.jsx(R,{className:"w-3 h-3 sm:w-4 sm:h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base sm:text-lg font-bold text-neutral-800",children:"Auction Details"}),e.jsx("p",{className:"text-xs sm:text-sm text-neutral-600",children:"Status and timing"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{className:"bg-gradient-to-r from-purple-50 to-purple-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Status"}),e.jsx("span",{className:`px-3 py-1 rounded-full text-xs sm:text-sm font-medium ${p?.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:p?.is_active?"Active":"Inactive"})]}),p?.auction_started_at&&e.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Started"}),e.jsx("p",{className:"text-sm sm:text-base font-semibold text-neutral-800 break-words",children:B(p.auction_started_at)})]}),p?.auction_ends_at&&e.jsxs("div",{className:"bg-gradient-to-r from-orange-50 to-orange-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Ends"}),e.jsx("p",{className:"text-sm sm:text-base font-semibold text-neutral-800 break-words",children:B(p.auction_ends_at)})]}),p?.is_active&&e.jsxs("div",{className:"bg-gradient-to-r from-red-50 to-red-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Time Left"}),e.jsx("p",{className:"text-sm sm:text-base font-semibold text-neutral-800 font-mono",children:M(A)})]})]}),i?.offer_date&&e.jsx("div",{className:"mt-4",children:e.jsxs(ae,{onClick:H,variant:w(i.offer_date)?"default":"outline",size:"sm",className:`w-full h-10 text-sm font-medium ${w(i.offer_date)?"bg-orange-600 hover:bg-orange-700 text-white":"border-red-300 text-red-600 hover:bg-red-50 hover:text-red-700 hover:border-red-400"}`,children:[e.jsx(R,{className:"w-4 h-4 mr-2"}),w(i.offer_date)?"Auction it":"Offer expired"]})})]}),e.jsxs(f.div,{variants:m,className:"card p-3 sm:p-4 bg-gradient-to-r from-orange-50 to-amber-50 border-2 border-orange-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 sm:mb-4",children:[e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-gradient-to-br from-orange-500 to-amber-600 rounded-lg flex items-center justify-center",children:e.jsx(he,{className:"w-3 h-3 sm:w-4 sm:h-4 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base sm:text-lg font-bold text-neutral-800",children:"Cash Offer"}),e.jsx("p",{className:"text-xs sm:text-sm text-neutral-600",children:"Current offer"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"bg-white p-2 sm:p-3 rounded-lg shadow-sm",children:[e.jsx("p",{className:"text-xs font-medium text-neutral-600 mb-1",children:"Offer Amount"}),e.jsx("p",{className:"text-lg sm:text-xl font-bold text-orange-600",children:i?.offer_amount?L(i.offer_amount):"N/A"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3",children:[e.jsxs("div",{className:"bg-white p-3 sm:p-4 roun
1ded-lg shadow-sm",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Date"}),e.jsx("p",{className:"text-sm sm:text-base font-semibold text-neutral-800 break-words",children:i?.offer_date?B(i.offer_date):"N/A"})]}),e.jsxs("div",{className:"bg-white p-3 sm:p-4 rounded-lg shadow-sm",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Expires"}),e.jsx("p",{className:"text-sm sm:text-base font-semibold text-neutral-800 break-words",children:i?.offer_expiration||"N/A"})]})]})]})]})]})]})}),e.jsx("div",{className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:[e.jsxs(f.div,{variants:m,className:"lg:col-span-3 card p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg sm:rounded-xl flex items-center justify-center",children:e.jsx(V,{className:"w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-neutral-800",children:"Vehicle Overview"}),e.jsx("p",{className:"text-sm sm:text-base text-neutral-600",children:"Key details about this vehicle"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6",children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 p-3 sm:p-4 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ge,{className:"w-4 h-4 sm:w-5 sm:h-5 text-blue-600"}),e.jsx("span",{className:"font-semibold text-blue-800 text-sm sm:text-base",children:"Vehicle Details"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Year/Make/Model:"}),e.jsxs("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:[a?.year," ",a?.make," ",a?.model]})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Trim:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.trim||"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"VIN:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.vin||"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Mileage:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.mileage?`${a.mileage.toLocaleString()} miles`:"N/A"})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-green-50 to-green-100 p-3 sm:p-4 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(pe,{className:"w-4 h-4 sm:w-5 sm:h-5 text-green-600"}),e.jsx("span",{className:"font-semibold text-green-800 text-sm sm:text-base",children:"Condition"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Body Type:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.body_type||"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Exterior:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.exterior_color||"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Interior:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.interior_color||"N/A"})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-purple-50 to-purple-100 p-3 sm:p-4 roun
1ded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ue,{className:"w-4 h-4 sm:w-5 sm:h-5 text-purple-600"}),e.jsx("span",{className:"font-semibold text-purple-800 text-sm sm:text-base",children:"Performance"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Transmission:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.transmission||"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"Engine:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:a?.engine_type||"N/A"})]}),a?.powertrain_description&&e.jsxs("div",{className:"mt-3",children:[e.jsx("span",{className:"text-xs sm:text-sm text-neutral-600",children:"Powertrain:"}),e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-800 mt-1",children:a.powertrain_description})]})]})]}),e.jsxs("div",{className:"bg-gradient-to-r from-teal-50 to-teal-100 p-3 sm:p-4 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(fe,{className:"w-4 h-4 sm:w-5 sm:h-5 text-teal-600"}),e.jsx("span",{className:"font-semibold text-teal-800 text-sm sm:text-base",children:"Location"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"City, State:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:d?.city&&d?.state?`${d.city}, ${d.state}`:"N/A"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-neutral-600 text-xs sm:text-sm",children:"ZIP Code:"}),e.jsx("span",{className:"font-semibold text-neutral-800 text-sm sm:text-base",children:d?.zip_code||"N/A"})]})]})]})]})]}),(()=>{const s=[];return j&&j.length>0&&j.forEach(t=>{t.damage_data?.hasDamage&&t.damage_data?.damages&&t.damage_data.damages.forEach(r=>{s.push({imageName:t.name||"Vehicle Image",description:r.description})})}),s.length===0?null:e.jsxs(f.div,{variants:m,className:"lg:col-span-3 card p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gradient-to-br from-red-500 to-red-600 rounded-lg sm:rounded-xl flex items-center justify-center",children:e.jsx(P,{className:"w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-neutral-800",children:"Damages"}),e.jsx("p",{className:"text-sm sm:text-base text-neutral-600",children:"AI-detected vehicle damages"})]})]}),e.jsx("div",{className:"bg-gradient-to-r from-red-50 to-red-100 p-4 sm:p-6 rounded-lg",children:e.jsx("div",{className:"space-y-3 sm:space-y-4",children:s.map((t,r)=>e.jsxs("div",{className:"flex items-start gap-3 sm:gap-4 bg-white p-3 sm:p-4 rounded-lg shadow-sm",children:[e.jsx("div",{className:"flex-shrink-0 w-6 h-6 sm:w-8 sm:h-8 bg-red-500 text-white rounded-full flex items-center justify-center font-bold text-sm sm:text-base",children:r+1}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-1",children:t.imageName.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase())}),e.jsx("p",{className:"text-sm sm:text-base text-neutral-800",children:t.description})]})]},r))})})]})})(),n&&e.jsxs(f.div,{variants:m,className:"lg:col-span-3 card p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gradient-to-br from-yellow-500 to-amber-600 rounded-lg sm:rounded-xl flex items-center justify-center",children:e.jsx(G,{className:"w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-neutral-800",children:"Condition Assessment"}),e.jsx("p",{className:"text-sm sm:text-base text-neutral-600",children:"Complete vehicle condition details"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-gradient-to-r from-green-50 to-green-100 p-3 sm:p-4 roun
1ded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Overall Title"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-green-800 break-words",children:n?.title||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Cosmetic Condition"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-blue-800 break-words",children:n?.cosmetic||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-purple-50 to-purple-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Accident History"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-purple-800 break-words",children:n?.accident||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-orange-50 to-orange-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Tire Tread"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-orange-800 break-words",children:n?.tread||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-red-50 to-red-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Smoked Windows"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-red-800 break-words",children:n?.smoked||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-indigo-50 to-indigo-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Modifications"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-indigo-800 break-words",children:n?.modifications||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-pink-50 to-pink-100 p-3 sm:p-4 rounded-lg",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Warning Lights"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-pink-800 break-words",children:n?.warning||"N/A"})]}),e.jsxs("div",{className:"bg-gradient-to-r from-teal-50 to-teal-100 p-3 sm:p-4 rounded-lg sm:col-span-2 lg:col-span-2",children:[e.jsx("p",{className:"text-xs sm:text-sm font-medium text-neutral-600 mb-2",children:"Features"}),e.jsx("p",{className:"text-sm sm:text-base lg:text-lg font-semibold text-teal-800 break-words",children:n?.features?Array.isArray(n.features)?n.features.join(", "):String(n.features).replace(/^a:\d+:\{i:\d+;s:\d+:"([^"]+)";\}$/,"$1"):"N/A"})]})]})]})]})}),u&&u.length>0&&e.jsx(f.div,{variants:m,className:"px-4 sm:px-6 lg:px-8 pb-6 sm:pb-8",children:e.jsxs("div",{className:"card p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 mb-4 sm:mb-6",children:[e.jsx("div",{className:"w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 bg-gradient-to-br from-red-500 to-red-600 rounded-lg sm:rounded-xl flex items-center justify-center",children:e.jsx(R,{className:"w-4 h-4 sm:w-5 sm:h-5 lg:w-6 lg:h-6 text-white"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("h2",{className:"text-lg sm:text-xl lg:text-2xl font-bold text-neutral-800",children:["Bids (",u.length,")"]}),e.jsx("p",{className:"text-sm sm:text-base text-neutral-600",children:"Current bids on this vehicle"})]})]}),e.jsx("div",{className:"block sm:hidden space-y-3",children:u.map((s,t)=>e.jsxs("div",{className:"bg-gradient-to-r from-neutral-50 to-neutral-100 p-4 rounded-lg border border-neutral-200",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-lg font-bold text-green-600",children:L(s.amount)}),e.jsxs("div",{className:"flex items-center gap-2",children:[E(s.status),e.jsx("span",{className:"font-medium text-sm",children:S(s.status)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-neutral-600",children:"Bidder:"}),e.jsx("span",{className:"font-semibold text-sm text-neutral-800",children:s.bidder_display_name})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-neutral-600",children:"Email:"}),e.jsx("span",{className:"text-sm text-neutral-600 truncate max-w-[150px]",children:s.bidder_email})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-neutral-600",children:"Date:"}),e.jsx("span",{className:"font-medium text-sm text-neutral-800",children:s.bid_at?.date})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-neutral-600",children:"Time:"}),e.jsx("span",{className:"text-sm text-neutral-600",children:s.bid_at?.time})]})]})]},s.id))}),e.jsx("div",{className:"hidden sm:block overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-neutral-200",children:[e.jsx("th",{className:"text-left py-3 sm:py-4 px-2 sm:px-4 font-semibold text-neutral-700 text-xs sm:text-sm",children:"Amount"}),e.jsx("th",{className:"text-left py-3 sm:py-4 px-2 sm:px-4 font-semibold text-neutral-700 text-xs sm:text-sm",children:"Bidder"}),e.jsx("th",{className:"text-left py-3 sm:py-4 px-2 sm:px-4 font-semibold text-neutral-700 text-xs sm:text-sm",children:"Status"}),e.jsx("th",{className:"text-left py-3 sm:py-4 px-2 sm:px-4 font-semibold text-neutral-700 text-xs sm:text-sm",children:"Date & Time"})]})}),e.jsx("tbody",{children:u.map(s=>e.jsxs("tr",{className:"border-b border-neutral-100 hover:bg-neutral-50 transition-colors",children:[e.jsx("td",{className:"py-3 sm:py-4 px-2 sm:px-4",children:e.jsx("span",{className:"text-lg sm:text-xl font-bold text-green-600",children:L(s.amount)})}),e.jsx("td",{className:"py-3 sm:py-4 px-2 sm:px-4",children:e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-neutral-800 text-xs sm:text-sm",children:s.bidder_display_name}),e.jsx("p",{className:"text-xs sm:text-sm text-neutral-600 truncate max-w-[120px] sm:max-w-none",children:s.bidder_email})]})}),e.jsx("td",{className:"py-3 sm:py-4 px-2 sm:px-4",children:e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[E(s.status),e.jsx("span",{className:"font-medium text-xs sm:text-sm",children:S(s.status)})]})}),e.jsx("td",{className:"py-3 sm:py-4 px-2 sm:px-4",children:e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-neutral-800 text-xs sm:text-sm",children:s.bid_at?.date}),e.jsx("p",{className:"text-xs sm:text-sm text-neutral-600",children:s.bid_at?.time})]})})]},s.id))})]})})]})})]})})})};export{Se as default};

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.