PageSourceSearch

https://168asianmart.com/_next/static/chunks/pages/lunar-new-year-e12e98a3f5d895d8.js

js 168asianmart.com collected 2026-10-10 00:59:55 UTC 34,339 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{4629:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/lunar-new-year",function(){return a(83)}])},7711:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var r=a(4848);a(6540);var s=a(7859),i=a(2732),l=a(8019);let n=(0,i.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:a,asChild:i=!1,...o}=e,d=i?s.DX:"span";return(0,r.jsx)(d,{"data-slot":"badge",className:(0,l.cn)(n({variant:a}),t),...o})}},9380:(e,t,a)=>{"use strict";a.d(t,{Z5:()=>r,j1:()=>n,mD:()=>i,mn:()=>s,xq:()=>l});let r={year:2026,zodiac:"Horse",zodiacZh:"马年",title:"Lunar New Year Catering",titleZh:"贺年盆菜",subtitle:"Pre-order your Chinese New Year feast",subtitleZh:"预订您的新年盛宴",cutoffDate:"2026-02-08",cutoffDisplayDate:"February 8th, 2026",cutoffDisplayDateZh:"2月8号",businessEmail:"[email protected]",orderPrefix:"168"},s=[{date:"2026-02-15",displayDate:"February 15",displayDateZh:"2月15号",dayOfWeek:"Sunday",dayOfWeekZh:"星期天",lunarDate:"腊月廿八",available:!0},{date:"2026-02-16",displayDate:"February 16",displayDateZh:"2月16号",dayOfWeek:"Monday",dayOfWeekZh:"星期一",lunarDate:"腊月廿九",available:!0},{date:"2026-02-17",displayDate:"February 17",displayDateZh:"2月17号",dayOfWeek:"Tuesday",dayOfWeekZh:"星期二",lunarDate:"正月初一",available:!0},{date:"2026-02-18",displayDate:"February 18",displayDateZh:"2月18号",dayOfWeek:"Wednesday",dayOfWeekZh:"星期三",lunarDate:"正月初二",available:!0},{date:"2026-02-19",displayDate:"February 19",displayDateZh:"2月19号",dayOfWeek:"Thursday",dayOfWeekZh:"星期四",lunarDate:"正月初三",available:!0},{date:"2026-02-20",displayDate:"February 20",displayDateZh:"2月20号",dayOfWeek:"Friday",dayOfWeekZh:"星期五",lunarDate:"正月初四",available:!0}],i=[{id:"family-joy",name:"Family Joy Set",nameZh:"一路发阖家欢乐套餐",description:"A grand feast for the whole family featuring premium ingredients. Perfect for gatherings of 10 people.",descriptionZh:"十人份豪华盆菜,适合全家团聚享用",price:88.88,priceDisplay:"$88.88",serves:"10 people",servesZh:"10人份",ingredients:["Shrimp","Pig's Trotters","Crispy Pork Belly","Dried Oysters","Empress Chicken","Roast Duck","Shiitake Mushrooms","Broccoli","Glass Noodles","Napa Cabbage"],ingredientsZh:["虾","猪蹄","脆皮五花肉","蚝豉","贵妃鸡","烧鸭","冬菇","西蓝花","粉丝","大白菜"],image:"/lunar-new-year/1.jpg",isVegetarian:!1,stripePriceEnvKey:"STRIPE_PRICE_FAMILY_JOY"},{id:"wishes-set",name:"All Wishes Come True Set",nameZh:"一路发万事如意套餐",description:"A delightful vegetarian option featuring traditional lucky ingredients for prosperity and good fortune.",descriptionZh:"素食盆菜,寓意万事如意",price:13.88,priceDisplay:"$13.88",serves:"2-3 people",servesZh:"2-3人份",ingredients:["Wood Ear Mushrooms","Shiitake Mushrooms","Fat Choy (Black Moss)","Glass Noodles","Napa Cabbage","Wheat Gluten"],ingredientsZh:["云耳","冬菇","发菜","粉丝","大白菜","面筋"],image:"/lunar-new-year/2.jpg",isVegetarian:!0,stripePriceEnvKey:"STRIPE_PRICE_WISHES_SET"}];function l(){return new Date<=new Date(r.cutoffDate+"T23:59:59")}function n(){let e=new Date;return Math.max(0,Math.ceil((new Date(r.cutoffDate+"T23:59:59").getTime()-e.getTime())/864e5))}},8019:(e,t,a)=>{"use strict";a.d(t,{cn:()=>i});var r=a(4164),s=a(856);function i(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,s.QP)((0,r.$)(t))}},83:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>$});var r=a(4848),s=a(2301),i=a(9230),l=a(6297),n=a(6540),o=a(9965),d=a.n(o),c=a(1106),m=a.n(c),u=a(6715),x=a(7711),h=a(9380
1),p=a(9508),f=a(9096),b=a(785),g=a(363),y=a(3807),v=a(867),j=a(7212),N=a(8856),w=a(4441),k=a(4909),D=a(3702),C=a(478),P=a(7216),Z=a(9910),A=a(6010),S=a(773),O=a(3761),E=a(6459),F=a(7906);let T={zh:{yearOf:"年",subtitle:"预订您的新年盛宴",daysLeft:"天后截止预订",cutoff:"截止日期",orderingClosed:"预订已截止",steps:{date:"日期",menu:"菜单",payment:"付款",confirm:"确认"},selectPickupDate:"选择取货日期",selectPickupDateDesc:"选择您方便取货的日期",continueToMenu:"选择菜单",chooseYourFeast:"选择您的盆菜",chooseYourFeastDesc:"选择我们的传统新年套餐",vegetarian:"素食",clickToEnlarge:"点击放大",clickToClose:"点击任意位置关闭",serves:"份量",moreIngredients:"更多",add:"添加",yourSelection:"您的选择",total:"总计",continueToCheckout:"去结账",back:"返回",completeOrder:"完成订单",completeOrderDesc:"填写信息并完成付款",orderSummary:"订单摘要",pickupDate:"取货日期",yourInfo:"您的信息",fullName:"姓名",enterName:"请输入您的姓名",email:"邮箱",enterEmail:"请输入您的邮箱",phone:"电话",enterPhone:"请输入您的电话",payment:"付款",payWith:"使用 Stripe 支付",fillInfo:"请填写您的信息",redirecting:"正在跳转到付款页面...",secureCheckout:"您将被重定向到 Stripe 安全付款页面",orderConfirmed:"订单已确认!",emailSent:"确认邮件已发送到您的邮箱",orderNumber:"订单编号",orderItems:"订购内容",placeAnother:"再下一单",backToHome:"返回首页",paymentFailed:"付款失败",tryAgain:"重试",startNewOrder:"重新下单",orderingEnded:"预订已结束",cutoffPassed:"新年预订截止日期已过"},en:{yearOf:"Year of the",subtitle:"Pre-order your Chinese New Year feast",daysLeft:"days left to order",cutoff:"Cutoff",orderingClosed:"Ordering has closed for this year",steps:{date:"Date",menu:"Menu",payment:"Payment",confirm:"Confirm"},selectPickupDate:"Select Your Pickup Date",selectPickupDateDesc:"Choose when you'd like to pick up your feast",continueToMenu:"Continue to Menu",chooseYourFeast:"Choose Your Feast",chooseYourFeastDesc:"Select one or both of our traditional Chinese New Year sets",vegetarian:"Vegetarian",clickToEnlarge:"Click to enlarge",clickToClose:"Click anywhere to close",serves:"Serves",moreIngredients:"more",add:"Add",yourSelection:"Your Selection",total:"Total",continueToCheckout:"Continue to Checkout",back:"Back",completeOrder:"Complete Your Order",completeOrderDesc:"Enter your details and complete payment",orderSummary:"Order Summary",pickupDate:"Pickup Date",yourInfo:"Your Information",fullName:"Full Name",enterName:"Enter your full name",email:"Email Address",enterEmail:"Enter your email",phone:"Phone Number",enterPhone:"Enter your phone number",payment:"Payment",payWith:"Pay with Stripe",fillInfo:"Please fill in your information",redirecting:"Redirecting to Payment...",secureCheckout:"You will be redirected to Stripe's secure checkout",orderConfirmed:"Order Confirmed!",emailSent:"A confirmation email has been sent to your inbox.",orderNumber:"Order Number",orderItems:"Order Items",placeAnother:"Place Another Order",backToHome:"Back to Home",paymentFailed:"Payment Failed",tryAgain:"Try Again",startNewOrder:"Start New Order",orderingEnded:"Ordering Perio
1d Has Ended",cutoffPassed:"The cutoff date for Chinese New Year orders was"}};function z(e){let{lang:t,onToggle:a}=e;return(0,r.jsxs)("button",{onClick:a,className:"fixed top-20 right-4 z-50 flex items-center gap-2 bg-white/90 backdrop-blur-sm border border-gray-200 rounded-full px-4 py-2 shadow-lg hover:shadow-xl transition-all",children:[(0,r.jsx)(p.A,{className:"w-4 h-4 text-gray-600"}),(0,r.jsx)("span",{className:"font-medium text-sm",children:"zh"===t?"English":"中文"})]})}function I(e){let{currentStep:t,lang:a}=e,s=T[a],i=[{num:1,label:s.steps.date,icon:f.A},{num:2,label:s.steps.menu,icon:b.A},{num:3,label:s.steps.payment,icon:g.A},{num:4,label:s.steps.confirm,icon:y.A}];return(0,r.jsx)("div",{className:"flex items-center justify-center gap-2 md:gap-4 mb-8",children:i.map((e,a)=>{let s=e.icon,l=t===e.num,n=t>e.num;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-full transition-all ".concat(l?"bg-[var(--primary)] text-white shadow-lg":n?"bg-green-500 text-white":"bg-[var(--muted)] text-[var(--muted-foreground)]"),children:[(0,r.jsx)(s,{className:"w-4 h-4"}),(0,r.jsx)("span",{className:"hidden sm:inline text-sm font-medium",children:e.label})]}),a<i.length-1&&(0,r.jsx)("div",{className:"w-8 md:w-12 h-0.5 mx-1 ".concat(t>e.num?"bg-green-500":"bg-[var(--border)]")})]},e.num)})})}function W(e){let{selectedDate:t,onSelect:a,onNext:s,lang:l}=e,n=T[l];return(0,r.jsxs)(i.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"max-w-4xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-8",children:[(0,r.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-[var(--foreground)] mb-2",children:n.selectPickupDate}),(0,r.jsx)("p",{className:"text-[var(--muted-foreground)]",children:n.selectPickupDateDesc})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-8",children:h.mn.map(e=>(0,r.jsxs)("button",{onClick:()=>a(e),disabled:!e.available,className:"relative p-6 rounded-2xl border-2 transition-all ".concat((null==t?void 0:t.date)===e.date?"border-[var(--primary)] bg-[var(--primary)]/10 shadow-lg":e.available?"border-[var(--border)] bg-white hover:border-[var(--primary)]/50 hover:shadow-md":"border-[var(--border)] bg-[var(--muted)] opacity-50 cursor-not-allowed"),children:[(null==t?void 0:t.date)===e.date&&(0,r.jsx)("div",{className:"absolute top-2 right-2",children:(0,r.jsx)(y.A,{className:"w-5 h-5 text-[var(--primary)]"})}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("p",{className:"text-lg font-bold text-[var(--primary)] mb-1",children:e.lunarDate}),(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mb-1",children:"zh"===l?e.dayOfWeekZh:e.dayOfWeek}),(0,r.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"zh"===l?e.displayDateZh:e.displayDate})]})]},e.date))}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsxs)("button",{onClick:s,disabled:!t,className:"inline-flex items-center gap-2 px-8 py-4 rounded-full font-semibold transition-all ".concat(t?"bg-[var(--primary)] text-white hover:bg-[var(--primary-hover)] shadow-lg hover:shadow-xl":"bg-[var(--muted)] text-[var(--muted-foreground)] cursor-not-allowed"),children:[n.continueToMenu,(0,r.jsx)(v.A,{className:"w-5 h-5"})]})})]})}function Y(e){let{image:t,alt:a,onClose:s,lang:l}=e,n=T[l];return(0,r.jsx)(i.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm cursor-pointer p-4",onClick:s,children:(0,r.jsxs)(i.P.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"relative max-w-4xl max-h-[90vh] w-full",children:[(0,r.jsx)(d(),{src:t,alt:a,width:1200,height:800,className:"w-full h-auto max-h-[90vh] object-contain rounded-lg"}),(0,r.jsx)("button",{onClick:s,className:"absolute top-4 right-4 w-10 h-10 bg-black/50 hover:bg-black/70 text-white rounded-full flex items-center justify-center transition-colors",children:(0,r.jsx)(j.A,{className:"w-6 h-6"})}),(0,r.jsx)("p",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 text-white/80 text-sm bg-black/50 px-4 py-2 rounded-full",children:n.clickToClose})]})})}function q(e){let{cartItems:t,onUpdateQuantity:a,onBack:s,onNext:o,lang:c}=e,m=T[c],[u,p]=(0,n.useState)(null),f=e=>{let a=t.find(t=>t.box.id===e);return(null==a?void 0:a.quantity)||0},b=t.reduce((e,t)=>e+t.quantity,0),g=t.reduce((e,t)=>e+t.box.price*t.quantity,0),y=b>0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.N,{children:u&&(0,r.jsx)(Y,{image:u.src,alt:u.alt,onClose:()=>p(null),lang:c})}),(0,r.jsxs)(i.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"max-w-5xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-8",children:[(0,r.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-[var(--foreground)] mb-2",children:m.chooseYourFeast}),(0,r.jsx)("p",{className:"text-[var(--muted-foreground)]",children:m.chooseYourFeastDesc})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:h.mD.map(e=>{let t=f(e.id),s=t>0;return(0,r.jsxs)("div",{className:"relative text-left rounded-2xl border-2 overflow-hidden transition-all ".concat(s?"border-[var(--primary)] shadow-xl ring-2 ring-[var(--primary)]/20":"border-[var(--border)] hover:border-[var(--primary)]/50 hover:shadow-lg"),children:[s&&(0,r.jsx)("div",{className:"absolute top-4 right-4 z-10",children:(0,r.jsxs)("div",{className:"bg-[var(--primary)] text-white px-3 py-1 rounded-full text-sm font-semibold flex items-center gap-1",children:[(0,r.jsx)(N.A,{className:"w-4 h-4"}),t]})}),(0,r.jsxs)("div",{className:"relative h-64 overflow-hidden cursor-zoom-in group",onClick:()=>p({src:e.image,alt:e.name}),children:[(0,r.jsx)(d(),{src:e.image,alt:e.name,fill:!0,className:"object-cover transition-transform duration-300 group-hover:scale-105"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors flex items-center justify-center",children:(0,r.jsx)("span",{className:"opacity-0 group-hover:opacity-100 transition-opacity text-white text-sm bg-black/50 px-3 py-1 rounded-full",children:m.clickToEnlarge})}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),(0,r.jsxs)("div",{className:"absolute bottom-4 left-4 right-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[e.isVegetarian&&(0,r.jsxs)(x.E,{className:"bg-green-500 text-white",children:[(0,r.jsx)(w.A,{className:"w-3 h-3 mr-1"}),m.vegetarian]}),(0,r.jsxs)(x.E,{className:"bg-white/90 text-[var(--foreground)]",children:[(0,r.jsx)(k.A,{className:"w-3 h-3 mr-1"}),"zh"===c?e.servesZh:e.serves]})]}),(0,r.jsx)("h3",{className:"text-xl font-bold text-white",children:"zh"===c?e.nameZh:e.name}),(0,r.jsx)("p",{className:"text-white/80 text-sm",children:"zh"===c?e.name:e.nameZh})]})]}),(0,r.jsxs)("div",{className:"p-5 bg-white",children:[(0,r.jsx)("p",{className:"text-[var(--muted-foreground)] text-sm mb-4",children:"zh"===c?e.descriptionZh:e.description}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[("zh"===c?e.ingredientsZh:e.ingredients).slice(0,6).map((e,t)=>(0,r.jsx)("span",{className:"text-xs px-2 py-1 bg-[var(--muted)] rounded-full text-[var(--muted-foreground)]",children:e},t)),e.ingredients.length>6&&(0,r.jsxs)("span",{className:"text-xs px-2 py-1 bg-[var(--muted)] rounded-full text-[var(--muted-foreground)]",children:["+",e.ingredients.length-6," ",m.moreIngredients]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-3xl font-bold text-[var(--primary)]",children:e.priceDisplay}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:t>0?(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-[var(--muted)] rounded-full p-1",children:[(0,r.jsx)("button",{onClick:()=>a(e.id,t-1),className:"w-9 h-9 rounded-full bg-white shadow flex items-center justify-center hover:bg-red-50 hover:text-red-500 transition-colors",children:(0,r.jsx)(D.A,{className:"w-4 h-4"})}),(0,r.jsx)("span",{className:"w-6 text-center font-bold",children:t}),(0,r.jsx)("button",{onClick:()=>a(e.id,t+1),className:"w-9 h-9 rounded-full bg-white shadow flex items-center justify-center hover:bg-green-50 hover:text-green-500 transition-colors",children:(0,r.jsx)(C.A,{className:"w-4 h-4"})})]}):(0,r.jsxs)("button",{onClick:()=>a(e.id,1),className:"inline-flex items-center gap-2 px-4 py-2 bg-[var(--primary)] text-white rounded-full font-medium hover:bg-[var(--primary-hover)] transition-colors",children:[(0,r.jsx)(C.A,{className:"w-4 h-4"}),m.add]})})]})]})]},e.id)})}),y&&(0,r.jsxs)(i.P.div,{initial:{opacity:0,y:10}
1,animate:{opacity:1,y:0},className:"bg-white rounded-2xl p-6 shadow-lg border border-[var(--border)] mb-8",children:[(0,r.jsxs)("h3",{className:"font-semibold text-[var(--foreground)] mb-4 flex items-center gap-2",children:[(0,r.jsx)(N.A,{className:"w-5 h-5"}),m.yourSelection]}),(0,r.jsxs)("div",{className:"space-y-3",children:[t.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between py-2 border-b border-[var(--border)] last:border-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"relative w-12 h-12 rounded-lg overflow-hidden",children:(0,r.jsx)(d(),{src:e.box.image,alt:e.box.name,fill:!0,className:"object-cover"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-[var(--foreground)]",children:"zh"===c?e.box.nameZh:e.box.name}),(0,r.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:[e.box.priceDisplay," \xd7 ",e.quantity]})]})]}),(0,r.jsxs)("p",{className:"font-semibold text-[var(--foreground)]",children:["$",(e.box.price*e.quantity).toFixed(2)]})]},e.box.id)),(0,r.jsxs)("div",{className:"flex justify-between pt-2 text-lg font-bold",children:[(0,r.jsx)("span",{children:m.total}),(0,r.jsxs)("span",{className:"text-[var(--primary)]",children:["$",g.toFixed(2)]})]})]})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("button",{onClick:s,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full font-medium text-[var(--muted-foreground)] hover:bg-[var(--muted)] transition-colors",children:[(0,r.jsx)(P.A,{className:"w-5 h-5"}),m.back]}),(0,r.jsxs)("button",{onClick:o,disabled:!y,className:"inline-flex items-center gap-2 px-8 py-4 rounded-full font-semibold transition-all ".concat(y?"bg-[var(--primary)] text-white hover:bg-[var(--primary-hover)] shadow-lg hover:shadow-xl":"bg-[var(--muted)] text-[var(--muted-foreground)] cursor-not-allowed"),children:[m.continueToCheckout,(0,r.jsx)(v.A,{className:"w-5 h-5"})]})]})]})]})}function _(e){let{selectedDate:t,cartItems:a,customerInfo:s,onCustomerInfoChange:l,onBack:n,onPaymentError:o,isProcessing:c,setIsProcessing:m,lang:u}=e,x=T[u],h=a.reduce((e,t)=>e+t.box.price*t.quantity,0),p=""!==s.name.trim()&&""!==s.email.trim()&&""!==s.phone.trim(),b=async()=>{if(p){m(!0);try{let e=await fetch("/api/cny/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerName:s.name,customerEmail:s.email,customerPhone:s.phone,pickupDate:t.date,items:a.map(e=>({foodBoxId:e.box.id,quantity:e.quantity}))})}),r=await e.json();r.success&&r.checkoutUrl?window.location.href=r.checkoutUrl:(o(r.error||"Failed to create checkout session"),m(!1))}catch(e){console.error("Checkout error:",e),o("Failed to initialize checkout. Please try again."),m(!1)}}};return(0,r.jsxs)(i.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"max-w-3xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-8",children:[(0,r.jsx)("h2",{className:"text-2xl md:text-3xl font-bold text-[var(--foreground)] mb-2",children:x.completeOrder}),(0,r.jsx)("p",{className:"text-[var(--muted-foreground)]",children:x.completeOrderDesc})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{className:"bg-[var(--muted)] rounded-2xl p-6",children:[(0,r.jsx)("h3",{className:"font-semibold text-[var(--foreground)] mb-4",children:x.orderSummary}),(0,r.jsxs)("div",{className:"space-y-4",children:[a.map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-4 bg-white rounded-xl p-4",children:[(0,r.jsx)("div",{className:"relative w-16 h-16 rounded-lg overflow-hidden flex-shrink-0",children:(0,r.jsx)(d(),{src:e.box.image,alt:e.box.name,fill:!0,className:"object-cover"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"font-medium text-[var(--foreground)] truncate",children:"zh"===u?e.box.nameZh:e.box.name}),(0,r.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:[e.box.priceDisplay," \xd7 ",e.quantity]})]}),(0,r.jsxs)("p",{className:"font-semibold flex-shrink-0",children:["$",(e.box.price*e.quantity).toFixed(2)]})]},e.box.id)),(0,r.jsxs)("div",{className:"flex items-center gap-3 bg-white rounded-xl p-4",children:[(0,r.jsx)(f.A,{className:"w-5 h-5 text-[var(--primary)]"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:x.pickupDate}),(0,r.jsxs)("p",{className:"font-medium text-[var(--foreground)]",children:[t.lunarDate," (","zh"===u?t.dayOfWeekZh:t.dayOfWeek,")"]}),(0,r.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"zh"===u?t.displayDateZh:t.displayDate})]})]}),(0,r.jsx)("div",{className:"border-t border-[var(--border)] pt-4",children:(0,r.jsxs)("div",{className:"flex justify-between text-lg font-bold",children:[(0,r.jsx)("span",{children:x.total}),(0,r.jsxs)("span",{className:"text-[var(--primary)]",children:["$",h.toFixed(2)]})]})})]})]}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-[var(--border)]",children:[(0,r.jsx)("h3",{className:"font-semibold text-[var(--foreground)] mb-4",children:x.yourInfo}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-[var(--foreground)] mb-2",children:[(0,r.jsx)(Z.A,{className:"w-4 h-4 inline mr-2"}),x.fullName]}),(0,r.jsx)("input",{type:"text",value:s.name,onChange:e=>l({...s,name:e.target.value}),placeholder:x.enterName,className:"w-full px-4 py-3 rounded-lg border border-[var(--border)] focus:outline-none focus:ring-2 focus:ring-[var(--primary)] focus:border-transparent"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-[var(--foreground)] mb-2",children:[(0,r.jsx)(A.A,{className:"w-4 h-4 inline mr-2"}),x.email]}),(0,r.jsx)("input",{type:"email",value:s.email,onChange:e=>l({...s,email:e.target.value}),placeholder:x.enterEmail,className:"w-full px-4 py-3 rounded-lg border border-[var(--border)] focus:outline-none focus:ring-2 focus:ring-[var(--primary)] focus:border-transparent"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-[var(--foreground)] mb-2",children:[(0,r.jsx)(S.A,{className:"w-4 h-4 inline mr-2"}),x.phone]}),(0,r.jsx)("input",{type:"tel",value:s.phone,onChange:e=>l({...s,phone:e.target.value}),placeholder:x.enterPhone,className:"w-full px-4 py-3 rounded-lg border border-[var(--border)] focus:outline-none focus:ring-2 focus:ring-[var(--primary)] focus:border-transparent"})]})]})]}),(0,r.jsxs)("div",{className:"bg-white rounded-2xl p-6 shadow-lg border border-[var(--border)]",children:[(0,r.jsxs)("h3",{className:"font-semibold text-[var(--foreground)] mb-4",children:[(0,r.jsx)(g.A,{className:"w-4 h-4 inline mr-2"}),x.payment]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-gray-50 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"flex justify-between items-center text-lg font-semibold",children:[(0,r.jsxs)("span",{children:[x.total,":"]}),(0,r.jsxs)("span",{className:"text-red-600",children:["$",h.toFixed(2)]})]})}),(0,r.jsx)("button",{type:"button",onClick:b,disabled:!p||c,className:"w-full py-4 px-6 rounded-xl font-bold text-lg transition-all ".concat(!p||c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gradient-to-r from-red-600 to-red-700 text-white hover:from-red-700 hover:to-red-800 shadow-lg hover:shadow-xl"),children:c?(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,r.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.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"})]}),x.redirecting]}):p?"".concat(x.payWith," - $").concat(h.toFixed(2)):x.fillInfo}),(0,r.jsx)("p",{className:"text-xs text-center text-gray-500",children:x.secureCheckout})]})]})]})]}),(0,r.jsx)("div",{className:"flex justify-start mt-8",children:(0,r.jsxs)("button",{onClick:n,disabled:c,
1className:"inline-flex items-center gap-2 px-6 py-3 rounded-full font-medium text-[var(--muted-foreground)] hover:bg-[var(--muted)] transition-colors disabled:opacity-50",children:[(0,r.jsx)(P.A,{className:"w-5 h-5"}),x.back]})})]})}function M(e){let{success:t,orderId:a,selectedDate:s,cartItems:l,orderData:n,error:o,onRetry:d,onNewOrder:c,lang:u}=e,x=T[u],h=(null==n?void 0:n.orderNumber)||a,p=(null==n?void 0:n.pickupDateDisplay)||(s?"".concat(s.lunarDate," (").concat(s.dayOfWeekZh,")"):""),f=(null==n?void 0:n.items)||l.map(e=>({name:"zh"===u?e.box.nameZh:e.box.name,quantity:e.quantity,price:e.box.price,subtotal:e.box.price*e.quantity})),b=(null==n?void 0:n.totalAmount)||l.reduce((e,t)=>e+t.box.price*t.quantity,0);return t?(0,r.jsxs)(i.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"max-w-xl mx-auto text-center",children:[(0,r.jsxs)("div",{className:"bg-green-50 rounded-2xl p-8 mb-6",children:[(0,r.jsx)("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,r.jsx)(y.A,{className:"w-10 h-10 text-green-500"})}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-green-700 mb-2",children:x.orderConfirmed}),(0,r.jsx)("p",{className:"text-green-600 mb-4",children:x.emailSent}),(0,r.jsxs)("div",{className:"bg-white rounded-xl p-6 text-left",children:[(0,r.jsxs)("div",{className:"mb-4 pb-4 border-b border-[var(--border)]",children:[(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:x.orderNumber}),(0,r.jsx)("p",{className:"text-2xl font-bold text-[var(--primary)]",children:h})]}),(0,r.jsxs)("div",{className:"mb-4 pb-4 border-b border-[var(--border)]",children:[(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:x.pickupDate}),(0,r.jsx)("p",{className:"font-semibold text-[var(--foreground)]",children:p})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mb-2",children:x.orderItems}),f.map((e,t)=>(0,r.jsxs)("div",{className:"flex justify-between mb-1",children:[(0,r.jsxs)("span",{className:"text-[var(--foreground)]",children:[e.name," \xd7 ",e.quantity]}),(0,r.jsxs)("span",{className:"font-medium",children:["$",e.subtotal.toFixed(2)]})]},t)),(0,r.jsx)("div",{className:"border-t border-[var(--border)] mt-3 pt-3",children:(0,r.jsxs)("p",{className:"text-lg font-bold text-[var(--primary)] text-right",children:[x.total,": $",b.toFixed(2)]})})]})]})]}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[(0,r.jsx)("button",{onClick:c,className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-[var(--primary)] text-white rounded-full font-semibold hover:bg-[var(--primary-hover)] transition-colors shadow-lg",children:x.placeAnother}),(0,r.jsx)(m(),{href:"/",className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-[var(--muted)] text-[var(--foreground)] rounded-full font-medium hover:bg-[var(--border)] transition-colors",children:x.backToHome})]})]}):(0,r.jsxs)(i.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"max-w-xl mx-auto text-center",children:[(0,r.jsxs)("div",{className:"bg-red-50 rounded-2xl p-8 mb-6",children:[(0,r.jsx)("div",{className:"w-20 h-20 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,r.jsx)(j.A,{className:"w-10 h-10 text-red-500"})}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-red-700 mb-2",children:x.paymentFailed}),(0,r.jsx)("p",{className:"text-red-600 mb-4",children:o||"There was an issue processing your payment."})]}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[(0,r.jsxs)("button",{onClick:d,className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-[var(--primary)] text-white rounded-full font-semibold hover:bg-[var(--primary-hover)] transition-colors shadow-lg",children:[(0,r.jsx)(O.A,{className:"w-5 h-5"}),x.tryAgain]}),(0,r.jsx)("button",{onClick:c,className:"inline-flex items-center justify-center gap-2 px-8 py-4 bg-[var(--muted)] text-[var(--foreground)] rounded-full font-medium hover:bg-[var(--border)] transition-colors",children:x.startNewOrder})]})]})}
1function $(){let e=(0,u.useRouter)(),[t,a]=(0,n.useState)(1),[o,d]=(0,n.useState)(null),[c,p]=(0,n.useState)([]),[f,b]=(0,n.useState)({name:"",email:"",phone:""}),[g,y]=(0,n.useState)(!1),[v,j]=(0,n.useState)(null),[N,w]=(0,n.useState)(null),[k,D]=(0,n.useState)(!1),[C,P]=(0,n.useState)(null),[Z,A]=(0,n.useState)(!1),[S,O]=(0,n.useState)("zh"),Y=(0,h.xq)(),$=(0,h.j1)(),B=T[S];return(0,n.useEffect)(()=>{let{success:t,session_id:r,canceled:s}=e.query;if(s){P("Payment was canceled. Please try again."),a(3),e.replace("/lunar-new-year",void 0,{shallow:!0});return}"true"!==t||!r||Z||v||(A(!0),fetch("/api/cny/verify-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:r})}).then(e=>e.json()).then(t=>{t.success?(j(t.orderNumber),w({orderNumber:t.orderNumber,customerName:t.customerName,pickupDateDisplay:t.pickupDateDisplay,items:t.items,totalAmount:t.totalAmount}),D(!0)):(P(t.error||"Failed to verify payment"),D(!1)),a(4),e.replace("/lunar-new-year",void 0,{shallow:!0})}).catch(t=>{console.error("Verify checkout error:",t),P("Failed to verify payment. Please contact support."),D(!1),a(4),e.replace("/lunar-new-year",void 0,{shallow:!0})}).finally(()=>{A(!1)}))},[e.query,Z,v,e]),(0,r.jsxs)(s.A,{pageName:"Lunar New Year Catering",children:[(0,r.jsx)(z,{lang:S,onToggle:()=>{O(e=>"zh"===e?"en":"zh")}}),(0,r.jsxs)("section",{className:"relative py-16 md:py-24 bg-gradient-to-b from-red-600 via-red-500 to-red-600 overflow-hidden",children:[(0,r.jsxs)("div",{className:"absolute inset-0 opacity-10",children:[(0,r.jsx)("div",{className:"absolute top-10 left-10 w-40 h-40 border-4 border-yellow-400 rounded-full"}),(0,r.jsx)("div",{className:"absolute bottom-10 right-10 w-60 h-60 border-4 border-yellow-400 rounded-full"}),(0,r.jsx)("div",{className:"absolute top-1/2 left-1/4 w-20 h-20 bg-yellow-400 rounded-full blur-xl"})]}),(0,r.jsx)("div",{className:"container mx-auto px-4 md:px-6 relative z-10",children:(0,r.jsxs)(i.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center text-white max-w-3xl mx-auto",children:[(0,r.jsxs)(x.E,{className:"bg-yellow-400 text-red-700 mb-4 text-sm px-4 py-1 font-semibold",children:[h.Z5.zodiacZh," • ",B.yearOf," ",h.Z5.zodiac]}),(0,r.jsx)("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-4",children:"zh"===S?h.Z5.titleZh:h.Z5.title}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-white/90 mb-2",children:"zh"===S?h.Z5.title:h.Z5.titleZh}),(0,r.jsx)("p",{className:"text-white/80 mb-6",children:B.subtitle}),Y?(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm rounded-full px-4 py-2",children:[(0,r.jsx)(E.A,{className:"w-5 h-5"}),(0,r.jsx)("span",{className:"font-medium",children:"zh"===S?"".concat($," ").concat(B.daysLeft," • ").concat(B.cutoff,": ").concat(h.Z5.cutoffDisplayDateZh||h.Z5.cutoffDisplayDate):"".concat($," ").concat(B.daysLeft," • ").concat(B.cutoff,": ").concat(h.Z5.cutoffDisplayDate)})]}):(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 bg-red-900/50 backdrop-blur-sm rounded-full px-4 py-2",children:[(0,r.jsx)(F.A,{className:"w-5 h-5"}),(0,r.jsx)("span",{className:"font-medium",children:B.orderingClosed})]})]})})]}),(0,r.jsx)("section",{className:"py-12 md:py-16 bg-gradient-to-b from-[var(--muted)] to-white",children:(0,r.jsx)("div",{className:"container mx-auto px-4 md:px-6",children:Y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I,{currentStep:t,lang:S}),(0,r.jsxs)(l.N,{mode:"wait",children:[1===t&&(0,r.jsx)(W,{selectedDate:o,onSelect:d,onNext:()=>a(2),lang:S},"step1"),2===t&&(0,r.jsx)(q,{cartItems:c,onUpdateQuantity:(e,t)=>{if(t<=0)p(t=>t.filter(t=>t.box.id!==e));else if(c.find(t=>t.box.id===e))p(a=>a.map(a=>a.box.id===e?{...a,quantity:t}:a));else{let a=h.mD.find(t=>t.id===e);a&&p(e=>[...e,{box:a,quantity:t}])}},onBack:()=>a(1),onNext:()=>a(3),lang:S},"step2"),3===t&&o&&c.length>0&&(0,r.jsx)(_,{selectedDate:o,cartItems:c,customerInfo:f,onCustomerInfoChange:b,onBack:()=>a(2),onPaymentError:e=>{P(e)},isProcessing:g,setIsProcessing:y,lang:S},"step3"),4===t&&(0,r.jsx)(M,{success:k,orderId:v,selectedDate:o,cartItems:c,orderData:N,error:C,onRetry:()=>{P(null),a(3)},onNewOrder:()=>
1{a(1),d(null),p([]),b({name:"",email:"",phone:""}),j(null),w(null),D(!1),P(null)},lang:S},"step4")]})]}):(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)(F.A,{className:"w-16 h-16 text-[var(--muted-foreground)] mx-auto mb-4"}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-[var(--foreground)] mb-2",children:B.orderingEnded}),(0,r.jsxs)("p",{className:"text-[var(--muted-foreground)] mb-6",children:[B.cutoffPassed," ",h.Z5.cutoffDisplayDate,"."]}),(0,r.jsx)(m(),{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 bg-[var(--primary)] text-white rounded-full font-medium hover:bg-[var(--primary-hover)] transition-colors",children:B.backToHome})]})})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[180,799,163,572,301,636,593,792],()=>t(4629)),_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.