1"use strict";(globalThis.webpackChunkgolftec_clubhouse_web||=[]).push([[7768],{32289(e,t,n){var r,a=n(65043);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function s(e,t){let{title:n,titleId:s,...l}=e;return a.createElement("svg",i({width:6,height:10,viewBox:"0 0 6 10",fill:"",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":s},l),n?a.createElement("title",{id:s},n):null,r||(r=a.createElement("path",{d:"M0.721749 1.87921L3.66805 5.0042L0.721748 8.12918C0.651445 8.20375 0.595679 8.29227 0.557631 8.38969C0.519583 8.48712 0.5 8.59154 0.5 8.69699C0.5 8.80244 0.519583 8.90686 0.557631 9.00429C0.595678 9.10172 0.651445 9.19024 0.721748 9.2648C0.792051 9.33937 0.875512 9.39852 0.967367 9.43887C1.05922 9.47923 1.15767 9.5 1.25709 9.5C1.35652 9.5 1.45497 9.47923 1.54682 9.43887C1.63868 9.39852 1.72214 9.33937 1.79244 9.2648L5.27789 5.56798C5.57404 5.25387 5.57404 4.74647 5.27789 4.43236L1.79244 0.735536C1.72219 0.660872 1.63875 0.601636 1.54688 0.561219C1.45502 0.520804 1.35655 0.499999 1.2571 0.499999C1.15764 0.499999 1.05917 0.520804 0.967306 0.561219C0.875444 0.601636 0.792 0.660872 0.721749 0.735536C0.433193 1.04965 0.4256 1.5651 0.721749 1.87921Z",fill:""})))}const l=a.forwardRef(s);n.p;n.d(t,["h",0,l])},55478(e,t,n){n.r(t),n.d(t,{default:()=>T});var r,a,i=n(30834),s=n(26431),l=n(85522),o=n(98151),c=n(67918),d=n(38028),u=n(37495),p=n(74710),h=n(3952),x=n(71847),g=n(87244),f=n(41918),m=n(89842),v=n(65043),_=n(97),C=n(44116),w=n(96045),b=n(32289),j=n(25016),E=n(29424),S=n(75593),A=n(34724),N=n(82069);function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(null,arguments)}function F(e,t){let{title:n,titleId:i,...s}=e;return v.createElement("svg",y({width:16,height:17,viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":i},s),n?v.createElement("title",{id:i},n):null,r||(r=v.createElement("g",{clipPath:"url(#clip0_6994_10304)"},v.createElement("path",{d:"M7.99984 15.8554C3.95317 15.8554 0.666504 12.5687 0.666504 8.52205C0.666504 4.47539 3.95317 1.18872 7.99984 1.18872C12.0465 1.18872 15.3332 4.47539 15.3332 8.52205C15.3332 12.5687 12.0465 15.8554 7.99984 15.8554ZM7.99984 2.52205C4.69317 2.52205 1.99984 5.21539 1.99984 8.52205C1.99984 11.8287 4.69317 14.5221 7.99984 14.5221C11.3065 14.5221 13.9998 11.8287 13.9998 8.52205C13.9998 5.21539 11.3065 2.52205 7.99984 2.52205Z",fill:"#54565B"}),v.createElement("path",{d:"M7.99984 11.8554C7.63317 11.8554 7.33317 11.5554 7.33317 11.1887V9.18872H5.33317C4.9665 9.18872 4.6665 8.88872 4.6665 8.52205C4.6665 8.15539 4.9665 7.85539 5.33317 7.85539H7.33317V5.85539C7.33317 5.48872 7.63317 5.18872 7.99984 5.18872C8.3665 5.18872 8.6665 5.48872 8.6665 5.85539V7.85539H10.6665C11.0332 7.85539 11.3332 8.15539 11.3332 8.52205C11.3332 8.88872 11.0332 9.18872 10.6665 9.18872H8.6665V11.1887C8.6665 11.5554 8.3665 11.8554 7.99984 11.8554Z",fill:"#54565B"}))),a||(a=v.createElement("defs",null,v.createElement("clipPath",{id:"clip0_6994_10304"},v.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0 0.522095)"})))))}const z=v.forwardRef(F);n.p;var I=n(24247),M=n(50424),k=n(52355),R=n(50496),q=n(77866),B=n(33747),D=n(68823),H=n(70579);const O=(0,m.Ay)(()=>n.e(1013).then(()=>n(1013))),T=e=>{var t,n;let{status:r,setCard:a,createCard:m,cardSaved:y,setCardSaved:F}=e;const T=(0,_.A)(),V=(0,C.N)(I.eL),W=(0,C.N)(I.gp),[$,Z]=(0,v.useState)(!1),L=(0,C.N)(D.dL),P=(0,C.N)(D.nB),U=(0,C.N)(I.c7),X=(0,v.useMemo)(()=>{var e;return V&&V.items&&(null===(e=V.items)||void 0===e?void 0:e.find(e=>{var t,n;return null===e||void 0===e||null===(t=e.product)||void 0===t||null===(n=t.sku)||void 0===n?void 0:n.toUpperCase().match(M.ZC)}))},[V]),G=(0,v.useMemo)(()=>{var e,t;return!(0===(null===V||void 0===V||null===(e=V.prices)||void 0===e||null===(t=e.grand_total)||void 0===t?void 0:t.value)&&(X&&X.square_subscription_plan_options&&
1X.square_subscription_plan_options.hold_after_created||P&&!U))},[null===V||void 0===V||null===(t=V.prices)||void 0===t||null===(n=t.grand_total)||void 0===n?void 0:n.value,P,X,U]),J=(0,v.useCallback)(e=>{if(e.card_brand)switch(e.card_brand.toUpperCase()){case"AMERICAN_EXPRESS":return w.A;case"DISCOVER_DINERS":return E.A;case"DISCOVER":return S.A;case"JCB":return k.A;case"MASTERCARD":return R.A;case"VISA":return B.A;case"CHINA_UNIONPAY":return j.A;case"SQUARE_GIFT_CARD":return A.A;default:return q.A}return q.A},[]);return(0,v.useEffect)(()=>{if(!$){if(!y&&W&&W.square_saved_card&&W.square_saved_card.length>0){const e=W.square_saved_card.find(e=>e.last_4===(null===L||void 0===L?void 0:L.last4Digits));F(e||W.square_saved_card[0])}Z(!0)}},[y,W,$,L,F]),(0,H.jsxs)(i.T,{gap:"12px",width:"100%",alignItems:"flex-start",opacity:G?1:0,zIndex:G?"unset":-1,position:G?"static":"absolute",transition:"opacity 0.3s ease-in-out",sx:{"button[aria-expanded=false] .chakra-button__icon":{transform:"rotate(90deg)"},"button[aria-expanded=true] .chakra-button__icon":{transform:W&&W.square_saved_card&&W.square_saved_card.length>0?"rotate(-90deg)":"rotate(90deg)"},"button:active,button[data-active]":{background:"#FFF"}},marginBottom:y?"24px":"0px",children:[(0,H.jsx)(s.z,{gap:"16px",justifyContent:"space-between",children:(0,H.jsx)(l.az,{fontSize:17,lineHeight:"24px",letterSpacing:"0.25px",fontWeight:700,children:T.formatMessage({id:"CreditDebitCard"})})}),(0,H.jsxs)(o.W,{matchWidth:!0,children:[(0,H.jsx)(c.I,{as:d.$,rightIcon:(0,H.jsx)(b.h,{width:"14px",height:"14px"}),w:"100%",textAlign:"left",justifyContent:"space-between",rounded:12,border:"1px solid #E6E8EC",background:"#FFF",padding:"12px 16px",height:"auto",children:y?(0,H.jsx)(s.z,{justify:"space-between",w:"100%",gap:"16px",fontSize:17,lineHeight:"24px",fontWeight:600,color:"#36383E",height:"28px",children:(0,H.jsxs)(s.z,{gap:"16px",children:[(0,H.jsx)(u.o,{width:"36px",height:"24px",rounded:4,overflow:"hidden",children:(0,H.jsx)(p._,{src:J(y),width:"auto",height:"100%"})}),(0,H.jsx)(h.E,{children:`*** *** *** ${y.last_4}`})]})}):(0,H.jsxs)(s.z,{gap:"4px",fontSize:15,lineHeight:"22px",fontWeight:700,color:"#54565B",letterSpacing:"0.25px",height:"28px",children:[(0,H.jsx)(z,{}),(0,H.jsx)(h.E,{children:T.formatMessage({id:"AddNewCard"})})]})}),W&&W.square_saved_card&&W.square_saved_card.length>0&&(0,H.jsx)(x.c,{padding:"16px 12px",rounded:12,children:(0,H.jsxs)(i.T,{gap:"12px",width:"100%",alignItems:"flex-start",children:[(0,H.jsx)(l.az,{fontSize:12,lineHeight:"16px",letterSpacing:"0.25px",fontWeight:500,color:"#54565B",marginBottom:"4px",children:T.formatMessage({id:"SavedCard"})}),W.square_saved_card.map((e,t)=>(0,H.jsx)(g.D,{background:y&&y.last_4===e.last_4?"#F3F3F3":"#FFF",border:"1px solid #F3F3F3",padding:"11px 16px",
1width:"100%",rounded:8,fontSize:17,lineHeight:"24px",fontWeight:600,color:"#36383E",sx:{svg:{width:"22px",height:"22px"},path:{fill:"#36383E"}},onClick:()=>{F(e)},children:(0,H.jsxs)(s.z,{justify:"space-between",w:"100%",gap:"16px",children:[(0,H.jsxs)(s.z,{gap:"16px",children:[(0,H.jsx)(u.o,{width:"36px",height:"24px",rounded:4,overflow:"hidden",children:(0,H.jsx)(p._,{src:J(e),width:"auto",height:"100%"})}),(0,H.jsx)(h.E,{children:`*** *** *** ${e.last_4}`})]}),y&&y.last_4===e.last_4&&(0,H.jsx)(N.h,{})]})},t)),(0,H.jsx)(g.D,{padding:"12px 16px",width:"100%",rounded:8,fontSize:13,lineHeight:"18px",fontWeight:700,color:"#54565B",letterSpacing:"0.25px",sx:{svg:{width:"22px",height:"22px"},path:{fill:"#54565B"}},onClick:()=>{F(null)},children:(0,H.jsxs)(s.z,{gap:"4px",children:[(0,H.jsx)(z,{}),(0,H.jsx)(h.E,{children:T.formatMessage({id:"AddNewCard"})})]})})]})})]}),y&&(0,H.jsxs)(i.T,{gap:"4px",alignItems:"flex-start",width:"100%",children:[(0,H.jsx)(l.az,{fontSize:13,lineHeight:"18px",letterSpacing:"0.25px",color:"#8A8A8D",children:T.formatMessage({id:"ExpirationDate"})}),(0,H.jsx)(f.s,{height:"42px",border:"1px solid #E6E8EC",fontSize:15,lineHeight:"22px",color:"#36383E",padding:"0px 16px",alignItems:"center",background:"#EEEEEE",width:"100%",rounded:12,children:`${y.exp_month} / ${y.exp_year}`})]}),(0,H.jsx)(l.az,{opacity:y?0:1,zIndex:y?-1:"unset",position:y?"absolute":"static",width:"100%",transition:"opacity 0.3s ease-in-out",children:(0,H.jsx)(O,{status:r,setCard:a,createCard:m})})]})}},3952(e,t,n){n.d(t,{E:()=>d});var r=n(73761),a=n(14550),i=n(23226),s=n(36254),l=n(89254),o=n(45049),c=n(70579),d=(0,i.R)(function(e,t){const n=(0,r.Vl)("Text",e),{className:i,align:d,decoration:u,casing:p,...h}=(0,s.MN)(e),x=(0,o.o)({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return(0,c.jsx)(a.B.p,{ref:t,className:(0,l.cx)("chakra-text",e.className),...x,...h,__css:n})});d.displayName="Text"},90013(e,t,n){function r(e){const{wasSelected:t,enabled:n,isSelected:r,mode:a="unmount"}=e;return!n||(!!r||!("keepMounted"!==a||!t))}n.d(t,{q:()=>r})},87244(e,t,n){n.d(t,{D:()=>p});var r=n(98151),a=n(23226),i=n(14550),s=n(70579),l=(0,a.R)((e,t)=>{const n=(0,r.$)();return(0,s.jsx)(i.B.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});l.displayName="MenuCommand";var o=n(79074),c=n(76725),d=n(12920),u=n(89254),p=(0,a.R)((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:a,commandSpacing:i="0.75rem",children:p,...h}=e,x=(0,d.Os)(h,t),g=n||a?(0,s.jsx)("span",{style:{pointerEvents:"none",flex:1},children:p}):p;return(0,s.jsxs)(o.m,{...x,className:(0,u.cx)("chakra-menu__menuitem",x.className),children:[n&&(0,s.jsx)(c.Z,{fontSize:"0.8em",marginEnd:r,children:n}),g,a&&(0,s.jsx)(l,{marginStart:i,children:a})]})});p.displayName="MenuItem"},76725(e,t,n){n.d(t,{Z:()=>o});var r=n(98151),a=n(14550),i=n(89254),s=n(65043),l=n(70579),o=e=>{const{className:t,children:n,...o}=e,c=(0,r.$)(),d=s.Children.only(n),u=(0,s.isValidElement)(d)?(0,s.cloneElement)(d,{focusable:"false","aria-hidden":!0,className:(0,i.cx)("chakra-menu__icon",d.props.className)}):null,p=(0,i.cx)("chakra-menu__icon-wrapper",t);return(0,l.jsx)(a.B.span,{className:p,...o,__css:c.icon,children:u})};o.displayName="MenuIcon"},79074(e,t,n){n.d(t,{m:()=>o});var r=n(98151),a=n(14550),i=n(23226),s=n(65043),l=n(70579),o=(0,i.R)((e,t)=>{const{type:n,...i}=e,o=(0,r.$)(),c=i.as||n?null!=n?n:void 0:"button",d=(0,s.useMemo)(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return(0,l.jsx)(a.B.button,{ref:t,type:c,...i,__css:d})})},45049(e,t,n){function r(e){const t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}n.d(t,{o:()=>r})},69907(e,t,n){n.d(t,{v:()=>s});var r=n(65043),a=n(73100),i=n(55376);function s(e){const{isOpen:t,ref:n}=e,[s,l]=(0,r.useState)(t),[o,c]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o||(l(t),c(!0))},[t,o,s]),(0,a.M)(()=>n.current,"animationend",()=>{l(t)});return{present:!(!t&&!s),onComplete(){var e;const t=new((0,i.mD)(n.current).CustomEvent)("animationend",{bubbles:!0});null==(e=n.current)||e.dispatchEvent(t)}}}},31489(e,t,n){n.d(t,{X:()=>d,w:()=>p});var r=n(82941),a=n(24688),i=n(55376),s=n(73100),l=n(85739),o=n(35204),c=n(65043);function d(e,t){const{shouldFocus:n,visible:r,focusRef:s}
1=t,l=n&&!r;(0,o.w)(()=>{if(!l)return;if(function(e){const t=e.current;if(!t)return!1;const n=(0,i.bq)(t);return!!n&&!t.contains(n)&&!!(0,a.AO)(n)}(e))return;const t=(null==s?void 0:s.current)||e.current;let n;return t?(n=requestAnimationFrame(()=>{t.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(n)}):void 0},[l,e,s])}var u={preventScroll:!0,shouldFocus:!1};function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;const{focusRef:n,preventScroll:a,shouldFocus:i,visible:d}=t,p="current"in e?e.current:e;const h=i&&d,x=(0,c.useRef)(h),g=(0,c.useRef)(d);(0,l.U)(()=>{!g.current&&d&&(x.current=h),g.current=d},[d,h]);const f=(0,c.useCallback)(()=>{if(d&&p&&x.current&&(x.current=!1,!p.contains(document.activeElement)))if(null==n?void 0:n.current)requestAnimationFrame(()=>{var e;null==(e=n.current)||e.focus({preventScroll:a})});else{const e=(0,r.ep)(p);e.length>0&&requestAnimationFrame(()=>{e[0].focus({preventScroll:a})})}},[d,a,p,n]);(0,o.w)(()=>{f()},[f]),(0,s.M)(p,"transitionend",f)}}}]); 2//# sourceMappingURL=7768.0a5c0831.chunk.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.