PageSourceSearch

https://www.flexcar.com/lp/assets/support.index-CBzb0hzD.js

js flexcar.com collected 2026-09-24 09:47:18 UTC 5,680 bytes, 1 lines download raw bytes

1import{i as b,r,a as N,aK as v,j as e,aL as y,v as p,aM as w,aN as S,L as k}from"./index-BUm1srQw.js";import{S as L}from"./search-DosPd7MY.js";import{S as E}from"./sparkles-BxUARAFY.js";import{C as A}from"./CategoryGrid-DeRoL9IF.js";import{A as C}from"./ArticleCard-55xx11Bf.js";import"./arrow-right-eoTIPIjS.js";const M=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],F=b("file-text",M),m={matches:[],suggestions:[]};function H(){const[s,l]=r.useState(""),[h,n]=r.useState(!1),[o,x]=r.useState(m),[u,c]=r.useState(!1),d=r.useRef(null),f=N(),i=s.trim().length>0,g=h&&i;return r.useEffect(()=>{if(!i){x(m),c(!1);return}let t=!1;c(!0);const a=setTimeout(async()=>{const j=await v(s);t||(x(j),c(!1))},150);return()=>{t=!0,clearTimeout(a)}},[s,i]),r.useEffect(()=>{function t(a){d.current?.contains(a.target)||n(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]),e.jsx("section",{className:"border-b border-neutral-200 bg-neutral-50",children:e.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-16 text-center sm:px-6 sm:py-24",children:[e.jsxs("h1",{className:"font-display text-4xl font-semibold tracking-[-1.8px] text-neutral-900 sm:text-5xl",children:["How can we ",e.jsx("span",{className:"flx-flame-text",children:"help?"})]}),e.jsx("p",{className:"mx-auto mt-4 max-w-xl text-[16px] text-neutral-600 sm:text-[17px]",children:"Search our help center or browse by category to find answers about Flexcar."}),e.jsxs("div",{ref:d,className:"relative mx-auto mt-8 max-w-xl",children:[e.jsxs("form",{role:"search",onSubmit:t=>{t.preventDefault();const a=s.trim();a&&(n(!1),f({to:"/support/search",search:{q:a}}))},children:[e.jsx("label",{htmlFor:"support-search",className:"sr-only",children:"Search Flexcar support"}),e.jsxs("div",{className:"relative w-full",children:[e.jsx(L,{className:"pointer-events-none absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-neutral-400","aria-hidden":"true"}),e.jsx("input",{id:"support-search",type:"search",value:s,onChange:t=>{l(t.target.value),n(!0)},onFocus:()=>n(!0),placeholder:"Search articles…",autoComplete:"off",className:"h-[52px] w-full rounded-full border border-neutral-200 bg-white pl-12 pr-12 text-[15px] text-neutral-900 placeholder:text-neutral-400 focus:border-neutral-900 focus:outline-none focus:ring-2 focus:ring-[#3A00E5]/40"}),u&&e.jsx(y,{className:"pointer-events-none absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-neutral-400","aria-hidden":"true"})]})]}),g&&e.jsxs("div",{role:"listbox",className:"absolute left-0 right-0 top-[calc(100%+8px)] z-30 overflow-hidden rounded-2xl border border-neutral-200 bg-white text-left shadow-xl",children:[u&&o.matches.length===0?e.jsx("div",{className:"space-y-2 px-5 py-4",children:Array.from({length:3}).map((t,a)=>e.jsx("div",{className:"h-10 animate-pulse rounded-md bg-neutral-100"},a))}):o.matches.length===0?e.jsxs("div",{className:"px-5 py-6 text-[14px] text-neutral-600",children:["No results for"," ",e.jsxs("span",{className:"font-medium text-neutral-900",children:['"',s,'"']}),". Try a different keyword or browse by category below."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-5 pb-2 pt-4 text-[11px] font-semibold uppercase tracking-wide text-neutral-500",children:"Articles"}),e.jsx("ul",{className:"pb-2",children:o.matches.map(t=>e.jsx("li",{children:e.jsxs(p,{to:"/support/$slug",params:{slug:t.slug},onClick:()=>n(!1),className:"flex items-start gap-3 px-5 py-3 hover:bg-neutral-50",children:[e.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0 text-neutral-400"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-[14px] font-medium text-neutral-900",children:t.title}),e.jsx("div",{className:"mt-0.5 line-clamp-1 text-[13px] text-neutral-600",children:w(t)})]})]})},t.slug))})]}),o.suggestions.length>0&&e.jsxs("div",{className:"border-t border-neutral-100 bg-neutral-50/60",children:[e.jsx("div",{className:"px-5 pb-2 pt-3 text-[11px] font-semibold uppercase tracking-wide text-neutral-500",children:"Suggested for you"}),e.jsx("ul",{className:"pb-2",children:o.suggestions.map(t=>e.jsx("li",{children:e.jsxs(p,{to:"/support/$slug",params:{slug:t.slug},onClick:()=>n(!1),className:"flex items-start gap-3 px-5 py-2.5 hover:bg-white",children:[e.jsx(E,{className:"mt-0.5 h-4 w-4 shrink-0 text-[#3A00E5]"}),e.jsx("div",{className:"min-w-0 truncate text-[14px] text-neutral-800",children:t.title})]})},t.slug))})]})]})]})]})})}function R({articles:s}){return s.length===0?null:e.jsx("section",{className:"border-t border-neutral-200 bg-neutral-50",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[e.jsx("h2",{className:"font-display text-2xl font-semibold tracking-[-0.8px] text-neutral-900 sm:text-3xl",children:"Popular articles"}),e.jsx("div",{className:"mt-8 grid grid-cols-1 gap-4 md:grid-cols-2",children:s.map(l=>e.jsx(C,{article:l},l.slug))})]})})}function I(){const{categories:s,popular:l}=S.useLoaderData();return e.jsxs(k,{children:[e.jsx(H,{}),s.length===0?e.jsx("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:e.jsx("div",{className:"rounded-3xl border border-dashed border-neutral-300 bg-white p-10 text-center",children:e.jsx("p",{className:"text-[15px] text-neutral-600",children:"No help articles are available yet — check back soon."})})}):e.jsx(A,{categories:s}),e.jsx(R,{articles:l})]})}
1export{I as component};

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.