PageSourceSearch

https://www.arrowvideo.com/ssr-assets/SearchResults.C4MOultY.js

js arrowvideo.com collected 2026-09-24 18:28:27 UTC 4,361 bytes, 2 lines download raw bytes

1import{j as s}from"./jsx-runtime.D_zvdyIk.js";import{c as k}from"./compiler-runtime.B6qBK_-V.js";import{r as j}from"./index.BFIXnisK.js";import{u as D}from"./useLocalization.BtSmf8TY.js";import{c as P}from"./search.CXVqgqev.js";import{D as w}from"./DiscountTabs.DkN8l6Vq.js";import{P as y}from"./Picture.BNIDrs8h.js";import{t as E}from"./navigate.ClaoayJ0.js";import"./index.CMF_dOlt.js";import"./_commonjsHelpers.CqkleIqs.js";import"./index.BSdFiPHn.js";import"./pathPrefix.D-vnlp8T.js";import"./index.DtsRjIc2.js";const S=(n,e)=>{if(!e)return n;const a=Object.keys(e);if(!a.length)return n;const o=a.join("|"),i=new RegExp(`\\b(\\d+(?:\\.\\d+)?)\\s*(${o})\\b`,"gi");return n.replace(i,(b,u,l)=>{const t=e[l.toLowerCase()];if(!t)return b;const m=Number(u)===1?t.singular:t.plural;return`${u} ${m}`})};function H(n){const e=k.c(15),{i18n:a,serverLang:o}=n,[i,b]=j.useState(null),u=j.useRef(null),{i18n:l,lang:t}=D(a,o);let m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{P.subscribe(r=>{b(r)})},h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),j.useEffect(m,h);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=r=>{const c=Array.from(u.current?.querySelectorAll('li[role="option"] a')||[]);if(!c.length)return;const p=c.findIndex(A);e:switch(r.key){case"ArrowDown":{r.preventDefault(),p<c.length-1?c[p+1]?.focus():c[0]?.focus();break e}case"ArrowUp":{r.preventDefault(),p>0?c[p-1]?.focus():c[c.length-1]?.focus();break e}case"Escape":{r.preventDefault(),u.current?.blur();break e}case"Enter":r.preventDefault(),document.activeElement instanceof HTMLAnchorElement&&document.activeElement.click()}},e[2]=g):g=e[2];const N=g;if(!i||!i.suggestedSearchQueries?.length&&!i.products?.length)return null;let f;e[3]!==l||e[4]!==t||e[5]!==i.suggestedSearchQueries?(f=i?.suggestedSearchQueries?.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("p",{role:"heading","aria-level":2,className:"skin-search-results-dark border-b p-3 font-bold",children:l(()=>t.search.instant.suggested)}),s.jsx("ul",{role:"group",children:i?.suggestedSearchQueries?.map(R)})]}),e[3]=l,e[4]=t,e[5]=i.suggestedSearchQueries,e[6]=f):f=e[6];let d;e[7]!==l||e[8]!==t||e[9]!==i.products||e[10]!==o?.product?.units?(d=i.products?.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("p",{role:"heading","aria-level":2,className:"skin-search-results-dark border-y p-3 font-bold",children:l(()=>t.search.instant.product)}),s.jsx("ul",{className:"pt-3",role:"group",children:i.products.map(r=>{const p=[S(r.title,o?.product?.units),r.currentPrice&&`${l(()=>t?.product?.price?.currentprice)}${r.currentPrice}`,r.originalPrice&&`${l(()=>t?.product?.price?.rrpscreenreader)}${r.originalPrice}`].filter(Boolean).join(", ");return s.jsx("li",{role:"option",children:s.jsxs("a",{href:r.url,className:"search-results-item interactive flex cursor-pointer items-center gap-3 p-3 px-5 pt-0",tabIndex:0,onMouseDown:$=>{$.preventDefault();const v=E(r.url);v&&(window.location.href=v)},"aria-label":p,children:[s.jsx("div",{className:"search-results-item-image w-32 flex-shrink-0",children:s.jsx(y,{src:r.image,width:"150",height:"200",alt:r.imageAlt||r.title,imgClasses:"rounded-site w-full object-contain",loading:"lazy"})}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("div",{className:"font-medium",children:r?.title}),s.jsx("div",{className:"search-results-price",children:r.originalPrice?s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("p",{children:r?.currentPrice}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(w,{state:"rrp",message:`${l(()=>t?.product?.price?.rrp)} ${r?.originalPrice}`}),s.jsx(w,{state:"discount",message:`${l(()=>t?.product?.price?.discount)}
2                                                            ${r?.discount}`})]})]}):r?.currentPrice})]})]})},r.sku)})})]}),e[7]=l,e[8]=t,e[9]=i.products,e[10]=o?.product?.units,e[11]=d):d=e[11];let x;return e[12]!==f||e[13]!==d?(x=s.jsxs("div",{id:"search-results",className:"rounded-site",ref:u,onKeyDown:N,role:"listbox",tabIndex:-1,children:[f,d]}),e[12]=f,e[13]=d,e[14]=x):x=e[14],x}function R(n,e){return s.jsx("li",{role:"option",children:s.jsx("a",{href:`/search/?q=${n}`,className:"interactive block w-full cursor-pointer p-3 px-5",tabIndex:0,onMouseDown:a=>{a.preventDefault(),window.location.href=`/search/?q=${n}`},children:n})},e)}function A(n){return n===document.activeElement}export{H 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.