(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,695018,(e,t,o)=>{function a(e,t,o,a){return Math.round(e/o)+" "+a+(t>=1.5*o?"s":"")}t.exports=function(e,t){t=t||{};var o,r,n,i,l=typeof e;if("string"===l&&e.length>0){var c=e;if(!((c=String(c)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(s){var d=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*d;case"weeks":case"week":case"w":return 6048e5*d;case"days":case"day":case"d":return 864e5*d;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*d;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*d;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:break}}}return}if("number"===l&&isFinite(e)){return t.long?(r=Math.abs(o=e))>=864e5?a(o,r,864e5,"day"):r>=36e5?a(o,r,36e5,"hour"):r>=6e4?a(o,r,6e4,"minute"):r>=1e3?a(o,r,1e3,"second"):o+" ms":(i=Math.abs(n=e))>=864e5?Math.round(n/864e5)+"d":i>=36e5?Math.round(n/36e5)+"h":i>=6e4?Math.round(n/6e4)+"m":i>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},702660,(e,t,o)=>{t.exports=function(t){function o(e){let t,r,n,i=null;function l(...e){if(!l.enabled)return;let a=Number(new Date);l.diff=a-(t||a),l.prev=t,l.curr=a,t=a,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,a)=>{if("%%"===t)return"%";r++;let n=o.formatters[a];if("function"==typeof n){let o=e[r];t=n.call(l,o),e.splice(r,1),r--}return t}),o.formatArgs.call(l,e),(l.log||o.log).apply(l,e)}return l.namespace=e,l.useColors=o.useColors(),l.color=o.selectColor(e),l.extend=a,l.destroy=o.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(r!==o.namespaces&&(r=o.namespaces,n=o.enabled(e)),n),set:e=>{i=e}}),"function"==typeof o.init&&o.init(l),l}function a(e,t){let a=o(this.namespace+(void 0===t?":":t)+e);return a.log=this.log,a}function r(e,t){let o=0,a=0,r=-1,n=0;for(;o"-"+e)].join(",");return o.enable(""),e},o.enable=function(e){for(let t of(o.save(e),o.namespaces=e,o.names=[],o.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?o.skips.push(t.slice(1)):o.names.push(t)},o.enabled=function(e){for(let t of o.skips)if(r(e,t))return!1;for(let t of o.names)if(r(e,t))return!0;return!1},o.humanize=e.r(695018),o.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{o[e]=t[e]}),o.names=[],o.skips=[],o.formatters={},o.selectColor=function(e){let t=0;for(let o=0;o{let a;var r=e.i(694914);o.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;e.splice(1,0,o,"color: inherit");let a=0,r=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(a++,"%c"===e&&(r=a))}),e.splice(r,0,o)},o.save=function(e){try{e?o.storage.setItem("debug",e):o.storage.removeItem("debug")}catch(e){}},o.load=function(){let e;try{e=o.storage.getItem("debug")||o.storage.getItem("DEBUG")}catch(e){}return!e&&void 0!==r.default&&"env"in r.default&&(e=r.default.env.DEBUG),e},o.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},o.storage=function(){try{return localStorage}catch(e){}}(),a=!1,o.destroy=()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],o.log=console.debug||console.log||(()=>{}),t.exports=e.r(702660)(o);let{formatters:n}=t.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},695881,(e,t,o)=>{"use strict";var a=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.createLogger=l,o.log=function(e,t,...o){l(e)(t,...o)};let r=a(e.r(272851));r.default.log=console.info.bind(console);let n=console.error.bind(console),i="wx-next";function l(e){let t=(0,r.default)(`${i}:${e}`),o=(0,r.default)(`${i}:debug:${e}`),a=(0,r.default)(`${i}:error:${e}`),c=(0,r.default)(`${i}:warn:${e}`),s=(0,r.default)(`${i}:lifecycle:${e}`);a.log=n;let d=(e,...o)=>{t(e,...o)};return d.info=(e,...o)=>{t(e,...o)},d.debug=(e,...t)=>{o(e,...t)},d.error=(e,...t)=>{a(e,...t)},d.warn=(e,...t)=>{c(e,...t)},d.lifecycle=(e,...t)=>{s(e,...t)},d.extend=t=>l(`${e}:${t}`),d}},375570,(e,t,o)=>{t.exports=e.r(135997)},632137,e=>{"use strict";var t=e.i(7284);let o=(0,e.i(923191).extendTailwindMerge)({extend:{classGroups:{"font-size":[{text:["xxs"]}]},theme:{color:[{brand:["100","200","300","400","dark","light"]}]}}});function a(...e){return o((0,t.clsx)(e))}e.s(["cn",()=>a])},630585,(e,t,o)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLocationSearchUrlConfig=function({query:e,language:t,locationType:o,countryCode:a,adminDistrictCode:r}){let n={query:e,language:t,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"};return o&&(n.locationType=o),a&&(n.countryCode=a),r&&(n.adminDistrictCode=r),{host:"api.weather.com",protocol:"https",pathname:"/v3/location/search",query:n}},o.getLocationPointUrlConfig=function({geocode:e,locId:t,placeId:o,canonicalCityId:a,language:r}){let n={language:r,format:"json",apiKey:"71f92ea9dd2f4790b92ea9dd2f779061"};return e&&(n.geocode=e),t&&(n.locid=t),o&&(n.placeid=o),a&&(n.canonicalCityId=a),{host:"api.weather.com",protocol:"https",pathname:"/v3/location/point",query:n}}},678651,(e,t,o)=>{"use strict";function a(e){let t=new URLSearchParams;for(let[o,a]of Object.entries(e))void 0!==a&&t.append(o,a);return t}Object.defineProperty(o,"__esModule",{value:!0}),o.queryStringToSearchParams=a,o.urlFrom=function({host:e,...t}){if(!e)throw Error("Host is missing");let o=new URL(`https://${e}`);return Object.assign(o,{...t,hostname:e}),t.query&&(o.search=a(t.query).toString()),o}},414655,(e,t,o)=>{"use strict";async function a(e){if(!e.ok)switch(e.status){case 401:throw Error("Unauthorized (status 401)");case 403:throw Error("Forbidden (status 403)");case 404:throw Error("Not found (status 404)");case 400:throw Error("Bad Request (status 400)");default:if(e.status>=500)throw Error(`Server error (status ${e.status})`);throw Error(`Unhandled error (status ${e.status})`)}try{if(204===e.status)return null;return await e.json()}catch(e){throw Error(`Invalid JSON response: ${e.message}`)}}async function r(e){if(!e.ok)switch(e.status){case 401:throw Error("Unauthorized (status 401)");case 403:throw Error("Forbidden (status 403)");case 404:throw Error("Not found (status 404)");case 400:throw Error("Bad Request (status 400)");default:if(e.status>=500)throw Error(`Server error (status ${e.status})`);throw Error(`Unhandled error (status ${e.status})`)}try{if(204===e.status)return"";return await e.text()}catch(e){throw Error(`Invalid text response: ${e.message}`)}}Object.defineProperty(o,"__esModule",{value:!0}),o.handleFetchResponse=a,o.handleFetchTextResponse=r},330091,(e,t,o)=>{"use strict";var a,r;Object.defineProperty(o,"__esModule",{value:!0}),o.ErrInvalidCanonicalCityID=o.ErrInvalidPlaceID=o.ErrInvalidPartialLocID9=o.ErrInvalidPartialLocID1=o.ErrInvalidUSZipCode=o.ErrInvalidLocID=o.ErrInvalidLatOrLong=o.ErrInvalidGeocode=o.ErrInvalid=o.LocationError=o.RegExpCanonicalCityID=o.RegExpPlaceID=o.RegExpPartialLocID9=o.RegExpPartialLocID1=o.RegExpUSZipCode=o.RegExpLocID=o.RegExpGeocode=o.LocationTypeMap=o.LocationType=void 0,o.valid=l,o.normalized=function(e,t){switch(t){case a.Geocode:return p(e);case a.LocID:return m(e);case a.USZipCode:return g(e);case a.PartialLocID1:return C(e);case a.PartialLocID9:return y(e);case a.PlaceID:return h(e);case a.CanonicalCityID:return I(e);default:return e}},o.testLocId=function(e){let t="";try{t=decodeURIComponent(e)}catch{}for(let e of(t=u(t),c))if(e.regex.test(t))return{type:e.type,locId:e.normalize(t)};return null},o.locIdFromSeoPhrase=u,o.normalizedGeocode=p,o.parseLatLonFromGeocode=function(e){let t=p(e).split(",");if(2!==t.length||!t[0]||!t[1])throw o.ErrInvalidGeocode;let a=parseFloat(t[0].trim()),r=parseFloat(t[1].trim());if(isNaN(a)||isNaN(r))throw o.ErrInvalidGeocode;return[a,r]},o.normalizeLatOrLong=f,o.normalizedLocID=m,o.normalizedUSZipCode=g,o.normalizedPartialLocID1=C,o.normalizedPartialLocID9=y,o.normalizedPlaceID=h,o.normalizedCanonicalCityID=I,o.geocodeFromLatLong=function(e,t){return`${e.toFixed(2)},${t.toFixed(2)}`},(r=a||(o.LocationType=a={}))[r.Geocode=0]="Geocode",r[r.LocID=1]="LocID",r[r.USZipCode=2]="USZipCode",r[r.PartialLocID1=3]="PartialLocID1",r[r.PartialLocID9=4]="PartialLocID9",r[r.PlaceID=5]="PlaceID",r[r.CanonicalCityID=6]="CanonicalCityID",o.LocationTypeMap={Geocode:"geocode",LocID:"locId",USZipCode:"locId",PartialLocID1:"locId",PartialLocID9:"locId",PlaceID:"placeId",CanonicalCityID:"canonicalCityId"},o.RegExpGeocode=/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/;let n=/.*(\+|-|\s)+(\w*|(\w{4}\d{4})|(\d+))(:(1|4|5|9|11|13|16|17|19|21|25|27))?(:\w{2})?$/;o.RegExpLocID=/^([^+|^:]*):(1|4|5|9|11|13|16|17|19|21|25|27):\w{2}$/,o.RegExpUSZipCode=/^\d{5}(:\d)?(\w{2})?$/,o.RegExpPartialLocID1=/^\w{4}\d{4}(:1)?$/,o.RegExpPartialLocID9=/^([a-zA-Z]{3}):.*$/,o.RegExpPlaceID=/^([0-9a-f]){32,}$/,o.RegExpCanonicalCityID=o.RegExpPlaceID;class i extends Error{constructor(e){super(e),this.name="LocationError"}}function l(e,t){switch(t){case a.Geocode:return o.RegExpGeocode.test(e)&&"0.00,0.00"!==e;case a.LocID:return o.RegExpLocID.test(e);case a.USZipCode:return o.RegExpUSZipCode.test(e);case a.PartialLocID1:return o.RegExpPartialLocID1.test(e);case a.PartialLocID9:return o.RegExpPartialLocID9.test(e);case a.PlaceID:return o.RegExpPlaceID.test(e);case a.CanonicalCityID:return o.RegExpCanonicalCityID.test(e);default:return!1}}o.LocationError=i,o.ErrInvalid=new i("location: invalid location"),o.ErrInvalidGeocode=new i("location: invalid location: invalid geocode"),o.ErrInvalidLatOrLong=new i("location: invalid location: invalid latitude or longitude"),o.ErrInvalidLocID=new i("location: invalid location: invalid locid"),o.ErrInvalidUSZipCode=new i("location: invalid location: invalid US zip code"),o.ErrInvalidPartialLocID1=new i("location: invalid location: invalid partial locid type 1"),o.ErrInvalidPartialLocID9=new i("location: invalid location: invalid partial locid type 9"),o.ErrInvalidPlaceID=new i("location: invalid location: invalid placeid"),o.ErrInvalidCanonicalCityID=new i("location: invalid location: invalid canonical city ID");let c=[{regex:o.RegExpGeocode,type:o.LocationTypeMap.Geocode,normalize:p},{regex:o.RegExpLocID,type:o.LocationTypeMap.LocID,normalize:m},{regex:o.RegExpUSZipCode,type:o.LocationTypeMap.USZipCode,normalize:g},{regex:o.RegExpPartialLocID1,type:o.LocationTypeMap.PartialLocID1,normalize:C},{regex:o.RegExpPartialLocID9,type:o.LocationTypeMap.PartialLocID9,normalize:y},{regex:o.RegExpPlaceID,type:o.LocationTypeMap.PlaceID,normalize:h},{regex:o.RegExpCanonicalCityID,type:o.LocationTypeMap.CanonicalCityID,normalize:I}],s=/-/,d=/\s/;function u(e){let t=e;if(n.test(e))if(s.test(e)){let o=e.split("-").pop();o&&(t=o)}else if(d.test(e)){let o=e.split(" ").pop();o&&(t=o)}else{let o=e.split("+").pop();o&&(t=o)}return t}function p(e){if(""===e||!l(e,a.Geocode))throw o.ErrInvalidGeocode;let t=e.split(",");if(2!==t.length)throw o.ErrInvalidGeocode;try{for(let e=0;e{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getLocationPointByPlaceId=l,o.getLocationPointByGeocode=c,o.getLocationPointByLocIdParam=s,o.getLocationPointByCanonicalCityId=d;let a=e.r(630585),r=e.r(678651),n=e.r(414655),i=e.r(330091);async function l(e,t){let o=(0,r.urlFrom)((0,a.getLocationPointUrlConfig)({placeId:e,language:t})),i=await fetch(o,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:86400}});return(0,n.handleFetchResponse)(i)}async function c(e,t){let o=(0,r.urlFrom)((0,a.getLocationPointUrlConfig)({geocode:e,language:t})),i=await fetch(o,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:86400}});return(0,n.handleFetchResponse)(i)}async function s(e,t){let o=(0,i.testLocId)(e);if(!o)throw Error("Not a valid locId or type supported");let l=(0,r.urlFrom)((0,a.getLocationPointUrlConfig)({[o.type]:o.locId,language:t})),c=await fetch(l,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:86400}});return(0,n.handleFetchResponse)(c)}async function d(e,t){let o=(0,r.urlFrom)((0,a.getLocationPointUrlConfig)({canonicalCityId:e,language:t})),i=await fetch(o,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:86400}});return(0,n.handleFetchResponse)(i)}},295553,e=>{"use strict";let t=(0,e.i(751931).atom)();e.s(["pageLocationDataAtom",0,t])},579310,427309,150137,e=>{"use strict";var t=e.i(751931),o=e.i(889753);let a=(0,e.i(834354).focusAtom)(o.userPreferencesAtom,e=>e.prop("locations")),r=(0,t.atom)(e=>e(o.userPreferencesAtom)?.locations||[]);(0,t.atom)(e=>{let t=e(r);return t?.find(e=>0===e.position)||t?.[0]||null}),(0,t.atom)(e=>(e(r)?.length||0)>0),e.s(["userLocationsAtom",0,a,"userLocationsGetAtom",0,r],579310);var n=e.i(186316);let i=(0,n.getCookie)("twc-location-geocode")?.toString()||null,l=(0,t.atom)(i),c=(0,n.getCookie)("twc-location-country")?.toString()||null,s=(0,t.atom)(c);e.s(["geoipCountry",0,s,"geoipGeocode",0,l],427309);var d=e.i(405052),u=e.i(695881),p=e.i(233601);let f=(0,u.createLogger)("getGeolocationAPIGeocode");async function m(e=1e4){try{let t=sessionStorage.getItem("wxu-web/key-val:html5Geolocation");if(t){let{latitude:e,longitude:o,timestamp:a,permissionDenied:r}=JSON.parse(t),n=Date.now()-a;if(r&&nnavigator.geolocation.getCurrentPosition(e=>{let{latitude:o,longitude:a}=e.coords;sessionStorage.setItem("wxu-web/key-val:html5Geolocation",JSON.stringify({latitude:o,longitude:a,permissionDenied:!1,timestamp:Date.now()})),t({latitude:o,longitude:a})},e=>{e.code===e.PERMISSION_DENIED&&sessionStorage.setItem("wxu-web/key-val:html5Geolocation",JSON.stringify({permissionDenied:!0,timestamp:Date.now()})),o(e)},{enableHighAccuracy:!0,timeout:e,maximumAge:0}))}catch(e){f.error("getGeolocationAPIGeocode error: ",e)}}var g=e.i(333350);let C=(0,u.createLogger)("geolocationApi");(0,t.atom)(async()=>{try{return(await navigator.permissions.query({name:"geolocation"})).state}catch(e){C.error(e)}});let y=(0,t.atom)(async()=>{if(!g.default)return;let e=await m();if(e?.latitude&&e?.longitude)return(0,d.formatGeocode)(`${e?.latitude},${e?.longitude}`)}),h=(0,t.atom)(void 0),I=(0,t.atom)(e=>{let t=e((0,p.loadable)(y));return"hasData"===t.state?t.data:void 0});e.s(["geolocationAPIGeocodeAtom",0,I,"undefinedAtom",0,h],150137)},335355,e=>{"use strict";var t=e.i(751931),o=e.i(889753);let a=(0,t.atom)(e=>e(o.userPreferencesAtom)?.locale||"en_US");(0,t.atom)(e=>e(a).split("_")[0]);let r=(0,t.atom)(e=>e(a).split("_")[1]);e.s(["userCountryAtom",0,r,"userLocaleAtom",0,a])},405052,935807,919101,e=>{"use strict";function t(e){if(!e||!e.includes(","))return e;let t=e.split(",");if(2!==t.length)return e;let[o,a]=t,r=parseFloat(o||"0").toFixed(2),n=parseFloat(a||"0").toFixed(2);return`${r},${n}`}function o(e,t=[],a=!1,r="US",i){let l,c=t.find(t=>t.placeID===e.placeId);if(c&&a){let t=c.userTag||c.name;if(t&&"Other"!==t){let o=e.displayName,a=n(e,r,"");if(t!==o&&t!==a)return t}}if(e?.disputedCountries)l=e.displayName||"";else{switch(e?.type){case"address":l=e?.address?.split(",")[0]?.trim()||"";break;case"city":l=e?.locale?.locale2||"";break;case"locality":l=e?.locale?.locale3||"";break;case"neighborhood":l=e?.locale?.locale4||"";break;case"airport":l=e?.airportName||"";break;case"postal":{let t=e?.locale?.locale4||e?.locale?.locale3||e?.locale?.locale2||"",o=e?.postalCode||"";l=i?`${t} ${o}`.trim():`${t}`.trim();break}default:l=e?.displayName||""}0===l.length&&(l=e?.displayName||"")}return l}function a(e,t=[],o=!1,r="US",i){let l,c=t.find(t=>t.placeID===e.placeId);if(c&&o){let t=c.userTag||c.name;if(t&&"Other"!==t){let o=e.displayName,a=n(e,r,"");if(t!==o&&t!==a)return function(e,t="US"){if(e?.disputedCountries)return e?.displayName||"";let o=t===e?.countryCode?"":e?.country||"";switch(e?.type){case"city":{let t=e?.adminDistrict||"";return[e?.locale?.locale2||"",t,o].filter(Boolean).join(", ")}case"locality":{let t=e?.adminDistrict||e?.locale?.locale2||"";return[e.locale?.locale3||"",t,o].filter(Boolean).join(", ")}case"neighborhood":{let t=e?.adminDistrict||"";return[e?.locale?.locale4||"",e?.locale?.locale3||e?.locale?.locale2||"",t,o].filter(Boolean).join(", ")}case"postal":{let t=e?.adminDistrict||"",a=e?.postalCode||"";return[e?.locale?.locale4||e?.locale?.locale3||e?.locale?.locale2||"",`${t} ${a}`.trim(),o].filter(Boolean).join(", ")}default:{let t=e?.adminDistrict||"";return[e?.locale?.locale2||"",t,o].filter(Boolean).join(", ")}}}(e,r)}}if(e?.disputedCountries)l=e?.displayName||"";else{let t=r===e?.countryCode?"":e?.country||"",o=e?.adminDistrict||"",a=e?.postalCode||"",n=e.city||"";switch(e?.type){case"address":l=[n,o,t].filter(Boolean).join(", ");break;case"city":default:l=[o,t].filter(Boolean).join(", ");break;case"locality":l=[e?.locale?.locale2||"",o,t].filter(Boolean).join(", ");break;case"neighborhood":l=[e?.locale?.locale3||e?.locale?.locale2||"",o,t].filter(Boolean).join(", ");break;case"postal":{let r=o||e?.locale?.locale2||"";l=[i?`${r} ${a}`.trim():r,t].filter(Boolean).join(", ")}}}return l}function r(e,t=[],n=!1,i="US"){let l=o(e,t,n,i,!1),c=a(e,t,n,i,!0),s=e?.separator?e?.separator:l&&c?", ":"";return`${l}${s}${c}`.trim()}function n(e,t,o){let{displayName:a,adminDistrictCode:r,adminDistrict:n,countryCode:i,disputedArea:l,country:c}=e,s=[];return a&&s.push(a),"IL"!==t&&(r?s.push(r):n&&s.push(n)),i!==t&&!1===l&&c&&s.push(c),s.join(o)}e.s(["formatGeocode",()=>t],405052),e.s(["getLocationContext",()=>a,"getLocationName",()=>o,"getLocationPresentationName",()=>r],935807),e.s(["getAddressForLocationData",0,(e,t)=>{if(!e||!Array.isArray(t))return e;let o=t.find(t=>t.placeId===e.placeId);return o?{...e,displayName:o.address,address:o.address}:e}],919101)},472737,77323,e=>{"use strict";var t,o=e.i(477716),a=e.i(475566),r=e.i(381477),n=e.i(579310),i=e.i(310847),l=e.i(427309),c=e.i(343277),s=e.i(295553),d=e.i(375570),u=e.i(150137),p=e.i(405052),f=e.i(528600),m=e.i(935807),g=e.i(335355),C=e.i(919101);function y(){let e=(0,a.useAtomValue)(n.userLocationsGetAtom),t=(0,a.useAtomValue)(g.userLocaleAtom),r=t?.slice(3)||"US",{user:l}=(0,f.useUser)(),c=l.isUserLoggedIn,s=(0,a.useAtomValue)(i.wxuUserRecentAddressesAtom);return(0,o.useMemo)(()=>({getLocationName:(t,o)=>(0,m.getLocationName)((0,C.getAddressForLocationData)(t,s),e,c,r,o),getLocationContext:(t,o)=>(0,m.getLocationContext)((0,C.getAddressForLocationData)(t,s),e,c,r,o),getLocationPresentationName:t=>(0,m.getLocationPresentationName)((0,C.getAddressForLocationData)(t,s),e,c,r)}),[])}e.s(["usePresentationName",()=>y],77323);var h=((t={}).PREFER_FAVORITES="preferFavorites",t.PREFER_RECENT="preferRecent",t);function I({location:e,fallbackOrder:t="preferFavorites"}={}){let f=(0,d.useParams)(),m=f?.locale,g=(0,o.useMemo)(()=>e,[e?.placeId,e?.geocode,e?.address]),h=(0,a.useAtomValue)(s.pageLocationDataAtom),v=(0,a.useAtomValue)(n.userLocationsAtom),L=(0,a.useAtomValue)(i.wxuUserRecentLocationsAtom),w=!f?.locId&&!g&&!v?.length&&!L?.length,D=(0,a.useAtomValue)(w?u.geolocationAPIGeocodeAtom:u.undefinedAtom),F=(0,a.useAtomValue)(l.geoipGeocode),E=Array.isArray(v)&&v.length>0?v[0]?.coordinate:null,P=Array.isArray(L)&&L.length>0?L[0]:null,x="preferFavorites"===t,b="preferRecent"===t,A=e=>(0,c.getLocationPointByGeocode)(e,m),{data:R,error:U,isLoading:S}=(0,r.default)(!g&&E&&(x||b&&!P)?["/v3/location/point",E]:null,()=>E?A(E):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),{data:$,error:N,isLoading:G}=(0,r.default)(!g&&P&&(b||x&&!E)?["/v3/location/point",P]:null,()=>P?(0,c.getLocationPointByPlaceId)(P,m):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),{data:k,error:O,isLoading:j}=(0,r.default)(w&&D?["/v3/location/point",D]:null,()=>D?A(D):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),{data:T,error:z,isLoading:M}=(0,r.default)(g||!F||E||P||D?null:["/v3/location/point",F],()=>F?A(F):null,{revalidateOnFocus:!1,dedupingInterval:3e5}),{fromLocationPoint:Z}=function(){let{getLocationName:e,getLocationContext:t,getLocationPresentationName:o}=y(),r=(0,a.useAtomValue)(i.wxuUserRecentAddressesAtom);return{fromLocationPoint:a=>{let n=(0,C.getAddressForLocationData)(a.location,r);return{displayName:n.displayName,adminDistrict:n.adminDistrict,geocode:(0,p.formatGeocode)(`${n.latitude},${n.longitude}`),placeId:n.placeId,city:n.city,countryCode:n.countryCode,adminDistrictCode:n.adminDistrictCode||"",presentationName:o(n),name:e(n),context:t(n),ianaTimeZone:n.ianaTimeZone,postalCode:n.postalCode,address:n.address||"",type:n.type}},fromLocationSearchItem:a=>{let n=(0,C.getAddressForLocationData)(a,r);return{displayName:n.displayName,adminDistrict:n.adminDistrict,geocode:(0,p.formatGeocode)(`${n.latitude},${n.longitude}`),placeId:n.placeId,city:n.city,countryCode:n.countryCode,adminDistrictCode:n.adminDistrictCode||"",presentationName:o(n),name:e(n),context:t(n),ianaTimeZone:n.ianaTimeZone,postalCode:n.postalCode,address:n.address||"",type:n.type}}}}();return{effectiveLocation:(0,o.useMemo)(()=>{let e;return g?e=g:h?e=h:R&&E?e=Z(R):U&&E?(console.error("Error fetching favorite location data:",U),e={displayName:"Favorite Location",adminDistrict:"",geocode:E,placeId:"unknown",ianaTimeZone:""}):$&&P?e=Z($):N&&P?(console.error("Error fetching recent location data:",N),e={displayName:"Recent Location",adminDistrict:"",geocode:"",placeId:P,ianaTimeZone:""}):k&&D?e=Z(k):O&&D?(console.error("Error fetching geolocation API data:",O),e={displayName:"Unknown Location",adminDistrict:"",geocode:D,placeId:"unknown",city:"",countryCode:"",adminDistrictCode:"",ianaTimeZone:""}):T&&F?e=Z(T):z&&F&&(console.error("Error fetching geoip location data:",z),e={displayName:"Unknown Location",adminDistrict:"",geocode:F,placeId:"unknown",city:"",countryCode:"",adminDistrictCode:"",ianaTimeZone:""}),e},[g,R,U,$,P,D,k,F,T,h,E,b,z,N]),isLocationLoading:!!x&&S||!!b&&G||j||M,locationError:(x?U:null)||(b?N:null)||O||z}}e.s(["LocationFallbackOrder",()=>h,"useLocationSource",()=>I],472737)}]);