diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ + diff --git a/assets/index-CPSikBCn.css b/assets/index-CPSikBCn.css new file mode 100644 index 0000000..f105738 --- /dev/null +++ b/assets/index-CPSikBCn.css @@ -0,0 +1 @@ +:root{color-scheme:light;--bg: oklch(97% .018 205);--surface: oklch(100% 0 0);--surface-soft: oklch(95% .02 205);--glass: oklch(100% 0 0 / .78);--fg: oklch(19% .025 190);--muted: oklch(47% .025 190);--muted-2: oklch(62% .02 190);--border: oklch(86% .028 205);--accent: oklch(58% .13 208);--accent-2: oklch(70% .15 82);--green: oklch(58% .14 155);--yellow: oklch(72% .13 88);--orange: oklch(66% .16 50);--red: oklch(58% .19 25);--sky-glow: oklch(83% .105 215 / .42);--sun-glow: oklch(85% .16 82 / .28);--shadow: 0 24px 72px -44px oklch(22% .06 215 / .55);--radius: 22px;--radius-sm: 14px;--font-display: "Avenir Next", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;font-family:var(--font-body);background:var(--bg);color:var(--fg)}html[data-theme=dark]{color-scheme:dark;--bg: oklch(18% .035 236);--surface: oklch(23% .04 236);--surface-soft: oklch(27% .045 236);--glass: oklch(23% .04 236 / .76);--fg: oklch(96% .012 220);--muted: oklch(76% .028 220);--muted-2: oklch(64% .03 220);--border: oklch(37% .045 236);--accent: oklch(73% .13 210);--accent-2: oklch(78% .15 78);--green: oklch(72% .13 155);--yellow: oklch(82% .13 88);--orange: oklch(75% .16 50);--red: oklch(70% .18 25);--sky-glow: oklch(42% .11 240 / .45);--sun-glow: oklch(73% .15 78 / .18);--shadow: 0 30px 82px -46px oklch(4% .02 236 / .82)}*{box-sizing:border-box}html{min-width:320px;background:var(--bg)}body{min-width:320px;margin:0;overflow-x:clip;background:radial-gradient(circle at 14% -12%,var(--sun-glow),transparent 34vw),radial-gradient(circle at 84% 0,var(--sky-glow),transparent 36vw),linear-gradient(180deg,color-mix(in oklch,var(--bg),var(--accent) 12%) 0,var(--bg) 420px),var(--bg);color:var(--fg);font-family:var(--font-body);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}a{color:inherit}:focus-visible{outline:3px solid color-mix(in oklch,var(--accent),white 28%);outline-offset:3px}.app-shell{min-height:100dvh}.topbar{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:1fr;gap:14px;padding:16px clamp(16px,4vw,34px);border-bottom:1px solid color-mix(in oklch,var(--border),transparent 20%);background:var(--glass);box-shadow:0 16px 44px -34px color-mix(in oklch,var(--fg),transparent 35%);-webkit-backdrop-filter:blur(20px) saturate(1.18);backdrop-filter:blur(20px) saturate(1.18)}.brand-mark{display:inline-flex;align-items:center;gap:10px;width:fit-content;text-decoration:none;font-family:var(--font-display);font-size:1.02rem;letter-spacing:0}.brand-mark span{display:grid;width:34px;height:34px;place-items:center;border:1px solid color-mix(in oklch,var(--accent),white 52%);border-radius:11px;color:var(--accent);background:color-mix(in oklch,var(--accent),white 89%)}.topbar-actions{display:grid;gap:12px;min-width:0}.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;width:fit-content;padding:0 14px;border:1px solid color-mix(in oklch,var(--border),var(--accent) 18%);border-radius:999px;color:var(--fg);background:color-mix(in oklch,var(--surface),var(--accent) 6%);box-shadow:0 14px 34px -28px color-mix(in oklch,var(--accent),black 45%);font-size:.86rem;font-weight:780;transition:transform .18s cubic-bezier(.23,1,.32,1),border-color .18s cubic-bezier(.23,1,.32,1),background .18s cubic-bezier(.23,1,.32,1)}.theme-toggle:hover{transform:translateY(-1px);border-color:color-mix(in oklch,var(--accent),var(--fg) 8%);background:color-mix(in oklch,var(--surface),var(--accent) 12%)}.theme-toggle:active{transform:translateY(1px) scale(.99)}.theme-toggle svg{color:var(--accent-2)}.search-cluster{position:relative;display:grid;gap:10px}.search-form{display:grid;gap:7px}.search-form label,.profile-selector legend{color:var(--muted);font-size:.73rem;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.search-input-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;min-height:46px;padding:5px 5px 5px 13px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow)}.search-input-row svg{color:var(--muted)}.search-input-row input{width:100%;min-width:0;border:0;outline:0;color:var(--fg);background:transparent}.search-input-row input::placeholder{color:var(--muted-2)}.search-input-row button,.geo-button,.error-banner button{min-height:36px;border:0;border-radius:12px;color:#fff;background:var(--fg);font-size:.88rem;font-weight:760;transition:transform .18s cubic-bezier(.23,1,.32,1),background .18s cubic-bezier(.23,1,.32,1)}.search-input-row button{padding:0 14px}.search-input-row button:hover,.geo-button:hover,.error-banner button:hover{transform:translateY(-1px);background:color-mix(in oklch,var(--fg),var(--accent) 18%)}.search-input-row button:active,.geo-button:active,.error-banner button:active{transform:translateY(1px) scale(.99)}.geo-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 14px;color:var(--fg);border:1px solid var(--border);background:var(--surface)}.geo-button:hover{color:var(--fg);background:color-mix(in oklch,var(--surface),var(--accent) 7%)}.search-popover{position:absolute;top:calc(100% + 8px);right:0;left:0;z-index:30;display:grid;gap:6px;padding:8px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 24px 64px -30px #001b1a75;box-shadow:0 24px 64px -30px oklch(20% .04 190 / .46)}.search-popover p{margin:0;padding:8px 10px;color:var(--muted);font-size:.9rem}.search-popover button{display:flex;align-items:center;gap:8px;min-height:40px;border:0;border-radius:10px;color:var(--fg);background:transparent;text-align:left}.search-popover button:hover{background:var(--surface-soft)}.profile-selector{min-width:0;margin:0;padding:0;border:0}.profile-options{display:flex;gap:7px;margin-top:7px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.profile-options label{position:relative;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;min-height:38px;white-space:nowrap;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--muted);font-size:.86rem;font-weight:720;transition:color .18s cubic-bezier(.23,1,.32,1),border-color .18s cubic-bezier(.23,1,.32,1),background .18s cubic-bezier(.23,1,.32,1)}.profile-options label.selected{color:var(--fg);border-color:color-mix(in oklch,var(--accent),black 4%);background:color-mix(in oklch,var(--accent),white 87%)}.profile-options input{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;opacity:0}.profile-options span{padding:0 13px}.dashboard-shell{width:min(1480px,calc(100% - 28px));margin:0 auto;padding:24px 0 46px}.dashboard-intro{display:grid;gap:4px;max-width:820px;margin-bottom:18px}.dashboard-intro p{margin:0;color:var(--muted);font-size:clamp(.94rem,1.5vw,1.04rem)}.eyebrow{margin:0;color:color-mix(in oklch,var(--accent),var(--fg) 26%);font-size:.72rem;font-weight:820;letter-spacing:.13em;text-transform:uppercase}.dashboard-grid{display:grid;grid-template-columns:1fr;gap:18px;min-width:0}.primary-column,.secondary-column{display:grid;min-width:0;gap:18px;align-content:start}.semaforo-panel,.recommendation-panel,.timeline-panel,.forecast-panel,.why-panel,.error-banner{border:1px solid var(--border);border-radius:var(--radius);background:color-mix(in oklch,var(--surface),var(--risk-color, var(--accent)) 2%);box-shadow:var(--shadow)}.semaforo-panel{--risk-color: var(--green);display:grid;min-width:0;gap:24px;padding:clamp(20px,4vw,34px);overflow:hidden;transition:border-color .22s cubic-bezier(.23,1,.32,1),background .22s cubic-bezier(.23,1,.32,1)}.risk-green{--risk-color: var(--green)}.risk-yellow{--risk-color: var(--yellow)}.risk-orange{--risk-color: var(--orange)}.risk-red{--risk-color: var(--red)}.semaforo-topline{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;color:var(--muted);font-size:.84rem;font-weight:680}.semaforo-content{display:grid;grid-template-columns:auto minmax(0,1fr);gap:clamp(18px,4vw,30px);align-items:center;min-width:0}.semaforo-content>div{min-width:0}.risk-orb{display:grid;width:clamp(84px,20vw,132px);aspect-ratio:1;place-items:center;border:1px solid color-mix(in oklch,var(--risk-color),white 32%);border-radius:50%;background:radial-gradient(circle at 45% 40%,color-mix(in oklch,var(--risk-color),white 10%) 0 28%,transparent 29%),color-mix(in oklch,var(--risk-color),white 84%)}.risk-orb span{width:48%;aspect-ratio:1;border-radius:50%;background:var(--risk-color);box-shadow:inset 0 1px #fff6}.semaforo-content h1{margin:4px 0 0;font-family:var(--font-display);font-size:clamp(3.25rem,8vw,6.4rem);line-height:.86;letter-spacing:0;overflow-wrap:anywhere}.risk-label{margin:13px 0 0;color:var(--fg);font-weight:820}.risk-summary{max-width:650px;margin:10px 0 0;color:var(--muted);font-size:clamp(1.04rem,1.8vw,1.28rem);line-height:1.42;text-wrap:pretty}.current-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:0;overflow:hidden;border:1px solid color-mix(in oklch,var(--risk-color),white 45%);border-radius:18px;background:color-mix(in oklch,var(--risk-color),white 72%)}.current-strip div{min-width:0;padding:14px;background:color-mix(in oklch,var(--surface),var(--risk-color) 4%)}.current-strip dt,.metric-tile span,.forecast-day dt,.timeline-hour dt{color:var(--muted);font-size:.72rem;font-weight:760;letter-spacing:.06em;text-transform:uppercase}.current-strip dd{margin:5px 0 0;overflow:hidden;font-weight:840;text-overflow:ellipsis;white-space:nowrap}.profile-note{display:flex;gap:8px;align-items:flex-start;color:var(--muted);font-size:.92rem}.metrics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-tile{display:grid;min-width:0;gap:5px;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}.metric-tile svg{color:var(--accent)}.metric-tile strong{font-size:clamp(1.25rem,4vw,1.85rem);font-variant-numeric:tabular-nums;line-height:1}.metric-tile small{overflow:hidden;color:var(--muted);font-size:.84rem;text-overflow:ellipsis;white-space:nowrap}.section-heading{display:grid;gap:5px;margin-bottom:16px}.section-heading h2{margin:0;font-family:var(--font-display);font-size:clamp(1.2rem,3vw,1.65rem);line-height:1.05;letter-spacing:0}.inline-heading{grid-template-columns:auto minmax(0,1fr);align-items:start}.recommendation-panel,.timeline-panel,.forecast-panel,.why-panel{min-width:0;padding:clamp(18px,3vw,24px)}.recommendation-list{display:grid;gap:10px}.recommendation-chip{--risk-color: var(--accent);display:grid;grid-template-columns:auto minmax(0,1fr);gap:11px;align-items:start;padding:13px;border:1px solid color-mix(in oklch,var(--risk-color),white 45%);border-radius:16px;background:color-mix(in oklch,var(--risk-color),white 88%)}.recommendation-chip svg{color:color-mix(in oklch,var(--risk-color),black 12%)}.recommendation-chip strong,.recommendation-chip span{display:block}.recommendation-chip strong{font-size:.94rem}.recommendation-chip span{margin-top:2px;color:var(--muted);font-size:.86rem;line-height:1.35}.timeline-scroll{display:grid;grid-auto-columns:minmax(172px,1fr);grid-auto-flow:column;gap:10px;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:4px;scroll-snap-type:x proximity}.timeline-hour{display:grid;gap:8px;min-height:202px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--surface);scroll-snap-align:start}.timeline-hour time{color:var(--fg);font-weight:840;font-variant-numeric:tabular-nums}.timeline-hour strong{font-size:1.65rem;font-variant-numeric:tabular-nums}.timeline-hour>span{min-height:36px;color:var(--muted);font-size:.9rem}.timeline-hour dl,.forecast-day dl{display:grid;gap:8px;margin:0}.timeline-hour dt,.forecast-day dt{display:flex;gap:5px;align-items:center}.timeline-hour dd,.forecast-day dd{margin:2px 0 0;font-weight:780;font-variant-numeric:tabular-nums}.forecast-list{display:grid;gap:9px}.forecast-day{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0;border-top:1px solid var(--border)}.forecast-day:first-child{border-top:0;padding-top:0}.forecast-day time{display:block;font-weight:830;text-transform:capitalize}.forecast-day span{color:var(--muted);font-size:.9rem}.forecast-day strong{font-size:1.18rem;font-variant-numeric:tabular-nums}.factor-list{display:grid;gap:13px}.factor-row{display:grid;gap:7px}.factor-row>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.factor-row span,.factor-row p{color:var(--muted)}.factor-row span{font-size:.86rem;font-variant-numeric:tabular-nums}.factor-row p{margin:0;font-size:.88rem;line-height:1.38}.factor-row meter{width:100%;height:9px;overflow:hidden;border:0;border-radius:999px;background:var(--surface-soft)}.factor-row meter::-webkit-meter-bar{border:0;border-radius:999px;background:var(--surface-soft)}.factor-row meter::-webkit-meter-optimum-value,.factor-row meter::-webkit-meter-suboptimum-value,.factor-row meter::-webkit-meter-even-less-good-value{border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.factor-row meter::-moz-meter-bar{border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.error-banner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;margin-bottom:16px;padding:13px;border-color:color-mix(in oklch,var(--orange),white 36%);background:color-mix(in oklch,var(--orange),white 88%)}.error-banner p{margin:0;color:var(--fg);font-size:.92rem}.error-banner button{grid-column:1 / -1;display:inline-flex;align-items:center;justify-content:center;gap:7px;width:100%}.skeleton-grid{display:grid;gap:18px}.skeleton{position:relative;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);background:color-mix(in oklch,var(--surface),var(--accent) 3%)}.skeleton:after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";transform:translate(-100%);background:linear-gradient(90deg,transparent,oklch(100% 0 0 / .66),transparent);animation:shimmer 1.2s infinite}.skeleton-hero{min-height:360px}.skeleton-side{min-height:260px}.skeleton-wide{min-height:210px}.spin{animation:spin .8s linear infinite}@keyframes shimmer{to{transform:translate(100%)}}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:no-preference){.risk-orb span{animation:pulse-risk 2.4s cubic-bezier(.23,1,.32,1) infinite}@keyframes pulse-risk{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}}@media(min-width:760px){.topbar{grid-template-columns:minmax(155px,auto) minmax(320px,1fr);align-items:end}.topbar-actions{grid-column:1 / -1;grid-template-columns:auto minmax(0,1fr);align-items:end}.profile-selector{min-width:0}.search-cluster{grid-template-columns:minmax(0,1fr) auto;align-items:end}.metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.current-strip{grid-template-columns:repeat(4,minmax(0,1fr))}.forecast-day{grid-template-columns:minmax(0,1.1fr) auto minmax(190px,.9fr);align-items:center}.forecast-day dl{grid-template-columns:repeat(3,minmax(0,1fr))}.error-banner{grid-template-columns:auto minmax(0,1fr) auto}.error-banner button{grid-column:auto;width:auto;padding:0 13px}}@media(min-width:1180px){.topbar{grid-template-columns:auto minmax(440px,1fr) minmax(560px,auto);align-items:end}.topbar-actions{grid-column:auto;grid-template-columns:auto minmax(0,1fr);align-items:end}.profile-options{justify-content:flex-end}.dashboard-shell{padding-top:30px}.dashboard-grid{grid-template-columns:minmax(0,1.42fr) minmax(360px,.72fr);align-items:start}.secondary-column .forecast-day{grid-template-columns:minmax(0,1fr) auto}.secondary-column .forecast-day dl{grid-column:1 / -1;grid-template-columns:repeat(3,minmax(0,1fr))}.semaforo-panel{min-height:438px}.semaforo-content{grid-template-columns:minmax(150px,.24fr) minmax(0,1fr)}.metrics-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(max-width:520px){.dashboard-shell{width:min(100% - 20px,1480px);padding-top:18px}.topbar{padding:12px 10px}.theme-toggle{width:100%}.semaforo-content{grid-template-columns:1fr}.risk-orb{width:86px}.metrics-grid{grid-template-columns:1fr}} diff --git a/assets/index-Do1NYCCz.js b/assets/index-Do1NYCCz.js new file mode 100644 index 0000000..e246c44 --- /dev/null +++ b/assets/index-Do1NYCCz.js @@ -0,0 +1,160 @@ +(function(){const p=document.createElement("link").relList;if(p&&p.supports&&p.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))x(E);new MutationObserver(E=>{for(const z of E)if(z.type==="childList")for(const $ of z.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&x($)}).observe(document,{childList:!0,subtree:!0});function f(E){const z={};return E.integrity&&(z.integrity=E.integrity),E.referrerPolicy&&(z.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?z.credentials="include":E.crossOrigin==="anonymous"?z.credentials="omit":z.credentials="same-origin",z}function x(E){if(E.ep)return;E.ep=!0;const z=f(E);fetch(E.href,z)}})();function Js(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Mo={exports:{}},Er={},To={exports:{}},Q={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $s;function ad(){if($s)return Q;$s=1;var u=Symbol.for("react.element"),p=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),$=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),G=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),H=Symbol.iterator;function K(d){return d===null||typeof d!="object"?null:(d=H&&d[H]||d["@@iterator"],typeof d=="function"?d:null)}var Se={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pe=Object.assign,V={};function W(d,w,B){this.props=d,this.context=w,this.refs=V,this.updater=B||Se}W.prototype.isReactComponent={},W.prototype.setState=function(d,w){if(typeof d!="object"&&typeof d!="function"&&d!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,d,w,"setState")},W.prototype.forceUpdate=function(d){this.updater.enqueueForceUpdate(this,d,"forceUpdate")};function xe(){}xe.prototype=W.prototype;function Be(d,w,B){this.props=d,this.context=w,this.refs=V,this.updater=B||Se}var Oe=Be.prototype=new xe;Oe.constructor=Be,pe(Oe,W.prototype),Oe.isPureReactComponent=!0;var X=Array.isArray,Ne=Object.prototype.hasOwnProperty,Pe={current:null},Me={key:!0,ref:!0,__self:!0,__source:!0};function We(d,w,B){var q,Z={},J=null,re=null;if(w!=null)for(q in w.ref!==void 0&&(re=w.ref),w.key!==void 0&&(J=""+w.key),w)Ne.call(w,q)&&!Me.hasOwnProperty(q)&&(Z[q]=w[q]);var ee=arguments.length-2;if(ee===1)Z.children=B;else if(1>>1,w=C[d];if(0>>1;dE(Z,N))JE(re,Z)?(C[d]=re,C[J]=N,d=J):(C[d]=Z,C[q]=N,d=q);else if(JE(re,N))C[d]=re,C[J]=N,d=J;else break e}}return T}function E(C,T){var N=C.sortIndex-T.sortIndex;return N!==0?N:C.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var z=performance;u.unstable_now=function(){return z.now()}}else{var $=Date,O=$.now();u.unstable_now=function(){return $.now()-O}}var U=[],G=[],A=1,H=null,K=3,Se=!1,pe=!1,V=!1,W=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,Be=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Oe(C){for(var T=f(G);T!==null;){if(T.callback===null)x(G);else if(T.startTime<=C)x(G),T.sortIndex=T.expirationTime,p(U,T);else break;T=f(G)}}function X(C){if(V=!1,Oe(C),!pe)if(f(U)!==null)pe=!0,ge(Ne);else{var T=f(G);T!==null&&ne(X,T.startTime-C)}}function Ne(C,T){pe=!1,V&&(V=!1,xe(We),We=-1),Se=!0;var N=K;try{for(Oe(T),H=f(U);H!==null&&(!(H.expirationTime>T)||C&&!he());){var d=H.callback;if(typeof d=="function"){H.callback=null,K=H.priorityLevel;var w=d(H.expirationTime<=T);T=u.unstable_now(),typeof w=="function"?H.callback=w:H===f(U)&&x(U),Oe(T)}else x(U);H=f(U)}if(H!==null)var B=!0;else{var q=f(G);q!==null&&ne(X,q.startTime-T),B=!1}return B}finally{H=null,K=N,Se=!1}}var Pe=!1,Me=null,We=-1,yt=5,_e=-1;function he(){return!(u.unstable_now()-_eC||125d?(C.sortIndex=N,p(G,C),f(U)===null&&C===f(G)&&(V?(xe(We),We=-1):V=!0,ne(X,N-d))):(C.sortIndex=w,p(U,C),pe||Se||(pe=!0,ge(Ne))),C},u.unstable_shouldYield=he,u.unstable_wrapCallback=function(C){var T=K;return function(){var N=K;K=T;try{return C.apply(this,arguments)}finally{K=N}}}})(Oo)),Oo}var Ks;function pd(){return Ks||(Ks=1,Do.exports=dd()),Do.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var qs;function md(){if(qs)return Je;qs=1;var u=Wo(),p=pd();function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),U=Object.prototype.hasOwnProperty,G=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A={},H={};function K(e){return U.call(H,e)?!0:U.call(A,e)?!1:G.test(e)?H[e]=!0:(A[e]=!0,!1)}function Se(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pe(e,t,n,r){if(t===null||typeof t>"u"||Se(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function V(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var W={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){W[e]=new V(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];W[t]=new V(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){W[e]=new V(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){W[e]=new V(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){W[e]=new V(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){W[e]=new V(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){W[e]=new V(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){W[e]=new V(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){W[e]=new V(e,5,!1,e.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function Be(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xe,Be);W[t]=new V(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xe,Be);W[t]=new V(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xe,Be);W[t]=new V(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){W[e]=new V(e,1,!1,e.toLowerCase(),null,!1,!1)}),W.xlinkHref=new V("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){W[e]=new V(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oe(e,t,n,r){var l=W.hasOwnProperty(t)?W[t]:null;(l!==null?l.type!==0:r||!(2a||l[o]!==i[a]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?w(e):""}function Z(e){switch(e.tag){case 5:return w(e.type);case 16:return w("Lazy");case 13:return w("Suspense");case 19:return w("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1),e;case 11:return e=q(e.type.render,!1),e;case 1:return e=q(e.type,!0),e;default:return""}}function J(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Me:return"Fragment";case Pe:return"Portal";case yt:return"Profiler";case We:return"StrictMode";case Ee:return"Suspense";case Te:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case he:return(e.displayName||"Context")+".Consumer";case _e:return(e._context.displayName||"Context")+".Provider";case Fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return t=e.displayName||null,t!==null?t:J(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return J(e(t))}catch{}}return null}function re(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(t);case 8:return t===We?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ue(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function be(e){var t=ue(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jr(e){e._valueTracker||(e._valueTracker=be(e))}function qo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ue(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Al(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Go(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ee(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yo(e,t){t=t.checked,t!=null&&Oe(e,"checked",t,!1)}function Ul(e,t){Yo(e,t);var n=ee(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vl(e,t.type,ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vl(e,t,n){(t!=="number"||Nr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function dn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Pr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fc=["Webkit","ms","Moz","O"];Object.keys($n).forEach(function(e){fc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$n[t]=$n[e]})});function nu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$n.hasOwnProperty(e)&&$n[e]?(""+t).trim():t+"px"}function ru(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=nu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var dc=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bl(e,t){if(t){if(dc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(f(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(f(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(f(61))}if(t.style!=null&&typeof t.style!="object")throw Error(f(62))}}function Wl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Kl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ql=null,pn=null,mn=null;function lu(e){if(e=sr(e)){if(typeof ql!="function")throw Error(f(280));var t=e.stateNode;t&&(t=Zr(t),ql(e.stateNode,e.type,t))}}function iu(e){pn?mn?mn.push(e):mn=[e]:pn=e}function ou(){if(pn){var e=pn,t=mn;if(mn=pn=null,lu(e),t)for(e=0;e>>=0,e===0?32:31-(_c(e)/Ec|0)|0}var Tr=64,Ir=4194304;function Qn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~l;a!==0?r=Qn(a):(i&=o,i!==0&&(r=Qn(i)))}else o=n&~l,o!==0?r=Qn(o):i!==0&&(r=Qn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Kn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function Pc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=er),Iu=" ",Du=!1;function Ou(e,t){switch(e){case"keyup":return nf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yn=!1;function lf(e,t){switch(e){case"compositionend":return Fu(t);case"keypress":return t.which!==32?null:(Du=!0,Iu);case"textInput":return e=t.data,e===Iu&&Du?null:e;default:return null}}function of(e,t){if(yn)return e==="compositionend"||!fi&&Ou(e,t)?(e=Pu(),Vr=ii=Ot=null,yn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wu(n)}}function Ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qu(){for(var e=window,t=Nr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nr(e.document)}return t}function mi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function hf(e){var t=qu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ku(n.ownerDocument.documentElement,n)){if(r!==null&&mi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Qu(n,i);var o=Qu(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gn=null,hi=null,lr=null,vi=!1;function Gu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vi||gn==null||gn!==Nr(r)||(r=gn,"selectionStart"in r&&mi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),lr&&rr(lr,r)||(lr=r,r=Gr(hi,"onSelect"),0_n||(e.current=Pi[_n],Pi[_n]=null,_n--)}function le(e,t){_n++,Pi[_n]=e.current,e.current=t}var Vt={},Ue=Ut(Vt),qe=Ut(!1),en=Vt;function En(e,t){var n=e.type.contextTypes;if(!n)return Vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ge(e){return e=e.childContextTypes,e!=null}function Jr(){oe(qe),oe(Ue)}function sa(e,t,n){if(Ue.current!==Vt)throw Error(f(168));le(Ue,t),le(qe,n)}function ca(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(f(108,re(e)||"Unknown",l));return N({},n,r)}function br(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vt,en=Ue.current,le(Ue,e),le(qe,qe.current),!0}function fa(e,t,n){var r=e.stateNode;if(!r)throw Error(f(169));n?(e=ca(e,t,en),r.__reactInternalMemoizedMergedChildContext=e,oe(qe),oe(Ue),le(Ue,e)):oe(qe),le(qe,n)}var Ct=null,el=!1,zi=!1;function da(e){Ct===null?Ct=[e]:Ct.push(e)}function Nf(e){el=!0,da(e)}function $t(){if(!zi&&Ct!==null){zi=!0;var e=0,t=te;try{var n=Ct;for(te=1;e>=o,l-=o,jt=1<<32-ct(t)+l|n<F?(Re=D,D=null):Re=D.sibling;var b=g(m,D,v[F],_);if(b===null){D===null&&(D=Re);break}e&&D&&b.alternate===null&&t(m,D),c=i(b,c,F),I===null?M=b:I.sibling=b,I=b,D=Re}if(F===v.length)return n(m,D),ae&&nn(m,F),M;if(D===null){for(;FF?(Re=D,D=null):Re=D.sibling;var Xt=g(m,D,b.value,_);if(Xt===null){D===null&&(D=Re);break}e&&D&&Xt.alternate===null&&t(m,D),c=i(Xt,c,F),I===null?M=Xt:I.sibling=Xt,I=Xt,D=Re}if(b.done)return n(m,D),ae&&nn(m,F),M;if(D===null){for(;!b.done;F++,b=v.next())b=S(m,b.value,_),b!==null&&(c=i(b,c,F),I===null?M=b:I.sibling=b,I=b);return ae&&nn(m,F),M}for(D=r(m,D);!b.done;F++,b=v.next())b=j(D,m,F,b.value,_),b!==null&&(e&&b.alternate!==null&&D.delete(b.key===null?F:b.key),c=i(b,c,F),I===null?M=b:I.sibling=b,I=b);return e&&D.forEach(function(ud){return t(m,ud)}),ae&&nn(m,F),M}function ye(m,c,v,_){if(typeof v=="object"&&v!==null&&v.type===Me&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ne:e:{for(var M=v.key,I=c;I!==null;){if(I.key===M){if(M=v.type,M===Me){if(I.tag===7){n(m,I.sibling),c=l(I,v.props.children),c.return=m,m=c;break e}}else if(I.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===ge&&ga(M)===I.type){n(m,I.sibling),c=l(I,v.props),c.ref=cr(m,I,v),c.return=m,m=c;break e}n(m,I);break}else t(m,I);I=I.sibling}v.type===Me?(c=fn(v.props.children,m.mode,_,v.key),c.return=m,m=c):(_=Pl(v.type,v.key,v.props,null,m.mode,_),_.ref=cr(m,c,v),_.return=m,m=_)}return o(m);case Pe:e:{for(I=v.key;c!==null;){if(c.key===I)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){n(m,c.sibling),c=l(c,v.children||[]),c.return=m,m=c;break e}else{n(m,c);break}else t(m,c);c=c.sibling}c=No(v,m.mode,_),c.return=m,m=c}return o(m);case ge:return I=v._init,ye(m,c,I(v._payload),_)}if(Un(v))return L(m,c,v,_);if(T(v))return R(m,c,v,_);ll(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(n(m,c.sibling),c=l(c,v),c.return=m,m=c):(n(m,c),c=jo(v,m.mode,_),c.return=m,m=c),o(m)):n(m,c)}return ye}var Pn=wa(!0),ka=wa(!1),il=Ut(null),ol=null,zn=null,Di=null;function Oi(){Di=zn=ol=null}function Fi(e){var t=il.current;oe(il),e._currentValue=t}function Ai(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ln(e,t){ol=e,Di=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ye=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Di!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(ol===null)throw Error(f(308));zn=e,ol.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var rn=null;function Ui(e){rn===null?rn=[e]:rn.push(e)}function Sa(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ui(t)):(n.next=l.next,l.next=n),t.interleaved=n,Pt(e,r)}function Pt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ht=!1;function Vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Y&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Pt(e,n)}return l=r.interleaved,l===null?(t.next=t,Ui(r)):(t.next=l.next,l.next=t),r.interleaved=t,Pt(e,n)}function ul(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ei(e,n)}}function _a(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function al(e,t,n,r){var l=e.updateQueue;Ht=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var s=a,y=s.next;s.next=null,o===null?i=y:o.next=y,o=s;var k=e.alternate;k!==null&&(k=k.updateQueue,a=k.lastBaseUpdate,a!==o&&(a===null?k.firstBaseUpdate=y:a.next=y,k.lastBaseUpdate=s))}if(i!==null){var S=l.baseState;o=0,k=y=s=null,a=i;do{var g=a.lane,j=a.eventTime;if((r&g)===g){k!==null&&(k=k.next={eventTime:j,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var L=e,R=a;switch(g=t,j=n,R.tag){case 1:if(L=R.payload,typeof L=="function"){S=L.call(j,S,g);break e}S=L;break e;case 3:L.flags=L.flags&-65537|128;case 0:if(L=R.payload,g=typeof L=="function"?L.call(j,S,g):L,g==null)break e;S=N({},S,g);break e;case 2:Ht=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=l.effects,g===null?l.effects=[a]:g.push(a))}else j={eventTime:j,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},k===null?(y=k=j,s=S):k=k.next=j,o|=g;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;g=a,a=g.next,g.next=null,l.lastBaseUpdate=g,l.shared.pending=null}}while(!0);if(k===null&&(s=S),l.baseState=s,l.firstBaseUpdate=y,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);un|=o,e.lanes=o,e.memoizedState=S}}function Ea(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Qi.transition;Qi.transition={};try{e(!1),t()}finally{te=n,Qi.transition=r}}function Ba(){return ut().memoizedState}function Rf(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wa(e))Qa(t,n);else if(n=Sa(e,t,n,r),n!==null){var l=Ke();vt(n,e,r,l),Ka(n,t,r)}}function Mf(e,t,n){var r=qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wa(e))Qa(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(l.hasEagerState=!0,l.eagerState=a,ft(a,o)){var s=t.interleaved;s===null?(l.next=l,Ui(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Sa(e,t,l,r),n!==null&&(l=Ke(),vt(n,e,r,l),Ka(n,t,r))}}function Wa(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Qa(e,t){mr=fl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ka(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ei(e,n)}}var ml={readContext:ot,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},Tf={readContext:ot,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Da,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dl(4194308,4,Aa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return dl(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Rf.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Ta,useDebugValue:Ji,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Ta(!1),t=e[0];return e=Lf.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,l=St();if(ae){if(n===void 0)throw Error(f(407));n=n()}else{if(n=t(),Le===null)throw Error(f(349));(on&30)!==0||Pa(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Da(La.bind(null,r,i,e),[e]),r.flags|=2048,yr(9,za.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=St(),t=Le.identifierPrefix;if(ae){var n=Nt,r=jt;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[wt]=t,e[ar]=r,ds(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wl(n,r),n){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;lDn&&(t.flags|=128,r=!0,gr(i,!1),t.lanes=4194304)}else{if(!r)if(e=sl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ae)return $e(t),null}else 2*ve()-i.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,gr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ve(),t.sibling=null,n=se.current,le(se,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return _o(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(rt&1073741824)!==0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(f(156,t.tag))}function $f(e,t){switch(Ri(t),t.tag){case 1:return Ge(t.type)&&Jr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rn(),oe(qe),oe(Ue),Wi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Hi(t),null;case 13:if(oe(se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));Nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(se),null;case 4:return Rn(),null;case 10:return Fi(t.type._context),null;case 22:case 23:return _o(),null;case 24:return null;default:return null}}var gl=!1,He=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,P=null;function Tn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function co(e,t,n){try{n()}catch(r){me(e,t,r)}}var hs=!1;function Bf(e,t){if(xi=Ar,e=qu(),mi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,s=-1,y=0,k=0,S=e,g=null;t:for(;;){for(var j;S!==n||l!==0&&S.nodeType!==3||(a=o+l),S!==i||r!==0&&S.nodeType!==3||(s=o+r),S.nodeType===3&&(o+=S.nodeValue.length),(j=S.firstChild)!==null;)g=S,S=j;for(;;){if(S===e)break t;if(g===n&&++y===l&&(a=o),g===i&&++k===r&&(s=o),(j=S.nextSibling)!==null)break;S=g,g=S.parentNode}S=j}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_i={focusedElem:e,selectionRange:n},Ar=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var L=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(L!==null){var R=L.memoizedProps,ye=L.memoizedState,m=t.stateNode,c=m.getSnapshotBeforeUpdate(t.elementType===t.type?R:pt(t.type,R),ye);m.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(f(163))}}catch(_){me(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return L=hs,hs=!1,L}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&co(t,n,i)}l=l.next}while(l!==r)}}function wl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vs(e){var t=e.alternate;t!==null&&(e.alternate=null,vs(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wt],delete t[ar],delete t[Ni],delete t[Cf],delete t[jf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ys(e){return e.tag===5||e.tag===3||e.tag===4}function gs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ys(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function po(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xr));else if(r!==4&&(e=e.child,e!==null))for(po(e,t,n),e=e.sibling;e!==null;)po(e,t,n),e=e.sibling}function mo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(mo(e,t,n),e=e.sibling;e!==null;)mo(e,t,n),e=e.sibling}var Ie=null,mt=!1;function Wt(e,t,n){for(n=n.child;n!==null;)ws(e,t,n),n=n.sibling}function ws(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Mr,n)}catch{}switch(n.tag){case 5:He||Tn(n,t);case 6:var r=Ie,l=mt;Ie=null,Wt(e,t,n),Ie=r,mt=l,Ie!==null&&(mt?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(mt?(e=Ie,n=n.stateNode,e.nodeType===8?ji(e.parentNode,n):e.nodeType===1&&ji(e,n),Zn(e)):ji(Ie,n.stateNode));break;case 4:r=Ie,l=mt,Ie=n.stateNode.containerInfo,mt=!0,Wt(e,t,n),Ie=r,mt=l;break;case 0:case 11:case 14:case 15:if(!He&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&((i&2)!==0||(i&4)!==0)&&co(n,t,o),l=l.next}while(l!==r)}Wt(e,t,n);break;case 1:if(!He&&(Tn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){me(n,t,a)}Wt(e,t,n);break;case 21:Wt(e,t,n);break;case 22:n.mode&1?(He=(r=He)||n.memoizedState!==null,Wt(e,t,n),He=r):Wt(e,t,n);break;default:Wt(e,t,n)}}function ks(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hf),t.forEach(function(r){var l=Jf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Qf(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,El=0,(Y&6)!==0)throw Error(f(331));var l=Y;for(Y|=4,P=e.current;P!==null;){var i=P,o=i.child;if((P.flags&16)!==0){var a=i.deletions;if(a!==null){for(var s=0;sve()-yo?sn(e,0):vo|=n),Ze(e,t)}function Ts(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var n=Ke();e=Pt(e,t),e!==null&&(Kn(e,t,n),Ze(e,n))}function Zf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ts(e,n)}function Jf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(f(314))}r!==null&&r.delete(t),Ts(e,n)}var Is;Is=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Ye=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ye=!1,Uf(e,t,n);Ye=(e.flags&131072)!==0}else Ye=!1,ae&&(t.flags&1048576)!==0&&pa(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yl(e,t),e=t.pendingProps;var l=En(t,Ue.current);Ln(t,n),l=qi(null,t,r,e,l,n);var i=Gi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,br(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Vi(t),l.updater=hl,t.stateNode=l,l._reactInternals=t,eo(t,r,e,n),t=lo(null,t,r,!0,i,n)):(t.tag=0,ae&&i&&Li(t),Qe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=ed(r),e=pt(r,e),l){case 0:t=ro(null,t,r,e,n);break e;case 1:t=os(null,t,r,e,n);break e;case 11:t=ts(null,t,r,e,n);break e;case 14:t=ns(null,t,r,pt(r.type,e),n);break e}throw Error(f(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ro(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),os(e,t,r,l,n);case 3:e:{if(us(t),e===null)throw Error(f(387));r=t.pendingProps,i=t.memoizedState,l=i.element,xa(e,t),al(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Mn(Error(f(423)),t),t=as(e,t,r,n,l);break e}else if(r!==l){l=Mn(Error(f(424)),t),t=as(e,t,r,n,l);break e}else for(nt=At(t.stateNode.containerInfo.firstChild),tt=t,ae=!0,dt=null,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nn(),r===l){t=Lt(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return Ca(t),e===null&&Ti(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Ei(r,l)?o=null:i!==null&&Ei(r,i)&&(t.flags|=32),is(e,t),Qe(e,t,o,n),t.child;case 6:return e===null&&Ti(t),null;case 13:return ss(e,t,n);case 4:return $i(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pn(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ts(e,t,r,l,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,le(il,r._currentValue),r._currentValue=o,i!==null)if(ft(i.value,o)){if(i.children===l.children&&!qe.current){t=Lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=zt(-1,n&-n),s.tag=2;var y=i.updateQueue;if(y!==null){y=y.shared;var k=y.pending;k===null?s.next=s:(s.next=k.next,k.next=s),y.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ai(i.return,n,t),a.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(f(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ai(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Qe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Ln(t,n),l=ot(l),r=r(l),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,l=pt(r,t.pendingProps),l=pt(r.type,l),ns(e,t,r,l,n);case 15:return rs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),yl(e,t),t.tag=1,Ge(r)?(e=!0,br(t)):e=!1,Ln(t,n),Ga(t,r,l),eo(t,r,l,n),lo(null,t,r,!0,e,n);case 19:return fs(e,t,n);case 22:return ls(e,t,n)}throw Error(f(156,t.tag))};function Ds(e,t){return mu(e,t)}function bf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new bf(e,t,n,r)}function Co(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ed(e){if(typeof e=="function")return Co(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fe)return 11;if(e===Ae)return 14}return 2}function Yt(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Co(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Me:return fn(n.children,l,i,t);case We:o=8,l|=8;break;case yt:return e=st(12,n,t,l|2),e.elementType=yt,e.lanes=i,e;case Ee:return e=st(13,n,t,l),e.elementType=Ee,e.lanes=i,e;case Te:return e=st(19,n,t,l),e.elementType=Te,e.lanes=i,e;case ne:return zl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _e:o=10;break e;case he:o=9;break e;case Fe:o=11;break e;case Ae:o=14;break e;case ge:o=16,r=null;break e}throw Error(f(130,e==null?e:typeof e,""))}return t=st(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function fn(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function zl(e,t,n,r){return e=st(22,e,r,t),e.elementType=ne,e.lanes=n,e.stateNode={isHidden:!1},e}function jo(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function No(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function td(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bl(0),this.expirationTimes=bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Po(e,t,n,r,l,i,o,a,s){return e=new td(e,t,n,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=st(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vi(i),e}function nd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(p){console.error(p)}}return u(),Io.exports=md(),Io.exports}var Ys;function vd(){if(Ys)return Ol;Ys=1;var u=hd();return Ol.createRoot=u.createRoot,Ol.hydrateRoot=u.hydrateRoot,Ol}var yd=vd();const gd=Js(yd);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wd=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bs=(...u)=>u.filter((p,f,x)=>!!p&&p.trim()!==""&&x.indexOf(p)===f).join(" ").trim();/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var kd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sd=de.forwardRef(({color:u="currentColor",size:p=24,strokeWidth:f=2,absoluteStrokeWidth:x,className:E="",children:z,iconNode:$,...O},U)=>de.createElement("svg",{ref:U,...kd,width:p,height:p,stroke:u,strokeWidth:x?Number(f)*24/Number(p):f,className:bs("lucide",E),...O},[...$.map(([G,A])=>de.createElement(G,A)),...Array.isArray(z)?z:[z]]));/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ke=(u,p)=>{const f=de.forwardRef(({className:x,...E},z)=>de.createElement(Sd,{ref:z,iconNode:p,className:bs(`lucide-${wd(u)}`,x),...E}));return f.displayName=`${u}`,f};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xd=ke("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qo=ke("CloudRain",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 14v6",key:"1j4efv"}],["path",{d:"M8 14v6",key:"17c4r9"}],["path",{d:"M12 16v6",key:"c8a4gj"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ec=ke("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tc=ke("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _d=ke("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ed=ke("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cd=ke("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jd=ke("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nd=ke("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pd=ke("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zd=ke("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ld=ke("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rd=ke("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nc=ke("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Md=ke("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cr=ke("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Td=ke("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Id=ke("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dd=ke("Umbrella",[["path",{d:"M22 12a10.06 10.06 1 0 0-20 0Z",key:"1teyop"}],["path",{d:"M12 12v8a2 2 0 0 0 4 0",key:"ulpmoc"}],["path",{d:"M12 2v1",key:"11qlp1"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rc=ke("Wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]),Od="https://api.open-meteo.com/v1/forecast",Fd="https://air-quality-api.open-meteo.com/v1/air-quality",Ad="https://geocoding-api.open-meteo.com/v1/search";async function Ud(u){const p=u.trim();if(p.length<2)return[];const f=new URL(Ad);return f.search=new URLSearchParams({name:p,count:"6",language:"pt",format:"json"}).toString(),((await Uo(f)).results??[]).map(E=>({id:String(E.id),name:E.name,admin1:E.admin1,country:E.country,latitude:E.latitude,longitude:E.longitude,timezone:E.timezone}))}async function Vd(u){const p=new URL(Od);p.search=new URLSearchParams({latitude:String(u.latitude),longitude:String(u.longitude),current:["temperature_2m","relative_humidity_2m","apparent_temperature","precipitation","rain","showers","weather_code","wind_speed_10m","wind_gusts_10m"].join(","),hourly:["temperature_2m","apparent_temperature","precipitation_probability","precipitation","weather_code","uv_index","wind_speed_10m","relative_humidity_2m"].join(","),daily:["weather_code","temperature_2m_max","temperature_2m_min","precipitation_probability_max","uv_index_max","wind_speed_10m_max"].join(","),timezone:"auto",forecast_days:"7"}).toString();const f=new URL(Fd);f.search=new URLSearchParams({latitude:String(u.latitude),longitude:String(u.longitude),current:["us_aqi","pm2_5","pm10","uv_index"].join(","),hourly:["us_aqi","pm2_5","pm10","uv_index"].join(","),timezone:"auto",forecast_days:"5"}).toString();const[x,E]=await Promise.all([Uo(p),Uo(f)]);return $d(u,x,E)}async function Uo(u){const p=await fetch(u);if(!p.ok)throw new Error(`Falha ao buscar ${u.hostname}: ${p.status}`);const f=await p.json();if(f.error)throw new Error(f.reason??"A API retornou erro.");return f}function $d(u,p,f){var Se,pe,V,W,xe,Be,Oe,X,Ne,Pe,Me,We;const x=p.current??{},E=p.hourly??{},z=f.current??{},$=f.hourly??{},O=p.daily??{},U=Fl(x.time)??Fl((Se=E.time)==null?void 0:Se[0])??new Date().toISOString(),G=Hd(E.time,U),A=Array.from({length:12},(yt,_e)=>{var Fe,Ee,Te,Ae,ge,ne,C,T,N,d;const he=G+_e;return{time:Fl((Fe=E.time)==null?void 0:Fe[he])??U,temperature:fe((Ee=E.temperature_2m)==null?void 0:Ee[he],x.temperature_2m),precipitation:fe((Te=E.precipitation)==null?void 0:Te[he],x.precipitation),precipitationProbability:fe((Ae=E.precipitation_probability)==null?void 0:Ae[he],0),uvIndex:fe((ge=E.uv_index)==null?void 0:ge[he],(ne=$.uv_index)==null?void 0:ne[he],z.uv_index),usAqi:Vo((C=$.us_aqi)==null?void 0:C[he],z.us_aqi),pm25:fe((T=$.pm2_5)==null?void 0:T[he],z.pm2_5),pm10:fe((N=$.pm10)==null?void 0:N[he],z.pm10),weatherCode:fe((d=E.weather_code)==null?void 0:d[he],x.weather_code)}}),H={time:U,temperature:fe(x.temperature_2m,(pe=A[0])==null?void 0:pe.temperature),apparentTemperature:fe(x.apparent_temperature,(V=E.apparent_temperature)==null?void 0:V[G]),precipitation:fe(x.precipitation,(W=A[0])==null?void 0:W.precipitation),precipitationProbability:((xe=A[0])==null?void 0:xe.precipitationProbability)??0,windSpeed:fe(x.wind_speed_10m,(Be=E.wind_speed_10m)==null?void 0:Be[G]),windGusts:fe(x.wind_gusts_10m,x.wind_speed_10m),uvIndex:fe(z.uv_index,(Oe=A[0])==null?void 0:Oe.uvIndex),humidity:fe(x.relative_humidity_2m,(X=E.relative_humidity_2m)==null?void 0:X[G]),pm25:fe(z.pm2_5,(Ne=A[0])==null?void 0:Ne.pm25),pm10:fe(z.pm10,(Pe=A[0])==null?void 0:Pe.pm10),usAqi:Vo(z.us_aqi,(Me=A[0])==null?void 0:Me.usAqi),weatherCode:fe(x.weather_code,(We=A[0])==null?void 0:We.weatherCode)},K=Array.from({length:7},(yt,_e)=>{var he,Fe,Ee,Te,Ae,ge,ne;return{date:Fl((he=O.time)==null?void 0:he[_e])??new Date().toISOString().slice(0,10),tempMax:fe((Fe=O.temperature_2m_max)==null?void 0:Fe[_e]),tempMin:fe((Ee=O.temperature_2m_min)==null?void 0:Ee[_e]),precipitationProbability:fe((Te=O.precipitation_probability_max)==null?void 0:Te[_e]),uvIndexMax:fe((Ae=O.uv_index_max)==null?void 0:Ae[_e]),windSpeedMax:fe((ge=O.wind_speed_10m_max)==null?void 0:ge[_e]),weatherCode:fe((ne=O.weather_code)==null?void 0:ne[_e])}});return{location:u,current:H,hourly:A,daily:K,source:"api",fetchedAt:new Date().toISOString()}}function Hd(u,p){if(!(u!=null&&u.length))return 0;const f=new Date(p).getTime(),x=u.findIndex(E=>new Date(String(E)).getTime()>=f);return Math.max(0,x===-1?0:x)}function Fl(u){return typeof u=="string"?u:void 0}function Vo(...u){const p=u.find(f=>typeof f=="number"&&Number.isFinite(f));return typeof p=="number"?p:void 0}function fe(...u){return Vo(...u)??0}function Bd({message:u,onRetry:p}){return h.jsxs("aside",{className:"error-banner",role:"alert",children:[h.jsx(Id,{"aria-hidden":"true",size:20}),h.jsx("p",{children:u}),h.jsxs("button",{type:"button",onClick:p,children:[h.jsx(Ld,{"aria-hidden":"true",size:16}),"Tentar de novo"]})]})}const Wd=new Intl.DateTimeFormat("pt-BR",{weekday:"short",day:"2-digit",month:"2-digit"}),Qd=new Intl.DateTimeFormat("pt-BR",{hour:"2-digit",minute:"2-digit"});function Zt(u){return`${Math.round(u)}°C`}function Fn(u){return`${Math.round(u)}%`}function lc(u){return`${u.toFixed(u>=10?0:1)} mm`}function An(u){return`${Math.round(u)} km/h`}function Kd(u){return Qd.format(new Date(u))}function qd(u){return Wd.format(new Date(`${u}T12:00:00`)).replace(".","")}function $o(u){return u.filter(Boolean).join(", ")}function Ho(u){return u==null?"sem AQI":u<=50?"boa":u<=100?"moderada":u<=150?"ruim para sensíveis":u<=200?"ruim":"muito ruim"}function Ko(u){return[0].includes(u)?"céu limpo":[1,2,3].includes(u)?"nuvens variáveis":[45,48].includes(u)?"neblina":[51,53,55,56,57].includes(u)?"garoa":[61,63,65,66,67,80,81,82].includes(u)?"chuva":[71,73,75,77,85,86].includes(u)?"neve":[95,96,99].includes(u)?"trovoadas":"tempo variável"}function Gd(u){return{green:"Dia confortável",yellow:"Atenção",orange:"Cuidado",red:"Evite exposição"}[u]}function Yd(u,p=0,f=100){return Math.max(p,Math.min(f,u))}function Xd({days:u}){return h.jsxs("section",{className:"forecast-panel","aria-labelledby":"forecast-title",children:[h.jsxs("div",{className:"section-heading",children:[h.jsx("p",{className:"eyebrow",children:"7 dias"}),h.jsx("h2",{id:"forecast-title",children:"Janela para planejar"})]}),h.jsx("div",{className:"forecast-list",children:u.map(p=>h.jsxs("article",{className:"forecast-day",children:[h.jsxs("div",{children:[h.jsx("time",{dateTime:p.date,children:qd(p.date)}),h.jsx("span",{children:Ko(p.weatherCode)})]}),h.jsxs("strong",{children:[Zt(p.tempMax)," / ",Zt(p.tempMin)]}),h.jsxs("dl",{children:[h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(Qo,{"aria-hidden":"true",size:13}),"chuva"]}),h.jsx("dd",{children:Fn(p.precipitationProbability)})]}),h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(Cr,{"aria-hidden":"true",size:13}),"UV"]}),h.jsx("dd",{children:p.uvIndexMax.toFixed(1)})]}),h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(rc,{"aria-hidden":"true",size:13}),"vento"]}),h.jsx("dd",{children:An(p.windSpeedMax)})]})]})]},p.date))})]})}function Zd({current:u}){const p=[{label:"Sensação térmica",value:Zt(u.apparentTemperature),detail:`temperatura ${Zt(u.temperature)}`,icon:Td},{label:"Chuva",value:Fn(u.precipitationProbability),detail:lc(u.precipitation),icon:Qo},{label:"UV",value:u.uvIndex.toFixed(1),detail:u.uvIndex>=6?"proteção ativa":"exposição manejável",icon:Cr},{label:"Umidade",value:Fn(u.humidity),detail:u.humidity>=75?"ar úmido":"faixa comum",icon:ec},{label:"Vento",value:An(u.windSpeed),detail:`rajadas ${An(u.windGusts)}`,icon:rc},{label:"Qualidade do ar",value:u.usAqi?`AQI ${Math.round(u.usAqi)}`:"AQI —",detail:`${Ho(u.usAqi)} · PM2.5 ${u.pm25.toFixed(0)}`,icon:tc}];return h.jsx("section",{className:"metrics-grid","aria-label":"Indicadores do dia",children:p.map(f=>{const x=f.icon;return h.jsxs("article",{className:"metric-tile",children:[h.jsx(x,{"aria-hidden":"true",size:19}),h.jsx("span",{children:f.label}),h.jsx("strong",{children:f.value}),h.jsx("small",{children:f.detail})]},f.label)})})}function Jd({profiles:u,value:p,onChange:f}){return h.jsxs("fieldset",{className:"profile-selector",children:[h.jsx("legend",{children:"Perfil"}),h.jsx("div",{className:"profile-options",children:u.map(x=>h.jsxs("label",{className:x.id===p?"selected":"",children:[h.jsx("input",{type:"radio",name:"profile",value:x.id,checked:x.id===p,onChange:()=>f(x.id)}),h.jsx("span",{children:x.shortLabel})]},x.id))})]})}const bd={hydrate:ec,umbrella:Dd,sunscreen:Cr,"close-windows":Ed,"avoid-intense-exercise":xd,"sensitive-people":nc};function ep({recommendations:u}){return h.jsxs("section",{className:"recommendation-panel","aria-labelledby":"recommendation-title",children:[h.jsxs("div",{className:"section-heading",children:[h.jsx("p",{className:"eyebrow",children:"Ações práticas"}),h.jsx("h2",{id:"recommendation-title",children:"O que fazer agora"})]}),h.jsx("div",{className:"recommendation-list",children:u.map(p=>{const f=bd[p.id]??nc;return h.jsxs("article",{className:`recommendation-chip risk-${p.level}`,children:[h.jsx(f,{"aria-hidden":"true",size:18}),h.jsxs("div",{children:[h.jsx("strong",{children:p.label}),h.jsx("span",{children:p.detail})]})]},p.id)})})]})}function tp({currentLocation:u,isLoading:p,onSelectLocation:f,onUseCurrentLocation:x}){const E=de.useId(),[z,$]=de.useState(""),[O,U]=de.useState([]),[G,A]=de.useState(!1),[H,K]=de.useState("");async function Se(V){V.preventDefault();const W=z.trim();if(W.length<2){K("Digite ao menos 2 letras.");return}A(!0),K("");try{const xe=await Ud(W);U(xe),xe.length===0?K("Nenhuma cidade encontrada."):xe.length===1&&pe(xe[0])}catch{K("Não foi possível buscar cidades agora.")}finally{A(!1)}}function pe(V){$(""),U([]),K(""),f(V)}return h.jsxs("div",{className:"search-cluster","aria-label":"Busca de cidade",children:[h.jsxs("form",{className:"search-form",onSubmit:Se,children:[h.jsx("label",{htmlFor:E,children:"Cidade"}),h.jsxs("div",{className:"search-input-row",children:[h.jsx(Rd,{"aria-hidden":"true",size:18}),h.jsx("input",{id:E,value:z,onChange:V=>$(V.target.value),placeholder:$o([u.name,u.admin1,u.country]),autoComplete:"off"}),h.jsx("button",{type:"submit",disabled:G||p,children:G?h.jsx(jd,{className:"spin","aria-hidden":"true",size:17}):"Buscar"})]})]}),h.jsxs("button",{className:"geo-button",type:"button",onClick:x,disabled:p,"aria-label":"Usar localização atual do navegador",children:[h.jsx(Nd,{"aria-hidden":"true",size:18}),"Localização"]}),(O.length>0||H)&&h.jsxs("div",{className:"search-popover",role:"status","aria-live":"polite",children:[H&&h.jsx("p",{children:H}),O.map(V=>h.jsxs("button",{type:"button",onClick:()=>pe(V),children:[h.jsx(Pd,{"aria-hidden":"true",size:16}),h.jsx("span",{children:$o([V.name,V.admin1,V.country])})]},V.id))]})]})}function np({current:u,location:p,profile:f,risk:x,fetchedAt:E,source:z}){return h.jsxs("section",{className:`semaforo-panel risk-${x.level}`,"aria-labelledby":"semaforo-title",children:[h.jsxs("div",{className:"semaforo-topline",children:[h.jsx("span",{children:$o([p.name,p.admin1,p.country])}),h.jsx("span",{children:z==="mock"?"dados de exemplo":`atualizado ${new Date(E).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})}`})]}),h.jsxs("div",{className:"semaforo-content",children:[h.jsx("div",{className:"risk-orb","aria-hidden":"true",children:h.jsx("span",{})}),h.jsxs("div",{children:[h.jsx("p",{className:"eyebrow",children:"Semáforo do Dia"}),h.jsx("h1",{id:"semaforo-title",children:x.title}),h.jsxs("p",{className:"risk-label",children:[Gd(x.level)," · risco ",x.score,"/100"]}),h.jsx("p",{className:"risk-summary",children:x.summary})]})]}),h.jsxs("dl",{className:"current-strip","aria-label":"Condições atuais",children:[h.jsxs("div",{children:[h.jsx("dt",{children:"Agora"}),h.jsx("dd",{children:Zt(u.temperature)})]}),h.jsxs("div",{children:[h.jsx("dt",{children:"Sensação"}),h.jsx("dd",{children:Zt(u.apparentTemperature)})]}),h.jsxs("div",{children:[h.jsx("dt",{children:"Vento"}),h.jsx("dd",{children:An(u.windSpeed)})]}),h.jsxs("div",{children:[h.jsx("dt",{children:"Tempo"}),h.jsx("dd",{children:Ko(u.weatherCode)})]})]}),h.jsxs("div",{className:"profile-note",children:[h.jsx(Md,{"aria-hidden":"true",size:17}),h.jsxs("span",{children:[f.label,": ",f.description]})]})]})}function rp(){return h.jsxs("div",{className:"skeleton-grid","aria-hidden":"true",children:[h.jsx("div",{className:"skeleton skeleton-hero"}),h.jsx("div",{className:"skeleton skeleton-side"}),h.jsx("div",{className:"skeleton skeleton-wide"})]})}function lp({hours:u}){return h.jsxs("section",{className:"timeline-panel","aria-labelledby":"timeline-title",children:[h.jsxs("div",{className:"section-heading",children:[h.jsx("p",{className:"eyebrow",children:"Próximas 12 horas"}),h.jsx("h2",{id:"timeline-title",children:"Chuva, UV e ar por horário"})]}),h.jsx("div",{className:"timeline-scroll",children:u.map(p=>h.jsxs("article",{className:"timeline-hour",children:[h.jsx("time",{dateTime:p.time,children:Kd(p.time)}),h.jsx("strong",{children:Zt(p.temperature)}),h.jsx("span",{children:Ko(p.weatherCode)}),h.jsxs("dl",{children:[h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(Qo,{"aria-hidden":"true",size:14}),"Chuva"]}),h.jsx("dd",{children:Fn(p.precipitationProbability)})]}),h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(Cr,{"aria-hidden":"true",size:14}),"UV"]}),h.jsx("dd",{children:p.uvIndex.toFixed(1)})]}),h.jsxs("div",{children:[h.jsxs("dt",{children:[h.jsx(tc,{"aria-hidden":"true",size:14}),"Ar"]}),h.jsx("dd",{children:p.usAqi?`AQI ${Math.round(p.usAqi)}`:`PM2.5 ${p.pm25.toFixed(0)}`})]})]})]},p.time))})]})}function ip({risk:u}){return h.jsxs("section",{className:"why-panel","aria-labelledby":"why-title",children:[h.jsxs("div",{className:"section-heading inline-heading",children:[h.jsx(Cd,{"aria-hidden":"true",size:18}),h.jsxs("div",{children:[h.jsx("p",{className:"eyebrow",children:"Por que essa recomendação?"}),h.jsx("h2",{id:"why-title",children:"Fatores que mais pesaram"})]})]}),h.jsx("div",{className:"factor-list",children:u.factors.map(p=>h.jsxs("article",{className:"factor-row",children:[h.jsxs("div",{children:[h.jsx("strong",{children:p.label}),h.jsx("span",{children:p.value})]}),h.jsx("meter",{min:"0",max:"100",value:p.score,"aria-label":`Peso de ${p.label}`}),h.jsx("p",{children:p.explanation})]},p.id))})]})}const Fo=[{id:"adult",label:"Adulto saudável",shortLabel:"Adulto",description:"Rotina comum, sem sensibilidade respiratória declarada."},{id:"child",label:"Criança",shortLabel:"Criança",description:"Mais atenção a calor, UV, chuva forte e ar ruim."},{id:"elderly",label:"Idoso",shortLabel:"Idoso",description:"Maior sensibilidade a calor, frio, vento e poluição."},{id:"respiratory",label:"Pessoa com rinite/asma",shortLabel:"Rinite/asma",description:"Prioriza partículas finas, PM10 e qualidade do ar."},{id:"activity",label:"Atividade física",shortLabel:"Exercício",description:"Avalia esforço ao ar livre, calor, UV, vento e poluição."}],ic=new Date,Xs=u=>{const p=new Date(ic);return p.setMinutes(0,0,0),p.setHours(p.getHours()+u),p.toISOString()},op=u=>{const p=new Date(ic);return p.setDate(p.getDate()+u),p.toISOString().slice(0,10)},Ao={source:"mock",fetchedAt:new Date().toISOString(),location:{id:"mock-sao-paulo",name:"São Paulo",admin1:"SP",country:"Brasil",latitude:-23.5505,longitude:-46.6333,timezone:"America/Sao_Paulo"},current:{time:Xs(0),temperature:27,apparentTemperature:29,precipitation:.4,precipitationProbability:42,windSpeed:18,windGusts:31,uvIndex:7.1,humidity:68,pm25:18,pm10:42,usAqi:78,weatherCode:2},hourly:Array.from({length:12},(u,p)=>({time:Xs(p),temperature:[27,28,29,30,31,30,29,28,26,25,24,23][p],precipitation:[0,0,.2,.5,1.2,2.1,1.4,.4,.1,0,0,0][p],precipitationProbability:[24,28,34,46,58,64,52,38,26,20,18,16][p],uvIndex:[2,4,6,8,9,7,5,3,1,0,0,0][p],usAqi:[71,74,78,84,92,95,88,80,76,72,69,66][p],pm25:[16,17,18,20,23,24,21,18,17,16,15,14][p],pm10:[38,40,42,48,55,58,49,43,40,38,36,35][p],weatherCode:[2,2,3,3,61,63,61,3,2,1,1,1][p]})),daily:Array.from({length:7},(u,p)=>({date:op(p),tempMax:[31,29,26,28,30,32,27][p],tempMin:[22,21,19,18,20,22,19][p],precipitationProbability:[64,48,38,22,18,35,52][p],uvIndexMax:[9,8,6,7,8,10,5][p],windSpeedMax:[32,28,24,22,27,35,30][p],weatherCode:[63,61,3,2,1,2,61][p]}))};function up(u,p){const f={conditions:u,profile:p},x=ap(f),E=Math.max(...x.map(A=>A.score)),z=_t(x,"uv").score*.22+_t(x,"rain").score*.18+_t(x,"thermal").score*.2+_t(x,"wind").score*.12+_t(x,"pollution").score*.28,$=Math.round(Yd(z*.45+E*.65+sp(f))),O=fp($),U=cp(u,p,O,x),G=x.slice().sort((A,H)=>H.score-A.score)[0];return{score:$,level:O,title:dp(O),summary:pp(O,G.id,p),recommendations:U,factors:x.sort((A,H)=>H.score-A.score)}}function ap({conditions:u}){const p=ac(u.apparentTemperature),f=sc(u.pm25,u.pm10,u.usAqi),x=Math.max(uc(u.precipitationProbability),mp(u.precipitation)),E=Math.max(Bo(u.windSpeed),Bo(u.windGusts)-8),z=oc(u.uvIndex);return[{id:"uv",label:"UV",score:z,value:u.uvIndex.toFixed(1),explanation:z>=55?"Sol forte pede proteção ativa.":"Radiação dentro de uma faixa manejável."},{id:"rain",label:"Chuva",score:x,value:`${Fn(u.precipitationProbability)} · ${lc(u.precipitation)}`,explanation:x>=55?"Há chance relevante de chuva atrapalhar deslocamentos.":"Baixo impacto de chuva agora."},{id:"thermal",label:"Sensação térmica",score:p,value:Zt(u.apparentTemperature),explanation:p>=55?"A sensação térmica exige reduzir exposição prolongada.":"Temperatura confortável para a maioria das pessoas."},{id:"wind",label:"Vento",score:E,value:`${An(u.windSpeed)} · rajadas ${An(u.windGusts)}`,explanation:E>=55?"Rajadas podem prejudicar direção, guarda-chuva e exercício.":"Vento sem alerta importante."},{id:"pollution",label:"Ar",score:f,value:`AQI ${u.usAqi??"—"} · PM2.5 ${u.pm25.toFixed(0)} · PM10 ${u.pm10.toFixed(0)}`,explanation:f>=55?`Qualidade do ar ${Ho(u.usAqi)}; grupos sensíveis devem reduzir exposição.`:`Qualidade do ar ${Ho(u.usAqi)} para uso geral.`}]}function sp({conditions:u,profile:p}){const f=oc(u.uvIndex),x=ac(u.apparentTemperature),E=sc(u.pm25,u.pm10,u.usAqi),z=uc(u.precipitationProbability),$=Bo(Math.max(u.windSpeed,u.windGusts));return p==="child"?5+f*.08+x*.05+z*.04:p==="elderly"?6+x*.1+E*.07+$*.04:p==="respiratory"?6+E*.2:p==="activity"?4+f*.08+x*.08+E*.08+$*.04:0}function cp(u,p,f,x){const E=new Map,z=H=>E.set(H.id,H),$=_t(x,"pollution").score,O=_t(x,"thermal").score,U=_t(x,"rain").score,G=_t(x,"wind").score,A=_t(x,"uv").score;return z({id:"hydrate",label:"Beber água",detail:O>=35?"A sensação térmica aumenta a perda de líquidos.":"Boa prática para manter conforto no dia.",level:O>=55?"orange":"green"}),U>=40&&z({id:"umbrella",label:"Levar guarda-chuva",detail:`Chuva em ${Fn(u.precipitationProbability)} nas próximas horas.`,level:U>=65?"orange":"yellow"}),A>=35&&z({id:"sunscreen",label:"Usar protetor solar",detail:u.uvIndex>=8?"UV muito alto no meio do dia.":"UV já pede proteção em exposição direta.",level:A>=70?"orange":"yellow"}),$>=45&&z({id:"close-windows",label:"Fechar janelas",detail:"Reduz entrada de partículas quando o ar externo piora.",level:$>=70?"red":"yellow"}),($>=45||O>=55||G>=62||p==="activity")&&z({id:"avoid-intense-exercise",label:"Evitar exercício intenso",detail:p==="activity"?"Prefira horários mais frescos e monitore respiração.":"Esforço ao ar livre piora quando calor, vento ou poluição sobem.",level:$>=70||O>=70?"red":"orange"}),(p==="child"||p==="elderly")&&f!=="green"&&z({id:"sensitive-people",label:"Atenção para crianças/idosos",detail:"Reduza tempo em sol forte, chuva intensa ou ar poluído.",level:f==="red"?"red":"orange"}),Array.from(E.values())}function fp(u){return u>=75?"red":u>=51?"orange":u>=26?"yellow":"green"}function dp(u){return{green:"Verde",yellow:"Amarelo",orange:"Laranja",red:"Vermelho"}[u]}function pp(u,p,f){return u==="green"?"Bom para sair agora; mantenha hidratação e acompanhe mudanças do tempo.":p==="pollution"?"A qualidade do ar pede menos exposição ao ar livre, principalmente para perfis sensíveis.":p==="uv"?"Dá para sair com atenção, mas use protetor solar e prefira sombra entre 11h e 15h.":p==="rain"?"Planeje deslocamentos com chuva provável e leve proteção antes de sair.":p==="thermal"?f==="activity"?"Evite treino intenso agora; prefira horário mais fresco e pausas.":"Exposição prolongada pode cansar; faça pausas e hidrate-se.":"Há fatores de cuidado no período; reduza exposição prolongada e acompanhe a próxima hora."}function _t(u,p){const f=u.find(x=>x.id===p);if(!f)throw new Error(`Fator de risco ausente: ${p}`);return f}function oc(u){return u<=2?8:u<=5?28:u<=7?52:u<=10?78:94}function uc(u){return u<20?4:u<45?26:u<65?48:u<82?66:84}function mp(u){return u<.5?0:u<2?34:u<6?56:u<15?76:92}function ac(u){return u>=38||u<=3?92:u>=34||u<=8?74:u>=30||u<=12?45:8}function Bo(u){return u>=65?90:u>=48?70:u>=32?48:u>=22?24:6}function sc(u,p,f){return Math.max(hp(u),vp(p),yp(f))}function hp(u){return u<=12?4:u<=35?36:u<=55?62:u<=150?90:98}function vp(u){return u<=54?5:u<=154?38:u<=254?64:u<=354?82:95}function yp(u){return u==null?0:u<=50?4:u<=100?30:u<=150?56:u<=200?76:u<=300?90:98}const cc="clima-cuida-preferences";function gp(){try{const u=localStorage.getItem(cc);return u?JSON.parse(u):{}}catch{return{}}}function Zs(u){try{localStorage.setItem(cc,JSON.stringify(u))}catch{}}function wp(){const u=de.useMemo(()=>gp(),[]),[p,f]=de.useState(u.profile??"adult"),[x,E]=de.useState(u.theme??"light"),[z,$]=de.useState(u.location??Ao.location),[O,U]=de.useState(Ao),[G,A]=de.useState(!1),[H,K]=de.useState(null),Se=Fo.find(X=>X.id===p)??Fo[0],pe=de.useMemo(()=>up(O.current,p),[p,O.current]),V=x==="dark",W=de.useCallback(async X=>{A(!0),K(null);try{const Ne=await Vd(X);U(Ne),$(X),Zs({profile:p,location:X,theme:x})}catch{U({...Ao,fetchedAt:new Date().toISOString(),source:"mock"}),K("A API não respondeu agora. Exibindo dados de exemplo para manter a leitura do dia utilizável.")}finally{A(!1)}},[p,x]);de.useEffect(()=>{W(z)},[]),de.useEffect(()=>{document.documentElement.dataset.theme=x},[x]),de.useEffect(()=>{Zs({profile:p,location:z,theme:x})},[p,z,x]);function xe(X){f(X)}function Be(){E(X=>X==="light"?"dark":"light")}function Oe(){if(!navigator.geolocation){K("Este navegador não oferece geolocalização. Busque uma cidade pelo nome.");return}A(!0),navigator.geolocation.getCurrentPosition(X=>{const Ne={id:"browser-location",name:"Sua localização",latitude:X.coords.latitude,longitude:X.coords.longitude};W(Ne)},()=>{A(!1),K("Não foi possível acessar sua localização. Você pode pesquisar uma cidade manualmente.")},{enableHighAccuracy:!1,timeout:9e3,maximumAge:600*1e3})}return h.jsxs("div",{className:"app-shell",children:[h.jsxs("header",{className:"topbar",children:[h.jsxs("a",{className:"brand-mark",href:"/clima-cuida-care-weather-fork/","aria-label":"Clima Cuida",children:[h.jsx("span",{"aria-hidden":"true",children:h.jsx(_d,{size:20})}),h.jsx("strong",{children:"Clima Cuida"})]}),h.jsx(tp,{currentLocation:z,isLoading:G,onSelectLocation:W,onUseCurrentLocation:Oe}),h.jsxs("div",{className:"topbar-actions",children:[h.jsxs("button",{className:"theme-toggle",type:"button","aria-label":V?"Ativar modo claro":"Ativar modo escuro",onClick:Be,children:[V?h.jsx(Cr,{size:17,"aria-hidden":"true"}):h.jsx(zd,{size:17,"aria-hidden":"true"}),h.jsx("span",{children:V?"Modo Claro":"Modo Escuro"})]}),h.jsx(Jd,{profiles:Fo,value:p,onChange:xe})]})]}),h.jsxs("main",{className:"dashboard-shell","aria-busy":G,children:[H&&h.jsx(Bd,{message:H,onRetry:()=>W(z)}),h.jsxs("div",{className:"dashboard-intro",children:[h.jsx("p",{className:"eyebrow",children:"Orientação geral, não recomendação médica"}),h.jsx("p",{children:"Leitura combinada de clima, UV e qualidade do ar para decidir saída, exercício, deslocamento e proteção diária."})]}),G?h.jsx(rp,{}):h.jsxs("div",{className:"dashboard-grid",children:[h.jsxs("div",{className:"primary-column",children:[h.jsx(np,{current:O.current,location:O.location,profile:Se,risk:pe,fetchedAt:O.fetchedAt,source:O.source}),h.jsx(Zd,{current:O.current}),h.jsx(lp,{hours:O.hourly})]}),h.jsxs("div",{className:"secondary-column",children:[h.jsx(ep,{recommendations:pe.recommendations}),h.jsx(Xd,{days:O.daily}),h.jsx(ip,{risk:pe})]})]})]})]})}gd.createRoot(document.getElementById("root")).render(h.jsx(fd.StrictMode,{children:h.jsx(wp,{})})); diff --git a/index.html b/index.html index 7bdc3da..e455427 100644 --- a/index.html +++ b/index.html @@ -1,16 +1,17 @@ - - - - - - - Clima Cuida - - -
- - - + + + + + + + Clima Cuida + + + + +
+ + diff --git a/src/App.tsx b/src/App.tsx index fbcd492..3cc6aec 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; -import { HeartPulse } from 'lucide-react'; +import { HeartPulse, Moon, Sun } from 'lucide-react'; import { fetchClimaCuidaData } from './api/openMeteo'; import { ErrorBanner } from './components/ErrorBanner'; import { Forecast7Days } from './components/Forecast7Days'; @@ -16,10 +16,12 @@ import { calculateRiskScore } from './lib/riskScore'; import type { LocationOption, ProfileId, WeatherBundle } from './types'; const STORAGE_KEY = 'clima-cuida-preferences'; +type ThemeMode = 'light' | 'dark'; interface StoredPreferences { profile?: ProfileId; location?: LocationOption; + theme?: ThemeMode; } function loadPreferences(): StoredPreferences { @@ -42,6 +44,7 @@ function savePreferences(preferences: StoredPreferences) { export default function App() { const initialPreferences = useMemo(() => loadPreferences(), []); const [profile, setProfile] = useState(initialPreferences.profile ?? 'adult'); + const [theme, setTheme] = useState(initialPreferences.theme ?? 'light'); const [activeLocation, setActiveLocation] = useState( initialPreferences.location ?? MOCK_WEATHER.location, ); @@ -51,6 +54,7 @@ export default function App() { const selectedProfile = USE_PROFILES.find((item) => item.id === profile) ?? USE_PROFILES[0]; const risk = useMemo(() => calculateRiskScore(weather.current, profile), [profile, weather.current]); + const isDarkTheme = theme === 'dark'; const loadWeather = useCallback( async (location: LocationOption) => { @@ -60,7 +64,7 @@ export default function App() { const nextWeather = await fetchClimaCuidaData(location); setWeather(nextWeather); setActiveLocation(location); - savePreferences({ profile, location }); + savePreferences({ profile, location, theme }); } catch { setWeather({ ...MOCK_WEATHER, @@ -72,7 +76,7 @@ export default function App() { setIsLoading(false); } }, - [profile], + [profile, theme], ); useEffect(() => { @@ -80,13 +84,21 @@ export default function App() { }, []); useEffect(() => { - savePreferences({ profile, location: activeLocation }); - }, [profile, activeLocation]); + document.documentElement.dataset.theme = theme; + }, [theme]); + + useEffect(() => { + savePreferences({ profile, location: activeLocation, theme }); + }, [profile, activeLocation, theme]); function handleProfileChange(nextProfile: ProfileId) { setProfile(nextProfile); } + function handleToggleTheme() { + setTheme((currentTheme) => (currentTheme === 'light' ? 'dark' : 'light')); + } + function handleUseCurrentLocation() { if (!navigator.geolocation) { setError('Este navegador não oferece geolocalização. Busque uma cidade pelo nome.'); @@ -127,7 +139,18 @@ export default function App() { onSelectLocation={loadWeather} onUseCurrentLocation={handleUseCurrentLocation} /> - +
+ + +
diff --git a/src/styles.css b/src/styles.css index 453cb27..181c9de 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,19 +1,22 @@ :root { color-scheme: light; - --bg: oklch(98% 0.007 175); + --bg: oklch(97% 0.018 205); --surface: oklch(100% 0 0); - --surface-soft: oklch(96% 0.012 170); + --surface-soft: oklch(95% 0.02 205); + --glass: oklch(100% 0 0 / 0.78); --fg: oklch(19% 0.025 190); --muted: oklch(47% 0.025 190); --muted-2: oklch(62% 0.02 190); - --border: oklch(88% 0.014 180); - --accent: oklch(55% 0.12 170); - --accent-2: oklch(62% 0.15 35); + --border: oklch(86% 0.028 205); + --accent: oklch(58% 0.13 208); + --accent-2: oklch(70% 0.15 82); --green: oklch(58% 0.14 155); --yellow: oklch(72% 0.13 88); --orange: oklch(66% 0.16 50); --red: oklch(58% 0.19 25); - --shadow: 0 22px 70px -44px oklch(22% 0.05 190 / 0.55); + --sky-glow: oklch(83% 0.105 215 / 0.42); + --sun-glow: oklch(85% 0.16 82 / 0.28); + --shadow: 0 24px 72px -44px oklch(22% 0.06 215 / 0.55); --radius: 22px; --radius-sm: 14px; --font-display: "Avenir Next", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; @@ -23,6 +26,27 @@ color: var(--fg); } +html[data-theme='dark'] { + color-scheme: dark; + --bg: oklch(18% 0.035 236); + --surface: oklch(23% 0.04 236); + --surface-soft: oklch(27% 0.045 236); + --glass: oklch(23% 0.04 236 / 0.76); + --fg: oklch(96% 0.012 220); + --muted: oklch(76% 0.028 220); + --muted-2: oklch(64% 0.03 220); + --border: oklch(37% 0.045 236); + --accent: oklch(73% 0.13 210); + --accent-2: oklch(78% 0.15 78); + --green: oklch(72% 0.13 155); + --yellow: oklch(82% 0.13 88); + --orange: oklch(75% 0.16 50); + --red: oklch(70% 0.18 25); + --sky-glow: oklch(42% 0.11 240 / 0.45); + --sun-glow: oklch(73% 0.15 78 / 0.18); + --shadow: 0 30px 82px -46px oklch(4% 0.02 236 / 0.82); +} + * { box-sizing: border-box; } @@ -37,7 +61,9 @@ body { margin: 0; overflow-x: clip; background: - linear-gradient(180deg, oklch(96% 0.017 174) 0, var(--bg) 360px), + radial-gradient(circle at 14% -12%, var(--sun-glow), transparent 34vw), + radial-gradient(circle at 84% 0, var(--sky-glow), transparent 36vw), + linear-gradient(180deg, color-mix(in oklch, var(--bg), var(--accent) 12%) 0, var(--bg) 420px), var(--bg); color: var(--fg); font-family: var(--font-body); @@ -79,9 +105,10 @@ a { grid-template-columns: 1fr; gap: 14px; padding: 16px clamp(16px, 4vw, 34px); - border-bottom: 1px solid color-mix(in oklch, var(--border), white 24%); - background: oklch(98% 0.007 175 / 0.86); - backdrop-filter: blur(18px); + border-bottom: 1px solid color-mix(in oklch, var(--border), transparent 20%); + background: var(--glass); + box-shadow: 0 16px 44px -34px color-mix(in oklch, var(--fg), transparent 35%); + backdrop-filter: blur(20px) saturate(1.18); } .brand-mark { @@ -106,6 +133,47 @@ a { background: color-mix(in oklch, var(--accent), white 89%); } +.topbar-actions { + display: grid; + gap: 12px; + min-width: 0; +} + +.theme-toggle { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + min-height: 40px; + width: fit-content; + padding: 0 14px; + border: 1px solid color-mix(in oklch, var(--border), var(--accent) 18%); + border-radius: 999px; + color: var(--fg); + background: color-mix(in oklch, var(--surface), var(--accent) 6%); + box-shadow: 0 14px 34px -28px color-mix(in oklch, var(--accent), black 45%); + font-size: 0.86rem; + font-weight: 780; + transition: + transform 180ms cubic-bezier(0.23, 1, 0.32, 1), + border-color 180ms cubic-bezier(0.23, 1, 0.32, 1), + background 180ms cubic-bezier(0.23, 1, 0.32, 1); +} + +.theme-toggle:hover { + transform: translateY(-1px); + border-color: color-mix(in oklch, var(--accent), var(--fg) 8%); + background: color-mix(in oklch, var(--surface), var(--accent) 12%); +} + +.theme-toggle:active { + transform: translateY(1px) scale(0.99); +} + +.theme-toggle svg { + color: var(--accent-2); +} + .search-cluster { position: relative; display: grid; @@ -842,8 +910,14 @@ a { align-items: end; } - .profile-selector { + .topbar-actions { grid-column: 1 / -1; + grid-template-columns: auto minmax(0, 1fr); + align-items: end; + } + + .profile-selector { + min-width: 0; } .search-cluster { @@ -881,12 +955,14 @@ a { @media (min-width: 1180px) { .topbar { - grid-template-columns: auto minmax(440px, 1fr) minmax(480px, auto); + grid-template-columns: auto minmax(440px, 1fr) minmax(560px, auto); align-items: end; } - .profile-selector { + .topbar-actions { grid-column: auto; + grid-template-columns: auto minmax(0, 1fr); + align-items: end; } .profile-options { @@ -934,6 +1010,10 @@ a { padding: 12px 10px; } + .theme-toggle { + width: 100%; + } + .semaforo-content { grid-template-columns: 1fr; } diff --git a/vite.config.ts b/vite.config.ts index 750f2b4..39bec43 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; export default defineConfig(({ command }) => ({ - base: command === 'build' ? '/clima-cuida-care-weather/' : '/', + base: command === 'build' ? '/clima-cuida-care-weather-fork/' : '/', plugins: [react()], test: { environment: 'node',