PageSourceSearch

https://rarereserve.com/assets/route-CU_81pRp.js

js rarereserve.com collected 2026-09-29 21:12:05 UTC 10,196 bytes, 1 lines download raw bytes

1import{r as g,j as a}from"./jsx-runtime-D2HyDbKh.js";import{D as d}from"./Divider-DTIW_4YD.js";import{s as z,P as H}from"./PrivacyDots-Bya7ASFt.js";import{u as M}from"./components-SDhFL-zL.js";import{d as k}from"./index-OGzYKti1.js";import{C as U}from"./circle-alert-9e1ZjEZ4.js";import{m as w}from"./motion-FGmiHZpJ.js";import{b as q,F as G}from"./formatProductVariantAttributes-B4dzlm21.js";import{F as T}from"./GiftIcon-t0yJriFO.js";import"./createLucideIcon-iJ9pEJd7.js";function V({title:s,titleId:t,...l},c){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:c,"aria-labelledby":t},l),s?g.createElement("title",{id:t},s):null,g.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const W=g.forwardRef(V),Y=({orderPlacedAt:s,itemsCount:t,orderNumber:l,storesCount:c,fulfillmentType:n,deliveryAddress:e,customerName:o})=>{var h,j;const i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"numeric"}).format(s??new Date),m=e!=null&&e.line2?` ${e==null?void 0:e.line2},`:",",x=e?`${e==null?void 0:e.line1}${m} ${e==null?void 0:e.city}, ${e==null?void 0:e.state} ${e==null?void 0:e.zip}`:"",r=((j=(h=x==null?void 0:x.replaceAll(",",""))==null?void 0:h.trim())==null?void 0:j.length)>0;return a.jsxs("div",{className:"w-full flex flex-col",children:[a.jsx("h1",{className:"text-xl font-semibold",children:o}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("h5",{className:"text-md font-semibold text-success",children:n}),a.jsxs("h5",{className:"text-md font-semibold text-black",children:["Order #",l]})]}),r&&a.jsx("p",{className:"font-light text-gray-600",children:x}),a.jsxs("div",{className:"flex gap-4",children:[a.jsxs("p",{className:"text-md font-light text-gray-400",children:[c??0," Stores"]}),a.jsx("p",{className:"text-md font-light text-gray-400",children:"|"}),a.jsxs("p",{className:"text-md font-light text-gray-400",children:[t??0," Items"]}),a.jsx("p",{className:"text-md font-light text-gray-400",children:"|"}),a.jsx("p",{className:"text-md font-light text-gray-400",children:i})]})]})},Z=({itemsCount:s,storeAddress:t,storeName:l,expanded:c,onToggleExpand:n})=>{var m,x;const e=t!=null&&t.line2?` ${t==null?void 0:t.line2},`:",",o=`${t==null?void 0:t.line1}${e} ${t==null?void 0:t.city}, ${t==null?void 0:t.state} ${t==null?void 0:t.zip}`,i=((x=(m=o==null?void 0:o.replaceAll(",",""))==null?void 0:m.trim())==null?void 0:x.length)>0;return a.jsxs("button",{onClick:n,className:"flex transition-colors bg-gray-50 hover:bg-gray-100 hover:cursor-pointer text-left mb-2 p-4",children:[a.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[a.jsxs("div",{className:"flex gap-4 items-center",children:[a.jsx("h5",{className:"text-lg font-semibold text-black",children:l}),a.jsxs("h5",{className:"text-md font-semibold text-gray-500",children:[s," Items"]})]}),i&&a.jsx("p",{className:"text-md font-light text-gray-600",children:o})]}),a.jsx(w.div,{className:"flex self-center",animate:{rotate:c?180:0},children:a.jsx(W,{className:"h-4 w-4 text-black"})})]})},I=({name:s,quantity:t,price:l,unitPrice:c,imageUrl:n,uom:e="",size:o=0,packSize:i=0,container:m=""})=>{const{sizeString:x,packString:r}=q({size:o,uom:e,packSize:i,containerType:m}),h=g.useMemo(()=>i>1?a.jsxs(g.Fragment,{children:[a.jsxs("span",{children:[i," "]}),a.jsx(G,{className:"h-3 w-3 text-gray-600 inline-block"}),a.jsxs("span",{children:[" ",x," ",r]})]}):a.jsxs("span",{children:[x," ",r]}),[x,r,i]);return a.jsxs("div",{className:"w-full flex flex-col gap-2 p-4 border border-gray-200",children:[a.jsxs("div",{className:"flex py-2",children:[a.jsx("img",{src:n,alt:"Product",className:"max-w-[115px] object-cover rounded-md"}),a.jsxs("div",{className:"flex flex-col ml-4 flex-1 justify-center",children:[a.jsx("h5",{className:"font-semibold leading-tight line-clamp-2",children:s}),a.jsx("p",{className:"text-sm font-light text-gray-400",children:h}),a.jsxs("p",{className:"text-sm text-gray-600 mt-4",children:["price: ",c.presentation]}),a.jsxs("p",{className:"text-sm text-gray-600",children:["count: ",t]})]})]}),a.jsx(d,{}),a.jsxs("div",{className:"flex w-full justify-between items-center py-2",children:[a.jsx("p",{children:"Total"}),a.jsx("p",{className:"font-semibold",children:l.presentation})]})]})},J=({products:s,expanded:t})=>a.jsx(w.div,{className:"height-0 overflow-hidden grid grid-cols-1 lg:grid-cols-2 gap-4",initial:{height:0},animate:{height:t?"auto":0},children:s==null?void 0:s.map((l,c)=>{var n;return a.jsx("div",{className:"col-span-1",children:a.jsx(I,{imageUrl:((n=l.image)==null?void 0:n.url)??"",name:l.name,quantity:l.quantity,price:l.lineItemSubtotal,unitPrice:l.unitPrice,uom:l.uom,size:l.size,packSize:l.packSize,container:l.containerType})},c)})}),K=({itemsCount:s,storeName:t,storeAddress:l,items:c})=>{const[n,e]=g.useState(!0),o=()=>{e(i=>!i)};return a.jsxs("div",{className:"w-full flex flex-col gap-2",children:[a.jsx(Z,{expanded:n,itemsCount:s,storeAddress:l,storeName:t,onToggleExpand:o}),a.jsx(J,{expanded:n,products:c})]})},Q=({cardHolder:s,billingAddress:t,brand:l,lastDigits:c,subtotal:n,fulfillmentFees:e,salesTax:o,cecetTax:i,total:m,tip:x,discount:r})=>{const h=[a.jsx(f,{label:"Subtotal",amount:n.presentation},"subtotal"),(r==null?void 0:r.amount)>0&&a.jsx(f,{isDiscount:!0,label:"Discount",amount:`-${r==null?void 0:r.presentation}`},"fees"),(e==null?void 0:e.amount)>0&&a.jsx(f,{label:"Fulfillment Fees",amount:e.presentation},"fees"),(i==null?void 0:i.amount)>0&&a.jsx(f,{label:"Cecet Tax",amount:i==null?void 0:i.presentation},"fees"),a.jsx(f,{label:"Sales Tax",amount:o.presentation},"tax"),a.jsx(f,{label:"Tip",amount:x.presentation},"tax")];i.amount>0&&h.push(a.jsx(f,{label:"CECET Tax",amount:i.presentation},"cecet"));const j=z[l.toUpperCase()]??null;return a.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2 lg:gap-2",children:[a.jsx("div",{className:"col-span-1",children:a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx("p",{className:"font-semibold text-lg",children:"Billing Information"}),a.jsxs("div",{className:"flex flex-col gap-y-[4px]",children:[a.jsx("p",{children:s}),a.jsx("p",{className:"leading-tight font-thin text-gray-500",children:`${t.line1}, ${t.city}, ${t.state} ${t.zip}`}),a.jsxs("div",{className:"leading-tight text-gray-500 flex items-center gap-x-6",children:[a.jsx("span",{className:"hidden","aria-label":`Credit Card: ${l??"Not provided"}`}),j,a.jsx(H,{lastFour:c})]})]})]})}),a.jsx("div",{className:"col-span-1",children:a.jsx(X,{header:"Payment Information",lines:h})}),a.jsx("div",{className:"col-span-1"}),a.jsx("div",{className:"col-span-1",children:a.jsxs("div",{className:"w-full flex h-full jusitfy-between items-end",children:[a.jsx("h2",{className:"text-xl font-semibold flex-1 text-left",children:"Total"}),a.jsx("p",{className:"text-xl font-semibold flex-1 text-right",children:m.presentation})]})})]})},X=({header:s,lines:t})=>a.jsxs("div",{className:"w-full flex flex-col gap-2",children:[a.jsx("h2",{className:"text-lg font-semibold text-black",children:s}),a.jsx("div",{className:"w-full flex flex-col gap-1",children:t==null?void 0:t.map((l,c)=>
1a.jsx(g.Fragment,{children:typeof l=="string"?a.jsx("p",{className:"text-md font-light text-gray-500 leading-tight",children:l}):l},c))})]}),f=({label:s,amount:t,isDiscount:l})=>a.jsxs("div",{className:"w-full flex justify-between",children:[a.jsx("p",{className:"text-md font-light text-gray-500",children:s}),a.jsx("p",{className:`text-md font-light text-gray-500 ${l?"text-green-500":""}`,children:t})]}),_=()=>{const{data:s=null}=M(),l=k().state!=="idle";if(s==null)return a.jsxs("div",{className:"w-full flex flex-col items-center justify-center py-4 gap-2 min-h-[55vh] ",children:[a.jsx(U,{className:"w-8 h-8 text-red-400"}),a.jsxs("div",{className:"text-center",children:[a.jsx("p",{className:"font-light",children:"Uh oh! We were unable to find order details"}),a.jsx("p",{className:"font-light",children:"Please try again later"})]})]});const{id:c,orderDetailsByStore:n,orderDate:e,fulfillmentType:o,deliveryAddress:i,billingInfo:m,totalDeliveryFee:x,total:r,tip:h,billingFirstName:j,billingLastName:y,customerFirstName:$,customerLastName:v,isGift:C,giftFrom:S,giftMessage:D,totalDiscount:F,totalSubtotal:E,totalTaxBreakdown:p}=s,u=c==null?void 0:c.split("/"),P=(u==null?void 0:u[(u==null?void 0:u.length)-1])??"",L=n==null?void 0:n.reduce((N,b)=>N+((b==null?void 0:b.itemCount)??0),0);return a.jsxs("div",{className:`w-full flex-col py-4 gap-2 ${l?"loading":""}`,children:[a.jsx("div",{className:"w-full py-4",children:a.jsx(Y,{customerName:`${$} ${v}`,fulfillmentType:o??"DELIVERY",itemsCount:L,orderNumber:P,orderPlacedAt:new Date(e),storesCount:n==null?void 0:n.length,deliveryAddress:i})}),a.jsx(d,{className:"bg-gray-300"}),a.jsx("div",{className:"flex flex-col gap-4 py-4",children:n==null?void 0:n.map((N,b,O)=>{const R=b===O.length-1;return a.jsxs(g.Fragment,{children:[a.jsx(K,{itemsCount:N.itemCount??0,storeName:N.storeName,items:N.items??[],storeAddress:N.storeAddress}),R?null:a.jsx(d,{className:"bg-gray-300"})]},b)})}),C&&a.jsxs("div",{className:"border border-gray-200 p-4",children:[a.jsxs("div",{className:"w-full items-center flex gap-x-2",children:[a.jsx(T,{className:"h-6 w-6 text-gray-500"}),a.jsx("p",{children:"This order is a gift!"})]}),a.jsxs("div",{className:"mt-4",children:[a.jsx("p",{className:"font-semibold text-lg",children:"Gift Message"}),a.jsx("p",{className:"text-gray-500",children:D??""})]}),a.jsxs("div",{className:"mt-4",children:[a.jsx("p",{className:"font-semibold text-lg",children:"From"}),a.jsx("p",{className:"text-gray-500",children:S??""})]})]}),a.jsx("div",{className:"py-4",children:a.jsx(Q,{cardHolder:`${j} ${y}`,billingAddress:m==null?void 0:m.billingAddress,brand:m==null?void 0:m.brand,fulfillmentFees:x,lastDigits:m==null?void 0:m.lastDigits,subtotal:E,salesTax:p==null?void 0:p.totalSalesTax,cecetTax:p==null?void 0:p.totalCecetTax,total:r,tip:h,discount:F})})]})},ma=_;export{ma 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.