PageSourceSearch

https://app.aarpdriversafety.org/assets/index-H1hb1G0U.js

js aarpdriversafety.org collected 2026-10-02 06:01:18 UTC 3,551 bytes, 2 lines download raw bytes

1import{t as m,v as f,w as y,x as g,D as x,ap as b,G as t,T as j,aA as w,H as u,a9 as v,U as n,g2 as N}from"./index-CL22zKs4.js";import{u as L}from"./useComponentLog-B5pYe_aL.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="8a1deddf-f24a-46e9-b622-3e315922ff6c",e._sentryDebugIdIdentifier="sentry-dbid-8a1deddf-f24a-46e9-b622-3e315922ff6c")}catch{}})();const P=(e,s)=>{const a={queryKey:s};for(const r of Object.keys(e))r!=="queryKey"&&Object.defineProperty(a,r,{enumerable:!0,configurable:!0,get:()=>e[r]});return a},q=()=>"/purchase-receipt/list",R=async e=>y(q(),{...e,method:"GET"}),T=()=>["/purchase-receipt/list"],E=e=>{const{query:s,request:a}=e??{},r=s?.queryKey??T();return f({queryKey:r,queryFn:({signal:o})=>R({signal:o,...a}),...s})};function I(e,s){const a=E(e),r=m(a,s);return P(r,a.queryKey)}const O=e=>{if(e.data.isSuccess===!1)throw new Error("Unable to load purchase receipts.");return e.data.data?.receipts??[]},D=()=>I({query:{select:O}}),S=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),p=e=>S.format(e),A=e=>e||"—",U=()=>{L("PurchaseReceiptsScreen");const e=g(),{data:s,isError:a,isLoading:r,refetch:l}=D(),c=s??[];x.useEffect(()=>{e(b("My Orders"))},[e]);const o=()=>r?t.jsx(w,{isLoading:!0,centered:!1}):a?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(u,{variant:"error",title:"Unable to load orders",description:"Something went wrong while loading your orders. Please try again."}),t.jsx(v,{onClick:()=>{l()},"data-test":"retryButton",children:"Try Again"})]}):c.length===0?t.jsx(u,{variant:"information",title:"No orders found."}):t.jsx("ul",{className:"flex flex-col gap-4","data-test":"receiptList",children:c.map(i=>
1t.jsxs("li",{className:"flex flex-col gap-4 rounded-lg bg-background-secondary p-6 shadow-card-floating tablet:p-4","data-test":"receiptItem",children:[t.jsxs("div",{className:"flex justify-between items-baseline gap-4",children:[t.jsx(n,{as:"span",variant:"paragraph-large",weight:"bold","data-test":"receiptDate",children:N(i.completedAt??"")}),t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsx(n,{as:"span",variant:"paragraph-small",className:"text-content-subtle",children:"Total"}),t.jsx(n,{as:"span",variant:"paragraph-large",weight:"bold","data-test":"receiptTotal",children:p(i.totalChargeAmount??0)})]})]}),t.jsx("ul",{className:"flex flex-col gap-1","data-test":"receiptItems",children:i.itemList?.map((d,h)=>t.jsxs("li",{className:"flex justify-between items-baseline gap-4",children:[t.jsx(n,{as:"span",variant:"paragraph-medium","data-test":"receiptItemName",children:d.product?.title}),t.jsx(n,{as:"span",variant:"paragraph-medium",weight:"semibold","data-test":"receiptItemPrice",children:p(d.chargeAmount??0)})]},h))}),t.jsxs(n,{as:"span",variant:"paragraph-small",className:"text-content-subtle pt-3 border-t border-divider-line-light","data-test":"receiptPaymentType",children:["Payment method: ",A(i.paymentType)]})]},i.receiptId))});return t.jsx("div",{className:"grit screen purchase-receipts min-h-screen","data-state":r?"loading":"ready",children:t.jsxs("div",{className:"mx-auto w-full max-w-256 px-6 pt-10 mobile:px-8",children:[t.jsx(j,{as:"h1",size:"xxlarge",className:"mb-6","data-test":"purchaseReceiptsTitle",children:"My Orders"}),o()]})})};export{U as default};
2//# sourceMappingURL=index-H1hb1G0U.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.