PageSourceSearch

https://smashburger.com/_next/static/chunks/pages/my-account/payment-info-8b4d8b2769dc6269.js

js smashburger.com collected 2026-10-02 02:56:17 UTC 10,221 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6052],{321:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>_,default:()=>k});var s=a(37876),n=a(67914),l=a(48230),c=a.n(l),r=a(62867),i=a(14521),d=a(26072),o=a(67768),m=a(40097),u=a(91040),x=a(96969),h=a(23993),y=a(24398),f=a(5319);function g(e){let{account:t}=e,a=(0,o.jE)(),n=(0,y.d)(),l=(0,m.n)({mutationKey:h.kz,mutationFn:()=>u.A.put("/api/user/billing-accounts/".concat(t.AccountIdString)).then(e=>e.data),onSuccess(e){a.setQueryData(h.kz,e),n.update("Your default payment method has been updated.","success")},onError(e){(0,f.m)("set_default_billing_account",n,e)}});return"creditcard"!==t.AccountType?(0,s.jsx)(s.Fragment,{}):t.IsDefault?(0,s.jsxs)("span",{className:"flex items-center gap-1 text-sm text-gray-600",children:["Default payment method",(0,s.jsx)(d.I,{icon:"checkmark",className:"h-4 w-4 text-success-700"})]}):(0,s.jsxs)(x.$,{variant:"secondary",size:"extra-sm",className:"mt-2 w-fit !normal-case",disabled:l.isPending,loading:l.isPending,onClick:()=>l.mutate(),children:["Set as default",(0,s.jsxs)("span",{className:"sr-only",children:["Make account ending in ",t.CardSuffix," my default payment method"]})]})}function p(e){let{account:t}=e,a=(0,o.jE)(),n=(0,y.d)(),l=(0,m.n)({mutationKey:h.kz,mutationFn:()=>u.A.delete("/api/user/billing-accounts/".concat(t.AccountIdString)).then(e=>e.data),onSuccess(e){a.setQueryData(h.kz,e),n.update("Payment method has been deleted.","success")},onError(e){(0,f.m)("delete_billing_account",n,e)}});return(0,s.jsxs)(x.$,{variant:"negative-tertiary",size:"extra-sm",disabled:l.isPending,loading:l.isPending,onClick:()=>l.mutate(),children:["Remove",(0,s.jsxs)("span",{className:"sr-only",children:["account ending in ",t.CardSuffix]})]})}function j(e){let{account:t,type:a}=e;switch(a){case"creditcard":var n;return(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)(d.I,{icon:"cc-".concat(null==(n=t.CardType)?void 0:n.toLowerCase(),"-colored"),className:"h-6 w-9"}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-1",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"text-md font-medium text-gray-950",children:t.CardType}),(0,s.jsxs)("span",{className:"ml-2 inline-block text-sm text-gray-600",children:["••••",t.CardSuffix]})]}),(0,s.jsxs)("span",{className:"text-sm text-gray-600",children:["Expires ",t.ExpirationDisplay]}),(0,s.jsx)(g,{account:t})]}),(0,s.jsx)(p,{account:t})]});case"giftcard":return(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(d.I,{icon:"gift-card",className:"h-6 w-6"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("span",{className:"text-md font-medium text-gray-950",children:"Gift Card"}),(0,s.jsxs)("span",{className:"ml-2 text-sm text-gray-600",children:["••••",t.CardSuffix]})]}),(0,s.jsx)(p,{account:t})]});default:return null}}var b=a(62565),v=a(36793),N=a(47625),w=a(45880),_=!0;function k(e){let{navigation:t,preview:a,social:l}=e,{data:o}=(0,n.I)({queryKey:h.kz,throwOnError:(e,t)=>((0,w.Ij)("get_billing_accounts",e),!1)}),m=null==o?void 0:o.filter(e=>"creditcard"===e.AccountType),u=null==o?void 0:o.filter(e=>e.AccountType.includes("Gift Card")),x=(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"mb-6 text-center font-bold text-gray-950 display-sm lg:text-left lg:display-md",children:"Credit Cards"}),(null==m?void 0:m.length)?(0,s.jsx)("ul",{className:"mb-8 divide-y divide-gray-100 [&>li:not(:last-child)]:pb-4 [&>li:not(:first-child)]:pt-4",children:m.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(j,{account:e,type:"creditcard"})},e.AccountIdString))}):(0,s.jsx)("p",{className:"text-md text-gray-600 max-lg:text-center",children:"You don't have any saved credit card"})]}),y=(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"mb-6 text-center font-bold text-gray-950 display-sm lg:text-left lg:display-md",children:"Gift Cards"}),(null==u?void 0:u.length)?(0,s.jsx)("ul",{className:"divide-y divide-gray-100 [&>li:not(:last-child)]:pb-4 [&>li:not(:first-child)]:pt-4",children:u.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)(j,{account:e,type:"giftcard"})},e.AccountIdString))}):(0,s.jsx)("p",{className:"text-md text-gray-600 max-lg:text-center",children:"You don't have any saved gift card"})]});return(0,s.jsxs)(v.P,{navigation:t,social:l,preview:!!a,children:[(0,s.jsx)(r.bV,{title:"My Account",noindex:!0,nofollow:!0}),(0,s.jsx)(b.B,{path:[{title:"My Account",url:"/my-account"}]}),(0,s.jsx)(i.O,{children:(null==o?void 0:o.length)?(0,s.jsxs)("div",{className:"space-y-8",children:[x,y]}):(0,s.jsxs)("div",{className:"flex flex-col max-lg:items-center lg:mb-0",children:[(0,s.jsx)("div",{className:"mb-6 w-fit roun
1ded-full bg-gray-50 p-4",children:(0,s.jsx)(d.I,{icon:"credit-card",className:"h-6 w-6 text-gray-400"})}),(0,s.jsxs)("div",{className:"text-md text-gray-600",children:["You don't have any saved payment method.\xa0",(0,s.jsxs)("span",{children:[(0,s.jsx)(N.N,{as:c(),href:"/order-now-cta",variant:"basic",children:"Start an order and save a payment method"}),"\xa0for it to show here."]})]})]})})]})}},14521:(e,t,a)=>{"use strict";a.d(t,{O:()=>N});var s=a(37876),n=a(48230),l=a.n(n),c=a(89099),r=a(14232),i=a(96969),d=a(72585),o=a(26072),m=a(28655),u=a(83539),x=a(67768),h=a(40097),y=a(91040),f=a(15039),g=a.n(f),p=a(23993),j=a(24398),b=a(5319);function v(){let e=(0,x.jE)(),t=(0,c.useRouter)(),a=(0,j.d)(),n=(0,h.n)({mutationKey:p.jI,mutationFn:()=>y.A.post("/api/user/logout"),onSuccess(s){t.push("/sign-in").then(()=>{e.removeQueries({queryKey:p.jI}),e.removeQueries({queryKey:p.Vu}),e.removeQueries({queryKey:p.SS}),e.removeQueries({queryKey:p.Mo}),e.removeQueries({queryKey:p.n7}),e.removeQueries({queryKey:p.Cu}),e.removeQueries({queryKey:p.$8}),e.removeQueries({queryKey:p.IF}),e.removeQueries({queryKey:p.nu}),e.removeQueries({queryKey:p.tO}),a.update(s.data.success,"success")})},onError(e){(0,b.m)("logout",a,e)}});return(0,s.jsxs)("ul",{children:[[{label:"Contact Info",gtmLabel:"contact info",href:"/my-account/contact-info",icon:"phone"},{label:"Payment Info",gtmLabel:"payment info",href:"/my-account/payment-info",icon:"credit-card"},{label:"Recent Orders",gtmLabel:"recent orders",href:"/my-account/recent-orders",icon:"order"},{label:"Rewards",gtmLabel:"rewards",href:"/my-account/rewards",icon:"gift"},{label:"Favorite Locations",gtmLabel:"favorite locations",href:"/my-account/favorite-locations",icon:"saved-location"}].map(e=>{let a=t.pathname===e.href;return(0,s.jsx)("li",{children:(0,s.jsxs)(l(),{href:e.href,scroll:!1,className:g()("sb_body_cta flex w-full items-center gap-4 roun
1ded-md py-5 px-4 text-xl hover:bg-secondary-500 hover:text-black",a?"bg-secondary-500 font-bold text-brand-500":"font-medium text-black"),"data-sb_action":"body - my account - click","data-sb_label":"web info=".concat(e.gtmLabel),children:[(0,s.jsx)(o.I,{icon:e.icon,className:g()("h-6 w-6",a&&"text-brand-500")}),(0,s.jsx)("span",{children:e.label})]})},e.label)}),(0,s.jsx)("li",{className:"rounded-md py-5 px-4 hover:bg-gray-50 hover:text-black",children:(0,s.jsxs)("button",{type:"button",className:"sb_body_cta flex w-full items-center gap-4 font-medium text-black","data-sb_action":"body - my account - click","data-sb_label":"web info=log out",onClick:()=>n.mutate(),children:[(0,s.jsx)(o.I,{icon:"log-out",className:"h-6 w-6"}),(0,s.jsx)("span",{children:"Log Out"})]})})]})}function N(e){let{backLink:t="/my-account",children:a}=e,n=(0,c.useRouter)(),[x,h]=(0,r.useState)(!1),{data:y}=(0,u.J)();return(0,m.G)(["lg"],e=>{let[t]=e;a&&h(!t.matches)}),(0,s.jsxs)("div",{className:"container px-4 py-8 md:pt-10 md:pb-20",children:[(0,s.jsx)("h1",{className:"mb-4 text-center font-bold text-brand-500 display-lg md:mb-12 md:display-2xl",children:"My Account"}),(0,s.jsxs)("div",{className:"lg:grid lg:grid-cols-2 lg:gap-20",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-8 rounded-md bg-black py-5 px-8 text-center",children:[(0,s.jsxs)("h2",{className:"mb-1 font-bold text-white display-xs",children:["Hi, ",null==y?void 0:y.FirstName]}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-[5px] text-xl font-bold text-tertiary-500",children:[(0,s.jsx)(o.I,{icon:"star-square",className:"h-6 w-6"}),(0,s.jsxs)("span",{children:[null==y?void 0:y.PointBalance," ",(null==y?void 0:y.PointBalance)===1?"Point":"Points"]})]})]}),(0,s.jsx)(v,{})]}),!!a&&(0,s.jsx)("div",{className:"hidden lg:block",children:a})]}),!!a&&(0,s.jsxs)(d.l,{isOpen:x,setIsOpen:h,onClose:()=>{n.push(t)},className:"w-full max-w-screen-md rounded-10 bg-white p-6 text-black shadow-xl",children:[(0,s.jsx)("div",{className:"mb-2 flex justify-end",children:(0,s.jsxs)(l(),{href:t,scroll:!1,className:"-m-2 p-2",children:[(0,s.jsx)("span",{className:"sr-only",children:"Close"}),(0,s.jsx)(o.I,{icon:"close",className:"h-6 w-6 text-gray-600"})]})}),a,(0,s.jsx)(i.$,{as:l(),href:t,scroll:!1,variant:"secondary",size:"lg",className:"mt-2 w-full",children:"Cancel"})]})]})}},62565:(e,t,a)=>{"use strict";a.d(t,{B:()=>d});var s=a(37876),n=a(15039),l=a.n(n),c=a(48230),r=a.n(c),i=a(26072);function d(e){let{path:t}=e;return(0,s.jsx)("div",{className:"container hidden py-6 last:pb-6 md:block",children:(0,s.jsx)("nav",{className:"text-lg","aria-label":"Breadcrumbs",children:(0,s.jsxs)("ol",{className:"flex items-center space-x-4 uppercase",children:[(0,s.jsx)("li",{children:(0,s.jsxs)(r(),{href:"/",className:"block text-gray-500 transition-colors hover:text-gray-950 focus:text-gray-950",children:[(0,s.jsx)("span",{className:"sr-only",children:"Home"}),(0,s.jsx)(i.I,{icon:"home",className:"h-5 w-5"})]})}),t.map((e,a)=>(0,s.jsxs)("li",{className:"inline-flex items-center gap-4",children:[(0,s.jsx)(i.I,{icon:"chevron-right",className:"h-4 w-4 text-gray-500"}),(0,s.jsx)(r(),{href:e.url,className:l()("text-sm font-semibold transition-colors hover:underline",a===t.length-1?"text-gray-950":"text-gray-500 hover:text-gray-950 focus:text-gray-950"),"aria-current":a===t.length-1?"page":void 0,children:e.title})]},"breadcrumb-".concat(a)))]})})})}},80760:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/payment-info",function(){return a(321)}])}},e=>{e.O(0,[2477,8531,636,6593,8792],()=>e(e.s=80760)),_N_E=e.O()}]);

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.