1"use strict";(globalThis.webpackChunkgolfnow_web||=[]).push([[2388,91645],{91645(e,t,l){l.d(t,{G_:()=>b,ah:()=>p,bk:()=>g,pM:()=>w,x9:()=>m});var a=l(18875),n=l(99301),r=l(10810),i=l(79162),u=l(2388);let o=async e=>{let{loadLoginPartial:t}=await Promise.all([l.e(37697),l.e(32287),l.e(51244)]).then(l.bind(l,51244));return t(e)},s=!1,f=[],c=[],d=!1,v="navigation_BackStack",h="navigation_ForwardStack";function p(){window.history.go(-1)}function g(){window.onload=p,window.onpageshow=function(e){e.persisted&&p()},window.onpagehide=function(){}}function w(e,t){var l,a,r,i,u;if(d)return;let o={name:e,url:t};d=!0,0===(f=null!=(l=(0,n.IR)(v))?l:[]).length?f.unshift(o):(null==(a=f[0])?void 0:a.url)!==t&&f.unshift(o),o&&"/"!==o.url&&(0===(c=null!=(r=(0,n.IR)(h))?r:[]).length?c.unshift(o):(null==(i=c[0])?void 0:i.name)!==o.name&&(null==(u=c[0])?void 0:u.url)!==o.url&&c.unshift(o))}function m(e){if(""===e)return!1;let t=(0,u.useSiteMenuStore)(),{authenticated:l}=(0,r.bP)(t),n=e=>{document.location.href=e};if(l.value)return n(e),!0;let s=(0,a.s)(),{isRouteSecure:f,routeVerified:c}=(0,r.bP)(s);return(c.value?f.value:M(e))?((0,i.wN)("NavTo:Secure Route",e),o(e).then(e=>!0),!1):(n(e),!0)}function b(){let e=e=>{e.querySelectorAll("a[href]").forEach(e=>t(e))},t=e=>{"true"===e.dataset.secureBound||"true"!==e.dataset.bypassSecurity&&(e.dataset.secureBound="true",e.addEventListener("click",async e=>{let t=e.currentTarget,l=t.href;if(!l||isAuthenticated||new URL(t.href,document.location.href).origin!==document.location.origin)return;let a=new URL(l);if(("/account/login"===a.pathname.toLowerCase()||M(a.pathname))&&!isAuthenticated){e.preventDefault(),(0,i.wN)("HrefClickHandler:Secure Route",a.pathname),await o(a.pathname+a.search+a.hash);return}}))};e(document),new MutationObserver(l=>{var a;for(let n of l)for(let l of n.addedNodes)l instanceof HTMLElement&&((null==(a=l.matches)?void 0:a.call(l,"a[href]"))&&t(l),e(l))}).observe(document.body,{childList:!0,subtree:!0})}function M(e){let t=!1,l=e;if(0===e.indexOf("http")&&(l=new URL(e).pathname),"/"===l)return!1;let n=(0,a.s)(),{secureRoutes:i,isRouteSecure:u,routeVerified:o}=(0,r.bP)(n),s=l.split("/").filter(e=>void 0!==e&&""!==e);for(let e=0;e<i.value.length;e++){let l=i.value[e].split("/").filter(e=>void 0!==e&&""!==e&&-1===e.indexOf("?")),a=l.filter(e=>e.endsWith("?}")).length,n=l.length-a;if(!(s.length<n)&&!(s.length>l.length)&&s[0]===l[0]&&(s.every((e,a)=>{let n=l[a];if(n&&-1!==n.indexOf("{")){let t=n.substring(1,n.length-1);if((null==t?void 0:t.indexOf(":"))!==-1){let[l,a]=t.split(":");switch(a){case"int":case"int?":case"decimal":case"decimal?":if(isNaN(parseInt(e)))return!1;break;case"bool":if("true"!==e&&"false"!==e)return!1;break;default:return!1}}if((null==t?void 0:t.endsWith("?"))&&""===e)return!1}else if(n!==e)return!1;return a!==l.length-1||(t=!0,!1)}),t))break}return u.value=t,o.value=!0,t}document.addEventListener("pagehide",function(){f.length&&!s&&(0,n.ty)(v,f),c.length&&s&&(0,n.ty)(h,c),s=!1})},2388(e,t,l){let a,n;var r=l(10810),i=l(6934),u=l(1098),o=l(99301),s=l(53049),f=l(84430),c=l(88398);let d="GolfNow.CreditsAvailable",v="GolfNow.RewardsAvailable",h="GolfNow.PendingRequests",p=()=>null!=a?a:a=Promise.all([l.e(37697),l.e(32287)]).then(l.bind(l,32287)).then(({default:e})=>new e),g=(0,r.nY)("siteMenu",()=>{var e,t,a,r,g,w,m,b,M;let y=null!=(e=(0,o.IR)(v))?e:"0",A=null!=(t=(0,o.IR)(d))?t:"0",P=(0,i.ref)(isAuthenticated),S=(0,i.ref)(null!=utype?utype:""),R=(0,i.ref)(0),k=(0,i.ref)(null!=(a=null==siteAppVM?void 0:siteAppVM.customerId)?a:""),I=(0,i.ref)(null!=(r=null==siteAppVM?void 0:siteAppVM.firstName)?r:""),C=(0,i.ref)(null!=(g=null==siteAppVM?void 0:siteAppVM.lastName)?g:""),N=(0,i.ref)(""),V=(0,i.ref)(null!=(w=null==siteAppVM?void 0:siteAppVM.profileId)?w:""),L=(0,i.ref)(null!=(m=null==autoLoginProps?void 0:autoLoginProps.profilePicUrl)?m:""),U=(0,i.ref)(""),E=(0,i.ref)(""),H=(0,i.ref)(""),q=(0,i.ref)(""),G=(0,i.ref)(null!=(b=null==siteAppVM?void 0:siteAppVM.gaPhotoRootUrl)?b:""),T=(0,i.ref)(null!=(M=null==siteAppVM?void 0:siteAppVM.profilePicUrl)?M:""),_=(0,i.ref)(Math.floor(100*Math.random())),x=(0,i.ref)(Math.floor(100*Math.random())),B=(0,i.ref)(!1),O=(0,i.ref)(!1),W=(0,i.ref)(""),j=(0,i.ref)(parseInt(y)),z=(0,i.ref)(parseInt(A)),D=(0,i.ref)(!(0,u.zE)()),F=(0,i.ref)(0),K=(0,i.ref)(0),Y=(0,i.ref)(null),J=(0,i.ref)(null),Q=(0,i.computed)(()=>""!==q.value),X=(0,i.computed)(()=>N.value?N.value.toUpperCase():I.value&&C.value?(I.value.substring(0,1)+C.value.substring(0,1)).toUpperCase():""),Z=(0,i.computed)(()=>""!==X.value);return{avatarPath:function(e){let t="";switch(e){case"profile":t=T.value;break;case"facility":t=G.value;break;case"facility-default":t="/images/";break;case"rewards":t="/images/social/"}return Q?E.value=t+q.value:Z||(E.value="/images/social/profile-pic-default.png"),E.value},handleAvatarChange:function(e,t){"profile"===H.value&&R.value===t&&(q.value=e,E.value=T.value+e,_.value+=1)},getCustomerRewards:async function e(){let[e,{CreditsRequest:t}]=await Promise.all([p(),l.e(74651).then(l.bind(l,74651))]),a=e.getCustomerRewardsCredits(new t,!0),n=e.getCustomerRewardsProfile(),r=await Promise.allSettled([a,n]),i=0,u=0,f=[],h;null==r||r.forEach((e,t)=>{if("rejected"===e.status){let{handleRequestError:t}=(0,s.r)();t(e.reason)}else switch(t){case 0:(f=e.value)&&f.length>0&&(i=f.length);break;case 1:(null==(h=e.value)?void 0:h.rewardsAvailable)&&(u=h.rewardsAvailable)}}),(0,o.HI)(d,i,c.b.MINUTES_30),(0,o.HI)(v,u,c.b.MINUTES_30),F.value=u+i},getPendingSocialRequests:async function e(){try{let e=await (null!=n?n:n=l.e(63076).then(l.bind(l,63076)).then(({default:e})=>new e)),t=await e.getMyPendingRequests();K.value=t,(0,o.HI)(h,t)}catch(t){let{handleRequestError:e}=(0,s.r)();e(t)}},clearPendingSocialRequests:function(){(0,o.HI)(h,null),(0,f.Mr)("pending-social-requests-cleared")},getCustomerBenefitsSummary:async function(){try{let e=await p(),t=await e.getCustomerBenefitsSummary();return Y.value=t,t}catch(t){let{handleRequestError:e}=(0,s.r)();return e(t),null}},getGolfPassSavings:async function(){try{let e=await p(),t=await e.getGolfPassSavings();return J.value=t,t}catch(t){let{handleRequestError:e}=(0,s.r)();return e(t),null}},generateKey:()=>Math.floor(100*Math.random()),loginDrawerKey:x,canLinkProfile:(0,i.computed)(()=>"profile"===H.value&&(R.value>0||""!==k.value)),hasInitials:Z,getInitials:X,hasAvatarPic:Q,profileId:R,customerId:k,firstName:I,lastName:C,initials:N,profileUrl:V,profilePicUrl:L,homepageUrl:U,avatarFileName:E,avatarType:H,avatarPic:q,gaPhotoRootUrl:G,avatarUrl:T,componentKey:_,isGPMember:B,isGPPMember:O,subscriptionProductId:W,rewardsAvailable:j,creditsAvailable:z,isMobile:D,rewardsBadgeCount:F,myPendingRequests:K,customerBenefitsSummary:Y,golfPassSavings:J,authenticated:P,userType:S}});l.d(t,["useSiteMenuStore",0,g])}}]);
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.