(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,253276,e=>{"use strict";var t=e.i(699173),r=e.i(592121);e.s(["default",0,function({candidate:e,failedMessage:i="Authentication failed. Please try again.",protectMessage:n="Remove your adblocker.",fetch:a,refresh:l,getCustomAccountInfo:o}){let[s,u]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1),[p,v]=(0,r.useState)(!1),h=(0,r.useRef)([]);(0,r.useEffect)(()=>{e.id!==h.current[0]&&(h.current=[e.id],e.transactIDs&&h.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let b=(0,r.useCallback)(()=>{try{a("/?adm_get_token=1").then(e=>{e.ok&&l()}).catch(()=>{u(i)})}catch{u(i)}},[a,i,l]),g=(0,r.useMemo)(()=>"u">typeof window?window:{admiral:{}},[]);return(0,r.useEffect)(()=>{typeof window>"u"||(g.admiral=g.admiral||function(...e){(g.admiral.q=g.admiral.q||[]).push(e)},g.admiral("after","measure.detected",function(t){if("abr"==e.requirement)t.adblocking?(u(n),d(!0)):v(!0);else if("account"==e.requirement||"benefits"==e.requirement){let t=!!o;g.admiral("after","visitor.latest",function(r){var i;if("account"===e.requirement)(t?o().registered:r.status.registered)||f||(u(n),d(!0));else if("benefits"===e.requirement){let r=[];if(t)r=o().benefits;else{let e=document.cookie.split(";");e&&(r=(null==(i=e.find(e=>e.startsWith("admbenefits=")))?void 0:i.split(","))??[])}if(r){let t=e.benefits??[];if(0==t.length)return void v(!0);let i=!1;for(let e of t)r.includes(e)&&(i=!0);i?v(!0):(u(n),d(!0))}else u(n),d(!0)}})}}))},[]),(0,r.useEffect)(()=>{p&&(v(!1),b())},[p,b]),(0,r.useEffect)(()=>{f||!c||(m(!0),g.admiral("targeting","force",{candidateIDs:h.current}))},[f,c,h,g]),(0,t.jsxs)("div",{children:[s||null," "]})}])},18358,e=>{"use strict";var t=e.i(947118),r=e.i(737801),i=e.i(592121);e.s(["useTrackEvent",0,()=>{let e=(0,t.useIsInitialized)(),n=(0,r.useEventAttributes)(),a=(0,i.useCallback)((t,r={})=>{let i={...n,...r};if(!e)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(t,window.mParticle.EventType.Other,i),console.debug(`MParticle: Event "${t}" tracked`,i)}catch(e){console.error(`MParticle: Event "${t}" failed`,e)}return a},[n,e]);return a}])},899507,e=>{"use strict";e.s(["isNil",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["isPrimitive",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["isTypedArray",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["isUnsafeProperty",0,function(e){return"__proto__"===e}],355200)},370220,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatusUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/status"}},r.getEmailPreferencesSetUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/set"}},r.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/change-email"}};let i="weather.com"},454307,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setEmailPreferences=l,r.updateSubscription=o;let i=e.r(678651),n=e.r(414655),a=e.r(370220);async function l(e){let t=(0,a.getEmailPreferencesSetUrlConfig)(),r=(0,i.urlFrom)(t),l=JSON.stringify(function(e){let{subscriptions:t,email:r,mParticleId:i}=e,n={};return t&&(n.subscriptions=t),r&&(n.email=r),i&&(n.mParticleId=i),n}(e)),o=await fetch(r,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:l});return 200===o.status||400===o.status?await o.json():(0,n.handleFetchResponse)(o)}async function o(e,t,r){return l({subscriptions:[{subscriptionGroupName:e,isSubscribed:t,...r&&{attributes:r}}]})}},451086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatus=l;let i=e.r(678651),n=e.r(414655),a=e.r(370220);async function l(){let e=(0,a.getEmailPreferencesStatusUrlConfig)(),t=(0,i.urlFrom)(e),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,n.handleFetchResponse)(r)}},952582,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_SUBSCRIPTIONS=r.ON_YOUR_RADAR_GROUP=r.MARKETING_EMAILS_GROUP=r.WEEKLY_BRIEF_GROUP=r.DAILY_NEWSLETTERS_GROUP=void 0,r.DAILY_NEWSLETTERS_GROUP="daily-newsletters-1",r.WEEKLY_BRIEF_GROUP="weekly-brief",r.MARKETING_EMAILS_GROUP="marketing-emails-1",r.ON_YOUR_RADAR_GROUP="on-your-radar",r.DEFAULT_SUBSCRIPTIONS=[{subscriptionGroupName:r.DAILY_NEWSLETTERS_GROUP,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:r.WEEKLY_BRIEF_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.MARKETING_EMAILS_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.ON_YOUR_RADAR_GROUP,subscriptionGroupId:"",isSubscribed:!1}]},422825,e=>{"use strict";var t=e.i(546446),r=e.i(381477),i=e.i(899507),n=e.i(449928),a=e.i(760430);function l(e){if((0,n.isPrimitive)(e))return e;if(Array.isArray(e)||(0,a.isTypedArray)(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t=new r(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}var o=e.i(355200);function s(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function u(e,t,r){let i=Object.keys(t);for(let n=0;n"boolean"==typeof e?{isSubscribed:e}:e;e.s(["useEmailPreferences",0,({forceSubs:e,skipStatus:n}={})=>{let[a,o]=(0,t.useAtom)(f),{user:g}=(0,m.useUser)(),y=(0,h.useSubscriptionsEnabled)()||e,w=g?.userID||null,E=g?.isUserLoggedIn||!1,x=(0,v.useCallback)(e=>{if(w){var t;let r,i;o({userId:w,expiry:Date.now()+9e5,subscriptions:(t=a?.subscriptions,r=t?.length?t:p.DEFAULT_SUBSCRIPTIONS,i={},e?(r?.forEach(e=>{i[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=i[e.subscriptionGroupName]||{};i[e.subscriptionGroupName]=u(l(t),e,function e(t,r){if(Array.isArray(r))if(Array.isArray(t))return u(l(t),r,e);else return u([],r,e);if(s(r))if(s(t))return u(l(t),r,e);else return u({},r,e)})}),Object.values(i)):r)})}},[w,o,a?.subscriptions]),S=a&&a.userId===w&&a.expiry&&a.expiry>Date.now(),I=y&&w&&!S,{isLoading:P}=(0,r.default)(!n&&I?`getEmailPreferencesStatus/${w}`:void 0,d.getEmailPreferencesStatus,{shouldRetryOnError:e=>!(e instanceof Error&&e.message.includes("401")),revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{w&&e&&x(e.subscriptions)}}),k=(0,v.useCallback)(async(e,t)=>{if(!y)return{status:"error",error:"Subscription is not enabled!"};let r=await (0,c.setEmailPreferences)({subscriptions:e,email:E?void 0:t});return"success"===r.status&&x(e),r},[x,y,E,a?.subscriptions]),A=(0,v.useCallback)(async({newsletter:e,weekly:t,onYourRadar:r,marketing:n})=>{let a=[!(0,i.isNil)(e)&&{subscriptionGroupName:"daily-newsletters-1",...b(e)},!(0,i.isNil)(t)&&{subscriptionGroupName:"weekly-brief",...b(t)},!(0,i.isNil)(r)&&{subscriptionGroupName:"on-your-radar",...b(r)},!(0,i.isNil)(n)&&{subscriptionGroupName:"marketing-emails-1",...b(n)}].filter(Boolean);return await k(a)},[k]);return{emailSubscriptions:S?a.subscriptions:null,updateEmailSubscriptions:A,updateEmailPreference:k,isLoadingPreferences:P}}],422825)},143851,e=>{"use strict";var t=e.i(546446),r=e.i(45846),i=e.i(310847),n=e.i(776169),a=e.i(671525),l=e.i(592121),o=e.i(947118),s=e.i(491240),u=e.i(18358),c=e.i(521350),d=e.i(756227),f=e.i(318849),m=e.i(358273);e.s(["useUserLogin",0,function(){let e,p,v=(0,t.useSetAtom)(i.userHasLoggedInBeforeAtom),h=(0,d.useResetAuthState)(),b=(0,t.useAtomValue)(i.wxuLoginRedirectPageAtom),g=(0,t.useAtomValue)(i.wxuUserAnonymousIdAtom),{syncPreferencesFromUpsx:y,updatePreferences:w}=(0,n.usePreferences)(),{navigate:E}=(0,a.default)(),{login:x}=(e=(0,o.useIsInitialized)(),p=(0,l.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,other:(0,s.truncateIdentityValue)(t.other)}};return window.mParticle?.Identity?.identify?.(r)},[e]),{identify:p,login:(0,l.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,facebook:t.facebook,facebookcustomaudienceid:t.facebookcustomaudienceid,google:t.google,microsoft:t.microsoft,other:(0,s.truncateIdentityValue)(t.other),other2:(0,s.truncateIdentityValue)(t.other2),other3:(0,s.truncateIdentityValue)(t.other3),other4:(0,s.truncateIdentityValue)(t.other4),twitter:t.twitter,yahoo:t.yahoo}};return window.mParticle?.Identity?.login?.(r)},[e]),logout:(0,l.useCallback)(()=>e?window.mParticle?.Identity?.logout?.({userIdentities:{}}):(console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"))),[e])}),S=(0,u.useTrackEvent)(),I=()=>{(0,m.regenerateMetricsSession)(),(0,f.disableSwrPersist)();let e=new URLSearchParams(window.location.search).get("ref");E((e&&`https://${e}`)??b)},P=async(e,t=!0)=>{h(),(0,c.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),v(!0),await y()||await w({});try{await r.upsxClient.purchase.getPurchaseToken()}catch(e){console.error("Failed to get UPSX token:",e)}e?.userID&&(x({email:e.email,customerid:e.userID,other:g}),S("login"===e.type?"user-loggedin":"signup-complete",{url:window.location.pathname})),t&&I()};return{login:async(e,t)=>{try{let i=await r.upsxClient.auth.login({email:e,password:t});return i&&await P({email:i.email,userID:i.userID,type:"login"}),!0}catch(e){return console.error("Failed to login",e),!1}},authSuccess:P,authRedirect:I}}],143851)},790010,e=>{"use strict";var t=e.i(245943),r=e.i(45846),i=e.i(143851);e.s(["useUserSignup",0,function(){let{authSuccess:e,authRedirect:n}=(0,i.useUserLogin)();return{signup:async(i,n=!0)=>{try{let t=await (i.password?r.upsxClient.auth.register({email:i.email,password:i.password,firstName:i.firstName}):r.upsxClient.auth.registerPasswordless({email:i.email,firstName:i.firstName}));return await e({email:t.email,userID:t.userID,type:"signup"},n),{success:!0,data:{email:t.email,userID:t.userID}}}catch(e){if(console.error("Failed to signup",e),e instanceof t.APIError){let t=e.data;return{success:!1,error:{code:e.code,...t}}}return{success:!1,error:{}}}},authRedirect:n}}])},695478,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findSubscriptionGroup=void 0,r.getMorningBriefAttrs=function(e){return{location:e.placeId,latitude:e.latitude,longitude:e.longitude,dmaCode:e.dmaCd||null,adminDistrict:e.adminDistrict,adminDistrictCode:e.adminDistrictCode||null,postalCode:e.postalCode}},r.findSubscriptionGroup=(e,t,r)=>e&&Array.isArray(e)?e.find(e=>e.subscriptionGroupName===t)||r||null:r||null},279887,e=>{"use strict";var t=e.i(947118),r=e.i(737801),i=e.i(592121);e.s(["useTrackEmailSubscription",0,()=>{let e="alert-subscription-changed",n=(0,t.useIsInitialized)(),a=(0,r.useEventAttributes)();return(0,i.useCallback)(({name:t,status:r})=>{let i={...a,name:t,status:r?"enabled":"disabled"};if(!n)return void console.warn("MParticle is not initialized");try{window.mParticle?.logEvent?.(e,window.mParticle?.EventType?.Other,i),console.debug(`MParticle: Event "${e}" tracked`,i)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}},[a,n])}])},846871,e=>{"use strict";var t=e.i(699173),r=e.i(294237),i=e.i(632137);let n=(0,r.cva)("inline-block rounded-full border-solid animate-spin box-border",{variants:{size:{sm:"w-4 h-4 border-[2px]",md:"w-6 h-6 border-[2px]",lg:"w-8 h-8 border-[3px]"},variant:{white:"border-white border-b-transparent",primary:"border-brand-400 border-b-transparent",black:"border-[#252422] border-b-transparent"}},defaultVariants:{size:"sm",variant:"black"}});e.s(["Loader",0,({className:e,size:r,variant:a,label:l})=>(0,t.jsx)("div",{className:(0,i.cn)(n({size:r,variant:a}),e),"aria-label":l})])},546334,e=>{"use strict";var t=e.i(699173),r=e.i(592121),i=e.i(961123),n=e.i(381477),a=e.i(925209),l=e.i(564993),o=e.i(985542),s=e.i(612977),u=e.i(368847),c=e.i(877957),d=/[\\\/_+.#"@\[\(\{&]/,f=/[\\\/_+.#"@\[\(\{&]/g,m=/[\s-]/,p=/[\s-]/g;function v(e){return e.toLowerCase().replace(p," ")}var h=e.i(867013);e.i(798973);var b=e.i(982538),g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,i)=>{let n=(0,b.createSlot)(`Primitive.${i}`),a=r.forwardRef((e,r)=>{let{asChild:a,...l}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(a?n:i,{...l,ref:r})});return a.displayName=`Primitive.${i}`,{...e,[i]:a}},{}),y=globalThis?.document?r.useLayoutEffect:()=>{},w=r[" useId ".trim().toString()]||(()=>void 0),E=0;function x(e){let[t,i]=r.useState(w());return y(()=>{e||i(e=>e??String(E++))},[e]),e||(t?`radix-${t}`:"")}var S=e.i(723673),I='[cmdk-group=""]',P='[cmdk-group-items=""]',k='[cmdk-item=""]',A=`${k}:not([aria-disabled="true"])`,R="cmdk-item-select",C="data-value",j=(e,t,r)=>{var i;return i=e,function e(t,r,i,n,a,l,o){if(l===r.length)return a===t.length?1:.99;var s=`${a},${l}`;if(void 0!==o[s])return o[s];for(var u,c,v,h,b=n.charAt(l),g=i.indexOf(b,a),y=0;g>=0;)(u=e(t,r,i,n,g+1,l+1,o))>y&&(g===a?u*=1:d.test(t.charAt(g-1))?(u*=.8,(v=t.slice(a,g-1).match(f))&&a>0&&(u*=Math.pow(.999,v.length))):m.test(t.charAt(g-1))?(u*=.9,(h=t.slice(a,g-1).match(p))&&a>0&&(u*=Math.pow(.999,h.length))):(u*=.17,a>0&&(u*=Math.pow(.999,g-a))),t.charAt(g)!==r.charAt(l)&&(u*=.9999)),(u<.1>u&&(u=.1*c),u>y&&(y=u),g=i.indexOf(b,g+1);return o[s]=y,y}(i=r&&r.length>0?`${i+" "+r.join(" ")}`:i,t,v(i),v(t),0,0,{})},N=r.createContext(void 0),_=r.createContext(void 0),O=r.createContext(void 0),M=r.forwardRef((e,t)=>{let i=V(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=V(()=>new Set),a=V(()=>new Map),l=V(()=>new Map),o=V(()=>new Set),s=$(e),{label:u,children:c,value:d,onValueChange:f,filter:m,shouldFilter:p,loop:v,disablePointerSelection:h=!1,vimBindings:b=!0,...y}=e,w=x(),E=x(),S=x(),O=r.useRef(null),M=Y();B(()=>{if(void 0!==d){let e=d.trim();i.current.value=e,D.emit()}},[d]),B(()=>{M(6,z)},[]);let D=r.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>i.current,setState:(e,t,r)=>{var n,a,l,o;if(!Object.is(i.current[e],t)){if(i.current[e]=t,"search"===e)F(),L(),M(1,T);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(S);e?e.focus():null==(n=document.getElementById(w))||n.focus()}if(M(7,()=>{var e;i.current.selectedItemId=null==(e=K())?void 0:e.id,D.emit()}),r||M(5,z),(null==(a=s.current)?void 0:a.value)!==void 0){null==(o=(l=s.current).onValueChange)||o.call(l,null!=t?t:"");return}}D.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),U=r.useMemo(()=>({value:(e,t,r)=>{var n;t!==(null==(n=l.current.get(e))?void 0:n.value)&&(l.current.set(e,{value:t,keywords:r}),i.current.filtered.items.set(e,G(t,r)),M(2,()=>{L(),D.emit()}))},item:(e,t)=>(n.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),M(3,()=>{F(),L(),i.current.value||T(),D.emit()}),()=>{l.current.delete(e),n.current.delete(e),i.current.filtered.items.delete(e);let t=K();M(4,()=>{F(),(null==t?void 0:t.getAttribute("id"))===e&&T(),D.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{l.current.delete(e),a.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:w,inputId:S,labelId:E,listInnerRef:O}),[]);function G(e,t){var r,n;let a=null!=(n=null==(r=s.current)?void 0:r.filter)?n:j;return e?a(e,i.current.search,t):0}function L(){if(!i.current.search||!1===s.current.shouldFilter)return;let e=i.current.filtered.items,t=[];i.current.filtered.groups.forEach(r=>{let i=a.current.get(r),n=0;i.forEach(t=>{n=Math.max(e.get(t),n)}),t.push([r,n])});let r=O.current;q().sort((t,r)=>{var i,n;let a=t.getAttribute("id"),l=r.getAttribute("id");return(null!=(i=e.get(l))?i:0)-(null!=(n=e.get(a))?n:0)}).forEach(e=>{let t=e.closest(P);t?t.appendChild(e.parentElement===t?e:e.closest(`${P} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${P} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=O.current)?void 0:t.querySelector(`${I}[${C}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function T(){let e=q().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(C);D.setState("value",t||void 0)}function F(){var e,t,r,o;if(!i.current.search||!1===s.current.shouldFilter){i.current.filtered.count=n.current.size;return}i.current.filtered.groups=new Set;let u=0;for(let a of n.current){let n=G(null!=(t=null==(e=l.current.get(a))?void 0:e.value)?t:"",null!=(o=null==(r=l.current.get(a))?void 0:r.keywords)?o:[]);i.current.filtered.items.set(a,n),n>0&&u++}for(let[e,t]of a.current)for(let r of t)if(i.current.filtered.items.get(r)>0){i.current.filtered.groups.add(e);break}i.current.filtered.count=u}function z(){var e,t,r;let i=K();i&&((null==(e=i.parentElement)?void 0:e.firstChild)===i&&(null==(r=null==(t=i.closest(I))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),i.scrollIntoView({block:"nearest"}))}function K(){var e;return null==(e=O.current)?void 0:e.querySelector(`${k}[aria-selected="true"]`)}function q(){var e;return Array.from((null==(e=O.current)?void 0:e.querySelectorAll(A))||[])}function J(e){let t=q()[e];t&&D.setState("value",t.getAttribute(C))}function Q(e){var t;let r=K(),i=q(),n=i.findIndex(e=>e===r),a=i[n+e];null!=(t=s.current)&&t.loop&&(a=n+e0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,I):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,I))?void 0:r.querySelector(A);i?D.setState("value",i.getAttribute(C)):Q(e)}let Z=()=>J(q().length-1),ee=e=>{e.preventDefault(),e.metaKey?Z():e.altKey?X(1):Q(1)},et=e=>{e.preventDefault(),e.metaKey?J(0):e.altKey?X(-1):Q(-1)};return r.createElement(g.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":b&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":b&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),J(0);break;case"End":e.preventDefault(),Z();break;case"Enter":{e.preventDefault();let t=K();if(t){let e=new Event(R);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:U.inputId,id:U.labelId,style:H},u),W(e,e=>r.createElement(_.Provider,{value:D},r.createElement(N.Provider,{value:U},e))))}),D=r.forwardRef((e,t)=>{var i,n;let a=x(),l=r.useRef(null),o=r.useContext(O),s=r.useContext(N),u=$(e),c=null!=(n=null==(i=u.current)?void 0:i.forceMount)?n:null==o?void 0:o.forceMount;B(()=>{if(!c)return s.item(a,null==o?void 0:o.id)},[c]);let d=q(a,l,[e.value,e.children,l],e.keywords),f=r.useContext(_),m=K(e=>e.value&&e.value===d.current),p=K(e=>!!c||!1===s.filter()||!e.search||e.filtered.items.get(a)>0);function v(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,d.current)}function h(){f.setState("value",d.current,!0)}if(r.useEffect(()=>{let t=l.current;if(!(!t||e.disabled))return t.addEventListener(R,v),()=>t.removeEventListener(R,v)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:b,value:y,onSelect:w,forceMount:E,keywords:I,...P}=e;return r.createElement(g.div,{ref:(0,S.composeRefs)(l,t),...P,id:a,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||s.getDisablePointerSelection()?void 0:h,onClick:b?void 0:v},e.children)}),U=r.forwardRef((e,t)=>{let{heading:i,children:n,forceMount:a,...l}=e,o=x(),s=r.useRef(null),u=r.useRef(null),c=x(),d=r.useContext(N),f=K(e=>!!a||!1===d.filter()||!e.search||e.filtered.groups.has(o));B(()=>d.group(o),[]),q(o,s,[e.value,e.heading,u]);let m=r.useMemo(()=>({id:o,forceMount:a}),[a]);return r.createElement(g.div,{ref:(0,S.composeRefs)(s,t),...l,"cmdk-group":"",role:"presentation",hidden:!f||void 0},i&&r.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},i),W(e,e=>r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":i?c:void 0},r.createElement(O.Provider,{value:m},e))))}),G=r.forwardRef((e,t)=>{let{alwaysRender:i,...n}=e,a=r.useRef(null),l=K(e=>!e.search);return i||l?r.createElement(g.div,{ref:(0,S.composeRefs)(a,t),...n,"cmdk-separator":"",role:"separator"}):null}),L=r.forwardRef((e,t)=>{let{onValueChange:i,...n}=e,a=null!=e.value,l=r.useContext(_),o=K(e=>e.search),s=K(e=>e.selectedItemId),u=r.useContext(N);return r.useEffect(()=>{null!=e.value&&l.setState("search",e.value)},[e.value]),r.createElement(g.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":s,id:u.inputId,type:"text",value:a?e.value:o,onChange:e=>{a||l.setState("search",e.target.value),null==i||i(e.target.value)}})}),T=r.forwardRef((e,t)=>{let{children:i,label:n="Suggestions",...a}=e,l=r.useRef(null),o=r.useRef(null),s=K(e=>e.selectedItemId),u=r.useContext(N);return r.useEffect(()=>{if(o.current&&l.current){let e=o.current,t=l.current,r,i=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return i.observe(e),()=>{cancelAnimationFrame(r),i.unobserve(e)}}},[]),r.createElement(g.div,{ref:(0,S.composeRefs)(l,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:u.listId},W(e,e=>r.createElement("div",{ref:(0,S.composeRefs)(o,u.listInnerRef),"cmdk-list-sizer":""},e)))}),F=r.forwardRef((e,t)=>{let{open:i,onOpenChange:n,overlayClassName:a,contentClassName:l,container:o,...s}=e;return r.createElement(h.Root,{open:i,onOpenChange:n},r.createElement(h.Portal,{container:o},r.createElement(h.Overlay,{"cmdk-overlay":"",className:a}),r.createElement(h.Content,{"aria-label":e.label,"cmdk-dialog":"",className:l},r.createElement(M,{ref:t,...s}))))}),z=Object.assign(M,{List:T,Item:D,Input:L,Group:U,Separator:G,Dialog:F,Empty:r.forwardRef((e,t)=>K(e=>0===e.filtered.count)?r.createElement(g.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:r.forwardRef((e,t)=>{let{progress:i,children:n,label:a="Loading...",...l}=e;return r.createElement(g.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},W(e,e=>r.createElement("div",{"aria-hidden":!0},e)))})});function $(e){let t=r.useRef(e);return B(()=>{t.current=e}),t}var B="u"e(t.snapshot());return r.useSyncExternalStore(t.subscribe,i,i)}function q(e,t,i,n=[]){let a=r.useRef(),l=r.useContext(N);return B(()=>{var r;let o=(()=>{var e;for(let t of i){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),s=n.map(e=>e.trim());l.value(e,o,s),null==(r=t.current)||r.setAttribute(C,o),a.current=o}),a}var Y=()=>{let[e,t]=r.useState(),i=V(()=>new Map);return B(()=>{i.current.forEach(e=>e()),i.current=new Map},[e]),(e,r)=>{i.current.set(e,r),t({})}};function W({asChild:e,children:t},i){let n;return e&&r.isValidElement(t)?r.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},i(t.props.children)):i(t)}var H={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let J=(0,e.i(514514).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var Q=e.i(632137);function X({className:e,...r}){return(0,t.jsx)(z,{"data-slot":"command",className:(0,Q.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r})}function Z({className:e,...r}){return(0,t.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,t.jsx)(J,{className:"size-4 shrink-0 opacity-50"}),(0,t.jsx)(z.Input,{"data-slot":"command-input",className:(0,Q.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...r})]})}function ee({className:e,...r}){return(0,t.jsx)(z.List,{"data-slot":"command-list",className:(0,Q.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...r})}function et({className:e,...r}){return(0,t.jsx)(z.Group,{"data-slot":"command-group",className:(0,Q.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...r})}function er({className:e,...r}){return(0,t.jsx)(z.Item,{"data-slot":"command-item",className:(0,Q.cn)("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}e.i(367810);var ei=e.i(809058);e.s(["LocationInput",0,function({location:e,onChangeLocation:d,label:f="Search for a location",placeholder:m="Search city or zip code",className:p,error:v,disabled:h=!1}){let b=(0,i.useParams)(),g=b?.locale,[y,w]=(0,r.useState)(!1),[E,x]=(0,r.useState)(""),S=(0,s.default)(E.trim(),300),I=e?`${e.city}, ${e.adminDistrictCode||e.adminDistrict||e.displayContext}`:null,{isLoading:P,data:k}=(0,n.default)(S?["location-search",S,g]:null,([,e,t])=>(0,o.getLocationsByQuery)(e,t));return(0,t.jsxs)("div",{className:"w-full min-w-0",children:[(0,t.jsxs)(ei.Popover,{open:y,onOpenChange:w,children:[(0,t.jsx)(ei.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(c.Button,{variant:"outline",role:"combobox",disabled:h,"aria-expanded":y,"aria-invalid":!!v,className:(0,Q.cn)("flex w-full justify-start gap-2 bg-white px-3 text-left font-normal text-gray-900",p,!!e&&"border-black",v&&"border-alert-severe"),children:[P?(0,t.jsx)(l.LoaderCircle,{className:"size-4 shrink-0 animate-spin","aria-hidden":"true",title:""}):(0,t.jsx)(a.Location,{className:"size-4 shrink-0","aria-hidden":"true",title:""}),(0,t.jsx)("span",{className:"flex-1 truncate",children:I??f})]})}),(0,t.jsx)(ei.PopoverContent,{side:"bottom",align:"start",collisionPadding:8,className:"w-(--radix-popover-trigger-width) p-0",showArrow:!1,children:(0,t.jsxs)(X,{shouldFilter:!1,children:[(0,t.jsx)(Z,{placeholder:m,value:E,onValueChange:x}),(0,t.jsx)(ee,{className:"max-h-[min(200px,46vh)] min-h-10",children:(0,t.jsx)(et,{children:k?.map(e=>(0,t.jsx)(er,{value:e.locId,onSelect:()=>{d(e),w(!1)},children:e.address},e.locId))})})]})})]}),v&&(0,t.jsx)(u.Text,{variant:"Caption.S",color:"error",className:"mt-1",children:v})]})}],546334)}]);