PageSourceSearch

https://www.golfnow.com/dist/js/widget-type-ahead-course-results.9a6c4f94.chunk.js

js golfnow.com collected 2026-10-01 10:14:13 UTC 7,825 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkgolfnow_web||=[]).push([[46987],{60393(e,a,t){t.d(a,{cY:()=>R,XE:()=>g,pH:()=>f,PO:()=>p,Do:()=>y});var l=t(1467),r=t(79162),n=t(64019);async function u(){let e=(0,l.hR)();(0,l.rR)(e);try{let e=await (0,l.nv)(await (0,n.xX)());return(0,l.rR)(e),e}catch(a){return(0,r.SS)("Home search presentation date unavailable:",a),e}}let i=/search/i,o=new Set(["teetimes-teetimedetails","teetimes-teetimedetailsmemberpricing","courses-details"]),s=null,d=null,c=null;function v(e){var a,t;return null!=(t=null==(a=e.size.sections)?void 0:a.flatMap(e=>{var a,t;return null!=(t=null==(a=e.widgets)?void 0:a.flatMap(e=>{var a;return[e,...null!=(a=e.children)?a:[]]}))?t:[]}))?t:[]}function h(e){var a,t;return!!e&&(i.test(null!=(a=e.name)?a:"")||i.test(null!=(t=e.template)?t:""))}function m(e){return o.has(e.pageName)||v(e).some(h)}function p(e){s!==e&&(s=e,d=e.pageName.startsWith("home-")&&m(e)?u():null,c=null)}function f(){return null!=d?d:Promise.resolve((0,l.hR)())}async function g(){let e=s;if(!e||!m(e))return!1;null!=c||(c=(async()=>{let a=e.pageName.startsWith("home-")?await f():void 0,{setupSearch:l}=await Promise.all([t.e(38831),t.e(64281)]).then(t.bind(t,64281));return await l(v(e).some(e=>"_Search-Input-Big"===e.template||"SearchInputBig"===e.name),a),!0})());try{return await c}catch(e){throw c=null,e}}async function y(e){return p(e),g()}function R(e,a=document){if(!e.pageName.startsWith("home-")||!m(e))return!1;let t=!1,l=()=>{t||(t=!0,a.removeEventListener("focusin",l,!0),a.removeEventListener("pointerdown",l,!0),g().catch(r.SS))};return a.addEventListener("focusin",l,!0),a.addEventListener("pointerdown",l,!0),!0}},62491(e,a,t){var l=t(10810),r=t(6934),n=t(11300),u=t(1467),i=t(18875),o=t(86992);let s=null,d=(0,l.nY)("typeAheadSearch",()=>{let e=(0,r.KR)(5),a=(0,r.KR)(3),t=(0,r.KR)(!0),l=(0,r.KR)("Search"),d=(0,r.KR)("No results found.  Please try another search."),c=(0,r.KR)(3),v=(0,r.KR)(""),h=(0,r.KR)(""),m=(0,r.KR)(""),p=(0,r.KR)(""),f=(0,r.KR)(!1),g=(0,r.KR)(!1),y=(0,r.KR)(!1),R=(0,r.KR)(!1),K=(0,r.KR)(!1),b=(0,r.KR)(!1),S=(0,r.KR)(!1),w=(0,r.KR)(!1),C=(0,r.KR)(0),E=(0,r.KR)(0),x=(0,r.KR)({}),k=(0,r.KR)([]),L=(0,r.KR)([]),I=(0,r.KR)([]),M=(0,r.KR)([]),N=(0,r.KR)([]),P=(0,r.KR)([]),W=(0,r.KR)([]),A=(0,r.KR)([]),T=(0,r.KR)(""),_=(0,r.KR)([]),D=(0,r.KR)({}),F=(0,r.KR)({}),X=(0,r.KR)(""),O=(0,r.KR)(!1);async function j(e){D.value=Object.assign(Object.assign({},D.value),e),await (0,r.dY)()}async function B(){let e=(0,o.getPageLocationCoordinator)();if(!e)throw Error("saveChangedLocation: location coordinator is not initialized");let a=F.value,t={Latitude:a.Latitude,Longitude:a.Longitude,City:a.City,State:a.State,Country:a.Country,PostalCode:a.PostalCode};a.Formatted_Address&&(t.Address=a.Formatted_Address,t.Address2=a.Formatted_Address),await e.setExplicitOverride(t),(0,i.s)().closeChangeLocationModal()}let H=(0,r.EW)(()=>{let e=(0,i.s)();return b.value&&!e.isWhiteLabelSite&&(""!==e.hotdealsUrl||""!==X.value)}),U=(0,r.EW)(()=>!g.value&&f.value&&0===C.value&&0===E.value),$=(0,r.EW)(()=>{var e,a;return!g.value&&(null!=(a=null==(e=_.value)?void 0:e.length)?a:0)>0&&0===C.value&&0===E.value}),Y=(0,r.EW)(()=>{var e;return!g.value&&C.value>0&&(I.value.length>0||k.value.length>0)&&(null==(e=x.value)?void 0:e.type)==="course"}),z=(0,r.EW)(()=>{var e;return!g.value&&E.value>0&&N.value.length>0&&(null==(e=x.value)?void 0:e.type)!=="course"});return{searchPreviewLimit:e,minimumchar:a,firstLoad:t,searchCta:l,noResultsMessage:d,previewTop:c,previousSearchKey:v,firstLoadMessage:h,locationStatusMessage:m,locationChangeErrorMsg:p,hasMinimumCharacters:f,searching:g,showAutoCompleteResults:y,geoCitySearching:R,showGeoCityAutoCompleteResults:K,includeHotedealsBtn:b,isRefineRequest:S,isHomePageSearch:w,allCoursesCount:C,allLocationsCount:E,topScoredItem:x,courseSummaries:k,allCourses:L,courses:I,allLocations:M,locations:N,geoCityLocations:P,suggestedSearches:W,otherSearches:A,otherSearchesHeader:T,previousSearches:_,searchData:D,geoCitySearchData:F,hotdealsUrl:X,initialized:O,generateKey:function(){return`${Math.floor(100*Math.random())+1}`},updateKey:function(){return`${Math.floor(100*Math.random())+1}`},loadRecentSearches:function(){var e;_.value=null!=(e=null==s?void 0:s.Get())?e:[]},setSearchType:function(e){D.value||(D.value={}),D.value.searchType=e},setSearchTerm:function(e){D.value||(D.value={}),D.value.searchTerm=e},setDate:function(e){D.value||(D.value={}),searchController.SavePickerSelectedDate(e)},extendSearchData:j,saveChangedLocation:B,hasMoreLocations:function(){return E.value>N.value.length},hasMoreCourses:function(){return C.value>I.value.length},init:function({minimumchar:e,previewTop:t,searchCta:r,showHotDealsBtn:o,suggestedSearches:d,otherSearches:v,otherSearchesHeader:h}){var m;if(O.value)return;s=new n.A;let p=(0,i.s)();a.value=null!=e?e:3,c.value=null!=t?t:3,l.value=null!=r?r:"Search",W.value=null!=d?d:[],A.value=null!=v?v:[],T.value=null!=h?h:"",w.value=null!=(m=p.isHomePageSearch)&&m,b.value=null!=o&&o,D.value||(D.value={}),D.value.date=(0,u.$x)(),X.value=null!=hotDealsSearchUrl?hotDealsSearchUrl:"",O.value=!0},showHotDealsBtn:H,hasNoResults:U,showPreviousSearches:$,showCourseResultsFirst:Y,showLocationResultsFirst:z,isFacilitySearch:(0,r.EW)(()=>(0,i.s)().isFacilitySearch)}});t.d(a,["useTypeAheadSearchStore",0,d])},24709(e,a,t){t.r(a),t.d(a,{default:()=>v});
1var l=t(6934),r=t(10810),n=t(62491),u=t(6724),i=t(79162);let o={id:"federatedResultsCourses",class:"facility"},s={key:0,class:"mb-4 federatedSearchResults"},d=["id","href","onClick"],c={key:0,class:"more-link"},v=(0,l.pM)({__name:"TypeAheadCourseResults",setup(e){let a=(0,n.useTypeAheadSearchStore)(),{allCourses:t,courses:v,courseSummaries:h,searchPreviewLimit:m}=(0,r.bP)(a),p=async e=>{var t;e.href||(await a.extendSearchData(Object.assign(Object.assign({},e),{name:e.displayName,eid:null!=(t=e.elasticId)?t:"",nextElem:"searchBtn",searchType:"course"})),(0,i.wN)("tasStore:",a.searchData),await u.a.SearchBtn_Event())},f=()=>{let e=v.value.length,a=e+m.value,l=t.value.slice(e,a);v.value.push(...l)},g=(0,l.EW)(()=>v.value.length>0?v.value.map(e=>{var a,t,l,r,n,u,i,o,s,d,c;return{id:null!=(o=null!=(u=null!=(l=null==(t=null==(a=null==e?void 0:e.contextInformation)?void 0:a.ids)?void 0:t.golfFacilityID)?l:null==(n=null==(r=null==e?void 0:e.contextInformation)?void 0:r.ids)?void 0:n.courseInfoId)?u:null==(i=null==e?void 0:e.contextInformation)?void 0:i.courseId)?o:"0",elasticId:null!=(s=null==e?void 0:e.id)?s:"",displayName:e.displayName,lat:null==(d=e.geo)?void 0:d.lat,lon:null==(c=e.geo)?void 0:c.lon}}):h.value.length>0?h.value.map(e=>{var a;return{id:null==(a=e.reviewId)?void 0:a.toString(),displayName:e.displayName,href:`${e.detailsPageUrl}#ratings-snapshot`}}):void 0);return(e,t)=>{var r;return(0,l.uX)(),(0,l.CE)("div",o,[(null==(r=g.value)?void 0:r.length)?((0,l.uX)(),(0,l.CE)("div",s,[t[1]||(t[1]=(0,l.Lk)("h3",{class:"px-5 py-2 text-base font-semibold bg-gray-200 border-t border-b border-gray-300 md:mb-2 font-display text-skin-base md:bg-white md:border-b-0 md:border-t-0"}," Courses ",-1)),((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)(g.value,e=>((0,l.uX)(),(0,l.CE)("div",{key:e.id,class:"ta-results grid grid-cols-[25px_auto] gap-1 align-middle w-full md:py-2 py-3 px-5 border-b md:border-b-0 border-gray-200"},[t[0]||(t[0]=(0,l.Lk)("i",{class:"icon-Golf-Flag text-secondary"},null,-1)),(0,l.Lk)("a",{id:e.id,href:e.href,class:"text-base cursor-pointer ta-result text-skin-base line-clamp-1",onClick:a=>p(e)},(0,l.v_)(e.displayName),9,d)]))),128)),(0,l.R1)(a).hasMoreCourses()?((0,l.uX)(),(0,l.CE)("div",c,[(0,l.Lk)("button",{onClick:f,class:"block px-5 py-3 text-base underline cursor-pointer md:py-2 text-link underline-offset-4"}," View More Courses ")])):(0,l.Q3)("v-if",!0)])):(0,l.Q3)("v-if",!0)])}}})}}]);

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.