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]="d3da484e-50e8-4fa1-8cae-e94ad858a6ae",e._sentryDebugIdIdentifier="sentry-dbid-d3da484e-50e8-4fa1-8cae-e94ad858a6ae")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9064],{49064:(e,t,o)=>{o.d(t,{c:()=>s});var a=o(27541),n=o(7620),r=o(46615),c=o(27433),l=o(88965);let i=["typeahead","results"];function s(){let e=(0,a.useRouter)(),{openCart:t}=(0,r._$S)(),{config:o}=(0,c.Z)(),s=(0,n.useCallback)((e,t)=>{let a=null!=e?String(e):"";if(!a)return"";let n=function(e,t){if(!t)return;let o=function(e,t){if(!e||"object"!=typeof e)return{};let o=e.pages;if(!o||"object"!=typeof o)return{};let a=o[t];return a&&"object"==typeof a?a:{}}(e,"locationSlugs")[t];return"string"==typeof o&&o.length>0?o:void 0}(o,a);return n?encodeURIComponent(n):t?encodeURIComponent(t):encodeURIComponent(a)},[o]),u=(0,n.useCallback)(t=>{e.push(t),window.scrollTo(0,0)},[e]);return{handleNavigate:(0,n.useCallback)((e,t)=>{let o=e,a=t;if("string"==typeof o){o.startsWith("/")&&!o.startsWith("//")&&(o=o.slice(1));let e=o.indexOf("?");if(e>=0){let n=o.slice(e+1);o=o.slice(0,e);let r={};for(let e of n.split("&")){if(!e)continue;let[t,o]=e.split("=");if(t)try{r[decodeURIComponent(t)]=void 0!==o?decodeURIComponent(o):""}catch(e){r[t]=void 0!==o?o:""}}a={...r,...t||{}}}}switch(e=o,t=a,e){case"product-details":(null==t?void 0:t.searchClick)&&function(e){try{var t;if(!(e&&"object"==typeof e&&"string"==typeof e.surface&&i.includes(e.surface)&&"string"==typeof e.term&&"number"==typeof e.position&&Number.isInteger(e.position)&&e.position>=0&&"number"==typeof e.resultsCount&&Number.isFinite(e.resultsCount))||!e.term.trim())return;(0,l.sx)("Clicked Search Result",{SearchTerm:e.term.trim(),ProductID:null!=(t=e.productId)?t:"",ProductName:"string"==typeof e.productName?e.productName:"",Position:e.position,Surface:e.surface,ResultsCount:e.resultsCount})}catch(e){}}(t.searchClick),((null==t?void 0:t.productSlug)||(null==t?void 0:t.productId))&&u("/products/".concat(t.productSlug||t.productId));break;case"home":u("/");break;case"products":{let e=new URLSearchParams;(null==t?void 0:t.q)&&e.set("q",String(t.q));let o=e=>(Array.isArray(e)?e:null!=e?[e]:[]).map(String).filter(Boolean);o(null==t?void 0:t.thcRanges).forEach(t=>e.append("thc_ranges",t)),o(null==t?void 0:t.cbdRanges).forEach(t=>e.append("cbd_ranges",t)),(null==t?void 0:t.plantType)&&e.set("plant_types",String(t.plantType));let a=o(null==t?void 0:t.terpeneNames);a.length&&e.set("terpene_names",a.join(","));let n=o(null==t?void 0:t.tags);n.length&&e.set("tags",n.join(","));let r=o(null==t?void 0:t.weights).filter(e=>Number.isFinite(Number(e)));r.length&&e.set("weights",r.join(","));let c=e.toString()?"?".concat(e.toString()):"";(null==t?void 0:t.brand)?u("/products/brand/".concat(encodeURIComponent(t.brand.toLowerCase())).concat(c)):(null==t?void 0:t.category)?u("/products/category/".concat(encodeURIComponent(t.category.toLowerCase())).concat(c)):u("/products".concat(c));break}case"cart":u("/cart");break;case"checkout":u("/checkout");break;case"locations":u("/locations");break;case"location-selection":u("/location-selection");break;case"location-details":{var n,r;let e=s(null!=(r=null==t?void 0:t.locationId)?r:null==t||null==(n=t.location)?void 0:n.id,null==t?void 0:t.locationSlug);e&&u("/locations/".concat(e));break}case"faq":u("/faq");break;case"delivery":u("/delivery");break;case"privacy-policy":u("/privacy-policy");break;case"terms-of-service":u("/terms-of-service");break;case"account":u("/account");break;case"order-details":(null==t?void 0:t.orderId)&&u("/account/orders/".concat(t.orderId));break;case"login":break;case"about":u("/about");break;case"contact":u("/contact");break;case"blog":u("/blog");break;case"blog-detail":{let e=(null==t?void 0:t.postSlug)||(null==t?void 0:t.slug)||(null==t?void 0:t.id)||((null==t?void 0:t.title)?t.title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""):null);e&&u("/blog/".concat(e));break}case"mail-order":u("/mail-order");break;case"careers":u("/careers");break;case"loyalty":u("/loyalty");break;case"confirmation":u("/checkout/confirmation");break;default:e&&"string"==typeof e&&!/^https?:\/\//i.test(e)&&u("/".concat(e))}},[u,t,s]),handleSearch:(0,n.useCallback)(e=>{e?u("/products?q=".concat(encodeURIComponent(e))):u("/products")},[u])}}}}]);
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.