PageSourceSearch

https://camp.com/assets/_page_without_header.resume._reservation_request_token-ue59_o6y.js

js camp.com collected 2026-09-25 07:38:05 UTC 11,390 bytes, 2 lines download raw bytes

1import{c as Z}from"./compiler-runtime-DxhGMidE.js";import{j as e}from"./jsx-runtime-CQksViU1.js";import{r as G}from"./index-BBoARLeU.js";import{u as q}from"./usePageTracking-BykmEnT7.js";import{D as R}from"./DefaultErrorBoundary-B5a0976u.js";import{S as ee}from"./SimpleHeader-DUvC5066.js";import{S as te}from"./Spinner-BBX8pSrI.js";import{u as ie}from"./useNotifications-DQ29k5np.js";import{u as ne,a as se,b as ae,i as re,t as B,o as ce,c as le}from"./shopify-CsVLMp4a.js";import{u as oe,c as de}from"./ShopifyCartProvider-BjORnwVs.js";import{f as ue,a as me,b as I}from"./format-D2QT8i2k.js";import{r as $,a as F,i as H,b as K,f as J}from"./ticketBundleDiscounts-C0VFtQ-6.js";import y from"./Button-k5zc9u-9.js";import{u as pe,L as w}from"./components-CmIHoGn0.js";import"./index-ChgXnHiE.js";import"./ChevronLeft-eris4QT4.js";import"./Logo-CofcJ0jf.js";import"./datetime-BGxK8RTU.js";import"./breadcrumbs-BSga1pif.js";import"./normalize-DAUyelnC.js";import"./index-BWNNtDwB.js";import"./index-B-wdoswJ.js";import"./useQuery-DGTVmkfQ.js";import"./_baseFindIndex-C8qvguY2.js";import"./toInteger-4blijS68.js";import"./index-DjMNg0y_.js";import"./Link-CGhXP-VG.js";import"./colors-p2iHJrYl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0f83b9f106262b0ac68fcc612207ea452ac0c789"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="6cfabce8-de76-4a93-a4b6-ce5b04c64b95",t._sentryDebugIdIdentifier="sentry-dbid-6cfabce8-de76-4a93-a4b6-ce5b04c64b95")})()}catch{}const Ge=R,$e=()=>{const t=Z.c(6),{result:s,reservationRequest:c,addons:d,activityTypeUrl:x,customer:g}=pe();q("Resume Abandoned Checkout");let h;return t[0]!==x||t[1]!==d||t[2]!==g||t[3]!==c||t[4]!==s?(h=e.jsxs("div",{children:[e.jsx(ee,{}),e.jsx("div",{className:"mx-auto w-full max-w-camp-container-limit space-y-8 pb-12 pt-8 px-4",children:e.jsx(xe,{result:s,reservationRequest:c,addons:d,activityTypeUrl:x,customer:g})})]}),t[0]=x,t[1]=d,t[2]=g,t[3]=c,t[4]=s,t[5]=h):h=t[5],h},xe=({result:t,reservationRequest:s,addons:c,activityTypeUrl:d,customer:x})=>t==="NOT_FOUND"?e.jsxs("div",{className:"text-center space-y-6 py-12",children:[e.jsx("h1",{className:"font-serif text-2xl md:text-4xl text-green-dark-500",children:"Checkout Not Found"}),e.jsx("p",{className:"text-lg text-green-dark-500/70",children:"We couldn't find this checkout. It may have expired or already been completed."}),e.jsx(w,{to:"/",className:"inline-block",children:e.jsx(y,{size:"large",children:"Browse Experiences"})})]}):t==="ALREADY_COMPLETED"?e.jsxs("div",{className:"text-center space-y-6 py-12",children:[e.jsx("h1",{className:"font-serif text-2xl md:text-4xl text-green-dark-500",children:"Already Completed"}),e.jsx("p",{className:"text-lg text-green-dark-500/70",children:"This checkout has already been completed. Check your email for your confirmation."}),e.jsx(w,{to:"/",className:"inline-block",children:e.jsx(y,{size:"large",children:"Browse Experiences"})})]}):t==="NOT_AVAILABLE"?e.jsxs("div",{className:"text-center space-y-6 py-12",children:[e.jsx("h1",{className:"font-serif text-2xl md:text-4xl text-green-dark-500",children:"No Longer Available"}),e.jsx("p",{className:"text-lg text-green-dark-500/70",children:"Sorry, the time slot or tickets from your previous checkout are no longer available."}),d?e.jsx(w,{to:d,className:"inline-block",children:e.jsx(y,{size:"large",children:"Book Again"})}):e.jsx(w,{to:"/",className:"inline-block",children:e.jsx(y,{size:"large",children:"Browse Experiences"})})]}):t==="RECREATED"&&s?e.jsx(he,{reservationRequest:s,addons:c,customer:x}):e.jsxs("div",{className:"text-center space-y-6 py-12",children:[e.jsx("h1",{className:"font-serif text-2xl md:text-4xl text-green-dark-500",children:"Something Went Wrong"}),e.jsx("p",{className:"text-lg text-green-dark-500/70",children:"We encountered an unexpected error. Please try again."}),e.jsx(w,{to:"/",className:"inline-block",children:e.jsx(y,{size:"large",children:"Browse Experiences"})})]}),he=({reservationRequest:t,addons:s,customer:c})=>{var U;const{showError:d}=ie(),x=oe(),g=ne(),{ttclid:h}=se(),{sproutTxid:S}=ae(),[P,_]=G.useState(!1),V=c&&re(c),u=t.activity,L=G.useMemo(()=>s?s.reduce((i,l)=>(i[l.variant.checkoutId]=l.quantity,i),{}):{},[s]),X=async()=>{var i,l;_(!0);try{const r=[],j=t.activity.activityType.experience;
1(i=t.reservationRequestTicketBundles)==null||i.forEach(n=>{var m,v,N;if(n.quantity>0){const p=(m=t.activity.ticketBundleTicketPrices)==null?void 0:m.find(o=>o.ticketBundleId===n.ticketBundleId),k=$(p??{}),a=k.type==="fixed"?J(k.amountCents,(p==null?void 0:p.price)??0):k.percent;r.push({merchandiseId:B("ProductVariant",n.ticketVariantId),quantity:n.quantity*(((v=n.ticketBundle)==null?void 0:v.ticketQuantity)||1),attributes:[{key:"_bundled_ticket",value:"true"},{key:"_ticket_bundle_id",value:n.ticketBundleId.toString()},{key:"_ticket_bundle_name",value:n.name||""},{key:"_ticket_bundle_discount_percent",value:a.toString()},...j?[{key:"_experience",value:"true"}]:[]]}),(N=n.reservationRequestTicketBundleAddons)==null||N.forEach(o=>{var T;if(o.quantity>0&&o.productVariant){const M=H(o.ticketBundleAddonSlot.name);let A=0;if(!M){const f=K(p??{},(T=n.ticketBundle)==null?void 0:T.applyAddonDiscount);if(f.type==="fixed"){const E=Math.round((o.productVariant.price??0)*100);A=J(f.amountCents,E)}else A=f.percent}r.push({merchandiseId:B("ProductVariant",o.productVariant.id),quantity:o.quantity,attributes:[{key:"_addon",value:"true"},{key:"_ticket_bundle_name",value:n.name||""},{key:"_ticket_bundle_addon_slot_id",value:o.ticketBundleAddonSlot.id.toString()},{key:"_ticket_bundle_discount_percent",value:A.toString()}]})}})}}),t.childVariantId&&t.children>0&&r.push({merchandiseId:B("ProductVariant",t.childVariantId),quantity:t.children,attributes:[{key:"_child_ticket",value:"true"},...j?[{key:"_experience",value:"true"}]:[]]}),t.adultVariantId&&t.adults>0&&r.push({merchandiseId:B("ProductVariant",t.adultVariantId),quantity:t.adults,attributes:[{key:"_adult_ticket",value:"true"},...j?[{key:"_experience",value:"true"}]:[]]}),Object.keys(L).forEach(n=>{const m=L[n];m>0&&r.push({merchandiseId:B("ProductVariant",n),quantity:m,attributes:[{key:"_addon",value:"true"}]})});const b=[];h&&b.push({key:"ttclid",value:h}),S&&b.push({key:"sprout_txid",value:S});const C=[{key:"origin",value:window.location.origin},{key:"purchase_flow",value:"ResumedCheckout"},{key:"is_member",value:V?"true":"false"},{key:"reservation_request_token",value:t.token},{key:"resumed_abandoned_checkout",value:"true"},...ce(le({activity:t.activity,createdAt:t.createdAt,adults:t.adults,children:t.children})),...b];V&&((l=c==null?void 0:c.membershipVersion)!=null&&l.value)&&C.push({key:"membership_version",value:c.membershipVersion.value});const z=C.filter(n=>n.value!==""),D=await de(x,g,{lines:r,attributes:z});window.location.href=D.checkoutUrl}catch(r){console.error(r),d("There was an error creating your cart. Please try again."),_(!1)}};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-serif text-2xl md:text-4xl text-green-dark-500 mb-2",children:"Welcome Back!"}),e.jsx("p",{className:"text-lg text-green-dark-500/70 text-pretty",children:"We saved your cart. Ready to complete your booking?"})]}),e.jsxs("div",{className:"bg-cream-100 rounded-xl p-6 space-y-6 max-w-2xl mx-auto",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"font-serif text-xl text-green-dark-500",children:u.activityType.name}),e.jsxs("div",{className:"space-y-2 text-green-dark-500/80",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold",children:"Location:"})," ",u.location.name]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold",children:"Date:"})," ",ue(u.startsAt)]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold",children:"Time:"})," ",me(u.startsAt,u.location.timezone,"h:mma")]})]})]}),e.jsxs("div",{className:"border-t border-green-dark-500/20 pt-4 space-y-3",children:[e.jsx("h3",{className:"font-semibold text-green-dark-500",children:"Your Tickets"}),t.children>0&&e.jsx("div",{className:"text-green-dark-500/80",children:e.jsxs("span",{children:[t.children,"x"," ",u.childrenEnabled?"Kid Ticket":"Ticket",t.children>1?"s":""]})}),t.adults>0&&u.adultsEnabled&&e.jsx("div",{className:"text-green-dark-500/80",children:e.jsxs("span",{children:[t.adults,"x Adult Ticket",t.adults>1?"s":""]})}),(U=t.reservationRequestTicketBundles)==null?void 0:U.map(i=>{var m,v,N,p,k;const l=i.quantity*(((m=i.ticketBundle)==null?void 0:m.ticketQuantity)??1),r=(v=u.ticketBundleTicketPrices)==null?void 0:v.find(a=>a.ticketBundleId===i.ticketBundleId),j=(r==null?void 0:r.price)??0,b=((N=i.ticketBundle)==null?void 0:N.ticketQuantity)??1,C=$(r??{}),D=F(j,C)/100*b*i.quantity,n=((p=i.reservationRequestTicketBundleAddons)==null?void 0:p.filter(a=>a.quantity>0&&a.productVariant))??[];return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-green-dark-500/80",children:[e.jsxs("span",{children:[l,"x ",((k=i.ticketBundle)==null?void 0:k.name)??"Bundle"," ","Ticket",l>1?"s":""]}),e.jsx("span",{children:I(D)})]}),n.length>0&&e.jsx("div",{className:"ml-4 space-y-1",children:n.map(a=>{var f,E,W,Y,O,Q;const o=H(a.ticketBundleAddonSlot.name),T=Math.round((((f=a.productVariant)==null?void 0:f.price)??0)*100),A=(o?T:F(T,K(r??{},(E=i.ticketBundle)==null?void 0:E.applyAddonDiscount)))/100*a.quantity;return e.jsxs("div",{className:"flex justify-between text-green-dark-500/60 text-sm",children:[e.jsxs("span",{children:[a.quantity,"x"," ",((Y=(W=a.productVariant)==null?void 0:W.product)==null?void 0:Y.title)??"Add-on",((O=a.productVariant)==null?void 0:O.title)!=="Default Title"&&` - ${(Q=a.productVariant)==null?void 0:Q.title}`]}),e.jsx("span",{children:I(A)})]},a.ticketBundleAddonSlot.id)})})]},i.ticketBundleId)})]}),!s||s.length===0?null:e.jsxs("div",{className:"border-t border-green-dark-500/20 pt-4 space-y-3",children:[e.jsx("h3",{className:"font-semibold text-green-dark-500",children:"Your Add-ons"}),s.map(i=>{var l;return e.jsxs("div",{className:"flex justify-between text-green-dark-500/80",children:[e.jsxs("span",{children:[i.quantity,"x ",((l=i.variant.product)==null?void 0:l.title)??"Add-on",i.variant.title!=="Default Title"&&` - ${i.variant.title}`]}),e.jsx("span",{children:I((i.variant.price??0)*i.quantity)})]},i.variant.checkoutId)})]}),e.jsx("div",{className:"border-t border-green-dark-500/20 pt-4",children:e.jsx("p",{className:"text-sm text-green-dark-500/70 text-center",children:"You'll see the full price breakdown at checkout."})})]}),e.jsxs("div",{className:"flex flex-col items-center space-y-4 max-w-md mx-auto",children:[e.jsx(y,{onClick:X,size:"large",full:!0,disabled:P,children:P?e.jsx(te,{className:"h-6 w-6 animate-spin"}):"Continue to Checkout"}),e.jsx("p",{className:"text-sm text-green-dark-500/60 text-center",children:"You'll be redirected to complete your payment."})]})]})};export{Ge as ErrorBoundary,$e as default};
2//# sourceMappingURL=_page_without_header.resume._reservation_request_token-ue59_o6y.js.map

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.