PageSourceSearch

https://endurancepics.ai/assets/product-catalog-page-xRqhSp3e.js

js endurancepics.ai collected 2026-10-05 11:59:08 UTC 79,521 bytes, 1 lines download raw bytes

1import{j as e}from"./motion-YM8fB_5Z.js";import{r as p}from"./sentry-otjh_W8X.js";import{b as ns,u as is,d as cs}from"./react-OFElpF2u.js";import{L as ds}from"./language-toggle-D07YCwYk.js";import{M as y}from"./material-icon-4IKyhXPg.js";import{P as de,O as us,a as We}from"./print-customer-copy-DmNS8M81.js";/* empty css                       */import{g as Ct,a as Pt,s as ps,p as ms,r as xs,b as hs,c as bs,d as It,e as gs,f as St}from"./cart-store-D0hPWnJY.js";import{getIdentityEmail as fs}from"./identity-store-Cc-tfIc2.js";import{g as ys}from"./favorites-store-wIwkL3mc.js";import{getCustomerIdentity as vs,mergeFaceSessionIntoGallery as ws,getEditPhotoIds as js}from"./face-match-session-Do4Sh-PJ.js";import{dV as Ns,dX as ks,dY as Et,c4 as B,g as Cs,c1 as Ps,a4 as qe,bp as Is,bs as Ss}from"./index-BoOYcZhe.js";import{P as zs}from"./photo-picker-drawer-Bry1Bhol.js";import{B as zt,T as Ts}from"./border-picker-BVhNpvRa.js";import{P as Us}from"./proof-watermark-overlay-eJU8C5S7.js";import{T as ct}from"./specialty-designer-B6kJ3QMT.js";import{l as nt,u as dt,t as ke}from"./ui-BM2pkkqU.js";import{u as Ft}from"./i18n-BRS0AnGA.js";import"./pdf-BEE2WjVn.js";import"./supabase-BTsOnGLq.js";import"./charts-DnWBDTZK.js";import"./border-text-C6D6YNTr.js";function $s(s,v){var T;if(!v)return!0;const $=(T=s.config)==null?void 0:T.allowedPrintSizes;return!Array.isArray($)||$.length===0?!0:$.includes(v)}function Es({open:s,onClose:v,onConfirm:$,photo:T,eventId:g,productSize:O,initialPick:c}){const[E,D]=p.useState([]),[S,H]=p.useState("original"),[N,J]=p.useState((c==null?void 0:c.borderTemplateId)??null),[Y,q]=p.useState("idle"),[ue,te]=p.useState((c==null?void 0:c.renderId)??null),[pe,Q]=p.useState(null),x=p.useRef(null);p.useEffect(()=>{if(!s||!g)return;let P=!1;return Ns(g).then(M=>{var X;if(!P)if(D(M),c!=null&&c.borderTemplateId&&c.borderTemplateId!=="none"){const le=M.find(Ve=>Ve.id===c.borderTemplateId),Ue=((X=le==null?void 0:le.config)==null?void 0:X.borderType)==="background-replacement";H(Ue?"bg":"border")}else H("original")}),()=>{P=!0}},[s,g,c]),p.useEffect(()=>{s||(x.current&&(clearInterval(x.current),x.current=null),q("idle"),Q(null))},[s]);const U=p.useCallback(async P=>{q("pending"),Q(null),J(P.id);try{const M=await ks(g,T.id,P.id);if(te(M.renderId),M.status==="ready"&&M.previewUrl){q("ready"),Q(M.previewUrl);return}x.current&&clearInterval(x.current),x.current=setInterval(async()=>{try{const X=await Et(M.renderId);X.status==="ready"&&X.previewUrl?(q("ready"),Q(X.previewUrl),te(X.renderId),x.current&&(clearInterval(x.current),x.current=null)):X.status==="failed"&&(q("failed"),x.current&&(clearInterval(x.current),x.current=null))}catch{}},2e3)}catch{q("failed")}},[g,T.id]);if(!s)return null;const A=E.find(P=>P.source==="none")??null,k=E.filter(P=>{var M;return((M=P.config)==null?void 0:M.borderType)==="background-replacement"}),w=E.filter(P=>{var M;return P.source!=="none"&&((M=P.config)==null?void 0:M.borderType)!=="background-replacement"&&$s(P,O)}),W=P=>{H(P),P==="original"&&A&&(J(A.id),q("idle"),Q(null),te(null))},ae=P=>`flex-1 px-2 py-1.5 rounded-md text-xs font-medium transition-colors ${P?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"}`,fe=()=>{if(S==="original"){$({borderTemplateId:null,renderId:null}),v();return}if(S==="bg"&&Y!=="ready")return;const P=E.find(M=>M.id===N)??null;$({borderTemplateId:N,renderId:S==="bg"?ue:null,previewUrl:S==="bg"?pe:null,borderConfig:S==="border"?(P==null?void 0:P.config)??null:null}),v()};return e.jsx("div",{className:"fixed inset-0 z-[60] bg-black/40 backdrop-blur-sm flex items-end sm:items-center justify-center",onClick:v,children:e.jsxs("div",{className:"bg-white w-full max-w-md max-h-[90vh] rounded-t-3xl sm:rounded-3xl shadow-2xl flex flex-col overflow-hidden",onClick:P=>P.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 shrink-0",children:[e.jsx("h3",{className:"text-base font-bold text-gray-900",children:O?`Add a border (${O})`:"Add a border"}),e.jsx("button",{type:"button",onClick:v,className:"w-9 h-9 rounded-full flex items-center justify-center hover:bg-gray-100 active:bg-gray-200 transition-colors","aria-label":"Close picker",children:e.jsx(y,{name:"close",size:18,className:"text-gray-500"})})]}),e.jsx("div",{className:"px-3 pt-3 shrink-0",children:e.jsxs("div",{className:"flex gap-1 p-1 bg-gray-100 rounded-lg",children:[e.jsx("button",{type:"button",onClick:()=>W("original"),className:ae(S==="original"),children:"Original"}),k.length>0&&e.jsx("button",{type:"button",onClick:()=>
1W("bg"),className:ae(S==="bg"),children:"Background"}),w.length>0&&e.jsx("button",{type:"button",onClick:()=>W("border"),className:ae(S==="border"),children:"Border Artwork"})]})}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-3 min-h-0",children:[S==="original"&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx("div",{className:"relative w-40 aspect-[4/5] rounded-xl overflow-hidden bg-gray-100 shadow-sm",children:e.jsx("img",{src:B(T.thumbnailUrl||T.url,{width:400,photo:T}),alt:"",className:"absolute inset-0 h-full w-full object-cover"})}),e.jsx("p",{className:"text-sm text-gray-600 max-w-xs",children:"No border — your photo will be printed exactly as shown above."})]}),S==="border"&&(w.length===0?e.jsxs("p",{className:"py-8 text-center text-sm text-gray-500",children:["No borders available",O?` for ${O}`:""," yet."]}):e.jsx(zt,{photoUrl:B(T.thumbnailUrl||T.url,{width:200,photo:T}),options:w,selectedId:N,onSelect:P=>{J(P.id),q("idle"),Q(null),te(null)}})),S==="bg"&&e.jsxs("div",{className:"space-y-3",children:[Y==="ready"&&pe&&e.jsxs("div",{className:"relative w-full max-w-xs mx-auto aspect-[4/5] rounded-xl overflow-hidden bg-gray-100 shadow-sm",children:[e.jsx("img",{src:pe,alt:"Preview",className:"absolute inset-0 h-full w-full object-cover"}),e.jsxs("div",{className:"absolute top-2 left-2 inline-flex items-center gap-1 rounded-full bg-emerald-500 px-2 py-0.5 text-[10px] font-bold text-white shadow",children:[e.jsx(y,{name:"check",size:10})," Rendered"]})]}),Y==="pending"&&e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-full border-4 border-gray-200 border-t-blue-500 animate-spin"}),e.jsx("p",{className:"text-sm font-medium text-gray-700",children:"Rendering your photo…"}),e.jsx("p",{className:"text-xs text-gray-500",children:"This takes about 15 seconds"})]}),Y==="failed"&&e.jsx("p",{className:"text-xs text-red-600 text-center",children:"Render failed — pick a scene to retry."}),e.jsx(zt,{photoUrl:B(T.thumbnailUrl||T.url,{width:200,photo:T}),options:k,selectedId:N,onSelect:P=>{U(P)},onRenderRequest:U}),e.jsx("p",{className:"text-[11px] text-gray-500 text-center",children:"Want to drag, scale, or erase parts of yourself? Open the photo modal and use the full editor — your customization carries through to checkout."})]})]}),e.jsxs("div",{className:"shrink-0 border-t border-gray-100 px-4 py-3 flex gap-2",children:[e.jsx("button",{type:"button",onClick:v,className:"px-4 py-2.5 rounded-lg border border-gray-300 text-sm font-medium text-gray-700 hover:bg-gray-50 active:bg-gray-100",children:"Cancel"}),e.jsx("button",{type:"button",onClick:fe,disabled:S==="bg"&&Y!=="ready",className:"flex-1 px-4 py-2.5 rounded-lg bg-[var(--m3-primary,#1a73e8)] text-white text-sm font-semibold hover:opacity-90 active:scale-[0.98] disabled:opacity-50 transition-all",children:S==="original"?"Use original":S==="bg"&&Y!=="ready"?"Pick a scene":"Apply border"})]})]})})}function Tt(s){const v=s.toLowerCase();return v.includes("achievement")||v.includes("achivement")||v.includes("customizable")||v.includes("specialty")||v.includes("personalized")?10:v.includes("digital")?20:30}function Fs(s,v){const $=Tt(s),T=Tt(v);return $!==T?$-T:s.localeCompare(v)}function _s(s){const v=typeof s.labId=="string"?s.labId.trim().toLowerCase():"";if(v==="whcc")return{...s,labId:"whcc"};if(v==="platform")return{...s,labId:"platform"};if(v==="specialty")return{...s,labId:"specialty"};const $=typeof s.id=="string"?s.id:"";return!v&&$.startsWith("whcc-")?{...s,labId:"whcc"}:s}function Os(s){return!(s.enabled===!1||s.enabled===0)}function Ut(s,v){const $=[];for(const T of s.items){const g=v.find(S=>S.product.id===T.productId),O=g==null?void 0:g.product.labId,c=O==="specialty"||!!(g!=null&&g.product.templateId),E=O==="platform"?"digital":c?"specialty":"print",D=c?(g==null?void 0:g.product.templateId)||(g==null?void 0:g.product.id)||T.productId:(g==null?void 0:g.product.labProductUid)||T.productId;for(let S=0;S<T.quantity;S++)$.push({productId:T.productId,labProductUid:D,productName:(g==null?void 0:g.product.name)||T.productId,type:E,templateId:c?(g==null?void 0:g.product.templateId)||(g==null?void 0:g.product.id):void 0,designConfig:c?g==null?void 0:g.product.designConfig:void 0})}return $}function As(s,v,$){return`ep-bundle-open-${s}-${v}-${$}`}function Ms(s,v){return`ep-bundle-edit-${s}-${v}`}function $t(s,v){return`ep-bundle-preserve-${s}-${v}`}function it(s){return`package-bundle-${s.replace(/[^a-zA-Z0-9_-]/g,"_")}`}function Rs({pkg:s,slots:v,photos:$,variables:T,eventName:g,onClose:O,onSelectPhoto:c,onClearPhoto:E,onChangeVar:D,onAddToCart:S,onOpenFullEditor:H}){const{t:N}=Ft("catalog"),J=v.map((x,U)=>({...x,idx:U})).filter(x=>x.type==="digital"),Y=v.map((x,U)=>({...x,idx:U})).filter(x=>x.type==="print"),q=v.map((x,U)=>({...x,idx:U})).filter(x=>x.type==="specialty"),ue=v.map((x,U)=>({...x,idx:U})).filter(x=>$[x.idx]===null).length,te=q.filter(x=>{var A;return(((A=x.designConfig)==null?void 0:A.variables)??[]).filter(k=>k.source==="user"&&k.required!==!1).some(k=>{var w;return!(((w=T[x.idx])==null?void 0:w[k.key])??"").trim()})}),pe=ue===0&&te.length===0,Q=ue>0?N("builder.cta.selectMorePhotos",{count:ue}):te.length>0?N("builder.cta.fillDetails",{count:te.length}):N("builder.cta.addToCart",{name:s.name,price:s.bundlePrice.toFixed(2)});return e.jsxs("div",{className:"p-5 sm:p-6",children:[e.jsxs("div",{className:"mb-5 flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-extrabold text-gray-900",style:{fontFamily:"Manrope, sans-serif"},children:N("builder.buildYourBundle",{name:s.name})}),s.description&&e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:s.description})]}),e.jsxs("button",{type:"button",onClick:O,className:"flex items-center gap-1 rounded-lg px-3 py-1.5 text-sm text-gray-500 hover:bg-gray-100",children:[e.jsx(y,{name:"close",size:18}),N("builder.close")]})]}),J.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-gray-500",children:N("builder.digitalBundle")}),e.jsx("span",{className:"text-xs text-gray-400",children:N("builder.choose",{count:J.length})})]}),e.jsx("div",{className:`grid gap-3 ${J.length>3?"grid-cols-2 sm:grid-cols-4":J.length>2?"grid-cols-3":"grid-cols-2 sm:grid-cols-3"}`,children:J.map((x,U)=>{const A=$[x.idx];return e.jsx("div",{className:"relative",children:A?e.jsxs("div",{className:"group relative aspect-[4/5] overflow-hidden rounded-xl bg-gray-100",children:[e.jsx("img",{src:B(A.thumbnailUrl||A.url,{width:400,photo:A}),alt:`${x.productName} ${U+1}`,className:"h-full w-full object-cover"}),e.jsx("button",{type:"button",onClick:()=>
1E(x.idx),className:"absolute top-2 right-2 rounded-full bg-black/50 p-1 text-white opacity-0 group-hover:opacity-100 transition-opacity","aria-label":N("builder.removePhoto"),children:e.jsx(y,{name:"close",size:16})}),e.jsxs("div",{className:"absolute bottom-2 left-2 inline-flex items-center gap-1 rounded-full bg-white/90 backdrop-blur-sm px-2 py-0.5 text-[10px] font-bold text-gray-700 shadow",children:[e.jsx(y,{name:"download",size:10}),N("builder.digital")]})]}):e.jsxs("button",{type:"button",onClick:()=>c(x.idx),className:"aspect-[4/5] w-full rounded-xl border-2 border-dashed border-gray-300 bg-gray-50 flex flex-col items-center justify-center gap-2 hover:border-blue-400 hover:bg-blue-50 transition-colors",children:[e.jsx("div",{className:"rounded-full bg-blue-100 p-3",children:e.jsx(dt,{className:"h-6 w-6 text-blue-600"})}),e.jsx("span",{className:"text-xs font-medium text-gray-500",children:N("builder.addPhoto")}),e.jsx("span",{className:"text-[10px] text-gray-400",children:N("builder.digital")})]})},`digital-${x.idx}`)})})]}),Y.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-gray-500",children:N("builder.yourPhotoPrints")}),e.jsx("span",{className:"text-xs text-gray-400",children:N("builder.choose",{count:Y.length})})]}),e.jsx("p",{className:"mb-3 text-[11px] leading-snug text-gray-500",children:We}),e.jsx("div",{className:`grid gap-3 ${Y.length>3?"grid-cols-2 sm:grid-cols-4":Y.length>2?"grid-cols-3":"grid-cols-2 sm:grid-cols-3"}`,children:Y.map((x,U)=>{const A=$[x.idx];return e.jsx("div",{className:"relative",children:A?e.jsxs("div",{className:"group relative aspect-[4/5] overflow-hidden rounded-xl bg-gray-100",children:[e.jsx("img",{src:B(A.thumbnailUrl||A.url,{width:400,photo:A}),alt:`${x.productName} ${U+1}`,className:"h-full w-full object-cover"}),e.jsx("button",{type:"button",onClick:()=>E(x.idx),className:"absolute top-2 right-2 rounded-full bg-black/50 p-1 text-white opacity-0 group-hover:opacity-100 transition-opacity","aria-label":N("builder.removePhoto"),children:e.jsx(y,{name:"close",size:16})}),e.jsx("div",{className:"absolute bottom-2 left-2 rounded-full bg-white/90 backdrop-blur-sm px-2 py-0.5 text-[10px] font-bold text-gray-700 shadow",children:x.productName})]}):e.jsxs("button",{type:"button",onClick:()=>c(x.idx),className:"aspect-[4/5] w-full rounded-xl border-2 border-dashed border-gray-300 bg-gray-50 flex flex-col items-center justify-center gap-2 hover:border-blue-400 hover:bg-blue-50 transition-colors",children:[e.jsx("div",{className:"rounded-full bg-blue-100 p-3",children:e.jsx(dt,{className:"h-6 w-6 text-blue-600"})}),e.jsx("span",{className:"text-xs font-medium text-gray-500",children:N("builder.addPhoto")}),e.jsx("span",{className:"text-[10px] text-gray-400",children:x.productName})]})},`print-${x.idx}`)})})]}),q.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider text-gray-500 mb-2",children:N("builder.personalizeYourPieces")}),e.jsx("div",{className:"space-y-4",children:q.map(x=>{var k;const U=$[x.idx],A=(((k=x.designConfig)==null?void 0:k.variables)??[]).filter(w=>w.source==="user");return e.jsx("div",{className:"rounded-xl border border-purple-200 bg-purple-50/40 p-4",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-32 sm:w-40 shrink-0 overflow-hidden rounded-lg border border-purple-200 bg-white shadow-sm",children:x.designConfig?e.jsx(ct,{config:x.designConfig,photoUrl:U?B(U.thumbnailUrl||U.url,{width:400,photo:U}):void 0,width:160,variables:{eventName:g,...T[x.idx]??{}}}):e.jsx("div",{className:"aspect-[5/7] flex items-center justify-center bg-gray-100",children:e.jsx(y,{name:"auto_awesome",size:24,className:"text-purple-400"})})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-purple-900 truncate",children:x.productName}),e.jsx("span",{className:"rounded-full bg-purple-600 px-2 py-0.5 text-[9px] font-bold text-white uppercase",children:N("builder.personalized")})]}),A.map(w=>{var fe;const W=((fe=T[x.idx])==null?void 0:fe[w.key])??"",ae=!W.trim()&&w.required!==!1;return e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[10px] font-bold uppercase tracking-wider text-gray-500 mb-0.5",children:[w.label," ",w.required!==!1&&e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:W,onChange:P=>D(x.idx,w.key,P.target.value),placeholder:w.placeholder||N("builder.enterValue",{label:w.label.toLowerCase()}),className:`w-full rounded-lg border px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-purple-200 ${ae?"border-purple-300 bg-white":"border-gray-200 bg-white"} ${w.key==="runnerName"?"uppercase":""}`})]},w.key)}),e.jsx("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:U?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 text-xs text-purple-700",children:[e.jsx(y,{name:"check_circle",size:14,className:"text-green-600"}),N("builder.photoAdded")]}),e.jsx("button",{type:"button",onClick:()=>c(x.idx),className:"shrink-0 text-xs font-medium text-purple-700 hover:underline",children:N("builder.changePhoto")}),H&&e.jsx("button",{type:"button",onClick:()=>H(x.idx),className:"shrink-0 text-xs font-bold text-purple-800 hover:underline",children:N("builder.fullEditor")})]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>c(x.idx),className:"rounded-lg bg-purple-600 px-4 py-2 text-sm font-bold text-white hover:bg-purple-700",children:N("builder.choosePhoto")}),H&&e.jsx("button",{type:"button",onClick:()=>H(x.idx),className:"rounded-lg border border-purple-300 bg-white px-3 py-2 text-sm font-bold text-purple-800 hover:bg-purple-50",children:N("builder.fullEditor")})]})})]})]})},`specialty-${x.idx}`)})})]}),e.jsx("button",{type:"button",disabled:!pe,onClick:S,className:"w-full rounded-xl bg-gradient-to-r from-[var(--m3-primary,#1a73e8)] to-violet-600 px-6 py-4 text-base font-bold text-white shadow-lg transition-transform hover:scale-[1.01] disabled:opacity-50 disabled:cursor-not-allowed",children:Q})]})}function ir(){const{t:s,i18n:v}=Ft("catalog"),$=v.language.split("-")[0],{eventId:T}=ns(),g=is(),[O]=cs(),c=T??"",E=O.get("photo")??"",D=O.get("bib")??"",S=O.get("name")??"",H=O.get("border")||null,N=O.get("render")||null,[J,Y]=p.useState(null);p.useEffect(()=>{if(!N){Y(null);return}let t=!1;return Et(N).then(r=>{!t&&r.status==="ready"&&r.previewUrl&&Y(r.previewUrl)}
1).catch(()=>{}),()=>{t=!0}},[N]),p.useEffect(()=>{window.scrollTo({top:0,behavior:"auto"})},[]);const[q,ue]=p.useState(0),[te,pe]=p.useState(0);p.useEffect(()=>{const t=()=>ue(r=>r+1);return window.addEventListener("favorites-updated",t),()=>window.removeEventListener("favorites-updated",t)},[]),p.useEffect(()=>{const t=()=>pe(r=>r+1);return window.addEventListener("face-match-session-updated",t),()=>window.removeEventListener("face-match-session-updated",t)},[]);const[Q,x]=p.useState(()=>Ct(c)),[U,A]=p.useState(()=>Pt(c).items),[k,w]=p.useState([]),[W,ae]=p.useState(null),[fe,P]=p.useState(!0),[M,X]=p.useState([]),[le,Ue]=p.useState([]),[Ve,Ce]=p.useState(!0),[_t,Pe]=p.useState(!1),[$e,Xe]=p.useState(null),[ut,pt]=p.useState(null),[mt,Ge]=p.useState([]),[Ot,At]=p.useState(""),[xt,oe]=p.useState(null),[ht,bt]=p.useState({}),[Mt,Rt]=p.useState({}),[Lt,Ie]=p.useState(null),[ie,Ee]=p.useState([]),[Fe,Bt]=p.useState(""),[Dt,Yt]=p.useState(""),[qt,Wt]=p.useState(""),[Vt,Xt]=p.useState(!1),[Gt,Kt]=p.useState(null),[ee,_e]=p.useState(null),[ye,Oe]=p.useState(null),[me,Ae]=p.useState([]),[se,gt]=p.useState([]),[ce,Ke]=p.useState([]),[ve,xe]=p.useState(null),Ze=p.useRef(null);p.useEffect(()=>{c&&(async()=>{const t=await Cs(c);if(t&&(Xt(!!(t.landingGroupSlug||t.landingGroupId)),Kt(t.landingGroupSlug||null),Bt(t.eventName||""),t.clientId)){const r=await Ps(t.clientId);r&&(Yt(r.companyName||""),Wt(r.logoUrl||""))}})()},[c]);const he=p.useCallback(()=>{x(Ct(c)),A(Pt(c).items);const t=vs(c),r=t.email||fs()||void 0,a=S||t.name;(D||r||a)&&ps(c,{bibNumber:D,email:r,name:a})},[c,D,S]);p.useEffect(()=>(window.addEventListener("cart-updated",he),()=>window.removeEventListener("cart-updated",he)),[he]);const Zt=p.useCallback(t=>{var n,m,o;if(!ye||!ee)return;const r=se[t];if(!r||r.type!=="specialty")return;try{sessionStorage.setItem($t(c,ee),JSON.stringify({photos:me,variables:ce})),sessionStorage.setItem(As(c,ee,t),JSON.stringify({photo:me[t]??null,variables:{...ce[t]??{}},photoOffsetX:((n=ce[t])==null?void 0:n.photoOffsetX)??"0.0",photoOffsetY:((m=ce[t])==null?void 0:m.ph
1otoOffsetY)??"0.0",photoZoom:((o=ce[t])==null?void 0:o.photoZoom)??"1.00"}))}catch{}const a=new URLSearchParams;D&&a.set("bib",D),S&&a.set("name",S),a.set("bundleEditor","1"),a.set("returnPkg",ee),a.set("bundleSlot",String(t)),g(`/events/${c}/specialty/${encodeURIComponent(r.productId)}?${a.toString()}`)},[ye,ee,se,me,ce,c,D,S,g]);p.useEffect(()=>{const t=O.get("openPackage");if(!t||!c||ie.length===0||k.length===0)return;const r=Ms(c,t),a=$t(c,t),n=sessionStorage.getItem(r),m=()=>{const d=new URLSearchParams(O);d.delete("openPackage");const h=d.toString(),b=typeof window<"u"?window.location.hash:"";g(`/events/${c}/catalog${h?`?${h}`:""}${b}`,{replace:!0})};if(!n){m();return}const o=ie.find(d=>d.id===t);if(!o){sessionStorage.removeItem(r),sessionStorage.removeItem(a),m();return}try{const d=JSON.parse(n),h=Ut(o,k);Oe(o),gt(h),xe(null);let b=h.map(()=>null),u=h.map(()=>({}));const _=sessionStorage.getItem(a);if(_)try{const F=JSON.parse(_);Array.isArray(F.photos)&&F.photos.length===h.length&&(b=F.photos),Array.isArray(F.variables)&&F.variables.length===h.length&&(u=F.variables)}catch{}d.slotIndex>=0&&d.slotIndex<h.length&&(b[d.slotIndex]=d.photo,u[d.slotIndex]=d.variables),Ae(b),Ke(u),Ze.current=t,_e(o.id)}catch{}finally{sessionStorage.removeItem(r),sessionStorage.removeItem(a),m()}},[O,ie,k,c,g]),p.useLayoutEffect(()=>{const t=Ze.current;if(!t||ee!==t)return;const r=document.getElementById(it(t));r&&(Ze.current=null,requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.scrollIntoView({behavior:"smooth",block:"start"})})}))},[ee]),p.useEffect(()=>{if(!ee)return;const t=document.getElementById(it(ee));t&&requestAnimationFrame(()=>{t.scrollIntoView({behavior:"smooth",block:"start"})})},[ee]);const He=D||S||"";p.useEffect(()=>{if(c){if(He){Ce(!0),qe({eventId:c,q:He,limit:50},[]).then(async t=>{var a;let r=t!=null&&t.items?[...t.items]:[];if(E&&!r.some(n=>n.id===E)){const n=await qe({eventId:c,q:E,limit:1},[]);(a=n==null?void 0:n.items)!=null&&a[0]&&r.push(n.items[0])}X(r),Ce(!1)});return}if(E){Ce(!0),qe({eventId:c,q:E,limit:3},[]).then(t=>{var r;(r=t==null?void 0:t.items)!=null&&r.length&&X(a=>{const n=[...a];for(const m of t.items)n.some(o=>o.id===m.id)||n.push(m);return n}),Ce(!1)});return}X([]),Ce(!1)}},[c,He,E]),p.useEffect(()=>{if(!c)return;let t=!1;const r=async()=>{const n=js(c);if(!n.length){Ue([]);return}const m=await Promise.all(n.map(o=>qe({eventId:c,q:o,limit:1},[]).catch(()=>null)));t||Ue(m.flatMap(o=>(o==null?void 0:o.items)??[]))};r();const a=()=>void r();return window.addEventListener("face-match-session-updated",a),()=>{t=!0,window.removeEventListener("face-match-session-updated",a)}},[c]);const ft=p.useMemo(()=>{const t=ws(c,M);if(!le.length)return t;const r=new Map;for(const a of le)r.set(a.id,a);for(const a of t)r.has(a.id)||r.set(a.id,a);return Array.from(r.values())},[c,M,le,te]),Ht=p.useMemo(()=>new Set(le.map(t=>t.id)),[le]),Se=p.useMemo(()=>ys(c,ft),[c,ft,q]);p.useEffect(()=>{c&&(P(!0),(async()=>{var r,a,n,m;let t=null;try{if(ae(null),t=await Is(c,$),(r=t==null?void 0:t.template)!=null&&r.templateConfig||t!=null&&t.templateConfigOverride){const o=t.templateConfigOverride||((a=t.template)==null?void 0:a.templateConfig),d=JSON.parse(o);if(!Array.isArray(d.products))throw new Error("template config has no products array");const h=t.priceOverrides?JSON.parse(t.priceOverrides):{},b=d.products.filter(Os).map(u=>{const _=h[u.id];let F=_?{...u,retailPrice:_.price}:u;return F=_s(F),F});Ge(d.displayCategories??[]),(n=d.packages)!=null&&n.length?Ee(d.packages.filter(u=>{const _=u.enabled;return _!==!1&&_!==0})):Ee([]);try{const u=(m=t.template)!=null&&m.eventTypes?JSON.parse(t.template.eventTypes):[];u.length>0&&At(u[0])}catch{}w(b.map(u=>{if((u.labId==="specialty"||u.templateId)&&!u.designConfig){const re=Ss.find(be=>be.id===u.id);re!=null&&re.designConfig&&(u={...u,designConfig:re.designConfig})}const _=u.name.match(/^(\d+)[x×]\s/i),F=_?parseInt(_[1],10):1;return{product:u,slotCount:F,photos:Array(F).fill(null),variables:{}}}))}else Ee([]),w([]),Ge([]),ae({tone:"info",text:s("catalogState.noProductsLoadFailedInfo")})}catch(o){console.error("product catalog: template load failed",c,o),Ee([]),w([]),Ge([]),ae({tone:"error",text:s(t?"catalogState.savedListLoadFailed":"catalogState.serverUnreachable")})}finally{P(!1)}})())},[c,$]);const Je=p.useRef(null);p.useEffect(()=>{Je.current=null},[E]),p.useEffect(()=>{if(!E||!k.length||Je.current===E)return;const t=Se.find(r=>r.id===E);t&&(Je.current=E,w(r=>{const a=[...r];for(let n=0;n<a.length;n++){const m=a[n].photos.findIndex(o=>o===null);if(m!==-1){a[n]={...a[n],photos:a[n].photos.map((o,d)=>d===m?t:o)};break}}return a}))},[E,Se,k.length]);const Me=(t,r)=>{Xe({productIndex:t,slotIndex:r}),Pe(!0)},Jt=t=>{$e&&(w(r=>{const a=[...r],n=a[$e.productIndex];return a[$e.productIndex]={...n,photos:n.photos.map((m,o)=>o===$e.slotIndex?t:m)},a}),Xe(null))},Qt=(t,r)=>{w(a=>{const n=[...a],m=n[t],o={...m.slotBorders??{}};return delete o[r],n[t]={...m,photos:m.photos.map((d,h)=>h===r?null:d),slotBorders:o},n})},es=(t,r,a)=>{w(n=>{const m=[...n],o=m[t],d={...o.slotBorders??{}};return(!a.borderTemplateId||a.borderTemplateId==="none")&&!a.renderId?delete d[r]:d[r]={borderTemplateId:a.borderTemplateId,renderId:a.renderId,previewUrl:a.previewUrl??null,borderConfig:a.borderConfig??null},m[t]={...o,slotBorders:d},m})},Qe=t=>{const r=k[t];if(r.slotCount===0){It(c,{photoId:"",photoUrl:"",thumbnailUrl:"",eventId:c,type:"digital",productName:r.product.name,productUid:r.product.labProductUid,quantity:1,unitPrice:r.product.retailPrice,borderTemplateId:H,renderId:N}),ke.success(s("toast.addedToCart",{name:r.product.name})),w(m=>{const o=[...m];return o[t]={...o[t],photos:[],variables:{}},o});return}const a=r.photos.map((m,o)=>({photo:m,slotIdx:o})).filter(m=>m.photo!==null);if(a.length===0){ke.error(s("toast.selectAtLeastOne"));return}if(a.length<r.slotCount){ke.error(s("toast.selectPhotosToContinue",{count:r.slotCount}));return}const n=gs(r.product.retailPrice,a.length);a.forEach(({photo:m,slotIdx:o},d)=>{var be;const h=r.product.labId==="platform",b=r.product.labId==="specialty",u=(be=r.slotBorders)==null?void 0:be[o],_=b?null:u?u.borderTemplateId:H,F=b?null:u?u.renderId:N,re=b?null:(u==null?void 0:u.previewUrl)??(F&&F===N?J:null);It(c,{photoId:m.id,photoUrl:m.url,thumbnailUrl:m.thumbnailUrl,eventId:c,type:h?"digital":"print",productName:r.product.name,productUid:r.product.labProductUid,quantity:1,unitPrice:n[d]??r.product.retailPrice,wholesalePrice:h?void 0:r.product.platformCost,requiresTemplate:r.product.labId==="specialty",templateId:r.product.templateId||r.product.id,templateVariables:Object.keys(r.variables).length>0?r.variables:void 0,borderTemplateId:_,renderId:F,previewUrl:re})}),ke.success(s("toast.addedToCartBang",{name:r.product.name})),w(m=>{const o=[...m],d=o[t];if(!d.product.name.match(/^(\d+)[x×]\s/i))return o[t]={...d,slotCount:1,photos:[null],variables:{}},o;const b=d.photos.filter(u=>u!==null);return o[t]={...d,slotCount:b.length+1,photos:[...b,null],variables:{}},o})},ts=p.useMemo(()=>{const t=k.flatMap(a=>a.photos.filter(n=>n!==null).map(n=>n.id)),r=me.filter(a=>a!==null).map(a=>a.id);return new Set([...t,...r])},[k,me]),yt=mt.length>0?mt:[...new Set(k.map(t=>t.product.displayCategory))],vt=p.useMemo(()=>yt.filter(t=>k.some(r=>r.product.displayCategory===t&&r.product.labId!=="whcc")),[yt,k]),we=p.useMemo(()=>[...vt].sort(Fs),[vt]),{multiCategoryPackages:Re,packagesByCategory:ss}=p.useMemo(()=>{const t=new Map,r=[];for(const a of ie){const n=new Set;for(const m of a.items){const o=k.find(d=>d.product.id===m.productId);o!=null&&o.product.displayCategory&&n.add(o.product.displayCategory)}if(n.size===1){const m=[...n][0],o=t.get(m);o?o.push(a):t.set(m,[a])}else r.push(a)}return{multiCategoryPackages:r,packagesByCategory:t}},[ie,k]),wt=t=>{const r=t.items.map(d=>{const h=k.find(b=>b.product.id===d.productId);return{...d,product:h==null?void 0:h.product,name:(h==null?void 0:h.product.name)||d.productId}}),a=r.reduce((d,h)=>{var b;return d+(((b=h.product)==null?void 0:b.retailPrice)??0)*h.quantity},0),n=a-t.bundlePrice,m=a>0?Math.round(n/a*100):0,o=ee===t.id;return e.jsx("div",{id:it(t.id),className:"scroll-mt-44 rounded-2xl border border-gray-200 bg-white shadow-sm overflow-hidden transition-shadow hover:shadow-md",children:o?e.jsx(Rs,{pkg:t,slots:se,photos:me,variables:ce,eventName:Fe,onClose:()=>{_e(null),Oe(null)},onSelectPhoto:d=>{xe(d),Pe(!0)},onClearPhoto:d=>{Ae(h=>h.map((b,u)=>u===d?null:b))},onChangeVar:(d,h,b)=>{Ke(u=>u.map((_,F)=>F===d?{..._,[h]:b}:_))},onAddToCart:()=>{const d=se.map((h,b)=>{const u=me[b];return u?{photoId:u.id,photoUrl:u.url,thumbnailUrl:u.thumbnailUrl||u.url}:{photoId:"",photoUrl:"",thumbnailUrl:""}});St(c,{id:t.id,name:t.name,bundlePrice:t.bundlePrice,items:se.map((h,b)=>({productId:h.labProductUid,productName:h.productName,type:h.type,quantity:1,templateId:h.type==="specialty"?h.templateId:void 0,variables:h.type==="specialty"?ce[b]:void 0}))},d),he(),_e(null),Oe(null),ke.success(s("toast.addedToCartBang",{name:t.name}))},onOpenFullEditor:Zt}):e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"relative bg-gradient-to-br from-slate-900 via-v
1iolet-950 to-indigo-950 flex flex-col items-center justify-center text-white p-6 overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 opacity-[0.08]",children:[e.jsx("div",{className:"absolute top-4 left-6 w-20 h-14 border-2 border-white rounded-lg rotate-[-6deg]"}),e.jsx("div",{className:"absolute top-7 left-10 w-20 h-14 border-2 border-white rounded-lg rotate-[3deg]"}),e.jsx("div",{className:"absolute bottom-6 right-5 w-16 h-12 border-2 border-white rounded-lg rotate-[8deg]"})]}),e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-32 h-32 rounded-full blur-3xl opacity-20 bg-violet-400"}),e.jsx("div",{className:"relative z-10 w-12 h-12 rounded-2xl flex items-center justify-center mb-2",style:{backgroundColor:"rgba(167,139,250,0.15)",border:"1px solid rgba(167,139,250,0.3)"},children:e.jsx(y,{name:"inventory_2",size:24,className:"text-violet-300"})}),e.jsx("span",{className:"relative z-10 text-sm font-bold text-center opacity-95",children:t.name}),n>0&&e.jsx("span",{className:"relative z-10 mt-2 rounded-full bg-white/15 backdrop-blur-sm px-3 py-1 text-xs font-bold border border-white/10",children:s("packages.save",{percent:m})})]}),e.jsxs("div",{className:"flex-1 p-5 flex flex-col justify-between",children:[e.jsxs("div",{children:[t.badge&&e.jsx("span",{className:"inline-block mb-2 rounded-full bg-amber-500 px-2.5 py-0.5 text-[10px] font-bold text-white uppercase tracking-wider",children:t.badge}),e.jsx("h3",{className:"text-lg font-extrabold text-gray-900",style:{fontFamily:"Manrope, sans-serif"},children:t.name}),t.description&&e.jsx("p",{className:"mt-2 text-sm text-gray-600 leading-relaxed",children:t.description}),e.jsxs("div",{className:"mt-4 space-y-1.5",children:[e.jsx("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:s("packages.includes")}),r.map((d,h)=>{var b,u;return e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-700 flex-wrap",children:[e.jsx(y,{name:((b=d.product)==null?void 0:b.labId)==="platform"?"download":((u=d.product)==null?void 0:u.labId)==="specialty"?"emoji_events":"print",size:16,className:"text-gray-400"}),e.jsxs("span",{children:[d.quantity,"x ",d.name]}),d.product&&d.product.retailPrice>0&&e.jsxs("span",{className:"text-xs text-gray-400 line-through",children:["$",(d.product.retailPrice*d.quantity).toFixed(2)]}),d.product&&d.product.retailPrice===0&&e.jsx("span",{className:"text-[10px] font-bold text-green-600",children:s("packages.free")})]},h)})]})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[e.jsx("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1",children:n>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-base text-gray-400 line-through",children:["$",a.toFixed(2)]}),e.jsxs("span",{className:"text-2xl font-extrabold text-gray-900",children:["$",t.bundlePrice.toFixed(2)]}),e.jsx("span",{className:"rounded-full bg-green-100 px-2 py-0.5 text-[11px] font-bold text-green-700",children:s("packages.saveAmount",{amount:n.toFixed(2),percent:m})})]}):e.jsxs("span",{className:"text-2xl font-extrabold text-gray-900",children:["$",t.bundlePrice.toFixed(2)]})}),e.jsxs("button",{type:"button",onClick:()=>{const d=Ut(t,k);d.filter(b=>b.type==="digital"||b.type==="print"||b.type==="specialty").length===0?(St(c,{id:t.id,name:t.name,bundlePrice:t.bundlePrice,items:d.map(b=>({productId:b.labProductUid,productName:b.productName,type:b.type,quantity:1}))},[]),he(),ke.success(s("toast.addedToCartBang",{name:t.name}))):(Oe(t),gt(d),Ae(d.map(()=>null)),Ke(d.map(()=>({}))),xe(null),_e(t.id))},className:"w-full flex items-center justify-center gap-2 rounded-xl bg-[var(--m3-primary,#1a73e8)] px-5 py-3 text-sm font-bold text-white hover:opacity-90 active:scale-[0.98] transition-all shadow-md",children:[s("packages.choosePhotosAddToCart"),e.jsx(y,{name:"add_shopping_cart",size:16})]})]})]})]})},t.id)},rs=p.useMemo(()=>{if(ie.length>0)return"packages";const t=we[0];return t||(k.some(r=>r.product.labId==="whcc")?"prints":"")},[ie.length,we,k]),ze=Lt??rs,Le={Prints:{gradient:"from-amber-500 via-orange-500 to-red-500",icon:"print",label:s("artwork.prints.label"),description:s("artwork.prints.description"),bg:"#fef3c7",accent:"#d97706"},Metal:{gradient:"from-slate-600 via-zinc-500 to-slate-400",icon:"dashboard",label:s("artwork.metal.label"),description:s("artwork.metal.description"),bg:"#f1f5f9",accent:"#475569"}
1,Framed:{gradient:"from-amber-700 via-yellow-700 to-amber-600",icon:"crop_original",label:s("artwork.framed.label"),description:s("artwork.framed.description"),bg:"#fef9ee",accent:"#92400e"},Canvas:{gradient:"from-emerald-600 via-teal-500 to-cyan-500",icon:"wallpaper",label:s("artwork.canvas.label"),description:s("artwork.canvas.description"),bg:"#ecfdf5",accent:"#059669"},Wood:{gradient:"from-amber-800 via-orange-700 to-yellow-800",icon:"forest",label:s("artwork.wood.label"),description:s("artwork.wood.description"),bg:"#fefce8",accent:"#92400e"},Acrylic:{gradient:"from-sky-400 via-blue-400 to-indigo-400",icon:"blur_on",label:s("artwork.acrylic.label"),description:s("artwork.acrylic.description"),bg:"#eff6ff",accent:"#2563eb"}},et=(()=>{const t=Ot.toLowerCase();return t.includes("soccer")||t.includes("football")?{noun:"Tournament",adj:"tournament"}:t.includes("cheer")||t.includes("dance")?{noun:"Competition",adj:"competition"}:t.includes("basketball")||t.includes("volleyball")||t.includes("baseball")?{noun:"Game",adj:"game day"}:t.includes("swim")||t.includes("water")?{noun:"Meet",adj:"meet"}:t.includes("track")||t.includes("cross country")||t.includes("xc")?{noun:"Meet",adj:"meet"}:t.includes("cycling")||t.includes("gran fondo")||t.includes("bike")?{noun:"Ride",adj:"ride"}:t.includes("triathlon")||t.includes("multisport")?{noun:"Race",adj:"race day"}:t.includes("ocr")||t.includes("obstacle")?{noun:"Race",adj:"race day"}:t.includes("wedding")||t.includes("portrait")?{noun:"Event",adj:"event"}:t.includes("graduation")||t.includes("school")?{noun:"Event",adj:"event"}:{noun:"Race",adj:"race day"}})(),as=t=>{if(t.heroImageUrl)return null;const r=t.labProductUid.toLowerCase(),a=t.displayCategory.toLowerCase();if(r.includes("all")||r.includes("digital-all"))return{gradient:"from-slate-900 via-indigo-950 to-slate-900",icon:"devices",label:s("stock.allPhotos",{noun:et.noun}),description:s("stock.allPhotosDesc",{adj:et.adj}),style:"digital",accentColor:"#818cf8"};if(r.includes("4pack")||r.includes("pack"))return{gradient:"from-slate-800 via-blue-950 to-slate-900",icon:"photo_library",label:s("stock.bestMoments"),description:s("stock.bestMomentsDesc",{adj:et.adj}),style:"digital",accentColor:"#38bdf8"};if(r.includes("single"))return{gradient:"from-slate-900 via-purple-950 to-slate-900",icon:"photo_camera",label:s("stock.onePerfectShot"),description:s("stock.onePerfectShotDesc"),style:"digital",accentColor:"#c084fc"};if(t.labId==="specialty")return{gradient:"from-rose-900 via-pink-950 to-rose-900",icon:"emoji_events",label:t.name,description:t.description||s("stock.personalizedKeepsake"),style:"specialty",accentColor:"#fb7185"};const n=Object.keys(Le).find(m=>a.includes(m.toLowerCase()));return n?{...Le[n],style:"print"}:{gradient:"from-gray-500 via-slate-500 to-gray-600",icon:"shopping_bag",label:t.name,description:"",style:"generic"}},ls=(t,r)=>t.style==="digital"?e.jsxs("div",{className:`relative bg-gradient-to-br ${t.gradient} flex flex-col items-center justify-center text-white overflow-hidden ${r}`,children:[e.jsxs("div",{className:"absolute inset-0 opacity-[0.07]",children:[e.jsx("div",{className:"absolute top-3 left-3 w-16 h-20 border-2 border-white rounded-lg rotate-[-8deg]"}),e.jsx("div",{className:"absolute top-6 left-8 w-16 h-20 border-2 border-white rounded-lg rotate-[4deg]"}),e.jsx("div",{className:"absolute bottom-4 right-3 w-14 h-18 border-2 border-white rounded-lg rotate-[12deg]"})]}),e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-32 h-32 rounded-full blur-3xl op
1acity-20",style:{backgroundColor:t.accentColor}}),e.jsx("div",{className:"relative z-10 w-16 h-16 rounded-2xl flex items-center justify-center mb-3",style:{backgroundColor:`${t.accentColor}22`,border:`1px solid ${t.accentColor}44`},children:e.jsx("span",{style:{color:t.accentColor},children:e.jsx(y,{name:t.icon,size:32})})}),e.jsx("span",{className:"relative z-10 text-sm font-bold text-center opacity-95 px-4",children:t.label}),e.jsx("span",{className:"relative z-10 text-[11px] text-center opacity-60 mt-1 px-4",children:t.description})]}):t.style==="specialty"?e.jsxs("div",{className:`relative bg-gradient-to-br ${t.gradient} flex flex-col items-center justify-center text-white overflow-hidden ${r}`,children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.06]",children:[0,30,60,90,120,150].map(a=>e.jsx("div",{className:"absolute top-1/2 left-1/2 w-1 h-full origin-bottom -translate-x-1/2",style:{transform:`rotate(${a}deg)`,background:"linear-gradient(to top, transparent, white)"}},a))}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-40 h-40 rounded-full blur-3xl op
1acity-15",style:{backgroundColor:t.accentColor}}),e.jsx("div",{className:"relative z-10 w-16 h-16 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${t.accentColor}22`,border:`1px solid ${t.accentColor}44`},children:e.jsx("span",{style:{color:t.accentColor},children:e.jsx(y,{name:t.icon,size:32})})}),e.jsx("span",{className:"relative z-10 text-sm font-bold text-center opacity-95 px-4",children:t.label}),e.jsx("span",{className:"relative z-10 text-[11px] text-center opacity-60 mt-1 px-4",children:t.description})]}):e.jsxs("div",{className:`relative bg-gradient-to-br ${t.gradient} flex flex-col items-center justify-center text-white overflow-hidden ${r}`,children:[e.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 rounded-full blur-2xl opacity-15 bg-white"}),e.jsx(y,{name:t.icon,size:40,className:"opacity-80"}),e.jsx("span",{className:"mt-3 text-sm font-bold text-center opacity-90 px-4",children:t.label}),e.jsx("span",{className:"text-[11px] text-center opacity-60 mt-1 px-4",children:t.description}),e.jsx("span",{className:"text-[10px] text-center opacity-50 mt-1.5 px-3 leading-snug max-w-[14rem]",children:We})]}),os={"Digital Photos":s("categoryDescriptions.digitalPhotos"),Digital:s("categoryDescriptions.digital"),"Photo Prints":s("categoryDescriptions.photoPrints",{note:de}),Prints:s("categoryDescriptions.prints",{note:de}),Canvas:s("categoryDescriptions.canvas",{note:de}),Metal:s("categoryDescriptions.metal",{note:de}),Framed:s("categoryDescriptions.framed",{note:de}),Wood:s("categoryDescriptions.wood",{note:de}),Acrylic:s("categoryDescriptions.acrylic",{note:de}),"Customizable Products":s("categoryDescriptions.customizableProducts"),Gifts:s("categoryDescriptions.gifts"),Accessories:s("categoryDescriptions.accessories")},tt=`/events/${c}/checkout${D?`?bib=${encodeURIComponent(D)}`:S?`?name=${encodeURIComponent(S)}`:""}`;return e.jsxs("div",{className:Vt?"min-h-screen wc-skin":"min-h-screen bg-[var(--m3-surface,#fafafa)]",children:[(W==null?void 0:W.tone)==="error"?e.jsx("div",{role:"alert",className:"border-b border-amber-200 bg-amber-50 px-4 py-3 text-center text-sm text-amber-950",children:W.text}):null,e.jsx("div",{className:"sticky top-0 z-40",children:e.jsx(us,{currentStep:1,eventId:c,clientName:Dt,clientLogoUrl:qt,eventName:Fe,landingGroupSlug:Gt})}),e.jsxs("div",{className:"mx-auto max-w-7xl px-4 pt-6 pb-24",children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(ds,{})}),e.jsxs("div",{className:"flex gap-8",children:[e.jsx("aside",{className:"hidden lg:block w-64 flex-shrink-0",children:e.jsxs("div",{className:"sticky top-[160px]",children:[e.jsxs("nav",{className:"space-y-1",children:[Re.length>0&&e.jsx("button",{type:"button",onClick:()=>{var t;Ie("packages"),oe(null),(t=document.getElementById("cat-packages"))==null||t.scrollIntoView({behavior:"smooth",block:"start"})},className:`w-full text-left px-4 py-2.5 rounded-lg text-sm font-bold uppercase tracking-wide transition-colors ${ze==="packages"?"bg-white text-[var(--m3-primary,#1a73e8)] shadow-sm border-l-4 border-[var(--m3-primary,#1a73e8)]":"text-gray-600 hover:bg-white hover:text-gray-900"}`,children:s("sidebar.packages")}),we.map(t=>e.jsx("button",{type:"button",onClick:()=>{var r;Ie(t),oe(null),(r=document.getElementById(`cat-${t}`))==null||r.scrollIntoView({behavior:"smooth",block:"start"})},className:`w-full text-left px-4 py-2.5 rounded-lg text-sm font-bold uppercase tracking-wide transition-colors ${ze===t?"bg-white text-[var(--m3-primary,#1a73e8)] shadow-sm border-l-4 border-[var(--m3-primary,#1a73e8)]":"text-gray-600 hover:bg-white hover:text-gray-900"}`,children:t},t)),k.some(t=>t.product.labId==="whcc")&&e.jsx("button",{type:"button",onClick:()=>{var t;Ie("prints"),oe(null),(t=document.getElementById("cat-prints"))==null||t.scrollIntoView({behavior:"smooth",block:"start"})},className:`w-full text-left px-4 py-2.5 rounded-lg text-sm font-bold uppercase tracking-wide transition-colors ${ze==="prints"?"bg-white text-[var(--m3-primary,#1a73e8)] shadow-sm border-l-4 border-[var(--m3-primary,#1a73e8)]":"text-gray-600 hover:bg-white hover:text-gray-900"}`,children:s("sidebar.printsWallArt")})]}),U.length>0&&(()=>{const t=[],r=new Set;for(const a of U)if(a.packageId){if(r.has(a.packageId))continue;r.add(a.packageId);const n=U.filter(m=>m.packageId===a.packageId);t.push({kind:"package",packageId:a.packageId,packageName:a.packageName??s("sidebar.package"),total:ms(n),items:n})}else t.push({kind:"item",item:a});return e.jsxs("div",{className:"mt-6 rounded-xl bg-white border border-gray-200 p-4 shadow-sm",children:[e.jsx("div",{className:"flex items-center justify-between mb-3",children:e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-gray-500",children:s("sidebar.yourCart",{count:U.length})})}),e.jsx("div",{className:"space-y-3",children:t.map(a=>{if(a.kind==="package")return e.jsxs("div",{className:"group rounded-lg border border-violet-200 bg-vi
1olet-50/40 p-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-violet-100 flex-shrink-0",children:e.jsx(y,{name:"inventory_2",size:14,className:"text-violet-600"})}),e.jsx("span",{className:"text-xs font-bold text-violet-900 truncate flex-1",children:a.packageName}),e.jsxs("span",{className:"text-xs font-bold text-gray-900",children:["$",a.total.toFixed(2)]}),e.jsx("button",{onClick:()=>{window.confirm(s("sidebar.removePackageConfirm",{name:a.packageName,count:a.items.length}))&&(xs(c,a.packageId),he())},className:"rounded-full p-0.5 text-gray-300 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100","aria-label":s("sidebar.removePackageAria",{name:a.packageName}),children:e.jsx(y,{name:"close",size:12})})]}),e.jsx("ul",{className:"mt-1.5 ml-10 space-y-0.5 text-[10px] text-violet-700",children:a.items.map(o=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-violet-400",children:"·"}),e.jsx("span",{className:"truncate",children:o.productName})]},o.id))})]},a.packageId);const n=a.item,m=n.previewUrl||(n.thumbnailUrl?B(n.thumbnailUrl,{width:60}):"");return e.jsxs("div",{className:"group flex items-center gap-2",children:[m?e.jsxs("div",{className:"relative h-8 w-8 flex-shrink-0",children:[e.jsx("img",{src:m,alt:"",className:"h-8 w-8 rounded object-cover"}),n.type==="digital"&&e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-600 shadow-sm",children:e.jsx(y,{name:"download",size:8,className:"text-white"})})]}):e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded bg-blue-100 flex-shrink-0",children:e.jsx(y,{name:n.type==="digital"?"photo_library":"print",size:14,className:"text-blue-600"})}),e.jsx("span",{className:"text-xs text-gray-700 truncate flex-1",children:n.productName}),e.jsxs("span",{className:"text-xs font-bold text-gray-900",children:["$",n.lineTotal.toFixed(2)]}),e.jsx("button",{onClick:()=>{hs(c,n.id),he()},className:"rounded-full p-0.5 text-gray-300 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:e.jsx(y,{name:"close",size:12})})]},n.id)})}),e.jsx("button",{onClick:()=>g(tt),className:"mt-3 w-full rounded-lg bg-[var(--m3-primary,#1a73e8)] py-2.5 text-xs font-bold text-white hover:bg-blue-700 transition-colors",children:s("sidebar.checkout")})]})})()]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("nav",{className:"lg:hidden sticky top-[64px] z-30 -mx-4 sm:-mx-6 mb-4 bg-gray-50 border-b border-gray-200",children:e.jsxs("div",{className:"flex gap-2 overflow-x-auto px-4 sm:px-6 py-2.5 scrollbar-none",style:{scrollbarWidth:"none"},children:[Re.length>0&&e.jsx("button",{type:"button",onClick:()=>{var t;Ie("packages"),oe(null),(t=document.getElementById("cat-packages"))==null||t.scrollIntoView({behavior:"smooth",block:"start"})},className:`flex-shrink-0 px-3.5 py-1.5 rounded-full text-xs font-bold uppercase tracking-wide whitespace-nowrap transition-colors ${ze==="packages"?"bg-[var(--m3-primary,#1a73e8)] text-white":"bg-white text-gray-700 border border-gray-200"}`,children:s("sidebar.packages")}),we.map(t=>e.jsx("button",{type:"button",onClick:()=>{var r;Ie(t),oe(null),(r=document.getElementById(`cat-${t}`))==null||r.scrollIntoView({behavior:"smooth",block:"start"})},className:`flex-shrink-0 px-3.5 py-1.5 rounded-full text-xs font-bold uppercase tracking-wide whitespace-nowrap transition-colors ${ze===t?"bg-[var(--m3-primary,#1a73e8)] text-white":"bg-white text-gray-700 border border-gray-200"}`,children:t},t))]})}),U.length>0&&e.jsxs("div",{className:"lg:hidden mb-4 flex items-center justify-between rounded-xl bg-white border border-gray-200 px-4 py-3 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nt,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-sm font-bold text-gray-900",children:s("mobileCart.items",{count:U.length})}),e.jsxs("span",{className:"text-sm text-gray-500",children:["• $",bs(c).toFixed(2)]})]}),e.jsx("button",{onClick:()=>g(tt),className:"rounded-lg bg-[var(--m3-primary,#1a73e8)] px-4 py-2 text-xs font-bold text-white",children:s("mobileCart.checkout")})]}),fe?e.jsx("div",{className:"space-y-6",children:Array.from({length:3}).map((t,r)=>e.jsx("div",{className:"h-48 animate-pulse rounded-2xl bg-gray-200"},r))}):k.length===0?e.jsxs("div",{className:"rounded-2xl border-2 border-dashed border-gray-200 bg-white p-16 text-center",children:[e.jsx(y,{name:"storefront",size:48,className:"mx-auto text-gray-300"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold text-gray-900",children:s("catalogState.noProductsTitle")}),e.jsx("p",{className:"mt-2 text-sm text-gray-500 max-w-lg mx-auto",children:(W==null?void 0:W.text)??s("catalogState.noProductsBody")})]}):(()=>{var be;const t=k.filter(I=>I.product.labId==="whcc"),r=new Map;for(const I of t){let L=I.product.displayCategory||I.product.labCategory||"Prints";(L==="Framed"||L==="Framed Prints")&&(L="Prints"),r.has(L)||r.set(L,[]),r.get(L).push(I)}const a=[...r.keys()].sort(),n=t.length>0,m=I=>{const L=I.match(/(\d+)\s*x\s*(\d+)/i);return L?`${L[1]}×${L[2]}`:I.replace(/^(Photo|Metal|Framed|Canvas|Wood)\s*(Print)?\s*/i,"").trim()||I},o=ht.__type||a[0]||"",h=[...r.get(o)||[]].sort((I,L)=>I.product.retailPrice-L.product.retailPrice),b=ht.__size||((be=h[0])==null?void 0:be.product.id)||"",u=h.find(I=>I.product.id===b)||h[0],_=[];ie.length>0&&_.push("__packages");for(const I of we)_.push(I);n&&_.push("__whcc");const F=new Map;_.forEach((I,L)=>F.set(I,L));const re=I=>F.get(I)??9999;return e.jsxs("div",{className:"flex flex-col gap-0",children:[e.jsx("div",{style:{order:re("__whcc")},children:n&&u&&(()=>{const I=k.indexOf(u),L=xt===u.product.id,Be=u.photos.filter(i=>i!==null).length,l=u.slotCount===0||Be===u.slotCount;return t.reduce((i,G)=>Math.min(i,G.product.retailPrice),1/0),e.jsxs("div",{id:"cat-prints",className:"mb-10 scroll-mt-44",children:[e.jsx("h2",{className:"text-2xl font-extrabold text-gray-900 mb-1",style:{fontFamily:"Manrope, sans-serif"},children:s("prints.heading")}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:s("prints.subtitle",{note:de})}),e.jsx("hr",{className:"mb-6 border-gray-200"}),e.jsx("div",{className:"rounded-2xl bg-white border border-gray-200 shadow-sm overflow-hidden hover:shadow-md transition-shadow",children:L?e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-extrabold text-gray-900",children:u.product.name}),u.product.retailPrice>0?e.jsxs("p",{className:"text-sm text-gray-500",children:["$",u.product.retailPrice.toFixed(2)]}):e.jsx("span",{className:"inline-block rounded-full bg-green-600 px-2 py-0.5 text-xs font-bold text-white",children:s("prints.free")})]}),e.jsx("button",{onClick:()=>oe(null),className:"rounded-full p-1 hover:bg-gray-100",children:e.jsx(y,{name:"close",size:20,className:"text-gray-400"})})]}),e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:s("prints.selectPhotosFor",{count:u.slotCount,name:u.product.name})}),e.jsx("p",{className:"text-xs text-gray-500 mb-4",children:We}),e.jsx("div",{className:`grid gap-3 ${u.slotCount>3?"grid-cols-4":u.slotCount>2?"grid-cols-3":"grid-cols-2 sm:grid-cols-4"}`,children:u.photos.map((i,G)=>e.jsx("div",{className:"relative",children:i?e.jsxs("div",{className:"group relative bg-[#f5f5f0] rounded-xl p-4 flex items-center justify-center",children:[u.product.frameImageUrl?e.jsxs("div",{className:"relative w-full aspect-[4/5]",children:[e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"absolute inset-[8%] w-[84%] h-[84%] object-cover"}),e.jsx("img",{src:u.product.frameImageUrl,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"})]}):o==="Metal"?e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"absolute inset-1 top-3 bg-black/15 blur-md rounded-sm"}),e.jsxs("div",{className:"relative aspect-[4/5] rounded-sm overflow-hidden",style:{boxShadow:"0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3)"},children:[e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none"})]})]}):o==="Framed"?e.jsx("div",{className:"w-full bg-[#2a1f14] p-[6px]",style:{boxShadow:"0 4px 16px rgba(0,0,0,0.3)"},children:e.jsx("div",{className:"bg-white p-3",children:e.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"h-full w-full object-cover"})})})}):o==="Canvas"?e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"absolute -right-1 top-1 w-full aspect-[4/5] bg-stone-400/60 rounded-sm"}),e.jsxs("div",{className:"relative aspect-[4/5] border-[3px] border-stone-300 overflow-hidden",style:{boxShadow:"3px 3px 0 0 #a8a29e, 0 4px 12px rgba(0,0,0,0.15)"},children:[e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.06] pointer-events-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000' fill-opacity='1'%3E%3Cpath d='M0 0h1v1H0zM3 3h1v1H3z'/%3E%3C/g%3E%3C/svg%3E")`}})]})]}):o==="Wood"?e.jsxs("div",{className:"relative w-full aspect-[4/5] overflow-hidden shadow-lg",style:{boxShadow:"0 3px 12px rgba(0,0,0,0.2)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-amber-200 via-amber-100 to-amber-200"}),e.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(139,69,19,0.3) 8px, rgba(139,69,19,0.3) 9px)"}}),e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"absolute inset-[6%] object-cover",style:{mixBlendMode:"multiply",opacity:.9}})]}):o==="Acrylic"?e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"absolute inset-0 top-2 bg-black/10 blur-lg rounded-sm"}),e.jsxs("div",{className:"relative aspect-[4/5] rounded-sm overflow-hidden border border-white/50",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.5)"},children:[e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"h-full w-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/15 to-transparent pointer-events-none"})]})]}):e.jsx("div",{className:"w-full bg-white p-[3px] shadow-lg",style:{boxShadow:"0 2px 8px rgba(0,0,0,0.12)"},children:e.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:e.jsx("img",{src:B(i.thumbnailUrl||i.url,{width:400,photo:i}),alt:"",className:"h-full w-full object-cover"})})}),e.jsx("button",{onClick:()=>{w(De=>{const ne=[...De],ge=[...ne[I].photos];return ge[G]=null,ne[I]={...ne[I],photos:ge},ne})}
1,className:"absolute top-2 right-2 rounded-full bg-black/50 p-1 text-white opacity-0 group-hover:opacity-100 transition z-10",children:e.jsx(y,{name:"close",size:14})})]}):e.jsxs("button",{onClick:()=>Me(I,G),className:"aspect-[4/5] w-full rounded-xl border-2 border-dashed border-gray-300 bg-gray-50 flex flex-col items-center justify-center gap-1 text-gray-400 hover:border-blue-400 hover:text-blue-500 transition",children:[e.jsx(y,{name:"add_photo_alternate",size:24}),e.jsx("span",{className:"text-[10px] font-bold",children:s("prints.addPhoto")})]})},G))}),l&&e.jsx("button",{onClick:()=>Qe(I),className:"mt-4 w-full rounded-lg bg-red-600 py-3 text-sm font-bold text-white uppercase tracking-wide hover:bg-red-700 transition-colors",children:u.product.retailPrice>0?s("prints.addToCartPrice",{price:u.product.retailPrice.toFixed(2)}):s("prints.addToCartFree")})]}):e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[(()=>{const i=Le[o]||Le.Prints;return e.jsxs("div",{className:"sm:w-64 flex-shrink-0 relative flex flex-col items-center justify-center p-8 sm:p-6 overflow-hidden",style:{backgroundColor:i.bg},children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-40 h-40 rounded-full blur-3xl op
1acity-10",style:{backgroundColor:i.accent}}),o==="Metal"?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-1 top-3 bg-black/15 blur-md rounded-sm"}),e.jsxs("div",{className:"relative w-32 h-40 rounded-sm overflow-hidden",style:{boxShadow:"0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-zinc-700 via-zinc-500 to-zinc-600 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:32,className:"text-white/50"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 to-transparent"})]})]}):o==="Framed"||o==="Prints"?e.jsx("div",{className:"relative",children:o==="Framed"?e.jsx("div",{className:"w-36 h-44 bg-[#2a1f14] p-[5px] shadow-xl",style:{boxShadow:"0 4px 16px rgba(0,0,0,0.3)"},children:e.jsx("div",{className:"w-full h-full bg-white p-3",children:e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-stone-400 to-stone-500 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:28,className:"text-white/50"})})})}):e.jsx("div",{className:"w-32 h-40 bg-white p-[3px] shadow-lg",style:{boxShadow:"0 2px 8px rgba(0,0,0,0.12)"},children:e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-amber-600 to-orange-500 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:28,className:"text-white/50"})})})}):o==="Canvas"?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -right-1 top-1 w-32 h-40 bg-stone-400/60 rounded-sm"}),e.jsxs("div",{className:"relative w-32 h-40 border-[3px] border-stone-300 overflow-hidden",style:{boxShadow:"3px 3px 0 0 #a8a29e, 0 4px 12px rgba(0,0,0,0.15)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-600 to-teal-500 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:28,className:"text-white/50"})}),e.jsx("div",{className:"absolute inset-0 opacity-[0.08]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000' fill-opacity='1'%3E%3Cpath d='M0 0h1v1H0zM3 3h1v1H3z'/%3E%3C/g%3E%3C/svg%3E")`}})]})]}):o==="Wood"?e.jsxs("div",{className:"relative w-32 h-40 overflow-hidden shadow-lg",style:{boxShadow:"0 3px 12px rgba(0,0,0,0.2)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-amber-200 via-amber-100 to-amber-200"}),e.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(139,69,19,0.3) 8px, rgba(139,69,19,0.3) 9px)"}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-amber-800/60 to-yellow-900/50 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:28,className:"text-white/60"})})]}):e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 top-2 bg-black/10 blur-lg rounded-sm"}),e.jsxs("div",{className:"relative w-32 h-40 rounded-sm overflow-hidden border border-white/50",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.5)"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-sky-500 to-indigo-500 flex items-center justify-center",children:e.jsx(y,{name:"photo",size:28,className:"text-white/50"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/20 to-transparent"})]})]}),e.jsx("span",{className:"relative z-10 mt-4 text-sm font-bold",style:{color:i.accent},children:i.label}),e.jsx("span",{className:"relative z-10 mt-1 text-[11px] text-gray-500 text-center leading-relaxed",children:i.description}),e.jsx("span",{className:"relative z-10 mt-2 text-[10px] text-gray-500 text-center leading-snug px-3 max-w-[13rem]",children:We})]})})(),e.jsxs("div",{className:"flex-1 p-6",children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("span",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:s("prints.type")}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:a.map(i=>e.jsx("button",{onClick:()=>{bt(G=>{var ge;const ne=[...r.get(i)||[]].sort((Te,st)=>Te.product.retailPrice-st.product.retailPrice);return{...G,__type:i,__size:((ge=ne[0])==null?void 0:ge.product.id)||""}})},className:`rounded-lg border px-4 py-2.5 text-sm font-bold transition-all ${i===o?"border-gray-900 bg-gray-900 text-white shadow-md":"border-gray-300 bg-white text-gray-700 hover:border-gray-500 hover:bg-gray-50"}`,children:i},i))})]}),h.length>0&&e.jsxs("div",{className:"mb-5",children:[e.jsx("span",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:s("prints.size")}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:h.map(i=>e.jsx("button",{onClick:()=>bt(G=>({...G,__size:i.product.id})),className:`rounded-lg border px-4 py-2 text-sm font-bold transition-all ${i.product.id===b?"border-blue-600 bg-blue-600 text-white shadow-md":"border-gray-300 bg-white text-gray-700 hover:border-blue-400 hover:bg-blue-50"}`,children:m(i.product.name)},i.product.id))})]}),e.jsxs("div",{className:"mt-6 flex items-center justify-between border-t border-gray-100 pt-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-500",children:u.product.name}),u.product.retailPrice>0?e.jsxs("span",{className:"text-2xl font-extrabold text-gray-900",children:["$",u.product.retailPrice.toFixed(2)]}):e.jsx("span",{className:"inline-block rounded-full bg-green-600 px-3 py-1 text-sm font-bold text-white",children:s("prints.free")})]}),e.jsxs("button",{onClick:()=>oe(u.product.id),className:"flex items-center gap-2 rounded-lg bg-red-600 px-6 py-3 text-sm font-bold text-white uppercase tracking-wide hover:bg-red-700 transition-colors shadow-lg",children:[u.product.retailPrice>0?s("prints.selectPhotoOrder"):s("prints.getFreeDownload"),e.jsx(y,{name:"arrow_forward",size:18})]})]})]})]})})]})})()}),e.jsxs("div",{style:{order:re("__packages")},children:[Re.length>0&&e.jsxs("div",{id:"cat-packages",className:"mb-10 scroll-mt-44",children:[e.jsx("h2",{className:"text-2xl font-extrabold text-gray-900 mb-1",style:{fontFamily:"Manrope, sans-serif"},children:s("packages.heading")}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:s("packages.subtitle")}),e.jsx("hr",{className:"mb-6 border-gray-200"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:Re.map(wt)})]}),!1]}),we.map(I=>{const L=k.filter(l=>l.product.displayCategory===I&&l.product.labId!=="whcc"),Be=ss.get(I)??[];return e.jsxs("div",{style:{order:re(I)},id:`cat-${I}`,className:"mb-10 scroll-mt-44",children:[e.jsx("h2",{className:"text-2xl font-extrabold text-gray-900 mb-1",style:{fontFamily:"Manrope, sans-serif"},children:I}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:os[I]||s("categoryDescriptions.fallback")}),e.jsx("hr",{className:"mb-6 border-gray-200"}),Be.length>0&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 mb-6",children:Be.map(wt)}),e.jsx("div",{className:"space-y-6",children:L.map(l=>{var Nt,kt;const i=k.indexOf(l),G=l.photos.filter(f=>f!==null).length,De=l.slotCount===0||G===l.slotCount,ne=l.product.labId==="specialty"||!!l.product.templateId,ge=!ne||(l.variables.runnerName||"").trim().length>0,Te=De&&ge,st=xt===l.product.id,jt=as(l.product);return e.jsx("div",{className:"rounded-2xl bg-white border border-gray-200 shadow-sm overflow-hidden hover:shadow-md transition-shadow",children:st?e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:s("product.chooseYourPhotos",{name:l.product.name})}),e.jsxs("button",{type:"button",onClick:()=>oe(null),className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700",children:[e.jsx(y,{name:"close",size:18}),s("product.close")]})]}),ne&&((kt=(Nt=l.product.designConfig)==null?void 0:Nt.layers)!=null&&kt.length)?e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"relative rounded-xl overflow-hidden shadow-xl border border-gray-200 select-none w-full max-w-sm mx-auto",style:{touchAction:l.ph
1otos[0]?"none":"auto",cursor:l.photos[0]?"grab":"default"},onMouseDown:f=>{if(!l.photos[0])return;f.preventDefault();const z=f.clientX,C=f.clientY,j=parseFloat(l.variables.photoOffsetX||"0"),K=parseFloat(l.variables.photoOffsetY||"0"),Z=f.currentTarget;Z.style.cursor="grabbing";const R=je=>{const rt=(je.clientX-z)/3.2,at=(je.clientY-C)/3.2,lt=Math.max(-50,Math.min(50,j+rt)),ot=Math.max(-50,Math.min(50,K+at));w(Ne=>{const Ye=[...Ne];return Ye[i]={...Ye[i],variables:{...Ye[i].variables,photoOffsetX:lt.toFixed(1),photoOffsetY:ot.toFixed(1)}},Ye})},V=()=>{Z.style.cursor="grab",window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",V)};window.addEventListener("mousemove",R),window.addEventListener("mouseup",V)},onTouchStart:f=>{if(!l.photos[0]||!f.touches[0])return;const z=f.touches[0].clientX,C=f.touches[0].clientY,j=parseFloat(l.variables.photoOffsetX||"0"),K=parseFloat(l.variables.photoOffsetY||"0"),Z=V=>{if(!V.touches[0])return;V.preventDefault();const je=(V.touches[0].clientX-z)/3.2,rt=(V.touches[0].clientY-C)/3.2,at=Math.max(-50,Math.min(50,j+je)),lt=Math.max(-50,Math.min(50,K+rt));w(ot=>{const Ne=[...ot];
1return Ne[i]={...Ne[i],variables:{...Ne[i].variables,photoOffsetX:at.toFixed(1),photoOffsetY:lt.toFixed(1)}},Ne})},R=()=>{window.removeEventListener("touchmove",Z),window.removeEventListener("touchend",R)};window.addEventListener("touchmove",Z,{passive:!1}),window.addEventListener("touchend",R)},children:[e.jsx(ct,{config:l.product.designConfig,photoUrl:l.photos[0]?B(l.photos[0].thumbnailUrl||l.photos[0].url,{width:600,photo:l.photos[0]}):void 0,width:340,variables:{eventName:Fe,...l.variables}}),l.photos[0]&&!sessionStorage.getItem("dragHintShown")&&(setTimeout(()=>sessionStorage.setItem("dragHintShown","1"),3e3),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none z-10 animate-[fadeOut_0.5s_ease_2.5s_forwards]",children:e.jsxs("div",{className:"flex flex-col items-center gap-1 rounded-2xl bg-black/50 px-5 py-3 backdrop-blur-sm",children:[e.jsx("span",{className:"text-3xl animate-[dragHand_2s_ease-in-out]",children:"👆"}),e.jsx("span",{className:"text-[11px] font-semibold text-white",children:s("product.dragToReposition")})]})}))]}),l.photos[0]?e.jsxs("div",{className:"flex items-center justify-between max-w-sm mx-auto mt-2 px-1",children:[e.jsxs("button",{type:"button",onClick:()=>Me(i,0),className:"flex items-center gap-1.5 rounded-lg px-3 py-2 text-xs font-medium text-blue-600 hover:bg-blue-50 active:bg-blue-100 transition-colors",children:[e.jsx(y,{name:"swap_horiz",size:16}),s("product.changePhoto")]}),e.jsxs("button",{type:"button",onClick:()=>w(f=>{const z=[...f];
1return z[i]={...z[i],variables:{...z[i].variables,photoOffsetX:"0",photoOffsetY:"0",photoZoom:"1"}},z}),className:"flex items-center gap-1 rounded-lg px-3 py-2 text-xs font-medium text-gray-400 hover:bg-gray-50 active:bg-gray-100 transition-colors",children:[e.jsx(y,{name:"restart_alt",size:14}),s("product.reset")]})]}):e.jsxs("button",{type:"button",onClick:()=>Me(i,0),className:"mt-3 w-full max-w-sm mx-auto flex items-center justify-center gap-2 rounded-xl bg-blue-600 px-4 py-3.5 text-base font-bold text-white shadow-lg hover:bg-blue-700 active:scale-[0.98] transition-all",children:[e.jsx(y,{name:"add_photo_alternate",size:20}),s("product.chooseYourPhoto")]})]}),l.photos[0]&&e.jsxs("div",{className:"flex items-center gap-3 max-w-sm mx-auto w-full px-1",children:[e.jsx("button",{type:"button",className:"p-2 rounded-lg text-gray-400 hover:bg-gray-100 active:bg-gray-200 transition-colors",onClick:()=>{const f=Math.max(1,parseFloat(l.variables.photoZoom||"1")-.1);w(z=>{const C=[...z];return C[i]={...C[i],variables:{...C[i].variables,p
1hotoZoom:f.toFixed(1)}},C})},children:e.jsx(y,{name:"zoom_out",size:20})}),e.jsx("input",{type:"range",min:1,max:2.5,step:.01,value:parseFloat(l.variables.photoZoom||"1"),onChange:f=>w(z=>{const C=[...z];return C[i]={...C[i],variables:{...C[i].variables,photoZoom:f.target.value}},C}),className:"flex-1 h-2 rounded-full appearance-none bg-gray-200 accent-blue-600 cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-blue-600 [&::-webkit-slider-thumb]:shadow-md [&::-webkit-slider-thumb]:cursor-pointer"}),e.jsx("button",{type:"button",className:"p-2 rounded-lg text-gray-400 hover:bg-gray-100 active:bg-gray-200 transition-colors",onClick:()=>{const f=Math.min(2.5,parseFloat(l.variables.photoZoom||"1")+.1);w(z=>{const C=[...z];return C[i]={...C[i],variables:{...C[i].variables,photoZoom:f.toFixed(1)}},C})},children:e.jsx(y,{name:"zoom_in",size:20})}),e.jsxs("span",{className:"rounded-full bg-blue-50 px-2.5 py-1 text-xs font-bold text-blue-600 min-w-[42px] text-center",children:[parseFloat(l.variables.photoZoom||"1").toFixed(1),"x"]})]}),(()=>{var z,C;const f=((C=(z=l.product.designConfig)==null?void 0:z.variables)==null?void 0:C.filter(j=>j.source==="user"))??[];return f.length===0?null:e.jsx("div",{className:"space-y-2 max-w-sm mx-auto w-full",children:f.map(j=>e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-bold text-gray-700 mb-1.5",children:[j.label," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:j.placeholder||s("product.enterYour",{label:j.label.toLowerCase()}),value:l.variables[j.key]??"",onChange:K=>w(Z=>{const R=[...Z];return R[i]={...R[i],variables:{...R[i].variables,[j.key]:K.target.value}},R}),className:`w-full rounded-xl border-2 ${l.variables[j.key]?"border-gray-200":"border-blue-300 bg-blue-50/30"} px-4 py-3.5 text-base font-semibold focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none placeholder:text-gray-300 placeholder:font-normal ${j.key==="runnerName"?"uppercase":""}`})]},j.key))})})(),e.jsx("div",{className:"rounded-xl border border-amber-200 bg-amber-50/50 p-4 max-w-sm mx-auto w-full",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(y,{name:"frame_inspect",size:24,className:"text-amber-600 shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-bold text-amber-800",children:s("product.upgradeFramed")}),e.jsx("p",{className:"text-xs text-amber-600 mt-0.5",children:s("product.upgradeFramedDesc")})]}),e.jsx("button",{type:"button",className:"shrink-0 rounded-lg bg-amber-600 px-4 py-2.5 text-xs font-bold text-white hover:bg-amber-700 active:scale-95 transition-all",children:"+$29.95"})]})})]})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`grid gap-3 ${l.slotCount>3?"grid-cols-4":l.slotCount>2?"grid-cols-3":"grid-cols-2 sm:grid-cols-4"}`,children:l.photos.map((f,z)=>{var R;const C=f!==null&&U.some(V=>V.photoId===f.id),j=(R=l.slotBorders)==null?void 0:R[z],K=!!j&&(!!j.renderId||!!j.borderTemplateId&&j.borderTemplateId!=="none"),Z=f!==null&&!C&&l.product.labId!=="specialty"&&!l.product.templateId;return e.jsxs("div",{className:"relative",children:[f?(()=>{const V=!!(j!=null&&j.previewUrl)||Ht.has(f.id);return e.jsxs("div",{className:`group relative ${V?"":"aspect-[4/5]"} overflow-hidden rounded-xl ${C?"ring-2 ring-green-400":"bg-gray-100"}`,children:[j!=null&&j.previewUrl?e.jsx("img",{src:j.previewUrl,alt:"",className:"block w-full h-auto"}):j!=null&&j.borderConfig?e.jsx(Ts,{photoUrl:B(f.thumbnailUrl||f.url,{width:400,photo:f}),config:j.borderConfig}):e.jsx("img",{src:B(f.thumbnailUrl||f.url,{width:400,photo:f}),alt:"",className:V?"block w-full h-auto":"h-full w-full object-cover"}),!(j!=null&&j.previewUrl)&&e.jsx(Us,{variant:"modal"}),C&&e.jsxs("div",{className:"absolute bottom-2 left-2 flex items-center gap-1 rounded-full bg-green-500 px-2 py-0.5 text-[10px] font-bold text-white shadow",children:[e.jsx(y,{name:"check",size:10}),s("product.inCart")]}),!C&&e.jsx("button",{type:"button",onClick:()=>
1Qt(i,z),className:"absolute top-2 right-2 rounded-full bg-black/50 p-1 text-white opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(y,{name:"close",size:16})})]})})():e.jsxs("button",{type:"button",onClick:()=>Me(i,z),className:"aspect-[4/5] w-full rounded-xl border-2 border-dashed border-gray-300 bg-gray-50 flex flex-col items-center justify-center gap-2 hover:border-blue-400 hover:bg-blue-50 transition-colors",children:[e.jsx("div",{className:"rounded-full bg-blue-100 p-3",children:e.jsx(dt,{className:"h-6 w-6 text-blue-600"})}),e.jsx("span",{className:"text-xs font-medium text-gray-500",children:s("product.addAnother")})]}),Z&&e.jsxs("button",{type:"button",onClick:()=>pt({productIndex:i,slotIndex:z}),className:`mt-1.5 w-full rounded-lg border px-2 py-1.5 text-[11px] font-semibold transition-colors flex items-center justify-center gap-1 ${K?"border-purple-300 bg-purple-50 text-purple-700 hover:bg-purple-100":"border-dashed border-purple-300 text-purple-600 hover:bg-purple-50"}`,children:[e.jsx(y,{name:K?"check_circle":"add_circle",size:14}),s(K?"product.borderEdit":"product.borderAdd")]})]},z)})}),(l.product.labId==="specialty"||l.product.templateId)&&e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:s("product.personalize")}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-2",children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:s("product.yourName")}),e.jsx("input",{type:"text",placeholder:s("product.yourNamePlaceholder"),value:l.variables.runnerName??"",onChange:f=>w(z=>{const C=[...z];return C[i]={...C[i],variables:{...C[i].variables,runnerName:f.target.value}},C}),className:"w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm uppercase focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none"})]})})]})]}),e.jsx("button",{type:"button",onClick:()=>Qe(i),disabled:!Te,className:`mt-4 w-full rounded-xl py-3 text-sm font-bold transition-all ${Te?"bg-[var(--m3-primary,#1a73e8)] text-white shadow-lg hover:shadow-xl":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:Te?e.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e.jsx(nt,{className:"h-4 w-4"}),l.product.retailPrice>0?s("product.addToCartPrice",{price:l.product.retailPrice.toFixed(2)}):s("product.addToCartFree")]}):s("product.selectMorePhotos",{count:l.slotCount-G})})]}):e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsx("div",{className:"sm:w-64 flex-shrink-0 relative",children:(()=>{var j,K;const f=[l.product.heroImageUrl,...l.product.galleryImages||[]].filter(Boolean),z=Mt[l.product.id]||0,C=f[z]||f[0];if(C)return e.jsxs(e.Fragment,{children:[e.jsx("img",{src:C,alt:l.product.name,className:"h-48 sm:h-full w-full object-cover",loading:"lazy"}),f.length>1&&e.jsx("div",{className:"absolute bottom-2 left-1/2 -translate-x-1/2 flex gap-1.5",children:f.map((Z,R)=>e.jsx("button",{onClick:V=>{V.stopPropagation(),Rt(je=>({...je,[l.product.id]:R}))},className:`h-2 w-2 rounded-full transition-all ${R===z?"bg-white scale-125 shadow":"bg-white/50 hover:bg-white/80"}`},R))})]});if((K=(j=l.product.designConfig)==null?void 0:j.layers)!=null&&K.length){const Z=l.product.designConfig,R=l.photos[0]?B(l.photos[0].thumbnailUrl||l.photos[0].url,{width:400,photo:l.photos[0]}):void 0;return e.jsx("div",{className:"h-48 sm:h-full w-full flex items-center justify-center bg-gray-100 p-3 overflow-hidden",children:e.jsx(ct,{config:Z,photoUrl:R,width:160,variables:{eventName:Fe,...l.variables}})})}return jt?ls(jt,"h-48 sm:h-full w-full p-6"):null})()}),e.jsxs("div",{className:"flex-1 p-6 flex flex-col justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{children:[l.product.badge&&e.jsx("span",{className:"inline-block mb-2 rounded-full px-2.5 py-0.5 text-[10px] font-bold text-white uppercase tracking-wider",style:{backgroundColor:l.product.badgeColor||"#2563eb"},children:l.product.badge}),e.jsx("h3",{className:"text-xl font-extrabold text-gray-900",style:{fontFamily:"Manrope, sans-serif"},children:l.product.name})]})}),l.product.description&&e.jsx("p",{className:"mt-2 text-sm text-gray-600 leading-relaxed",children:l.product.description})]}),e.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-gray-400 uppercase tracking-wider",children:s("product.only")}),e.jsx("span",{className:"text-3xl font-extrabold text-gray-900",children:l.product.retailPrice>0?`$${l.product.retailPrice.toFixed(2)}`:s("product.free")})]}),e.jsxs("button",{type:"button",onClick:()=>
1{if(l.slotCount===0)Qe(i);else if(l.product.labId==="specialty"||l.product.templateId){const f=new URLSearchParams;D&&f.set("bib",D),S&&f.set("name",S);const z=f.toString();g(`/events/${c}/specialty/${encodeURIComponent(l.product.id)}${z?`?${z}`:""}`)}else oe(l.product.id)},className:"w-full sm:w-auto flex items-center justify-center gap-2 rounded-xl bg-[var(--m3-primary,#1a73e8)] px-6 py-3.5 text-base font-bold text-white hover:opacity-90 active:scale-[0.98] transition-all shadow-lg",children:[l.slotCount===0?s("product.addToCart"):l.product.labId==="specialty"?s("product.customizeOrder"):s("product.selectPhotoOrder"),e.jsx(y,{name:l.slotCount===0?"add_shopping_cart":"arrow_forward",size:18})]})]})]})]})},l.product.id)})})]},I)})]})})()]})]})]}),e.jsx(zs,{open:_t,onClose:()=>{Pe(!1),Xe(null),xe(null)},photos:Se,onSelect:t=>{var r;if(ve!==null){const a=ve,n=(r=se[a])==null?void 0:r.type;Ae(m=>{const o=m.map((h,b)=>b===a?t:h);if(n==="specialty")return xe(null),Pe(!1),o;const d=se.findIndex((h,b)=>(h.type==="digital"||h.type==="print")&&o[b]===null);return d!==-1?xe(d):(xe(null),Pe(!1)),o})}else Jt(t)},usedPhotoIds:ts,persistOnSelect:ve!==null,title:ve!==null&&ye?(()=>{const t=se[ve];if(!t)return ye.name;const r=se.filter(m=>m.productId===t.productId),a=se.slice(0,ve+1).filter(m=>m.productId===t.productId).length,n=t.productName.trim();return r.length>1?s("drawer.positionOf",{label:n,position:a,total:r.length,package:ye.name}):s("drawer.positionSingle",{label:n,package:ye.name})})():Ve?s("drawer.loading"):Se.length>0?s("drawer.yourPhotos",{count:Se.length}):s("drawer.empty")}),ut&&(()=>{var o,d;const t=ut,r=k[t.productIndex],a=(r==null?void 0:r.photos[t.slotIndex])??null;if(!r||!a)return null;const m=r.product.labId==="platform"?void 0:((o=r.product.sizes)==null?void 0:o[0])||void 0;return e.jsx(Es,{open:!0,onClose:()=>pt(null),onConfirm:h=>es(t.productIndex,t.slotIndex,h),photo:a,eventId:c,productSize:m,initialPick:((d=r.slotBorders)==null?void 0:d[t.slotIndex])??null})})(),Q>0&&e.jsxs("button",{type:"button",onClick:()=>g(tt),className:"fixed z-30 flex items-center gap-2 rounded-full bg-[var(--m3-primary,#1a73e8)] px-6 py-4 text-base font-bold text-white shadow-2xl lg:hidden active:scale-95 transition-transform",style:{bottom:"calc(1.5rem + env(safe-area-inset-bottom, 0px))",right:"calc(1.5rem + env(safe-area-inset-right, 0px))"},children:[e.jsx(nt,{className:"h-5 w-5"}),s("fab.cart",{count:Q})]})]})}export{ir as ProductCatalogPage};

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.