1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="babc61d9-540f-4e5b-bf9c-05dbab2ae993",e._sentryDebugIdIdentifier="sentry-dbid-babc61d9-540f-4e5b-bf9c-05dbab2ae993")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25488],{25488:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var r=s(95155),n=s(12115),l=s(52619),o=s.n(l),a=s(37869),i=s(55417),c=s(59362),d=s(48786),u=s(93129),h=s(53154),x=s(70397);function m(){let{ct:{browse:e}}=(0,a.Y)(),[t,s]=(0,n.useState)(""),[l,m]=(0,n.useState)([]),[f,g]=(0,n.useState)([]),[p,b]=(0,n.useState)([]),[v,j]=(0,n.useState)([]),[w,k]=(0,n.useState)(!1),[y,N]=(0,n.useState)([]),[S,L]=(0,n.useState)(!1),C=(0,n.useRef)(null),M=(0,n.useRef)(null);(0,n.useEffect)(()=>{fetch("/api/v1/resorts/search-index",{cache:"no-store"}).then(e=>{if(!e.ok)throw Error("search-index ".concat(e.status));return e.json()}).then(e=>{if(!Array.isArray(e.data))return;let t=e.data.map(e=>{var t,s,r,n,l,o,a,i;let c=String(null!=(n=e.slug)?n:"").trim(),d="string"==typeof e.name?e.name:String(null!=(l=null==(t=e.name)?void 0:t.value)?l:""),u="string"==typeof e.country?e.country:String(null!=(o=null==(s=e.country)?void 0:s.value)?o:"");return c&&d?{slug:c,name:d,country:u,stateProvince:null!=(a=e.stateProvince)?a:null,score:null!=(i=null==(r=e.snowSure)?void 0:r.score)?i:null,isOpen:!1!==e.isOpen}:null}).filter(e=>null!=e);j(t),N([...t].filter(e=>e.isOpen).sort((e,t)=>{var s,r;return(null!=(s=t.score)?s:-1)-(null!=(r=e.score)?r:-1)}).slice(0,5))}).catch(e=>{console.error("[SnowConcierge] Failed to load resort search index:",e)}).finally(()=>L(!0))},[]),(0,n.useEffect)(()=>{if(!t.trim()){m([]),g([]),b([]);return}let e=(0,u._Q)(t);try{let{hits:e}=(0,h.Em)(v,t);m(e)}catch(e){console.error("[SnowConcierge] Search scoring failed:",e)}g((0,c.e6)(e,3)),b((0,d.mY)(e,2))},[t,v]),(0,n.useEffect)(()=>{function e(e){M.current&&!M.current.contains(e.target)&&k(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let E=f.length>0||p.length>0,z=t.trim()?l:y;return(0,r.jsxs)("div",{ref:M,className:"w-full max-w-xl relative z-10",children:[(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let s=(0,c.nF)(t),r=(0,d.WL)(t);s&&0===l.length?window.location.href="/destinations/".concat(s.slug):r&&0===l.length&&!s?window.location.href="/passes/".concat(r.slug):1===l.length?window.location.href="/resorts/".concat(l[0].slug):0===l.length&&f.length>=1?window.location.href="/destinations/".concat(f[0].slug):0===l.length&&0===f.length&&p.length>=1?window.location.href="/passes/".concat(p[0].slug):(l.length>0||E)&&k(!0)},className:"relative",role:"search",toolname:"search-ski-resorts",tooldescription:"Search SnowSure's ".concat(x.f4," ski resorts, destinations, and ski passes by name. Submitting navigates to the best-matching resort page with live snow conditions and forecasts."),children:(0,r.jsxs)("div",{className:"bg-white rounded-full shadow-xl flex items-center",children:[(0,r.jsxs)("div",{className:"flex-1 flex items-center gap-3 px-6 py-4",children:[(0,r.jsx)("svg",{"aria-hidden":"true",className:"w-5 h-5 text-slate-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,r.jsx)("label",{htmlFor:"snowsure-resort-search",className:"sr-only",children:e.concierge.searchLabel}),(0,r.jsx)("input",{ref:C,id:"snowsure-resort-search",type:"search",name:"query",autoComplete:"off",value:t,onChange:e=>s(e.target.value),onFocus:()=>k(!0),placeholder:e.concierge.placeholder,"aria-label":e.concierge.searchLabel,toolparamdescription:"Ski resort, destination, or ski pass name to search for (e.g. Aspen, Zermatt, Epic Pass)",className:"flex-1 bg-transparent text-slate-900 placeholder-slate-400 focus:outline-none text-base"}),t&&(0,r.jsx)("button",{type:"button",onClick:()=>{s(""),m([]),g([]),b([])},"aria-label":e.concierge.clearSearch,className:"text-slate-400 hover:text-slate-600",children:(0,r.jsx)("svg",{"aria-hidden":"true",className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("button",{type:"submit","aria-label":e.concierge.submitSearch,className:"m-2 w-10 h-10 rounded-full bg-slate-900 hover:bg-blue-600 flex items-center justify-center transition-colors",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-white",f
1ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})}),w&&(z.length>0||t.trim()&&E)&&(0,r.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white rounded-2xl shadow-2xl border border-slate-100 z-50 animate-fade-in overflow-hidden",children:[(0,r.jsxs)("div",{className:"p-3",children:[(0,r.jsx)("p",{className:"text-xs text-slate-400 mb-2 px-1 uppercase tracking-wider",children:t.trim()?(0,i.Y9)(e.concierge.resultsFor,{query:t}):e.concierge.topResorts}),t.trim()&&p.length>0&&(0,r.jsx)("div",{className:"space-y-1 mb-1",children:p.map(t=>(0,r.jsxs)(o(),{href:"/passes/".concat(t.slug),onClick:()=>{s(""),m([]),g([]),b([]),k(!1)},className:"flex items-center justify-between p-3 hover:bg-slate-50 rounded-lg transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-violet-50 to-violet-100 rounded-lg flex items-center justify-center flex-shrink-0",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-violet-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z"})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-slate-900 text-sm",children:t.name}),(0,r.jsxs)("p",{className:"text-xs text-slate-500",children:[t.operator," \xb7 ",(0,i.Y9)(e.concierge.trackedResorts,{count:t.memberSlugs.length})]})]})]}),(0,r.jsx)("span",{className:"text-xs px-2.5 py-1 rounded-full font-medium bg-violet-50 text-violet-700",children:e.concierge.skiPass})]},t.slug))}),t.trim()&&f.length>0&&(0,r.jsx)("div",{className:"space-y-1 mb-1",children:f.map(t=>(0,r.jsxs)(o(),{href:"/destinations/".concat(t.slug),onClick:()=>{s(""),m([]),g([]),b([]),k(!1)},className:"flex items-center justify-between p-3 hover:bg-slate-50 rounded-lg transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-cyan-50 to-cyan-100 rounded-lg flex items-center justify-center flex-shrink-0",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-cyan-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 21l6-9 4 5 4-7 4 11H3z"})})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-slate-900 text-sm",children:t.name}),(0,r.jsxs)("p",{className:"text-xs text-slate-500",children:[t.country," \xb7 ",(0,i.Y9)(e.concierge.skiAreas,{count:t.members.length})]})]})]}),(0,r.jsx)("span",{className:"text-xs px-2.5 py-1 rounded-full font-medium bg-cyan-50 text-cyan-700",children:e.concierge.destination})]},t.slug))}),(0,r.jsx)("div",{className:"space-y-1",children:z.map(t=>(0,r.jsxs)(o(),{href:"/resorts/".concat(t.slug),onClick:()=>{s(""),m([]),k(!1)},className:"flex items-center justify-between p-3 hover:bg-slate-50 rounded-lg transition-colors",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-blue-50 to-blue-100 rounded-lg flex items-center justify-center flex-shrink-0",children:(0,r.jsxs)("svg",{className:"w-5 h-5 text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium text-slate-900 text-sm",children:t.name}),(0,r.jsx)("p",{className:"text-xs text-slate-500",children:t.country})]})]}),!1===t.isOpen?(0,r.jsx)("span",{className:"text-xs px-2.5 py-1 rounded-full font-medium bg-amber-50 text-amber-700",children:e.concierge.offSeason}):null!=t.score&&t.score>0&&(0,r.jsx)("span",{className:"text-xs px-2.5 py-1 rounded-full font-medium ".concat(t.score>=50?"bg-green-100 text-green-700":t.score>=30?"bg-yellow-100 text-yellow-700":"bg-slate-100 text-slate-600"),children:Math.round(t.score)})]},t.slug))})]}),(0,r.jsxs)("div",{className:"px-4 py-3 bg-slate-50 border-t border-slate-100 space-y-2",children:[(0,u.Sn)(t).length>0&&(0,r.jsxs)(o(),{href:"/resorts?q=".concat(encodeURIComponent(t.trim())),className:"text-xs text-blue-600 hover:text-blue-700 font-medium flex items-center gap-1",onClick:()=>k(!1),children:["See all ",(0,u.sk)((0,u.Sn)(t)[0])," resorts",(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}),(0,r.jsxs)(o(),{href:"/snow-report",className:"text-xs text-blue-600 hover:text-blue-700 font-medium flex items-center gap-1",onClick:()=>k(!1),children:[e.concierge.viewSnowReport,(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]}),w&&t.trim()&&!S&&(0,r.jsx)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white rounded-2xl shadow-2xl border border-slate-100 z-50 p-4 text-center",children:(0,r.jsx)("p",{className:"text-sm text-slate-500",children:e.concierge.loadingResorts})}),w&&t.trim()&&S&&0===l.length&&!E&&v.length>0&&(0,r.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white rounded-2xl shadow-2xl border border-slate-100 z-50 p-4 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-slate-600 mb-2",children:(0,i.Y9)(e.concierge.no
1Results,{query:t})}),(0,r.jsx)(o(),{href:"/resorts",className:"text-xs text-blue-600 hover:text-blue-700 font-medium",onClick:()=>k(!1),children:e.concierge.browseAllResorts})]})]})}}}]);
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.