PageSourceSearch

https://mscea.org/assets/cart-BGC6Q_fT.js

js mscea.org collected 2026-10-07 22:22:18 UTC 7,123 bytes, 1 lines download raw bytes

1import{a as j,j as e}from"./query-B0f0997C.js";import{H as v,a as b,E as o}from"./index-CMcXCNXM.js";import{u as N}from"./use-cart-CaP6JsX7.js";import{s as k}from"./checkout-GH6d8OWJ.js";import{u as C}from"./useTranslation-05YCpGEC.js";import"./react-vendor-sxpV3IEI.js";import"./radix-ui-C4BRaaeA.js";function H(){var p,g;const{t:r}=C(),{cart:a,removeFromCart:y,updateQuantity:i,clearCart:f,cartTotal:d,cartCount:n}=N(),[l,m]=j.useState(!1),[x,u]=j.useState(null),w=async()=>{if(a.length===0)return;m(!0),u(null);const t=await k("cart",a.map(s=>({productId:s.id,name:s.name,priceId:s.priceId,amount:s.price,currency:s.currency,quantity:s.quantity})));t.success||(u(t.error??"Failed to create checkout session"),m(!1))},c="https://mscea.org",h=`${c}/assets/www.mscea.org%20(2).png`;return e.jsxs("div",{className:"min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8",children:[e.jsxs(v,{children:[e.jsx("title",{children:"Your Cart — M-SCEA"}),e.jsx("meta",{name:"description",content:"Review your M-SCEA membership items and proceed to secure checkout."}),e.jsx("link",{rel:"canonical",href:`${c}/cart`}),e.jsx("meta",{property:"og:title",content:"Your Cart — M-SCEA"}),e.jsx("meta",{property:"og:description",content:"Review your M-SCEA membership items and proceed to secure checkout."}),e.jsx("meta",{property:"og:url",content:`${c}/cart`}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:image",content:h}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:"Your Cart — M-SCEA"}),e.jsx("meta",{name:"twitter:description",content:"Review your M-SCEA membership items and proceed to secure checkout."}),e.jsx("meta",{name:"twitter:image",content:h}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs(b,{to:"/",className:"inline-flex items-center text-blue-600 hover:text-blue-700 mb-4",children:[e.jsx("svg",{className:"w-5 h-5 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),r("stripe.link_continue_shopping")]}),e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:r("stripe.cart_title")}),e.jsxs("p",{className:"text-gray-600 mt-1",children:[n," ",r(n===1?"stripe.item_singular":"stripe.items_plural")]})]}),x&&e.jsx("div",{className:"mb-6 p-4 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("p",{className:"text-red-600",children:x})}),a.length===0?e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm p-12 text-center",children:[e.jsx("svg",{className:"w-16 h-16 text-gray-300 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})}),e.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:r("stripe.empty_cart_title")}),e.jsx("p",{className:"text-gray-600 mb-6",children:r("stripe.empty_cart_message")}),e.jsx(b,{to:"/",className:"inline-block px-6 py-3 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition-colors",children:r("stripe.btn_browse_store")})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-white rounded-2xl shadow-sm overflow-hidden mb-6",children:a.map((t,s)=>e.jsxs("div",{className:`flex items-center gap-4 p-6 ${s>0?"border-t border-gray-100":""}`,children:[t.image?e.jsx("img",{src:t.image,alt:t.name,className:"w-24 h-24 object-cover rounded-lg"}):e.jsx("div",{className:"w-24 h-24 bg-gray-100 rounded-lg flex items-center justify-center",children:e.jsx("svg",{className:"w-10 h-10 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-gray-900 truncate",children:t.name}),e.jsx("p",{className:"text-gray-600",children:o(t.price,t.currency)})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>i(t.id,t.quantity-1),className:"w-10 h-10 flex items-center justify-center rounded-lg border border-gray-300 hover:bg-gray-50 text-lg font-medium text-gray-900",children:"−"}),e.jsx("span",{className:"w-8 text-center font-semibold text-lg text-gray-900",children:t.quantity}),e.jsx("button",{onClick:()=>i(t.id,t.quantity+1),className:"w-10 h-10 flex items-center justify-center rounded-lg border border-gray-300 hover:bg-gray-50 text-lg font-medium text-gray-900",children:"+"})]}),e.jsx("div",{className:"text-right min-w-[100px]",children:e.jsx("p",{className:"font-bold text-gray-900",children:o(t.price*t.quantity,t.currency)})}),e.jsx("button",{onClick:()=>y(t.id),className:"p-2 text-gray-400 hover:text-red-500 transition-colors",title:"Remove item",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},t.id))}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:r("stripe.order_summary_title")}),e.jsxs("div",{className:"space-y-3 mb-6",children:[e.jsxs("div",{className:"flex justify-between text-gray-600",children:[e.jsxs("span",{children:[r("stripe.subtotal_label")," (",n," ",r(n===1?"stripe.item_singular":"stripe.items_plural"),")"]}),e.jsx("span",{children:o(d,((p=a[0])==null?void 0:p.currency)||"usd")})]}),e.jsxs("div",{className:"border-t pt-3 flex justify-between text-xl font-bold text-gray-900",children:[e.jsx("span",{children:r("stripe.total_label")}),e.jsx("span",{children:o(d,((g=a[0])==null?void 0:g.currency)||"usd")})]})]}),e.jsx("button",{onClick:w,disabled:l,className:`w-full py-4 px-6 rounded-lg font-medium text-lg transition-colors ${l?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700"}`,children:l?e.jsxs("span",{className:"flex items-center justify-center",children:[e.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r("stripe.btn_processing")]}):r("stripe.btn_proceed_to_checkout")}),e.jsx("button",{onClick:f,className:"w-full mt-3 py-2 text-gray-500 hover:text-red-500 text-sm transition-colors",children:r("stripe.btn_clear_cart")})]})]})]})]})}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.