1import{av as J,ax as E,w as N,b as K,h as X,x as Z}from"./zRKRMFEZ.js";import{m as F,C as s,P as n,a9 as d,u as c,aq as z,G as w,a0 as e,ac as h,ar as ee,a1 as W,a6 as M,_ as Y,$ as G,p as T,a8 as te,a5 as $,F as P,a7 as y,ak as se,j,b8 as ne,b9 as ie,D as oe,am as ae,M as V,T as re,H as I,b7 as le,ba as ce,au as ue,bb as de,x as me}from"./DUCOj2lJ.js";import{P as A}from"./DFBnT1L3.js";import{t as pe}from"./BHkn1ilN.js";import{u as fe}from"./DBlDEVbv.js";import{u as _e}from"./YWAvWo8L.js";import{u as he}from"./Dl6LmZaY.js";import"./M99ye0eI.js";import"./CZzC8w7F.js";import"./DD84joPr.js";import"./C3e4t58V.js";import"./Dipz0mOK.js";import"./1uQHCFUG.js";import"./tncAhSry.js";import"./DMf_iQbA.js";const be={class:"mb-4 flex justify-between"},ge={class:"text-grind"},xe=["href","onClick"],ve=F({__name:"LeadTimesFiltersLists",props:{type:{},mobileMenuOpen:{type:Boolean}},setup(g){const f=g,x=T(()=>f.type!=="custom-printed"&&f.type!=="blank"&&f.type!=="design-lab");return(k,_)=>(s(),n("div",null,[d(c(z),null,{default:w(({nbHits:v})=>[e("div",be,[e("div",ge," FILTER BY ("+h(v)+" RESULTS) ",1),d(c(ee),null,{default:w(({canRefine:L,refine:R,createURL:C})=>[e("a",{href:C(),class:M({"pointer-events-none no-underline opacity-70":!L}),onClick:W(R,["prevent"])}," Reset ",10,xe)]),_:1})])]),_:1}),Y(d(A,{title:"Availability",attribute:"category","sort-by":["name"],operator:"or","expanded-default":!0,"mobile-menu-open":g.mobileMenuOpen},null,8,["mobile-menu-open"]),[[G,c(x)]]),d(A,{title:"Product Type",attribute:"type",operator:"or","sort-by":["count:desc","name:asc"],"mobile-menu-open":g.mobileMenuOpen},null,8,["mobile-menu-open"])]))}}),H=Object.assign(ve,{__name:"PageBuildingLeadTimesFiltersLists"}),ye=F({__name:"LeadTimesTurnaround",props:{productionTimes:{},transitTime:{}},setup(g){const f=g,x=T(()=>f.productionTimes?f.productionTimes.min+f.transitTime:null),k=T(()=>f.productionTimes?f.productionTimes.max+f.transitTime:null);return(_,v)=>(s(),n("div",null,h(c(pe)(c(x),c(k))),1))}}),ke=Object.assign(ye,{__name:"PageBuildingLeadTimesTurnaround"}),Le={class:"text-grind"},Te={class:"mb-10"},we={class:"mb-20 flex gap-7"},$e={class:"flex-0 hidden w-52 lg:block"},Ce=["src"],Pe={class:"flex-1"},Re={class:"mb-4"},Ue={class:"mb-0 mr-5 inline-block"},Ee=["innerHTML"],Me={class:"mb-3"},Fe={class:"mr-2 font-bold"},Se=["href"],Oe=["href"],Be=["href"],De=["innerHTML"],je={class:"w-full table-auto rounded-xl shadow"},Ve={class:"border-b border-grind-800"},qe={class:"flex items-center gap-2 px-6 py-4 text-left text-xs font-normal uppercase"},Ie=["href"],Ae={key:0},He={key:0,class:"mb-20"},Ne=F({__name:"LeadTimesResults",props:{items:{},location:{}},emits:["locationChanged","openLocationModal"],async setup(g,{emit:f}){let x,k;const{data:_}=([x,k]=te(()=>J("/nuxt-api/lead-times","$_YgEU1F6uL")),x=await x,k(),x),v=g,L=f,{orderItems:R}=fe(()=>"type"),C=T(()=>{if(!_.value||_.value.groups===void 0||_.value.availabilities===void 0)return[];const p=[..._.value.groups];p.forEach(o=>{o.items=[]}),v.items.forEach(o=>{let r=!1;p.forEach(t=>{!r&&t.name==o.group&&(t.items.push(o),r=!0)})}),p.forEach(o=>{if(o.availabilities=[],o.items.length===0)return;[..._.value.availabilities].forEach(t=>{t.items=[],o.items.forEach(i=>{i.category===t.name&&t.items.push(i)}),t.items.length>0&&o.availabilities.push({...t})}),delete o.items});const b=[];return p.forEach(o=>{if(o.availabilities.length===0)return;let r=!1;b.forEach(t=>{!r&&t.name==o.productType&&(t.groups.push(o),r=!0)}),r||b.push({name:o.productType,groups:[o]})}),R(b.map(o=>({...o,value:o.name})))}),S=p=>p.endsWith("ies")?p.slice(0,-3)+"y":p.endsWith("ches")?p.slice(0,-2):p.endsWith("s")?p.slice(0,-1):p,U=T(()=>v.location?v.location.country==="US":!1),O=T(()=>U.value?"Estimated delivery date":"Ships by"),B=T(()=>U.value&&v.location?v.location.transit_days:0);return(p,b)=>{const o=N;return s(),n("div",Le,[(s(!0),n($,null,P(c(C),(r,t)=>(s(),n("div",{key:r.name},[e("h2",Te,h(S(r.name))+" - Estimated Delivery ",1),(s(!0),n($,null,P(r.groups,(i,m)=>(s(),n("div",{key:i.name,class:"mb-20"},[e("div",we,[e("div",$e,[e("img",{class:"w-full",src:i.image},null,8,Ce)]),e("div",Pe,[e("div",Re,[e("h3",Ue,h(i.name),1)]),i.note?(s(),n("div",{key:0,innerHTML:i.note},null,8,Ee)):y("",!0),(s(!0),n($,null,P(i.availabilities,u=>(s(),n("div",{key:u.name,class:"mt-12"},[e("div",Me,[e("span",Fe,h(u.name),1),i.designLabLinkUrl&&u.name==="Roastar Design Lab"?(s(),n("a",{key:0,href:c(E)(i.designLabLinkUrl),target:"_blank",class:"text-sm"},h(i.designLabLinkText),9,Se)):y("",!0),i.stockLinkUrl&&u.name==="Stock / Blank"?(s(),n("a",{key:1,href:c(E)(i.stockLinkUrl),target:"_blank",class:"text-sm"},h(i.stockLinkText),9,Oe)):y("",!0),i.customPrintedLinkUrl&&u.name==="Custom-printed"?(s(),n("a",{key:2,href:c(E)(i.customPrintedLinkUrl),target:"_blank",class:"text-sm"},h(i.customPrintedLinkText),9,Be)):y("",!0)]),u.note?(s(),n("div",{key:0,class:"mb-6",innerHTML:u.note},null,8,De)):y("",!0),e("table",je,[e("thead",null,[e("tr",Ve,[b[1]||(b[1]=e("th",{class:"px-6 py-4 text-left text-xs font-normal uppercase"}," Size ",-1)),e("th",qe,[e("div",null,h(c(O)),1),e("button",{"aria-label":"Estimated Delivery Date",onClick:b[0]||(b[0]=a=>L("openLocationModal"))},[d(o,{name:"question-circle",class:"text-[14px] hover:text-brew"})])]),b[2]||(b[2]=e("th",null,null,-1))])]),e("tbody",null,[(s(!0),n($,null,P(u.items,(a,l)=>(s(),n("tr",{key:a.id,class:"border-b last:border-b-0"},[e("td",{class:M(["px-6 py-3",{"bg-grind-50":l%2===0,"rounded-bl-xl":l===u.items.length-1}])},h(a.description),3),a.turnaround_min||a.turnaround_max?(s(),n("td",{key:0,class:M(["px-6 py-3",{"bg-grind-50":l%2===0}])},[d(ke,{"production-times":{min:a.turnaround_min,max:a.turnaround_max},"transit-time":c(B)},null,8,["production-times","transit-time"])],2)):y("",!0),e("td",{class:M(["px-6 py-3",{"bg-grind-50":l%2===0,"rounded-br-xl":l===u.items.length-1}])},[e("a",{href:c(E)(a.link_url),target:"_blank"},h(a.link_text),9,Ie)],2)]))),128))])])]))),128))])]),m!==r.groups.length-1?(s(),n("hr",Ae)):y("",!0)]))),128)),t!==c(C).length-1?(s(),n("hr",He)):y("",!0)]))),128))])}}}),ze=Object.assign(Ne,{__name:"PageBuildingLeadTimesResults"}),We={class:"flex-none lg:hidden"},Ye={class:"fixed inset-x-0 top-0 z-[999999] h-screen overflow-y-scroll bg-white px-4 py-4"},Ge={class:"mb-4 flex justify-between"}
1,Qe={class:"mt-4 flex"},Je={class:"text-white"},Ke={key:0},Xe={key:1},Ze={class:"flex-none lg:top-32 lg:w-1/4 lg:self-start"},et={class:"hidden lg:block"},tt={key:0,class:"mt-8 hidden lg:block"},st={class:"mt-8 flex-1 lg:mt-0"},nt={class:"w-full lg:min-h-[44px]"},it=["href","onClick"],ot={key:0,class:"mt-10 text-center"},at={class:"invisible"},rt={key:0,class:"mb-12 mt-8 md:mb-20 lg:hidden"},lt=0,ct=F({__name:"LeadTimesView",props:{type:{},industry:{},location:{}},emits:["locationChanged","openLocationModal"],setup(g,{emit:f}){const x=f,k=X(),_=k.public.algolia.indexes.productTurnaround,v=T(()=>""),L=j(!1),C=he().href,S=K().path,U=j(!0),O={},B=se(k.public.algolia.applicationId,k.public.algolia.search),p=j(ne({searchClient:B,future:{preserveSharedStateOnUnmount:!0},routing:{router:ie({cleanUrlOnDispose:!1,getLocation(){return typeof window>"u"?new URL(C):window.location},createURL({qsModule:r,routeState:t,location:i}){const m=S,u={},a=t==null?void 0:t[_];if(a){const q=a.refinementList||{};["category","type"].forEach(D=>{q[D]&&(u[D]=q[D].join("|"))})}const l=r.stringify(u,{addQueryPrefix:!1,arrayFormat:"repeat"});return(typeof window<"u"?window.location.origin:k.public.baseUrl)+m+(l?"?"+l:"")},parseURL({qsModule:r,location:t}){const i=r.parse(t.search.slice(1)),m={};return["category","type"].forEach(a=>{if(i[a]){const l=i[a];typeof l=="string"?m[a]=l.split("|"):Array.isArray(l)&&(m[a]=l)}}),{[_]:{refinementList:m}}}})},indexName:_,initialUiState:{[_]:{configure:{hitsPerPage:9,page:lt,filters:v.value},refinementList:O}}}));function b(){U.value=!1,o.renderState[_].infiniteHits.showMore()}const{instantsearch:o}=p.value.data();return me("$_ais_ssrInstantSearchInstance",o),_e(o),(r,t)=>{const i=N;return s(),oe(c(de),{class:"gap-x-14 lg:flex"},{default:w(()=>[d(c(ae),{hitsPerPage:1e3,filters:c(v),responseFields:["*","renderingContent"]},null,8,["filters"]),e("div",We,[e("div",{class:"btn-primary flex items-center justify-center gap-x-2",onClick:t[0]||(t[0]=m=>L.value=!0)},[t[6]||(t[6]=V(" Filter ",-1)),d(i,{name:"bars-filter-solid",class:"text-xl"})]),d(re,{name:"slide-up"},{default:w(()=>[Y(e("div",Ye,[e("div",Ge,[t[7]||(t[7]=e("h3",{class:"text-xl"},"Lead Times Filter",-1)),d(i,{name:"xmark-solid",class:"text-xl",onClick:t[1]||(t[1]=m=>L.value=!1)})]),d(H,{type:g.type,"mobile-menu-open":L.value},null,8,["type","mobile-menu-open"]),e("div",Qe,[e("div",{class:"btn-primary w-full text-center",onClick:t[2]||(t[2]=m=>L.value=!1)},[d(c(z),null,{default:w(({nbHits:m})=>[e("div",Je,[V(" View "+h(m)+" ",1),m>1?(s(),n("span",Ke,"results")):(s(),n("span",Xe,"result"))])]),_:1})])])],512),[[G,L.value]])]),_:1})]),e("aside",Ze,[e("div",et,[d(H,{type:g.type},null,8,["type"])]),r.$slots["product-filter-cta"]?(s(),n("div",tt,[I(r.$slots,"product-filter-cta",{},void 0,!0)])):y("",!0)]),e("div",st,[e("div",nt,[d(c(le),{class:"mb-4 flex gap-2"},{default:w(({items:m,createURL:u})=>[(s(!0),n($,null,P(m,a=>(s(),n($,{key:a.attribute},[(s(!0),n($,null,P(a.refinements,l=>(s(),n("div",{key:[l.attribute,l.type,l.value,l.operator].join(":"),class:"rounded-md bg-white shadow-md hover:bg-gray-100"},[e("a",{href:u(l),class:"flex items-center gap-2 px-5 py-3 text-xs uppercase text-grind no-underline",onClick:W(Q=>a.refine(l),["prevent"])},[V(h(l.label)+" ",1),d(i,{name:"filter-x",class:"text-xs text-grind"})],8,it)]))),128))],64))),128))]),_:1})]),d(c(ce),null,{default:w(({items:m,isLastPage:u})=>[d(ze,{items:m,location:g.location,onLocationChanged:t[3]||(t[3]=a=>x("locationChanged")),onOpenLocationModal:t[4]||(t[4]=a=>x("openLocationModal"))},null,8,["items","location"]),u?y("",!0):(s(),n("div",ot,[e("button",{class:"btn-primary",onClick:t[5]||(t[5]=a=>b())}," Show More ")]))]),_:1}),e("div",at,[d(c(ue))]),r.$slots["product-filter-cta-mobile"]?(s(),n("div",rt,[I(r.$slots,"product-filter-cta-mobile",{},void 0,!0)])):y("",!0)])]),_:3})}}}),$t=Object.assign(Z(ct,[["__scopeId","data-v-fb20c320"]]),{__name:"PageBuildingLeadTimesView"});export{$t as default}; 2//# sourceMappingURL=BLOmouab.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.