PageSourceSearch

https://www.exploremaricopacountyparks.org/_next/static/chunks/4098-46d8ac9b045c6b8f.js

js exploremaricopacountyparks.org collected 2026-10-10 01:02:15 UTC 11,479 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4098,9244],{44098:(e,t,n)=>{n.d(t,{RU:()=>g,Ub:()=>v});var r=n(78488),l=n(48339),i=n(60461),a=n(23110),s=n(72848),o=n(5958),d=n(81204),c=n(72788),u=n(49191),p=n(90911),h=n(58993),y=n(10427),f=n(54672);let m=[c.QLU.StripeManualEntry],v=[c.QLU.StripeTerminal,c.QLU.StripeManualEntry],x="UNSAVED_ACH",S=[{id:void 0,type:c.QLU.StripeTerminal},{id:void 0,type:c.QLU.Cash},{id:void 0,type:c.QLU.Check}];function g(e){var t;let{purchasingUserId:n,selectedPaymentMethodOption:g,onPaymentMethodOptionChange:b,isRobo:A=!1,availablePaymentMethods:C,allowStripeManualEntryWithoutSavedMethod:L=!1,allowAchWithoutSavedMethod:j=!1,showAddSavedPaymentMethodButton:U=!0,paymentMethodsRefreshKey:k=0}=e,[Q,E]=(0,d.useState)(!1),M=()=>E(!0),[_,P]=(0,d.useState)([]),I=C||(A?[...v,c.QLU.Cash,c.QLU.Check]:m),w=S.find(e=>null==I?void 0:I.includes(e.type)),N=(0,d.useRef)(g);N.current=g;let B=(0,d.useCallback)(e=>(null==e?void 0:e.type)===c.QLU.StripeManualEntry&&!e.id&&(e.usingAch?j:L),[j,L]),F=(0,d.useCallback)(e=>{var t,n,r;let l=N.current,i=null!=(r=null==(n=e.retrievePaymentMethods)||null==(t=n.paymentMethods)?void 0:t.toSorted((e,t)=>t.created-e.created))?r:[];if(P(null!=i?i:[]),i.length>0){if((null==l?void 0:l.type)===c.QLU.Cash||(null==l?void 0:l.type)===c.QLU.Check||(null==l?void 0:l.type)===c.QLU.StripeTerminal)return;if((null==l?void 0:l.type)===c.QLU.StripeManualEntry){if(B(l))return;let e=i.find(e=>e.id===l.id);return e?void b({id:e.id,type:c.QLU.StripeManualEntry,usingAch:"Bank Account"===e.type}):void b({id:i[0].id,type:c.QLU.StripeManualEntry,usingAch:"Bank Account"===i[0].type})}return void b({id:i[0].id,type:c.QLU.StripeManualEntry,usingAch:"Bank Account"===i[0].type})}if(!B(l)){if((null==l?void 0:l.type)===c.QLU.Cash||(null==l?void 0:l.type)===c.QLU.Check)return void b(l);w&&b(w)}},[j,L,w,b,B]),T=(0,u.Z5)(),{loadingPaymentMethods:z,refetchPaymentMethods:D}=(0,p.t)(null!=n?n:"",T.organizationID,F);(0,d.useEffect)(()=>{g||z||!w||b(w)},[g,b,w,z]),(0,d.useEffect)(()=>{k>0&&n&&D()},[k]);let H=async(e,t)=>{n?await D():P(t=>{var n,r,l,i,a,s,o,d,c,u,p,h;return[...t,{id:e.id,type:(null==e?void 0:e.card)?"Card":"Bank Account",last4:null!=(o=null==(n=e.card)?void 0:n.last4)?o:"",exp_month:null!=(d=null==(r=e.card)?void 0:r.exp_month)?d:0,exp_year:null!=(c=null==(l=e.card)?void 0:l.exp_year)?c:0,created:new Date().getTime(),brand:null!=(u=null==(i=e.card)?void 0:i.brand)?u:"",country:null!=(p=null==(a=e.card)?void 0:a.country)?p:"",funding:null!=(h=null==(s=e.card)?void 0:s.funding)?h:""}]}),b({type:c.QLU.StripeManualEntry,id:e.id,customerId:t,usingAch:"us_bank_account"===e.type})};if(z&&0===_.length)return(0,r.jsx)(y.A,{fullScreen:!1});let O=g?g.type===c.QLU.StripeManualEntry?null!=(t=g.id)?t:g.usingAch?x:c.QLU.StripeManualEntry:g.type:null==w?void 0:w.type,Y=I.some(e=>[c.QLU.Cash,c.QLU.Check,c.QLU.StripeTerminal].includes(e))||_.length>0||j||L;return(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[Y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.A,{value:null!=O?O:null,onChange:e=>{let t=e.target.value;if(t===c.QLU.Cash||t===c.QLU.Check||t===c.QLU.StripeTerminal)b({id:void 0,type:t});else if(t===x)b({type:c.QLU.StripeManualEntry,usingAch:!0});else if(t===c.QLU.StripeManualEntry)b({type:c.QLU.StripeManualEntry,usingAch:!1});else{let e=_.find(e=>e.id===t);b({id:t,type:c.QLU.StripeManualEntry,usingAch:(null==e?void 0:e.type)==="Bank Account"})}},className:"flex flex-col gap-3",children:[I.includes(c.QLU.StripeManualEntry)&&(null==_?void 0:_.map(e=>(0,r.jsx)(s.A,{value:e.id,control:(0,r.jsx)(o.A,{}),label:(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(l.EY.BodySmall,{children:(0,h.kt)(e)}),e.exp_month&&e.exp_year&&(0,r.jsx)(l.EY.BodySmall,{className:"text-secondary",children:(0,h.q1)(e)})]})},e.id))),L&&I.includes(c.QLU.StripeManualEntry)&&(0,r.jsx)(s.A,{value:c.QLU.StripeManualEntry,control:(0,r.jsx)(o.A,{}),label:"Pay by credit card"}),j&&I.includes(c.QLU.StripeManualEntry)&&(0,r.jsx)(s.A,{value:x,control:(0,r.jsx)(o.A,{}),label:"Pay by ACH"}),I.includes(c.QLU.StripeTerminal)&&(0,r.jsx)(s.A,{value:c.QLU.StripeTerminal,control:(0,r.jsx)(o.A,{}),label:"Pay at card reader"}),I.includes(c.QLU.Cash)&&(0,r.jsx)(s.A,{value:c.QLU.Cash,control:(0,r.jsx)(o.A,{}),label:"Pay with cash"}),I.includes(c.QLU.Check)&&(0,r.jsx)(s.A,{value:c.QLU.Check,control:(0,r.jsx)(o.A,{}),label:"Pay with check"})]}),U?(0,r.jsxs)(l.$n.Tertiary,{onClick:M,className:"self-start px-0",children:[(0,r.jsx)(i.A,{className:"mr-1",fontSize:"small"}),"Add a different payment method"]}):null]}):U?(0,r.jsxs)(l.$n.Tertiary,{onClick:M,className:"self-start px-0",children:[(0,r.jsx)(i.A,{className:"mr-1",fontSize:"small"}),"Add a payment method"]}):null,Q&&(0,r.jsx)(f.f,{userId:n,onClose:()=>E(!1),onAddPaymentMethod:H})]})}}
1,54672:(e,t,n)=>{n.d(t,{f:()=>x});var r=n(78488),l=n(48339),i=n(81204),a=n(63378),s=n(23268),o=n(57179),d=n(25268),c=n(61733),u=n(69180),p=n(60455),h=n(24846);let y=e=>{let{renderButtons:t,onSuccess:n,onError:l,customerId:a}=e,s=(0,d.t2)(),c=(0,d.HH)(),[u,p]=i.useState(!1),y=async()=>{if(s&&c){if((await c.submit()).error)return;p(!0);let e=await s.confirmSetup({elements:c,redirect:"if_required",confirmParams:{expand:["payment_method"]}});p(!1),e.error?(h.A.error("Error result confirming Stripe setup intent",e.error),l(e.error)):n(e.setupIntent.payment_method,a)}};return(0,r.jsxs)("div",{children:[(0,r.jsx)(d.He,{}),u?(0,r.jsx)("div",{className:"flex items-center justify-center pt-4",children:(0,r.jsx)(o.A,{className:"text-brand-primary"})}):t(y)]})},f=e=>{let t=(0,u.I)({email:"",name:"",id:void 0});return t.clientSecret?(0,r.jsx)(d.S8,{stripe:p.A.stripe,options:{clientSecret:t.clientSecret,fonts:c.l,appearance:c.$,loader:"always"},children:(0,r.jsx)(y,{...e,customerId:t.customerId})}):null},m=e=>{let t=(0,u.O)(e.userId);return t.clientSecret?(0,r.jsx)(d.S8,{stripe:p.A.stripe,options:{clientSecret:t.clientSecret,fonts:c.l,appearance:c.$,loader:"always"},children:(0,r.jsx)(y,{...e,customerId:t.customerId})}):null},v=e=>Object.hasOwn(e,"userId")&&e.userId?(0,r.jsx)(m,{...e}):(0,r.jsx)(f,{...e}),x=e=>{let{userId:t,onClose:n,onAddPaymentMethod:i}=e,o=(0,s.o)(),d=(0,a.qN)();return(0,r.jsx)(l.lG,{open:!0,onClose:n,maxWidth:"sm",fullWidth:!0,fullScreen:o,headerProps:{title:"Add payment details",onClose:n},scroll:"paper",children:(0,r.jsx)("div",{className:"pt-4",children:(0,r.jsx)(v,{userId:t,onSuccess:(e,t)=>{i(e,t),n()},onError:()=>{d("Error saving payment details")},renderButtons:e=>(0,r.jsxs)("div",{className:"flex flex-row justify-end gap-2 pt-6",children:[(0,r.jsx)(l.$n.Secondary,{onClick:n,children:"Cancel"}),(0,r.jsx)(l.$n.Primary,{onClick:e,children:"Save"})]})})})})}},58993:(e,t,n)=>{n.d(t,{BI:()=>a,JY:()=>s,Ri:()=>c,kt:()=>o,q1:()=>d});var r=n(19252),l=n.n(r),i=n(88);function a(e,t){return(function(e){let t=l()(e,e=>e.created,"desc"),n=new Set;return t.reduce((e,t)=>(t.fingerprint&&n.has(t.fingerprint)||(n.add(t.fingerprint),e.push(t)),e),[])})(e).find(e=>e.fingerprint===t)}function s(e){if(!e.exp_month||!e.exp_year)return!1;let{exp_month:t,exp_year:n}=e;return i.c9.local().endOf("month")>i.c9.local(n,t).endOf("month")}let o=e=>"".concat(e.type," ending in ").concat(e.last4);function d(e){return"Expires ".concat(e.exp_month,"/").concat(e.exp_year)}let c=e=>"https://dashboard.stripe.com/customers/".concat(e)},60455:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(64392),l=n(64564),i=n(79244);class a{static resetLoadState(){this.loadConfig=void 0,this.stripePromise=void 0}static buildLoadConfig(){let{isExpress:e,connectedAccountId:t}=(0,i.W)();return{publishableKey:"production"===l.A.NEXT_PUBLIC_ENV?"pk_live_51KzVbmHkf43okG7XPqZz19MKJtlSoZYwYx40cmSbeyAeZZBO7VHlJBnj2HqnuUjZ7blvJjUd97lg4ge3wviqzypJ00b1B8I96F":"pk_test_51KzVbmHkf43okG7XBtt1izgPZezaci4nw3PA6OAHIkfx76q3ParKLl6FCQ9zx3Ek4jVpLoYowefLR5Sng4Wth42u00Tb2fgnT8",options:{stripeAccount:e?void 0:t,developerTools:{assistant:{enabled:!1}}}}}static ensureLoadConfig(){let e=this.buildLoadConfig();return this.loadConfig&&this.loadConfig.publishableKey===e.publishableKey&&this.loadConfig.options.stripeAccount===e.options.stripeAccount||(this.loadConfig=e,this.stripePromise=void 0),this.loadConfig}static get stripe(){let e=this.ensureLoadConfig();return this.stripePromise||(this.instance=new a,this.stripePromise=(0,r.c)(e.publishableKey,e.options)),this.stripePromise}constructor(){a.instance=this}}(0,i.Y)(()=>{a.resetLoadState()});let s=a},61733:(e,t,n)=>{n.d(t,{$:()=>l,l:()=>r});let r=[{cssSrc:"/fonts/dm-sans/dm-sans.css"}],l={theme:"stripe",labels:"above",variables:{colorPrimary:"#164F63",colorBackground:"#FFFFFF",colorText:"#30313d",colorDanger:"#df1b41",fontFamily:"DM Sans, 'DM Sans Fallback', Ideal Sans, sans-serif",borderRadius:"4px",focusBoxShadow:"0 0 0 1px #FFF, 0 0 0 3px var(--colorPrimary)"},rules:{".Input":{boxShadow:"none",borderColor:"#D4D4D4"}}}},69180:(e,t,n)=>{n.d(t,{I:()=>c,O:()=>d});var r=n(81204),l=n(60766),i=n(72788),a=n(68513),s=n(54972),o=n(48113);function d(e){let{data:t}=(0,i.Ev_)({variables:{user_id:e},fetchPolicy:"network-only",skip:!e}),n=null==t?void 0:t.users[0];return c(n?{email:n.email,name:(0,o.G)(n)||n.email,id:n.id}:void 0)}function c(e){let t=(0,l.d4)(a.Cf),[i,o]=(0,r.useState)(),[d,c]=(0,r.useState)(),[u,p]=(0,r.useState)(),[h,y]=(0,r.useState)(!1);return(0,r.useEffect)(()=>
1{if(!e||i&&d&&u||h)return;let r=!e.id,{name:l,email:a,id:f}=e;n.g.console.log("Create setup intent for...",{organizationId:t,userId:f,name:l,email:a,guestCheckout:r}),y(!0),(0,s.Ir)(t,l,a,r,f).then(e=>{var t,n,r;o((null==e||null==(t=e.createReservationSetupIntent)?void 0:t.client_secret)||void 0),c((null==e||null==(n=e.createReservationSetupIntent)?void 0:n.customer_id)||void 0),p((null==e||null==(r=e.createReservationSetupIntent)?void 0:r.setup_intent_id)||void 0)}).catch(e=>{n.g.console.error(e),y(!1)}).finally(()=>{y(!1)})},[null==e?void 0:e.id,null==e?void 0:e.email,null==e?void 0:e.name,t]),{clientSecret:i,customerId:d,setupIntentId:u}}},79244:(e,t,n)=>{let r,l;n.d(t,{W:()=>o,Y:()=>a,initStripeOrgConfig:()=>s});var i=n(3935);function a(e){l=e}function s(e){var t,n;let a={isExpress:null!=(t=i.JW.parse(e.settings).stripeExpressAccountEnabled)&&t,connectedAccountId:null!=(n=e.stripe_connect_account_id)?n:void 0},s=!r||r.isExpress!==a.isExpress||r.connectedAccountId!==a.connectedAccountId;r=a,s&&(null==l||l())}function o(){if(!r)throw Error("initStripeOrgConfig must be called before using StripeService");return r}},90911:(e,t,n)=>{n.d(t,{t:()=>o});var r=n(81204),l=n(72788),i=n(65382),a=n(58993),s=n(45005);function o(e,t,n){var o;let d=(0,s.D)(),c=(0,r.useCallback)(e=>d&&e.retrievePaymentMethods?{...e,retrievePaymentMethods:{...e.retrievePaymentMethods,paymentMethods:e.retrievePaymentMethods.paymentMethods.filter(e=>!i.fG.includes(e.type))}}:e,[d]),u=(0,r.useCallback)(e=>null==n?void 0:n(c(e)),[n,c]),{data:p,refetch:h,loading:y}=(0,l.WQX)({skip:!e,variables:{user_id:e||"",organization_id:t},fetchPolicy:"network-only",onCompleted:u}),f=(0,r.useMemo)(()=>p&&c(p),[p,c]),m=(0,r.useCallback)(async()=>{var e;let{data:t}=await h();return u(t),{data:{retrievePaymentMethods:{paymentMethods:null==f||null==(e=f.retrievePaymentMethods)?void 0:e.paymentMethods}},loading:y}},[h,u,y,f]),v=(null==f||null==(o=f.retrievePaymentMethods)?void 0:o.paymentMethods)||[],x=v.filter(e=>!(0,a.JY)(e));return{paymentMethods:v,activePaymentMethods:x,refetchPaymentMethods:m,loadingPaymentMethods:y}}}}]);

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.