diff --git a/alphatrion/server/graphql/resolvers.py b/alphatrion/server/graphql/resolvers.py index 59704cee..1c2d0ae7 100644 --- a/alphatrion/server/graphql/resolvers.py +++ b/alphatrion/server/graphql/resolvers.py @@ -188,6 +188,7 @@ def list_runs( experiment_id=r.experiment_id, meta=r.meta, status=GraphQLStatusEnum[Status(r.status).name], + duration=r.duration, created_at=r.created_at, ) for r in runs @@ -205,6 +206,7 @@ def get_run(id: strawberry.ID) -> Run | None: experiment_id=run.experiment_id, meta=run.meta, status=GraphQLStatusEnum[Status(run.status).name], + duration=run.duration, created_at=run.created_at, ) return None diff --git a/alphatrion/server/graphql/types.py b/alphatrion/server/graphql/types.py index 41083cf8..343eef6c 100644 --- a/alphatrion/server/graphql/types.py +++ b/alphatrion/server/graphql/types.py @@ -155,6 +155,7 @@ class Run: user_id: strawberry.ID experiment_id: strawberry.ID meta: JSON | None + duration: float status: GraphQLStatusEnum created_at: datetime diff --git a/dashboard/src/lib/graphql-client.ts b/dashboard/src/lib/graphql-client.ts index 1c4f9e56..2882be7a 100644 --- a/dashboard/src/lib/graphql-client.ts +++ b/dashboard/src/lib/graphql-client.ts @@ -206,6 +206,7 @@ export const queries = { userId experimentId meta + duration status createdAt } @@ -220,6 +221,7 @@ export const queries = { userId experimentId meta + duration status createdAt aggregatedTokens { diff --git a/dashboard/src/pages/experiments/index.tsx b/dashboard/src/pages/experiments/index.tsx index 57a44543..1e15a4e4 100644 --- a/dashboard/src/pages/experiments/index.tsx +++ b/dashboard/src/pages/experiments/index.tsx @@ -270,11 +270,10 @@ export function ExperimentsPage() { - UUID + ID Name Labels Status - Duration Created @@ -320,11 +319,6 @@ export function ExperimentsPage() { {experiment.status} - - {experiment.duration > 0 - ? `${experiment.duration.toFixed(2)}s` - : '-'} - {formatDistanceToNow(new Date(experiment.createdAt), { addSuffix: true, diff --git a/dashboard/src/pages/runs/[id].tsx b/dashboard/src/pages/runs/[id].tsx index a85b7521..e29b8997 100644 --- a/dashboard/src/pages/runs/[id].tsx +++ b/dashboard/src/pages/runs/[id].tsx @@ -179,6 +179,16 @@ export function RunDetailPage() { )} +
+
Duration
+
+ {run.duration !== undefined && run.duration > 0 ? ( + `${run.duration.toFixed(2)}s` + ) : ( + - + )} +
+
Created
diff --git a/dashboard/src/pages/runs/index.tsx b/dashboard/src/pages/runs/index.tsx index dc65d60d..465b0cec 100644 --- a/dashboard/src/pages/runs/index.tsx +++ b/dashboard/src/pages/runs/index.tsx @@ -151,7 +151,7 @@ export function RunsPage() {
- UUID + ID Experiment ID Status Created diff --git a/dashboard/src/types/index.ts b/dashboard/src/types/index.ts index 0471ed7c..1b949190 100644 --- a/dashboard/src/types/index.ts +++ b/dashboard/src/types/index.ts @@ -72,6 +72,7 @@ export interface Run { userId: string; experimentId: string; meta: Record | null; + duration: number; status: Status; createdAt: string; aggregatedTokens: TokenStats; diff --git a/dashboard/static/assets/index-C4qfalyR.css b/dashboard/static/assets/index-C4qfalyR.css new file mode 100644 index 00000000..f64eb8bd --- /dev/null +++ b/dashboard/static/assets/index-C4qfalyR.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[550px\]{height:550px}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-80{max-height:20rem}.max-h-\[85vh\]{max-height:85vh}.min-h-9{min-height:2.25rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-fuchsia-300{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(165 180 252 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-lime-300{--tw-border-opacity: 1;border-color:rgb(190 242 100 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(249 168 212 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(216 180 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-stone-300{--tw-border-opacity: 1;border-color:rgb(214 211 209 / var(--tw-border-opacity, 1))}.border-teal-300{--tw-border-opacity: 1;border-color:rgb(94 234 212 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-300{--tw-border-opacity: 1;border-color:rgb(196 181 253 / var(--tw-border-opacity, 1))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-fuchsia-100{--tw-bg-opacity: 1;background-color:rgb(250 232 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-stone-100{--tw-bg-opacity: 1;background-color:rgb(245 245 244 / var(--tw-bg-opacity, 1))}.bg-teal-100{--tw-bg-opacity: 1;background-color:rgb(204 251 241 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-fuchsia-700{--tw-text-opacity: 1;color:rgb(162 28 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity, 1))}.text-teal-700{--tw-text-opacity: 1;color:rgb(15 118 110 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/index-C7uEdDQh.css b/dashboard/static/assets/index-C7uEdDQh.css deleted file mode 100644 index ab21bee9..00000000 --- a/dashboard/static/assets/index-C7uEdDQh.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.col-span-4{grid-column:span 4 / span 4}.col-span-8{grid-column:span 8 / span 8}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[500px\]{height:500px}.h-\[550px\]{height:550px}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-60{max-height:15rem}.max-h-80{max-height:20rem}.max-h-\[500px\]{max-height:500px}.max-h-\[600px\]{max-height:600px}.max-h-\[85vh\]{max-height:85vh}.min-h-9{min-height:2.25rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[18px\]{width:18px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-fuchsia-300{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-indigo-300{--tw-border-opacity: 1;border-color:rgb(165 180 252 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-lime-300{--tw-border-opacity: 1;border-color:rgb(190 242 100 / var(--tw-border-opacity, 1))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity, 1))}.border-pink-300{--tw-border-opacity: 1;border-color:rgb(249 168 212 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-300{--tw-border-opacity: 1;border-color:rgb(216 180 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity, 1))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-stone-300{--tw-border-opacity: 1;border-color:rgb(214 211 209 / var(--tw-border-opacity, 1))}.border-teal-300{--tw-border-opacity: 1;border-color:rgb(94 234 212 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-300{--tw-border-opacity: 1;border-color:rgb(196 181 253 / var(--tw-border-opacity, 1))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity, 1))}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-fuchsia-100{--tw-bg-opacity: 1;background-color:rgb(250 232 255 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-lime-100{--tw-bg-opacity: 1;background-color:rgb(236 252 203 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 231 243 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-100{--tw-bg-opacity: 1;background-color:rgb(255 228 230 / var(--tw-bg-opacity, 1))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-stone-100{--tw-bg-opacity: 1;background-color:rgb(245 245 244 / var(--tw-bg-opacity, 1))}.bg-teal-100{--tw-bg-opacity: 1;background-color:rgb(204 251 241 / var(--tw-bg-opacity, 1))}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-fuchsia-700{--tw-text-opacity: 1;color:rgb(162 28 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-lime-700{--tw-text-opacity: 1;color:rgb(77 124 15 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-sky-700{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity, 1))}.text-teal-700{--tw-text-opacity: 1;color:rgb(15 118 110 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/index-CZV_pqRz.js b/dashboard/static/assets/index-CZV_pqRz.js deleted file mode 100644 index 8cc85400..00000000 --- a/dashboard/static/assets/index-CZV_pqRz.js +++ /dev/null @@ -1,578 +0,0 @@ -var sw=e=>{throw TypeError(e)};var lm=(e,t,r)=>t.has(e)||sw("Cannot "+r);var $=(e,t,r)=>(lm(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?sw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(lm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(lm(e,t,"access private method"),r);var qc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return $(e,t,n)}});function rM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Vc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var UA={exports:{}},Fh={},WA={exports:{}},pe={};/** - * @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 Sc=Symbol.for("react.element"),nM=Symbol.for("react.portal"),iM=Symbol.for("react.fragment"),aM=Symbol.for("react.strict_mode"),oM=Symbol.for("react.profiler"),sM=Symbol.for("react.provider"),lM=Symbol.for("react.context"),uM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),fM=Symbol.for("react.memo"),dM=Symbol.for("react.lazy"),lw=Symbol.iterator;function hM(e){return e===null||typeof e!="object"?null:(e=lw&&e[lw]||e["@@iterator"],typeof e=="function"?e:null)}var HA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KA=Object.assign,qA={};function Vs(e,t,r){this.props=e,this.context=t,this.refs=qA,this.updater=r||HA}Vs.prototype.isReactComponent={};Vs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Vs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function VA(){}VA.prototype=Vs.prototype;function $0(e,t,r){this.props=e,this.context=t,this.refs=qA,this.updater=r||HA}var M0=$0.prototype=new VA;M0.constructor=$0;KA(M0,Vs.prototype);M0.isPureReactComponent=!0;var uw=Array.isArray,GA=Object.prototype.hasOwnProperty,I0={current:null},YA={key:!0,ref:!0,__self:!0,__source:!0};function XA(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)GA.call(t,n)&&!YA.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=C[V];if(0>>1;Vi(be,W))Wei(Oe,be)?(C[V]=Oe,C[We]=W,V=We):(C[V]=be,C[re]=W,V=re);else if(Wei(Oe,W))C[V]=Oe,C[We]=W,V=We;else break e}}return F}function i(C,F){var W=C.sortIndex-F.sortIndex;return W!==0?W:C.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,v=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(C){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=C)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S(C){if(m=!1,x(C),!v)if(r(l)!==null)v=!0,L(w);else{var F=r(u);F!==null&&z(S,F.startTime-C)}}function w(C,F){v=!1,m&&(m=!1,y(E),E=-1),p=!0;var W=d;try{for(x(F),f=r(l);f!==null&&(!(f.expirationTime>F)||C&&!T());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var H=V(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(l)&&n(l),x(F)}else n(l);f=r(l)}if(f!==null)var Y=!0;else{var re=r(u);re!==null&&z(S,re.startTime-F),Y=!1}return Y}finally{f=null,d=W,p=!1}}var O=!1,P=null,E=-1,j=5,_=-1;function T(){return!(e.unstable_now()-_C||125V?(C.sortIndex=W,t(u,C),r(l)===null&&C===r(u)&&(m?(y(E),E=-1):m=!0,z(S,W-V))):(C.sortIndex=H,t(l,C),v||p||(v=!0,L(w))),C},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(C){var F=d;return function(){var W=d;d=F;try{return C.apply(this,arguments)}finally{d=W}}}})(tj);ej.exports=tj;var PM=ej.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 EM=A,br=PM;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$v=Object.prototype.hasOwnProperty,AM=/^[: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]*$/,fw={},dw={};function jM(e){return $v.call(dw,e)?!0:$v.call(fw,e)?!1:AM.test(e)?dw[e]=!0:(fw[e]=!0,!1)}function _M(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TM(e,t,r,n){if(t===null||typeof t>"u"||_M(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Gt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var _t={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_t[e]=new Gt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_t[t]=new Gt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_t[e]=new Gt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_t[e]=new Gt(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){_t[e]=new Gt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_t[e]=new Gt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_t[e]=new Gt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_t[e]=new Gt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_t[e]=new Gt(e,5,!1,e.toLowerCase(),null,!1,!1)});var L0=/[\-:]([a-z])/g;function F0(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(L0,F0);_t[t]=new Gt(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(L0,F0);_t[t]=new Gt(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(L0,F0);_t[t]=new Gt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_t[e]=new Gt(e,1,!1,e.toLowerCase(),null,!1,!1)});_t.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_t[e]=new Gt(e,1,!1,e.toLowerCase(),null,!0,!0)});function B0(e,t,r,n){var i=_t.hasOwnProperty(t)?_t[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{fm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Fl(e):""}function kM(e){switch(e.tag){case 5:return Fl(e.type);case 16:return Fl("Lazy");case 13:return Fl("Suspense");case 19:return Fl("SuspenseList");case 0:case 2:case 15:return e=dm(e.type,!1),e;case 11:return e=dm(e.type.render,!1),e;case 1:return e=dm(e.type,!0),e;default:return""}}function Rv(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 Eo:return"Fragment";case Po:return"Portal";case Mv:return"Profiler";case z0:return"StrictMode";case Iv:return"Suspense";case Dv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ij:return(e.displayName||"Context")+".Consumer";case nj:return(e._context.displayName||"Context")+".Provider";case U0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W0:return t=e.displayName||null,t!==null?t:Rv(e.type)||"Memo";case mi:t=e._payload,e=e._init;try{return Rv(e(t))}catch{}}return null}function NM(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 Rv(t);case 8:return t===z0?"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 Vi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CM(e){var t=oj(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xc(e){e._valueTracker||(e._valueTracker=CM(e))}function sj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=oj(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function td(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 Lv(e,t){var r=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function pw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lj(e,t){t=t.checked,t!=null&&B0(e,"checked",t,!1)}function Fv(e,t){lj(e,t);var r=Vi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bv(e,t.type,Vi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bv(e,t,r){(t!=="number"||td(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Bl=Array.isArray;function zo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Qc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function cu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kl={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},$M=["Webkit","ms","Moz","O"];Object.keys(Kl).forEach(function(e){$M.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kl[t]=Kl[e]})});function dj(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kl.hasOwnProperty(e)&&Kl[e]?(""+t).trim():t+"px"}function hj(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=dj(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var MM=Ye({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 Wv(e,t){if(t){if(MM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Hv(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 Kv=null;function H0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qv=null,Uo=null,Wo=null;function gw(e){if(e=Ec(e)){if(typeof qv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Hh(t),qv(e.stateNode,e.type,t))}}function pj(e){Uo?Wo?Wo.push(e):Wo=[e]:Uo=e}function mj(){if(Uo){var e=Uo,t=Wo;if(Wo=Uo=null,gw(e),t)for(e=0;e>>=0,e===0?32:31-(KM(e)/qM|0)|0}var Jc=64,Zc=4194304;function zl(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 ad(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=zl(s):(a&=o,a!==0&&(n=zl(a)))}else o=r&~i,o!==0?n=zl(o):a!==0&&(n=zl(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Oc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zr(t),e[t]=r}function XM(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=Vl),jw=" ",_w=!1;function Ij(e,t){switch(e){case"keyup":return PI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function AI(e,t){switch(e){case"compositionend":return Dj(t);case"keypress":return t.which!==32?null:(_w=!0,jw);case"textInput":return e=t.data,e===jw&&_w?null:e;default:return null}}function jI(e,t){if(Ao)return e==="compositionend"||!J0&&Ij(e,t)?(e=$j(),Lf=Y0=Ti=null,Ao=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Cw(r)}}function Bj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zj(){for(var e=window,t=td();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=td(e.document)}return t}function Z0(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 DI(e){var t=zj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Bj(r.ownerDocument.documentElement,r)){if(n!==null&&Z0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=$w(r,a);var o=$w(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,jo=null,Jv=null,Yl=null,Zv=!1;function Mw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zv||jo==null||jo!==td(n)||(n=jo,"selectionStart"in n&&Z0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Yl&&vu(Yl,n)||(Yl=n,n=ld(Jv,"onSelect"),0ko||(e.current=ay[ko],ay[ko]=null,ko--)}function Re(e,t){ko++,ay[ko]=e.current,e.current=t}var Gi={},Lt=Qi(Gi),tr=Qi(!1),za=Gi;function fs(e,t){var r=e.type.contextTypes;if(!r)return Gi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function rr(e){return e=e.childContextTypes,e!=null}function cd(){Ue(tr),Ue(Lt)}function zw(e,t,r){if(Lt.current!==Gi)throw Error(K(168));Re(Lt,t),Re(tr,r)}function Xj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,NM(e)||"Unknown",i));return Ye({},r,n)}function fd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gi,za=Lt.current,Re(Lt,e),Re(tr,tr.current),!0}function Uw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=Xj(e,t,za),n.__reactInternalMemoizedMergedChildContext=e,Ue(tr),Ue(Lt),Re(Lt,e)):Ue(tr),Re(tr,r)}var Mn=null,Kh=!1,Am=!1;function Qj(e){Mn===null?Mn=[e]:Mn.push(e)}function GI(e){Kh=!0,Qj(e)}function Ji(){if(!Am&&Mn!==null){Am=!0;var e=0,t=ke;try{var r=Mn;for(ke=1;e>=o,i-=o,Rn=1<<32-Zr(t)+i|r<E?(j=P,P=null):j=P.sibling;var _=d(y,P,x[E],S);if(_===null){P===null&&(P=j);break}e&&P&&_.alternate===null&&t(y,P),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_,P=j}if(E===x.length)return r(y,P),He&&ca(y,E),w;if(P===null){for(;EE?(j=P,P=null):j=P.sibling;var T=d(y,P,_.value,S);if(T===null){P===null&&(P=j);break}e&&P&&T.alternate===null&&t(y,P),b=a(T,b,E),O===null?w=T:O.sibling=T,O=T,P=j}if(_.done)return r(y,P),He&&ca(y,E),w;if(P===null){for(;!_.done;E++,_=x.next())_=f(y,_.value,S),_!==null&&(b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return He&&ca(y,E),w}for(P=n(y,P);!_.done;E++,_=x.next())_=p(P,y,E,_.value,S),_!==null&&(e&&_.alternate!==null&&P.delete(_.key===null?E:_.key),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return e&&P.forEach(function(k){return t(y,k)}),He&&ca(y,E),w}function g(y,b,x,S){if(typeof x=="object"&&x!==null&&x.type===Eo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Yc:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===Eo){if(O.tag===7){r(y,O.sibling),b=i(O,x.props.children),b.return=y,y=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===mi&&Kw(w)===O.type){r(y,O.sibling),b=i(O,x.props),b.ref=Sl(y,O,x),b.return=y,y=b;break e}r(y,O);break}else t(y,O);O=O.sibling}x.type===Eo?(b=Da(x.props.children,y.mode,S,x.key),b.return=y,y=b):(S=qf(x.type,x.key,x.props,null,y.mode,S),S.ref=Sl(y,b,x),S.return=y,y=S)}return o(y);case Po:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else t(y,b);b=b.sibling}b=Mm(x,y.mode,S),b.return=y,y=b}return o(y);case mi:return O=x._init,g(y,b,O(x._payload),S)}if(Bl(x))return v(y,b,x,S);if(yl(x))return m(y,b,x,S);sf(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,x),b.return=y,y=b):(r(y,b),b=$m(x,y.mode,S),b.return=y,y=b),o(y)):r(y,b)}return g}var hs=t_(!0),r_=t_(!1),pd=Qi(null),md=null,$o=null,nb=null;function ib(){nb=$o=md=null}function ab(e){var t=pd.current;Ue(pd),e._currentValue=t}function ly(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ko(e,t){md=e,nb=$o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zt=!0),e.firstContext=null)}function Ir(e){var t=e._currentValue;if(nb!==e)if(e={context:e,memoizedValue:t,next:null},$o===null){if(md===null)throw Error(K(308));$o=e,md.dependencies={lanes:0,firstContext:e}}else $o=$o.next=e;return t}var ga=null;function ob(e){ga===null?ga=[e]:ga.push(e)}function n_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,ob(t)):(r.next=i.next,i.next=r),t.interleaved=r,Vn(e,n)}function Vn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var vi=!1;function sb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function i_(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 Un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ge&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Vn(e,r)}return i=n.interleaved,i===null?(t.next=t,ob(n)):(t.next=i.next,i.next=t),n.interleaved=t,Vn(e,r)}function Bf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,q0(e,r)}}function qw(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function vd(e,t,r,n){var i=e.updateQueue;vi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var d=s.lane,p=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(d=t,p=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(p,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,d=typeof v=="function"?v.call(p,f,d):v,d==null)break e;f=Ye({},f,d);break e;case 2:vi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ha|=o,e.lanes=o,e.memoizedState=f}}function Vw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=_m.transition;_m.transition={};try{e(!1),t()}finally{ke=r,_m.transition=n}}function w_(){return Dr().memoizedState}function JI(e,t,r){var n=Bi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},S_(e))O_(t,r);else if(r=n_(e,t,r,n),r!==null){var i=Kt();en(r,e,n,i),P_(r,t,n)}}function ZI(e,t,r){var n=Bi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(S_(e))O_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,nn(s,o)){var l=t.interleaved;l===null?(i.next=i,ob(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=n_(e,t,i,n),r!==null&&(i=Kt(),en(r,e,n,i),P_(r,t,n))}}function S_(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function O_(e,t){Xl=gd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function P_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,q0(e,r)}}var bd={readContext:Ir,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},eD={readContext:Ir,useCallback:function(e,t){return dn().memoizedState=[e,t===void 0?null:t],e},useContext:Ir,useEffect:Yw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Uf(4194308,4,v_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Uf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Uf(4,2,e,t)},useMemo:function(e,t){var r=dn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=dn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=JI.bind(null,Ge,e),[n.memoizedState,e]},useRef:function(e){var t=dn();return e={current:e},t.memoizedState=e},useState:Gw,useDebugValue:mb,useDeferredValue:function(e){return dn().memoizedState=e},useTransition:function(){var e=Gw(!1),t=e[0];return e=QI.bind(null,e[1]),dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ge,i=dn();if(He){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),xt===null)throw Error(K(349));Wa&30||l_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Yw(c_.bind(null,n,a,e),[e]),n.flags|=2048,Pu(9,u_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=dn(),t=xt.identifierPrefix;if(He){var r=Ln,n=Rn;r=(n&~(1<<32-Zr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Su++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[vn]=t,e[bu]=n,M_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hv(r,n),r){case"dialog":Fe("cancel",e),Fe("close",e),i=n;break;case"iframe":case"object":case"embed":Fe("load",e),i=n;break;case"video":case"audio":for(i=0;ivs&&(t.flags|=128,n=!0,Ol(a,!1),t.lanes=4194304)}else{if(!n)if(e=yd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ol(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!He)return kt(t),null}else 2*rt()-a.renderingStartTime>vs&&r!==1073741824&&(t.flags|=128,n=!0,Ol(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=rt(),t.sibling=null,r=qe.current,Re(qe,n?r&1|2:r&1),t):(kt(t),null);case 22:case 23:return wb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?hr&1073741824&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function lD(e,t){switch(tb(t),t.tag){case 1:return rr(t.type)&&cd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),Ue(tr),Ue(Lt),cb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ub(t),null;case 13:if(Ue(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(qe),null;case 4:return ps(),null;case 10:return ab(t.type._context),null;case 22:case 23:return wb(),null;case 24:return null;default:return null}}var uf=!1,$t=!1,uD=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Mo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ze(e,t,n)}else r.current=null}function yy(e,t,r){try{r()}catch(n){Ze(e,t,n)}}var o1=!1;function cD(e,t){if(ey=od,e=zj(),Z0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===i&&(s=o),d===a&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ty={focusedElem:e,selectionRange:r},od=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Kr(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){Ze(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return v=o1,o1=!1,v}function Ql(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&yy(t,r,a)}i=i.next}while(i!==n)}}function Gh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function gy(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function R_(e){var t=e.alternate;t!==null&&(e.alternate=null,R_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vn],delete t[bu],delete t[iy],delete t[qI],delete t[VI])),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 L_(e){return e.tag===5||e.tag===3||e.tag===4}function s1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||L_(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 by(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ud));else if(n!==4&&(e=e.child,e!==null))for(by(e,t,r),e=e.sibling;e!==null;)by(e,t,r),e=e.sibling}function xy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(xy(e,t,r),e=e.sibling;e!==null;)xy(e,t,r),e=e.sibling}var Pt=null,Gr=!1;function ui(e,t,r){for(r=r.child;r!==null;)F_(e,t,r),r=r.sibling}function F_(e,t,r){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(Bh,r)}catch{}switch(r.tag){case 5:$t||Mo(r,t);case 6:var n=Pt,i=Gr;Pt=null,ui(e,t,r),Pt=n,Gr=i,Pt!==null&&(Gr?(e=Pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pt.removeChild(r.stateNode));break;case 18:Pt!==null&&(Gr?(e=Pt,r=r.stateNode,e.nodeType===8?Em(e.parentNode,r):e.nodeType===1&&Em(e,r),pu(e)):Em(Pt,r.stateNode));break;case 4:n=Pt,i=Gr,Pt=r.stateNode.containerInfo,Gr=!0,ui(e,t,r),Pt=n,Gr=i;break;case 0:case 11:case 14:case 15:if(!$t&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&yy(r,t,o),i=i.next}while(i!==n)}ui(e,t,r);break;case 1:if(!$t&&(Mo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ze(r,t,s)}ui(e,t,r);break;case 21:ui(e,t,r);break;case 22:r.mode&1?($t=(n=$t)||r.memoizedState!==null,ui(e,t,r),$t=n):ui(e,t,r);break;default:ui(e,t,r)}}function l1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new uD),t.forEach(function(n){var i=bD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ur(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=rt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*dD(n/1960))-n,10e?16:e,ki===null)var n=!1;else{if(e=ki,ki=null,Sd=0,ge&6)throw Error(K(331));var i=ge;for(ge|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lrt()-bb?Ia(e,0):gb|=r),nr(e,t)}function V_(e,t){t===0&&(e.mode&1?(t=Zc,Zc<<=1,!(Zc&130023424)&&(Zc=4194304)):t=1);var r=Kt();e=Vn(e,t),e!==null&&(Oc(e,t,r),nr(e,r))}function gD(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),V_(e,r)}function bD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),V_(e,r)}var G_;G_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||tr.current)Zt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Zt=!1,oD(e,t,r);Zt=!!(e.flags&131072)}else Zt=!1,He&&t.flags&1048576&&Jj(t,hd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Wf(e,t),e=t.pendingProps;var i=fs(t,Lt.current);Ko(t,r),i=db(null,t,n,e,i,r);var a=hb();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rr(n)?(a=!0,fd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sb(t),i.updater=Vh,t.stateNode=i,i._reactInternals=t,cy(t,n,e,r),t=hy(null,t,n,!0,a,r)):(t.tag=0,He&&a&&eb(t),zt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Wf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=wD(n),e=Kr(n,e),i){case 0:t=dy(null,t,n,e,r);break e;case 1:t=n1(null,t,n,e,r);break e;case 11:t=t1(null,t,n,e,r);break e;case 14:t=r1(null,t,n,Kr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),dy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),n1(e,t,n,i,r);case 3:e:{if(N_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,i_(e,t),vd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ms(Error(K(423)),t),t=i1(e,t,n,r,i);break e}else if(n!==i){i=ms(Error(K(424)),t),t=i1(e,t,n,r,i);break e}else for(vr=Ri(t.stateNode.containerInfo.firstChild),yr=t,He=!0,Qr=null,r=r_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ds(),n===i){t=Gn(e,t,r);break e}zt(e,t,n,r)}t=t.child}return t;case 5:return a_(t),e===null&&sy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ry(n,i)?o=null:a!==null&&ry(n,a)&&(t.flags|=32),k_(e,t),zt(e,t,o,r),t.child;case 6:return e===null&&sy(t),null;case 13:return C_(e,t,r);case 4:return lb(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=hs(t,null,n,r):zt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),t1(e,t,n,i,r);case 7:return zt(e,t,t.pendingProps,r),t.child;case 8:return zt(e,t,t.pendingProps.children,r),t.child;case 12:return zt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Re(pd,n._currentValue),n._currentValue=o,a!==null)if(nn(a.value,o)){if(a.children===i.children&&!tr.current){t=Gn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Un(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),ly(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),ly(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}zt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ko(t,r),i=Ir(i),n=n(i),t.flags|=1,zt(e,t,n,r),t.child;case 14:return n=t.type,i=Kr(n,t.pendingProps),i=Kr(n.type,i),r1(e,t,n,i,r);case 15:return __(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Kr(n,i),Wf(e,t),t.tag=1,rr(n)?(e=!0,fd(t)):e=!1,Ko(t,r),E_(t,n,i),cy(t,n,i,r),hy(null,t,n,!0,e,r);case 19:return $_(e,t,r);case 22:return T_(e,t,r)}throw Error(K(156,t.tag))};function Y_(e,t){return Sj(e,t)}function xD(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(e,t,r,n){return new xD(e,t,r,n)}function Ob(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wD(e){if(typeof e=="function")return Ob(e)?1:0;if(e!=null){if(e=e.$$typeof,e===U0)return 11;if(e===W0)return 14}return 2}function zi(e,t){var r=e.alternate;return r===null?(r=Cr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function qf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Ob(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Eo:return Da(r.children,i,a,t);case z0:o=8,i|=8;break;case Mv:return e=Cr(12,r,t,i|2),e.elementType=Mv,e.lanes=a,e;case Iv:return e=Cr(13,r,t,i),e.elementType=Iv,e.lanes=a,e;case Dv:return e=Cr(19,r,t,i),e.elementType=Dv,e.lanes=a,e;case aj:return Xh(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nj:o=10;break e;case ij:o=9;break e;case U0:o=11;break e;case W0:o=14;break e;case mi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Cr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Da(e,t,r,n){return e=Cr(7,e,n,t),e.lanes=r,e}function Xh(e,t,r,n){return e=Cr(22,e,n,t),e.elementType=aj,e.lanes=r,e.stateNode={isHidden:!1},e}function $m(e,t,r){return e=Cr(6,e,null,t),e.lanes=r,e}function Mm(e,t,r){return t=Cr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SD(e,t,r,n,i){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=pm(0),this.expirationTimes=pm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pb(e,t,r,n,i,a,o,s,l){return e=new SD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Cr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},sb(a),e}function OD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Z_)}catch(e){console.error(e)}}Z_(),ZA.exports=wr;var _b=ZA.exports;const _D=Ae(_b);var v1=_b;Cv.createRoot=v1.createRoot,Cv.hydrateRoot=v1.hydrateRoot;var jc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},TD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,C0,CA,kD=(CA=class{constructor(){ne(this,wi,TD);ne(this,C0,!1)}setTimeoutProvider(e){X(this,wi,e)}setTimeout(e,t){return $(this,wi).setTimeout(e,t)}clearTimeout(e){$(this,wi).clearTimeout(e)}setInterval(e,t){return $(this,wi).setInterval(e,t)}clearInterval(e){$(this,wi).clearInterval(e)}},wi=new WeakMap,C0=new WeakMap,CA),xa=new kD;function ND(e){setTimeout(e,0)}var qa=typeof window>"u"||"Deno"in globalThis;function Qt(){}function CD(e,t){return typeof e=="function"?e(t):e}function Ey(e){return typeof e=="number"&&e>=0&&e!==1/0}function eT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ui(e,t){return typeof e=="function"?e(t):e}function _r(e,t){return typeof e=="function"?e(t):e}function y1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Tb(o,t.options))return!1}else if(!ju(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function g1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Au(t.options.mutationKey)!==Au(a))return!1}else if(!ju(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Tb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Au)(e)}function Au(e){return JSON.stringify(e,(t,r)=>jy(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function ju(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ju(e[r],t[r])):!1}var $D=Object.prototype.hasOwnProperty;function tT(e,t){if(e===t)return e;const r=b1(e)&&b1(t);if(!r&&!(jy(e)&&jy(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{xa.setTimeout(t,e)})}function _y(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?tT(e,t):t}function ID(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function DD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var kb=Symbol();function rT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===kb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function RD(e,t){return typeof e=="function"?e(...t):!!e}var Aa,Si,Jo,$A,LD=($A=class extends jc{constructor(){super();ne(this,Aa);ne(this,Si);ne(this,Jo);X(this,Jo,t=>{if(!qa&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Si)||this.setEventListener($(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Si))==null||t.call(this),X(this,Si,void 0))}setEventListener(t){var r;X(this,Jo,t),(r=$(this,Si))==null||r.call(this),X(this,Si,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Aa)!==t&&(X(this,Aa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Aa)=="boolean"?$(this,Aa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Aa=new WeakMap,Si=new WeakMap,Jo=new WeakMap,$A),Nb=new LD;function Ty(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var FD=ND;function BD(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=FD;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Et=BD(),Zo,Oi,es,MA,zD=(MA=class extends jc{constructor(){super();ne(this,Zo,!0);ne(this,Oi);ne(this,es);X(this,es,t=>{if(!qa&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Oi)||this.setEventListener($(this,es))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Oi))==null||t.call(this),X(this,Oi,void 0))}setEventListener(t){var r;X(this,es,t),(r=$(this,Oi))==null||r.call(this),X(this,Oi,t(this.setOnline.bind(this)))}setOnline(t){$(this,Zo)!==t&&(X(this,Zo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,Zo)}},Zo=new WeakMap,Oi=new WeakMap,es=new WeakMap,MA),Ed=new zD;function UD(e){return Math.min(1e3*2**e,3e4)}function nT(e){return(e??"online")==="online"?Ed.isOnline():!0}var ky=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function iT(e){let t=!1,r=0,n;const i=Ty(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new ky(m);d(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>Nb.isFocused()&&(e.networkMode==="always"||Ed.isOnline())&&e.canRun(),c=()=>nT(e.networkMode)&&e.canRun(),f=m=>{a()||(n==null||n(),i.resolve(m))},d=m=>{a()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var g;n=y=>{(a()||u())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=r===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var O;if(a())return;const b=e.retry??(qa?0:3),x=e.retryDelay??UD,S=typeof x=="function"?x(r,y):x,w=b===!0||typeof b=="number"&&ru()?void 0:p()).then(()=>{t?d(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?v():p().then(v),i)}}var ja,IA,aT=(IA=class{constructor(){ne(this,ja)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ey(this.gcTime)&&X(this,ja,xa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qa?1/0:5*60*1e3))}clearGcTimeout(){$(this,ja)&&(xa.clearTimeout($(this,ja)),X(this,ja,void 0))}},ja=new WeakMap,IA),_a,ts,jr,Ta,vt,yc,ka,qr,Nn,DA,WD=(DA=class extends aT{constructor(t){super();ne(this,qr);ne(this,_a);ne(this,ts);ne(this,jr);ne(this,Ta);ne(this,vt);ne(this,yc);ne(this,ka);X(this,ka,!1),X(this,yc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,Ta,t.client),X(this,jr,$(this,Ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,_a,w1(this.options)),this.state=t.state??$(this,_a),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,vt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,yc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=w1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,_a,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,jr).remove(this)}setData(t,r){const n=_y(this.state.data,t,this.options);return me(this,qr,Nn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){me(this,qr,Nn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=$(this,vt))==null?void 0:n.promise;return(i=$(this,vt))==null||i.cancel(t),r?r.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,_a))}isActive(){return this.observers.some(t=>_r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ui(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!eT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,vt)&&($(this,ka)?$(this,vt).cancel({revert:!0}):$(this,vt).cancelRetry()),this.scheduleGc()),$(this,jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,qr,Nn).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,c,f,d,p,v,m,g,y,b,x;if(this.state.fetchStatus!=="idle"&&((l=$(this,vt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,vt))return $(this,vt).continueRetry(),$(this,vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,ka,!0),n.signal)})},a=()=>{const S=rT(this.options,r),O=(()=>{const P={client:$(this,Ta),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return X(this,ka,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,Ta),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&me(this,qr,Nn).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),X(this,vt,iT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof ky&&S.revert&&this.setState({...$(this,ts),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{me(this,qr,Nn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{me(this,qr,Nn).call(this,{type:"pause"})},onContinue:()=>{me(this,qr,Nn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await $(this,vt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(d=$(this,jr).config).onSuccess)==null||p.call(d,S,this),(m=(v=$(this,jr).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof ky){if(S.silent)return $(this,vt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw me(this,qr,Nn).call(this,{type:"error",error:S}),(y=(g=$(this,jr).config).onError)==null||y.call(g,S,this),(x=(b=$(this,jr).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},_a=new WeakMap,ts=new WeakMap,jr=new WeakMap,Ta=new WeakMap,vt=new WeakMap,yc=new WeakMap,ka=new WeakMap,qr=new WeakSet,Nn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...oT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,ts,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Et.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,jr).notify({query:this,type:"updated",action:t})})},DA);function oT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function w1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xt,ve,gc,Ft,Na,rs,In,Pi,bc,ns,is,Ca,$a,Ei,as,Ee,Wl,Ny,Cy,$y,My,Iy,Dy,Ry,sT,RA,HD=(RA=class extends jc{constructor(t,r){super();ne(this,Ee);ne(this,Xt);ne(this,ve);ne(this,gc);ne(this,Ft);ne(this,Na);ne(this,rs);ne(this,In);ne(this,Pi);ne(this,bc);ne(this,ns);ne(this,is);ne(this,Ca);ne(this,$a);ne(this,Ei);ne(this,as,new Set);this.options=r,X(this,Xt,t),X(this,Pi,null),X(this,In,Ty()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,ve).addObserver(this),S1($(this,ve),this.options)?me(this,Ee,Wl).call(this):this.updateResult(),me(this,Ee,My).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ly($(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ly($(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Ee,Iy).call(this),me(this,Ee,Dy).call(this),$(this,ve).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,ve);if(this.options=$(this,Xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _r(this.options.enabled,$(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Ee,Ry).call(this),$(this,ve).setOptions(this.options),r._defaulted&&!Ay(this.options,r)&&$(this,Xt).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,ve),observer:this});const i=this.hasListeners();i&&O1($(this,ve),n,this.options,r)&&me(this,Ee,Wl).call(this),this.updateResult(),i&&($(this,ve)!==n||_r(this.options.enabled,$(this,ve))!==_r(r.enabled,$(this,ve))||Ui(this.options.staleTime,$(this,ve))!==Ui(r.staleTime,$(this,ve)))&&me(this,Ee,Ny).call(this);const a=me(this,Ee,Cy).call(this);i&&($(this,ve)!==n||_r(this.options.enabled,$(this,ve))!==_r(r.enabled,$(this,ve))||a!==$(this,Ei))&&me(this,Ee,$y).call(this,a)}getOptimisticResult(t){const r=$(this,Xt).getQueryCache().build($(this,Xt),t),n=this.createResult(r,t);return qD(this,n)&&(X(this,Ft,n),X(this,rs,this.options),X(this,Na,$(this,ve).state)),n}getCurrentResult(){return $(this,Ft)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,In).status==="pending"&&$(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,as).add(t)}getCurrentQuery(){return $(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,Xt).defaultQueryOptions(t),n=$(this,Xt).getQueryCache().build($(this,Xt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,Ee,Wl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Ft)))}createResult(t,r){var j;const n=$(this,ve),i=this.options,a=$(this,Ft),o=$(this,Na),s=$(this,rs),u=t!==n?t.state:$(this,gc),{state:c}=t;let f={...c},d=!1,p;if(r._optimisticResults){const _=this.hasListeners(),T=!_&&S1(t,r),k=_&&O1(t,n,r,i);(T||k)&&(f={...f,...oT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=f;p=f.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&g==="pending"){let _;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(_=a.data,y=!0):_=typeof r.placeholderData=="function"?r.placeholderData((j=$(this,is))==null?void 0:j.state.data,$(this,is)):r.placeholderData,_!==void 0&&(g="success",p=_y(a==null?void 0:a.data,_,r),d=!0)}if(r.select&&p!==void 0&&!y)if(a&&p===(o==null?void 0:o.data)&&r.select===$(this,bc))p=$(this,ns);else try{X(this,bc,r.select),p=r.select(p),p=_y(a==null?void 0:a.data,p,r),X(this,ns,p),X(this,Pi,null)}catch(_){X(this,Pi,_)}$(this,Pi)&&(v=$(this,Pi),p=$(this,ns),m=Date.now(),g="error");const b=f.fetchStatus==="fetching",x=g==="pending",S=g==="error",w=x&&b,O=p!==void 0,E={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&O,isStale:Cb(t,r),refetch:this.refetch,promise:$(this,In),isEnabled:_r(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=M=>{E.status==="error"?M.reject(E.error):E.data!==void 0&&M.resolve(E.data)},T=()=>{const M=X(this,In,E.promise=Ty());_(M)},k=$(this,In);switch(k.status){case"pending":t.queryHash===n.queryHash&&_(k);break;case"fulfilled":(E.status==="error"||E.data!==k.value)&&T();break;case"rejected":(E.status!=="error"||E.error!==k.reason)&&T();break}}return E}updateResult(){const t=$(this,Ft),r=this.createResult($(this,ve),this.options);if(X(this,Na,$(this,ve).state),X(this,rs,this.options),$(this,Na).data!==void 0&&X(this,is,$(this,ve)),Ay(r,t))return;X(this,Ft,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!$(this,as).size)return!0;const o=new Set(a??$(this,as));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Ft)).some(s=>{const l=s;return $(this,Ft)[l]!==t[l]&&o.has(l)})};me(this,Ee,sT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Ee,My).call(this)}},Xt=new WeakMap,ve=new WeakMap,gc=new WeakMap,Ft=new WeakMap,Na=new WeakMap,rs=new WeakMap,In=new WeakMap,Pi=new WeakMap,bc=new WeakMap,ns=new WeakMap,is=new WeakMap,Ca=new WeakMap,$a=new WeakMap,Ei=new WeakMap,as=new WeakMap,Ee=new WeakSet,Wl=function(t){me(this,Ee,Ry).call(this);let r=$(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Qt)),r},Ny=function(){me(this,Ee,Iy).call(this);const t=Ui(this.options.staleTime,$(this,ve));if(qa||$(this,Ft).isStale||!Ey(t))return;const n=eT($(this,Ft).dataUpdatedAt,t)+1;X(this,Ca,xa.setTimeout(()=>{$(this,Ft).isStale||this.updateResult()},n))},Cy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,ve)):this.options.refetchInterval)??!1},$y=function(t){me(this,Ee,Dy).call(this),X(this,Ei,t),!(qa||_r(this.options.enabled,$(this,ve))===!1||!Ey($(this,Ei))||$(this,Ei)===0)&&X(this,$a,xa.setInterval(()=>{(this.options.refetchIntervalInBackground||Nb.isFocused())&&me(this,Ee,Wl).call(this)},$(this,Ei)))},My=function(){me(this,Ee,Ny).call(this),me(this,Ee,$y).call(this,me(this,Ee,Cy).call(this))},Iy=function(){$(this,Ca)&&(xa.clearTimeout($(this,Ca)),X(this,Ca,void 0))},Dy=function(){$(this,$a)&&(xa.clearInterval($(this,$a)),X(this,$a,void 0))},Ry=function(){const t=$(this,Xt).getQueryCache().build($(this,Xt),this.options);if(t===$(this,ve))return;const r=$(this,ve);X(this,ve,t),X(this,gc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},sT=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,Ft))}),$(this,Xt).getQueryCache().notify({query:$(this,ve),type:"observerResultsUpdated"})})},RA);function KD(e,t){return _r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function S1(e,t){return KD(e,t)||e.state.data!==void 0&&Ly(e,t,t.refetchOnMount)}function Ly(e,t,r){if(_r(t.enabled,e)!==!1&&Ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Cb(e,t)}return!1}function O1(e,t,r,n){return(e!==t||_r(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Cb(e,r)}function Cb(e,t){return _r(t.enabled,e)!==!1&&e.isStaleByTime(Ui(t.staleTime,e))}function qD(e,t){return!Ay(e.getCurrentResult(),t)}function P1(e){return{onFetch:(t,r)=>{var c,f,d,p,v;const n=t.options,i=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=rT(t.options,t.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const P=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(T),T})(),E=await y(P),{maxPages:j}=t.options,_=w?DD:ID;return{pages:_(x.pages,E,j),pageParams:_(x.pageParams,S,j)}};if(i&&a.length){const x=i==="backward",S=x?VD:E1,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:E1(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function E1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function VD(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var xc,hn,Bt,Ma,pn,hi,LA,GD=(LA=class extends aT{constructor(t){super();ne(this,pn);ne(this,xc);ne(this,hn);ne(this,Bt);ne(this,Ma);X(this,xc,t.client),this.mutationId=t.mutationId,X(this,Bt,t.mutationCache),X(this,hn,[]),this.state=t.state||YD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,hn).includes(t)||($(this,hn).push(t),this.clearGcTimeout(),$(this,Bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,hn,$(this,hn).filter(r=>r!==t)),this.scheduleGc(),$(this,Bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,hn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Bt).remove(this))}continue(){var t;return((t=$(this,Ma))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,c,f,d,p,v,m,g,y,b,x,S,w,O,P,E,j;const r=()=>{me(this,pn,hi).call(this,{type:"continue"})},n={client:$(this,xc),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,Ma,iT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(_,T)=>{me(this,pn,hi).call(this,{type:"failed",failureCount:_,error:T})},onPause:()=>{me(this,pn,hi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Bt).canRun(this)}));const i=this.state.status==="pending",a=!$(this,Ma).canStart();try{if(i)r();else{me(this,pn,hi).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=$(this,Bt).config).onMutate)==null?void 0:s.call(o,t,this,n));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));T!==this.state.context&&me(this,pn,hi).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const _=await $(this,Ma).start();return await((f=(c=$(this,Bt).config).onSuccess)==null?void 0:f.call(c,_,t,this.state.context,this,n)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,_,t,this.state.context,n)),await((m=(v=$(this,Bt).config).onSettled)==null?void 0:m.call(v,_,null,this.state.variables,this.state.context,this,n)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,_,null,t,this.state.context,n)),me(this,pn,hi).call(this,{type:"success",data:_}),_}catch(_){try{throw await((x=(b=$(this,Bt).config).onError)==null?void 0:x.call(b,_,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,_,t,this.state.context,n)),await((P=(O=$(this,Bt).config).onSettled)==null?void 0:P.call(O,void 0,_,this.state.variables,this.state.context,this,n)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,_,t,this.state.context,n)),_}finally{me(this,pn,hi).call(this,{type:"error",error:_})}}finally{$(this,Bt).runNext(this)}}},xc=new WeakMap,hn=new WeakMap,Bt=new WeakMap,Ma=new WeakMap,pn=new WeakSet,hi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Et.batch(()=>{$(this,hn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Bt).notify({mutation:this,type:"updated",action:t})})},LA);function YD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dn,Vr,wc,FA,XD=(FA=class extends jc{constructor(t={}){super();ne(this,Dn);ne(this,Vr);ne(this,wc);this.config=t,X(this,Dn,new Set),X(this,Vr,new Map),X(this,wc,0)}build(t,r,n){const i=new GD({client:t,mutationCache:this,mutationId:++qc(this,wc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Dn).add(t);const r=df(t);if(typeof r=="string"){const n=$(this,Vr).get(r);n?n.push(t):$(this,Vr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Dn).delete(t)){const r=df(t);if(typeof r=="string"){const n=$(this,Vr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,Vr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=df(t);if(typeof r=="string"){const n=$(this,Vr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=df(t);if(typeof r=="string"){const i=(n=$(this,Vr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{$(this,Dn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Dn).clear(),$(this,Vr).clear()})}getAll(){return Array.from($(this,Dn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>g1(r,n))}findAll(t={}){return this.getAll().filter(r=>g1(t,r))}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Et.batch(()=>Promise.all(t.map(r=>r.continue().catch(Qt))))}},Dn=new WeakMap,Vr=new WeakMap,wc=new WeakMap,FA);function df(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mn,BA,QD=(BA=class extends jc{constructor(t={}){super();ne(this,mn);this.config=t,X(this,mn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Tb(i,r);let o=this.get(a);return o||(o=new WD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,mn).has(t.queryHash)||($(this,mn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,mn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,mn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,mn).get(t)}getAll(){return[...$(this,mn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>y1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>y1(t,n)):r}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mn=new WeakMap,BA),Je,Ai,ji,os,ss,_i,ls,us,zA,JD=(zA=class{constructor(e={}){ne(this,Je);ne(this,Ai);ne(this,ji);ne(this,os);ne(this,ss);ne(this,_i);ne(this,ls);ne(this,us);X(this,Je,e.queryCache||new QD),X(this,Ai,e.mutationCache||new XD),X(this,ji,e.defaultOptions||{}),X(this,os,new Map),X(this,ss,new Map),X(this,_i,0)}mount(){qc(this,_i)._++,$(this,_i)===1&&(X(this,ls,Nb.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Je).onFocus())})),X(this,us,Ed.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Je).onOnline())})))}unmount(){var e,t;qc(this,_i)._--,$(this,_i)===0&&((e=$(this,ls))==null||e.call(this),X(this,ls,void 0),(t=$(this,us))==null||t.call(this),X(this,us,void 0))}isFetching(e){return $(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Je).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,Je).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,Je).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,Je).get(n.queryHash),a=i==null?void 0:i.state.data,o=CD(t,a);if(o!==void 0)return $(this,Je).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Et.batch(()=>$(this,Je).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Je).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,Je);Et.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,Je);return Et.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Et.batch(()=>$(this,Je).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Qt).catch(Qt)}invalidateQueries(e,t={}){return Et.batch(()=>($(this,Je).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Et.batch(()=>$(this,Je).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Qt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,Je).build(this,t);return r.isStaleByTime(Ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qt).catch(Qt)}fetchInfiniteQuery(e){return e.behavior=P1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qt).catch(Qt)}ensureInfiniteQueryData(e){return e.behavior=P1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ed.isOnline()?$(this,Ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Je)}getMutationCache(){return $(this,Ai)}getDefaultOptions(){return $(this,ji)}setDefaultOptions(e){X(this,ji,e)}setQueryDefaults(e,t){$(this,os).set(Au(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,os).values()],r={};return t.forEach(n=>{ju(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,ss).set(Au(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ss).values()],r={};return t.forEach(n=>{ju(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,ji).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===kb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,ji).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Je).clear(),$(this,Ai).clear()}},Je=new WeakMap,Ai=new WeakMap,ji=new WeakMap,os=new WeakMap,ss=new WeakMap,_i=new WeakMap,ls=new WeakMap,us=new WeakMap,zA),lT=A.createContext(void 0),uT=e=>{const t=A.useContext(lT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZD=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(lT.Provider,{value:e,children:t})),cT=A.createContext(!1),eR=()=>A.useContext(cT);cT.Provider;function tR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rR=A.createContext(tR()),nR=()=>A.useContext(rR),iR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},aR=e=>{A.useEffect(()=>{e.clearReset()},[e])},oR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||RD(r,[e.error,n])),sR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},lR=(e,t)=>e.isLoading&&e.isFetching&&!t,uR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,A1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function cR(e,t,r){var f,d,p,v,m;const n=eR(),i=nR(),a=uT(),o=a.defaultQueryOptions(e);(d=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",sR(o),iR(o,i),aR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=A.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(g=>{const y=c?l.subscribe(Et.batchCalls(g)):Qt;return l.updateResult(),y},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setOptions(o)},[o,l]),uR(o,u))throw A1(o,l,i);if(oR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,u),o.experimental_prefetchInRender&&!qa&&lR(u,n)){const g=s?A1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(Qt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function Fr(e,t){return cR(e,HD)}/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function fT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dR(){return Math.random().toString(36).substr(2,8)}function _1(e,t){return{usr:e.state,key:e.key,idx:t}}function Fy(e,t,r,n){return r===void 0&&(r=null),_u({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xs(t):t,{state:r,key:t&&t.key||n||dR()})}function Ad(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Xs(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function hR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ni.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(_u({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Ni.Pop;let g=c(),y=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:y})}function d(g,y){s=Ni.Push;let b=Fy(m.location,g,y);u=c()+1;let x=_1(b,u),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function p(g,y){s=Ni.Replace;let b=Fy(m.location,g,y);u=c();let x=_1(b,u),S=m.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof g=="string"?g:Ad(g);return b=b.replace(/ $/,"%20"),at(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(j1,f),l=g,()=>{i.removeEventListener(j1,f),l=null}},createHref(g){return t(i,g)},createURL:v,encodeLocation(g){let y=v(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:p,go(g){return o.go(g)}};return m}var T1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(T1||(T1={}));function pR(e,t,r){return r===void 0&&(r="/"),mR(e,t,r)}function mR(e,t,r,n){let i=typeof t=="string"?Xs(t):t,a=$b(i.pathname||"/",r);if(a==null)return null;let o=dT(e);vR(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(at(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wi([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),dT(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:OR(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of hT(a.path))i(a,o,l)}),t}function hT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=hT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function vR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:PR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yR=/^:[\w-]+$/,gR=3,bR=2,xR=1,wR=10,SR=-2,k1=e=>e==="*";function OR(e,t){let r=e.split("/"),n=r.length;return r.some(k1)&&(n+=SR),t&&(n+=bR),r.filter(i=>!k1(i)).reduce((i,a)=>i+(yR.test(a)?gR:a===""?xR:wR),n)}function PR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function ER(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:p}=c;if(d==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return p&&!v?u[d]=void 0:u[d]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function jR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),fT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function _R(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $b(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function TR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Xs(e):e;return{pathname:r?r.startsWith("/")?r:kR(r,t):t,search:$R(n),hash:MR(i)}}function kR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Im(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function NR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function pT(e,t){let r=NR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function mT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Xs(e):(i=_u({},e),at(!i.pathname||!i.pathname.includes("?"),Im("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),Im("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),Im("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=TR(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Wi=e=>e.join("/").replace(/\/\/+/g,"/"),CR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$R=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function IR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vT=["post","put","patch","delete"];new Set(vT);const DR=["get",...vT];new Set(DR);/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Tu(){return Tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),A.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=mT(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Wi([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}const BR=A.createContext(null);function zR(e){let t=A.useContext(ni).outlet;return t&&A.createElement(BR.Provider,{value:e},t)}function bT(){let{matches:e}=A.useContext(ni),t=e[e.length-1];return t?t.params:{}}function xT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=A.useContext(io),{matches:i}=A.useContext(ni),{pathname:a}=ao(),o=JSON.stringify(pT(i,n.v7_relativeSplatPath));return A.useMemo(()=>mT(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function UR(e,t){return WR(e,t)}function WR(e,t,r,n){_c()||at(!1);let{navigator:i}=A.useContext(io),{matches:a}=A.useContext(ni),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ao(),c;if(t){var f;let g=typeof t=="string"?Xs(t):t;l==="/"||(f=g.pathname)!=null&&f.startsWith(l)||at(!1),c=g}else c=u;let d=c.pathname||"/",p=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");p="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=pR(e,{pathname:p}),m=GR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Wi([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Wi([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&m?A.createElement(tp.Provider,{value:{location:Tu({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ni.Pop}},m):m}function HR(){let e=JR(),t=IR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:i},r):null,null)}const KR=A.createElement(HR,null);class qR extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?A.createElement(ni.Provider,{value:this.props.routeContext},A.createElement(yT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function VR(e){let{routeContext:t,match:r,children:n}=e,i=A.useContext(Mb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(ni.Provider,{value:t},n)}function GR(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||at(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let p,v=!1,m=null,g=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||KR,l&&(u<0&&d===0?(eL("route-fallback"),v=!0,g=null):u===d&&(v=!0,g=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),b=()=>{let x;return p?x=m:v?x=g:f.route.Component?x=A.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,A.createElement(VR,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?A.createElement(qR,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var wT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wT||{}),ST=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ST||{});function YR(e){let t=A.useContext(Mb);return t||at(!1),t}function XR(e){let t=A.useContext(RR);return t||at(!1),t}function QR(e){let t=A.useContext(ni);return t||at(!1),t}function OT(e){let t=QR(),r=t.matches[t.matches.length-1];return r.route.id||at(!1),r.route.id}function JR(){var e;let t=A.useContext(yT),r=XR(),n=OT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ZR(){let{router:e}=YR(wT.UseNavigateStable),t=OT(ST.UseNavigateStable),r=A.useRef(!1);return gT(()=>{r.current=!0}),A.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Tu({fromRouteId:t},a)))},[e,t])}const N1={};function eL(e,t,r){N1[e]||(N1[e]=!0)}function tL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function rL(e){return zR(e.context)}function Hr(e){at(!1)}function nL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Ni.Pop,navigator:a,static:o=!1,future:s}=e;_c()&&at(!1);let l=t.replace(/^\/*/,"/"),u=A.useMemo(()=>({basename:l,navigator:a,static:o,future:Tu({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=Xs(n));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:v="default"}=n,m=A.useMemo(()=>{let g=$b(c,l);return g==null?null:{location:{pathname:g,search:f,hash:d,state:p,key:v},navigationType:i}},[l,c,f,d,p,v,i]);return m==null?null:A.createElement(io.Provider,{value:u},A.createElement(tp.Provider,{children:r,value:m}))}function iL(e){let{children:t,location:r}=e;return UR(By(t),r)}new Promise(()=>{});function By(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,i)=>{if(!A.isValidElement(n))return;let a=[...t,i];if(n.type===A.Fragment){r.push.apply(r,By(n.props.children,a));return}n.type!==Hr&&at(!1),!n.props.index||!n.props.children||at(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=By(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function oL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sL(e,t){return e.button===0&&(!t||t==="_self")&&!oL(e)}function Uy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function lL(e,t){let r=Uy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const uL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],cL="6";try{window.__reactRouterVersion=cL}catch{}const fL="startTransition",C1=R0[fL];function dL(e){let{basename:t,children:r,future:n,window:i}=e,a=A.useRef();a.current==null&&(a.current=fR({window:i,v5Compat:!0}));let o=a.current,[s,l]=A.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=A.useCallback(f=>{u&&C1?C1(()=>l(f)):l(f)},[l,u]);return A.useLayoutEffect(()=>o.listen(c),[o,c]),A.useEffect(()=>tL(n),[n]),A.createElement(nL,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const hL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Va=A.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=aL(t,uL),{basename:p}=A.useContext(io),v,m=!1;if(typeof u=="string"&&pL.test(u)&&(v=u,hL))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=$b(S.pathname,p);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let g=LR(u,{relative:i}),y=mL(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function b(x){n&&n(x),x.defaultPrevented||y(x)}return A.createElement("a",zy({},d,{href:v||g,onClick:m||a?n:b,ref:r,target:l}))});var $1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($1||($1={}));var M1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(M1||(M1={}));function mL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ib(),u=ao(),c=xT(e,{relative:o});return A.useCallback(f=>{if(sL(f,r)){f.preventDefault();let d=n!==void 0?n:Ad(u)===Ad(c);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}function vL(e){let t=A.useRef(Uy(e)),r=A.useRef(!1),n=ao(),i=A.useMemo(()=>lL(n.search,r.current?null:t.current),[n.search]),a=Ib(),o=A.useCallback((s,l)=>{const u=Uy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const yL=new JD({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function Db(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function PT(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const ET=A.createContext(void 0);function gL({children:e}){const[t,r]=A.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return h.jsx(ET.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function Qs(){const e=A.useContext(ET);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function bL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function xL(){return(await bL()).userId}function AT(e,t){return function(){return e.apply(t,arguments)}}const{toString:wL}=Object.prototype,{getPrototypeOf:Rb}=Object,{iterator:rp,toStringTag:jT}=Symbol,np=(e=>t=>{const r=wL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),sn=e=>(e=e.toLowerCase(),t=>np(t)===e),ip=e=>t=>typeof t===e,{isArray:Js}=Array,ys=ip("undefined");function Tc(e){return e!==null&&!ys(e)&&e.constructor!==null&&!ys(e.constructor)&&ir(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _T=sn("ArrayBuffer");function SL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_T(e.buffer),t}const OL=ip("string"),ir=ip("function"),TT=ip("number"),kc=e=>e!==null&&typeof e=="object",PL=e=>e===!0||e===!1,Vf=e=>{if(np(e)!=="object")return!1;const t=Rb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(jT in e)&&!(rp in e)},EL=e=>{if(!kc(e)||Tc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},AL=sn("Date"),jL=sn("File"),_L=sn("Blob"),TL=sn("FileList"),kL=e=>kc(e)&&ir(e.pipe),NL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ir(e.append)&&((t=np(e))==="formdata"||t==="object"&&ir(e.toString)&&e.toString()==="[object FormData]"))},CL=sn("URLSearchParams"),[$L,ML,IL,DL]=["ReadableStream","Request","Response","Headers"].map(sn),RL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Js(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const wa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,NT=e=>!ys(e)&&e!==wa;function Wy(){const{caseless:e,skipUndefined:t}=NT(this)&&this||{},r={},n=(i,a)=>{const o=e&&kT(r,a)||a;Vf(r[o])&&Vf(i)?r[o]=Wy(r[o],i):Vf(i)?r[o]=Wy({},i):Js(i)?r[o]=i.slice():(!t||!ys(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Nc(t,(i,a)=>{r&&ir(i)?e[a]=AT(i,r):e[a]=i},{allOwnKeys:n}),e),FL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),BL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},zL=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Rb(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},UL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},WL=e=>{if(!e)return null;if(Js(e))return e;let t=e.length;if(!TT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},HL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Rb(Uint8Array)),KL=(e,t)=>{const n=(e&&e[rp]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},qL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},VL=sn("HTMLFormElement"),GL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),I1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),YL=sn("RegExp"),CT=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Nc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},XL=e=>{CT(e,(t,r)=>{if(ir(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ir(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},QL=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Js(e)?n(e):n(String(e).split(t)),r},JL=()=>{},ZL=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function e3(e){return!!(e&&ir(e.append)&&e[jT]==="FormData"&&e[rp])}const t3=e=>{const t=new Array(10),r=(n,i)=>{if(kc(n)){if(t.indexOf(n)>=0)return;if(Tc(n))return n;if(!("toJSON"in n)){t[i]=n;const a=Js(n)?[]:{};return Nc(n,(o,s)=>{const l=r(o,i+1);!ys(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},r3=sn("AsyncFunction"),n3=e=>e&&(kc(e)||ir(e))&&ir(e.then)&&ir(e.catch),$T=((e,t)=>e?setImmediate:t?((r,n)=>(wa.addEventListener("message",({source:i,data:a})=>{i===wa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),wa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ir(wa.postMessage)),i3=typeof queueMicrotask<"u"?queueMicrotask.bind(wa):typeof process<"u"&&process.nextTick||$T,a3=e=>e!=null&&ir(e[rp]),D={isArray:Js,isArrayBuffer:_T,isBuffer:Tc,isFormData:NL,isArrayBufferView:SL,isString:OL,isNumber:TT,isBoolean:PL,isObject:kc,isPlainObject:Vf,isEmptyObject:EL,isReadableStream:$L,isRequest:ML,isResponse:IL,isHeaders:DL,isUndefined:ys,isDate:AL,isFile:jL,isBlob:_L,isRegExp:YL,isFunction:ir,isStream:kL,isURLSearchParams:CL,isTypedArray:HL,isFileList:TL,forEach:Nc,merge:Wy,extend:LL,trim:RL,stripBOM:FL,inherits:BL,toFlatObject:zL,kindOf:np,kindOfTest:sn,endsWith:UL,toArray:WL,forEachEntry:KL,matchAll:qL,isHTMLForm:VL,hasOwnProperty:I1,hasOwnProp:I1,reduceDescriptors:CT,freezeMethods:XL,toObjectSet:QL,toCamelCase:GL,noop:JL,toFiniteNumber:ZL,findKey:kT,global:wa,isContextDefined:NT,isSpecCompliantForm:e3,toJSONObject:t3,isAsyncFn:r3,isThenable:n3,setImmediate:$T,asap:i3,isIterable:a3};function ce(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}D.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const MT=ce.prototype,IT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{IT[e]={value:e}});Object.defineProperties(ce,IT);Object.defineProperty(MT,"isAxiosError",{value:!0});ce.from=(e,t,r,n,i,a)=>{const o=Object.create(MT);D.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const o3=null;function Hy(e){return D.isPlainObject(e)||D.isArray(e)}function DT(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function D1(e,t,r){return e?e.concat(t).map(function(i,a){return i=DT(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function s3(e){return D.isArray(e)&&!e.some(Hy)}const l3=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function ap(e,t,r){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=D.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!D.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(D.isDate(v))return v.toISOString();if(D.isBoolean(v))return v.toString();if(!l&&D.isBlob(v))throw new ce("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(v)||D.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,g){let y=v;if(v&&!g&&typeof v=="object"){if(D.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(D.isArray(v)&&s3(v)||(D.isFileList(v)||D.endsWith(m,"[]"))&&(y=D.toArray(v)))return m=DT(m),y.forEach(function(x,S){!(D.isUndefined(x)||x===null)&&t.append(o===!0?D1([m],S,a):o===null?m:m+"[]",u(x))}),!1}return Hy(v)?!0:(t.append(D1(g,m,a),u(v)),!1)}const f=[],d=Object.assign(l3,{defaultVisitor:c,convertValue:u,isVisitable:Hy});function p(v,m){if(!D.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),D.forEach(v,function(y,b){(!(D.isUndefined(y)||y===null)&&i.call(t,y,D.isString(b)?b.trim():b,m,d))===!0&&p(y,m?m.concat(b):[b])}),f.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return p(e),t}function R1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Lb(e,t){this._pairs=[],e&&ap(e,this,t)}const RT=Lb.prototype;RT.append=function(t,r){this._pairs.push([t,r])};RT.toString=function(t){const r=t?function(n){return t.call(this,n,R1)}:R1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function u3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function LT(e,t,r){if(!t)return e;const n=r&&r.encode||u3;D.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=D.isURLSearchParams(t)?t.toString():new Lb(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class L1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(n){n!==null&&t(n)})}}const FT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},c3=typeof URLSearchParams<"u"?URLSearchParams:Lb,f3=typeof FormData<"u"?FormData:null,d3=typeof Blob<"u"?Blob:null,h3={isBrowser:!0,classes:{URLSearchParams:c3,FormData:f3,Blob:d3},protocols:["http","https","file","blob","url","data"]},Fb=typeof window<"u"&&typeof document<"u",Ky=typeof navigator=="object"&&navigator||void 0,p3=Fb&&(!Ky||["ReactNative","NativeScript","NS"].indexOf(Ky.product)<0),m3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v3=Fb&&window.location.href||"http://localhost",y3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fb,hasStandardBrowserEnv:p3,hasStandardBrowserWebWorkerEnv:m3,navigator:Ky,origin:v3},Symbol.toStringTag,{value:"Module"})),Rt={...y3,...h3};function g3(e,t){return ap(e,new Rt.classes.URLSearchParams,{visitor:function(r,n,i,a){return Rt.isNode&&D.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function b3(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function x3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&D.isArray(i)?i.length:o,l?(D.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!D.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&D.isArray(i[o])&&(i[o]=x3(i[o])),!s)}if(D.isFormData(e)&&D.isFunction(e.entries)){const r={};return D.forEachEntry(e,(n,i)=>{t(b3(n),i,r,0)}),r}return null}function w3(e,t,r){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Cc={transitional:FT,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return i?JSON.stringify(BT(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return g3(t,this.formSerializer).toString();if((s=D.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ap(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),w3(t)):t}],transformResponse:[function(t){const r=this.transitional||Cc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ce.from(s,ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rt.classes.FormData,Blob:Rt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{Cc.headers[e]={}});const S3=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),O3=e=>{const t={};let r,n,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&S3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},F1=Symbol("internals");function El(e){return e&&String(e).trim().toLowerCase()}function Gf(e){return e===!1||e==null?e:D.isArray(e)?e.map(Gf):String(e)}function P3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const E3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Dm(e,t,r,n,i){if(D.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!D.isString(t)){if(D.isString(n))return t.indexOf(n)!==-1;if(D.isRegExp(n))return n.test(t)}}function A3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function j3(e,t){const r=D.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let ar=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=El(l);if(!c)throw new Error("header name must be a non-empty string");const f=D.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Gf(s))}const o=(s,l)=>D.forEach(s,(u,c)=>a(u,c,l));if(D.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(D.isString(t)&&(t=t.trim())&&!E3(t))o(O3(t),r);else if(D.isObject(t)&&D.isIterable(t)){let s={},l,u;for(const c of t){if(!D.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?D.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=El(t),t){const n=D.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return P3(i);if(D.isFunction(r))return r.call(this,i,n);if(D.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=El(t),t){const n=D.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Dm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=El(o),o){const s=D.findKey(n,o);s&&(!r||Dm(n,n[s],s,r))&&(delete n[s],i=!0)}}return D.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Dm(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return D.forEach(this,(i,a)=>{const o=D.findKey(n,a);if(o){r[o]=Gf(i),delete r[a];return}const s=t?A3(a):String(a).trim();s!==a&&delete r[a],r[s]=Gf(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return D.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&D.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[F1]=this[F1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=El(o);n[s]||(j3(i,o),n[s]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}};ar.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(ar.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});D.freezeMethods(ar);function Rm(e,t){const r=this||Cc,n=t||r,i=ar.from(n.headers);let a=n.data;return D.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function zT(e){return!!(e&&e.__CANCEL__)}function Zs(e,t,r){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,r),this.name="CanceledError"}D.inherits(Zs,ce,{__CANCEL__:!0});function UT(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function _3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function T3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=c,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const jd=(e,t,r=3)=>{let n=0;const i=T3(50,250);return k3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},B1=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},z1=e=>(...t)=>D.asap(()=>e(...t)),N3=Rt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Rt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Rt.origin),Rt.navigator&&/(msie|trident)/i.test(Rt.navigator.userAgent)):()=>!0,C3=Rt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];D.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),D.isString(n)&&o.push("path="+n),D.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function M3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function WT(e,t,r){let n=!$3(t);return e&&(n||r==!1)?M3(e,t):t}const U1=e=>e instanceof ar?{...e}:e;function Ga(e,t){t=t||{};const r={};function n(u,c,f,d){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:d},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function i(u,c,f,d){if(D.isUndefined(c)){if(!D.isUndefined(u))return n(void 0,u,f,d)}else return n(u,c,f,d)}function a(u,c){if(!D.isUndefined(c))return n(void 0,c)}function o(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,f)=>i(U1(u),U1(c),f,!0)};return D.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);D.isUndefined(d)&&f!==s||(r[c]=d)}),r}const HT=e=>{const t=Ga({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ar.from(o),t.url=LT(WT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),D.isFormData(r)){if(Rt.hasStandardBrowserEnv||Rt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(D.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(Rt.hasStandardBrowserEnv&&(n&&D.isFunction(n)&&(n=n(t)),n||n!==!1&&N3(t.url))){const l=i&&a&&C3.read(a);l&&o.set(i,l)}return t},I3=typeof XMLHttpRequest<"u",D3=I3&&function(e){return new Promise(function(r,n){const i=HT(e);let a=i.data;const o=ar.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function y(){if(!g)return;const x=ar.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};UT(function(P){r(P),m()},function(P){n(P),m()},w),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new ce(w,ce.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||FT;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new ce(S,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&D.forEach(o.toJSON(),function(S,w){g.setRequestHeader(w,S)}),D.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([d,v]=jd(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([f,p]=jd(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=x=>{g&&(n(!x||x.type?new Zs(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=_3(i.url);if(b&&Rt.protocols.indexOf(b)===-1){n(new ce("Unsupported protocol "+b+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})},R3=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ce?c:new Zs(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>D.asap(s),l}},L3=function*(e,t){let r=e.byteLength;if(r{const i=F3(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let f=c.byteLength;if(r){let d=a+=f;r(d)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},H1=64*1024,{isFunction:hf}=D,z3=(({Request:e,Response:t})=>({Request:e,Response:t}))(D.global),{ReadableStream:K1,TextEncoder:q1}=D.global,V1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},U3=e=>{e=D.merge.call({skipUndefined:!0},z3,e);const{fetch:t,Request:r,Response:n}=e,i=t?hf(t):typeof fetch=="function",a=hf(r),o=hf(n);if(!i)return!1;const s=i&&hf(K1),l=i&&(typeof q1=="function"?(v=>m=>v.encode(m))(new q1):async v=>new Uint8Array(await new r(v).arrayBuffer())),u=a&&s&&V1(()=>{let v=!1;const m=new r(Rt.origin,{body:new K1,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),c=o&&s&&V1(()=>D.isReadableStream(new n("").body)),f={stream:c&&(v=>v.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!f[v]&&(f[v]=(m,g)=>{let y=m&&m[v];if(y)return y.call(m);throw new ce(`Response type '${v}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});const d=async v=>{if(v==null)return 0;if(D.isBlob(v))return v.size;if(D.isSpecCompliantForm(v))return(await new r(Rt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(D.isArrayBufferView(v)||D.isArrayBuffer(v))return v.byteLength;if(D.isURLSearchParams(v)&&(v=v+""),D.isString(v))return(await l(v)).byteLength},p=async(v,m)=>{const g=D.toFiniteNumber(v.getContentLength());return g??d(m)};return async v=>{let{url:m,method:g,data:y,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:P,headers:E,withCredentials:j="same-origin",fetchOptions:_}=HT(v),T=t||fetch;P=P?(P+"").toLowerCase():"text";let k=R3([b,x&&x.toAbortSignal()],S),M=null;const R=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I;try{if(O&&u&&g!=="get"&&g!=="head"&&(I=await p(E,y))!==0){let V=new r(m,{method:"POST",body:y,duplex:"half"}),H;if(D.isFormData(y)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,re]=B1(I,jd(z1(O)));y=W1(V.body,H1,Y,re)}}D.isString(j)||(j=j?"include":"omit");const L=a&&"credentials"in r.prototype,z={..._,signal:k,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:y,duplex:"half",credentials:L?j:void 0};M=a&&new r(m,z);let C=await(a?T(M,_):T(m,z));const F=c&&(P==="stream"||P==="response");if(c&&(w||F&&R)){const V={};["status","statusText","headers"].forEach(be=>{V[be]=C[be]});const H=D.toFiniteNumber(C.headers.get("content-length")),[Y,re]=w&&B1(H,jd(z1(w),!0))||[];C=new n(W1(C.body,H1,Y,()=>{re&&re(),R&&R()}),V)}P=P||"text";let W=await f[D.findKey(f,P)||"text"](C,v);return!F&&R&&R(),await new Promise((V,H)=>{UT(V,H,{data:W,headers:ar.from(C.headers),status:C.status,statusText:C.statusText,config:v,request:M})})}catch(L){throw R&&R(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,v,M),{cause:L.cause||L}):ce.from(L,L&&L.code,v,M)}}},W3=new Map,KT=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,c=W3;for(;s--;)l=a[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:U3(t)),c=u;return u};KT();const qy={http:o3,xhr:D3,fetch:{get:KT}};D.forEach(qy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G1=e=>`- ${e}`,H3=e=>D.isFunction(e)||e===null||e===!1,qT={getAdapter:(e,t)=>{e=D.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : -`+o.map(G1).join(` -`):" "+G1(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:qy};function Lm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zs(null,e)}function Y1(e){return Lm(e),e.headers=ar.from(e.headers),e.data=Rm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qT.getAdapter(e.adapter||Cc.adapter,e)(e).then(function(n){return Lm(e),n.data=Rm.call(e,e.transformResponse,n),n.headers=ar.from(n.headers),n},function(n){return zT(n)||(Lm(e),n&&n.response&&(n.response.data=Rm.call(e,e.transformResponse,n.response),n.response.headers=ar.from(n.response.headers))),Promise.reject(n)})}const VT="1.12.2",op={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{op[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const X1={};op.transitional=function(t,r,n){function i(a,o){return"[Axios v"+VT+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ce(i(o," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!X1[o]&&(X1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};op.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function K3(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ce("option "+a+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const Yf={assertOptions:K3,validators:op},fn=Yf.validators;let Ra=class{constructor(t){this.defaults=t||{},this.interceptors={request:new L1,response:new L1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ga(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Yf.assertOptions(n,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),i!=null&&(D.isFunction(i)?r.paramsSerializer={serialize:i}:Yf.assertOptions(i,{encode:fn.function,serialize:fn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yf.assertOptions(r,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&D.merge(a.common,a[r.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),r.headers=ar.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){const v=[Y1.bind(this),void 0];for(v.unshift(...s),v.push(...u),d=v.length,c=Promise.resolve(r);f{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new Zs(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new GT(function(i){t=i}),cancel:t}}};function V3(e){return function(r){return e.apply(null,r)}}function G3(e){return D.isObject(e)&&e.isAxiosError===!0}const Vy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vy).forEach(([e,t])=>{Vy[t]=e});function YT(e){const t=new Ra(e),r=AT(Ra.prototype.request,t);return D.extend(r,Ra.prototype,t,{allOwnKeys:!0}),D.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return YT(Ga(e,i))},r}const tt=YT(Cc);tt.Axios=Ra;tt.CanceledError=Zs;tt.CancelToken=q3;tt.isCancel=zT;tt.VERSION=VT;tt.toFormData=ap;tt.AxiosError=ce;tt.Cancel=tt.CanceledError;tt.all=function(t){return Promise.all(t)};tt.spread=V3;tt.isAxiosError=G3;tt.mergeConfig=Ga;tt.AxiosHeaders=ar;tt.formToJSON=e=>BT(D.isHTMLForm(e)?new FormData(e):e);tt.getAdapter=qT.getAdapter;tt.HttpStatusCode=Vy;tt.default=tt;const{Axios:jhe,AxiosError:_he,CanceledError:The,isCancel:khe,CancelToken:Nhe,VERSION:Che,all:$he,Cancel:Mhe,isAxiosError:Ihe,spread:Dhe,toFormData:Rhe,AxiosHeaders:Lhe,HttpStatusCode:Fhe,formToJSON:Bhe,getAdapter:zhe,mergeConfig:Uhe}=tt,Y3="/graphql";async function lr(e,t){try{const r=await tt.post(Y3,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw tt.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}const ur={listTeams:` - query ListTeams($userId: ID!) { - teams(userId: $userId) { - id - name - description - meta - createdAt - updatedAt - } - } - `,getUser:` - query GetUser($id: ID!) { - user(id: $id) { - id - username - email - avatarUrl - meta - createdAt - updatedAt - } - } - `,getTeam:` - query GetTeam($id: ID!) { - team(id: $id) { - id - name - description - meta - createdAt - updatedAt - totalExperiments - totalRuns - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - } - } - `,getTeamWithExperiments:` - query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { - team(id: $id) { - id - name - expsByTimeframe(startTime: $startTime, endTime: $endTime) { - id - teamId - userId - name - status - createdAt - } - } - } - `,getTeamWithLabelKeys:` - query GetTeamWithLabelKeys($id: ID!) { - team(id: $id) { - id - labelKeys - } - } - `,listExperiments:` - query ListExperiments($teamId: ID!, $labelName: String, $labelValue: String, $page: Int, $pageSize: Int) { - experiments(teamId: $teamId, labelName: $labelName, labelValue: $labelValue, page: $page, pageSize: $pageSize) { - id - teamId - userId - name - description - kind - meta - params - labels { - name - value - } - duration - status - createdAt - updatedAt - } - } - `,getExperiment:` - query GetExperiment($id: ID!) { - experiment(id: $id) { - id - teamId - userId - name - description - kind - meta - params - labels { - name - value - } - duration - status - createdAt - updatedAt - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - metrics { - id - key - value - teamId - experimentId - runId - createdAt - } - } - } - `,listRuns:` - query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { - runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { - id - teamId - userId - experimentId - meta - status - createdAt - } - } - `,getRun:` - query GetRun($id: ID!) { - run(id: $id) { - id - teamId - userId - experimentId - meta - status - createdAt - aggregatedTokens { - totalTokens - inputTokens - outputTokens - } - metrics { - id - key - value - teamId - experimentId - runId - createdAt - } - spans { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - semanticKind - serviceName - duration - statusCode - statusMessage - teamId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - } - `,listArtifactRepositories:` - query ListArtifactRepositories { - artifactRepos { - name - } - } - `,listArtifactTags:` - query ListArtifactTags($team_id: ID!, $repo_name: String!) { - artifactTags(teamId: $team_id, repoName: $repo_name) { - name - } - } - `,getArtifactContent:` - query GetArtifactContent($team_id: ID!, $tag: String!, $repo_name: String!) { - artifactContent(teamId: $team_id, tag: $tag, repoName: $repo_name) { - filename - content - contentType - } - } - `,listTraces:` - query ListTraces($runId: ID!) { - traces(runId: $runId) { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - semanticKind - serviceName - duration - statusCode - statusMessage - teamId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - `,getDailyTokenUsage:` - query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { - dailyTokenUsage(teamId: $teamId, days: $days) { - date - totalTokens - inputTokens - outputTokens - } - } - `},XT=A.createContext(null);function X3({user:e,children:t}){const[r,n]=A.useState(e),i=a=>{n(o=>({...o,...a}))};return h.jsx(XT.Provider,{value:{user:r,updateUser:i},children:t})}function Bb(){const e=A.useContext(XT);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Q1=e=>{const t=J3(e);return t.charAt(0).toUpperCase()+t.slice(1)},QT=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Z3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var eF={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.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tF=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>A.createElement("svg",{ref:l,...eF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:QT("lucide",i),...!a&&!Z3(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>A.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xe=(e,t)=>{const r=A.forwardRef(({className:n,...i},a)=>A.createElement(tF,{ref:a,iconNode:t,className:QT(`lucide-${Q3(Q1(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Q1(e),r};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rF=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],nF=Xe("bot",rF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],J1=Xe("building-2",iF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],JT=Xe("check",aF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sp=Xe("chevron-down",oF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zb=Xe("chevron-right",sF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uF=Xe("chevron-left",lF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gy=Xe("clock",cF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fF=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],dF=Xe("coins",fF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ZT=Xe("copy",hF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pF=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],mF=Xe("database",pF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yF=Xe("eye",vF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Fm=Xe("file-text",gF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],ek=Xe("flask-conical",bF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],wF=Xe("git-branch",xF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],OF=Xe("github",SF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],EF=Xe("globe",PF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AF=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],jF=Xe("layout-dashboard",AF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _F=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Xf=Xe("package",_F);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TF=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],kF=Xe("play",TF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ku=Xe("search",NF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CF=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Z1=Xe("user",CF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $F=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_d=Xe("x",$F);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MF=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],IF=Xe("zap",MF);function tk(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),rk=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",eS=[],LF="arbitrary..",FF=e=>{const t=zF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return BF(o);const s=o.split(Td),l=s[0]===""&&s.length>1?1:0;return nk(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?DF(u,l):l:u||eS}return r[o]||eS}}},nk=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=nk(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Td):e.slice(t).join(Td),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?LF+n:void 0})(),zF=e=>{const{theme:t,classGroups:r}=e;return UF(r,t)},UF=(e,t)=>{const r=rk();for(const n in e){const i=e[n];Ub(i,r,n,t)}return r},Ub=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){HF(e,t,r);return}if(typeof e=="function"){KF(e,t,r,n);return}qF(e,t,r,n)},HF=(e,t,r)=>{const n=e===""?t:ik(t,e);n.classGroupId=r},KF=(e,t,r,n)=>{if(VF(e)){Ub(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(RF(r,e))},qF=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,GF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Yy="!",tS=":",YF=[],rS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),XF=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const c=i.length;for(let m=0;ml?u-l:void 0;return rS(a,p,d,v)};if(t){const i=t+tS,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):rS(YF,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},QF=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},JF=e=>({cache:GF(e.cacheSize),parseClassName:XF(e),sortModifiers:QF(e),...FF(e)}),ZF=/\s+/,e5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(ZF);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=r(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const b=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=p?b+Yy:b,S=x+y;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(y,g);for(let O=0;O0?" "+l:l)}return l},t5=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((c,f)=>f(c),e());return r=JF(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const c=e5(l,r);return i(l,c),c};return a=o,(...l)=>a(t5(...l))},n5=[],ut=e=>{const t=r=>r[e]||n5;return t.isThemeGetter=!0,t},ok=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i5=/^\d+\/\d+$/,a5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,s5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mo=e=>i5.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),ci=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&de(e.slice(0,-1)),Tn=e=>a5.test(e),c5=()=>!0,f5=e=>o5.test(e)&&!s5.test(e),lk=()=>!1,d5=e=>l5.test(e),h5=e=>u5.test(e),p5=e=>!Z(e)&&!ee(e),m5=e=>el(e,fk,lk),Z=e=>ok.test(e),oa=e=>el(e,dk,f5),zm=e=>el(e,x5,de),nS=e=>el(e,uk,lk),v5=e=>el(e,ck,h5),pf=e=>el(e,hk,d5),ee=e=>sk.test(e),Al=e=>tl(e,dk),y5=e=>tl(e,w5),iS=e=>tl(e,uk),g5=e=>tl(e,fk),b5=e=>tl(e,ck),mf=e=>tl(e,hk,!0),el=(e,t,r)=>{const n=ok.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},tl=(e,t,r=!1)=>{const n=sk.exec(e);return n?n[1]?t(n[1]):r:!1},uk=e=>e==="position"||e==="percentage",ck=e=>e==="image"||e==="url",fk=e=>e==="length"||e==="size"||e==="bg-size",dk=e=>e==="length",x5=e=>e==="number",w5=e=>e==="family-name",hk=e=>e==="shadow",S5=()=>{const e=ut("color"),t=ut("font"),r=ut("text"),n=ut("font-weight"),i=ut("tracking"),a=ut("leading"),o=ut("breakpoint"),s=ut("container"),l=ut("spacing"),u=ut("radius"),c=ut("shadow"),f=ut("inset-shadow"),d=ut("text-shadow"),p=ut("drop-shadow"),v=ut("blur"),m=ut("perspective"),g=ut("aspect"),y=ut("ease"),b=ut("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],E=()=>[ee,Z,l],j=()=>[mo,"full","auto",...E()],_=()=>[ci,"none","subgrid",ee,Z],T=()=>["auto",{span:["full",ci,ee,Z]},ci,ee,Z],k=()=>[ci,"auto",ee,Z],M=()=>["auto","min","max","fr",ee,Z],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...E()],z=()=>[mo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],C=()=>[e,ee,Z],F=()=>[...S(),iS,nS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",g5,m5,{size:[ee,Z]}],H=()=>[Bm,Al,oa],Y=()=>["","none","full",u,ee,Z],re=()=>["",de,Al,oa],be=()=>["solid","dashed","dotted","double"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Oe=()=>[de,Bm,iS,nS],St=()=>["","none",v,ee,Z],G=()=>["none",de,ee,Z],se=()=>["none",de,ee,Z],le=()=>[de,ee,Z],U=()=>[mo,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tn],breakpoint:[Tn],color:[c5],container:[Tn],"drop-shadow":[Tn],ease:["in","out","in-out"],font:[p5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tn],shadow:[Tn],spacing:["px",de],text:[Tn],"text-shadow":[Tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mo,Z,ee,g]}],container:["container"],columns:[{columns:[de,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ci,"auto",ee,Z]}],basis:[{basis:[mo,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,mo,"auto","initial","none",Z]}],grow:[{grow:["",de,ee,Z]}],shrink:[{shrink:["",de,ee,Z]}],order:[{order:[ci,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Al,oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,zm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,Z]}],"font-family":[{font:[y5,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,Z]}],"line-clamp":[{"line-clamp":[de,"none",ee,zm]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",ee,oa]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[de,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ci,ee,Z],radial:["",ee,Z],conic:[ci,ee,Z]},b5,v5]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,ee,Z]}],"outline-w":[{outline:["",de,Al,oa]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,mf,pf]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,mf,pf]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[de,oa]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",d,mf,pf]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[de,ee,Z]}],"mix-blend":[{"mix-blend":[...We(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":We()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":Oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Oe()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Oe()}],"mask-image-t-to-pos":[{"mask-t-to":Oe()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Oe()}],"mask-image-r-to-pos":[{"mask-r-to":Oe()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Oe()}],"mask-image-b-to-pos":[{"mask-b-to":Oe()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Oe()}],"mask-image-l-to-pos":[{"mask-l-to":Oe()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Oe()}],"mask-image-x-to-pos":[{"mask-x-to":Oe()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Oe()}],"mask-image-y-to-pos":[{"mask-y-to":Oe()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Oe()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":Oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Oe()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:St()}],brightness:[{brightness:[de,ee,Z]}],contrast:[{contrast:[de,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",p,mf,pf]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",de,ee,Z]}],"hue-rotate":[{"hue-rotate":[de,ee,Z]}],invert:[{invert:["",de,ee,Z]}],saturate:[{saturate:[de,ee,Z]}],sepia:[{sepia:["",de,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[de,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[de,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",de,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[de,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[de,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",de,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",ee,Z]}],ease:[{ease:["linear","initial",y,ee,Z]}],delay:[{delay:[de,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Z]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[de,Al,oa,zm]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},O5=r5(S5);function fe(...e){return O5(ue(e))}const P5="/static/assets/logo-D6hHn9pX.png",E5=[{title:"Dashboard",href:"/",icon:jF},{title:"Experiments",href:"/experiments",icon:ek},{title:"Artifacts",href:"/artifacts",icon:Xf}];function A5(){const e=ao(),t=Bb(),[r,n]=A.useState(!1);return h.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[h.jsxs(Va,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[h.jsx("img",{src:P5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),h.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),h.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:E5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/experiments"&&(o=o||e.pathname.startsWith("/runs")),h.jsxs(Va,{to:i.href,className:fe("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),h.jsx(a,{className:fe("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),h.jsxs("div",{className:"relative p-3 mt-auto",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[h.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):h.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:h.jsx(Z1,{className:"h-3.5 w-3.5"})})}),h.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[h.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:h.jsx(OF,{className:"h-3.5 w-3.5"})}),h.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),h.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?h.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):h.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:h.jsx(Z1,{className:"h-6 w-6"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),h.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function j5(e=0,t=100){const r=Bb();return Fr({queryKey:["teams",r.id,e,t],queryFn:async()=>(await lr(ur.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function Wb(e){return Fr({queryKey:["team",e],queryFn:async()=>(await lr(ur.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const Yn=A.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return h.jsx("button",{className:fe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});Yn.displayName="Button";function De({className:e,...t}){return h.jsx("div",{className:fe("animate-pulse rounded-md bg-muted",e),...t})}function _5(){const e=Ib(),{data:t,isLoading:r}=j5(),{selectedTeamId:n,setSelectedTeamId:i}=Qs(),a=Bb(),[o,s]=A.useState(!1),[l,u]=A.useState(null),c=(d,p)=>{p.stopPropagation(),navigator.clipboard.writeText(d),u(d),setTimeout(()=>u(null),2e3)};if(r)return h.jsx(De,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return h.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[h.jsx(J1,{className:"h-4 w-4"}),"No teams available"]});const f=t.find(d=>d.id===n);return h.jsxs("div",{className:"relative",children:[h.jsxs(Yn,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[h.jsx(J1,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{className:"text-xs font-medium",children:(f==null?void 0:f.name)||"Select team"}),h.jsx(sp,{className:fe("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),h.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-64 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:h.jsx("div",{className:"p-1.5",children:t.map((d,p)=>{const v=d.id===n,m=l===d.id;return h.jsxs("button",{onClick:()=>{i(d.id,a.id),s(!1),e("/")},className:fe("flex w-full items-start justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",v?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[h.jsxs("div",{className:"flex-1 text-left min-w-0",children:[h.jsx("div",{className:"text-xs font-medium break-words",children:d.name||"Unnamed Team"}),h.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[h.jsx("span",{className:"text-[10px] font-mono text-muted-foreground truncate",children:d.id}),h.jsx("button",{onClick:g=>c(d.id,g),className:"flex-shrink-0 p-0.5 hover:bg-accent rounded transition-colors",title:m?"Copied!":"Copy Team ID",children:h.jsx(ZT,{className:fe("h-3 w-3",m?"text-green-600":"text-muted-foreground")})})]})]}),v&&h.jsx(JT,{className:"h-3 w-3 flex-shrink-0 text-primary mt-0.5"})]},d.id)})})})]})]})}function pk(e,t){const{page:r=0,pageSize:n=100,labelName:i,labelValue:a,enabled:o=!0}=t||{};return Fr({queryKey:["experiments",e,i,a,r,n],queryFn:async()=>(await lr(ur.listExperiments,{teamId:e,labelName:i,labelValue:a,page:r,pageSize:n})).experiments,enabled:o&&!!e,refetchInterval:s=>{const l=s.state.data;if(!l)return!1;const u=l.map(c=>c.status);return Db(u)}})}function lp(e,t){const{enabled:r=!0}=t||{};return Fr({queryKey:["experiment",e],queryFn:async()=>(await lr(ur.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?Db([i.status]):!1}})}function T5(e){return Fr({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await lr(ur.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return Db(n)}})}function Xy(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Fr({queryKey:["runs",e,r,n],queryFn:async()=>(await lr(ur.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return PT(s)}})}function mk(e,t){const{enabled:r=!0}=t||{};return Fr({queryKey:["run",e],queryFn:async()=>(await lr(ur.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?PT([i.status]):!1}})}function Um(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function k5(){const e=ao(),t=e.pathname.split("/").filter(Boolean),r=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,n=t[0]==="runs"&&t[1]?t[1]:void 0,{data:i}=lp(r||"",{enabled:!!r}),{data:a}=mk(n||"",{enabled:!!n}),s=(()=>{const l=e.pathname.split("/").filter(Boolean);if(l.length===0)return[{label:"Home"}];const u=[{label:"Home",href:"/"}];return l[0]==="experiments"?r&&i?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Um(i.id),href:l.length===2?void 0:`/experiments/${i.id}`})):u.push({label:"Experiments",href:void 0}):l[0]==="runs"?n&&a?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Um(a.experimentId),href:`/experiments/${a.experimentId}`}),u.push({label:"Runs",href:`/experiments/${a.experimentId}`}),u.push({label:Um(a.id),href:void 0})):u.push({label:"Runs",href:void 0}):l.forEach((c,f)=>{const d="/"+l.slice(0,f+1).join("/"),p=f===l.length-1,v=c.charAt(0).toUpperCase()+c.slice(1);u.push({label:v,href:p?void 0:d})}),u})();return h.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[h.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:s.map((l,u)=>{const c=u===s.length-1;return h.jsxs("div",{className:"flex items-center",children:[u>0&&h.jsx(zb,{className:"mx-2 h-4 w-4 text-muted-foreground"}),l.href&&!c?h.jsx(Va,{to:l.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.label}):h.jsx("span",{className:"text-foreground font-medium",children:l.label})]},u)})}),h.jsx(_5,{})]})}function N5(){return h.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(A5,{})}),h.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[h.jsx("div",{className:"shadow-sm",children:h.jsx(k5,{})}),h.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:h.jsx(rL,{})})]})]})}function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function an(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function je(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Te(e){je(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||kd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function C5(e,t){je(2,arguments);var r=Te(e),n=an(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function $5(e,t){je(2,arguments);var r=Te(e),n=an(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function M5(e,t){je(2,arguments);var r=Te(e).getTime(),n=an(t);return new Date(r+n)}var I5={};function $c(){return I5}function Qy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Jy(e){je(1,arguments);var t=Te(e);return t.setHours(0,0,0,0),t}function Qf(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function D5(e){return je(1,arguments),e instanceof Date||kd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function R5(e){if(je(1,arguments),!D5(e)&&typeof e!="number")return!1;var t=Te(e);return!isNaN(Number(t))}function L5(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function F5(e,t){return je(2,arguments),Te(e).getTime()-Te(t).getTime()}var B5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},z5="trunc";function U5(e){return B5[z5]}function W5(e){je(1,arguments);var t=Te(e);return t.setHours(23,59,59,999),t}function H5(e){je(1,arguments);var t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function K5(e){je(1,arguments);var t=Te(e);return W5(t).getTime()===H5(t).getTime()}function q5(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=Qf(r,n),a=Math.abs(L5(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=Qf(r,n)===-i;K5(Te(e))&&a===1&&Qf(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function V5(e,t,r){je(2,arguments);var n=F5(e,t)/1e3;return U5()(n)}function G5(e,t){je(2,arguments);var r=an(t);return M5(e,-r)}var Y5=864e5;function X5(e){je(1,arguments);var t=Te(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/Y5)+1}function Nd(e){je(1,arguments);var t=1,r=Te(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function Q5(e){je(1,arguments);var t=vk(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Nd(r);return n}var J5=6048e5;function Z5(e){je(1,arguments);var t=Te(e),r=Nd(t).getTime()-Q5(t).getTime();return Math.round(r/J5)+1}function Cd(e,t){var r,n,i,a,o,s,l,u;je(1,arguments);var c=$c(),f=an((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Te(e),p=d.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var m=Cd(v,t),g=new Date(0);g.setUTCFullYear(f,0,p),g.setUTCHours(0,0,0,0);var y=Cd(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=y.getTime()?f:f-1}function eB(e,t){var r,n,i,a,o,s,l,u;je(1,arguments);var c=$c(),f=an((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=yk(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var v=Cd(p,t);return v}var tB=6048e5;function rB(e,t){je(1,arguments);var r=Te(e),n=Cd(r,t).getTime()-eB(r,t).getTime();return Math.round(n/tB)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},vo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},nB={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return fi.y(t,r)},Y:function(t,r,n,i){var a=yk(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=vk(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return fi.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=rB(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=Z5(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):fi.d(t,r)},D:function(t,r,n){var i=X5(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=vo.noon:i===0?a=vo.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=vo.evening:i>=12?a=vo.afternoon:i>=4?a=vo.morning:a=vo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return fi.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):fi.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):fi.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):fi.s(t,r)},S:function(t,r){return fi.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return oS(o);case"XXXX":case"XX":return da(o);case"XXXXX":case"XXX":default:return da(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return oS(o);case"xxxx":case"xx":return da(o);case"xxxxx":case"xxx":default:return da(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+aS(o,":");case"OOOO":default:return"GMT"+da(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+aS(o,":");case"zzzz":default:return"GMT"+da(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function aS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function oS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return da(e,t)}function da(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var sS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},gk=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},iB=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return sS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",sS(i,r)).replace("{{time}}",gk(a,r))},aB={p:gk,P:iB},oB=["D","DD"],sB=["YY","YYYY"];function lB(e){return oB.indexOf(e)!==-1}function uB(e){return sB.indexOf(e)!==-1}function lS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var cB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},fB=function(t,r,n){var i,a=cB[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Wm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var dB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mB={date:Wm({formats:dB,defaultWidth:"full"}),time:Wm({formats:hB,defaultWidth:"full"}),dateTime:Wm({formats:pB,defaultWidth:"full"})},vB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yB=function(t,r,n,i){return vB[t]};function jl(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var gB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xB={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wB={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},SB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},OB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PB=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},EB={ordinalNumber:PB,era:jl({values:gB,defaultWidth:"wide"}),quarter:jl({values:bB,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:jl({values:xB,defaultWidth:"wide"}),day:jl({values:wB,defaultWidth:"wide"}),dayPeriod:jl({values:SB,defaultWidth:"wide",formattingValues:OB,defaultFormattingWidth:"wide"})};function _l(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?jB(s,function(f){return f.test(o)}):AB(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function AB(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function jB(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var TB=/^(\d+)(th|st|nd|rd)?/i,kB=/\d+/i,NB={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},CB={any:[/^b/i,/^(a|c)/i]},$B={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},MB={any:[/1/i,/2/i,/3/i,/4/i]},IB={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},DB={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},RB={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},LB={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},FB={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},BB={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zB={ordinalNumber:_B({matchPattern:TB,parsePattern:kB,valueCallback:function(t){return parseInt(t,10)}}),era:_l({matchPatterns:NB,defaultMatchWidth:"wide",parsePatterns:CB,defaultParseWidth:"any"}),quarter:_l({matchPatterns:$B,defaultMatchWidth:"wide",parsePatterns:MB,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:_l({matchPatterns:IB,defaultMatchWidth:"wide",parsePatterns:DB,defaultParseWidth:"any"}),day:_l({matchPatterns:RB,defaultMatchWidth:"wide",parsePatterns:LB,defaultParseWidth:"any"}),dayPeriod:_l({matchPatterns:FB,defaultMatchWidth:"any",parsePatterns:BB,defaultParseWidth:"any"})},bk={code:"en-US",formatDistance:fB,formatLong:mB,formatRelative:yB,localize:EB,match:zB,options:{weekStartsOn:0,firstWeekContainsDate:1}},UB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HB=/^'([^]*?)'?$/,KB=/''/g,qB=/[a-zA-Z]/;function Hi(e,t,r){var n,i,a,o,s,l,u,c,f,d,p,v,m,g;je(2,arguments);var y=String(t),b=$c(),x=(n=(i=void 0)!==null&&i!==void 0?i:b.locale)!==null&&n!==void 0?n:bk,S=an((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(u=b.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=an((f=(d=(p=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&p!==void 0?p:b.weekStartsOn)!==null&&d!==void 0?d:(m=b.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Te(e);if(!R5(O))throw new RangeError("Invalid time value");var P=Qy(O),E=G5(O,P),j={firstWeekContainsDate:S,weekStartsOn:w,locale:x,_originalDate:O},_=y.match(WB).map(function(T){var k=T[0];if(k==="p"||k==="P"){var M=aB[k];return M(T,x.formatLong)}return T}).join("").match(UB).map(function(T){if(T==="''")return"'";var k=T[0];if(k==="'")return VB(T);var M=nB[k];if(M)return uB(T)&&lS(T,t,String(e)),lB(T)&&lS(T,t,String(e)),M(E,T,x.localize,j);if(k.match(qB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return T}).join("");return _}function VB(e){var t=e.match(HB);return t?t[1].replace(KB,"'"):e}function xk(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function GB(e){return xk({},e)}var uS=1440,YB=2520,Hm=43200,XB=86400;function QB(e,t,r){var n,i;je(2,arguments);var a=$c(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:bk;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Qf(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=xk(GB(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=Te(t),c=Te(e)):(u=Te(e),c=Te(t));var f=V5(c,u),d=(Qy(c)-Qy(u))/1e3,p=Math.round((f-d)/60),v;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p{const n=new Date,i=Zy(n,3);return(await lr(ur.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.expsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}function ZB(e,t=30){return Fr({queryKey:["dailyTokenUsage",e,t],queryFn:async()=>(await lr(ur.getDailyTokenUsage,{teamId:e,days:t})).dailyTokenUsage,enabled:!!e,staleTime:5*60*1e3})}const xe=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));xe.displayName="Card";const or=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("flex flex-col space-y-1.5 p-6",e),...t}));or.displayName="CardHeader";const sr=A.forwardRef(({className:e,...t},r)=>h.jsx("h3",{ref:r,className:fe("text-2xl font-semibold leading-none tracking-tight",e),...t}));sr.displayName="CardTitle";const xr=A.forwardRef(({className:e,...t},r)=>h.jsx("p",{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));xr.displayName="CardDescription";const we=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("p-6 pt-0",e),...t}));we.displayName="CardContent";const e4=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("flex items-center p-6 pt-0",e),...t}));e4.displayName="CardFooter";var t4=Array.isArray,cr=t4,r4=typeof Vc=="object"&&Vc&&Vc.Object===Object&&Vc,wk=r4,n4=wk,i4=typeof self=="object"&&self&&self.Object===Object&&self,a4=n4||i4||Function("return this")(),An=a4,o4=An,s4=o4.Symbol,Mc=s4,cS=Mc,Sk=Object.prototype,l4=Sk.hasOwnProperty,u4=Sk.toString,Tl=cS?cS.toStringTag:void 0;function c4(e){var t=l4.call(e,Tl),r=e[Tl];try{e[Tl]=void 0;var n=!0}catch{}var i=u4.call(e);return n&&(t?e[Tl]=r:delete e[Tl]),i}var f4=c4,d4=Object.prototype,h4=d4.toString;function p4(e){return h4.call(e)}var m4=p4,fS=Mc,v4=f4,y4=m4,g4="[object Null]",b4="[object Undefined]",dS=fS?fS.toStringTag:void 0;function x4(e){return e==null?e===void 0?b4:g4:dS&&dS in Object(e)?v4(e):y4(e)}var ii=x4;function w4(e){return e!=null&&typeof e=="object"}var ai=w4,S4=ii,O4=ai,P4="[object Symbol]";function E4(e){return typeof e=="symbol"||O4(e)&&S4(e)==P4}var rl=E4,A4=cr,j4=rl,_4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T4=/^\w*$/;function k4(e,t){if(A4(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||j4(e)?!0:T4.test(e)||!_4.test(e)||t!=null&&e in Object(t)}var Kb=k4;function N4(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi=N4;const nl=Ae(Zi);var C4=ii,$4=Zi,M4="[object AsyncFunction]",I4="[object Function]",D4="[object GeneratorFunction]",R4="[object Proxy]";function L4(e){if(!$4(e))return!1;var t=C4(e);return t==I4||t==D4||t==M4||t==R4}var qb=L4;const oe=Ae(qb);var F4=An,B4=F4["__core-js_shared__"],z4=B4,Km=z4,hS=function(){var e=/[^.]+$/.exec(Km&&Km.keys&&Km.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function U4(e){return!!hS&&hS in e}var W4=U4,H4=Function.prototype,K4=H4.toString;function q4(e){if(e!=null){try{return K4.call(e)}catch{}try{return e+""}catch{}}return""}var Ok=q4,V4=qb,G4=W4,Y4=Zi,X4=Ok,Q4=/[\\^$.*+?()[\]{}|]/g,J4=/^\[object .+?Constructor\]$/,Z4=Function.prototype,ez=Object.prototype,tz=Z4.toString,rz=ez.hasOwnProperty,nz=RegExp("^"+tz.call(rz).replace(Q4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iz(e){if(!Y4(e)||G4(e))return!1;var t=V4(e)?nz:J4;return t.test(X4(e))}var az=iz;function oz(e,t){return e==null?void 0:e[t]}var sz=oz,lz=az,uz=sz;function cz(e,t){var r=uz(e,t);return lz(r)?r:void 0}var oo=cz,fz=oo,dz=fz(Object,"create"),up=dz,pS=up;function hz(){this.__data__=pS?pS(null):{},this.size=0}var pz=hz;function mz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vz=mz,yz=up,gz="__lodash_hash_undefined__",bz=Object.prototype,xz=bz.hasOwnProperty;function wz(e){var t=this.__data__;if(yz){var r=t[e];return r===gz?void 0:r}return xz.call(t,e)?t[e]:void 0}var Sz=wz,Oz=up,Pz=Object.prototype,Ez=Pz.hasOwnProperty;function Az(e){var t=this.__data__;return Oz?t[e]!==void 0:Ez.call(t,e)}var jz=Az,_z=up,Tz="__lodash_hash_undefined__";function kz(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_z&&t===void 0?Tz:t,this}var Nz=kz,Cz=pz,$z=vz,Mz=Sz,Iz=jz,Dz=Nz;function il(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var Zz=Jz,eU=cp;function tU(e,t){var r=this.__data__,n=eU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var rU=tU,nU=Fz,iU=Vz,aU=Xz,oU=Zz,sU=rU;function al(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Sa=function(t){return Ya(t)&&t.indexOf("%")===t.length-1},q=function(t){return j8(t)&&!Ic(t)},N8=function(t){return ae(t)},pt=function(t){return q(t)||Ya(t)},C8=0,so=function(t){var r=++C8;return"".concat(t||"").concat(r)},Wt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!Ya(t))return n;var a;if(Sa(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Ic(a)&&(a=n),i&&a>r&&(a=r),a},xi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},$8=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function z8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tg(e){"@babel/helpers - typeof";return tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tg(e)}var wS={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Wn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},SS=null,Vm=null,rx=function e(t){if(t===SS&&Array.isArray(Vm))return Vm;var r=[];return A.Children.forEach(t,function(n){ae(n)||(S8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Vm=r,SS=t,r};function qt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Wn(i)}):n=[Wn(t)],rx(e).forEach(function(i){var a=gr(i,"type.displayName")||gr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function pr(e,t){var r=qt(e,t);return r&&r[0]}var OS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},U8=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],W8=function(t){return t&&t.type&&Ya(t.type)&&U8.indexOf(t.type)>=0},H8=function(t){return t&&tg(t)==="object"&&"clipDot"in t},K8=function(t,r,n,i){var a,o=(a=qm==null?void 0:qm[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||R8.includes(r))||n&&tx.includes(r)},te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(A.isValidElement(t)&&(i=t.props),!nl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;K8((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},rg=function e(t,r){if(t===r)return!0;var n=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return PS(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ig(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=Y8(e,G8),c=i||{width:r,height:n,x:0,y:0},f=ue("recharts-surface",a);return N.createElement("svg",ng({},te(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),N.createElement("title",null,s),N.createElement("desc",null,l),t)}var Q8=["children","className"];function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var he=N.forwardRef(function(e,t){var r=e.children,n=e.className,i=J8(e,Q8),a=ue("recharts-layer",n);return N.createElement("g",ag({className:a},te(i,!0),{ref:t}),r)}),tn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:r6(e,t,r)}var i6=n6,a6="\\ud800-\\udfff",o6="\\u0300-\\u036f",s6="\\ufe20-\\ufe2f",l6="\\u20d0-\\u20ff",u6=o6+s6+l6,c6="\\ufe0e\\ufe0f",f6="\\u200d",d6=RegExp("["+f6+a6+u6+c6+"]");function h6(e){return d6.test(e)}var $k=h6;function p6(e){return e.split("")}var m6=p6,Mk="\\ud800-\\udfff",v6="\\u0300-\\u036f",y6="\\ufe20-\\ufe2f",g6="\\u20d0-\\u20ff",b6=v6+y6+g6,x6="\\ufe0e\\ufe0f",w6="["+Mk+"]",og="["+b6+"]",sg="\\ud83c[\\udffb-\\udfff]",S6="(?:"+og+"|"+sg+")",Ik="[^"+Mk+"]",Dk="(?:\\ud83c[\\udde6-\\uddff]){2}",Rk="[\\ud800-\\udbff][\\udc00-\\udfff]",O6="\\u200d",Lk=S6+"?",Fk="["+x6+"]?",P6="(?:"+O6+"(?:"+[Ik,Dk,Rk].join("|")+")"+Fk+Lk+")*",E6=Fk+Lk+P6,A6="(?:"+[Ik+og+"?",og,Dk,Rk,w6].join("|")+")",j6=RegExp(sg+"(?="+sg+")|"+A6+E6,"g");function _6(e){return e.match(j6)||[]}var T6=_6,k6=m6,N6=$k,C6=T6;function $6(e){return N6(e)?C6(e):k6(e)}var M6=$6,I6=i6,D6=$k,R6=M6,L6=jk;function F6(e){return function(t){t=L6(t);var r=D6(t)?R6(t):void 0,n=r?r[0]:t.charAt(0),i=r?I6(r,1).join(""):t.slice(1);return n[e]()+i}}var B6=F6,z6=B6,U6=z6("toUpperCase"),W6=U6;const Pp=Ae(W6);function Ie(e){return function(){return e}}const Bk=Math.cos,Id=Math.sin,ln=Math.sqrt,Dd=Math.PI,Ep=2*Dd,lg=Math.PI,ug=2*lg,ha=1e-6,H6=ug-ha;function zk(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zk;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iha)if(!(Math.abs(f*l-u*c)>ha)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-s,m=l*l+u*u,g=p*p+v*v,y=Math.sqrt(m),b=Math.sqrt(d),x=a*Math.tan((lg-Math.acos((m+d-g)/(2*y*b)))/2),S=x/b,w=x/y;Math.abs(S-1)>ha&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>c*v)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ha||Math.abs(this._y1-c)>ha)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%ug+ug),d>H6?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>ha&&this._append`A${n},${n},0,${+(d>=lg)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function nx(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new q6(t)}function ix(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uk(e){this._context=e}Uk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ap(e){return new Uk(e)}function Wk(e){return e[0]}function Hk(e){return e[1]}function Kk(e,t){var r=Ie(!0),n=null,i=Ap,a=null,o=nx(s);e=typeof e=="function"?e:e===void 0?Wk:Ie(e),t=typeof t=="function"?t:t===void 0?Hk:Ie(t);function s(l){var u,c=(l=ix(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=c;++u)!(u=p;--v)s.point(x[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(x[d]=+e(g,d,f),S[d]=+t(g,d,f),s.point(n?+n(g,d,f):x[d],r?+r(g,d,f):S[d]))}if(b)return s=null,b+""||null}function c(){return Kk().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class qk{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function V6(e){return new qk(e,!0)}function G6(e){return new qk(e,!1)}const ax={draw(e,t){const r=ln(t/Dd);e.moveTo(r,0),e.arc(0,0,r,0,Ep)}},Y6={draw(e,t){const r=ln(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Vk=ln(1/3),X6=Vk*2,Q6={draw(e,t){const r=ln(t/X6),n=r*Vk;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},J6={draw(e,t){const r=ln(t),n=-r/2;e.rect(n,n,r,r)}},Z6=.8908130915292852,Gk=Id(Dd/10)/Id(7*Dd/10),eW=Id(Ep/10)*Gk,tW=-Bk(Ep/10)*Gk,rW={draw(e,t){const r=ln(t*Z6),n=eW*r,i=tW*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ep*a/5,s=Bk(o),l=Id(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Gm=ln(3),nW={draw(e,t){const r=-ln(t/(Gm*3));e.moveTo(0,r*2),e.lineTo(-Gm*r,-r),e.lineTo(Gm*r,-r),e.closePath()}},Or=-.5,Pr=ln(3)/2,cg=1/ln(12),iW=(cg/2+1)*3,aW={draw(e,t){const r=ln(t/iW),n=r/2,i=r*cg,a=n,o=r*cg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Or*n-Pr*i,Pr*n+Or*i),e.lineTo(Or*a-Pr*o,Pr*a+Or*o),e.lineTo(Or*s-Pr*l,Pr*s+Or*l),e.lineTo(Or*n+Pr*i,Or*i-Pr*n),e.lineTo(Or*a+Pr*o,Or*o-Pr*a),e.lineTo(Or*s+Pr*l,Or*l-Pr*s),e.closePath()}};function oW(e,t){let r=null,n=nx(i);e=typeof e=="function"?e:Ie(e||ax),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Rd(){}function Ld(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Yk(e){this._context=e}Yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ld(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sW(e){return new Yk(e)}function Xk(e){this._context=e}Xk.prototype={areaStart:Rd,areaEnd:Rd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lW(e){return new Xk(e)}function Qk(e){this._context=e}Qk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ld(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uW(e){return new Qk(e)}function Jk(e){this._context=e}Jk.prototype={areaStart:Rd,areaEnd:Rd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cW(e){return new Jk(e)}function AS(e){return e<0?-1:1}function jS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(AS(a)+AS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function _S(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ym(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Fd(e){this._context=e}Fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ym(this,this._t0,_S(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ym(this,_S(this,r=jS(this,e,t)),r);break;default:Ym(this,this._t0,r=jS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Zk(e){this._context=new eN(e)}(Zk.prototype=Object.create(Fd.prototype)).point=function(e,t){Fd.prototype.point.call(this,t,e)};function eN(e){this._context=e}eN.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function fW(e){return new Fd(e)}function dW(e){return new Zk(e)}function tN(e){this._context=e}tN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=TS(e),i=TS(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function pW(e){return new jp(e,.5)}function mW(e){return new jp(e,0)}function vW(e){return new jp(e,1)}function gs(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function yW(e,t){return e[t]}function gW(e){const t=[];return t.key=e,t}function bW(){var e=Ie([]),t=fg,r=gs,n=yW;function i(a){var o=Array.from(e.apply(this,arguments),gW),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _W(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var rN={symbolCircle:ax,symbolCross:Y6,symbolDiamond:Q6,symbolSquare:J6,symbolStar:rW,symbolTriangle:nW,symbolWye:aW},TW=Math.PI/180,kW=function(t){var r="symbol".concat(Pp(t));return rN[r]||ax},NW=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*TW;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},CW=function(t,r){rN["symbol".concat(Pp(t))]=r},_p=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=jW(t,OW),u=NS(NS({},l),{},{type:n,size:a,sizeType:s}),c=function(){var g=kW(n),y=oW().type(g).size(NW(a,s,n));return y()},f=u.className,d=u.cx,p=u.cy,v=te(u,!0);return d===+d&&p===+p&&a===+a?N.createElement("path",dg({},v,{className:ue("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(p,")"),d:c()})):null};_p.registerSymbol=CW;function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?u:p.color;return N.createElement("li",hg({className:g,style:f,key:"legend-item-".concat(v)},Yi(n.props,p,v)),N.createElement(ig,{width:o,height:o,viewBox:c,style:d},n.renderIcon(p)),N.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(y,p,v):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return N.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(A.PureComponent);Cu(ox,"displayName","Legend");Cu(ox,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UW=fp;function WW(){this.__data__=new UW,this.size=0}var HW=WW;function KW(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var qW=KW;function VW(e){return this.__data__.get(e)}var GW=VW;function YW(e){return this.__data__.has(e)}var XW=YW,QW=fp,JW=Gb,ZW=Yb,eH=200;function tH(e,t){var r=this.__data__;if(r instanceof QW){var n=r.__data__;if(!JW||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&OH?new bH:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=j7}var cx=_7,T7=ii,k7=cx,N7=ai,C7="[object Arguments]",$7="[object Array]",M7="[object Boolean]",I7="[object Date]",D7="[object Error]",R7="[object Function]",L7="[object Map]",F7="[object Number]",B7="[object Object]",z7="[object RegExp]",U7="[object Set]",W7="[object String]",H7="[object WeakMap]",K7="[object ArrayBuffer]",q7="[object DataView]",V7="[object Float32Array]",G7="[object Float64Array]",Y7="[object Int8Array]",X7="[object Int16Array]",Q7="[object Int32Array]",J7="[object Uint8Array]",Z7="[object Uint8ClampedArray]",e9="[object Uint16Array]",t9="[object Uint32Array]",Be={};Be[V7]=Be[G7]=Be[Y7]=Be[X7]=Be[Q7]=Be[J7]=Be[Z7]=Be[e9]=Be[t9]=!0;Be[C7]=Be[$7]=Be[K7]=Be[M7]=Be[q7]=Be[I7]=Be[D7]=Be[R7]=Be[L7]=Be[F7]=Be[B7]=Be[z7]=Be[U7]=Be[W7]=Be[H7]=!1;function r9(e){return N7(e)&&k7(e.length)&&!!Be[T7(e)]}var n9=r9;function i9(e){return function(t){return e(t)}}var hN=i9,Wd={exports:{}};Wd.exports;(function(e,t){var r=wk,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Wd,Wd.exports);var a9=Wd.exports,o9=n9,s9=hN,LS=a9,FS=LS&&LS.isTypedArray,l9=FS?s9(FS):o9,pN=l9,u9=d7,c9=lx,f9=cr,d9=dN,h9=ux,p9=pN,m9=Object.prototype,v9=m9.hasOwnProperty;function y9(e,t){var r=f9(e),n=!r&&c9(e),i=!r&&!n&&d9(e),a=!r&&!n&&!i&&p9(e),o=r||n||i||a,s=o?u9(e.length,String):[],l=s.length;for(var u in e)(t||v9.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||h9(u,l)))&&s.push(u);return s}var g9=y9,b9=Object.prototype;function x9(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||b9;return e===r}var w9=x9;function S9(e,t){return function(r){return e(t(r))}}var mN=S9,O9=mN,P9=O9(Object.keys,Object),E9=P9,A9=w9,j9=E9,_9=Object.prototype,T9=_9.hasOwnProperty;function k9(e){if(!A9(e))return j9(e);var t=[];for(var r in Object(e))T9.call(e,r)&&r!="constructor"&&t.push(r);return t}var N9=k9,C9=qb,$9=cx;function M9(e){return e!=null&&$9(e.length)&&!C9(e)}var Dc=M9,I9=g9,D9=N9,R9=Dc;function L9(e){return R9(e)?I9(e):D9(e)}var Tp=L9,F9=e7,B9=c7,z9=Tp;function U9(e){return F9(e,z9,B9)}var W9=U9,BS=W9,H9=1,K9=Object.prototype,q9=K9.hasOwnProperty;function V9(e,t,r,n,i,a){var o=r&H9,s=BS(e),l=s.length,u=BS(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:q9.call(t,d)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++f-1}var Kq=Hq;function qq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=sV){var u=t?null:aV(e);if(u)return oV(u);o=!1,i=iV,l=new tV}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function PV(e){return e.value}function EV(e,t){if(N.isValidElement(e))return N.cloneElement(e,t);if(typeof e=="function")return N.createElement(e,t);t.ref;var r=SV(t,pV);return N.createElement(ox,r)}var rO=1,rn=function(e){function t(){var r;mV(this,t);for(var n=arguments.length,i=new Array(n),a=0;arO||Math.abs(i.height-this.lastBoundingBox.height)>rO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?kn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();d={top:((c||0)-v.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return kn(kn({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=kn(kn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return N.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},EV(a,kn(kn({},this.props),{},{payload:SN(c,u,PV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=kn(kn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(A.PureComponent);kp(rn,"displayName","Legend");kp(rn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var nO=Mc,AV=lx,jV=cr,iO=nO?nO.isConcatSpreadable:void 0;function _V(e){return jV(e)||AV(e)||!!(iO&&e&&e[iO])}var TV=_V,kV=cN,NV=TV;function EN(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=NV),i||(i=[]);++a0&&r(s)?t>1?EN(s,t-1,r,n,i):kV(i,s):n||(i[i.length]=s)}return i}var AN=EN;function CV(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var $V=CV,MV=$V,IV=MV(),DV=IV,RV=DV,LV=Tp;function FV(e,t){return e&&RV(e,t,LV)}var jN=FV,BV=Dc;function zV(e,t){return function(r,n){if(r==null)return r;if(!BV(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var tG=eG,Zm=Qb,rG=Jb,nG=jn,iG=_N,aG=XV,oG=hN,sG=tG,lG=ul,uG=cr;function cG(e,t,r){t.length?t=Zm(t,function(a){return uG(a)?function(o){return rG(o,a.length===1?a[0]:a)}:a}):t=[lG];var n=-1;t=Zm(t,oG(nG));var i=iG(e,function(a,o,s){var l=Zm(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return aG(i,function(a,o){return sG(a,o,r)})}var fG=cG;function dG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var hG=dG,pG=hG,oO=Math.max;function mG(e,t,r){return t=oO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=oO(n.length-t,0),o=Array(a);++i0){if(++t>=EG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var TG=_G,kG=PG,NG=TG,CG=NG(kG),$G=CG,MG=ul,IG=vG,DG=$G;function RG(e,t){return DG(IG(e,t,MG),e+"")}var LG=RG,FG=Vb,BG=Dc,zG=ux,UG=Zi;function WG(e,t,r){if(!UG(r))return!1;var n=typeof t;return(n=="number"?BG(r)&&zG(t,r.length):n=="string"&&t in r)?FG(r[t],e):!1}var Np=WG,HG=AN,KG=fG,qG=LG,lO=Np,VG=qG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&lO(e,t[0],t[1])?t=[]:r>2&&lO(t[0],t[1],t[2])&&(t=[t[0]]),KG(e,HG(t,1),[])}),GG=VG;const hx=Ae(GG);function $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(kl,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat(kl,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(c,l[n]):Math.max(f,l[n])}function uY(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function cY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=fO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=fO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=uY({translateX:c,translateY:f,useTranslate3d:s})):u=sY,{cssProperties:u,cssClasses:lY({translateX:c,translateY:f,coordinate:r})}}function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function dO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hO(e){for(var t=1;tpO||Math.abs(n.height-this.state.lastBoundingBox.height)>pO)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,b=i.wrapperStyle,x=cY({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=x.cssClasses,w=x.cssProperties,O=hO(hO({transition:d&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return N.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(A.PureComponent),xY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ea={isSsr:xY()};function Ss(e){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function mO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vO(e){for(var t=1;t0;return N.createElement(bY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:c,hasPayload:O,offset:p,position:g,reverseDirection:y,useTranslate3d:b,viewBox:x,wrapperStyle:S},kY(u,vO(vO({},this.props),{},{payload:w})))}}])}(A.PureComponent);px(Ct,"displayName","Tooltip");px(Ct,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ea.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var NY=An,CY=function(){return NY.Date.now()},$Y=CY,MY=/\s/;function IY(e){for(var t=e.length;t--&&MY.test(e.charAt(t)););return t}var DY=IY,RY=DY,LY=/^\s+/;function FY(e){return e&&e.slice(0,RY(e)+1).replace(LY,"")}var BY=FY,zY=BY,yO=Zi,UY=rl,gO=NaN,WY=/^[-+]0x[0-9a-f]+$/i,HY=/^0b[01]+$/i,KY=/^0o[0-7]+$/i,qY=parseInt;function VY(e){if(typeof e=="number")return e;if(UY(e))return gO;if(yO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=yO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zY(e);var r=HY.test(e);return r||KY.test(e)?qY(e.slice(2),r?2:8):WY.test(e)?gO:+e}var MN=VY,GY=Zi,tv=$Y,bO=MN,YY="Expected a function",XY=Math.max,QY=Math.min;function JY(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(YY);t=bO(t)||0,GY(r)&&(c=!!r.leading,f="maxWait"in r,a=f?XY(bO(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(O){var P=n,E=i;return n=i=void 0,u=O,o=e.apply(E,P),o}function v(O){return u=O,s=setTimeout(y,t),c?p(O):o}function m(O){var P=O-l,E=O-u,j=t-P;return f?QY(j,a-E):j}function g(O){var P=O-l,E=O-u;return l===void 0||P>=t||P<0||f&&E>=a}function y(){var O=tv();if(g(O))return b(O);s=setTimeout(y,m(O))}function b(O){return s=void 0,d&&n?p(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(tv())}function w(){var O=tv(),P=g(O);if(n=arguments,i=this,l=O,P){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),o}return w.cancel=x,w.flush=S,w}var ZY=JY,eX=ZY,tX=Zi,rX="Expected a function";function nX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(rX);return tX(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),eX(e,t,{leading:n,maxWait:t,trailing:i})}var iX=nX;const IN=Ae(iX);function Iu(e){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iu(e)}function xO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=IN(M,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(M),I=w.current.getBoundingClientRect(),L=I.width,z=I.height;return T(L,z),R.observe(w.current),function(){R.disconnect()}},[T,m]);var k=A.useMemo(function(){var M=j.containerWidth,R=j.containerHeight;if(M<0||R<0)return null;tn(Sa(o)||Sa(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),tn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Sa(o)?M:o,L=Sa(l)?R:l;r&&r>0&&(I?L=I/r:L&&(I=L*r),d&&L>d&&(L=d)),tn(I>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,I,L,o,l,c,f,r);var z=!Array.isArray(p)&&Wn(p.type).endsWith("Chart");return N.Children.map(p,function(C){return N.isValidElement(C)?A.cloneElement(C,bf({width:I,height:L},z?{style:bf({height:"100%",width:"100%",maxHeight:L,maxWidth:I},C.props.style)}:{})):C})},[r,p,l,d,f,c,j,o]);return N.createElement("div",{id:g?"".concat(g):void 0,className:ue("recharts-responsive-container",y),style:bf(bf({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:w},k)}),cl=function(t){return null};cl.displayName="Cell";function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function SO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ea.isSsr)return{width:0,height:0};var n=gX(r),i=JSON.stringify({text:t,copyStyle:n});if(yo.widthCache[i])return yo.widthCache[i];try{var a=document.getElementById(OO);a||(a=document.createElement("span"),a.setAttribute("id",OO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Eg(Eg({},yX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return yo.widthCache[i]=l,++yo.cacheCount>vX&&(yo.cacheCount=0,yo.widthCache={}),l}catch{return{width:0,height:0}}},bX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function Vd(e,t){return OX(e)||SX(e,t)||wX(e,t)||xX()}function xX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wX(e,t){if(e){if(typeof e=="string")return PO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PO(e,t)}}function PO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kO(e,t){return zX(e)||BX(e,t)||FX(e,t)||LX()}function LX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FX(e,t){if(e){if(typeof e=="string")return NO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NO(e,t)}}function NO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(L,z){var C=z.word,F=z.width,W=L[L.length-1];if(W&&(i==null||a||W.width+F+nz.width?L:z})};if(!c)return p;for(var m="…",g=function(I){var L=f.slice(0,I),z=FN({breakAll:u,style:l,children:L+m}).wordsWithComputedWidth,C=d(z),F=C.length>o||v(C).width>Number(i);return[F,C]},y=0,b=f.length-1,x=0,S;y<=b&&x<=f.length-1;){var w=Math.floor((y+b)/2),O=w-1,P=g(O),E=kO(P,2),j=E[0],_=E[1],T=g(w),k=kO(T,1),M=k[0];if(!j&&!M&&(y=w+1),j&&M&&(b=w-1),!j&&M){S=_;break}x++}return S||p},CO=function(t){var r=ae(t)?[]:t.toString().split(LN);return[{words:r}]},WX=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ea.isSsr){var l,u,c=FN({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return CO(i);return UX({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return CO(i)},$O="#808080",Qa=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,p=d===void 0?"start":d,v=t.verticalAnchor,m=v===void 0?"end":v,g=t.fill,y=g===void 0?$O:g,b=TO(t,IX),x=A.useMemo(function(){return WX({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,P=b.className,E=b.breakAll,j=TO(b,DX);if(!pt(n)||!pt(a))return null;var _=n+(q(S)?S:0),T=a+(q(w)?w:0),k;switch(m){case"start":k=rv("calc(".concat(u,")"));break;case"middle":k=rv("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:k=rv("calc(".concat(x.length-1," * -").concat(s,")"));break}var M=[];if(f){var R=x[0].width,I=b.width;M.push("scale(".concat((q(I)?I/R:1)/R,")"))}return O&&M.push("rotate(".concat(O,", ").concat(_,", ").concat(T,")")),M.length&&(j.transform=M.join(" ")),N.createElement("text",Ag({},te(j,!0),{x:_,y:T,className:ue("recharts-text",P),textAnchor:p,fill:y.includes("url")?$O:y}),x.map(function(L,z){var C=L.words.join(E?"":" ");return N.createElement("tspan",{x:_,dy:z===0?k:s,key:"".concat(C,"-").concat(z)},C)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function HX(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function mx(e){let t,r,n;e.length!==2?(t=Ki,r=(s,l)=>Ki(e(s),l),n=(s,l)=>e(s)-l):(t=e===Ki||e===HX?e:KX,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function KX(){return 0}function BN(e){return e===null?NaN:+e}function*qX(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const VX=mx(Ki),Rc=VX.right;mx(BN).center;class MO extends Map{constructor(t,r=XX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(IO(this,t))}has(t){return super.has(IO(this,t))}set(t,r){return super.set(GX(this,t),r)}delete(t){return super.delete(YX(this,t))}}function IO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function GX({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YX({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function XX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function QX(e=Ki){if(e===Ki)return zN;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function zN(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const JX=Math.sqrt(50),ZX=Math.sqrt(10),eQ=Math.sqrt(2);function Gd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=JX?10:a>=ZX?5:a>=eQ?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function RO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function UN(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?zN:QX(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+d)),v=Math.min(n,Math.floor(t+(l-u)*f/l+d));UN(e,t,p,v,i)}const a=e[t];let o=r,s=n;for(Nl(e,r,t),i(e[n],a)>0&&Nl(e,r,n);o0;)--s}i(e[r],a)===0?Nl(e,r,s):(++s,Nl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Nl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function tQ(e,t,r){if(e=Float64Array.from(qX(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RO(e);if(t>=1)return DO(e);var n,i=(n-1)*t,a=Math.floor(i),o=DO(UN(e,a).subarray(0,a+1)),s=RO(e.subarray(a+1));return o+(s-o)*(i-a)}}function rQ(e,t,r=BN){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function nQ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?wf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?wf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aQ.exec(e))?new er(t[1],t[2],t[3],1):(t=oQ.exec(e))?new er(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sQ.exec(e))?wf(t[1],t[2],t[3],t[4]):(t=lQ.exec(e))?wf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=uQ.exec(e))?HO(t[1],t[2]/100,t[3]/100,1):(t=cQ.exec(e))?HO(t[1],t[2]/100,t[3]/100,t[4]):LO.hasOwnProperty(e)?zO(LO[e]):e==="transparent"?new er(NaN,NaN,NaN,0):null}function zO(e){return new er(e>>16&255,e>>8&255,e&255,1)}function wf(e,t,r,n){return n<=0&&(e=t=r=NaN),new er(e,t,r,n)}function hQ(e){return e instanceof Lc||(e=zu(e)),e?(e=e.rgb(),new er(e.r,e.g,e.b,e.opacity)):new er}function Ng(e,t,r,n){return arguments.length===1?hQ(e):new er(e,t,r,n??1)}function er(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}yx(er,Ng,HN(Lc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fu:Math.pow(Fu,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new er(La(this.r),La(this.g),La(this.b),Xd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UO,formatHex:UO,formatHex8:pQ,formatRgb:WO,toString:WO}));function UO(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}`}function pQ(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}${Oa((isNaN(this.opacity)?1:this.opacity)*255)}`}function WO(){const e=Xd(this.opacity);return`${e===1?"rgb(":"rgba("}${La(this.r)}, ${La(this.g)}, ${La(this.b)}${e===1?")":`, ${e})`}`}function Xd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function La(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oa(e){return e=La(e),(e<16?"0":"")+e.toString(16)}function HO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Jr(e,t,r,n)}function KN(e){if(e instanceof Jr)return new Jr(e.h,e.s,e.l,e.opacity);if(e instanceof Lc||(e=zu(e)),!e)return new Jr;if(e instanceof Jr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Jr(o,s,l,e.opacity)}function mQ(e,t,r,n){return arguments.length===1?KN(e):new Jr(e,t,r,n??1)}function Jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}yx(Jr,mQ,HN(Lc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new Jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fu:Math.pow(Fu,e),new Jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new er(nv(e>=240?e-240:e+120,i,n),nv(e,i,n),nv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Jr(KO(this.h),Sf(this.s),Sf(this.l),Xd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xd(this.opacity);return`${e===1?"hsl(":"hsla("}${KO(this.h)}, ${Sf(this.s)*100}%, ${Sf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function KO(e){return e=(e||0)%360,e<0?e+360:e}function Sf(e){return Math.max(0,Math.min(1,e||0))}function nv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const gx=e=>()=>e;function vQ(e,t){return function(r){return e+r*t}}function yQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function gQ(e){return(e=+e)==1?qN:function(t,r){return r-t?yQ(t,r,e):gx(isNaN(t)?r:t)}}function qN(e,t){var r=t-e;return r?vQ(e,r):gx(isNaN(e)?t:e)}const qO=function e(t){var r=gQ(t);function n(i,a){var o=r((i=Ng(i)).r,(a=Ng(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=qN(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function bQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Qd(n,i)})),r=iv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function kQ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?NQ:kQ,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((u||(u=s(t,e.map(n),Qd)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Jd),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=bx,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Ht,c()):o!==Ht},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,c()}}function xx(){return Cp()(Ht,Ht)}function CQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zd(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Os(e){return e=Zd(Math.abs(e)),e?e[1]:NaN}function $Q(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function MQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var IQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Uu(e){if(!(t=IQ.exec(e)))throw new Error("invalid format: "+e);var t;return new wx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Uu.prototype=wx.prototype;function wx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function DQ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var VN;function RQ(e,t){var r=Zd(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(VN=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Zd(e,Math.max(0,t+a-1))[0]}function GO(e,t){var r=Zd(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const YO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:CQ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GO(e*100,t),r:GO,s:RQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XO(e){return e}var QO=Array.prototype.map,JO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LQ(e){var t=e.grouping===void 0||e.thousands===void 0?XO:$Q(QO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?XO:MQ(QO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Uu(f);var d=f.fill,p=f.align,v=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):YO[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||d==="0"&&p==="=")&&(g=!0,d="0",p="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=m==="$"?n:/[%p]/.test(w)?o:"",E=YO[w],j=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function _(T){var k=O,M=P,R,I,L;if(w==="c")M=E(T)+M,T="";else{T=+T;var z=T<0||1/T<0;if(T=isNaN(T)?l:E(Math.abs(T),x),S&&(T=DQ(T)),z&&+T==0&&v!=="+"&&(z=!1),k=(z?v==="("?v:s:v==="-"||v==="("?"":v)+k,M=(w==="s"?JO[8+VN/3]:"")+M+(z&&v==="("?")":""),j){for(R=-1,I=T.length;++RL||L>57){M=(L===46?i+T.slice(R+1):T.slice(R))+M,T=T.slice(0,R);break}}}b&&!g&&(T=t(T,1/0));var C=k.length+T.length+M.length,F=C>1)+k+T+M+F.slice(C);break;default:T=F+k+T+M;break}return a(T)}return _.toString=function(){return f+""},_}function c(f,d){var p=u((f=Uu(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Os(d)/3)))*3,m=Math.pow(10,-v),g=JO[8+v/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var Of,Sx,GN;FQ({thousands:",",grouping:[3],currency:["$",""]});function FQ(e){return Of=LQ(e),Sx=Of.format,GN=Of.formatPrefix,Of}function BQ(e){return Math.max(0,-Os(Math.abs(e)))}function zQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Os(t)/3)))*3-Os(Math.abs(e)))}function UQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Os(t)-Os(e))+1}function YN(e,t,r,n){var i=Tg(e,t,r),a;switch(n=Uu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=zQ(i,o))&&(n.precision=a),GN(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=UQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=BQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return Sx(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return jg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return YN(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=_g(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function eh(){var e=xx();return e.copy=function(){return Fc(e,eh())},zr.apply(e,arguments),ta(e)}function XN(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return XN(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],ta(r)}function QN(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function VQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tP(e){return(t,r)=>-e(-t,r)}function Ox(e){const t=e(ZO,eP),r=t.domain;let n=10,i,a;function o(){return i=VQ(n),a=qQ(n),r()[0]<0?(i=tP(i),a=tP(a),e(WQ,HQ)):e(ZO,eP),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=p;++d)for(v=1;vc)break;y.push(m)}}else for(;d<=p;++d)for(v=n-1;v>=1;--v)if(m=d>0?v/a(-d):v*a(d),!(mc)break;y.push(m)}y.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Uu(l)).precision==null&&(l.trim=!0),l=Sx(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(QN(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function JN(){const e=Ox(Cp()).domain([1,10]);return e.copy=()=>Fc(e,JN()).base(e.base()),zr.apply(e,arguments),e}function rP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Px(e){var t=1,r=e(rP(t),nP(t));return r.constant=function(n){return arguments.length?e(rP(t=+n),nP(t)):t},ta(r)}function ZN(){var e=Px(Cp());return e.copy=function(){return Fc(e,ZN()).constant(e.constant())},zr.apply(e,arguments)}function iP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function GQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function YQ(e){return e<0?-e*e:e*e}function Ex(e){var t=e(Ht,Ht),r=1;function n(){return r===1?e(Ht,Ht):r===.5?e(GQ,YQ):e(iP(r),iP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ta(t)}function Ax(){var e=Ex(Cp());return e.copy=function(){return Fc(e,Ax()).exponent(e.exponent())},zr.apply(e,arguments),e}function XQ(){return Ax.apply(null,arguments).exponent(.5)}function aP(e){return Math.sign(e)*e*e}function QQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eC(){var e=xx(),t=[0,1],r=!1,n;function i(a){var o=QQ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(aP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(aP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return eC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},zr.apply(i,arguments),ta(i)}function tC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return rC().domain([e,t]).range(i).unknown(a)},zr.apply(ta(o),arguments)}function nC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Rc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return nC().domain(e).range(t).unknown(r)},zr.apply(i,arguments)}const av=new Date,ov=new Date;function mt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(umt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(av.setTime(+a),ov.setTime(+o),e(av),e(ov),Math.floor(r(av,ov))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const th=mt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);th.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?mt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):th);th.range;const Fn=1e3,$r=Fn*60,Bn=$r*60,Xn=Bn*24,jx=Xn*7,oP=Xn*30,sv=Xn*365,Pa=mt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getUTCSeconds());Pa.range;const _x=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fn)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getMinutes());_x.range;const Tx=mt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*$r)},(e,t)=>(t-e)/$r,e=>e.getUTCMinutes());Tx.range;const kx=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fn-e.getMinutes()*$r)},(e,t)=>{e.setTime(+e+t*Bn)},(e,t)=>(t-e)/Bn,e=>e.getHours());kx.range;const Nx=mt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Bn)},(e,t)=>(t-e)/Bn,e=>e.getUTCHours());Nx.range;const Bc=mt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/Xn,e=>e.getDate()-1);Bc.range;const $p=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>e.getUTCDate()-1);$p.range;const iC=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>Math.floor(e/Xn));iC.range;function lo(e){return mt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*$r)/jx)}const Mp=lo(0),rh=lo(1),JQ=lo(2),ZQ=lo(3),Ps=lo(4),eJ=lo(5),tJ=lo(6);Mp.range;rh.range;JQ.range;ZQ.range;Ps.range;eJ.range;tJ.range;function uo(e){return mt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/jx)}const Ip=uo(0),nh=uo(1),rJ=uo(2),nJ=uo(3),Es=uo(4),iJ=uo(5),aJ=uo(6);Ip.range;nh.range;rJ.range;nJ.range;Es.range;iJ.range;aJ.range;const Cx=mt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Cx.range;const $x=mt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());$x.range;const Qn=mt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Qn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Qn.range;const Jn=mt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Jn.range;function aC(e,t,r,n,i,a){const o=[[Pa,1,Fn],[Pa,5,5*Fn],[Pa,15,15*Fn],[Pa,30,30*Fn],[a,1,$r],[a,5,5*$r],[a,15,15*$r],[a,30,30*$r],[i,1,Bn],[i,3,3*Bn],[i,6,6*Bn],[i,12,12*Bn],[n,1,Xn],[n,2,2*Xn],[r,1,jx],[t,1,oP],[t,3,3*oP],[e,1,sv]];function s(u,c,f){const d=cg).right(o,d);if(p===o.length)return e.every(Tg(u/sv,c/sv,f));if(p===0)return th.every(Math.max(Tg(u,c,f),1));const[v,m]=o[d/o[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ye=uv(Cl(U.y,0,1)),st=ye.getUTCDay(),ye=st>4||st===0?nh.ceil(ye):nh(ye),ye=$p.offset(ye,(U.V-1)*7),U.y=ye.getUTCFullYear(),U.m=ye.getUTCMonth(),U.d=ye.getUTCDate()+(U.w+6)%7):(ye=lv(Cl(U.y,0,1)),st=ye.getDay(),ye=st>4||st===0?rh.ceil(ye):rh(ye),ye=Bc.offset(ye,(U.V-1)*7),U.y=ye.getFullYear(),U.m=ye.getMonth(),U.d=ye.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),st="Z"in U?uv(Cl(U.y,0,1)).getUTCDay():lv(Cl(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(st+5)%7:U.w+U.U*7-(st+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,uv(U)):lv(U)}}function E(G,se,le,U){for(var Qe=0,ye=se.length,st=le.length,lt,Yt;Qe=st)return-1;if(lt=se.charCodeAt(Qe++),lt===37){if(lt=se.charAt(Qe++),Yt=w[lt in sP?se.charAt(Qe++):lt],!Yt||(U=Yt(G,le,U))<0)return-1}else if(lt!=le.charCodeAt(U++))return-1}return U}function j(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=p.exec(se.slice(le));return U?(G.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=f.exec(se.slice(le));return U?(G.w=d.get(U[0].toLowerCase()),le+U[0].length):-1}function k(G,se,le){var U=y.exec(se.slice(le));return U?(G.m=b.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=g.get(U[0].toLowerCase()),le+U[0].length):-1}function R(G,se,le){return E(G,t,se,le)}function I(G,se,le){return E(G,r,se,le)}function L(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function C(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function re(G){return a[G.getUTCDay()]}function be(G){return l[G.getUTCMonth()]}function We(G){return s[G.getUTCMonth()]}function Oe(G){return i[+(G.getUTCHours()>=12)]}function St(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=P(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=P(G+="",!0);return se.toString=function(){return G},se}}}var sP={"-":"",_:" ",0:"0"},wt=/^\s*\d+/,fJ=/^%/,dJ=/[\\^$*+?|[\]().{}]/g;function Se(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function pJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function mJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function vJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function yJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function gJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function lP(e,t,r){var n=wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function uP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function bJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function xJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function wJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function cP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function SJ(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function fP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function OJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function PJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function EJ(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function AJ(e,t,r){var n=wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function jJ(e,t,r){var n=fJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _J(e,t,r){var n=wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function TJ(e,t,r){var n=wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function dP(e,t){return Se(e.getDate(),t,2)}function kJ(e,t){return Se(e.getHours(),t,2)}function NJ(e,t){return Se(e.getHours()%12||12,t,2)}function CJ(e,t){return Se(1+Bc.count(Qn(e),e),t,3)}function oC(e,t){return Se(e.getMilliseconds(),t,3)}function $J(e,t){return oC(e,t)+"000"}function MJ(e,t){return Se(e.getMonth()+1,t,2)}function IJ(e,t){return Se(e.getMinutes(),t,2)}function DJ(e,t){return Se(e.getSeconds(),t,2)}function RJ(e){var t=e.getDay();return t===0?7:t}function LJ(e,t){return Se(Mp.count(Qn(e)-1,e),t,2)}function sC(e){var t=e.getDay();return t>=4||t===0?Ps(e):Ps.ceil(e)}function FJ(e,t){return e=sC(e),Se(Ps.count(Qn(e),e)+(Qn(e).getDay()===4),t,2)}function BJ(e){return e.getDay()}function zJ(e,t){return Se(rh.count(Qn(e)-1,e),t,2)}function UJ(e,t){return Se(e.getFullYear()%100,t,2)}function WJ(e,t){return e=sC(e),Se(e.getFullYear()%100,t,2)}function HJ(e,t){return Se(e.getFullYear()%1e4,t,4)}function KJ(e,t){var r=e.getDay();return e=r>=4||r===0?Ps(e):Ps.ceil(e),Se(e.getFullYear()%1e4,t,4)}function qJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Se(t/60|0,"0",2)+Se(t%60,"0",2)}function hP(e,t){return Se(e.getUTCDate(),t,2)}function VJ(e,t){return Se(e.getUTCHours(),t,2)}function GJ(e,t){return Se(e.getUTCHours()%12||12,t,2)}function YJ(e,t){return Se(1+$p.count(Jn(e),e),t,3)}function lC(e,t){return Se(e.getUTCMilliseconds(),t,3)}function XJ(e,t){return lC(e,t)+"000"}function QJ(e,t){return Se(e.getUTCMonth()+1,t,2)}function JJ(e,t){return Se(e.getUTCMinutes(),t,2)}function ZJ(e,t){return Se(e.getUTCSeconds(),t,2)}function eZ(e){var t=e.getUTCDay();return t===0?7:t}function tZ(e,t){return Se(Ip.count(Jn(e)-1,e),t,2)}function uC(e){var t=e.getUTCDay();return t>=4||t===0?Es(e):Es.ceil(e)}function rZ(e,t){return e=uC(e),Se(Es.count(Jn(e),e)+(Jn(e).getUTCDay()===4),t,2)}function nZ(e){return e.getUTCDay()}function iZ(e,t){return Se(nh.count(Jn(e)-1,e),t,2)}function aZ(e,t){return Se(e.getUTCFullYear()%100,t,2)}function oZ(e,t){return e=uC(e),Se(e.getUTCFullYear()%100,t,2)}function sZ(e,t){return Se(e.getUTCFullYear()%1e4,t,4)}function lZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Es(e):Es.ceil(e),Se(e.getUTCFullYear()%1e4,t,4)}function uZ(){return"+0000"}function pP(){return"%"}function mP(e){return+e}function vP(e){return Math.floor(+e/1e3)}var go,cC,fC;cZ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cZ(e){return go=cJ(e),cC=go.format,go.parse,fC=go.utcFormat,go.utcParse,go}function fZ(e){return new Date(e)}function dZ(e){return e instanceof Date?+e:+new Date(+e)}function Mx(e,t,r,n,i,a,o,s,l,u){var c=xx(),f=c.invert,d=c.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>tQ(e,a/n))},r.copy=function(){return mC(t).domain(e)},oi.apply(r,arguments)}function Rp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Ht,c,f=!1,d;function p(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-a)*(n*mt}var bC=bZ,xZ=Lp,wZ=bC,SZ=ul;function OZ(e){return e&&e.length?xZ(e,SZ,wZ):void 0}var PZ=OZ;const Fp=Ae(PZ);function EZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ze;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Hn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return $e(Hn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ot(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(mr))throw Error(Rr+"NaN");if(r.s<1)throw Error(Rr+(r.s?"NaN":"-Infinity"));return r.eq(mr)?new n(0):(Ke=!1,t=Hn(Wu(r,a),Wu(e,a),a),Ke=!0,$e(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?PC(t,e):SC(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Rr+"NaN");return r.s?(Ke=!1,t=Hn(r,e,0,1).times(e),Ke=!0,r.minus(t)):$e(new n(r),i)};J.naturalExponential=J.exp=function(){return OC(this)};J.naturalLogarithm=J.ln=function(){return Wu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SC(t,e):PC(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Fa+e);if(t=ot(i)+1,n=i.d.length-1,r=n*ze+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Rr+"NaN")}for(e=ot(s),Ke=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=gn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=pl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Hn(s,a,o+2)).times(.5),gn(a.d).slice(0,o)===(t=gn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ke=!0,$e(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,d=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=p.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*d[i-n-1]+t,a[i--]=s%yt|0,t=s/yt|0;a[i]=(a[i]+t)%yt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ke?$e(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(En(e,0,hl),t===void 0?t=n.rounding:En(t,0,8),$e(r,e+ot(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ja(n,!0):(En(e,0,hl),t===void 0?t=i.rounding:En(t,0,8),n=$e(new i(n),e+1,t),r=Ja(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ja(i):(En(e,0,hl),t===void 0?t=a.rounding:En(t,0,8),n=$e(new a(i),e+ot(i)+1,t),r=Ja(n.abs(),!1,e+ot(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ot(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(mr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Rr+"Infinity");return s}if(s.eq(mr))return s;if(n=l.precision,e.eq(mr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=wC){for(i=new l(mr),t=Math.ceil(n/ze+4),Ke=!1;r%2&&(i=i.times(s),bP(i.d,t)),r=pl(r/2),r!==0;)s=s.times(s),bP(s.d,t);return Ke=!0,e.s<0?new l(mr).div(i):$e(i,n)}}else if(a<0)throw Error(Rr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ke=!1,i=e.times(Wu(s,n+u)),Ke=!0,i=OC(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ot(i),n=Ja(i,r<=a.toExpNeg||r>=a.toExpPos)):(En(e,1,hl),t===void 0?t=a.rounding:En(t,0,8),i=$e(new a(i),e,t),r=ot(i),n=Ja(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(En(e,1,hl),t===void 0?t=n.rounding:En(t,0,8)),$e(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ot(e),r=e.constructor;return Ja(e,t<=r.toExpNeg||t>=r.toExpPos)};function SC(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Ke?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/ze),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/yt|0,l[a]%=yt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ke?$e(t,f):t}function En(e,t,r){if(e!==~~e||er)throw Error(Fa+e)}function gn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,d,p,v,m,g,y,b,x,S,w,O,P,E,j=n.constructor,_=n.s==i.s?1:-1,T=n.d,k=i.d;if(!n.s)return new j(n);if(!i.s)throw Error(Rr+"Division by zero");for(l=n.e-i.e,P=k.length,w=T.length,p=new j(_),v=p.d=[],u=0;k[u]==(T[u]||0);)++u;if(k[u]>(T[u]||0)&&--l,a==null?b=a=j.precision:o?b=a+(ot(n)-ot(i))+1:b=a,b<0)return new j(0);if(b=b/ze+2|0,u=0,P==1)for(c=0,k=k[0],b++;(u1&&(k=e(k,c),T=e(T,c),P=k.length,w=T.length),S=P,m=T.slice(0,P),g=m.length;g=yt/2&&++O;do c=0,s=t(k,m,P,g),s<0?(y=m[0],P!=g&&(y=y*yt+(m[1]||0)),c=y/O|0,c>1?(c>=yt&&(c=yt-1),f=e(k,c),d=f.length,g=m.length,s=t(f,m,d,g),s==1&&(c--,r(f,P16)throw Error(Rx+ot(e));if(!e.s)return new c(mr);for(Ke=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(ma(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(mr),c.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(Hn(i,r,s)),gn(o.d).slice(0,s)===gn(a.d).slice(0,s)){for(;u--;)a=$e(a.times(a),s);return c.precision=f,t==null?(Ke=!0,$e(a,f)):a}a=o}}function ot(e){for(var t=e.e*ze,r=e.d[0];r>=10;r/=10)t++;return t}function cv(e,t,r){if(t>e.LN10.sd())throw Ke=!0,r&&(e.precision=r),Error(Rr+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function yi(e){for(var t="";e--;)t+="0";return t}function Wu(e,t){var r,n,i,a,o,s,l,u,c,f=1,d=10,p=e,v=p.d,m=p.constructor,g=m.precision;if(p.s<1)throw Error(Rr+(p.s?"NaN":"-Infinity"));if(p.eq(mr))return new m(0);if(t==null?(Ke=!1,u=g):u=t,p.eq(10))return t==null&&(Ke=!0),cv(m,u);if(u+=d,m.precision=u,r=gn(v),n=r.charAt(0),a=ot(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=gn(p.d),n=r.charAt(0),f++;a=ot(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=cv(m,u+2,g).times(a+""),p=Wu(new m(n+"."+r.slice(1)),u-d).plus(l),m.precision=g,t==null?(Ke=!0,$e(p,g)):p;for(s=o=p=Hn(p.minus(mr),p.plus(mr),u),c=$e(p.times(p),u),i=3;;){if(o=$e(o.times(c),u),l=s.plus(Hn(o,new m(i),u)),gn(l.d).slice(0,u)===gn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(cv(m,u+2,g).times(a+""))),s=Hn(s,new m(f),u),m.precision=g,t==null?(Ke=!0,$e(s,g)):s;s=l,i+=2}}function gP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=pl(r/ze),e.d=[],n=(r+1)%ze,r<0&&(n+=ze),nih||e.e<-ih))throw Error(Rx+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=ze,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/ze),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=ze,i=n-ze+o}if(r!==void 0&&(a=ma(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/ma(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ot(e),f.length=1,t=t-a-1,f[0]=ma(10,(ze-t%ze)%ze),e.e=pl(-t/ze)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=ma(10,ze-n),f[c]=i>0?(u/ma(10,o-i)%ma(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==yt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=yt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ke&&(e.e>ih||e.e<-ih))throw Error(Rx+ot(e));return e}function PC(e,t){var r,n,i,a,o,s,l,u,c,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ke?$e(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(p/ze),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+yi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+yi(-i-1)+a,r&&(n=r-o)>0&&(a+=yi(n))):i>=o?(a+=yi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+yi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=yi(n))),e.s<0?"-"+a:a}function bP(e,t){if(e.length>t)return e.length=t,!0}function EC(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Fa+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return gP(o,a.toString())}else if(typeof a!="string")throw Error(Fa+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,qZ.test(a))gP(o,a);else throw Error(Fa+a)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=EC,i.config=i.set=VZ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Fa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fa+r+": "+n);return this}var Lx=EC(KZ);mr=new Lx(1);const Ce=Lx;function GZ(e){return JZ(e)||QZ(e)||XZ(e)||YZ()}function YZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XZ(e,t){if(e){if(typeof e=="string")return Mg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mg(e,t)}}function QZ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function JZ(e){if(Array.isArray(e))return Mg(e)}function Mg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,xP(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function hee(e){if(Array.isArray(e))return e}function kC(e){var t=Hu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function NC(e,t,r){if(e.lte(0))return new Ce(0);var n=Up.getDigitCount(e.toNumber()),i=new Ce(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ce(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ce(Math.ceil(l))}function pee(e,t,r){var n=1,i=new Ce(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ce(10).pow(Up.getDigitCount(e)-1),i=new Ce(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ce(Math.floor(e)))}else e===0?i=new Ce(Math.floor((t-1)/2)):r||(i=new Ce(Math.floor(e)));var o=Math.floor((t-1)/2),s=ree(tee(function(l){return i.add(new Ce(l-o).mul(n)).toNumber()}),Ig);return s(0,t)}function CC(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=NC(new Ce(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ce(0):(o=new Ce(e).add(t).div(2),o=o.sub(new Ce(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ce(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?CC(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ce(s).mul(a)),tickMax:o.add(new Ce(l).mul(a))})}function mee(e){var t=Hu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=kC([r,n]),l=Hu(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Rg(Ig(0,i-1).map(function(){return 1/0}))):[].concat(Rg(Ig(0,i-1).map(function(){return-1/0})),[c]);return r>n?Dg(f):f}if(u===c)return pee(u,i,a);var d=CC(u,c,o,a),p=d.step,v=d.tickMin,m=d.tickMax,g=Up.rangeStep(v,m.add(new Ce(.1).mul(p)),p);return r>n?Dg(g):g}function vee(e,t){var r=Hu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=kC([n,i]),s=Hu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=NC(new Ce(u).sub(l).div(c-1),a,0),d=[].concat(Rg(Up.rangeStep(new Ce(l),new Ce(u).sub(new Ce(.99).mul(f)),f)),[u]);return n>i?Dg(d):d}var yee=_C(mee),gee=_C(vee),bee="Invariant failed";function Za(e,t){throw new Error(bee)}var xee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function ah(){return ah=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,d=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Ut(f-c)!==Ut(d-f)){var v=[];if(Ut(d-f)===Ut(l[1]-l[0])){p=d;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{p=c;var g=d+l[1]-l[0];v[0]=Math.min(f,(g+f)/2),v[1]=Math.max(f,(g+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var b=Math.min(c,d),x=Math.max(c,d);if(t>(b+f)/2&&t<=(x+f)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Fx=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},qee=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(y&&y.length){var b=y[0].type.defaultProps,x=b!==void 0?et(et({},b),y[0].props):y[0].props,S=x.barSize,w=x[g];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:y[0],stackList:y.slice(1),barSize:ae(O)?void 0:Wt(O,n,0)})}}return o},Vee=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Wt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/l,v=o.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&p>0&&(d=!0,p*=.9,v=l*p);var m=(i-v)/2>>0,g={offset:m-u,size:0};c=o.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:d?p:w.barSize}},P=[].concat(OP(S),[O]);return g=P[P.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:g})}),P},f)}else{var y=Wt(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var b=(i-2*y-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;c=o.reduce(function(S,w,O){var P=[].concat(OP(S),[{item:w.item,position:{offset:y+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},f)}return c},Gee=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=DC({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,d=c.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&q(t[p]))return et(et({},t),{},Xo({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&q(t[v]))return et(et({},t),{},Xo({},v,t[v]+(d||0)))}return t},Yee=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},RC=function(t,r,n,i,a){var o=r.props.children,s=qt(o,ml).filter(function(u){return Yee(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ve(c,n);if(ae(f))return u;var d=Array.isArray(f)?[Bp(f),Fp(f)]:[f,f],p=l.reduce(function(v,m){var g=Ve(c,m,0),y=d[0]-Math.abs(Array.isArray(g)?g[0]:g),b=d[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},Xee=function(t,r,n,i,a){var o=r.map(function(s){return RC(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},LC=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&RC(t,l,u,i)||ru(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?Ut(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+u,value:f,offset:u}});return c.filter(function(f){return!Ic(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:i(f)+u,value:f,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,d){return{coordinate:i(f)+u,value:a?a[f]:f,index:d,offset:u}})},fv=new WeakMap,Pf=function(t,r){if(typeof r!="function")return t;fv.has(t)||fv.set(t,new WeakMap);var n=fv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},zC=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Lu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:eh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:tu(),realScaleType:"point"}:a==="category"?{scale:Lu(),realScaleType:"band"}:{scale:eh(),realScaleType:"linear"};if(Ya(i)){var l="scale".concat(Pp(i));return{scale:(yP[l]||tu)(),realScaleType:yP[l]?l:"point"}}return oe(i)?{scale:i}:{scale:tu(),realScaleType:"point"}},EP=1e-4,UC=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-EP,o=Math.max(i[0],i[1])+EP,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},Qee=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},ete=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},tte={sign:Zee,expand:xW,none:gs,silhouette:wW,wiggle:SW,positive:ete},rte=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=tte[n],o=bW().keys(i).value(function(s,l){return+Ve(s,l,0)}).order(fg).offset(a);return o(t)},nte=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var p,v=(p=d.type)!==null&&p!==void 0&&p.defaultProps?et(et({},d.type.defaultProps),d.props):d.props,m=v.stackId,g=v.hide;if(g)return f;var y=v[n],b=f[y]||{hasStack:!1,stackGroups:{}};if(pt(m)){var x=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[so("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return et(et({},f),{},Xo({},y,b))},l),c={};return Object.keys(u).reduce(function(f,d){var p=u[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,g){var y=p.stackGroups[g];return et(et({},m),{},Xo({},g,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:rte(t,y.items,a)}))},v)}return et(et({},f),{},Xo({},d,p))},c)},WC=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=yee(u,a,s);return t.domain([Bp(c),Fp(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),d=gee(f,a,s);return{niceTicks:d}}return null};function sh(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=$d(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Ve(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var AP=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Ve(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},ite=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},ate=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?et(et({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(pt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},ote=function(t){return t.reduce(function(r,n){return[Bp(n.concat([r[0]]).filter(q)),Fp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},HC=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=ote(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},jP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_P=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zg=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(jP.test(t[0])){var a=+jP.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(_P.test(t[1])){var o=+_P.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},lh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=hx(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},mte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=Wt(t.cx,o,o/2),f=Wt(t.cy,s,s/2),d=VC(o,s,n),p=Wt(t.innerRadius,d,0),v=Wt(t.outerRadius,d,d*.8),m=Object.keys(r);return m.reduce(function(g,y){var b=r[y],x=b.domain,S=b.reversed,w;if(ae(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[p,v]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,P=ute(O,2);l=P[0],u=P[1]}var E=zC(b,a),j=E.realScaleType,_=E.scale;_.domain(x).range(w),UC(_);var T=WC(_,$n($n({},b),{},{realScaleType:j})),k=$n($n($n({},b),T),{},{range:w,radius:v,realScaleType:j,scale:_,cx:c,cy:f,innerRadius:p,outerRadius:v,startAngle:l,endAngle:u});return $n($n({},g),{},qC({},y,k))},{})},vte=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},yte=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=vte({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:pte(u),angleInRadian:u}},gte=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},bte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},CP=function(t,r){var n=t.x,i=t.y,a=yte({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=gte(r),f=c.startAngle,d=c.endAngle,p=s,v;if(f<=d){for(;p>d;)p-=360;for(;p=f&&p<=d}else{for(;p>f;)p-=360;for(;p=d&&p<=f}return v?$n($n({},r),{},{radius:o,angle:bte(p,r)}):null},GC=function(t){return!A.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}var xte=["offset"];function wte(e){return Ete(e)||Pte(e)||Ote(e)||Ste()}function Ste(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ote(e,t){if(e){if(typeof e=="string")return Ug(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ug(e,t)}}function Pte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ete(e){if(Array.isArray(e))return Ug(e)}function Ug(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=p+b*o,S=m):i==="insideEnd"?(x=v-b*o,S=!m):i==="end"&&(x=v+b*o,S=m),S=y<=0?S:!S;var w=Le(u,c,g,x),O=Le(u,c,g,x+(S?1:-1)*359),P="M".concat(w.x,",").concat(w.y,` - A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`, - `).concat(O.x,",").concat(O.y),E=ae(t.id)?so("recharts-radial-line-"):t.id;return N.createElement("text",Yu({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),N.createElement("defs",null,N.createElement("path",{id:E,d:P})),N.createElement("textPath",{xlinkHref:"#".concat(E)},r))},Mte=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,d=(c+f)/2;if(i==="outside"){var p=Le(o,s,u+n,d),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=Le(o,s,g,d),b=y.x,x=y.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},Ite=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*i,p=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return ft(ft({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:v};return ft(ft({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return ft(ft({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if(a==="right"){var O={x:s+u+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return ft(ft({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var P=n?{width:u,height:c}:{};return a==="insideLeft"?ft({x:s+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},P):a==="insideRight"?ft({x:s+u-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},P):a==="insideTop"?ft({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:v},P):a==="insideBottom"?ft({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:p},P):a==="insideTopLeft"?ft({x:s+g,y:l+d,textAnchor:b,verticalAnchor:v},P):a==="insideTopRight"?ft({x:s+u-g,y:l+d,textAnchor:y,verticalAnchor:v},P):a==="insideBottomLeft"?ft({x:s+g,y:l+c-d,textAnchor:b,verticalAnchor:p},P):a==="insideBottomRight"?ft({x:s+u-g,y:l+c-d,textAnchor:y,verticalAnchor:p},P):nl(a)&&(q(a.x)||Sa(a.x))&&(q(a.y)||Sa(a.y))?ft({x:s+Wt(a.x,u),y:l+Wt(a.y,c),textAnchor:"end",verticalAnchor:"end"},P):ft({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Dte=function(t){return"cx"in t&&q(t.cx)};function bt(e){var t=e.offset,r=t===void 0?5:t,n=Ate(e,xte),i=ft({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,d=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!A.isValidElement(u)&&!oe(u))return null;if(A.isValidElement(u))return A.cloneElement(u,i);var p;if(oe(u)){if(p=A.createElement(u,i),A.isValidElement(p))return p}else p=Nte(i);var v=Dte(a),m=te(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return $te(i,p,m);var g=v?Mte(i):Ite(i);return N.createElement(Qa,Yu({className:ue("recharts-label",f)},m,g,{breakAll:d}),p)}bt.displayName="Label";var YC=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,p=t.top,v=t.left,m=t.width,g=t.height,y=t.clockWise,b=t.labelViewBox;if(b)return b;if(q(m)&&q(g)){if(q(f)&&q(d))return{x:f,y:d,width:m,height:g};if(q(p)&&q(v))return{x:p,y:v,width:m,height:g}}return q(f)&&q(d)?{x:f,y:d,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},Rte=function(t,r){return t?t===!0?N.createElement(bt,{key:"label-implicit",viewBox:r}):pt(t)?N.createElement(bt,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===bt?A.cloneElement(t,{key:"label-implicit",viewBox:r}):N.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):oe(t)?N.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):nl(t)?N.createElement(bt,Yu({viewBox:r},t,{key:"label-implicit"})):null:null},Lte=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=YC(t),o=qt(i,bt).map(function(l,u){return A.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Rte(t.label,r||a);return[s].concat(wte(o))};bt.parseViewBox=YC;bt.renderCallByParent=Lte;function Fte(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Bte=Fte;const zte=Ae(Bte);function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}var Ute=["valueAccessor"],Wte=["data","dataKey","clockWise","id","textBreakAll"];function Hte(e){return Gte(e)||Vte(e)||qte(e)||Kte()}function Kte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qte(e,t){if(e){if(typeof e=="string")return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}}function Vte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gte(e){if(Array.isArray(e))return Wg(e)}function Wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Zte=function(t){return Array.isArray(t.value)?zte(t.value):t.value};function Sn(e){var t=e.valueAccessor,r=t===void 0?Zte:t,n=DP(e,Ute),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=DP(n,Wte);return!i||!i.length?null:N.createElement(he,{className:"recharts-label-list"},i.map(function(c,f){var d=ae(a)?r(c,f):Ve(c&&c.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(f)};return N.createElement(bt,ch({},te(c,!0),u,p,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:bt.parseViewBox(ae(o)?c:IP(IP({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Sn.displayName="LabelList";function ere(e,t){return e?e===!0?N.createElement(Sn,{key:"labelList-implicit",data:t}):N.isValidElement(e)||oe(e)?N.createElement(Sn,{key:"labelList-implicit",data:t,content:e}):nl(e)?N.createElement(Sn,ch({data:t},e,{key:"labelList-implicit"})):null:null}function tre(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=qt(n,Sn).map(function(o,s){return A.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=ere(e.label,t);return[a].concat(Hte(i))}Sn.renderCallByParent=tre;function Qu(e){"@babel/helpers - typeof";return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, - `).concat(f.x,",").concat(f.y,` - `);if(i>0){var p=Le(r,n,i,o),v=Le(r,n,i,u);d+="L ".concat(v.x,",").concat(v.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},ore=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ut(c-u),d=Ef({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=d.circleTangency,v=d.lineTangency,m=d.theta,g=Ef({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),y=g.circleTangency,b=g.lineTangency,x=g.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-x;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):XC({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var w="M ".concat(v.x,",").concat(v.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` - `);if(i>0){var O=Ef({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=O.circleTangency,E=O.lineTangency,j=O.theta,_=Ef({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=_.circleTangency,k=_.lineTangency,M=_.theta,R=l?Math.abs(u-c):Math.abs(u-c)-j-M;if(R<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(k.x,",").concat(k.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,` - A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(P.x,",").concat(P.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},sre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},QC=function(t){var r=LP(LP({},sre),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o0&&Math.abs(c-f)<360?g=ore({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):g=XC({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),N.createElement("path",Hg({},te(r,!0),{className:p,d:g,role:"img"}))};function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;txre.call(e,t));function co(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Ore="__v",Pre="__o",Ere="_owner",{getOwnPropertyDescriptor:WP,keys:HP}=Object;function Are(e,t){return e.byteLength===t.byteLength&&fh(new Uint8Array(e),new Uint8Array(t))}function jre(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function _re(e,t){return e.byteLength===t.byteLength&&fh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Tre(e,t){return co(e.getTime(),t.getTime())}function kre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Nre(e,t){return e===t}function KP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const d=o.value,p=s.value;if(r.equals(d[0],p[0],l,f,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const Cre=co;function $re(e,t,r){const n=HP(e);let i=n.length;if(HP(t).length!==i)return!1;for(;i-- >0;)if(!t$(e,t,r,n[i]))return!1;return!0}function Rl(e,t,r){const n=UP(e);let i=n.length;if(UP(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!t$(e,t,r,a)||(o=WP(e,a),s=WP(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Mre(e,t){return co(e.valueOf(),t.valueOf())}function Ire(e,t){return e.source===t.source&&e.flags===t.flags}function qP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function fh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Dre(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function t$(e,t,r,n){return(n===Ere||n===Pre||n===Ore)&&(e.$$typeof||t.$$typeof)?!0:Sre(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const Rre="[object ArrayBuffer]",Lre="[object Arguments]",Fre="[object Boolean]",Bre="[object DataView]",zre="[object Date]",Ure="[object Error]",Wre="[object Map]",Hre="[object Number]",Kre="[object Object]",qre="[object RegExp]",Vre="[object Set]",Gre="[object String]",Yre={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Xre="[object URL]",Qre=Object.prototype.toString;function Jre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:v}){return function(g,y,b){if(g===y)return!0;if(g==null||y==null)return!1;const x=typeof g;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?s(g,y,b):x==="function"?a(g,y,b):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,b);if(Array.isArray(g))return t(g,y,b);if(S===Date)return n(g,y,b);if(S===RegExp)return c(g,y,b);if(S===Map)return o(g,y,b);if(S===Set)return f(g,y,b);const w=Qre.call(g);if(w===zre)return n(g,y,b);if(w===qre)return c(g,y,b);if(w===Wre)return o(g,y,b);if(w===Vre)return f(g,y,b);if(w===Kre)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,b);if(w===Xre)return p(g,y,b);if(w===Ure)return i(g,y,b);if(w===Lre)return l(g,y,b);if(Yre[w])return d(g,y,b);if(w===Rre)return e(g,y,b);if(w===Bre)return r(g,y,b);if(w===Fre||w===Hre||w===Gre)return u(g,y,b);if(v){let O=v[w];if(!O){const P=wre(g);P&&(O=v[P])}if(O)return O(g,y,b)}return!1}}function Zre({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Are,areArraysEqual:r?Rl:jre,areDataViewsEqual:_re,areDatesEqual:Tre,areErrorsEqual:kre,areFunctionsEqual:Nre,areMapsEqual:r?dv(KP,Rl):KP,areNumbersEqual:Cre,areObjectsEqual:r?Rl:$re,arePrimitiveWrappersEqual:Mre,areRegExpsEqual:Ire,areSetsEqual:r?dv(qP,Rl):qP,areTypedArraysEqual:r?dv(fh,Rl):fh,areUrlsEqual:Dre,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=jf(n.areArraysEqual),a=jf(n.areMapsEqual),o=jf(n.areObjectsEqual),s=jf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function ene(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function tne({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const rne=na();na({strict:!0});na({circular:!0});na({circular:!0,strict:!0});na({createInternalComparator:()=>co});na({strict:!0,createInternalComparator:()=>co});na({circular:!0,createInternalComparator:()=>co});na({circular:!0,createInternalComparator:()=>co,strict:!0});function na(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=Zre(e),o=Jre(a),s=r?r(o):ene(o);return tne({circular:t,comparator:o,createState:n,equals:s,strict:i})}function nne(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function VP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):nne(i)};requestAnimationFrame(n)}function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function ine(e){return lne(e)||sne(e)||one(e)||ane()}function ane(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function one(e,t){if(e){if(typeof e=="string")return GP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GP(e,t)}}function GP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},m=function(y){for(var b=y>1?1:y,x=b,S=0;S<8;++S){var w=f(x)-b,O=p(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var p=-(c-f)*n,v=d*a,m=d+(p-v)*s/1e3,g=d*s/1e3+c;return Math.abs(g-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fne(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function hv(e){return Wne(e)||Une(e)||zne(e)||Bne()}function Bne(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zne(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function Une(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wne(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ph(e){return ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ph(e)}var on=function(e){Gne(r,e);var t=Yne(r);function r(n,i){var a;Hne(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(e0(a)),a.changeStyle=a.changeStyle.bind(e0(a)),!s||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:c}),Zg(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof d=="function")return a.state={style:u},Zg(a);a.state={style:l?Hl({},l,u):u}}else a.state={style:{}};return a}return qne(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,d=this.state.style;if(s){if(!o){var p={style:l?Hl({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(p);return}if(!(rne(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&d){var g={style:l?Hl({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(g)}this.runAnimation(Wr(Wr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,d=i.onAnimationStart,p=Dne(o,s,Ene(u),l,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([d,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,p=function(m,g,y){if(y===0)return m;var b=g.duration,x=g.easing,S=x===void 0?"ease":x,w=g.style,O=g.properties,P=g.onAnimationEnd,E=y>0?o[y-1]:g,j=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(hv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:b,easing:S}),b]);var _=QP(j,b,S),T=Wr(Wr(Wr({},E.style),w),{},{transition:_});return[].concat(hv(m),[T,b,P]).filter(hne)};return this.manager.start([l].concat(hv(o.reduce(p,[c,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=une());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,d=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var m=s?Hl({},s,l):l,g=QP(Object.keys(m),o,u);v.start([c,a,Wr(Wr({},m),{},{transition:g}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Lne(i,Rne),u=A.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(p){var v=p.props,m=v.style,g=m===void 0?{}:m,y=v.className,b=A.cloneElement(p,Wr(Wr({},l),{},{style:Wr(Wr({},g),c),className:y}));return b};return u===1?f(A.Children.only(a)):N.createElement("div",null,A.Children.map(a,function(d){return f(d)}))}}]),r}(A.PureComponent);on.displayName="Animate";on.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};on.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function mh(){return mh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],d=0,p=4;do?o:a[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, - `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, - `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, - `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` - L `).concat(t+n-l*v,",").concat(r,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` - L `).concat(t+n,",").concat(r+i-s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` - L `).concat(t+l*v,",").concat(r+i,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},aie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=d}return!1},oie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Bx=function(t){var r=aE(aE({},oie),t),n=A.useRef(),i=A.useState(-1),a=Qne(i,2),o=a[0],s=a[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,p=r.className,v=r.animationEasing,m=r.animationDuration,g=r.animationBegin,y=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=ue("recharts-rectangle",p);return b?N.createElement(on,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:b},function(S){var w=S.width,O=S.height,P=S.x,E=S.y;return N.createElement(on,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:v},N.createElement("path",mh({},te(r,!0),{className:x,d:oE(P,E,w,O,d),ref:n})))}):N.createElement("path",mh({},te(r,!0),{className:x,d:oE(l,u,c,f,d)}))},sie=["points","className","baseLinePoints","connectNulls"];function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sE(e){return hie(e)||die(e)||fie(e)||cie()}function cie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fie(e,t){if(e){if(typeof e=="string")return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}function die(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hie(e){if(Array.isArray(e))return t0(e)}function t0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){lE(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),lE(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},iu=function(t,r){var n=pie(t);r&&(n=[n.reduce(function(a,o){return[].concat(sE(a),sE(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},mie=function(t,r,n){var i=iu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(iu(r.reverse(),n).slice(1))},vie=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=lie(t,sie);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=mie(r,i,a);return N.createElement("g",{className:s},N.createElement("path",Ro({},te(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?N.createElement("path",Ro({},te(o,!0),{fill:"none",d:iu(r,a)})):null,l?N.createElement("path",Ro({},te(o,!0),{fill:"none",d:iu(i,a)})):null)}var c=iu(r,a);return N.createElement("path",Ro({},te(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function r0(){return r0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Pie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Eie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,p=d===void 0?0:d,v=t.className,m=Sie(t,yie),g=gie({x:n,y:a,top:s,left:u,width:f,height:p},m);return!q(n)||!q(a)||!q(f)||!q(p)||!q(s)||!q(u)?null:N.createElement("path",n0({},te(g,!0),{className:ue("recharts-cross",v),d:Pie(n,a,f,p,s,u)}))},Aie=Lp,jie=bC,_ie=jn;function Tie(e,t){return e&&e.length?Aie(e,_ie(t),jie):void 0}var kie=Tie;const Nie=Ae(kie);var Cie=Lp,$ie=jn,Mie=xC;function Iie(e,t){return e&&e.length?Cie(e,$ie(t),Mie):void 0}var Die=Iie;const Rie=Ae(Die);var Lie=["cx","cy","angle","ticks","axisLine"],Fie=["ticks","tick","angle","tickFormatter","stroke"];function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dE(e,t){for(var r=0;rmE?o=i==="outer"?"start":"end":a<-mE?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ua(ua({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return N.createElement(Wp,va({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return Le(i,a,o,d.coordinate)});return N.createElement(vie,va({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=te(this.props,!1),f=te(o,!1),d=ua(ua({},c),{},{fill:"none"},te(s,!1)),p=a.map(function(v,m){var g=n.getTickLineCoord(v),y=n.getTickTextAnchor(v),b=ua(ua(ua({textAnchor:y},c),{},{stroke:"none",fill:u},f),{},{index:m,payload:v,x:g.x2,y:g.y2});return N.createElement(he,va({className:ue("recharts-polar-angle-axis-tick",GC(o)),key:"tick-".concat(v.coordinate)},Yi(n.props,v,m)),s&&N.createElement("line",va({className:"recharts-polar-angle-axis-tick-line"},d,g)),o&&t.renderTickItem(o,b,l?l(v.value,m):v.value))});return N.createElement(he,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:N.createElement(he,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return N.isValidElement(n)?o=N.cloneElement(n,i):oe(n)?o=n(i):o=N.createElement(Qa,va({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(A.PureComponent);qp(Vp,"displayName","PolarAngleAxis");qp(Vp,"axisType","angleAxis");qp(Vp,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var rae=mN,nae=rae(Object.getPrototypeOf,Object),iae=nae,aae=ii,oae=iae,sae=ai,lae="[object Object]",uae=Function.prototype,cae=Object.prototype,d$=uae.toString,fae=cae.hasOwnProperty,dae=d$.call(Object);function hae(e){if(!sae(e)||aae(e)!=lae)return!1;var t=oae(e);if(t===null)return!0;var r=fae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&d$.call(r)==dae}var pae=hae;const mae=Ae(pae);var vae=ii,yae=ai,gae="[object Boolean]";function bae(e){return e===!0||e===!1||yae(e)&&vae(e)==gae}var xae=bae;const wae=Ae(xae);function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:m,animationEasing:v,isActive:y},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,P=x.x,E=x.y;return N.createElement(on,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:v},N.createElement("path",gh({},te(r,!0),{className:b,d:bE(P,E,S,w,O),ref:n})))}):N.createElement("g",null,N.createElement("path",gh({},te(r,!0),{className:b,d:bE(l,u,c,f,d)})))},Cae=["option","shapeType","propTransformer","activeClassName","isActive"];function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function $ae(e,t){if(e==null)return{};var r=Mae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t0?gr(x,"paddingAngle",0):0;if(w){var P=At(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Me(Me({},x),{},{startAngle:b+O,endAngle:b+P(m)+O});g.push(E),b=E.endAngle}else{var j=x.endAngle,_=x.startAngle,T=At(0,j-_),k=T(m),M=Me(Me({},x),{},{startAngle:b+O,endAngle:b+k+O});g.push(M),b=M.endAngle}}),N.createElement(he,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!dl(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,p=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(c)||!q(f)||!q(d))return null;var m=ue("recharts-pie",s);return N.createElement(he,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(o),bt.renderCallByParent(this.props,null,!1),(!p||v)&&Sn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=g-b*p-x,w=i.reduce(function(E,j){var _=Ve(j,y,0);return E+(q(_)?_:0)},0),O;if(w>0){var P;O=i.map(function(E,j){var _=Ve(E,y,0),T=Ve(E,c,j),k=(q(_)?_:0)/w,M;j?M=P.endAngle+Ut(m)*l*(_!==0?1:0):M=o;var R=M+Ut(m)*((_!==0?p:0)+k*S),I=(M+R)/2,L=(v.innerRadius+v.outerRadius)/2,z=[{name:T,value:_,payload:E,dataKey:y,type:d}],C=Le(v.cx,v.cy,L,I);return P=Me(Me(Me({percent:k,cornerRadius:a,name:T,tooltipPayload:z,midAngle:I,middleRadius:L,tooltipPosition:C},E),v),{},{value:Ve(E,y),startAngle:M,endAngle:R,payload:E,paddingAngle:Ut(m)*l}),P})}return Me(Me({},v),{},{sectors:O,data:i})});var toe=Math.ceil,roe=Math.max;function noe(e,t,r,n){for(var i=-1,a=roe(toe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var ioe=noe,aoe=MN,PE=1/0,ooe=17976931348623157e292;function soe(e){if(!e)return e===0?e:0;if(e=aoe(e),e===PE||e===-PE){var t=e<0?-1:1;return t*ooe}return e===e?e:0}var m$=soe,loe=ioe,uoe=Np,pv=m$;function coe(e){return function(t,r,n){return n&&typeof n!="number"&&uoe(t,r,n)&&(r=n=void 0),t=pv(t),r===void 0?(r=t,t=0):r=pv(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),dr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),dr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),dr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),dr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),dr(n,"handleSlideDragStart",function(i){var a=TE(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Poe(t,e),xoe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:p-p%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Ve(a[n],s,n);return oe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,p=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==d||g.endIndex!==p)&&v&&v(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=TE(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,p=c.travellerWidth,v=c.onChange,m=c.gap,g=c.data,y={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-p-u):b<0&&(b=Math.max(b,f-u)),y[o]=u+b;var x=this.getIndex(y),S=x.startIndex,w=x.endIndex,O=function(){var E=g.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(dr(dr({},o,u+b),"brushMoveStartX",n.pageX),function(){v&&O()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var p=s[d];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(dr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return N.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=A.Children.only(u);return f?N.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,p=l.ariaLabel,v=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(n,this.props.x),b=mv(mv({},te(this.props,!1)),{},{x:y,y:u,width:c,height:f}),x=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[g])===null||o===void 0?void 0:o.name);return N.createElement(he,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return N.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,p=5,v={pointerEvents:"none",fill:u};return N.createElement(he,{className:"recharts-brush-texts"},N.createElement(Qa,Oh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-p,y:o+s/2},v),this.getTextOfTick(i)),N.createElement(Qa,Oh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,p=d.startX,v=d.endX,m=d.isTextActive,g=d.isSlideMoving,y=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(c)||u<=0||c<=0)return null;var x=ue("recharts-brush",a),S=N.Children.count(o)===1,w=goe("userSelect","none");return N.createElement(he,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||g||y||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return N.createElement(N.Fragment,null,N.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),N.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),N.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return N.isValidElement(n)?a=N.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return mv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Aoe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(A.PureComponent);dr(Cs,"displayName","Brush");dr(Cs,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var joe=dx;function _oe(e,t){var r;return joe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Toe=_oe,koe=sN,Noe=jn,Coe=Toe,$oe=cr,Moe=Np;function Ioe(e,t,r){var n=$oe(e)?koe:Coe;return r&&Moe(e,t,r)&&(t=void 0),n(e,Noe(t))}var Doe=Ioe;const Roe=Ae(Doe);var On=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},kE=TN;function Loe(e,t,r){t=="__proto__"&&kE?kE(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Foe=Loe,Boe=Foe,zoe=jN,Uoe=jn;function Woe(e,t){var r={};return t=Uoe(t),zoe(e,function(n,i,a){Boe(r,i,t(n,i,a))}),r}var Hoe=Woe;const Koe=Ae(Hoe);function qoe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function use(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cse(e,t){var r=e.x,n=e.y,i=lse(e,ise),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),d=parseInt(f,10);return Ll(Ll(Ll(Ll(Ll({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function CE(e){return N.createElement(xh,l0({shapeType:"rectangle",propTransformer:cse,activeClassName:"recharts-active-bar"},e))}var fse=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||N8(n);return a?t(n,i):(a||Za(),r)}},dse=["value","background"],x$;function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function hse(e,t){if(e==null)return{};var r=pse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(R)0&&(M=Math.min((re||0)-(R[be-1]||0),M))}),Number.isFinite(M)){var I=M/k,L=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(P=I*L/2),m.padding==="no-gap"){var z=Wt(t.barCategoryGap,I*L),C=I*L/2;P=C-z-(C-z)/L*z}}}i==="xAxis"?E=[n.left+(x.left||0)+(P||0),n.left+n.width-(x.right||0)-(P||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(P||0),n.top+n.height-(x.bottom||0)-(P||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=zC(m,a,d),W=F.scale,V=F.realScaleType;W.domain(y).range(E),UC(W);var H=WC(W,Yr(Yr({},m),{},{realScaleType:V}));i==="xAxis"?(T=g==="top"&&!S||g==="bottom"&&S,j=n.left,_=f[O]-T*m.height):i==="yAxis"&&(T=g==="left"&&!S||g==="right"&&S,j=f[O]-T*m.width,_=n.top);var Y=Yr(Yr(Yr({},m),H),{},{realScaleType:V,x:j,y:_,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=lh(Y,H),!m.hide&&i==="xAxis"?f[O]+=(T?-1:1)*Y.height:m.hide||(f[O]+=(T?-1:1)*Y.width),Yr(Yr({},p),{},Xp({},v,Y))},{})},E$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Ese=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return E$({x:r,y:n},{x:i,y:a})},A$=function(){function e(t){Sse(this,e),this.scale=t}return Ose(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Xp(A$,"EPS",1e-4);var zx=function(t){var r=Object.keys(t).reduce(function(n,i){return Yr(Yr({},n),{},Xp({},i,A$.create(t[i])))},{});return Yr(Yr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Koe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return b$(i,function(a,o){return r[o].isInRange(a)})}})};function Ase(e){return(e%180+180)%180}var jse=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Ase(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Cse=Nse,$se=m$;function Mse(e){var t=$se(e),r=t%1;return t===t?r?t-r:t:0}var Ise=Mse,Dse=wN,Rse=jn,Lse=Ise,Fse=Math.max;function Bse(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Lse(r);return i<0&&(i=Fse(n+i,0)),Dse(e,Rse(t),i)}var zse=Bse,Use=Cse,Wse=zse,Hse=Use(Wse),Kse=Hse;const qse=Ae(Kse);var Vse=RU(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Ux=A.createContext(void 0),Wx=A.createContext(void 0),j$=A.createContext(void 0),_$=A.createContext({}),T$=A.createContext(void 0),k$=A.createContext(0),N$=A.createContext(0),RE=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=Vse(a);return N.createElement(Ux.Provider,{value:n},N.createElement(Wx.Provider,{value:i},N.createElement(_$.Provider,{value:a},N.createElement(j$.Provider,{value:c},N.createElement(T$.Provider,{value:o},N.createElement(k$.Provider,{value:u},N.createElement(N$.Provider,{value:l},s)))))))},Gse=function(){return A.useContext(T$)},C$=function(t){var r=A.useContext(Ux);r==null&&Za();var n=r[t];return n==null&&Za(),n},Yse=function(){var t=A.useContext(Ux);return xi(t)},Xse=function(){var t=A.useContext(Wx),r=qse(t,function(n){return b$(n.domain,Number.isFinite)});return r||xi(t)},$$=function(t){var r=A.useContext(Wx);r==null&&Za();var n=r[t];return n==null&&Za(),n},Qse=function(){var t=A.useContext(j$);return t},Jse=function(){return A.useContext(_$)},Hx=function(){return A.useContext(N$)},Kx=function(){return A.useContext(k$)};function Ms(e){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}function Zse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ele(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Ile(e,t){return B$(e,t+1)}function Dle(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:B$(n,u)};var m=l,g,y=function(){return g===void 0&&(g=r(v,m)),g},b=v.coordinate,x=l===0||kh(e,b,y,c,s);x||(l=0,c=o,u+=1),x&&(c=b+e*(y()/2+i),l+=u)},d;u<=a.length;)if(d=f(),d)return d.v;return[]}function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function KE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t0?p.coordinate-g*e:p.coordinate})}else a[d]=p=Nt(Nt({},p),{},{tickCoord:p.coordinate});var y=kh(e,p.tickCoord,m,s,l);y&&(l=p.tickCoord-e*(m()/2+i),a[d]=Nt(Nt({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function zle(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=Nt(Nt({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var p=kh(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Nt(Nt({},c),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Nt(Nt({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Nt(Nt({},x),{},{tickCoord:x.coordinate});var P=kh(e,x.tickCoord,w,l,u);P&&(l=x.tickCoord+e*(w()/2+i),o[b]=Nt(Nt({},x),{},{isShow:!0}))},g=0;g=2?Ut(i[1].coordinate-i[0].coordinate):1,y=Mle(a,g,p);return l==="equidistantPreserveStart"?Dle(g,y,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=zle(g,y,m,i,o,l==="preserveStartEnd"):d=Ble(g,y,m,i,o),d.filter(function(b){return b.isShow}))}var Ule=["viewBox"],Wle=["viewBox"],Hle=["ticks"];function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VE(e,t){for(var r=0;r0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:N.createElement(he,{className:ue("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),bt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ue(i.className,"recharts-cartesian-axis-tick-value");return N.isValidElement(n)?o=N.cloneElement(n,ct(ct({},i),{},{className:s})):oe(n)?o=n(ct(ct({},i),{},{className:s})):o=N.createElement(Qa,Fo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(A.Component);Yx(vl,"displayName","CartesianAxis");Yx(vl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Zle=["x1","y1","x2","y2","key"],eue=["offset"];function eo(e){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function GE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var aue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return N.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function W$(e,t){var r;if(N.isValidElement(e))r=N.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=YE(t,Zle),u=te(l,!1);u.offset;var c=YE(u,eue);r=N.createElement("line",Ea({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function oue(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return W$(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function sue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return W$(i,u)});return N.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function lue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],m=v?i+o-d:c[p+1]-d;if(m<=0)return null;var g=p%t.length;return N.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function uue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==c[0]&&c.unshift(0);var f=c.map(function(d,p){var v=!c[p+1],m=v?a+s-d:c[p+1]-d;if(m<=0)return null;var g=p%n.length;return N.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:m,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return N.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var cue=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return BC(Gx(Mt(Mt(Mt({},vl.defaultProps),n),{},{ticks:zn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},fue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return BC(Gx(Mt(Mt(Mt({},vl.defaultProps),n),{},{ticks:zn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},bo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ls(e){var t,r,n,i,a,o,s=Hx(),l=Kx(),u=Jse(),c=Mt(Mt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:bo.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:bo.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:bo.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:bo.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:bo.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:bo.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),f=c.x,d=c.y,p=c.width,v=c.height,m=c.syncWithTicks,g=c.horizontalValues,y=c.verticalValues,b=Yse(),x=Xse();if(!q(p)||p<=0||!q(v)||v<=0||!q(f)||f!==+f||!q(d)||d!==+d)return null;var S=c.verticalCoordinatesGenerator||cue,w=c.horizontalCoordinatesGenerator||fue,O=c.horizontalPoints,P=c.verticalPoints;if((!O||!O.length)&&oe(w)){var E=g&&g.length,j=w({yAxis:x?Mt(Mt({},x),{},{ticks:E?g:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);tn(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(eo(j),"]")),Array.isArray(j)&&(O=j)}if((!P||!P.length)&&oe(S)){var _=y&&y.length,T=S({xAxis:b?Mt(Mt({},b),{},{ticks:_?y:b.ticks}):void 0,width:s,height:l,offset:u},_?!0:m);tn(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(eo(T),"]")),Array.isArray(T)&&(P=T)}return N.createElement("g",{className:"recharts-cartesian-grid"},N.createElement(aue,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),N.createElement(oue,Ea({},c,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),N.createElement(sue,Ea({},c,{offset:u,verticalPoints:P,xAxis:b,yAxis:x})),N.createElement(lue,Ea({},c,{horizontalPoints:O})),N.createElement(uue,Ea({},c,{verticalPoints:P})))}Ls.displayName="CartesianGrid";var due=["type","layout","connectNulls","ref"],hue=["key"];function Fs(e){"@babel/helpers - typeof";return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function XE(e,t){if(e==null)return{};var r=pue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){p=[].concat(xo(l.slice(0,v)),[f-m]);break}var g=p.length%2===0?[0,d]:[d];return[].concat(xo(t.repeat(l,c)),xo(p),g).map(function(y){return"".concat(y,"px")}).join(", ")}),Xr(r,"id",so("recharts-line-")),Xr(r,"pathRef",function(o){r.mainCurve=o}),Xr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Xr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Pue(t,e),xue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=qt(c,ml);if(!f)return null;var d=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:Ve(m.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return N.createElement(he,p,f.map(function(v){return N.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=te(this.props,!1),d=te(l,!0),p=u.map(function(m,g){var y=fr(fr(fr({key:"dot-".concat(g),r:3},f),d),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return N.createElement(he,ou({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=XE(s,due),d=fr(fr(fr({},te(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return N.createElement(Zu,ou({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,g=o.height,y=this.state,b=y.prevPoints,x=y.totalLength;return N.createElement(on,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(b){var O=b.length/s.length,P=s.map(function(k,M){var R=Math.floor(M*O);if(b[R]){var I=b[R],L=At(I.x,k.x),z=At(I.y,k.y);return fr(fr({},k),{},{x:L(w),y:z(w)})}if(v){var C=At(m*2,k.x),F=At(g/2,k.y);return fr(fr({},k),{},{x:C(w),y:F(w)})}return fr(fr({},k),{},{x:k.x,y:k.y})});return a.renderCurveStatically(P,n,i)}var E=At(0,x),j=E(w),_;if(l){var T="".concat(l).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});_=a.getStrokeDasharray(j,x,T)}else _=a.generateSimpleStrokeDasharray(x,j);return a.renderCurveStatically(s,n,i,{strokeDasharray:_})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!dl(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,d=i.left,p=i.width,v=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,b=s.length===1,x=ue("recharts-line",l),S=u&&u.allowDataOverflow,w=c&&c.allowDataOverflow,O=S||w,P=ae(g)?this.id:g,E=(n=te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=E.r,_=j===void 0?3:j,T=E.strokeWidth,k=T===void 0?2:T,M=H8(o)?o:{},R=M.clipDot,I=R===void 0?!0:R,L=_*2+k;return N.createElement(he,{className:x},S||w?N.createElement("defs",null,N.createElement("clipPath",{id:"clipPath-".concat(P)},N.createElement("rect",{x:S?d:d-p/2,y:w?f:f-v/2,width:S?p:p*2,height:w?v:v*2})),!I&&N.createElement("clipPath",{id:"clipPath-dots-".concat(P)},N.createElement("rect",{x:d-L/2,y:f-L/2,width:p+L,height:v+L}))):null,!b&&this.renderCurve(O,P),this.renderErrorBar(O,P),(b||o)&&this.renderDots(O,I,P),(!m||y)&&Sn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(xo(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Due(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Rue(e){var t=e.option,r=e.isActive,n=Iue(e,Mue);return typeof t=="string"?A.createElement(xh,su({option:A.createElement(_p,su({type:t},n)),isActive:r,shapeType:"symbols"},n)):A.createElement(xh,su({option:t,isActive:r,shapeType:"symbols"},n))}function zs(e){"@babel/helpers - typeof";return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(e)}function lu(){return lu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mce(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function c2(e){return e==="number"?[0,"auto"]:void 0}var T0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=rm(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;d=$d(p,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(Ks(l),[KC(u,d)]):l},[])},oA=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=qce(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=Kee(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=T0(t,r,c,f),p=Vce(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:p}}return null},Gce=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,p=FC(c,a);return n.reduce(function(v,m){var g,y=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,b=y.type,x=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,O=y.scale,P=y.ticks,E=y.includeHidden,j=y[o];if(v[j])return v;var _=rm(t.data,{graphicalItems:i.filter(function(H){var Y,re=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return re===j}),dataStartIndex:l,dataEndIndex:u}),T=_.length,k,M,R;xce(y.domain,S,b)&&(k=zg(y.domain,null,S),p&&(b==="number"||O!=="auto")&&(R=ru(_,x,"category")));var I=c2(b);if(!k||k.length===0){var L,z=(L=y.domain)!==null&&L!==void 0?L:I;if(x){if(k=ru(_,x,b),b==="category"&&p){var C=$8(k);w&&C?(M=k,k=Sh(0,T)):w||(k=TP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(Ks(H),[Y])},[]))}else if(b==="category")w?k=k.filter(function(H){return H!==""&&!ae(H)}):k=TP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(Ks(H),[Y])},[]);else if(b==="number"){var F=Xee(_,i.filter(function(H){var Y,re,be=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],We="hide"in H.props?H.props.hide:(re=H.type.defaultProps)===null||re===void 0?void 0:re.hide;return be===j&&(E||!We)}),x,a,c);F&&(k=F)}p&&(b==="number"||O!=="auto")&&(R=ru(_,x,"category"))}else p?k=Sh(0,T):s&&s[j]&&s[j].hasStack&&b==="number"?k=d==="expand"?[0,1]:HC(s[j].stackGroups,l,u):k=LC(_,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],re="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===j&&(E||!re)}),b,c,!0);if(b==="number")k=A0(f,k,j,a,P),z&&(k=zg(z,k,S));else if(b==="category"&&z){var W=z,V=k.every(function(H){return W.indexOf(H)>=0});V&&(k=W)}}return B(B({},v),{},ie({},j,B(B({},y),{},{axisType:a,domain:k,categoricalDomain:R,duplicateDomain:M,originalDomain:(g=y.domain)!==null&&g!==void 0?g:I,isCategorical:p,layout:c})))},{})},Yce=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=rm(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=d.length,v=FC(c,a),m=-1;return n.reduce(function(g,y){var b=y.type.defaultProps!==void 0?B(B({},y.type.defaultProps),y.props):y.props,x=b[o],S=c2("number");if(!g[x]){m++;var w;return v?w=Sh(0,p):s&&s[x]&&s[x].hasStack?(w=HC(s[x].stackGroups,l,u),w=A0(f,w,x,a)):(w=zg(S,LC(d,n.filter(function(O){var P,E,j=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],_="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return j===x&&!_}),"number",c),i.defaultProps.allowDataOverflow),w=A0(f,w,x,a)),B(B({},g),{},ie({},x,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:gr(Hce,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:v,layout:c})))}return g},{})},Xce=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),d=qt(c,a),p={};return d&&d.length?p=Gce(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=Yce(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},Qce=function(t){var r=xi(t),n=zn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:hx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:lh(r,n)}},sA=function(t){var r=t.children,n=t.defaultShowTooltip,i=pr(r,Cs),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Jce=function(t){return!t||!t.length?!1:t.some(function(r){var n=Wn(r&&r.type);return n&&n.indexOf("Bar")>=0})},lA=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Zce=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},p=pr(f,Cs),v=pr(f,rn),m=Object.keys(l).reduce(function(w,O){var P=l[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,w[E]+P.width)):w},{left:d.left||0,right:d.right||0}),g=Object.keys(o).reduce(function(w,O){var P=o[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,gr(w,"".concat(E))+P.height)):w},{top:d.top||0,bottom:d.bottom||0}),y=B(B({},g),m),b=y.bottom;p&&(y.bottom+=p.props.height||Cs.defaultProps.height),v&&r&&(y=Gee(y,i,n,r));var x=u-y.left-y.right,S=c-y.top-y.bottom;return B(B({brushBottom:b},y),{},{width:Math.max(x,0),height:Math.max(S,0)})},efe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Xx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(y,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,P=b.dataStartIndex,E=b.dataEndIndex,j=y.barSize,_=y.layout,T=y.barGap,k=y.barCategoryGap,M=y.maxBarSize,R=lA(_),I=R.numericAxisName,L=R.cateAxisName,z=Jce(x),C=[];return x.forEach(function(F,W){var V=rm(y.data,{graphicalItems:[F],dataStartIndex:P,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,re=H.maxBarSize,be=H["".concat(I,"Id")],We=H["".concat(L,"Id")],Oe={},St=l.reduce(function(ia,aa){var sm=b["".concat(aa.axisType,"Map")],aw=H["".concat(aa.axisType,"Id")];sm&&sm[aw]||aa.axisType==="zAxis"||Za();var ow=sm[aw];return B(B({},ia),{},ie(ie({},aa.axisType,ow),"".concat(aa.axisType,"Ticks"),zn(ow)))},Oe),G=St[L],se=St["".concat(L,"Ticks")],le=S&&S[be]&&S[be].hasStack&&ate(F,S[be].stackGroups),U=Wn(F.type).indexOf("Bar")>=0,Qe=lh(G,se),ye=[],st=z&&qee({barSize:j,stackGroups:S,totalSize:efe(St,L)});if(U){var lt,Yt,li=ae(re)?M:re,ho=(lt=(Yt=lh(G,se,!0))!==null&&Yt!==void 0?Yt:li)!==null&<!==void 0?lt:0;ye=Vee({barGap:T,barCategoryGap:k,bandSize:ho!==Qe?ho:Qe,sizeList:st[We],maxBarSize:li}),ho!==Qe&&(ye=ye.map(function(ia){return B(B({},ia),{},{position:B(B({},ia.position),{},{offset:ia.position.offset-ho/2})})}))}var Kc=F&&F.type&&F.type.getComposedData;Kc&&C.push({props:B(B({},Kc(B(B({},St),{},{displayedData:V,props:y,dataKey:Y,item:F,bandSize:Qe,barPosition:ye,offset:w,stackedData:le,layout:_,dataStartIndex:P,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},I,St[I]),L,St[L]),"animationId",O)),childIndex:V8(F,y.children),item:F})}),C},p=function(y,b){var x=y.props,S=y.dataStartIndex,w=y.dataEndIndex,O=y.updateId;if(!OS({props:x}))return null;var P=x.children,E=x.layout,j=x.stackOffset,_=x.data,T=x.reverseStackOrder,k=lA(E),M=k.numericAxisName,R=k.cateAxisName,I=qt(P,n),L=nte(_,I,"".concat(M,"Id"),"".concat(R,"Id"),j,T),z=l.reduce(function(H,Y){var re="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},re,Xce(x,B(B({},Y),{},{graphicalItems:I,stackGroups:Y.axisType===M&&L,dataStartIndex:S,dataEndIndex:w}))))},{}),C=Zce(B(B({},z),{},{props:x,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(H){z[H]=c(x,z[H],C,H.replace("Map",""),r)});var F=z["".concat(R,"Map")],W=Qce(F),V=d(x,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:L,offset:C}));return B(B({formattedGraphicalItems:V,graphicalItems:I,offset:C,stackGroups:L},W),z)},v=function(g){function y(b){var x,S,w;return $ce(this,y),w=Dce(this,y,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new bce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var P=w.state,E=P.dataStartIndex,j=P.dataEndIndex,_=P.updateId;w.setState(B({legendBBox:O},p({props:w.props,dataStartIndex:E,dataEndIndex:j,updateId:_},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,P,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(P)}}),ie(w,"handleBrushChange",function(O){var P=O.startIndex,E=O.endIndex;if(P!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var j=w.state.updateId;w.setState(function(){return B({dataStartIndex:P,dataEndIndex:E},p({props:w.props,dataStartIndex:P,dataEndIndex:E,updateId:j},w.state))}),w.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseEnter;oe(j)&&j(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var P=w.getMouseInfo(O),E=P?B(B({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseMove;oe(j)&&j(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var E=w.props.onMouseLeave;oe(E)&&E(P,O)}),ie(w,"handleOuterEvent",function(O){var P=q8(O),E=gr(w.props,"".concat(P));if(P&&oe(E)){var j,_;/.*touch.*/i.test(P)?_=w.getMouseInfo(O.changedTouches[0]):_=w.getMouseInfo(O),E((j=_)!==null&&j!==void 0?j:{},O)}}),ie(w,"handleClick",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onClick;oe(j)&&j(E,O)}}),ie(w,"handleMouseDown",function(O){var P=w.props.onMouseDown;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleMouseUp",function(O){var P=w.props.onMouseUp;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var P=w.props.onDoubleClick;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleContextMenu",function(O){var P=w.props.onContextMenu;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&yv.emit(gv,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var P=w.props,E=P.layout,j=P.syncMethod,_=w.state.updateId,T=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:T,dataEndIndex:k},p({props:w.props,dataStartIndex:T,dataEndIndex:k,updateId:_},w.state)));else if(O.activeTooltipIndex!==void 0){var M=O.chartX,R=O.chartY,I=O.activeTooltipIndex,L=w.state,z=L.offset,C=L.tooltipTicks;if(!z)return;if(typeof j=="function")I=j(C,O);else if(j==="value"){I=-1;for(var F=0;F=0){var le,U;if(M.dataKey&&!M.allowDuplicatedCategory){var Qe=typeof M.dataKey=="function"?se:"payload.".concat(M.dataKey.toString());le=$d(F,Qe,I),U=W&&V&&$d(V,Qe,I)}else le=F==null?void 0:F[R],U=W&&V&&V[R];if(We||be){var ye=O.props.activeIndex!==void 0?O.props.activeIndex:R;return[A.cloneElement(O,B(B(B({},j.props),St),{},{activeIndex:ye})),null,null]}if(!ae(le))return[G].concat(Ks(w.renderActivePoints({item:j,activePoint:le,basePoint:U,childIndex:R,isRange:W})))}else{var st,lt=(st=w.getItemByXY(w.state.activeCoordinate))!==null&&st!==void 0?st:{graphicalItem:G},Yt=lt.graphicalItem,li=Yt.item,ho=li===void 0?O:li,Kc=Yt.childIndex,ia=B(B(B({},j.props),St),{},{activeIndex:Kc});return[A.cloneElement(ho,ia),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,P,E){return A.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:Tf,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Tf},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Tf},YAxis:{handler:Tf},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:so("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=IN(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Fce(y,g),Ice(y,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,P=x.layout,E=pr(S,Ct);if(E){var j=E.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var _=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,T=T0(this.state,w,j,_),k=this.state.tooltipTicks[j].coordinate,M=(this.state.offset.top+O)/2,R=P==="horizontal",I=R?{x:k,y:M}:{y:k,x:M},L=this.state.formattedGraphicalItems.find(function(C){var F=C.item;return F.type.name==="Scatter"});L&&(I=B(B({},I),L.props.points[j].tooltipPosition),T=L.props.points[j].tooltipPayload);var z={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:_,activePayload:T,activeCoordinate:I};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){rg([pr(x.children,Ct)],[pr(this.props.children,Ct)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=pr(this.props.children,Ct);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=bX(w),P={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},E=w.width/S.offsetWidth||1,j=this.inRange(P.chartX,P.chartY,E);if(!j)return null;var _=this.state,T=_.xAxisMap,k=_.yAxisMap,M=this.getTooltipEventType(),R=oA(this.state,this.props.data,this.props.layout,j);if(M!=="axis"&&T&&k){var I=xi(T).scale,L=xi(k).scale,z=I&&I.invert?I.invert(P.chartX):null,C=L&&L.invert?L.invert(P.chartY):null;return B(B({},P),{},{xValue:z,yValue:C},R)}return R?B(B({},P),R):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=x/w,E=S/w;if(O==="horizontal"||O==="vertical"){var j=this.state.offset,_=P>=j.left&&P<=j.left+j.width&&E>=j.top&&E<=j.top+j.height;return _?{x:P,y:E}:null}var T=this.state,k=T.angleAxisMap,M=T.radiusAxisMap;if(k&&M){var R=xi(k);return CP({x:P,y:E},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=pr(x,Ct),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Md(this.props,this.handleOuterEvent);return B(B({},P),O)}},{key:"addListener",value:function(){yv.on(gv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){yv.removeListener(gv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,P=0,E=O.length;P{const i=rfe.find(s=>s.value===t);if(!i)return[];const a=new Date,o=new Map;for(let s=0;s{const l=new Date(s.createdAt),u=Hi(Jy(l),"yyyy-MM-dd"),c=o.get(u)||0;o.set(u,c+1)}),Array.from(o.entries()).map(([s,l])=>({date:s,experiments:l,displayDate:Hi(new Date(s),"MMM dd")})).sort((s,l)=>s.date.localeCompare(l.date))},[e,t]),n=A.useMemo(()=>e.length,[e]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n]})]}),h.jsx(Xa,{width:"100%",height:260,children:h.jsxs(nm,{data:r,margin:{left:0,right:15,top:15,bottom:15},children:[h.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),h.jsx(ei,{tick:{fontSize:10},width:40,label:{value:"Count",angle:-90,position:"insideLeft",offset:8,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(Ct,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:i,payload:a,label:o})=>{if(!i||!a||!a.length)return null;const s=a[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:o}),h.jsx("div",{className:"space-y-0.5 text-[10px]",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"}),h.jsx("span",{className:"text-muted-foreground",children:"Launched:"}),h.jsx("span",{className:"font-medium ml-auto",children:s.experiments})]})})]})}}),h.jsx(rn,{wrapperStyle:{fontSize:"10px"},iconType:"circle",iconSize:8}),h.jsx(Pn,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Launched"})]})})]})}const uA={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function ife({experiments:e}){const t=A.useMemo(()=>{const r=new Map;return e.forEach(n=>{const i=n.status,a=r.get(i)||0;r.set(i,a+1)}),Array.from(r.entries()).map(([n,i])=>({name:n,value:i,color:uA[n]||uA.UNKNOWN})).sort((n,i)=>i.value-n.value)},[e]);return t.length===0?h.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"}):h.jsxs("div",{className:"space-y-3",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),h.jsx(Xa,{width:"100%",height:220,children:h.jsxs(f2,{margin:{top:20,bottom:5},children:[h.jsx(_n,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:58,label:({name:r,value:n})=>`${r}: ${n}`,style:{fontSize:"10px"},children:t.map((r,n)=>h.jsx(cl,{fill:r.color},`cell-${n}`))}),h.jsx(Ct,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"}}),h.jsx(rn,{wrapperStyle:{fontSize:"10px"}})]})})]})}const afe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function ofe({data:e,timeRange:t}){const r=A.useMemo(()=>{const o=afe.find(u=>u.value===t);if(!o)return[];const s=new Date,l=new Map;for(let u=0;u{const c=Hi(new Date(u.date),"yyyy-MM-dd");l.has(c)&&l.set(c,{totalTokens:u.totalTokens,inputTokens:u.inputTokens,outputTokens:u.outputTokens})}),Array.from(l.entries()).map(([u,c])=>({date:u,displayDate:Hi(new Date(u),"MMM dd"),totalTokens:c.totalTokens,inputTokens:c.inputTokens,outputTokens:c.outputTokens})).sort((u,c)=>u.date.localeCompare(c.date))},[e,t]),n=A.useMemo(()=>r.reduce((o,s)=>o+s.totalTokens,0),[r]),i=A.useMemo(()=>r.reduce((o,s)=>o+s.inputTokens,0),[r]),a=A.useMemo(()=>r.reduce((o,s)=>o+s.outputTokens,0),[r]);return h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Token Usage"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n.toLocaleString()," (",i.toLocaleString(),"↓ ",a.toLocaleString(),"↑)"]})]}),h.jsx(Xa,{width:"100%",height:260,children:h.jsxs(nm,{data:r,margin:{left:10,right:15,top:15,bottom:15},children:[h.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),h.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),h.jsx(ei,{tick:{fontSize:10},width:50,tickFormatter:o=>o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:o.toString(),label:{value:"Tokens",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),h.jsx(Ct,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:o,payload:s,label:l})=>{if(!o||!s||!s.length)return null;const u=s[0].payload;return h.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[h.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:l}),h.jsxs("div",{className:"space-y-0.5 text-[10px]",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Total:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.totalTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Input:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.inputTokens.toLocaleString()})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Output:"}),h.jsx("span",{className:"font-medium ml-auto",children:u.outputTokens.toLocaleString()})]})]})]})}}),h.jsx(rn,{wrapperStyle:{fontSize:"10px"},iconType:"circle",iconSize:8}),h.jsx(Pn,{type:"monotone",dataKey:"totalTokens",stroke:"#3b82f6",strokeWidth:2,dot:{fill:"#3b82f6",r:3},activeDot:{r:5},name:"Total"}),h.jsx(Pn,{type:"monotone",dataKey:"inputTokens",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:3},activeDot:{r:5},name:"Input"}),h.jsx(Pn,{type:"monotone",dataKey:"outputTokens",stroke:"#f59e0b",strokeWidth:2,dot:{fill:"#f59e0b",r:3},activeDot:{r:5},name:"Output"})]})})]})}const cA=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function sfe(){var f,d,p,v;const{selectedTeamId:e}=Qs(),[t,r]=A.useState("7days"),{data:n,isLoading:i}=Wb(e||""),{data:a,isLoading:o}=JB(e||"",{enabled:!!e}),s=((f=cA.find(m=>m.value===t))==null?void 0:f.days)||30,{data:l,isLoading:u}=ZB(e||"",s),c=A.useMemo(()=>{if(!a)return[];const m=new Date,g=t==="7days"?Hb(m,7):t==="1month"?Zy(m,1):Zy(m,3);return a.filter(y=>{const b=new Date(y.createdAt);return b>=g&&b<=m})},[a,t]);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Overview of your team's experiments and activity"})]}),h.jsx("div",{children:h.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(De,{className:"h-14 w-full"}),h.jsx(De,{className:"h-14 w-full"}),h.jsx(De,{className:"h-14 w-full"})]}):h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[h.jsx(xe,{children:h.jsx(we,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),h.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:h.jsx(ek,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),h.jsx(xe,{children:h.jsx(we,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),h.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),h.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:h.jsx(kF,{className:"h-3.5 w-3.5 text-green-600"})})]})})}),h.jsx(xe,{children:h.jsx(we,{className:"p-3",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"TOKENS"}),h.jsxs("p",{className:"text-lg font-bold tabular-nums text-foreground",children:[(((d=n==null?void 0:n.aggregatedTokens)==null?void 0:d.totalTokens)||0).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1 font-normal",children:["(",(((p=n==null?void 0:n.aggregatedTokens)==null?void 0:p.inputTokens)||0).toLocaleString(),"↓ ",(((v=n==null?void 0:n.aggregatedTokens)==null?void 0:v.outputTokens)||0).toLocaleString(),"↑)"]})]})]}),h.jsx("div",{className:"p-1.5 bg-orange-100 rounded-lg",children:h.jsx(dF,{className:"h-3.5 w-3.5 text-orange-600"})})]})})})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),h.jsx("div",{className:"flex gap-1",children:cA.map(m=>h.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>r(m.value),className:`h-8 px-2.5 text-xs transition-colors ${t===m.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:m.label},m.value))})]}),h.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:o?h.jsx(De,{className:"h-56 w-full"}):c&&c.length>0?h.jsx(ife,{experiments:c}):h.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:o?h.jsx(De,{className:"h-56 w-full"}):c&&c.length>0?h.jsx(nfe,{experiments:c,timeRange:t}):h.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]}),h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:u?h.jsx(De,{className:"h-80 w-full"}):l?h.jsx(ofe,{data:l,timeRange:t}):h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No token usage data available for this time range"})})})]})]})}const Uc=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:r,className:fe("w-full caption-bottom text-sm",e),...t})}));Uc.displayName="Table";const Wc=A.forwardRef(({className:e,...t},r)=>h.jsx("thead",{ref:r,className:fe("[&_tr]:border-b",e),...t}));Wc.displayName="TableHeader";const Hc=A.forwardRef(({className:e,...t},r)=>h.jsx("tbody",{ref:r,className:fe("[&_tr:last-child]:border-0",e),...t}));Hc.displayName="TableBody";const lfe=A.forwardRef(({className:e,...t},r)=>h.jsx("tfoot",{ref:r,className:fe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));lfe.displayName="TableFooter";const ti=A.forwardRef(({className:e,...t},r)=>h.jsx("tr",{ref:r,className:fe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ti.displayName="TableRow";const It=A.forwardRef(({className:e,...t},r)=>h.jsx("th",{ref:r,className:fe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));It.displayName="TableHead";const Dt=A.forwardRef(({className:e,...t},r)=>h.jsx("td",{ref:r,className:fe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Dt.displayName="TableCell";const ufe=A.forwardRef(({className:e,...t},r)=>h.jsx("caption",{ref:r,className:fe("mt-4 text-sm text-muted-foreground",e),...t}));ufe.displayName="TableCaption";function Lr({className:e,variant:t="default",...r}){const n={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-slate-100 text-slate-700 border-slate-200",destructive:"bg-red-50 text-red-700 border-red-200",outline:"text-foreground",success:"bg-emerald-50 text-emerald-700 border-emerald-200",warning:"bg-amber-50 text-amber-700 border-amber-200",unknown:"bg-purple-50 text-purple-700 border-purple-200",info:"bg-blue-50 text-blue-700 border-blue-200"};return h.jsx("div",{className:fe("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors",n[t],e),...r})}const qs=A.forwardRef(({className:e,type:t,...r},n)=>h.jsx("input",{type:t,className:fe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));qs.displayName="Input";function Qx({value:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=A.useState(!1),s=A.useRef(null),l=r.find(u=>u.value===e);return A.useEffect(()=>{const u=c=>{s.current&&!s.current.contains(c.target)&&o(!1)};return a&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[a]),h.jsxs("div",{ref:s,className:fe("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-[13px] font-medium text-foreground","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("span",{children:(l==null?void 0:l.label)||i||"Select..."}),h.jsx(sp,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-60 overflow-auto p-1",children:r.map(u=>h.jsx("button",{type:"button",onClick:()=>{t(u.value),o(!1)},className:fe("w-full rounded-sm px-2 py-1.5 text-[13px] text-left cursor-pointer transition-colors","hover:bg-accent hover:text-accent-foreground",e===u.value&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value))})})]})}function cfe({values:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=A.useState(!1),s=A.useRef(null),l=r.filter(p=>e.includes(p.value)),u=A.useMemo(()=>{const p={};return r.forEach(v=>{const m=v.group||"Other";p[m]||(p[m]=[]),p[m].push(v)}),p},[r]);A.useEffect(()=>{const p=v=>{s.current&&!s.current.contains(v.target)&&o(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const c=p=>{e.includes(p)?t(e.filter(v=>v!==p)):t([...e,p])},f=(p,v)=>{v.stopPropagation(),t(e.filter(m=>m!==p))},d=p=>{p.stopPropagation(),t([])};return h.jsxs("div",{ref:s,className:fe("relative",n),children:[h.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex min-h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-1.5 text-[13px]","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[h.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:l.length===0?h.jsx("span",{className:"text-muted-foreground font-medium",children:i||"Select labels..."}):l.map(p=>{const v=p.value.endsWith(":*")?p.label:`${p.group}:${p.label}`;return h.jsxs(Lr,{variant:"outline",className:"text-[11px] px-1.5 py-0 font-normal",children:[v,h.jsx(_d,{className:"ml-1 h-3 w-3 cursor-pointer hover:text-destructive",onClick:m=>f(p.value,m)})]},p.value)})}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[l.length>0&&h.jsx(_d,{className:"h-3.5 w-3.5 opacity-50 hover:opacity-100 cursor-pointer",onClick:d}),h.jsx(sp,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]})]}),a&&h.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:h.jsx("div",{className:"max-h-80 overflow-auto p-1",children:Object.entries(u).map(([p,v])=>h.jsxs("div",{children:[h.jsx("div",{className:"px-2 py-1.5 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:p}),v.map(m=>h.jsxs("button",{type:"button",onClick:()=>c(m.value),className:fe("w-full rounded-sm px-2 py-1.5 pl-6 text-[13px] text-left cursor-pointer transition-colors flex items-center gap-2","hover:bg-accent hover:text-accent-foreground"),children:[h.jsx("input",{type:"checkbox",checked:e.includes(m.value),onChange:()=>{},className:"h-3.5 w-3.5 rounded border-gray-300"}),h.jsx("span",{className:fe(e.includes(m.value)&&"font-medium"),children:m.label})]},m.value))]},p))})})]})}function Jx({currentPage:e,totalPages:t,pageSize:r,totalItems:n,onPageChange:i,itemName:a="items"}){return n===0?null:h.jsx("div",{className:"flex items-center justify-end px-6 py-4 border-t",children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>i(Math.max(0,e-1)),disabled:e===0,className:"h-8 w-8 p-0",children:h.jsx(uF,{className:"h-4 w-4"})}),h.jsxs("div",{className:"text-[13px] font-medium text-muted-foreground",children:[e+1," / ",t]}),h.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>i(Math.min(t-1,e+1)),disabled:e>=t-1,className:"h-8 w-8 p-0",children:h.jsx(zb,{className:"h-4 w-4"})})]})})}const ffe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},dfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],xv=[{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-300"},{bg:"bg-green-100",text:"text-green-700",border:"border-green-300"},{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-300"},{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300"},{bg:"bg-pink-100",text:"text-pink-700",border:"border-pink-300"},{bg:"bg-cyan-100",text:"text-cyan-700",border:"border-cyan-300"},{bg:"bg-indigo-100",text:"text-indigo-700",border:"border-indigo-300"},{bg:"bg-teal-100",text:"text-teal-700",border:"border-teal-300"},{bg:"bg-amber-100",text:"text-amber-700",border:"border-amber-300"},{bg:"bg-rose-100",text:"text-rose-700",border:"border-rose-300"},{bg:"bg-violet-100",text:"text-violet-700",border:"border-violet-300"},{bg:"bg-lime-100",text:"text-lime-700",border:"border-lime-300"},{bg:"bg-fuchsia-100",text:"text-fuchsia-700",border:"border-fuchsia-300"},{bg:"bg-emerald-100",text:"text-emerald-700",border:"border-emerald-300"},{bg:"bg-sky-100",text:"text-sky-700",border:"border-sky-300"},{bg:"bg-red-100",text:"text-red-700",border:"border-red-300"},{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300"},{bg:"bg-slate-100",text:"text-slate-700",border:"border-slate-300"},{bg:"bg-zinc-100",text:"text-zinc-700",border:"border-zinc-300"},{bg:"bg-stone-100",text:"text-stone-700",border:"border-stone-300"}],wv=10;function hfe(){const{selectedTeamId:e}=Qs(),[t,r]=A.useState("ALL"),[n,i]=A.useState([]),[a,o]=A.useState(""),[s,l]=A.useState(0),{data:u}=Wb(e||""),{data:c,isLoading:f}=pk(e||"",{page:s,pageSize:wv,enabled:!!e}),d=(u==null?void 0:u.totalExperiments)||0,p=Math.ceil(d/wv),v=A.useMemo(()=>{if(!c||c.length===0)return new Map;const y=new Set;c.forEach(S=>{var w;(w=S.labels)==null||w.forEach(O=>{y.add(O.name)})});const b=Array.from(y).sort(),x=new Map;return b.forEach((S,w)=>{x.set(S,xv[w%xv.length])}),x},[c]),m=A.useMemo(()=>{if(!c||c.length===0)return[];const y=new Map;c.forEach(x=>{var S;(S=x.labels)==null||S.forEach(w=>{y.has(w.name)||y.set(w.name,new Set),y.get(w.name).add(w.value)})});const b=[];return Array.from(y.entries()).sort(([x],[S])=>x.localeCompare(S)).forEach(([x,S])=>{b.push({value:`${x}:*`,label:`(Any ${x})`,group:x}),Array.from(S).sort().forEach(w=>{b.push({value:`${x}:${w}`,label:w,group:x})})}),b},[c]),g=A.useMemo(()=>{if(!c)return[];let y=[...c];if(a.trim()){const b=a.toLowerCase();y=y.filter(x=>{var S,w,O,P;return((S=x.name)==null?void 0:S.toLowerCase().includes(b))||((w=x.description)==null?void 0:w.toLowerCase().includes(b))||((O=x.id)==null?void 0:O.toLowerCase().includes(b))||((P=x.labels)==null?void 0:P.some(E=>E.name.toLowerCase().includes(b)||E.value.toLowerCase().includes(b)))})}return t!=="ALL"&&(y=y.filter(b=>b.status===t)),n.length>0&&(y=y.filter(b=>n.every(x=>{var O,P;const[S,w]=x.split(":",2);return w==="*"?(O=b.labels)==null?void 0:O.some(E=>E.name===S):(P=b.labels)==null?void 0:P.some(E=>E.name===S&&E.value===w)}))),y.sort((b,x)=>new Date(x.createdAt).getTime()-new Date(b.createdAt).getTime()),y},[c,t,n,a]);return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx(ku,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(qs,{placeholder:"Search experiments...",value:a,onChange:y=>o(y.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(cfe,{values:n,onChange:y=>i(y),options:m,className:"w-64",placeholder:"Filter by labels..."}),h.jsx(Qx,{value:t,onChange:y=>r(y),options:dfe,className:"w-40"})]})]}),h.jsx(xe,{className:"border-0 shadow-sm",children:h.jsxs(we,{className:"p-0",children:[f?h.jsx("div",{className:"p-8",children:h.jsx(De,{className:"h-24 w-full"})}):!g||g.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:a.trim()||t!=="ALL"||n.length>0?"No experiments match your filters":"No experiments found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Uc,{children:[h.jsx(Wc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Name"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Labels"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Duration"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Hc,{children:g.map((y,b)=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(Va,{to:`/experiments/${y.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:y.id})}),h.jsx(Dt,{className:"py-3 text-sm font-medium text-foreground",children:y.name}),h.jsx(Dt,{className:"py-3 text-sm",children:y.labels&&y.labels.length>0?h.jsx("div",{className:"flex gap-1 flex-wrap",children:y.labels.map((x,S)=>{const w=v.get(x.name)||xv[0];return h.jsxs(Lr,{variant:"outline",className:`text-xs px-2 py-0.5 font-normal ${w.bg} ${w.text} ${w.border}`,children:[x.name,": ",x.value]},S)})}):h.jsx("span",{className:"text-muted-foreground",children:"-"})}),h.jsx(Dt,{className:"py-3",children:h.jsx(Lr,{variant:ffe[y.status],children:y.status})}),h.jsx(Dt,{className:"py-3 text-sm text-foreground tabular-nums text-right",children:y.duration>0?`${y.duration.toFixed(2)}s`:"-"}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(y.createdAt),{addSuffix:!0})})]},y.id))})]})}),g&&g.length>0&&h.jsx(Jx,{currentPage:s,totalPages:p,pageSize:wv,totalItems:d,onPageChange:l,itemName:"experiments"})]})})]})}function d2(e){const{data:t,...r}=lp(e),n=A.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const pfe="modulepreload",mfe=function(e){return"/static/"+e},fA={},vfe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=mfe(l),l in fA)return;fA[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":pfe,u||(f.as="script"),f.crossOrigin="",f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),u)return new Promise((d,p)=>{f.addEventListener("load",d),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function yfe(e){const{data:t,...r}=lp(e),{runMetrics:n,availableMetrics:i}=A.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((c,f)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()).forEach(c=>{!c.key||c.value===null||(s.add(c.key),o.has(c.runId)||o.set(c.runId,new Map),o.get(c.runId).set(c.key,c.value))});const u=[];return o.forEach((c,f)=>{const d={};c.forEach((p,v)=>{d[v]=p}),u.push({runId:f,metrics:d})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function gfe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;avfe(()=>import("./react-plotly-DGe6pNjt.js").then(e=>e.r),[])),di=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],dA="#10b981",hA="#9ca3af",pA="#f59e0b";function wfe({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=A.useState(i[0]||""),[s,l]=A.useState("timeline"),[u,c]=A.useState([]),{runMetrics:f,availableMetrics:d}=yfe(t),p=A.useMemo(()=>{const P=[];return Object.values(e).forEach(E=>{P.push(...E)}),P.length===0?null:P[0].runId},[e]),v=A.useMemo(()=>u.length===0?f:f.filter(P=>u.every(E=>P.metrics[E.key]!==void 0)),[f,u]),m=A.useMemo(()=>u.length<2||v.length<2?new Set:bfe(v,u),[v,u]),g=A.useMemo(()=>{var E;if(i.length===0||!a)return[];const P=[];return e[a]&&e[a].forEach((j,_)=>{j.value!==null&&P.push({timestamp:new Date(j.createdAt).getTime(),index:_,time:Hi(new Date(j.createdAt),"MMM dd HH:mm:ss"),value:j.value,runId:j.runId})}),P.sort((j,_)=>j.timestamp-_.timestamp),P.forEach((j,_)=>{j.index=_}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",P.length),console.log("[MetricsChart] All data points:",P),P},[e,i,a]),y=A.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const P=u[0],E=u[1],j=u.length>=3?u[2]:void 0,_=v.map(k=>({runId:k.runId,x:k.metrics[P.key],y:k.metrics[E.key],z:j?k.metrics[j.key]:void 0,isParetoOptimal:m.has(k.runId),metrics:k.metrics})),T=_.filter(k=>k.isParetoOptimal).sort((k,M)=>k.x-M.x);return{all:_,paretoLine:T}},[v,u,m]),b=A.useMemo(()=>{if(u.length!==3||y.all.length===0)return null;const P=[...y.paretoLine].sort((k,M)=>k.x!==M.x?k.x-M.x:k.y!==M.y?k.y-M.y:(k.z||0)-(M.z||0)),E=y.all.find(k=>k.runId===p),j=P.filter(k=>k.runId!==p),_=y.all.filter(k=>!k.isParetoOptimal&&k.runId!==p),T=[{x:_.map(k=>k.x),y:_.map(k=>k.y),z:_.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:hA,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:_.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:j.map(k=>k.x),y:j.map(k=>k.y),z:j.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:dA,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:j.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&T.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:pA,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),T},[y,u,p]),x=P=>{o(P)},S=P=>{u.length>=3||u.some(E=>E.key===P)||c([...u,{key:P,direction:"maximize"}])},w=P=>{c(u.filter(E=>E.key!==P))},O=P=>{c(u.map(E=>E.key===P?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?h.jsxs(xe,{children:[h.jsxs(or,{className:"pb-3",children:[h.jsx(sr,{className:"text-sm",children:r}),n&&h.jsx(xr,{className:"text-xs",children:n})]}),h.jsx(we,{children:h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):h.jsxs(xe,{children:[h.jsxs(or,{className:"pb-3",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx(sr,{className:"text-sm",children:r}),n&&h.jsx(xr,{className:"text-xs",children:n})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>l("timeline"),className:`h-7 px-3 text-xs transition-colors ${s==="timeline"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Timeline"}),h.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>l("pareto"),className:`h-7 px-3 text-xs transition-colors ${s==="pareto"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Pareto"})]})]}),s==="timeline"?h.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((P,E)=>h.jsx(Lr,{variant:a===P?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===P?di[E%di.length]:void 0},onClick:()=>x(P),children:P},P))}):h.jsxs("div",{className:"space-y-2 pt-3",children:[h.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map((P,E)=>{const j=u.find(T=>T.key===P),_=(j==null?void 0:j.direction)==="maximize";return h.jsxs(Lr,{variant:j?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:j?di[E%di.length]:void 0,borderColor:j?di[E%di.length]:void 0},onClick:()=>{j?O(P):u.length<3&&S(P)},onContextMenu:T=>{T.preventDefault(),j&&w(P)},children:[P,j&&h.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:_?"↑":"↓"})]},P)})}),u.length>0&&h.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),h.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?h.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?h.jsx("span",{children:"Select at least 2 metrics for analysis"}):h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsxs("span",{children:["Runs: ",v.length]}),m.size>0&&h.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),h.jsx(we,{className:"pt-0",children:s==="timeline"?a?h.jsx(Xa,{width:"100%",height:280,children:h.jsxs(nm,{data:g,margin:{top:5,right:20,left:10,bottom:5},onClick:P=>{if(P&&P.activePayload&&P.activePayload[0]){const E=P.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[h.jsx(Ls,{strokeDasharray:"3 3"}),h.jsx(Zn,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:10}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:10}}),h.jsx(ei,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}},tick:{fontSize:10}}),h.jsx(Ct,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:P,payload:E})=>{if(!P||!E||E.length===0)return null;const j=E[0].payload;return j.runId?h.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[h.jsxs("div",{style:{fontWeight:600,fontSize:"10px"},children:["Run: ",j.runId]}),h.jsxs("div",{style:{fontSize:"10px"},children:[a,": ",typeof j.value=="number"?j.value.toFixed(4):j.value]})]}):null}}),h.jsx(Pn,{type:"monotone",dataKey:"value",name:a,stroke:di[i.indexOf(a)%di.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):h.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):y.all.length===0?h.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?h.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[h.jsx("style",{children:` - #pareto-3d-plot .nsewdrag { - cursor: default !important; - } - #pareto-3d-plot .nsewdrag.cursor-crosshair { - cursor: default !important; - } - `}),h.jsx(A.Suspense,{fallback:h.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),h.jsx("div",{children:"Loading 3D visualization..."})]})}),children:h.jsx(xfe,{divId:"pareto-3d-plot",data:b,onInitialized:(P,E)=>{E.on("plotly_click",j=>{var _;if(j&&j.points&&j.points[0]){const k=(_=j.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},onUpdate:(P,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",j=>{var _;if(j&&j.points&&j.points[0]){const k=(_=j.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):h.jsx(Xa,{width:"100%",height:400,children:h.jsxs(tfe,{margin:{top:20,right:20,bottom:60,left:60},children:[h.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),h.jsx(Zn,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(ei,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),h.jsx(Ct,{cursor:{strokeDasharray:"3 3"},content:({active:P,payload:E})=>{var R,I;if(!P||!E||!E[0])return null;const j=E[0].payload,_=j.runId===p,T=j.isParetoOptimal,k=_?"#fef3c7":T?"#f0fdf4":"#fafafa",M=_?"#fcd34d":T?"#86efac":"#d1d5db";return h.jsxs("div",{style:{backgroundColor:k,border:`1px solid ${M}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"10px"},children:[h.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",j.runId,_?" (StartPoint)":""]}),h.jsxs("div",{children:[u[0].key,": ",(R=j.x)==null?void 0:R.toFixed(4)]}),h.jsxs("div",{children:[u[1].key,": ",(I=j.y)==null?void 0:I.toFixed(4)]})]})}}),h.jsx(Ba,{name:"Dominated",data:y.all.filter(P=>!P.isParetoOptimal&&P.runId!==p),fill:hA,fillOpacity:.4,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),h.jsx(Ba,{name:"Pareto",data:y.all.filter(P=>P.isParetoOptimal&&P.runId!==p),fill:dA,fillOpacity:.95,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),p&&h.jsx(Ba,{name:"Start",data:y.all.filter(P=>P.runId===p),fill:pA,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")})]})})})]})}const Zx=A.createContext(void 0),ew=A.forwardRef(({className:e,value:t,onValueChange:r,...n},i)=>h.jsx(Zx.Provider,{value:{value:t,onValueChange:r},children:h.jsx("div",{ref:i,className:fe("w-full",e),...n})}));ew.displayName="Tabs";const tw=A.forwardRef(({className:e,...t},r)=>h.jsx("div",{ref:r,className:fe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));tw.displayName="TabsList";const hc=A.forwardRef(({className:e,value:t,...r},n)=>{const i=A.useContext(Zx);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return h.jsx("button",{ref:n,className:fe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});hc.displayName="TabsTrigger";const pc=A.forwardRef(({className:e,value:t,...r},n)=>{const i=A.useContext(Zx);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:h.jsx("div",{ref:n,className:fe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});pc.displayName="TabsContent";const mA={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Sfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Sv=10;function Ofe(){var w;const{id:e}=bT(),[t,r]=A.useState("overview"),[n,i]=A.useState(0),[a,o]=A.useState(""),[s,l]=A.useState("ALL"),{data:u,isLoading:c,error:f}=lp(e),{data:d,isLoading:p}=Xy(e,{page:n,pageSize:Sv}),{data:v}=Xy(e,{page:0,pageSize:1e3}),m=(v==null?void 0:v.length)||0,g=Math.ceil(m/Sv),{data:y,isLoading:b}=d2(e),x=A.useMemo(()=>{if(!d)return[];let O=[...d];if(a.trim()){const P=a.toLowerCase();O=O.filter(E=>{var j;return(j=E.id)==null?void 0:j.toLowerCase().includes(P)})}return s!=="ALL"&&(O=O.filter(P=>P.status===s)),O.sort((P,E)=>new Date(E.createdAt).getTime()-new Date(P.createdAt).getTime()),O},[d,a,s]),S=A.useMemo(()=>!v||v.length===0?[]:[{name:"COMPLETED",value:v.filter(P=>P.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:v.filter(P=>P.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:v.filter(P=>P.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:v.filter(P=>P.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:v.filter(P=>P.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:v.filter(P=>P.status==="UNKNOWN").length,color:"#a78bfa"}].filter(P=>P.value>0),[v]);return c?h.jsxs("div",{className:"space-y-4",children:[h.jsx(De,{className:"h-12 w-64"}),h.jsx(De,{className:"h-96 w-full"})]}):f||!u?h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Error"}),h.jsx(xr,{children:"Failed to load experiment"})]}),h.jsx(we,{children:h.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Experiment not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),h.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),h.jsx(Lr,{variant:mA[u.status],children:u.status})]}),h.jsxs(ew,{value:t,onValueChange:r,children:[h.jsxs(tw,{children:[h.jsx(hc,{value:"overview",children:"Overview"}),h.jsx(hc,{value:"runs",children:"Runs"})]}),h.jsxs(pc,{value:"overview",className:"space-y-4",children:[h.jsx(xe,{children:h.jsxs(we,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=u.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&u.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(u.aggregatedTokens.totalTokens).toLocaleString(),u.aggregatedTokens.inputTokens!==void 0&&u.aggregatedTokens.outputTokens!==void 0&&h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.aggregatedTokens.inputTokens).toLocaleString(),"↓ ",Number(u.aggregatedTokens.outputTokens).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(u.createdAt),{addSuffix:!0})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),u.params&&Object.keys(u.params).length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),v&&v.length>0&&S.length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",v.length," runs)"]}),h.jsx(Xa,{width:"100%",height:180,children:h.jsxs(f2,{margin:{top:20,bottom:5},children:[h.jsx(_n,{data:S,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:O,value:P})=>`${O}: ${P}`,style:{fontSize:"10px"},children:S.map((O,P)=>h.jsx(cl,{fill:O.color},`cell-${P}`))}),h.jsx(Ct,{contentStyle:{fontSize:"10px",backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px"}}),h.jsx(rn,{wrapperStyle:{fontSize:"10px"}})]})})]})]})}),b?h.jsx(De,{className:"h-80 w-full"}):y&&Object.keys(y).length>0?h.jsx(wfe,{metrics:y,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):h.jsxs(xe,{children:[h.jsxs(or,{className:"pb-3",children:[h.jsx(sr,{className:"text-sm",children:"Metrics"}),h.jsx(xr,{className:"text-xs",children:"No metrics data available"})]}),h.jsx(we,{children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:v&&v.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),h.jsx(pc,{value:"runs",className:"space-y-4",children:h.jsx(xe,{children:h.jsxs(we,{className:"p-0",children:[h.jsxs("div",{className:"flex gap-2 mb-3 items-center px-4 pt-4",children:[h.jsxs("div",{className:"relative w-64",children:[h.jsx(ku,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(qs,{placeholder:"Search runs...",value:a,onChange:O=>o(O.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(Qx,{value:s,onChange:O=>l(O),options:Sfe,className:"w-40"})]}),p?h.jsx("div",{className:"p-8",children:h.jsx(De,{className:"h-24 w-full"})}):!d||d.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):x.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Uc,{children:[h.jsx(Wc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Hc,{children:x.map(O=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(Va,{to:`/runs/${O.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:O.id})}),h.jsx(Dt,{className:"py-3",children:h.jsx(Lr,{variant:mA[O.status],children:O.status})}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(O.createdAt),{addSuffix:!0})})]},O.id))})]})}),!p&&x&&x.length>0&&h.jsx(Jx,{currentPage:n,totalPages:g,pageSize:Sv,totalItems:m,onPageChange:i,itemName:"runs"})]})})})]})]})}function Pfe({experiments:e}){const t=A.useMemo(()=>{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Parameter Comparison"}),h.jsx(xr,{children:"Side-by-side comparison of experiment parameters"})]}),h.jsx(we,{children:t.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):h.jsxs(Uc,{children:[h.jsx(Wc,{children:h.jsxs(ti,{children:[h.jsx(It,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>h.jsx(It,{className:"font-semibold",children:r.name},r.id))]})}),h.jsx(Hc,{children:t.map(r=>h.jsxs(ti,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[h.jsx(Dt,{className:"font-medium",children:r.key}),r.values.map((n,i)=>h.jsx(Dt,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const vA=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function Efe({experimentIds:e}){const t=e.map(a=>d2(a)),r=t.some(a=>a.isLoading),n=A.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,c])=>{c.forEach(f=>{const d=f.createdAt,p=`exp${s+1}_${u}`;a.has(d)||a.set(d,{timestamp:d,time:Hi(new Date(d),"HH:mm:ss")});const v=a.get(d);v[p]=f.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=A.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?h.jsxs(xe,{children:[h.jsx(or,{children:h.jsx(sr,{children:"Metrics Overlay"})}),h.jsx(we,{children:h.jsx(De,{className:"h-96 w-full"})})]}):n.length===0?h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Metrics Overlay"}),h.jsx(xr,{children:"Combined metrics visualization across experiments"})]}),h.jsx(we,{children:h.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Metrics Overlay"}),h.jsx(xr,{children:"Combined metrics from all selected experiments"})]}),h.jsx(we,{children:h.jsx(Xa,{width:"100%",height:400,children:h.jsxs(nm,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[h.jsx(Ls,{strokeDasharray:"3 3"}),h.jsx(Zn,{dataKey:"time",tick:{fontSize:10},label:{value:"Time",position:"insideBottom",offset:-5,style:{fontSize:10}}}),h.jsx(ei,{tick:{fontSize:10},label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}}}),h.jsx(Ct,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem",fontSize:"10px"}}),h.jsx(rn,{wrapperStyle:{fontSize:"10px"}}),i.map((a,o)=>h.jsx(Pn,{type:"monotone",dataKey:a,stroke:vA[o%vA.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const Afe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function jfe(){var i;const[e]=vL(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=T5(t);return n?h.jsxs("div",{className:"space-y-4",children:[h.jsx(De,{className:"h-12 w-64"}),h.jsx(De,{className:"h-96 w-full"})]}):!r||r.length<2?h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Experiment Comparison"}),h.jsx(xr,{children:"Select at least 2 experiments to compare"})]}),h.jsx(we,{children:h.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),h.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),h.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsx(sr,{className:"text-lg",children:a.name}),h.jsx(Lr,{variant:Afe[a.status],children:a.status})]}),a.description&&h.jsx(xr,{children:a.description})]}),h.jsx(we,{children:h.jsxs("dl",{className:"space-y-2 text-sm",children:[h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),h.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"-"})]}),h.jsxs("div",{className:"flex justify-between",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Params"}),h.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),h.jsx(Pfe,{experiments:r}),h.jsx(Efe,{experimentIds:t})]})}const _fe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Tfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],Ov=10;function kfe(){var y;const{selectedTeamId:e}=Qs(),[t,r]=A.useState("ALL"),[n,i]=A.useState(""),[a,o]=A.useState(0),{data:s}=Wb(e||""),{data:l,isLoading:u}=pk(e||"",{page:0,pageSize:1e3,enabled:!!e}),c=((y=l==null?void 0:l[0])==null?void 0:y.id)||"",{data:f,isLoading:d}=Xy(c,{page:a,pageSize:Ov,enabled:!!c}),p=(s==null?void 0:s.totalRuns)||0,v=Math.ceil(p/Ov),m=A.useMemo(()=>{if(!f)return[];let b=[...f];if(n.trim()){const x=n.toLowerCase();b=b.filter(S=>{var w,O;return((w=S.id)==null?void 0:w.toLowerCase().includes(x))||((O=S.experimentId)==null?void 0:O.toLowerCase().includes(x))})}return t!=="ALL"&&(b=b.filter(x=>x.status===t)),b.sort((x,S)=>new Date(S.createdAt).getTime()-new Date(x.createdAt).getTime()),b},[f,t,n]),g=u||d;return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Runs"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),h.jsxs("div",{className:"flex gap-2 items-center",children:[h.jsxs("div",{className:"relative w-80",children:[h.jsx(ku,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(qs,{placeholder:"Search runs...",value:n,onChange:b=>i(b.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),h.jsx(Qx,{value:t,onChange:b=>r(b),options:Tfe,className:"w-40"})]})]}),h.jsx(xe,{className:"border-0 shadow-sm",children:h.jsxs(we,{className:"p-0",children:[g?h.jsx("div",{className:"p-8",children:h.jsx(De,{className:"h-24 w-full"})}):!m||m.length===0?h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):h.jsx("div",{className:"overflow-hidden rounded-lg",children:h.jsxs(Uc,{children:[h.jsx(Wc,{children:h.jsxs(ti,{className:"hover:bg-transparent border-b",children:[h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Experiment ID"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),h.jsx(It,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),h.jsx(Hc,{children:m.map(b=>h.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(Va,{to:`/runs/${b.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.id})}),h.jsx(Dt,{className:"py-3 text-sm font-mono",children:h.jsx(Va,{to:`/experiments/${b.experimentId}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.experimentId})}),h.jsx(Dt,{className:"py-3",children:h.jsx(Lr,{variant:_fe[b.status],children:b.status})}),h.jsx(Dt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(b.createdAt),{addSuffix:!0})})]},b.id))})]})}),m&&m.length>0&&h.jsx(Jx,{currentPage:a,totalPages:v,pageSize:Ov,totalItems:p,onPageChange:o,itemName:"runs"})]})})]})}async function Nfe(){try{return(await lr(ur.listArtifactRepositories)).artifactRepos.map(t=>t.name)}catch(e){throw new Error(`Failed to list repositories: ${e instanceof Error?e.message:"Unknown error"}`)}}async function Cfe(e,t){try{return(await lr(ur.listArtifactTags,{team_id:e,repo_name:t})).artifactTags.map(n=>n.name)}catch(r){throw new Error(`Failed to list tags for repository ${t}: ${r instanceof Error?r.message:"Unknown error"}`)}}async function $fe(e,t,r){try{return(await lr(ur.getArtifactContent,{team_id:e,tag:t,repo_name:r})).artifactContent}catch(n){throw new Error(`Failed to get artifact content: ${n instanceof Error?n.message:"Unknown error"}`)}}function Mfe(){return Fr({queryKey:["artifacts","repositories"],queryFn:Nfe,staleTime:30*60*1e3})}function Ife(e,t){return Fr({queryKey:["artifacts","tags",e,t],queryFn:()=>Cfe(e,t),enabled:!!(e&&t),staleTime:10*60*1e3})}function h2(e,t,r,n=!0){return Fr({queryKey:["artifacts","content",e,t,r],queryFn:()=>$fe(e,t,r),enabled:!!(n&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}const yA={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},gA=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:h.jsx(nF,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:h.jsx(EF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:h.jsx(mF,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:h.jsx(wF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:h.jsx(IF,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:h.jsx(Gy,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function Dfe({spans:e}){const[t,r]=A.useState(()=>new Set(e.filter(g=>!g.parentSpanId||g.parentSpanId==="").map(g=>g.spanId))),[n,i]=A.useState(null),a=()=>{const g=new Set(e.map(y=>y.spanId));r(g)},o=()=>{r(new Set)},s=A.useMemo(()=>{if(!e||e.length===0)return[];const g=new Map,y=[];e.forEach(S=>{g.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=g.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")y.push(w);else{const O=g.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):y.push(w)}});const b=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>b(w.children))},x=S=>{var T,k,M;S.children.forEach(R=>x(R));const w=parseInt((T=S.span.spanAttributes)==null?void 0:T["gen_ai.usage.input_tokens"])||0,O=parseInt((k=S.span.spanAttributes)==null?void 0:k["gen_ai.usage.output_tokens"])||0,P=parseInt((M=S.span.spanAttributes)==null?void 0:M["llm.usage.total_tokens"])||0,E=S.children.reduce((R,I)=>R+(I.inputTokens||0),0),j=S.children.reduce((R,I)=>R+(I.outputTokens||0),0),_=S.children.reduce((R,I)=>R+(I.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+j,S.totalTokens=P+_};return b(y),y.forEach(S=>x(S)),y},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:c}=A.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const g=e.map(w=>new Date(w.timestamp).getTime()),y=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),b=Math.min(...g),x=Math.max(...y),S=x-b;return{minTimestamp:b,maxTimestamp:x,totalDuration:S||1}},[e]),f=g=>{r(y=>{const b=new Set(y);return b.has(g)?b.delete(g):b.add(g),b})},d=g=>{const y=g/1e3,b=y/1e3,x=b/1e3;return x>=1?`${x.toFixed(2)}s`:b>=1?`${b.toFixed(2)}ms`:`${y.toFixed(2)}μs`},p=g=>{const{span:y}=g,b=new Date(y.timestamp).getTime(),x=b+y.duration/1e6,S=(b-l)/c*100,w=(x-b)/c*100,O=yA[y.statusCode]||yA.UNSET;return h.jsx("div",{className:`${O} absolute h-6 rounded flex items-center px-1.5 text-white text-[10px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${y.spanName} -Duration: ${d(y.duration)} -Status: ${y.statusCode} -Kind: ${y.spanKind}`,children:h.jsx("span",{className:"truncate",children:d(y.duration)})})},v=g=>{const{span:y,children:b,depth:x,totalTokens:S,inputTokens:w,outputTokens:O}=g,P=b.length>0,E=t.has(y.spanId),j=gA(y),_=P&&S&&S>0;return h.jsxs("div",{children:[h.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer h-10 ${(n==null?void 0:n.spanId)===y.spanId?"bg-accent":""}`,onClick:T=>{T.target.closest("button")||i(y)},children:[h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 h-full min-w-0",style:{width:"320px",paddingLeft:`${x*10+8}px`,paddingRight:"8px"},children:[x>0&&h.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(x-1)*10+8}px`}}),P?h.jsx("button",{onClick:()=>f(y.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?h.jsx(sp,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"}):h.jsx(zb,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})}):h.jsx("div",{className:"w-[18px] flex-shrink-0"}),h.jsxs(Lr,{variant:"outline",className:`${j.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px] font-medium flex-shrink-0`,children:[j.icon,h.jsx("span",{children:j.label})]}),h.jsx("span",{className:"text-[13px] font-medium truncate text-foreground",title:y.spanName,children:y.spanName})]}),h.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:[h.jsx(Gy,{className:"h-3 w-3 flex-shrink-0 text-muted-foreground"}),h.jsx("span",{className:"text-[11px] font-mono",children:d(y.duration)})]}),h.jsx("div",{className:"flex-shrink-0 flex items-center whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:S&&S>0?h.jsxs("div",{className:"flex flex-col justify-center",children:[h.jsxs("div",{className:"font-mono flex items-center text-[11px] leading-tight",children:[_&&h.jsx("span",{className:"inline-block align-middle mr-0.5 text-muted-foreground text-[10px]",children:"∑"}),h.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&h.jsxs("div",{className:"text-muted-foreground text-[9px] font-mono leading-tight mt-0.5",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):h.jsx("span",{className:"text-muted-foreground/40 text-[11px]",children:"—"})}),h.jsx("div",{className:"flex-1 relative h-full min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"8px"},children:p(g)})]}),P&&E&&h.jsx("div",{children:b.map(T=>v(T))})]},y.spanId)};if(!e||e.length===0)return h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:h.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=g=>{const y=gA(g),b=g.spanAttributes||{},x=b["gen_ai.request.model"]||b["gen_ai.response.model"],S=b["gen_ai.request.temperature"],w=b["gen_ai.request.max_tokens"],O=b["gen_ai.request.top_p"],P=[];let E=0;for(;b[`gen_ai.prompt.${E}.role`];)P.push({role:b[`gen_ai.prompt.${E}.role`],content:b[`gen_ai.prompt.${E}.content`]}),E++;const j=[];for(E=0;b[`gen_ai.completion.${E}.role`];)j.push({role:b[`gen_ai.completion.${E}.role`],content:b[`gen_ai.completion.${E}.content`],finishReason:b[`gen_ai.completion.${E}.finish_reason`]}),E++;return h.jsx(xe,{className:"mt-2 border-2",children:h.jsxs(we,{className:"p-3",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsxs(Lr,{variant:"outline",className:`${y.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px]`,children:[y.icon,y.label]}),h.jsx("h4",{className:"font-semibold text-[13px]",children:g.spanName})]}),h.jsx(Yn,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:h.jsx(_d,{className:"h-3 w-3"})})]}),x&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Model Configuration"}),h.jsxs("div",{className:"grid grid-cols-2 gap-1.5 text-[10px] border rounded-md p-2 bg-muted/30",children:[h.jsxs("div",{className:"col-span-2",children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:x})]}),S!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:S})]}),w&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:w})]}),O!==void 0&&h.jsxs("div",{children:[h.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),h.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:O})]})]})]}),P.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Input"}),h.jsx("div",{className:"space-y-1.5",children:P.map((_,T)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),j.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Output"}),h.jsx("div",{className:"space-y-1.5",children:j.map((_,T)=>h.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[h.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),h.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),h.jsxs("details",{className:"mt-2",children:[h.jsxs("summary",{className:"text-[11px] font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-0.5 uppercase tracking-wide",children:["All Attributes (",Object.keys(b).length,")"]}),h.jsx("div",{className:"mt-1.5 text-[11px] space-y-0.5 bg-muted/30 rounded-md p-2 max-h-48 overflow-auto border",children:Object.entries(b).map(([_,T])=>h.jsxs("div",{className:"grid grid-cols-3 gap-2 py-0.5",children:[h.jsxs("span",{className:"text-muted-foreground truncate font-medium text-[10px]",title:_,children:[_,":"]}),h.jsx("span",{className:"col-span-2 font-mono break-all text-[10px] text-foreground",children:String(T)})]},_))})]})]})})};return h.jsx(xe,{className:"shadow-sm",children:h.jsxs(we,{className:"p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Gy,{className:"h-3.5 w-3.5 text-muted-foreground"}),h.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),h.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[d(c*1e6)," · ",e.length," span",e.length!==1?"s":""]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("button",{onClick:a,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Expand all"}),h.jsx("span",{className:"text-muted-foreground/30 text-xs",children:"|"}),h.jsx("button",{onClick:o,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Collapse all"})]})]}),h.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),h.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),h.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[h.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[10px] text-foreground uppercase tracking-wide h-8",children:[h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"320px",paddingLeft:"8px",paddingRight:"8px"},children:"Span Name"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:"Duration"}),h.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:"Tokens"}),h.jsx("div",{className:"flex-1 flex items-center h-full",style:{paddingLeft:"2px",paddingRight:"8px"},children:"Timeline"})]}),s.map(g=>v(g))]}),n&&h.jsx("div",{className:"mt-2",children:m(n)})]})})}function qi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function bA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function p2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=bA(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=A.useMemo(()=>s,Object.values(s));return h.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=A.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Lfe(e,t=[]){let r=[];function n(a,o){const s=A.createContext(o),l=r.length;r=[...r,o];const u=f=>{var y;const{scope:d,children:p,...v}=f,m=((y=d==null?void 0:d[e])==null?void 0:y[l])||s,g=A.useMemo(()=>v,Object.values(v));return h.jsx(m.Provider,{value:g,children:p})};u.displayName=a+"Provider";function c(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,v=A.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>A.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,Ffe(i,...t)]}function Ffe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var mc=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},Bfe=R0[" useId ".trim().toString()]||(()=>{}),zfe=0;function Pv(e){const[t,r]=A.useState(Bfe());return mc(()=>{r(n=>n??String(zfe++))},[e]),e||(t?`radix-${t}`:"")}var Ufe=R0[" useInsertionEffect ".trim().toString()]||mc;function Wfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Hfe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const c=A.useRef(e!==void 0);A.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=A.useCallback(c=>{var f;if(s){const d=Kfe(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else a(c)},[s,e,a,o]);return[l,u]}function Hfe({defaultProp:e,onChange:t}){const[r,n]=A.useState(e),i=A.useRef(r),a=A.useRef(t);return Ufe(()=>{a.current=t},[t]),A.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Kfe(e){return typeof e=="function"}function m2(e){const t=qfe(e),r=A.forwardRef((n,i)=>{const{children:a,...o}=n,s=A.Children.toArray(a),l=s.find(Gfe);if(l){const u=l.props.children,c=s.map(f=>f===l?A.Children.count(u)>1?A.Children.only(null):A.isValidElement(u)?u.props.children:null:f);return h.jsx(t,{...o,ref:i,children:A.isValidElement(u)?A.cloneElement(u,void 0,c):null})}return h.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function qfe(e){const t=A.forwardRef((r,n)=>{const{children:i,...a}=r;if(A.isValidElement(i)){const o=Xfe(i),s=Yfe(a,i.props);return i.type!==A.Fragment&&(s.ref=n?p2(n,o):o),A.cloneElement(i,s)}return A.Children.count(i)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vfe=Symbol("radix.slottable");function Gfe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vfe}function Yfe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Xfe(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],si=Qfe.reduce((e,t)=>{const r=m2(`Primitive.${t}`),n=A.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Jfe(e,t){e&&_b.flushSync(()=>e.dispatchEvent(t))}function vc(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Zfe(e,t=globalThis==null?void 0:globalThis.document){const r=vc(e);A.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ede="DismissableLayer",k0="dismissableLayer.update",tde="dismissableLayer.pointerDownOutside",rde="dismissableLayer.focusOutside",xA,v2=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),y2=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=A.useContext(v2),[c,f]=A.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=A.useState({}),v=fo(t,P=>f(P)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=ade(P=>{const E=P.target,j=[...u.branches].some(_=>_.contains(E));!S||j||(i==null||i(P),o==null||o(P),P.defaultPrevented||s==null||s())},d),O=ode(P=>{const E=P.target;[...u.branches].some(_=>_.contains(E))||(a==null||a(P),o==null||o(P),P.defaultPrevented||s==null||s())},d);return Zfe(P=>{b===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),A.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xA=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),wA(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=xA)}},[c,d,r,u]),A.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),wA())},[c,u]),A.useEffect(()=>{const P=()=>p({});return document.addEventListener(k0,P),()=>document.removeEventListener(k0,P)},[]),h.jsx(si.div,{...l,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:qi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:qi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:qi(e.onPointerDownCapture,w.onPointerDownCapture)})});y2.displayName=ede;var nde="DismissableLayerBranch",ide=A.forwardRef((e,t)=>{const r=A.useContext(v2),n=A.useRef(null),i=fo(t,n);return A.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),h.jsx(si.div,{...e,ref:i})});ide.displayName=nde;function ade(e,t=globalThis==null?void 0:globalThis.document){const r=vc(e),n=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){g2(tde,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ode(e,t=globalThis==null?void 0:globalThis.document){const r=vc(e),n=A.useRef(!1);return A.useEffect(()=>{const i=a=>{a.target&&!n.current&&g2(rde,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function wA(){const e=new CustomEvent(k0);document.dispatchEvent(e)}function g2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Jfe(i,a):i.dispatchEvent(a)}var Ev="focusScope.autoFocusOnMount",Av="focusScope.autoFocusOnUnmount",SA={bubbles:!1,cancelable:!0},sde="FocusScope",b2=A.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=A.useState(null),u=vc(i),c=vc(a),f=A.useRef(null),d=fo(t,m=>l(m)),p=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(n){let m=function(x){if(p.paused||!s)return;const S=x.target;s.contains(S)?f.current=S:pi(f.current,{select:!0})},g=function(x){if(p.paused||!s)return;const S=x.relatedTarget;S!==null&&(s.contains(S)||pi(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&pi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,s,p.paused]),A.useEffect(()=>{if(s){PA.add(p);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(Ev,SA);s.addEventListener(Ev,u),s.dispatchEvent(y),y.defaultPrevented||(lde(hde(x2(s)),{select:!0}),document.activeElement===m&&pi(s))}return()=>{s.removeEventListener(Ev,u),setTimeout(()=>{const y=new CustomEvent(Av,SA);s.addEventListener(Av,c),s.dispatchEvent(y),y.defaultPrevented||pi(m??document.body,{select:!0}),s.removeEventListener(Av,c),PA.remove(p)},0)}}},[s,u,c,p]);const v=A.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[x,S]=ude(b);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&pi(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),r&&pi(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,p.paused]);return h.jsx(si.div,{tabIndex:-1,...o,ref:d,onKeyDown:v})});b2.displayName=sde;function lde(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pi(n,{select:t}),document.activeElement!==r)return}function ude(e){const t=x2(e),r=OA(t,e),n=OA(t.reverse(),e);return[r,n]}function x2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function OA(e,t){for(const r of e)if(!cde(r,{upTo:t}))return r}function cde(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fde(e){return e instanceof HTMLInputElement&&"select"in e}function pi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&fde(e)&&t&&e.select()}}var PA=dde();function dde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=EA(e,t),e.unshift(t)},remove(t){var r;e=EA(e,t),(r=e[0])==null||r.resume()}}}function EA(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hde(e){return e.filter(t=>t.tagName!=="A")}var pde="Portal",w2=A.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=A.useState(!1);mc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?_D.createPortal(h.jsx(si.div,{...n,ref:t}),o):null});w2.displayName=pde;function mde(e,t){return A.useReducer((r,n)=>t[r][n]??r,e)}var im=e=>{const{present:t,children:r}=e,n=vde(t),i=typeof r=="function"?r({present:n.isPresent}):A.Children.only(r),a=fo(n.ref,yde(i));return typeof r=="function"||n.isPresent?A.cloneElement(i,{ref:a}):null};im.displayName="Presence";function vde(e){const[t,r]=A.useState(),n=A.useRef(null),i=A.useRef(e),a=A.useRef("none"),o=e?"mounted":"unmounted",[s,l]=mde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const u=kf(n.current);a.current=s==="mounted"?u:"none"},[s]),mc(()=>{const u=n.current,c=i.current;if(c!==e){const d=a.current,p=kf(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mc(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=p=>{const m=kf(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=p=>{p.target===t&&(a.current=kf(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:A.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function kf(e){return(e==null?void 0:e.animationName)||"none"}function yde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var jv=0;function gde(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??AA()),document.body.insertAdjacentElement("beforeend",e[1]??AA()),jv++,()=>{jv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jv--}},[])}function AA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yn=function(){return yn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Ide;var t=Dde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Lde=E2(),Qo="data-scroll-locked",Fde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(xde,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body[`).concat(Qo,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Zf,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(ed,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(Zf," .").concat(Zf,` { - right: 0 `).concat(n,`; - } - - .`).concat(ed," .").concat(ed,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(Qo,`] { - `).concat(wde,": ").concat(s,`px; - } -`)},_A=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},Bde=function(){A.useEffect(function(){return document.body.setAttribute(Qo,(_A()+1).toString()),function(){var e=_A()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},zde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Bde();var a=A.useMemo(function(){return Rde(i)},[i]);return A.createElement(Lde,{styles:Fde(a,!t,i,r?"":"!important")})},N0=!1;if(typeof window<"u")try{var Nf=Object.defineProperty({},"passive",{get:function(){return N0=!0,!0}});window.addEventListener("test",Nf,Nf),window.removeEventListener("test",Nf,Nf)}catch{N0=!1}var wo=N0?{passive:!1}:!1,Ude=function(e){return e.tagName==="TEXTAREA"},A2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ude(e)&&r[t]==="visible")},Wde=function(e){return A2(e,"overflowY")},Hde=function(e){return A2(e,"overflowX")},TA=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=j2(e,n);if(i){var a=_2(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Kde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},j2=function(e,t){return e==="v"?Wde(t):Hde(t)},_2=function(e,t){return e==="v"?Kde(t):qde(t)},Vde=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gde=function(e,t,r,n,i){var a=Vde(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,d=0;do{if(!s)break;var p=_2(e,s),v=p[0],m=p[1],g=p[2],y=m-g-a*v;(v||y)&&j2(e,s)&&(f+=y,d+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(d)<1)&&(u=!0),u},Cf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kA=function(e){return[e.deltaX,e.deltaY]},NA=function(e){return e&&"current"in e?e.current:e},Yde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xde=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Qde=0,So=[];function Jde(e){var t=A.useRef([]),r=A.useRef([0,0]),n=A.useRef(),i=A.useState(Qde++)[0],a=A.useState(E2)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=bde([e.lockRef.current],(e.shards||[]).map(NA),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=A.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Cf(m),b=r.current,x="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],w,O=m.target,P=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&P==="h"&&O.type==="range")return!1;var E=window.getSelection(),j=E&&E.anchorNode,_=j?j===O||j.contains(O):!1;if(_)return!1;var T=TA(P,O);if(!T)return!0;if(T?w=P:(w=P==="v"?"h":"v",T=TA(P,O)),!T)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=w),!w)return!0;var k=n.current||w;return Gde(k,g,m,k==="h"?x:S)},[]),l=A.useCallback(function(m){var g=m;if(!(!So.length||So[So.length-1]!==a)){var y="deltaY"in g?kA(g):Cf(g),b=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&Yde(w.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(NA).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=x.length>0?s(g,x[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=A.useCallback(function(m,g,y,b){var x={name:m,delta:g,target:y,should:b,shadowParent:Zde(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=A.useCallback(function(m){r.current=Cf(m),n.current=void 0},[]),f=A.useCallback(function(m){u(m.type,kA(m),m.target,s(m,e.lockRef.current))},[]),d=A.useCallback(function(m){u(m.type,Cf(m),m.target,s(m,e.lockRef.current))},[]);A.useEffect(function(){return So.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wo),document.addEventListener("touchmove",l,wo),document.addEventListener("touchstart",c,wo),function(){So=So.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,wo),document.removeEventListener("touchmove",l,wo),document.removeEventListener("touchstart",c,wo)}},[]);var p=e.removeScrollBar,v=e.inert;return A.createElement(A.Fragment,null,v?A.createElement(a,{styles:Xde(i)}):null,p?A.createElement(zde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ehe=_de(P2,Jde);var T2=A.forwardRef(function(e,t){return A.createElement(am,yn({},e,{ref:t,sideCar:ehe}))});T2.classNames=am.classNames;var the=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oo=new WeakMap,$f=new WeakMap,Mf={},Nv=0,k2=function(e){return e&&(e.host||k2(e.parentNode))},rhe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=k2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nhe=function(e,t,r,n){var i=rhe(t,Array.isArray(e)?e:[e]);Mf[r]||(Mf[r]=new WeakMap);var a=Mf[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var p=d.getAttribute(n),v=p!==null&&p!=="false",m=(Oo.get(d)||0)+1,g=(a.get(d)||0)+1;Oo.set(d,m),a.set(d,g),o.push(d),m===1&&v&&$f.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return c(t),s.clear(),Nv++,function(){o.forEach(function(f){var d=Oo.get(f)-1,p=a.get(f)-1;Oo.set(f,d),a.set(f,p),d||($f.has(f)||f.removeAttribute(n),$f.delete(f)),p||f.removeAttribute(r)}),Nv--,Nv||(Oo=new WeakMap,Oo=new WeakMap,$f=new WeakMap,Mf={})}},ihe=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=the(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),nhe(n,i,r,"aria-hidden")):function(){return null}},om="Dialog",[N2]=Lfe(om),[ahe,un]=N2(om),C2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=A.useRef(null),l=A.useRef(null),[u,c]=Wfe({prop:n,defaultProp:i??!1,onChange:a,caller:om});return h.jsx(ahe,{scope:t,triggerRef:s,contentRef:l,contentId:Pv(),titleId:Pv(),descriptionId:Pv(),open:u,onOpenChange:c,onOpenToggle:A.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};C2.displayName=om;var $2="DialogTrigger",ohe=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un($2,r),a=fo(t,i.triggerRef);return h.jsx(si.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":iw(i.open),...n,ref:a,onClick:qi(e.onClick,i.onOpenToggle)})});ohe.displayName=$2;var rw="DialogPortal",[she,M2]=N2(rw,{forceMount:void 0}),I2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=un(rw,t);return h.jsx(she,{scope:t,forceMount:r,children:A.Children.map(n,o=>h.jsx(im,{present:r||a.open,children:h.jsx(w2,{asChild:!0,container:i,children:o})}))})};I2.displayName=rw;var Lh="DialogOverlay",D2=A.forwardRef((e,t)=>{const r=M2(Lh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=un(Lh,e.__scopeDialog);return a.modal?h.jsx(im,{present:n||a.open,children:h.jsx(uhe,{...i,ref:t})}):null});D2.displayName=Lh;var lhe=m2("DialogOverlay.RemoveScroll"),uhe=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(Lh,r);return h.jsx(T2,{as:lhe,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(si.div,{"data-state":iw(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),to="DialogContent",R2=A.forwardRef((e,t)=>{const r=M2(to,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=un(to,e.__scopeDialog);return h.jsx(im,{present:n||a.open,children:a.modal?h.jsx(che,{...i,ref:t}):h.jsx(fhe,{...i,ref:t})})});R2.displayName=to;var che=A.forwardRef((e,t)=>{const r=un(to,e.__scopeDialog),n=A.useRef(null),i=fo(t,r.contentRef,n);return A.useEffect(()=>{const a=n.current;if(a)return ihe(a)},[]),h.jsx(L2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:qi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:qi(e.onFocusOutside,a=>a.preventDefault())})}),fhe=A.forwardRef((e,t)=>{const r=un(to,e.__scopeDialog),n=A.useRef(!1),i=A.useRef(!1);return h.jsx(L2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),L2=A.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=un(to,r),l=A.useRef(null),u=fo(t,l);return gde(),h.jsxs(h.Fragment,{children:[h.jsx(b2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:h.jsx(y2,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":iw(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(dhe,{titleId:s.titleId}),h.jsx(phe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),nw="DialogTitle",F2=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(nw,r);return h.jsx(si.h2,{id:i.titleId,...n,ref:t})});F2.displayName=nw;var B2="DialogDescription",z2=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(B2,r);return h.jsx(si.p,{id:i.descriptionId,...n,ref:t})});z2.displayName=B2;var U2="DialogClose",W2=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=un(U2,r);return h.jsx(si.button,{type:"button",...n,ref:t,onClick:qi(e.onClick,()=>i.onOpenChange(!1))})});W2.displayName=U2;function iw(e){return e?"open":"closed"}var H2="DialogTitleWarning",[Whe,K2]=Rfe(H2,{contentName:to,titleName:nw,docsSlug:"dialog"}),dhe=({titleId:e})=>{const t=K2(H2),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},hhe="DialogDescriptionWarning",phe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${K2(hhe).contentName}}.`;return A.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},mhe=C2,vhe=I2,q2=D2,V2=R2,G2=F2,Y2=z2,yhe=W2;const ghe=mhe,bhe=vhe,X2=A.forwardRef(({className:e,...t},r)=>h.jsx(q2,{ref:r,className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));X2.displayName=q2.displayName;const Q2=A.forwardRef(({className:e,children:t,...r},n)=>h.jsxs(bhe,{children:[h.jsx(X2,{}),h.jsxs(V2,{ref:n,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,h.jsxs(yhe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(_d,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Q2.displayName=V2.displayName;const J2=({className:e,...t})=>h.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});J2.displayName="DialogHeader";const Z2=A.forwardRef(({className:e,...t},r)=>h.jsx(G2,{ref:r,className:fe("text-lg font-semibold leading-none tracking-tight",e),...t}));Z2.displayName=G2.displayName;const eM=A.forwardRef(({className:e,...t},r)=>h.jsx(Y2,{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));eM.displayName=Y2.displayName;function tM({open:e,onOpenChange:t,artifactContent:r,isLoading:n,error:i,title:a="Artifact Content"}){const[o,s]=A.useState(!1),l=()=>{r!=null&&r.content&&(navigator.clipboard.writeText(r.content),s(!0),setTimeout(()=>s(!1),2e3))},u=()=>{if(!r)return"";const{content:f,filename:d,contentType:p}=r;if(p==="application/json"||d.endsWith(".json"))try{const v=JSON.parse(f);return JSON.stringify(v,null,2)}catch{return f}return f},c=()=>{if(!r)return"";const{filename:f,contentType:d}=r;return d==="application/json"||f.endsWith(".json")?"language-json":""};return h.jsx(ghe,{open:e,onOpenChange:t,children:h.jsxs(Q2,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[h.jsx(J2,{children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx(Z2,{className:"text-base",children:a}),h.jsx(eM,{className:"text-xs font-mono mt-1 truncate",children:(r==null?void 0:r.filename)||"Loading..."})]}),r&&h.jsx(Yn,{variant:"ghost",size:"sm",onClick:l,className:"ml-2 h-7 w-7 p-0 flex-shrink-0",title:o?"Copied!":"Copy to clipboard",children:o?h.jsx(JT,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(ZT,{className:"h-3.5 w-3.5"})})]})}),h.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:n&&!r?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):i?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):h.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${c()}`,children:h.jsx("code",{className:"text-slate-50",children:u()})})})]})})}const xhe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function whe(){var S,w;const{id:e}=bT(),{data:t,isLoading:r,error:n}=mk(e),[i,a]=A.useState(!1),[o,s]=A.useState("overview"),l=(t==null?void 0:t.metrics)||[],u=(t==null?void 0:t.spans)||[],c=r,f=r,d=n,p=(S=t==null?void 0:t.meta)==null?void 0:S.execution_result,v=(p==null?void 0:p.path)&&(p==null?void 0:p.file_name);let m="";if(v){let O=p.path;if(O.includes(":")&&(O=O.split(":")[1]),O.includes("/")){const P=O.split("/");O=P[P.length-1],O.includes(":")&&(O=O.split(":")[1])}m=O}const{data:g,isLoading:y,error:b}=h2((t==null?void 0:t.teamId)||"",m,"execution",i&&v),x=()=>{!v||!t||a(!0)};return b&&i&&console.error("Failed to load artifact:",b),r?h.jsxs("div",{className:"space-y-4",children:[h.jsx(De,{className:"h-12 w-64"}),h.jsx(De,{className:"h-96 w-full"})]}):n||!t?h.jsxs(xe,{children:[h.jsxs(or,{children:[h.jsx(sr,{children:"Error"}),h.jsx(xr,{children:"Failed to load run"})]}),h.jsx(we,{children:h.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),h.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),h.jsx(Lr,{variant:xhe[t.status],children:t.status})]}),h.jsxs(ew,{value:o,onValueChange:s,children:[h.jsxs(tw,{children:[h.jsx(hc,{value:"overview",children:"Overview"}),h.jsx(hc,{value:"traces",children:"Traces"})]}),h.jsxs(pc,{value:"overview",className:"space-y-4",children:[h.jsx(xe,{children:h.jsxs(we,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),h.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[v&&h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:h.jsxs("button",{onClick:x,disabled:y,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[h.jsx(yF,{className:"h-3.5 w-3.5"}),p.file_name]})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=t.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&t.aggregatedTokens.totalTokens>0?h.jsxs(h.Fragment,{children:[Number(t.aggregatedTokens.totalTokens).toLocaleString(),h.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.aggregatedTokens.inputTokens||0).toLocaleString(),"↓ ",Number(t.aggregatedTokens.outputTokens||0).toLocaleString(),"↑)"]})]}):h.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),h.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(O=>O!=="execution_result").length>0&&h.jsxs("div",{className:"mt-5 pt-5 border-t",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([O])=>O!=="execution_result").map(([O,P])=>h.jsxs("div",{className:"break-words",children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]})]})}),h.jsx(xe,{children:h.jsxs(we,{className:"p-4",children:[h.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),c?h.jsx(De,{className:"h-32 w-full"}):l.length===0?h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):h.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:l.map(O=>h.jsxs("div",{children:[h.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O.key}),h.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:O.value})]},O.id))})]})})]}),h.jsx(pc,{value:"traces",children:f?h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:h.jsx(De,{className:"h-64 w-full"})})}):d?h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:h.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",d.message]})})}):u&&u.length>0?h.jsx(Dfe,{spans:u}):h.jsx(xe,{children:h.jsx(we,{className:"p-4",children:h.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),h.jsx(tM,{open:i,onOpenChange:a,artifactContent:g,isLoading:y,error:b,title:"Artifact Content"})]})}function She(){const{selectedTeamId:e}=Qs(),[t,r]=A.useState(""),[n,i]=A.useState(""),[a,o]=A.useState(null),[s,l]=A.useState(null),[u,c]=A.useState(!1),{data:f,isLoading:d,error:p}=Mfe(),m=(E=>{if(!E)return"";const j=E.split("/");return j[j.length-1]})(a),{data:g,isLoading:y}=Ife(e||"",m),{data:b,isLoading:x,error:S}=h2(e||"",s||"",m,u&&!!s),w=A.useMemo(()=>{if(!f)return[];if(!t.trim())return f;const E=t.toLowerCase();return f.filter(j=>j.toLowerCase().includes(E))},[f,t]),O=A.useMemo(()=>{if(!g)return[];if(!n.trim())return g;const E=n.toLowerCase();return g.filter(j=>j.toLowerCase().includes(E))},[g,n]),P=E=>{l(E),c(!0)};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiment artifacts"})]}),h.jsxs("div",{className:"grid grid-cols-12 gap-4",children:[h.jsxs(xe,{className:"border-0 shadow-sm col-span-4",children:[h.jsxs(or,{className:"pb-3",children:[h.jsx(sr,{className:"text-base font-semibold",children:"Repositories"}),h.jsxs(xr,{className:"text-[13px]",children:[(f==null?void 0:f.length)||0," repositories available"]})]}),h.jsxs(we,{children:[h.jsxs("div",{className:"relative mb-4",children:[h.jsx(ku,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(qs,{placeholder:"Search repositories...",value:t,onChange:E=>r(E.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d?h.jsxs("div",{className:"space-y-1",children:[h.jsx(De,{className:"h-11 w-full"}),h.jsx(De,{className:"h-11 w-full"}),h.jsx(De,{className:"h-11 w-full"})]}):p?h.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[h.jsx(Xf,{className:"h-10 w-10 text-muted-foreground mb-2 opacity-30"}),h.jsx("p",{className:"text-[12px] font-medium text-destructive",children:"Failed to load"})]}):!w||w.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[h.jsx(Xf,{className:"h-10 w-10 text-muted-foreground mb-2 opacity-30"}),h.jsx("p",{className:"text-[12px] font-medium text-muted-foreground",children:"No repositories"})]}):h.jsx("div",{className:"space-y-1 max-h-[600px] overflow-y-auto pr-1",children:w.map(E=>h.jsx("button",{onClick:()=>o(E),title:E,className:`w-full text-left px-3 py-2.5 rounded-md transition-all ${a===E?"bg-blue-50 text-blue-700":"hover:bg-accent"}`,children:h.jsxs("div",{className:"flex items-start gap-2.5",children:[h.jsx(Xf,{className:`h-4 w-4 flex-shrink-0 mt-0.5 ${a===E?"text-blue-600":"text-muted-foreground"}`}),h.jsx("span",{className:"text-[13px] font-mono font-medium break-all leading-relaxed",children:E})]})},E))})]})]}),h.jsxs(xe,{className:"border-0 shadow-sm col-span-8",children:[h.jsxs(or,{className:"pb-3",children:[h.jsx(sr,{className:"text-base font-semibold",children:a?`Tags in ${a}`:"Tags"}),h.jsx(xr,{className:"text-[13px]",children:a?`${(O==null?void 0:O.length)||0} tags available`:"Select a repository to view tags"})]}),h.jsx(we,{children:a?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"relative mb-4",children:[h.jsx(ku,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),h.jsx(qs,{placeholder:"Search tags...",value:n,onChange:E=>i(E.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),y?h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:[h.jsx(De,{className:"h-11 w-full"}),h.jsx(De,{className:"h-11 w-full"}),h.jsx(De,{className:"h-11 w-full"})]}):!O||O.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[h.jsx(Fm,{className:"h-10 w-10 text-muted-foreground mb-2 opacity-30"}),h.jsx("p",{className:"text-[12px] font-medium text-muted-foreground",children:n?"No matching tags":"No tags found"})]}):h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 max-h-[500px] overflow-y-auto",children:O.map(E=>h.jsx("button",{onClick:()=>P(E),title:E,className:"text-left px-3 py-2.5 rounded-md border border-border bg-background hover:bg-blue-50 hover:border-blue-300 transition-all",children:h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx(Fm,{className:"h-3.5 w-3.5 flex-shrink-0 mt-0.5 text-blue-600"}),h.jsx("span",{className:"text-[13px] font-mono break-all leading-relaxed",children:E})]})},E))})]}):h.jsxs("div",{className:"flex flex-col items-center justify-center h-[500px] text-center",children:[h.jsx(Fm,{className:"h-12 w-12 text-muted-foreground mb-3 opacity-20"}),h.jsx("p",{className:"text-[13px] font-medium text-muted-foreground",children:"Select a repository"}),h.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Choose a repository from the left panel"})]})})]})]}),h.jsx(tM,{open:u,onOpenChange:c,artifactContent:b,isLoading:x,error:S,title:s||"Artifact Content"})]})}function Ohe(){const[e,t]=A.useState(null),[r,n]=A.useState(!0),[i,a]=A.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=Qs(),l=uT();return A.useEffect(()=>{async function u(){try{const c=await xL(),f=localStorage.getItem("alphatrion_user_id");f&&f!==c&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",c);const d=await lr(ur.getUser,{id:c});if(!d.user)throw new Error(`User with ID ${c} not found`);t(d.user);const p=await lr(ur.listTeams,{userId:c});if(p.teams&&p.teams.length>0){const v=`alphatrion_selected_team_${c}`,m=localStorage.getItem(v);let g;m&&p.teams.find(b=>b.id===m)?g=m:g=p.teams[0].id,s(g,c)}}catch(c){console.error("Failed to initialize app:",c),a(c)}finally{n(!1)}}u()},[s,l]),r?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),h.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?h.jsx("div",{className:"flex h-screen items-center justify-center",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),h.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),h.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),h.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[h.jsx("li",{children:"• The user ID exists in the database"}),h.jsx("li",{children:"• The backend server is running"}),h.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?h.jsx("div",{className:"h-full",children:h.jsx(X3,{user:e,children:h.jsx(iL,{children:h.jsxs(Hr,{path:"/",element:h.jsx(N5,{}),children:[h.jsx(Hr,{index:!0,element:h.jsx(sfe,{})}),h.jsxs(Hr,{path:"experiments",children:[h.jsx(Hr,{index:!0,element:h.jsx(hfe,{})}),h.jsx(Hr,{path:":id",element:h.jsx(Ofe,{})}),h.jsx(Hr,{path:"compare",element:h.jsx(jfe,{})})]}),h.jsxs(Hr,{path:"runs",children:[h.jsx(Hr,{index:!0,element:h.jsx(kfe,{})}),h.jsx(Hr,{path:":id",element:h.jsx(whe,{})})]}),h.jsx(Hr,{path:"artifacts",element:h.jsx(She,{})})]})})})}):null}Cv.createRoot(document.getElementById("root")).render(h.jsx(N.StrictMode,{children:h.jsx(ZD,{client:yL,children:h.jsx(dL,{children:h.jsx(gL,{children:h.jsx(Ohe,{})})})})}));export{Vc as c,Ae as g,yre as p,A as r}; diff --git a/dashboard/static/assets/index-Cimlr8QB.js b/dashboard/static/assets/index-Cimlr8QB.js new file mode 100644 index 00000000..7fe70b43 --- /dev/null +++ b/dashboard/static/assets/index-Cimlr8QB.js @@ -0,0 +1,575 @@ +var aw=e=>{throw TypeError(e)};var om=(e,t,r)=>t.has(e)||aw("Cannot "+r);var $=(e,t,r)=>(om(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?aw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(om(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),me=(e,t,r)=>(om(e,t,"access private method"),r);var Hc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return $(e,t,n)}});function JM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BA={exports:{}},Dh={},zA={exports:{}},pe={};/** + * @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 bc=Symbol.for("react.element"),ZM=Symbol.for("react.portal"),e2=Symbol.for("react.fragment"),t2=Symbol.for("react.strict_mode"),r2=Symbol.for("react.profiler"),n2=Symbol.for("react.provider"),i2=Symbol.for("react.context"),a2=Symbol.for("react.forward_ref"),o2=Symbol.for("react.suspense"),s2=Symbol.for("react.memo"),l2=Symbol.for("react.lazy"),ow=Symbol.iterator;function u2(e){return e===null||typeof e!="object"?null:(e=ow&&e[ow]||e["@@iterator"],typeof e=="function"?e:null)}var UA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},WA=Object.assign,HA={};function qs(e,t,r){this.props=e,this.context=t,this.refs=HA,this.updater=r||UA}qs.prototype.isReactComponent={};qs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function KA(){}KA.prototype=qs.prototype;function k0(e,t,r){this.props=e,this.context=t,this.refs=HA,this.updater=r||UA}var C0=k0.prototype=new KA;C0.constructor=k0;WA(C0,qs.prototype);C0.isPureReactComponent=!0;var sw=Array.isArray,qA=Object.prototype.hasOwnProperty,N0={current:null},VA={key:!0,ref:!0,__self:!0,__source:!0};function GA(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)qA.call(t,n)&&!VA.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=N[V];if(0>>1;Vi(be,W))Uei(we,be)?(N[V]=we,N[Ue]=W,V=Ue):(N[V]=be,N[re]=W,V=re);else if(Uei(we,W))N[V]=we,N[Ue]=W,V=Ue;else break e}}return F}function i(N,F){var W=N.sortIndex-F.sortIndex;return W!==0?W:N.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(N){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=N)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S(N){if(m=!1,x(N),!v)if(r(l)!==null)v=!0,L(w);else{var F=r(u);F!==null&&z(S,F.startTime-N)}}function w(N,F){v=!1,m&&(m=!1,y(E),E=-1),h=!0;var W=d;try{for(x(F),f=r(l);f!==null&&(!(f.expirationTime>F)||N&&!T());){var V=f.callback;if(typeof V=="function"){f.callback=null,d=f.priorityLevel;var H=V(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(l)&&n(l),x(F)}else n(l);f=r(l)}if(f!==null)var Y=!0;else{var re=r(u);re!==null&&z(S,re.startTime-F),Y=!1}return Y}finally{f=null,d=W,h=!1}}var O=!1,P=null,E=-1,j=5,_=-1;function T(){return!(e.unstable_now()-_N||125V?(N.sortIndex=W,t(u,N),r(l)===null&&N===r(u)&&(m?(y(E),E=-1):m=!0,z(S,W-V))):(N.sortIndex=H,t(l,N),v||h||(v=!0,L(w))),N},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(N){var F=d;return function(){var W=d;d=F;try{return N.apply(this,arguments)}finally{d=W}}}})(ZA);JA.exports=ZA;var x2=JA.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 w2=A,mr=x2;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kv=Object.prototype.hasOwnProperty,S2=/^[: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]*$/,uw={},cw={};function O2(e){return kv.call(cw,e)?!0:kv.call(uw,e)?!1:S2.test(e)?cw[e]=!0:(uw[e]=!0,!1)}function P2(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function E2(e,t,r,n){if(t===null||typeof t>"u"||P2(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Gt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var _t={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_t[e]=new Gt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_t[t]=new Gt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_t[e]=new Gt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_t[e]=new Gt(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){_t[e]=new Gt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_t[e]=new Gt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_t[e]=new Gt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_t[e]=new Gt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_t[e]=new Gt(e,5,!1,e.toLowerCase(),null,!1,!1)});var I0=/[\-:]([a-z])/g;function D0(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(I0,D0);_t[t]=new Gt(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(I0,D0);_t[t]=new Gt(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(I0,D0);_t[t]=new Gt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_t[e]=new Gt(e,1,!1,e.toLowerCase(),null,!1,!1)});_t.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_t[e]=new Gt(e,1,!1,e.toLowerCase(),null,!0,!0)});function R0(e,t,r,n){var i=_t.hasOwnProperty(t)?_t[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{um=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Rl(e):""}function A2(e){switch(e.tag){case 5:return Rl(e.type);case 16:return Rl("Lazy");case 13:return Rl("Suspense");case 19:return Rl("SuspenseList");case 0:case 2:case 15:return e=cm(e.type,!1),e;case 11:return e=cm(e.type.render,!1),e;case 1:return e=cm(e.type,!0),e;default:return""}}function Mv(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 Eo:return"Fragment";case Po:return"Portal";case Cv:return"Profiler";case L0:return"StrictMode";case Nv:return"Suspense";case $v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rj:return(e.displayName||"Context")+".Consumer";case tj:return(e._context.displayName||"Context")+".Provider";case F0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B0:return t=e.displayName||null,t!==null?t:Mv(e.type)||"Memo";case mi:t=e._payload,e=e._init;try{return Mv(e(t))}catch{}}return null}function j2(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 Mv(t);case 8:return t===L0?"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 Vi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ij(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _2(e){var t=ij(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gc(e){e._valueTracker||(e._valueTracker=_2(e))}function aj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=ij(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Jf(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 Iv(e,t){var r=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function dw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function oj(e,t){t=t.checked,t!=null&&R0(e,"checked",t,!1)}function Dv(e,t){oj(e,t);var r=Vi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Rv(e,t.type,Vi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Rv(e,t,r){(t!=="number"||Jf(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ll=Array.isArray;function zo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Yc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Wl={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},T2=["Webkit","ms","Moz","O"];Object.keys(Wl).forEach(function(e){T2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wl[t]=Wl[e]})});function cj(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Wl.hasOwnProperty(e)&&Wl[e]?(""+t).trim():t+"px"}function fj(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=cj(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var k2=Ge({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 Bv(e,t){if(t){if(k2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function zv(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 Uv=null;function z0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wv=null,Uo=null,Wo=null;function vw(e){if(e=Sc(e)){if(typeof Wv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=zh(t),Wv(e.stateNode,e.type,t))}}function dj(e){Uo?Wo?Wo.push(e):Wo=[e]:Uo=e}function hj(){if(Uo){var e=Uo,t=Wo;if(Wo=Uo=null,vw(e),t)for(e=0;e>>=0,e===0?32:31-(z2(e)/U2|0)|0}var Xc=64,Qc=4194304;function Fl(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 rd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Fl(s):(a&=o,a!==0&&(n=Fl(a)))}else o=r&~i,o!==0?n=Fl(o):a!==0&&(n=Fl(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function xc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qr(t),e[t]=r}function q2(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=Kl),Ew=" ",Aw=!1;function $j(e,t){switch(e){case"keyup":return xI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ao=!1;function SI(e,t){switch(e){case"compositionend":return Mj(t);case"keypress":return t.which!==32?null:(Aw=!0,Ew);case"textInput":return e=t.data,e===Ew&&Aw?null:e;default:return null}}function OI(e,t){if(Ao)return e==="compositionend"||!Y0&&$j(e,t)?(e=Cj(),Df=q0=Ti=null,Ao=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=kw(r)}}function Lj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fj(){for(var e=window,t=Jf();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Jf(e.document)}return t}function X0(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 NI(e){var t=Fj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Lj(r.ownerDocument.documentElement,r)){if(n!==null&&X0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Cw(r,a);var o=Cw(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,jo=null,Yv=null,Vl=null,Xv=!1;function Nw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Xv||jo==null||jo!==Jf(n)||(n=jo,"selectionStart"in n&&X0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Vl&&pu(Vl,n)||(Vl=n,n=ad(Yv,"onSelect"),0ko||(e.current=ry[ko],ry[ko]=null,ko--)}function De(e,t){ko++,ry[ko]=e.current,e.current=t}var Gi={},Dt=Qi(Gi),tr=Qi(!1),za=Gi;function fs(e,t){var r=e.type.contextTypes;if(!r)return Gi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function rr(e){return e=e.childContextTypes,e!=null}function sd(){ze(tr),ze(Dt)}function Fw(e,t,r){if(Dt.current!==Gi)throw Error(K(168));De(Dt,t),De(tr,r)}function Gj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,j2(e)||"Unknown",i));return Ge({},r,n)}function ld(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gi,za=Dt.current,De(Dt,e),De(tr,tr.current),!0}function Bw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=Gj(e,t,za),n.__reactInternalMemoizedMergedChildContext=e,ze(tr),ze(Dt),De(Dt,e)):ze(tr),De(tr,r)}var Mn=null,Uh=!1,Pm=!1;function Yj(e){Mn===null?Mn=[e]:Mn.push(e)}function HI(e){Uh=!0,Yj(e)}function Ji(){if(!Pm&&Mn!==null){Pm=!0;var e=0,t=ke;try{var r=Mn;for(ke=1;e>=o,i-=o,Rn=1<<32-Qr(t)+i|r<E?(j=P,P=null):j=P.sibling;var _=d(y,P,x[E],S);if(_===null){P===null&&(P=j);break}e&&P&&_.alternate===null&&t(y,P),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_,P=j}if(E===x.length)return r(y,P),We&&ca(y,E),w;if(P===null){for(;EE?(j=P,P=null):j=P.sibling;var T=d(y,P,_.value,S);if(T===null){P===null&&(P=j);break}e&&P&&T.alternate===null&&t(y,P),b=a(T,b,E),O===null?w=T:O.sibling=T,O=T,P=j}if(_.done)return r(y,P),We&&ca(y,E),w;if(P===null){for(;!_.done;E++,_=x.next())_=f(y,_.value,S),_!==null&&(b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return We&&ca(y,E),w}for(P=n(y,P);!_.done;E++,_=x.next())_=h(P,y,E,_.value,S),_!==null&&(e&&_.alternate!==null&&P.delete(_.key===null?E:_.key),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_);return e&&P.forEach(function(k){return t(y,k)}),We&&ca(y,E),w}function g(y,b,x,S){if(typeof x=="object"&&x!==null&&x.type===Eo&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Vc:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===Eo){if(O.tag===7){r(y,O.sibling),b=i(O,x.props.children),b.return=y,y=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===mi&&Ww(w)===O.type){r(y,O.sibling),b=i(O,x.props),b.ref=xl(y,O,x),b.return=y,y=b;break e}r(y,O);break}else t(y,O);O=O.sibling}x.type===Eo?(b=Da(x.props.children,y.mode,S,x.key),b.return=y,y=b):(S=Hf(x.type,x.key,x.props,null,y.mode,S),S.ref=xl(y,b,x),S.return=y,y=S)}return o(y);case Po:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else t(y,b);b=b.sibling}b=Nm(x,y.mode,S),b.return=y,y=b}return o(y);case mi:return O=x._init,g(y,b,O(x._payload),S)}if(Ll(x))return v(y,b,x,S);if(ml(x))return m(y,b,x,S);af(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,x),b.return=y,y=b):(r(y,b),b=Cm(x,y.mode,S),b.return=y,y=b),o(y)):r(y,b)}return g}var hs=Zj(!0),e_=Zj(!1),fd=Qi(null),dd=null,$o=null,eb=null;function tb(){eb=$o=dd=null}function rb(e){var t=fd.current;ze(fd),e._currentValue=t}function ay(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ko(e,t){dd=e,eb=$o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zt=!0),e.firstContext=null)}function Nr(e){var t=e._currentValue;if(eb!==e)if(e={context:e,memoizedValue:t,next:null},$o===null){if(dd===null)throw Error(K(308));$o=e,dd.dependencies={lanes:0,firstContext:e}}else $o=$o.next=e;return t}var ga=null;function nb(e){ga===null?ga=[e]:ga.push(e)}function t_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,nb(t)):(r.next=i.next,i.next=r),t.interleaved=r,Vn(e,n)}function Vn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var vi=!1;function ib(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r_(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 Un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ge&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Vn(e,r)}return i=n.interleaved,i===null?(t.next=t,nb(n)):(t.next=i.next,i.next=t),n.interleaved=t,Vn(e,r)}function Lf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,W0(e,r)}}function Hw(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function hd(e,t,r,n){var i=e.updateQueue;vi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var d=s.lane,h=s.eventTime;if((n&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(d=t,h=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(h,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,d=typeof v=="function"?v.call(h,f,d):v,d==null)break e;f=Ge({},f,d);break e;case 2:vi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ha|=o,e.lanes=o,e.memoizedState=f}}function Kw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Am.transition;Am.transition={};try{e(!1),t()}finally{ke=r,Am.transition=n}}function b_(){return $r().memoizedState}function GI(e,t,r){var n=Bi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},x_(e))w_(t,r);else if(r=t_(e,t,r,n),r!==null){var i=Kt();Jr(r,e,n,i),S_(r,t,n)}}function YI(e,t,r){var n=Bi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(x_(e))w_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,tn(s,o)){var l=t.interleaved;l===null?(i.next=i,nb(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=t_(e,t,i,n),r!==null&&(i=Kt(),Jr(r,e,n,i),S_(r,t,n))}}function x_(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function w_(e,t){Gl=md=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function S_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,W0(e,r)}}var vd={readContext:Nr,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useInsertionEffect:Tt,useLayoutEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useMutableSource:Tt,useSyncExternalStore:Tt,useId:Tt,unstable_isNewReconciler:!1},XI={readContext:Nr,useCallback:function(e,t){return fn().memoizedState=[e,t===void 0?null:t],e},useContext:Nr,useEffect:Vw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Bf(4194308,4,p_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Bf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bf(4,2,e,t)},useMemo:function(e,t){var r=fn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=fn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=GI.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=fn();return e={current:e},t.memoizedState=e},useState:qw,useDebugValue:db,useDeferredValue:function(e){return fn().memoizedState=e},useTransition:function(){var e=qw(!1),t=e[0];return e=VI.bind(null,e[1]),fn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ve,i=fn();if(We){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),xt===null)throw Error(K(349));Wa&30||o_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Vw(l_.bind(null,n,a,e),[e]),n.flags|=2048,Su(9,s_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=fn(),t=xt.identifierPrefix;if(We){var r=Ln,n=Rn;r=(n&~(1<<32-Qr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=xu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[mn]=t,e[yu]=n,N_(e,t,!1,!1),t.stateNode=e;e:{switch(o=zv(r,n),r){case"dialog":Le("cancel",e),Le("close",e),i=n;break;case"iframe":case"object":case"embed":Le("load",e),i=n;break;case"video":case"audio":for(i=0;ivs&&(t.flags|=128,n=!0,wl(a,!1),t.lanes=4194304)}else{if(!n)if(e=pd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!We)return kt(t),null}else 2*tt()-a.renderingStartTime>vs&&r!==1073741824&&(t.flags|=128,n=!0,wl(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=tt(),t.sibling=null,r=Ke.current,De(Ke,n?r&1|2:r&1),t):(kt(t),null);case 22:case 23:return gb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?ur&1073741824&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function iD(e,t){switch(J0(t),t.tag){case 1:return rr(t.type)&&sd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),ze(tr),ze(Dt),sb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ob(t),null;case 13:if(ze(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ke),null;case 4:return ps(),null;case 10:return rb(t.type._context),null;case 22:case 23:return gb(),null;case 24:return null;default:return null}}var sf=!1,$t=!1,aD=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Mo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qe(e,t,n)}else r.current=null}function py(e,t,r){try{r()}catch(n){Qe(e,t,n)}}var i1=!1;function oD(e,t){if(Qv=nd,e=Fj(),X0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===r&&++u===i&&(s=o),d===a&&++c===n&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jv={focusedElem:e,selectionRange:r},nd=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Wr(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){Qe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return v=i1,i1=!1,v}function Yl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&py(t,r,a)}i=i.next}while(i!==n)}}function Kh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function my(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function I_(e){var t=e.alternate;t!==null&&(e.alternate=null,I_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mn],delete t[yu],delete t[ty],delete t[UI],delete t[WI])),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 D_(e){return e.tag===5||e.tag===3||e.tag===4}function a1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||D_(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 vy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=od));else if(n!==4&&(e=e.child,e!==null))for(vy(e,t,r),e=e.sibling;e!==null;)vy(e,t,r),e=e.sibling}function yy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(yy(e,t,r),e=e.sibling;e!==null;)yy(e,t,r),e=e.sibling}var Pt=null,qr=!1;function ui(e,t,r){for(r=r.child;r!==null;)R_(e,t,r),r=r.sibling}function R_(e,t,r){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(Rh,r)}catch{}switch(r.tag){case 5:$t||Mo(r,t);case 6:var n=Pt,i=qr;Pt=null,ui(e,t,r),Pt=n,qr=i,Pt!==null&&(qr?(e=Pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Pt.removeChild(r.stateNode));break;case 18:Pt!==null&&(qr?(e=Pt,r=r.stateNode,e.nodeType===8?Om(e.parentNode,r):e.nodeType===1&&Om(e,r),du(e)):Om(Pt,r.stateNode));break;case 4:n=Pt,i=qr,Pt=r.stateNode.containerInfo,qr=!0,ui(e,t,r),Pt=n,qr=i;break;case 0:case 11:case 14:case 15:if(!$t&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&py(r,t,o),i=i.next}while(i!==n)}ui(e,t,r);break;case 1:if(!$t&&(Mo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qe(r,t,s)}ui(e,t,r);break;case 21:ui(e,t,r);break;case 22:r.mode&1?($t=(n=$t)||r.memoizedState!==null,ui(e,t,r),$t=n):ui(e,t,r);break;default:ui(e,t,r)}}function o1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new aD),t.forEach(function(n){var i=mD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Br(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=tt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*lD(n/1960))-n,10e?16:e,ki===null)var n=!1;else{if(e=ki,ki=null,bd=0,ge&6)throw Error(K(331));var i=ge;for(ge|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;ltt()-vb?Ia(e,0):mb|=r),nr(e,t)}function K_(e,t){t===0&&(e.mode&1?(t=Qc,Qc<<=1,!(Qc&130023424)&&(Qc=4194304)):t=1);var r=Kt();e=Vn(e,t),e!==null&&(xc(e,t,r),nr(e,r))}function pD(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),K_(e,r)}function mD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),K_(e,r)}var q_;q_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||tr.current)Zt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Zt=!1,rD(e,t,r);Zt=!!(e.flags&131072)}else Zt=!1,We&&t.flags&1048576&&Xj(t,cd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;zf(e,t),e=t.pendingProps;var i=fs(t,Dt.current);Ko(t,r),i=ub(null,t,n,e,i,r);var a=cb();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rr(n)?(a=!0,ld(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ib(t),i.updater=Hh,t.stateNode=i,i._reactInternals=t,sy(t,n,e,r),t=cy(null,t,n,!0,a,r)):(t.tag=0,We&&a&&Q0(t),Ft(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(zf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=yD(n),e=Wr(n,e),i){case 0:t=uy(null,t,n,e,r);break e;case 1:t=t1(null,t,n,e,r);break e;case 11:t=Zw(null,t,n,e,r);break e;case 14:t=e1(null,t,n,Wr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Wr(n,i),uy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Wr(n,i),t1(e,t,n,i,r);case 3:e:{if(T_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,r_(e,t),hd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ms(Error(K(423)),t),t=r1(e,t,n,r,i);break e}else if(n!==i){i=ms(Error(K(424)),t),t=r1(e,t,n,r,i);break e}else for(dr=Ri(t.stateNode.containerInfo.firstChild),hr=t,We=!0,Yr=null,r=e_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ds(),n===i){t=Gn(e,t,r);break e}Ft(e,t,n,r)}t=t.child}return t;case 5:return n_(t),e===null&&iy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Zv(n,i)?o=null:a!==null&&Zv(n,a)&&(t.flags|=32),__(e,t),Ft(e,t,o,r),t.child;case 6:return e===null&&iy(t),null;case 13:return k_(e,t,r);case 4:return ab(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=hs(t,null,n,r):Ft(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Wr(n,i),Zw(e,t,n,i,r);case 7:return Ft(e,t,t.pendingProps,r),t.child;case 8:return Ft(e,t,t.pendingProps.children,r),t.child;case 12:return Ft(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,De(fd,n._currentValue),n._currentValue=o,a!==null)if(tn(a.value,o)){if(a.children===i.children&&!tr.current){t=Gn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Un(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),ay(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),ay(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ft(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ko(t,r),i=Nr(i),n=n(i),t.flags|=1,Ft(e,t,n,r),t.child;case 14:return n=t.type,i=Wr(n,t.pendingProps),i=Wr(n.type,i),e1(e,t,n,i,r);case 15:return A_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Wr(n,i),zf(e,t),t.tag=1,rr(n)?(e=!0,ld(t)):e=!1,Ko(t,r),O_(t,n,i),sy(t,n,i,r),cy(null,t,n,!0,e,r);case 19:return C_(e,t,r);case 22:return j_(e,t,r)}throw Error(K(156,t.tag))};function V_(e,t){return xj(e,t)}function vD(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(e,t,r,n){return new vD(e,t,r,n)}function xb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yD(e){if(typeof e=="function")return xb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F0)return 11;if(e===B0)return 14}return 2}function zi(e,t){var r=e.alternate;return r===null?(r=jr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Hf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")xb(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Eo:return Da(r.children,i,a,t);case L0:o=8,i|=8;break;case Cv:return e=jr(12,r,t,i|2),e.elementType=Cv,e.lanes=a,e;case Nv:return e=jr(13,r,t,i),e.elementType=Nv,e.lanes=a,e;case $v:return e=jr(19,r,t,i),e.elementType=$v,e.lanes=a,e;case nj:return Vh(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tj:o=10;break e;case rj:o=9;break e;case F0:o=11;break e;case B0:o=14;break e;case mi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=jr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Da(e,t,r,n){return e=jr(7,e,n,t),e.lanes=r,e}function Vh(e,t,r,n){return e=jr(22,e,n,t),e.elementType=nj,e.lanes=r,e.stateNode={isHidden:!1},e}function Cm(e,t,r){return e=jr(6,e,null,t),e.lanes=r,e}function Nm(e,t,r){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gD(e,t,r,n,i){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=dm(0),this.expirationTimes=dm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wb(e,t,r,n,i,a,o,s,l){return e=new gD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=jr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ib(a),e}function bD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q_)}catch(e){console.error(e)}}Q_(),QA.exports=vr;var Eb=QA.exports;const PD=Ae(Eb);var p1=Eb;Tv.createRoot=p1.createRoot,Tv.hydrateRoot=p1.hydrateRoot;var Pc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ED={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wi,T0,kA,AD=(kA=class{constructor(){ne(this,wi,ED);ne(this,T0,!1)}setTimeoutProvider(e){X(this,wi,e)}setTimeout(e,t){return $(this,wi).setTimeout(e,t)}clearTimeout(e){$(this,wi).clearTimeout(e)}setInterval(e,t){return $(this,wi).setInterval(e,t)}clearInterval(e){$(this,wi).clearInterval(e)}},wi=new WeakMap,T0=new WeakMap,kA),xa=new AD;function jD(e){setTimeout(e,0)}var qa=typeof window>"u"||"Deno"in globalThis;function Qt(){}function _D(e,t){return typeof e=="function"?e(t):e}function Sy(e){return typeof e=="number"&&e>=0&&e!==1/0}function J_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ui(e,t){return typeof e=="function"?e(t):e}function Or(e,t){return typeof e=="function"?e(t):e}function m1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Ab(o,t.options))return!1}else if(!Eu(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Pu(t.options.mutationKey)!==Pu(a))return!1}else if(!Eu(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ab(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pu)(e)}function Pu(e){return JSON.stringify(e,(t,r)=>Py(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Eu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Eu(e[r],t[r])):!1}var TD=Object.prototype.hasOwnProperty;function Z_(e,t){if(e===t)return e;const r=y1(e)&&y1(t);if(!r&&!(Py(e)&&Py(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{xa.setTimeout(t,e)})}function Ey(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Z_(e,t):t}function CD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function ND(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var jb=Symbol();function eT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $D(e,t){return typeof e=="function"?e(...t):!!e}var Aa,Si,Jo,CA,MD=(CA=class extends Pc{constructor(){super();ne(this,Aa);ne(this,Si);ne(this,Jo);X(this,Jo,t=>{if(!qa&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,Si)||this.setEventListener($(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Si))==null||t.call(this),X(this,Si,void 0))}setEventListener(t){var r;X(this,Jo,t),(r=$(this,Si))==null||r.call(this),X(this,Si,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Aa)!==t&&(X(this,Aa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Aa)=="boolean"?$(this,Aa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Aa=new WeakMap,Si=new WeakMap,Jo=new WeakMap,CA),_b=new MD;function Ay(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var ID=jD;function DD(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=ID;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Et=DD(),Zo,Oi,es,NA,RD=(NA=class extends Pc{constructor(){super();ne(this,Zo,!0);ne(this,Oi);ne(this,es);X(this,es,t=>{if(!qa&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Oi)||this.setEventListener($(this,es))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Oi))==null||t.call(this),X(this,Oi,void 0))}setEventListener(t){var r;X(this,es,t),(r=$(this,Oi))==null||r.call(this),X(this,Oi,t(this.setOnline.bind(this)))}setOnline(t){$(this,Zo)!==t&&(X(this,Zo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,Zo)}},Zo=new WeakMap,Oi=new WeakMap,es=new WeakMap,NA),Sd=new RD;function LD(e){return Math.min(1e3*2**e,3e4)}function tT(e){return(e??"online")==="online"?Sd.isOnline():!0}var jy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function rT(e){let t=!1,r=0,n;const i=Ay(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new jy(m);d(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>_b.isFocused()&&(e.networkMode==="always"||Sd.isOnline())&&e.canRun(),c=()=>tT(e.networkMode)&&e.canRun(),f=m=>{a()||(n==null||n(),i.resolve(m))},d=m=>{a()||(n==null||n(),i.reject(m))},h=()=>new Promise(m=>{var g;n=y=>{(a()||u())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=r===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var O;if(a())return;const b=e.retry??(qa?0:3),x=e.retryDelay??LD,S=typeof x=="function"?x(r,y):x,w=b===!0||typeof b=="number"&&ru()?void 0:h()).then(()=>{t?d(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?v():h().then(v),i)}}var ja,$A,nT=($A=class{constructor(){ne(this,ja)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sy(this.gcTime)&&X(this,ja,xa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qa?1/0:5*60*1e3))}clearGcTimeout(){$(this,ja)&&(xa.clearTimeout($(this,ja)),X(this,ja,void 0))}},ja=new WeakMap,$A),_a,ts,Sr,Ta,vt,pc,ka,Hr,Cn,MA,FD=(MA=class extends nT{constructor(t){super();ne(this,Hr);ne(this,_a);ne(this,ts);ne(this,Sr);ne(this,Ta);ne(this,vt);ne(this,pc);ne(this,ka);X(this,ka,!1),X(this,pc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,Ta,t.client),X(this,Sr,$(this,Ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,_a,b1(this.options)),this.state=t.state??$(this,_a),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,vt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,pc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=b1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,_a,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Sr).remove(this)}setData(t,r){const n=Ey(this.state.data,t,this.options);return me(this,Hr,Cn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){me(this,Hr,Cn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=$(this,vt))==null?void 0:n.promise;return(i=$(this,vt))==null||i.cancel(t),r?r.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,_a))}isActive(){return this.observers.some(t=>Or(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ui(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!J_(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,vt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Sr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,vt)&&($(this,ka)?$(this,vt).cancel({revert:!0}):$(this,vt).cancelRetry()),this.scheduleGc()),$(this,Sr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,Hr,Cn).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,c,f,d,h,v,m,g,y,b,x;if(this.state.fetchStatus!=="idle"&&((l=$(this,vt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,vt))return $(this,vt).continueRetry(),$(this,vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,ka,!0),n.signal)})},a=()=>{const S=eT(this.options,r),O=(()=>{const P={client:$(this,Ta),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return X(this,ka,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,Ta),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&me(this,Hr,Cn).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),X(this,vt,rT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof jy&&S.revert&&this.setState({...$(this,ts),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{me(this,Hr,Cn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{me(this,Hr,Cn).call(this,{type:"pause"})},onContinue:()=>{me(this,Hr,Cn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await $(this,vt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(d=$(this,Sr).config).onSuccess)==null||h.call(d,S,this),(m=(v=$(this,Sr).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof jy){if(S.silent)return $(this,vt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw me(this,Hr,Cn).call(this,{type:"error",error:S}),(y=(g=$(this,Sr).config).onError)==null||y.call(g,S,this),(x=(b=$(this,Sr).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},_a=new WeakMap,ts=new WeakMap,Sr=new WeakMap,Ta=new WeakMap,vt=new WeakMap,pc=new WeakMap,ka=new WeakMap,Hr=new WeakSet,Cn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...iT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,ts,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Et.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,Sr).notify({query:this,type:"updated",action:t})})},MA);function iT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function b1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xt,ve,mc,Rt,Ca,rs,In,Pi,vc,ns,is,Na,$a,Ei,as,Ee,zl,_y,Ty,ky,Cy,Ny,$y,My,aT,IA,BD=(IA=class extends Pc{constructor(t,r){super();ne(this,Ee);ne(this,Xt);ne(this,ve);ne(this,mc);ne(this,Rt);ne(this,Ca);ne(this,rs);ne(this,In);ne(this,Pi);ne(this,vc);ne(this,ns);ne(this,is);ne(this,Na);ne(this,$a);ne(this,Ei);ne(this,as,new Set);this.options=r,X(this,Xt,t),X(this,Pi,null),X(this,In,Ay()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,ve).addObserver(this),x1($(this,ve),this.options)?me(this,Ee,zl).call(this):this.updateResult(),me(this,Ee,Cy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Iy($(this,ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Iy($(this,ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Ee,Ny).call(this),me(this,Ee,$y).call(this),$(this,ve).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,ve);if(this.options=$(this,Xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Or(this.options.enabled,$(this,ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Ee,My).call(this),$(this,ve).setOptions(this.options),r._defaulted&&!Oy(this.options,r)&&$(this,Xt).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,ve),observer:this});const i=this.hasListeners();i&&w1($(this,ve),n,this.options,r)&&me(this,Ee,zl).call(this),this.updateResult(),i&&($(this,ve)!==n||Or(this.options.enabled,$(this,ve))!==Or(r.enabled,$(this,ve))||Ui(this.options.staleTime,$(this,ve))!==Ui(r.staleTime,$(this,ve)))&&me(this,Ee,_y).call(this);const a=me(this,Ee,Ty).call(this);i&&($(this,ve)!==n||Or(this.options.enabled,$(this,ve))!==Or(r.enabled,$(this,ve))||a!==$(this,Ei))&&me(this,Ee,ky).call(this,a)}getOptimisticResult(t){const r=$(this,Xt).getQueryCache().build($(this,Xt),t),n=this.createResult(r,t);return UD(this,n)&&(X(this,Rt,n),X(this,rs,this.options),X(this,Ca,$(this,ve).state)),n}getCurrentResult(){return $(this,Rt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,In).status==="pending"&&$(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,as).add(t)}getCurrentQuery(){return $(this,ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,Xt).defaultQueryOptions(t),n=$(this,Xt).getQueryCache().build($(this,Xt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return me(this,Ee,zl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Rt)))}createResult(t,r){var j;const n=$(this,ve),i=this.options,a=$(this,Rt),o=$(this,Ca),s=$(this,rs),u=t!==n?t.state:$(this,mc),{state:c}=t;let f={...c},d=!1,h;if(r._optimisticResults){const _=this.hasListeners(),T=!_&&x1(t,r),k=_&&w1(t,n,r,i);(T||k)&&(f={...f,...iT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=f;h=f.data;let y=!1;if(r.placeholderData!==void 0&&h===void 0&&g==="pending"){let _;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(_=a.data,y=!0):_=typeof r.placeholderData=="function"?r.placeholderData((j=$(this,is))==null?void 0:j.state.data,$(this,is)):r.placeholderData,_!==void 0&&(g="success",h=Ey(a==null?void 0:a.data,_,r),d=!0)}if(r.select&&h!==void 0&&!y)if(a&&h===(o==null?void 0:o.data)&&r.select===$(this,vc))h=$(this,ns);else try{X(this,vc,r.select),h=r.select(h),h=Ey(a==null?void 0:a.data,h,r),X(this,ns,h),X(this,Pi,null)}catch(_){X(this,Pi,_)}$(this,Pi)&&(v=$(this,Pi),h=$(this,ns),m=Date.now(),g="error");const b=f.fetchStatus==="fetching",x=g==="pending",S=g==="error",w=x&&b,O=h!==void 0,E={status:g,fetchStatus:f.fetchStatus,isPending:x,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&O,isStale:Tb(t,r),refetch:this.refetch,promise:$(this,In),isEnabled:Or(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=M=>{E.status==="error"?M.reject(E.error):E.data!==void 0&&M.resolve(E.data)},T=()=>{const M=X(this,In,E.promise=Ay());_(M)},k=$(this,In);switch(k.status){case"pending":t.queryHash===n.queryHash&&_(k);break;case"fulfilled":(E.status==="error"||E.data!==k.value)&&T();break;case"rejected":(E.status!=="error"||E.error!==k.reason)&&T();break}}return E}updateResult(){const t=$(this,Rt),r=this.createResult($(this,ve),this.options);if(X(this,Ca,$(this,ve).state),X(this,rs,this.options),$(this,Ca).data!==void 0&&X(this,is,$(this,ve)),Oy(r,t))return;X(this,Rt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!$(this,as).size)return!0;const o=new Set(a??$(this,as));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Rt)).some(s=>{const l=s;return $(this,Rt)[l]!==t[l]&&o.has(l)})};me(this,Ee,aT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Ee,Cy).call(this)}},Xt=new WeakMap,ve=new WeakMap,mc=new WeakMap,Rt=new WeakMap,Ca=new WeakMap,rs=new WeakMap,In=new WeakMap,Pi=new WeakMap,vc=new WeakMap,ns=new WeakMap,is=new WeakMap,Na=new WeakMap,$a=new WeakMap,Ei=new WeakMap,as=new WeakMap,Ee=new WeakSet,zl=function(t){me(this,Ee,My).call(this);let r=$(this,ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Qt)),r},_y=function(){me(this,Ee,Ny).call(this);const t=Ui(this.options.staleTime,$(this,ve));if(qa||$(this,Rt).isStale||!Sy(t))return;const n=J_($(this,Rt).dataUpdatedAt,t)+1;X(this,Na,xa.setTimeout(()=>{$(this,Rt).isStale||this.updateResult()},n))},Ty=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,ve)):this.options.refetchInterval)??!1},ky=function(t){me(this,Ee,$y).call(this),X(this,Ei,t),!(qa||Or(this.options.enabled,$(this,ve))===!1||!Sy($(this,Ei))||$(this,Ei)===0)&&X(this,$a,xa.setInterval(()=>{(this.options.refetchIntervalInBackground||_b.isFocused())&&me(this,Ee,zl).call(this)},$(this,Ei)))},Cy=function(){me(this,Ee,_y).call(this),me(this,Ee,ky).call(this,me(this,Ee,Ty).call(this))},Ny=function(){$(this,Na)&&(xa.clearTimeout($(this,Na)),X(this,Na,void 0))},$y=function(){$(this,$a)&&(xa.clearInterval($(this,$a)),X(this,$a,void 0))},My=function(){const t=$(this,Xt).getQueryCache().build($(this,Xt),this.options);if(t===$(this,ve))return;const r=$(this,ve);X(this,ve,t),X(this,mc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},aT=function(t){Et.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,Rt))}),$(this,Xt).getQueryCache().notify({query:$(this,ve),type:"observerResultsUpdated"})})},IA);function zD(e,t){return Or(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function x1(e,t){return zD(e,t)||e.state.data!==void 0&&Iy(e,t,t.refetchOnMount)}function Iy(e,t,r){if(Or(t.enabled,e)!==!1&&Ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Tb(e,t)}return!1}function w1(e,t,r,n){return(e!==t||Or(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Tb(e,r)}function Tb(e,t){return Or(t.enabled,e)!==!1&&e.isStaleByTime(Ui(t.staleTime,e))}function UD(e,t){return!Oy(e.getCurrentResult(),t)}function S1(e){return{onFetch:(t,r)=>{var c,f,d,h,v;const n=t.options,i=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,a=((h=t.state.data)==null?void 0:h.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=eT(t.options,t.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const P=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(T),T})(),E=await y(P),{maxPages:j}=t.options,_=w?ND:CD;return{pages:_(x.pages,E,j),pageParams:_(x.pageParams,S,j)}};if(i&&a.length){const x=i==="backward",S=x?WD:O1,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:O1(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function O1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function WD(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var yc,dn,Lt,Ma,hn,hi,DA,HD=(DA=class extends nT{constructor(t){super();ne(this,hn);ne(this,yc);ne(this,dn);ne(this,Lt);ne(this,Ma);X(this,yc,t.client),this.mutationId=t.mutationId,X(this,Lt,t.mutationCache),X(this,dn,[]),this.state=t.state||KD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,dn).includes(t)||($(this,dn).push(t),this.clearGcTimeout(),$(this,Lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,dn,$(this,dn).filter(r=>r!==t)),this.scheduleGc(),$(this,Lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,dn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Lt).remove(this))}continue(){var t;return((t=$(this,Ma))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,c,f,d,h,v,m,g,y,b,x,S,w,O,P,E,j;const r=()=>{me(this,hn,hi).call(this,{type:"continue"})},n={client:$(this,yc),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,Ma,rT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(_,T)=>{me(this,hn,hi).call(this,{type:"failed",failureCount:_,error:T})},onPause:()=>{me(this,hn,hi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Lt).canRun(this)}));const i=this.state.status==="pending",a=!$(this,Ma).canStart();try{if(i)r();else{me(this,hn,hi).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=$(this,Lt).config).onMutate)==null?void 0:s.call(o,t,this,n));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));T!==this.state.context&&me(this,hn,hi).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const _=await $(this,Ma).start();return await((f=(c=$(this,Lt).config).onSuccess)==null?void 0:f.call(c,_,t,this.state.context,this,n)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,_,t,this.state.context,n)),await((m=(v=$(this,Lt).config).onSettled)==null?void 0:m.call(v,_,null,this.state.variables,this.state.context,this,n)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,_,null,t,this.state.context,n)),me(this,hn,hi).call(this,{type:"success",data:_}),_}catch(_){try{throw await((x=(b=$(this,Lt).config).onError)==null?void 0:x.call(b,_,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,_,t,this.state.context,n)),await((P=(O=$(this,Lt).config).onSettled)==null?void 0:P.call(O,void 0,_,this.state.variables,this.state.context,this,n)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,_,t,this.state.context,n)),_}finally{me(this,hn,hi).call(this,{type:"error",error:_})}}finally{$(this,Lt).runNext(this)}}},yc=new WeakMap,dn=new WeakMap,Lt=new WeakMap,Ma=new WeakMap,hn=new WeakSet,hi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Et.batch(()=>{$(this,dn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Lt).notify({mutation:this,type:"updated",action:t})})},DA);function KD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dn,Kr,gc,RA,qD=(RA=class extends Pc{constructor(t={}){super();ne(this,Dn);ne(this,Kr);ne(this,gc);this.config=t,X(this,Dn,new Set),X(this,Kr,new Map),X(this,gc,0)}build(t,r,n){const i=new HD({client:t,mutationCache:this,mutationId:++Hc(this,gc)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Dn).add(t);const r=cf(t);if(typeof r=="string"){const n=$(this,Kr).get(r);n?n.push(t):$(this,Kr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Dn).delete(t)){const r=cf(t);if(typeof r=="string"){const n=$(this,Kr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,Kr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=cf(t);if(typeof r=="string"){const n=$(this,Kr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=cf(t);if(typeof r=="string"){const i=(n=$(this,Kr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{$(this,Dn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Dn).clear(),$(this,Kr).clear()})}getAll(){return Array.from($(this,Dn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>v1(r,n))}findAll(t={}){return this.getAll().filter(r=>v1(t,r))}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Et.batch(()=>Promise.all(t.map(r=>r.continue().catch(Qt))))}},Dn=new WeakMap,Kr=new WeakMap,gc=new WeakMap,RA);function cf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var pn,LA,VD=(LA=class extends Pc{constructor(t={}){super();ne(this,pn);this.config=t,X(this,pn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ab(i,r);let o=this.get(a);return o||(o=new FD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,pn).has(t.queryHash)||($(this,pn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,pn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,pn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,pn).get(t)}getAll(){return[...$(this,pn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>m1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>m1(t,n)):r}notify(t){Et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pn=new WeakMap,LA),Xe,Ai,ji,os,ss,_i,ls,us,FA,GD=(FA=class{constructor(e={}){ne(this,Xe);ne(this,Ai);ne(this,ji);ne(this,os);ne(this,ss);ne(this,_i);ne(this,ls);ne(this,us);X(this,Xe,e.queryCache||new VD),X(this,Ai,e.mutationCache||new qD),X(this,ji,e.defaultOptions||{}),X(this,os,new Map),X(this,ss,new Map),X(this,_i,0)}mount(){Hc(this,_i)._++,$(this,_i)===1&&(X(this,ls,_b.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Xe).onFocus())})),X(this,us,Sd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Xe).onOnline())})))}unmount(){var e,t;Hc(this,_i)._--,$(this,_i)===0&&((e=$(this,ls))==null||e.call(this),X(this,ls,void 0),(t=$(this,us))==null||t.call(this),X(this,us,void 0))}isFetching(e){return $(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Xe).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,Xe).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,Xe).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,Xe).get(n.queryHash),a=i==null?void 0:i.state.data,o=_D(t,a);if(o!==void 0)return $(this,Xe).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Et.batch(()=>$(this,Xe).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,Xe).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,Xe);Et.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,Xe);return Et.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Et.batch(()=>$(this,Xe).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Qt).catch(Qt)}invalidateQueries(e,t={}){return Et.batch(()=>($(this,Xe).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Et.batch(()=>$(this,Xe).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Qt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,Xe).build(this,t);return r.isStaleByTime(Ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qt).catch(Qt)}fetchInfiniteQuery(e){return e.behavior=S1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qt).catch(Qt)}ensureInfiniteQueryData(e){return e.behavior=S1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sd.isOnline()?$(this,Ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Xe)}getMutationCache(){return $(this,Ai)}getDefaultOptions(){return $(this,ji)}setDefaultOptions(e){X(this,ji,e)}setQueryDefaults(e,t){$(this,os).set(Pu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,os).values()],r={};return t.forEach(n=>{Eu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,ss).set(Pu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ss).values()],r={};return t.forEach(n=>{Eu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,ji).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ab(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,ji).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Xe).clear(),$(this,Ai).clear()}},Xe=new WeakMap,Ai=new WeakMap,ji=new WeakMap,os=new WeakMap,ss=new WeakMap,_i=new WeakMap,ls=new WeakMap,us=new WeakMap,FA),oT=A.createContext(void 0),sT=e=>{const t=A.useContext(oT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YD=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(oT.Provider,{value:e,children:t})),lT=A.createContext(!1),XD=()=>A.useContext(lT);lT.Provider;function QD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JD=A.createContext(QD()),ZD=()=>A.useContext(JD),eR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tR=e=>{A.useEffect(()=>{e.clearReset()},[e])},rR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||$D(r,[e.error,n])),nR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iR=(e,t)=>e.isLoading&&e.isFetching&&!t,aR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,P1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function oR(e,t,r){var f,d,h,v,m;const n=XD(),i=ZD(),a=sT(),o=a.defaultQueryOptions(e);(d=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||d.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",nR(o),eR(o,i),tR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=A.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(g=>{const y=c?l.subscribe(Et.batchCalls(g)):Qt;return l.updateResult(),y},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setOptions(o)},[o,l]),aR(o,u))throw P1(o,l,i);if(rR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,o,u),o.experimental_prefetchInRender&&!qa&&iR(u,n)){const g=s?P1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(Qt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function En(e,t){return oR(e,BD)}/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function uT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lR(){return Math.random().toString(36).substr(2,8)}function A1(e,t){return{usr:e.state,key:e.key,idx:t}}function Dy(e,t,r,n){return r===void 0&&(r=null),Au({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ys(t):t,{state:r,key:t&&t.key||n||lR()})}function Od(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ys(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function uR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ci.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Au({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Ci.Pop;let g=c(),y=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:y})}function d(g,y){s=Ci.Push;let b=Dy(m.location,g,y);u=c()+1;let x=A1(b,u),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function h(g,y){s=Ci.Replace;let b=Dy(m.location,g,y);u=c();let x=A1(b,u),S=m.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof g=="string"?g:Od(g);return b=b.replace(/ $/,"%20"),at(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(E1,f),l=g,()=>{i.removeEventListener(E1,f),l=null}},createHref(g){return t(i,g)},createURL:v,encodeLocation(g){let y=v(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(g){return o.go(g)}};return m}var j1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(j1||(j1={}));function cR(e,t,r){return r===void 0&&(r="/"),fR(e,t,r)}function fR(e,t,r,n){let i=typeof t=="string"?Ys(t):t,a=kb(i.pathname||"/",r);if(a==null)return null;let o=cT(e);dR(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(at(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Wi([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),cT(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:bR(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of fT(a.path))i(a,o,l)}),t}function fT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=fT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function dR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:xR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const hR=/^:[\w-]+$/,pR=3,mR=2,vR=1,yR=10,gR=-2,_1=e=>e==="*";function bR(e,t){let r=e.split("/"),n=r.length;return r.some(_1)&&(n+=gR),t&&(n+=mR),r.filter(i=>!_1(i)).reduce((i,a)=>i+(hR.test(a)?pR:a===""?vR:yR),n)}function xR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function wR(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:d,isOptional:h}=c;if(d==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return h&&!v?u[d]=void 0:u[d]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function OR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),uT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function PR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return uT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function ER(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Ys(e):e;return{pathname:r?r.startsWith("/")?r:AR(r,t):t,search:TR(n),hash:kR(i)}}function AR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function $m(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function jR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function dT(e,t){let r=jR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function hT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Ys(e):(i=Au({},e),at(!i.pathname||!i.pathname.includes("?"),$m("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),$m("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),$m("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=ER(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Wi=e=>e.join("/").replace(/\/\/+/g,"/"),_R=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),TR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pT=["post","put","patch","delete"];new Set(pT);const NR=["get",...pT];new Set(NR);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),A.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=hT(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Wi([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}const DR=A.createContext(null);function RR(e){let t=A.useContext(ni).outlet;return t&&A.createElement(DR.Provider,{value:e},t)}function yT(){let{matches:e}=A.useContext(ni),t=e[e.length-1];return t?t.params:{}}function gT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=A.useContext(io),{matches:i}=A.useContext(ni),{pathname:a}=ao(),o=JSON.stringify(dT(i,n.v7_relativeSplatPath));return A.useMemo(()=>hT(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function LR(e,t){return FR(e,t)}function FR(e,t,r,n){Ec()||at(!1);let{navigator:i}=A.useContext(io),{matches:a}=A.useContext(ni),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=ao(),c;if(t){var f;let g=typeof t=="string"?Ys(t):t;l==="/"||(f=g.pathname)!=null&&f.startsWith(l)||at(!1),c=g}else c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=cR(e,{pathname:h}),m=HR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Wi([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Wi([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&m?A.createElement(Jh.Provider,{value:{location:ju({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ci.Pop}},m):m}function BR(){let e=GR(),t=CR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:i},r):null,null)}const zR=A.createElement(BR,null);class UR extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?A.createElement(ni.Provider,{value:this.props.routeContext},A.createElement(mT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function WR(e){let{routeContext:t,match:r,children:n}=e,i=A.useContext(Cb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(ni.Provider,{value:t},n)}function HR(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||at(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let h,v=!1,m=null,g=null;r&&(h=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||zR,l&&(u<0&&d===0?(XR("route-fallback"),v=!0,g=null):u===d&&(v=!0,g=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),b=()=>{let x;return h?x=m:v?x=g:f.route.Component?x=A.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=c,A.createElement(WR,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?A.createElement(UR,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var bT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bT||{}),xT=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(xT||{});function KR(e){let t=A.useContext(Cb);return t||at(!1),t}function qR(e){let t=A.useContext($R);return t||at(!1),t}function VR(e){let t=A.useContext(ni);return t||at(!1),t}function wT(e){let t=VR(),r=t.matches[t.matches.length-1];return r.route.id||at(!1),r.route.id}function GR(){var e;let t=A.useContext(mT),r=qR(),n=wT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function YR(){let{router:e}=KR(bT.UseNavigateStable),t=wT(xT.UseNavigateStable),r=A.useRef(!1);return vT(()=>{r.current=!0}),A.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ju({fromRouteId:t},a)))},[e,t])}const T1={};function XR(e,t,r){T1[e]||(T1[e]=!0)}function QR(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function JR(e){return RR(e.context)}function Ur(e){at(!1)}function ZR(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Ci.Pop,navigator:a,static:o=!1,future:s}=e;Ec()&&at(!1);let l=t.replace(/^\/*/,"/"),u=A.useMemo(()=>({basename:l,navigator:a,static:o,future:ju({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=Ys(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:v="default"}=n,m=A.useMemo(()=>{let g=kb(c,l);return g==null?null:{location:{pathname:g,search:f,hash:d,state:h,key:v},navigationType:i}},[l,c,f,d,h,v,i]);return m==null?null:A.createElement(io.Provider,{value:u},A.createElement(Jh.Provider,{children:r,value:m}))}function eL(e){let{children:t,location:r}=e;return LR(Ry(t),r)}new Promise(()=>{});function Ry(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,i)=>{if(!A.isValidElement(n))return;let a=[...t,i];if(n.type===A.Fragment){r.push.apply(r,Ry(n.props.children,a));return}n.type!==Ur&&at(!1),!n.props.index||!n.props.children||at(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Ry(n.props.children,a)),r.push(o)}),r}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function rL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nL(e,t){return e.button===0&&(!t||t==="_self")&&!rL(e)}function Fy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function iL(e,t){let r=Fy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const aL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],oL="6";try{window.__reactRouterVersion=oL}catch{}const sL="startTransition",k1=M0[sL];function lL(e){let{basename:t,children:r,future:n,window:i}=e,a=A.useRef();a.current==null&&(a.current=sR({window:i,v5Compat:!0}));let o=a.current,[s,l]=A.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=A.useCallback(f=>{u&&k1?k1(()=>l(f)):l(f)},[l,u]);return A.useLayoutEffect(()=>o.listen(c),[o,c]),A.useEffect(()=>QR(n),[n]),A.createElement(ZR,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const uL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Va=A.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=tL(t,aL),{basename:h}=A.useContext(io),v,m=!1;if(typeof u=="string"&&cL.test(u)&&(v=u,uL))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=kb(S.pathname,h);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let g=MR(u,{relative:i}),y=fL(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function b(x){n&&n(x),x.defaultPrevented||y(x)}return A.createElement("a",Ly({},d,{href:v||g,onClick:m||a?n:b,ref:r,target:l}))});var C1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(C1||(C1={}));var N1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(N1||(N1={}));function fL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Nb(),u=ao(),c=gT(e,{relative:o});return A.useCallback(f=>{if(nL(f,r)){f.preventDefault();let d=n!==void 0?n:Od(u)===Od(c);l(e,{replace:d,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}function dL(e){let t=A.useRef(Fy(e)),r=A.useRef(!1),n=ao(),i=A.useMemo(()=>iL(n.search,r.current?null:t.current),[n.search]),a=Nb(),o=A.useCallback((s,l)=>{const u=Fy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const hL=new GD({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function $b(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function ST(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const OT=A.createContext(void 0);function pL({children:e}){const[t,r]=A.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return p.jsx(OT.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function Ac(){const e=A.useContext(OT);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function mL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function vL(){return(await mL()).userId}function PT(e,t){return function(){return e.apply(t,arguments)}}const{toString:yL}=Object.prototype,{getPrototypeOf:Mb}=Object,{iterator:Zh,toStringTag:ET}=Symbol,ep=(e=>t=>{const r=yL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),on=e=>(e=e.toLowerCase(),t=>ep(t)===e),tp=e=>t=>typeof t===e,{isArray:Xs}=Array,ys=tp("undefined");function jc(e){return e!==null&&!ys(e)&&e.constructor!==null&&!ys(e.constructor)&&ir(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const AT=on("ArrayBuffer");function gL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&AT(e.buffer),t}const bL=tp("string"),ir=tp("function"),jT=tp("number"),_c=e=>e!==null&&typeof e=="object",xL=e=>e===!0||e===!1,Kf=e=>{if(ep(e)!=="object")return!1;const t=Mb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ET in e)&&!(Zh in e)},wL=e=>{if(!_c(e)||jc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},SL=on("Date"),OL=on("File"),PL=on("Blob"),EL=on("FileList"),AL=e=>_c(e)&&ir(e.pipe),jL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ir(e.append)&&((t=ep(e))==="formdata"||t==="object"&&ir(e.toString)&&e.toString()==="[object FormData]"))},_L=on("URLSearchParams"),[TL,kL,CL,NL]=["ReadableStream","Request","Response","Headers"].map(on),$L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Tc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Xs(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const wa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TT=e=>!ys(e)&&e!==wa;function By(){const{caseless:e,skipUndefined:t}=TT(this)&&this||{},r={},n=(i,a)=>{const o=e&&_T(r,a)||a;Kf(r[o])&&Kf(i)?r[o]=By(r[o],i):Kf(i)?r[o]=By({},i):Xs(i)?r[o]=i.slice():(!t||!ys(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Tc(t,(i,a)=>{r&&ir(i)?e[a]=PT(i,r):e[a]=i},{allOwnKeys:n}),e),IL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),DL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},RL=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Mb(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},LL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},FL=e=>{if(!e)return null;if(Xs(e))return e;let t=e.length;if(!jT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},BL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mb(Uint8Array)),zL=(e,t)=>{const n=(e&&e[Zh]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},UL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},WL=on("HTMLFormElement"),HL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),$1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),KL=on("RegExp"),kT=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Tc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},qL=e=>{kT(e,(t,r)=>{if(ir(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ir(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},VL=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Xs(e)?n(e):n(String(e).split(t)),r},GL=()=>{},YL=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function XL(e){return!!(e&&ir(e.append)&&e[ET]==="FormData"&&e[Zh])}const QL=e=>{const t=new Array(10),r=(n,i)=>{if(_c(n)){if(t.indexOf(n)>=0)return;if(jc(n))return n;if(!("toJSON"in n)){t[i]=n;const a=Xs(n)?[]:{};return Tc(n,(o,s)=>{const l=r(o,i+1);!ys(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},JL=on("AsyncFunction"),ZL=e=>e&&(_c(e)||ir(e))&&ir(e.then)&&ir(e.catch),CT=((e,t)=>e?setImmediate:t?((r,n)=>(wa.addEventListener("message",({source:i,data:a})=>{i===wa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),wa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ir(wa.postMessage)),e3=typeof queueMicrotask<"u"?queueMicrotask.bind(wa):typeof process<"u"&&process.nextTick||CT,t3=e=>e!=null&&ir(e[Zh]),D={isArray:Xs,isArrayBuffer:AT,isBuffer:jc,isFormData:jL,isArrayBufferView:gL,isString:bL,isNumber:jT,isBoolean:xL,isObject:_c,isPlainObject:Kf,isEmptyObject:wL,isReadableStream:TL,isRequest:kL,isResponse:CL,isHeaders:NL,isUndefined:ys,isDate:SL,isFile:OL,isBlob:PL,isRegExp:KL,isFunction:ir,isStream:AL,isURLSearchParams:_L,isTypedArray:BL,isFileList:EL,forEach:Tc,merge:By,extend:ML,trim:$L,stripBOM:IL,inherits:DL,toFlatObject:RL,kindOf:ep,kindOfTest:on,endsWith:LL,toArray:FL,forEachEntry:zL,matchAll:UL,isHTMLForm:WL,hasOwnProperty:$1,hasOwnProp:$1,reduceDescriptors:kT,freezeMethods:qL,toObjectSet:VL,toCamelCase:HL,noop:GL,toFiniteNumber:YL,findKey:_T,global:wa,isContextDefined:TT,isSpecCompliantForm:XL,toJSONObject:QL,isAsyncFn:JL,isThenable:ZL,setImmediate:CT,asap:e3,isIterable:t3};function ce(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}D.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const NT=ce.prototype,$T={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$T[e]={value:e}});Object.defineProperties(ce,$T);Object.defineProperty(NT,"isAxiosError",{value:!0});ce.from=(e,t,r,n,i,a)=>{const o=Object.create(NT);D.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const r3=null;function zy(e){return D.isPlainObject(e)||D.isArray(e)}function MT(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function M1(e,t,r){return e?e.concat(t).map(function(i,a){return i=MT(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function n3(e){return D.isArray(e)&&!e.some(zy)}const i3=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function rp(e,t,r){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=D.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!D.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(D.isDate(v))return v.toISOString();if(D.isBoolean(v))return v.toString();if(!l&&D.isBlob(v))throw new ce("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(v)||D.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,g){let y=v;if(v&&!g&&typeof v=="object"){if(D.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(D.isArray(v)&&n3(v)||(D.isFileList(v)||D.endsWith(m,"[]"))&&(y=D.toArray(v)))return m=MT(m),y.forEach(function(x,S){!(D.isUndefined(x)||x===null)&&t.append(o===!0?M1([m],S,a):o===null?m:m+"[]",u(x))}),!1}return zy(v)?!0:(t.append(M1(g,m,a),u(v)),!1)}const f=[],d=Object.assign(i3,{defaultVisitor:c,convertValue:u,isVisitable:zy});function h(v,m){if(!D.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),D.forEach(v,function(y,b){(!(D.isUndefined(y)||y===null)&&i.call(t,y,D.isString(b)?b.trim():b,m,d))===!0&&h(y,m?m.concat(b):[b])}),f.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return h(e),t}function I1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ib(e,t){this._pairs=[],e&&rp(e,this,t)}const IT=Ib.prototype;IT.append=function(t,r){this._pairs.push([t,r])};IT.toString=function(t){const r=t?function(n){return t.call(this,n,I1)}:I1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function a3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function DT(e,t,r){if(!t)return e;const n=r&&r.encode||a3;D.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=D.isURLSearchParams(t)?t.toString():new Ib(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class D1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(n){n!==null&&t(n)})}}const RT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},o3=typeof URLSearchParams<"u"?URLSearchParams:Ib,s3=typeof FormData<"u"?FormData:null,l3=typeof Blob<"u"?Blob:null,u3={isBrowser:!0,classes:{URLSearchParams:o3,FormData:s3,Blob:l3},protocols:["http","https","file","blob","url","data"]},Db=typeof window<"u"&&typeof document<"u",Uy=typeof navigator=="object"&&navigator||void 0,c3=Db&&(!Uy||["ReactNative","NativeScript","NS"].indexOf(Uy.product)<0),f3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",d3=Db&&window.location.href||"http://localhost",h3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Db,hasStandardBrowserEnv:c3,hasStandardBrowserWebWorkerEnv:f3,navigator:Uy,origin:d3},Symbol.toStringTag,{value:"Module"})),It={...h3,...u3};function p3(e,t){return rp(e,new It.classes.URLSearchParams,{visitor:function(r,n,i,a){return It.isNode&&D.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function m3(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function v3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&D.isArray(i)?i.length:o,l?(D.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!D.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&D.isArray(i[o])&&(i[o]=v3(i[o])),!s)}if(D.isFormData(e)&&D.isFunction(e.entries)){const r={};return D.forEachEntry(e,(n,i)=>{t(m3(n),i,r,0)}),r}return null}function y3(e,t,r){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const kc={transitional:RT,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=D.isObject(t);if(a&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return i?JSON.stringify(LT(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return p3(t,this.formSerializer).toString();if((s=D.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return rp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),y3(t)):t}],transformResponse:[function(t){const r=this.transitional||kc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ce.from(s,ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{kc.headers[e]={}});const g3=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),b3=e=>{const t={};let r,n,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&g3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},R1=Symbol("internals");function Ol(e){return e&&String(e).trim().toLowerCase()}function qf(e){return e===!1||e==null?e:D.isArray(e)?e.map(qf):String(e)}function x3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const w3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mm(e,t,r,n,i){if(D.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!D.isString(t)){if(D.isString(n))return t.indexOf(n)!==-1;if(D.isRegExp(n))return n.test(t)}}function S3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function O3(e,t){const r=D.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let ar=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=Ol(l);if(!c)throw new Error("header name must be a non-empty string");const f=D.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=qf(s))}const o=(s,l)=>D.forEach(s,(u,c)=>a(u,c,l));if(D.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(D.isString(t)&&(t=t.trim())&&!w3(t))o(b3(t),r);else if(D.isObject(t)&&D.isIterable(t)){let s={},l,u;for(const c of t){if(!D.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?D.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=Ol(t),t){const n=D.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return x3(i);if(D.isFunction(r))return r.call(this,i,n);if(D.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ol(t),t){const n=D.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Mm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=Ol(o),o){const s=D.findKey(n,o);s&&(!r||Mm(n,n[s],s,r))&&(delete n[s],i=!0)}}return D.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Mm(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return D.forEach(this,(i,a)=>{const o=D.findKey(n,a);if(o){r[o]=qf(i),delete r[a];return}const s=t?S3(a):String(a).trim();s!==a&&delete r[a],r[s]=qf(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return D.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&D.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[R1]=this[R1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Ol(o);n[s]||(O3(i,o),n[s]=!0)}return D.isArray(t)?t.forEach(a):a(t),this}};ar.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(ar.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});D.freezeMethods(ar);function Im(e,t){const r=this||kc,n=t||r,i=ar.from(n.headers);let a=n.data;return D.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function FT(e){return!!(e&&e.__CANCEL__)}function Qs(e,t,r){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,r),this.name="CanceledError"}D.inherits(Qs,ce,{__CANCEL__:!0});function BT(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function P3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function E3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,d=0;for(;f!==i;)d+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=c,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const Pd=(e,t,r=3)=>{let n=0;const i=E3(50,250);return A3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},L1=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},F1=e=>(...t)=>D.asap(()=>e(...t)),j3=It.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,It.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0,_3=It.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];D.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),D.isString(n)&&o.push("path="+n),D.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function T3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function k3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zT(e,t,r){let n=!T3(t);return e&&(n||r==!1)?k3(e,t):t}const B1=e=>e instanceof ar?{...e}:e;function Ga(e,t){t=t||{};const r={};function n(u,c,f,d){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:d},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function i(u,c,f,d){if(D.isUndefined(c)){if(!D.isUndefined(u))return n(void 0,u,f,d)}else return n(u,c,f,d)}function a(u,c){if(!D.isUndefined(c))return n(void 0,c)}function o(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,f)=>i(B1(u),B1(c),f,!0)};return D.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);D.isUndefined(d)&&f!==s||(r[c]=d)}),r}const UT=e=>{const t=Ga({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ar.from(o),t.url=DT(zT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),D.isFormData(r)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(D.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(It.hasStandardBrowserEnv&&(n&&D.isFunction(n)&&(n=n(t)),n||n!==!1&&j3(t.url))){const l=i&&a&&_3.read(a);l&&o.set(i,l)}return t},C3=typeof XMLHttpRequest<"u",N3=C3&&function(e){return new Promise(function(r,n){const i=UT(e);let a=i.data;const o=ar.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,h,v;function m(){h&&h(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function y(){if(!g)return;const x=ar.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};BT(function(P){r(P),m()},function(P){n(P),m()},w),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new ce(w,ce.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||RT;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new ce(S,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&D.forEach(o.toJSON(),function(S,w){g.setRequestHeader(w,S)}),D.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([d,v]=Pd(u,!0),g.addEventListener("progress",d)),l&&g.upload&&([f,h]=Pd(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=x=>{g&&(n(!x||x.type?new Qs(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=P3(i.url);if(b&&It.protocols.indexOf(b)===-1){n(new ce("Unsupported protocol "+b+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})},$3=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ce?c:new Qs(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>D.asap(s),l}},M3=function*(e,t){let r=e.byteLength;if(r{const i=I3(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let f=c.byteLength;if(r){let d=a+=f;r(d)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},U1=64*1024,{isFunction:ff}=D,R3=(({Request:e,Response:t})=>({Request:e,Response:t}))(D.global),{ReadableStream:W1,TextEncoder:H1}=D.global,K1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},L3=e=>{e=D.merge.call({skipUndefined:!0},R3,e);const{fetch:t,Request:r,Response:n}=e,i=t?ff(t):typeof fetch=="function",a=ff(r),o=ff(n);if(!i)return!1;const s=i&&ff(W1),l=i&&(typeof H1=="function"?(v=>m=>v.encode(m))(new H1):async v=>new Uint8Array(await new r(v).arrayBuffer())),u=a&&s&&K1(()=>{let v=!1;const m=new r(It.origin,{body:new W1,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),c=o&&s&&K1(()=>D.isReadableStream(new n("").body)),f={stream:c&&(v=>v.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!f[v]&&(f[v]=(m,g)=>{let y=m&&m[v];if(y)return y.call(m);throw new ce(`Response type '${v}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});const d=async v=>{if(v==null)return 0;if(D.isBlob(v))return v.size;if(D.isSpecCompliantForm(v))return(await new r(It.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(D.isArrayBufferView(v)||D.isArrayBuffer(v))return v.byteLength;if(D.isURLSearchParams(v)&&(v=v+""),D.isString(v))return(await l(v)).byteLength},h=async(v,m)=>{const g=D.toFiniteNumber(v.getContentLength());return g??d(m)};return async v=>{let{url:m,method:g,data:y,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:P,headers:E,withCredentials:j="same-origin",fetchOptions:_}=UT(v),T=t||fetch;P=P?(P+"").toLowerCase():"text";let k=$3([b,x&&x.toAbortSignal()],S),M=null;const R=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I;try{if(O&&u&&g!=="get"&&g!=="head"&&(I=await h(E,y))!==0){let V=new r(m,{method:"POST",body:y,duplex:"half"}),H;if(D.isFormData(y)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,re]=L1(I,Pd(F1(O)));y=z1(V.body,U1,Y,re)}}D.isString(j)||(j=j?"include":"omit");const L=a&&"credentials"in r.prototype,z={..._,signal:k,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:y,duplex:"half",credentials:L?j:void 0};M=a&&new r(m,z);let N=await(a?T(M,_):T(m,z));const F=c&&(P==="stream"||P==="response");if(c&&(w||F&&R)){const V={};["status","statusText","headers"].forEach(be=>{V[be]=N[be]});const H=D.toFiniteNumber(N.headers.get("content-length")),[Y,re]=w&&L1(H,Pd(F1(w),!0))||[];N=new n(z1(N.body,U1,Y,()=>{re&&re(),R&&R()}),V)}P=P||"text";let W=await f[D.findKey(f,P)||"text"](N,v);return!F&&R&&R(),await new Promise((V,H)=>{BT(V,H,{data:W,headers:ar.from(N.headers),status:N.status,statusText:N.statusText,config:v,request:M})})}catch(L){throw R&&R(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,v,M),{cause:L.cause||L}):ce.from(L,L&&L.code,v,M)}}},F3=new Map,WT=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,c=F3;for(;s--;)l=a[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:L3(t)),c=u;return u};WT();const Wy={http:r3,xhr:N3,fetch:{get:WT}};D.forEach(Wy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const q1=e=>`- ${e}`,B3=e=>D.isFunction(e)||e===null||e===!1,HT={getAdapter:(e,t)=>{e=D.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : +`+o.map(q1).join(` +`):" "+q1(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Wy};function Dm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qs(null,e)}function V1(e){return Dm(e),e.headers=ar.from(e.headers),e.data=Im.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),HT.getAdapter(e.adapter||kc.adapter,e)(e).then(function(n){return Dm(e),n.data=Im.call(e,e.transformResponse,n),n.headers=ar.from(n.headers),n},function(n){return FT(n)||(Dm(e),n&&n.response&&(n.response.data=Im.call(e,e.transformResponse,n.response),n.response.headers=ar.from(n.response.headers))),Promise.reject(n)})}const KT="1.12.2",np={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{np[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const G1={};np.transitional=function(t,r,n){function i(a,o){return"[Axios v"+KT+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ce(i(o," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!G1[o]&&(G1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};np.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function z3(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ce("option "+a+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const Vf={assertOptions:z3,validators:np},cn=Vf.validators;let Ra=class{constructor(t){this.defaults=t||{},this.interceptors={request:new D1,response:new D1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ga(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Vf.assertOptions(n,{silentJSONParsing:cn.transitional(cn.boolean),forcedJSONParsing:cn.transitional(cn.boolean),clarifyTimeoutError:cn.transitional(cn.boolean)},!1),i!=null&&(D.isFunction(i)?r.paramsSerializer={serialize:i}:Vf.assertOptions(i,{encode:cn.function,serialize:cn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Vf.assertOptions(r,{baseUrl:cn.spelling("baseURL"),withXsrfToken:cn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&D.merge(a.common,a[r.method]);a&&D.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),r.headers=ar.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,d;if(!l){const v=[V1.bind(this),void 0];for(v.unshift(...s),v.push(...u),d=v.length,c=Promise.resolve(r);f{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new Qs(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new qT(function(i){t=i}),cancel:t}}};function W3(e){return function(r){return e.apply(null,r)}}function H3(e){return D.isObject(e)&&e.isAxiosError===!0}const Hy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Hy).forEach(([e,t])=>{Hy[t]=e});function VT(e){const t=new Ra(e),r=PT(Ra.prototype.request,t);return D.extend(r,Ra.prototype,t,{allOwnKeys:!0}),D.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return VT(Ga(e,i))},r}const Ze=VT(kc);Ze.Axios=Ra;Ze.CanceledError=Qs;Ze.CancelToken=U3;Ze.isCancel=FT;Ze.VERSION=KT;Ze.toFormData=rp;Ze.AxiosError=ce;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=W3;Ze.isAxiosError=H3;Ze.mergeConfig=Ga;Ze.AxiosHeaders=ar;Ze.formToJSON=e=>LT(D.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=HT.getAdapter;Ze.HttpStatusCode=Hy;Ze.default=Ze;const{Axios:whe,AxiosError:She,CanceledError:Ohe,isCancel:Phe,CancelToken:Ehe,VERSION:Ahe,all:jhe,Cancel:_he,isAxiosError:The,spread:khe,toFormData:Che,AxiosHeaders:Nhe,HttpStatusCode:$he,formToJSON:Mhe,getAdapter:Ihe,mergeConfig:Dhe}=Ze,K3="/graphql";async function Mr(e,t){try{const r=await Ze.post(K3,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw Ze.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}const Ir={listTeams:` + query ListTeams($userId: ID!) { + teams(userId: $userId) { + id + name + description + meta + createdAt + updatedAt + } + } + `,getUser:` + query GetUser($id: ID!) { + user(id: $id) { + id + username + email + avatarUrl + meta + createdAt + updatedAt + } + } + `,getTeam:` + query GetTeam($id: ID!) { + team(id: $id) { + id + name + description + meta + createdAt + updatedAt + totalExperiments + totalRuns + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + } + } + `,getTeamWithExperiments:` + query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { + team(id: $id) { + id + name + expsByTimeframe(startTime: $startTime, endTime: $endTime) { + id + teamId + userId + name + status + createdAt + } + } + } + `,getTeamWithLabelKeys:` + query GetTeamWithLabelKeys($id: ID!) { + team(id: $id) { + id + labelKeys + } + } + `,listExperiments:` + query ListExperiments($teamId: ID!, $labelName: String, $labelValue: String, $page: Int, $pageSize: Int) { + experiments(teamId: $teamId, labelName: $labelName, labelValue: $labelValue, page: $page, pageSize: $pageSize) { + id + teamId + userId + name + description + kind + meta + params + labels { + name + value + } + duration + status + createdAt + updatedAt + } + } + `,getExperiment:` + query GetExperiment($id: ID!) { + experiment(id: $id) { + id + teamId + userId + name + description + kind + meta + params + labels { + name + value + } + duration + status + createdAt + updatedAt + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + metrics { + id + key + value + teamId + experimentId + runId + createdAt + } + } + } + `,listRuns:` + query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { + runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { + id + teamId + userId + experimentId + meta + duration + status + createdAt + } + } + `,getRun:` + query GetRun($id: ID!) { + run(id: $id) { + id + teamId + userId + experimentId + meta + duration + status + createdAt + aggregatedTokens { + totalTokens + inputTokens + outputTokens + } + metrics { + id + key + value + teamId + experimentId + runId + createdAt + } + spans { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + semanticKind + serviceName + duration + statusCode + statusMessage + teamId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + } + `,listArtifactRepositories:` + query ListArtifactRepositories { + artifactRepos { + name + } + } + `,listArtifactTags:` + query ListArtifactTags($team_id: ID!, $repo_name: String!) { + artifactTags(teamId: $team_id, repoName: $repo_name) { + name + } + } + `,getArtifactContent:` + query GetArtifactContent($team_id: ID!, $tag: String!, $repo_name: String!) { + artifactContent(teamId: $team_id, tag: $tag, repoName: $repo_name) { + filename + content + contentType + } + } + `,listTraces:` + query ListTraces($runId: ID!) { + traces(runId: $runId) { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + semanticKind + serviceName + duration + statusCode + statusMessage + teamId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + `,getDailyTokenUsage:` + query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { + dailyTokenUsage(teamId: $teamId, days: $days) { + date + totalTokens + inputTokens + outputTokens + } + } + `},GT=A.createContext(null);function q3({user:e,children:t}){const[r,n]=A.useState(e),i=a=>{n(o=>({...o,...a}))};return p.jsx(GT.Provider,{value:{user:r,updateUser:i},children:t})}function Rb(){const e=A.useContext(GT);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Y1=e=>{const t=G3(e);return t.charAt(0).toUpperCase()+t.slice(1)},YT=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Y3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var X3={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.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q3=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>A.createElement("svg",{ref:l,...X3,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:YT("lucide",i),...!a&&!Y3(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>A.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const et=(e,t)=>{const r=A.forwardRef(({className:n,...i},a)=>A.createElement(Q3,{ref:a,iconNode:t,className:YT(`lucide-${V3(Y1(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Y1(e),r};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J3=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Z3=et("bot",J3);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],X1=et("building-2",eF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],XT=et("check",tF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ip=et("chevron-down",rF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lb=et("chevron-right",nF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],aF=et("chevron-left",iF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ky=et("clock",oF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sF=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],lF=et("coins",sF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],QT=et("copy",uF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cF=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],fF=et("database",cF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hF=et("eye",dF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],JT=et("flask-conical",pF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],vF=et("git-branch",mF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],gF=et("github",yF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],xF=et("globe",bF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wF=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],SF=et("layout-dashboard",wF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],PF=et("package",OF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EF=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],AF=et("play",EF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fb=et("search",jF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _F=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Q1=et("user",_F);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ed=et("x",TF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kF=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],CF=et("zap",kF);function ZT(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),ek=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ad="-",J1=[],MF="arbitrary..",IF=e=>{const t=RF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return DF(o);const s=o.split(Ad),l=s[0]===""&&s.length>1?1:0;return tk(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?NF(u,l):l:u||J1}return r[o]||J1}}},tk=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=tk(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Ad):e.slice(t).join(Ad),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?MF+n:void 0})(),RF=e=>{const{theme:t,classGroups:r}=e;return LF(r,t)},LF=(e,t)=>{const r=ek();for(const n in e){const i=e[n];Bb(i,r,n,t)}return r},Bb=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){BF(e,t,r);return}if(typeof e=="function"){zF(e,t,r,n);return}UF(e,t,r,n)},BF=(e,t,r)=>{const n=e===""?t:rk(t,e);n.classGroupId=r},zF=(e,t,r,n)=>{if(WF(e)){Bb(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push($F(r,e))},UF=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Ad),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,HF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},qy="!",Z1=":",KF=[],eS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),qF=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const c=i.length;for(let m=0;ml?u-l:void 0;return eS(a,h,d,v)};if(t){const i=t+Z1,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):eS(KF,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},VF=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},GF=e=>({cache:HF(e.cacheSize),parseClassName:qF(e),sortModifiers:VF(e),...IF(e)}),YF=/\s+/,XF=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(YF);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}=r(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const b=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=h?b+qy:b,S=x+y;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(y,g);for(let O=0;O0?" "+l:l)}return l},QF=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((c,f)=>f(c),e());return r=GF(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const c=XF(l,r);return i(l,c),c};return a=o,(...l)=>a(QF(...l))},ZF=[],ut=e=>{const t=r=>r[e]||ZF;return t.isThemeGetter=!0,t},ik=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ak=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e5=/^\d+\/\d+$/,t5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,i5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mo=e=>e5.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),ci=e=>!!e&&Number.isInteger(Number(e)),Rm=e=>e.endsWith("%")&&de(e.slice(0,-1)),Tn=e=>t5.test(e),o5=()=>!0,s5=e=>r5.test(e)&&!n5.test(e),ok=()=>!1,l5=e=>i5.test(e),u5=e=>a5.test(e),c5=e=>!Z(e)&&!ee(e),f5=e=>Js(e,uk,ok),Z=e=>ik.test(e),oa=e=>Js(e,ck,s5),Lm=e=>Js(e,v5,de),tS=e=>Js(e,sk,ok),d5=e=>Js(e,lk,u5),df=e=>Js(e,fk,l5),ee=e=>ak.test(e),Pl=e=>Zs(e,ck),h5=e=>Zs(e,y5),rS=e=>Zs(e,sk),p5=e=>Zs(e,uk),m5=e=>Zs(e,lk),hf=e=>Zs(e,fk,!0),Js=(e,t,r)=>{const n=ik.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Zs=(e,t,r=!1)=>{const n=ak.exec(e);return n?n[1]?t(n[1]):r:!1},sk=e=>e==="position"||e==="percentage",lk=e=>e==="image"||e==="url",uk=e=>e==="length"||e==="size"||e==="bg-size",ck=e=>e==="length",v5=e=>e==="number",y5=e=>e==="family-name",fk=e=>e==="shadow",g5=()=>{const e=ut("color"),t=ut("font"),r=ut("text"),n=ut("font-weight"),i=ut("tracking"),a=ut("leading"),o=ut("breakpoint"),s=ut("container"),l=ut("spacing"),u=ut("radius"),c=ut("shadow"),f=ut("inset-shadow"),d=ut("text-shadow"),h=ut("drop-shadow"),v=ut("blur"),m=ut("perspective"),g=ut("aspect"),y=ut("ease"),b=ut("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],E=()=>[ee,Z,l],j=()=>[mo,"full","auto",...E()],_=()=>[ci,"none","subgrid",ee,Z],T=()=>["auto",{span:["full",ci,ee,Z]},ci,ee,Z],k=()=>[ci,"auto",ee,Z],M=()=>["auto","min","max","fr",ee,Z],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...E()],z=()=>[mo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],N=()=>[e,ee,Z],F=()=>[...S(),rS,tS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",p5,f5,{size:[ee,Z]}],H=()=>[Rm,Pl,oa],Y=()=>["","none","full",u,ee,Z],re=()=>["",de,Pl,oa],be=()=>["solid","dashed","dotted","double"],Ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[de,Rm,rS,tS],St=()=>["","none",v,ee,Z],G=()=>["none",de,ee,Z],se=()=>["none",de,ee,Z],le=()=>[de,ee,Z],U=()=>[mo,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tn],breakpoint:[Tn],color:[o5],container:[Tn],"drop-shadow":[Tn],ease:["in","out","in-out"],font:[c5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tn],shadow:[Tn],spacing:["px",de],text:[Tn],"text-shadow":[Tn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mo,Z,ee,g]}],container:["container"],columns:[{columns:[de,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ci,"auto",ee,Z]}],basis:[{basis:[mo,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,mo,"auto","initial","none",Z]}],grow:[{grow:["",de,ee,Z]}],shrink:[{shrink:["",de,ee,Z]}],order:[{order:[ci,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Pl,oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,Lm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rm,Z]}],"font-family":[{font:[h5,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,Z]}],"line-clamp":[{"line-clamp":[de,"none",ee,Lm]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",ee,oa]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[de,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ci,ee,Z],radial:["",ee,Z],conic:[ci,ee,Z]},m5,d5]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,ee,Z]}],"outline-w":[{outline:["",de,Pl,oa]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",c,hf,df]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,hf,df]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[de,oa]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",d,hf,df]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[de,ee,Z]}],"mix-blend":[{"mix-blend":[...Ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:St()}],brightness:[{brightness:[de,ee,Z]}],contrast:[{contrast:[de,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",h,hf,df]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",de,ee,Z]}],"hue-rotate":[{"hue-rotate":[de,ee,Z]}],invert:[{invert:["",de,ee,Z]}],saturate:[{saturate:[de,ee,Z]}],sepia:[{sepia:["",de,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[de,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[de,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",de,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[de,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[de,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",de,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",ee,Z]}],ease:[{ease:["linear","initial",y,ee,Z]}],delay:[{delay:[de,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Z]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[de,Pl,oa,Lm]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},b5=JF(g5);function fe(...e){return b5(ue(e))}const x5="/static/assets/logo-D6hHn9pX.png",w5=[{title:"Dashboard",href:"/",icon:SF},{title:"Experiments",href:"/experiments",icon:JT},{title:"Artifacts",href:"/artifacts",icon:PF}];function S5(){const e=ao(),t=Rb(),[r,n]=A.useState(!1);return p.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[p.jsxs(Va,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[p.jsx("img",{src:x5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),p.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),p.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:w5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/experiments"&&(o=o||e.pathname.startsWith("/runs")),p.jsxs(Va,{to:i.href,className:fe("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&p.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),p.jsx(a,{className:fe("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),p.jsxs("div",{className:"relative p-3 mt-auto",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[p.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?p.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):p.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:p.jsx(Q1,{className:"h-3.5 w-3.5"})})}),p.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[p.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:p.jsx(gF,{className:"h-3.5 w-3.5"})}),p.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),p.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:p.jsx("div",{className:"p-4",children:p.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?p.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):p.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:p.jsx(Q1,{className:"h-6 w-6"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),p.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function O5(e=0,t=100){const r=Rb();return En({queryKey:["teams",r.id,e,t],queryFn:async()=>(await Mr(Ir.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function zb(e){return En({queryKey:["team",e],queryFn:async()=>(await Mr(Ir.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const Yn=A.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return p.jsx("button",{className:fe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});Yn.displayName="Button";function nt({className:e,...t}){return p.jsx("div",{className:fe("animate-pulse rounded-md bg-muted",e),...t})}function P5(){const e=Nb(),{data:t,isLoading:r}=O5(),{selectedTeamId:n,setSelectedTeamId:i}=Ac(),a=Rb(),[o,s]=A.useState(!1),[l,u]=A.useState(null),c=(d,h)=>{h.stopPropagation(),navigator.clipboard.writeText(d),u(d),setTimeout(()=>u(null),2e3)};if(r)return p.jsx(nt,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return p.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[p.jsx(X1,{className:"h-4 w-4"}),"No teams available"]});const f=t.find(d=>d.id===n);return p.jsxs("div",{className:"relative",children:[p.jsxs(Yn,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[p.jsx(X1,{className:"h-4 w-4 text-muted-foreground"}),p.jsx("span",{className:"text-xs font-medium",children:(f==null?void 0:f.name)||"Select team"}),p.jsx(ip,{className:fe("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),p.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-64 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:p.jsx("div",{className:"p-1.5",children:t.map((d,h)=>{const v=d.id===n,m=l===d.id;return p.jsxs("button",{onClick:()=>{i(d.id,a.id),s(!1),e("/")},className:fe("flex w-full items-start justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",v?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[p.jsxs("div",{className:"flex-1 text-left min-w-0",children:[p.jsx("div",{className:"text-xs font-medium break-words",children:d.name||"Unnamed Team"}),p.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[p.jsx("span",{className:"text-[10px] font-mono text-muted-foreground truncate",children:d.id}),p.jsx("button",{onClick:g=>c(d.id,g),className:"flex-shrink-0 p-0.5 hover:bg-accent rounded transition-colors",title:m?"Copied!":"Copy Team ID",children:p.jsx(QT,{className:fe("h-3 w-3",m?"text-green-600":"text-muted-foreground")})})]})]}),v&&p.jsx(XT,{className:"h-3 w-3 flex-shrink-0 text-primary mt-0.5"})]},d.id)})})})]})]})}function dk(e,t){const{page:r=0,pageSize:n=100,labelName:i,labelValue:a,enabled:o=!0}=t||{};return En({queryKey:["experiments",e,i,a,r,n],queryFn:async()=>(await Mr(Ir.listExperiments,{teamId:e,labelName:i,labelValue:a,page:r,pageSize:n})).experiments,enabled:o&&!!e,refetchInterval:s=>{const l=s.state.data;if(!l)return!1;const u=l.map(c=>c.status);return $b(u)}})}function ap(e,t){const{enabled:r=!0}=t||{};return En({queryKey:["experiment",e],queryFn:async()=>(await Mr(Ir.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?$b([i.status]):!1}})}function E5(e){return En({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await Mr(Ir.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return $b(n)}})}function Vy(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return En({queryKey:["runs",e,r,n],queryFn:async()=>(await Mr(Ir.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return ST(s)}})}function hk(e,t){const{enabled:r=!0}=t||{};return En({queryKey:["run",e],queryFn:async()=>(await Mr(Ir.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?ST([i.status]):!1}})}function Fm(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function A5(){const e=ao(),t=e.pathname.split("/").filter(Boolean),r=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,n=t[0]==="runs"&&t[1]?t[1]:void 0,{data:i}=ap(r||"",{enabled:!!r}),{data:a}=hk(n||"",{enabled:!!n}),s=(()=>{const l=e.pathname.split("/").filter(Boolean);if(l.length===0)return[{label:"Home"}];const u=[{label:"Home",href:"/"}];return l[0]==="experiments"?r&&i?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Fm(i.id),href:l.length===2?void 0:`/experiments/${i.id}`})):u.push({label:"Experiments",href:void 0}):l[0]==="runs"?n&&a?(u.push({label:"Experiments",href:"/experiments"}),u.push({label:Fm(a.experimentId),href:`/experiments/${a.experimentId}`}),u.push({label:"Runs",href:`/experiments/${a.experimentId}`}),u.push({label:Fm(a.id),href:void 0})):u.push({label:"Runs",href:void 0}):l.forEach((c,f)=>{const d="/"+l.slice(0,f+1).join("/"),h=f===l.length-1,v=c.charAt(0).toUpperCase()+c.slice(1);u.push({label:v,href:h?void 0:d})}),u})();return p.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[p.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:s.map((l,u)=>{const c=u===s.length-1;return p.jsxs("div",{className:"flex items-center",children:[u>0&&p.jsx(Lb,{className:"mx-2 h-4 w-4 text-muted-foreground"}),l.href&&!c?p.jsx(Va,{to:l.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:l.label}):p.jsx("span",{className:"text-foreground font-medium",children:l.label})]},u)})}),p.jsx(P5,{})]})}function j5(){return p.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[p.jsx("div",{className:"shadow-sm",children:p.jsx(S5,{})}),p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsx("div",{className:"shadow-sm",children:p.jsx(A5,{})}),p.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:p.jsx(JR,{})})]})]})}function jd(e){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jd(e)}function rn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function je(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Te(e){je(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||jd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function _5(e,t){je(2,arguments);var r=Te(e),n=rn(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function T5(e,t){je(2,arguments);var r=Te(e),n=rn(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function k5(e,t){je(2,arguments);var r=Te(e).getTime(),n=rn(t);return new Date(r+n)}var C5={};function Cc(){return C5}function Gy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Yy(e){je(1,arguments);var t=Te(e);return t.setHours(0,0,0,0),t}function Gf(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function N5(e){return je(1,arguments),e instanceof Date||jd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $5(e){if(je(1,arguments),!N5(e)&&typeof e!="number")return!1;var t=Te(e);return!isNaN(Number(t))}function M5(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function I5(e,t){return je(2,arguments),Te(e).getTime()-Te(t).getTime()}var D5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},R5="trunc";function L5(e){return D5[R5]}function F5(e){je(1,arguments);var t=Te(e);return t.setHours(23,59,59,999),t}function B5(e){je(1,arguments);var t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function z5(e){je(1,arguments);var t=Te(e);return F5(t).getTime()===B5(t).getTime()}function U5(e,t){je(2,arguments);var r=Te(e),n=Te(t),i=Gf(r,n),a=Math.abs(M5(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=Gf(r,n)===-i;z5(Te(e))&&a===1&&Gf(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function W5(e,t,r){je(2,arguments);var n=I5(e,t)/1e3;return L5()(n)}function H5(e,t){je(2,arguments);var r=rn(t);return k5(e,-r)}var K5=864e5;function q5(e){je(1,arguments);var t=Te(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/K5)+1}function _d(e){je(1,arguments);var t=1,r=Te(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function V5(e){je(1,arguments);var t=pk(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=_d(r);return n}var G5=6048e5;function Y5(e){je(1,arguments);var t=Te(e),r=_d(t).getTime()-V5(t).getTime();return Math.round(r/G5)+1}function Td(e,t){var r,n,i,a,o,s,l,u;je(1,arguments);var c=Cc(),f=rn((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Te(e),h=d.getUTCDay(),v=(h=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,h),v.setUTCHours(0,0,0,0);var m=Td(v,t),g=new Date(0);g.setUTCFullYear(f,0,h),g.setUTCHours(0,0,0,0);var y=Td(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=y.getTime()?f:f-1}function X5(e,t){var r,n,i,a,o,s,l,u;je(1,arguments);var c=Cc(),f=rn((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=mk(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var v=Td(h,t);return v}var Q5=6048e5;function J5(e,t){je(1,arguments);var r=Te(e),n=Td(r,t).getTime()-X5(r,t).getTime();return Math.round(n/Q5)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},vo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Z5={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return fi.y(t,r)},Y:function(t,r,n,i){var a=mk(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=pk(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return fi.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=J5(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=Y5(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):fi.d(t,r)},D:function(t,r,n){var i=q5(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=vo.noon:i===0?a=vo.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=vo.evening:i>=12?a=vo.afternoon:i>=4?a=vo.morning:a=vo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return fi.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):fi.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):fi.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):fi.s(t,r)},S:function(t,r){return fi.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return iS(o);case"XXXX":case"XX":return da(o);case"XXXXX":case"XXX":default:return da(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return iS(o);case"xxxx":case"xx":return da(o);case"xxxxx":case"xxx":default:return da(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+nS(o,":");case"OOOO":default:return"GMT"+da(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+nS(o,":");case"zzzz":default:return"GMT"+da(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function nS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function iS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return da(e,t)}function da(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var aS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},vk=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},eB=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return aS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",aS(i,r)).replace("{{time}}",vk(a,r))},tB={p:vk,P:eB},rB=["D","DD"],nB=["YY","YYYY"];function iB(e){return rB.indexOf(e)!==-1}function aB(e){return nB.indexOf(e)!==-1}function oS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var oB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sB=function(t,r,n){var i,a=oB[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Bm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var lB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fB={date:Bm({formats:lB,defaultWidth:"full"}),time:Bm({formats:uB,defaultWidth:"full"}),dateTime:Bm({formats:cB,defaultWidth:"full"})},dB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hB=function(t,r,n,i){return dB[t]};function El(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var pB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vB={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},yB={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xB=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wB={ordinalNumber:xB,era:El({values:pB,defaultWidth:"wide"}),quarter:El({values:mB,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:El({values:vB,defaultWidth:"wide"}),day:El({values:yB,defaultWidth:"wide"}),dayPeriod:El({values:gB,defaultWidth:"wide",formattingValues:bB,defaultFormattingWidth:"wide"})};function Al(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?OB(s,function(f){return f.test(o)}):SB(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function SB(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function OB(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var EB=/^(\d+)(th|st|nd|rd)?/i,AB=/\d+/i,jB={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},_B={any:[/^b/i,/^(a|c)/i]},TB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kB={any:[/1/i,/2/i,/3/i,/4/i]},CB={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},NB={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$B={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},MB={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},IB={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},DB={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},RB={ordinalNumber:PB({matchPattern:EB,parsePattern:AB,valueCallback:function(t){return parseInt(t,10)}}),era:Al({matchPatterns:jB,defaultMatchWidth:"wide",parsePatterns:_B,defaultParseWidth:"any"}),quarter:Al({matchPatterns:TB,defaultMatchWidth:"wide",parsePatterns:kB,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Al({matchPatterns:CB,defaultMatchWidth:"wide",parsePatterns:NB,defaultParseWidth:"any"}),day:Al({matchPatterns:$B,defaultMatchWidth:"wide",parsePatterns:MB,defaultParseWidth:"any"}),dayPeriod:Al({matchPatterns:IB,defaultMatchWidth:"any",parsePatterns:DB,defaultParseWidth:"any"})},yk={code:"en-US",formatDistance:sB,formatLong:fB,formatRelative:hB,localize:wB,match:RB,options:{weekStartsOn:0,firstWeekContainsDate:1}},LB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,FB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,BB=/^'([^]*?)'?$/,zB=/''/g,UB=/[a-zA-Z]/;function Hi(e,t,r){var n,i,a,o,s,l,u,c,f,d,h,v,m,g;je(2,arguments);var y=String(t),b=Cc(),x=(n=(i=void 0)!==null&&i!==void 0?i:b.locale)!==null&&n!==void 0?n:yk,S=rn((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(u=b.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=rn((f=(d=(h=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&h!==void 0?h:b.weekStartsOn)!==null&&d!==void 0?d:(m=b.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Te(e);if(!$5(O))throw new RangeError("Invalid time value");var P=Gy(O),E=H5(O,P),j={firstWeekContainsDate:S,weekStartsOn:w,locale:x,_originalDate:O},_=y.match(FB).map(function(T){var k=T[0];if(k==="p"||k==="P"){var M=tB[k];return M(T,x.formatLong)}return T}).join("").match(LB).map(function(T){if(T==="''")return"'";var k=T[0];if(k==="'")return WB(T);var M=Z5[k];if(M)return aB(T)&&oS(T,t,String(e)),iB(T)&&oS(T,t,String(e)),M(E,T,x.localize,j);if(k.match(UB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return T}).join("");return _}function WB(e){var t=e.match(BB);return t?t[1].replace(zB,"'"):e}function gk(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function HB(e){return gk({},e)}var sS=1440,KB=2520,zm=43200,qB=86400;function VB(e,t,r){var n,i;je(2,arguments);var a=Cc(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:yk;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Gf(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=gk(HB(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=Te(t),c=Te(e)):(u=Te(e),c=Te(t));var f=W5(c,u),d=(Gy(c)-Gy(u))/1e3,h=Math.round((f-d)/60),v;if(h<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):h===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",h,l);if(h<45)return o.formatDistance("xMinutes",h,l);if(h<90)return o.formatDistance("aboutXHours",1,l);if(h{const n=new Date,i=Xy(n,3);return(await Mr(Ir.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.expsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}function YB(e,t=30){return En({queryKey:["dailyTokenUsage",e,t],queryFn:async()=>(await Mr(Ir.getDailyTokenUsage,{teamId:e,days:t})).dailyTokenUsage,enabled:!!e,staleTime:5*60*1e3})}const Se=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:fe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Se.displayName="Card";const kr=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:fe("flex flex-col space-y-1.5 p-6",e),...t}));kr.displayName="CardHeader";const Cr=A.forwardRef(({className:e,...t},r)=>p.jsx("h3",{ref:r,className:fe("text-2xl font-semibold leading-none tracking-tight",e),...t}));Cr.displayName="CardTitle";const nn=A.forwardRef(({className:e,...t},r)=>p.jsx("p",{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));nn.displayName="CardDescription";const Oe=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:fe("p-6 pt-0",e),...t}));Oe.displayName="CardContent";const XB=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:fe("flex items-center p-6 pt-0",e),...t}));XB.displayName="CardFooter";var QB=Array.isArray,or=QB,JB=typeof Kc=="object"&&Kc&&Kc.Object===Object&&Kc,bk=JB,ZB=bk,e4=typeof self=="object"&&self&&self.Object===Object&&self,t4=ZB||e4||Function("return this")(),An=t4,r4=An,n4=r4.Symbol,Nc=n4,lS=Nc,xk=Object.prototype,i4=xk.hasOwnProperty,a4=xk.toString,jl=lS?lS.toStringTag:void 0;function o4(e){var t=i4.call(e,jl),r=e[jl];try{e[jl]=void 0;var n=!0}catch{}var i=a4.call(e);return n&&(t?e[jl]=r:delete e[jl]),i}var s4=o4,l4=Object.prototype,u4=l4.toString;function c4(e){return u4.call(e)}var f4=c4,uS=Nc,d4=s4,h4=f4,p4="[object Null]",m4="[object Undefined]",cS=uS?uS.toStringTag:void 0;function v4(e){return e==null?e===void 0?m4:p4:cS&&cS in Object(e)?d4(e):h4(e)}var ii=v4;function y4(e){return e!=null&&typeof e=="object"}var ai=y4,g4=ii,b4=ai,x4="[object Symbol]";function w4(e){return typeof e=="symbol"||b4(e)&&g4(e)==x4}var el=w4,S4=or,O4=el,P4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E4=/^\w*$/;function A4(e,t){if(S4(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||O4(e)?!0:E4.test(e)||!P4.test(e)||t!=null&&e in Object(t)}var Wb=A4;function j4(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi=j4;const tl=Ae(Zi);var _4=ii,T4=Zi,k4="[object AsyncFunction]",C4="[object Function]",N4="[object GeneratorFunction]",$4="[object Proxy]";function M4(e){if(!T4(e))return!1;var t=_4(e);return t==C4||t==N4||t==k4||t==$4}var Hb=M4;const oe=Ae(Hb);var I4=An,D4=I4["__core-js_shared__"],R4=D4,Um=R4,fS=function(){var e=/[^.]+$/.exec(Um&&Um.keys&&Um.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L4(e){return!!fS&&fS in e}var F4=L4,B4=Function.prototype,z4=B4.toString;function U4(e){if(e!=null){try{return z4.call(e)}catch{}try{return e+""}catch{}}return""}var wk=U4,W4=Hb,H4=F4,K4=Zi,q4=wk,V4=/[\\^$.*+?()[\]{}|]/g,G4=/^\[object .+?Constructor\]$/,Y4=Function.prototype,X4=Object.prototype,Q4=Y4.toString,J4=X4.hasOwnProperty,Z4=RegExp("^"+Q4.call(J4).replace(V4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ez(e){if(!K4(e)||H4(e))return!1;var t=W4(e)?Z4:G4;return t.test(q4(e))}var tz=ez;function rz(e,t){return e==null?void 0:e[t]}var nz=rz,iz=tz,az=nz;function oz(e,t){var r=az(e,t);return iz(r)?r:void 0}var oo=oz,sz=oo,lz=sz(Object,"create"),op=lz,dS=op;function uz(){this.__data__=dS?dS(null):{},this.size=0}var cz=uz;function fz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dz=fz,hz=op,pz="__lodash_hash_undefined__",mz=Object.prototype,vz=mz.hasOwnProperty;function yz(e){var t=this.__data__;if(hz){var r=t[e];return r===pz?void 0:r}return vz.call(t,e)?t[e]:void 0}var gz=yz,bz=op,xz=Object.prototype,wz=xz.hasOwnProperty;function Sz(e){var t=this.__data__;return bz?t[e]!==void 0:wz.call(t,e)}var Oz=Sz,Pz=op,Ez="__lodash_hash_undefined__";function Az(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pz&&t===void 0?Ez:t,this}var jz=Az,_z=cz,Tz=dz,kz=gz,Cz=Oz,Nz=jz;function rl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var Yz=Gz,Xz=sp;function Qz(e,t){var r=this.__data__,n=Xz(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Jz=Qz,Zz=Iz,eU=Wz,tU=qz,rU=Yz,nU=Jz;function nl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Sa=function(t){return Ya(t)&&t.indexOf("%")===t.length-1},q=function(t){return O8(t)&&!$c(t)},j8=function(t){return ae(t)},pt=function(t){return q(t)||Ya(t)},_8=0,so=function(t){var r=++_8;return"".concat(t||"").concat(r)},Wt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!Ya(t))return n;var a;if(Sa(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return $c(a)&&(a=n),i&&a>r&&(a=r),a},xi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},T8=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function R8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Jy(e){"@babel/helpers - typeof";return Jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jy(e)}var bS={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Wn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},xS=null,Hm=null,ex=function e(t){if(t===xS&&Array.isArray(Hm))return Hm;var r=[];return A.Children.forEach(t,function(n){ae(n)||(g8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Hm=r,xS=t,r};function qt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Wn(i)}):n=[Wn(t)],ex(e).forEach(function(i){var a=pr(i,"type.displayName")||pr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function cr(e,t){var r=qt(e,t);return r&&r[0]}var wS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},L8=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],F8=function(t){return t&&t.type&&Ya(t.type)&&L8.indexOf(t.type)>=0},B8=function(t){return t&&Jy(t)==="object"&&"clipDot"in t},z8=function(t,r,n,i){var a,o=(a=Wm==null?void 0:Wm[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||$8.includes(r))||n&&Zb.includes(r)},te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(A.isValidElement(t)&&(i=t.props),!tl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;z8((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Zy=function e(t,r){if(t===r)return!0;var n=A.Children.count(t);if(n!==A.Children.count(r))return!1;if(n===0)return!0;if(n===1)return SS(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tg(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=K8(e,H8),c=i||{width:r,height:n,x:0,y:0},f=ue("recharts-surface",a);return C.createElement("svg",eg({},te(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),C.createElement("title",null,s),C.createElement("desc",null,l),t)}var V8=["children","className"];function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Y8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var he=C.forwardRef(function(e,t){var r=e.children,n=e.className,i=G8(e,V8),a=ue("recharts-layer",n);return C.createElement("g",rg({className:a},te(i,!0),{ref:t}),r)}),Zr=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:J8(e,t,r)}var e6=Z8,t6="\\ud800-\\udfff",r6="\\u0300-\\u036f",n6="\\ufe20-\\ufe2f",i6="\\u20d0-\\u20ff",a6=r6+n6+i6,o6="\\ufe0e\\ufe0f",s6="\\u200d",l6=RegExp("["+s6+t6+a6+o6+"]");function u6(e){return l6.test(e)}var Ck=u6;function c6(e){return e.split("")}var f6=c6,Nk="\\ud800-\\udfff",d6="\\u0300-\\u036f",h6="\\ufe20-\\ufe2f",p6="\\u20d0-\\u20ff",m6=d6+h6+p6,v6="\\ufe0e\\ufe0f",y6="["+Nk+"]",ng="["+m6+"]",ig="\\ud83c[\\udffb-\\udfff]",g6="(?:"+ng+"|"+ig+")",$k="[^"+Nk+"]",Mk="(?:\\ud83c[\\udde6-\\uddff]){2}",Ik="[\\ud800-\\udbff][\\udc00-\\udfff]",b6="\\u200d",Dk=g6+"?",Rk="["+v6+"]?",x6="(?:"+b6+"(?:"+[$k,Mk,Ik].join("|")+")"+Rk+Dk+")*",w6=Rk+Dk+x6,S6="(?:"+[$k+ng+"?",ng,Mk,Ik,y6].join("|")+")",O6=RegExp(ig+"(?="+ig+")|"+S6+w6,"g");function P6(e){return e.match(O6)||[]}var E6=P6,A6=f6,j6=Ck,_6=E6;function T6(e){return j6(e)?_6(e):A6(e)}var k6=T6,C6=e6,N6=Ck,$6=k6,M6=Ek;function I6(e){return function(t){t=M6(t);var r=N6(t)?$6(t):void 0,n=r?r[0]:t.charAt(0),i=r?C6(r,1).join(""):t.slice(1);return n[e]()+i}}var D6=I6,R6=D6,L6=R6("toUpperCase"),F6=L6;const wp=Ae(F6);function Ie(e){return function(){return e}}const Lk=Math.cos,Nd=Math.sin,sn=Math.sqrt,$d=Math.PI,Sp=2*$d,ag=Math.PI,og=2*ag,ha=1e-6,B6=og-ha;function Fk(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Fk;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iha)if(!(Math.abs(f*l-u*c)>ha)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,v=i-s,m=l*l+u*u,g=h*h+v*v,y=Math.sqrt(m),b=Math.sqrt(d),x=a*Math.tan((ag-Math.acos((m+d-g)/(2*y*b)))/2),S=x/b,w=x/y;Math.abs(S-1)>ha&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*h>c*v)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ha||Math.abs(this._y1-c)>ha)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%og+og),d>B6?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>ha&&this._append`A${n},${n},0,${+(d>=ag)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function tx(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new U6(t)}function rx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Bk(e){this._context=e}Bk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Op(e){return new Bk(e)}function zk(e){return e[0]}function Uk(e){return e[1]}function Wk(e,t){var r=Ie(!0),n=null,i=Op,a=null,o=tx(s);e=typeof e=="function"?e:e===void 0?zk:Ie(e),t=typeof t=="function"?t:t===void 0?Uk:Ie(t);function s(l){var u,c=(l=rx(l)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),u=0;u<=c;++u)!(u=h;--v)s.point(x[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(x[d]=+e(g,d,f),S[d]=+t(g,d,f),s.point(n?+n(g,d,f):x[d],r?+r(g,d,f):S[d]))}if(b)return s=null,b+""||null}function c(){return Wk().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class Hk{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function W6(e){return new Hk(e,!0)}function H6(e){return new Hk(e,!1)}const nx={draw(e,t){const r=sn(t/$d);e.moveTo(r,0),e.arc(0,0,r,0,Sp)}},K6={draw(e,t){const r=sn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Kk=sn(1/3),q6=Kk*2,V6={draw(e,t){const r=sn(t/q6),n=r*Kk;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},G6={draw(e,t){const r=sn(t),n=-r/2;e.rect(n,n,r,r)}},Y6=.8908130915292852,qk=Nd($d/10)/Nd(7*$d/10),X6=Nd(Sp/10)*qk,Q6=-Lk(Sp/10)*qk,J6={draw(e,t){const r=sn(t*Y6),n=X6*r,i=Q6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Sp*a/5,s=Lk(o),l=Nd(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Km=sn(3),Z6={draw(e,t){const r=-sn(t/(Km*3));e.moveTo(0,r*2),e.lineTo(-Km*r,-r),e.lineTo(Km*r,-r),e.closePath()}},gr=-.5,br=sn(3)/2,sg=1/sn(12),eW=(sg/2+1)*3,tW={draw(e,t){const r=sn(t/eW),n=r/2,i=r*sg,a=n,o=r*sg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(gr*n-br*i,br*n+gr*i),e.lineTo(gr*a-br*o,br*a+gr*o),e.lineTo(gr*s-br*l,br*s+gr*l),e.lineTo(gr*n+br*i,gr*i-br*n),e.lineTo(gr*a+br*o,gr*o-br*a),e.lineTo(gr*s+br*l,gr*l-br*s),e.closePath()}};function rW(e,t){let r=null,n=tx(i);e=typeof e=="function"?e:Ie(e||nx),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Md(){}function Id(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Vk(e){this._context=e}Vk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Id(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Id(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nW(e){return new Vk(e)}function Gk(e){this._context=e}Gk.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Id(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iW(e){return new Gk(e)}function Yk(e){this._context=e}Yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Id(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aW(e){return new Yk(e)}function Xk(e){this._context=e}Xk.prototype={areaStart:Md,areaEnd:Md,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function oW(e){return new Xk(e)}function PS(e){return e<0?-1:1}function ES(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(PS(a)+PS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function AS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function qm(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Dd(e){this._context=e}Dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qm(this,this._t0,AS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,qm(this,AS(this,r=ES(this,e,t)),r);break;default:qm(this,this._t0,r=ES(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Qk(e){this._context=new Jk(e)}(Qk.prototype=Object.create(Dd.prototype)).point=function(e,t){Dd.prototype.point.call(this,t,e)};function Jk(e){this._context=e}Jk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function sW(e){return new Dd(e)}function lW(e){return new Qk(e)}function Zk(e){this._context=e}Zk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=jS(e),i=jS(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function cW(e){return new Pp(e,.5)}function fW(e){return new Pp(e,0)}function dW(e){return new Pp(e,1)}function gs(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function hW(e,t){return e[t]}function pW(e){const t=[];return t.key=e,t}function mW(){var e=Ie([]),t=lg,r=gs,n=hW;function i(a){var o=Array.from(e.apply(this,arguments),pW),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var eC={symbolCircle:nx,symbolCross:K6,symbolDiamond:V6,symbolSquare:G6,symbolStar:J6,symbolTriangle:Z6,symbolWye:tW},EW=Math.PI/180,AW=function(t){var r="symbol".concat(wp(t));return eC[r]||nx},jW=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*EW;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},_W=function(t,r){eC["symbol".concat(wp(t))]=r},Ep=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=OW(t,bW),u=TS(TS({},l),{},{type:n,size:a,sizeType:s}),c=function(){var g=AW(n),y=rW().type(g).size(jW(a,s,n));return y()},f=u.className,d=u.cx,h=u.cy,v=te(u,!0);return d===+d&&h===+h&&a===+a?C.createElement("path",ug({},v,{className:ue("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};Ep.registerSymbol=_W;function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function cg(){return cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=h.inactive?u:h.color;return C.createElement("li",cg({className:g,style:f,key:"legend-item-".concat(v)},Yi(n.props,h,v)),C.createElement(tg,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(y,h,v):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(A.PureComponent);Tu(ix,"displayName","Legend");Tu(ix,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var LW=lp;function FW(){this.__data__=new LW,this.size=0}var BW=FW;function zW(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var UW=zW;function WW(e){return this.__data__.get(e)}var HW=WW;function KW(e){return this.__data__.has(e)}var qW=KW,VW=lp,GW=qb,YW=Vb,XW=200;function QW(e,t){var r=this.__data__;if(r instanceof VW){var n=r.__data__;if(!GW||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&bH?new mH:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=O7}var lx=P7,E7=ii,A7=lx,j7=ai,_7="[object Arguments]",T7="[object Array]",k7="[object Boolean]",C7="[object Date]",N7="[object Error]",$7="[object Function]",M7="[object Map]",I7="[object Number]",D7="[object Object]",R7="[object RegExp]",L7="[object Set]",F7="[object String]",B7="[object WeakMap]",z7="[object ArrayBuffer]",U7="[object DataView]",W7="[object Float32Array]",H7="[object Float64Array]",K7="[object Int8Array]",q7="[object Int16Array]",V7="[object Int32Array]",G7="[object Uint8Array]",Y7="[object Uint8ClampedArray]",X7="[object Uint16Array]",Q7="[object Uint32Array]",Fe={};Fe[W7]=Fe[H7]=Fe[K7]=Fe[q7]=Fe[V7]=Fe[G7]=Fe[Y7]=Fe[X7]=Fe[Q7]=!0;Fe[_7]=Fe[T7]=Fe[z7]=Fe[k7]=Fe[U7]=Fe[C7]=Fe[N7]=Fe[$7]=Fe[M7]=Fe[I7]=Fe[D7]=Fe[R7]=Fe[L7]=Fe[F7]=Fe[B7]=!1;function J7(e){return j7(e)&&A7(e.length)&&!!Fe[E7(e)]}var Z7=J7;function e9(e){return function(t){return e(t)}}var fC=e9,Bd={exports:{}};Bd.exports;(function(e,t){var r=bk,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Bd,Bd.exports);var t9=Bd.exports,r9=Z7,n9=fC,DS=t9,RS=DS&&DS.isTypedArray,i9=RS?n9(RS):r9,dC=i9,a9=l7,o9=ox,s9=or,l9=cC,u9=sx,c9=dC,f9=Object.prototype,d9=f9.hasOwnProperty;function h9(e,t){var r=s9(e),n=!r&&o9(e),i=!r&&!n&&l9(e),a=!r&&!n&&!i&&c9(e),o=r||n||i||a,s=o?a9(e.length,String):[],l=s.length;for(var u in e)(t||d9.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||u9(u,l)))&&s.push(u);return s}var p9=h9,m9=Object.prototype;function v9(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||m9;return e===r}var y9=v9;function g9(e,t){return function(r){return e(t(r))}}var hC=g9,b9=hC,x9=b9(Object.keys,Object),w9=x9,S9=y9,O9=w9,P9=Object.prototype,E9=P9.hasOwnProperty;function A9(e){if(!S9(e))return O9(e);var t=[];for(var r in Object(e))E9.call(e,r)&&r!="constructor"&&t.push(r);return t}var j9=A9,_9=Hb,T9=lx;function k9(e){return e!=null&&T9(e.length)&&!_9(e)}var Mc=k9,C9=p9,N9=j9,$9=Mc;function M9(e){return $9(e)?C9(e):N9(e)}var Ap=M9,I9=XH,D9=o7,R9=Ap;function L9(e){return I9(e,R9,D9)}var F9=L9,LS=F9,B9=1,z9=Object.prototype,U9=z9.hasOwnProperty;function W9(e,t,r,n,i,a){var o=r&B9,s=LS(e),l=s.length,u=LS(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:U9.call(t,d)))return!1}var h=a.get(e),v=a.get(t);if(h&&v)return h==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++f-1}var zq=Bq;function Uq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=nV){var u=t?null:tV(e);if(u)return rV(u);o=!1,i=eV,l=new Qq}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xV(e){return e.value}function wV(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var r=gV(t,cV);return C.createElement(ix,r)}var eO=1,en=function(e){function t(){var r;fV(this,t);for(var n=arguments.length,i=new Array(n),a=0;aeO||Math.abs(i.height-this.lastBoundingBox.height)>eO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?kn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();d={top:((c||0)-v.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return kn(kn({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=kn(kn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return C.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},wV(a,kn(kn({},this.props),{},{payload:xC(c,u,xV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=kn(kn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(A.PureComponent);jp(en,"displayName","Legend");jp(en,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var tO=Nc,SV=ox,OV=or,rO=tO?tO.isConcatSpreadable:void 0;function PV(e){return OV(e)||SV(e)||!!(rO&&e&&e[rO])}var EV=PV,AV=lC,jV=EV;function OC(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=jV),i||(i=[]);++a0&&r(s)?t>1?OC(s,t-1,r,n,i):AV(i,s):n||(i[i.length]=s)}return i}var PC=OC;function _V(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var TV=_V,kV=TV,CV=kV(),NV=CV,$V=NV,MV=Ap;function IV(e,t){return e&&$V(e,t,MV)}var EC=IV,DV=Mc;function RV(e,t){return function(r,n){if(r==null)return r;if(!DV(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var QV=XV,Xm=Yb,JV=Xb,ZV=jn,eG=AC,tG=qV,rG=fC,nG=QV,iG=sl,aG=or;function oG(e,t,r){t.length?t=Xm(t,function(a){return aG(a)?function(o){return JV(o,a.length===1?a[0]:a)}:a}):t=[iG];var n=-1;t=Xm(t,rG(ZV));var i=eG(e,function(a,o,s){var l=Xm(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return tG(i,function(a,o){return nG(a,o,r)})}var sG=oG;function lG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var uG=lG,cG=uG,iO=Math.max;function fG(e,t,r){return t=iO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=iO(n.length-t,0),o=Array(a);++i0){if(++t>=wG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var EG=PG,AG=xG,jG=EG,_G=jG(AG),TG=_G,kG=sl,CG=dG,NG=TG;function $G(e,t){return NG(CG(e,t,kG),e+"")}var MG=$G,IG=Kb,DG=Mc,RG=sx,LG=Zi;function FG(e,t,r){if(!LG(r))return!1;var n=typeof t;return(n=="number"?DG(r)&&RG(t,r.length):n=="string"&&t in r)?IG(r[t],e):!1}var _p=FG,BG=PC,zG=sG,UG=MG,oO=_p,WG=UG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&oO(e,t[0],t[1])?t=[]:r>2&&oO(t[0],t[1],t[2])&&(t=[t[0]]),zG(e,BG(t,1),[])}),HG=WG;const fx=Ae(HG);function ku(e){"@babel/helpers - typeof";return ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(e)}function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(_l,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat(_l,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(c,l[n]):Math.max(f,l[n])}function aY(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function oY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=uO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=uO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=aY({translateX:c,translateY:f,useTranslate3d:s})):u=nY,{cssProperties:u,cssClasses:iY({translateX:c,translateY:f,coordinate:r})}}function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function cO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fO(e){for(var t=1;tdO||Math.abs(n.height-this.state.lastBoundingBox.height)>dO)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,h=i.offset,v=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,b=i.wrapperStyle,x=oY({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=x.cssClasses,w=x.cssProperties,O=fO(fO({transition:d&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return C.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(A.PureComponent),vY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ea={isSsr:vY()};function Ss(e){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function hO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pO(e){for(var t=1;t0;return C.createElement(mY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:a,coordinate:c,hasPayload:O,offset:h,position:g,reverseDirection:y,useTranslate3d:b,viewBox:x,wrapperStyle:S},AY(u,pO(pO({},this.props),{},{payload:w})))}}])}(A.PureComponent);dx(Nt,"displayName","Tooltip");dx(Nt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ea.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var jY=An,_Y=function(){return jY.Date.now()},TY=_Y,kY=/\s/;function CY(e){for(var t=e.length;t--&&kY.test(e.charAt(t)););return t}var NY=CY,$Y=NY,MY=/^\s+/;function IY(e){return e&&e.slice(0,$Y(e)+1).replace(MY,"")}var DY=IY,RY=DY,mO=Zi,LY=el,vO=NaN,FY=/^[-+]0x[0-9a-f]+$/i,BY=/^0b[01]+$/i,zY=/^0o[0-7]+$/i,UY=parseInt;function WY(e){if(typeof e=="number")return e;if(LY(e))return vO;if(mO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=mO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RY(e);var r=BY.test(e);return r||zY.test(e)?UY(e.slice(2),r?2:8):FY.test(e)?vO:+e}var NC=WY,HY=Zi,Jm=TY,yO=NC,KY="Expected a function",qY=Math.max,VY=Math.min;function GY(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(KY);t=yO(t)||0,HY(r)&&(c=!!r.leading,f="maxWait"in r,a=f?qY(yO(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function h(O){var P=n,E=i;return n=i=void 0,u=O,o=e.apply(E,P),o}function v(O){return u=O,s=setTimeout(y,t),c?h(O):o}function m(O){var P=O-l,E=O-u,j=t-P;return f?VY(j,a-E):j}function g(O){var P=O-l,E=O-u;return l===void 0||P>=t||P<0||f&&E>=a}function y(){var O=Jm();if(g(O))return b(O);s=setTimeout(y,m(O))}function b(O){return s=void 0,d&&n?h(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(Jm())}function w(){var O=Jm(),P=g(O);if(n=arguments,i=this,l=O,P){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(y,t),h(l)}return s===void 0&&(s=setTimeout(y,t)),o}return w.cancel=x,w.flush=S,w}var YY=GY,XY=YY,QY=Zi,JY="Expected a function";function ZY(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(JY);return QY(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),XY(e,t,{leading:n,maxWait:t,trailing:i})}var eX=ZY;const $C=Ae(eX);function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function gO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=$C(M,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(M),I=w.current.getBoundingClientRect(),L=I.width,z=I.height;return T(L,z),R.observe(w.current),function(){R.disconnect()}},[T,m]);var k=A.useMemo(function(){var M=j.containerWidth,R=j.containerHeight;if(M<0||R<0)return null;Zr(Sa(o)||Sa(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),Zr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Sa(o)?M:o,L=Sa(l)?R:l;r&&r>0&&(I?L=I/r:L&&(I=L*r),d&&L>d&&(L=d)),Zr(I>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,I,L,o,l,c,f,r);var z=!Array.isArray(h)&&Wn(h.type).endsWith("Chart");return C.Children.map(h,function(N){return C.isValidElement(N)?A.cloneElement(N,yf({width:I,height:L},z?{style:yf({height:"100%",width:"100%",maxHeight:L,maxWidth:I},N.props.style)}:{})):N})},[r,h,l,d,f,c,j,o]);return C.createElement("div",{id:g?"".concat(g):void 0,className:ue("recharts-responsive-container",y),style:yf(yf({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:w},k)}),ll=function(t){return null};ll.displayName="Cell";function $u(e){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(e)}function xO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ea.isSsr)return{width:0,height:0};var n=pX(r),i=JSON.stringify({text:t,copyStyle:n});if(yo.widthCache[i])return yo.widthCache[i];try{var a=document.getElementById(wO);a||(a=document.createElement("span"),a.setAttribute("id",wO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Sg(Sg({},hX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return yo.widthCache[i]=l,++yo.cacheCount>dX&&(yo.cacheCount=0,yo.widthCache={}),l}catch{return{width:0,height:0}}},mX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Mu(e){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(e)}function Hd(e,t){return bX(e)||gX(e,t)||yX(e,t)||vX()}function vX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yX(e,t){if(e){if(typeof e=="string")return SO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SO(e,t)}}function SO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $X(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _O(e,t){return RX(e)||DX(e,t)||IX(e,t)||MX()}function MX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IX(e,t){if(e){if(typeof e=="string")return TO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TO(e,t)}}function TO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(L,z){var N=z.word,F=z.width,W=L[L.length-1];if(W&&(i==null||a||W.width+F+nz.width?L:z})};if(!c)return h;for(var m="…",g=function(I){var L=f.slice(0,I),z=RC({breakAll:u,style:l,children:L+m}).wordsWithComputedWidth,N=d(z),F=N.length>o||v(N).width>Number(i);return[F,N]},y=0,b=f.length-1,x=0,S;y<=b&&x<=f.length-1;){var w=Math.floor((y+b)/2),O=w-1,P=g(O),E=_O(P,2),j=E[0],_=E[1],T=g(w),k=_O(T,1),M=k[0];if(!j&&!M&&(y=w+1),j&&M&&(b=w-1),!j&&M){S=_;break}x++}return S||h},kO=function(t){var r=ae(t)?[]:t.toString().split(DC);return[{words:r}]},FX=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ea.isSsr){var l,u,c=RC({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return kO(i);return LX({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return kO(i)},CO="#808080",Qa=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,v=t.verticalAnchor,m=v===void 0?"end":v,g=t.fill,y=g===void 0?CO:g,b=jO(t,CX),x=A.useMemo(function(){return FX({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,P=b.className,E=b.breakAll,j=jO(b,NX);if(!pt(n)||!pt(a))return null;var _=n+(q(S)?S:0),T=a+(q(w)?w:0),k;switch(m){case"start":k=Zm("calc(".concat(u,")"));break;case"middle":k=Zm("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:k=Zm("calc(".concat(x.length-1," * -").concat(s,")"));break}var M=[];if(f){var R=x[0].width,I=b.width;M.push("scale(".concat((q(I)?I/R:1)/R,")"))}return O&&M.push("rotate(".concat(O,", ").concat(_,", ").concat(T,")")),M.length&&(j.transform=M.join(" ")),C.createElement("text",Og({},te(j,!0),{x:_,y:T,className:ue("recharts-text",P),textAnchor:h,fill:y.includes("url")?CO:y}),x.map(function(L,z){var N=L.words.join(E?"":" ");return C.createElement("tspan",{x:_,dy:z===0?k:s,key:"".concat(N,"-").concat(z)},N)}))};function Ki(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function BX(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function hx(e){let t,r,n;e.length!==2?(t=Ki,r=(s,l)=>Ki(e(s),l),n=(s,l)=>e(s)-l):(t=e===Ki||e===BX?e:zX,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function zX(){return 0}function LC(e){return e===null?NaN:+e}function*UX(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const WX=hx(Ki),Ic=WX.right;hx(LC).center;class NO extends Map{constructor(t,r=qX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get($O(this,t))}has(t){return super.has($O(this,t))}set(t,r){return super.set(HX(this,t),r)}delete(t){return super.delete(KX(this,t))}}function $O({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function HX({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function KX({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function qX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function VX(e=Ki){if(e===Ki)return FC;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function FC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const GX=Math.sqrt(50),YX=Math.sqrt(10),XX=Math.sqrt(2);function Kd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=GX?10:a>=YX?5:a>=XX?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function IO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function BC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?FC:VX(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),v=Math.min(n,Math.floor(t+(l-u)*f/l+d));BC(e,t,h,v,i)}const a=e[t];let o=r,s=n;for(Tl(e,r,t),i(e[n],a)>0&&Tl(e,r,n);o0;)--s}i(e[r],a)===0?Tl(e,r,s):(++s,Tl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Tl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function QX(e,t,r){if(e=Float64Array.from(UX(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return IO(e);if(t>=1)return MO(e);var n,i=(n-1)*t,a=Math.floor(i),o=MO(BC(e,a).subarray(0,a+1)),s=IO(e.subarray(a+1));return o+(s-o)*(i-a)}}function JX(e,t,r=LC){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function ZX(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?bf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?bf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tQ.exec(e))?new er(t[1],t[2],t[3],1):(t=rQ.exec(e))?new er(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nQ.exec(e))?bf(t[1],t[2],t[3],t[4]):(t=iQ.exec(e))?bf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=aQ.exec(e))?UO(t[1],t[2]/100,t[3]/100,1):(t=oQ.exec(e))?UO(t[1],t[2]/100,t[3]/100,t[4]):DO.hasOwnProperty(e)?FO(DO[e]):e==="transparent"?new er(NaN,NaN,NaN,0):null}function FO(e){return new er(e>>16&255,e>>8&255,e&255,1)}function bf(e,t,r,n){return n<=0&&(e=t=r=NaN),new er(e,t,r,n)}function uQ(e){return e instanceof Dc||(e=Lu(e)),e?(e=e.rgb(),new er(e.r,e.g,e.b,e.opacity)):new er}function _g(e,t,r,n){return arguments.length===1?uQ(e):new er(e,t,r,n??1)}function er(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}mx(er,_g,UC(Dc,{brighter(e){return e=e==null?qd:Math.pow(qd,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new er(La(this.r),La(this.g),La(this.b),Vd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:BO,formatHex:BO,formatHex8:cQ,formatRgb:zO,toString:zO}));function BO(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}`}function cQ(){return`#${Oa(this.r)}${Oa(this.g)}${Oa(this.b)}${Oa((isNaN(this.opacity)?1:this.opacity)*255)}`}function zO(){const e=Vd(this.opacity);return`${e===1?"rgb(":"rgba("}${La(this.r)}, ${La(this.g)}, ${La(this.b)}${e===1?")":`, ${e})`}`}function Vd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function La(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oa(e){return e=La(e),(e<16?"0":"")+e.toString(16)}function UO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Xr(e,t,r,n)}function WC(e){if(e instanceof Xr)return new Xr(e.h,e.s,e.l,e.opacity);if(e instanceof Dc||(e=Lu(e)),!e)return new Xr;if(e instanceof Xr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Xr(o,s,l,e.opacity)}function fQ(e,t,r,n){return arguments.length===1?WC(e):new Xr(e,t,r,n??1)}function Xr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}mx(Xr,fQ,UC(Dc,{brighter(e){return e=e==null?qd:Math.pow(qd,e),new Xr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new Xr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new er(ev(e>=240?e-240:e+120,i,n),ev(e,i,n),ev(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Xr(WO(this.h),xf(this.s),xf(this.l),Vd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vd(this.opacity);return`${e===1?"hsl(":"hsla("}${WO(this.h)}, ${xf(this.s)*100}%, ${xf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function WO(e){return e=(e||0)%360,e<0?e+360:e}function xf(e){return Math.max(0,Math.min(1,e||0))}function ev(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const vx=e=>()=>e;function dQ(e,t){return function(r){return e+r*t}}function hQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function pQ(e){return(e=+e)==1?HC:function(t,r){return r-t?hQ(t,r,e):vx(isNaN(t)?r:t)}}function HC(e,t){var r=t-e;return r?dQ(e,r):vx(isNaN(e)?t:e)}const HO=function e(t){var r=pQ(t);function n(i,a){var o=r((i=_g(i)).r,(a=_g(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=HC(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function mQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Gd(n,i)})),r=tv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function AQ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?jQ:AQ,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((u||(u=s(t,e.map(n),Gd)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Yd),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=yx,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Ht,c()):o!==Ht},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,c()}}function gx(){return Tp()(Ht,Ht)}function _Q(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xd(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Os(e){return e=Xd(Math.abs(e)),e?e[1]:NaN}function TQ(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function kQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var CQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fu(e){if(!(t=CQ.exec(e)))throw new Error("invalid format: "+e);var t;return new bx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Fu.prototype=bx.prototype;function bx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}bx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function NQ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var KC;function $Q(e,t){var r=Xd(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(KC=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Xd(e,Math.max(0,t+a-1))[0]}function qO(e,t){var r=Xd(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const VO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_Q,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qO(e*100,t),r:qO,s:$Q,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GO(e){return e}var YO=Array.prototype.map,XO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MQ(e){var t=e.grouping===void 0||e.thousands===void 0?GO:TQ(YO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?GO:kQ(YO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Fu(f);var d=f.fill,h=f.align,v=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):VO[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=m==="$"?n:/[%p]/.test(w)?o:"",E=VO[w],j=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function _(T){var k=O,M=P,R,I,L;if(w==="c")M=E(T)+M,T="";else{T=+T;var z=T<0||1/T<0;if(T=isNaN(T)?l:E(Math.abs(T),x),S&&(T=NQ(T)),z&&+T==0&&v!=="+"&&(z=!1),k=(z?v==="("?v:s:v==="-"||v==="("?"":v)+k,M=(w==="s"?XO[8+KC/3]:"")+M+(z&&v==="("?")":""),j){for(R=-1,I=T.length;++RL||L>57){M=(L===46?i+T.slice(R+1):T.slice(R))+M,T=T.slice(0,R);break}}}b&&!g&&(T=t(T,1/0));var N=k.length+T.length+M.length,F=N>1)+k+T+M+F.slice(N);break;default:T=F+k+T+M;break}return a(T)}return _.toString=function(){return f+""},_}function c(f,d){var h=u((f=Fu(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Os(d)/3)))*3,m=Math.pow(10,-v),g=XO[8+v/3];return function(y){return h(m*y)+g}}return{format:u,formatPrefix:c}}var wf,xx,qC;IQ({thousands:",",grouping:[3],currency:["$",""]});function IQ(e){return wf=MQ(e),xx=wf.format,qC=wf.formatPrefix,wf}function DQ(e){return Math.max(0,-Os(Math.abs(e)))}function RQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Os(t)/3)))*3-Os(Math.abs(e)))}function LQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Os(t)-Os(e))+1}function VC(e,t,r,n){var i=Ag(e,t,r),a;switch(n=Fu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=RQ(i,o))&&(n.precision=a),qC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=LQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=DQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return xx(n)}function ta(e){var t=e.domain;return e.ticks=function(r){var n=t();return Pg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return VC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=Eg(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Qd(){var e=gx();return e.copy=function(){return Rc(e,Qd())},Fr.apply(e,arguments),ta(e)}function GC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Yd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return GC(e).unknown(t)},e=arguments.length?Array.from(e,Yd):[0,1],ta(r)}function YC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function WQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ZO(e){return(t,r)=>-e(-t,r)}function wx(e){const t=e(QO,JO),r=t.domain;let n=10,i,a;function o(){return i=WQ(n),a=UQ(n),r()[0]<0?(i=ZO(i),a=ZO(a),e(FQ,BQ)):e(QO,JO),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=h;++d)for(v=1;vc)break;y.push(m)}}else for(;d<=h;++d)for(v=n-1;v>=1;--v)if(m=d>0?v/a(-d):v*a(d),!(mc)break;y.push(m)}y.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Fu(l)).precision==null&&(l.trim=!0),l=xx(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(YC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function XC(){const e=wx(Tp()).domain([1,10]);return e.copy=()=>Rc(e,XC()).base(e.base()),Fr.apply(e,arguments),e}function eP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function tP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Sx(e){var t=1,r=e(eP(t),tP(t));return r.constant=function(n){return arguments.length?e(eP(t=+n),tP(t)):t},ta(r)}function QC(){var e=Sx(Tp());return e.copy=function(){return Rc(e,QC()).constant(e.constant())},Fr.apply(e,arguments)}function rP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function HQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function KQ(e){return e<0?-e*e:e*e}function Ox(e){var t=e(Ht,Ht),r=1;function n(){return r===1?e(Ht,Ht):r===.5?e(HQ,KQ):e(rP(r),rP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ta(t)}function Px(){var e=Ox(Tp());return e.copy=function(){return Rc(e,Px()).exponent(e.exponent())},Fr.apply(e,arguments),e}function qQ(){return Px.apply(null,arguments).exponent(.5)}function nP(e){return Math.sign(e)*e*e}function VQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function JC(){var e=gx(),t=[0,1],r=!1,n;function i(a){var o=VQ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(nP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Yd)).map(nP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return JC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Fr.apply(i,arguments),ta(i)}function ZC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return eN().domain([e,t]).range(i).unknown(a)},Fr.apply(ta(o),arguments)}function tN(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Ic(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return tN().domain(e).range(t).unknown(r)},Fr.apply(i,arguments)}const rv=new Date,nv=new Date;function mt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(umt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(rv.setTime(+a),nv.setTime(+o),e(rv),e(nv),Math.floor(r(rv,nv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Jd=mt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jd.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?mt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jd);Jd.range;const Fn=1e3,_r=Fn*60,Bn=_r*60,Xn=Bn*24,Ex=Xn*7,iP=Xn*30,iv=Xn*365,Pa=mt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Fn)},(e,t)=>(t-e)/Fn,e=>e.getUTCSeconds());Pa.range;const Ax=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fn)},(e,t)=>{e.setTime(+e+t*_r)},(e,t)=>(t-e)/_r,e=>e.getMinutes());Ax.range;const jx=mt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*_r)},(e,t)=>(t-e)/_r,e=>e.getUTCMinutes());jx.range;const _x=mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fn-e.getMinutes()*_r)},(e,t)=>{e.setTime(+e+t*Bn)},(e,t)=>(t-e)/Bn,e=>e.getHours());_x.range;const Tx=mt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Bn)},(e,t)=>(t-e)/Bn,e=>e.getUTCHours());Tx.range;const Lc=mt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_r)/Xn,e=>e.getDate()-1);Lc.range;const kp=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>e.getUTCDate()-1);kp.range;const rN=mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Xn,e=>Math.floor(e/Xn));rN.range;function lo(e){return mt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*_r)/Ex)}const Cp=lo(0),Zd=lo(1),GQ=lo(2),YQ=lo(3),Ps=lo(4),XQ=lo(5),QQ=lo(6);Cp.range;Zd.range;GQ.range;YQ.range;Ps.range;XQ.range;QQ.range;function uo(e){return mt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ex)}const Np=uo(0),eh=uo(1),JQ=uo(2),ZQ=uo(3),Es=uo(4),eJ=uo(5),tJ=uo(6);Np.range;eh.range;JQ.range;ZQ.range;Es.range;eJ.range;tJ.range;const kx=mt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());kx.range;const Cx=mt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Cx.range;const Qn=mt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Qn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Qn.range;const Jn=mt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Jn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:mt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Jn.range;function nN(e,t,r,n,i,a){const o=[[Pa,1,Fn],[Pa,5,5*Fn],[Pa,15,15*Fn],[Pa,30,30*Fn],[a,1,_r],[a,5,5*_r],[a,15,15*_r],[a,30,30*_r],[i,1,Bn],[i,3,3*Bn],[i,6,6*Bn],[i,12,12*Bn],[n,1,Xn],[n,2,2*Xn],[r,1,Ex],[t,1,iP],[t,3,3*iP],[e,1,iv]];function s(u,c,f){const d=cg).right(o,d);if(h===o.length)return e.every(Ag(u/iv,c/iv,f));if(h===0)return Jd.every(Math.max(Ag(u,c,f),1));const[v,m]=o[d/o[h-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ye=ov(kl(U.y,0,1)),st=ye.getUTCDay(),ye=st>4||st===0?eh.ceil(ye):eh(ye),ye=kp.offset(ye,(U.V-1)*7),U.y=ye.getUTCFullYear(),U.m=ye.getUTCMonth(),U.d=ye.getUTCDate()+(U.w+6)%7):(ye=av(kl(U.y,0,1)),st=ye.getDay(),ye=st>4||st===0?Zd.ceil(ye):Zd(ye),ye=Lc.offset(ye,(U.V-1)*7),U.y=ye.getFullYear(),U.m=ye.getMonth(),U.d=ye.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),st="Z"in U?ov(kl(U.y,0,1)).getUTCDay():av(kl(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(st+5)%7:U.w+U.U*7-(st+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,ov(U)):av(U)}}function E(G,se,le,U){for(var Ye=0,ye=se.length,st=le.length,lt,Yt;Ye=st)return-1;if(lt=se.charCodeAt(Ye++),lt===37){if(lt=se.charAt(Ye++),Yt=w[lt in aP?se.charAt(Ye++):lt],!Yt||(U=Yt(G,le,U))<0)return-1}else if(lt!=le.charCodeAt(U++))return-1}return U}function j(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=h.exec(se.slice(le));return U?(G.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=f.exec(se.slice(le));return U?(G.w=d.get(U[0].toLowerCase()),le+U[0].length):-1}function k(G,se,le){var U=y.exec(se.slice(le));return U?(G.m=b.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=g.get(U[0].toLowerCase()),le+U[0].length):-1}function R(G,se,le){return E(G,t,se,le)}function I(G,se,le){return E(G,r,se,le)}function L(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function N(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function re(G){return a[G.getUTCDay()]}function be(G){return l[G.getUTCMonth()]}function Ue(G){return s[G.getUTCMonth()]}function we(G){return i[+(G.getUTCHours()>=12)]}function St(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=P(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=P(G+="",!0);return se.toString=function(){return G},se}}}var aP={"-":"",_:" ",0:"0"},wt=/^\s*\d+/,sJ=/^%/,lJ=/[\\^$*+?|[\]().{}]/g;function xe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function cJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function fJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function dJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function hJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function pJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function oP(e,t,r){var n=wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function sP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function mJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function vJ(e,t,r){var n=wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function yJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function lP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function gJ(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function uP(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function bJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function xJ(e,t,r){var n=wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function wJ(e,t,r){var n=wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function SJ(e,t,r){var n=wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function OJ(e,t,r){var n=sJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function PJ(e,t,r){var n=wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function EJ(e,t,r){var n=wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function cP(e,t){return xe(e.getDate(),t,2)}function AJ(e,t){return xe(e.getHours(),t,2)}function jJ(e,t){return xe(e.getHours()%12||12,t,2)}function _J(e,t){return xe(1+Lc.count(Qn(e),e),t,3)}function iN(e,t){return xe(e.getMilliseconds(),t,3)}function TJ(e,t){return iN(e,t)+"000"}function kJ(e,t){return xe(e.getMonth()+1,t,2)}function CJ(e,t){return xe(e.getMinutes(),t,2)}function NJ(e,t){return xe(e.getSeconds(),t,2)}function $J(e){var t=e.getDay();return t===0?7:t}function MJ(e,t){return xe(Cp.count(Qn(e)-1,e),t,2)}function aN(e){var t=e.getDay();return t>=4||t===0?Ps(e):Ps.ceil(e)}function IJ(e,t){return e=aN(e),xe(Ps.count(Qn(e),e)+(Qn(e).getDay()===4),t,2)}function DJ(e){return e.getDay()}function RJ(e,t){return xe(Zd.count(Qn(e)-1,e),t,2)}function LJ(e,t){return xe(e.getFullYear()%100,t,2)}function FJ(e,t){return e=aN(e),xe(e.getFullYear()%100,t,2)}function BJ(e,t){return xe(e.getFullYear()%1e4,t,4)}function zJ(e,t){var r=e.getDay();return e=r>=4||r===0?Ps(e):Ps.ceil(e),xe(e.getFullYear()%1e4,t,4)}function UJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function fP(e,t){return xe(e.getUTCDate(),t,2)}function WJ(e,t){return xe(e.getUTCHours(),t,2)}function HJ(e,t){return xe(e.getUTCHours()%12||12,t,2)}function KJ(e,t){return xe(1+kp.count(Jn(e),e),t,3)}function oN(e,t){return xe(e.getUTCMilliseconds(),t,3)}function qJ(e,t){return oN(e,t)+"000"}function VJ(e,t){return xe(e.getUTCMonth()+1,t,2)}function GJ(e,t){return xe(e.getUTCMinutes(),t,2)}function YJ(e,t){return xe(e.getUTCSeconds(),t,2)}function XJ(e){var t=e.getUTCDay();return t===0?7:t}function QJ(e,t){return xe(Np.count(Jn(e)-1,e),t,2)}function sN(e){var t=e.getUTCDay();return t>=4||t===0?Es(e):Es.ceil(e)}function JJ(e,t){return e=sN(e),xe(Es.count(Jn(e),e)+(Jn(e).getUTCDay()===4),t,2)}function ZJ(e){return e.getUTCDay()}function eZ(e,t){return xe(eh.count(Jn(e)-1,e),t,2)}function tZ(e,t){return xe(e.getUTCFullYear()%100,t,2)}function rZ(e,t){return e=sN(e),xe(e.getUTCFullYear()%100,t,2)}function nZ(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function iZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Es(e):Es.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function aZ(){return"+0000"}function dP(){return"%"}function hP(e){return+e}function pP(e){return Math.floor(+e/1e3)}var go,lN,uN;oZ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function oZ(e){return go=oJ(e),lN=go.format,go.parse,uN=go.utcFormat,go.utcParse,go}function sZ(e){return new Date(e)}function lZ(e){return e instanceof Date?+e:+new Date(+e)}function Nx(e,t,r,n,i,a,o,s,l,u){var c=gx(),f=c.invert,d=c.domain,h=u(".%L"),v=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>QX(e,a/n))},r.copy=function(){return hN(t).domain(e)},oi.apply(r,arguments)}function Mp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Ht,c,f=!1,d;function h(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-a)*(n*mt}var yN=mZ,vZ=Ip,yZ=yN,gZ=sl;function bZ(e){return e&&e.length?vZ(e,gZ,yZ):void 0}var xZ=bZ;const Dp=Ae(xZ);function wZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Be;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Hn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return $e(Hn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ot(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(fr))throw Error(Dr+"NaN");if(r.s<1)throw Error(Dr+(r.s?"NaN":"-Infinity"));return r.eq(fr)?new n(0):(He=!1,t=Hn(Bu(r,a),Bu(e,a),a),He=!0,$e(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?SN(t,e):xN(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Dr+"NaN");return r.s?(He=!1,t=Hn(r,e,0,1).times(e),He=!0,r.minus(t)):$e(new n(r),i)};J.naturalExponential=J.exp=function(){return wN(this)};J.naturalLogarithm=J.ln=function(){return Bu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xN(t,e):SN(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Fa+e);if(t=ot(i)+1,n=i.d.length-1,r=n*Be+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Dr+"NaN")}for(e=ot(s),He=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=yn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Hn(s,a,o+2)).times(.5),yn(a.d).slice(0,o)===(t=yn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return He=!0,$e(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%yt|0,t=s/yt|0;a[i]=(a[i]+t)%yt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,He?$e(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Pn(e,0,fl),t===void 0?t=n.rounding:Pn(t,0,8),$e(r,e+ot(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ja(n,!0):(Pn(e,0,fl),t===void 0?t=i.rounding:Pn(t,0,8),n=$e(new i(n),e+1,t),r=Ja(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ja(i):(Pn(e,0,fl),t===void 0?t=a.rounding:Pn(t,0,8),n=$e(new a(i),e+ot(i)+1,t),r=Ja(n.abs(),!1,e+ot(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ot(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(fr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Dr+"Infinity");return s}if(s.eq(fr))return s;if(n=l.precision,e.eq(fr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=bN){for(i=new l(fr),t=Math.ceil(n/Be+4),He=!1;r%2&&(i=i.times(s),yP(i.d,t)),r=dl(r/2),r!==0;)s=s.times(s),yP(s.d,t);return He=!0,e.s<0?new l(fr).div(i):$e(i,n)}}else if(a<0)throw Error(Dr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,He=!1,i=e.times(Bu(s,n+u)),He=!0,i=wN(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ot(i),n=Ja(i,r<=a.toExpNeg||r>=a.toExpPos)):(Pn(e,1,fl),t===void 0?t=a.rounding:Pn(t,0,8),i=$e(new a(i),e,t),r=ot(i),n=Ja(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Pn(e,1,fl),t===void 0?t=n.rounding:Pn(t,0,8)),$e(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ot(e),r=e.constructor;return Ja(e,t<=r.toExpNeg||t>=r.toExpPos)};function xN(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),He?$e(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/Be),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/yt|0,l[a]%=yt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,He?$e(t,f):t}function Pn(e,t,r){if(e!==~~e||er)throw Error(Fa+e)}function yn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,d,h,v,m,g,y,b,x,S,w,O,P,E,j=n.constructor,_=n.s==i.s?1:-1,T=n.d,k=i.d;if(!n.s)return new j(n);if(!i.s)throw Error(Dr+"Division by zero");for(l=n.e-i.e,P=k.length,w=T.length,h=new j(_),v=h.d=[],u=0;k[u]==(T[u]||0);)++u;if(k[u]>(T[u]||0)&&--l,a==null?b=a=j.precision:o?b=a+(ot(n)-ot(i))+1:b=a,b<0)return new j(0);if(b=b/Be+2|0,u=0,P==1)for(c=0,k=k[0],b++;(u1&&(k=e(k,c),T=e(T,c),P=k.length,w=T.length),S=P,m=T.slice(0,P),g=m.length;g=yt/2&&++O;do c=0,s=t(k,m,P,g),s<0?(y=m[0],P!=g&&(y=y*yt+(m[1]||0)),c=y/O|0,c>1?(c>=yt&&(c=yt-1),f=e(k,c),d=f.length,g=m.length,s=t(f,m,d,g),s==1&&(c--,r(f,P16)throw Error(Ix+ot(e));if(!e.s)return new c(fr);for(He=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(ma(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(fr),c.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(Hn(i,r,s)),yn(o.d).slice(0,s)===yn(a.d).slice(0,s)){for(;u--;)a=$e(a.times(a),s);return c.precision=f,t==null?(He=!0,$e(a,f)):a}a=o}}function ot(e){for(var t=e.e*Be,r=e.d[0];r>=10;r/=10)t++;return t}function sv(e,t,r){if(t>e.LN10.sd())throw He=!0,r&&(e.precision=r),Error(Dr+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function yi(e){for(var t="";e--;)t+="0";return t}function Bu(e,t){var r,n,i,a,o,s,l,u,c,f=1,d=10,h=e,v=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(Dr+(h.s?"NaN":"-Infinity"));if(h.eq(fr))return new m(0);if(t==null?(He=!1,u=g):u=t,h.eq(10))return t==null&&(He=!0),sv(m,u);if(u+=d,m.precision=u,r=yn(v),n=r.charAt(0),a=ot(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=yn(h.d),n=r.charAt(0),f++;a=ot(h),n>1?(h=new m("0."+r),a++):h=new m(n+"."+r.slice(1))}else return l=sv(m,u+2,g).times(a+""),h=Bu(new m(n+"."+r.slice(1)),u-d).plus(l),m.precision=g,t==null?(He=!0,$e(h,g)):h;for(s=o=h=Hn(h.minus(fr),h.plus(fr),u),c=$e(h.times(h),u),i=3;;){if(o=$e(o.times(c),u),l=s.plus(Hn(o,new m(i),u)),yn(l.d).slice(0,u)===yn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(sv(m,u+2,g).times(a+""))),s=Hn(s,new m(f),u),m.precision=g,t==null?(He=!0,$e(s,g)):s;s=l,i+=2}}function vP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=dl(r/Be),e.d=[],n=(r+1)%Be,r<0&&(n+=Be),nth||e.e<-th))throw Error(Ix+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Be,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Be),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=Be,i=n-Be+o}if(r!==void 0&&(a=ma(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/ma(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ot(e),f.length=1,t=t-a-1,f[0]=ma(10,(Be-t%Be)%Be),e.e=dl(-t/Be)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=ma(10,Be-n),f[c]=i>0?(u/ma(10,o-i)%ma(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==yt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=yt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(He&&(e.e>th||e.e<-th))throw Error(Ix+ot(e));return e}function SN(e,t){var r,n,i,a,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),He?$e(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(h/Be),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+yi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+yi(-i-1)+a,r&&(n=r-o)>0&&(a+=yi(n))):i>=o?(a+=yi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+yi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=yi(n))),e.s<0?"-"+a:a}function yP(e,t){if(e.length>t)return e.length=t,!0}function ON(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Fa+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return vP(o,a.toString())}else if(typeof a!="string")throw Error(Fa+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,UZ.test(a))vP(o,a);else throw Error(Fa+a)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=ON,i.config=i.set=WZ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Fa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fa+r+": "+n);return this}var Dx=ON(zZ);fr=new Dx(1);const Ne=Dx;function HZ(e){return GZ(e)||VZ(e)||qZ(e)||KZ()}function KZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qZ(e,t){if(e){if(typeof e=="string")return Cg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cg(e,t)}}function VZ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function GZ(e){if(Array.isArray(e))return Cg(e)}function Cg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,gP(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function uee(e){if(Array.isArray(e))return e}function _N(e){var t=zu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function TN(e,t,r){if(e.lte(0))return new Ne(0);var n=Fp.getDigitCount(e.toNumber()),i=new Ne(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ne(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ne(Math.ceil(l))}function cee(e,t,r){var n=1,i=new Ne(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ne(10).pow(Fp.getDigitCount(e)-1),i=new Ne(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ne(Math.floor(e)))}else e===0?i=new Ne(Math.floor((t-1)/2)):r||(i=new Ne(Math.floor(e)));var o=Math.floor((t-1)/2),s=JZ(QZ(function(l){return i.add(new Ne(l-o).mul(n)).toNumber()}),Ng);return s(0,t)}function kN(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ne(0),tickMin:new Ne(0),tickMax:new Ne(0)};var a=TN(new Ne(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ne(0):(o=new Ne(e).add(t).div(2),o=o.sub(new Ne(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ne(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?kN(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ne(s).mul(a)),tickMax:o.add(new Ne(l).mul(a))})}function fee(e){var t=zu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=_N([r,n]),l=zu(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Mg(Ng(0,i-1).map(function(){return 1/0}))):[].concat(Mg(Ng(0,i-1).map(function(){return-1/0})),[c]);return r>n?$g(f):f}if(u===c)return cee(u,i,a);var d=kN(u,c,o,a),h=d.step,v=d.tickMin,m=d.tickMax,g=Fp.rangeStep(v,m.add(new Ne(.1).mul(h)),h);return r>n?$g(g):g}function dee(e,t){var r=zu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=_N([n,i]),s=zu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=TN(new Ne(u).sub(l).div(c-1),a,0),d=[].concat(Mg(Fp.rangeStep(new Ne(l),new Ne(u).sub(new Ne(.99).mul(f)),f)),[u]);return n>i?$g(d):d}var hee=AN(fee),pee=AN(dee),mee="Invariant failed";function Za(e,t){throw new Error(mee)}var vee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Pee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,d=u>=s-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Ut(f-c)!==Ut(d-f)){var v=[];if(Ut(d-f)===Ut(l[1]-l[0])){h=d;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{h=c;var g=d+l[1]-l[0];v[0]=Math.min(f,(g+f)/2),v[1]=Math.max(f,(g+f)/2)}var y=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var b=Math.min(c,d),x=Math.max(c,d);if(t>(b+f)/2&&t<=(x+f)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Rx=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Je(Je({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},Uee=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(y&&y.length){var b=y[0].type.defaultProps,x=b!==void 0?Je(Je({},b),y[0].props):y[0].props,S=x.barSize,w=x[g];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:y[0],stackList:y.slice(1),barSize:ae(O)?void 0:Wt(O,n,0)})}}return o},Wee=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Wt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/l,v=o.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&h>0&&(d=!0,h*=.9,v=l*h);var m=(i-v)/2>>0,g={offset:m-u,size:0};c=o.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:d?h:w.barSize}},P=[].concat(wP(S),[O]);return g=P[P.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:g})}),P},f)}else{var y=Wt(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var b=(i-2*y-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;c=o.reduce(function(S,w,O){var P=[].concat(wP(S),[{item:w.item,position:{offset:y+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){P.push({item:E,position:P[P.length-1].position})}),P},f)}return c},Hee=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=MN({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,d=c.height,h=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&h!=="center"&&q(t[h]))return Je(Je({},t),{},Xo({},h,t[h]+(f||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&v!=="middle"&&q(t[v]))return Je(Je({},t),{},Xo({},v,t[v]+(d||0)))}return t},Kee=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},IN=function(t,r,n,i,a){var o=r.props.children,s=qt(o,hl).filter(function(u){return Kee(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=qe(c,n);if(ae(f))return u;var d=Array.isArray(f)?[Rp(f),Dp(f)]:[f,f],h=l.reduce(function(v,m){var g=qe(c,m,0),y=d[0]-Math.abs(Array.isArray(g)?g[0]:g),b=d[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},qee=function(t,r,n,i,a){var o=r.map(function(s){return IN(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},DN=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&IN(t,l,u,i)||eu(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?Ut(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+u,value:f,offset:u}});return c.filter(function(f){return!$c(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:i(f)+u,value:f,index:d,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,d){return{coordinate:i(f)+u,value:a?a[f]:f,index:d,offset:u}})},lv=new WeakMap,Sf=function(t,r){if(typeof r!="function")return t;lv.has(t)||lv.set(t,new WeakMap);var n=lv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},FN=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Iu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Qd(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Zl(),realScaleType:"point"}:a==="category"?{scale:Iu(),realScaleType:"band"}:{scale:Qd(),realScaleType:"linear"};if(Ya(i)){var l="scale".concat(wp(i));return{scale:(mP[l]||Zl)(),realScaleType:mP[l]?l:"point"}}return oe(i)?{scale:i}:{scale:Zl(),realScaleType:"point"}},OP=1e-4,BN=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-OP,o=Math.max(i[0],i[1])+OP,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},Vee=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},Xee=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Qee={sign:Yee,expand:vW,none:gs,silhouette:yW,wiggle:gW,positive:Xee},Jee=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=Qee[n],o=mW().keys(i).value(function(s,l){return+qe(s,l,0)}).order(lg).offset(a);return o(t)},Zee=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,v=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Je(Je({},d.type.defaultProps),d.props):d.props,m=v.stackId,g=v.hide;if(g)return f;var y=v[n],b=f[y]||{hasStack:!1,stackGroups:{}};if(pt(m)){var x=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(d),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[so("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return Je(Je({},f),{},Xo({},y,b))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var v={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,g){var y=h.stackGroups[g];return Je(Je({},m),{},Xo({},g,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:Jee(t,y.items,a)}))},v)}return Je(Je({},f),{},Xo({},d,h))},c)},zN=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=hee(u,a,s);return t.domain([Rp(c),Dp(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),d=pee(f,a,s);return{niceTicks:d}}return null};function ih(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=kd(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=qe(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var PP=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=qe(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},ete=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},tte=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Je(Je({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(pt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},rte=function(t){return t.reduce(function(r,n){return[Rp(n.concat([r[0]]).filter(q)),Dp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},UN=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=rte(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},EP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,AP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lg=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(EP.test(t[0])){var a=+EP.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(AP.test(t[1])){var o=+AP.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},ah=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=fx(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},fte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=Wt(t.cx,o,o/2),f=Wt(t.cy,s,s/2),d=KN(o,s,n),h=Wt(t.innerRadius,d,0),v=Wt(t.outerRadius,d,d*.8),m=Object.keys(r);return m.reduce(function(g,y){var b=r[y],x=b.domain,S=b.reversed,w;if(ae(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[h,v]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,P=ate(O,2);l=P[0],u=P[1]}var E=FN(b,a),j=E.realScaleType,_=E.scale;_.domain(x).range(w),BN(_);var T=zN(_,$n($n({},b),{},{realScaleType:j})),k=$n($n($n({},b),T),{},{range:w,radius:v,realScaleType:j,scale:_,cx:c,cy:f,innerRadius:h,outerRadius:v,startAngle:l,endAngle:u});return $n($n({},g),{},HN({},y,k))},{})},dte=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},hte=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=dte({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:cte(u),angleInRadian:u}},pte=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},mte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},kP=function(t,r){var n=t.x,i=t.y,a=hte({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=pte(r),f=c.startAngle,d=c.endAngle,h=s,v;if(f<=d){for(;h>d;)h-=360;for(;h=f&&h<=d}else{for(;h>f;)h-=360;for(;h=d&&h<=f}return v?$n($n({},r),{},{radius:o,angle:mte(h,r)}):null},qN=function(t){return!A.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function Ku(e){"@babel/helpers - typeof";return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}var vte=["offset"];function yte(e){return wte(e)||xte(e)||bte(e)||gte()}function gte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bte(e,t){if(e){if(typeof e=="string")return Fg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fg(e,t)}}function xte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wte(e){if(Array.isArray(e))return Fg(e)}function Fg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ote(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=h+b*o,S=m):i==="insideEnd"?(x=v-b*o,S=!m):i==="end"&&(x=v+b*o,S=m),S=y<=0?S:!S;var w=Re(u,c,g,x),O=Re(u,c,g,x+(S?1:-1)*359),P="M".concat(w.x,",").concat(w.y,` + A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`, + `).concat(O.x,",").concat(O.y),E=ae(t.id)?so("recharts-radial-line-"):t.id;return C.createElement("text",qu({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:E,d:P})),C.createElement("textPath",{xlinkHref:"#".concat(E)},r))},kte=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,d=(c+f)/2;if(i==="outside"){var h=Re(o,s,u+n,d),v=h.x,m=h.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=Re(o,s,g,d),b=y.x,x=y.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},Cte=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*i,h=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:h};return ft(ft({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:v};return ft(ft({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return ft(ft({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if(a==="right"){var O={x:s+u+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"};return ft(ft({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var P=n?{width:u,height:c}:{};return a==="insideLeft"?ft({x:s+g,y:l+c/2,textAnchor:b,verticalAnchor:"middle"},P):a==="insideRight"?ft({x:s+u-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},P):a==="insideTop"?ft({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:v},P):a==="insideBottom"?ft({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},P):a==="insideTopLeft"?ft({x:s+g,y:l+d,textAnchor:b,verticalAnchor:v},P):a==="insideTopRight"?ft({x:s+u-g,y:l+d,textAnchor:y,verticalAnchor:v},P):a==="insideBottomLeft"?ft({x:s+g,y:l+c-d,textAnchor:b,verticalAnchor:h},P):a==="insideBottomRight"?ft({x:s+u-g,y:l+c-d,textAnchor:y,verticalAnchor:h},P):tl(a)&&(q(a.x)||Sa(a.x))&&(q(a.y)||Sa(a.y))?ft({x:s+Wt(a.x,u),y:l+Wt(a.y,c),textAnchor:"end",verticalAnchor:"end"},P):ft({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Nte=function(t){return"cx"in t&&q(t.cx)};function bt(e){var t=e.offset,r=t===void 0?5:t,n=Ste(e,vte),i=ft({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,d=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!A.isValidElement(u)&&!oe(u))return null;if(A.isValidElement(u))return A.cloneElement(u,i);var h;if(oe(u)){if(h=A.createElement(u,i),A.isValidElement(h))return h}else h=jte(i);var v=Nte(a),m=te(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Tte(i,h,m);var g=v?kte(i):Cte(i);return C.createElement(Qa,qu({className:ue("recharts-label",f)},m,g,{breakAll:d}),h)}bt.displayName="Label";var VN=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,v=t.left,m=t.width,g=t.height,y=t.clockWise,b=t.labelViewBox;if(b)return b;if(q(m)&&q(g)){if(q(f)&&q(d))return{x:f,y:d,width:m,height:g};if(q(h)&&q(v))return{x:h,y:v,width:m,height:g}}return q(f)&&q(d)?{x:f,y:d,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},$te=function(t,r){return t?t===!0?C.createElement(bt,{key:"label-implicit",viewBox:r}):pt(t)?C.createElement(bt,{key:"label-implicit",viewBox:r,value:t}):A.isValidElement(t)?t.type===bt?A.cloneElement(t,{key:"label-implicit",viewBox:r}):C.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):oe(t)?C.createElement(bt,{key:"label-implicit",content:t,viewBox:r}):tl(t)?C.createElement(bt,qu({viewBox:r},t,{key:"label-implicit"})):null:null},Mte=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=VN(t),o=qt(i,bt).map(function(l,u){return A.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=$te(t.label,r||a);return[s].concat(yte(o))};bt.parseViewBox=VN;bt.renderCallByParent=Mte;function Ite(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Dte=Ite;const Rte=Ae(Dte);function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}var Lte=["valueAccessor"],Fte=["data","dataKey","clockWise","id","textBreakAll"];function Bte(e){return Hte(e)||Wte(e)||Ute(e)||zte()}function zte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ute(e,t){if(e){if(typeof e=="string")return Bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bg(e,t)}}function Wte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hte(e){if(Array.isArray(e))return Bg(e)}function Bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Yte=function(t){return Array.isArray(t.value)?Rte(t.value):t.value};function wn(e){var t=e.valueAccessor,r=t===void 0?Yte:t,n=MP(e,Lte),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=MP(n,Fte);return!i||!i.length?null:C.createElement(he,{className:"recharts-label-list"},i.map(function(c,f){var d=ae(a)?r(c,f):qe(c&&c.payload,a),h=ae(s)?{}:{id:"".concat(s,"-").concat(f)};return C.createElement(bt,sh({},te(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:bt.parseViewBox(ae(o)?c:$P($P({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}wn.displayName="LabelList";function Xte(e,t){return e?e===!0?C.createElement(wn,{key:"labelList-implicit",data:t}):C.isValidElement(e)||oe(e)?C.createElement(wn,{key:"labelList-implicit",data:t,content:e}):tl(e)?C.createElement(wn,sh({data:t},e,{key:"labelList-implicit"})):null:null}function Qte(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=qt(n,wn).map(function(o,s){return A.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=Xte(e.label,t);return[a].concat(Bte(i))}wn.renderCallByParent=Qte;function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var h=Re(r,n,i,o),v=Re(r,n,i,u);d+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, + `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},rre=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ut(c-u),d=Of({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,v=d.lineTangency,m=d.theta,g=Of({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),y=g.circleTangency,b=g.lineTangency,x=g.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-x;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):GN({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var w="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,` + A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` + `);if(i>0){var O=Of({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),P=O.circleTangency,E=O.lineTangency,j=O.theta,_=Of({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=_.circleTangency,k=_.lineTangency,M=_.theta,R=l?Math.abs(u-c):Math.abs(u-c)-j-M;if(R<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(k.x,",").concat(k.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,` + A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(P.x,",").concat(P.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},nre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},YN=function(t){var r=DP(DP({},nre),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o0&&Math.abs(c-f)<360?g=rre({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):g=GN({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),C.createElement("path",zg({},te(r,!0),{className:h,d:g,role:"img"}))};function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;tvre.call(e,t));function co(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const bre="__v",xre="__o",wre="_owner",{getOwnPropertyDescriptor:zP,keys:UP}=Object;function Sre(e,t){return e.byteLength===t.byteLength&&lh(new Uint8Array(e),new Uint8Array(t))}function Ore(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Pre(e,t){return e.byteLength===t.byteLength&&lh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Ere(e,t){return co(e.getTime(),t.getTime())}function Are(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function jre(e,t){return e===t}function WP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const _re=co;function Tre(e,t,r){const n=UP(e);let i=n.length;if(UP(t).length!==i)return!1;for(;i-- >0;)if(!ZN(e,t,r,n[i]))return!1;return!0}function Il(e,t,r){const n=BP(e);let i=n.length;if(BP(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!ZN(e,t,r,a)||(o=zP(e,a),s=zP(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function kre(e,t){return co(e.valueOf(),t.valueOf())}function Cre(e,t){return e.source===t.source&&e.flags===t.flags}function HP(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function lh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Nre(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function ZN(e,t,r,n){return(n===wre||n===xre||n===bre)&&(e.$$typeof||t.$$typeof)?!0:gre(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const $re="[object ArrayBuffer]",Mre="[object Arguments]",Ire="[object Boolean]",Dre="[object DataView]",Rre="[object Date]",Lre="[object Error]",Fre="[object Map]",Bre="[object Number]",zre="[object Object]",Ure="[object RegExp]",Wre="[object Set]",Hre="[object String]",Kre={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},qre="[object URL]",Vre=Object.prototype.toString;function Gre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:v}){return function(g,y,b){if(g===y)return!0;if(g==null||y==null)return!1;const x=typeof g;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?s(g,y,b):x==="function"?a(g,y,b):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,b);if(Array.isArray(g))return t(g,y,b);if(S===Date)return n(g,y,b);if(S===RegExp)return c(g,y,b);if(S===Map)return o(g,y,b);if(S===Set)return f(g,y,b);const w=Vre.call(g);if(w===Rre)return n(g,y,b);if(w===Ure)return c(g,y,b);if(w===Fre)return o(g,y,b);if(w===Wre)return f(g,y,b);if(w===zre)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,b);if(w===qre)return h(g,y,b);if(w===Lre)return i(g,y,b);if(w===Mre)return l(g,y,b);if(Kre[w])return d(g,y,b);if(w===$re)return e(g,y,b);if(w===Dre)return r(g,y,b);if(w===Ire||w===Bre||w===Hre)return u(g,y,b);if(v){let O=v[w];if(!O){const P=yre(g);P&&(O=v[P])}if(O)return O(g,y,b)}return!1}}function Yre({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Sre,areArraysEqual:r?Il:Ore,areDataViewsEqual:Pre,areDatesEqual:Ere,areErrorsEqual:Are,areFunctionsEqual:jre,areMapsEqual:r?uv(WP,Il):WP,areNumbersEqual:_re,areObjectsEqual:r?Il:Tre,arePrimitiveWrappersEqual:kre,areRegExpsEqual:Cre,areSetsEqual:r?uv(HP,Il):HP,areTypedArraysEqual:r?uv(lh,Il):lh,areUrlsEqual:Nre,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Ef(n.areArraysEqual),a=Ef(n.areMapsEqual),o=Ef(n.areObjectsEqual),s=Ef(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function Xre(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function Qre({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const Jre=na();na({strict:!0});na({circular:!0});na({circular:!0,strict:!0});na({createInternalComparator:()=>co});na({strict:!0,createInternalComparator:()=>co});na({circular:!0,createInternalComparator:()=>co});na({circular:!0,createInternalComparator:()=>co,strict:!0});function na(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=Yre(e),o=Gre(a),s=r?r(o):Xre(o);return Qre({circular:t,comparator:o,createState:n,equals:s,strict:i})}function Zre(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function KP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):Zre(i)};requestAnimationFrame(n)}function Wg(e){"@babel/helpers - typeof";return Wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wg(e)}function ene(e){return ine(e)||nne(e)||rne(e)||tne()}function tne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rne(e,t){if(e){if(typeof e=="string")return qP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qP(e,t)}}function qP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},m=function(y){for(var b=y>1?1:y,x=b,S=0;S<8;++S){var w=f(x)-b,O=h(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,v=d*a,m=d+(h-v)*s/1e3,g=d*s/1e3+c;return Math.abs(g-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ine(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function cv(e){return Fne(e)||Lne(e)||Rne(e)||Dne()}function Dne(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rne(e,t){if(e){if(typeof e=="string")return Gg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gg(e,t)}}function Lne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fne(e){if(Array.isArray(e))return Gg(e)}function Gg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fh(e){return fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fh(e)}var an=function(e){Hne(r,e);var t=Kne(r);function r(n,i){var a;Bne(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Qg(a)),a.changeStyle=a.changeStyle.bind(Qg(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:c}),Xg(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof d=="function")return a.state={style:u},Xg(a);a.state={style:l?Ul({},l,u):u}}else a.state={style:{}};return a}return Une(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,d=this.state.style;if(s){if(!o){var h={style:l?Ul({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(Jre(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&d){var g={style:l?Ul({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(g)}this.runAnimation(zr(zr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,d=i.onAnimationStart,h=Nne(o,s,wne(u),l,this.changeStyle),v=function(){a.stopJSAnimation=h()};this.manager.start([d,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(m,g,y){if(y===0)return m;var b=g.duration,x=g.easing,S=x===void 0?"ease":x,w=g.style,O=g.properties,P=g.onAnimationEnd,E=y>0?o[y-1]:g,j=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(cv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:b,easing:S}),b]);var _=YP(j,b,S),T=zr(zr(zr({},E.style),w),{},{transition:_});return[].concat(cv(m),[T,b,P]).filter(une)};return this.manager.start([l].concat(cv(o.reduce(h,[c,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=ane());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,d=i.steps,h=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var m=s?Ul({},s,l):l,g=YP(Object.keys(m),o,u);v.start([c,a,zr(zr({},m),{},{transition:g}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Mne(i,$ne),u=A.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(h){var v=h.props,m=v.style,g=m===void 0?{}:m,y=v.className,b=A.cloneElement(h,zr(zr({},l),{},{style:zr(zr({},g),c),className:y}));return b};return u===1?f(A.Children.only(a)):C.createElement("div",null,A.Children.map(a,function(d){return f(d)}))}}]),r}(A.PureComponent);an.displayName="Animate";an.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};an.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],d=0,h=4;do?o:a[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, + `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` + L `).concat(t+n-l*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` + L `).concat(t+n,",").concat(r+i-s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` + L `).concat(t+l*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},tie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=d}return!1},rie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Lx=function(t){var r=nE(nE({},rie),t),n=A.useRef(),i=A.useState(-1),a=Vne(i,2),o=a[0],s=a[1];A.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,v=r.animationEasing,m=r.animationDuration,g=r.animationBegin,y=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var x=ue("recharts-rectangle",h);return b?C.createElement(an,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:b},function(S){var w=S.width,O=S.height,P=S.x,E=S.y;return C.createElement(an,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:v},C.createElement("path",dh({},te(r,!0),{className:x,d:iE(P,E,w,O,d),ref:n})))}):C.createElement("path",dh({},te(r,!0),{className:x,d:iE(l,u,c,f,d)}))},nie=["points","className","baseLinePoints","connectNulls"];function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function aie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function aE(e){return uie(e)||lie(e)||sie(e)||oie()}function oie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sie(e,t){if(e){if(typeof e=="string")return Jg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jg(e,t)}}function lie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uie(e){if(Array.isArray(e))return Jg(e)}function Jg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){oE(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),oE(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ru=function(t,r){var n=cie(t);r&&(n=[n.reduce(function(a,o){return[].concat(aE(a),aE(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},fie=function(t,r,n){var i=ru(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(ru(r.reverse(),n).slice(1))},die=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=iie(t,nie);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=fie(r,i,a);return C.createElement("g",{className:s},C.createElement("path",Ro({},te(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?C.createElement("path",Ro({},te(o,!0),{fill:"none",d:ru(r,a)})):null,l?C.createElement("path",Ro({},te(o,!0),{fill:"none",d:ru(i,a)})):null)}var c=ru(r,a);return C.createElement("path",Ro({},te(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},wie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,v=t.className,m=gie(t,hie),g=pie({x:n,y:a,top:s,left:u,width:f,height:h},m);return!q(n)||!q(a)||!q(f)||!q(h)||!q(s)||!q(u)?null:C.createElement("path",e0({},te(g,!0),{className:ue("recharts-cross",v),d:xie(n,a,f,h,s,u)}))},Sie=Ip,Oie=yN,Pie=jn;function Eie(e,t){return e&&e.length?Sie(e,Pie(t),Oie):void 0}var Aie=Eie;const jie=Ae(Aie);var _ie=Ip,Tie=jn,kie=gN;function Cie(e,t){return e&&e.length?_ie(e,Tie(t),kie):void 0}var Nie=Cie;const $ie=Ae(Nie);var Mie=["cx","cy","angle","ticks","axisLine"],Iie=["ticks","tick","angle","tickFormatter","stroke"];function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Die(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Rie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cE(e,t){for(var r=0;rhE?o=i==="outer"?"start":"end":a<-hE?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ua(ua({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return C.createElement(Bp,va({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return Re(i,a,o,d.coordinate)});return C.createElement(die,va({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=te(this.props,!1),f=te(o,!1),d=ua(ua({},c),{},{fill:"none"},te(s,!1)),h=a.map(function(v,m){var g=n.getTickLineCoord(v),y=n.getTickTextAnchor(v),b=ua(ua(ua({textAnchor:y},c),{},{stroke:"none",fill:u},f),{},{index:m,payload:v,x:g.x2,y:g.y2});return C.createElement(he,va({className:ue("recharts-polar-angle-axis-tick",qN(o)),key:"tick-".concat(v.coordinate)},Yi(n.props,v,m)),s&&C.createElement("line",va({className:"recharts-polar-angle-axis-tick-line"},d,g)),o&&t.renderTickItem(o,b,l?l(v.value,m):v.value))});return C.createElement(he,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:C.createElement(he,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return C.isValidElement(n)?o=C.cloneElement(n,i):oe(n)?o=n(i):o=C.createElement(Qa,va({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(A.PureComponent);Wp(Hp,"displayName","PolarAngleAxis");Wp(Hp,"axisType","angleAxis");Wp(Hp,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Jie=hC,Zie=Jie(Object.getPrototypeOf,Object),eae=Zie,tae=ii,rae=eae,nae=ai,iae="[object Object]",aae=Function.prototype,oae=Object.prototype,c$=aae.toString,sae=oae.hasOwnProperty,lae=c$.call(Object);function uae(e){if(!nae(e)||tae(e)!=iae)return!1;var t=rae(e);if(t===null)return!0;var r=sae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&c$.call(r)==lae}var cae=uae;const fae=Ae(cae);var dae=ii,hae=ai,pae="[object Boolean]";function mae(e){return e===!0||e===!1||hae(e)&&dae(e)==pae}var vae=mae;const yae=Ae(vae);function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(e)}function mh(){return mh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:m,animationEasing:v,isActive:y},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,P=x.x,E=x.y;return C.createElement(an,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:v},C.createElement("path",mh({},te(r,!0),{className:b,d:yE(P,E,S,w,O),ref:n})))}):C.createElement("g",null,C.createElement("path",mh({},te(r,!0),{className:b,d:yE(l,u,c,f,d)})))},_ae=["option","shapeType","propTransformer","activeClassName","isActive"];function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}function Tae(e,t){if(e==null)return{};var r=kae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vh(e){for(var t=1;t0?pr(x,"paddingAngle",0):0;if(w){var P=At(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Me(Me({},x),{},{startAngle:b+O,endAngle:b+P(m)+O});g.push(E),b=E.endAngle}else{var j=x.endAngle,_=x.startAngle,T=At(0,j-_),k=T(m),M=Me(Me({},x),{},{startAngle:b+O,endAngle:b+k+O});g.push(M),b=M.endAngle}}),C.createElement(he,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!cl(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(c)||!q(f)||!q(d))return null;var m=ue("recharts-pie",s);return C.createElement(he,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(o),bt.renderCallByParent(this.props,null,!1),(!h||v)&&wn.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=g-b*h-x,w=i.reduce(function(E,j){var _=qe(j,y,0);return E+(q(_)?_:0)},0),O;if(w>0){var P;O=i.map(function(E,j){var _=qe(E,y,0),T=qe(E,c,j),k=(q(_)?_:0)/w,M;j?M=P.endAngle+Ut(m)*l*(_!==0?1:0):M=o;var R=M+Ut(m)*((_!==0?h:0)+k*S),I=(M+R)/2,L=(v.innerRadius+v.outerRadius)/2,z=[{name:T,value:_,payload:E,dataKey:y,type:d}],N=Re(v.cx,v.cy,L,I);return P=Me(Me(Me({percent:k,cornerRadius:a,name:T,tooltipPayload:z,midAngle:I,middleRadius:L,tooltipPosition:N},E),v),{},{value:qe(E,y),startAngle:M,endAngle:R,payload:E,paddingAngle:Ut(m)*l}),P})}return Me(Me({},v),{},{sectors:O,data:i})});var Qae=Math.ceil,Jae=Math.max;function Zae(e,t,r,n){for(var i=-1,a=Jae(Qae((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var eoe=Zae,toe=NC,SE=1/0,roe=17976931348623157e292;function noe(e){if(!e)return e===0?e:0;if(e=toe(e),e===SE||e===-SE){var t=e<0?-1:1;return t*roe}return e===e?e:0}var h$=noe,ioe=eoe,aoe=_p,fv=h$;function ooe(e){return function(t,r,n){return n&&typeof n!="number"&&aoe(t,r,n)&&(r=n=void 0),t=fv(t),r===void 0?(r=t,t=0):r=fv(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),lr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),lr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),lr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),lr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),lr(n,"handleSlideDragStart",function(i){var a=jE(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return xoe(t,e),voe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),d=Math.max(i,a),h=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=qe(a[n],s,n);return oe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==d||g.endIndex!==h)&&v&&v(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=jE(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,v=c.onChange,m=c.gap,g=c.data,y={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-h-u):b<0&&(b=Math.max(b,f-u)),y[o]=u+b;var x=this.getIndex(y),S=x.startIndex,w=x.endIndex,O=function(){var E=g.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(lr(lr({},o,u+b),"brushMoveStartX",n.pageX),function(){v&&O()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(lr({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return C.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=A.Children.only(u);return f?C.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,v=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(n,this.props.x),b=dv(dv({},te(this.props,!1)),{},{x:y,y:u,width:c,height:f}),x=h||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[g])===null||o===void 0?void 0:o.name);return C.createElement(he,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,v={pointerEvents:"none",fill:u};return C.createElement(he,{className:"recharts-brush-texts"},C.createElement(Qa,xh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},v),this.getTextOfTick(i)),C.createElement(Qa,xh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,v=d.endX,m=d.isTextActive,g=d.isSlideMoving,y=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(c)||u<=0||c<=0)return null;var x=ue("recharts-brush",a),S=C.Children.count(o)===1,w=poe("userSelect","none");return C.createElement(he,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(h,v),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(v,"endX"),(m||g||y||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),C.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return C.isValidElement(n)?a=C.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return dv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Soe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(A.PureComponent);lr(Ns,"displayName","Brush");lr(Ns,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Ooe=cx;function Poe(e,t){var r;return Ooe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Eoe=Poe,Aoe=aC,joe=jn,_oe=Eoe,Toe=or,koe=_p;function Coe(e,t,r){var n=Toe(e)?Aoe:_oe;return r&&koe(e,t,r)&&(t=void 0),n(e,joe(t))}var Noe=Coe;const $oe=Ae(Noe);var Sn=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},_E=jC;function Moe(e,t,r){t=="__proto__"&&_E?_E(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Ioe=Moe,Doe=Ioe,Roe=EC,Loe=jn;function Foe(e,t){var r={};return t=Loe(t),Roe(e,function(n,i,a){Doe(r,i,t(n,i,a))}),r}var Boe=Foe;const zoe=Ae(Boe);function Uoe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ase(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ose(e,t){var r=e.x,n=e.y,i=ise(e,ese),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),d=parseInt(f,10);return Dl(Dl(Dl(Dl(Dl({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function kE(e){return C.createElement(yh,a0({shapeType:"rectangle",propTransformer:ose,activeClassName:"recharts-active-bar"},e))}var sse=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||j8(n);return a?t(n,i):(a||Za(),r)}},lse=["value","background"],g$;function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function use(e,t){if(e==null)return{};var r=cse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sh(){return Sh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(R)0&&(M=Math.min((re||0)-(R[be-1]||0),M))}),Number.isFinite(M)){var I=M/k,L=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(P=I*L/2),m.padding==="no-gap"){var z=Wt(t.barCategoryGap,I*L),N=I*L/2;P=N-z-(N-z)/L*z}}}i==="xAxis"?E=[n.left+(x.left||0)+(P||0),n.left+n.width-(x.right||0)-(P||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(P||0),n.top+n.height-(x.bottom||0)-(P||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=FN(m,a,d),W=F.scale,V=F.realScaleType;W.domain(y).range(E),BN(W);var H=zN(W,Vr(Vr({},m),{},{realScaleType:V}));i==="xAxis"?(T=g==="top"&&!S||g==="bottom"&&S,j=n.left,_=f[O]-T*m.height):i==="yAxis"&&(T=g==="left"&&!S||g==="right"&&S,j=f[O]-T*m.width,_=n.top);var Y=Vr(Vr(Vr({},m),H),{},{realScaleType:V,x:j,y:_,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=ah(Y,H),!m.hide&&i==="xAxis"?f[O]+=(T?-1:1)*Y.height:m.hide||(f[O]+=(T?-1:1)*Y.width),Vr(Vr({},h),{},Vp({},v,Y))},{})},O$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},wse=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return O$({x:r,y:n},{x:i,y:a})},P$=function(){function e(t){gse(this,e),this.scale=t}return bse(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Vp(P$,"EPS",1e-4);var Fx=function(t){var r=Object.keys(t).reduce(function(n,i){return Vr(Vr({},n),{},Vp({},i,P$.create(t[i])))},{});return Vr(Vr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return zoe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return y$(i,function(a,o){return r[o].isInRange(a)})}})};function Sse(e){return(e%180+180)%180}var Ose=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Sse(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var _se=jse,Tse=h$;function kse(e){var t=Tse(e),r=t%1;return t===t?r?t-r:t:0}var Cse=kse,Nse=bC,$se=jn,Mse=Cse,Ise=Math.max;function Dse(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Mse(r);return i<0&&(i=Ise(n+i,0)),Nse(e,$se(t),i)}var Rse=Dse,Lse=_se,Fse=Rse,Bse=Lse(Fse),zse=Bse;const Use=Ae(zse);var Wse=$U(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Bx=A.createContext(void 0),zx=A.createContext(void 0),E$=A.createContext(void 0),A$=A.createContext({}),j$=A.createContext(void 0),_$=A.createContext(0),T$=A.createContext(0),IE=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=Wse(a);return C.createElement(Bx.Provider,{value:n},C.createElement(zx.Provider,{value:i},C.createElement(A$.Provider,{value:a},C.createElement(E$.Provider,{value:c},C.createElement(j$.Provider,{value:o},C.createElement(_$.Provider,{value:u},C.createElement(T$.Provider,{value:l},s)))))))},Hse=function(){return A.useContext(j$)},k$=function(t){var r=A.useContext(Bx);r==null&&Za();var n=r[t];return n==null&&Za(),n},Kse=function(){var t=A.useContext(Bx);return xi(t)},qse=function(){var t=A.useContext(zx),r=Use(t,function(n){return y$(n.domain,Number.isFinite)});return r||xi(t)},C$=function(t){var r=A.useContext(zx);r==null&&Za();var n=r[t];return n==null&&Za(),n},Vse=function(){var t=A.useContext(E$);return t},Gse=function(){return A.useContext(A$)},Ux=function(){return A.useContext(T$)},Wx=function(){return A.useContext(_$)};function Ms(e){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}function Yse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xse(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Cle(e,t){return L$(e,t+1)}function Nle(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:L$(n,u)};var m=l,g,y=function(){return g===void 0&&(g=r(v,m)),g},b=v.coordinate,x=l===0||jh(e,b,y,c,s);x||(l=0,c=o,u+=1),x&&(c=b+e*(y()/2+i),l+=u)},d;u<=a.length;)if(d=f(),d)return d.v;return[]}function sc(e){"@babel/helpers - typeof";return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(e)}function WE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t0?h.coordinate-g*e:h.coordinate})}else a[d]=h=Ct(Ct({},h),{},{tickCoord:h.coordinate});var y=jh(e,h.tickCoord,m,s,l);y&&(l=h.tickCoord-e*(m()/2+i),a[d]=Ct(Ct({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function Rle(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=Ct(Ct({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=jh(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Ct(Ct({},c),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Ct(Ct({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Ct(Ct({},x),{},{tickCoord:x.coordinate});var P=jh(e,x.tickCoord,w,l,u);P&&(l=x.tickCoord+e*(w()/2+i),o[b]=Ct(Ct({},x),{},{isShow:!0}))},g=0;g=2?Ut(i[1].coordinate-i[0].coordinate):1,y=kle(a,g,h);return l==="equidistantPreserveStart"?Nle(g,y,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=Rle(g,y,m,i,o,l==="preserveStartEnd"):d=Dle(g,y,m,i,o),d.filter(function(b){return b.isShow}))}var Lle=["viewBox"],Fle=["viewBox"],Ble=["ticks"];function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ule(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KE(e,t){for(var r=0;r0?l(this.props):l(h)),o<=0||s<=0||!v||!v.length?null:C.createElement(he,{className:ue("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),bt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ue(i.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(n)?o=C.cloneElement(n,ct(ct({},i),{},{className:s})):oe(n)?o=n(ct(ct({},i),{},{className:s})):o=C.createElement(Qa,Fo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(A.Component);Vx(pl,"displayName","CartesianAxis");Vx(pl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Yle=["x1","y1","x2","y2","key"],Xle=["offset"];function eo(e){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function qE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var tue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return C.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function z$(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=VE(t,Yle),u=te(l,!1);u.offset;var c=VE(u,Xle);r=C.createElement("line",Ea({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function rue(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return z$(i,u)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function nue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Mt(Mt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return z$(i,u)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function iue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var v=!c[h+1],m=v?i+o-d:c[h+1]-d;if(m<=0)return null;var g=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function aue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var v=!c[h+1],m=v?a+s-d:c[h+1]-d;if(m<=0)return null;var g=h%n.length;return C.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:m,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var oue=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return LN(qx(Mt(Mt(Mt({},pl.defaultProps),n),{},{ticks:zn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},sue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return LN(qx(Mt(Mt(Mt({},pl.defaultProps),n),{},{ticks:zn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},bo={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ls(e){var t,r,n,i,a,o,s=Ux(),l=Wx(),u=Gse(),c=Mt(Mt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:bo.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:bo.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:bo.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:bo.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:bo.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:bo.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,v=c.height,m=c.syncWithTicks,g=c.horizontalValues,y=c.verticalValues,b=Kse(),x=qse();if(!q(h)||h<=0||!q(v)||v<=0||!q(f)||f!==+f||!q(d)||d!==+d)return null;var S=c.verticalCoordinatesGenerator||oue,w=c.horizontalCoordinatesGenerator||sue,O=c.horizontalPoints,P=c.verticalPoints;if((!O||!O.length)&&oe(w)){var E=g&&g.length,j=w({yAxis:x?Mt(Mt({},x),{},{ticks:E?g:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);Zr(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(eo(j),"]")),Array.isArray(j)&&(O=j)}if((!P||!P.length)&&oe(S)){var _=y&&y.length,T=S({xAxis:b?Mt(Mt({},b),{},{ticks:_?y:b.ticks}):void 0,width:s,height:l,offset:u},_?!0:m);Zr(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(eo(T),"]")),Array.isArray(T)&&(P=T)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(tue,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),C.createElement(rue,Ea({},c,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),C.createElement(nue,Ea({},c,{offset:u,verticalPoints:P,xAxis:b,yAxis:x})),C.createElement(iue,Ea({},c,{horizontalPoints:O})),C.createElement(aue,Ea({},c,{verticalPoints:P})))}Ls.displayName="CartesianGrid";var lue=["type","layout","connectNulls","ref"],uue=["key"];function Fs(e){"@babel/helpers - typeof";return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function GE(e,t){if(e==null)return{};var r=cue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iu(){return iu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){h=[].concat(xo(l.slice(0,v)),[f-m]);break}var g=h.length%2===0?[0,d]:[d];return[].concat(xo(t.repeat(l,c)),xo(h),g).map(function(y){return"".concat(y,"px")}).join(", ")}),Gr(r,"id",so("recharts-line-")),Gr(r,"pathRef",function(o){r.mainCurve=o}),Gr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Gr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return xue(t,e),vue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=qt(c,hl);if(!f)return null;var d=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:qe(m.payload,g)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return C.createElement(he,h,f.map(function(v){return C.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=te(this.props,!1),d=te(l,!0),h=u.map(function(m,g){var y=sr(sr(sr({key:"dot-".concat(g),r:3},f),d),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return C.createElement(he,iu({className:"recharts-line-dots",key:"dots"},v),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=GE(s,lue),d=sr(sr(sr({},te(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return C.createElement(Xu,iu({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,v=o.animateNewValues,m=o.width,g=o.height,y=this.state,b=y.prevPoints,x=y.totalLength;return C.createElement(an,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(b){var O=b.length/s.length,P=s.map(function(k,M){var R=Math.floor(M*O);if(b[R]){var I=b[R],L=At(I.x,k.x),z=At(I.y,k.y);return sr(sr({},k),{},{x:L(w),y:z(w)})}if(v){var N=At(m*2,k.x),F=At(g/2,k.y);return sr(sr({},k),{},{x:N(w),y:F(w)})}return sr(sr({},k),{},{x:k.x,y:k.y})});return a.renderCurveStatically(P,n,i)}var E=At(0,x),j=E(w),_;if(l){var T="".concat(l).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});_=a.getStrokeDasharray(j,x,T)}else _=a.generateSimpleStrokeDasharray(x,j);return a.renderCurveStatically(s,n,i,{strokeDasharray:_})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!cl(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,d=i.left,h=i.width,v=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,b=s.length===1,x=ue("recharts-line",l),S=u&&u.allowDataOverflow,w=c&&c.allowDataOverflow,O=S||w,P=ae(g)?this.id:g,E=(n=te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},j=E.r,_=j===void 0?3:j,T=E.strokeWidth,k=T===void 0?2:T,M=B8(o)?o:{},R=M.clipDot,I=R===void 0?!0:R,L=_*2+k;return C.createElement(he,{className:x},S||w?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(P)},C.createElement("rect",{x:S?d:d-h/2,y:w?f:f-v/2,width:S?h:h*2,height:w?v:v*2})),!I&&C.createElement("clipPath",{id:"clipPath-dots-".concat(P)},C.createElement("rect",{x:d-L/2,y:f-L/2,width:h+L,height:v+L}))):null,!b&&this.renderCurve(O,P),this.renderErrorBar(O,P),(b||o)&&this.renderDots(O,I,P),(!m||y)&&wn.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(xo(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Nue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $ue(e){var t=e.option,r=e.isActive,n=Cue(e,kue);return typeof t=="string"?A.createElement(yh,au({option:A.createElement(Ep,au({type:t},n)),isActive:r,shapeType:"symbols"},n)):A.createElement(yh,au({option:t,isActive:r,shapeType:"symbols"},n))}function zs(e){"@babel/helpers - typeof";return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(e)}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _ce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Tce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kce(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function lM(e){return e==="number"?[0,"auto"]:void 0}var A0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Zp(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=kd(h,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(Ks(l),[WN(u,d)]):l},[])},iA=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Uce(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=zee(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=A0(t,r,c,f),h=Wce(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},Hce=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=RN(c,a);return n.reduce(function(v,m){var g,y=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,b=y.type,x=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,O=y.scale,P=y.ticks,E=y.includeHidden,j=y[o];if(v[j])return v;var _=Zp(t.data,{graphicalItems:i.filter(function(H){var Y,re=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return re===j}),dataStartIndex:l,dataEndIndex:u}),T=_.length,k,M,R;vce(y.domain,S,b)&&(k=Lg(y.domain,null,S),h&&(b==="number"||O!=="auto")&&(R=eu(_,x,"category")));var I=lM(b);if(!k||k.length===0){var L,z=(L=y.domain)!==null&&L!==void 0?L:I;if(x){if(k=eu(_,x,b),b==="category"&&h){var N=T8(k);w&&N?(M=k,k=bh(0,T)):w||(k=jP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(Ks(H),[Y])},[]))}else if(b==="category")w?k=k.filter(function(H){return H!==""&&!ae(H)}):k=jP(z,k,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(Ks(H),[Y])},[]);else if(b==="number"){var F=qee(_,i.filter(function(H){var Y,re,be=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],Ue="hide"in H.props?H.props.hide:(re=H.type.defaultProps)===null||re===void 0?void 0:re.hide;return be===j&&(E||!Ue)}),x,a,c);F&&(k=F)}h&&(b==="number"||O!=="auto")&&(R=eu(_,x,"category"))}else h?k=bh(0,T):s&&s[j]&&s[j].hasStack&&b==="number"?k=d==="expand"?[0,1]:UN(s[j].stackGroups,l,u):k=DN(_,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],re="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===j&&(E||!re)}),b,c,!0);if(b==="number")k=O0(f,k,j,a,P),z&&(k=Lg(z,k,S));else if(b==="category"&&z){var W=z,V=k.every(function(H){return W.indexOf(H)>=0});V&&(k=W)}}return B(B({},v),{},ie({},j,B(B({},y),{},{axisType:a,domain:k,categoricalDomain:R,duplicateDomain:M,originalDomain:(g=y.domain)!==null&&g!==void 0?g:I,isCategorical:h,layout:c})))},{})},Kce=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=Zp(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,v=RN(c,a),m=-1;return n.reduce(function(g,y){var b=y.type.defaultProps!==void 0?B(B({},y.type.defaultProps),y.props):y.props,x=b[o],S=lM("number");if(!g[x]){m++;var w;return v?w=bh(0,h):s&&s[x]&&s[x].hasStack?(w=UN(s[x].stackGroups,l,u),w=O0(f,w,x,a)):(w=Lg(S,DN(d,n.filter(function(O){var P,E,j=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],_="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return j===x&&!_}),"number",c),i.defaultProps.allowDataOverflow),w=O0(f,w,x,a)),B(B({},g),{},ie({},x,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:pr(Bce,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:v,layout:c})))}return g},{})},qce=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),d=qt(c,a),h={};return d&&d.length?h=Hce(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=Kce(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},Vce=function(t){var r=xi(t),n=zn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:fx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ah(r,n)}},aA=function(t){var r=t.children,n=t.defaultShowTooltip,i=cr(r,Ns),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Gce=function(t){return!t||!t.length?!1:t.some(function(r){var n=Wn(r&&r.type);return n&&n.indexOf("Bar")>=0})},oA=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Yce=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=cr(f,Ns),v=cr(f,en),m=Object.keys(l).reduce(function(w,O){var P=l[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,w[E]+P.width)):w},{left:d.left||0,right:d.right||0}),g=Object.keys(o).reduce(function(w,O){var P=o[O],E=P.orientation;return!P.mirror&&!P.hide?B(B({},w),{},ie({},E,pr(w,"".concat(E))+P.height)):w},{top:d.top||0,bottom:d.bottom||0}),y=B(B({},g),m),b=y.bottom;h&&(y.bottom+=h.props.height||Ns.defaultProps.height),v&&r&&(y=Hee(y,i,n,r));var x=u-y.left-y.right,S=c-y.top-y.bottom;return B(B({brushBottom:b},y),{},{width:Math.max(x,0),height:Math.max(S,0)})},Xce=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Gx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(y,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,P=b.dataStartIndex,E=b.dataEndIndex,j=y.barSize,_=y.layout,T=y.barGap,k=y.barCategoryGap,M=y.maxBarSize,R=oA(_),I=R.numericAxisName,L=R.cateAxisName,z=Gce(x),N=[];return x.forEach(function(F,W){var V=Zp(y.data,{graphicalItems:[F],dataStartIndex:P,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,re=H.maxBarSize,be=H["".concat(I,"Id")],Ue=H["".concat(L,"Id")],we={},St=l.reduce(function(ia,aa){var am=b["".concat(aa.axisType,"Map")],nw=H["".concat(aa.axisType,"Id")];am&&am[nw]||aa.axisType==="zAxis"||Za();var iw=am[nw];return B(B({},ia),{},ie(ie({},aa.axisType,iw),"".concat(aa.axisType,"Ticks"),zn(iw)))},we),G=St[L],se=St["".concat(L,"Ticks")],le=S&&S[be]&&S[be].hasStack&&tte(F,S[be].stackGroups),U=Wn(F.type).indexOf("Bar")>=0,Ye=ah(G,se),ye=[],st=z&&Uee({barSize:j,stackGroups:S,totalSize:Xce(St,L)});if(U){var lt,Yt,li=ae(re)?M:re,ho=(lt=(Yt=ah(G,se,!0))!==null&&Yt!==void 0?Yt:li)!==null&<!==void 0?lt:0;ye=Wee({barGap:T,barCategoryGap:k,bandSize:ho!==Ye?ho:Ye,sizeList:st[Ue],maxBarSize:li}),ho!==Ye&&(ye=ye.map(function(ia){return B(B({},ia),{},{position:B(B({},ia.position),{},{offset:ia.position.offset-ho/2})})}))}var Wc=F&&F.type&&F.type.getComposedData;Wc&&N.push({props:B(B({},Wc(B(B({},St),{},{displayedData:V,props:y,dataKey:Y,item:F,bandSize:Ye,barPosition:ye,offset:w,stackedData:le,layout:_,dataStartIndex:P,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},I,St[I]),L,St[L]),"animationId",O)),childIndex:W8(F,y.children),item:F})}),N},h=function(y,b){var x=y.props,S=y.dataStartIndex,w=y.dataEndIndex,O=y.updateId;if(!wS({props:x}))return null;var P=x.children,E=x.layout,j=x.stackOffset,_=x.data,T=x.reverseStackOrder,k=oA(E),M=k.numericAxisName,R=k.cateAxisName,I=qt(P,n),L=Zee(_,I,"".concat(M,"Id"),"".concat(R,"Id"),j,T),z=l.reduce(function(H,Y){var re="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},re,qce(x,B(B({},Y),{},{graphicalItems:I,stackGroups:Y.axisType===M&&L,dataStartIndex:S,dataEndIndex:w}))))},{}),N=Yce(B(B({},z),{},{props:x,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(H){z[H]=c(x,z[H],N,H.replace("Map",""),r)});var F=z["".concat(R,"Map")],W=Vce(F),V=d(x,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:L,offset:N}));return B(B({formattedGraphicalItems:V,graphicalItems:I,offset:N,stackGroups:L},W),z)},v=function(g){function y(b){var x,S,w;return Tce(this,y),w=Nce(this,y,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new mce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var P=w.state,E=P.dataStartIndex,j=P.dataEndIndex,_=P.updateId;w.setState(B({legendBBox:O},h({props:w.props,dataStartIndex:E,dataEndIndex:j,updateId:_},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,P,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(P)}}),ie(w,"handleBrushChange",function(O){var P=O.startIndex,E=O.endIndex;if(P!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var j=w.state.updateId;w.setState(function(){return B({dataStartIndex:P,dataEndIndex:E},h({props:w.props,dataStartIndex:P,dataEndIndex:E,updateId:j},w.state))}),w.triggerSyncEvent({dataStartIndex:P,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseEnter;oe(j)&&j(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var P=w.getMouseInfo(O),E=P?B(B({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var j=w.props.onMouseMove;oe(j)&&j(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};w.setState(P),w.triggerSyncEvent(P);var E=w.props.onMouseLeave;oe(E)&&E(P,O)}),ie(w,"handleOuterEvent",function(O){var P=U8(O),E=pr(w.props,"".concat(P));if(P&&oe(E)){var j,_;/.*touch.*/i.test(P)?_=w.getMouseInfo(O.changedTouches[0]):_=w.getMouseInfo(O),E((j=_)!==null&&j!==void 0?j:{},O)}}),ie(w,"handleClick",function(O){var P=w.getMouseInfo(O);if(P){var E=B(B({},P),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var j=w.props.onClick;oe(j)&&j(E,O)}}),ie(w,"handleMouseDown",function(O){var P=w.props.onMouseDown;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleMouseUp",function(O){var P=w.props.onMouseUp;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var P=w.props.onDoubleClick;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"handleContextMenu",function(O){var P=w.props.onContextMenu;if(oe(P)){var E=w.getMouseInfo(O);P(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&pv.emit(mv,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var P=w.props,E=P.layout,j=P.syncMethod,_=w.state.updateId,T=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:T,dataEndIndex:k},h({props:w.props,dataStartIndex:T,dataEndIndex:k,updateId:_},w.state)));else if(O.activeTooltipIndex!==void 0){var M=O.chartX,R=O.chartY,I=O.activeTooltipIndex,L=w.state,z=L.offset,N=L.tooltipTicks;if(!z)return;if(typeof j=="function")I=j(N,O);else if(j==="value"){I=-1;for(var F=0;F=0){var le,U;if(M.dataKey&&!M.allowDuplicatedCategory){var Ye=typeof M.dataKey=="function"?se:"payload.".concat(M.dataKey.toString());le=kd(F,Ye,I),U=W&&V&&kd(V,Ye,I)}else le=F==null?void 0:F[R],U=W&&V&&V[R];if(Ue||be){var ye=O.props.activeIndex!==void 0?O.props.activeIndex:R;return[A.cloneElement(O,B(B(B({},j.props),St),{},{activeIndex:ye})),null,null]}if(!ae(le))return[G].concat(Ks(w.renderActivePoints({item:j,activePoint:le,basePoint:U,childIndex:R,isRange:W})))}else{var st,lt=(st=w.getItemByXY(w.state.activeCoordinate))!==null&&st!==void 0?st:{graphicalItem:G},Yt=lt.graphicalItem,li=Yt.item,ho=li===void 0?O:li,Wc=Yt.childIndex,ia=B(B(B({},j.props),St),{},{activeIndex:Wc});return[A.cloneElement(ho,ia),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,P,E){return A.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:jf,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:jf},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:jf},YAxis:{handler:jf},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:so("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=$C(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Ice(y,g),Cce(y,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,P=x.layout,E=cr(S,Nt);if(E){var j=E.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var _=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,T=A0(this.state,w,j,_),k=this.state.tooltipTicks[j].coordinate,M=(this.state.offset.top+O)/2,R=P==="horizontal",I=R?{x:k,y:M}:{y:k,x:M},L=this.state.formattedGraphicalItems.find(function(N){var F=N.item;return F.type.name==="Scatter"});L&&(I=B(B({},I),L.props.points[j].tooltipPosition),T=L.props.points[j].tooltipPayload);var z={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:_,activePayload:T,activeCoordinate:I};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){Zy([cr(x.children,Nt)],[cr(this.props.children,Nt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=cr(this.props.children,Nt);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=mX(w),P={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},E=w.width/S.offsetWidth||1,j=this.inRange(P.chartX,P.chartY,E);if(!j)return null;var _=this.state,T=_.xAxisMap,k=_.yAxisMap,M=this.getTooltipEventType(),R=iA(this.state,this.props.data,this.props.layout,j);if(M!=="axis"&&T&&k){var I=xi(T).scale,L=xi(k).scale,z=I&&I.invert?I.invert(P.chartX):null,N=L&&L.invert?L.invert(P.chartY):null;return B(B({},P),{},{xValue:z,yValue:N},R)}return R?B(B({},P),R):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=x/w,E=S/w;if(O==="horizontal"||O==="vertical"){var j=this.state.offset,_=P>=j.left&&P<=j.left+j.width&&E>=j.top&&E<=j.top+j.height;return _?{x:P,y:E}:null}var T=this.state,k=T.angleAxisMap,M=T.radiusAxisMap;if(k&&M){var R=xi(k);return kP({x:P,y:E},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=cr(x,Nt),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Cd(this.props,this.handleOuterEvent);return B(B({},P),O)}},{key:"addListener",value:function(){pv.on(mv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pv.removeListener(mv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,P=0,E=O.length;P{const i=Jce.find(s=>s.value===t);if(!i)return[];const a=new Date,o=new Map;for(let s=0;s{const l=new Date(s.createdAt),u=Hi(Yy(l),"yyyy-MM-dd"),c=o.get(u)||0;o.set(u,c+1)}),Array.from(o.entries()).map(([s,l])=>({date:s,experiments:l,displayDate:Hi(new Date(s),"MMM dd")})).sort((s,l)=>s.date.localeCompare(l.date))},[e,t]),n=A.useMemo(()=>e.length,[e]);return p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n]})]}),p.jsx(Xa,{width:"100%",height:260,children:p.jsxs(em,{data:r,margin:{left:0,right:15,top:15,bottom:50},children:[p.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),p.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),p.jsx(ei,{tick:{fontSize:10},width:40,label:{value:"Count",angle:-90,position:"insideLeft",offset:8,style:{textAnchor:"middle",fontSize:11}}}),p.jsx(Nt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:i,payload:a,label:o})=>{if(!i||!a||!a.length)return null;const s=a[0].payload;return p.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[p.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:o}),p.jsx("div",{className:"space-y-0.5 text-[10px]",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"}),p.jsx("span",{className:"text-muted-foreground",children:"Launched:"}),p.jsx("span",{className:"font-medium ml-auto",children:s.experiments})]})})]})}}),p.jsx(en,{wrapperStyle:{fontSize:"10px"},iconType:"circle",iconSize:8}),p.jsx(On,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Launched"})]})})]})}const sA={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function efe({experiments:e}){const t=A.useMemo(()=>{const r=new Map;return e.forEach(n=>{const i=n.status,a=r.get(i)||0;r.set(i,a+1)}),Array.from(r.entries()).map(([n,i])=>({name:n,value:i,color:sA[n]||sA.UNKNOWN})).sort((n,i)=>i.value-n.value)},[e]);return t.length===0?p.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"}):p.jsxs("div",{className:"space-y-3",children:[p.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),p.jsx(Xa,{width:"100%",height:220,children:p.jsxs(uM,{margin:{top:20,bottom:5},children:[p.jsx(_n,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:58,label:({name:r,value:n})=>`${r}: ${n}`,style:{fontSize:"10px"},children:t.map((r,n)=>p.jsx(ll,{fill:r.color},`cell-${n}`))}),p.jsx(Nt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"}}),p.jsx(en,{wrapperStyle:{fontSize:"10px"}})]})})]})}const tfe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function rfe({data:e,timeRange:t}){const r=A.useMemo(()=>{const o=tfe.find(u=>u.value===t);if(!o)return[];const s=new Date,l=new Map;for(let u=0;u{const c=Hi(new Date(u.date),"yyyy-MM-dd");l.has(c)&&l.set(c,{totalTokens:u.totalTokens,inputTokens:u.inputTokens,outputTokens:u.outputTokens})}),Array.from(l.entries()).map(([u,c])=>({date:u,displayDate:Hi(new Date(u),"MMM dd"),totalTokens:c.totalTokens,inputTokens:c.inputTokens,outputTokens:c.outputTokens})).sort((u,c)=>u.date.localeCompare(c.date))},[e,t]),n=A.useMemo(()=>r.reduce((o,s)=>o+s.totalTokens,0),[r]),i=A.useMemo(()=>r.reduce((o,s)=>o+s.inputTokens,0),[r]),a=A.useMemo(()=>r.reduce((o,s)=>o+s.outputTokens,0),[r]);return p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h3",{className:"text-sm font-semibold",children:"Token Usage"}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n.toLocaleString()," (",i.toLocaleString(),"↓ ",a.toLocaleString(),"↑)"]})]}),p.jsx(Xa,{width:"100%",height:260,children:p.jsxs(em,{data:r,margin:{left:10,right:15,top:15,bottom:50},children:[p.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),p.jsx(Zn,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),p.jsx(ei,{tick:{fontSize:10},width:50,tickFormatter:o=>o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:o.toString(),label:{value:"Tokens",angle:-90,position:"insideLeft",offset:-5,style:{textAnchor:"middle",fontSize:11}}}),p.jsx(Nt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"10px"},content:({active:o,payload:s,label:l})=>{if(!o||!s||!s.length)return null;const u=s[0].payload;return p.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[p.jsx("div",{className:"text-[10px] font-medium mb-1.5",children:l}),p.jsxs("div",{className:"space-y-0.5 text-[10px]",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),p.jsx("span",{className:"text-muted-foreground",children:"Total:"}),p.jsx("span",{className:"font-medium ml-auto",children:u.totalTokens.toLocaleString()})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),p.jsx("span",{className:"text-muted-foreground",children:"Input:"}),p.jsx("span",{className:"font-medium ml-auto",children:u.inputTokens.toLocaleString()})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),p.jsx("span",{className:"text-muted-foreground",children:"Output:"}),p.jsx("span",{className:"font-medium ml-auto",children:u.outputTokens.toLocaleString()})]})]})]})}}),p.jsx(en,{wrapperStyle:{fontSize:"10px"},iconType:"circle",iconSize:8}),p.jsx(On,{type:"monotone",dataKey:"totalTokens",stroke:"#3b82f6",strokeWidth:2,dot:{fill:"#3b82f6",r:3},activeDot:{r:5},name:"Total"}),p.jsx(On,{type:"monotone",dataKey:"inputTokens",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:3},activeDot:{r:5},name:"Input"}),p.jsx(On,{type:"monotone",dataKey:"outputTokens",stroke:"#f59e0b",strokeWidth:2,dot:{fill:"#f59e0b",r:3},activeDot:{r:5},name:"Output"})]})})]})}const lA=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function nfe(){var f,d,h,v;const{selectedTeamId:e}=Ac(),[t,r]=A.useState("7days"),{data:n,isLoading:i}=zb(e||""),{data:a,isLoading:o}=GB(e||"",{enabled:!!e}),s=((f=lA.find(m=>m.value===t))==null?void 0:f.days)||30,{data:l,isLoading:u}=YB(e||"",s),c=A.useMemo(()=>{if(!a)return[];const m=new Date,g=t==="7days"?Ub(m,7):t==="1month"?Xy(m,1):Xy(m,3);return a.filter(y=>{const b=new Date(y.createdAt);return b>=g&&b<=m})},[a,t]);return p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Overview of your team's experiments and activity"})]}),p.jsx("div",{children:p.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[p.jsx(nt,{className:"h-14 w-full"}),p.jsx(nt,{className:"h-14 w-full"}),p.jsx(nt,{className:"h-14 w-full"})]}):p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[p.jsx(Se,{children:p.jsx(Oe,{className:"p-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),p.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),p.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:p.jsx(JT,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),p.jsx(Se,{children:p.jsx(Oe,{className:"p-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),p.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),p.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:p.jsx(AF,{className:"h-3.5 w-3.5 text-green-600"})})]})})}),p.jsx(Se,{children:p.jsx(Oe,{className:"p-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-0.5",children:[p.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"TOKENS"}),p.jsxs("p",{className:"text-lg font-bold tabular-nums text-foreground",children:[(((d=n==null?void 0:n.aggregatedTokens)==null?void 0:d.totalTokens)||0).toLocaleString(),p.jsxs("span",{className:"text-muted-foreground text-xs ml-1 font-normal",children:["(",(((h=n==null?void 0:n.aggregatedTokens)==null?void 0:h.inputTokens)||0).toLocaleString(),"↓ ",(((v=n==null?void 0:n.aggregatedTokens)==null?void 0:v.outputTokens)||0).toLocaleString(),"↑)"]})]})]}),p.jsx("div",{className:"p-1.5 bg-orange-100 rounded-lg",children:p.jsx(lF,{className:"h-3.5 w-3.5 text-orange-600"})})]})})})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),p.jsx("div",{className:"flex gap-1",children:lA.map(m=>p.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>r(m.value),className:`h-8 px-2.5 text-xs transition-colors ${t===m.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:m.label},m.value))})]}),p.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:o?p.jsx(nt,{className:"h-56 w-full"}):c&&c.length>0?p.jsx(efe,{experiments:c}):p.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:o?p.jsx(nt,{className:"h-56 w-full"}):c&&c.length>0?p.jsx(Zce,{experiments:c,timeRange:t}):p.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]}),p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:u?p.jsx(nt,{className:"h-80 w-full"}):l?p.jsx(rfe,{data:l,timeRange:t}):p.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No token usage data available for this time range"})})})]})]})}const Bc=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{className:"relative w-full overflow-auto",children:p.jsx("table",{ref:r,className:fe("w-full caption-bottom text-sm",e),...t})}));Bc.displayName="Table";const zc=A.forwardRef(({className:e,...t},r)=>p.jsx("thead",{ref:r,className:fe("[&_tr]:border-b",e),...t}));zc.displayName="TableHeader";const Uc=A.forwardRef(({className:e,...t},r)=>p.jsx("tbody",{ref:r,className:fe("[&_tr:last-child]:border-0",e),...t}));Uc.displayName="TableBody";const ife=A.forwardRef(({className:e,...t},r)=>p.jsx("tfoot",{ref:r,className:fe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ife.displayName="TableFooter";const ti=A.forwardRef(({className:e,...t},r)=>p.jsx("tr",{ref:r,className:fe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ti.displayName="TableRow";const Bt=A.forwardRef(({className:e,...t},r)=>p.jsx("th",{ref:r,className:fe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Bt.displayName="TableHead";const zt=A.forwardRef(({className:e,...t},r)=>p.jsx("td",{ref:r,className:fe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));zt.displayName="TableCell";const afe=A.forwardRef(({className:e,...t},r)=>p.jsx("caption",{ref:r,className:fe("mt-4 text-sm text-muted-foreground",e),...t}));afe.displayName="TableCaption";function Rr({className:e,variant:t="default",...r}){const n={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-slate-100 text-slate-700 border-slate-200",destructive:"bg-red-50 text-red-700 border-red-200",outline:"text-foreground",success:"bg-emerald-50 text-emerald-700 border-emerald-200",warning:"bg-amber-50 text-amber-700 border-amber-200",unknown:"bg-purple-50 text-purple-700 border-purple-200",info:"bg-blue-50 text-blue-700 border-blue-200"};return p.jsx("div",{className:fe("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium transition-colors",n[t],e),...r})}const tm=A.forwardRef(({className:e,type:t,...r},n)=>p.jsx("input",{type:t,className:fe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));tm.displayName="Input";function Yx({value:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=A.useState(!1),s=A.useRef(null),l=r.find(u=>u.value===e);return A.useEffect(()=>{const u=c=>{s.current&&!s.current.contains(c.target)&&o(!1)};return a&&document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[a]),p.jsxs("div",{ref:s,className:fe("relative",n),children:[p.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-[13px] font-medium text-foreground","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[p.jsx("span",{children:(l==null?void 0:l.label)||i||"Select..."}),p.jsx(ip,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]}),a&&p.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:p.jsx("div",{className:"max-h-60 overflow-auto p-1",children:r.map(u=>p.jsx("button",{type:"button",onClick:()=>{t(u.value),o(!1)},className:fe("w-full rounded-sm px-2 py-1.5 text-[13px] text-left cursor-pointer transition-colors","hover:bg-accent hover:text-accent-foreground",e===u.value&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value))})})]})}function ofe({values:e,onChange:t,options:r,className:n,placeholder:i}){const[a,o]=A.useState(!1),s=A.useRef(null),l=r.filter(h=>e.includes(h.value)),u=A.useMemo(()=>{const h={};return r.forEach(v=>{const m=v.group||"Other";h[m]||(h[m]=[]),h[m].push(v)}),h},[r]);A.useEffect(()=>{const h=v=>{s.current&&!s.current.contains(v.target)&&o(!1)};return a&&document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[a]);const c=h=>{e.includes(h)?t(e.filter(v=>v!==h)):t([...e,h])},f=(h,v)=>{v.stopPropagation(),t(e.filter(m=>m!==h))},d=h=>{h.stopPropagation(),t([])};return p.jsxs("div",{ref:s,className:fe("relative",n),children:[p.jsxs("button",{type:"button",onClick:()=>o(!a),className:fe("flex min-h-9 w-full items-center justify-between rounded-md border bg-background px-3 py-1.5 text-[13px]","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus:border-blue-300 focus:bg-blue-50","disabled:cursor-not-allowed disabled:opacity-50"),children:[p.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:l.length===0?p.jsx("span",{className:"text-muted-foreground font-medium",children:i||"Select labels..."}):l.map(h=>{const v=h.value.endsWith(":*")?h.label:`${h.group}:${h.label}`;return p.jsxs(Rr,{variant:"outline",className:"text-[11px] px-1.5 py-0 font-normal",children:[v,p.jsx(Ed,{className:"ml-1 h-3 w-3 cursor-pointer hover:text-destructive",onClick:m=>f(h.value,m)})]},h.value)})}),p.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[l.length>0&&p.jsx(Ed,{className:"h-3.5 w-3.5 opacity-50 hover:opacity-100 cursor-pointer",onClick:d}),p.jsx(ip,{className:fe("h-3.5 w-3.5 opacity-50 transition-transform",a&&"transform rotate-180")})]})]}),a&&p.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:p.jsx("div",{className:"max-h-80 overflow-auto p-1",children:Object.entries(u).map(([h,v])=>p.jsxs("div",{children:[p.jsx("div",{className:"px-2 py-1.5 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:h}),v.map(m=>p.jsxs("button",{type:"button",onClick:()=>c(m.value),className:fe("w-full rounded-sm px-2 py-1.5 pl-6 text-[13px] text-left cursor-pointer transition-colors flex items-center gap-2","hover:bg-accent hover:text-accent-foreground"),children:[p.jsx("input",{type:"checkbox",checked:e.includes(m.value),onChange:()=>{},className:"h-3.5 w-3.5 rounded border-gray-300"}),p.jsx("span",{className:fe(e.includes(m.value)&&"font-medium"),children:m.label})]},m.value))]},h))})})]})}function Xx({currentPage:e,totalPages:t,pageSize:r,totalItems:n,onPageChange:i,itemName:a="items"}){return n===0?null:p.jsx("div",{className:"flex items-center justify-end px-6 py-4 border-t",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>i(Math.max(0,e-1)),disabled:e===0,className:"h-8 w-8 p-0",children:p.jsx(aF,{className:"h-4 w-4"})}),p.jsxs("div",{className:"text-[13px] font-medium text-muted-foreground",children:[e+1," / ",t]}),p.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>i(Math.min(t-1,e+1)),disabled:e>=t-1,className:"h-8 w-8 p-0",children:p.jsx(Lb,{className:"h-4 w-4"})})]})})}const sfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},lfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],yv=[{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-300"},{bg:"bg-green-100",text:"text-green-700",border:"border-green-300"},{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-300"},{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300"},{bg:"bg-pink-100",text:"text-pink-700",border:"border-pink-300"},{bg:"bg-cyan-100",text:"text-cyan-700",border:"border-cyan-300"},{bg:"bg-indigo-100",text:"text-indigo-700",border:"border-indigo-300"},{bg:"bg-teal-100",text:"text-teal-700",border:"border-teal-300"},{bg:"bg-amber-100",text:"text-amber-700",border:"border-amber-300"},{bg:"bg-rose-100",text:"text-rose-700",border:"border-rose-300"},{bg:"bg-violet-100",text:"text-violet-700",border:"border-violet-300"},{bg:"bg-lime-100",text:"text-lime-700",border:"border-lime-300"},{bg:"bg-fuchsia-100",text:"text-fuchsia-700",border:"border-fuchsia-300"},{bg:"bg-emerald-100",text:"text-emerald-700",border:"border-emerald-300"},{bg:"bg-sky-100",text:"text-sky-700",border:"border-sky-300"},{bg:"bg-red-100",text:"text-red-700",border:"border-red-300"},{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300"},{bg:"bg-slate-100",text:"text-slate-700",border:"border-slate-300"},{bg:"bg-zinc-100",text:"text-zinc-700",border:"border-zinc-300"},{bg:"bg-stone-100",text:"text-stone-700",border:"border-stone-300"}],gv=10;function ufe(){const{selectedTeamId:e}=Ac(),[t,r]=A.useState("ALL"),[n,i]=A.useState([]),[a,o]=A.useState(""),[s,l]=A.useState(0),{data:u}=zb(e||""),{data:c,isLoading:f}=dk(e||"",{page:s,pageSize:gv,enabled:!!e}),d=(u==null?void 0:u.totalExperiments)||0,h=Math.ceil(d/gv),v=A.useMemo(()=>{if(!c||c.length===0)return new Map;const y=new Set;c.forEach(S=>{var w;(w=S.labels)==null||w.forEach(O=>{y.add(O.name)})});const b=Array.from(y).sort(),x=new Map;return b.forEach((S,w)=>{x.set(S,yv[w%yv.length])}),x},[c]),m=A.useMemo(()=>{if(!c||c.length===0)return[];const y=new Map;c.forEach(x=>{var S;(S=x.labels)==null||S.forEach(w=>{y.has(w.name)||y.set(w.name,new Set),y.get(w.name).add(w.value)})});const b=[];return Array.from(y.entries()).sort(([x],[S])=>x.localeCompare(S)).forEach(([x,S])=>{b.push({value:`${x}:*`,label:`(Any ${x})`,group:x}),Array.from(S).sort().forEach(w=>{b.push({value:`${x}:${w}`,label:w,group:x})})}),b},[c]),g=A.useMemo(()=>{if(!c)return[];let y=[...c];if(a.trim()){const b=a.toLowerCase();y=y.filter(x=>{var S,w,O,P;return((S=x.name)==null?void 0:S.toLowerCase().includes(b))||((w=x.description)==null?void 0:w.toLowerCase().includes(b))||((O=x.id)==null?void 0:O.toLowerCase().includes(b))||((P=x.labels)==null?void 0:P.some(E=>E.name.toLowerCase().includes(b)||E.value.toLowerCase().includes(b)))})}return t!=="ALL"&&(y=y.filter(b=>b.status===t)),n.length>0&&(y=y.filter(b=>n.every(x=>{var O,P;const[S,w]=x.split(":",2);return w==="*"?(O=b.labels)==null?void 0:O.some(E=>E.name===S):(P=b.labels)==null?void 0:P.some(E=>E.name===S&&E.value===w)}))),y.sort((b,x)=>new Date(x.createdAt).getTime()-new Date(b.createdAt).getTime()),y},[c,t,n,a]);return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsxs("div",{className:"relative w-80",children:[p.jsx(Fb,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),p.jsx(tm,{placeholder:"Search experiments...",value:a,onChange:y=>o(y.target.value),className:"pl-8 h-9 text-[13px] font-medium focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),p.jsx(ofe,{values:n,onChange:y=>i(y),options:m,className:"w-64",placeholder:"Filter by labels..."}),p.jsx(Yx,{value:t,onChange:y=>r(y),options:lfe,className:"w-40"})]})]}),p.jsx(Se,{className:"border-0 shadow-sm",children:p.jsxs(Oe,{className:"p-0",children:[f?p.jsx("div",{className:"p-8",children:p.jsx(nt,{className:"h-24 w-full"})}):!g||g.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:a.trim()||t!=="ALL"||n.length>0?"No experiments match your filters":"No experiments found"}):p.jsx("div",{className:"overflow-hidden rounded-lg",children:p.jsxs(Bc,{children:[p.jsx(zc,{children:p.jsxs(ti,{className:"hover:bg-transparent border-b",children:[p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Name"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Labels"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),p.jsx(Uc,{children:g.map((y,b)=>p.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[p.jsx(zt,{className:"py-3 text-sm font-mono",children:p.jsx(Va,{to:`/experiments/${y.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:y.id})}),p.jsx(zt,{className:"py-3 text-sm font-medium text-foreground",children:y.name}),p.jsx(zt,{className:"py-3 text-sm",children:y.labels&&y.labels.length>0?p.jsx("div",{className:"flex gap-1 flex-wrap",children:y.labels.map((x,S)=>{const w=v.get(x.name)||yv[0];return p.jsxs(Rr,{variant:"outline",className:`text-xs px-2 py-0.5 font-normal ${w.bg} ${w.text} ${w.border}`,children:[x.name,": ",x.value]},S)})}):p.jsx("span",{className:"text-muted-foreground",children:"-"})}),p.jsx(zt,{className:"py-3",children:p.jsx(Rr,{variant:sfe[y.status],children:y.status})}),p.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(y.createdAt),{addSuffix:!0})})]},y.id))})]})}),g&&g.length>0&&p.jsx(Xx,{currentPage:s,totalPages:h,pageSize:gv,totalItems:d,onPageChange:l,itemName:"experiments"})]})})]})}function cM(e){const{data:t,...r}=ap(e),n=A.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const cfe="modulepreload",ffe=function(e){return"/static/"+e},uA={},dfe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=ffe(l),l in uA)return;uA[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":cfe,u||(f.as="script"),f.crossOrigin="",f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function hfe(e){const{data:t,...r}=ap(e),{runMetrics:n,availableMetrics:i}=A.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((c,f)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()).forEach(c=>{!c.key||c.value===null||(s.add(c.key),o.has(c.runId)||o.set(c.runId,new Map),o.get(c.runId).set(c.key,c.value))});const u=[];return o.forEach((c,f)=>{const d={};c.forEach((h,v)=>{d[v]=h}),u.push({runId:f,metrics:d})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function pfe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;adfe(()=>import("./react-plotly-CgH1OFjy.js").then(e=>e.r),[])),di=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],cA="#10b981",fA="#9ca3af",dA="#f59e0b";function yfe({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=A.useState(i[0]||""),[s,l]=A.useState("timeline"),[u,c]=A.useState([]),{runMetrics:f,availableMetrics:d}=hfe(t),h=A.useMemo(()=>{const P=[];return Object.values(e).forEach(E=>{P.push(...E)}),P.length===0?null:P[0].runId},[e]),v=A.useMemo(()=>u.length===0?f:f.filter(P=>u.every(E=>P.metrics[E.key]!==void 0)),[f,u]),m=A.useMemo(()=>u.length<2||v.length<2?new Set:mfe(v,u),[v,u]),g=A.useMemo(()=>{var E;if(i.length===0||!a)return[];const P=[];return e[a]&&e[a].forEach((j,_)=>{j.value!==null&&P.push({timestamp:new Date(j.createdAt).getTime(),index:_,time:Hi(new Date(j.createdAt),"MMM dd HH:mm:ss"),value:j.value,runId:j.runId})}),P.sort((j,_)=>j.timestamp-_.timestamp),P.forEach((j,_)=>{j.index=_}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",P.length),console.log("[MetricsChart] All data points:",P),P},[e,i,a]),y=A.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const P=u[0],E=u[1],j=u.length>=3?u[2]:void 0,_=v.map(k=>({runId:k.runId,x:k.metrics[P.key],y:k.metrics[E.key],z:j?k.metrics[j.key]:void 0,isParetoOptimal:m.has(k.runId),metrics:k.metrics})),T=_.filter(k=>k.isParetoOptimal).sort((k,M)=>k.x-M.x);return{all:_,paretoLine:T}},[v,u,m]),b=A.useMemo(()=>{if(u.length!==3||y.all.length===0)return null;const P=[...y.paretoLine].sort((k,M)=>k.x!==M.x?k.x-M.x:k.y!==M.y?k.y-M.y:(k.z||0)-(M.z||0)),E=y.all.find(k=>k.runId===h),j=P.filter(k=>k.runId!==h),_=y.all.filter(k=>!k.isParetoOptimal&&k.runId!==h),T=[{x:_.map(k=>k.x),y:_.map(k=>k.y),z:_.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:fA,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:_.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:j.map(k=>k.x),y:j.map(k=>k.y),z:j.map(k=>k.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:cA,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:j.map(k=>[k.runId,k.x,k.y,k.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&T.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:dA,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),T},[y,u,h]),x=P=>{o(P)},S=P=>{u.length>=3||u.some(E=>E.key===P)||c([...u,{key:P,direction:"maximize"}])},w=P=>{c(u.filter(E=>E.key!==P))},O=P=>{c(u.map(E=>E.key===P?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?p.jsxs(Se,{children:[p.jsxs(kr,{className:"pb-3",children:[p.jsx(Cr,{className:"text-sm",children:r}),n&&p.jsx(nn,{className:"text-xs",children:n})]}),p.jsx(Oe,{children:p.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):p.jsxs(Se,{children:[p.jsxs(kr,{className:"pb-3",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx(Cr,{className:"text-sm",children:r}),n&&p.jsx(nn,{className:"text-xs",children:n})]}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>l("timeline"),className:`h-7 px-3 text-xs transition-colors ${s==="timeline"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Timeline"}),p.jsx(Yn,{variant:"outline",size:"sm",onClick:()=>l("pareto"),className:`h-7 px-3 text-xs transition-colors ${s==="pareto"?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:"Pareto"})]})]}),s==="timeline"?p.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((P,E)=>p.jsx(Rr,{variant:a===P?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===P?di[E%di.length]:void 0},onClick:()=>x(P),children:P},P))}):p.jsxs("div",{className:"space-y-2 pt-3",children:[p.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map((P,E)=>{const j=u.find(T=>T.key===P),_=(j==null?void 0:j.direction)==="maximize";return p.jsxs(Rr,{variant:j?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:j?di[E%di.length]:void 0,borderColor:j?di[E%di.length]:void 0},onClick:()=>{j?O(P):u.length<3&&S(P)},onContextMenu:T=>{T.preventDefault(),j&&w(P)},children:[P,j&&p.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:_?"↑":"↓"})]},P)})}),u.length>0&&p.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),p.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?p.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?p.jsx("span",{children:"Select at least 2 metrics for analysis"}):p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("span",{children:["Runs: ",v.length]}),m.size>0&&p.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),p.jsx(Oe,{className:"pt-0",children:s==="timeline"?a?p.jsx(Xa,{width:"100%",height:280,children:p.jsxs(em,{data:g,margin:{top:5,right:20,left:10,bottom:5},onClick:P=>{if(P&&P.activePayload&&P.activePayload[0]){const E=P.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[p.jsx(Ls,{strokeDasharray:"3 3"}),p.jsx(Zn,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:10}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:10}}),p.jsx(ei,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}},tick:{fontSize:10}}),p.jsx(Nt,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:P,payload:E})=>{if(!P||!E||E.length===0)return null;const j=E[0].payload;return j.runId?p.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[p.jsxs("div",{style:{fontWeight:600,fontSize:"10px"},children:["Run: ",j.runId]}),p.jsxs("div",{style:{fontSize:"10px"},children:[a,": ",typeof j.value=="number"?j.value.toFixed(4):j.value]})]}):null}}),p.jsx(On,{type:"monotone",dataKey:"value",name:a,stroke:di[i.indexOf(a)%di.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):p.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?p.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):y.all.length===0?p.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?p.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[p.jsx("style",{children:` + #pareto-3d-plot .nsewdrag { + cursor: default !important; + } + #pareto-3d-plot .nsewdrag.cursor-crosshair { + cursor: default !important; + } + `}),p.jsx(A.Suspense,{fallback:p.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:p.jsxs("div",{className:"text-center space-y-2",children:[p.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),p.jsx("div",{children:"Loading 3D visualization..."})]})}),children:p.jsx(vfe,{divId:"pareto-3d-plot",data:b,onInitialized:(P,E)=>{E.on("plotly_click",j=>{var _;if(j&&j.points&&j.points[0]){const k=(_=j.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},onUpdate:(P,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",j=>{var _;if(j&&j.points&&j.points[0]){const k=(_=j.points[0].customdata)==null?void 0:_[0];k&&window.open(`/runs/${k}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:10,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):p.jsx(Xa,{width:"100%",height:400,children:p.jsxs(Qce,{margin:{top:20,right:20,bottom:60,left:60},children:[p.jsx(Ls,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),p.jsx(Zn,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),p.jsx(ei,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:10,fill:"#374151"}},tick:{fontSize:10,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),p.jsx(Nt,{cursor:{strokeDasharray:"3 3"},content:({active:P,payload:E})=>{var R,I;if(!P||!E||!E[0])return null;const j=E[0].payload,_=j.runId===h,T=j.isParetoOptimal,k=_?"#fef3c7":T?"#f0fdf4":"#fafafa",M=_?"#fcd34d":T?"#86efac":"#d1d5db";return p.jsxs("div",{style:{backgroundColor:k,border:`1px solid ${M}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"10px"},children:[p.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",j.runId,_?" (StartPoint)":""]}),p.jsxs("div",{children:[u[0].key,": ",(R=j.x)==null?void 0:R.toFixed(4)]}),p.jsxs("div",{children:[u[1].key,": ",(I=j.y)==null?void 0:I.toFixed(4)]})]})}}),p.jsx(Ba,{name:"Dominated",data:y.all.filter(P=>!P.isParetoOptimal&&P.runId!==h),fill:fA,fillOpacity:.4,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),p.jsx(Ba,{name:"Pareto",data:y.all.filter(P=>P.isParetoOptimal&&P.runId!==h),fill:cA,fillOpacity:.95,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")}),h&&p.jsx(Ba,{name:"Start",data:y.all.filter(P=>P.runId===h),fill:dA,shape:"circle",onClick:P=>(P==null?void 0:P.runId)&&window.open(`/runs/${P.runId}`,"_blank")})]})})})]})}const Qx=A.createContext(void 0),Jx=A.forwardRef(({className:e,value:t,onValueChange:r,...n},i)=>p.jsx(Qx.Provider,{value:{value:t,onValueChange:r},children:p.jsx("div",{ref:i,className:fe("w-full",e),...n})}));Jx.displayName="Tabs";const Zx=A.forwardRef(({className:e,...t},r)=>p.jsx("div",{ref:r,className:fe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Zx.displayName="TabsList";const cc=A.forwardRef(({className:e,value:t,...r},n)=>{const i=A.useContext(Qx);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return p.jsx("button",{ref:n,className:fe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});cc.displayName="TabsTrigger";const fc=A.forwardRef(({className:e,value:t,...r},n)=>{const i=A.useContext(Qx);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:p.jsx("div",{ref:n,className:fe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});fc.displayName="TabsContent";const hA={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},gfe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],bv=10;function bfe(){var w;const{id:e}=yT(),[t,r]=A.useState("overview"),[n,i]=A.useState(0),[a,o]=A.useState(""),[s,l]=A.useState("ALL"),{data:u,isLoading:c,error:f}=ap(e),{data:d,isLoading:h}=Vy(e,{page:n,pageSize:bv}),{data:v}=Vy(e,{page:0,pageSize:1e3}),m=(v==null?void 0:v.length)||0,g=Math.ceil(m/bv),{data:y,isLoading:b}=cM(e),x=A.useMemo(()=>{if(!d)return[];let O=[...d];if(a.trim()){const P=a.toLowerCase();O=O.filter(E=>{var j;return(j=E.id)==null?void 0:j.toLowerCase().includes(P)})}return s!=="ALL"&&(O=O.filter(P=>P.status===s)),O.sort((P,E)=>new Date(E.createdAt).getTime()-new Date(P.createdAt).getTime()),O},[d,a,s]),S=A.useMemo(()=>!v||v.length===0?[]:[{name:"COMPLETED",value:v.filter(P=>P.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:v.filter(P=>P.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:v.filter(P=>P.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:v.filter(P=>P.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:v.filter(P=>P.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:v.filter(P=>P.status==="UNKNOWN").length,color:"#a78bfa"}].filter(P=>P.value>0),[v]);return c?p.jsxs("div",{className:"space-y-4",children:[p.jsx(nt,{className:"h-12 w-64"}),p.jsx(nt,{className:"h-96 w-full"})]}):f||!u?p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Error"}),p.jsx(nn,{children:"Failed to load experiment"})]}),p.jsx(Oe,{children:p.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Experiment not found"})})]}):p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),p.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),p.jsx(Rr,{variant:hA[u.status],children:u.status})]}),p.jsxs(Jx,{value:t,onValueChange:r,children:[p.jsxs(Zx,{children:[p.jsx(cc,{value:"overview",children:"Overview"}),p.jsx(cc,{value:"runs",children:"Runs"})]}),p.jsxs(fc,{value:"overview",className:"space-y-4",children:[p.jsx(Se,{children:p.jsxs(Oe,{className:"p-4",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),p.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"-"})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=u.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&u.aggregatedTokens.totalTokens>0?p.jsxs(p.Fragment,{children:[Number(u.aggregatedTokens.totalTokens).toLocaleString(),u.aggregatedTokens.inputTokens!==void 0&&u.aggregatedTokens.outputTokens!==void 0&&p.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.aggregatedTokens.inputTokens).toLocaleString(),"↓ ",Number(u.aggregatedTokens.outputTokens).toLocaleString(),"↑)"]})]}):p.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(u.createdAt),{addSuffix:!0})})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&p.jsxs("div",{className:"mt-5 pt-5 border-t",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),p.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([O,P])=>p.jsxs("div",{className:"break-words",children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),u.params&&Object.keys(u.params).length>0&&p.jsxs("div",{className:"mt-5 pt-5 border-t",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),p.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([O,P])=>p.jsxs("div",{className:"break-words",children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]}),v&&v.length>0&&S.length>0&&p.jsxs("div",{className:"mt-5 pt-5 border-t",children:[p.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",v.length," runs)"]}),p.jsx(Xa,{width:"100%",height:180,children:p.jsxs(uM,{margin:{top:20,bottom:5},children:[p.jsx(_n,{data:S,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:O,value:P})=>`${O}: ${P}`,style:{fontSize:"10px"},children:S.map((O,P)=>p.jsx(ll,{fill:O.color},`cell-${P}`))}),p.jsx(Nt,{contentStyle:{fontSize:"10px",backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px"}}),p.jsx(en,{wrapperStyle:{fontSize:"10px"}})]})})]})]})}),b?p.jsx(nt,{className:"h-80 w-full"}):y&&Object.keys(y).length>0?p.jsx(yfe,{metrics:y,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):p.jsxs(Se,{children:[p.jsxs(kr,{className:"pb-3",children:[p.jsx(Cr,{className:"text-sm",children:"Metrics"}),p.jsx(nn,{className:"text-xs",children:"No metrics data available"})]}),p.jsx(Oe,{children:p.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:v&&v.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),p.jsx(fc,{value:"runs",className:"space-y-4",children:p.jsx(Se,{children:p.jsxs(Oe,{className:"p-0",children:[p.jsxs("div",{className:"flex gap-2 mb-3 items-center px-4 pt-4",children:[p.jsxs("div",{className:"relative w-64",children:[p.jsx(Fb,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),p.jsx(tm,{placeholder:"Search runs...",value:a,onChange:O=>o(O.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),p.jsx(Yx,{value:s,onChange:O=>l(O),options:gfe,className:"w-40"})]}),h?p.jsx("div",{className:"p-8",children:p.jsx(nt,{className:"h-24 w-full"})}):!d||d.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):x.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):p.jsx("div",{className:"overflow-hidden rounded-lg",children:p.jsxs(Bc,{children:[p.jsx(zc,{children:p.jsxs(ti,{className:"hover:bg-transparent border-b",children:[p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"UUID"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),p.jsx(Uc,{children:x.map(O=>p.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[p.jsx(zt,{className:"py-3 text-sm font-mono",children:p.jsx(Va,{to:`/runs/${O.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:O.id})}),p.jsx(zt,{className:"py-3",children:p.jsx(Rr,{variant:hA[O.status],children:O.status})}),p.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(O.createdAt),{addSuffix:!0})})]},O.id))})]})}),!h&&x&&x.length>0&&p.jsx(Xx,{currentPage:n,totalPages:g,pageSize:bv,totalItems:m,onPageChange:i,itemName:"runs"})]})})})]})]})}function xfe({experiments:e}){const t=A.useMemo(()=>{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Parameter Comparison"}),p.jsx(nn,{children:"Side-by-side comparison of experiment parameters"})]}),p.jsx(Oe,{children:t.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):p.jsxs(Bc,{children:[p.jsx(zc,{children:p.jsxs(ti,{children:[p.jsx(Bt,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>p.jsx(Bt,{className:"font-semibold",children:r.name},r.id))]})}),p.jsx(Uc,{children:t.map(r=>p.jsxs(ti,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[p.jsx(zt,{className:"font-medium",children:r.key}),r.values.map((n,i)=>p.jsx(zt,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const pA=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function wfe({experimentIds:e}){const t=e.map(a=>cM(a)),r=t.some(a=>a.isLoading),n=A.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,c])=>{c.forEach(f=>{const d=f.createdAt,h=`exp${s+1}_${u}`;a.has(d)||a.set(d,{timestamp:d,time:Hi(new Date(d),"HH:mm:ss")});const v=a.get(d);v[h]=f.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=A.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?p.jsxs(Se,{children:[p.jsx(kr,{children:p.jsx(Cr,{children:"Metrics Overlay"})}),p.jsx(Oe,{children:p.jsx(nt,{className:"h-96 w-full"})})]}):n.length===0?p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Metrics Overlay"}),p.jsx(nn,{children:"Combined metrics visualization across experiments"})]}),p.jsx(Oe,{children:p.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Metrics Overlay"}),p.jsx(nn,{children:"Combined metrics from all selected experiments"})]}),p.jsx(Oe,{children:p.jsx(Xa,{width:"100%",height:400,children:p.jsxs(em,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[p.jsx(Ls,{strokeDasharray:"3 3"}),p.jsx(Zn,{dataKey:"time",tick:{fontSize:10},label:{value:"Time",position:"insideBottom",offset:-5,style:{fontSize:10}}}),p.jsx(ei,{tick:{fontSize:10},label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:10}}}),p.jsx(Nt,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem",fontSize:"10px"}}),p.jsx(en,{wrapperStyle:{fontSize:"10px"}}),i.map((a,o)=>p.jsx(On,{type:"monotone",dataKey:a,stroke:pA[o%pA.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const Sfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function Ofe(){var i;const[e]=dL(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=E5(t);return n?p.jsxs("div",{className:"space-y-4",children:[p.jsx(nt,{className:"h-12 w-64"}),p.jsx(nt,{className:"h-96 w-full"})]}):!r||r.length<2?p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Experiment Comparison"}),p.jsx(nn,{children:"Select at least 2 experiments to compare"})]}),p.jsx(Oe,{children:p.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),p.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),p.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsx(Cr,{className:"text-lg",children:a.name}),p.jsx(Rr,{variant:Sfe[a.status],children:a.status})]}),a.description&&p.jsx(nn,{children:a.description})]}),p.jsx(Oe,{children:p.jsxs("dl",{className:"space-y-2 text-sm",children:[p.jsxs("div",{className:"flex justify-between",children:[p.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),p.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"-"})]}),p.jsxs("div",{className:"flex justify-between",children:[p.jsx("dt",{className:"text-muted-foreground",children:"Params"}),p.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),p.jsx(xfe,{experiments:r}),p.jsx(wfe,{experimentIds:t})]})}const Pfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},Efe=[{value:"ALL",label:"All Status"},{value:"COMPLETED",label:"Completed"},{value:"RUNNING",label:"Running"},{value:"FAILED",label:"Failed"},{value:"PENDING",label:"Pending"},{value:"CANCELLED",label:"Cancelled"}],xv=10;function Afe(){var y;const{selectedTeamId:e}=Ac(),[t,r]=A.useState("ALL"),[n,i]=A.useState(""),[a,o]=A.useState(0),{data:s}=zb(e||""),{data:l,isLoading:u}=dk(e||"",{page:0,pageSize:1e3,enabled:!!e}),c=((y=l==null?void 0:l[0])==null?void 0:y.id)||"",{data:f,isLoading:d}=Vy(c,{page:a,pageSize:xv,enabled:!!c}),h=(s==null?void 0:s.totalRuns)||0,v=Math.ceil(h/xv),m=A.useMemo(()=>{if(!f)return[];let b=[...f];if(n.trim()){const x=n.toLowerCase();b=b.filter(S=>{var w,O;return((w=S.id)==null?void 0:w.toLowerCase().includes(x))||((O=S.experimentId)==null?void 0:O.toLowerCase().includes(x))})}return t!=="ALL"&&(b=b.filter(x=>x.status===t)),b.sort((x,S)=>new Date(S.createdAt).getTime()-new Date(x.createdAt).getTime()),b},[f,t,n]),g=u||d;return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Runs"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsxs("div",{className:"relative w-80",children:[p.jsx(Fb,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),p.jsx(tm,{placeholder:"Search runs...",value:n,onChange:b=>i(b.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),p.jsx(Yx,{value:t,onChange:b=>r(b),options:Efe,className:"w-40"})]})]}),p.jsx(Se,{className:"border-0 shadow-sm",children:p.jsxs(Oe,{className:"p-0",children:[g?p.jsx("div",{className:"p-8",children:p.jsx(nt,{className:"h-24 w-full"})}):!m||m.length===0?p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):p.jsx("div",{className:"overflow-hidden rounded-lg",children:p.jsxs(Bc,{children:[p.jsx(zc,{children:p.jsxs(ti,{className:"hover:bg-transparent border-b",children:[p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"ID"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Experiment ID"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50",children:"Status"}),p.jsx(Bt,{className:"h-11 text-xs font-semibold uppercase tracking-wider text-muted-foreground bg-muted/50 text-right",children:"Created"})]})}),p.jsx(Uc,{children:m.map(b=>p.jsxs(ti,{className:"hover:bg-accent/50 transition-colors border-b last:border-0",children:[p.jsx(zt,{className:"py-3 text-sm font-mono",children:p.jsx(Va,{to:`/runs/${b.id}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.id})}),p.jsx(zt,{className:"py-3 text-sm font-mono",children:p.jsx(Va,{to:`/experiments/${b.experimentId}`,className:"text-blue-600 hover:text-blue-800 hover:underline font-medium transition-colors",children:b.experimentId})}),p.jsx(zt,{className:"py-3",children:p.jsx(Rr,{variant:Pfe[b.status],children:b.status})}),p.jsx(zt,{className:"py-3 text-sm text-muted-foreground text-right",children:Vo(new Date(b.createdAt),{addSuffix:!0})})]},b.id))})]})}),m&&m.length>0&&p.jsx(Xx,{currentPage:a,totalPages:v,pageSize:xv,totalItems:h,onPageChange:o,itemName:"runs"})]})})]})}async function jfe(e,t,r){try{return(await Mr(Ir.getArtifactContent,{team_id:e,tag:t,repo_name:r})).artifactContent}catch(n){throw new Error(`Failed to get artifact content: ${n instanceof Error?n.message:"Unknown error"}`)}}function _fe(e,t,r,n=!0){return En({queryKey:["artifacts","content",e,t,r],queryFn:()=>jfe(e,t,r),enabled:!!(n&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}const mA={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},vA=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:p.jsx(Z3,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:p.jsx(xF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:p.jsx(fF,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:p.jsx(vF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:p.jsx(CF,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:p.jsx(Ky,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function Tfe({spans:e}){const[t,r]=A.useState(()=>new Set(e.filter(g=>!g.parentSpanId||g.parentSpanId==="").map(g=>g.spanId))),[n,i]=A.useState(null),a=()=>{const g=new Set(e.map(y=>y.spanId));r(g)},o=()=>{r(new Set)},s=A.useMemo(()=>{if(!e||e.length===0)return[];const g=new Map,y=[];e.forEach(S=>{g.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=g.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")y.push(w);else{const O=g.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):y.push(w)}});const b=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>b(w.children))},x=S=>{var T,k,M;S.children.forEach(R=>x(R));const w=parseInt((T=S.span.spanAttributes)==null?void 0:T["gen_ai.usage.input_tokens"])||0,O=parseInt((k=S.span.spanAttributes)==null?void 0:k["gen_ai.usage.output_tokens"])||0,P=parseInt((M=S.span.spanAttributes)==null?void 0:M["llm.usage.total_tokens"])||0,E=S.children.reduce((R,I)=>R+(I.inputTokens||0),0),j=S.children.reduce((R,I)=>R+(I.outputTokens||0),0),_=S.children.reduce((R,I)=>R+(I.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+j,S.totalTokens=P+_};return b(y),y.forEach(S=>x(S)),y},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:c}=A.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const g=e.map(w=>new Date(w.timestamp).getTime()),y=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),b=Math.min(...g),x=Math.max(...y),S=x-b;return{minTimestamp:b,maxTimestamp:x,totalDuration:S||1}},[e]),f=g=>{r(y=>{const b=new Set(y);return b.has(g)?b.delete(g):b.add(g),b})},d=g=>{const y=g/1e3,b=y/1e3,x=b/1e3;return x>=1?`${x.toFixed(2)}s`:b>=1?`${b.toFixed(2)}ms`:`${y.toFixed(2)}μs`},h=g=>{const{span:y}=g,b=new Date(y.timestamp).getTime(),x=b+y.duration/1e6,S=(b-l)/c*100,w=(x-b)/c*100,O=mA[y.statusCode]||mA.UNSET;return p.jsx("div",{className:`${O} absolute h-6 rounded flex items-center px-1.5 text-white text-[10px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${y.spanName} +Duration: ${d(y.duration)} +Status: ${y.statusCode} +Kind: ${y.spanKind}`,children:p.jsx("span",{className:"truncate",children:d(y.duration)})})},v=g=>{const{span:y,children:b,depth:x,totalTokens:S,inputTokens:w,outputTokens:O}=g,P=b.length>0,E=t.has(y.spanId),j=vA(y),_=P&&S&&S>0;return p.jsxs("div",{children:[p.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer h-10 ${(n==null?void 0:n.spanId)===y.spanId?"bg-accent":""}`,onClick:T=>{T.target.closest("button")||i(y)},children:[p.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 h-full min-w-0",style:{width:"320px",paddingLeft:`${x*10+8}px`,paddingRight:"8px"},children:[x>0&&p.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(x-1)*10+8}px`}}),P?p.jsx("button",{onClick:()=>f(y.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?p.jsx(ip,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"}):p.jsx(Lb,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})}):p.jsx("div",{className:"w-[18px] flex-shrink-0"}),p.jsxs(Rr,{variant:"outline",className:`${j.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px] font-medium flex-shrink-0`,children:[j.icon,p.jsx("span",{children:j.label})]}),p.jsx("span",{className:"text-[13px] font-medium truncate text-foreground",title:y.spanName,children:y.spanName})]}),p.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:[p.jsx(Ky,{className:"h-3 w-3 flex-shrink-0 text-muted-foreground"}),p.jsx("span",{className:"text-[11px] font-mono",children:d(y.duration)})]}),p.jsx("div",{className:"flex-shrink-0 flex items-center whitespace-nowrap text-foreground h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:S&&S>0?p.jsxs("div",{className:"flex flex-col justify-center",children:[p.jsxs("div",{className:"font-mono flex items-center text-[11px] leading-tight",children:[_&&p.jsx("span",{className:"inline-block align-middle mr-0.5 text-muted-foreground text-[10px]",children:"∑"}),p.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&p.jsxs("div",{className:"text-muted-foreground text-[9px] font-mono leading-tight mt-0.5",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):p.jsx("span",{className:"text-muted-foreground/40 text-[11px]",children:"—"})}),p.jsx("div",{className:"flex-1 relative h-full min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"8px"},children:h(g)})]}),P&&E&&p.jsx("div",{children:b.map(T=>v(T))})]},y.spanId)};if(!e||e.length===0)return p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=g=>{const y=vA(g),b=g.spanAttributes||{},x=b["gen_ai.request.model"]||b["gen_ai.response.model"],S=b["gen_ai.request.temperature"],w=b["gen_ai.request.max_tokens"],O=b["gen_ai.request.top_p"],P=[];let E=0;for(;b[`gen_ai.prompt.${E}.role`];)P.push({role:b[`gen_ai.prompt.${E}.role`],content:b[`gen_ai.prompt.${E}.content`]}),E++;const j=[];for(E=0;b[`gen_ai.completion.${E}.role`];)j.push({role:b[`gen_ai.completion.${E}.role`],content:b[`gen_ai.completion.${E}.content`],finishReason:b[`gen_ai.completion.${E}.finish_reason`]}),E++;return p.jsx(Se,{className:"mt-2 border-2",children:p.jsxs(Oe,{className:"p-3",children:[p.jsxs("div",{className:"flex items-start justify-between mb-3",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsxs(Rr,{variant:"outline",className:`${y.badgeColor} flex items-center gap-0.5 px-1.5 py-0.5 text-[11px]`,children:[y.icon,y.label]}),p.jsx("h4",{className:"font-semibold text-[13px]",children:g.spanName})]}),p.jsx(Yn,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:p.jsx(Ed,{className:"h-3 w-3"})})]}),x&&p.jsxs("div",{className:"mb-3",children:[p.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Model Configuration"}),p.jsxs("div",{className:"grid grid-cols-2 gap-1.5 text-[10px] border rounded-md p-2 bg-muted/30",children:[p.jsxs("div",{className:"col-span-2",children:[p.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),p.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:x})]}),S!==void 0&&p.jsxs("div",{children:[p.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),p.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:S})]}),w&&p.jsxs("div",{children:[p.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),p.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:w})]}),O!==void 0&&p.jsxs("div",{children:[p.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),p.jsx("span",{className:"ml-1.5 font-mono text-foreground",children:O})]})]})]}),P.length>0&&p.jsxs("div",{className:"mb-3",children:[p.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Input"}),p.jsx("div",{className:"space-y-1.5",children:P.map((_,T)=>p.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[p.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),p.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),j.length>0&&p.jsxs("div",{className:"mb-3",children:[p.jsx("h5",{className:"text-[11px] font-semibold mb-1.5 text-foreground uppercase tracking-wide",children:"Output"}),p.jsx("div",{className:"space-y-1.5",children:j.map((_,T)=>p.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[p.jsx("div",{className:"text-[10px] font-semibold text-muted-foreground mb-1 uppercase tracking-wide",children:_.role}),p.jsx("div",{className:"text-[11px] whitespace-pre-wrap leading-relaxed text-foreground",children:_.content})]},T))})]}),p.jsxs("details",{className:"mt-2",children:[p.jsxs("summary",{className:"text-[11px] font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-0.5 uppercase tracking-wide",children:["All Attributes (",Object.keys(b).length,")"]}),p.jsx("div",{className:"mt-1.5 text-[11px] space-y-0.5 bg-muted/30 rounded-md p-2 max-h-48 overflow-auto border",children:Object.entries(b).map(([_,T])=>p.jsxs("div",{className:"grid grid-cols-3 gap-2 py-0.5",children:[p.jsxs("span",{className:"text-muted-foreground truncate font-medium text-[10px]",title:_,children:[_,":"]}),p.jsx("span",{className:"col-span-2 font-mono break-all text-[10px] text-foreground",children:String(T)})]},_))})]})]})})};return p.jsx(Se,{className:"shadow-sm",children:p.jsxs(Oe,{className:"p-3",children:[p.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ky,{className:"h-3.5 w-3.5 text-muted-foreground"}),p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),p.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[d(c*1e6)," · ",e.length," span",e.length!==1?"s":""]}),p.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[p.jsx("button",{onClick:a,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Expand all"}),p.jsx("span",{className:"text-muted-foreground/30 text-xs",children:"|"}),p.jsx("button",{onClick:o,className:"text-[11px] px-1.5 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",children:"Collapse all"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),p.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),p.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[p.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[10px] text-foreground uppercase tracking-wide h-8",children:[p.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"320px",paddingLeft:"8px",paddingRight:"8px"},children:"Span Name"}),p.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"8px"},children:"Duration"}),p.jsx("div",{className:"flex-shrink-0 flex items-center h-full",style:{width:"90px",paddingLeft:"8px",paddingRight:"4px"},children:"Tokens"}),p.jsx("div",{className:"flex-1 flex items-center h-full",style:{paddingLeft:"2px",paddingRight:"8px"},children:"Timeline"})]}),s.map(g=>v(g))]}),n&&p.jsx("div",{className:"mt-2",children:m(n)})]})})}function qi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function yA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fM(...e){return t=>{let r=!1;const n=e.map(i=>{const a=yA(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=A.useMemo(()=>s,Object.values(s));return p.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=A.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Cfe(e,t=[]){let r=[];function n(a,o){const s=A.createContext(o),l=r.length;r=[...r,o];const u=f=>{var y;const{scope:d,children:h,...v}=f,m=((y=d==null?void 0:d[e])==null?void 0:y[l])||s,g=A.useMemo(()=>v,Object.values(v));return p.jsx(m.Provider,{value:g,children:h})};u.displayName=a+"Provider";function c(f,d){var m;const h=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,v=A.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>A.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return A.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,Nfe(i,...t)]}function Nfe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var dc=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},$fe=M0[" useId ".trim().toString()]||(()=>{}),Mfe=0;function wv(e){const[t,r]=A.useState($fe());return dc(()=>{r(n=>n??String(Mfe++))},[e]),e||(t?`radix-${t}`:"")}var Ife=M0[" useInsertionEffect ".trim().toString()]||dc;function Dfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Rfe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const c=A.useRef(e!==void 0);A.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=A.useCallback(c=>{var f;if(s){const d=Lfe(c)?c(e):c;d!==e&&((f=o.current)==null||f.call(o,d))}else a(c)},[s,e,a,o]);return[l,u]}function Rfe({defaultProp:e,onChange:t}){const[r,n]=A.useState(e),i=A.useRef(r),a=A.useRef(t);return Ife(()=>{a.current=t},[t]),A.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Lfe(e){return typeof e=="function"}function dM(e){const t=Ffe(e),r=A.forwardRef((n,i)=>{const{children:a,...o}=n,s=A.Children.toArray(a),l=s.find(zfe);if(l){const u=l.props.children,c=s.map(f=>f===l?A.Children.count(u)>1?A.Children.only(null):A.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...o,ref:i,children:A.isValidElement(u)?A.cloneElement(u,void 0,c):null})}return p.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Ffe(e){const t=A.forwardRef((r,n)=>{const{children:i,...a}=r;if(A.isValidElement(i)){const o=Wfe(i),s=Ufe(a,i.props);return i.type!==A.Fragment&&(s.ref=n?fM(n,o):o),A.cloneElement(i,s)}return A.Children.count(i)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bfe=Symbol("radix.slottable");function zfe(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bfe}function Ufe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Wfe(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],si=Hfe.reduce((e,t)=>{const r=dM(`Primitive.${t}`),n=A.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Kfe(e,t){e&&Eb.flushSync(()=>e.dispatchEvent(t))}function hc(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function qfe(e,t=globalThis==null?void 0:globalThis.document){const r=hc(e);A.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Vfe="DismissableLayer",j0="dismissableLayer.update",Gfe="dismissableLayer.pointerDownOutside",Yfe="dismissableLayer.focusOutside",gA,hM=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pM=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=A.useContext(hM),[c,f]=A.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=A.useState({}),v=fo(t,P=>f(P)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=Jfe(P=>{const E=P.target,j=[...u.branches].some(_=>_.contains(E));!S||j||(i==null||i(P),o==null||o(P),P.defaultPrevented||s==null||s())},d),O=Zfe(P=>{const E=P.target;[...u.branches].some(_=>_.contains(E))||(a==null||a(P),o==null||o(P),P.defaultPrevented||s==null||s())},d);return qfe(P=>{b===u.layers.size-1&&(n==null||n(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},d),A.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(gA=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),bA(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=gA)}},[c,d,r,u]),A.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),bA())},[c,u]),A.useEffect(()=>{const P=()=>h({});return document.addEventListener(j0,P),()=>document.removeEventListener(j0,P)},[]),p.jsx(si.div,{...l,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:qi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:qi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:qi(e.onPointerDownCapture,w.onPointerDownCapture)})});pM.displayName=Vfe;var Xfe="DismissableLayerBranch",Qfe=A.forwardRef((e,t)=>{const r=A.useContext(hM),n=A.useRef(null),i=fo(t,n);return A.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),p.jsx(si.div,{...e,ref:i})});Qfe.displayName=Xfe;function Jfe(e,t=globalThis==null?void 0:globalThis.document){const r=hc(e),n=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){mM(Gfe,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Zfe(e,t=globalThis==null?void 0:globalThis.document){const r=hc(e),n=A.useRef(!1);return A.useEffect(()=>{const i=a=>{a.target&&!n.current&&mM(Yfe,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bA(){const e=new CustomEvent(j0);document.dispatchEvent(e)}function mM(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Kfe(i,a):i.dispatchEvent(a)}var Sv="focusScope.autoFocusOnMount",Ov="focusScope.autoFocusOnUnmount",xA={bubbles:!1,cancelable:!0},ede="FocusScope",vM=A.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=A.useState(null),u=hc(i),c=hc(a),f=A.useRef(null),d=fo(t,m=>l(m)),h=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(n){let m=function(x){if(h.paused||!s)return;const S=x.target;s.contains(S)?f.current=S:pi(f.current,{select:!0})},g=function(x){if(h.paused||!s)return;const S=x.relatedTarget;S!==null&&(s.contains(S)||pi(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&pi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,s,h.paused]),A.useEffect(()=>{if(s){SA.add(h);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(Sv,xA);s.addEventListener(Sv,u),s.dispatchEvent(y),y.defaultPrevented||(tde(ode(yM(s)),{select:!0}),document.activeElement===m&&pi(s))}return()=>{s.removeEventListener(Sv,u),setTimeout(()=>{const y=new CustomEvent(Ov,xA);s.addEventListener(Ov,c),s.dispatchEvent(y),y.defaultPrevented||pi(m??document.body,{select:!0}),s.removeEventListener(Ov,c),SA.remove(h)},0)}}},[s,u,c,h]);const v=A.useCallback(m=>{if(!r&&!n||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[x,S]=rde(b);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&pi(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),r&&pi(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,h.paused]);return p.jsx(si.div,{tabIndex:-1,...o,ref:d,onKeyDown:v})});vM.displayName=ede;function tde(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pi(n,{select:t}),document.activeElement!==r)return}function rde(e){const t=yM(e),r=wA(t,e),n=wA(t.reverse(),e);return[r,n]}function yM(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function wA(e,t){for(const r of e)if(!nde(r,{upTo:t}))return r}function nde(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ide(e){return e instanceof HTMLInputElement&&"select"in e}function pi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ide(e)&&t&&e.select()}}var SA=ade();function ade(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=OA(e,t),e.unshift(t)},remove(t){var r;e=OA(e,t),(r=e[0])==null||r.resume()}}}function OA(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ode(e){return e.filter(t=>t.tagName!=="A")}var sde="Portal",gM=A.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=A.useState(!1);dc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?PD.createPortal(p.jsx(si.div,{...n,ref:t}),o):null});gM.displayName=sde;function lde(e,t){return A.useReducer((r,n)=>t[r][n]??r,e)}var rm=e=>{const{present:t,children:r}=e,n=ude(t),i=typeof r=="function"?r({present:n.isPresent}):A.Children.only(r),a=fo(n.ref,cde(i));return typeof r=="function"||n.isPresent?A.cloneElement(i,{ref:a}):null};rm.displayName="Presence";function ude(e){const[t,r]=A.useState(),n=A.useRef(null),i=A.useRef(e),a=A.useRef("none"),o=e?"mounted":"unmounted",[s,l]=lde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const u=_f(n.current);a.current=s==="mounted"?u:"none"},[s]),dc(()=>{const u=n.current,c=i.current;if(c!==e){const d=a.current,h=_f(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),dc(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=h=>{const m=_f(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},d=h=>{h.target===t&&(a.current=_f(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:A.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function _f(e){return(e==null?void 0:e.animationName)||"none"}function cde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Pv=0;function fde(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??PA()),document.body.insertAdjacentElement("beforeend",e[1]??PA()),Pv++,()=>{Pv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pv--}},[])}function PA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vn=function(){return vn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return _de;var t=Tde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Cde=SM(),Qo="data-scroll-locked",Nde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(hde,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body[`).concat(Qo,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Xf,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(Qf,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(Xf," .").concat(Xf,` { + right: 0 `).concat(n,`; + } + + .`).concat(Qf," .").concat(Qf,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(Qo,`] { + `).concat(pde,": ").concat(s,`px; + } +`)},AA=function(){var e=parseInt(document.body.getAttribute(Qo)||"0",10);return isFinite(e)?e:0},$de=function(){A.useEffect(function(){return document.body.setAttribute(Qo,(AA()+1).toString()),function(){var e=AA()-1;e<=0?document.body.removeAttribute(Qo):document.body.setAttribute(Qo,e.toString())}},[])},Mde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;$de();var a=A.useMemo(function(){return kde(i)},[i]);return A.createElement(Cde,{styles:Nde(a,!t,i,r?"":"!important")})},_0=!1;if(typeof window<"u")try{var Tf=Object.defineProperty({},"passive",{get:function(){return _0=!0,!0}});window.addEventListener("test",Tf,Tf),window.removeEventListener("test",Tf,Tf)}catch{_0=!1}var wo=_0?{passive:!1}:!1,Ide=function(e){return e.tagName==="TEXTAREA"},OM=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ide(e)&&r[t]==="visible")},Dde=function(e){return OM(e,"overflowY")},Rde=function(e){return OM(e,"overflowX")},jA=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=PM(e,n);if(i){var a=EM(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Lde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Fde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},PM=function(e,t){return e==="v"?Dde(t):Rde(t)},EM=function(e,t){return e==="v"?Lde(t):Fde(t)},Bde=function(e,t){return e==="h"&&t==="rtl"?-1:1},zde=function(e,t,r,n,i){var a=Bde(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,d=0;do{if(!s)break;var h=EM(e,s),v=h[0],m=h[1],g=h[2],y=m-g-a*v;(v||y)&&PM(e,s)&&(f+=y,d+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(d)<1)&&(u=!0),u},kf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_A=function(e){return[e.deltaX,e.deltaY]},TA=function(e){return e&&"current"in e?e.current:e},Ude=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wde=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Hde=0,So=[];function Kde(e){var t=A.useRef([]),r=A.useRef([0,0]),n=A.useRef(),i=A.useState(Hde++)[0],a=A.useState(SM)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=dde([e.lockRef.current],(e.shards||[]).map(TA),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=A.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=kf(m),b=r.current,x="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],w,O=m.target,P=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&P==="h"&&O.type==="range")return!1;var E=window.getSelection(),j=E&&E.anchorNode,_=j?j===O||j.contains(O):!1;if(_)return!1;var T=jA(P,O);if(!T)return!0;if(T?w=P:(w=P==="v"?"h":"v",T=jA(P,O)),!T)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=w),!w)return!0;var k=n.current||w;return zde(k,g,m,k==="h"?x:S)},[]),l=A.useCallback(function(m){var g=m;if(!(!So.length||So[So.length-1]!==a)){var y="deltaY"in g?_A(g):kf(g),b=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&Ude(w.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(TA).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=x.length>0?s(g,x[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=A.useCallback(function(m,g,y,b){var x={name:m,delta:g,target:y,should:b,shadowParent:qde(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=A.useCallback(function(m){r.current=kf(m),n.current=void 0},[]),f=A.useCallback(function(m){u(m.type,_A(m),m.target,s(m,e.lockRef.current))},[]),d=A.useCallback(function(m){u(m.type,kf(m),m.target,s(m,e.lockRef.current))},[]);A.useEffect(function(){return So.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wo),document.addEventListener("touchmove",l,wo),document.addEventListener("touchstart",c,wo),function(){So=So.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,wo),document.removeEventListener("touchmove",l,wo),document.removeEventListener("touchstart",c,wo)}},[]);var h=e.removeScrollBar,v=e.inert;return A.createElement(A.Fragment,null,v?A.createElement(a,{styles:Wde(i)}):null,h?A.createElement(Mde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Vde=wde(wM,Kde);var AM=A.forwardRef(function(e,t){return A.createElement(nm,vn({},e,{ref:t,sideCar:Vde}))});AM.classNames=nm.classNames;var Gde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oo=new WeakMap,Cf=new WeakMap,Nf={},_v=0,jM=function(e){return e&&(e.host||jM(e.parentNode))},Yde=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=jM(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xde=function(e,t,r,n){var i=Yde(t,Array.isArray(e)?e:[e]);Nf[r]||(Nf[r]=new WeakMap);var a=Nf[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var h=d.getAttribute(n),v=h!==null&&h!=="false",m=(Oo.get(d)||0)+1,g=(a.get(d)||0)+1;Oo.set(d,m),a.set(d,g),o.push(d),m===1&&v&&Cf.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return c(t),s.clear(),_v++,function(){o.forEach(function(f){var d=Oo.get(f)-1,h=a.get(f)-1;Oo.set(f,d),a.set(f,h),d||(Cf.has(f)||f.removeAttribute(n),Cf.delete(f)),h||f.removeAttribute(r)}),_v--,_v||(Oo=new WeakMap,Oo=new WeakMap,Cf=new WeakMap,Nf={})}},Qde=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Gde(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),Xde(n,i,r,"aria-hidden")):function(){return null}},im="Dialog",[_M]=Cfe(im),[Jde,ln]=_M(im),TM=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=A.useRef(null),l=A.useRef(null),[u,c]=Dfe({prop:n,defaultProp:i??!1,onChange:a,caller:im});return p.jsx(Jde,{scope:t,triggerRef:s,contentRef:l,contentId:wv(),titleId:wv(),descriptionId:wv(),open:u,onOpenChange:c,onOpenToggle:A.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};TM.displayName=im;var kM="DialogTrigger",Zde=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ln(kM,r),a=fo(t,i.triggerRef);return p.jsx(si.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rw(i.open),...n,ref:a,onClick:qi(e.onClick,i.onOpenToggle)})});Zde.displayName=kM;var ew="DialogPortal",[ehe,CM]=_M(ew,{forceMount:void 0}),NM=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ln(ew,t);return p.jsx(ehe,{scope:t,forceMount:r,children:A.Children.map(n,o=>p.jsx(rm,{present:r||a.open,children:p.jsx(gM,{asChild:!0,container:i,children:o})}))})};NM.displayName=ew;var Ih="DialogOverlay",$M=A.forwardRef((e,t)=>{const r=CM(Ih,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ln(Ih,e.__scopeDialog);return a.modal?p.jsx(rm,{present:n||a.open,children:p.jsx(rhe,{...i,ref:t})}):null});$M.displayName=Ih;var the=dM("DialogOverlay.RemoveScroll"),rhe=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ln(Ih,r);return p.jsx(AM,{as:the,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(si.div,{"data-state":rw(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),to="DialogContent",MM=A.forwardRef((e,t)=>{const r=CM(to,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ln(to,e.__scopeDialog);return p.jsx(rm,{present:n||a.open,children:a.modal?p.jsx(nhe,{...i,ref:t}):p.jsx(ihe,{...i,ref:t})})});MM.displayName=to;var nhe=A.forwardRef((e,t)=>{const r=ln(to,e.__scopeDialog),n=A.useRef(null),i=fo(t,r.contentRef,n);return A.useEffect(()=>{const a=n.current;if(a)return Qde(a)},[]),p.jsx(IM,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:qi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:qi(e.onFocusOutside,a=>a.preventDefault())})}),ihe=A.forwardRef((e,t)=>{const r=ln(to,e.__scopeDialog),n=A.useRef(!1),i=A.useRef(!1);return p.jsx(IM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),IM=A.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ln(to,r),l=A.useRef(null),u=fo(t,l);return fde(),p.jsxs(p.Fragment,{children:[p.jsx(vM,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(pM,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":rw(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(ahe,{titleId:s.titleId}),p.jsx(she,{contentRef:l,descriptionId:s.descriptionId})]})]})}),tw="DialogTitle",DM=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ln(tw,r);return p.jsx(si.h2,{id:i.titleId,...n,ref:t})});DM.displayName=tw;var RM="DialogDescription",LM=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ln(RM,r);return p.jsx(si.p,{id:i.descriptionId,...n,ref:t})});LM.displayName=RM;var FM="DialogClose",BM=A.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=ln(FM,r);return p.jsx(si.button,{type:"button",...n,ref:t,onClick:qi(e.onClick,()=>i.onOpenChange(!1))})});BM.displayName=FM;function rw(e){return e?"open":"closed"}var zM="DialogTitleWarning",[Rhe,UM]=kfe(zM,{contentName:to,titleName:tw,docsSlug:"dialog"}),ahe=({titleId:e})=>{const t=UM(zM),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ohe="DialogDescriptionWarning",she=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${UM(ohe).contentName}}.`;return A.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},lhe=TM,uhe=NM,WM=$M,HM=MM,KM=DM,qM=LM,che=BM;const fhe=lhe,dhe=uhe,VM=A.forwardRef(({className:e,...t},r)=>p.jsx(WM,{ref:r,className:fe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));VM.displayName=WM.displayName;const GM=A.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(dhe,{children:[p.jsx(VM,{}),p.jsxs(HM,{ref:n,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,p.jsxs(che,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(Ed,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));GM.displayName=HM.displayName;const YM=({className:e,...t})=>p.jsx("div",{className:fe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});YM.displayName="DialogHeader";const XM=A.forwardRef(({className:e,...t},r)=>p.jsx(KM,{ref:r,className:fe("text-lg font-semibold leading-none tracking-tight",e),...t}));XM.displayName=KM.displayName;const QM=A.forwardRef(({className:e,...t},r)=>p.jsx(qM,{ref:r,className:fe("text-sm text-muted-foreground",e),...t}));QM.displayName=qM.displayName;function hhe({open:e,onOpenChange:t,artifactContent:r,isLoading:n,error:i,title:a="Artifact Content"}){const[o,s]=A.useState(!1),l=()=>{r!=null&&r.content&&(navigator.clipboard.writeText(r.content),s(!0),setTimeout(()=>s(!1),2e3))},u=()=>{if(!r)return"";const{content:f,filename:d,contentType:h}=r;if(h==="application/json"||d.endsWith(".json"))try{const v=JSON.parse(f);return JSON.stringify(v,null,2)}catch{return f}return f},c=()=>{if(!r)return"";const{filename:f,contentType:d}=r;return d==="application/json"||f.endsWith(".json")?"language-json":""};return p.jsx(fhe,{open:e,onOpenChange:t,children:p.jsxs(GM,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[p.jsx(YM,{children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx(XM,{className:"text-base",children:a}),p.jsx(QM,{className:"text-xs font-mono mt-1 truncate",children:(r==null?void 0:r.filename)||"Loading..."})]}),r&&p.jsx(Yn,{variant:"ghost",size:"sm",onClick:l,className:"ml-2 h-7 w-7 p-0 flex-shrink-0",title:o?"Copied!":"Copy to clipboard",children:o?p.jsx(XT,{className:"h-3.5 w-3.5 text-green-600"}):p.jsx(QT,{className:"h-3.5 w-3.5"})})]})}),p.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:n&&!r?p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):i?p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):p.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${c()}`,children:p.jsx("code",{className:"text-slate-50",children:u()})})})]})})}const phe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"info",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function mhe(){var S,w;const{id:e}=yT(),{data:t,isLoading:r,error:n}=hk(e),[i,a]=A.useState(!1),[o,s]=A.useState("overview"),l=(t==null?void 0:t.metrics)||[],u=(t==null?void 0:t.spans)||[],c=r,f=r,d=n,h=(S=t==null?void 0:t.meta)==null?void 0:S.execution_result,v=(h==null?void 0:h.path)&&(h==null?void 0:h.file_name);let m="";if(v){let O=h.path;if(O.includes(":")&&(O=O.split(":")[1]),O.includes("/")){const P=O.split("/");O=P[P.length-1],O.includes(":")&&(O=O.split(":")[1])}m=O}const{data:g,isLoading:y,error:b}=_fe((t==null?void 0:t.teamId)||"",m,"execution",i&&v),x=()=>{!v||!t||a(!0)};return b&&i&&console.error("Failed to load artifact:",b),r?p.jsxs("div",{className:"space-y-4",children:[p.jsx(nt,{className:"h-12 w-64"}),p.jsx(nt,{className:"h-96 w-full"})]}):n||!t?p.jsxs(Se,{children:[p.jsxs(kr,{children:[p.jsx(Cr,{children:"Error"}),p.jsx(nn,{children:"Failed to load run"})]}),p.jsx(Oe,{children:p.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-start justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),p.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),p.jsx(Rr,{variant:phe[t.status],children:t.status})]}),p.jsxs(Jx,{value:o,onValueChange:s,children:[p.jsxs(Zx,{children:[p.jsx(cc,{value:"overview",children:"Overview"}),p.jsx(cc,{value:"traces",children:"Traces"})]}),p.jsxs(fc,{value:"overview",className:"space-y-4",children:[p.jsx(Se,{children:p.jsxs(Oe,{className:"p-4",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),p.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[v&&p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:p.jsxs("button",{onClick:x,disabled:y,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[p.jsx(hF,{className:"h-3.5 w-3.5"}),h.file_name]})})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((w=t.aggregatedTokens)==null?void 0:w.totalTokens)!==void 0&&t.aggregatedTokens.totalTokens>0?p.jsxs(p.Fragment,{children:[Number(t.aggregatedTokens.totalTokens).toLocaleString(),p.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.aggregatedTokens.inputTokens||0).toLocaleString(),"↓ ",Number(t.aggregatedTokens.outputTokens||0).toLocaleString(),"↑)"]})]}):p.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:t.duration!==void 0&&t.duration>0?`${t.duration.toFixed(2)}s`:p.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),p.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:Vo(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(O=>O!=="execution_result").length>0&&p.jsxs("div",{className:"mt-5 pt-5 border-t",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),p.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([O])=>O!=="execution_result").map(([O,P])=>p.jsxs("div",{className:"break-words",children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof P=="string"?P:JSON.stringify(P)})]},O))})]})]})}),p.jsx(Se,{children:p.jsxs(Oe,{className:"p-4",children:[p.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),c?p.jsx(nt,{className:"h-32 w-full"}):l.length===0?p.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):p.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:l.map(O=>p.jsxs("div",{children:[p.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:O.key}),p.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:O.value})]},O.id))})]})})]}),p.jsx(fc,{value:"traces",children:f?p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:p.jsx(nt,{className:"h-64 w-full"})})}):d?p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:p.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",d.message]})})}):u&&u.length>0?p.jsx(Tfe,{spans:u}):p.jsx(Se,{children:p.jsx(Oe,{className:"p-4",children:p.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),p.jsx(hhe,{open:i,onOpenChange:a,artifactContent:g,isLoading:y,error:b,title:"Artifact Content"})]})}function vhe(){return p.jsxs("div",{className:"space-y-4",children:[p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiment artifacts"})]})}),p.jsx(Se,{className:"border-0 shadow-sm",children:p.jsx(Oe,{className:"p-8",children:p.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"Artifacts feature coming soon"})})})]})}function yhe(){const[e,t]=A.useState(null),[r,n]=A.useState(!0),[i,a]=A.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=Ac(),l=sT();return A.useEffect(()=>{async function u(){try{const c=await vL(),f=localStorage.getItem("alphatrion_user_id");f&&f!==c&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",c);const d=await Mr(Ir.getUser,{id:c});if(!d.user)throw new Error(`User with ID ${c} not found`);t(d.user);const h=await Mr(Ir.listTeams,{userId:c});if(h.teams&&h.teams.length>0){const v=`alphatrion_selected_team_${c}`,m=localStorage.getItem(v);let g;m&&h.teams.find(b=>b.id===m)?g=m:g=h.teams[0].id,s(g,c)}}catch(c){console.error("Failed to initialize app:",c),a(c)}finally{n(!1)}}u()},[s,l]),r?p.jsx("div",{className:"flex h-screen items-center justify-center",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),p.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?p.jsx("div",{className:"flex h-screen items-center justify-center",children:p.jsxs("div",{className:"text-center max-w-md",children:[p.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),p.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),p.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),p.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[p.jsx("li",{children:"• The user ID exists in the database"}),p.jsx("li",{children:"• The backend server is running"}),p.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?p.jsx("div",{className:"h-full",children:p.jsx(q3,{user:e,children:p.jsx(eL,{children:p.jsxs(Ur,{path:"/",element:p.jsx(j5,{}),children:[p.jsx(Ur,{index:!0,element:p.jsx(nfe,{})}),p.jsxs(Ur,{path:"experiments",children:[p.jsx(Ur,{index:!0,element:p.jsx(ufe,{})}),p.jsx(Ur,{path:":id",element:p.jsx(bfe,{})}),p.jsx(Ur,{path:"compare",element:p.jsx(Ofe,{})})]}),p.jsxs(Ur,{path:"runs",children:[p.jsx(Ur,{index:!0,element:p.jsx(Afe,{})}),p.jsx(Ur,{path:":id",element:p.jsx(mhe,{})})]}),p.jsx(Ur,{path:"artifacts",element:p.jsx(vhe,{})})]})})})}):null}Tv.createRoot(document.getElementById("root")).render(p.jsx(C.StrictMode,{children:p.jsx(YD,{client:hL,children:p.jsx(lL,{children:p.jsx(pL,{children:p.jsx(yhe,{})})})})}));export{Kc as c,Ae as g,hre as p,A as r}; diff --git a/dashboard/static/assets/react-plotly-DGe6pNjt.js b/dashboard/static/assets/react-plotly-CgH1OFjy.js similarity index 99% rename from dashboard/static/assets/react-plotly-DGe6pNjt.js rename to dashboard/static/assets/react-plotly-CgH1OFjy.js index fb7e56d0..2d0f67cd 100644 --- a/dashboard/static/assets/react-plotly-DGe6pNjt.js +++ b/dashboard/static/assets/react-plotly-CgH1OFjy.js @@ -1,4 +1,4 @@ -import{r as FD,p as OD,c as BD,g as ND}from"./index-CZV_pqRz.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` +import{r as FD,p as OD,c as BD,g as ND}from"./index-Cimlr8QB.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` ]`),vt=de.charCodeAt(0);function mt(Ir,Lr,Zr){arguments.length<3&&(Zr=Lr,Lr=null);var ia=xr(Ir,Pe,Lr==null?Tt:qt(Lr),Zr);return ia.row=function(la){return arguments.length?ia.response((Lr=la)==null?Tt:qt(la)):Lr},ia}function Tt(Ir){return mt.parse(Ir.responseText)}function qt(Ir){return function(Lr){return mt.parse(Lr.responseText,Ir)}}mt.parse=function(Ir,Lr){var Zr;return mt.parseRows(Ir,function(ia,la){if(Zr)return Zr(ia,la-1);var an=function(da){for(var La={},Oa=ia.length,Qa=0;Qa=an)return ia;if(Qa)return Qa=!1,Zr;var Ln=da;if(Ir.charCodeAt(Ln)===34){for(var oi=Ln;oi++24?(isFinite(Pe)&&(clearTimeout(ha),ha=setTimeout(Xn,Pe)),Wr=0):(Wr=1,Un(Xn))}h.timer.flush=function(){ni(),di()};function ni(){for(var de=Date.now(),Pe=xa;Pe;)de>=Pe.t&&Pe.c(de-Pe.t)&&(Pe.c=null),Pe=Pe.n;return de}function di(){for(var de,Pe=xa,Ke=1/0;Pe;)Pe.c?(Pe.t=0;--Vt)da.push(mt[Ir[Zr[Vt]][2]]);for(Vt=+la;Vt1&&xt(de[Ke[vt-2]],de[Ke[vt-1]],de[mt])<=0;)--vt;Ke[vt++]=mt}return Ke.slice(0,vt)}function to(de,Pe){return de[0]-Pe[0]||de[1]-Pe[1]}h.geom.polygon=function(de){return V(de,Gi),de};var Gi=h.geom.polygon.prototype=[];Gi.area=function(){for(var de=-1,Pe=this.length,Ke,vt=this[Pe-1],mt=0;++deWe)Vt=Vt.L;else if(qt=Pe-hi(Vt,Ke),qt>We){if(!Vt.R){vt=Vt;break}Vt=Vt.R}else{Tt>-We?(vt=Vt.P,mt=Vt):qt>-We?(vt=Vt,mt=Vt.N):vt=mt=Vt;break}var or=rs(de);if(Bo.insert(vt,or),!(!vt&&!mt)){if(vt===mt){as(vt),mt=rs(vt.site),Bo.insert(or,mt),or.edge=mt.edge=Rs(vt.site,or.site),qo(vt),qo(mt);return}if(!mt){or.edge=Rs(vt.site,or.site);return}as(vt),as(mt);var Ir=vt.site,Lr=Ir.x,Zr=Ir.y,ia=de.x-Lr,la=de.y-Zr,an=mt.site,da=an.x-Lr,La=an.y-Zr,Oa=2*(ia*La-la*da),Qa=ia*ia+la*la,on=da*da+La*La,Fa={x:(La*Qa-la*on)/Oa+Lr,y:(ia*on-da*Qa)/Oa+Zr};Ii(mt.edge,Ir,an,Fa),or.edge=Rs(Ir,de,null,Fa),mt.edge=Rs(de,an,null,Fa),qo(vt),qo(mt)}}function Fn(de,Pe){var Ke=de.site,vt=Ke.x,mt=Ke.y,Tt=mt-Pe;if(!Tt)return vt;var qt=de.P;if(!qt)return-1/0;Ke=qt.site;var Vt=Ke.x,or=Ke.y,Ir=or-Pe;if(!Ir)return Vt;var Lr=Vt-vt,Zr=1/Tt-1/Ir,ia=Lr/Ir;return Zr?(-ia+Math.sqrt(ia*ia-2*Zr*(Lr*Lr/(-2*Ir)-or+Ir/2+mt-Tt/2)))/Zr+vt:(vt+Vt)/2}function hi(de,Pe){var Ke=de.N;if(Ke)return Fn(Ke,Pe);var vt=de.site;return vt.y===Pe?vt.x:1/0}function _s(de){this.site=de,this.edges=[]}_s.prototype.prepare=function(){for(var de=this.edges,Pe=de.length,Ke;Pe--;)Ke=de[Pe].edge,(!Ke.b||!Ke.a)&&de.splice(Pe,1);return de.sort(Fi),de.length};function Po(de){for(var Pe=de[0][0],Ke=de[1][0],vt=de[0][1],mt=de[1][1],Tt,qt,Vt,or,Ir=Vo,Lr=Ir.length,Zr,ia,la,an,da,La;Lr--;)if(Zr=Ir[Lr],!(!Zr||!Zr.prepare()))for(la=Zr.edges,an=la.length,ia=0;iaWe||l(or-qt)>We)&&(la.splice(ia,0,new Xs(Ds(Zr.site,La,l(Vt-Pe)We?{x:Pe,y:l(Tt-Pe)We?{x:l(qt-mt)We?{x:Ke,y:l(Tt-Ke)We?{x:l(qt-vt)=-Ae)){var ia=or*or+Ir*Ir,la=Lr*Lr+La*La,an=(La*ia-Ir*la)/Zr,da=(or*la-Lr*ia)/Zr,La=da+Vt,Oa=_i.pop()||new Ts;Oa.arc=de,Oa.site=mt,Oa.x=an+qt,Oa.y=La+Math.sqrt(an*an+da*da),Oa.cy=La,de.circle=Oa;for(var Qa=null,on=Zi._;on;)if(Oa.y0)){if(da/=la,la<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=Ke-Vt,!(!la&&da<0)){if(da/=la,la<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(la>0){if(da0)){if(da/=an,an<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=vt-or,!(!an&&da<0)){if(da/=an,an<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(an>0){if(da0&&(mt.a={x:Vt+Zr*la,y:or+Zr*an}),ia<1&&(mt.b={x:Vt+ia*la,y:or+ia*an}),mt}}}}}}function ci(de){for(var Pe=ji,Ke=al(de[0][0],de[0][1],de[1][0],de[1][1]),vt=Pe.length,mt;vt--;)mt=Pe[vt],(!mo(mt,de)||!Ke(mt)||l(mt.a.x-mt.b.x)=Tt)return;if(Lr>ia){if(!vt)vt={x:an,y:qt};else if(vt.y>=Vt)return;Ke={x:an,y:Vt}}else{if(!vt)vt={x:an,y:Vt};else if(vt.y1)if(Lr>ia){if(!vt)vt={x:(qt-Oa)/La,y:qt};else if(vt.y>=Vt)return;Ke={x:(Vt-Oa)/La,y:Vt}}else{if(!vt)vt={x:(Vt-Oa)/La,y:Vt};else if(vt.y=Tt)return;Ke={x:Tt,y:La*Tt+Oa}}else{if(!vt)vt={x:Tt,y:La*Tt+Oa};else if(vt.x=Lr&&Oa.x<=ia&&Oa.y>=Zr&&Oa.y<=la?[[Lr,la],[ia,la],[ia,Zr],[Lr,Zr]]:[];Qa.point=or[da]}),Ir}function Vt(or){return or.map(function(Ir,Lr){return{x:Math.round(vt(Ir,Lr)/We)*We,y:Math.round(mt(Ir,Lr)/We)*We,i:Lr}})}return qt.links=function(or){return wl(Vt(or)).edges.filter(function(Ir){return Ir.l&&Ir.r}).map(function(Ir){return{source:or[Ir.l.i],target:or[Ir.r.i]}})},qt.triangles=function(or){var Ir=[];return wl(Vt(or)).cells.forEach(function(Lr,Zr){for(var ia=Lr.site,la=Lr.edges.sort(Fi),an=-1,da=la.length,La,Oa=la[da-1].edge,Qa=Oa.l===ia?Oa.r:Oa.l;++anon&&(on=Lr.x),Lr.y>Fa&&(Fa=Lr.y),la.push(Lr.x),an.push(Lr.y);else for(da=0;daon&&(on=Ln),oi>Fa&&(Fa=oi),la.push(Ln),an.push(oi)}var Kn=on-Oa,ai=Fa-Qa;Kn>ai?Fa=Qa+Kn:on=Oa+ai;function Ti(Pi,oo,$o,hl,js,pi,ko,Xo){if(!(isNaN($o)||isNaN(hl)))if(Pi.leaf){var Os=Pi.x,Ms=Pi.y;if(Os!=null)if(l(Os-$o)+l(Ms-hl)<.01)ki(Pi,oo,$o,hl,js,pi,ko,Xo);else{var Zl=Pi.point;Pi.x=Pi.y=Pi.point=null,ki(Pi,Zl,Os,Ms,js,pi,ko,Xo),ki(Pi,oo,$o,hl,js,pi,ko,Xo)}else Pi.x=$o,Pi.y=hl,Pi.point=oo}else ki(Pi,oo,$o,hl,js,pi,ko,Xo)}function ki(Pi,oo,$o,hl,js,pi,ko,Xo){var Os=(js+ko)*.5,Ms=(pi+Xo)*.5,Zl=$o>=Os,gs=hl>=Ms,Bs=gs<<1|Zl;Pi.leaf=!1,Pi=Pi.nodes[Bs]||(Pi.nodes[Bs]=ds()),Zl?js=Os:ko=Os,gs?pi=Ms:Xo=Ms,Ti(Pi,oo,$o,hl,js,pi,ko,Xo)}var Go=ds();if(Go.add=function(Pi){Ti(Go,Pi,+Zr(Pi,++da),+ia(Pi,da),Oa,Qa,on,Fa)},Go.visit=function(Pi){Jl(Pi,Go,Oa,Qa,on,Fa)},Go.find=function(Pi){return Nc(Go,Pi[0],Pi[1],Oa,Qa,on,Fa)},da=-1,Pe==null){for(;++daTt||ia>qt||la=Ln,ai=Ke>=oi,Ti=ai<<1|Kn,ki=Ti+4;TiKe&&(Tt=Pe.slice(Ke,Tt),Vt[qt]?Vt[qt]+=Tt:Vt[++qt]=Tt),(vt=vt[0])===(mt=mt[0])?Vt[qt]?Vt[qt]+=mt:Vt[++qt]=mt:(Vt[++qt]=null,or.push({i:qt,x:Rl(vt,mt)})),Ke=Al.lastIndex;return Ke=0&&!(vt=h.interpolators[Ke](de,Pe)););return vt}h.interpolators=[function(de,Pe){var Ke=typeof Pe;return(Ke==="string"?Fr.has(Pe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Pe)?Il:gu:Pe instanceof Ra?Il:Array.isArray(Pe)?As:Ke==="object"&&isNaN(Pe)?Tl:Rl)(de,Pe)}],h.interpolateArray=As;function As(de,Pe){var Ke=[],vt=[],mt=de.length,Tt=Pe.length,qt=Math.min(de.length,Pe.length),Vt;for(Vt=0;Vt=0?de.slice(0,Pe):de,vt=Pe>=0?de.slice(Pe+1):"in";return Ke=Hl.get(Ke)||Uu,vt=Yu.get(vt)||F,Zs(vt(Ke.apply(null,b.call(arguments,1))))};function Zs(de){return function(Pe){return Pe<=0?0:Pe>=1?1:de(Pe)}}function df(de){return function(Pe){return 1-de(1-Pe)}}function zo(de){return function(Pe){return .5*(Pe<.5?de(2*Pe):2-de(2-2*Pe))}}function Ef(de){return de*de}function ls(de){return de*de*de}function zi(de){if(de<=0)return 0;if(de>=1)return 1;var Pe=de*de,Ke=Pe*de;return 4*(de<.5?Ke:3*(de-Pe)+Ke-.75)}function uc(de){return function(Pe){return Math.pow(Pe,de)}}function yu(de){return 1-Math.cos(de*Ue)}function dl(de){return Math.pow(2,10*(de-1))}function Uc(de){return 1-Math.sqrt(1-de*de)}function Ku(de,Pe){var Ke;return arguments.length<2&&(Pe=.45),arguments.length?Ke=Pe/pe*Math.asin(1/de):(de=1,Ke=Pe/4),function(vt){return 1+de*Math.pow(2,-10*vt)*Math.sin((vt-Ke)*pe/Pe)}}function _c(de){return de||(de=1.70158),function(Pe){return Pe*Pe*((de+1)*Pe-de)}}function Sl(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}h.interpolateHcl=lf;function lf(de,Pe){de=h.hcl(de),Pe=h.hcl(Pe);var Ke=de.h,vt=de.c,mt=de.l,Tt=Pe.h-Ke,qt=Pe.c-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.c:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return Zt(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateHsl=Wc;function Wc(de,Pe){de=h.hsl(de),Pe=h.hsl(Pe);var Ke=de.h,vt=de.s,mt=de.l,Tt=Pe.h-Ke,qt=Pe.s-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.s:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return mn(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateLab=xc;function xc(de,Pe){de=h.lab(de),Pe=h.lab(Pe);var Ke=de.l,vt=de.a,mt=de.b,Tt=Pe.l-Ke,qt=Pe.a-vt,Vt=Pe.b-mt;return function(or){return Ha(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateRound=$u;function $u(de,Pe){return Pe-=de,function(Ke){return Math.round(de+Pe*Ke)}}h.transform=function(de){var Pe=E.createElementNS(h.ns.prefix.svg,"g");return(h.transform=function(Ke){if(Ke!=null){Pe.setAttribute("transform",Ke);var vt=Pe.transform.baseVal.consolidate()}return new jc(vt?vt.matrix:ju)})(de)};function jc(de){var Pe=[de.a,de.b],Ke=[de.c,de.d],vt=_u(Pe),mt=Vc(Pe,Ke),Tt=_u(Xc(Ke,Pe,-mt))||0;Pe[0]*Ke[1]180?Pe+=360:Pe-de>180&&(de+=360),vt.push({i:Ke.push(Cu(Ke)+"rotate(",null,")")-2,x:Rl(de,Pe)})):Pe&&Ke.push(Cu(Ke)+"rotate("+Pe+")")}function qc(de,Pe,Ke,vt){de!==Pe?vt.push({i:Ke.push(Cu(Ke)+"skewX(",null,")")-2,x:Rl(de,Pe)}):Pe&&Ke.push(Cu(Ke)+"skewX("+Pe+")")}function Cs(de,Pe,Ke,vt){if(de[0]!==Pe[0]||de[1]!==Pe[1]){var mt=Ke.push(Cu(Ke)+"scale(",null,",",null,")");vt.push({i:mt-4,x:Rl(de[0],Pe[0])},{i:mt-2,x:Rl(de[1],Pe[1])})}else(Pe[0]!==1||Pe[1]!==1)&&Ke.push(Cu(Ke)+"scale("+Pe+")")}function kc(de,Pe){var Ke=[],vt=[];return de=h.transform(de),Pe=h.transform(Pe),Ml(de.translate,Pe.translate,Ke,vt),ic(de.rotate,Pe.rotate,Ke,vt),qc(de.skew,Pe.skew,Ke,vt),Cs(de.scale,Pe.scale,Ke,vt),de=Pe=null,function(mt){for(var Tt=-1,qt=vt.length,Vt;++Tt0?Tt=Fa:(Ke.c=null,Ke.t=NaN,Ke=null,Pe.end({type:"end",alpha:Tt=0})):Fa>0&&(Pe.start({type:"start",alpha:Tt=Fa}),Ke=en(de.tick)),de):Tt},de.start=function(){var Fa,Ln=la.length,oi=an.length,Kn=vt[0],ai=vt[1],Ti,ki;for(Fa=0;Fa=0;)Tt.push(Lr=Ir[or]),Lr.parent=Vt,Lr.depth=Vt.depth+1;Ke&&(Vt.value=0),Vt.children=Ir}else Ke&&(Vt.value=+Ke.call(vt,Vt,Vt.depth)||0),delete Vt.children;return Lu(mt,function(Zr){var ia,la;de&&(ia=Zr.children)&&ia.sort(de),Ke&&(la=Zr.parent)&&(la.value+=Zr.value)}),qt}return vt.sort=function(mt){return arguments.length?(de=mt,vt):de},vt.children=function(mt){return arguments.length?(Pe=mt,vt):Pe},vt.value=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt.revalue=function(mt){return Ke&&(cc(mt,function(Tt){Tt.children&&(Tt.value=0)}),Lu(mt,function(Tt){var qt;Tt.children||(Tt.value=+Ke.call(vt,Tt,Tt.depth)||0),(qt=Tt.parent)&&(qt.value+=Tt.value)})),mt},vt};function Ys(de,Pe){return h.rebind(de,Pe,"sort","children","value"),de.nodes=de,de.links=Df,de}function cc(de,Pe){for(var Ke=[de];(de=Ke.pop())!=null;)if(Pe(de),(mt=de.children)&&(vt=mt.length))for(var vt,mt;--vt>=0;)Ke.push(mt[vt])}function Lu(de,Pe){for(var Ke=[de],vt=[];(de=Ke.pop())!=null;)if(vt.push(de),(qt=de.children)&&(Tt=qt.length))for(var mt=-1,Tt,qt;++mtmt&&(mt=Vt),vt.push(Vt)}for(qt=0;qtvt&&(Ke=Pe,vt=mt);return Ke}function ru(de){return de.reduce(xu,0)}function xu(de,Pe){return de+Pe[1]}h.layout.histogram=function(){var de=!0,Pe=Number,Ke=wc,vt=Gc;function mt(Tt,ia){for(var Vt=[],or=Tt.map(Pe,this),Ir=Ke.call(this,or,ia),Lr=vt.call(this,Ir,or,ia),Zr,ia=-1,la=or.length,an=Lr.length-1,da=de?1:1/la,La;++ia0)for(ia=-1;++ia=Ir[0]&&La<=Ir[1]&&(Zr=Vt[h.bisect(Lr,La,1,an)-1],Zr.y+=da,Zr.push(Tt[ia]));return Vt}return mt.value=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.range=function(Tt){return arguments.length?(Ke=pt(Tt),mt):Ke},mt.bins=function(Tt){return arguments.length?(vt=typeof Tt=="number"?function(qt){return Ws(qt,Tt)}:pt(Tt),mt):vt},mt.frequency=function(Tt){return arguments.length?(de=!!Tt,mt):de},mt};function Gc(de,Pe){return Ws(de,Math.ceil(Math.log(Pe.length)/Math.LN2+1))}function Ws(de,Pe){for(var Ke=-1,vt=+de[0],mt=(de[1]-vt)/Pe,Tt=[];++Ke<=Pe;)Tt[Ke]=mt*Ke+vt;return Tt}function wc(de){return[h.min(de),h.max(de)]}h.layout.pack=function(){var de=h.layout.hierarchy().sort(ec),Pe=0,Ke=[1,1],vt;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir=Ke[0],Lr=Ke[1],Zr=vt==null?Math.sqrt:typeof vt=="function"?vt:function(){return vt};if(or.x=or.y=0,Lu(or,function(la){la.r=+Zr(la.value)}),Lu(or,Ac),Pe){var ia=Pe*(vt?1:Math.max(2*or.r/Ir,2*or.r/Lr))/2;Lu(or,function(la){la.r+=ia}),Lu(or,Ac),Lu(or,function(la){la.r-=ia})}return Jc(or,Ir/2,Lr/2,vt?1:1/Math.max(2*or.r/Ir,2*or.r/Lr)),Vt}return mt.size=function(Tt){return arguments.length?(Ke=Tt,mt):Ke},mt.radius=function(Tt){return arguments.length?(vt=Tt==null||typeof Tt=="function"?Tt:+Tt,mt):vt},mt.padding=function(Tt){return arguments.length?(Pe=+Tt,mt):Pe},Ys(mt,de)};function ec(de,Pe){return de.value-Pe.value}function fu(de,Pe){var Ke=de._pack_next;de._pack_next=Pe,Pe._pack_prev=de,Pe._pack_next=Ke,Ke._pack_prev=Pe}function Tc(de,Pe){de._pack_next=Pe,Pe._pack_prev=de}function Pu(de,Pe){var Ke=Pe.x-de.x,vt=Pe.y-de.y,mt=de.r+Pe.r;return .999*mt*mt>Ke*Ke+vt*vt}function Ac(de){if(!(Pe=de.children)||!(ia=Pe.length))return;var Pe,Ke=1/0,vt=-1/0,mt=1/0,Tt=-1/0,qt,Vt,or,Ir,Lr,Zr,ia;function la(Fa){Ke=Math.min(Fa.x-Fa.r,Ke),vt=Math.max(Fa.x+Fa.r,vt),mt=Math.min(Fa.y-Fa.r,mt),Tt=Math.max(Fa.y+Fa.r,Tt)}if(Pe.forEach(gf),qt=Pe[0],qt.x=-qt.r,qt.y=0,la(qt),ia>1&&(Vt=Pe[1],Vt.x=Vt.r,Vt.y=0,la(Vt),ia>2))for(or=Pe[2],hu(qt,Vt,or),la(or),fu(qt,or),qt._pack_prev=or,fu(or,Vt),Vt=qt._pack_next,Ir=3;IrLa.x&&(La=Ln),Ln.depth>Oa.depth&&(Oa=Ln)});var Qa=Pe(da,La)/2-da.x,on=Ke[0]/(La.x+Pe(La,da)/2+Qa),Fa=Ke[1]/(Oa.depth||1);cc(la,function(Ln){Ln.x=(Ln.x+Qa)*on,Ln.y=Ln.depth*Fa})}return ia}function Tt(Lr){for(var Zr={A:null,children:[Lr]},ia=[Zr],la;(la=ia.pop())!=null;)for(var an=la.children,da,La=0,Oa=an.length;La0&&(Wl(tc(da,Lr,ia),Lr,Ln),Oa+=Ln,Qa+=Ln),on+=da.m,Oa+=la.m,Fa+=La.m,Qa+=an.m;da&&!nl(an)&&(an.t=da,an.m+=on-Qa),la&&!Iu(La)&&(La.t=la,La.m+=Oa-Fa,ia=Lr)}return ia}function Ir(Lr){Lr.x*=Ke[0],Lr.y=Lr.depth*Ke[1]}return mt.separation=function(Lr){return arguments.length?(Pe=Lr,mt):Pe},mt.size=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?Ir:null,mt):vt?null:Ke},mt.nodeSize=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?null:Ir,mt):vt?Ke:null},Ys(mt,de)};function qu(de,Pe){return de.parent==Pe.parent?1:2}function Iu(de){var Pe=de.children;return Pe.length?Pe[0]:de.t}function nl(de){var Pe=de.children,Ke;return(Ke=Pe.length)?Pe[Ke-1]:de.t}function Wl(de,Pe,Ke){var vt=Ke/(Pe.i-de.i);Pe.c-=vt,Pe.s+=Ke,de.c+=vt,Pe.z+=Ke,Pe.m+=Ke}function Js(de){for(var Pe=0,Ke=0,vt=de.children,mt=vt.length,Tt;--mt>=0;)Tt=vt[mt],Tt.z+=Pe,Tt.m+=Pe,Pe+=Tt.s+(Ke+=Tt.c)}function tc(de,Pe,Ke){return de.a.parent===Pe.parent?de.a:Ke}h.layout.cluster=function(){var de=h.layout.hierarchy().sort(null).value(null),Pe=qu,Ke=[1,1],vt=!1;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir,Lr=0;Lu(or,function(da){var La=da.children;La&&La.length?(da.x=Hc(La),da.y=Ru(La)):(da.x=Ir?Lr+=Pe(da,Ir):0,da.y=0,Ir=da)});var Zr=Jt(or),ia=yr(or),la=Zr.x-Pe(Zr,ia)/2,an=ia.x+Pe(ia,Zr)/2;return Lu(or,vt?function(da){da.x=(da.x-or.x)*Ke[0],da.y=(or.y-da.y)*Ke[1]}:function(da){da.x=(da.x-la)/(an-la)*Ke[0],da.y=(1-(or.y?da.y/or.y:1))*Ke[1]}),Vt}return mt.separation=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.size=function(Tt){return arguments.length?(vt=(Ke=Tt)==null,mt):vt?null:Ke},mt.nodeSize=function(Tt){return arguments.length?(vt=(Ke=Tt)!=null,mt):vt?Ke:null},Ys(mt,de)};function Ru(de){return 1+h.max(de,function(Pe){return Pe.y})}function Hc(de){return de.reduce(function(Pe,Ke){return Pe+Ke.x},0)/de.length}function Jt(de){var Pe=de.children;return Pe&&Pe.length?Jt(Pe[0]):de}function yr(de){var Pe=de.children,Ke;return Pe&&(Ke=Pe.length)?yr(Pe[Ke-1]):de}h.layout.treemap=function(){var de=h.layout.hierarchy(),Pe=Math.round,Ke=[1,1],vt=null,mt=Kr,Tt=!1,qt,Vt="squarify",or=.5*(1+Math.sqrt(5));function Ir(da,La){for(var Oa=-1,Qa=da.length,on,Fa;++Oa0;)Qa.push(Fa=on[ai-1]),Qa.area+=Fa.area,Vt!=="squarify"||(oi=ia(Qa,Kn))<=Ln?(on.pop(),Ln=oi):(Qa.area-=Qa.pop().area,la(Qa,Kn,Oa,!1),Kn=Math.min(Oa.dx,Oa.dy),Qa.length=Qa.area=0,Ln=1/0);Qa.length&&(la(Qa,Kn,Oa,!0),Qa.length=Qa.area=0),La.forEach(Lr)}}function Zr(da){var La=da.children;if(La&&La.length){var Oa=mt(da),Qa=La.slice(),on,Fa=[];for(Ir(Qa,Oa.dx*Oa.dy/da.value),Fa.area=0;on=Qa.pop();)Fa.push(on),Fa.area+=on.area,on.z!=null&&(la(Fa,on.z?Oa.dx:Oa.dy,Oa,!Qa.length),Fa.length=Fa.area=0);La.forEach(Zr)}}function ia(da,La){for(var Oa=da.area,Qa,on=0,Fa=1/0,Ln=-1,oi=da.length;++Lnon&&(on=Qa));return Oa*=Oa,La*=La,Oa?Math.max(La*on*or/Oa,Oa/(La*Fa*or)):1/0}function la(da,La,Oa,Qa){var on=-1,Fa=da.length,Ln=Oa.x,oi=Oa.y,Kn=La?Pe(da.area/La):0,ai;if(La==Oa.dx){for((Qa||Kn>Oa.dy)&&(Kn=Oa.dy);++onOa.dx)&&(Kn=Oa.dx);++on1);return de+Pe*vt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var de=h.random.normal.apply(h,arguments);return function(){return Math.exp(de())}},bates:function(de){var Pe=h.random.irwinHall(de);return function(){return Pe()/de}},irwinHall:function(de){return function(){for(var Pe=0,Ke=0;Ke2?gn:Ya,Ir=vt?Zc:pf;return mt=or(de,Pe,Ir,Ke),Tt=or(Pe,de,Ir,No),Vt}function Vt(or){return mt(or)}return Vt.invert=function(or){return Tt(or)},Vt.domain=function(or){return arguments.length?(de=or.map(Number),qt()):de},Vt.range=function(or){return arguments.length?(Pe=or,qt()):Pe},Vt.rangeRound=function(or){return Vt.range(or).interpolate($u)},Vt.clamp=function(or){return arguments.length?(vt=or,qt()):vt},Vt.interpolate=function(or){return arguments.length?(Ke=or,qt()):Ke},Vt.ticks=function(or){return Ui(de,or)},Vt.tickFormat=function(or,Ir){return d3_scale_linearTickFormat(de,or,Ir)},Vt.nice=function(or){return vn(de,or),qt()},Vt.copy=function(){return qn(de,Pe,Ke,vt)},qt()}function Sn(de,Pe){return h.rebind(de,Pe,"range","rangeRound","interpolate","clamp")}function vn(de,Pe){return En(de,Rn(ii(de,Pe)[2])),En(de,Rn(ii(de,Pe)[2])),de}function ii(de,Pe){Pe==null&&(Pe=10);var Ke=pa(de),vt=Ke[1]-Ke[0],mt=Math.pow(10,Math.floor(Math.log(vt/Pe)/Math.LN10)),Tt=Pe/vt*mt;return Tt<=.15?mt*=10:Tt<=.35?mt*=5:Tt<=.75&&(mt*=2),Ke[0]=Math.ceil(Ke[0]/mt)*mt,Ke[1]=Math.floor(Ke[1]/mt)*mt+mt*.5,Ke[2]=mt,Ke}function Ui(de,Pe){return h.range.apply(h,ii(de,Pe))}h.scale.log=function(){return Di(h.scale.linear().domain([0,1]),10,!0,[1,10])};function Di(de,Pe,Ke,vt){function mt(Vt){return(Ke?Math.log(Vt<0?0:Vt):-Math.log(Vt>0?0:-Vt))/Math.log(Pe)}function Tt(Vt){return Ke?Math.pow(Pe,Vt):-Math.pow(Pe,-Vt)}function qt(Vt){return de(mt(Vt))}return qt.invert=function(Vt){return Tt(de.invert(Vt))},qt.domain=function(Vt){return arguments.length?(Ke=Vt[0]>=0,de.domain((vt=Vt.map(Number)).map(mt)),qt):vt},qt.base=function(Vt){return arguments.length?(Pe=+Vt,de.domain(vt.map(mt)),qt):Pe},qt.nice=function(){var Vt=En(vt.map(mt),Ke?Math:Hi);return de.domain(Vt),vt=Vt.map(Tt),qt},qt.ticks=function(){var Vt=pa(vt),or=[],Ir=Vt[0],Lr=Vt[1],Zr=Math.floor(mt(Ir)),ia=Math.ceil(mt(Lr)),la=Pe%1?2:Pe;if(isFinite(ia-Zr)){if(Ke){for(;Zr0;an--)or.push(Tt(Zr)*an);for(Zr=0;or[Zr]Lr;ia--);or=or.slice(Zr,ia)}return or},qt.copy=function(){return Di(de.copy(),Pe,Ke,vt)},Sn(qt,de)}var Hi={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};h.scale.pow=function(){return Vi(h.scale.linear(),1,[0,1])};function Vi(de,Pe,Ke){var vt=si(Pe),mt=si(1/Pe);function Tt(qt){return de(vt(qt))}return Tt.invert=function(qt){return mt(de.invert(qt))},Tt.domain=function(qt){return arguments.length?(de.domain((Ke=qt.map(Number)).map(vt)),Tt):Ke},Tt.ticks=function(qt){return Ui(Ke,qt)},Tt.tickFormat=function(qt,Vt){return d3_scale_linearTickFormat(Ke,qt,Vt)},Tt.nice=function(qt){return Tt.domain(vn(Ke,qt))},Tt.exponent=function(qt){return arguments.length?(vt=si(Pe=qt),mt=si(1/Pe),de.domain(Ke.map(vt)),Tt):Pe},Tt.copy=function(){return Vi(de.copy(),Pe,Ke)},Sn(Tt,de)}function si(de){return function(Pe){return Pe<0?-Math.pow(-Pe,de):Math.pow(Pe,de)}}h.scale.sqrt=function(){return h.scale.pow().exponent(.5)},h.scale.ordinal=function(){return Zn([],{t:"range",a:[[]]})};function Zn(de,Pe){var Ke,vt,mt;function Tt(Vt){return vt[((Ke.get(Vt)||(Pe.t==="range"?Ke.set(Vt,de.push(Vt)):NaN))-1)%vt.length]}function qt(Vt,or){return h.range(de.length).map(function(Ir){return Vt+or*Ir})}return Tt.domain=function(Vt){if(!arguments.length)return de;de=[],Ke=new A;for(var or=-1,Ir=Vt.length,Lr;++or0?Ke[Tt-1]:de[0],Ttia?0:1;if(Lr=Te)return or(Lr,an)+(Ir?or(Ir,1-an):"")+"Z";var da,La,Oa,Qa,on=0,Fa=0,Ln,oi,Kn,ai,Ti,ki,Go,Pi,oo=[];if((Qa=(+qt.apply(this,arguments)||0)/2)&&(Oa=vt===Ps?Math.sqrt(Ir*Ir+Lr*Lr):+vt.apply(this,arguments),an||(Fa*=-1),Lr&&(Fa=Mt(Oa/Lr*Math.sin(Qa))),Ir&&(on=Mt(Oa/Ir*Math.sin(Qa)))),Lr){Ln=Lr*Math.cos(Zr+Fa),oi=Lr*Math.sin(Zr+Fa),Kn=Lr*Math.cos(ia-Fa),ai=Lr*Math.sin(ia-Fa);var $o=Math.abs(ia-Zr-2*Fa)<=ge?0:1;if(Fa&&ql(Ln,oi,Kn,ai)===an^$o){var hl=(Zr+ia)/2;Ln=Lr*Math.cos(hl),oi=Lr*Math.sin(hl),Kn=ai=null}}else Ln=oi=0;if(Ir){Ti=Ir*Math.cos(ia-on),ki=Ir*Math.sin(ia-on),Go=Ir*Math.cos(Zr+on),Pi=Ir*Math.sin(Zr+on);var js=Math.abs(Zr-ia+2*on)<=ge?0:1;if(on&&ql(Ti,ki,Go,Pi)===1-an^js){var pi=(Zr+ia)/2;Ti=Ir*Math.cos(pi),ki=Ir*Math.sin(pi),Go=Pi=null}}else Ti=ki=0;if(la>We&&(da=Math.min(Math.abs(Lr-Ir)/2,+Ke.apply(this,arguments)))>.001){La=Ir0?0:1}function Xl(de,Pe,Ke,vt,mt){var Tt=de[0]-Pe[0],qt=de[1]-Pe[1],Vt=(mt?vt:-vt)/Math.sqrt(Tt*Tt+qt*qt),or=Vt*qt,Ir=-Vt*Tt,Lr=de[0]+or,Zr=de[1]+Ir,ia=Pe[0]+or,la=Pe[1]+Ir,an=(Lr+ia)/2,da=(Zr+la)/2,La=ia-Lr,Oa=la-Zr,Qa=La*La+Oa*Oa,on=Ke-vt,Fa=Lr*la-ia*Zr,Ln=(Oa<0?-1:1)*Math.sqrt(Math.max(0,on*on*Qa-Fa*Fa)),oi=(Fa*Oa-La*Ln)/Qa,Kn=(-Fa*La-Oa*Ln)/Qa,ai=(Fa*Oa+La*Ln)/Qa,Ti=(-Fa*La+Oa*Ln)/Qa,ki=oi-an,Go=Kn-da,Pi=ai-an,oo=Ti-da;return ki*ki+Go*Go>Pi*Pi+oo*oo&&(oi=ai,Kn=Ti),[[oi-or,Kn-Ir],[oi*Ke/on,Kn*Ke/on]]}function oc(){return!0}function Gl(de){var Pe=vi,Ke=Ei,vt=oc,mt=ll,Tt=mt.key,qt=.7;function Vt(or){var Ir=[],Lr=[],Zr=-1,ia=or.length,la,an=pt(Pe),da=pt(Ke);function La(){Ir.push("M",mt(de(Lr),qt))}for(;++Zr1?de.join("L"):de+"Z"}function Hu(de){return de.join("L")+"Z"}function Wi(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1&&mt.push("H",vt[0]),mt.join("")}function no(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1){Vt=Pe[1],Tt=de[or],or++,vt+="C"+(mt[0]+qt[0])+","+(mt[1]+qt[1])+","+(Tt[0]-Vt[0])+","+(Tt[1]-Vt[1])+","+Tt[0]+","+Tt[1];for(var Ir=2;Ir9&&(Tt=Ke*3/Math.sqrt(Tt),qt[Vt]=Tt*vt,qt[Vt+1]=Tt*mt));for(Vt=-1;++Vt<=or;)Tt=(de[Math.min(or,Vt+1)][0]-de[Math.max(0,Vt-1)][0])/(6*(1+qt[Vt]*qt[Vt])),Pe.push([Tt||0,qt[Vt]*Tt||0]);return Pe}function Ye(de){return de.length<3?ll(de):de[0]+P(de,Ve(de))}h.svg.line.radial=function(){var de=Gl(it);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function it(de){for(var Pe,Ke=-1,vt=de.length,mt,Tt;++Kege)+",1 "+Zr}function Ir(Lr,Zr,ia,la){return"Q 0,0 "+la}return Tt.radius=function(Lr){return arguments.length?(Ke=pt(Lr),Tt):Ke},Tt.source=function(Lr){return arguments.length?(de=pt(Lr),Tt):de},Tt.target=function(Lr){return arguments.length?(Pe=pt(Lr),Tt):Pe},Tt.startAngle=function(Lr){return arguments.length?(vt=pt(Lr),Tt):vt},Tt.endAngle=function(Lr){return arguments.length?(mt=pt(Lr),Tt):mt},Tt};function Lt(de){return de.radius}h.svg.diagonal=function(){var de=St,Pe=yt,Ke=nr;function vt(mt,Tt){var qt=de.call(this,mt,Tt),Vt=Pe.call(this,mt,Tt),or=(qt.y+Vt.y)/2,Ir=[qt,{x:qt.x,y:or},{x:Vt.x,y:or},Vt];return Ir=Ir.map(Ke),"M"+Ir[0]+"C"+Ir[1]+" "+Ir[2]+" "+Ir[3]}return vt.source=function(mt){return arguments.length?(de=pt(mt),vt):de},vt.target=function(mt){return arguments.length?(Pe=pt(mt),vt):Pe},vt.projection=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt};function nr(de){return[de.x,de.y]}h.svg.diagonal.radial=function(){var de=h.svg.diagonal(),Pe=nr,Ke=de.projection;return de.projection=function(vt){return arguments.length?Ke(cr(Pe=vt)):Pe},de};function cr(de){return function(){var Pe=de.apply(this,arguments),Ke=Pe[0],vt=Pe[1]-Ue;return[Ke*Math.cos(vt),Ke*Math.sin(vt)]}}h.svg.symbol=function(){var de=Pr,Pe=gr;function Ke(vt,mt){return(oa.get(de.call(this,vt,mt))||Vr)(Pe.call(this,vt,mt))}return Ke.type=function(vt){return arguments.length?(de=pt(vt),Ke):de},Ke.size=function(vt){return arguments.length?(Pe=pt(vt),Ke):Pe},Ke};function gr(){return 64}function Pr(){return"circle"}function Vr(de){var Pe=Math.sqrt(de/ge);return"M0,"+Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+-Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+Pe+"Z"}var oa=h.map({circle:Vr,cross:function(de){var Pe=Math.sqrt(de/5)/2;return"M"+-3*Pe+","+-Pe+"H"+-Pe+"V"+-3*Pe+"H"+Pe+"V"+-Pe+"H"+3*Pe+"V"+Pe+"H"+Pe+"V"+3*Pe+"H"+-Pe+"V"+Pe+"H"+-3*Pe+"Z"},diamond:function(de){var Pe=Math.sqrt(de/(2*Aa)),Ke=Pe*Aa;return"M0,"+-Pe+"L"+Ke+",0 0,"+Pe+" "+-Ke+",0Z"},square:function(de){var Pe=Math.sqrt(de)/2;return"M"+-Pe+","+-Pe+"L"+Pe+","+-Pe+" "+Pe+","+Pe+" "+-Pe+","+Pe+"Z"},"triangle-down":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+Ke+"L"+Pe+","+-Ke+" "+-Pe+","+-Ke+"Z"},"triangle-up":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+-Ke+"L"+Pe+","+Ke+" "+-Pe+","+Ke+"Z"}});h.svg.symbolTypes=oa.keys();var ca=Math.sqrt(3),Aa=Math.tan(30*Xe);Q.transition=function(de){for(var Pe=Si||++li,Ke=Wo(de),vt=[],mt,Tt,qt=yi||{time:Date.now(),ease:zi,delay:0,duration:250},Vt=-1,or=this.length;++Vt0;)Zr[--Qa].call(de,Oa);if(La>=1)return qt.event&&qt.event.end.call(de,de.__data__,Pe),--Tt.count?delete Tt[vt]:delete de[Ke],1}qt||(Vt=mt.time,or=en(ia,0,Vt),qt=Tt[vt]={tween:new A,time:Vt,timer:or,delay:mt.delay,duration:mt.duration,ease:mt.ease,index:Pe},mt=null,++Tt.count)}h.svg.axis=function(){var de=h.scale.linear(),Pe=Jo,Ke=6,vt=6,mt=3,Tt=[10],qt=null,Vt;function or(Ir){Ir.each(function(){var Lr=h.select(this),Zr=this.__chart__||de,ia=this.__chart__=de.copy(),la=qt??(ia.ticks?ia.ticks.apply(ia,Tt):ia.domain()),an=Vt??(ia.tickFormat?ia.tickFormat.apply(ia,Tt):F),da=Lr.selectAll(".tick").data(la,ia),La=da.enter().insert("g",".domain").attr("class","tick").style("opacity",We),Oa=h.transition(da.exit()).style("opacity",We).remove(),Qa=h.transition(da.order()).style("opacity",1),on=Math.max(Ke,0)+mt,Fa,Ln=Ja(ia),oi=Lr.selectAll(".domain").data([0]),Kn=(oi.enter().append("path").attr("class","domain"),h.transition(oi));La.append("line"),La.append("text");var ai=La.select("line"),Ti=Qa.select("line"),ki=da.select("text").text(an),Go=La.select("text"),Pi=Qa.select("text"),oo=Pe==="top"||Pe==="left"?-1:1,$o,hl,js,pi;if(Pe==="bottom"||Pe==="top"?(Fa=Gs,$o="x",js="y",hl="x2",pi="y2",ki.attr("dy",oo<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Ln[0]+","+oo*vt+"V0H"+Ln[1]+"V"+oo*vt)):(Fa=Mo,$o="y",js="x",hl="y2",pi="x2",ki.attr("dy",".32em").style("text-anchor",oo<0?"end":"start"),Kn.attr("d","M"+oo*vt+","+Ln[0]+"H0V"+Ln[1]+"H"+oo*vt)),ai.attr(pi,oo*Ke),Go.attr(js,oo*on),Ti.attr(hl,0).attr(pi,oo*Ke),Pi.attr($o,0).attr(js,oo*on),ia.rangeBand){var ko=ia,Xo=ko.rangeBand()/2;Zr=ia=function(Os){return ko(Os)+Xo}}else Zr.rangeBand?Zr=ia:Oa.call(Fa,ia,Zr);La.call(Fa,Zr,ia),Qa.call(Fa,ia,ia)})}return or.scale=function(Ir){return arguments.length?(de=Ir,or):de},or.orient=function(Ir){return arguments.length?(Pe=Ir in Qs?Ir+"":Jo,or):Pe},or.ticks=function(){return arguments.length?(Tt=S(arguments),or):Tt},or.tickValues=function(Ir){return arguments.length?(qt=Ir,or):qt},or.tickFormat=function(Ir){return arguments.length?(Vt=Ir,or):Vt},or.tickSize=function(Ir){var Lr=arguments.length;return Lr?(Ke=+Ir,vt=+arguments[Lr-1],or):Ke},or.innerTickSize=function(Ir){return arguments.length?(Ke=+Ir,or):Ke},or.outerTickSize=function(Ir){return arguments.length?(vt=+Ir,or):vt},or.tickPadding=function(Ir){return arguments.length?(mt=+Ir,or):mt},or.tickSubdivide=function(){return arguments.length&&or},or};var Jo="bottom",Qs={top:1,right:1,bottom:1,left:1};function Gs(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate("+(isFinite(mt)?mt:Ke(vt))+",0)"})}function Mo(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate(0,"+(isFinite(mt)?mt:Ke(vt))+")"})}h.svg.brush=function(){var de=oe(Lr,"brushstart","brush","brushend"),Pe=null,Ke=null,vt=[0,0],mt=[0,0],Tt,qt,Vt=!0,or=!0,Ir=fl[0];function Lr(da){da.each(function(){var La=h.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",an).on("touchstart.brush",an),Oa=La.selectAll(".background").data([0]);Oa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),La.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Qa=La.selectAll(".resize").data(Ir,F);Qa.exit().remove(),Qa.enter().append("g").attr("class",function(oi){return"resize "+oi}).style("cursor",function(oi){return Eo[oi]}).append("rect").attr("x",function(oi){return/[ew]$/.test(oi)?-3:null}).attr("y",function(oi){return/^[ns]/.test(oi)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Qa.style("display",Lr.empty()?"none":null);var on=h.transition(La),Fa=h.transition(Oa),Ln;Pe&&(Ln=Ja(Pe),Fa.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),ia(on)),Ke&&(Ln=Ja(Ke),Fa.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),la(on)),Zr(on)})}Lr.event=function(da){da.each(function(){var La=de.of(this,arguments),Oa={x:vt,y:mt,i:Tt,j:qt},Qa=this.__chart__||Oa;this.__chart__=Oa,Si?h.select(this).transition().each("start.brush",function(){Tt=Qa.i,qt=Qa.j,vt=Qa.x,mt=Qa.y,La({type:"brushstart"})}).tween("brush:brush",function(){var on=As(vt,Oa.x),Fa=As(mt,Oa.y);return Tt=qt=null,function(Ln){vt=Oa.x=on(Ln),mt=Oa.y=Fa(Ln),La({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Oa.i,qt=Oa.j,La({type:"brush",mode:"resize"}),La({type:"brushend"})}):(La({type:"brushstart"}),La({type:"brush",mode:"resize"}),La({type:"brushend"}))})};function Zr(da){da.selectAll(".resize").attr("transform",function(La){return"translate("+vt[+/e$/.test(La)]+","+mt[+/^s/.test(La)]+")"})}function ia(da){da.select(".extent").attr("x",vt[0]),da.selectAll(".extent,.n>rect,.s>rect").attr("width",vt[1]-vt[0])}function la(da){da.select(".extent").attr("y",mt[0]),da.selectAll(".extent,.e>rect,.w>rect").attr("height",mt[1]-mt[0])}function an(){var da=this,La=h.select(h.event.target),Oa=de.of(da,arguments),Qa=h.select(da),on=La.datum(),Fa=!/^(n|s)$/.test(on)&&Pe,Ln=!/^(e|w)$/.test(on)&&Ke,oi=La.classed("extent"),Kn=hr(da),ai,Ti=h.mouse(da),ki,Go=h.select(t(da)).on("keydown.brush",$o).on("keyup.brush",hl);if(h.event.changedTouches?Go.on("touchmove.brush",js).on("touchend.brush",ko):Go.on("mousemove.brush",js).on("mouseup.brush",ko),Qa.interrupt().selectAll("*").interrupt(),oi)Ti[0]=vt[0]-Ti[0],Ti[1]=mt[0]-Ti[1];else if(on){var Pi=+/w$/.test(on),oo=+/^n/.test(on);ki=[vt[1-Pi]-Ti[0],mt[1-oo]-Ti[1]],Ti[0]=vt[Pi],Ti[1]=mt[oo]}else h.event.altKey&&(ai=Ti.slice());Qa.style("pointer-events","none").selectAll(".resize").style("display",null),h.select("body").style("cursor",La.style("cursor")),Oa({type:"brushstart"}),js();function $o(){h.event.keyCode==32&&(oi||(ai=null,Ti[0]-=vt[1],Ti[1]-=mt[1],oi=2),ee())}function hl(){h.event.keyCode==32&&oi==2&&(Ti[0]+=vt[1],Ti[1]+=mt[1],oi=0,ee())}function js(){var Xo=h.mouse(da),Os=!1;ki&&(Xo[0]+=ki[0],Xo[1]+=ki[1]),oi||(h.event.altKey?(ai||(ai=[(vt[0]+vt[1])/2,(mt[0]+mt[1])/2]),Ti[0]=vt[+(Xo[0]0))return Wt;do Wt.push(dr=new Date(+Et)),De(Et,jt),he(Et);while(dr=Ct)for(;he(Ct),!Et(Ct);)Ct.setTime(Ct-1)},function(Ct,jt){if(Ct>=Ct)if(jt<0)for(;++jt<=0;)for(;De(Ct,-1),!Et(Ct););else for(;--jt>=0;)for(;De(Ct,1),!Et(Ct););})},tt&&($e.count=function(Et,Ct){return b.setTime(+Et),S.setTime(+Ct),he(b),he(S),Math.floor(tt(b,S))},$e.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?$e.filter(nt?function(Ct){return nt(Ct)%Et===0}:function(Ct){return $e.count(0,Ct)%Et===0}):$e}),$e}var e=E(function(){},function(he,De){he.setTime(+he+De)},function(he,De){return De-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(De){De.setTime(Math.floor(De/he)*he)},function(De,tt){De.setTime(+De+tt*he)},function(De,tt){return(tt-De)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,De){he.setTime(+he+De*r)},function(he,De){return(De-he)/r},function(he){return he.getUTCSeconds()}),f=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getMinutes()}),p=c.range,d=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getHours()}),T=d.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,De){he.setDate(he.getDate()+De)},function(he,De){return(De-he-(De.getTimezoneOffset()-he.getTimezoneOffset())*o)/i},function(he){return he.getDate()-1}),g=l.range;function x(he){return E(function(De){De.setDate(De.getDate()-(De.getDay()+7-he)%7),De.setHours(0,0,0,0)},function(De,tt){De.setDate(De.getDate()+tt*7)},function(De,tt){return(tt-De-(tt.getTimezoneOffset()-De.getTimezoneOffset())*o)/n})}var A=x(0),M=x(1),_=x(2),w=x(3),m=x(4),u=x(5),v=x(6),y=A.range,R=M.range,L=_.range,z=w.range,F=m.range,B=u.range,O=v.range,I=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,De){he.setMonth(he.getMonth()+De)},function(he,De){return De.getMonth()-he.getMonth()+(De.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),N=I.range,U=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,De){he.setFullYear(he.getFullYear()+De)},function(he,De){return De.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});U.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setFullYear(Math.floor(De.getFullYear()/he)*he),De.setMonth(0,1),De.setHours(0,0,0,0)},function(De,tt){De.setFullYear(De.getFullYear()+tt*he)})};var X=U.range,ee=E(function(he){he.setUTCSeconds(0,0)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getUTCMinutes()}),ue=ee.range,oe=E(function(he){he.setUTCMinutes(0,0,0)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getUTCHours()}),le=oe.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCDate(he.getUTCDate()+De)},function(he,De){return(De-he)/i},function(he){return he.getUTCDate()-1}),J=V.range;function te(he){return E(function(De){De.setUTCDate(De.getUTCDate()-(De.getUTCDay()+7-he)%7),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCDate(De.getUTCDate()+tt*7)},function(De,tt){return(tt-De)/n})}var Z=te(0),se=te(1),Q=te(2),q=te(3),re=te(4),ae=te(5),fe=te(6),be=Z.range,Me=se.range,Ie=Q.range,Le=q.range,je=re.range,et=ae.range,rt=fe.range,Je=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCMonth(he.getUTCMonth()+De)},function(he,De){return De.getUTCMonth()-he.getUTCMonth()+(De.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),Ze=Je.range,Ee=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCFullYear(he.getUTCFullYear()+De)},function(he,De){return De.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Ee.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setUTCFullYear(Math.floor(De.getUTCFullYear()/he)*he),De.setUTCMonth(0,1),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCFullYear(De.getUTCFullYear()+tt*he)})};var xe=Ee.range;h.timeDay=l,h.timeDays=g,h.timeFriday=u,h.timeFridays=B,h.timeHour=d,h.timeHours=T,h.timeInterval=E,h.timeMillisecond=e,h.timeMilliseconds=t,h.timeMinute=c,h.timeMinutes=p,h.timeMonday=M,h.timeMondays=R,h.timeMonth=I,h.timeMonths=N,h.timeSaturday=v,h.timeSaturdays=O,h.timeSecond=s,h.timeSeconds=f,h.timeSunday=A,h.timeSundays=y,h.timeThursday=m,h.timeThursdays=F,h.timeTuesday=_,h.timeTuesdays=L,h.timeWednesday=w,h.timeWednesdays=z,h.timeWeek=A,h.timeWeeks=y,h.timeYear=U,h.timeYears=X,h.utcDay=V,h.utcDays=J,h.utcFriday=ae,h.utcFridays=et,h.utcHour=oe,h.utcHours=le,h.utcMillisecond=e,h.utcMilliseconds=t,h.utcMinute=ee,h.utcMinutes=ue,h.utcMonday=se,h.utcMondays=Me,h.utcMonth=Je,h.utcMonths=Ze,h.utcSaturday=fe,h.utcSaturdays=rt,h.utcSecond=s,h.utcSeconds=f,h.utcSunday=Z,h.utcSundays=be,h.utcThursday=re,h.utcThursdays=je,h.utcTuesday=Q,h.utcTuesdays=Ie,h.utcWednesday=q,h.utcWednesdays=Le,h.utcWeek=Z,h.utcWeeks=be,h.utcYear=Ee,h.utcYears=xe,Object.defineProperty(h,"__esModule",{value:!0})})}}),bo=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,nc()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return We.setFullYear(Fe.y),We}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function E(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return We.setUTCFullYear(Fe.y),We}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,We,Ae){return{y:Fe,m:We,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var We=Fe.dateTime,Ae=Fe.date,ge=Fe.time,pe=Fe.periods,Te=Fe.days,Ue=Fe.shortDays,Xe=Fe.months,bt=Fe.shortMonths,xt=f(pe),Mt=c(pe),Nt=f(Te),sr=c(Te),ar=f(Ue),tr=c(Ue),Tr=f(Xe),sa=c(Xe),Ea=f(bt),ba=c(bt),Ia={a:Ha,A:Va,b:Za,B:rn,c:null,d:I,e:I,f:ue,H:N,I:U,j:X,L:ee,m:oe,M:le,p:wa,q:Bn,Q:Ct,s:jt,S:V,u:J,U:te,V:Z,w:se,W:Q,x:null,X:null,y:q,Y:re,Z:ae,"%":Et},Ra={a:Hn,A:At,b:ft,B:pr,c:null,d:fe,e:fe,f:je,H:be,I:Me,j:Ie,L:Le,m:et,M:rt,p:Sr,q:Er,Q:Ct,s:jt,S:Je,u:Ze,U:Ee,V:xe,w:he,W:De,x:null,X:null,y:tt,Y:nt,Z:$e,"%":Et},ya={a:Zt,A:$t,b:Cr,B:qr,c:Jr,d:m,e:m,f:z,H:v,I:v,j:u,L,m:w,M:y,p:It,q:_,Q:B,s:O,S:R,u:d,U:T,V:l,w:p,W:g,x:aa,X:Ca,y:A,Y:x,Z:M,"%":F};Ia.x=tn(Ae,Ia),Ia.X=tn(ge,Ia),Ia.c=tn(We,Ia),Ra.x=tn(Ae,Ra),Ra.X=tn(ge,Ra),Ra.c=tn(We,Ra);function tn(_r,Mr){return function(Gr){var Fr=[],pt=-1,Kt=0,xr=_r.length,Hr,fa,xa;for(Gr instanceof Date||(Gr=new Date(+Gr));++pt53)return null;"w"in Fr||(Fr.w=1),"Z"in Fr?(Kt=E(e(Fr.y,0,1)),xr=Kt.getUTCDay(),Kt=xr>4||xr===0?b.utcMonday.ceil(Kt):b.utcMonday(Kt),Kt=b.utcDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getUTCFullYear(),Fr.m=Kt.getUTCMonth(),Fr.d=Kt.getUTCDate()+(Fr.w+6)%7):(Kt=S(e(Fr.y,0,1)),xr=Kt.getDay(),Kt=xr>4||xr===0?b.timeMonday.ceil(Kt):b.timeMonday(Kt),Kt=b.timeDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getFullYear(),Fr.m=Kt.getMonth(),Fr.d=Kt.getDate()+(Fr.w+6)%7)}else("W"in Fr||"U"in Fr)&&("w"in Fr||(Fr.w="u"in Fr?Fr.u%7:"W"in Fr?1:0),xr="Z"in Fr?E(e(Fr.y,0,1)).getUTCDay():S(e(Fr.y,0,1)).getDay(),Fr.m=0,Fr.d="W"in Fr?(Fr.w+6)%7+Fr.W*7-(xr+5)%7:Fr.w+Fr.U*7-(xr+6)%7);return"Z"in Fr?(Fr.H+=Fr.Z/100|0,Fr.M+=Fr.Z%100,E(Fr)):S(Fr)}}function Yt(_r,Mr,Gr,Fr){for(var pt=0,Kt=Mr.length,xr=Gr.length,Hr,fa;pt=xr)return-1;if(Hr=Mr.charCodeAt(pt++),Hr===37){if(Hr=Mr.charAt(pt++),fa=ya[Hr in r?Mr.charAt(pt++):Hr],!fa||(Fr=fa(_r,Gr,Fr))<0)return-1}else if(Hr!=Gr.charCodeAt(Fr++))return-1}return Fr}function It(_r,Mr,Gr){var Fr=xt.exec(Mr.slice(Gr));return Fr?(_r.p=Mt[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Zt(_r,Mr,Gr){var Fr=ar.exec(Mr.slice(Gr));return Fr?(_r.w=tr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function $t(_r,Mr,Gr){var Fr=Nt.exec(Mr.slice(Gr));return Fr?(_r.w=sr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Cr(_r,Mr,Gr){var Fr=Ea.exec(Mr.slice(Gr));return Fr?(_r.m=ba[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function qr(_r,Mr,Gr){var Fr=Tr.exec(Mr.slice(Gr));return Fr?(_r.m=sa[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Jr(_r,Mr,Gr){return Yt(_r,We,Mr,Gr)}function aa(_r,Mr,Gr){return Yt(_r,Ae,Mr,Gr)}function Ca(_r,Mr,Gr){return Yt(_r,ge,Mr,Gr)}function Ha(_r){return Ue[_r.getDay()]}function Va(_r){return Te[_r.getDay()]}function Za(_r){return bt[_r.getMonth()]}function rn(_r){return Xe[_r.getMonth()]}function wa(_r){return pe[+(_r.getHours()>=12)]}function Bn(_r){return 1+~~(_r.getMonth()/3)}function Hn(_r){return Ue[_r.getUTCDay()]}function At(_r){return Te[_r.getUTCDay()]}function ft(_r){return bt[_r.getUTCMonth()]}function pr(_r){return Xe[_r.getUTCMonth()]}function Sr(_r){return pe[+(_r.getUTCHours()>=12)]}function Er(_r){return 1+~~(_r.getUTCMonth()/3)}return{format:function(_r){var Mr=tn(_r+="",Ia);return Mr.toString=function(){return _r},Mr},parse:function(_r){var Mr=mn(_r+="",!1);return Mr.toString=function(){return _r},Mr},utcFormat:function(_r){var Mr=tn(_r+="",Ra);return Mr.toString=function(){return _r},Mr},utcParse:function(_r){var Mr=mn(_r+="",!0);return Mr.toString=function(){return _r},Mr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,We,Ae){var ge=Fe<0?"-":"",pe=(ge?-Fe:Fe)+"",Te=pe.length;return ge+(Te68?1900:2e3),Ae+ge[0].length):-1}function M(Fe,We,Ae){var ge=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(We.slice(Ae,Ae+6));return ge?(Fe.Z=ge[1]?0:-(ge[2]+(ge[3]||"00")),Ae+ge[0].length):-1}function _(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+1));return ge?(Fe.q=ge[0]*3-3,Ae+ge[0].length):-1}function w(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.m=ge[0]-1,Ae+ge[0].length):-1}function m(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.d=+ge[0],Ae+ge[0].length):-1}function u(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.m=0,Fe.d=+ge[0],Ae+ge[0].length):-1}function v(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.H=+ge[0],Ae+ge[0].length):-1}function y(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.M=+ge[0],Ae+ge[0].length):-1}function R(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.S=+ge[0],Ae+ge[0].length):-1}function L(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.L=+ge[0],Ae+ge[0].length):-1}function z(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+6));return ge?(Fe.L=Math.floor(ge[0]/1e3),Ae+ge[0].length):-1}function F(Fe,We,Ae){var ge=a.exec(We.slice(Ae,Ae+1));return ge?Ae+ge[0].length:-1}function B(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.Q=+ge[0],Ae+ge[0].length):-1}function O(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.s=+ge[0],Ae+ge[0].length):-1}function I(Fe,We){return n(Fe.getDate(),We,2)}function N(Fe,We){return n(Fe.getHours(),We,2)}function U(Fe,We){return n(Fe.getHours()%12||12,We,2)}function X(Fe,We){return n(1+b.timeDay.count(b.timeYear(Fe),Fe),We,3)}function ee(Fe,We){return n(Fe.getMilliseconds(),We,3)}function ue(Fe,We){return ee(Fe,We)+"000"}function oe(Fe,We){return n(Fe.getMonth()+1,We,2)}function le(Fe,We){return n(Fe.getMinutes(),We,2)}function V(Fe,We){return n(Fe.getSeconds(),We,2)}function J(Fe){var We=Fe.getDay();return We===0?7:We}function te(Fe,We){return n(b.timeSunday.count(b.timeYear(Fe)-1,Fe),We,2)}function Z(Fe,We){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?b.timeThursday(Fe):b.timeThursday.ceil(Fe),n(b.timeThursday.count(b.timeYear(Fe),Fe)+(b.timeYear(Fe).getDay()===4),We,2)}function se(Fe){return Fe.getDay()}function Q(Fe,We){return n(b.timeMonday.count(b.timeYear(Fe)-1,Fe),We,2)}function q(Fe,We){return n(Fe.getFullYear()%100,We,2)}function re(Fe,We){return n(Fe.getFullYear()%1e4,We,4)}function ae(Fe){var We=Fe.getTimezoneOffset();return(We>0?"-":(We*=-1,"+"))+n(We/60|0,"0",2)+n(We%60,"0",2)}function fe(Fe,We){return n(Fe.getUTCDate(),We,2)}function be(Fe,We){return n(Fe.getUTCHours(),We,2)}function Me(Fe,We){return n(Fe.getUTCHours()%12||12,We,2)}function Ie(Fe,We){return n(1+b.utcDay.count(b.utcYear(Fe),Fe),We,3)}function Le(Fe,We){return n(Fe.getUTCMilliseconds(),We,3)}function je(Fe,We){return Le(Fe,We)+"000"}function et(Fe,We){return n(Fe.getUTCMonth()+1,We,2)}function rt(Fe,We){return n(Fe.getUTCMinutes(),We,2)}function Je(Fe,We){return n(Fe.getUTCSeconds(),We,2)}function Ze(Fe){var We=Fe.getUTCDay();return We===0?7:We}function Ee(Fe,We){return n(b.utcSunday.count(b.utcYear(Fe)-1,Fe),We,2)}function xe(Fe,We){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?b.utcThursday(Fe):b.utcThursday.ceil(Fe),n(b.utcThursday.count(b.utcYear(Fe),Fe)+(b.utcYear(Fe).getUTCDay()===4),We,2)}function he(Fe){return Fe.getUTCDay()}function De(Fe,We){return n(b.utcMonday.count(b.utcYear(Fe)-1,Fe),We,2)}function tt(Fe,We){return n(Fe.getUTCFullYear()%100,We,2)}function nt(Fe,We){return n(Fe.getUTCFullYear()%1e4,We,4)}function $e(){return"+0000"}function Et(){return"%"}function Ct(Fe){return+Fe}function jt(Fe){return Math.floor(+Fe/1e3)}var Wt;dr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dr(Fe){return Wt=t(Fe),h.timeFormat=Wt.format,h.timeParse=Wt.parse,h.utcFormat=Wt.utcFormat,h.utcParse=Wt.utcParse,Wt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Dr(Fe){return Fe.toISOString()}var hr=Date.prototype.toISOString?Dr:h.utcFormat(vr);function Ar(Fe){var We=new Date(Fe);return isNaN(We)?null:We}var gt=+new Date("2000-01-01T00:00:00.000Z")?Ar:h.utcParse(vr);h.isoFormat=hr,h.isoParse=gt,h.timeFormatDefaultLocale=dr,h.timeFormatLocale=t,Object.defineProperty(h,"__esModule",{value:!0})})}}),Fc=He({"node_modules/d3-format/dist/d3-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function S(w,m){if((u=(w=m?w.toExponential(m-1):w.toExponential()).indexOf("e"))<0)return null;var u,v=w.slice(0,u);return[v.length>1?v[0]+v.slice(2):v,+w.slice(u+1)]}function E(w){return w=S(Math.abs(w)),w?w[1]:NaN}function e(w,m){return function(u,v){for(var y=u.length,R=[],L=0,z=w[0],F=0;y>0&&z>0&&(F+z+1>v&&(z=Math.max(1,v-F)),R.push(u.substring(y-=z,y+z)),!((F+=z+1)>v));)z=w[L=(L+1)%w.length];return R.reverse().join(m)}}function t(w){return function(m){return m.replace(/[0-9]/g,function(u){return w[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(w){if(!(m=r.exec(w)))throw new Error("invalid format: "+w);var m;return new a({fill:m[1],align:m[2],sign:m[3],symbol:m[4],zero:m[5],width:m[6],comma:m[7],precision:m[8]&&m[8].slice(1),trim:m[9],type:m[10]})}o.prototype=a.prototype;function a(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function i(w){e:for(var m=w.length,u=1,v=-1,y;u0&&(v=0);break}return v>0?w.slice(0,v)+w.slice(y+1):w}var n;function s(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1],R=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,L=v.length;return R===L?v:R>L?v+new Array(R-L+1).join("0"):R>0?v.slice(0,R)+"."+v.slice(R):"0."+new Array(1-R).join("0")+S(w,Math.max(0,m+R-1))[0]}function f(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+v:v.length>y+1?v.slice(0,y+1)+"."+v.slice(y+1):v+new Array(y-v.length+2).join("0")}var c={"%":function(w,m){return(w*100).toFixed(m)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:b,e:function(w,m){return w.toExponential(m)},f:function(w,m){return w.toFixed(m)},g:function(w,m){return w.toPrecision(m)},o:function(w){return Math.round(w).toString(8)},p:function(w,m){return f(w*100,m)},r:f,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function p(w){return w}var d=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l(w){var m=w.grouping===void 0||w.thousands===void 0?p:e(d.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",v=w.currency===void 0?"":w.currency[1]+"",y=w.decimal===void 0?".":w.decimal+"",R=w.numerals===void 0?p:t(d.call(w.numerals,String)),L=w.percent===void 0?"%":w.percent+"",z=w.minus===void 0?"-":w.minus+"",F=w.nan===void 0?"NaN":w.nan+"";function B(I){I=o(I);var N=I.fill,U=I.align,X=I.sign,ee=I.symbol,ue=I.zero,oe=I.width,le=I.comma,V=I.precision,J=I.trim,te=I.type;te==="n"?(le=!0,te="g"):c[te]||(V===void 0&&(V=12),J=!0,te="g"),(ue||N==="0"&&U==="=")&&(ue=!0,N="0",U="=");var Z=ee==="$"?u:ee==="#"&&/[boxX]/.test(te)?"0"+te.toLowerCase():"",se=ee==="$"?v:/[%p]/.test(te)?L:"",Q=c[te],q=/[defgprs%]/.test(te);V=V===void 0?6:/[gprs]/.test(te)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function re(ae){var fe=Z,be=se,Me,Ie,Le;if(te==="c")be=Q(ae)+be,ae="";else{ae=+ae;var je=ae<0||1/ae<0;if(ae=isNaN(ae)?F:Q(Math.abs(ae),V),J&&(ae=i(ae)),je&&+ae==0&&X!=="+"&&(je=!1),fe=(je?X==="("?X:z:X==="-"||X==="("?"":X)+fe,be=(te==="s"?T[8+n/3]:"")+be+(je&&X==="("?")":""),q){for(Me=-1,Ie=ae.length;++MeLe||Le>57){be=(Le===46?y+ae.slice(Me+1):ae.slice(Me))+be,ae=ae.slice(0,Me);break}}}le&&!ue&&(ae=m(ae,1/0));var et=fe.length+ae.length+be.length,rt=et>1)+fe+ae+be+rt.slice(et);break;default:ae=rt+fe+ae+be;break}return R(ae)}return re.toString=function(){return I+""},re}function O(I,N){var U=B((I=o(I),I.type="f",I)),X=Math.max(-8,Math.min(8,Math.floor(E(N)/3)))*3,ee=Math.pow(10,-X),ue=T[8+X/3];return function(oe){return U(ee*oe)+ue}}return{format:B,formatPrefix:O}}var g;x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function x(w){return g=l(w),h.format=g.format,h.formatPrefix=g.formatPrefix,g}function A(w){return Math.max(0,-E(Math.abs(w)))}function M(w,m){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(m)/3)))*3-E(Math.abs(w)))}function _(w,m){return w=Math.abs(w),m=Math.abs(m)-w,Math.max(0,E(m)-E(w))+1}h.FormatSpecifier=a,h.formatDefaultLocale=x,h.formatLocale=l,h.formatSpecifier=o,h.precisionFixed=A,h.precisionPrefix=M,h.precisionRound=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),Eh=He({"node_modules/is-string-blank/index.js"(Y,G){G.exports=function(h){for(var b=h.length,S,E=0;E13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),Bi=He({"node_modules/fast-isnumeric/index.js"(Y,G){var h=Eh();G.exports=function(b){var S=typeof b;if(S==="string"){var E=b;if(b=+b,b===0&&h(E))return!1}else if(S!=="number")return!1;return b-b<1}}}),Yo=He({"src/constants/numerical.js"(Y,G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),_p=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h["base64-arraybuffer"]={}))})(Y,function(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E>2],n+=b[(o[a]&3)<<4|o[a+1]>>4],n+=b[(o[a+1]&15)<<2|o[a+2]>>6],n+=b[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,f,c,p;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var d=new ArrayBuffer(o),T=new Uint8Array(d);for(i=0;i>4,T[n++]=(f&15)<<4|c>>2,T[n++]=(c&3)<<6|p&63;return d};h.decode=t,h.encode=e,Object.defineProperty(h,"__esModule",{value:!0})})}}),Kv=He({"src/lib/is_plain_object.js"(Y,G){G.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),lh=He({"src/lib/array.js"(Y){var G=_p().decode,h=Kv(),b=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Y.isTypedArray=e;function t(s){return b(s)||e(s)}Y.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Y.isArray1D=r,Y.ensureArray=function(s,f){return b(s)||(s=[]),s.length=f,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Y.isArrayBuffer=a,Y.decodeTypedArraySpec=function(s){var f=[],c=i(s),p=c.dtype,d=o[p];if(!d)throw new Error('Error in dtype: "'+p+'"');var T=d.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var g=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");g.reverse();var x=g.length,A,M,_=+g[0],w=T*_,m=0;if(x===1)f=new d(l);else if(x===2)for(A=+g[1],M=0;M2)return d[A]=d[A]|e,g.set(x,null);if(l){for(f=A;f0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return h(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),X5=He({"src/lib/relink_private.js"(Y,G){var h=lh().isArrayOrTypedArray,b=Kv();G.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(h(r)&&h(o)&&b(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iE/2?S-Math.round(S/E)*E:S}G.exports={mod:h,modHalf:b}}}),If=He({"node_modules/tinycolor2/tinycolor.js"(Y,G){(function(h){var b=/^\s+/,S=/\s+$/,E=0,e=h.round,t=h.min,r=h.max,o=h.random;function a(q,re){if(q=q||"",re=re||{},q instanceof a)return q;if(!(this instanceof a))return new a(q,re);var ae=i(q);this._originalInput=q,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=e(100*this._a)/100,this._format=re.format||ae.format,this._gradientType=re.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=ae.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),re,ae,fe,be,Me,Ie;return re=q.r/255,ae=q.g/255,fe=q.b/255,re<=.03928?be=re/12.92:be=h.pow((re+.055)/1.055,2.4),ae<=.03928?Me=ae/12.92:Me=h.pow((ae+.055)/1.055,2.4),fe<=.03928?Ie=fe/12.92:Ie=h.pow((fe+.055)/1.055,2.4),.2126*be+.7152*Me+.0722*Ie},setAlpha:function(q){return this._a=I(q),this._roundA=e(100*this._a)/100,this},toHsv:function(){var q=c(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=c(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.v*100);return this._a==1?"hsv("+re+", "+ae+"%, "+fe+"%)":"hsva("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var q=s(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=s(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.l*100);return this._a==1?"hsl("+re+", "+ae+"%, "+fe+"%)":"hsla("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(q){return d(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return T(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(N(this._r,255)*100)+"%",g:e(N(this._g,255)*100)+"%",b:e(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%)":"rgba("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var re="#"+l(this._r,this._g,this._b,this._a),ae=re,fe=this._gradientType?"GradientType = 1, ":"";if(q){var be=a(q);ae="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+re+",endColorstr="+ae+")"},toString:function(q){var re=!!q;q=q||this._format;var ae=!1,fe=this._a<1&&this._a>=0,be=!re&&fe&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return be?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(ae=this.toRgbString()),q==="prgb"&&(ae=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(ae=this.toHexString()),q==="hex3"&&(ae=this.toHexString(!0)),q==="hex4"&&(ae=this.toHex8String(!0)),q==="hex8"&&(ae=this.toHex8String()),q==="name"&&(ae=this.toName()),q==="hsl"&&(ae=this.toHslString()),q==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(q,re){var ae=q.apply(null,[this].concat([].slice.call(re)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(q,re){return q.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(q,re){if(typeof q=="object"){var ae={};for(var fe in q)q.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=q[fe]:ae[fe]=le(q[fe]));q=ae}return a(q,re)};function i(q){var re={r:0,g:0,b:0},ae=1,fe=null,be=null,Me=null,Ie=!1,Le=!1;return typeof q=="string"&&(q=se(q)),typeof q=="object"&&(Z(q.r)&&Z(q.g)&&Z(q.b)?(re=n(q.r,q.g,q.b),Ie=!0,Le=String(q.r).substr(-1)==="%"?"prgb":"rgb"):Z(q.h)&&Z(q.s)&&Z(q.v)?(fe=le(q.s),be=le(q.v),re=p(q.h,fe,be),Ie=!0,Le="hsv"):Z(q.h)&&Z(q.s)&&Z(q.l)&&(fe=le(q.s),Me=le(q.l),re=f(q.h,fe,Me),Ie=!0,Le="hsl"),q.hasOwnProperty("a")&&(ae=q.a)),ae=I(ae),{ok:Ie,format:q.format||Le,r:t(255,r(re.r,0)),g:t(255,r(re.g,0)),b:t(255,r(re.b,0)),a:ae}}function n(q,re,ae){return{r:N(q,255)*255,g:N(re,255)*255,b:N(ae,255)*255}}function s(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=(fe+be)/2;if(fe==be)Me=Ie=0;else{var je=fe-be;switch(Ie=Le>.5?je/(2-fe-be):je/(fe+be),fe){case q:Me=(re-ae)/je+(re1&&(Je-=1),Je<1/6?et+(rt-et)*6*Je:Je<1/2?rt:Je<2/3?et+(rt-et)*(2/3-Je)*6:et}if(re===0)fe=be=Me=ae;else{var Le=ae<.5?ae*(1+re):ae+re-ae*re,je=2*ae-Le;fe=Ie(je,Le,q+1/3),be=Ie(je,Le,q),Me=Ie(je,Le,q-1/3)}return{r:fe*255,g:be*255,b:Me*255}}function c(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=fe,je=fe-be;if(Ie=fe===0?0:je/fe,fe==be)Me=0;else{switch(fe){case q:Me=(re-ae)/je+(re>1)+720)%360;--re;)fe.h=(fe.h+be)%360,Me.push(a(fe));return Me}function z(q,re){re=re||6;for(var ae=a(q).toHsv(),fe=ae.h,be=ae.s,Me=ae.v,Ie=[],Le=1/re;re--;)Ie.push(a({h:fe,s:be,v:Me})),Me=(Me+Le)%1;return Ie}a.mix=function(q,re,ae){ae=ae===0?0:ae||50;var fe=a(q).toRgb(),be=a(re).toRgb(),Me=ae/100,Ie={r:(be.r-fe.r)*Me+fe.r,g:(be.g-fe.g)*Me+fe.g,b:(be.b-fe.b)*Me+fe.b,a:(be.a-fe.a)*Me+fe.a};return a(Ie)},a.readability=function(q,re){var ae=a(q),fe=a(re);return(h.max(ae.getLuminance(),fe.getLuminance())+.05)/(h.min(ae.getLuminance(),fe.getLuminance())+.05)},a.isReadable=function(q,re,ae){var fe=a.readability(q,re),be,Me;switch(Me=!1,be=Q(ae),be.level+be.size){case"AAsmall":case"AAAlarge":Me=fe>=4.5;break;case"AAlarge":Me=fe>=3;break;case"AAAsmall":Me=fe>=7;break}return Me},a.mostReadable=function(q,re,ae){var fe=null,be=0,Me,Ie,Le,je;ae=ae||{},Ie=ae.includeFallbackColors,Le=ae.level,je=ae.size;for(var et=0;etbe&&(be=Me,fe=a(re[et]));return a.isReadable(q,fe,{level:Le,size:je})||!Ie?fe:(ae.includeFallbackColors=!1,a.mostReadable(q,["#fff","#000"],ae))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=a.hexNames=O(F);function O(q){var re={};for(var ae in q)q.hasOwnProperty(ae)&&(re[q[ae]]=ae);return re}function I(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function N(q,re){ee(q)&&(q="100%");var ae=ue(q);return q=t(re,r(0,parseFloat(q))),ae&&(q=parseInt(q*re,10)/100),h.abs(q-re)<1e-6?1:q%re/parseFloat(re)}function U(q){return t(1,r(0,q))}function X(q){return parseInt(q,16)}function ee(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ue(q){return typeof q=="string"&&q.indexOf("%")!=-1}function oe(q){return q.length==1?"0"+q:""+q}function le(q){return q<=1&&(q=q*100+"%"),q}function V(q){return h.round(parseFloat(q)*255).toString(16)}function J(q){return X(q)/255}var te=function(){var q="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+re+")|(?:"+q+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",be="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Z(q){return!!te.CSS_UNIT.exec(q)}function se(q){q=q.replace(b,"").replace(S,"").toLowerCase();var re=!1;if(F[q])q=F[q],re=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=te.rgb.exec(q))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=te.rgba.exec(q))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=te.hsl.exec(q))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=te.hsla.exec(q))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=te.hsv.exec(q))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=te.hsva.exec(q))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=te.hex8.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),a:J(ae[4]),format:re?"name":"hex8"}:(ae=te.hex6.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),format:re?"name":"hex"}:(ae=te.hex4.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),a:J(ae[4]+""+ae[4]),format:re?"name":"hex8"}:(ae=te.hex3.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),format:re?"name":"hex"}:!1}function Q(q){var re,ae;return q=q||{level:"AA",size:"small"},re=(q.level||"AA").toUpperCase(),ae=(q.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:re,size:ae}}typeof G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Co=He({"src/lib/extend.js"(Y){var G=Kv(),h=Array.isArray;function b(E,e){var t,r;for(t=0;t=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=1)return a}var p=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+p+", "+s[3]+")":"rgb("+p+")"}}}),Id=He({"src/constants/interactions.js"(Y,G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),C0=He({"src/lib/regex.js"(Y){Y.counter=function(G,h,b,S){var E=(h||"")+(b?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),Z5=He({"src/lib/coerce.js"(Y){var G=Bi(),h=If(),b=Co().extendFlat,S=Pl(),E=xp(),e=Ri(),t=Id().DESELECTDIM,r=Gm(),o=C0().counter,a=E0().modHalf,i=lh().isArrayOrTypedArray,n=lh().isTypedArraySpec,s=lh().decodeTypedArraySpec;Y.valObjectMeta={data_array:{coerceFunction:function(c,p,d){p.set(i(c)?c:n(c)?s(c):d)}},enumerated:{coerceFunction:function(c,p,d,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?p.set(d):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var d=p.values,T=0;Tg===!0||g===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?p.set(c):p.set(d)}},number:{coerceFunction:function(c,p,d,T){n(c)&&(c=s(c)),!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},integer:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},string:{coerceFunction:function(c,p,d,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?p.set(d):p.set(String(c))}else T.noBlank&&!c?p.set(d):p.set(c)}},color:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),h(c).isValid()?p.set(c):p.set(d)}},colorlist:{coerceFunction:function(c,p,d){function T(l){return h(l).isValid()}!Array.isArray(c)||!c.length?p.set(d):c.every(T)?p.set(c):p.set(d)}},colorscale:{coerceFunction:function(c,p,d){p.set(E.get(c,d))}},angle:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),c==="auto"?p.set("auto"):G(c)?p.set(a(+c,360)):p.set(d)}},subplotid:{coerceFunction:function(c,p,d,T){var l=T.regex||o(d);const g=x=>typeof x=="string"&&l.test(x);g(c)||T.arrayOk&&i(c)&&c.length>0&&c.every(g)?p.set(c):p.set(d)},validateFunction:function(c,p){var d=p.dflt;return c===d?!0:typeof c!="string"?!1:!!o(d).test(c)}},flaglist:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(d);return}for(var l=c.split("+"),g=0;g/g),c=0;c1){var e=["LOG:"];for(E=0;E1){var t=[];for(E=0;E"),"long")}},S.warn=function(){var E;if(h.logging>0){var e=["WARN:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}},S.error=function(){var E;if(h.logging>0){var e=["ERROR:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}}}}),Xy=He({"src/lib/noop.js"(Y,G){G.exports=function(){}}}),nb=He({"src/lib/push_unique.js"(Y,G){G.exports=function(b,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;esh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>sh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Y.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),Yy=He({"src/components/shapes/label_texttemplate.js"(Y,G){function h(g,x){return x?x.d2l(g):g}function b(g,x){return x?x.l2d(g):g}function S(g){return g.x0}function E(g){return g.x1}function e(g){return g.y0}function t(g){return g.y1}function r(g){return g.x0shift||0}function o(g){return g.x1shift||0}function a(g){return g.y0shift||0}function i(g){return g.y1shift||0}function n(g,x){return h(g.x1,x)+o(g)-h(g.x0,x)-r(g)}function s(g,x,A){return h(g.y1,A)+i(g)-h(g.y0,A)-a(g)}function f(g,x){return Math.abs(n(g,x))}function c(g,x,A){return Math.abs(s(g,x,A))}function p(g,x,A){return g.type!=="line"?void 0:Math.sqrt(Math.pow(n(g,x),2)+Math.pow(s(g,x,A),2))}function d(g,x){return b((h(g.x1,x)+o(g)+h(g.x0,x)+r(g))/2,x)}function T(g,x,A){return b((h(g.y1,A)+i(g)+h(g.y0,A)+a(g))/2,A)}function l(g,x,A){return g.type!=="line"?void 0:s(g,x,A)/n(g,x)}G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:n,dy:s,width:f,height:c,length:p,xcenter:d,ycenter:T}}}),TA=He({"src/components/shapes/draw_newshape/attributes.js"(Y,G){var h=Nu().overrideAll,b=Pl(),S=Su(),E=jf().dash,e=Co().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=bl(),o=Yy();G.exports=h({newshape:{visible:e({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},b.legend,{}),legendgroup:e({},b.legendgroup,{}),legendgrouptitle:{text:e({},b.legendgrouptitle.text,{}),font:S({})},legendrank:e({},b.legendrank,{}),legendwidth:e({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),AA=He({"src/components/selections/draw_newselection/attributes.js"(Y,G){var h=jf().dash,b=Co().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},h,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ky=He({"src/plots/pad_attributes.js"(Y,G){G.exports=function(h){var b=h.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),L0=He({"src/plots/layout_attributes.js"(Y,G){var h=Su(),b=Xm(),S=hf(),E=TA(),e=AA(),t=Ky(),r=Co().extendFlat,o=h({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(t({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},b.transition,{editType:"none"})}}}),SA=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97")){var Y=document.createElement("style");Y.id="696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97",Y.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Y)}})()}}),Ni=He({"src/registry.js"(Y){var G=Rd(),h=Xy(),b=nb(),S=Kv(),E=Wm().addStyleRule,e=Co(),t=Pl(),r=L0(),o=e.extendFlat,a=e.extendDeepAll;Y.modules={},Y.allCategories={},Y.allTypes=[],Y.subplotsRegistry={},Y.componentsRegistry={},Y.layoutArrayContainers=[],Y.layoutArrayRegexes=[],Y.traceLayoutAttributes={},Y.localeRegistry={},Y.apiMethodRegistry={},Y.collectableSubplotTypes=null,Y.register=function(x){if(Y.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A=l&&F<=g?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var U=d(B),X=F.charAt(0);U&&(X==="G"||X==="g")&&(F=F.slice(1),B="");var ee=U&&B.slice(0,7)==="chinese",ue=F.match(ee?c:f);if(!ue)return e;var oe=ue[1],le=ue[3]||"1",V=Number(ue[5]||1),J=Number(ue[7]||0),te=Number(ue[9]||0),Z=Number(ue[11]||0);if(U){if(oe.length===2)return e;oe=Number(oe);var se;try{var Q=n.getComponentMethod("calendars","getCal")(B);if(ee){var q=le.charAt(le.length-1)==="i";le=parseInt(le,10),se=Q.newDate(oe,Q.toMonthIndex(oe,le,q),V)}else se=Q.newDate(oe,Number(le),V)}catch{return e}return se?(se.toJD()-i)*t+J*r+te*o+Z*a:e}oe.length===2?oe=(Number(oe)+2e3-p)%100+p:oe=Number(oe),le-=1;var re=new Date(Date.UTC(2e3,le,V,J,te));return re.setUTCFullYear(oe),re.getUTCMonth()!==le||re.getUTCDate()!==V?e:re.getTime()+Z*a},l=Y.MIN_MS=Y.dateTime2ms("-9999"),g=Y.MAX_MS=Y.dateTime2ms("9999-12-31 23:59:59.9999"),Y.isDateTime=function(F,B){return Y.dateTime2ms(F,B)!==e};function x(F,B){return String(F+Math.pow(10,B)).slice(1)}var A=90*t,M=3*r,_=5*o;Y.ms2DateTime=function(F,B,O){if(typeof F!="number"||!(F>=l&&F<=g))return e;B||(B=0);var I=Math.floor(S(F+.05,1)*10),N=Math.round(F-I/10),U,X,ee,ue,oe,le;if(d(O)){var V=Math.floor(N/t)+i,J=Math.floor(S(F,t));try{U=n.getComponentMethod("calendars","getCal")(O).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(N))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;X=B=l+t&&F<=g-t))return e;var B=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-B/10)),I=G("%Y-%m-%d")(O),N=O.getHours(),U=O.getMinutes(),X=O.getSeconds(),ee=O.getUTCMilliseconds()*10+B;return w(I,N,U,X,ee)};function w(F,B,O,I,N){if((B||O||I||N)&&(F+=" "+x(B,2)+":"+x(O,2),(I||N)&&(F+=":"+x(I,2),N))){for(var U=4;N%10===0;)U-=1,N/=10;F+="."+x(N,U)}return F}Y.cleanDate=function(F,B,O){if(F===e)return B;if(Y.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(d(O))return b.error("JS Dates and milliseconds are incompatible with world calendars",F),B;if(F=Y.ms2DateTimeLocal(+F),!F&&B!==void 0)return B}else if(!Y.isDateTime(F,O))return b.error("unrecognized date",F),B;return F};var m=/%\d?f/g,u=/%h/g,v={1:"1",2:"1",3:"2",4:"2"};function y(F,B,O,I){F=F.replace(m,function(U){var X=Math.min(+U.charAt(1)||6,6),ee=(B/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return ee});var N=new Date(Math.floor(B+.05));if(F=F.replace(u,function(){return v[O("%q")(N)]}),d(I))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,B,I)}catch{return"Invalid"}return O(F)(N)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,B){var O=S(F+.05,t),I=x(Math.floor(O/r),2)+":"+x(S(Math.floor(O/o),60),2);if(B!=="M"){h(B)||(B=0);var N=Math.min(S(F/a,60),R[B]),U=(100+N).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),I+=":"+U}return I}Y.formatDate=function(F,B,O,I,N,U){if(N=d(N)&&N,!B)if(O==="y")B=U.year;else if(O==="m")B=U.month;else if(O==="d")B=U.dayMonth+` diff --git a/dashboard/static/index.html b/dashboard/static/index.html index 9704b00c..93d6d4a2 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -6,8 +6,8 @@ AlphaTrion - - + +