1import{j as e}from"./jsx-runtime-0DLF9kdB.js";import{G as p}from"./GlassCard-QGEypy6d.js";import{P as f}from"./PageTransition-d4Dnod-f.js";import{M as a}from"./MobileNavigation-D8pesZXW.js";import{u as w,L as l}from"./components-C61DWoh4.js";import"./cn-fNskMoFt.js";import"./use-combine-values-xozz9E_C.js";import"./proxy-TcOPxGtH.js";import"./index-DM-Ysix_.js";import"./i18n-context-DuXOzqEp.js";import"./hooks-ktRWiHiM.js";function u(t){return new Intl.NumberFormat("zh-TW",{style:"currency",currency:"TWD",maximumFractionDigits:0}).format(t||0)}function N(t){return t?new Date(t).toLocaleString("zh-TW",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):"-"}const y={CREATED:{label:"已建ç«",tone:"border-sky-300/20 bg-sky-400/10 text-sky-100",next:"è¨å®å·²å»ºç«ï¼çå¾
å¾çºç¢ºèªã"},UNPAID:{label:"å¾
仿¬¾",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100",next:"è«çæä»æ¬¾æ¹å¼æçå¾
總é¨ç¢ºèªã"},PAID:{label:"已仿¬¾",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100",next:"仿¬¾å®æï¼è¨å®ææ¥çºèçã"},FULFILLING:{label:"èçä¸",tone:"border-cyan-300/20 bg-cyan-400/10 text-cyan-100",next:"åºå®¶æç¸½é¨æ£å¨èçéçè¨å®ã"},SHIPPED:{label:"å·²åºè²¨",tone:"border-lime-300/20 bg-lime-400/10 text-lime-100",next:"ååå·²åºè²¨ï¼è«çæé
éè³è¨ã"},COMPLETED:{label:"已宿",tone:"border-white/10 bg-white/5 text-zinc-200",next:"è¨å®å·²å®æï¼å¯æ¥çä¿åºææåç´éã"},CANCELLED:{label:"已忶",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100",next:"å¦éåå©ï¼å¯å¾æ¤è¨å®å»ºç«å®¢æå®ã"},REFUNDING:{label:"鿬¾ä¸",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100",next:"鿬¾æµç¨èçä¸ï¼å¯å客æç¢ºèªé²åº¦ã"},REFUNDED:{label:"已鿬¾",tone:"border-white/10 bg-white/5 text-zinc-300",next:"鿬¾å·²å®æã"}},v={PENDING:{label:"仿¬¾å¾
確èª",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100"},UNPAID:{label:"å°æªä»æ¬¾",tone:"border-amber-300/25 bg-amber-400/10 text-amber-100"},PAID:{label:"仿¬¾å®æ",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100"},SUCCEEDED:{label:"仿¬¾å®æ",tone:"border-emerald-300/20 bg-emerald-400/10 text-emerald-100"},FAILED:{label:"仿¬¾å¤±æ",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100"},REFUNDING:{label:"鿬¾ä¸",tone:"border-rose-300/20 bg-rose-400/10 text-rose-100"},REFUNDED:{label:"已鿬¾",tone:"border-white/10 bg-white/5 text-zinc-300"}};function k(t){return y[t||""]||{label:t||"æ´æ°ä¸",tone:"border-white/10 bg-white/5 text-zinc-300",next:"çå¾
çæ
æ´æ°ã"}}function E(t){return v[t||""]||{label:t||"å°ç¡ä»æ¬¾ç´é",tone:"border-white/10 bg-white/5 text-zinc-300"}}function D(t){return{PENDING:"å¾
總é¨è¤æ¥",APPROVED:"æ½å·¥å·²ç¢ºèª",REJECTED:"éè£ä»¶",CANCELLED:"已忶"}[t||""]||t||"å°æªåå ±"}function z(t){return{ACTIVE:"ä¿åºææ",EXPIRED:"ä¿åºå°æ",VOID:"ä¿åºä½å»¢"}[t||""]||t||"å°æªå»ºç«"}function I(t,d){return t.map(c=>`${c.sku.product.name} x ${c.qty}`).join(" / ")||d}function $(){const{orders:t}=w(),d=t.filter(s=>!["COMPLETED","CANCELLED","REFUNDED"].includes(s.status)).length,c=t.filter(s=>{var n;return s.status==="UNPAID"||((n=s.payments[0])==null?void 0:n.status)==="PENDING"}).length,o=t.filter(s=>s.vehicleProtections.length>0).length;return e.jsx(f,{children:e.jsx("div",{className:"min-h-screen bg-[#070706] pb-28 text-[#f7f0e6]",children:e.jsxs("main",{className:"mx-auto max-w-5xl space-y-4 px-4 pt-4 md:space-y-5 md:px-8 md:pt-8",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-bold text-[#8f8a82]",children:"æå¡è¨å®"}),e.jsx("h1",{className:"mt-1 text-2xl font-black leading-tight text-white md:text-3xl",children:"è¨å®ç´é"}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-6 text-zinc-400",children:"è¿½è¹¤ä»æ¬¾ãæ½å·¥åå ±èä¿åºå»ºç«é²åº¦ã"})]}),e.jsxs(l,{to:"/shop",className:"inline-flex h-11 shrink-0 items-center justify-center gap-2 rounded-lg bg-white px-3 text-sm font-black text-black transition hover:bg-zinc-200",children:[e.jsx(a,{name:"bag",className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"åå¾åå"}),e.jsx("span",{className:"sm:hidden",children:"åå"})]})]}),e.jsxs("section",{className:"grid grid-cols-3 gap-2",children:[e.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.03] px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"總è¨å®"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:t.length})]}),e.jsxs("div",{className:"rounded-lg border border-cyan-300/20 bg-cyan-400/10 px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-cyan-100/70",children:"èçä¸"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:d})]}),e.jsxs("div",{className:"rounded-lg border border-amber-300/20 bg-amber-400/10 px-3 py-3",children:[e.jsx("p",{className:"text-[10px] font-bold text-amber-100/75",children:"仿¬¾å¾
確èª"}),e.jsx("p",{className:"mt-1 font-mono text-xl font-black text-white",children:c})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 px-1",children:[e.jsx("div",{className:"min-w-0 text-xs text-zinc-500",children:o>0?`${o} çå·²æä¿åºç´é`:"å®å·¥å¯©æ ¸å¾ï¼ä¿åºæé¡¯ç¤ºå¨è¨å®å
§ã"}),e.jsx(l,{to:"/me/support",className:"shrink-0 text-xs font-bold text-zinc-300 hover:text-white",children:"客æä¸å¿"})]}),e.jsx("div",{className:"space-y-3",children:t.length===0?e.jsx(p,{className:"!rounded-lg p-5",intensity:"low",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-md border border-amber-300/20 bg-amber-400/10 text-amber-100",children:e.jsx(a,{name:"receipt",className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-lg font-black text-white",children:"å°ç¡è¨å®ç´é"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-zinc-400",children:"å¯ä»¥å
建ç«é ç´ï¼æå¾è²åº«èååæé¸åé©çæ¹æ¡ã宿仿¬¾ææ½å·¥å¾ï¼é²åº¦æéä¸å¨é裡ã"}),e.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[e.jsxs(l,{to:"/service-intake",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-emerald-300/20 bg-emerald-400/10 px-3 text-sm font-black text-emerald-100",children:[e.jsx(a,{name:"service",className:"h-4 w-4"}),"é ç´æå"]}),e.jsxs(l,{to:"/shop/color-chart",className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-white/10 bg-white/[0.04] px-3 text-sm font-black text-zinc-100",children:[e.jsx(a,{name:"swatch",className:"h-4 w-4"}),"æ¥çè²åº«"]})]})]})]})}):t.map(s=>{var b,h;const n=s.payments[0],i=s.serviceReports[0],r=s.vehicleProtections[0],m=k(s.status),x=E(n==null?void 0:n.status),g=((b=s.store)==null?void 0:b.name)||((h=s.salesAgent)==null?void 0:h.name)||"Zahit 總é¨",j=I(s.items,s.type);return e.jsxs(p,{className:"!rounded-lg overflow-hidden",intensity:"low",children:[e.jsxs("div",{className:"p-4 md:p-5",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`rounded-md border px-2 py-1 text-[10px] font-black ${m.tone}`,children:m.label}),e.jsx("span",{className:`rounded-md border px-2 py-1 text-[10px] font-bold ${x.tone}`,children:x.label})]}),e.jsx("h2",{className:"mt-3 line-clamp-2 break-words text-base font-black leading-6 text-white md:text-lg",children:j}),e.jsx("p",{className:"mt-2 break-all font-mono text-[11px] leading-5 text-zinc-500",children:s.orderNumber})]}),e.jsxs("div",{className:"min-w-0 sm:text-right",children:[e.jsx("p",{className:"break-words font-mono text-xl font-black leading-7 text-white md:text-2xl",children:u(s.totalAmount)}),e.jsx("p",{className:"mt-1 text-xs leading-5 text-zinc-500",children:N(s.createdAt)})]})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-[88px_1fr] gap-x-3 gap-y-2 text-xs md:grid-cols-[110px_1fr_110px_1fr]",children:[e.jsx("p",{className:"font-bold text-zinc-500",children:"æåå®ä½"}),e.jsx("p",{className:"min-w-0 break-words font-semibold text-zinc-200",children:g}),e.jsx("p",{className:"font-bold text-zinc-500",children:"è¨å®é¡å"}),e.jsx("p",{className:"min-w-0 break-words font-mono text-zinc-300",children:s.type})]}),e.jsx("p",{className:"mt-4 rounded-md border border-white/10 bg-black/20 px-3 py-2 text-xs leading-5 text-zinc-300",children:m.next})]}),e.jsx("div",{className:"border-t border-white/10",children:e.jsxs("div",{className:"grid divide-y divide-white/10 text-sm md:grid-cols-3 md:divide-x md:divide-y-0",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"receipt",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"仿¬¾"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:x.label}),(n==null?void 0:n.paidAt)&&e.jsx("p",{className:"mt-1 text-xs text-zinc-500",children:N(n.paidAt)})]})]}),e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"service",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"æ½å·¥åå ±"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:D(i==null?void 0:i.status)}),(i==null?void 0:i.batchNumber)&&e.jsx("p",{className:"mt-1 break-all font-mono text-xs text-zinc-500",children:i.batchNumber})]})]}),e.jsxs("div",{className:"flex min-w-0 items-start gap-3 px-4 py-3",children:[e.jsx("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-white/10 bg-black/25 text-zinc-300",children:e.jsx(a,{name:"shield",className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] font-bold text-zinc-500",children:"ä¿åº"}),e.jsx("p",{className:"mt-1 break-words font-bold text-white",children:z(r==null?void 0:r.status)}),(r==null?void 0:r.warrantyCode)&&e.jsx("p",{className:"mt-1 break-all font-mono text-xs text-zinc-500",children:r.warrantyCode})]})]})]})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-white/10 p-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0 text-xs leading-5 text-zinc-500",children:r!=null&&r.warrantyCode?"ä¿åºç¢¼å·²å»ºç«
1ï¼å¯å°ä¿åºè»åº«æ¥ç宿´è³è¨ã":"éè¦ä¿®æ¹è³ææç¢ºèªä»æ¬¾ï¼å¯ç´æ¥è©¢å客æã"}),e.jsxs("div",{className:r!=null&&r.id?"grid grid-cols-2 gap-2 sm:flex sm:shrink-0":"grid gap-2 sm:flex sm:shrink-0",children:[(r==null?void 0:r.id)&&e.jsxs(l,{to:"/me/garage",className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-lg border border-lime-300/20 bg-lime-400/10 px-3 text-xs font-black text-lime-100",children:[e.jsx(a,{name:"shield",className:"h-4 w-4"}),"ä¿åº"]}),e.jsxs(l,{to:`/me/support?orderId=${s.id}`,className:"inline-flex min-h-10 items-center justify-center gap-2 rounded-lg border border-rose-300/20 bg-rose-400/10 px-3 text-xs font-black text-rose-100",children:[e.jsx(a,{name:"support",className:"h-4 w-4"}),"è©¢å客æ"]})]})]})]},s.id)})})]})})})}export{$ 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.