PageSourceSearch

https://petwellhk.com/assets/MidAutumnFestivalRegistration-DISRv6al.js

js petwellhk.com collected 2026-10-06 05:23:22 UTC 22,791 bytes, 9 lines download raw bytes

1import{j as e,r as i,n as Se}from"./react-vendor-BDHNqS4B.js";import{b as we}from"./Header-BkbupWq-.js";import{b as M,L as Q,B as X,n as le,D as Pe,j as Ie,l as Ee,m as Re,I as B,e as Ae,U as ee}from"./main-m_sUF2N4.js";import{C as H}from"./checkbox-BkyFxaQM.js";import{R as De,a as _e}from"./radio-group-8WfHeakx.js";import{u as Me}from"./useSEO-CoArDrdl.js";import{S as Te,a as Oe,b as $e,c as Fe,e as He,f as We,d as Le}from"./select-fZgDq8v8.js";import{W as q,f as D,s as Y,F as G,E as ce,a as Ue,q as Be,b as qe,c as ze,i as Ve,M as Ke,d as Ye,w as Ge,P as Qe,p as Xe,e as Ze,g as Je,h as et}from"./midAutumnFestival2026-GVaMxjdF.js";import{M as tt,i as te,u as de,P as st,a as rt,b as nt,L as at,m as ot}from"./proxy-B801D4Tp.js";import{t as it,l as lt,s as ct}from"./midAutumnMetaPixel-CU7nfzNg.js";import{M as se}from"./message-circle-B5m25ymx.js";import{o as dt,s as V}from"./types-CW8l682q.js";import"./amplify-DYDcjoow.js";import"./chevron-right-CpkQxGj-.js";import"./check-DS0-tR9o.js";import"./tag-D40gy_Nl.js";import"./query-7-WHkg5t.js";import"./index-CFf87M6S.js";import"./chevron-up-Cb9C18fB.js";const me="/assets/festival-rsvp-banner-7ob1N_XI.jpg",mt="/assets/perk-family-CPDHJ33A.jpg",ut="/assets/perk-costume-Cv00p1Bb.jpg";function pt(){return e.jsx("figure",{className:"overflow-hidden rounded-2xl border border-border",children:e.jsx("img",{src:me,alt:"毛孩沉浸式台灣中秋祭:2026年9月25至27日,觀塘海濱 AquaBeat,免費入場歡迎帶毛孩",className:"block h-auto w-full",width:1024,height:576,fetchPriority:"high"})})}const xt="/assets/workshop-mooncake-DZ5fVZiI.jpg",ht="/assets/workshop-scarf-hcKvwwd1.jpg",ft=["familyPhoto"],gt={mooncake:xt,scarf:ht};function re({id:s}){const a=G[s],r=Y(s),n=a.useEarlyBirdAlone&&a.earlyBirdPrice<a.regularPrice,o=n?a.kind==="workshop"?"最後3日特價":"早鳥價":null;return e.jsxs("div",{className:"shrink-0 text-right",children:[o&&e.jsx("p",{className:"text-[11px] font-semibold text-primary",children:o}),e.jsx("p",{className:"text-base font-semibold tabular-nums",children:D(r)}),n&&e.jsx("p",{className:"text-xs text-muted-foreground line-through tabular-nums",children:D(a.regularPrice)})]})}function ue(s){s.stopPropagation()}function jt(s){return s.split(" ").pop()??s}function bt({id:s,value:a,onPickSlot:r}){const n=`slot-${s}`;return e.jsxs("div",{className:"border-t border-primary/15 px-3 py-3 sm:px-4",onClick:ue,children:[e.jsxs(Q,{htmlFor:n,className:"text-xs font-medium",children:["上課時段",e.jsx("span",{className:"ml-0.5 text-destructive",children:"*"})]}),e.jsxs(Te,{value:a,onValueChange:o=>r(s,o),children:[e.jsx(Oe,{id:n,className:"mt-1.5 w-full",children:e.jsx($e,{placeholder:"請選擇日期及時間"})}),e.jsx(Fe,{children:ce.map(o=>e.jsxs(He,{children:[e.jsxs(We,{children:[o.dateLabel,"(星期",o.weekday,")"]}),Ue[s].filter(l=>l.dayId===o.id).map(l=>e.jsx(Le,{value:l.id,children:jt(l.label)},l.id))]},o.id))})]})]})}function Nt({itemIds:s,workshopSlots:a,overlap:r,slotError:n,onToggleItem:o,onPickSlot:l}){const f=q.filter(u=>s.includes(u)).length>0;return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-xl border border-primary/25 bg-primary/[0.04] px-4 py-3",children:[e.jsx("p",{className:"text-sm font-semibold text-primary",children:"最後 3 日報名工作坊"}),e.jsxs("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:["特價發售:花膠月餅 ",D(Y("mooncake")),"、圍巾"," ",D(Y("scarf")),"。名額有限,單項計價。"]})]}),e.jsxs("div",{className:"space-y-2",children:[q.map(u=>{const x=G[u],d=s.includes(u);return e.jsxs("div",{className:M("rounded-xl border transition-colors",d?"border-primary bg-primary/[0.05]":"border-border hover:border-primary/35"),children:[e.jsxs("div",{className:"flex cursor-pointer items-start gap-3 px-3 py-3 sm:items-center sm:px-4",onClick:()=>o(u),children:[e.jsx("span",{onClick:ue,className:"mt-1.5 shrink-0",children:e.jsx(H,{checked:d,onCheckedChange:()=>o(u),"aria-label":x.name})}),e.jsx("img",{src:gt[u],alt:"",width:160,height:160,className:"size-[4.5rem] shrink-0 rounded-lg object-cover ring-1 ring-black/10 sm:size-20"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm font-semibold leading-snug",children:x.name}),e.jsxs("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:["約 ",x.durationMin," 分鐘",x.capacity?` · 每場限 ${x.capacity} 位`:"",!d&&" · 選取後顯示時段"]})]}),e.jsx(re,{id:u})]}),d&&e.jsx(bt,{id:u,value:a[u]??"",onPickSlot:l})]},u)}),r&&e.jsx("p",{className:"text-sm text-amber-800",children:"所選時段互相重疊,請調整其中一個時段,或安排於不同日期上課。"}),n&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:n})]}),f&&e.jsxs("div",{className:"space-y-2 border-t border-border pt-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"加購攝影服務(選填)"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"於即場進行,無需預約時段。"}),ft.map(u=>{const x=G[u],d=s.includes(u);return e.jsxs("label",{className:M("flex cursor-pointer items-center gap-3 rounded-xl border px-4 py-3 transition-colors",d?"border-primary bg-primary/[0.05]":"border-border hover:border-primary/35"),children:[e.jsx(H,{checked:d,onCheckedChange:()=>o(u),"aria-label":x.name,className:"mt-0.5 self-start"}),e.jsx("span",{className:"min-w-0 flex-1",children:e.jsx("span",{className:"block text-sm font-semibold",children:x.name})}),e.jsx(re,{id:u})]},u)})]})]})}function ne(s,a){if(typeof s=="function")return s(a);s!=null&&(s.current=a)}function yt(...s){return a=>{let r=!1;const n=s.map(o=>{const l=ne(o,a);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let o=0;o<n.length;o++){const l=n[o];typeof l=="function"?l():ne(s[o],null)}}}}function vt(...s){return i.useCallback(yt(...s),s)}class kt extends i.Component{getSnapshotBeforeUpdate(a){const r=this.props.childRef.current;if(r&&a.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=r.offsetParent,o=te(n)&&n.offsetWidth||0,l=te(n)&&n.offsetHeight||0,c=this.props.sizeRef.current;c.height=r.offsetHeight||0,c.width=r.offsetWidth||0,c.top=r.offsetTop,c.left=r.offsetLeft,c.right=o-c.width-c.left,c.bottom=l-c.height-c.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Ct({children:s,isPresent:a,anchorX:r,anchorY:n,root:o,pop:l}){var g;const c=i.useId(),f=i.useRef(null),u=i.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:x}=i.useContext(tt),d=((g=s.props)==null?void 0:g.ref)??(s==null?void 0:s.ref),k=vt(f,d);return i.useInsertionEffect(()=>{const{width:p,height:b,top:N,left:w,right:A,bottom:T}=u.current;if(a||l===!1||!f.current||!p||!b)return;
1const _=r==="left"?`left: ${w}`:`right: ${A}`,P=n==="bottom"?`bottom: ${T}`:`top: ${N}`;f.current.dataset.motionPopId=c;const C=document.createElement("style");x&&(C.nonce=x);const I=o??document.head;return I.appendChild(C),C.sheet&&C.sheet.insertRule(`
2          [data-motion-pop-id="${c}"] {
3            position: absolute !important;
4            width: ${p}px !important;
5            height: ${b}px !important;
6            ${_}px !important;
7            ${P}px !important;
8          }
9        `),()=>{I.contains(C)&&I.removeChild(C)}},[a]),e.jsx(kt,{isPresent:a,childRef:f,sizeRef:u,pop:l,children:l===!1?s:i.cloneElement(s,{ref:k})})}const St=({children:s,initial:a,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:l,mode:c,anchorX:f,anchorY:u,root:x})=>{const d=de(wt),k=i.useId();let g=!0,p=i.useMemo(()=>(g=!1,{id:k,initial:a,isPresent:r,custom:o,onExitComplete:b=>{d.set(b,!0);for(const N of d.values())if(!N)return;n&&n()},register:b=>(d.set(b,!1),()=>d.delete(b))}),[r,d,n]);return l&&g&&(p={...p}),i.useMemo(()=>{d.forEach((b,N)=>d.set(N,!1))},[r]),i.useEffect(()=>{!r&&!d.size&&n&&n()},[r]),s=e.jsx(Ct,{pop:c==="popLayout",isPresent:r,anchorX:f,anchorY:u,root:x,children:s}),e.jsx(st.Provider,{value:p,children:s})};function wt(){return new Map}const U=s=>s.key||"";function ae(s){const a=[];return i.Children.forEach(s,r=>{i.isValidElement(r)&&a.push(r)}),a}const Pt=({children:s,custom:a,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:l="sync",propagate:c=!1,anchorX:f="left",anchorY:u="top",root:x})=>{const[d,k]=rt(c),g=i.useMemo(()=>ae(s),[s]),p=c&&!d?[]:g.map(U),b=i.useRef(!0),N=i.useRef(g),w=de(()=>new Map),A=i.useRef(new Set),[T,_]=i.useState(g),[P,C]=i.useState(g);nt(()=>{b.current=!1,N.current=g;for(let y=0;y<P.length;y++){const h=U(P[y]);p.includes(h)?(w.delete(h),A.current.delete(h)):w.get(h)!==!0&&w.set(h,!1)}},[P,p.length,p.join("-")]);const I=[];if(g!==T){let y=[...g];for(let h=0;h<P.length;h++){const v=P[h],R=U(v);p.includes(R)||(y.splice(h,0,v),I.push(v))}return l==="wait"&&I.length&&(y=I),C(ae(y)),_(g),null}const{forceRender:O}=i.useContext(at);return e.jsx(e.Fragment,{children:P.map(y=>{const h=U(y),v=c&&!d?!1:g===P||p.includes(h),R=()=>{if(A.current.has(h))return;if(A.current.add(h),w.has(h))w.set(h,!0);else return;let $=!0;w.forEach(S=>{S||($=!1)}),$&&(O==null||O(),C(N.current),c&&(k==null||k()),n&&n())};return e.jsx(St,{isPresent:v,initial:!b.current||r?void 0:!1,custom:a,presenceAffectsLayout:o,mode:l,root:x,onExitComplete:v?void 0:R,anchorX:f,anchorY:u,children:y},h)})})};function It({quote:s,submitting:a,locked:r,onSubmit:n}){const o=Be(s),l=qe(s),c=s.total>0;return e.jsx("div",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-border bg-background/95 shadow-[0_-12px_40px_-18px_hsl(24_40%_20%/0.18)] backdrop-blur-md",children:e.jsxs("div",{className:"container mx-auto flex max-w-2xl items-center gap-4 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:c?"合計":"免費入場"}),e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0",children:[e.jsx(Pt,{mode:"wait",children:e.jsx(ot.p,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{type:"spring",stiffness:380,damping:28},className:"text-2xl font-semibold tabular-nums tracking-tight",children:c?D(s.total):"免費"},c?s.total:"free")}),c&&l>0&&e.jsxs("span",{className:"text-sm text-primary",children:[ze(s.originalTotal,s.total),o>0?` · 節省 ${D(o)}`:""]}),!c&&e.jsx("span",{className:"text-sm text-muted-foreground",children:"送全家福電子相片 + 嫦娥服租借"})]})]}),e.jsx(X,{type:"button",onClick:n,disabled:a,className:"h-11 min-w-[9.5rem] shrink-0 px-5 active:scale-[0.98]",children:r?"即將開放":a?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"mr-2 h-4 w-4 animate-spin"}),"提交中"]}):c?"確認並付款":"提交報名"})]})})}function F({step:s,title:a,required:r,description:n,children:o}){return e.jsxs("section",{className:"space-y-2.5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("h2",{className:"flex items-baseline gap-2 text-lg font-semibold tracking-tight",children:[e.jsx("span",{className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-semibold text-primary-foreground",children:s}),a,r&&e.jsx("span",{className:"text-destructive",children:"*"})]}),n&&e.jsx("p",{className:"pl-8 text-sm leading-relaxed text-muted-foreground",children:n})]}),e.jsx("div",{className:"pl-0 sm:pl-8",children:o})]})}function Et({open:s,onOpenChange:a}){return e.jsx(Pe,{open:s,onOpenChange:a,children:e.jsx(Ie,{className:"max-w-[20rem] gap-0 overflow-hidden rounded-2xl border-primary/20 p-0 sm:max-w-sm [&>button]:hidden",children:e.jsxs("div",{className:"px-6 pb-6 pt-8 text-center",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.28em] text-primary",children:"報名"}),e.jsx(Ee,{className:"review-display mt-3 text-4xl tracking-tight",children:"即將開放"}),e.jsx(Re,{className:"mt-3 text-sm leading-relaxed",children:"活動報名即將開放,敬請期待。"}),e.jsx(X,{type:"button",className:"mt-6 w-full",onClick:()=>a(!1),children:"知道了"})]})})})}function Rt({value:s,onChange:a,onApply:r,onClear:n,applying:o=!1,appliedCode:l,discountAmount:c=0,message:f,className:u}){const x=!!l;return e.jsxs("div",{className:M("space-y-1.5",u),children:[e.jsxs(Q,{htmlFor:"festival-promo-code",className:"text-sm font-medium",children:["優惠碼",e.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:"(選填)"})]}),x?e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[e.jsxs("p",{children:["已套用 ",l,c>0&&e.jsxs("span",{className:"ml-2 tabular-nums text-primary",children:["−",D(c)]})]}),n&&e.jsx("button",{type:"button",onClick:n,className:"text-sm text-muted-foreground underline-offset-2 hover:underline",children:"清除"})]}):e.jsxs("div",{className:"flex gap-2",children:[e.jsx(B,{id:"festival-promo-code",value:s,onChange:d=>
9a(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),r())},placeholder:"輸入優惠碼",autoComplete:"off",disabled:o}),e.jsx(X,{type:"button",variant:"outline",className:"shrink-0",onClick:r,disabled:o,children:o?e.jsx(le,{className:"h-4 w-4 animate-spin"}):"套用"})]}),f&&e.jsx("p",{className:M("text-sm",f.tone==="ok"?"text-muted-foreground":"text-destructive"),role:f.tone==="err"?"alert":void 0,children:f.text})]})}const At="85262722164",oe="6272 2164",ie=`https://wa.me/${At}?text=`+encodeURIComponent("你好,我想查詢毛孩沉浸式台灣中秋祭的報名。"),Dt=[{thumb:mt,title:"全家福電子相片一張",description:"由駐場攝影師拍攝,活動後經電郵送上"},{thumb:ut,title:"嫦娥服免費租借",description:"現場試身,於台式打卡場景拍照"}],_t=dt({email:V().trim().email("請填寫有效電郵").max(255),name:V().trim().min(1,"請填寫姓名").max(80),phone:V().trim().regex(/^(?:\+?852[\s-]?)?\d{8}$/,"請填寫有效香港電話")}),K=({id:s,label:a,required:r,error:n,children:o})=>e.jsxs("div",{className:"grid gap-1.5",children:[e.jsxs(Q,{htmlFor:s,className:"text-sm font-medium",children:[a,r&&e.jsx("span",{className:"ml-0.5 text-destructive",children:"*"})]}),o,n&&e.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n})]}),Jt=()=>{const s=Se(),{isAuthenticated:a,userInfo:r}=Ae(),[n,o]=i.useState(""),[l,c]=i.useState(""),[f,u]=i.useState(""),[x,d]=i.useState([]),[k,g]=i.useState(""),[p,b]=i.useState([]),[N,w]=i.useState({}),[A,T]=i.useState(!1),[_,P]=i.useState(!1),[C,I]=i.useState(""),[O,y]=i.useState(!1),[h,v]=i.useState(""),[R,$]=i.useState(null),[S,pe]=i.useState({}),[xe,Z]=i.useState(!1),W=Ve(),[he,z]=i.useState(!W);Me({title:"毛孩沉浸式台灣中秋祭|免費入場預留手帶 | PetWell × AquaBeat",description:"2026å¹´9月25日至27日,觀塘海濱 AquaBeat。免費入場,預先登記即送全家福電子相片及嫦娥服免費租借。最後 3 日報名工作坊特價:花膠月餅 $480、圍巾 $180。",canonicalUrl:`https://petwellhk.com${Ke}`,ogImage:me});const L=i.useMemo(()=>Ye(p,R),[p,R]),fe=Ge(N);i.useEffect(()=>{p.length!==0&&it(p,L.total)},[p,L.total]),i.useEffect(()=>{w(t=>{let m=!1;const j={...t};for(const E of q)!p.includes(E)&&j[E]&&(delete j[E],m=!0);return m?j:t})},[p]);const ge=t=>{b(et.filter(m=>t.includes(m)))},je=t=>{ge(p.includes(t)?p.filter(m=>m!==t):[...p,t])},be=t=>{d(m=>m.includes(t)?m.filter(j=>j!==t):[...m,t])},Ne=(t,m)=>{w(E=>({...E,[t]:m}));const j=Xe(m);j&&!x.includes(j.dayId)&&d(E=>[...E,j.dayId])},ye=async()=>{const t=C.trim();if(!t){v("請輸入優惠碼");return}y(!0),v("");try{const m=await lt(t);if(!m){v("優惠碼無效,請再試一次");return}$(m),I(m.code)}catch(m){console.error("Failed to lookup mid-autumn discount:",m),v("暫時未能套用優惠碼,請稍後再試")}finally{y(!1)}},ve=()=>{$(null),I(""),v("")},ke=()=>{const t={},m=_t.safeParse({email:n,name:l,phone:f});if(!m.success)for(const j of m.error.issues){const E=j.path[0];typeof E=="string"&&!t[E]&&(t[E]=j.message)}x.length===0&&(t.attendDays="請選擇出席日期"),k||(t.petCount="請選擇是否攜帶寵物");for(const j of q)p.includes(j)&&!N[j]&&(t.slots="請為已選工作坊選擇上課時段");return _||(t.terms="請確認寵物照顧及責任聲明"),pe(t),Object.keys(t).length===0},J=t=>{W||(t.preventDefault(),t.stopPropagation(),z(!0))},Ce=async()=>{if(!W){z(!0);return}if(!ke()){ee.error("尚有必填項目未完成",{duration:3e3});return}Z(!0);try{const t=await ct({email:n,name:l,phone:f,attendDays:x,petCount:k,petTypes:[],petNames:"",itemIds:p,workshopSlots:N,discount:R,hearAbout:[],marketingOptIn:A},a===!0?(r==null?void 0:r.userId)??null:null),m=t.quote.total>0?`${Ze}?ref=${encodeURIComponent(t.id)}`:`${Je}?ref=${encodeURIComponent(t.id)}`;s(m,{replace:!0})}catch(t){console.error("Failed to submit mid-autumn registration:",t),ee.error("暫時未能提交,請稍後再試",{duration:3e3}),Z(!1)}};return e.jsxs("div",{className:"min-h-[100dvh] bg-background",children:[e.jsx(we,{}),e.jsxs("div",{className:"container mx-auto max-w-2xl px-4 pb-32 pt-6 lg:pt-10",children:[e.jsx(pt,{}),e.jsxs("main",{className:"mt-8 space-y-8",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"review-display text-3xl tracking-tight lg:text-4xl",children:"活動報名表"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"2026å¹´9月25日至27日 · 觀塘海濱 AquaBeat 02 · 免費入場"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"填妥以下資料即可預留å
9…¥å ´æ‰‹å¸¶ï¼Œè²»ç”¨å…¨å…ã€‚"}),e.jsxs("a",{href:ie,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 pt-1 text-sm font-medium text-primary underline-offset-4 hover:underline",children:[e.jsx(se,{className:"h-4 w-4"}),"活動查詢 · WhatsApp ",oe]})]}),e.jsx("div",{onPointerDownCapture:J,children:e.jsxs("section",{className:"rounded-2xl border border-primary/25 bg-primary/[0.05] px-5 py-5",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-widest text-primary",children:"免費報名禮遇"}),e.jsx("p",{className:"mt-1.5 text-base font-semibold leading-snug",children:"入場費用全免。填妥此表格完成報名,即可免費獲得:"}),e.jsx("div",{className:"mt-4 grid gap-2 sm:grid-cols-2",children:Dt.map(t=>e.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-primary/20 bg-background px-3 py-3 sm:items-center sm:px-4",children:[e.jsx("img",{src:t.thumb,alt:"",width:160,height:160,className:"size-[4.5rem] shrink-0 rounded-lg object-cover ring-1 ring-black/10 sm:size-20"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold leading-snug",children:t.title}),e.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:t.description})]})]},t.title))})]})}),e.jsxs("div",{className:"space-y-8",onPointerDownCapture:J,children:[e.jsxs(F,{step:1,title:"出席日期",required:!0,description:"可選擇多於一天。",children:[e.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3",children:ce.map(t=>{const m=x.includes(t.id);return e.jsxs("label",{className:M("flex cursor-pointer items-center gap-3 rounded-xl border px-4 py-3 transition-colors",m?"border-primary bg-primary/[0.05]":"border-border hover:border-primary/35"),children:[e.jsx(H,{checked:m,onCheckedChange:()=>be(t.id),"aria-label":`${t.dateLabel}(星期${t.weekday})`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-base font-semibold",children:t.dateLabel}),e.jsxs("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:["星期",t.weekday," · ",t.hours]})]})]},t.id)})}),S.attendDays&&e.jsx("p",{className:"mt-2 text-sm text-destructive",children:S.attendDays})]}),e.jsx(F,{step:2,title:"聯絡資料",required:!0,children:e.jsxs("div",{className:"space-y-3",children:[e.jsx(K,{id:"name",label:"姓名",required:!0,error:S.name,children:e.jsx(B,{id:"name",autoComplete:"name",value:l,onChange:t=>c(t.target.value)})}),e.jsx(K,{id:"phone",label:"電話",required:!0,error:S.phone,children:e.jsx(B,{id:"phone",type:"tel",autoComplete:"tel",inputMode:"tel",value:f,onChange:t=>u(t.target.value)})}),e.jsx(K,{id:"email",label:"電郵",required:!0,error:S.email,children:e.jsx(B,{id:"email",type:"email",autoComplete:"email",value:n,onChange:t=>o(t.target.value)})})]})}),e.jsxs(F,{step:3,title:"攜帶寵物",required:!0,children:[e.jsx(De,{value:k,onValueChange:t=>g(t),className:"gap-2 sm:grid-cols-2",children:Qe.map(t=>{const m=k===t.id;return e.jsxs("label",{className:M("flex cursor-pointer items-center gap-3 rounded-xl border px-4 py-3 text-sm transition-colors",m?"border-primary bg-primary/[0.05] font-medium":"border-border hover:border-primary/35"),children:[e.jsx(_e,{value:t.id,"aria-label":t.label}),t.label]},t.id)})}),S.petCount&&e.jsx("p",{className:"mt-2 text-sm text-destructive",children:S.petCount})]}),e.jsxs(F,{step:4,title:"報名工作坊(選填)",description:"最後 3 日報名工作坊,特價發售。名額有限,單項計價。",children:[e.jsx(Nt,{itemIds:p,workshopSlots:N,overlap:fe,slotError:S.slots,onToggleItem:je,onPickSlot:Ne}),e.jsx("div",{className:"mt-4",children:e.jsx(Rt,{value:C,onChange:t=>{I(t),h&&v("")},onApply:()=>void ye(),onClear:ve,applying:O,appliedCode:(R==null?void 0:R.code)??null,discountAmount:L.discountAmount,message:h?{tone:"err",text:h}:null})})]}),e.jsx(F,{step:5,title:"聲明及同意",required:!0,children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 text-sm leading-relaxed",children:[e.jsx(H,{checked:_,onCheckedChange:t=>P(t===!0),className:"mt-0.5"}),e.jsxs("span",{children:["本人會自行照顧所攜寵物。活動期間如有意外、損傷或損失,責任由本人承擔。",e.jsx("span",{className:"text-destructive",children:"*"})]})]}),S.terms&&e.jsx("p",{className:"text-xs text-destructive",children:S.terms}),e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 text-sm leading-relaxed text-muted-foreground",children:[e.jsx(H,{checked:A,onCheckedChange:t=>T(t===!0),className:"mt-0.5"}),"本人願意接收 PetWell 及 AquaBeat 的活動資訊(選填)"]})]})}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["如有查詢,歡迎",e.jsxs("a",{href:ie,target:"_blank",rel:"noopener noreferrer",className:"ml-1 inline-flex items-center gap-1 font-medium text-primary underline-offset-4 hover:underline",onPointerDownCapture:t=>t.stopPropagation(),children:[e.jsx(se,{className:"h-4 w-4"}),"WhatsApp ",oe]})]})]})]})]}),e.jsx(It,{quote:L,submitting:xe,locked:!W,onSubmit:Ce}),e.jsx(Et,{open:he,onOpenChange:z})]})};export{Jt 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.