diff --git a/README.md b/README.md index 8f91d8440f201f3202668fcc59702f3ecbb43cc6..79d39cd413e22aeb5b943ae12f160cc79436db75 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ --- -title: Omniseal Dev +title: Omniseal Leaderboard emoji: 🦀 colorFrom: red colorTo: green sdk: docker pinned: false -short_description: POC development +short_description: Leaderboard for watermarking models --- -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference - ## Docker Build Instructions ### Prerequisites @@ -24,9 +22,10 @@ Check out the configuration reference at https://huggingface.co/docs/hub/spaces- ```bash cd backend conda env create -f environment.yml -y +conda activate omniseal-benchmark-backend ``` -2. Build frontend (outputs html, js, css into frontend/dist) +2. Build frontend (outputs html, js, css into frontend/dist). Note you only need this if you are updating the frontend, the repository would already have a build checked in at frontend/dist ```bash cd frontend @@ -34,7 +33,7 @@ npm install npm run build ``` -3. Run backend server which serves built frontend files +3. Run backend server from project root. This would serve frontend files from port http://localhost:7860 ```bash gunicorn --chdir backend -b 0.0.0.0:7860 app:app --reload @@ -44,13 +43,7 @@ gunicorn --chdir backend -b 0.0.0.0:7860 app:app --reload ### Build Steps (Docker, huggingface) -1. Navigate to the project directory: - -```bash -cd /path/to/omniseal_dev -``` - -2. Build the Docker image: +2. Build the Docker image from project root: ```bash docker build -t omniseal-benchmark . @@ -74,7 +67,7 @@ docker run -p 7860:7860 -v $(pwd)/backend:/app/backend omniseal-benchmark When updating the backend, you can run it in whichever build steps above to take advantage of hot-reload so you don't have to restart the server. -For the frontend to take advantage of hot reload: +For the frontend: 1. Create a `.env.local` file in the frontend directory. Set `VITE_API_SERVER_URL` to where your backend server is running. When running locally it will be `VITE_API_SERVER_URL=http://localhost:7860`. This overrides the configuration in `.env` so the frontend will connect with your backend URL of choice. diff --git a/backend/mk_leaderboard.py b/backend/mk_leaderboard.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/frontend/dist/assets/index-BWZpYvtq.css b/frontend/dist/assets/index-BWZpYvtq.css new file mode 100644 index 0000000000000000000000000000000000000000..19bf10cd262a52ec6640fd1fe1d293fca8a9b9e4 --- /dev/null +++ b/frontend/dist/assets/index-BWZpYvtq.css @@ -0,0 +1 @@ +/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--spacing:.25rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:where(:root),:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:root{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dark]:checked),[data-theme=dark]{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@property --radialprogress{syntax: ""; inherits: true; initial-value: 0%;}:root{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab,red,red)){:root{scrollbar-color:color-mix(in oklch,currentColor 35%,#0000)#0000}}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not([class*=drawer-open])>.drawer-toggle:checked){overflow:hidden}:where(:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not(.drawer-open)>.drawer-toggle:checked)){scrollbar-gutter:stable;background-image:linear-gradient(var(--color-base-100),var(--color-base-100));--root-bg:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){:where(:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not(.drawer-open)>.drawer-toggle:checked)){--root-bg:color-mix(in srgb,var(--color-base-100),oklch(0% 0 0) 40%)}}:where(.modal[open],.modal-open,.modal-toggle:checked+.modal):not(.modal-start,.modal-end){scrollbar-gutter:stable}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}}@layer components;@layer utilities{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:90cqi;max-width:90cqi}.diff:has(.diff-item-2:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-2:focus-visible) .diff-resizer{min-width:10cqi;max-width:10cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:10cqi;max-width:10cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:90cqi;max-width:90cqi}}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:1rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));order:var(--tab-order);height:var(--tab-height);border-color:#0000;padding-inline-start:var(--tab-p);padding-inline-end:var(--tab-p);font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{content:attr(aria-label)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true]))+.tab-content{height:calc(100% - var(--tab-height) + var(--border));display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.collapse-arrow>.collapse-title:after{content:"";transform-origin:75% 75%;pointer-events:none;top:1.9rem;width:.5rem;height:.5rem;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:block;position:absolute;inset-inline-end:1.4rem;transform:translateY(-100%)rotate(45deg);box-shadow:2px 2px}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:visible}.collapse{border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;width:100%;transition:grid-template-rows .2s;display:grid;position:relative;overflow:hidden}.collapse>input:is([type=checkbox],[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:is([open],:focus:not(.collapse-close)),.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],:focus:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible;min-height:fit-content}.collapse:focus-visible,.collapse:has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-close,.collapse[open])>.collapse-title{cursor:unset}.collapse:is([open],:focus:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse.collapse-open.collapse-plus>.collapse-title:after{content:"−"}.collapse.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{content:"−"}.collapse:is(details){width:100%}.collapse:is(details) summary{display:block;position:relative}.collapse:is(details) summary::-webkit-details-marker{display:none}.collapse:is(details) summary{outline:none}.collapse-content{visibility:hidden;min-height:0;cursor:unset;grid-row-start:2;grid-column-start:1;padding-left:1rem;padding-right:1rem;transition:visibility .2s,padding .2s ease-out,background-color .2s ease-out}.collapse{visibility:collapse}.visible{visibility:visible}.toggle{border:var(--border)solid currentColor;color:var(--input-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p),var(--radius-selector-max)) + min(var(--border),var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab,red,red)){.toggle{box-shadow:0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab,red,red)){.toggle{--input-color:color-mix(in oklab,var(--color-base-content)50%,#0000)}}.toggle{--toggle-p:calc(var(--size)*.125);--size:calc(var(--size-selector,.25rem)*6);width:calc((var(--size)*2) - (var(--border) + var(--toggle-p))*2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:none}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:none}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);height:100%;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab,red,red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000)}}.toggle:before{background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible,.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border)solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-block}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.table{border-radius:var(--radius-box);text-align:left;width:100%;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media (hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.steps{counter-reset:step;grid-auto-columns:1fr;grid-auto-flow:column;display:inline-grid;overflow:auto hidden}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);--tw-content:"";content:var(--tw-content);border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon,.steps .step:not(:has(.step-icon)):after{content:counter(step);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:3.40282e38px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after,.steps .step-neutral>.step-icon{--step-bg:var(--color-neutral);--step-fg:var(--color-neutral-content)}.steps .step-primary+.step-primary:before,.steps .step-primary:after,.steps .step-primary>.step-icon{--step-bg:var(--color-primary);--step-fg:var(--color-primary-content)}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after,.steps .step-secondary>.step-icon{--step-bg:var(--color-secondary);--step-fg:var(--color-secondary-content)}.steps .step-accent+.step-accent:before,.steps .step-accent:after,.steps .step-accent>.step-icon{--step-bg:var(--color-accent);--step-fg:var(--color-accent-content)}.steps .step-info+.step-info:before,.steps .step-info:after,.steps .step-info>.step-icon{--step-bg:var(--color-info);--step-fg:var(--color-info-content)}.steps .step-success+.step-success:before,.steps .step-success:after,.steps .step-success>.step-icon{--step-bg:var(--color-success);--step-fg:var(--color-success-content)}.steps .step-warning+.step-warning:before,.steps .step-warning:after,.steps .step-warning>.step-icon{--step-bg:var(--color-warning);--step-fg:var(--color-warning-content)}.steps .step-error+.step-error:before,.steps .step-error:after,.steps .step-error>.step-icon{--step-bg:var(--color-error);--step-fg:var(--color-error-content)}.range{-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem)*6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab,red,red)){.range{--range-bg:color-mix(in oklab,currentColor 10%,#0000)}}.range{cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));background-color:currentColor;position:relative;top:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab,red,red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size)*.5)}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p)solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));background-color:currentColor;position:relative;top:50%}@supports (color:color-mix(in lab,red,red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))}}.range:disabled{cursor:not-allowed;opacity:.3}.range\!{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;webkit-appearance:none!important;--range-thumb:var(--color-base-100)!important;--range-thumb-size:calc(var(--size-selector,.25rem)*6)!important;--range-progress:currentColor!important;--range-fill:1!important;--range-p:.25rem!important;--range-bg:currentColor!important}@supports (color:color-mix(in lab,red,red)){.range\!{--range-bg:color-mix(in oklab,currentColor 10%,#0000)!important}}.range\!{cursor:pointer!important;vertical-align:middle!important;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector))!important;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))!important;width:clamp(3rem,20rem,100%)!important;height:var(--range-thumb-size)!important;background-color:#0000!important;border:none!important;overflow:hidden!important}[dir=rtl] .range\!{--range-dir:-1!important}.range\!:focus{outline:none!important}.range\!:focus-visible{outline-offset:2px!important;outline:2px solid!important}.range\!::-webkit-slider-runnable-track{background-color:var(--range-bg)!important;border-radius:var(--radius-selector)!important;width:100%!important;height:calc(var(--range-thumb-size)*.5)!important}@media (forced-colors:active){.range\!::-webkit-slider-runnable-track{border:1px solid!important}.range\!::-moz-range-track{border:1px solid!important}}.range\!::-webkit-slider-thumb{box-sizing:border-box!important;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))!important;height:var(--range-thumb-size)!important;width:var(--range-thumb-size)!important;border:var(--range-p)solid!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;webkit-appearance:none!important;color:var(--range-progress)!important;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))!important;background-color:currentColor!important;position:relative!important;top:50%!important;transform:translateY(-50%)!important}@supports (color:color-mix(in lab,red,red)){.range\!::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))!important}}.range\!::-moz-range-track{background-color:var(--range-bg)!important;border-radius:var(--radius-selector)!important;width:100%!important;height:calc(var(--range-thumb-size)*.5)!important}.range\!::-moz-range-thumb{box-sizing:border-box!important;border-radius:calc(var(--radius-selector) + min(var(--range-p),var(--radius-selector-max)))!important;height:var(--range-thumb-size)!important;width:var(--range-thumb-size)!important;border:var(--range-p)solid!important;color:var(--range-progress)!important;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor,0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))!important;background-color:currentColor!important;position:relative!important;top:50%!important}@supports (color:color-mix(in lab,red,red)){.range\!::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000),0 0 0 2rem var(--range-thumb) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill))!important}}.range\!:disabled{cursor:not-allowed!important;opacity:.3!important}.tabs-border .tab{--tab-border-color:#0000 #0000 var(--tab-border-color)#0000;border-radius:var(--radius-field);position:relative}.tabs-border .tab:before{--tw-content:"";content:var(--tw-content);background-color:var(--tab-border-color);border-radius:var(--radius-field);width:80%;height:3px;transition:background-color .2s;position:absolute;bottom:0;left:10%}:is(.tabs-border .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-border .tab:is(input:checked),.tabs-border .tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:1rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border-radius:inherit;border-style:none;width:calc(100% + 2.75rem);height:calc(100% - 2px);margin-inline:-1rem -1.75rem;padding-inline:1rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}.timeline{display:flex;position:relative}.timeline>li{grid-template-rows:var(--timeline-row-start,minmax(0,1fr))auto var(--timeline-row-end,minmax(0,1fr));grid-template-columns:var(--timeline-col-start,minmax(0,1fr))auto var(--timeline-col-end,minmax(0,1fr));flex-shrink:0;align-items:center;display:grid;position:relative}.timeline>li>hr{border:none;width:100%}.timeline>li>hr:first-child{grid-row-start:2;grid-column-start:1}.timeline>li>hr:last-child{grid-area:2/3/auto/none}@media print{.timeline>li>hr{border:.1px solid var(--color-base-300)}}.timeline :where(hr){background-color:var(--color-base-300);height:.25rem}.timeline:has(.timeline-middle hr):first-child{border-start-start-radius:0;border-start-end-radius:var(--radius-selector);border-end-end-radius:var(--radius-selector);border-end-start-radius:0}.timeline:has(.timeline-middle hr):last-child,.timeline:not(:has(.timeline-middle)) :first-child hr:last-child{border-start-start-radius:var(--radius-selector);border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:var(--radius-selector)}.timeline:not(:has(.timeline-middle)) :last-child hr:first-child{border-start-start-radius:0;border-start-end-radius:var(--radius-selector);border-end-end-radius:var(--radius-selector);border-end-start-radius:0}.collapse-title{grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out;position:relative}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.checkbox:disabled{cursor:not-allowed;opacity:.2}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor;animation:.2s ease-out radio}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media (forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.radio:disabled{cursor:not-allowed;opacity:.2}.stats{border-radius:var(--radius-box);grid-auto-flow:column;display:inline-grid;position:relative;overflow-x:auto}.progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-box);background-color:currentColor;width:100%;height:.5rem;position:relative;overflow:hidden}@supports (color:color-mix(in lab,red,red)){.progress{background-color:color-mix(in oklab,currentColor 20%,transparent)}}.progress{color:var(--color-base-content)}.progress:indeterminate{background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}@supports ((-moz-appearance:none)){.progress:indeterminate::-moz-progress-bar{background-color:#0000;background-image:repeating-linear-gradient(90deg,currentColor -1% 10%,#0000 10% 90%);background-position-x:15%;background-size:200%;animation:5s ease-in-out infinite progress}.progress::-moz-progress-bar{border-radius:var(--radius-box);background-color:currentColor}}@supports ((-webkit-appearance:none)){.progress::-webkit-progress-bar{border-radius:var(--radius-box);background-color:#0000}.progress::-webkit-progress-value{border-radius:var(--radius-box);background-color:currentColor}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-12{top:calc(var(--spacing)*12)}.right-2{right:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.textarea{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;touch-action:manipulation;border-color:var(--input-color);width:clamp(3rem,20rem,100%);min-height:5rem;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem;font-size:.875rem}@supports (color:color-mix(in lab,red,red)){.textarea{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.textarea textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.z-10{z-index:10}.z-20{z-index:20}.tab-content{order:var(--tabcontent-order);--tabcontent-radius-ss:0;--tabcontent-radius-se:0;--tabcontent-radius-es:0;--tabcontent-radius-ee:0;--tabcontent-order:1;width:100%;margin:var(--tabcontent-margin);border-color:#0000;border-width:var(--border);border-start-start-radius:var(--tabcontent-radius-ss);border-start-end-radius:var(--tabcontent-radius-se);border-end-end-radius:var(--tabcontent-radius-ee);border-end-start-radius:var(--tabcontent-radius-es);display:none}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container\!{width:100%!important}@media (min-width:40rem){.container\!{max-width:40rem!important}}@media (min-width:48rem){.container\!{max-width:48rem!important}}@media (min-width:64rem){.container\!{max-width:64rem!important}}@media (min-width:80rem){.container\!{max-width:80rem!important}}@media (min-width:96rem){.container\!{max-width:96rem!important}}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{content:"×"}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset,.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset],.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.mx-auto{margin-inline:auto}.input-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-block:-.5rem;margin-inline-end:-.75rem}.my-4{margin-block:calc(var(--spacing)*4)}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentColor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-2{margin-right:calc(var(--spacing)*2)}.fieldset-legend{color:var(--color-base-content);justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:-.25rem;padding-block:.5rem;font-weight:600;display:flex}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab,red,red)){.status{background-color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab,red,red)){.status{color:#0000004d}@supports (color:color-mix(in lab,red,red)){.status{color:color-mix(in oklab,var(--color-black)30%,transparent)}}}.status{background-image:radial-gradient(circle at 35% 30%,oklch(1 0 0/calc(var(--depth)*.5)),#0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab,red,red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab,currentColor calc(var(--depth)*100%),#0000)}}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.fieldset{grid-template-columns:1fr;grid-auto-rows:max-content;gap:.375rem;padding-block:.25rem;font-size:.75rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-64{height:calc(var(--spacing)*64)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-\[80vh\]{max-height:80vh}.min-h-screen{min-height:100vh}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.w-4{width:calc(var(--spacing)*4)}.w-11\/12{width:91.6667%}.w-48{width:calc(var(--spacing)*48)}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-full{max-width:100%}.min-w-\[220px\]{min-width:220px}.min-w-max{min-width:max-content}.flex-1{flex:1}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-3{border-bottom-style:var(--tw-border-style);border-bottom-width:3px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-b-gray-700{border-bottom-color:var(--color-gray-700)}.bg-base-100{background-color:var(--color-base-100)}.bg-base-200{background-color:var(--color-base-200)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.radio-sm{padding:.1875rem}.radio-sm[type=radio]{--size:calc(var(--size-selector,.25rem)*5)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.py-1{padding-block:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-gray-400{color:var(--color-gray-400)}.text-primary{color:var(--color-primary)}.text-red-500{color:var(--color-red-500)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);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,)}.invert{--tw-invert:invert(100%);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,)}.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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hover\:bg-base-100:hover{background-color:var(--color-base-100)}.hover\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\:bg-base-300:hover{background-color:var(--color-base-300)}}@media (min-width:48rem){.md\:w-1\/2{width:50%}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-x-4{column-gap:calc(var(--spacing)*4)}}@media (min-width:64rem){.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes progress{50%{background-position-x:-115%}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes dropdown{0%{opacity:0}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} diff --git a/frontend/dist/assets/index-CwrBXUIs.css b/frontend/dist/assets/index-CwrBXUIs.css deleted file mode 100644 index e3fd9398c5b0e6cc6005e486db526cb0d07fdaec..0000000000000000000000000000000000000000 --- a/frontend/dist/assets/index-CwrBXUIs.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-700:oklch(37.3% .034 259.733);--spacing:.25rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:where(:root),:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:root{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:root:has(input.theme-controller[value=light]:checked),[data-theme=light]{color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(98% 0 0);--color-base-300:oklch(95% 0 0);--color-base-content:oklch(21% .006 285.885);--color-primary:oklch(45% .24 277.023);--color-primary-content:oklch(93% .034 272.788);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:root:has(input.theme-controller[value=dark]:checked),[data-theme=dark]{color-scheme:dark;--color-base-100:oklch(25.33% .016 252.42);--color-base-200:oklch(23.26% .014 253.1);--color-base-300:oklch(21.15% .012 254.09);--color-base-content:oklch(97.807% .029 256.847);--color-primary:oklch(58% .233 277.117);--color-primary-content:oklch(96% .018 272.314);--color-secondary:oklch(65% .241 354.308);--color-secondary-content:oklch(94% .028 342.258);--color-accent:oklch(77% .152 181.912);--color-accent-content:oklch(38% .063 188.416);--color-neutral:oklch(14% .005 285.823);--color-neutral-content:oklch(92% .004 286.32);--color-info:oklch(74% .16 232.661);--color-info-content:oklch(29% .066 243.157);--color-success:oklch(76% .177 163.223);--color-success-content:oklch(37% .077 168.94);--color-warning:oklch(82% .189 84.429);--color-warning-content:oklch(41% .112 45.904);--color-error:oklch(71% .194 13.428);--color-error-content:oklch(27% .105 12.094);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@property --radialprogress{syntax: ""; inherits: true; initial-value: 0%;}:root{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab,red,red)){:root{scrollbar-color:color-mix(in oklch,currentColor 35%,#0000)#0000}}:root{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E")}:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not([class*=drawer-open])>.drawer-toggle:checked){overflow:hidden}:where(:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not(.drawer-open)>.drawer-toggle:checked)){scrollbar-gutter:stable;background-image:linear-gradient(var(--color-base-100),var(--color-base-100));--root-bg:var(--color-base-100)}@supports (color:color-mix(in lab,red,red)){:where(:root:has(.modal-open,.modal[open],.modal:target,.modal-toggle:checked,.drawer:not(.drawer-open)>.drawer-toggle:checked)){--root-bg:color-mix(in srgb,var(--color-base-100),oklch(0% 0 0) 40%)}}:where(.modal[open],.modal-open,.modal-toggle:checked+.modal):not(.modal-start,.modal-end){scrollbar-gutter:stable}:root,[data-theme]{background-color:var(--root-bg,var(--color-base-100));color:var(--color-base-content)}}@layer components;@layer utilities{.diff{webkit-user-select:none;-webkit-user-select:none;user-select:none;direction:ltr;grid-template-columns:auto 1fr;width:100%;display:grid;position:relative;overflow:hidden;container-type:inline-size}.diff:focus-visible,.diff:has(.diff-item-1:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px;outline-color:var(--color-base-content)}.diff:focus-visible .diff-resizer{min-width:90cqi;max-width:90cqi}.diff:has(.diff-item-2:focus-visible){outline-style:var(--tw-outline-style);outline-offset:1px;outline-width:2px}.diff:has(.diff-item-2:focus-visible) .diff-resizer{min-width:10cqi;max-width:10cqi}@supports (-webkit-overflow-scrolling:touch) and (overflow:-webkit-paged-x){.diff:focus .diff-resizer{min-width:10cqi;max-width:10cqi}.diff:has(.diff-item-1:focus) .diff-resizer{min-width:90cqi;max-width:90cqi}}.tab{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:1rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));order:var(--tab-order);height:var(--tab-height);border-color:#0000;padding-inline-start:var(--tab-p);padding-inline-end:var(--tab-p);font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{content:attr(aria-label)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;top:0;right:0;bottom:0;left:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true]))+.tab-content{height:calc(100% - var(--tab-height) + var(--border));display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true]){color:color-mix(in oklab,var(--color-base-content)50%,transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem)*6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:visible}.collapse{border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;width:100%;transition:grid-template-rows .2s;display:grid;position:relative;overflow:hidden}.collapse>input:is([type=checkbox],[type=radio]){-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:is([open],:focus:not(.collapse-close)),.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],:focus:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible;min-height:fit-content}.collapse:focus-visible,.collapse:has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-close,.collapse[open])>.collapse-title{cursor:unset}.collapse:is([open],:focus:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse.collapse-open.collapse-plus>.collapse-title:after{content:"−"}.collapse.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{content:"−"}.collapse:is(details){width:100%}.collapse:is(details) summary{display:block;position:relative}.collapse:is(details) summary::-webkit-details-marker{display:none}.collapse:is(details) summary{outline:none}.collapse{visibility:collapse}.visible{visibility:visible}.toggle{border:var(--border)solid currentColor;color:var(--input-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p),var(--radius-selector-max)) + min(var(--border),var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab,red,red)){.toggle{box-shadow:0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab,red,red)){.toggle{--input-color:color-mix(in oklab,var(--color-base-content)50%,#0000)}}.toggle{--toggle-p:calc(var(--size)*.125);--size:calc(var(--size-selector,.25rem)*6);width:calc((var(--size)*2) - (var(--border) + var(--toggle-p))*2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:none}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:none}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);height:100%;box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab,red,red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px color-mix(in oklab,currentColor calc(var(--depth)*10%),#0000)}}.toggle:before{background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible,.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border)solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.input{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.input{--size:calc(var(--size-field,.25rem)*10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.input:where(input){display:inline-flex}.input :where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-block}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.input:has(>input[disabled]),.input:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.input:has(>input[disabled]),.input:is(:disabled,[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.table{border-radius:var(--radius-box);text-align:left;width:100%;font-size:.875rem;position:relative}.table:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}@media (hover:hover){:is(.table tr.row-hover,.table tr.row-hover:nth-child(2n)):hover{background-color:var(--color-base-200)}}.table :where(th,td){vertical-align:middle;padding-block:.75rem;padding-inline:1rem}.table :where(thead,tfoot){white-space:nowrap;color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead,tfoot){color:color-mix(in oklab,var(--color-base-content)60%,transparent)}}.table :where(thead,tfoot){font-size:.875rem;font-weight:600}.table :where(tfoot){border-top:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(tfoot){border-top:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.table :where(.table-pin-rows thead tr){z-index:1;background-color:var(--color-base-100);position:sticky;top:0}.table :where(.table-pin-rows tfoot tr){z-index:1;background-color:var(--color-base-100);position:sticky;bottom:0}.table :where(.table-pin-cols tr th){background-color:var(--color-base-100);position:sticky;left:0;right:0}.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.table :where(thead tr,tbody tr:not(:last-child)){border-bottom:var(--border)solid color-mix(in oklch,var(--color-base-content)5%,#0000)}}.tabs-border .tab{--tab-border-color:#0000 #0000 var(--tab-border-color)#0000;border-radius:var(--radius-field);position:relative}.tabs-border .tab:before{--tw-content:"";content:var(--tw-content);background-color:var(--tab-border-color);border-radius:var(--radius-field);width:80%;height:3px;transition:background-color .2s;position:absolute;bottom:0;left:10%}:is(.tabs-border .tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled,[disabled]),.tabs-border .tab:is(input:checked),.tabs-border .tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.select{border:var(--border)solid #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);height:var(--size);touch-action:manipulation;text-overflow:ellipsis;box-shadow:0 1px var(--input-color) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.375rem;padding-inline:1rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab,red,red)){.select{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000) inset,0 -1px oklch(100% 0 0/calc(var(--depth)*.1)) inset}}.select{border-color:var(--input-color);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select{--input-color:color-mix(in oklab,var(--color-base-content)20%,#0000)}}.select{--size:calc(var(--size-field,.25rem)*10)}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}.select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:inherit;border-radius:inherit;border-style:none;width:calc(100% + 2.75rem);height:calc(100% - 2px);margin-inline:-1rem -1.75rem;padding-inline:1rem 1.75rem}.select select:focus,.select select:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.select select:focus,.select select:focus-within{outline-offset:2px;outline:2px solid #0000}}.select select:not(:last-child){background-image:none;margin-inline-end:-1.375rem}.select:focus,.select:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab,red,red)){.select:focus,.select:focus-within{box-shadow:0 1px color-mix(in oklab,var(--input-color)calc(var(--depth)*10%),#0000)}}.select:focus,.select:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select:has(>select[disabled]),.select:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){.select:has(>select[disabled]),.select:is(:disabled,[disabled]){color:color-mix(in oklab,var(--color-base-content)40%,transparent)}}:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab,red,red)){:is(.select:has(>select[disabled]),.select:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab,var(--color-base-content)20%,transparent)}}.select:has(>select[disabled])>select[disabled]{cursor:not-allowed}.checkbox{border:var(--border)solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab,red,red)){.checkbox{border:var(--border)solid var(--input-color,color-mix(in oklab,var(--color-base-content)20%,#0000))}}.checkbox{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 0 #0000 inset,0 0 #0000;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0 3px oklch(100% 0 0/calc(var(--depth)*.1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:none}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:none}.checkbox:disabled{cursor:not-allowed;opacity:.2}.radio{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;vertical-align:middle;border:var(--border)solid var(--input-color,currentColor);border-radius:3.40282e38px;flex-shrink:0;padding:.25rem;display:inline-block;position:relative}@supports (color:color-mix(in lab,red,red)){.radio{border:var(--border)solid var(--input-color,color-mix(in srgb,currentColor 20%,#0000))}}.radio{box-shadow:0 1px oklch(0% 0 0/calc(var(--depth)*.1)) inset;--size:calc(var(--size-selector,.25rem)*6);width:var(--size);height:var(--size);color:var(--input-color,currentColor)}.radio:before{--tw-content:"";content:var(--tw-content);background-size:auto,calc(var(--noise)*100%);background-image:none,var(--fx-noise);border-radius:3.40282e38px;width:100%;height:100%;display:block}.radio:focus-visible{outline:2px solid}.radio:checked,.radio[aria-checked=true]{background-color:var(--color-base-100);border-color:currentColor;animation:.2s ease-out radio}:is(.radio:checked,.radio[aria-checked=true]):before{box-shadow:0 -1px oklch(0% 0 0/calc(var(--depth)*.1)) inset,0 8px 0 -4px oklch(100% 0 0/calc(var(--depth)*.1)) inset,0 1px oklch(0% 0 0/calc(var(--depth)*.1));background-color:currentColor}@media (forced-colors:active){:is(.radio:checked,.radio[aria-checked=true]):before{outline-style:var(--tw-outline-style);outline-offset:-1px;outline-width:1px}}@media print{:is(.radio:checked,.radio[aria-checked=true]):before{outline-offset:-1rem;outline:.25rem solid}}.radio:disabled{cursor:not-allowed;opacity:.2}.stats{border-radius:var(--radius-box);grid-auto-flow:column;display:inline-grid;position:relative;overflow-x:auto}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:calc(var(--spacing)*0)}.top-1\/2{top:50%}.top-12{top:calc(var(--spacing)*12)}.right-2{right:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.z-20{z-index:20}.tab-content{order:var(--tabcontent-order);--tabcontent-radius-ss:0;--tabcontent-radius-se:0;--tabcontent-radius-es:0;--tabcontent-radius-ee:0;--tabcontent-order:1;width:100%;margin:var(--tabcontent-margin);border-color:#0000;border-width:var(--border);border-start-start-radius:var(--tabcontent-radius-ss);border-start-end-radius:var(--tabcontent-radius-se);border-end-end-radius:var(--tabcontent-radius-ee);border-end-start-radius:var(--tabcontent-radius-es);display:none}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{content:"×"}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset,.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset],.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.mx-auto{margin-inline:auto}.input-sm{--size:calc(var(--size-field,.25rem)*8);font-size:.75rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-block:-.5rem;margin-inline-end:-.75rem}.my-4{margin-block:calc(var(--spacing)*4)}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab,red,red)){.label{color:color-mix(in oklab,currentColor 60%,transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab,red,red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border)solid color-mix(in oklab,currentColor 10%,#0000)}}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-2{margin-right:calc(var(--spacing)*2)}.fieldset-legend{color:var(--color-base-content);justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:-.25rem;padding-block:.5rem;font-weight:600;display:flex}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem)*10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.fieldset{grid-template-columns:1fr;grid-auto-rows:max-content;gap:.375rem;padding-block:.25rem;font-size:.75rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.flex{display:flex}.grid{display:grid}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-64{height:calc(var(--spacing)*64)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-\[80vh\]{max-height:80vh}.min-h-screen{min-height:100vh}.loading-lg{width:calc(var(--size-selector,.25rem)*7)}.w-4{width:calc(var(--spacing)*4)}.w-11\/12{width:91.6667%}.w-48{width:calc(var(--spacing)*48)}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-full{max-width:100%}.min-w-\[220px\]{min-width:220px}.min-w-max{min-width:max-content}.flex-1{flex:1}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.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))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-700{border-color:var(--color-gray-700)}.border-b-gray-700{border-bottom-color:var(--color-gray-700)}.bg-base-100{background-color:var(--color-base-100)}.bg-base-200{background-color:var(--color-base-200)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.radio-sm{padding:.1875rem}.radio-sm[type=radio]{--size:calc(var(--size-selector,.25rem)*5)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.py-1{padding-block:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-gray-400{color:var(--color-gray-400)}.text-primary{color:var(--color-primary)}.text-red-500{color:var(--color-red-500)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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,)}@media (hover:hover){.hover\:bg-base-100:hover{background-color:var(--color-base-100)}.hover\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\:bg-base-300:hover{background-color:var(--color-base-300)}}@media (min-width:48rem){.md\:w-1\/2{width:50%}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-x-4{column-gap:calc(var(--spacing)*4)}}@media (min-width:64rem){.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes progress{50%{background-position-x:-115%}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes dropdown{0%{opacity:0}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/frontend/dist/assets/index-D2ksG3qQ.js b/frontend/dist/assets/index-D2ksG3qQ.js new file mode 100644 index 0000000000000000000000000000000000000000..92333b8067871939e38e3ab60353599faa4e9eb8 --- /dev/null +++ b/frontend/dist/assets/index-D2ksG3qQ.js @@ -0,0 +1,180 @@ +(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 Il=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 L1={exports:{}},Xs={},R1={exports:{}},se={};/** + * @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 ml=Symbol.for("react.element"),EP=Symbol.for("react.portal"),$P=Symbol.for("react.fragment"),TP=Symbol.for("react.strict_mode"),jP=Symbol.for("react.profiler"),CP=Symbol.for("react.provider"),kP=Symbol.for("react.context"),MP=Symbol.for("react.forward_ref"),NP=Symbol.for("react.suspense"),IP=Symbol.for("react.memo"),DP=Symbol.for("react.lazy"),Dy=Symbol.iterator;function LP(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var B1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z1=Object.assign,F1={};function ga(e,t,r){this.props=e,this.context=t,this.refs=F1,this.updater=r||B1}ga.prototype.isReactComponent={};ga.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")};ga.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function W1(){}W1.prototype=ga.prototype;function Eh(e,t,r){this.props=e,this.context=t,this.refs=F1,this.updater=r||B1}var $h=Eh.prototype=new W1;$h.constructor=Eh;z1($h,ga.prototype);$h.isPureReactComponent=!0;var Ly=Array.isArray,U1=Object.prototype.hasOwnProperty,Th={current:null},H1={key:!0,ref:!0,__self:!0,__source:!0};function V1(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)U1.call(t,n)&&!H1.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1>>1,V=C[Y];if(0>>1;Yi(Se,W))mei(F,Se)?(C[Y]=F,C[me]=W,Y=me):(C[Y]=Se,C[le]=W,Y=le);else if(mei(F,W))C[Y]=F,C[me]=W,Y=me;else break e}}return D}function i(C,D){var W=C.sortIndex-D.sortIndex;return W!==0?W:C.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],s=[],f=1,c=null,d=3,p=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(C){for(var D=r(s);D!==null;){if(D.callback===null)n(s);else if(D.startTime<=C)n(s),D.sortIndex=D.expirationTime,t(u,D);else break;D=r(s)}}function S(C){if(b=!1,h(C),!v)if(r(u)!==null)v=!0,z(m);else{var D=r(s);D!==null&&U(S,D.startTime-C)}}function m(C,D){v=!1,b&&(b=!1,g(_),_=-1),p=!0;var W=d;try{for(h(D),c=r(u);c!==null&&(!(c.expirationTime>D)||C&&!$());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,d=c.priorityLevel;var V=Y(c.expirationTime<=D);D=e.unstable_now(),typeof V=="function"?c.callback=V:c===r(u)&&n(u),h(D)}else n(u);c=r(u)}if(c!==null)var re=!0;else{var le=r(s);le!==null&&U(S,le.startTime-D),re=!1}return re}finally{c=null,d=W,p=!1}}var x=!1,O=null,_=-1,P=5,T=-1;function $(){return!(e.unstable_now()-TC||125Y?(C.sortIndex=W,t(s,C),r(u)===null&&C===r(s)&&(b?(g(_),_=-1):b=!0,U(S,W-Y))):(C.sortIndex=V,t(u,C),v||p||(v=!0,z(m))),C},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(C){var D=d;return function(){var W=d;d=D;try{return C.apply(this,arguments)}finally{d=W}}}})(Y1);X1.exports=Y1;var qP=X1.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 XP=N,Bt=qP;function G(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"),ld=Object.prototype.hasOwnProperty,YP=/^[: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]*$/,By={},zy={};function QP(e){return ld.call(zy,e)?!0:ld.call(By,e)?!1:YP.test(e)?zy[e]=!0:(By[e]=!0,!1)}function ZP(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 JP(e,t,r,n){if(t===null||typeof t>"u"||ZP(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 Ot(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 st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new Ot(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){st[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ch=/[\-:]([a-z])/g;function kh(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(Ch,kh);st[t]=new Ot(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(Ch,kh);st[t]=new Ot(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(Ch,kh);st[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mh(e,t,r,n){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:n||!(2l||i[o]!==a[l]){var u=` +`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{af=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Za(e):""}function eA(e){switch(e.tag){case 5:return Za(e.type);case 16:return Za("Lazy");case 13:return Za("Suspense");case 19:return Za("SuspenseList");case 0:case 2:case 15:return e=of(e.type,!1),e;case 11:return e=of(e.type.render,!1),e;case 1:return e=of(e.type,!0),e;default:return""}}function fd(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 wi:return"Fragment";case bi:return"Portal";case ud:return"Profiler";case Nh:return"StrictMode";case sd:return"Suspense";case cd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case J1:return(e.displayName||"Context")+".Consumer";case Z1:return(e._context.displayName||"Context")+".Provider";case Ih:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dh:return t=e.displayName||null,t!==null?t:fd(e.type)||"Memo";case rn:t=e._payload,e=e._init;try{return fd(e(t))}catch{}}return null}function tA(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 fd(t);case 8:return t===Nh?"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 Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rA(e){var t=tw(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 Rl(e){e._valueTracker||(e._valueTracker=rA(e))}function rw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=tw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Au(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 dd(e,t){var r=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Wy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Sn(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 nw(e,t){t=t.checked,t!=null&&Mh(e,"checked",t,!1)}function pd(e,t){nw(e,t);var r=Sn(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")?hd(e,t.type,r):t.hasOwnProperty("defaultValue")&&hd(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uy(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 hd(e,t,r){(t!=="number"||Au(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ja=Array.isArray;function Ni(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var io={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},nA=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){nA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function lw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function uw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var iA=Le({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 md(e,t){if(t){if(iA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function gd(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 bd=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wd=null,Ii=null,Di=null;function Gy(e){if(e=wl(e)){if(typeof wd!="function")throw Error(G(280));var t=e.stateNode;t&&(t=ec(t),wd(e.stateNode,e.type,t))}}function sw(e){Ii?Di?Di.push(e):Di=[e]:Ii=e}function cw(){if(Ii){var e=Ii,t=Di;if(Di=Ii=null,Gy(e),t)for(e=0;e>>=0,e===0?32:31-(vA(e)/yA|0)|0}var zl=64,Fl=4194304;function eo(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 ju(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 l=o&~i;l!==0?n=eo(l):(a&=o,a!==0&&(n=eo(a)))}else o=r&~i,o!==0?n=eo(o):a!==0&&(n=eo(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 gl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yr(t),e[t]=r}function wA(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=oo),tm=" ",rm=!1;function jw(e,t){switch(e){case"keyup":return qA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xi=!1;function YA(e,t){switch(e){case"compositionend":return Cw(t);case"keypress":return t.which!==32?null:(rm=!0,tm);case"textInput":return e=t.data,e===tm&&rm?null:e;default:return null}}function QA(e,t){if(xi)return e==="compositionend"||!Vh&&jw(e,t)?(e=$w(),mu=Wh=sn=null,xi=!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=om(r)}}function Iw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dw(){for(var e=window,t=Au();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Au(e.document)}return t}function Gh(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 oE(e){var t=Dw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Iw(r.ownerDocument.documentElement,r)){if(n!==null&&Gh(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=lm(r,a);var o=lm(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,Si=null,Ad=null,uo=null,Ed=!1;function um(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ed||Si==null||Si!==Au(n)||(n=Si,"selectionStart"in n&&Gh(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}),uo&&Ao(uo,n)||(uo=n,n=Mu(Ad,"onSelect"),0Pi||(e.current=Md[Pi],Md[Pi]=null,Pi--)}function $e(e,t){Pi++,Md[Pi]=e.current,e.current=t}var On={},yt=Pn(On),$t=Pn(!1),Qn=On;function Hi(e,t){var r=e.type.contextTypes;if(!r)return On;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 Tt(e){return e=e.childContextTypes,e!=null}function Iu(){ke($t),ke(yt)}function vm(e,t,r){if(yt.current!==On)throw Error(G(168));$e(yt,t),$e($t,r)}function Vw(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(G(108,tA(e)||"Unknown",i));return Le({},r,n)}function Du(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,Qn=yt.current,$e(yt,e),$e($t,$t.current),!0}function ym(e,t,r){var n=e.stateNode;if(!n)throw Error(G(169));r?(e=Vw(e,t,Qn),n.__reactInternalMemoizedMergedChildContext=e,ke($t),ke(yt),$e(yt,e)):ke($t),$e($t,r)}var Mr=null,tc=!1,wf=!1;function Gw(e){Mr===null?Mr=[e]:Mr.push(e)}function gE(e){tc=!0,Gw(e)}function An(){if(!wf&&Mr!==null){wf=!0;var e=0,t=we;try{var r=Mr;for(we=1;e>=o,i-=o,Nr=1<<32-yr(t)+i|r<_?(P=O,O=null):P=O.sibling;var T=d(g,O,h[_],S);if(T===null){O===null&&(O=P);break}e&&O&&T.alternate===null&&t(g,O),y=a(T,y,_),x===null?m=T:x.sibling=T,x=T,O=P}if(_===h.length)return r(g,O),Me&&Nn(g,_),m;if(O===null){for(;__?(P=O,O=null):P=O.sibling;var $=d(g,O,T.value,S);if($===null){O===null&&(O=P);break}e&&O&&$.alternate===null&&t(g,O),y=a($,y,_),x===null?m=$:x.sibling=$,x=$,O=P}if(T.done)return r(g,O),Me&&Nn(g,_),m;if(O===null){for(;!T.done;_++,T=h.next())T=c(g,T.value,S),T!==null&&(y=a(T,y,_),x===null?m=T:x.sibling=T,x=T);return Me&&Nn(g,_),m}for(O=n(g,O);!T.done;_++,T=h.next())T=p(O,g,_,T.value,S),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?_:T.key),y=a(T,y,_),x===null?m=T:x.sibling=T,x=T);return e&&O.forEach(function(j){return t(g,j)}),Me&&Nn(g,_),m}function w(g,y,h,S){if(typeof h=="object"&&h!==null&&h.type===wi&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ll:e:{for(var m=h.key,x=y;x!==null;){if(x.key===m){if(m=h.type,m===wi){if(x.tag===7){r(g,x.sibling),y=i(x,h.props.children),y.return=g,g=y;break e}}else if(x.elementType===m||typeof m=="object"&&m!==null&&m.$$typeof===rn&&bm(m)===x.type){r(g,x.sibling),y=i(x,h.props),y.ref=Ba(g,x,h),y.return=g,g=y;break e}r(g,x);break}else t(g,x);x=x.sibling}h.type===wi?(y=Kn(h.props.children,g.mode,S,h.key),y.return=g,g=y):(S=Pu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ba(g,y,h),S.return=g,g=S)}return o(g);case bi:e:{for(x=h.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===h.containerInfo&&y.stateNode.implementation===h.implementation){r(g,y.sibling),y=i(y,h.children||[]),y.return=g,g=y;break e}else{r(g,y);break}else t(g,y);y=y.sibling}y=$f(h,g.mode,S),y.return=g,g=y}return o(g);case rn:return x=h._init,w(g,y,x(h._payload),S)}if(Ja(h))return v(g,y,h,S);if(Na(h))return b(g,y,h,S);ql(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,y!==null&&y.tag===6?(r(g,y.sibling),y=i(y,h),y.return=g,g=y):(r(g,y),y=Ef(h,g.mode,S),y.return=g,g=y),o(g)):r(g,y)}return w}var Gi=Yw(!0),Qw=Yw(!1),Bu=Pn(null),zu=null,$i=null,Yh=null;function Qh(){Yh=$i=zu=null}function Zh(e){var t=Bu.current;ke(Bu),e._currentValue=t}function Dd(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 Ri(e,t){zu=e,Yh=$i=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function er(e){var t=e._currentValue;if(Yh!==e)if(e={context:e,memoizedValue:t,next:null},$i===null){if(zu===null)throw Error(G(308));$i=e,zu.dependencies={lanes:0,firstContext:e}}else $i=$i.next=e;return t}var zn=null;function Jh(e){zn===null?zn=[e]:zn.push(e)}function Zw(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Jh(t)):(r.next=i.next,i.next=r),t.interleaved=r,Vr(e,n)}function Vr(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 nn=!1;function ev(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jw(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 Br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,pe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Vr(e,r)}return i=n.interleaved,i===null?(t.next=t,Jh(n)):(t.next=i.next,i.next=t),n.interleaved=t,Vr(e,r)}function bu(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,Bh(e,r)}}function wm(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 Fu(e,t,r,n){var i=e.updateQueue;nn=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,s=u.next;u.next=null,o===null?a=s:o.next=s,o=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=s:l.next=s,f.lastBaseUpdate=u))}if(a!==null){var c=i.baseState;o=0,f=s=u=null,l=a;do{var d=l.lane,p=l.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,b=l;switch(d=t,p=r,b.tag){case 1:if(v=b.payload,typeof v=="function"){c=v.call(p,c,d);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,d=typeof v=="function"?v.call(p,c,d):v,d==null)break e;c=Le({},c,d);break e;case 2:nn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(s=f=p,u=c):f=f.next=p,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(u=c),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,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);ei|=o,e.lanes=o,e.memoizedState=c}}function xm(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Sf.transition;Sf.transition={};try{e(!1),t()}finally{we=r,Sf.transition=n}}function yx(){return tr().memoizedState}function SE(e,t,r){var n=gn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mx(e))gx(t,r);else if(r=Zw(e,t,r,n),r!==null){var i=xt();mr(r,e,n,i),bx(r,t,n)}}function OE(e,t,r){var n=gn(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mx(e))gx(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,l=a(o,r);if(i.hasEagerState=!0,i.eagerState=l,gr(l,o)){var u=t.interleaved;u===null?(i.next=i,Jh(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=Zw(e,t,i,n),r!==null&&(i=xt(),mr(r,e,n,i),bx(r,t,n))}}function mx(e){var t=e.alternate;return e===De||t!==null&&t===De}function gx(e,t){so=Uu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function bx(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bh(e,r)}}var Hu={readContext:er,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},_E={readContext:er,useCallback:function(e,t){return xr().memoizedState=[e,t===void 0?null:t],e},useContext:er,useEffect:Om,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,xu(4194308,4,fx.bind(null,t,e),r)},useLayoutEffect:function(e,t){return xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return xu(4,2,e,t)},useMemo:function(e,t){var r=xr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=xr();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=SE.bind(null,De,e),[n.memoizedState,e]},useRef:function(e){var t=xr();return e={current:e},t.memoizedState=e},useState:Sm,useDebugValue:uv,useDeferredValue:function(e){return xr().memoizedState=e},useTransition:function(){var e=Sm(!1),t=e[0];return e=xE.bind(null,e[1]),xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=De,i=xr();if(Me){if(r===void 0)throw Error(G(407));r=r()}else{if(r=t(),rt===null)throw Error(G(349));Jn&30||nx(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Om(ax.bind(null,n,a,e),[e]),n.flags|=2048,No(9,ix.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=xr(),t=rt.identifierPrefix;if(Me){var r=Ir,n=Nr;r=(n&~(1<<32-yr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ko++,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[Or]=t,e[To]=n,Tx(e,t,!1,!1),t.stateNode=e;e:{switch(o=gd(r,n),r){case"dialog":Te("cancel",e),Te("close",e),i=n;break;case"iframe":case"object":case"embed":Te("load",e),i=n;break;case"video":case"audio":for(i=0;iXi&&(t.flags|=128,n=!0,za(a,!1),t.lanes=4194304)}else{if(!n)if(e=Wu(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),za(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Me)return ft(t),null}else 2*Fe()-a.renderingStartTime>Xi&&r!==1073741824&&(t.flags|=128,n=!0,za(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=Fe(),t.sibling=null,r=Ie.current,$e(Ie,n?r&1|2:r&1),t):(ft(t),null);case 22:case 23:return hv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Nt&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function kE(e,t){switch(qh(t),t.tag){case 1:return Tt(t.type)&&Iu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(),ke($t),ke(yt),nv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rv(t),null;case 13:if(ke(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Ie),null;case 4:return Ki(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return hv(),null;case 24:return null;default:return null}}var Yl=!1,pt=!1,ME=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Ti(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Re(e,t,n)}else r.current=null}function Vd(e,t,r){try{r()}catch(n){Re(e,t,n)}}var Nm=!1;function NE(e,t){if($d=Cu,e=Dw(),Gh(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,l=-1,u=-1,s=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(l=o+i),c!==a||n!==0&&c.nodeType!==3||(u=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++s===i&&(l=o),d===a&&++f===n&&(u=o),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Td={focusedElem:e,selectionRange:r},Cu=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;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 b=v.memoizedProps,w=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?b:ur(t.type,b),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(S){Re(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return v=Nm,Nm=!1,v}function co(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&&Vd(t,r,a)}i=i.next}while(i!==n)}}function ic(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 Gd(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 kx(e){var t=e.alternate;t!==null&&(e.alternate=null,kx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Or],delete t[To],delete t[kd],delete t[yE],delete t[mE])),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 Mx(e){return e.tag===5||e.tag===3||e.tag===4}function Im(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mx(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 Kd(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=Nu));else if(n!==4&&(e=e.child,e!==null))for(Kd(e,t,r),e=e.sibling;e!==null;)Kd(e,t,r),e=e.sibling}function qd(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(qd(e,t,r),e=e.sibling;e!==null;)qd(e,t,r),e=e.sibling}var at=null,sr=!1;function tn(e,t,r){for(r=r.child;r!==null;)Nx(e,t,r),r=r.sibling}function Nx(e,t,r){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(Ys,r)}catch{}switch(r.tag){case 5:pt||Ti(r,t);case 6:var n=at,i=sr;at=null,tn(e,t,r),at=n,sr=i,at!==null&&(sr?(e=at,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):at.removeChild(r.stateNode));break;case 18:at!==null&&(sr?(e=at,r=r.stateNode,e.nodeType===8?bf(e.parentNode,r):e.nodeType===1&&bf(e,r),_o(e)):bf(at,r.stateNode));break;case 4:n=at,i=sr,at=r.stateNode.containerInfo,sr=!0,tn(e,t,r),at=n,sr=i;break;case 0:case 11:case 14:case 15:if(!pt&&(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)&&Vd(r,t,o),i=i.next}while(i!==n)}tn(e,t,r);break;case 1:if(!pt&&(Ti(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Re(r,t,l)}tn(e,t,r);break;case 21:tn(e,t,r);break;case 22:r.mode&1?(pt=(n=pt)||r.memoizedState!==null,tn(e,t,r),pt=n):tn(e,t,r);break;default:tn(e,t,r)}}function Dm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ME),t.forEach(function(n){var i=UE.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function or(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Fe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DE(n/1960))-n,10e?16:e,cn===null)var n=!1;else{if(e=cn,cn=null,Ku=0,pe&6)throw Error(G(331));var i=pe;for(pe|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var l=a.deletions;if(l!==null){for(var u=0;uFe()-dv?Gn(e,0):fv|=r),jt(e,t)}function Wx(e,t){t===0&&(e.mode&1?(t=Fl,Fl<<=1,!(Fl&130023424)&&(Fl=4194304)):t=1);var r=xt();e=Vr(e,t),e!==null&&(gl(e,t,r),jt(e,r))}function WE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Wx(e,r)}function UE(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(G(314))}n!==null&&n.delete(t),Wx(e,r)}var Ux;Ux=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||$t.current)At=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return At=!1,jE(e,t,r);At=!!(e.flags&131072)}else At=!1,Me&&t.flags&1048576&&Kw(t,Ru,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Su(e,t),e=t.pendingProps;var i=Hi(t,yt.current);Ri(t,r),i=av(null,t,n,e,i,r);var a=ov();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,Tt(n)?(a=!0,Du(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ev(t),i.updater=nc,t.stateNode=i,i._reactInternals=t,Rd(t,n,e,r),t=Fd(null,t,n,!0,a,r)):(t.tag=0,Me&&a&&Kh(t),bt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Su(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=VE(n),e=ur(n,e),i){case 0:t=zd(null,t,n,e,r);break e;case 1:t=Cm(null,t,n,e,r);break e;case 11:t=Tm(null,t,n,e,r);break e;case 14:t=jm(null,t,n,ur(n.type,e),r);break e}throw Error(G(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),zd(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Cm(e,t,n,i,r);case 3:e:{if(Ax(t),e===null)throw Error(G(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Jw(e,t),Fu(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=qi(Error(G(423)),t),t=km(e,t,n,r,i);break e}else if(n!==i){i=qi(Error(G(424)),t),t=km(e,t,n,r,i);break e}else for(Lt=vn(t.stateNode.containerInfo.firstChild),Rt=t,Me=!0,dr=null,r=Qw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Vi(),n===i){t=Gr(e,t,r);break e}bt(e,t,n,r)}t=t.child}return t;case 5:return ex(t),e===null&&Id(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,jd(n,i)?o=null:a!==null&&jd(n,a)&&(t.flags|=32),Px(e,t),bt(e,t,o,r),t.child;case 6:return e===null&&Id(t),null;case 13:return Ex(e,t,r);case 4:return tv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Gi(t,null,n,r):bt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Tm(e,t,n,i,r);case 7:return bt(e,t,t.pendingProps,r),t.child;case 8:return bt(e,t,t.pendingProps.children,r),t.child;case 12:return bt(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,$e(Bu,n._currentValue),n._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!$t.current){t=Gr(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=Br(-1,r&-r),u.tag=2;var s=a.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),Dd(a.return,r,t),l.lanes|=r;break}u=u.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(G(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Dd(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}bt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ri(t,r),i=er(i),n=n(i),t.flags|=1,bt(e,t,n,r),t.child;case 14:return n=t.type,i=ur(n,t.pendingProps),i=ur(n.type,i),jm(e,t,n,i,r);case 15:return Ox(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Su(e,t),t.tag=1,Tt(n)?(e=!0,Du(t)):e=!1,Ri(t,r),wx(t,n,i),Rd(t,n,i,r),Fd(null,t,n,!0,e,r);case 19:return $x(e,t,r);case 22:return _x(e,t,r)}throw Error(G(156,t.tag))};function Hx(e,t){return mw(e,t)}function HE(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 Xt(e,t,r,n){return new HE(e,t,r,n)}function yv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function VE(e){if(typeof e=="function")return yv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ih)return 11;if(e===Dh)return 14}return 2}function bn(e,t){var r=e.alternate;return r===null?(r=Xt(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 Pu(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")yv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case wi:return Kn(r.children,i,a,t);case Nh:o=8,i|=8;break;case ud:return e=Xt(12,r,t,i|2),e.elementType=ud,e.lanes=a,e;case sd:return e=Xt(13,r,t,i),e.elementType=sd,e.lanes=a,e;case cd:return e=Xt(19,r,t,i),e.elementType=cd,e.lanes=a,e;case ew:return oc(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z1:o=10;break e;case J1:o=9;break e;case Ih:o=11;break e;case Dh:o=14;break e;case rn:o=16,n=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=Xt(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Kn(e,t,r,n){return e=Xt(7,e,n,t),e.lanes=r,e}function oc(e,t,r,n){return e=Xt(22,e,n,t),e.elementType=ew,e.lanes=r,e.stateNode={isHidden:!1},e}function Ef(e,t,r){return e=Xt(6,e,null,t),e.lanes=r,e}function $f(e,t,r){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GE(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=uf(0),this.expirationTimes=uf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uf(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mv(e,t,r,n,i,a,o,l,u){return e=new GE(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Xt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ev(a),e}function KE(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qx)}catch(e){console.error(e)}}qx(),q1.exports=Ft;var ZE=q1.exports,Hm=ZE;od.createRoot=Hm.createRoot,od.hydrateRoot=Hm.hydrateRoot;const ro="http://localhost:7860";console.log(`API Server URL: ${ro}`);class fc{static async fetchIndex(){const t=await fetch(ro+"/");if(!t.ok)throw new Error("Failed to fetch index.html");return t.text()}static async fetchStaticFile(t){const r=await fetch(`${ro}/${t}`);if(!r.ok)throw new Error(`Failed to fetch ${t}`);return r.text()}static fetchExamplesByType(t){return fetch(`${ro}/examples/${t}`).then(r=>{if(!r.ok)throw new Error(`Failed to fetch examples of type ${t}`);return r.json()})}static getProxiedUrl(t){return`${ro}/proxy/${encodeURIComponent(t)}`}}function ot(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(s){try{u(n.next(s))}catch(f){a(f)}}function l(s){try{u(n.throw(s))}catch(f){a(f)}}function u(s){var f;s.done?i(s.value):(f=s.value,f instanceof r?f:new r(function(c){c(f)})).then(o,l)}u((n=n.apply(e,t||[])).next())})}let Sl=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}};const Jl={decode:function(e,t){return ot(this,void 0,void 0,function*(){const r=new AudioContext({sampleRate:t});return r.decodeAudioData(e).finally(()=>r.close())})},createBuffer:function(e,t){return typeof e[0]=="number"&&(e=[e]),function(r){const n=r[0];if(n.some(i=>i>1||i<-1)){const i=n.length;let a=0;for(let o=0;oa&&(a=l)}for(const o of r)for(let l=0;le==null?void 0:e[r],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Xx(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Xx(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function Vm(e,t,r){const n=Xx(e,t||{});return r==null||r.appendChild(n),n}var JE=Object.freeze({__proto__:null,createElement:Vm,default:Vm});const e$={fetchBlob:function(e,t,r){return ot(this,void 0,void 0,function*(){const n=yield fetch(e,r);if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return function(i,a){ot(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const o=i.body.getReader(),l=Number(i.headers.get("Content-Length"))||0;let u=0;const s=c=>ot(this,void 0,void 0,function*(){u+=(c==null?void 0:c.length)||0;const d=Math.round(u/l*100);a(d)}),f=()=>ot(this,void 0,void 0,function*(){let c;try{c=yield o.read()}catch{return}c.done||(s(c.value),yield f())});f()})}(n.clone(),t),n.blob()})}};let t$=class extends Sl{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,r,n){return this.media.addEventListener(t,r,n),()=>this.media.removeEventListener(t,r,n)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,r){const n=this.getSrc();if(t&&n===t)return;this.revokeSrc();const i=r instanceof Blob&&(this.canPlayType(r.type)||!t)?URL.createObjectURL(r):t;n&&(this.media.src="");try{this.media.src=i}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return ot(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,r){r!=null&&(this.media.preservesPitch=r),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}},Jd=class ep extends Sl{constructor(t,r){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const n=this.parentFromOptionsContainer(t.container);this.parent=n;const[i,a]=this.initHtml();n.appendChild(i),this.container=i,this.scrollContainer=a.querySelector(".scroll"),this.wrapper=a.querySelector(".wrapper"),this.canvasWrapper=a.querySelector(".canvases"),this.progressWrapper=a.querySelector(".progress"),this.cursor=a.querySelector(".cursor"),r&&a.appendChild(r),this.initEvents()}parentFromOptionsContainer(t){let r;if(typeof t=="string"?r=document.querySelector(t):t instanceof HTMLElement&&(r=t),!r)throw new Error("Container not found");return r}initEvents(){const t=r=>{const n=this.wrapper.getBoundingClientRect(),i=r.clientX-n.left,a=r.clientY-n.top;return[i/n.width,a/n.height]};if(this.wrapper.addEventListener("click",r=>{const[n,i]=t(r);this.emit("click",n,i)}),this.wrapper.addEventListener("dblclick",r=>{const[n,i]=t(r);this.emit("dblclick",n,i)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:r,scrollWidth:n,clientWidth:i}=this.scrollContainer,a=r/n,o=(r+i)/n;this.emit("scroll",a,o,r,r+i)}),typeof ResizeObserver=="function"){const r=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{r().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,r,n,i,a=3,o=0,l=100){if(!t)return()=>{};const u=matchMedia("(pointer: coarse)").matches;let s=()=>{};const f=c=>{if(c.button!==o)return;c.preventDefault(),c.stopPropagation();let d=c.clientX,p=c.clientY,v=!1;const b=Date.now(),w=m=>{if(m.preventDefault(),m.stopPropagation(),u&&Date.now()-ba||Math.abs(P)>a){const T=t.getBoundingClientRect(),{left:$,top:j}=T;v||(n==null||n(d-$,p-j),v=!0),r(_,P,x-$,O-j),d=x,p=O}},g=m=>{if(v){const x=m.clientX,O=m.clientY,_=t.getBoundingClientRect(),{left:P,top:T}=_;i==null||i(x-P,O-T)}s()},y=m=>{m.relatedTarget&&m.relatedTarget!==document.documentElement||g(m)},h=m=>{v&&(m.stopPropagation(),m.preventDefault())},S=m=>{v&&m.preventDefault()};document.addEventListener("pointermove",w),document.addEventListener("pointerup",g),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("click",h,{capture:!0}),s=()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",g),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",S),setTimeout(()=>{document.removeEventListener("click",h,{capture:!0})},10)}};return t.addEventListener("pointerdown",f),()=>{s(),t.removeEventListener("pointerdown",f)}}(this.wrapper,(t,r,n)=>{this.emit("drag",Math.max(0,Math.min(1,n/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,r){var n;const i=((n=this.audioData)===null||n===void 0?void 0:n.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const a=this.parent.clientHeight||128;return r!=null&&r.every(o=>!o.overlay)?a/i:a}return 128}initHtml(){const t=document.createElement("div"),r=t.attachShadow({mode:"open"}),n=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return r.innerHTML=` + + :host { + user-select: none; + min-width: 1px; + } + :host audio { + display: block; + width: 100%; + } + :host .scroll { + overflow-x: auto; + overflow-y: hidden; + width: 100%; + position: relative; + } + :host .noScrollbar { + scrollbar-color: transparent; + scrollbar-width: none; + } + :host .noScrollbar::-webkit-scrollbar { + display: none; + -webkit-appearance: none; + } + :host .wrapper { + position: relative; + overflow: visible; + z-index: 2; + } + :host .canvases { + min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px; + } + :host .canvases > div { + position: relative; + } + :host canvas { + display: block; + position: absolute; + top: 0; + image-rendering: pixelated; + } + :host .progress { + pointer-events: none; + position: absolute; + z-index: 2; + top: 0; + left: 0; + width: 0; + height: 100%; + overflow: hidden; + } + :host .progress > div { + position: relative; + } + :host .cursor { + pointer-events: none; + position: absolute; + z-index: 5; + top: 0; + left: 0; + height: 100%; + border-radius: 2px; + } + + +
+
+
+
+
+
+
+ `,[t,r]}setOptions(t){if(this.options.container!==t.container){const r=this.parentFromOptionsContainer(t.container);r.appendChild(this.container),this.parent=r}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:r}=this.scrollContainer,n=r*t;this.setScroll(n)}destroy(){var t,r;this.subscriptions.forEach(n=>n()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(r=this.unsubscribeOnScroll)===null||r===void 0||r.forEach(n=>n()),this.unsubscribeOnScroll=[]}createDelay(t=10){let r,n;const i=()=>{r&&clearTimeout(r),n&&n()};return this.timeouts.push(i),()=>new Promise((a,o)=>{i(),n=o,r=setTimeout(()=>{r=void 0,n=void 0,a()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const r=document.createElement("canvas"),n=r.getContext("2d"),i=r.height*(window.devicePixelRatio||1),a=n.createLinearGradient(0,0,0,i),o=1/(t.length-1);return t.forEach((l,u)=>{const s=u*o;a.addColorStop(s,l)}),a}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,r,n,i){const a=t[0],o=t[1]||t[0],l=a.length,{width:u,height:s}=n.canvas,f=s/2,c=this.getPixelRatio(),d=r.barWidth?r.barWidth*c:1,p=r.barGap?r.barGap*c:r.barWidth?d/2:0,v=r.barRadius||0,b=u/(d+p)/l,w=v&&"roundRect"in n?"roundRect":"rect";n.beginPath();let g=0,y=0,h=0;for(let S=0;S<=l;S++){const m=Math.round(S*b);if(m>g){const _=Math.round(y*f*i),P=_+Math.round(h*f*i)||1;let T=f-_;r.barAlign==="top"?T=0:r.barAlign==="bottom"&&(T=s-P),n[w](g*(d+p),T,d,P,v),g=m,y=0,h=0}const x=Math.abs(a[S]||0),O=Math.abs(o[S]||0);x>y&&(y=x),O>h&&(h=O)}n.fill(),n.closePath()}renderLineWaveform(t,r,n,i){const a=o=>{const l=t[o]||t[0],u=l.length,{height:s}=n.canvas,f=s/2,c=n.canvas.width/u;n.moveTo(0,f);let d=0,p=0;for(let v=0;v<=u;v++){const b=Math.round(v*c);if(b>d){const g=f+(Math.round(p*f*i)||1)*(o===0?-1:1);n.lineTo(d,g),d=b,p=0}const w=Math.abs(l[v]||0);w>p&&(p=w)}n.lineTo(d,f)};n.beginPath(),a(0),a(1),n.fill(),n.closePath()}renderWaveform(t,r,n){if(n.fillStyle=this.convertColorValues(r.waveColor),r.renderFunction)return void r.renderFunction(t,n);let i=r.barHeight||1;if(r.normalize){const a=Array.from(t[0]).reduce((o,l)=>Math.max(o,Math.abs(l)),0);i=a?1/a:1}r.barWidth||r.barGap||r.barAlign?this.renderBarWaveform(t,r,n,i):this.renderLineWaveform(t,r,n,i)}renderSingleCanvas(t,r,n,i,a,o,l){const u=this.getPixelRatio(),s=document.createElement("canvas");s.width=Math.round(n*u),s.height=Math.round(i*u),s.style.width=`${n}px`,s.style.height=`${i}px`,s.style.left=`${Math.round(a)}px`,o.appendChild(s);const f=s.getContext("2d");if(this.renderWaveform(t,r,f),s.width>0&&s.height>0){const c=s.cloneNode(),d=c.getContext("2d");d.drawImage(s,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(r.progressColor),d.fillRect(0,0,s.width,s.height),l.appendChild(c)}}renderMultiCanvas(t,r,n,i,a,o){const l=this.getPixelRatio(),{clientWidth:u}=this.scrollContainer,s=n/l;let f=Math.min(ep.MAX_CANVAS_WIDTH,u,s),c={};if(f===0)return;if(r.barWidth||r.barGap){const w=r.barWidth||.5,g=w+(r.barGap||w/2);f%g!=0&&(f=Math.floor(f/g)*g)}const d=w=>{if(w<0||w>=p||c[w])return;c[w]=!0;const g=w*f,y=Math.min(s-g,f);if(y<=0)return;const h=t.map(S=>{const m=Math.floor(g/s*S.length),x=Math.floor((g+y)/s*S.length);return S.slice(m,x)});this.renderSingleCanvas(h,r,y,i,g,a,o)},p=Math.ceil(s/f);if(!this.isScrollable){for(let w=0;w1){const w=this.on("scroll",()=>{const{scrollLeft:g}=this.scrollContainer,y=Math.floor(g/s*p);Object.keys(c).length>ep.MAX_NODES&&(a.innerHTML="",o.innerHTML="",c={}),d(y-1),d(y),d(y+1)});this.unsubscribeOnScroll.push(w)}}renderChannel(t,r,n,i){var{overlay:a}=r,o=function(f,c){var d={};for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&c.indexOf(p)<0&&(d[p]=f[p]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(p=Object.getOwnPropertySymbols(f);v0&&(l.style.marginTop=`-${u}px`),this.canvasWrapper.style.minHeight=`${u}px`,this.canvasWrapper.appendChild(l);const s=l.cloneNode();this.progressWrapper.appendChild(s),this.renderMultiCanvas(t,o,n,u,l,s)}render(t){return ot(this,void 0,void 0,function*(){var r;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const n=this.getPixelRatio(),i=this.scrollContainer.clientWidth,a=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=a>i;const o=this.options.fillParent&&!this.isScrollable,l=(o?i:a)*n;if(this.wrapper.style.width=o?"100%":`${a}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let u=0;u1&&u.push(t.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(n=>n()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:r}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:n}=this.progressWrapper.getBoundingClientRect();let i=n-r;i*=2,i=i<0?Math.floor(i):Math.ceil(i),i/=2,this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,r=!1){const{scrollLeft:n,scrollWidth:i,clientWidth:a}=this.scrollContainer,o=t*i,l=n,u=n+a,s=a/2;if(this.isDragging)o+30>u?this.scrollContainer.scrollLeft+=30:o-30u)&&(this.scrollContainer.scrollLeft=o-(this.options.autoCenter?s:0));const f=o-n-s;r&&this.options.autoCenter&&f>0&&(this.scrollContainer.scrollLeft+=Math.min(f,10))}{const f=this.scrollContainer.scrollLeft,c=f/i,d=(f+a)/i;this.emit("scroll",c,d,f,f+a)}}renderProgress(t,r){if(isNaN(t))return;const n=100*t;this.canvasWrapper.style.clipPath=`polygon(${n}% 0, 100% 0, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.transform=`translateX(-${Math.round(n)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,r)}exportImage(t,r,n){return ot(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(n==="dataURL"){const a=Array.from(i).map(o=>o.toDataURL(t,r));return Promise.resolve(a)}return Promise.all(Array.from(i).map(a=>new Promise((o,l)=>{a.toBlob(u=>{u?o(u):l(new Error("Could not export image"))},t,r)})))})}};Jd.MAX_CANVAS_WIDTH=8e3,Jd.MAX_NODES=10;let r$=class extends Sl{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}},Tf=class extends Sl{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return ot(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(r=>{if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return r.arrayBuffer()}).then(r=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(r)).then(r=>{this.currentSrc===t&&(this.buffer=r,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let r=this.playedDuration*this._playbackRate;(r>=this.duration||r<0)&&(r=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,r),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return ot(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const r=t-this.currentTime,n=this.bufferNode;n==null||n.stop(this.audioContext.currentTime+r),n==null||n.addEventListener("ended",()=>{n===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return ot(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const r=!this.paused;r&&this._pause(),this.playedDuration=t/this._playbackRate,r&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,r;return(t=this._duration)!==null&&t!==void 0?t:((r=this.buffer)===null||r===void 0?void 0:r.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const r=this.buffer.numberOfChannels;for(let n=0;n{this.emit("init");const{peaks:a,duration:o}=this.options;(i||a&&o)&&this.load(i,a,o).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,r)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,r))}),this.renderer.on("dblclick",(t,r)=>{this.emit("dblclick",t,r)}),this.renderer.on("scroll",(t,r,n,i)=>{const a=this.getDuration();this.emit("scroll",t*a,r*a,n,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",r=>{if(!this.options.interact)return;let n;this.renderer.renderProgress(r),clearTimeout(t),this.isPlaying()?n=0:this.options.dragToSeek===!0?n=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(n=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(r)},n),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(r=>{this.registerPlugin(r)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=Jl.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Jl.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t)})),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const r=t/this.getDuration();this.renderer.setScrollPercentage(r)}getActivePlugins(){return this.plugins}loadAudio(t,r,n,i){return ot(this,void 0,void 0,function*(){var a;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!r&&!n){const l=this.options.fetchParams||{};window.AbortController&&!l.signal&&(this.abortController=new AbortController,l.signal=(a=this.abortController)===null||a===void 0?void 0:a.signal);const u=f=>this.emit("loading",f);r=yield e$.fetchBlob(t,u,l);const s=this.options.blobMimeType;s&&(r=new Blob([r],{type:s}))}this.setSrc(t,r);const o=yield new Promise(l=>{const u=i||this.getDuration();u?l(u):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>l(this.getDuration()),{once:!0}))});if(!t&&!r){const l=this.getMediaElement();l instanceof Tf&&(l.duration=o)}if(n)this.decodedData=Jl.createBuffer(n,o||0);else if(r){const l=yield r.arrayBuffer();this.decodedData=yield Jl.decode(l,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,r,n){return ot(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,r,n)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,r,n){return ot(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,r,n)}catch(i){throw this.emit("error",i),i}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:r=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(t,this.decodedData.numberOfChannels),a=[];for(let o=0;oMath.abs(d)&&(d=v)}u.push(Math.round(d*n)/n)}a.push(u)}return a}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const r=this.getDuration()*t;this.setTime(r)}play(t,r){const n=Object.create(null,{play:{get:()=>super.play}});return ot(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield n.play.call(this);return r!=null&&(this.media instanceof Tf?this.media.stopAt(r):this.stopAtPosition=r),i})}playPause(){return ot(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return ot(this,arguments,void 0,function*(t="image/png",r=1,n="dataURL"){return this.renderer.exportImage(t,r,n)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(r=>r.destroy()),this.subscriptions.forEach(r=>r()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}};tp.BasePlugin=class extends Sl{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e())}},tp.dom=JE;let i$=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}},a$=class extends i${constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t())}};function Qx(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Qx(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function jf(e,t,r){return Qx(e,t||{})}const o$={height:20,timeOffset:0,formatTimeCallback:e=>e/60>1?`${Math.floor(e/60)}:${`${(e=Math.round(e%60))<10?"0":""}${e}`}`:`${Math.round(1e3*e)/1e3}`};let l$=class Zx extends a${constructor(t){super(t||{}),this.options=Object.assign({},o$,t),this.timelineWrapper=this.initTimelineWrapper()}static create(t){return new Zx(t)}onInit(){var t;if(!this.wavesurfer)throw Error("WaveSurfer is not initialized");let r=this.wavesurfer.getWrapper();if(this.options.container instanceof HTMLElement)r=this.options.container;else if(typeof this.options.container=="string"){const n=document.querySelector(this.options.container);if(!n)throw Error(`No Timeline container found matching ${this.options.container}`);r=n}this.options.insertPosition?(r.firstElementChild||r).insertAdjacentElement(this.options.insertPosition,this.timelineWrapper):r.appendChild(this.timelineWrapper),this.subscriptions.push(this.wavesurfer.on("redraw",()=>this.initTimeline())),(!((t=this.wavesurfer)===null||t===void 0)&&t.getDuration()||this.options.duration)&&this.initTimeline()}destroy(){this.timelineWrapper.remove(),super.destroy()}initTimelineWrapper(){return jf("div",{part:"timeline-wrapper",style:{pointerEvents:"none"}})}defaultTimeInterval(t){return t>=25?1:5*t>=25?5:15*t>=25?15:60*Math.ceil(.5/t)}defaultPrimaryLabelInterval(t){return t>=25?10:5*t>=25?6:4}defaultSecondaryLabelInterval(t){return t>=25?5:2}virtualAppend(t,r,n){let i=!1;const a=(u,s)=>{if(!this.wavesurfer)return;const f=n.clientWidth,c=t>u&&t+f{a(f,c)}))}initTimeline(){var t,r,n,i,a,o,l,u;const s=(n=(r=(t=this.wavesurfer)===null||t===void 0?void 0:t.getDuration())!==null&&r!==void 0?r:this.options.duration)!==null&&n!==void 0?n:0,f=(((i=this.wavesurfer)===null||i===void 0?void 0:i.getWrapper().scrollWidth)||this.timelineWrapper.scrollWidth)/s,c=(a=this.options.timeInterval)!==null&&a!==void 0?a:this.defaultTimeInterval(f),d=(o=this.options.primaryLabelInterval)!==null&&o!==void 0?o:this.defaultPrimaryLabelInterval(f),p=this.options.primaryLabelSpacing,v=(l=this.options.secondaryLabelInterval)!==null&&l!==void 0?l:this.defaultSecondaryLabelInterval(f),b=this.options.secondaryLabelSpacing,w=this.options.insertPosition==="beforebegin",g=jf("div",{style:Object.assign({height:`${this.options.height}px`,overflow:"hidden",fontSize:this.options.height/2+"px",whiteSpace:"nowrap"},w?{position:"absolute",top:"0",left:"0",right:"0",zIndex:"2"}:{position:"relative"})});g.setAttribute("part","timeline"),typeof this.options.style=="string"?g.setAttribute("style",g.getAttribute("style")+this.options.style):typeof this.options.style=="object"&&Object.assign(g.style,this.options.style);const y=jf("div",{style:{width:"0",height:"50%",display:"flex",flexDirection:"column",justifyContent:w?"flex-start":"flex-end",top:w?"0":"auto",bottom:w?"auto":"0",overflow:"visible",borderLeft:"1px solid currentColor",opacity:`${(u=this.options.secondaryLabelOpacity)!==null&&u!==void 0?u:.25}`,position:"absolute",zIndex:"1"}});for(let h=0,S=0;h{const t=N.useRef(null),r=N.useRef(null),[n,i]=N.useState(!1);return l$.create({height:16,timeInterval:.1,primaryLabelInterval:1,style:{fontSize:"10px"}}),N.useEffect(()=>{if(!t.current)return;const a=fc.getProxiedUrl(e);return r.current=tp.create({container:t.current,waveColor:"rgb(200, 0, 200)",progressColor:"rgb(100, 0, 100)",url:a,minPxPerSec:100,barWidth:10,barRadius:10,barGap:2,mediaControls:!0}),r.current.on("interaction",()=>{var o;(o=r.current)==null||o.play(),i(!0)}),r.current.on("finish",()=>{var o;(o=r.current)==null||o.setTime(0),i(!1)}),r.current.on("play",()=>i(!0)),r.current.on("pause",()=>i(!1)),()=>{var o;(o=r.current)==null||o.destroy()}},[e]),E.jsx("div",{className:"",children:E.jsx("div",{ref:t})})},xv=({minHeight:e="300px"})=>E.jsx("div",{className:`flex items-center justify-center min-h-[${e}]`,children:E.jsx("span",{className:"loading loading-spinner loading-lg text-primary"})}),Cf=({fileType:e})=>{const[t,r]=N.useState({}),[n,i]=N.useState(!1),[a,o]=N.useState(null),[l,u]=N.useState(null),[s,f]=N.useState(null);N.useEffect(()=>{i(!0),o(null),fc.fetchExamplesByType(e).then(d=>{r(d);const p=Object.keys(d);if(p.length>0){u(p[0]);const v=Object.keys(d[p[0]]);v.length>0?f(v[0]):f(null)}else u(null),f(null);i(!1)}).catch(d=>{o(d.message),i(!1)})},[e]);const c=({selectedModel:d,selectedAttack:p,examples:v,fileType:b})=>{const w=v[d][p];return E.jsx("div",{className:"example-display",children:w.map((g,y)=>E.jsxs("div",{className:"example-item",children:[E.jsx("p",{children:g.description}),b==="image"&&E.jsx("img",{src:g.image_url,alt:g.description,className:"example-image"}),b==="audio"&&g.audio_url&&E.jsxs(E.Fragment,{children:[E.jsx(u$,{src:g.audio_url}),E.jsx("img",{src:g.image_url,alt:g.description,className:"example-image"})]}),b==="video"&&E.jsx("video",{controls:!0,src:g.video_url,className:"example-video"})]},y))})};return E.jsxs("div",{className:"examples-container",children:[E.jsxs("div",{className:"selectors-container flex flex-col md:flex-row gap-4 mb-4",children:[E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Model"}),E.jsx("select",{className:"select select-bordered w-full",value:l||"",onChange:d=>u(d.target.value||null),children:Object.keys(t).map(d=>E.jsx("option",{value:d,children:d},d))})]}),l&&E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Attack"}),E.jsx("select",{className:"select select-bordered w-full",value:s||"",onChange:d=>f(d.target.value||null),children:Object.keys(t[l]).map(d=>E.jsx("option",{value:d,children:d},d))})]})]}),n&&E.jsx(xv,{}),a&&E.jsxs("p",{className:"error",children:["Error: ",a]}),l&&s&&E.jsx(c,{selectedModel:l,selectedAttack:s,examples:t,fileType:e})]})},s$=({datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})=>E.jsx("div",{className:"",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsx("legend",{className:"fieldset-legend font-semibold",children:"Dataset"}),E.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"radio",name:"dataset",className:"radio radio-sm",checked:t===n,onChange:()=>r(n)}),E.jsx("span",{className:"text-sm",children:n})]},n))})]})}),c$=({groups:e,selectedMetrics:t,setSelectedMetrics:r})=>{const[n,i]=N.useState({}),[a,o]=N.useState({}),[l,u]=N.useState(""),[s,f]=N.useState(!1),c=h=>{i(S=>({...S,[h]:!S[h]}))},d=(h,S)=>{o(m=>{var x;return{...m,[h]:{...m[h],[S]:!((x=m[h])!=null&&x[S])}}})},p=h=>{const S=new Set(t);Object.entries(e[h]).forEach(([m,x])=>{(l?x.filter(_=>_.toLowerCase().includes(l.toLowerCase())):x).forEach(_=>S.add(_))}),r(S),i(m=>({...m,[h]:!0})),o(m=>({...m,[h]:Object.keys(e[h]).reduce((x,O)=>(x[O]=!0,x),{})}))},v=h=>{const S=new Set(t);Object.entries(e[h]).forEach(([m,x])=>{(l?x.filter(_=>_.toLowerCase().includes(l.toLowerCase())):x).forEach(_=>S.delete(_))}),r(S),o(m=>({...m,[h]:Object.keys(m[h]||{}).reduce((x,O)=>(x[O]=!1,x),{})}))},b=(h,S)=>{const m=new Set(t);(l?e[h][S].filter(O=>O.toLowerCase().includes(l.toLowerCase())):e[h][S]).forEach(O=>m.add(O)),r(m),i(O=>({...O,[h]:!0})),o(O=>({...O,[h]:{...O[h]||{},[S]:!0}}))},w=(h,S)=>{const m=new Set(t);(l?e[h][S].filter(O=>O.toLowerCase().includes(l.toLowerCase())):e[h][S]).forEach(O=>m.delete(O)),r(m),o(O=>({...O,[h]:{...O[h]||{},[S]:!1}}))},g=()=>{const h=Object.values(e).flatMap(x=>Object.values(x).flat()).filter(x=>!l||x.toLowerCase().includes(l.toLowerCase()));r(new Set(h));const S={},m={};Object.entries(e).forEach(([x,O])=>{let _=!1;m[x]={},Object.entries(O).forEach(([P,T])=>{const $=T.some(j=>!l||j.toLowerCase().includes(l.toLowerCase()));m[x][P]=$,$&&(_=!0)}),S[x]=_}),i(S),o(m)},y=()=>{const h=new Set(t);Object.values(e).flatMap(x=>Object.values(x).flat()).filter(x=>!l||x.toLowerCase().includes(l.toLowerCase())).forEach(x=>h.delete(x)),r(h);const S={},m={};Object.entries(e).forEach(([x,O])=>{m[x]={},Object.entries(O).forEach(([_,P])=>{P.some(T=>!l||T.toLowerCase().includes(l.toLowerCase())),m[x][_]=!1}),S[x]=!1}),i(S),o(m)};return N.useEffect(()=>{if(Object.values(e).flatMap(m=>Object.values(m).flat()).every(m=>t.has(m))&&Object.keys(e).length>0){const m={},x={};Object.entries(e).forEach(([O,_])=>{m[O]=!0,x[O]={},Object.keys(_).forEach(P=>{x[O][P]=!0})}),i(m),o(x)}},[e,t]),E.jsx("div",{className:"w-full mb-4",children:E.jsxs("div",{className:"collapse collapse-arrow bg-base-200 border border-gray-700",children:[E.jsx("input",{type:"checkbox",className:"peer",checked:s,onChange:()=>f(h=>!h)}),E.jsx("div",{className:"collapse-title select-none ",children:E.jsx("span",{className:"text-sm",children:"Filter Individual Metrics"})}),E.jsx("div",{className:"collapse-content",children:E.jsxs("fieldset",{className:"fieldset w-full",children:[E.jsxs("div",{className:"flex gap-2 mb-3",children:[E.jsxs("div",{className:"relative mr-2",children:[E.jsx("input",{type:"text",placeholder:"Search metrics...",className:"input input-bordered border-gray-700 input-sm w-48 pr-8",value:l,onChange:h=>{const S=h.target.value;u(S);const m={},x={};Object.entries(e).forEach(([O,_])=>{let P=!1;x[O]={},Object.entries(_).forEach(([T,$])=>{const j=$.some(L=>L.toLowerCase().includes(S.toLowerCase()));x[O][T]=j||S==="",j&&(P=!0)}),m[O]=P||S===""}),i(m),o(x)}}),E.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-4-4m0 0A7 7 0 104 4a7 7 0 0013 13z"})})})]}),E.jsx("button",{type:"button",className:"text-xs px-3 py-1 border border-gray-700 rounded font-semibold bg-base-200 cursor-pointer",onClick:g,children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-3 py-1 border border-gray-700 rounded font-semibold bg-base-200 cursor-pointer",onClick:y,children:"None"})]}),E.jsx("div",{className:"flex flex-row flex-wrap gap-4 w-full items-start",children:Object.entries(e).map(([h,S])=>E.jsxs("div",{className:"flex-1 min-w-[220px] max-w-full",children:[E.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[E.jsxs("button",{type:"button",onClick:()=>c(h),className:"flex-1 text-left font-medium py-1 px-2 rounded border border-gray-700 cursor-pointer",children:[h," ",n[h]?"▼":"▶"]}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>p(h),children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>v(h),children:"None"})]}),n[h]&&E.jsx("div",{className:"ml-2",children:Object.entries(S).map(([m,x])=>{var _,P;const O=l?x.filter(T=>T.toLowerCase().includes(l.toLowerCase())):x;return O.length===0?null:E.jsxs("div",{className:"mb-2",children:[E.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[E.jsxs("button",{type:"button",onClick:()=>d(h,m),className:"flex-1 text-left py-1 px-2 rounded border border-gray-700 cursor-pointer",children:[m," ",(_=a[h])!=null&&_[m]?"▼":"▶"]}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>b(h,m),children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>w(h,m),children:"None"})]}),((P=a[h])==null?void 0:P[m])&&E.jsx("div",{className:"grid grid-cols-1 gap-1 ml-2 max-h-48 overflow-y-auto pr-2",children:O.map(T=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",checked:t.has(T),onChange:$=>{const j=new Set(t);$.target.checked?j.add(T):j.delete(T),r(j)},className:"form-checkbox h-4 w-4"}),E.jsx("span",{className:"truncate",title:T,children:T.includes("_")?T.split("_").slice(1).join("_"):T})]},T))})]},m)})})]},h))})]})})]})})},f$=({independentMetrics:e,tableHeader:t,selectedModels:r,tableRows:n})=>e.length===0?null:E.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:E.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[E.jsx("thead",{children:E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Metric"}),t.filter(i=>r.has(i)).map(i=>E.jsx("th",{className:"sticky top-0 bg-base-100 z-10 text-center text-xs border-gray-700 border",children:i},`independent-${i}`))]})}),E.jsx("tbody",{children:e.sort().map(i=>{const a=n.find(o=>o.metric===i);return a?E.jsxs("tr",{className:"hover:bg-base-100",children:[E.jsx("td",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border",children:i}),t.filter(o=>r.has(o)).map(o=>{const l=a[o];return E.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(l))?l:Number(Number(l).toFixed(3))},`independent-${i}-${o}`)})]},`independent-${i}`):null})})]})}),d$=({overallMetrics:e,selectedOverallMetrics:t,setSelectedOverallMetrics:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return E.jsx("div",{className:"w-full",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Metrics (",t.size,"/",e.length,")"]}),E.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),E.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},p$=({benchmarkData:e,selectedModels:t})=>{const[r,n]=N.useState([]),[i,a]=N.useState([]),[o,l]=N.useState(null),[u,s]=N.useState({}),[f,c]=N.useState({}),[d,p]=N.useState({}),[v,b]=N.useState(new Set),[w,g]=N.useState([]),[y,h]=N.useState(new Set),[S,m]=N.useState({}),[x,O]=N.useState({}),[_,P]=N.useState({});N.useEffect(()=>{if(e)try{const F=e,q=F.rows,R=F.groups,{Overall:K,...Q}=R,k=new Set;K==null||K.forEach(ae=>{if(ae.includes("_")){const Oe=ae.split("_").slice(1).join("_");k.add(Oe)}}),g(Array.from(k).sort()),h(new Set(Array.from(k)));const te=Object.entries(Q).sort(([ae],[Oe])=>ae==="Overall"?-1:Oe==="Overall"?1:ae.localeCompare(Oe)).reduce((ae,[Oe,ge])=>{const ze=[...ge].sort();return ae[Oe]=ze.reduce((ce,Qe)=>{const[Ze,_t]=Qe.split("_");return ce[Ze]||(ce[Ze]=[]),ce[Ze].push(Qe),ce},{}),ae[Oe]=Object.fromEntries(Object.entries(ae[Oe]).sort(([ce],[Qe])=>ce.localeCompare(Qe))),ae},{}),ne=Array.from(new Set(q.flatMap(ae=>Object.keys(ae)))).filter(ae=>ae!=="metric"),ee={},oe={};Object.keys(te).forEach(ae=>{ee[ae]=!1,oe[ae]={},Object.keys(te[ae]).forEach(Oe=>{oe[ae][Oe]=!1})});const he=Object.values(Q).flat();b(new Set(he)),a(ne),n(q),s(te),c(ee),p(oe),l(null)}catch(F){l("Failed to parse benchmark data, please try again: "+F.message)}},[e]);const T=F=>{c(q=>({...q,[F]:!q[F]}))},$=(F,q)=>{p(R=>{var K;return{...R,[F]:{...R[F]||{},[q]:!((K=R[F])!=null&&K[q])}}})},j=(F,q)=>{m(R=>{var k,te;const K=(te=(k=R[F])==null?void 0:k[q])==null?void 0:te.direction;let Q={};return K?K==="asc"&&(Q[F]={[q]:{direction:"desc"}}):Q[F]={[q]:{direction:"asc"}},Q})};function L(F,q,R){return`${F??""}||${q??""}||${R??""}`}const B=(F,q,R)=>{const K=L(F,q,R);P(Q=>{var H;const k=(H=Q[K])==null?void 0:H.direction,te={};return k?k==="asc"?te[K]={direction:"desc"}:k==="desc"&&delete te[K]:te[K]={direction:"asc"},te})};function M(F,q,R){return _[L(F,q,R)]||null}const z=()=>{var F;console.log({sortState:S});for(const q of w){if(!y.has(q))continue;const R=i.filter(K=>t.has(K));for(const K of R)if((F=S[q])!=null&&F[K])return{overallMetric:q,model:K,direction:S[q][K].direction}}return null},U=()=>{var F;for(const q of w)if(y.has(q)&&(F=x[q])!=null&&F.__col__)return{overallMetric:q,direction:x[q].__col__.direction};return null},C=(F,q)=>{const R=U();return console.log({columnSortConfig:R,overallMetric:q}),R&&R.overallMetric===q?[...F].sort((K,Q)=>{const k=r.filter(ee=>W(q).includes(ee.metric)).map(ee=>Number(ee[K])).filter(ee=>!isNaN(ee)),te=r.filter(ee=>W(q).includes(ee.metric)).map(ee=>Number(ee[Q])).filter(ee=>!isNaN(ee)),H=k.length?k.reduce((ee,oe)=>ee+oe,0)/k.length:NaN,ne=te.length?te.reduce((ee,oe)=>ee+oe,0)/te.length:NaN;return isNaN(H)&&isNaN(ne)?0:isNaN(H)?1:isNaN(ne)?-1:R.direction==="asc"?H-ne:ne-H}):F},D=(F,q,R,K)=>[...F].sort((Q,k)=>{const te=r.find(oe=>oe.metric===Q),H=r.find(oe=>oe.metric===k);if(!te||!H)return 0;const ne=Number(te[R]),ee=Number(H[R]);return isNaN(ne)&&isNaN(ee)?0:isNaN(ne)?1:isNaN(ee)?-1:K==="asc"?ne-ee:ee-ne}),W=F=>r.filter(q=>{const R=q.metric;return R.includes("_")?R.split("_").slice(1).join("_").endsWith(F):!1}).map(q=>q.metric),Y=()=>r.map(q=>q.metric).filter(q=>{for(const R of w)if(q.endsWith(`_${R}`)||q===R)return!1;return!0}),V=(F,q)=>{const R=F.map(H=>{const ne=r.find(ee=>ee.metric===H);return ne?Number(ne[q]):NaN}).filter(H=>!isNaN(H));if(R.length===0)return{avg:NaN,stdDev:NaN};const K=R.reduce((H,ne)=>H+ne,0)/R.length,k=R.map(H=>{const ne=H-K;return ne*ne}).reduce((H,ne)=>H+ne,0)/R.length,te=Math.sqrt(k);return{avg:K,stdDev:te}},re=(F,q=null,R=null)=>{var Q;if(!q)return F;const K=Object.values(u[q]||{}).flat();return R&&((Q=u[q])!=null&&Q[R])?F.filter(k=>u[q][R].includes(k)&&v.has(k)):F.filter(k=>K.includes(k)&&v.has(k))},le=z();let Se=Object.entries(u).filter(([F])=>F!=="Overall");le&&(Se=Se.sort(([F,q],[R,K])=>{const Q=W(le.overallMetric),k=ne=>{const oe=Object.values(ne).flat().filter(ae=>Q.includes(ae));return V(oe,le.model).avg},te=k(q),H=k(K);return isNaN(te)&&isNaN(H)?0:isNaN(te)?1:isNaN(H)?-1:le.direction==="asc"?te-H:H-te}));const me={};return w.filter(F=>y.has(F)).forEach(F=>{var K;let q=null;const R=Object.keys(_).find(Q=>{const[k,te,H]=Q.split("||");return!!(H===""&&F===F||H&&W(F).includes(H))});if(R&&_[R]){const Q=_[R].direction,[k,te,H]=R.split("||"),ne=i.filter(ee=>t.has(ee));if(H)q=[...ne].sort((ee,oe)=>{const he=r.find(ze=>ze.metric===H),ae=he,Oe=he?Number(he[ee]):NaN,ge=ae?Number(ae[oe]):NaN;return isNaN(Oe)&&isNaN(ge)?0:isNaN(Oe)?1:isNaN(ge)?-1:Q==="asc"?Oe-ge:ge-Oe});else{let ee=[];k&&!te?ee=Object.values(u[k]||{}).flat().filter(he=>W(F).includes(he)):k&&te&&(ee=(((K=u[k])==null?void 0:K[te])||[]).filter(oe=>W(F).includes(oe))),q=[...ne].sort((oe,he)=>{const ae=V(ee,oe),Oe=V(ee,he);return isNaN(ae.avg)&&isNaN(Oe.avg)?0:isNaN(ae.avg)?1:isNaN(Oe.avg)?-1:Q==="asc"?ae.avg-Oe.avg:Oe.avg-ae.avg})}}me[F]=q||C(i.filter(Q=>t.has(Q)),F)}),console.log({modelOrderByOverallMetric:me}),E.jsxs("div",{className:"rounded",children:[o&&E.jsx("div",{className:"text-red-500",children:o}),!o&&E.jsxs("div",{className:"flex flex-col gap-8",children:[E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(d$,{overallMetrics:w,selectedOverallMetrics:y,setSelectedOverallMetrics:h}),E.jsx(c$,{groups:u,selectedMetrics:v,setSelectedMetrics:b})]}),t.size===0||v.size===0?E.jsx("div",{className:"text-center p-4 text-lg",children:"Please select at least one model and one metric to display the data"}):E.jsxs(E.Fragment,{children:[E.jsx(f$,{independentMetrics:Y(),tableHeader:i,selectedModels:t,tableRows:r}),E.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:E.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[E.jsxs("thead",{children:[E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Attack Category Metrics"}),w.filter(F=>y.has(F)).map(F=>E.jsx("th",{className:"bg-base-100 z-10 text-center text-xs border-gray-700 border",colSpan:me[F].length,children:F},`header-metric-${F}`))]}),E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border"}),w.filter(F=>y.has(F)).map(F=>E.jsx(A.Fragment,{children:me[F].map(q=>{var Q,k,te,H;const R=((k=(Q=S[F])==null?void 0:Q[q])==null?void 0:k.direction)!==void 0,K=((H=(te=S[F])==null?void 0:te[q])==null?void 0:H.direction)||"desc";return E.jsxs("th",{className:"sticky top-12 bg-base-100 z-10 text-center text-xs border-gray-700 border border-bottom-solid border-b-gray-700 border-b-3 cursor-pointer select-none",onClick:()=>j(F,q),children:[q,E.jsx("span",{className:"ml-1",children:R?K==="asc"?"↑":"↓":"⇅"})]},`${F}-${q}`)})},`header-models-${F}`))]})]}),E.jsx("tbody",{children:Se.map(([F,q])=>{var k,te;if(F==="Overall")return null;const R=Object.values(q).flat(),K=re(R,F);if(K.length===0)return null;let Q=Object.entries(q);if(le){const H=W(le.overallMetric),ne=ee=>{const oe=ee.filter(ae=>H.includes(ae));return V(oe,le.model).avg};Q=Q.sort(([,ee],[,oe])=>{const he=ne(ee),ae=ne(oe);return isNaN(he)&&isNaN(ae)?0:isNaN(he)?1:isNaN(ae)?-1:le.direction==="asc"?he-ae:ae-he})}return E.jsxs(A.Fragment,{children:[E.jsxs("tr",{className:"bg-base-200 cursor-pointer hover:bg-base-300",onClick:()=>T(F),children:[E.jsxs("td",{className:"sticky left-0 bg-base-200 z-10 font-medium border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{children:f[F]?"▼ ":"▶ "}),E.jsx("span",{className:"flex-1",children:F}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:H=>{H.stopPropagation(),B(F,null,null)},title:M(F,null,null)?((k=M(F,null,null))==null?void 0:k.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,null,null)?((te=M(F,null,null))==null?void 0:te.direction)==="asc"?"↑":"↓":"⇅"})]}),w.filter(H=>y.has(H)).map(H=>E.jsx(A.Fragment,{children:me[H].map(ne=>{const ee=W(H),oe=K.filter(ae=>ee.includes(ae)),he=V(oe,ne);return E.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(he.avg)?"N/A":`${he.avg.toFixed(3)} ± ${he.stdDev.toFixed(3)}`},`${F}-${H}-${ne}`)})},`${F}-${H}`))]}),f[F]&&Q.map(([H,ne])=>{var oe,he,ae,Oe;const ee=re(ne,F,H);return ee.length===0?null:E.jsxs(A.Fragment,{children:[E.jsxs("tr",{className:"bg-base-100 cursor-pointer hover:bg-base-200",onClick:()=>$(F,H),children:[E.jsxs("td",{className:"sticky left-0 bg-base-100 z-10 pl-6 font-medium border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{children:(oe=d[F])!=null&&oe[H]?"▼ ":"▶ "}),E.jsx("span",{className:"flex-1",children:H}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:ge=>{ge.stopPropagation(),B(F,H,null)},title:M(F,H,null)?((he=M(F,H,null))==null?void 0:he.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,H,null)?((ae=M(F,H,null))==null?void 0:ae.direction)==="asc"?"↑":"↓":"⇅"})]}),w.filter(ge=>y.has(ge)).map(ge=>E.jsx(A.Fragment,{children:me[ge].map(ze=>{const ce=W(ge),Qe=ee.filter(_t=>ce.includes(_t)),Ze=V(Qe,ze);return E.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(Ze.avg)?"N/A":`${Ze.avg.toFixed(3)} ± ${Ze.stdDev.toFixed(3)}`},`${F}-${H}-${ge}-${ze}`)})},`${F}-${H}-${ge}`))]}),((Oe=d[F])==null?void 0:Oe[H])&&(()=>{const ge=z();let ze=[...ee];if(console.log("Sorting metrics for subgroup:",F,H,"with config:",ge),ge){const ce=W(ge.overallMetric),Qe=ze.filter(_t=>ce.includes(_t)),Ze=ze.filter(_t=>!ce.includes(_t));ze=[...D(Qe,ge.overallMetric,ge.model,ge.direction),...Ze]}else ze=ze.sort((ce,Qe)=>{const Ze=mt=>{for(const Ut of w)if(mt.endsWith(`_${Ut}`)||mt===Ut)return Ut;return""},_t=Ze(ce),Je=Ze(Qe),tf=(mt,Ut)=>{if(mt.endsWith(`_${Ut}`)){const ar=mt.slice(0,mt.length-Ut.length-1).split("_");return ar.length>0?ar[ar.length-1]:""}return mt},kn=(mt,Ut)=>{if(mt.endsWith(`_${Ut}`)){const ar=mt.slice(0,mt.length-Ut.length-1).split("_");return ar.length>1?ar.slice(0,ar.length-1).join("_"):""}return mt},pi=kn(ce,_t),Ty=kn(Qe,Je);if(pi!==Ty)return pi.localeCompare(Ty);if(_t!==Je)return _t.localeCompare(Je);const jy=tf(ce,_t),Cy=tf(Qe,Je),ky=mt=>{const Ut=mt.match(/^\d+(?:\.\d+)?([kKmMbB]?)$/);if(!Ut)return NaN;let[Iy,ar]=Ut,Nl=parseFloat(mt);switch(ar==null?void 0:ar.toLowerCase()){case"k":Nl*=1e3;break;case"m":Nl*=1e6;break;case"b":Nl*=1e9;break}return Nl},My=ky(jy),Ny=ky(Cy);return!isNaN(My)&&!isNaN(Ny)?My-Ny:jy.localeCompare(Cy)});return ze.map(ce=>{var Ze,_t;const Qe=r.find(Je=>Je.metric===ce);return Qe?(ce.includes("_")&&ce.split("_").slice(1).join("_"),E.jsxs("tr",{className:"hover:bg-base-100",children:[E.jsxs("td",{className:"sticky left-0 bg-base-100 z-10 pl-10 border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{className:"flex-1",children:ce}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:Je=>{Je.stopPropagation(),B(F,H,ce)},title:M(F,H,ce)?((Ze=M(F,H,ce))==null?void 0:Ze.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,H,ce)?((_t=M(F,H,ce))==null?void 0:_t.direction)==="asc"?"▲":"▼":"⇅"})]}),w.filter(Je=>y.has(Je)).map(Je=>W(Je).includes(ce)?E.jsx(A.Fragment,{children:me[Je].map(kn=>{const pi=Qe[kn];return E.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(pi))?pi:Number(Number(pi).toFixed(3))},`${ce}-${Je}-${kn}`)})},`${ce}-${Je}`):E.jsx(A.Fragment,{children:me[Je].map(kn=>E.jsx("td",{className:"text-center border-gray-700 border"},`${ce}-${Je}-${kn}`))},`${ce}-${Je}`))]},ce)):null})})()]},`${F}-${H}`)})]},F)})})]})})]})]})]})};function Jx(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-1}var dj=fj,pj=pc;function hj(e,t){var r=this.__data__,n=pj(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var vj=hj,yj=ZT,mj=oj,gj=sj,bj=dj,wj=vj;function _a(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Wn=function(t){return ri(t)&&t.indexOf("%")===t.length-1},X=function(t){return zC(t)&&!_l(t)},Xe=function(t){return X(t)||ri(t)},HC=0,Pl=function(t){var r=++HC;return"".concat(t||"").concat(r)},ni=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(!X(t)&&!ri(t))return n;var a;if(Wn(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return _l(a)&&(a=n),i&&a>r&&(a=r),a},un=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},VC=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 ZC(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 np(e){"@babel/helpers - typeof";return np=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},np(e)}var ng={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"},zr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},ig=null,Nf=null,Mv=function e(t){if(t===ig&&Array.isArray(Nf))return Nf;var r=[];return N.Children.forEach(t,function(n){fe(n)||(IC.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Nf=r,ig=t,r};function Jt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return zr(i)}):n=[zr(t)],Mv(e).forEach(function(i){var a=Zt(i,"type.displayName")||Zt(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function It(e,t){var r=Jt(e,t);return r&&r[0]}var ag=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!X(n)||n<=0||!X(i)||i<=0)},JC=["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"],ek=function(t){return t&&t.type&&ri(t.type)&&JC.indexOf(t.type)>=0},tk=function(t){return t&&np(t)==="object"&&"clipDot"in t},rk=function(t,r,n,i){var a,o=(a=Mf==null?void 0:Mf[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ue(t)&&(i&&o.includes(r)||qC.includes(r))||n&&kv.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(N.isValidElement(t)&&(i=t.props),!Sa(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;rk((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},ip=function e(t,r){if(t===r)return!0;var n=N.Children.count(t);if(n!==N.Children.count(r))return!1;if(n===0)return!0;if(n===1)return og(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 lk(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 op(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,s=ok(e,ak),f=i||{width:r,height:n,x:0,y:0},c=ve("recharts-surface",a);return A.createElement("svg",ap({},de(s,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),A.createElement("title",null,l),A.createElement("desc",null,u),t)}var uk=["children","className"];function lp(){return lp=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 ck(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 We=A.forwardRef(function(e,t){var r=e.children,n=e.className,i=sk(e,uk),a=ve("recharts-layer",n);return A.createElement("g",lp({className:a},de(i,!0),{ref:t}),r)}),Fr=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:pk(e,t,r)}var vk=hk,yk="\\ud800-\\udfff",mk="\\u0300-\\u036f",gk="\\ufe20-\\ufe2f",bk="\\u20d0-\\u20ff",wk=mk+gk+bk,xk="\\ufe0e\\ufe0f",Sk="\\u200d",Ok=RegExp("["+Sk+yk+wk+xk+"]");function _k(e){return Ok.test(e)}var dS=_k;function Pk(e){return e.split("")}var Ak=Pk,pS="\\ud800-\\udfff",Ek="\\u0300-\\u036f",$k="\\ufe20-\\ufe2f",Tk="\\u20d0-\\u20ff",jk=Ek+$k+Tk,Ck="\\ufe0e\\ufe0f",kk="["+pS+"]",up="["+jk+"]",sp="\\ud83c[\\udffb-\\udfff]",Mk="(?:"+up+"|"+sp+")",hS="[^"+pS+"]",vS="(?:\\ud83c[\\udde6-\\uddff]){2}",yS="[\\ud800-\\udbff][\\udc00-\\udfff]",Nk="\\u200d",mS=Mk+"?",gS="["+Ck+"]?",Ik="(?:"+Nk+"(?:"+[hS,vS,yS].join("|")+")"+gS+mS+")*",Dk=gS+mS+Ik,Lk="(?:"+[hS+up+"?",up,vS,yS,kk].join("|")+")",Rk=RegExp(sp+"(?="+sp+")|"+Lk+Dk,"g");function Bk(e){return e.match(Rk)||[]}var zk=Bk,Fk=Ak,Wk=dS,Uk=zk;function Hk(e){return Wk(e)?Uk(e):Fk(e)}var Vk=Hk,Gk=vk,Kk=dS,qk=Vk,Xk=oS;function Yk(e){return function(t){t=Xk(t);var r=Kk(t)?qk(t):void 0,n=r?r[0]:t.charAt(0),i=r?Gk(r,1).join(""):t.slice(1);return n[e]()+i}}var Qk=Yk,Zk=Qk,Jk=Zk("toUpperCase"),eM=Jk;const Ec=Ae(eM);function Ee(e){return function(){return e}}const bS=Math.cos,Ju=Math.sin,br=Math.sqrt,es=Math.PI,$c=2*es,cp=Math.PI,fp=2*cp,Dn=1e-6,tM=fp-Dn;function wS(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wS;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iDn)if(!(Math.abs(c*u-s*f)>Dn)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-l,b=u*u+s*s,w=p*p+v*v,g=Math.sqrt(b),y=Math.sqrt(d),h=a*Math.tan((cp-Math.acos((b+d-w)/(2*g*y)))/2),S=h/y,m=h/g;Math.abs(S-1)>Dn&&this._append`L${t+S*f},${r+S*c}`,this._append`A${a},${a},0,0,${+(c*p>f*v)},${this._x1=t+m*u},${this._y1=r+m*s}`}}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 l=n*Math.cos(i),u=n*Math.sin(i),s=t+l,f=r+u,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Dn||Math.abs(this._y1-f)>Dn)&&this._append`L${s},${f}`,n&&(d<0&&(d=d%fp+fp),d>tM?this._append`A${n},${n},0,1,${c},${t-l},${r-u}A${n},${n},0,1,${c},${this._x1=s},${this._y1=f}`:d>Dn&&this._append`A${n},${n},0,${+(d>=cp)},${c},${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 Nv(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 nM(t)}function Iv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xS(e){this._context=e}xS.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 Tc(e){return new xS(e)}function SS(e){return e[0]}function OS(e){return e[1]}function _S(e,t){var r=Ee(!0),n=null,i=Tc,a=null,o=Nv(l);e=typeof e=="function"?e:e===void 0?SS:Ee(e),t=typeof t=="function"?t:t===void 0?OS:Ee(t);function l(u){var s,f=(u=Iv(u)).length,c,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=f;++s)!(s=p;--v)l.point(h[v],S[v]);l.lineEnd(),l.areaEnd()}g&&(h[d]=+e(w,d,c),S[d]=+t(w,d,c),l.point(n?+n(w,d,c):h[d],r?+r(w,d,c):S[d]))}if(y)return l=null,y+""||null}function f(){return _S().defined(i).curve(o).context(a)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ee(+c),n=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ee(+c),s):e},s.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ee(+c),s):n},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ee(+c),r=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ee(+c),s):t},s.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ee(+c),s):r},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(r)},s.lineX1=function(){return f().x(n).y(t)},s.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Ee(!!c),s):i},s.curve=function(c){return arguments.length?(o=c,a!=null&&(l=o(a)),s):o},s.context=function(c){return arguments.length?(c==null?a=l=null:l=o(a=c),s):a},s}class PS{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 iM(e){return new PS(e,!0)}function aM(e){return new PS(e,!1)}const Dv={draw(e,t){const r=br(t/es);e.moveTo(r,0),e.arc(0,0,r,0,$c)}},oM={draw(e,t){const r=br(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()}},AS=br(1/3),lM=AS*2,uM={draw(e,t){const r=br(t/lM),n=r*AS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},sM={draw(e,t){const r=br(t),n=-r/2;e.rect(n,n,r,r)}},cM=.8908130915292852,ES=Ju(es/10)/Ju(7*es/10),fM=Ju($c/10)*ES,dM=-bS($c/10)*ES,pM={draw(e,t){const r=br(t*cM),n=fM*r,i=dM*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=$c*a/5,l=bS(o),u=Ju(o);e.lineTo(u*r,-l*r),e.lineTo(l*n-u*i,u*n+l*i)}e.closePath()}},If=br(3),hM={draw(e,t){const r=-br(t/(If*3));e.moveTo(0,r*2),e.lineTo(-If*r,-r),e.lineTo(If*r,-r),e.closePath()}},Ht=-.5,Vt=br(3)/2,dp=1/br(12),vM=(dp/2+1)*3,yM={draw(e,t){const r=br(t/vM),n=r/2,i=r*dp,a=n,o=r*dp+r,l=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(Ht*n-Vt*i,Vt*n+Ht*i),e.lineTo(Ht*a-Vt*o,Vt*a+Ht*o),e.lineTo(Ht*l-Vt*u,Vt*l+Ht*u),e.lineTo(Ht*n+Vt*i,Ht*i-Vt*n),e.lineTo(Ht*a+Vt*o,Ht*o-Vt*a),e.lineTo(Ht*l+Vt*u,Ht*u-Vt*l),e.closePath()}};function mM(e,t){let r=null,n=Nv(i);e=typeof e=="function"?e:Ee(e||Dv),t=typeof t=="function"?t:Ee(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:Ee(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ee(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ts(){}function rs(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 $S(e){this._context=e}$S.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:rs(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:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gM(e){return new $S(e)}function TS(e){this._context=e}TS.prototype={areaStart:ts,areaEnd:ts,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:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bM(e){return new TS(e)}function jS(e){this._context=e}jS.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:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wM(e){return new jS(e)}function CS(e){this._context=e}CS.prototype={areaStart:ts,areaEnd:ts,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 xM(e){return new CS(e)}function ug(e){return e<0?-1:1}function sg(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),l=(a*i+o*n)/(n+i);return(ug(a)+ug(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function cg(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Df(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function ns(e){this._context=e}ns.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:Df(this,this._t0,cg(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,Df(this,cg(this,r=sg(this,e,t)),r);break;default:Df(this,this._t0,r=sg(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kS(e){this._context=new MS(e)}(kS.prototype=Object.create(ns.prototype)).point=function(e,t){ns.prototype.point.call(this,t,e)};function MS(e){this._context=e}MS.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 SM(e){return new ns(e)}function OM(e){return new kS(e)}function NS(e){this._context=e}NS.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=fg(e),i=fg(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 PM(e){return new jc(e,.5)}function AM(e){return new jc(e,0)}function EM(e){return new jc(e,1)}function Yi(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r=0;)r[t]=t;return r}function $M(e,t){return e[t]}function TM(e){const t=[];return t.key=e,t}function jM(){var e=Ee([]),t=pp,r=Yi,n=$M;function i(a){var o=Array.from(e.apply(this,arguments),TM),l,u=o.length,s=-1,f;for(const c of a)for(l=0,++s;l0){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 BM(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 IS={symbolCircle:Dv,symbolCross:oM,symbolDiamond:uM,symbolSquare:sM,symbolStar:pM,symbolTriangle:hM,symbolWye:yM},zM=Math.PI/180,FM=function(t){var r="symbol".concat(Ec(t));return IS[r]||Dv},WM=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*zM;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}},UM=function(t,r){IS["symbol".concat(Ec(t))]=r},Lv=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=RM(t,NM),s=pg(pg({},u),{},{type:n,size:a,sizeType:l}),f=function(){var w=FM(n),g=mM().type(w).size(WM(a,l,n));return g()},c=s.className,d=s.cx,p=s.cy,v=de(s,!0);return d===+d&&p===+p&&a===+a?A.createElement("path",hp({},v,{className:ve("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};Lv.registerSymbol=UM;function Qi(e){"@babel/helpers - typeof";return Qi=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},Qi(e)}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var y=p.inactive?s:p.color;return A.createElement("li",vp({className:w,style:c,key:"legend-item-".concat(v)},Zu(n.props,p,v)),A.createElement(op,{width:o,height:o,viewBox:f,style:d},n.renderIcon(p)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},b?b(g,p,v):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return A.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(N.PureComponent);Lo(Rv,"displayName","Legend");Lo(Rv,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var JM=hc;function e2(){this.__data__=new JM,this.size=0}var t2=e2;function r2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var n2=r2;function i2(e){return this.__data__.get(e)}var a2=i2;function o2(e){return this.__data__.has(e)}var l2=o2,u2=hc,s2=Pv,c2=Av,f2=200;function d2(e,t){var r=this.__data__;if(r instanceof u2){var n=r.__data__;if(!s2||n.lengthl))return!1;var s=a.get(e),f=a.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,p=r&N2?new j2:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=RN}var Wv=BN,zN=Zr,FN=Wv,WN=Jr,UN="[object Arguments]",HN="[object Array]",VN="[object Boolean]",GN="[object Date]",KN="[object Error]",qN="[object Function]",XN="[object Map]",YN="[object Number]",QN="[object Object]",ZN="[object RegExp]",JN="[object Set]",eI="[object String]",tI="[object WeakMap]",rI="[object ArrayBuffer]",nI="[object DataView]",iI="[object Float32Array]",aI="[object Float64Array]",oI="[object Int8Array]",lI="[object Int16Array]",uI="[object Int32Array]",sI="[object Uint8Array]",cI="[object Uint8ClampedArray]",fI="[object Uint16Array]",dI="[object Uint32Array]",je={};je[iI]=je[aI]=je[oI]=je[lI]=je[uI]=je[sI]=je[cI]=je[fI]=je[dI]=!0;je[UN]=je[HN]=je[rI]=je[VN]=je[nI]=je[GN]=je[KN]=je[qN]=je[XN]=je[YN]=je[QN]=je[ZN]=je[JN]=je[eI]=je[tI]=!1;function pI(e){return WN(e)&&FN(e.length)&&!!je[zN(e)]}var hI=pI;function vI(e){return function(t){return e(t)}}var GS=vI,ls={exports:{}};ls.exports;(function(e,t){var r=eS,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ls,ls.exports);var yI=ls.exports,mI=hI,gI=GS,wg=yI,xg=wg&&wg.isTypedArray,bI=xg?gI(xg):mI,KS=bI,wI=ON,xI=zv,SI=Ct,OI=VS,_I=Fv,PI=KS,AI=Object.prototype,EI=AI.hasOwnProperty;function $I(e,t){var r=SI(e),n=!r&&xI(e),i=!r&&!n&&OI(e),a=!r&&!n&&!i&&PI(e),o=r||n||i||a,l=o?wI(e.length,String):[],u=l.length;for(var s in e)(t||EI.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||_I(s,u)))&&l.push(s);return l}var TI=$I,jI=Object.prototype;function CI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||jI;return e===r}var kI=CI;function MI(e,t){return function(r){return e(t(r))}}var qS=MI,NI=qS,II=NI(Object.keys,Object),DI=II,LI=kI,RI=DI,BI=Object.prototype,zI=BI.hasOwnProperty;function FI(e){if(!LI(e))return RI(e);var t=[];for(var r in Object(e))zI.call(e,r)&&r!="constructor"&&t.push(r);return t}var WI=FI,UI=Ov,HI=Wv;function VI(e){return e!=null&&HI(e.length)&&!UI(e)}var Al=VI,GI=TI,KI=WI,qI=Al;function XI(e){return qI(e)?GI(e):KI(e)}var Cc=XI,YI=fN,QI=xN,ZI=Cc;function JI(e){return YI(e,ZI,QI)}var eD=JI,Sg=eD,tD=1,rD=Object.prototype,nD=rD.hasOwnProperty;function iD(e,t,r,n,i,a){var o=r&tD,l=Sg(e),u=l.length,s=Sg(t),f=s.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=l[c];if(!(o?d in t:nD.call(t,d)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var b=!0;a.set(e,t),a.set(t,e);for(var w=o;++c-1}var rR=tR;function nR(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=gR){var s=t?null:yR(e);if(s)return mR(s);o=!1,i=vR,u=new dR}else u=t?[]:l;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NR(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 IR(e){return e.value}function DR(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=MR(t,PR);return A.createElement(Rv,r)}var Rg=1,qn=function(e){function t(){var r;AR(this,t);for(var n=arguments.length,i=new Array(n),a=0;aRg||Math.abs(i.height-this.lastBoundingBox.height)>Rg)&&(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?Cr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,s=i.chartWidth,f=i.chartHeight,c,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();c={left:((s||0)-p.width)/2}}else c=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var v=this.getBBoxSnapshot();d={top:((f||0)-v.height)/2}}else d=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Cr(Cr({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,s=i.payloadUniqBy,f=i.payload,c=Cr(Cr({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return A.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},DR(a,Cr(Cr({},this.props),{},{payload:tO(f,s,IR)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Cr(Cr({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&X(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(N.PureComponent);kc(qn,"displayName","Legend");kc(qn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Bg=Ol,LR=zv,RR=Ct,zg=Bg?Bg.isConcatSpreadable:void 0;function BR(e){return RR(e)||LR(e)||!!(zg&&e&&e[zg])}var zR=BR,FR=US,WR=zR;function iO(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=WR),i||(i=[]);++a0&&r(l)?t>1?iO(l,t-1,r,n,i):FR(i,l):n||(i[i.length]=l)}return i}var aO=iO;function UR(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var HR=UR,VR=HR,GR=VR(),KR=GR,qR=KR,XR=Cc;function YR(e,t){return e&&qR(e,t,XR)}var oO=YR,QR=Al;function ZR(e,t){return function(r,n){if(r==null)return r;if(!QR(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&u&&!l&&!s||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!s&&e=l)return u;var s=r[n];return u*(s=="desc"?-1:1)}}return e.index-t.index}var d3=f3,zf=$v,p3=Tv,h3=$n,v3=lO,y3=l3,m3=GS,g3=d3,b3=$a,w3=Ct;function x3(e,t,r){t.length?t=zf(t,function(a){return w3(a)?function(o){return p3(o,a.length===1?a[0]:a)}:a}):t=[b3];var n=-1;t=zf(t,m3(h3));var i=v3(e,function(a,o,l){var u=zf(t,function(s){return s(a)});return{criteria:u,index:++n,value:a}});return y3(i,function(a,o){return g3(a,o,r)})}var S3=x3;function O3(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 _3=O3,P3=_3,Wg=Math.max;function A3(e,t,r){return t=Wg(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Wg(n.length-t,0),o=Array(a);++i0){if(++t>=D3)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var z3=B3,F3=I3,W3=z3,U3=W3(F3),H3=U3,V3=$a,G3=E3,K3=H3;function q3(e,t){return K3(G3(e,t,V3),e+"")}var X3=q3,Y3=_v,Q3=Al,Z3=Fv,J3=En;function eB(e,t,r){if(!J3(r))return!1;var n=typeof t;return(n=="number"?Q3(r)&&Z3(t,r.length):n=="string"&&t in r)?Y3(r[t],e):!1}var Mc=eB,tB=aO,rB=S3,nB=X3,Hg=Mc,iB=nB(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Hg(e,t[0],t[1])?t=[]:r>2&&Hg(t[0],t[1],t[2])&&(t=[t[0]]),rB(e,tB(t,1),[])}),aB=iB;const Vv=Ae(aB);function Ro(e){"@babel/helpers - typeof";return Ro=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},Ro(e)}function Op(){return Op=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(Ua,"-left"),X(r)&&t&&X(t.x)&&r=t.y),"".concat(Ua,"-top"),X(n)&&t&&X(t.y)&&nb?Math.max(f,u[n]):Math.max(c,u[n])}function wB(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 xB(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,s,f,c;return o.height>0&&o.width>0&&r?(f=Kg({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),c=Kg({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),s=wB({translateX:f,translateY:c,useTranslate3d:l})):s=gB,{cssProperties:s,cssClasses:bB({translateX:f,translateY:c,coordinate:r})}}function Ji(e){"@babel/helpers - typeof";return Ji=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},Ji(e)}function qg(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 Xg(e){for(var t=1;tYg||Math.abs(n.height-this.state.lastBoundingBox.height)>Yg)&&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,l=i.animationDuration,u=i.animationEasing,s=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,p=i.offset,v=i.position,b=i.reverseDirection,w=i.useTranslate3d,g=i.viewBox,y=i.wrapperStyle,h=xB({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:v,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:g}),S=h.cssClasses,m=h.cssProperties,x=Xg(Xg({transition:d&&a?"transform ".concat(l,"ms ").concat(u):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},y);return A.createElement("div",{tabIndex:-1,className:S,style:x,ref:function(_){n.wrapperNode=_}},s)}}])}(N.PureComponent),CB=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ta={isSsr:CB()};function ea(e){"@babel/helpers - typeof";return ea=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},ea(e)}function Qg(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 Zg(e){for(var t=1;t0;return A.createElement(jB,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:x,offset:p,position:w,reverseDirection:g,useTranslate3d:y,viewBox:h,wrapperStyle:S},FB(s,Zg(Zg({},this.props),{},{payload:m})))}}])}(N.PureComponent);Gv(Sr,"displayName","Tooltip");Gv(Sr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ta.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 WB=jr,UB=function(){return WB.Date.now()},HB=UB,VB=/\s/;function GB(e){for(var t=e.length;t--&&VB.test(e.charAt(t)););return t}var KB=GB,qB=KB,XB=/^\s+/;function YB(e){return e&&e.slice(0,qB(e)+1).replace(XB,"")}var QB=YB,ZB=QB,Jg=En,JB=xa,e0=NaN,ez=/^[-+]0x[0-9a-f]+$/i,tz=/^0b[01]+$/i,rz=/^0o[0-7]+$/i,nz=parseInt;function iz(e){if(typeof e=="number")return e;if(JB(e))return e0;if(Jg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ZB(e);var r=tz.test(e);return r||rz.test(e)?nz(e.slice(2),r?2:8):ez.test(e)?e0:+e}var pO=iz,az=En,Wf=HB,t0=pO,oz="Expected a function",lz=Math.max,uz=Math.min;function sz(e,t,r){var n,i,a,o,l,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(oz);t=t0(t)||0,az(r)&&(f=!!r.leading,c="maxWait"in r,a=c?lz(t0(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(x){var O=n,_=i;return n=i=void 0,s=x,o=e.apply(_,O),o}function v(x){return s=x,l=setTimeout(g,t),f?p(x):o}function b(x){var O=x-u,_=x-s,P=t-O;return c?uz(P,a-_):P}function w(x){var O=x-u,_=x-s;return u===void 0||O>=t||O<0||c&&_>=a}function g(){var x=Wf();if(w(x))return y(x);l=setTimeout(g,b(x))}function y(x){return l=void 0,d&&n?p(x):(n=i=void 0,o)}function h(){l!==void 0&&clearTimeout(l),s=0,n=u=i=l=void 0}function S(){return l===void 0?o:y(Wf())}function m(){var x=Wf(),O=w(x);if(n=arguments,i=this,u=x,O){if(l===void 0)return v(u);if(c)return clearTimeout(l),l=setTimeout(g,t),p(u)}return l===void 0&&(l=setTimeout(g,t)),o}return m.cancel=h,m.flush=S,m}var cz=sz,fz=cz,dz=En,pz="Expected a function";function hz(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(pz);return dz(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fz(e,t,{leading:n,maxWait:t,trailing:i})}var vz=hz;const hO=Ae(vz);function zo(e){"@babel/helpers - typeof";return zo=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},zo(e)}function r0(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 nu(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(L=hO(L,b,{trailing:!0,leading:!1}));var B=new ResizeObserver(L),M=m.current.getBoundingClientRect(),z=M.width,U=M.height;return $(z,U),B.observe(m.current),function(){B.disconnect()}},[$,b]);var j=N.useMemo(function(){var L=P.containerWidth,B=P.containerHeight;if(L<0||B<0)return null;Fr(Wn(o)||Wn(u),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,u),Fr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Wn(o)?L:o,z=Wn(u)?B:u;r&&r>0&&(M?z=M/r:z&&(M=z*r),d&&z>d&&(z=d)),Fr(M>0||z>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.`,M,z,o,u,f,c,r);var U=!Array.isArray(p)&&zr(p.type).endsWith("Chart");return A.Children.map(p,function(C){return A.isValidElement(C)?N.cloneElement(C,nu({width:M,height:z},U?{style:nu({height:"100%",width:"100%",maxHeight:z,maxWidth:M},C.props.style)}:{})):C})},[r,p,u,d,c,f,P,o]);return A.createElement("div",{id:w?"".concat(w):void 0,className:ve("recharts-responsive-container",g),style:nu(nu({},S),{},{width:o,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:m},j)}),vO=function(t){return null};vO.displayName="Cell";function Fo(e){"@babel/helpers - typeof";return Fo=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},Fo(e)}function i0(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 Ep(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ta.isSsr)return{width:0,height:0};var n=jz(r),i=JSON.stringify({text:t,copyStyle:n});if(vi.widthCache[i])return vi.widthCache[i];try{var a=document.getElementById(a0);a||(a=document.createElement("span"),a.setAttribute("id",a0),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Ep(Ep({},Tz),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return vi.widthCache[i]=u,++vi.cacheCount>$z&&(vi.cacheCount=0,vi.widthCache={}),u}catch{return{width:0,height:0}}},Cz=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function fs(e,t){return Iz(e)||Nz(e,t)||Mz(e,t)||kz()}function kz(){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 Mz(e,t){if(e){if(typeof e=="string")return o0(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 o0(e,t)}}function o0(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 Xz(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 d0(e,t){return Jz(e)||Zz(e,t)||Qz(e,t)||Yz()}function Yz(){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 Qz(e,t){if(e){if(typeof e=="string")return p0(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 p0(e,t)}}function p0(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 M.reduce(function(z,U){var C=U.word,D=U.width,W=z[z.length-1];if(W&&(i==null||a||W.width+D+nU.width?z:U})};if(!f)return p;for(var b="…",w=function(M){var z=c.slice(0,M),U=bO({breakAll:s,style:u,children:z+b}).wordsWithComputedWidth,C=d(U),D=C.length>o||v(C).width>Number(i);return[D,C]},g=0,y=c.length-1,h=0,S;g<=y&&h<=c.length-1;){var m=Math.floor((g+y)/2),x=m-1,O=w(x),_=d0(O,2),P=_[0],T=_[1],$=w(m),j=d0($,1),L=j[0];if(!P&&!L&&(g=m+1),P&&L&&(y=m-1),!P&&L){S=T;break}h++}return S||p},h0=function(t){var r=fe(t)?[]:t.toString().split(gO);return[{words:r}]},t4=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!Ta.isSsr){var u,s,f=bO({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return h0(i);return e4({breakAll:o,children:i,maxLines:l,style:a},u,s,r,n)}return h0(i)},v0="#808080",ds=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,v=t.verticalAnchor,b=v===void 0?"end":v,w=t.fill,g=w===void 0?v0:w,y=f0(t,Kz),h=N.useMemo(function(){return t4({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:c,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,c,y.style,y.width]),S=y.dx,m=y.dy,x=y.angle,O=y.className,_=y.breakAll,P=f0(y,qz);if(!Xe(n)||!Xe(a))return null;var T=n+(X(S)?S:0),$=a+(X(m)?m:0),j;switch(b){case"start":j=Uf("calc(".concat(s,")"));break;case"middle":j=Uf("calc(".concat((h.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:j=Uf("calc(".concat(h.length-1," * -").concat(l,")"));break}var L=[];if(c){var B=h[0].width,M=y.width;L.push("scale(".concat((X(M)?M/B:1)/B,")"))}return x&&L.push("rotate(".concat(x,", ").concat(T,", ").concat($,")")),L.length&&(P.transform=L.join(" ")),A.createElement("text",$p({},de(P,!0),{x:T,y:$,className:ve("recharts-text",O),textAnchor:p,fill:g.includes("url")?v0:g}),h.map(function(z,U){var C=z.words.join(_?"":" ");return A.createElement("tspan",{x:T,dy:U===0?j:l,key:"".concat(C,"-").concat(U)},C)}))};function wn(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function r4(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Kv(e){let t,r,n;e.length!==2?(t=wn,r=(l,u)=>wn(e(l),u),n=(l,u)=>e(l)-u):(t=e===wn||e===r4?e:n4,r=e,n=e);function i(l,u,s=0,f=l.length){if(s>>1;r(l[c],u)<0?s=c+1:f=c}while(s>>1;r(l[c],u)<=0?s=c+1:f=c}while(ss&&n(l[c-1],u)>-n(l[c],u)?c-1:c}return{left:i,center:o,right:a}}function n4(){return 0}function wO(e){return e===null?NaN:+e}function*i4(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const a4=Kv(wn),El=a4.right;Kv(wO).center;class y0 extends Map{constructor(t,r=u4){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(m0(this,t))}has(t){return super.has(m0(this,t))}set(t,r){return super.set(o4(this,t),r)}delete(t){return super.delete(l4(this,t))}}function m0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function o4({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function l4({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function u4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function s4(e=wn){if(e===wn)return xO;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 xO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const c4=Math.sqrt(50),f4=Math.sqrt(10),d4=Math.sqrt(2);function ps(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>=c4?10:a>=f4?5:a>=d4?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(e*s),u=Math.round(t*s),l/st&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(e/s),u=Math.round(t/s),l*st&&--u),u0))return[];if(e===t)return[e];const n=t=i))return[];const l=a-i+1,u=new Array(l);if(n)if(o<0)for(let s=0;s=n)&&(r=n);return r}function b0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function SO(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?xO:s4(i);n>r;){if(n-r>600){const u=n-r+1,s=t-r+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),p=Math.max(r,Math.floor(t-s*c/u+d)),v=Math.min(n,Math.floor(t+(u-s)*c/u+d));SO(e,t,p,v,i)}const a=e[t];let o=r,l=n;for(Ha(e,r,t),i(e[n],a)>0&&Ha(e,r,n);o0;)--l}i(e[r],a)===0?Ha(e,r,l):(++l,Ha(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Ha(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function p4(e,t,r){if(e=Float64Array.from(i4(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return b0(e);if(t>=1)return g0(e);var n,i=(n-1)*t,a=Math.floor(i),o=g0(SO(e,a).subarray(0,a+1)),l=b0(e.subarray(a+1));return o+(l-o)*(i-a)}}function h4(e,t,r=wO){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),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function v4(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?au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?au(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=m4.exec(e))?new Et(t[1],t[2],t[3],1):(t=g4.exec(e))?new Et(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=b4.exec(e))?au(t[1],t[2],t[3],t[4]):(t=w4.exec(e))?au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x4.exec(e))?A0(t[1],t[2]/100,t[3]/100,1):(t=S4.exec(e))?A0(t[1],t[2]/100,t[3]/100,t[4]):w0.hasOwnProperty(e)?O0(w0[e]):e==="transparent"?new Et(NaN,NaN,NaN,0):null}function O0(e){return new Et(e>>16&255,e>>8&255,e&255,1)}function au(e,t,r,n){return n<=0&&(e=t=r=NaN),new Et(e,t,r,n)}function P4(e){return e instanceof $l||(e=Go(e)),e?(e=e.rgb(),new Et(e.r,e.g,e.b,e.opacity)):new Et}function Mp(e,t,r,n){return arguments.length===1?P4(e):new Et(e,t,r,n??1)}function Et(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Xv(Et,Mp,_O($l,{brighter(e){return e=e==null?hs:Math.pow(hs,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ho:Math.pow(Ho,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Et(Xn(this.r),Xn(this.g),Xn(this.b),vs(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:_0,formatHex:_0,formatHex8:A4,formatRgb:P0,toString:P0}));function _0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function A4(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function P0(){const e=vs(this.opacity);return`${e===1?"rgb(":"rgba("}${Xn(this.r)}, ${Xn(this.g)}, ${Xn(this.b)}${e===1?")":`, ${e})`}`}function vs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Un(e){return e=Xn(e),(e<16?"0":"")+e.toString(16)}function A0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new hr(e,t,r,n)}function PO(e){if(e instanceof hr)return new hr(e.h,e.s,e.l,e.opacity);if(e instanceof $l||(e=Go(e)),!e)return new hr;if(e instanceof hr)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,l=a-i,u=(a+i)/2;return l?(t===a?o=(r-n)/l+(r0&&u<1?0:o,new hr(o,l,u,e.opacity)}function E4(e,t,r,n){return arguments.length===1?PO(e):new hr(e,t,r,n??1)}function hr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Xv(hr,E4,_O($l,{brighter(e){return e=e==null?hs:Math.pow(hs,e),new hr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ho:Math.pow(Ho,e),new hr(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 Et(Hf(e>=240?e-240:e+120,i,n),Hf(e,i,n),Hf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new hr(E0(this.h),ou(this.s),ou(this.l),vs(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=vs(this.opacity);return`${e===1?"hsl(":"hsla("}${E0(this.h)}, ${ou(this.s)*100}%, ${ou(this.l)*100}%${e===1?")":`, ${e})`}`}}));function E0(e){return e=(e||0)%360,e<0?e+360:e}function ou(e){return Math.max(0,Math.min(1,e||0))}function Hf(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 Yv=e=>()=>e;function $4(e,t){return function(r){return e+r*t}}function T4(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 j4(e){return(e=+e)==1?AO:function(t,r){return r-t?T4(t,r,e):Yv(isNaN(t)?r:t)}}function AO(e,t){var r=t-e;return r?$4(e,r):Yv(isNaN(e)?t:e)}const $0=function e(t){var r=j4(t);function n(i,a){var o=r((i=Mp(i)).r,(a=Mp(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),s=AO(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=s(f),i+""}}return n.gamma=e,n}(1);function C4(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),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:ys(n,i)})),r=Vf.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function W4(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?U4:W4,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=l(e.map(n),t,r)))(n(o(d)))}return c.invert=function(d){return o(i((s||(s=l(t,e.map(n),ys)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,ms),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=Qv,f()},c.clamp=function(d){return arguments.length?(o=d?!0:wt,f()):o!==wt},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,p){return n=d,i=p,f()}}function Zv(){return Nc()(wt,wt)}function H4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gs(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 ta(e){return e=gs(Math.abs(e)),e?e[1]:NaN}function V4(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function G4(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var K4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ko(e){if(!(t=K4.exec(e)))throw new Error("invalid format: "+e);var t;return new Jv({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]})}Ko.prototype=Jv.prototype;function Jv(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+""}Jv.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 q4(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 EO;function X4(e,t){var r=gs(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(EO=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")+gs(e,Math.max(0,t+a-1))[0]}function j0(e,t){var r=gs(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 C0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:H4,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)=>j0(e*100,t),r:j0,s:X4,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function k0(e){return e}var M0=Array.prototype.map,N0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Y4(e){var t=e.grouping===void 0||e.thousands===void 0?k0:V4(M0.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?k0:G4(M0.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c){c=Ko(c);var d=c.fill,p=c.align,v=c.sign,b=c.symbol,w=c.zero,g=c.width,y=c.comma,h=c.precision,S=c.trim,m=c.type;m==="n"?(y=!0,m="g"):C0[m]||(h===void 0&&(h=12),S=!0,m="g"),(w||d==="0"&&p==="=")&&(w=!0,d="0",p="=");var x=b==="$"?r:b==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",O=b==="$"?n:/[%p]/.test(m)?o:"",_=C0[m],P=/[defgprs%]/.test(m);h=h===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h));function T($){var j=x,L=O,B,M,z;if(m==="c")L=_($)+L,$="";else{$=+$;var U=$<0||1/$<0;if($=isNaN($)?u:_(Math.abs($),h),S&&($=q4($)),U&&+$==0&&v!=="+"&&(U=!1),j=(U?v==="("?v:l:v==="-"||v==="("?"":v)+j,L=(m==="s"?N0[8+EO/3]:"")+L+(U&&v==="("?")":""),P){for(B=-1,M=$.length;++Bz||z>57){L=(z===46?i+$.slice(B+1):$.slice(B))+L,$=$.slice(0,B);break}}}y&&!w&&($=t($,1/0));var C=j.length+$.length+L.length,D=C>1)+j+$+L+D.slice(C);break;default:$=D+j+$+L;break}return a($)}return T.toString=function(){return c+""},T}function f(c,d){var p=s((c=Ko(c),c.type="f",c)),v=Math.max(-8,Math.min(8,Math.floor(ta(d)/3)))*3,b=Math.pow(10,-v),w=N0[8+v/3];return function(g){return p(b*g)+w}}return{format:s,formatPrefix:f}}var lu,ey,$O;Q4({thousands:",",grouping:[3],currency:["$",""]});function Q4(e){return lu=Y4(e),ey=lu.format,$O=lu.formatPrefix,lu}function Z4(e){return Math.max(0,-ta(Math.abs(e)))}function J4(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ta(t)/3)))*3-ta(Math.abs(e)))}function eF(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ta(t)-ta(e))+1}function TO(e,t,r,n){var i=Cp(e,t,r),a;switch(n=Ko(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=J4(i,o))&&(n.precision=a),$O(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=eF(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Z4(i))&&(n.precision=a-(n.type==="%")*2);break}}return ey(n)}function Tn(e){var t=e.domain;return e.ticks=function(r){var n=t();return Tp(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return TO(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],l=n[a],u,s,f=10;for(l0;){if(s=jp(o,l,r),s===u)return n[i]=o,n[a]=l,t(n);if(s>0)o=Math.floor(o/s)*s,l=Math.ceil(l/s)*s;else if(s<0)o=Math.ceil(o*s)/s,l=Math.floor(l*s)/s;else break;u=s}return e},e}function bs(){var e=Zv();return e.copy=function(){return Tl(e,bs())},ir.apply(e,arguments),Tn(e)}function jO(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,ms),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return jO(e).unknown(t)},e=arguments.length?Array.from(e,ms):[0,1],Tn(r)}function CO(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 aF(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 L0(e){return(t,r)=>-e(-t,r)}function ty(e){const t=e(I0,D0),r=t.domain;let n=10,i,a;function o(){return i=aF(n),a=iF(n),r()[0]<0?(i=L0(i),a=L0(a),e(tF,rF)):e(I0,D0),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const u=r();let s=u[0],f=u[u.length-1];const c=f0){for(;d<=p;++d)for(v=1;vf)break;g.push(b)}}else for(;d<=p;++d)for(v=n-1;v>=1;--v)if(b=d>0?v/a(-d):v*a(d),!(bf)break;g.push(b)}g.length*2{if(l==null&&(l=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Ko(u)).precision==null&&(u.trim=!0),u=ey(u)),l===1/0)return u;const s=Math.max(1,n*l/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(CO(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function kO(){const e=ty(Nc()).domain([1,10]);return e.copy=()=>Tl(e,kO()).base(e.base()),ir.apply(e,arguments),e}function R0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function B0(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ry(e){var t=1,r=e(R0(t),B0(t));return r.constant=function(n){return arguments.length?e(R0(t=+n),B0(t)):t},Tn(r)}function MO(){var e=ry(Nc());return e.copy=function(){return Tl(e,MO()).constant(e.constant())},ir.apply(e,arguments)}function z0(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oF(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lF(e){return e<0?-e*e:e*e}function ny(e){var t=e(wt,wt),r=1;function n(){return r===1?e(wt,wt):r===.5?e(oF,lF):e(z0(r),z0(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Tn(t)}function iy(){var e=ny(Nc());return e.copy=function(){return Tl(e,iy()).exponent(e.exponent())},ir.apply(e,arguments),e}function uF(){return iy.apply(null,arguments).exponent(.5)}function F0(e){return Math.sign(e)*e*e}function sF(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function NO(){var e=Zv(),t=[0,1],r=!1,n;function i(a){var o=sF(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(F0(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,ms)).map(F0)),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 NO(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ir.apply(i,arguments),Tn(i)}function IO(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[s-1],n[s]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return DO().domain([e,t]).range(i).unknown(a)},ir.apply(Tn(o),arguments)}function LO(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[El(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 LO().domain(e).range(t).unknown(r)},ir.apply(i,arguments)}const Gf=new Date,Kf=new Date;function Ye(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),l=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let s;do u.push(s=new Date(+a)),t(a,l),e(a);while(sYe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Gf.setTime(+a),Kf.setTime(+o),e(Gf),e(Kf),Math.floor(r(Gf,Kf))),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 ws=Ye(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ws.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ye(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ws);ws.range;const Dr=1e3,Yt=Dr*60,Lr=Yt*60,Kr=Lr*24,ay=Kr*7,W0=Kr*30,qf=Kr*365,Hn=Ye(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Dr)},(e,t)=>(t-e)/Dr,e=>e.getUTCSeconds());Hn.range;const oy=Ye(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dr)},(e,t)=>{e.setTime(+e+t*Yt)},(e,t)=>(t-e)/Yt,e=>e.getMinutes());oy.range;const ly=Ye(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yt)},(e,t)=>(t-e)/Yt,e=>e.getUTCMinutes());ly.range;const uy=Ye(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dr-e.getMinutes()*Yt)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getHours());uy.range;const sy=Ye(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCHours());sy.range;const jl=Ye(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yt)/Kr,e=>e.getDate()-1);jl.range;const Ic=Ye(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>e.getUTCDate()-1);Ic.range;const RO=Ye(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>Math.floor(e/Kr));RO.range;function ci(e){return Ye(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())*Yt)/ay)}const Dc=ci(0),xs=ci(1),cF=ci(2),fF=ci(3),ra=ci(4),dF=ci(5),pF=ci(6);Dc.range;xs.range;cF.range;fF.range;ra.range;dF.range;pF.range;function fi(e){return Ye(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)/ay)}const Lc=fi(0),Ss=fi(1),hF=fi(2),vF=fi(3),na=fi(4),yF=fi(5),mF=fi(6);Lc.range;Ss.range;hF.range;vF.range;na.range;yF.range;mF.range;const cy=Ye(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());cy.range;const fy=Ye(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());fy.range;const qr=Ye(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());qr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ye(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)});qr.range;const Xr=Ye(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());Xr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ye(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)});Xr.range;function BO(e,t,r,n,i,a){const o=[[Hn,1,Dr],[Hn,5,5*Dr],[Hn,15,15*Dr],[Hn,30,30*Dr],[a,1,Yt],[a,5,5*Yt],[a,15,15*Yt],[a,30,30*Yt],[i,1,Lr],[i,3,3*Lr],[i,6,6*Lr],[i,12,12*Lr],[n,1,Kr],[n,2,2*Kr],[r,1,ay],[t,1,W0],[t,3,3*W0],[e,1,qf]];function l(s,f,c){const d=fw).right(o,d);if(p===o.length)return e.every(Cp(s/qf,f/qf,c));if(p===0)return ws.every(Math.max(Cp(s,f,c),1));const[v,b]=o[d/o[p-1][2]53)return null;"w"in k||(k.w=1),"Z"in k?(H=Yf(Va(k.y,0,1)),ne=H.getUTCDay(),H=ne>4||ne===0?Ss.ceil(H):Ss(H),H=Ic.offset(H,(k.V-1)*7),k.y=H.getUTCFullYear(),k.m=H.getUTCMonth(),k.d=H.getUTCDate()+(k.w+6)%7):(H=Xf(Va(k.y,0,1)),ne=H.getDay(),H=ne>4||ne===0?xs.ceil(H):xs(H),H=jl.offset(H,(k.V-1)*7),k.y=H.getFullYear(),k.m=H.getMonth(),k.d=H.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),ne="Z"in k?Yf(Va(k.y,0,1)).getUTCDay():Xf(Va(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(ne+5)%7:k.w+k.U*7-(ne+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,Yf(k)):Xf(k)}}function _(R,K,Q,k){for(var te=0,H=K.length,ne=Q.length,ee,oe;te=ne)return-1;if(ee=K.charCodeAt(te++),ee===37){if(ee=K.charAt(te++),oe=m[ee in U0?K.charAt(te++):ee],!oe||(k=oe(R,Q,k))<0)return-1}else if(ee!=Q.charCodeAt(k++))return-1}return k}function P(R,K,Q){var k=s.exec(K.slice(Q));return k?(R.p=f.get(k[0].toLowerCase()),Q+k[0].length):-1}function T(R,K,Q){var k=p.exec(K.slice(Q));return k?(R.w=v.get(k[0].toLowerCase()),Q+k[0].length):-1}function $(R,K,Q){var k=c.exec(K.slice(Q));return k?(R.w=d.get(k[0].toLowerCase()),Q+k[0].length):-1}function j(R,K,Q){var k=g.exec(K.slice(Q));return k?(R.m=y.get(k[0].toLowerCase()),Q+k[0].length):-1}function L(R,K,Q){var k=b.exec(K.slice(Q));return k?(R.m=w.get(k[0].toLowerCase()),Q+k[0].length):-1}function B(R,K,Q){return _(R,t,K,Q)}function M(R,K,Q){return _(R,r,K,Q)}function z(R,K,Q){return _(R,n,K,Q)}function U(R){return o[R.getDay()]}function C(R){return a[R.getDay()]}function D(R){return u[R.getMonth()]}function W(R){return l[R.getMonth()]}function Y(R){return i[+(R.getHours()>=12)]}function V(R){return 1+~~(R.getMonth()/3)}function re(R){return o[R.getUTCDay()]}function le(R){return a[R.getUTCDay()]}function Se(R){return u[R.getUTCMonth()]}function me(R){return l[R.getUTCMonth()]}function F(R){return i[+(R.getUTCHours()>=12)]}function q(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var K=x(R+="",h);return K.toString=function(){return R},K},parse:function(R){var K=O(R+="",!1);return K.toString=function(){return R},K},utcFormat:function(R){var K=x(R+="",S);return K.toString=function(){return R},K},utcParse:function(R){var K=O(R+="",!0);return K.toString=function(){return R},K}}}var U0={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,OF=/^%/,_F=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function AF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function EF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $F(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function TF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function jF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function H0(e,t,r){var n=nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function V0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function CF(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 kF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function MF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function G0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function NF(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function K0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function IF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function DF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LF(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function RF(e,t,r){var n=nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function BF(e,t,r){var n=OF.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zF(e,t,r){var n=nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FF(e,t,r){var n=nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function q0(e,t){return ye(e.getDate(),t,2)}function WF(e,t){return ye(e.getHours(),t,2)}function UF(e,t){return ye(e.getHours()%12||12,t,2)}function HF(e,t){return ye(1+jl.count(qr(e),e),t,3)}function zO(e,t){return ye(e.getMilliseconds(),t,3)}function VF(e,t){return zO(e,t)+"000"}function GF(e,t){return ye(e.getMonth()+1,t,2)}function KF(e,t){return ye(e.getMinutes(),t,2)}function qF(e,t){return ye(e.getSeconds(),t,2)}function XF(e){var t=e.getDay();return t===0?7:t}function YF(e,t){return ye(Dc.count(qr(e)-1,e),t,2)}function FO(e){var t=e.getDay();return t>=4||t===0?ra(e):ra.ceil(e)}function QF(e,t){return e=FO(e),ye(ra.count(qr(e),e)+(qr(e).getDay()===4),t,2)}function ZF(e){return e.getDay()}function JF(e,t){return ye(xs.count(qr(e)-1,e),t,2)}function e8(e,t){return ye(e.getFullYear()%100,t,2)}function t8(e,t){return e=FO(e),ye(e.getFullYear()%100,t,2)}function r8(e,t){return ye(e.getFullYear()%1e4,t,4)}function n8(e,t){var r=e.getDay();return e=r>=4||r===0?ra(e):ra.ceil(e),ye(e.getFullYear()%1e4,t,4)}function i8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function X0(e,t){return ye(e.getUTCDate(),t,2)}function a8(e,t){return ye(e.getUTCHours(),t,2)}function o8(e,t){return ye(e.getUTCHours()%12||12,t,2)}function l8(e,t){return ye(1+Ic.count(Xr(e),e),t,3)}function WO(e,t){return ye(e.getUTCMilliseconds(),t,3)}function u8(e,t){return WO(e,t)+"000"}function s8(e,t){return ye(e.getUTCMonth()+1,t,2)}function c8(e,t){return ye(e.getUTCMinutes(),t,2)}function f8(e,t){return ye(e.getUTCSeconds(),t,2)}function d8(e){var t=e.getUTCDay();return t===0?7:t}function p8(e,t){return ye(Lc.count(Xr(e)-1,e),t,2)}function UO(e){var t=e.getUTCDay();return t>=4||t===0?na(e):na.ceil(e)}function h8(e,t){return e=UO(e),ye(na.count(Xr(e),e)+(Xr(e).getUTCDay()===4),t,2)}function v8(e){return e.getUTCDay()}function y8(e,t){return ye(Ss.count(Xr(e)-1,e),t,2)}function m8(e,t){return ye(e.getUTCFullYear()%100,t,2)}function g8(e,t){return e=UO(e),ye(e.getUTCFullYear()%100,t,2)}function b8(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function w8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?na(e):na.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function x8(){return"+0000"}function Y0(){return"%"}function Q0(e){return+e}function Z0(e){return Math.floor(+e/1e3)}var yi,HO,VO;S8({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 S8(e){return yi=SF(e),HO=yi.format,yi.parse,VO=yi.utcFormat,yi.utcParse,yi}function O8(e){return new Date(e)}function _8(e){return e instanceof Date?+e:+new Date(+e)}function dy(e,t,r,n,i,a,o,l,u,s){var f=Zv(),c=f.invert,d=f.domain,p=s(".%L"),v=s(":%S"),b=s("%I:%M"),w=s("%I %p"),g=s("%a %d"),y=s("%b %d"),h=s("%B"),S=s("%Y");function m(x){return(u(x)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>p4(e,a/n))},r.copy=function(){return XO(t).domain(e)},en.apply(r,arguments)}function Bc(){var e=0,t=.5,r=1,n=1,i,a,o,l,u,s=wt,f,c=!1,d;function p(b){return isNaN(b=+b)?d:(b=.5+((b=+f(b))-a)*(n*bt}var k8=C8,M8=JO,N8=k8,I8=$a;function D8(e){return e&&e.length?M8(e,I8,N8):void 0}var L8=D8;const zc=Ae(L8);function R8(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)*Ce;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 Wr(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return Pe(Wr(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return Ve(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(Dt))throw Error(rr+"NaN");if(r.s<1)throw Error(rr+(r.s?"NaN":"-Infinity"));return r.eq(Dt)?new n(0):(Ne=!1,t=Wr(qo(r,a),qo(e,a),a),Ne=!0,Pe(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?n_(t,e):t_(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?(Ne=!1,t=Wr(r,e,0,1).times(e),Ne=!0,r.minus(t)):Pe(new n(r),i)};J.naturalExponential=J.exp=function(){return r_(this)};J.naturalLogarithm=J.ln=function(){return qo(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?t_(t,e):n_(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(Yn+e);if(t=Ve(i)+1,n=i.d.length-1,r=n*Ce+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,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(rr+"NaN")}for(e=Ve(l),Ne=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=_r(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ka((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 u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(Wr(l,a,o+2)).times(.5),_r(a.d).slice(0,o)===(t=_r(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Pe(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return Ne=!0,Pe(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,l,u,s,f=this,c=f.constructor,d=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,u=d.length,s=p.length,u=0;){for(t=0,i=u+n;i>n;)l=a[i]+p[n]*d[i-n-1]+t,a[i--]=l%et|0,t=l/et|0;a[i]=(a[i]+t)%et|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ne?Pe(e,c.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Tr(e,0,Ca),t===void 0?t=n.rounding:Tr(t,0,8),Pe(r,e+Ve(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ii(n,!0):(Tr(e,0,Ca),t===void 0?t=i.rounding:Tr(t,0,8),n=Pe(new i(n),e+1,t),r=ii(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?ii(i):(Tr(e,0,Ca),t===void 0?t=a.rounding:Tr(t,0,8),n=Pe(new a(i),e+Ve(i)+1,t),r=ii(n.abs(),!1,e+Ve(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return Pe(new t(e),Ve(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,l=this,u=l.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(Dt);if(l=new u(l),!l.s){if(e.s<1)throw Error(rr+"Infinity");return l}if(l.eq(Dt))return l;if(n=u.precision,e.eq(Dt))return Pe(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=f<0?-f:f)<=e_){for(i=new u(Dt),t=Math.ceil(n/Ce+4),Ne=!1;r%2&&(i=i.times(l),tb(i.d,t)),r=ka(r/2),r!==0;)l=l.times(l),tb(l.d,t);return Ne=!0,e.s<0?new u(Dt).div(i):Pe(i,n)}}else if(a<0)throw Error(rr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ne=!1,i=e.times(qo(l,n+s)),Ne=!0,i=r_(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Ve(i),n=ii(i,r<=a.toExpNeg||r>=a.toExpPos)):(Tr(e,1,Ca),t===void 0?t=a.rounding:Tr(t,0,8),i=Pe(new a(i),e,t),r=Ve(i),n=ii(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):(Tr(e,1,Ca),t===void 0?t=n.rounding:Tr(t,0,8)),Pe(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=Ve(e),r=e.constructor;return ii(e,t<=r.toExpNeg||t>=r.toExpPos)};function t_(e,t){var r,n,i,a,o,l,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ne?Pe(t,c):t;if(u=e.d,s=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,l=s.length):(n=s,i=o,l=u.length),o=Math.ceil(c/Ce),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=u.length,a=s.length,l-a<0&&(a=l,n=s,s=u,u=n),r=0;a;)r=(u[--a]=u[a]+s[a]+r)/et|0,u[a]%=et;for(r&&(u.unshift(r),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Ne?Pe(t,c):t}function Tr(e,t,r){if(e!==~~e||er)throw Error(Yn+e)}function _r(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(l=u=0;li[l]?1:-1;break}return u}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 l,u,s,f,c,d,p,v,b,w,g,y,h,S,m,x,O,_,P=n.constructor,T=n.s==i.s?1:-1,$=n.d,j=i.d;if(!n.s)return new P(n);if(!i.s)throw Error(rr+"Division by zero");for(u=n.e-i.e,O=j.length,m=$.length,p=new P(T),v=p.d=[],s=0;j[s]==($[s]||0);)++s;if(j[s]>($[s]||0)&&--u,a==null?y=a=P.precision:o?y=a+(Ve(n)-Ve(i))+1:y=a,y<0)return new P(0);if(y=y/Ce+2|0,s=0,O==1)for(f=0,j=j[0],y++;(s1&&(j=e(j,f),$=e($,f),O=j.length,m=$.length),S=O,b=$.slice(0,O),w=b.length;w=et/2&&++x;do f=0,l=t(j,b,O,w),l<0?(g=b[0],O!=w&&(g=g*et+(b[1]||0)),f=g/x|0,f>1?(f>=et&&(f=et-1),c=e(j,f),d=c.length,w=b.length,l=t(c,b,d,w),l==1&&(f--,r(c,O16)throw Error(vy+Ve(e));if(!e.s)return new f(Dt);for(Ne=!1,l=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),s+=5;for(n=Math.log(Rn(2,s))/Math.LN10*2+5|0,l+=n,r=i=a=new f(Dt),f.precision=l;;){if(i=Pe(i.times(e),l),r=r.times(++u),o=a.plus(Wr(i,r,l)),_r(o.d).slice(0,l)===_r(a.d).slice(0,l)){for(;s--;)a=Pe(a.times(a),l);return f.precision=c,t==null?(Ne=!0,Pe(a,c)):a}a=o}}function Ve(e){for(var t=e.e*Ce,r=e.d[0];r>=10;r/=10)t++;return t}function Qf(e,t,r){if(t>e.LN10.sd())throw Ne=!0,r&&(e.precision=r),Error(rr+"LN10 precision limit exceeded");return Pe(new e(e.LN10),t)}function an(e){for(var t="";e--;)t+="0";return t}function qo(e,t){var r,n,i,a,o,l,u,s,f,c=1,d=10,p=e,v=p.d,b=p.constructor,w=b.precision;if(p.s<1)throw Error(rr+(p.s?"NaN":"-Infinity"));if(p.eq(Dt))return new b(0);if(t==null?(Ne=!1,s=w):s=t,p.eq(10))return t==null&&(Ne=!0),Qf(b,s);if(s+=d,b.precision=s,r=_r(v),n=r.charAt(0),a=Ve(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=_r(p.d),n=r.charAt(0),c++;a=Ve(p),n>1?(p=new b("0."+r),a++):p=new b(n+"."+r.slice(1))}else return u=Qf(b,s+2,w).times(a+""),p=qo(new b(n+"."+r.slice(1)),s-d).plus(u),b.precision=w,t==null?(Ne=!0,Pe(p,w)):p;for(l=o=p=Wr(p.minus(Dt),p.plus(Dt),s),f=Pe(p.times(p),s),i=3;;){if(o=Pe(o.times(f),s),u=l.plus(Wr(o,new b(i),s)),_r(u.d).slice(0,s)===_r(l.d).slice(0,s))return l=l.times(2),a!==0&&(l=l.plus(Qf(b,s+2,w).times(a+""))),l=Wr(l,new b(c),s),b.precision=w,t==null?(Ne=!0,Pe(l,w)):l;l=u,i+=2}}function eb(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=ka(r/Ce),e.d=[],n=(r+1)%Ce,r<0&&(n+=Ce),nOs||e.e<-Os))throw Error(vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Pe(e,t,r){var n,i,a,o,l,u,s,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Ce,i=t,s=c[f=0];else{if(f=Math.ceil((n+1)/Ce),a=c.length,f>=a)return e;for(s=a=c[f],o=1;a>=10;a/=10)o++;n%=Ce,i=n-Ce+o}if(r!==void 0&&(a=Rn(10,o-i-1),l=s/a%10|0,u=t<0||c[f+1]!==void 0||s%a,u=r<4?(l||u)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||u||r==6&&(n>0?i>0?s/Rn(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return u?(a=Ve(e),c.length=1,t=t-a-1,c[0]=Rn(10,(Ce-t%Ce)%Ce),e.e=ka(-t/Ce)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,a=1,f--):(c.length=f+1,a=Rn(10,Ce-n),c[f]=i>0?(s/Rn(10,o-i)%Rn(10,i)|0)*a:0),u)for(;;)if(f==0){(c[0]+=a)==et&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=et)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(Ne&&(e.e>Os||e.e<-Os))throw Error(vy+Ve(e));return e}function n_(e,t){var r,n,i,a,o,l,u,s,f,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ne?Pe(t,p):t;if(u=e.d,c=t.d,n=t.e,s=e.e,u=u.slice(),o=s-n,o){for(f=o<0,f?(r=u,o=-o,l=c.length):(r=c,n=s,l=u.length),i=Math.max(Math.ceil(p/Ce),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,l=c.length,f=i0;--i)u[l++]=0;for(i=c.length;i>o;){if(u[--i]0?a=a.charAt(0)+"."+a.slice(1)+an(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+an(-i-1)+a,r&&(n=r-o)>0&&(a+=an(n))):i>=o?(a+=an(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+an(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=an(n))),e.s<0?"-"+a:a}function tb(e,t){if(e.length>t)return e.length=t,!0}function i_(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(Yn+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 eb(o,a.toString())}else if(typeof a!="string")throw Error(Yn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,o5.test(a))eb(o,a);else throw Error(Yn+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=i_,i.config=i.set=l5,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(Yn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Yn+r+": "+n);return this}var yy=i_(a5);Dt=new yy(1);const _e=yy;function u5(e){return d5(e)||f5(e)||c5(e)||s5()}function s5(){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 c5(e,t){if(e){if(typeof e=="string")return Dp(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 Dp(e,t)}}function f5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function d5(e){if(Array.isArray(e))return Dp(e)}function Dp(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,rb(function(){for(var l=arguments.length,u=new Array(l),s=0;se.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](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function E5(e){if(Array.isArray(e))return e}function s_(e){var t=Xo(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function c_(e,t,r){if(e.lte(0))return new _e(0);var n=Hc.getDigitCount(e.toNumber()),i=new _e(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new _e(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=l.mul(i);return t?u:new _e(Math.ceil(u))}function $5(e,t,r){var n=1,i=new _e(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new _e(10).pow(Hc.getDigitCount(e)-1),i=new _e(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new _e(Math.floor(e)))}else e===0?i=new _e(Math.floor((t-1)/2)):r||(i=new _e(Math.floor(e)));var o=Math.floor((t-1)/2),l=y5(v5(function(u){return i.add(new _e(u-o).mul(n)).toNumber()}),Lp);return l(0,t)}function f_(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 _e(0),tickMin:new _e(0),tickMax:new _e(0)};var a=c_(new _e(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new _e(0):(o=new _e(e).add(t).div(2),o=o.sub(new _e(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new _e(t).sub(o).div(a).toNumber()),s=l+u+1;return s>r?f_(e,t,r,n,i+1):(s0?u+(r-s):u,l=t>0?l:l+(r-s)),{step:a,tickMin:o.sub(new _e(l).mul(a)),tickMax:o.add(new _e(u).mul(a))})}function T5(e){var t=Xo(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),l=s_([r,n]),u=Xo(l,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat(Bp(Lp(0,i-1).map(function(){return 1/0}))):[].concat(Bp(Lp(0,i-1).map(function(){return-1/0})),[f]);return r>n?Rp(c):c}if(s===f)return $5(s,i,a);var d=f_(s,f,o,a),p=d.step,v=d.tickMin,b=d.tickMax,w=Hc.rangeStep(v,b.add(new _e(.1).mul(p)),p);return r>n?Rp(w):w}function j5(e,t){var r=Xo(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=s_([n,i]),l=Xo(o,2),u=l[0],s=l[1];if(u===-1/0||s===1/0)return[n,i];if(u===s)return[u];var f=Math.max(t,2),c=c_(new _e(s).sub(u).div(f-1),a,0),d=[].concat(Bp(Hc.rangeStep(new _e(u),new _e(s).sub(new _e(.99).mul(c)),c)),[s]);return n>i?Rp(d):d}var C5=l_(T5),k5=l_(j5),M5="Invariant failed";function ai(e,t){throw new Error(M5)}var N5=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ia(e){"@babel/helpers - typeof";return ia=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},ia(e)}function _s(){return _s=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 F5(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 W5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U5(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,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,s=0;s0?i[s-1].coordinate:i[l-1].coordinate,c=i[s].coordinate,d=s>=l-1?i[0].coordinate:i[s+1].coordinate,p=void 0;if(vr(c-f)!==vr(d-c)){var v=[];if(vr(d-c)===vr(u[1]-u[0])){p=d;var b=c+u[1]-u[0];v[0]=Math.min(b,(b+f)/2),v[1]=Math.max(b,(b+f)/2)}else{p=f;var w=d+u[1]-u[0];v[0]=Math.min(c,(w+c)/2),v[1]=Math.max(c,(w+c)/2)}var g=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>g[0]&&t<=g[1]||t>=v[0]&&t<=v[1]){o=i[s].index;break}}else{var y=Math.min(f,d),h=Math.max(f,d);if(t>(y+c)/2&&t<=(h+c)/2){o=i[s].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===l-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},my=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Be(Be({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},oW=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,s=l.length;u=0});if(g&&g.length){var y=g[0].type.defaultProps,h=y!==void 0?Be(Be({},y),g[0].props):g[0].props,S=h.barSize,m=h[w];o[m]||(o[m]=[]);var x=fe(S)?r:S;o[m].push({item:g[0],stackList:g.slice(1),barSize:fe(x)?void 0:ni(x,n,0)})}}return o},lW=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var s=ni(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/u,v=o.reduce(function(S,m){return S+m.barSize||0},0);v+=(u-1)*s,v>=i&&(v-=(u-1)*s,s=0),v>=i&&p>0&&(d=!0,p*=.9,v=u*p);var b=(i-v)/2>>0,w={offset:b-s,size:0};f=o.reduce(function(S,m){var x={item:m.item,position:{offset:w.offset+w.size+s,size:d?p:m.barSize}},O=[].concat(ab(S),[x]);return w=O[O.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){O.push({item:_,position:w})}),O},c)}else{var g=ni(n,i,0,!0);i-2*g-(u-1)*s<=0&&(s=0);var y=(i-2*g-(u-1)*s)/u;y>1&&(y>>=0);var h=l===+l?Math.min(y,l):y;f=o.reduce(function(S,m,x){var O=[].concat(ab(S),[{item:m.item,position:{offset:g+(y+s)*x+(y-h)/2,size:h}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){O.push({item:_,position:O[O.length-1].position})}),O},c)}return f},uW=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,u=o-(l.left||0)-(l.right||0),s=v_({children:a,legendWidth:u});if(s){var f=i||{},c=f.width,d=f.height,p=s.align,v=s.verticalAlign,b=s.layout;if((b==="vertical"||b==="horizontal"&&v==="middle")&&p!=="center"&&X(t[p]))return Be(Be({},t),{},Wi({},p,t[p]+(c||0)));if((b==="horizontal"||b==="vertical"&&p==="center")&&v!=="middle"&&X(t[v]))return Be(Be({},t),{},Wi({},v,t[v]+(d||0)))}return t},sW=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},y_=function(t,r,n,i,a){var o=r.props.children,l=Jt(o,Cl).filter(function(s){return sW(i,a,s.props.direction)});if(l&&l.length){var u=l.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=zt(f,n);if(fe(c))return s;var d=Array.isArray(c)?[Fc(c),zc(c)]:[c,c],p=u.reduce(function(v,b){var w=zt(f,b,0),g=d[0]-Math.abs(Array.isArray(w)?w[0]:w),y=d[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(g,v[0]),Math.max(y,v[1])]},[1/0,-1/0]);return[Math.min(p[0],s[0]),Math.max(p[1],s[1])]},[1/0,-1/0])}return null},cW=function(t,r,n,i,a){var o=r.map(function(l){return y_(t,l,n,a,i)}).filter(function(l){return!fe(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},m_=function(t,r,n,i,a){var o=r.map(function(u){var s=u.props.dataKey;return n==="number"&&s&&y_(t,u,s,i)||yo(t,s,n,a)});if(n==="number")return o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,s){for(var f=0,c=s.length;f=2?vr(l[0]-l[1])*2*s:s,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+s,value:c,offset:s}});return f.filter(function(c){return!_l(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+s,value:c,index:d,offset:s}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+s,value:c,offset:s}}):i.domain().map(function(c,d){return{coordinate:i(c)+s,value:a?a[c]:c,index:d,offset:s}})},Zf=new WeakMap,uu=function(t,r){if(typeof r!="function")return t;Zf.has(t)||Zf.set(t,new WeakMap);var n=Zf.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},fW=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Uo(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:bs(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:vo(),realScaleType:"point"}:a==="category"?{scale:Uo(),realScaleType:"band"}:{scale:bs(),realScaleType:"linear"};if(ri(i)){var u="scale".concat(Ec(i));return{scale:(J0[u]||vo)(),realScaleType:J0[u]?u:"point"}}return ue(i)?{scale:i}:{scale:vo(),realScaleType:"point"}},lb=1e-4,dW=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])-lb,o=Math.max(i[0],i[1])+lb,l=t(r[0]),u=t(r[n-1]);(lo||uo)&&t.domain([r[0],r[n-1]])}},pW=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[l][n][0]=a,t[l][n][1]=a+u,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+u,o=t[l][n][1])}},yW=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+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},mW={sign:vW,expand:CM,none:Yi,silhouette:kM,wiggle:MM,positive:yW},gW=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=mW[n],o=jM().keys(i).value(function(l,u){return+zt(l,u,0)}).order(pp).offset(a);return o(t)},bW=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,u={},s=l.reduce(function(c,d){var p,v=(p=d.type)!==null&&p!==void 0&&p.defaultProps?Be(Be({},d.type.defaultProps),d.props):d.props,b=v.stackId,w=v.hide;if(w)return c;var g=v[n],y=c[g]||{hasStack:!1,stackGroups:{}};if(Xe(b)){var h=y.stackGroups[b]||{numericAxisId:n,cateAxisId:i,items:[]};h.items.push(d),y.hasStack=!0,y.stackGroups[b]=h}else y.stackGroups[Pl("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return Be(Be({},c),{},Wi({},g,y))},u),f={};return Object.keys(s).reduce(function(c,d){var p=s[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(b,w){var g=p.stackGroups[w];return Be(Be({},b),{},Wi({},w,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:gW(t,g.items,a)}))},v)}return Be(Be({},c),{},Wi({},d,p))},f)},wW=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=C5(s,a,l);return t.domain([Fc(f),zc(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=k5(c,a,l);return{niceTicks:d}}return null};function ub(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&&!fe(i[t.dataKey])){var l=Yu(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=zt(i,fe(o)?t.dataKey:o);return fe(u)?null:t.scale(u)}var sb=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var u=zt(o,r.dataKey,r.domain[l]);return fe(u)?null:r.scale(u)-a/2+i},xW=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]},SW=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Be(Be({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Xe(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},OW=function(t){return t.reduce(function(r,n){return[Fc(n.concat([r[0]]).filter(X)),zc(n.concat([r[1]]).filter(X))]},[1/0,-1/0])},w_=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(s,f){var c=OW(f.slice(r,n+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},cb=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fb=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Up=function(t,r,n){if(ue(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(X(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(cb.test(t[0])){var a=+cb.exec(t[0])[1];i[0]=r[0]-a}else ue(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(X(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(fb.test(t[1])){var o=+fb.exec(t[1])[1];i[1]=r[1]+o}else ue(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},As=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=Vv(r,function(c){return c.coordinate}),o=1/0,l=1,u=a.length;lo&&(s=2*Math.PI-s),{radius:l,angle:EW(s),angleInRadian:s}},jW=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}},CW=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},vb=function(t,r){var n=t.x,i=t.y,a=TW({x:n,y:i},r),o=a.radius,l=a.angle,u=r.innerRadius,s=r.outerRadius;if(os)return!1;if(o===0)return!0;var f=jW(r),c=f.startAngle,d=f.endAngle,p=l,v;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return v?hb(hb({},r),{},{radius:o,angle:CW(p,r)}):null};function Jo(e){"@babel/helpers - typeof";return Jo=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},Jo(e)}var kW=["offset"];function MW(e){return LW(e)||DW(e)||IW(e)||NW()}function NW(){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 IW(e,t){if(e){if(typeof e=="string")return Hp(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 Hp(e,t)}}function DW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LW(e){if(Array.isArray(e))return Hp(e)}function Hp(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 BW(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 yb(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 Ge(e){for(var t=1;t=0?1:-1,h,S;i==="insideStart"?(h=p+y*o,S=b):i==="insideEnd"?(h=v-y*o,S=!b):i==="end"&&(h=v+y*o,S=b),S=g<=0?S:!S;var m=lt(s,f,w,h),x=lt(s,f,w,h+(S?1:-1)*359),O="M".concat(m.x,",").concat(m.y,` + A`).concat(w,",").concat(w,",0,1,").concat(S?0:1,`, + `).concat(x.x,",").concat(x.y),_=fe(t.id)?Pl("recharts-radial-line-"):t.id;return A.createElement("text",el({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",l)}),A.createElement("defs",null,A.createElement("path",{id:_,d:O})),A.createElement("textPath",{xlinkHref:"#".concat(_)},r))},GW=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,u=a.innerRadius,s=a.outerRadius,f=a.startAngle,c=a.endAngle,d=(f+c)/2;if(i==="outside"){var p=lt(o,l,s+n,d),v=p.x,b=p.y;return{x:v,y:b,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var w=(u+s)/2,g=lt(o,l,w,d),y=g.x,h=g.y;return{x:y,y:h,textAnchor:"middle",verticalAnchor:"middle"}},KW=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,u=o.y,s=o.width,f=o.height,c=f>=0?1:-1,d=c*i,p=c>0?"end":"start",v=c>0?"start":"end",b=s>=0?1:-1,w=b*i,g=b>0?"end":"start",y=b>0?"start":"end";if(a==="top"){var h={x:l+s/2,y:u-c*i,textAnchor:"middle",verticalAnchor:p};return Ge(Ge({},h),n?{height:Math.max(u-n.y,0),width:s}:{})}if(a==="bottom"){var S={x:l+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:v};return Ge(Ge({},S),n?{height:Math.max(n.y+n.height-(u+f),0),width:s}:{})}if(a==="left"){var m={x:l-w,y:u+f/2,textAnchor:g,verticalAnchor:"middle"};return Ge(Ge({},m),n?{width:Math.max(m.x-n.x,0),height:f}:{})}if(a==="right"){var x={x:l+s+w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"};return Ge(Ge({},x),n?{width:Math.max(n.x+n.width-x.x,0),height:f}:{})}var O=n?{width:s,height:f}:{};return a==="insideLeft"?Ge({x:l+w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"},O):a==="insideRight"?Ge({x:l+s-w,y:u+f/2,textAnchor:g,verticalAnchor:"middle"},O):a==="insideTop"?Ge({x:l+s/2,y:u+d,textAnchor:"middle",verticalAnchor:v},O):a==="insideBottom"?Ge({x:l+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:p},O):a==="insideTopLeft"?Ge({x:l+w,y:u+d,textAnchor:y,verticalAnchor:v},O):a==="insideTopRight"?Ge({x:l+s-w,y:u+d,textAnchor:g,verticalAnchor:v},O):a==="insideBottomLeft"?Ge({x:l+w,y:u+f-d,textAnchor:y,verticalAnchor:p},O):a==="insideBottomRight"?Ge({x:l+s-w,y:u+f-d,textAnchor:g,verticalAnchor:p},O):Sa(a)&&(X(a.x)||Wn(a.x))&&(X(a.y)||Wn(a.y))?Ge({x:l+ni(a.x,s),y:u+ni(a.y,f),textAnchor:"end",verticalAnchor:"end"},O):Ge({x:l+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},qW=function(t){return"cx"in t&&X(t.cx)};function ht(e){var t=e.offset,r=t===void 0?5:t,n=RW(e,kW),i=Ge({offset:r},n),a=i.viewBox,o=i.position,l=i.value,u=i.children,s=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!a||fe(l)&&fe(u)&&!N.isValidElement(s)&&!ue(s))return null;if(N.isValidElement(s))return N.cloneElement(s,i);var p;if(ue(s)){if(p=N.createElement(s,i),N.isValidElement(p))return p}else p=UW(i);var v=qW(a),b=de(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return VW(i,p,b);var w=v?GW(i):KW(i);return A.createElement(ds,el({className:ve("recharts-label",c)},b,w,{breakAll:d}),p)}ht.displayName="Label";var S_=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,v=t.left,b=t.width,w=t.height,g=t.clockWise,y=t.labelViewBox;if(y)return y;if(X(b)&&X(w)){if(X(c)&&X(d))return{x:c,y:d,width:b,height:w};if(X(p)&&X(v))return{x:p,y:v,width:b,height:w}}return X(c)&&X(d)?{x:c,y:d,width:0,height:0}:X(r)&&X(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:s||0,outerRadius:f||u||l||0,clockWise:g}:t.viewBox?t.viewBox:{}},XW=function(t,r){return t?t===!0?A.createElement(ht,{key:"label-implicit",viewBox:r}):Xe(t)?A.createElement(ht,{key:"label-implicit",viewBox:r,value:t}):N.isValidElement(t)?t.type===ht?N.cloneElement(t,{key:"label-implicit",viewBox:r}):A.createElement(ht,{key:"label-implicit",content:t,viewBox:r}):ue(t)?A.createElement(ht,{key:"label-implicit",content:t,viewBox:r}):Sa(t)?A.createElement(ht,el({viewBox:r},t,{key:"label-implicit"})):null:null},YW=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=S_(t),o=Jt(i,ht).map(function(u,s){return N.cloneElement(u,{viewBox:r||a,key:"label-".concat(s)})});if(!n)return o;var l=XW(t.label,r||a);return[l].concat(MW(o))};ht.parseViewBox=S_;ht.renderCallByParent=YW;function QW(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ZW=QW;const JW=Ae(ZW);function tl(e){"@babel/helpers - typeof";return tl=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},tl(e)}var e6=["valueAccessor"],t6=["data","dataKey","clockWise","id","textBreakAll"];function r6(e){return o6(e)||a6(e)||i6(e)||n6()}function n6(){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 i6(e,t){if(e){if(typeof e=="string")return Vp(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 Vp(e,t)}}function a6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o6(e){if(Array.isArray(e))return Vp(e)}function Vp(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 c6(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 f6=function(t){return Array.isArray(t.value)?JW(t.value):t.value};function xn(e){var t=e.valueAccessor,r=t===void 0?f6:t,n=bb(e,e6),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,u=n.textBreakAll,s=bb(n,t6);return!i||!i.length?null:A.createElement(We,{className:"recharts-label-list"},i.map(function(f,c){var d=fe(a)?r(f,c):zt(f&&f.payload,a),p=fe(l)?{}:{id:"".concat(l,"-").concat(c)};return A.createElement(ht,$s({},de(f,!0),s,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:ht.parseViewBox(fe(o)?f:gb(gb({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}xn.displayName="LabelList";function d6(e,t){return e?e===!0?A.createElement(xn,{key:"labelList-implicit",data:t}):A.isValidElement(e)||ue(e)?A.createElement(xn,{key:"labelList-implicit",data:t,content:e}):Sa(e)?A.createElement(xn,$s({data:t},e,{key:"labelList-implicit"})):null:null}function p6(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=Jt(n,xn).map(function(o,l){return N.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=d6(e.label,t);return[a].concat(r6(i))}xn.renderCallByParent=p6;function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>s),`, + `).concat(c.x,",").concat(c.y,` + `);if(i>0){var p=lt(r,n,i,o),v=lt(r,n,i,s);d+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(u)>180),",").concat(+(o<=s),`, + `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},g6=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=vr(f-s),d=su({cx:r,cy:n,radius:a,angle:s,sign:c,cornerRadius:o,cornerIsExternal:u}),p=d.circleTangency,v=d.lineTangency,b=d.theta,w=su({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:u}),g=w.circleTangency,y=w.lineTangency,h=w.theta,S=u?Math.abs(s-f):Math.abs(s-f)-b-h;if(S<0)return l?"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 + `):O_({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:s,endAngle:f});var m="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` + A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(c<0),",").concat(g.x,",").concat(g.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(y.x,",").concat(y.y,` + `);if(i>0){var x=su({cx:r,cy:n,radius:i,angle:s,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=x.circleTangency,_=x.lineTangency,P=x.theta,T=su({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),$=T.circleTangency,j=T.lineTangency,L=T.theta,B=u?Math.abs(s-f):Math.abs(s-f)-P-L;if(B<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(j.x,",").concat(j.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat($.x,",").concat($.y,` + A`).concat(i,",").concat(i,",0,").concat(+(B>180),",").concat(+(c>0),",").concat(O.x,",").concat(O.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(_.x,",").concat(_.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},b6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},__=function(t){var r=xb(xb({},b6),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,s=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(o0&&Math.abs(f-c)<360?w=g6({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(b,v/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):w=O_({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),A.createElement("path",Gp({},de(r,!0),{className:p,d:w,role:"img"}))};function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function R6(e,t){return di(e.getTime(),t.getTime())}function B6(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function z6(e,t){return e===t}function Tb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,u=0;(o=a.next())&&!o.done;){for(var s=t.entries(),f=!1,c=0;(l=s.next())&&!l.done;){if(i[c]){c++;continue}var d=o.value,p=l.value;if(r.equals(d[0],p[0],u,c,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;u++}return!0}var F6=di;function W6(e,t,r){var n=$b(e),i=n.length;if($b(t).length!==i)return!1;for(;i-- >0;)if(!$_(e,t,r,n[i]))return!1;return!0}function Ya(e,t,r){var n=Ab(e),i=n.length;if(Ab(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!$_(e,t,r,a)||(o=Eb(e,a),l=Eb(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function U6(e,t){return di(e.valueOf(),t.valueOf())}function H6(e,t){return e.source===t.source&&e.flags===t.flags}function jb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var u=t.values(),s=!1,f=0;(l=u.next())&&!l.done;){if(!i[f]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){s=i[f]=!0;break}f++}if(!s)return!1}return!0}function V6(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function G6(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 $_(e,t,r,n){return(n===D6||n===I6||n===N6)&&(e.$$typeof||t.$$typeof)?!0:M6(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var K6="[object Arguments]",q6="[object Boolean]",X6="[object Date]",Y6="[object Error]",Q6="[object Map]",Z6="[object Number]",J6="[object Object]",eU="[object RegExp]",tU="[object Set]",rU="[object String]",nU="[object URL]",iU=Array.isArray,Cb=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,kb=Object.assign,aU=Object.prototype.toString.call.bind(Object.prototype.toString);function oU(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,s=e.areRegExpsEqual,f=e.areSetsEqual,c=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(v,b,w){if(v===b)return!0;if(v==null||b==null)return!1;var g=typeof v;if(g!==typeof b)return!1;if(g!=="object")return g==="number"?o(v,b,w):g==="function"?i(v,b,w):!1;var y=v.constructor;if(y!==b.constructor)return!1;if(y===Object)return l(v,b,w);if(iU(v))return t(v,b,w);if(Cb!=null&&Cb(v))return c(v,b,w);if(y===Date)return r(v,b,w);if(y===RegExp)return s(v,b,w);if(y===Map)return a(v,b,w);if(y===Set)return f(v,b,w);var h=aU(v);return h===X6?r(v,b,w):h===eU?s(v,b,w):h===Q6?a(v,b,w):h===tU?f(v,b,w):h===J6?typeof v.then!="function"&&typeof b.then!="function"&&l(v,b,w):h===nU?d(v,b,w):h===Y6?n(v,b,w):h===K6?l(v,b,w):h===q6||h===Z6||h===rU?u(v,b,w):!1}}function lU(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ya:L6,areDatesEqual:R6,areErrorsEqual:B6,areFunctionsEqual:z6,areMapsEqual:n?Pb(Tb,Ya):Tb,areNumbersEqual:F6,areObjectsEqual:n?Ya:W6,arePrimitiveWrappersEqual:U6,areRegExpsEqual:H6,areSetsEqual:n?Pb(jb,Ya):jb,areTypedArraysEqual:n?Ya:V6,areUrlsEqual:G6};if(r&&(i=kb({},i,r(i))),t){var a=fu(i.areArraysEqual),o=fu(i.areMapsEqual),l=fu(i.areObjectsEqual),u=fu(i.areSetsEqual);i=kb({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return i}function uU(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function sU(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(u,s){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,p=f.meta;return r(u,s,{cache:d,equals:i,meta:p,strict:a})};if(t)return function(u,s){return r(u,s,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(u,s){return r(u,s,o)}}var cU=Cn();Cn({strict:!0});Cn({circular:!0});Cn({circular:!0,strict:!0});Cn({createInternalComparator:function(){return di}});Cn({strict:!0,createInternalComparator:function(){return di}});Cn({circular:!0,createInternalComparator:function(){return di}});Cn({circular:!0,createInternalComparator:function(){return di},strict:!0});function Cn(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=lU(e),u=oU(l),s=n?n(u):uU(u);return sU({circular:r,comparator:u,createState:i,equals:s,strict:o})}function fU(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Mb(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):fU(i)};requestAnimationFrame(n)}function Xp(e){"@babel/helpers - typeof";return Xp=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},Xp(e)}function dU(e){return yU(e)||vU(e)||hU(e)||pU()}function pU(){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 hU(e,t){if(e){if(typeof e=="string")return Nb(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 Nb(e,t)}}function Nb(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:g<0?0:g},b=function(g){for(var y=g>1?1:g,h=y,S=0;S<8;++S){var m=c(h)-y,x=p(h);if(Math.abs(m-y)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,l=o===void 0?17:o,u=function(f,c,d){var p=-(f-c)*n,v=d*a,b=d+(p-v)*l/1e3,w=d*l/1e3+f;return Math.abs(w-c)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 KU(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 Jf(e){return QU(e)||YU(e)||XU(e)||qU()}function qU(){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 XU(e,t){if(e){if(typeof e=="string")return eh(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 eh(e,t)}}function YU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QU(e){if(Array.isArray(e))return eh(e)}function eh(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 Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}var Yr=function(e){rH(r,e);var t=nH(r);function r(n,i){var a;ZU(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,u=o.attributeName,s=o.from,f=o.to,c=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(nh(a)),a.changeStyle=a.changeStyle.bind(nh(a)),!l||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),rh(a);if(c&&c.length)a.state={style:c[0].style};else if(s){if(typeof d=="function")return a.state={style:s},rh(a);a.state={style:u?no({},u,s):s}}else a.state={style:{}};return a}return eH(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,l=a.canBegin,u=a.attributeName,s=a.shouldReAnimate,f=a.to,c=a.from,d=this.state.style;if(l){if(!o){var p={style:u?no({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(p);return}if(!(cU(i.to,f)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=v||s?c:i.to;if(this.state&&d){var w={style:u?no({},u,b):b};(u&&d[u]!==b||!u&&d!==b)&&this.setState(w)}this.runAnimation(lr(lr({},this.props),{},{from:b,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,l=i.to,u=i.duration,s=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,p=HU(o,l,MU(s),u,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([d,f,v,u,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,s=o[0],f=s.style,c=s.duration,d=c===void 0?0:c,p=function(b,w,g){if(g===0)return b;var y=w.duration,h=w.easing,S=h===void 0?"ease":h,m=w.style,x=w.properties,O=w.onAnimationEnd,_=g>0?o[g-1]:w,P=x||Object.keys(m);if(typeof S=="function"||S==="spring")return[].concat(Jf(b),[a.runJSAnimation.bind(a,{from:_.style,to:m,duration:y,easing:S}),y]);var T=Lb(P,y,S),$=lr(lr(lr({},_.style),m),{},{transition:T});return[].concat(Jf(b),[$,y,O]).filter(xU)};return this.manager.start([u].concat(Jf(o.reduce(p,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=mU());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,s=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof s=="function"||typeof p=="function"||s==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var b=l?no({},l,u):u,w=Lb(Object.keys(b),o,s);v.start([f,a,lr(lr({},b),{},{transition:w}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=GU(i,VU),s=N.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||s===0||o<=0)return a;var c=function(p){var v=p.props,b=v.style,w=b===void 0?{}:b,g=v.className,y=N.cloneElement(p,lr(lr({},u),{},{style:lr(lr({},w),f),className:g}));return y};return s===1?c(N.Children.only(a)):A.createElement("div",null,N.Children.map(a,function(d){return c(d)}))}}]),r}(N.PureComponent);Yr.displayName="Animate";Yr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Yr.propTypes={from:be.oneOfType([be.object,be.string]),to:be.oneOfType([be.object,be.string]),attributeName:be.string,duration:be.number,begin:be.number,easing:be.oneOfType([be.string,be.func]),steps:be.arrayOf(be.shape({duration:be.number.isRequired,style:be.object.isRequired,easing:be.oneOfType([be.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),be.func]),properties:be.arrayOf("string"),onAnimationEnd:be.func})),children:be.oneOfType([be.node,be.func]),isActive:be.bool,canBegin:be.bool,onAnimationEnd:be.func,shouldReAnimate:be.bool,onAnimationStart:be.func,onAnimationReStart:be.func};function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function ks(){return ks=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,u=n>=0?1:-1,s=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],d=0,p=4;do?o:a[d];f="M".concat(t,",").concat(r+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(r)),f+="L ".concat(t+n-u*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`, + `).concat(t+n,",").concat(r+l*c[1])),f+="L ".concat(t+n,",").concat(r+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`, + `).concat(t+n-u*c[2],",").concat(r+i)),f+="L ".concat(t+u*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`, + `).concat(t,",").concat(r+i-l*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);f="M ".concat(t,",").concat(r+l*v,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+u*v,",").concat(r,` + L `).concat(t+n-u*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+n,",").concat(r+l*v,` + L `).concat(t+n,",").concat(r+i-l*v,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+n-u*v,",").concat(r+i,` + L `).concat(t+u*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t,",").concat(r+i-l*v," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},pH=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,u=r.height;if(Math.abs(l)>0&&Math.abs(u)>0){var s=Math.min(a,a+l),f=Math.max(a,a+l),c=Math.min(o,o+u),d=Math.max(o,o+u);return n>=s&&n<=f&&i>=c&&i<=d}return!1},hH={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gy=function(t){var r=Vb(Vb({},hH),t),n=N.useRef(),i=N.useState(-1),a=aH(i,2),o=a[0],l=a[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&l(S)}catch{}},[]);var u=r.x,s=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,v=r.animationEasing,b=r.animationDuration,w=r.animationBegin,g=r.isAnimationActive,y=r.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var h=ve("recharts-rectangle",p);return y?A.createElement(Yr,{canBegin:o>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:b,animationEasing:v,isActive:y},function(S){var m=S.width,x=S.height,O=S.x,_=S.y;return A.createElement(Yr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:g,easing:v},A.createElement("path",ks({},de(r,!0),{className:h,d:Gb(O,_,m,x,d),ref:n})))}):A.createElement("path",ks({},de(r,!0),{className:h,d:Gb(u,s,f,c,d)}))};function ih(){return ih=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 xH(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 SH=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},OH=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,v=t.className,b=wH(t,vH),w=yH({x:n,y:a,top:l,left:s,width:c,height:p},b);return!X(n)||!X(a)||!X(c)||!X(p)||!X(l)||!X(s)?null:A.createElement("path",ah({},de(w,!0),{className:ve("recharts-cross",v),d:SH(n,a,c,p,l,s)}))},_H=qS,PH=_H(Object.getPrototypeOf,Object),AH=PH,EH=Zr,$H=AH,TH=Jr,jH="[object Object]",CH=Function.prototype,kH=Object.prototype,I_=CH.toString,MH=kH.hasOwnProperty,NH=I_.call(Object);function IH(e){if(!TH(e)||EH(e)!=jH)return!1;var t=$H(e);if(t===null)return!0;var r=MH.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&I_.call(r)==NH}var DH=IH;const LH=Ae(DH);var RH=Zr,BH=Jr,zH="[object Boolean]";function FH(e){return e===!0||e===!1||BH(e)&&RH(e)==zH}var WH=FH;const UH=Ae(WH);function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function Ms(){return Ms=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:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:b,animationEasing:v,isActive:g},function(h){var S=h.upperWidth,m=h.lowerWidth,x=h.height,O=h.x,_=h.y;return A.createElement(Yr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:v},A.createElement("path",Ms({},de(r,!0),{className:y,d:Qb(O,_,S,m,x),ref:n})))}):A.createElement("g",null,A.createElement("path",Ms({},de(r,!0),{className:y,d:Qb(u,s,f,c,d)})))},e7=["option","shapeType","propTransformer","activeClassName","isActive"];function sl(e){"@babel/helpers - typeof";return sl=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},sl(e)}function t7(e,t){if(e==null)return{};var r=r7(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 r7(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 Zb(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 Ns(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),Mt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Mt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Mt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Mt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Mt(n,"handleSlideDragStart",function(i){var a=a1(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 z7(t,e),D7(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,l=this.props,u=l.gap,s=l.data,f=s.length-1,c=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,c),v=t.getIndexInRange(o,d);return{startIndex:p-p%u,endIndex:v===f?f:v-v%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=zt(a[n],l,n);return ue(o)?o(u,n):u}},{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,l=i.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,p=u.endIndex,v=u.onChange,b=n.pageX-a;b>0?b=Math.min(b,s+f-c-l,s+f-c-o):b<0&&(b=Math.max(b,s-o,s-l));var w=this.getIndex({startX:o+b,endX:l+b});(w.startIndex!==d||w.endIndex!==p)&&v&&v(w),this.setState({startX:o+b,endX:l+b,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=a1(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,l=i.endX,u=i.startX,s=this.state[o],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,v=f.onChange,b=f.gap,w=f.data,g={startX:this.state.startX,endX:this.state.endX},y=n.pageX-a;y>0?y=Math.min(y,c+d-p-s):y<0&&(y=Math.max(y,c-s)),g[o]=s+y;var h=this.getIndex(g),S=h.startIndex,m=h.endIndex,x=function(){var _=w.length-1;return o==="startX"&&(l>u?S%b===0:m%b===0)||lu?m%b===0:S%b===0)||l>u&&m===_};this.setState(Mt(Mt({},o,s+y),"brushMoveStartX",n.pageX),function(){v&&x()&&v(h)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,s=o.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=l.length)){var p=l[d];i==="startX"&&p>=s||i==="endX"&&p<=u||this.setState(Mt({},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,l=n.height,u=n.fill,s=n.stroke;return A.createElement("rect",{stroke:s,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.data,s=n.children,f=n.padding,c=N.Children.only(s);return c?A.cloneElement(c,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,p=u.ariaLabel,v=u.data,b=u.startIndex,w=u.endIndex,g=Math.max(n,this.props.x),y=td(td({},de(this.props,!1)),{},{x:g,y:s,width:f,height:c}),h=p||"Min value: ".concat((a=v[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[w])===null||o===void 0?void 0:o.name);return A.createElement(We,{tabIndex:0,role:"slider","aria-label":h,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),l.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,y))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,s=a.travellerWidth,f=Math.min(n,i)+s,c=Math.max(Math.abs(i-n)-s,0);return A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:c,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,u=n.travellerWidth,s=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,v={pointerEvents:"none",fill:s};return A.createElement(We,{className:"recharts-brush-texts"},A.createElement(ds,Ds({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:o+l/2},v),this.getTextOfTick(i)),A.createElement(ds,Ds({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+p,y:o+l/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,u=n.y,s=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,v=d.endX,b=d.isTextActive,w=d.isSlideMoving,g=d.isTravellerMoving,y=d.isTravellerFocused;if(!i||!i.length||!X(l)||!X(u)||!X(s)||!X(f)||s<=0||f<=0)return null;var h=ve("recharts-brush",a),S=A.Children.count(o)===1,m=N7("userSelect","none");return A.createElement(We,{className:h,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(b||w||g||y||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,u=n.stroke,s=Math.floor(a+l/2)-1;return A.createElement(A.Fragment,null,A.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),A.createElement("line",{x1:i+1,y1:s,x2:i+o-1,y2:s,fill:"none",stroke:"#fff"}),A.createElement("line",{x1:i+1,y1:s+2,x2:i+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return A.isValidElement(n)?a=A.cloneElement(n,i):ue(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,u=n.travellerWidth,s=n.updateId,f=n.startIndex,c=n.endIndex;if(a!==i.prevData||s!==i.prevUpdateId)return td({prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o},a&&a.length?W7({data:a,width:o,x:l,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,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,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);n[u]>i?l=u:o=u}return i>=n[l]?l:o}}])}(N.PureComponent);Mt(la,"displayName","Brush");Mt(la,"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 U7=Hv;function H7(e,t){var r;return U7(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var V7=H7,G7=zS,K7=$n,q7=V7,X7=Ct,Y7=Mc;function Q7(e,t,r){var n=X7(e)?G7:q7;return r&&Y7(e,t,r)&&(t=void 0),n(e,K7(t))}var Z7=Q7;const J7=Ae(Z7);var $r=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},o1=uO;function e9(e,t,r){t=="__proto__"&&o1?o1(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var t9=e9,r9=t9,n9=oO,i9=$n;function a9(e,t){var r={};return t=i9(t),n9(e,function(n,i,a){r9(r,i,t(n,i,a))}),r}var o9=a9;const l9=Ae(o9);function u9(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 P9(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 A9(e,t){var r=e.x,n=e.y,i=_9(e,w9),a="".concat(r),o=parseInt(a,10),l="".concat(n),u=parseInt(l,10),s="".concat(t.height||i.height),f=parseInt(s,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Qa(Qa(Qa(Qa(Qa({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function u1(e){return A.createElement(s7,lh({shapeType:"rectangle",propTransformer:A9,activeClassName:"recharts-active-bar"},e))}var E9=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=typeof n=="number";return a?t(n,i):(a||ai(),r)}},$9=["value","background"],F_;function ua(e){"@babel/helpers - typeof";return ua=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},ua(e)}function T9(e,t){if(e==null)return{};var r=j9(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 j9(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 Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(M)0&&Math.abs(B)0&&(L=Math.min((le||0)-(B[Se-1]||0),L))}),Number.isFinite(L)){var M=L/j,z=b.layout==="vertical"?n.height:n.width;if(b.padding==="gap"&&(O=M*z/2),b.padding==="no-gap"){var U=ni(t.barCategoryGap,M*z),C=M*z/2;O=C-U-(C-U)/z*U}}}i==="xAxis"?_=[n.left+(h.left||0)+(O||0),n.left+n.width-(h.right||0)-(O||0)]:i==="yAxis"?_=u==="horizontal"?[n.top+n.height-(h.bottom||0),n.top+(h.top||0)]:[n.top+(h.top||0)+(O||0),n.top+n.height-(h.bottom||0)-(O||0)]:_=b.range,m&&(_=[_[1],_[0]]);var D=fW(b,a,d),W=D.scale,Y=D.realScaleType;W.domain(g).range(_),dW(W);var V=wW(W,cr(cr({},b),{},{realScaleType:Y}));i==="xAxis"?($=w==="top"&&!S||w==="bottom"&&S,P=n.left,T=c[x]-$*b.height):i==="yAxis"&&($=w==="left"&&!S||w==="right"&&S,P=c[x]-$*b.width,T=n.top);var re=cr(cr(cr({},b),V),{},{realScaleType:Y,x:P,y:T,scale:W,width:i==="xAxis"?n.width:b.width,height:i==="yAxis"?n.height:b.height});return re.bandSize=As(re,V),!b.hide&&i==="xAxis"?c[x]+=($?-1:1)*re.height:b.hide||(c[x]+=($?-1:1)*re.width),cr(cr({},p),{},Kc({},v,re))},{})},V_=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)}},W9=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return V_({x:r,y:n},{x:i,y:a})},G_=function(){function e(t){R9(this,e),this.scale=t}return B9(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 l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}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)}}])}();Kc(G_,"EPS",1e-4);var wy=function(t){var r=Object.keys(t).reduce(function(n,i){return cr(cr({},n),{},Kc({},i,G_.create(t[i])))},{});return cr(cr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return l9(i,function(u,s){return r[s].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return z_(i,function(a,o){return r[o].isInRange(a)})}})};function U9(e){return(e%180+180)%180}var H9=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=U9(i),o=a*Math.PI/180,l=Math.atan(n/r),u=o>l&&o-1?i[a?t[o]:o]:void 0}}var X9=q9,Y9=D_;function Q9(e){var t=Y9(e),r=t%1;return t===t?r?t-r:t:0}var Z9=Q9,J9=eO,eV=$n,tV=Z9,rV=Math.max;function nV(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:tV(r);return i<0&&(i=rV(n+i,0)),J9(e,eV(t),i)}var iV=nV,aV=X9,oV=iV,lV=aV(oV),uV=lV;const sV=Ae(uV);var cV=Yj(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("")}),xy=N.createContext(void 0),Sy=N.createContext(void 0),K_=N.createContext(void 0),q_=N.createContext({}),X_=N.createContext(void 0),Y_=N.createContext(0),Q_=N.createContext(0),p1=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,u=t.width,s=t.height,f=cV(a);return A.createElement(xy.Provider,{value:n},A.createElement(Sy.Provider,{value:i},A.createElement(q_.Provider,{value:a},A.createElement(K_.Provider,{value:f},A.createElement(X_.Provider,{value:o},A.createElement(Y_.Provider,{value:s},A.createElement(Q_.Provider,{value:u},l)))))))},fV=function(){return N.useContext(X_)},Z_=function(t){var r=N.useContext(xy);r==null&&ai();var n=r[t];return n==null&&ai(),n},dV=function(){var t=N.useContext(xy);return un(t)},pV=function(){var t=N.useContext(Sy),r=sV(t,function(n){return z_(n.domain,Number.isFinite)});return r||un(t)},J_=function(t){var r=N.useContext(Sy);r==null&&ai();var n=r[t];return n==null&&ai(),n},hV=function(){var t=N.useContext(K_);return t},vV=function(){return N.useContext(q_)},Oy=function(){return N.useContext(Q_)},_y=function(){return N.useContext(Y_)};function sa(e){"@babel/helpers - typeof";return sa=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},sa(e)}function yV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mV(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 ZV(e,t){return oP(e,t+1)}function JV(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,u=0,s=1,f=o,c=function(){var v=n==null?void 0:n[u];if(v===void 0)return{v:oP(n,s)};var b=u,w,g=function(){return w===void 0&&(w=r(v,b)),w},y=v.coordinate,h=u===0||Us(e,y,g,f,l);h||(u=0,f=o,s+=1),h&&(f=y+e*(g()/2+i),u+=s)},d;s<=a.length;)if(d=c(),d)return d.v;return[]}function hl(e){"@babel/helpers - typeof";return hl=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},hl(e)}function x1(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 dt(e){for(var t=1;t0?p.coordinate-w*e:p.coordinate})}else a[d]=p=dt(dt({},p),{},{tickCoord:p.coordinate});var g=Us(e,p.tickCoord,b,l,u);g&&(u=p.tickCoord-e*(b()/2+i),a[d]=dt(dt({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)s(f);return a}function iG(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,u=t.start,s=t.end;if(a){var f=n[l-1],c=r(f,l-1),d=e*(f.coordinate+e*c/2-s);o[l-1]=f=dt(dt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=Us(e,f.tickCoord,function(){return c},u,s);p&&(s=f.tickCoord-e*(c/2+i),o[l-1]=dt(dt({},f),{},{isShow:!0}))}for(var v=a?l-1:l,b=function(y){var h=o[y],S,m=function(){return S===void 0&&(S=r(h,y)),S};if(y===0){var x=e*(h.coordinate-e*m()/2-u);o[y]=h=dt(dt({},h),{},{tickCoord:x<0?h.coordinate-x*e:h.coordinate})}else o[y]=h=dt(dt({},h),{},{tickCoord:h.coordinate});var O=Us(e,h.tickCoord,m,u,s);O&&(u=h.tickCoord+e*(m()/2+i),o[y]=dt(dt({},h),{},{isShow:!0}))},w=0;w=2?vr(i[1].coordinate-i[0].coordinate):1,g=QV(a,w,p);return u==="equidistantPreserveStart"?JV(w,g,b,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=iG(w,g,b,i,o,u==="preserveStartEnd"):d=nG(w,g,b,i,o),d.filter(function(y){return y.isShow}))}var aG=["viewBox"],oG=["viewBox"],lG=["ticks"];function da(e){"@babel/helpers - typeof";return da=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},da(e)}function ki(){return ki=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 uG(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 sG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O1(e,t){for(var r=0;r0?u(this.props):u(p)),o<=0||l<=0||!v||!v.length?null:A.createElement(We,{className:ve("recharts-cartesian-axis",s),ref:function(w){n.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),ht.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return A.isValidElement(n)?o=A.cloneElement(n,i):ue(n)?o=n(i):o=A.createElement(ds,ki({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(N.Component);$y(Ma,"displayName","CartesianAxis");$y(Ma,"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 yG=["x1","y1","x2","y2","key"],mG=["offset"];function oi(e){"@babel/helpers - typeof";return oi=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},oi(e)}function _1(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 vt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xG(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 SG=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,l=t.height,u=t.ry;return A.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function sP(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(ue(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=P1(t,yG),s=de(u,!1);s.offset;var f=P1(s,mG);r=A.createElement("line",Vn({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function OG(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(l,u){var s=vt(vt({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return sP(i,s)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function _G(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(l,u){var s=vt(vt({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return sP(i,s)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function PG(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,s=u===void 0?!0:u;if(!s||!t||!t.length)return null;var f=l.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var v=!f[p+1],b=v?i+o-d:f[p+1]-d;if(b<=0)return null;var w=p%t.length;return A.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:b,width:a,stroke:"none",fill:t[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function AG(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,s=e.verticalPoints;if(!r||!n||!n.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var v=!f[p+1],b=v?a+l-d:f[p+1]-d;if(b<=0)return null;var w=p%n.length;return A.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:b,height:u,stroke:"none",fill:n[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var EG=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return b_(Ey(vt(vt(vt({},Ma.defaultProps),n),{},{ticks:Rr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},$G=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return b_(Ey(vt(vt(vt({},Ma.defaultProps),n),{},{ticks:Rr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},mi={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function cP(e){var t,r,n,i,a,o,l=Oy(),u=_y(),s=vV(),f=vt(vt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:mi.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:mi.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:mi.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:mi.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:mi.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:mi.verticalFill,x:X(e.x)?e.x:s.left,y:X(e.y)?e.y:s.top,width:X(e.width)?e.width:s.width,height:X(e.height)?e.height:s.height}),c=f.x,d=f.y,p=f.width,v=f.height,b=f.syncWithTicks,w=f.horizontalValues,g=f.verticalValues,y=dV(),h=pV();if(!X(p)||p<=0||!X(v)||v<=0||!X(c)||c!==+c||!X(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||EG,m=f.horizontalCoordinatesGenerator||$G,x=f.horizontalPoints,O=f.verticalPoints;if((!x||!x.length)&&ue(m)){var _=w&&w.length,P=m({yAxis:h?vt(vt({},h),{},{ticks:_?w:h.ticks}):void 0,width:l,height:u,offset:s},_?!0:b);Fr(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(oi(P),"]")),Array.isArray(P)&&(x=P)}if((!O||!O.length)&&ue(S)){var T=g&&g.length,$=S({xAxis:y?vt(vt({},y),{},{ticks:T?g:y.ticks}):void 0,width:l,height:u,offset:s},T?!0:b);Fr(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(oi($),"]")),Array.isArray($)&&(O=$)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(SG,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),A.createElement(OG,Vn({},f,{offset:s,horizontalPoints:x,xAxis:y,yAxis:h})),A.createElement(_G,Vn({},f,{offset:s,verticalPoints:O,xAxis:y,yAxis:h})),A.createElement(PG,Vn({},f,{horizontalPoints:x})),A.createElement(AG,Vn({},f,{verticalPoints:O})))}cP.displayName="CartesianGrid";var TG=["type","layout","connectNulls","ref"],jG=["key"];function pa(e){"@babel/helpers - typeof";return pa=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},pa(e)}function A1(e,t){if(e==null)return{};var r=CG(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 CG(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 go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(gi(u.slice(0,v)),[c-b]);break}var w=p.length%2===0?[0,d]:[d];return[].concat(gi(t.repeat(u,f)),gi(p),w).map(function(g){return"".concat(g,"px")}).join(", ")}),fr(r,"id",Pl("recharts-line-")),fr(r,"pathRef",function(o){r.mainCurve=o}),fr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),fr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return FG(t,e),LG(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,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=Jt(f,Cl);if(!c)return null;var d=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:zt(b.payload,w)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return A.createElement(We,p,c.map(function(v){return A.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,s=l.points,f=l.dataKey,c=de(this.props,!1),d=de(u,!0),p=s.map(function(b,w){var g=kt(kt(kt({key:"dot-".concat(w),r:3},c),d),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:f,payload:b.payload,points:s});return t.renderDotItem(u,g)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return A.createElement(We,go({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var l=this.props,u=l.type,s=l.layout,f=l.connectNulls;l.ref;var c=A1(l,TG),d=kt(kt(kt({},de(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:s,connectNulls:f});return A.createElement(qp,go({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,s=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,p=o.animationId,v=o.animateNewValues,b=o.width,w=o.height,g=this.state,y=g.prevPoints,h=g.totalLength;return A.createElement(Yr,{begin:f,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var m=S.t;if(y){var x=y.length/l.length,O=l.map(function(j,L){var B=Math.floor(L*x);if(y[B]){var M=y[B],z=pr(M.x,j.x),U=pr(M.y,j.y);return kt(kt({},j),{},{x:z(m),y:U(m)})}if(v){var C=pr(b*2,j.x),D=pr(w/2,j.y);return kt(kt({},j),{},{x:C(m),y:D(m)})}return kt(kt({},j),{},{x:j.x,y:j.y})});return a.renderCurveStatically(O,n,i)}var _=pr(0,h),P=_(m),T;if(u){var $="".concat(u).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});T=a.getStrokeDasharray(P,h,$)}else T=a.generateSimpleStrokeDasharray(h,P);return a.renderCurveStatically(l,n,i,{strokeDasharray:T})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,l=a.isAnimationActive,u=this.state,s=u.prevPoints,f=u.totalLength;return l&&o&&o.length&&(!s&&f>0||!Wc(s,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,l=i.points,u=i.className,s=i.xAxis,f=i.yAxis,c=i.top,d=i.left,p=i.width,v=i.height,b=i.isAnimationActive,w=i.id;if(a||!l||!l.length)return null;var g=this.state.isAnimationFinished,y=l.length===1,h=ve("recharts-line",u),S=s&&s.allowDataOverflow,m=f&&f.allowDataOverflow,x=S||m,O=fe(w)?this.id:w,_=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=_.r,T=P===void 0?3:P,$=_.strokeWidth,j=$===void 0?2:$,L=tk(o)?o:{},B=L.clipDot,M=B===void 0?!0:B,z=T*2+j;return A.createElement(We,{className:h},S||m?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:S?d:d-p/2,y:m?c:c-v/2,width:S?p:p*2,height:m?v:v*2})),!M&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:d-z/2,y:c-z/2,width:p+z,height:v+z}))):null,!y&&this.renderCurve(x,O),this.renderErrorBar(x,O),(y||o)&&this.renderDots(x,M,O),(!b||g)&&xn.renderCallByParent(this.props,l))}}],[{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(gi(n),[0]):n,o=[],l=0;le.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 jK(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 CK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kK(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&X(i)&&X(a)?t.slice(i,a+1):[]};function AP(e){return e==="number"?[0,"auto"]:void 0}var Ah=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=ef(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=c===void 0?l:c;d=Yu(p,o.dataKey,i)}else d=c&&c[n]||l[n];return d?[].concat(ma(u),[x_(s,d)]):u},[])},N1=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=HK(a,n),l=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=aW(o,l,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Ah(t,r,f,c),p=VK(n,l,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},GK=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=g_(f,a);return n.reduce(function(v,b){var w,g=b.type.defaultProps!==void 0?I(I({},b.type.defaultProps),b.props):b.props,y=g.type,h=g.dataKey,S=g.allowDataOverflow,m=g.allowDuplicatedCategory,x=g.scale,O=g.ticks,_=g.includeHidden,P=g[o];if(v[P])return v;var T=ef(t.data,{graphicalItems:i.filter(function(V){var re,le=o in V.props?V.props[o]:(re=V.type.defaultProps)===null||re===void 0?void 0:re[o];return le===P}),dataStartIndex:u,dataEndIndex:s}),$=T.length,j,L,B;gK(g.domain,S,y)&&(j=Up(g.domain,null,S),p&&(y==="number"||x!=="auto")&&(B=yo(T,h,"category")));var M=AP(y);if(!j||j.length===0){var z,U=(z=g.domain)!==null&&z!==void 0?z:M;if(h){if(j=yo(T,h,y),y==="category"&&p){var C=VC(j);m&&C?(L=j,j=Is(0,$)):m||(j=db(U,j,b).reduce(function(V,re){return V.indexOf(re)>=0?V:[].concat(ma(V),[re])},[]))}else if(y==="category")m?j=j.filter(function(V){return V!==""&&!fe(V)}):j=db(U,j,b).reduce(function(V,re){return V.indexOf(re)>=0||re===""||fe(re)?V:[].concat(ma(V),[re])},[]);else if(y==="number"){var D=cW(T,i.filter(function(V){var re,le,Se=o in V.props?V.props[o]:(re=V.type.defaultProps)===null||re===void 0?void 0:re[o],me="hide"in V.props?V.props.hide:(le=V.type.defaultProps)===null||le===void 0?void 0:le.hide;return Se===P&&(_||!me)}),h,a,f);D&&(j=D)}p&&(y==="number"||x!=="auto")&&(B=yo(T,h,"category"))}else p?j=Is(0,$):l&&l[P]&&l[P].hasStack&&y==="number"?j=d==="expand"?[0,1]:w_(l[P].stackGroups,u,s):j=m_(T,i.filter(function(V){var re=o in V.props?V.props[o]:V.type.defaultProps[o],le="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return re===P&&(_||!le)}),y,f,!0);if(y==="number")j=Oh(c,j,P,a,O),U&&(j=Up(U,j,S));else if(y==="category"&&U){var W=U,Y=j.every(function(V){return W.indexOf(V)>=0});Y&&(j=W)}}return I(I({},v),{},ie({},P,I(I({},g),{},{axisType:a,domain:j,categoricalDomain:B,duplicateDomain:L,originalDomain:(w=g.domain)!==null&&w!==void 0?w:M,isCategorical:p,layout:f})))},{})},KK=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=ef(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:s}),p=d.length,v=g_(f,a),b=-1;return n.reduce(function(w,g){var y=g.type.defaultProps!==void 0?I(I({},g.type.defaultProps),g.props):g.props,h=y[o],S=AP("number");if(!w[h]){b++;var m;return v?m=Is(0,p):l&&l[h]&&l[h].hasStack?(m=w_(l[h].stackGroups,u,s),m=Oh(c,m,h,a)):(m=Up(S,m_(d,n.filter(function(x){var O,_,P=o in x.props?x.props[o]:(O=x.type.defaultProps)===null||O===void 0?void 0:O[o],T="hide"in x.props?x.props.hide:(_=x.type.defaultProps)===null||_===void 0?void 0:_.hide;return P===h&&!T}),"number",f),i.defaultProps.allowDataOverflow),m=Oh(c,m,h,a)),I(I({},w),{},ie({},h,I(I({axisType:a},i.defaultProps),{},{hide:!0,orientation:Zt(WK,"".concat(a,".").concat(b%2),null),domain:m,originalDomain:S,isCategorical:v,layout:f})))}return w},{})},qK=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=Jt(f,a),p={};return d&&d.length?p=GK(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s}):o&&o.length&&(p=KK(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s})),p},XK=function(t){var r=un(t),n=Rr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Vv(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:As(r,n)}},I1=function(t){var r=t.children,n=t.defaultShowTooltip,i=It(r,la),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}},YK=function(t){return!t||!t.length?!1:t.some(function(r){var n=zr(r&&r.type);return n&&n.indexOf("Bar")>=0})},D1=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"}},QK=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,s=n.width,f=n.height,c=n.children,d=n.margin||{},p=It(c,la),v=It(c,qn),b=Object.keys(u).reduce(function(m,x){var O=u[x],_=O.orientation;return!O.mirror&&!O.hide?I(I({},m),{},ie({},_,m[_]+O.width)):m},{left:d.left||0,right:d.right||0}),w=Object.keys(o).reduce(function(m,x){var O=o[x],_=O.orientation;return!O.mirror&&!O.hide?I(I({},m),{},ie({},_,Zt(m,"".concat(_))+O.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=I(I({},w),b),y=g.bottom;p&&(g.bottom+=p.props.height||la.defaultProps.height),v&&r&&(g=uW(g,i,n,r));var h=s-g.left-g.right,S=f-g.top-g.bottom;return I(I({brushBottom:y},g),{},{width:Math.max(h,0),height:Math.max(S,0)})},ZK=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},JK=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(g,y){var h=y.graphicalItems,S=y.stackGroups,m=y.offset,x=y.updateId,O=y.dataStartIndex,_=y.dataEndIndex,P=g.barSize,T=g.layout,$=g.barGap,j=g.barCategoryGap,L=g.maxBarSize,B=D1(T),M=B.numericAxisName,z=B.cateAxisName,U=YK(h),C=[];return h.forEach(function(D,W){var Y=ef(g.data,{graphicalItems:[D],dataStartIndex:O,dataEndIndex:_}),V=D.type.defaultProps!==void 0?I(I({},D.type.defaultProps),D.props):D.props,re=V.dataKey,le=V.maxBarSize,Se=V["".concat(M,"Id")],me=V["".concat(z,"Id")],F={},q=u.reduce(function(ge,ze){var ce=y["".concat(ze.axisType,"Map")],Qe=V["".concat(ze.axisType,"Id")];ce&&ce[Qe]||ze.axisType==="zAxis"||ai();var Ze=ce[Qe];return I(I({},ge),{},ie(ie({},ze.axisType,Ze),"".concat(ze.axisType,"Ticks"),Rr(Ze)))},F),R=q[z],K=q["".concat(z,"Ticks")],Q=S&&S[Se]&&S[Se].hasStack&&SW(D,S[Se].stackGroups),k=zr(D.type).indexOf("Bar")>=0,te=As(R,K),H=[],ne=U&&oW({barSize:P,stackGroups:S,totalSize:ZK(q,z)});if(k){var ee,oe,he=fe(le)?L:le,ae=(ee=(oe=As(R,K,!0))!==null&&oe!==void 0?oe:he)!==null&&ee!==void 0?ee:0;H=lW({barGap:$,barCategoryGap:j,bandSize:ae!==te?ae:te,sizeList:ne[me],maxBarSize:he}),ae!==te&&(H=H.map(function(ge){return I(I({},ge),{},{position:I(I({},ge.position),{},{offset:ge.position.offset-ae/2})})}))}var Oe=D&&D.type&&D.type.getComposedData;Oe&&C.push({props:I(I({},Oe(I(I({},q),{},{displayedData:Y,props:g,dataKey:re,item:D,bandSize:te,barPosition:H,offset:m,stackedData:Q,layout:T,dataStartIndex:O,dataEndIndex:_}))),{},ie(ie(ie({key:D.key||"item-".concat(W)},M,q[M]),z,q[z]),"animationId",x)),childIndex:ik(D,g.children),item:D})}),C},p=function(g,y){var h=g.props,S=g.dataStartIndex,m=g.dataEndIndex,x=g.updateId;if(!ag({props:h}))return null;var O=h.children,_=h.layout,P=h.stackOffset,T=h.data,$=h.reverseStackOrder,j=D1(_),L=j.numericAxisName,B=j.cateAxisName,M=Jt(O,n),z=bW(T,M,"".concat(L,"Id"),"".concat(B,"Id"),P,$),U=u.reduce(function(V,re){var le="".concat(re.axisType,"Map");return I(I({},V),{},ie({},le,qK(h,I(I({},re),{},{graphicalItems:M,stackGroups:re.axisType===L&&z,dataStartIndex:S,dataEndIndex:m}))))},{}),C=QK(I(I({},U),{},{props:h,graphicalItems:M}),y==null?void 0:y.legendBBox);Object.keys(U).forEach(function(V){U[V]=f(h,U[V],C,V.replace("Map",""),r)});var D=U["".concat(B,"Map")],W=XK(D),Y=d(h,I(I({},U),{},{dataStartIndex:S,dataEndIndex:m,updateId:x,graphicalItems:M,stackGroups:z,offset:C}));return I(I({formattedGraphicalItems:Y,graphicalItems:M,offset:C,stackGroups:z},W),U)},v=function(w){function g(y){var h,S,m;return CK(this,g),m=NK(this,g,[y]),ie(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(m,"accessibilityManager",new mK),ie(m,"handleLegendBBoxUpdate",function(x){if(x){var O=m.state,_=O.dataStartIndex,P=O.dataEndIndex,T=O.updateId;m.setState(I({legendBBox:x},p({props:m.props,dataStartIndex:_,dataEndIndex:P,updateId:T},I(I({},m.state),{},{legendBBox:x}))))}}),ie(m,"handleReceiveSyncEvent",function(x,O,_){if(m.props.syncId===x){if(_===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(O)}}),ie(m,"handleBrushChange",function(x){var O=x.startIndex,_=x.endIndex;if(O!==m.state.dataStartIndex||_!==m.state.dataEndIndex){var P=m.state.updateId;m.setState(function(){return I({dataStartIndex:O,dataEndIndex:_},p({props:m.props,dataStartIndex:O,dataEndIndex:_,updateId:P},m.state))}),m.triggerSyncEvent({dataStartIndex:O,dataEndIndex:_})}}),ie(m,"handleMouseEnter",function(x){var O=m.getMouseInfo(x);if(O){var _=I(I({},O),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var P=m.props.onMouseEnter;ue(P)&&P(_,x)}}),ie(m,"triggeredAfterMouseMove",function(x){var O=m.getMouseInfo(x),_=O?I(I({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(_),m.triggerSyncEvent(_);var P=m.props.onMouseMove;ue(P)&&P(_,x)}),ie(m,"handleItemMouseEnter",function(x){m.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),ie(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),ie(m,"handleMouseMove",function(x){x.persist(),m.throttleTriggeredAfterMouseMove(x)}),ie(m,"handleMouseLeave",function(x){m.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};m.setState(O),m.triggerSyncEvent(O);var _=m.props.onMouseLeave;ue(_)&&_(O,x)}),ie(m,"handleOuterEvent",function(x){var O=nk(x),_=Zt(m.props,"".concat(O));if(O&&ue(_)){var P,T;/.*touch.*/i.test(O)?T=m.getMouseInfo(x.changedTouches[0]):T=m.getMouseInfo(x),_((P=T)!==null&&P!==void 0?P:{},x)}}),ie(m,"handleClick",function(x){var O=m.getMouseInfo(x);if(O){var _=I(I({},O),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var P=m.props.onClick;ue(P)&&P(_,x)}}),ie(m,"handleMouseDown",function(x){var O=m.props.onMouseDown;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleMouseUp",function(x){var O=m.props.onMouseUp;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),ie(m,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseDown(x.changedTouches[0])}),ie(m,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseUp(x.changedTouches[0])}),ie(m,"handleDoubleClick",function(x){var O=m.props.onDoubleClick;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleContextMenu",function(x){var O=m.props.onContextMenu;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"triggerSyncEvent",function(x){m.props.syncId!==void 0&&nd.emit(id,m.props.syncId,x,m.eventEmitterSymbol)}),ie(m,"applySyncEvent",function(x){var O=m.props,_=O.layout,P=O.syncMethod,T=m.state.updateId,$=x.dataStartIndex,j=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)m.setState(I({dataStartIndex:$,dataEndIndex:j},p({props:m.props,dataStartIndex:$,dataEndIndex:j,updateId:T},m.state)));else if(x.activeTooltipIndex!==void 0){var L=x.chartX,B=x.chartY,M=x.activeTooltipIndex,z=m.state,U=z.offset,C=z.tooltipTicks;if(!U)return;if(typeof P=="function")M=P(C,x);else if(P==="value"){M=-1;for(var D=0;D=0){var Q,k;if(L.dataKey&&!L.allowDuplicatedCategory){var te=typeof L.dataKey=="function"?K:"payload.".concat(L.dataKey.toString());Q=Yu(D,te,M),k=W&&Y&&Yu(Y,te,M)}else Q=D==null?void 0:D[B],k=W&&Y&&Y[B];if(me||Se){var H=x.props.activeIndex!==void 0?x.props.activeIndex:B;return[N.cloneElement(x,I(I(I({},P.props),q),{},{activeIndex:H})),null,null]}if(!fe(Q))return[R].concat(ma(m.renderActivePoints({item:P,activePoint:Q,basePoint:k,childIndex:B,isRange:W})))}else{var ne,ee=(ne=m.getItemByXY(m.state.activeCoordinate))!==null&&ne!==void 0?ne:{graphicalItem:R},oe=ee.graphicalItem,he=oe.item,ae=he===void 0?x:he,Oe=oe.childIndex,ge=I(I(I({},P.props),q),{},{activeIndex:Oe});return[N.cloneElement(ae,ge),null,null]}return W?[R,null,null]:[R,null]}),ie(m,"renderCustomized",function(x,O,_){return N.cloneElement(x,I(I({key:"recharts-customized-".concat(_)},m.props),m.state))}),ie(m,"renderMap",{CartesianGrid:{handler:pu,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:pu},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:pu},YAxis:{handler:pu},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((h=y.id)!==null&&h!==void 0?h:Pl("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=hO(m.triggeredAfterMouseMove,(S=y.throttleDelay)!==null&&S!==void 0?S:1e3/60),m.state={},m}return LK(g,w),MK(g,[{key:"componentDidMount",value:function(){var h,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(h=this.props.margin.left)!==null&&h!==void 0?h: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 h=this.props,S=h.children,m=h.data,x=h.height,O=h.layout,_=It(S,Sr);if(_){var P=_.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,$=Ah(this.state,m,P,T),j=this.state.tooltipTicks[P].coordinate,L=(this.state.offset.top+x)/2,B=O==="horizontal",M=B?{x:j,y:L}:{y:j,x:L},z=this.state.formattedGraphicalItems.find(function(C){var D=C.item;return D.type.name==="Scatter"});z&&(M=I(I({},M),z.props.points[P].tooltipPosition),$=z.props.points[P].tooltipPayload);var U={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:T,activePayload:$,activeCoordinate:M};this.setState(U),this.renderCursor(_),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(h,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==h.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==h.margin){var m,x;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(h){ip([It(h.children,Sr)],[It(this.props.children,Sr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var h=It(this.props.children,Sr);if(h&&typeof h.props.shared=="boolean"){var S=h.props.shared?"axis":"item";return l.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(h){if(!this.container)return null;var S=this.container,m=S.getBoundingClientRect(),x=Cz(m),O={chartX:Math.round(h.pageX-x.left),chartY:Math.round(h.pageY-x.top)},_=m.width/S.offsetWidth||1,P=this.inRange(O.chartX,O.chartY,_);if(!P)return null;var T=this.state,$=T.xAxisMap,j=T.yAxisMap,L=this.getTooltipEventType(),B=N1(this.state,this.props.data,this.props.layout,P);if(L!=="axis"&&$&&j){var M=un($).scale,z=un(j).scale,U=M&&M.invert?M.invert(O.chartX):null,C=z&&z.invert?z.invert(O.chartY):null;return I(I({},O),{},{xValue:U,yValue:C},B)}return B?I(I({},O),B):null}},{key:"inRange",value:function(h,S){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,O=h/m,_=S/m;if(x==="horizontal"||x==="vertical"){var P=this.state.offset,T=O>=P.left&&O<=P.left+P.width&&_>=P.top&&_<=P.top+P.height;return T?{x:O,y:_}:null}var $=this.state,j=$.angleAxisMap,L=$.radiusAxisMap;if(j&&L){var B=un(j);return vb({x:O,y:_},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var h=this.props.children,S=this.getTooltipEventType(),m=It(h,Sr),x={};m&&S==="axis"&&(m.props.trigger==="click"?x={onClick:this.handleClick}:x={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 O=Qu(this.props,this.handleOuterEvent);return I(I({},O),x)}},{key:"addListener",value:function(){nd.on(id,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nd.removeListener(id,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(h,S,m){for(var x=this.state.formattedGraphicalItems,O=0,_=x.length;O<_;O++){var P=x[O];if(P.item===h||P.props.key===h.key||S===zr(P.item.type)&&m===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var h=this.clipPathId,S=this.state.offset,m=S.left,x=S.top,O=S.height,_=S.width;return A.createElement("defs",null,A.createElement("clipPath",{id:h},A.createElement("rect",{x:m,y:x,height:O,width:_})))}},{key:"getXScales",value:function(){var h=this.state.xAxisMap;return h?Object.entries(h).reduce(function(S,m){var x=C1(m,2),O=x[0],_=x[1];return I(I({},S),{},ie({},O,_.scale))},{}):null}},{key:"getYScales",value:function(){var h=this.state.yAxisMap;return h?Object.entries(h).reduce(function(S,m){var x=C1(m,2),O=x[0],_=x[1];return I(I({},S),{},ie({},O,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(h){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[h])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(h){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[h])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(h){var S=this.state,m=S.formattedGraphicalItems,x=S.activeItem;if(m&&m.length)for(var O=0,_=m.length;O<_;O++){var P=m[O],T=P.props,$=P.item,j=$.type.defaultProps!==void 0?I(I({},$.type.defaultProps),$.props):$.props,L=zr($.type);if(L==="Bar"){var B=(T.data||[]).find(function(C){return pH(h,C)});if(B)return{graphicalItem:P,payload:B}}else if(L==="RadialBar"){var M=(T.data||[]).find(function(C){return vb(h,C)});if(M)return{graphicalItem:P,payload:M}}else if(Vc(P,x)||Gc(P,x)||cl(P,x)){var z=y7({graphicalItem:P,activeTooltipItem:x,itemData:j.data}),U=j.activeIndex===void 0?z:j.activeIndex;return{graphicalItem:I(I({},P),{},{childIndex:U}),payload:cl(P,x)?j.data[z]:P.props.data[z]}}}return null}},{key:"render",value:function(){var h=this;if(!ag(this))return null;var S=this.props,m=S.children,x=S.className,O=S.width,_=S.height,P=S.style,T=S.compact,$=S.title,j=S.desc,L=k1(S,AK),B=de(L,!1);if(T)return A.createElement(p1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(op,Mi({},B,{width:O,height:_,title:$,desc:j}),this.renderClipPath(),lg(m,this.renderMap)));if(this.props.accessibilityLayer){var M,z;B.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,B.role=(z=this.props.role)!==null&&z!==void 0?z:"application",B.onKeyDown=function(C){h.accessibilityManager.keyboardEvent(C)},B.onFocus=function(){h.accessibilityManager.focus()}}var U=this.parseEventsOfWrapper();return A.createElement(p1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Mi({className:ve("recharts-wrapper",x),style:I({position:"relative",cursor:"default",width:O,height:_},P)},U,{ref:function(D){h.container=D}}),A.createElement(op,Mi({},B,{width:O,height:_,title:$,desc:j,style:UK}),this.renderClipPath(),lg(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(N.Component);ie(v,"displayName",r),ie(v,"defaultProps",I({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),ie(v,"getDerivedStateFromProps",function(w,g){var y=w.dataKey,h=w.data,S=w.children,m=w.width,x=w.height,O=w.layout,_=w.stackOffset,P=w.margin,T=g.dataStartIndex,$=g.dataEndIndex;if(g.updateId===void 0){var j=I1(w);return I(I(I({},j),{},{updateId:0},p(I(I({props:w},j),{},{updateId:0}),g)),{},{prevDataKey:y,prevData:h,prevWidth:m,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(y!==g.prevDataKey||h!==g.prevData||m!==g.prevWidth||x!==g.prevHeight||O!==g.prevLayout||_!==g.prevStackOffset||!zi(P,g.prevMargin)){var L=I1(w),B={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},M=I(I({},N1(g,h,O)),{},{updateId:g.updateId+1}),z=I(I(I({},L),B),M);return I(I(I({},z),p(I({props:w},z),g)),{},{prevDataKey:y,prevData:h,prevWidth:m,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(!ip(S,g.prevChildren)){var U,C,D,W,Y=It(S,la),V=Y&&(U=(C=Y.props)===null||C===void 0?void 0:C.startIndex)!==null&&U!==void 0?U:T,re=Y&&(D=(W=Y.props)===null||W===void 0?void 0:W.endIndex)!==null&&D!==void 0?D:$,le=V!==T||re!==$,Se=!fe(h),me=Se&&!le?g.updateId:g.updateId+1;return I(I({updateId:me},p(I(I({props:w},g),{},{updateId:me,dataStartIndex:V,dataEndIndex:re}),g)),{},{prevChildren:S,dataStartIndex:V,dataEndIndex:re})}return null}),ie(v,"renderActiveDot",function(w,g,y){var h;return N.isValidElement(w)?h=N.cloneElement(w,g):ue(w)?h=w(g):h=A.createElement(by,g),A.createElement(We,{className:"recharts-active-dot",key:y},h)});var b=N.forwardRef(function(g,y){return A.createElement(v,Mi({},g,{ref:y}))});return b.displayName=v.displayName,b},eq=JK({chartName:"LineChart",GraphicalChild:Ml,axisComponents:[{axisType:"xAxis",AxisComp:Zc},{axisType:"yAxis",AxisComp:Jc}],formatAxisMap:F9});const tq=({metrics:e,selectedMetric:t,onMetricChange:r})=>E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Metric"}),E.jsx("select",{id:"metric-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>E.jsx("option",{value:n,children:n},n))})]}),rq=({attacks:e,selectedAttack:t,onAttackChange:r})=>E.jsxs("fieldset",{className:"fieldset mb-4",children:[E.jsx("legend",{className:"fieldset-legend",children:"Attack"}),E.jsx("select",{id:"attack-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>E.jsx("option",{value:n,children:n},n))})]}),nq=({dataset:e,selectedModels:t})=>{const[r,n]=N.useState([]),[i,a]=N.useState(!0),[o,l]=N.useState(null),[u,s]=N.useState(new Set),[f,c]=N.useState(new Set),[d,p]=N.useState(null),[v,b]=N.useState(null);N.useEffect(()=>{a(!0),fc.fetchStaticFile(`data/${e}?dataset_type=attacks_variations`).then(h=>{const S=JSON.parse(h),m=S.all_attacks_df.map(x=>{const O={...x};return typeof O.strength=="string"&&(O.strength=parseFloat(O.strength)),O});p(S.metrics[0]),s(new Set(S.metrics)),b(S.attacks_with_variations[0]),c(new Set(S.attacks_with_variations)),n(m),a(!1)}).catch(h=>{l("Failed to fetch JSON: "+h.message),a(!1)})},[e]);const w=h=>{p(h.target.value)},g=h=>{b(h.target.value)},y=r.filter(h=>!v||h.attack===v).sort((h,S)=>h.strength-S.strength);return E.jsxs("div",{className:"rounded shadow p-4 overflow-auto mb-8",children:[i&&E.jsx(xv,{}),o&&E.jsx("div",{className:"text-red-500",children:o}),!i&&!o&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex flex-col md:flex-row md:gap-x-4 mb-4",children:[E.jsx("div",{className:"w-full md:w-1/2",children:E.jsx(tq,{metrics:u,selectedMetric:d,onMetricChange:w})}),E.jsx("div",{className:"w-full md:w-1/2",children:E.jsx(rq,{attacks:f,selectedAttack:v,onAttackChange:g})})]}),r.length>0&&E.jsx("div",{className:"h-64 mb-4",children:E.jsx(_z,{width:"100%",height:"100%",children:E.jsxs(eq,{data:y,margin:{top:5,right:30,left:20,bottom:5},children:[E.jsx(cP,{strokeDasharray:"3 3"}),E.jsx(Zc,{dataKey:"strength",domain:[Math.min(...y.map(h=>Number(h.strength))),Math.max(...y.map(h=>Number(h.strength)))],type:"number",tickFormatter:h=>h.toFixed(3),label:{value:"Strength",position:"insideBottomRight",offset:-5}}),E.jsx(Jc,{label:{value:d||"",angle:-90,position:"insideLeft",style:{textAnchor:"middle"}},tickFormatter:h=>h.toFixed(3)}),E.jsx(Sr,{contentStyle:{backgroundColor:"#2a303c",borderColor:"#374151",color:"white"},formatter:h=>h.toFixed(3)}),E.jsx(qn,{}),(()=>{if(!d)return null;const h=new Set(y.filter(m=>t.has(m.model)).map(m=>m.model)),S=["#8884d8","#82ca9d","#ffc658","#ff8042","#0088fe","#00C49F"];return[...h].map((m,x)=>E.jsx(Ml,{type:"monotone",dataKey:d,data:y.filter(O=>O.model===m),name:m,stroke:S[x%S.length],dot:!1},m))})()]})})})]})]})},iq=({models:e,selectedModels:t,setSelectedModels:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return E.jsx("div",{className:"w-full",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Models (",t.size,"/",e.length,")"]}),E.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),E.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},aq=()=>{const e=["voxpopuli_1k/audio","ravdess_1k/audio","val2014_1k/image","sav_val_full/video"],[t,r]=N.useState(e[0]),[n,i]=N.useState([]),[a,o]=N.useState(new Set),[l,u]=N.useState(!0),[s,f]=N.useState(null);return N.useEffect(()=>{u(!0),fc.fetchStaticFile(`data/${t}?dataset_type=benchmark`).then(c=>{const d=JSON.parse(c);f(d);const p=d.rows,b=Array.from(new Set(p.flatMap(w=>Object.keys(w)))).filter(w=>w!=="metric");i(b),o(new Set(b)),u(!1)}).catch(c=>{console.error("Failed to fetch models:",c),u(!1)})},[t]),E.jsxs("div",{className:"",children:[E.jsx("div",{className:"flex flex-col gap-4",children:E.jsx(s$,{datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})}),l?E.jsx(xv,{}):E.jsxs(E.Fragment,{children:[n.length>0&&E.jsx(iq,{models:n,selectedModels:a,setSelectedModels:o}),E.jsxs("div",{className:"space-y-8",children:[E.jsx(p$,{benchmarkData:s,selectedModels:a}),E.jsx("div",{className:"mt-8 pt-4 border-t border-gray-200",children:E.jsx(nq,{dataset:t,selectedModels:a})})]})]})]})};function oq(){const[e,t]=N.useState("leaderboard"),[r,n]=N.useState("dark");return N.useEffect(()=>{document.documentElement.setAttribute("data-theme",r)},[r]),E.jsxs("div",{className:"min-h-screen w-11/12 mx-auto",children:[E.jsx("div",{className:"bg-base-100 my-4",children:E.jsxs("div",{className:"flex flex-row justify-between items-center",children:[E.jsx("h2",{className:"card-title",children:"🥇 Omni Seal Bench Watermarking Leaderboard"}),E.jsxs("div",{className:"flex justify-end items-center gap-2",children:[E.jsx("span",{className:"text-sm",children:r==="dark"?"🌙 Dark Mode":"☀️ Light Mode"}),E.jsx("input",{type:"checkbox",className:"toggle",checked:r==="dark",onChange:()=>n(r==="dark"?"light":"dark"),"aria-label":"Toggle dark mode"})]})]})}),E.jsxs("div",{className:"tabs tabs-border",children:[E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Leaderboard Table",checked:e==="leaderboard",onChange:()=>t("leaderboard")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:E.jsx(aq,{})}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Image Examples",checked:e==="imageExamples",onChange:()=>t("imageExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="imageExamples"?E.jsx(Cf,{fileType:"image"}):null}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Audio Examples",checked:e==="audioExamples",onChange:()=>t("audioExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="audioExamples"?E.jsx(Cf,{fileType:"audio"}):null}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Video Examples",checked:e==="videoExamples",onChange:()=>t("videoExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="videoExamples"?E.jsx(Cf,{fileType:"video"}):null})]})]})}od.createRoot(document.getElementById("root")).render(E.jsx(A.StrictMode,{children:E.jsx(oq,{})})); diff --git a/frontend/dist/assets/index-RC6rN_Gk.js b/frontend/dist/assets/index-RC6rN_Gk.js deleted file mode 100644 index cf28039f7ea3e944ccbf547083c1ee7d6df4d178..0000000000000000000000000000000000000000 --- a/frontend/dist/assets/index-RC6rN_Gk.js +++ /dev/null @@ -1,180 +0,0 @@ -(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 _l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function me(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x1={exports:{}},Rs={},S1={exports:{}},ne={};/** - * @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 ol=Symbol.for("react.element"),fP=Symbol.for("react.portal"),dP=Symbol.for("react.fragment"),pP=Symbol.for("react.strict_mode"),hP=Symbol.for("react.profiler"),vP=Symbol.for("react.provider"),yP=Symbol.for("react.context"),mP=Symbol.for("react.forward_ref"),gP=Symbol.for("react.suspense"),bP=Symbol.for("react.memo"),wP=Symbol.for("react.lazy"),wy=Symbol.iterator;function xP(e){return e===null||typeof e!="object"?null:(e=wy&&e[wy]||e["@@iterator"],typeof e=="function"?e:null)}var O1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_1=Object.assign,P1={};function la(e,t,r){this.props=e,this.context=t,this.refs=P1,this.updater=r||O1}la.prototype.isReactComponent={};la.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")};la.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function A1(){}A1.prototype=la.prototype;function yh(e,t,r){this.props=e,this.context=t,this.refs=P1,this.updater=r||O1}var mh=yh.prototype=new A1;mh.constructor=yh;_1(mh,la.prototype);mh.isPureReactComponent=!0;var xy=Array.isArray,E1=Object.prototype.hasOwnProperty,gh={current:null},$1={key:!0,ref:!0,__self:!0,__source:!0};function T1(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)E1.call(t,n)&&!$1.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1>>1,z=C[H];if(0>>1;Hi(fe,F))sei(Ie,fe)?(C[H]=Ie,C[se]=F,H=se):(C[H]=fe,C[Z]=F,H=Z);else if(sei(Ie,F))C[H]=Ie,C[se]=F,H=se;else break e}}return k}function i(C,k){var F=C.sortIndex-k.sortIndex;return F!==0?F:C.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],s=[],f=1,c=null,d=3,p=!1,h=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(C){for(var k=r(s);k!==null;){if(k.callback===null)n(s);else if(k.startTime<=C)n(s),k.sortIndex=k.expirationTime,t(u,k);else break;k=r(s)}}function S(C){if(g=!1,m(C),!h)if(r(u)!==null)h=!0,L(b);else{var k=r(s);k!==null&&B(S,k.startTime-C)}}function b(C,k){h=!1,g&&(g=!1,y(_),_=-1),p=!0;var F=d;try{for(m(k),c=r(u);c!==null&&(!(c.expirationTime>k)||C&&!P());){var H=c.callback;if(typeof H=="function"){c.callback=null,d=c.priorityLevel;var z=H(c.expirationTime<=k);k=e.unstable_now(),typeof z=="function"?c.callback=z:c===r(u)&&n(u),m(k)}else n(u);c=r(u)}if(c!==null)var V=!0;else{var Z=r(s);Z!==null&&B(S,Z.startTime-k),V=!1}return V}finally{c=null,d=F,p=!1}}var x=!1,O=null,_=-1,E=5,A=-1;function P(){return!(e.unstable_now()-AC||125H?(C.sortIndex=F,t(s,C),r(u)===null&&C===r(s)&&(g?(y(_),_=-1):g=!0,B(S,F-H))):(C.sortIndex=z,t(u,C),h||p||(h=!0,L(b))),C},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(C){var k=d;return function(){var F=d;d=k;try{return C.apply(this,arguments)}finally{d=F}}}})(N1);M1.exports=N1;var kP=M1.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 MP=R,Tt=kP;function U(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"),Yf=Object.prototype.hasOwnProperty,NP=/^[: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]*$/,Oy={},_y={};function IP(e){return Yf.call(_y,e)?!0:Yf.call(Oy,e)?!1:NP.test(e)?_y[e]=!0:(Oy[e]=!0,!1)}function DP(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 LP(e,t,r,n){if(t===null||typeof t>"u"||DP(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 pt(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 Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new pt(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){Je[e]=new pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var wh=/[\-:]([a-z])/g;function xh(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(wh,xh);Je[t]=new pt(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(wh,xh);Je[t]=new pt(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(wh,xh);Je[t]=new pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new pt(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sh(e,t,r,n){var i=Je.hasOwnProperty(t)?Je[t]:null;(i!==null?i.type!==0:n||!(2l||i[o]!==a[l]){var u=` -`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{Kc=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Fa(e):""}function RP(e){switch(e.tag){case 5:return Fa(e.type);case 16:return Fa("Lazy");case 13:return Fa("Suspense");case 19:return Fa("SuspenseList");case 0:case 2:case 15:return e=qc(e.type,!1),e;case 11:return e=qc(e.type.render,!1),e;case 1:return e=qc(e.type,!0),e;default:return""}}function ed(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 si:return"Fragment";case ui:return"Portal";case Qf:return"Profiler";case Oh:return"StrictMode";case Zf:return"Suspense";case Jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case L1:return(e.displayName||"Context")+".Consumer";case D1:return(e._context.displayName||"Context")+".Provider";case _h:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ph:return t=e.displayName||null,t!==null?t:ed(e.type)||"Memo";case Hr:t=e._payload,e=e._init;try{return ed(e(t))}catch{}}return null}function BP(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 ed(t);case 8:return t===Oh?"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 cn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function B1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zP(e){var t=B1(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 El(e){e._valueTracker||(e._valueTracker=zP(e))}function z1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=B1(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function vu(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 td(e,t){var r=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ay(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=cn(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 F1(e,t){t=t.checked,t!=null&&Sh(e,"checked",t,!1)}function rd(e,t){F1(e,t);var r=cn(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")?nd(e,t.type,r):t.hasOwnProperty("defaultValue")&&nd(e,t.type,cn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ey(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 nd(e,t,r){(t!=="number"||vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wa=Array.isArray;function Oi(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=$l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function uo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ka={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},FP=["Webkit","ms","Moz","O"];Object.keys(Ka).forEach(function(e){FP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ka[t]=Ka[e]})});function V1(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ka.hasOwnProperty(e)&&Ka[e]?(""+t).trim():t+"px"}function G1(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=V1(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var WP=$e({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 od(e,t){if(t){if(WP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function ld(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 ud=null;function Ah(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sd=null,_i=null,Pi=null;function Cy(e){if(e=sl(e)){if(typeof sd!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Us(t),sd(e.stateNode,e.type,t))}}function K1(e){_i?Pi?Pi.push(e):Pi=[e]:_i=e}function q1(){if(_i){var e=_i,t=Pi;if(Pi=_i=null,Cy(e),t)for(e=0;e>>=0,e===0?32:31-(JP(e)/eA|0)|0}var Tl=64,Cl=4194304;function Ua(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 bu(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 l=o&~i;l!==0?n=Ua(l):(a&=o,a!==0&&(n=Ua(a)))}else o=r&~i,o!==0?n=Ua(o):a!==0&&(n=Ua(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 ll(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ir(t),e[t]=r}function iA(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=Xa),By=" ",zy=!1;function hw(e,t){switch(e){case"keyup":return kA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ci=!1;function NA(e,t){switch(e){case"compositionend":return vw(t);case"keypress":return t.which!==32?null:(zy=!0,By);case"textInput":return e=t.data,e===By&&zy?null:e;default:return null}}function IA(e,t){if(ci)return e==="compositionend"||!Nh&&hw(e,t)?(e=dw(),ou=jh=Yr=null,ci=!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=Hy(r)}}function bw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ww(){for(var e=window,t=vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=vu(e.document)}return t}function Ih(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 HA(e){var t=ww(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bw(r.ownerDocument.documentElement,r)){if(n!==null&&Ih(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=Vy(r,a);var o=Vy(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,fi=null,vd=null,Qa=null,yd=!1;function Gy(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yd||fi==null||fi!==vu(n)||(n=fi,"selectionStart"in n&&Ih(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}),Qa&&vo(Qa,n)||(Qa=n,n=Su(vd,"onSelect"),0hi||(e.current=Sd[hi],Sd[hi]=null,hi--)}function be(e,t){hi++,Sd[hi]=e.current,e.current=t}var fn={},lt=pn(fn),mt=pn(!1),zn=fn;function Mi(e,t){var r=e.type.contextTypes;if(!r)return fn;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 gt(e){return e=e.childContextTypes,e!=null}function _u(){Oe(mt),Oe(lt)}function Jy(e,t,r){if(lt.current!==fn)throw Error(U(168));be(lt,t),be(mt,r)}function Tw(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(U(108,BP(e)||"Unknown",i));return $e({},r,n)}function Pu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fn,zn=lt.current,be(lt,e),be(mt,mt.current),!0}function em(e,t,r){var n=e.stateNode;if(!n)throw Error(U(169));r?(e=Tw(e,t,zn),n.__reactInternalMemoizedMergedChildContext=e,Oe(mt),Oe(lt),be(lt,e)):Oe(mt),be(mt,r)}var xr=null,Hs=!1,sf=!1;function Cw(e){xr===null?xr=[e]:xr.push(e)}function rE(e){Hs=!0,Cw(e)}function hn(){if(!sf&&xr!==null){sf=!0;var e=0,t=pe;try{var r=xr;for(pe=1;e>=o,i-=o,Sr=1<<32-ir(t)+i|r<_?(E=O,O=null):E=O.sibling;var A=d(y,O,m[_],S);if(A===null){O===null&&(O=E);break}e&&O&&A.alternate===null&&t(y,O),v=a(A,v,_),x===null?b=A:x.sibling=A,x=A,O=E}if(_===m.length)return r(y,O),_e&&On(y,_),b;if(O===null){for(;__?(E=O,O=null):E=O.sibling;var P=d(y,O,A.value,S);if(P===null){O===null&&(O=E);break}e&&O&&P.alternate===null&&t(y,O),v=a(P,v,_),x===null?b=P:x.sibling=P,x=P,O=E}if(A.done)return r(y,O),_e&&On(y,_),b;if(O===null){for(;!A.done;_++,A=m.next())A=c(y,A.value,S),A!==null&&(v=a(A,v,_),x===null?b=A:x.sibling=A,x=A);return _e&&On(y,_),b}for(O=n(y,O);!A.done;_++,A=m.next())A=p(O,y,_,A.value,S),A!==null&&(e&&A.alternate!==null&&O.delete(A.key===null?_:A.key),v=a(A,v,_),x===null?b=A:x.sibling=A,x=A);return e&&O.forEach(function(T){return t(y,T)}),_e&&On(y,_),b}function w(y,v,m,S){if(typeof m=="object"&&m!==null&&m.type===si&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Al:e:{for(var b=m.key,x=v;x!==null;){if(x.key===b){if(b=m.type,b===si){if(x.tag===7){r(y,x.sibling),v=i(x,m.props.children),v.return=y,y=v;break e}}else if(x.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Hr&&nm(b)===x.type){r(y,x.sibling),v=i(x,m.props),v.ref=$a(y,x,m),v.return=y,y=v;break e}r(y,x);break}else t(y,x);x=x.sibling}m.type===si?(v=Dn(m.props.children,y.mode,S,m.key),v.return=y,y=v):(S=hu(m.type,m.key,m.props,null,y.mode,S),S.ref=$a(y,v,m),S.return=y,y=S)}return o(y);case ui:e:{for(x=m.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===m.containerInfo&&v.stateNode.implementation===m.implementation){r(y,v.sibling),v=i(v,m.children||[]),v.return=y,y=v;break e}else{r(y,v);break}else t(y,v);v=v.sibling}v=mf(m,y.mode,S),v.return=y,y=v}return o(y);case Hr:return x=m._init,w(y,v,x(m._payload),S)}if(Wa(m))return h(y,v,m,S);if(Oa(m))return g(y,v,m,S);Ll(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,v!==null&&v.tag===6?(r(y,v.sibling),v=i(v,m),v.return=y,y=v):(r(y,v),v=yf(m,y.mode,S),v.return=y,y=v),o(y)):r(y,v)}return w}var Ii=Nw(!0),Iw=Nw(!1),$u=pn(null),Tu=null,mi=null,Bh=null;function zh(){Bh=mi=Tu=null}function Fh(e){var t=$u.current;Oe($u),e._currentValue=t}function Pd(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 Ei(e,t){Tu=e,Bh=mi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(vt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Bh!==e)if(e={context:e,memoizedValue:t,next:null},mi===null){if(Tu===null)throw Error(U(308));mi=e,Tu.dependencies={lanes:0,firstContext:e}}else mi=mi.next=e;return t}var Tn=null;function Wh(e){Tn===null?Tn=[e]:Tn.push(e)}function Dw(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Wh(t)):(r.next=i.next,i.next=r),t.interleaved=r,Mr(e,n)}function Mr(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 Vr=!1;function Uh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lw(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 Er(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,oe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Mr(e,r)}return i=n.interleaved,i===null?(t.next=t,Wh(n)):(t.next=i.next,i.next=t),n.interleaved=t,Mr(e,r)}function uu(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,$h(e,r)}}function im(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 Cu(e,t,r,n){var i=e.updateQueue;Vr=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,s=u.next;u.next=null,o===null?a=s:o.next=s,o=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=s:l.next=s,f.lastBaseUpdate=u))}if(a!==null){var c=i.baseState;o=0,f=s=u=null,l=a;do{var d=l.lane,p=l.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,g=l;switch(d=t,p=r,g.tag){case 1:if(h=g.payload,typeof h=="function"){c=h.call(p,c,d);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,d=typeof h=="function"?h.call(p,c,d):h,d==null)break e;c=$e({},c,d);break e;case 2:Vr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(s=f=p,u=c):f=f.next=p,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(u=c),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,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);Un|=o,e.lanes=o,e.memoizedState=c}}function am(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=ff.transition;ff.transition={};try{e(!1),t()}finally{pe=r,ff.transition=n}}function ex(){return Ht().memoizedState}function oE(e,t,r){var n=on(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},tx(e))rx(t,r);else if(r=Dw(e,t,r,n),r!==null){var i=ft();ar(r,e,n,i),nx(r,t,n)}}function lE(e,t,r){var n=on(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(tx(e))rx(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,l=a(o,r);if(i.hasEagerState=!0,i.eagerState=l,or(l,o)){var u=t.interleaved;u===null?(i.next=i,Wh(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=Dw(e,t,i,n),r!==null&&(i=ft(),ar(r,e,n,i),nx(r,t,n))}}function tx(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function rx(e,t){Za=ku=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function nx(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,$h(e,r)}}var Mu={readContext:Ut,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},uE={readContext:Ut,useCallback:function(e,t){return sr().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:lm,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,cu(4194308,4,Xw.bind(null,t,e),r)},useLayoutEffect:function(e,t){return cu(4194308,4,e,t)},useInsertionEffect:function(e,t){return cu(4,2,e,t)},useMemo:function(e,t){var r=sr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=sr();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=oE.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=sr();return e={current:e},t.memoizedState=e},useState:om,useDebugValue:Qh,useDeferredValue:function(e){return sr().memoizedState=e},useTransition:function(){var e=om(!1),t=e[0];return e=aE.bind(null,e[1]),sr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ee,i=sr();if(_e){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),Ge===null)throw Error(U(349));Wn&30||Fw(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,lm(Uw.bind(null,n,a,e),[e]),n.flags|=2048,Oo(9,Ww.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=sr(),t=Ge.identifierPrefix;if(_e){var r=Or,n=Sr;r=(n&~(1<<32-ir(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=xo++,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[fr]=t,e[go]=n,px(e,t,!1,!1),t.stateNode=e;e:{switch(o=ld(r,n),r){case"dialog":we("cancel",e),we("close",e),i=n;break;case"iframe":case"object":case"embed":we("load",e),i=n;break;case"video":case"audio":for(i=0;iRi&&(t.flags|=128,n=!0,Ta(a,!1),t.lanes=4194304)}else{if(!n)if(e=ju(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ta(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!_e)return rt(t),null}else 2*Me()-a.renderingStartTime>Ri&&r!==1073741824&&(t.flags|=128,n=!0,Ta(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=Me(),t.sibling=null,r=Ae.current,be(Ae,n?r&1|2:r&1),t):(rt(t),null);case 22:case 23:return nv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?_t&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function yE(e,t){switch(Lh(t),t.tag){case 1:return gt(t.type)&&_u(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Di(),Oe(mt),Oe(lt),Gh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vh(t),null;case 13:if(Oe(Ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Ae),null;case 4:return Di(),null;case 10:return Fh(t.type._context),null;case 22:case 23:return nv(),null;case 24:return null;default:return null}}var Bl=!1,it=!1,mE=typeof WeakSet=="function"?WeakSet:Set,q=null;function gi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ce(e,t,n)}else r.current=null}function Nd(e,t,r){try{r()}catch(n){Ce(e,t,n)}}var gm=!1;function gE(e,t){if(md=wu,e=ww(),Ih(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,l=-1,u=-1,s=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(l=o+i),c!==a||n!==0&&c.nodeType!==3||(u=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++s===i&&(l=o),d===a&&++f===n&&(u=o),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(gd={focusedElem:e,selectionRange:r},wu=!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 h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,w=h.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Yt(t.type,g),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){Ce(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return h=gm,gm=!1,h}function Ja(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&&Nd(t,r,a)}i=i.next}while(i!==n)}}function Ks(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 Id(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 yx(e){var t=e.alternate;t!==null&&(e.alternate=null,yx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fr],delete t[go],delete t[xd],delete t[eE],delete t[tE])),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 mx(e){return e.tag===5||e.tag===3||e.tag===4}function bm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mx(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 Dd(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=Ou));else if(n!==4&&(e=e.child,e!==null))for(Dd(e,t,r),e=e.sibling;e!==null;)Dd(e,t,r),e=e.sibling}function Ld(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(Ld(e,t,r),e=e.sibling;e!==null;)Ld(e,t,r),e=e.sibling}var Xe=null,Qt=!1;function Ur(e,t,r){for(r=r.child;r!==null;)gx(e,t,r),r=r.sibling}function gx(e,t,r){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(Bs,r)}catch{}switch(r.tag){case 5:it||gi(r,t);case 6:var n=Xe,i=Qt;Xe=null,Ur(e,t,r),Xe=n,Qt=i,Xe!==null&&(Qt?(e=Xe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Xe.removeChild(r.stateNode));break;case 18:Xe!==null&&(Qt?(e=Xe,r=r.stateNode,e.nodeType===8?uf(e.parentNode,r):e.nodeType===1&&uf(e,r),po(e)):uf(Xe,r.stateNode));break;case 4:n=Xe,i=Qt,Xe=r.stateNode.containerInfo,Qt=!0,Ur(e,t,r),Xe=n,Qt=i;break;case 0:case 11:case 14:case 15:if(!it&&(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)&&Nd(r,t,o),i=i.next}while(i!==n)}Ur(e,t,r);break;case 1:if(!it&&(gi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Ce(r,t,l)}Ur(e,t,r);break;case 21:Ur(e,t,r);break;case 22:r.mode&1?(it=(n=it)||r.memoizedState!==null,Ur(e,t,r),it=n):Ur(e,t,r);break;default:Ur(e,t,r)}}function wm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new mE),t.forEach(function(n){var i=EE.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function qt(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Me()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*wE(n/1960))-n,10e?16:e,Qr===null)var n=!1;else{if(e=Qr,Qr=null,Du=0,oe&6)throw Error(U(331));var i=oe;for(oe|=4,q=e.current;q!==null;){var a=q,o=a.child;if(q.flags&16){var l=a.deletions;if(l!==null){for(var u=0;uMe()-tv?In(e,0):ev|=r),bt(e,t)}function Ax(e,t){t===0&&(e.mode&1?(t=Cl,Cl<<=1,!(Cl&130023424)&&(Cl=4194304)):t=1);var r=ft();e=Mr(e,t),e!==null&&(ll(e,t,r),bt(e,r))}function AE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Ax(e,r)}function EE(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(U(314))}n!==null&&n.delete(t),Ax(e,r)}var Ex;Ex=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||mt.current)vt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vt=!1,hE(e,t,r);vt=!!(e.flags&131072)}else vt=!1,_e&&t.flags&1048576&&jw(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;fu(e,t),e=t.pendingProps;var i=Mi(t,lt.current);Ei(t,r),i=qh(null,t,n,e,i,r);var a=Xh();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,gt(n)?(a=!0,Pu(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Uh(t),i.updater=Gs,t.stateNode=i,i._reactInternals=t,Ed(t,n,e,r),t=Cd(null,t,n,!0,a,r)):(t.tag=0,_e&&a&&Dh(t),st(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(fu(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=TE(n),e=Yt(n,e),i){case 0:t=Td(null,t,n,e,r);break e;case 1:t=vm(null,t,n,e,r);break e;case 11:t=pm(null,t,n,e,r);break e;case 14:t=hm(null,t,n,Yt(n.type,e),r);break e}throw Error(U(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yt(n,i),Td(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yt(n,i),vm(e,t,n,i,r);case 3:e:{if(cx(t),e===null)throw Error(U(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Lw(e,t),Cu(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=Li(Error(U(423)),t),t=ym(e,t,n,r,i);break e}else if(n!==i){i=Li(Error(U(424)),t),t=ym(e,t,n,r,i);break e}else for(Et=rn(t.stateNode.containerInfo.firstChild),$t=t,_e=!0,er=null,r=Iw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ni(),n===i){t=Nr(e,t,r);break e}st(e,t,n,r)}t=t.child}return t;case 5:return Rw(t),e===null&&_d(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,bd(n,i)?o=null:a!==null&&bd(n,a)&&(t.flags|=32),sx(e,t),st(e,t,o,r),t.child;case 6:return e===null&&_d(t),null;case 13:return fx(e,t,r);case 4:return Hh(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ii(t,null,n,r):st(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yt(n,i),pm(e,t,n,i,r);case 7:return st(e,t,t.pendingProps,r),t.child;case 8:return st(e,t,t.pendingProps.children,r),t.child;case 12:return st(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,be($u,n._currentValue),n._currentValue=o,a!==null)if(or(a.value,o)){if(a.children===i.children&&!mt.current){t=Nr(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=Er(-1,r&-r),u.tag=2;var s=a.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),Pd(a.return,r,t),l.lanes|=r;break}u=u.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(U(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Pd(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}st(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ei(t,r),i=Ut(i),n=n(i),t.flags|=1,st(e,t,n,r),t.child;case 14:return n=t.type,i=Yt(n,t.pendingProps),i=Yt(n.type,i),hm(e,t,n,i,r);case 15:return lx(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Yt(n,i),fu(e,t),t.tag=1,gt(n)?(e=!0,Pu(t)):e=!1,Ei(t,r),ix(t,n,i),Ed(t,n,i,r),Cd(null,t,n,!0,e,r);case 19:return dx(e,t,r);case 22:return ux(e,t,r)}throw Error(U(156,t.tag))};function $x(e,t){return tw(e,t)}function $E(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 Rt(e,t,r,n){return new $E(e,t,r,n)}function av(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TE(e){if(typeof e=="function")return av(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_h)return 11;if(e===Ph)return 14}return 2}function ln(e,t){var r=e.alternate;return r===null?(r=Rt(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 hu(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")av(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case si:return Dn(r.children,i,a,t);case Oh:o=8,i|=8;break;case Qf:return e=Rt(12,r,t,i|2),e.elementType=Qf,e.lanes=a,e;case Zf:return e=Rt(13,r,t,i),e.elementType=Zf,e.lanes=a,e;case Jf:return e=Rt(19,r,t,i),e.elementType=Jf,e.lanes=a,e;case R1:return Xs(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D1:o=10;break e;case L1:o=9;break e;case _h:o=11;break e;case Ph:o=14;break e;case Hr:o=16,n=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Rt(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Dn(e,t,r,n){return e=Rt(7,e,n,t),e.lanes=r,e}function Xs(e,t,r,n){return e=Rt(22,e,n,t),e.elementType=R1,e.lanes=r,e.stateNode={isHidden:!1},e}function yf(e,t,r){return e=Rt(6,e,null,t),e.lanes=r,e}function mf(e,t,r){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function CE(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=Yc(0),this.expirationTimes=Yc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yc(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ov(e,t,r,n,i,a,o,l,u){return e=new CE(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Rt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uh(a),e}function jE(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kx)}catch(e){console.error(e)}}kx(),k1.exports=jt;var DE=k1.exports,$m=DE;Xf.createRoot=$m.createRoot,Xf.hydrateRoot=$m.hydrateRoot;const Va="";console.log(`API Server URL: ${Va}`);class ec{static async fetchIndex(){const t=await fetch(Va+"/");if(!t.ok)throw new Error("Failed to fetch index.html");return t.text()}static async fetchStaticFile(t){const r=await fetch(`${Va}/${t}`);if(!r.ok)throw new Error(`Failed to fetch ${t}`);return r.text()}static fetchExamplesByType(t){return fetch(`${Va}/examples/${t}`).then(r=>{if(!r.ok)throw new Error(`Failed to fetch examples of type ${t}`);return r.json()})}static getProxiedUrl(t){return`${Va}/proxy/${encodeURIComponent(t)}`}}function Ye(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(s){try{u(n.next(s))}catch(f){a(f)}}function l(s){try{u(n.throw(s))}catch(f){a(f)}}function u(s){var f;s.done?i(s.value):(f=s.value,f instanceof r?f:new r(function(c){c(f)})).then(o,l)}u((n=n.apply(e,t||[])).next())})}let fl=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}};const Wl={decode:function(e,t){return Ye(this,void 0,void 0,function*(){const r=new AudioContext({sampleRate:t});return r.decodeAudioData(e).finally(()=>r.close())})},createBuffer:function(e,t){return typeof e[0]=="number"&&(e=[e]),function(r){const n=r[0];if(n.some(i=>i>1||i<-1)){const i=n.length;let a=0;for(let o=0;oa&&(a=l)}for(const o of r)for(let l=0;le==null?void 0:e[r],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Mx(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Mx(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function Tm(e,t,r){const n=Mx(e,t||{});return r==null||r.appendChild(n),n}var LE=Object.freeze({__proto__:null,createElement:Tm,default:Tm});const RE={fetchBlob:function(e,t,r){return Ye(this,void 0,void 0,function*(){const n=yield fetch(e,r);if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return function(i,a){Ye(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const o=i.body.getReader(),l=Number(i.headers.get("Content-Length"))||0;let u=0;const s=c=>Ye(this,void 0,void 0,function*(){u+=(c==null?void 0:c.length)||0;const d=Math.round(u/l*100);a(d)}),f=()=>Ye(this,void 0,void 0,function*(){let c;try{c=yield o.read()}catch{return}c.done||(s(c.value),yield f())});f()})}(n.clone(),t),n.blob()})}};let BE=class extends fl{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,r,n){return this.media.addEventListener(t,r,n),()=>this.media.removeEventListener(t,r,n)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,r){const n=this.getSrc();if(t&&n===t)return;this.revokeSrc();const i=r instanceof Blob&&(this.canPlayType(r.type)||!t)?URL.createObjectURL(r):t;n&&(this.media.src="");try{this.media.src=i}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return Ye(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,r){r!=null&&(this.media.preservesPitch=r),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}},Wd=class Ud extends fl{constructor(t,r){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const n=this.parentFromOptionsContainer(t.container);this.parent=n;const[i,a]=this.initHtml();n.appendChild(i),this.container=i,this.scrollContainer=a.querySelector(".scroll"),this.wrapper=a.querySelector(".wrapper"),this.canvasWrapper=a.querySelector(".canvases"),this.progressWrapper=a.querySelector(".progress"),this.cursor=a.querySelector(".cursor"),r&&a.appendChild(r),this.initEvents()}parentFromOptionsContainer(t){let r;if(typeof t=="string"?r=document.querySelector(t):t instanceof HTMLElement&&(r=t),!r)throw new Error("Container not found");return r}initEvents(){const t=r=>{const n=this.wrapper.getBoundingClientRect(),i=r.clientX-n.left,a=r.clientY-n.top;return[i/n.width,a/n.height]};if(this.wrapper.addEventListener("click",r=>{const[n,i]=t(r);this.emit("click",n,i)}),this.wrapper.addEventListener("dblclick",r=>{const[n,i]=t(r);this.emit("dblclick",n,i)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:r,scrollWidth:n,clientWidth:i}=this.scrollContainer,a=r/n,o=(r+i)/n;this.emit("scroll",a,o,r,r+i)}),typeof ResizeObserver=="function"){const r=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{r().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,r,n,i,a=3,o=0,l=100){if(!t)return()=>{};const u=matchMedia("(pointer: coarse)").matches;let s=()=>{};const f=c=>{if(c.button!==o)return;c.preventDefault(),c.stopPropagation();let d=c.clientX,p=c.clientY,h=!1;const g=Date.now(),w=b=>{if(b.preventDefault(),b.stopPropagation(),u&&Date.now()-ga||Math.abs(E)>a){const A=t.getBoundingClientRect(),{left:P,top:T}=A;h||(n==null||n(d-P,p-T),h=!0),r(_,E,x-P,O-T),d=x,p=O}},y=b=>{if(h){const x=b.clientX,O=b.clientY,_=t.getBoundingClientRect(),{left:E,top:A}=_;i==null||i(x-E,O-A)}s()},v=b=>{b.relatedTarget&&b.relatedTarget!==document.documentElement||y(b)},m=b=>{h&&(b.stopPropagation(),b.preventDefault())},S=b=>{h&&b.preventDefault()};document.addEventListener("pointermove",w),document.addEventListener("pointerup",y),document.addEventListener("pointerout",v),document.addEventListener("pointercancel",v),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("click",m,{capture:!0}),s=()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",y),document.removeEventListener("pointerout",v),document.removeEventListener("pointercancel",v),document.removeEventListener("touchmove",S),setTimeout(()=>{document.removeEventListener("click",m,{capture:!0})},10)}};return t.addEventListener("pointerdown",f),()=>{s(),t.removeEventListener("pointerdown",f)}}(this.wrapper,(t,r,n)=>{this.emit("drag",Math.max(0,Math.min(1,n/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,r){var n;const i=((n=this.audioData)===null||n===void 0?void 0:n.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const a=this.parent.clientHeight||128;return r!=null&&r.every(o=>!o.overlay)?a/i:a}return 128}initHtml(){const t=document.createElement("div"),r=t.attachShadow({mode:"open"}),n=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return r.innerHTML=` - - :host { - user-select: none; - min-width: 1px; - } - :host audio { - display: block; - width: 100%; - } - :host .scroll { - overflow-x: auto; - overflow-y: hidden; - width: 100%; - position: relative; - } - :host .noScrollbar { - scrollbar-color: transparent; - scrollbar-width: none; - } - :host .noScrollbar::-webkit-scrollbar { - display: none; - -webkit-appearance: none; - } - :host .wrapper { - position: relative; - overflow: visible; - z-index: 2; - } - :host .canvases { - min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px; - } - :host .canvases > div { - position: relative; - } - :host canvas { - display: block; - position: absolute; - top: 0; - image-rendering: pixelated; - } - :host .progress { - pointer-events: none; - position: absolute; - z-index: 2; - top: 0; - left: 0; - width: 0; - height: 100%; - overflow: hidden; - } - :host .progress > div { - position: relative; - } - :host .cursor { - pointer-events: none; - position: absolute; - z-index: 5; - top: 0; - left: 0; - height: 100%; - border-radius: 2px; - } - - -
-
-
-
-
-
-
- `,[t,r]}setOptions(t){if(this.options.container!==t.container){const r=this.parentFromOptionsContainer(t.container);r.appendChild(this.container),this.parent=r}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:r}=this.scrollContainer,n=r*t;this.setScroll(n)}destroy(){var t,r;this.subscriptions.forEach(n=>n()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(r=this.unsubscribeOnScroll)===null||r===void 0||r.forEach(n=>n()),this.unsubscribeOnScroll=[]}createDelay(t=10){let r,n;const i=()=>{r&&clearTimeout(r),n&&n()};return this.timeouts.push(i),()=>new Promise((a,o)=>{i(),n=o,r=setTimeout(()=>{r=void 0,n=void 0,a()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const r=document.createElement("canvas"),n=r.getContext("2d"),i=r.height*(window.devicePixelRatio||1),a=n.createLinearGradient(0,0,0,i),o=1/(t.length-1);return t.forEach((l,u)=>{const s=u*o;a.addColorStop(s,l)}),a}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,r,n,i){const a=t[0],o=t[1]||t[0],l=a.length,{width:u,height:s}=n.canvas,f=s/2,c=this.getPixelRatio(),d=r.barWidth?r.barWidth*c:1,p=r.barGap?r.barGap*c:r.barWidth?d/2:0,h=r.barRadius||0,g=u/(d+p)/l,w=h&&"roundRect"in n?"roundRect":"rect";n.beginPath();let y=0,v=0,m=0;for(let S=0;S<=l;S++){const b=Math.round(S*g);if(b>y){const _=Math.round(v*f*i),E=_+Math.round(m*f*i)||1;let A=f-_;r.barAlign==="top"?A=0:r.barAlign==="bottom"&&(A=s-E),n[w](y*(d+p),A,d,E,h),y=b,v=0,m=0}const x=Math.abs(a[S]||0),O=Math.abs(o[S]||0);x>v&&(v=x),O>m&&(m=O)}n.fill(),n.closePath()}renderLineWaveform(t,r,n,i){const a=o=>{const l=t[o]||t[0],u=l.length,{height:s}=n.canvas,f=s/2,c=n.canvas.width/u;n.moveTo(0,f);let d=0,p=0;for(let h=0;h<=u;h++){const g=Math.round(h*c);if(g>d){const y=f+(Math.round(p*f*i)||1)*(o===0?-1:1);n.lineTo(d,y),d=g,p=0}const w=Math.abs(l[h]||0);w>p&&(p=w)}n.lineTo(d,f)};n.beginPath(),a(0),a(1),n.fill(),n.closePath()}renderWaveform(t,r,n){if(n.fillStyle=this.convertColorValues(r.waveColor),r.renderFunction)return void r.renderFunction(t,n);let i=r.barHeight||1;if(r.normalize){const a=Array.from(t[0]).reduce((o,l)=>Math.max(o,Math.abs(l)),0);i=a?1/a:1}r.barWidth||r.barGap||r.barAlign?this.renderBarWaveform(t,r,n,i):this.renderLineWaveform(t,r,n,i)}renderSingleCanvas(t,r,n,i,a,o,l){const u=this.getPixelRatio(),s=document.createElement("canvas");s.width=Math.round(n*u),s.height=Math.round(i*u),s.style.width=`${n}px`,s.style.height=`${i}px`,s.style.left=`${Math.round(a)}px`,o.appendChild(s);const f=s.getContext("2d");if(this.renderWaveform(t,r,f),s.width>0&&s.height>0){const c=s.cloneNode(),d=c.getContext("2d");d.drawImage(s,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(r.progressColor),d.fillRect(0,0,s.width,s.height),l.appendChild(c)}}renderMultiCanvas(t,r,n,i,a,o){const l=this.getPixelRatio(),{clientWidth:u}=this.scrollContainer,s=n/l;let f=Math.min(Ud.MAX_CANVAS_WIDTH,u,s),c={};if(f===0)return;if(r.barWidth||r.barGap){const w=r.barWidth||.5,y=w+(r.barGap||w/2);f%y!=0&&(f=Math.floor(f/y)*y)}const d=w=>{if(w<0||w>=p||c[w])return;c[w]=!0;const y=w*f,v=Math.min(s-y,f);if(v<=0)return;const m=t.map(S=>{const b=Math.floor(y/s*S.length),x=Math.floor((y+v)/s*S.length);return S.slice(b,x)});this.renderSingleCanvas(m,r,v,i,y,a,o)},p=Math.ceil(s/f);if(!this.isScrollable){for(let w=0;w1){const w=this.on("scroll",()=>{const{scrollLeft:y}=this.scrollContainer,v=Math.floor(y/s*p);Object.keys(c).length>Ud.MAX_NODES&&(a.innerHTML="",o.innerHTML="",c={}),d(v-1),d(v),d(v+1)});this.unsubscribeOnScroll.push(w)}}renderChannel(t,r,n,i){var{overlay:a}=r,o=function(f,c){var d={};for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&c.indexOf(p)<0&&(d[p]=f[p]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(p=Object.getOwnPropertySymbols(f);h0&&(l.style.marginTop=`-${u}px`),this.canvasWrapper.style.minHeight=`${u}px`,this.canvasWrapper.appendChild(l);const s=l.cloneNode();this.progressWrapper.appendChild(s),this.renderMultiCanvas(t,o,n,u,l,s)}render(t){return Ye(this,void 0,void 0,function*(){var r;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const n=this.getPixelRatio(),i=this.scrollContainer.clientWidth,a=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=a>i;const o=this.options.fillParent&&!this.isScrollable,l=(o?i:a)*n;if(this.wrapper.style.width=o?"100%":`${a}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let u=0;u1&&u.push(t.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(n=>n()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:r}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:n}=this.progressWrapper.getBoundingClientRect();let i=n-r;i*=2,i=i<0?Math.floor(i):Math.ceil(i),i/=2,this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,r=!1){const{scrollLeft:n,scrollWidth:i,clientWidth:a}=this.scrollContainer,o=t*i,l=n,u=n+a,s=a/2;if(this.isDragging)o+30>u?this.scrollContainer.scrollLeft+=30:o-30u)&&(this.scrollContainer.scrollLeft=o-(this.options.autoCenter?s:0));const f=o-n-s;r&&this.options.autoCenter&&f>0&&(this.scrollContainer.scrollLeft+=Math.min(f,10))}{const f=this.scrollContainer.scrollLeft,c=f/i,d=(f+a)/i;this.emit("scroll",c,d,f,f+a)}}renderProgress(t,r){if(isNaN(t))return;const n=100*t;this.canvasWrapper.style.clipPath=`polygon(${n}% 0, 100% 0, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.transform=`translateX(-${Math.round(n)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,r)}exportImage(t,r,n){return Ye(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(n==="dataURL"){const a=Array.from(i).map(o=>o.toDataURL(t,r));return Promise.resolve(a)}return Promise.all(Array.from(i).map(a=>new Promise((o,l)=>{a.toBlob(u=>{u?o(u):l(new Error("Could not export image"))},t,r)})))})}};Wd.MAX_CANVAS_WIDTH=8e3,Wd.MAX_NODES=10;let zE=class extends fl{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}},gf=class extends fl{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return Ye(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(r=>{if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return r.arrayBuffer()}).then(r=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(r)).then(r=>{this.currentSrc===t&&(this.buffer=r,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let r=this.playedDuration*this._playbackRate;(r>=this.duration||r<0)&&(r=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,r),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return Ye(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const r=t-this.currentTime,n=this.bufferNode;n==null||n.stop(this.audioContext.currentTime+r),n==null||n.addEventListener("ended",()=>{n===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return Ye(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const r=!this.paused;r&&this._pause(),this.playedDuration=t/this._playbackRate,r&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,r;return(t=this._duration)!==null&&t!==void 0?t:((r=this.buffer)===null||r===void 0?void 0:r.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const r=this.buffer.numberOfChannels;for(let n=0;n{this.emit("init");const{peaks:a,duration:o}=this.options;(i||a&&o)&&this.load(i,a,o).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,r)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,r))}),this.renderer.on("dblclick",(t,r)=>{this.emit("dblclick",t,r)}),this.renderer.on("scroll",(t,r,n,i)=>{const a=this.getDuration();this.emit("scroll",t*a,r*a,n,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",r=>{if(!this.options.interact)return;let n;this.renderer.renderProgress(r),clearTimeout(t),this.isPlaying()?n=0:this.options.dragToSeek===!0?n=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(n=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(r)},n),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(r=>{this.registerPlugin(r)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=Wl.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Wl.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t)})),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const r=t/this.getDuration();this.renderer.setScrollPercentage(r)}getActivePlugins(){return this.plugins}loadAudio(t,r,n,i){return Ye(this,void 0,void 0,function*(){var a;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!r&&!n){const l=this.options.fetchParams||{};window.AbortController&&!l.signal&&(this.abortController=new AbortController,l.signal=(a=this.abortController)===null||a===void 0?void 0:a.signal);const u=f=>this.emit("loading",f);r=yield RE.fetchBlob(t,u,l);const s=this.options.blobMimeType;s&&(r=new Blob([r],{type:s}))}this.setSrc(t,r);const o=yield new Promise(l=>{const u=i||this.getDuration();u?l(u):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>l(this.getDuration()),{once:!0}))});if(!t&&!r){const l=this.getMediaElement();l instanceof gf&&(l.duration=o)}if(n)this.decodedData=Wl.createBuffer(n,o||0);else if(r){const l=yield r.arrayBuffer();this.decodedData=yield Wl.decode(l,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,r,n){return Ye(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,r,n)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,r,n){return Ye(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,r,n)}catch(i){throw this.emit("error",i),i}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:r=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(t,this.decodedData.numberOfChannels),a=[];for(let o=0;oMath.abs(d)&&(d=h)}u.push(Math.round(d*n)/n)}a.push(u)}return a}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const r=this.getDuration()*t;this.setTime(r)}play(t,r){const n=Object.create(null,{play:{get:()=>super.play}});return Ye(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield n.play.call(this);return r!=null&&(this.media instanceof gf?this.media.stopAt(r):this.stopAtPosition=r),i})}playPause(){return Ye(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return Ye(this,arguments,void 0,function*(t="image/png",r=1,n="dataURL"){return this.renderer.exportImage(t,r,n)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(r=>r.destroy()),this.subscriptions.forEach(r=>r()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}};Hd.BasePlugin=class extends fl{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e())}},Hd.dom=LE;let WE=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}},UE=class extends WE{constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t())}};function Ix(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Ix(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function bf(e,t,r){return Ix(e,t||{})}const HE={height:20,timeOffset:0,formatTimeCallback:e=>e/60>1?`${Math.floor(e/60)}:${`${(e=Math.round(e%60))<10?"0":""}${e}`}`:`${Math.round(1e3*e)/1e3}`};let VE=class Dx extends UE{constructor(t){super(t||{}),this.options=Object.assign({},HE,t),this.timelineWrapper=this.initTimelineWrapper()}static create(t){return new Dx(t)}onInit(){var t;if(!this.wavesurfer)throw Error("WaveSurfer is not initialized");let r=this.wavesurfer.getWrapper();if(this.options.container instanceof HTMLElement)r=this.options.container;else if(typeof this.options.container=="string"){const n=document.querySelector(this.options.container);if(!n)throw Error(`No Timeline container found matching ${this.options.container}`);r=n}this.options.insertPosition?(r.firstElementChild||r).insertAdjacentElement(this.options.insertPosition,this.timelineWrapper):r.appendChild(this.timelineWrapper),this.subscriptions.push(this.wavesurfer.on("redraw",()=>this.initTimeline())),(!((t=this.wavesurfer)===null||t===void 0)&&t.getDuration()||this.options.duration)&&this.initTimeline()}destroy(){this.timelineWrapper.remove(),super.destroy()}initTimelineWrapper(){return bf("div",{part:"timeline-wrapper",style:{pointerEvents:"none"}})}defaultTimeInterval(t){return t>=25?1:5*t>=25?5:15*t>=25?15:60*Math.ceil(.5/t)}defaultPrimaryLabelInterval(t){return t>=25?10:5*t>=25?6:4}defaultSecondaryLabelInterval(t){return t>=25?5:2}virtualAppend(t,r,n){let i=!1;const a=(u,s)=>{if(!this.wavesurfer)return;const f=n.clientWidth,c=t>u&&t+f{a(f,c)}))}initTimeline(){var t,r,n,i,a,o,l,u;const s=(n=(r=(t=this.wavesurfer)===null||t===void 0?void 0:t.getDuration())!==null&&r!==void 0?r:this.options.duration)!==null&&n!==void 0?n:0,f=(((i=this.wavesurfer)===null||i===void 0?void 0:i.getWrapper().scrollWidth)||this.timelineWrapper.scrollWidth)/s,c=(a=this.options.timeInterval)!==null&&a!==void 0?a:this.defaultTimeInterval(f),d=(o=this.options.primaryLabelInterval)!==null&&o!==void 0?o:this.defaultPrimaryLabelInterval(f),p=this.options.primaryLabelSpacing,h=(l=this.options.secondaryLabelInterval)!==null&&l!==void 0?l:this.defaultSecondaryLabelInterval(f),g=this.options.secondaryLabelSpacing,w=this.options.insertPosition==="beforebegin",y=bf("div",{style:Object.assign({height:`${this.options.height}px`,overflow:"hidden",fontSize:this.options.height/2+"px",whiteSpace:"nowrap"},w?{position:"absolute",top:"0",left:"0",right:"0",zIndex:"2"}:{position:"relative"})});y.setAttribute("part","timeline"),typeof this.options.style=="string"?y.setAttribute("style",y.getAttribute("style")+this.options.style):typeof this.options.style=="object"&&Object.assign(y.style,this.options.style);const v=bf("div",{style:{width:"0",height:"50%",display:"flex",flexDirection:"column",justifyContent:w?"flex-start":"flex-end",top:w?"0":"auto",bottom:w?"auto":"0",overflow:"visible",borderLeft:"1px solid currentColor",opacity:`${(u=this.options.secondaryLabelOpacity)!==null&&u!==void 0?u:.25}`,position:"absolute",zIndex:"1"}});for(let m=0,S=0;m{const t=R.useRef(null),r=R.useRef(null),[n,i]=R.useState(!1);return VE.create({height:16,timeInterval:.1,primaryLabelInterval:1,style:{fontSize:"10px"}}),R.useEffect(()=>{if(!t.current)return;const a=ec.getProxiedUrl(e);return r.current=Hd.create({container:t.current,waveColor:"rgb(200, 0, 200)",progressColor:"rgb(100, 0, 100)",url:a,minPxPerSec:100,barWidth:10,barRadius:10,barGap:2,mediaControls:!0}),r.current.on("interaction",()=>{var o;(o=r.current)==null||o.play(),i(!0)}),r.current.on("finish",()=>{var o;(o=r.current)==null||o.setTime(0),i(!1)}),r.current.on("play",()=>i(!0)),r.current.on("pause",()=>i(!1)),()=>{var o;(o=r.current)==null||o.destroy()}},[e]),j.jsx("div",{className:"",children:j.jsx("div",{ref:t})})},cv=({minHeight:e="300px"})=>j.jsx("div",{className:`flex items-center justify-center min-h-[${e}]`,children:j.jsx("span",{className:"loading loading-spinner loading-lg text-primary"})}),wf=({fileType:e})=>{const[t,r]=R.useState({}),[n,i]=R.useState(!1),[a,o]=R.useState(null),[l,u]=R.useState(null),[s,f]=R.useState(null);R.useEffect(()=>{i(!0),o(null),ec.fetchExamplesByType(e).then(d=>{r(d);const p=Object.keys(d);if(p.length>0){u(p[0]);const h=Object.keys(d[p[0]]);h.length>0?f(h[0]):f(null)}else u(null),f(null);i(!1)}).catch(d=>{o(d.message),i(!1)})},[e]);const c=({selectedModel:d,selectedAttack:p,examples:h,fileType:g})=>{const w=h[d][p];return j.jsx("div",{className:"example-display",children:w.map((y,v)=>j.jsxs("div",{className:"example-item",children:[j.jsx("p",{children:y.description}),g==="image"&&j.jsx("img",{src:y.image_url,alt:y.description,className:"example-image"}),g==="audio"&&y.audio_url&&j.jsxs(j.Fragment,{children:[j.jsx(GE,{src:y.audio_url}),j.jsx("img",{src:y.image_url,alt:y.description,className:"example-image"})]}),g==="video"&&j.jsx("video",{controls:!0,src:y.video_url,className:"example-video"})]},v))})};return j.jsxs("div",{className:"examples-container",children:[j.jsxs("div",{className:"selectors-container flex flex-col md:flex-row gap-4 mb-4",children:[j.jsxs("fieldset",{className:"fieldset",children:[j.jsx("legend",{className:"fieldset-legend",children:"Model"}),j.jsx("select",{className:"select select-bordered w-full",value:l||"",onChange:d=>u(d.target.value||null),children:Object.keys(t).map(d=>j.jsx("option",{value:d,children:d},d))})]}),l&&j.jsxs("fieldset",{className:"fieldset",children:[j.jsx("legend",{className:"fieldset-legend",children:"Attack"}),j.jsx("select",{className:"select select-bordered w-full",value:s||"",onChange:d=>f(d.target.value||null),children:Object.keys(t[l]).map(d=>j.jsx("option",{value:d,children:d},d))})]})]}),n&&j.jsx(cv,{}),a&&j.jsxs("p",{className:"error",children:["Error: ",a]}),l&&s&&j.jsx(c,{selectedModel:l,selectedAttack:s,examples:t,fileType:e})]})},KE=({datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})=>j.jsx("div",{className:"mb-4",children:j.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700",children:[j.jsx("legend",{className:"fieldset-legend font-semibold",children:"Dataset"}),j.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>j.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[j.jsx("input",{type:"radio",name:"dataset",className:"radio radio-sm",checked:t===n,onChange:()=>r(n)}),j.jsx("span",{className:"text-sm",children:n})]},n))})]})}),qE=({overallMetrics:e,selectedOverallMetrics:t,setSelectedOverallMetrics:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return j.jsx("div",{className:"w-full mb-4",children:j.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700",children:[j.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Metrics (",t.size,"/",e.length,")"]}),j.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>j.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[j.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),j.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},XE=({benchmarkData:e,selectedModels:t})=>{const[r,n]=R.useState([]),[i,a]=R.useState([]),[o,l]=R.useState(null),[u,s]=R.useState({}),[f,c]=R.useState({}),[d,p]=R.useState({}),[h,g]=R.useState(new Set),[w,y]=R.useState([]),[v,m]=R.useState(new Set);R.useEffect(()=>{if(e)try{const A=e,P=A.rows,T=A.groups,{Overall:I,...M}=T,N=new Set;I==null||I.forEach(z=>{if(z.includes("_")){const V=z.split("_").slice(1).join("_");N.add(V)}}),y(Array.from(N).sort()),m(new Set(Array.from(N)));const L=Object.entries(M).sort(([z],[V])=>z==="Overall"?-1:V==="Overall"?1:z.localeCompare(V)).reduce((z,[V,Z])=>{const fe=[...Z].sort();return z[V]=fe.reduce((se,Ie)=>{const[ke,K]=Ie.split("_");return se[ke]||(se[ke]=[]),se[ke].push(Ie),se},{}),z[V]=Object.fromEntries(Object.entries(z[V]).sort(([se],[Ie])=>se.localeCompare(Ie))),z},{}),C=Array.from(new Set(P.flatMap(z=>Object.keys(z)))).filter(z=>z!=="metric"),k={},F={};Object.keys(L).forEach(z=>{k[z]=!1,F[z]={},Object.keys(L[z]).forEach(V=>{F[z][V]=!1})});const H=Object.values(M).flat();g(new Set(H)),a(C),n(P),s(L),c(k),p(F),l(null)}catch(A){l("Failed to parse benchmark data, please try again: "+A.message)}},[e]);const S=A=>{c(P=>({...P,[A]:!P[A]}))},b=(A,P)=>{p(T=>{var I;return{...T,[A]:{...T[A]||{},[P]:!((I=T[A])!=null&&I[P])}}})},x=A=>r.filter(P=>{const T=P.metric;return T.includes("_")?T.split("_").slice(1).join("_").endsWith(A):!1}).map(P=>P.metric),O=()=>r.map(P=>P.metric).filter(P=>{for(const T of w)if(P.endsWith(`_${T}`)||P===T)return!1;return!0}),_=(A,P)=>{const T=A.map(B=>{const C=r.find(k=>k.metric===B);return C?Number(C[P]):NaN}).filter(B=>!isNaN(B));if(T.length===0)return{avg:NaN,stdDev:NaN};const I=T.reduce((B,C)=>B+C,0)/T.length,N=T.map(B=>{const C=B-I;return C*C}).reduce((B,C)=>B+C,0)/T.length,L=Math.sqrt(N);return{avg:I,stdDev:L}},E=(A,P=null,T=null)=>{var M;if(!P)return A;const I=Object.values(u[P]||{}).flat();return T&&((M=u[P])!=null&&M[T])?A.filter(N=>u[P][T].includes(N)&&h.has(N)):A.filter(N=>I.includes(N)&&h.has(N))};return j.jsxs("div",{className:"rounded shadow",children:[o&&j.jsx("div",{className:"text-red-500",children:o}),!o&&j.jsxs("div",{className:"flex flex-col gap-8",children:[j.jsx("div",{className:"flex flex-col gap-4",children:j.jsx(qE,{overallMetrics:w,selectedOverallMetrics:v,setSelectedOverallMetrics:m})}),t.size===0||h.size===0?j.jsx("div",{className:"text-center p-4 text-lg",children:"Please select at least one model and one metric to display the data"}):j.jsxs(j.Fragment,{children:[(()=>{const A=O();return A.length===0?null:j.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:j.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[j.jsx("thead",{children:j.jsxs("tr",{children:[j.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Metric"}),i.filter(P=>t.has(P)).map(P=>j.jsx("th",{className:"sticky top-0 bg-base-100 z-10 text-center text-xs border-gray-700 border",children:P},`standalone-${P}`))]})}),j.jsx("tbody",{children:A.sort().map(P=>{const T=r.find(I=>I.metric===P);return T?j.jsxs("tr",{className:"hover:bg-base-100",children:[j.jsx("td",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border",children:P}),i.filter(I=>t.has(I)).map(I=>{const M=T[I];return j.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(M))?M:Number(Number(M).toFixed(3))},`standalone-${P}-${I}`)})]},`standalone-${P}`):null})})]})})})(),j.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:j.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[j.jsxs("thead",{children:[j.jsxs("tr",{children:[j.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Attack Category Metrics"}),w.filter(A=>v.has(A)).map(A=>j.jsx("th",{colSpan:i.filter(P=>t.has(P)).length,className:"sticky top-0 bg-base-100 z-10 text-center border-x border-gray-300 border border-gray-700 border",children:A},A))]}),j.jsxs("tr",{children:[j.jsx("th",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border"}),w.filter(A=>v.has(A)).map(A=>j.jsx($.Fragment,{children:i.filter(P=>t.has(P)).map(P=>j.jsx("th",{className:"sticky top-12 bg-base-100 z-10 text-center text-xs border-gray-700 border border-bottom-solid border-b-gray-700 border-b-2",children:P},`${A}-${P}`))},`header-models-${A}`))]})]}),j.jsx("tbody",{children:Object.entries(u).map(([A,P])=>{if(A==="Overall")return null;const T=Object.values(P).flat(),I=E(T,A);return I.length===0?null:j.jsxs($.Fragment,{children:[j.jsxs("tr",{className:"bg-base-200 cursor-pointer hover:bg-base-300",onClick:()=>S(A),children:[j.jsxs("td",{className:"sticky left-0 bg-base-200 z-10 font-medium border-gray-700 border",children:[f[A]?"▼ ":"▶ ",A]}),w.filter(M=>v.has(M)).map(M=>j.jsx($.Fragment,{children:i.filter(N=>t.has(N)).map(N=>{const L=x(M),B=I.filter(k=>L.includes(k)),C=_(B,N);return j.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(C.avg)?"N/A":`${C.avg.toFixed(3)} ± ${C.stdDev.toFixed(3)}`},`${A}-${M}-${N}`)})},`${A}-${M}`))]}),f[A]&&Object.entries(P).map(([M,N])=>{var B,C;const L=E(N,A,M);return L.length===0?null:j.jsxs($.Fragment,{children:[j.jsxs("tr",{className:"bg-base-100 cursor-pointer hover:bg-base-200",onClick:()=>b(A,M),children:[j.jsxs("td",{className:"sticky left-0 bg-base-100 z-10 pl-6 font-medium border-gray-700 border",children:[(B=d[A])!=null&&B[M]?"▼ ":"▶ ",M]}),w.filter(k=>v.has(k)).map(k=>j.jsx($.Fragment,{children:i.filter(F=>t.has(F)).map(F=>{const H=x(k),z=L.filter(Z=>H.includes(Z)),V=_(z,F);return j.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(V.avg)?"N/A":`${V.avg.toFixed(3)} ± ${V.stdDev.toFixed(3)}`},`${A}-${M}-${k}-${F}`)})},`${A}-${M}-${k}`))]}),((C=d[A])==null?void 0:C[M])&&[...L].sort((k,F)=>{const H=re=>{for(const Q of w)if(re.endsWith(`_${Q}`)||re===Q)return Q;return""},z=H(k),V=H(F),Z=(re,Q)=>{if(re.endsWith(`_${Q}`)){const de=re.slice(0,re.length-Q.length-1).split("_");return de.length>0?de[de.length-1]:""}return re},fe=(re,Q)=>{if(re.endsWith(`_${Q}`)){const de=re.slice(0,re.length-Q.length-1).split("_");return de.length>1?de.slice(0,de.length-1).join("_"):""}return re},se=fe(k,z),Ie=fe(F,V);if(se!==Ie)return se.localeCompare(Ie);if(z!==V)return z.localeCompare(V);const ke=Z(k,z),K=Z(F,V),J=re=>{const Q=re.match(/^(\d+(?:\.\d+)?)([kKmMbB]?)$/);if(!Q)return NaN;let[Te,de,et]=Q,xt=parseFloat(de);switch(et.toLowerCase()){case"k":xt*=1e3;break;case"m":xt*=1e6;break;case"b":xt*=1e9;break}return xt},ee=J(ke),W=J(K);return!isNaN(ee)&&!isNaN(W)?ee-W:ke.localeCompare(K)}).map(k=>{const F=r.find(H=>H.metric===k);return F?(k.includes("_")&&k.split("_").slice(1).join("_"),j.jsxs("tr",{className:"hover:bg-base-100",children:[j.jsx("td",{className:"sticky left-0 bg-base-100 z-10 pl-10 border-gray-700 border",children:k}),w.filter(H=>v.has(H)).map(H=>x(H).includes(k)?j.jsx($.Fragment,{children:i.filter(V=>t.has(V)).map(V=>{const Z=F[V];return j.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(Z))?Z:Number(Number(Z).toFixed(3))},`${k}-${H}-${V}`)})},`${k}-${H}`):j.jsx($.Fragment,{children:i.filter(V=>t.has(V)).map(V=>j.jsx("td",{className:"text-center border-gray-700 border"},`${k}-${H}-${V}`))},`${k}-${H}`))]},k)):null})]},`${A}-${M}`)})]},A)})})]})})]})]})]})};function Lx(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-1}var qT=KT,XT=rc;function YT(e,t){var r=this.__data__,n=XT(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var QT=YT,ZT=NT,JT=WT,eC=VT,tC=qT,rC=QT;function pa(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},jn=function(t){return Vn(t)&&t.indexOf("%")===t.length-1},G=function(t){return Sj(t)&&!pl(t)},We=function(t){return G(t)||Vn(t)},Aj=0,hl=function(t){var r=++Aj;return"".concat(t||"").concat(r)},Gn=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(!G(t)&&!Vn(t))return n;var a;if(jn(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return pl(a)&&(a=n),i&&a>r&&(a=r),a},Xr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Ej=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 Nj(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 Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}var Fm={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"},$r=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Wm=null,Of=null,Sv=function e(t){if(t===Wm&&Array.isArray(Of))return Of;var r=[];return R.Children.forEach(t,function(n){ie(n)||(mj.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Of=r,Wm=t,r};function Wt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return $r(i)}):n=[$r(t)],Sv(e).forEach(function(i){var a=Ft(i,"type.displayName")||Ft(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Pt(e,t){var r=Wt(e,t);return r&&r[0]}var Um=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!G(n)||n<=0||!G(i)||i<=0)},Ij=["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"],Dj=function(t){return t&&t.type&&Vn(t.type)&&Ij.indexOf(t.type)>=0},Lj=function(t){return t&&Gd(t)==="object"&&"clipDot"in t},Rj=function(t,r,n,i){var a,o=(a=Sf==null?void 0:Sf[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!te(t)&&(i&&o.includes(r)||Cj.includes(r))||n&&xv.includes(r)},ae=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!fa(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;Rj((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},Kd=function e(t,r){if(t===r)return!0;var n=R.Children.count(t);if(n!==R.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Hm(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 Uj(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 Xd(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,s=Wj(e,Fj),f=i||{width:r,height:n,x:0,y:0},c=le("recharts-surface",a);return $.createElement("svg",qd({},ae(s,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),$.createElement("title",null,l),$.createElement("desc",null,u),t)}var Hj=["children","className"];function Yd(){return Yd=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 Gj(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 Ne=$.forwardRef(function(e,t){var r=e.children,n=e.className,i=Vj(e,Hj),a=le("recharts-layer",n);return $.createElement("g",Yd({className:a},ae(i,!0),{ref:t}),r)}),Tr=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:Xj(e,t,r)}var Qj=Yj,Zj="\\ud800-\\udfff",Jj="\\u0300-\\u036f",ek="\\ufe20-\\ufe2f",tk="\\u20d0-\\u20ff",rk=Jj+ek+tk,nk="\\ufe0e\\ufe0f",ik="\\u200d",ak=RegExp("["+ik+Zj+rk+nk+"]");function ok(e){return ak.test(e)}var Yx=ok;function lk(e){return e.split("")}var uk=lk,Qx="\\ud800-\\udfff",sk="\\u0300-\\u036f",ck="\\ufe20-\\ufe2f",fk="\\u20d0-\\u20ff",dk=sk+ck+fk,pk="\\ufe0e\\ufe0f",hk="["+Qx+"]",Qd="["+dk+"]",Zd="\\ud83c[\\udffb-\\udfff]",vk="(?:"+Qd+"|"+Zd+")",Zx="[^"+Qx+"]",Jx="(?:\\ud83c[\\udde6-\\uddff]){2}",eS="[\\ud800-\\udbff][\\udc00-\\udfff]",yk="\\u200d",tS=vk+"?",rS="["+pk+"]?",mk="(?:"+yk+"(?:"+[Zx,Jx,eS].join("|")+")"+rS+tS+")*",gk=rS+tS+mk,bk="(?:"+[Zx+Qd+"?",Qd,Jx,eS,hk].join("|")+")",wk=RegExp(Zd+"(?="+Zd+")|"+bk+gk,"g");function xk(e){return e.match(wk)||[]}var Sk=xk,Ok=uk,_k=Yx,Pk=Sk;function Ak(e){return _k(e)?Pk(e):Ok(e)}var Ek=Ak,$k=Qj,Tk=Yx,Ck=Ek,jk=Hx;function kk(e){return function(t){t=jk(t);var r=Tk(t)?Ck(t):void 0,n=r?r[0]:t.charAt(0),i=r?$k(r,1).join(""):t.slice(1);return n[e]()+i}}var Mk=kk,Nk=Mk,Ik=Nk("toUpperCase"),Dk=Ik;const yc=me(Dk);function ge(e){return function(){return e}}const nS=Math.cos,Wu=Math.sin,lr=Math.sqrt,Uu=Math.PI,mc=2*Uu,Jd=Math.PI,ep=2*Jd,Pn=1e-6,Lk=ep-Pn;function iS(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return iS;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iPn)if(!(Math.abs(c*u-s*f)>Pn)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,h=i-l,g=u*u+s*s,w=p*p+h*h,y=Math.sqrt(g),v=Math.sqrt(d),m=a*Math.tan((Jd-Math.acos((g+d-w)/(2*y*v)))/2),S=m/v,b=m/y;Math.abs(S-1)>Pn&&this._append`L${t+S*f},${r+S*c}`,this._append`A${a},${a},0,0,${+(c*p>f*h)},${this._x1=t+b*u},${this._y1=r+b*s}`}}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 l=n*Math.cos(i),u=n*Math.sin(i),s=t+l,f=r+u,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Pn||Math.abs(this._y1-f)>Pn)&&this._append`L${s},${f}`,n&&(d<0&&(d=d%ep+ep),d>Lk?this._append`A${n},${n},0,1,${c},${t-l},${r-u}A${n},${n},0,1,${c},${this._x1=s},${this._y1=f}`:d>Pn&&this._append`A${n},${n},0,${+(d>=Jd)},${c},${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 Ov(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 Bk(t)}function _v(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function aS(e){this._context=e}aS.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 gc(e){return new aS(e)}function oS(e){return e[0]}function lS(e){return e[1]}function uS(e,t){var r=ge(!0),n=null,i=gc,a=null,o=Ov(l);e=typeof e=="function"?e:e===void 0?oS:ge(e),t=typeof t=="function"?t:t===void 0?lS:ge(t);function l(u){var s,f=(u=_v(u)).length,c,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=f;++s)!(s=p;--h)l.point(m[h],S[h]);l.lineEnd(),l.areaEnd()}y&&(m[d]=+e(w,d,c),S[d]=+t(w,d,c),l.point(n?+n(w,d,c):m[d],r?+r(w,d,c):S[d]))}if(v)return l=null,v+""||null}function f(){return uS().defined(i).curve(o).context(a)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ge(+c),n=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:ge(+c),s):e},s.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:ge(+c),s):n},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ge(+c),r=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:ge(+c),s):t},s.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ge(+c),s):r},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(r)},s.lineX1=function(){return f().x(n).y(t)},s.defined=function(c){return arguments.length?(i=typeof c=="function"?c:ge(!!c),s):i},s.curve=function(c){return arguments.length?(o=c,a!=null&&(l=o(a)),s):o},s.context=function(c){return arguments.length?(c==null?a=l=null:l=o(a=c),s):a},s}class sS{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 zk(e){return new sS(e,!0)}function Fk(e){return new sS(e,!1)}const Pv={draw(e,t){const r=lr(t/Uu);e.moveTo(r,0),e.arc(0,0,r,0,mc)}},Wk={draw(e,t){const r=lr(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()}},cS=lr(1/3),Uk=cS*2,Hk={draw(e,t){const r=lr(t/Uk),n=r*cS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Vk={draw(e,t){const r=lr(t),n=-r/2;e.rect(n,n,r,r)}},Gk=.8908130915292852,fS=Wu(Uu/10)/Wu(7*Uu/10),Kk=Wu(mc/10)*fS,qk=-nS(mc/10)*fS,Xk={draw(e,t){const r=lr(t*Gk),n=Kk*r,i=qk*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=mc*a/5,l=nS(o),u=Wu(o);e.lineTo(u*r,-l*r),e.lineTo(l*n-u*i,u*n+l*i)}e.closePath()}},_f=lr(3),Yk={draw(e,t){const r=-lr(t/(_f*3));e.moveTo(0,r*2),e.lineTo(-_f*r,-r),e.lineTo(_f*r,-r),e.closePath()}},Mt=-.5,Nt=lr(3)/2,tp=1/lr(12),Qk=(tp/2+1)*3,Zk={draw(e,t){const r=lr(t/Qk),n=r/2,i=r*tp,a=n,o=r*tp+r,l=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(Mt*n-Nt*i,Nt*n+Mt*i),e.lineTo(Mt*a-Nt*o,Nt*a+Mt*o),e.lineTo(Mt*l-Nt*u,Nt*l+Mt*u),e.lineTo(Mt*n+Nt*i,Mt*i-Nt*n),e.lineTo(Mt*a+Nt*o,Mt*o-Nt*a),e.lineTo(Mt*l+Nt*u,Mt*u-Nt*l),e.closePath()}};function Jk(e,t){let r=null,n=Ov(i);e=typeof e=="function"?e:ge(e||Pv),t=typeof t=="function"?t:ge(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:ge(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:ge(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Hu(){}function Vu(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 dS(e){this._context=e}dS.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:Vu(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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eM(e){return new dS(e)}function pS(e){this._context=e}pS.prototype={areaStart:Hu,areaEnd:Hu,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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function tM(e){return new pS(e)}function hS(e){this._context=e}hS.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:Vu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rM(e){return new hS(e)}function vS(e){this._context=e}vS.prototype={areaStart:Hu,areaEnd:Hu,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 nM(e){return new vS(e)}function Gm(e){return e<0?-1:1}function Km(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),l=(a*i+o*n)/(n+i);return(Gm(a)+Gm(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function qm(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Pf(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function Gu(e){this._context=e}Gu.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:Pf(this,this._t0,qm(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,Pf(this,qm(this,r=Km(this,e,t)),r);break;default:Pf(this,this._t0,r=Km(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function yS(e){this._context=new mS(e)}(yS.prototype=Object.create(Gu.prototype)).point=function(e,t){Gu.prototype.point.call(this,t,e)};function mS(e){this._context=e}mS.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 iM(e){return new Gu(e)}function aM(e){return new yS(e)}function gS(e){this._context=e}gS.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=Xm(e),i=Xm(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 lM(e){return new bc(e,.5)}function uM(e){return new bc(e,0)}function sM(e){return new bc(e,1)}function Bi(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r=0;)r[t]=t;return r}function cM(e,t){return e[t]}function fM(e){const t=[];return t.key=e,t}function dM(){var e=ge([]),t=rp,r=Bi,n=cM;function i(a){var o=Array.from(e.apply(this,arguments),fM),l,u=o.length,s=-1,f;for(const c of a)for(l=0,++s;l0){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 xM(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 bS={symbolCircle:Pv,symbolCross:Wk,symbolDiamond:Hk,symbolSquare:Vk,symbolStar:Xk,symbolTriangle:Yk,symbolWye:Zk},SM=Math.PI/180,OM=function(t){var r="symbol".concat(yc(t));return bS[r]||Pv},_M=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*SM;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}},PM=function(t,r){bS["symbol".concat(yc(t))]=r},Av=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=wM(t,yM),s=Qm(Qm({},u),{},{type:n,size:a,sizeType:l}),f=function(){var w=OM(n),y=Jk().type(w).size(_M(a,l,n));return y()},c=s.className,d=s.cx,p=s.cy,h=ae(s,!0);return d===+d&&p===+p&&a===+a?$.createElement("path",np({},h,{className:le("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};Av.registerSymbol=PM;function zi(e){"@babel/helpers - typeof";return zi=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},zi(e)}function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=p.inactive?s:p.color;return $.createElement("li",ip({className:w,style:c,key:"legend-item-".concat(h)},Fu(n.props,p,h)),$.createElement(Xd,{width:o,height:o,viewBox:f,style:d},n.renderIcon(p)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},g?g(y,p,h):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 l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(R.PureComponent);Ao(Ev,"displayName","Legend");Ao(Ev,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var IM=nc;function DM(){this.__data__=new IM,this.size=0}var LM=DM;function RM(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var BM=RM;function zM(e){return this.__data__.get(e)}var FM=zM;function WM(e){return this.__data__.has(e)}var UM=WM,HM=nc,VM=hv,GM=vv,KM=200;function qM(e,t){var r=this.__data__;if(r instanceof HM){var n=r.__data__;if(!VM||n.lengthl))return!1;var s=a.get(e),f=a.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,p=r&y2?new d2:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=wN}var jv=xN,SN=zr,ON=jv,_N=Fr,PN="[object Arguments]",AN="[object Array]",EN="[object Boolean]",$N="[object Date]",TN="[object Error]",CN="[object Function]",jN="[object Map]",kN="[object Number]",MN="[object Object]",NN="[object RegExp]",IN="[object Set]",DN="[object String]",LN="[object WeakMap]",RN="[object ArrayBuffer]",BN="[object DataView]",zN="[object Float32Array]",FN="[object Float64Array]",WN="[object Int8Array]",UN="[object Int16Array]",HN="[object Int32Array]",VN="[object Uint8Array]",GN="[object Uint8ClampedArray]",KN="[object Uint16Array]",qN="[object Uint32Array]",xe={};xe[zN]=xe[FN]=xe[WN]=xe[UN]=xe[HN]=xe[VN]=xe[GN]=xe[KN]=xe[qN]=!0;xe[PN]=xe[AN]=xe[RN]=xe[EN]=xe[BN]=xe[$N]=xe[TN]=xe[CN]=xe[jN]=xe[kN]=xe[MN]=xe[NN]=xe[IN]=xe[DN]=xe[LN]=!1;function XN(e){return _N(e)&&ON(e.length)&&!!xe[SN(e)]}var YN=XN;function QN(e){return function(t){return e(t)}}var CS=QN,Yu={exports:{}};Yu.exports;(function(e,t){var r=Rx,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(Yu,Yu.exports);var ZN=Yu.exports,JN=YN,eI=CS,ig=ZN,ag=ig&&ig.isTypedArray,tI=ag?eI(ag):JN,jS=tI,rI=aN,nI=Tv,iI=wt,aI=TS,oI=Cv,lI=jS,uI=Object.prototype,sI=uI.hasOwnProperty;function cI(e,t){var r=iI(e),n=!r&&nI(e),i=!r&&!n&&aI(e),a=!r&&!n&&!i&&lI(e),o=r||n||i||a,l=o?rI(e.length,String):[],u=l.length;for(var s in e)(t||sI.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||oI(s,u)))&&l.push(s);return l}var fI=cI,dI=Object.prototype;function pI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dI;return e===r}var hI=pI;function vI(e,t){return function(r){return e(t(r))}}var kS=vI,yI=kS,mI=yI(Object.keys,Object),gI=mI,bI=hI,wI=gI,xI=Object.prototype,SI=xI.hasOwnProperty;function OI(e){if(!bI(e))return wI(e);var t=[];for(var r in Object(e))SI.call(e,r)&&r!="constructor"&&t.push(r);return t}var _I=OI,PI=dv,AI=jv;function EI(e){return e!=null&&AI(e.length)&&!PI(e)}var vl=EI,$I=fI,TI=_I,CI=vl;function jI(e){return CI(e)?$I(e):TI(e)}var wc=jI,kI=K2,MI=nN,NI=wc;function II(e){return kI(e,NI,MI)}var DI=II,og=DI,LI=1,RI=Object.prototype,BI=RI.hasOwnProperty;function zI(e,t,r,n,i,a){var o=r&LI,l=og(e),u=l.length,s=og(t),f=s.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=l[c];if(!(o?d in t:BI.call(t,d)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var g=!0;a.set(e,t),a.set(t,e);for(var w=o;++c-1}var RL=LL;function BL(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=eR){var s=t?null:ZL(e);if(s)return JL(s);o=!1,i=QL,u=new qL}else u=t?[]:l;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yR(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 mR(e){return e.value}function gR(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var r=vR(t,lR);return $.createElement(Ev,r)}var Sg=1,Ln=function(e){function t(){var r;uR(this,t);for(var n=arguments.length,i=new Array(n),a=0;aSg||Math.abs(i.height-this.lastBoundingBox.height)>Sg)&&(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?br({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,s=i.chartWidth,f=i.chartHeight,c,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();c={left:((s||0)-p.width)/2}}else c=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var h=this.getBBoxSnapshot();d={top:((f||0)-h.height)/2}}else d=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return br(br({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,s=i.payloadUniqBy,f=i.payload,c=br(br({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return $.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},gR(a,br(br({},this.props),{},{payload:BS(f,s,mR)})))}}],[{key:"getWithHeight",value:function(n,i){var a=br(br({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&G(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(R.PureComponent);xc(Ln,"displayName","Legend");xc(Ln,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Og=dl,bR=Tv,wR=wt,_g=Og?Og.isConcatSpreadable:void 0;function xR(e){return wR(e)||bR(e)||!!(_g&&e&&e[_g])}var SR=xR,OR=ES,_R=SR;function WS(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=_R),i||(i=[]);++a0&&r(l)?t>1?WS(l,t-1,r,n,i):OR(i,l):n||(i[i.length]=l)}return i}var US=WS;function PR(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var AR=PR,ER=AR,$R=ER(),TR=$R,CR=TR,jR=wc;function kR(e,t){return e&&CR(e,t,jR)}var HS=kR,MR=vl;function NR(e,t){return function(r,n){if(r==null)return r;if(!MR(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&u&&!l&&!s||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!s&&e=l)return u;var s=r[n];return u*(s=="desc"?-1:1)}}return e.index-t.index}var qR=KR,Tf=mv,XR=gv,YR=yn,QR=VS,ZR=UR,JR=CS,e3=qR,t3=ma,r3=wt;function n3(e,t,r){t.length?t=Tf(t,function(a){return r3(a)?function(o){return XR(o,a.length===1?a[0]:a)}:a}):t=[t3];var n=-1;t=Tf(t,JR(YR));var i=QR(e,function(a,o,l){var u=Tf(t,function(s){return s(a)});return{criteria:u,index:++n,value:a}});return ZR(i,function(a,o){return e3(a,o,r)})}var i3=n3;function a3(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 o3=a3,l3=o3,Ag=Math.max;function u3(e,t,r){return t=Ag(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Ag(n.length-t,0),o=Array(a);++i0){if(++t>=g3)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var S3=x3,O3=m3,_3=S3,P3=_3(O3),A3=P3,E3=ma,$3=s3,T3=A3;function C3(e,t){return T3($3(e,t,E3),e+"")}var j3=C3,k3=pv,M3=vl,N3=Cv,I3=vn;function D3(e,t,r){if(!I3(r))return!1;var n=typeof t;return(n=="number"?M3(r)&&N3(t,r.length):n=="string"&&t in r)?k3(r[t],e):!1}var Sc=D3,L3=US,R3=i3,B3=j3,$g=Sc,z3=B3(function(e,t){if(e==null)return[];var r=t.length;return r>1&&$g(e,t[0],t[1])?t=[]:r>2&&$g(t[0],t[1],t[2])&&(t=[t[0]]),R3(e,L3(t,1),[])}),F3=z3;const Nv=me(F3);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 dp(){return dp=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(ka,"-left"),G(r)&&t&&G(t.x)&&r=t.y),"".concat(ka,"-top"),G(n)&&t&&G(t.y)&&ng?Math.max(f,u[n]):Math.max(c,u[n])}function rB(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 nB(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,s,f,c;return o.height>0&&o.width>0&&r?(f=jg({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),c=jg({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),s=rB({translateX:f,translateY:c,useTranslate3d:l})):s=eB,{cssProperties:s,cssClasses:tB({translateX:f,translateY:c,coordinate:r})}}function Wi(e){"@babel/helpers - typeof";return Wi=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},Wi(e)}function kg(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 Mg(e){for(var t=1;tNg||Math.abs(n.height-this.state.lastBoundingBox.height)>Ng)&&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,l=i.animationDuration,u=i.animationEasing,s=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,p=i.offset,h=i.position,g=i.reverseDirection,w=i.useTranslate3d,y=i.viewBox,v=i.wrapperStyle,m=nB({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:h,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:y}),S=m.cssClasses,b=m.cssProperties,x=Mg(Mg({transition:d&&a?"transform ".concat(l,"ms ").concat(u):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},v);return $.createElement("div",{tabIndex:-1,className:S,style:x,ref:function(_){n.wrapperNode=_}},s)}}])}(R.PureComponent),pB=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ga={isSsr:pB()};function Ui(e){"@babel/helpers - typeof";return Ui=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},Ui(e)}function Ig(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 Dg(e){for(var t=1;t0;return $.createElement(dB,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:x,offset:p,position:w,reverseDirection:y,useTranslate3d:v,viewBox:m,wrapperStyle:S},OB(s,Dg(Dg({},this.props),{},{payload:b})))}}])}(R.PureComponent);Iv(cr,"displayName","Tooltip");Iv(cr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ga.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 _B=gr,PB=function(){return _B.Date.now()},AB=PB,EB=/\s/;function $B(e){for(var t=e.length;t--&&EB.test(e.charAt(t)););return t}var TB=$B,CB=TB,jB=/^\s+/;function kB(e){return e&&e.slice(0,CB(e)+1).replace(jB,"")}var MB=kB,NB=MB,Lg=vn,IB=ca,Rg=NaN,DB=/^[-+]0x[0-9a-f]+$/i,LB=/^0b[01]+$/i,RB=/^0o[0-7]+$/i,BB=parseInt;function zB(e){if(typeof e=="number")return e;if(IB(e))return Rg;if(Lg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Lg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=NB(e);var r=LB.test(e);return r||RB.test(e)?BB(e.slice(2),r?2:8):DB.test(e)?Rg:+e}var QS=zB,FB=vn,jf=AB,Bg=QS,WB="Expected a function",UB=Math.max,HB=Math.min;function VB(e,t,r){var n,i,a,o,l,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(WB);t=Bg(t)||0,FB(r)&&(f=!!r.leading,c="maxWait"in r,a=c?UB(Bg(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(x){var O=n,_=i;return n=i=void 0,s=x,o=e.apply(_,O),o}function h(x){return s=x,l=setTimeout(y,t),f?p(x):o}function g(x){var O=x-u,_=x-s,E=t-O;return c?HB(E,a-_):E}function w(x){var O=x-u,_=x-s;return u===void 0||O>=t||O<0||c&&_>=a}function y(){var x=jf();if(w(x))return v(x);l=setTimeout(y,g(x))}function v(x){return l=void 0,d&&n?p(x):(n=i=void 0,o)}function m(){l!==void 0&&clearTimeout(l),s=0,n=u=i=l=void 0}function S(){return l===void 0?o:v(jf())}function b(){var x=jf(),O=w(x);if(n=arguments,i=this,u=x,O){if(l===void 0)return h(u);if(c)return clearTimeout(l),l=setTimeout(y,t),p(u)}return l===void 0&&(l=setTimeout(y,t)),o}return b.cancel=m,b.flush=S,b}var GB=VB,KB=GB,qB=vn,XB="Expected a function";function YB(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(XB);return qB(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),KB(e,t,{leading:n,maxWait:t,trailing:i})}var QB=YB;const ZS=me(QB);function To(e){"@babel/helpers - typeof";return To=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},To(e)}function zg(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 Gl(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(I=ZS(I,g,{trailing:!0,leading:!1}));var M=new ResizeObserver(I),N=b.current.getBoundingClientRect(),L=N.width,B=N.height;return P(L,B),M.observe(b.current),function(){M.disconnect()}},[P,g]);var T=R.useMemo(function(){var I=E.containerWidth,M=E.containerHeight;if(I<0||M<0)return null;Tr(jn(o)||jn(u),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,u),Tr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var N=jn(o)?I:o,L=jn(u)?M:u;r&&r>0&&(N?L=N/r:L&&(N=L*r),d&&L>d&&(L=d)),Tr(N>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.`,N,L,o,u,f,c,r);var B=!Array.isArray(p)&&$r(p.type).endsWith("Chart");return $.Children.map(p,function(C){return $.isValidElement(C)?R.cloneElement(C,Gl({width:N,height:L},B?{style:Gl({height:"100%",width:"100%",maxHeight:L,maxWidth:N},C.props.style)}:{})):C})},[r,p,u,d,c,f,E,o]);return $.createElement("div",{id:w?"".concat(w):void 0,className:le("recharts-responsive-container",y),style:Gl(Gl({},S),{},{width:o,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:b},T)}),JS=function(t){return null};JS.displayName="Cell";function Co(e){"@babel/helpers - typeof";return Co=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},Co(e)}function Wg(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 yp(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ga.isSsr)return{width:0,height:0};var n=dz(r),i=JSON.stringify({text:t,copyStyle:n});if(ii.widthCache[i])return ii.widthCache[i];try{var a=document.getElementById(Ug);a||(a=document.createElement("span"),a.setAttribute("id",Ug),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=yp(yp({},fz),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return ii.widthCache[i]=u,++ii.cacheCount>cz&&(ii.cacheCount=0,ii.widthCache={}),u}catch{return{width:0,height:0}}},pz=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function jo(e){"@babel/helpers - typeof";return jo=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},jo(e)}function es(e,t){return mz(e)||yz(e,t)||vz(e,t)||hz()}function hz(){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 vz(e,t){if(e){if(typeof e=="string")return Hg(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 Hg(e,t)}}function Hg(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 jz(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 Yg(e,t){return Iz(e)||Nz(e,t)||Mz(e,t)||kz()}function kz(){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 Mz(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 Qg(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 N.reduce(function(L,B){var C=B.word,k=B.width,F=L[L.length-1];if(F&&(i==null||a||F.width+k+nB.width?L:B})};if(!f)return p;for(var g="…",w=function(N){var L=c.slice(0,N),B=nO({breakAll:s,style:u,children:L+g}).wordsWithComputedWidth,C=d(B),k=C.length>o||h(C).width>Number(i);return[k,C]},y=0,v=c.length-1,m=0,S;y<=v&&m<=c.length-1;){var b=Math.floor((y+v)/2),x=b-1,O=w(x),_=Yg(O,2),E=_[0],A=_[1],P=w(b),T=Yg(P,1),I=T[0];if(!E&&!I&&(y=b+1),E&&I&&(v=b-1),!E&&I){S=A;break}m++}return S||p},Zg=function(t){var r=ie(t)?[]:t.toString().split(rO);return[{words:r}]},Lz=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!ga.isSsr){var u,s,f=nO({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return Zg(i);return Dz({breakAll:o,children:i,maxLines:l,style:a},u,s,r,n)}return Zg(i)},Jg="#808080",ts=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,h=t.verticalAnchor,g=h===void 0?"end":h,w=t.fill,y=w===void 0?Jg:w,v=Xg(t,Tz),m=R.useMemo(function(){return Lz({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:c,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,c,v.style,v.width]),S=v.dx,b=v.dy,x=v.angle,O=v.className,_=v.breakAll,E=Xg(v,Cz);if(!We(n)||!We(a))return null;var A=n+(G(S)?S:0),P=a+(G(b)?b:0),T;switch(g){case"start":T=kf("calc(".concat(s,")"));break;case"middle":T=kf("calc(".concat((m.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:T=kf("calc(".concat(m.length-1," * -").concat(l,")"));break}var I=[];if(c){var M=m[0].width,N=v.width;I.push("scale(".concat((G(N)?N/M:1)/M,")"))}return x&&I.push("rotate(".concat(x,", ").concat(A,", ").concat(P,")")),I.length&&(E.transform=I.join(" ")),$.createElement("text",mp({},ae(E,!0),{x:A,y:P,className:le("recharts-text",O),textAnchor:p,fill:y.includes("url")?Jg:y}),m.map(function(L,B){var C=L.words.join(_?"":" ");return $.createElement("tspan",{x:A,dy:B===0?T:l,key:"".concat(C,"-").concat(B)},C)}))};function un(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Rz(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Dv(e){let t,r,n;e.length!==2?(t=un,r=(l,u)=>un(e(l),u),n=(l,u)=>e(l)-u):(t=e===un||e===Rz?e:Bz,r=e,n=e);function i(l,u,s=0,f=l.length){if(s>>1;r(l[c],u)<0?s=c+1:f=c}while(s>>1;r(l[c],u)<=0?s=c+1:f=c}while(ss&&n(l[c-1],u)>-n(l[c],u)?c-1:c}return{left:i,center:o,right:a}}function Bz(){return 0}function iO(e){return e===null?NaN:+e}function*zz(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Fz=Dv(un),yl=Fz.right;Dv(iO).center;class e0 extends Map{constructor(t,r=Hz){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(t0(this,t))}has(t){return super.has(t0(this,t))}set(t,r){return super.set(Wz(this,t),r)}delete(t){return super.delete(Uz(this,t))}}function t0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Wz({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Uz({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Hz(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vz(e=un){if(e===un)return aO;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 aO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Gz=Math.sqrt(50),Kz=Math.sqrt(10),qz=Math.sqrt(2);function rs(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>=Gz?10:a>=Kz?5:a>=qz?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(e*s),u=Math.round(t*s),l/st&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(e/s),u=Math.round(t/s),l*st&&--u),u0))return[];if(e===t)return[e];const n=t=i))return[];const l=a-i+1,u=new Array(l);if(n)if(o<0)for(let s=0;s=n)&&(r=n);return r}function n0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function oO(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?aO:Vz(i);n>r;){if(n-r>600){const u=n-r+1,s=t-r+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),p=Math.max(r,Math.floor(t-s*c/u+d)),h=Math.min(n,Math.floor(t+(u-s)*c/u+d));oO(e,t,p,h,i)}const a=e[t];let o=r,l=n;for(Ma(e,r,t),i(e[n],a)>0&&Ma(e,r,n);o0;)--l}i(e[r],a)===0?Ma(e,r,l):(++l,Ma(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Ma(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Xz(e,t,r){if(e=Float64Array.from(zz(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return n0(e);if(t>=1)return r0(e);var n,i=(n-1)*t,a=Math.floor(i),o=r0(oO(e,a).subarray(0,a+1)),l=n0(e.subarray(a+1));return o+(l-o)*(i-a)}}function Yz(e,t,r=iO){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),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function Qz(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?ql(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ql(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=Jz.exec(e))?new yt(t[1],t[2],t[3],1):(t=e4.exec(e))?new yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=t4.exec(e))?ql(t[1],t[2],t[3],t[4]):(t=r4.exec(e))?ql(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=n4.exec(e))?c0(t[1],t[2]/100,t[3]/100,1):(t=i4.exec(e))?c0(t[1],t[2]/100,t[3]/100,t[4]):i0.hasOwnProperty(e)?l0(i0[e]):e==="transparent"?new yt(NaN,NaN,NaN,0):null}function l0(e){return new yt(e>>16&255,e>>8&255,e&255,1)}function ql(e,t,r,n){return n<=0&&(e=t=r=NaN),new yt(e,t,r,n)}function l4(e){return e instanceof ml||(e=Io(e)),e?(e=e.rgb(),new yt(e.r,e.g,e.b,e.opacity)):new yt}function Sp(e,t,r,n){return arguments.length===1?l4(e):new yt(e,t,r,n??1)}function yt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Rv(yt,Sp,uO(ml,{brighter(e){return e=e==null?ns:Math.pow(ns,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mo:Math.pow(Mo,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(Rn(this.r),Rn(this.g),Rn(this.b),is(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:u0,formatHex:u0,formatHex8:u4,formatRgb:s0,toString:s0}));function u0(){return`#${kn(this.r)}${kn(this.g)}${kn(this.b)}`}function u4(){return`#${kn(this.r)}${kn(this.g)}${kn(this.b)}${kn((isNaN(this.opacity)?1:this.opacity)*255)}`}function s0(){const e=is(this.opacity);return`${e===1?"rgb(":"rgba("}${Rn(this.r)}, ${Rn(this.g)}, ${Rn(this.b)}${e===1?")":`, ${e})`}`}function is(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kn(e){return e=Rn(e),(e<16?"0":"")+e.toString(16)}function c0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,r,n)}function sO(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof ml||(e=Io(e)),!e)return new rr;if(e instanceof rr)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,l=a-i,u=(a+i)/2;return l?(t===a?o=(r-n)/l+(r0&&u<1?0:o,new rr(o,l,u,e.opacity)}function s4(e,t,r,n){return arguments.length===1?sO(e):new rr(e,t,r,n??1)}function rr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Rv(rr,s4,uO(ml,{brighter(e){return e=e==null?ns:Math.pow(ns,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mo:Math.pow(Mo,e),new rr(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 yt(Mf(e>=240?e-240:e+120,i,n),Mf(e,i,n),Mf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new rr(f0(this.h),Xl(this.s),Xl(this.l),is(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=is(this.opacity);return`${e===1?"hsl(":"hsla("}${f0(this.h)}, ${Xl(this.s)*100}%, ${Xl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function f0(e){return e=(e||0)%360,e<0?e+360:e}function Xl(e){return Math.max(0,Math.min(1,e||0))}function Mf(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 Bv=e=>()=>e;function c4(e,t){return function(r){return e+r*t}}function f4(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 d4(e){return(e=+e)==1?cO:function(t,r){return r-t?f4(t,r,e):Bv(isNaN(t)?r:t)}}function cO(e,t){var r=t-e;return r?c4(e,r):Bv(isNaN(e)?t:e)}const d0=function e(t){var r=d4(t);function n(i,a){var o=r((i=Sp(i)).r,(a=Sp(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),s=cO(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=s(f),i+""}}return n.gamma=e,n}(1);function p4(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),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:as(n,i)})),r=Nf.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function _4(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?P4:_4,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=l(e.map(n),t,r)))(n(o(d)))}return c.invert=function(d){return o(i((s||(s=l(t,e.map(n),as)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,os),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=zv,f()},c.clamp=function(d){return arguments.length?(o=d?!0:ct,f()):o!==ct},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,p){return n=d,i=p,f()}}function Fv(){return Oc()(ct,ct)}function A4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(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 Hi(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function E4(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function $4(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var T4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Do(e){if(!(t=T4.exec(e)))throw new Error("invalid format: "+e);var t;return new Wv({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]})}Do.prototype=Wv.prototype;function Wv(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+""}Wv.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 C4(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 fO;function j4(e,t){var r=ls(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(fO=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")+ls(e,Math.max(0,t+a-1))[0]}function h0(e,t){var r=ls(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 v0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:A4,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)=>h0(e*100,t),r:h0,s:j4,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function y0(e){return e}var m0=Array.prototype.map,g0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function k4(e){var t=e.grouping===void 0||e.thousands===void 0?y0:E4(m0.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?y0:$4(m0.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c){c=Do(c);var d=c.fill,p=c.align,h=c.sign,g=c.symbol,w=c.zero,y=c.width,v=c.comma,m=c.precision,S=c.trim,b=c.type;b==="n"?(v=!0,b="g"):v0[b]||(m===void 0&&(m=12),S=!0,b="g"),(w||d==="0"&&p==="=")&&(w=!0,d="0",p="=");var x=g==="$"?r:g==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",O=g==="$"?n:/[%p]/.test(b)?o:"",_=v0[b],E=/[defgprs%]/.test(b);m=m===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m));function A(P){var T=x,I=O,M,N,L;if(b==="c")I=_(P)+I,P="";else{P=+P;var B=P<0||1/P<0;if(P=isNaN(P)?u:_(Math.abs(P),m),S&&(P=C4(P)),B&&+P==0&&h!=="+"&&(B=!1),T=(B?h==="("?h:l:h==="-"||h==="("?"":h)+T,I=(b==="s"?g0[8+fO/3]:"")+I+(B&&h==="("?")":""),E){for(M=-1,N=P.length;++ML||L>57){I=(L===46?i+P.slice(M+1):P.slice(M))+I,P=P.slice(0,M);break}}}v&&!w&&(P=t(P,1/0));var C=T.length+P.length+I.length,k=C>1)+T+P+I+k.slice(C);break;default:P=k+T+P+I;break}return a(P)}return A.toString=function(){return c+""},A}function f(c,d){var p=s((c=Do(c),c.type="f",c)),h=Math.max(-8,Math.min(8,Math.floor(Hi(d)/3)))*3,g=Math.pow(10,-h),w=g0[8+h/3];return function(y){return p(g*y)+w}}return{format:s,formatPrefix:f}}var Yl,Uv,dO;M4({thousands:",",grouping:[3],currency:["$",""]});function M4(e){return Yl=k4(e),Uv=Yl.format,dO=Yl.formatPrefix,Yl}function N4(e){return Math.max(0,-Hi(Math.abs(e)))}function I4(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hi(t)/3)))*3-Hi(Math.abs(e)))}function D4(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hi(t)-Hi(e))+1}function pO(e,t,r,n){var i=wp(e,t,r),a;switch(n=Do(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=I4(i,o))&&(n.precision=a),dO(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=D4(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=N4(i))&&(n.precision=a-(n.type==="%")*2);break}}return Uv(n)}function mn(e){var t=e.domain;return e.ticks=function(r){var n=t();return gp(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return pO(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],l=n[a],u,s,f=10;for(l0;){if(s=bp(o,l,r),s===u)return n[i]=o,n[a]=l,t(n);if(s>0)o=Math.floor(o/s)*s,l=Math.ceil(l/s)*s;else if(s<0)o=Math.ceil(o*s)/s,l=Math.floor(l*s)/s;else break;u=s}return e},e}function us(){var e=Fv();return e.copy=function(){return gl(e,us())},Kt.apply(e,arguments),mn(e)}function hO(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,os),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return hO(e).unknown(t)},e=arguments.length?Array.from(e,os):[0,1],mn(r)}function vO(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 F4(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 x0(e){return(t,r)=>-e(-t,r)}function Hv(e){const t=e(b0,w0),r=t.domain;let n=10,i,a;function o(){return i=F4(n),a=z4(n),r()[0]<0?(i=x0(i),a=x0(a),e(L4,R4)):e(b0,w0),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const u=r();let s=u[0],f=u[u.length-1];const c=f0){for(;d<=p;++d)for(h=1;hf)break;y.push(g)}}else for(;d<=p;++d)for(h=n-1;h>=1;--h)if(g=d>0?h/a(-d):h*a(d),!(gf)break;y.push(g)}y.length*2{if(l==null&&(l=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Do(u)).precision==null&&(u.trim=!0),u=Uv(u)),l===1/0)return u;const s=Math.max(1,n*l/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(vO(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function yO(){const e=Hv(Oc()).domain([1,10]);return e.copy=()=>gl(e,yO()).base(e.base()),Kt.apply(e,arguments),e}function S0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function O0(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Vv(e){var t=1,r=e(S0(t),O0(t));return r.constant=function(n){return arguments.length?e(S0(t=+n),O0(t)):t},mn(r)}function mO(){var e=Vv(Oc());return e.copy=function(){return gl(e,mO()).constant(e.constant())},Kt.apply(e,arguments)}function _0(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function W4(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function U4(e){return e<0?-e*e:e*e}function Gv(e){var t=e(ct,ct),r=1;function n(){return r===1?e(ct,ct):r===.5?e(W4,U4):e(_0(r),_0(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},mn(t)}function Kv(){var e=Gv(Oc());return e.copy=function(){return gl(e,Kv()).exponent(e.exponent())},Kt.apply(e,arguments),e}function H4(){return Kv.apply(null,arguments).exponent(.5)}function P0(e){return Math.sign(e)*e*e}function V4(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function gO(){var e=Fv(),t=[0,1],r=!1,n;function i(a){var o=V4(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(P0(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,os)).map(P0)),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 gO(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kt.apply(i,arguments),mn(i)}function bO(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[s-1],n[s]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return wO().domain([e,t]).range(i).unknown(a)},Kt.apply(mn(o),arguments)}function xO(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[yl(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 xO().domain(e).range(t).unknown(r)},Kt.apply(i,arguments)}const If=new Date,Df=new Date;function Ue(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),l=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let s;do u.push(s=new Date(+a)),t(a,l),e(a);while(sUe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(If.setTime(+a),Df.setTime(+o),e(If),e(Df),Math.floor(r(If,Df))),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 ss=Ue(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ss.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ue(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ss);ss.range;const _r=1e3,Bt=_r*60,Pr=Bt*60,Ir=Pr*24,qv=Ir*7,A0=Ir*30,Lf=Ir*365,Mn=Ue(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*_r)},(e,t)=>(t-e)/_r,e=>e.getUTCSeconds());Mn.range;const Xv=Ue(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getMinutes());Xv.range;const Yv=Ue(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Bt)},(e,t)=>(t-e)/Bt,e=>e.getUTCMinutes());Yv.range;const Qv=Ue(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*_r-e.getMinutes()*Bt)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getHours());Qv.range;const Zv=Ue(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Pr)},(e,t)=>(t-e)/Pr,e=>e.getUTCHours());Zv.range;const bl=Ue(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bt)/Ir,e=>e.getDate()-1);bl.range;const _c=Ue(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ir,e=>e.getUTCDate()-1);_c.range;const SO=Ue(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ir,e=>Math.floor(e/Ir));SO.range;function Jn(e){return Ue(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())*Bt)/qv)}const Pc=Jn(0),cs=Jn(1),G4=Jn(2),K4=Jn(3),Vi=Jn(4),q4=Jn(5),X4=Jn(6);Pc.range;cs.range;G4.range;K4.range;Vi.range;q4.range;X4.range;function ei(e){return Ue(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)/qv)}const Ac=ei(0),fs=ei(1),Y4=ei(2),Q4=ei(3),Gi=ei(4),Z4=ei(5),J4=ei(6);Ac.range;fs.range;Y4.range;Q4.range;Gi.range;Z4.range;J4.range;const Jv=Ue(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());Jv.range;const ey=Ue(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());ey.range;const Dr=Ue(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());Dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ue(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)});Dr.range;const Lr=Ue(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());Lr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ue(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)});Lr.range;function OO(e,t,r,n,i,a){const o=[[Mn,1,_r],[Mn,5,5*_r],[Mn,15,15*_r],[Mn,30,30*_r],[a,1,Bt],[a,5,5*Bt],[a,15,15*Bt],[a,30,30*Bt],[i,1,Pr],[i,3,3*Pr],[i,6,6*Pr],[i,12,12*Pr],[n,1,Ir],[n,2,2*Ir],[r,1,qv],[t,1,A0],[t,3,3*A0],[e,1,Lf]];function l(s,f,c){const d=fw).right(o,d);if(p===o.length)return e.every(wp(s/Lf,f/Lf,c));if(p===0)return ss.every(Math.max(wp(s,f,c),1));const[h,g]=o[d/o[p-1][2]53)return null;"w"in W||(W.w=1),"Z"in W?(Q=Bf(Na(W.y,0,1)),Te=Q.getUTCDay(),Q=Te>4||Te===0?fs.ceil(Q):fs(Q),Q=_c.offset(Q,(W.V-1)*7),W.y=Q.getUTCFullYear(),W.m=Q.getUTCMonth(),W.d=Q.getUTCDate()+(W.w+6)%7):(Q=Rf(Na(W.y,0,1)),Te=Q.getDay(),Q=Te>4||Te===0?cs.ceil(Q):cs(Q),Q=bl.offset(Q,(W.V-1)*7),W.y=Q.getFullYear(),W.m=Q.getMonth(),W.d=Q.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),Te="Z"in W?Bf(Na(W.y,0,1)).getUTCDay():Rf(Na(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Te+5)%7:W.w+W.U*7-(Te+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,Bf(W)):Rf(W)}}function _(K,J,ee,W){for(var re=0,Q=J.length,Te=ee.length,de,et;re=Te)return-1;if(de=J.charCodeAt(re++),de===37){if(de=J.charAt(re++),et=b[de in E0?J.charAt(re++):de],!et||(W=et(K,ee,W))<0)return-1}else if(de!=ee.charCodeAt(W++))return-1}return W}function E(K,J,ee){var W=s.exec(J.slice(ee));return W?(K.p=f.get(W[0].toLowerCase()),ee+W[0].length):-1}function A(K,J,ee){var W=p.exec(J.slice(ee));return W?(K.w=h.get(W[0].toLowerCase()),ee+W[0].length):-1}function P(K,J,ee){var W=c.exec(J.slice(ee));return W?(K.w=d.get(W[0].toLowerCase()),ee+W[0].length):-1}function T(K,J,ee){var W=y.exec(J.slice(ee));return W?(K.m=v.get(W[0].toLowerCase()),ee+W[0].length):-1}function I(K,J,ee){var W=g.exec(J.slice(ee));return W?(K.m=w.get(W[0].toLowerCase()),ee+W[0].length):-1}function M(K,J,ee){return _(K,t,J,ee)}function N(K,J,ee){return _(K,r,J,ee)}function L(K,J,ee){return _(K,n,J,ee)}function B(K){return o[K.getDay()]}function C(K){return a[K.getDay()]}function k(K){return u[K.getMonth()]}function F(K){return l[K.getMonth()]}function H(K){return i[+(K.getHours()>=12)]}function z(K){return 1+~~(K.getMonth()/3)}function V(K){return o[K.getUTCDay()]}function Z(K){return a[K.getUTCDay()]}function fe(K){return u[K.getUTCMonth()]}function se(K){return l[K.getUTCMonth()]}function Ie(K){return i[+(K.getUTCHours()>=12)]}function ke(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var J=x(K+="",m);return J.toString=function(){return K},J},parse:function(K){var J=O(K+="",!1);return J.toString=function(){return K},J},utcFormat:function(K){var J=x(K+="",S);return J.toString=function(){return K},J},utcParse:function(K){var J=O(K+="",!0);return J.toString=function(){return K},J}}}var E0={"-":"",_:" ",0:"0"},Ke=/^\s*\d+/,aF=/^%/,oF=/[\\^$*+?|[\]().{}]/g;function ue(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function uF(e,t,r){var n=Ke.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function sF(e,t,r){var n=Ke.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function dF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function $0(e,t,r){var n=Ke.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function T0(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function pF(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 hF(e,t,r){var n=Ke.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function vF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function C0(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function yF(e,t,r){var n=Ke.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function j0(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function mF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function gF(e,t,r){var n=Ke.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function bF(e,t,r){var n=Ke.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function wF(e,t,r){var n=Ke.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function xF(e,t,r){var n=aF.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function SF(e,t,r){var n=Ke.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function OF(e,t,r){var n=Ke.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function k0(e,t){return ue(e.getDate(),t,2)}function _F(e,t){return ue(e.getHours(),t,2)}function PF(e,t){return ue(e.getHours()%12||12,t,2)}function AF(e,t){return ue(1+bl.count(Dr(e),e),t,3)}function _O(e,t){return ue(e.getMilliseconds(),t,3)}function EF(e,t){return _O(e,t)+"000"}function $F(e,t){return ue(e.getMonth()+1,t,2)}function TF(e,t){return ue(e.getMinutes(),t,2)}function CF(e,t){return ue(e.getSeconds(),t,2)}function jF(e){var t=e.getDay();return t===0?7:t}function kF(e,t){return ue(Pc.count(Dr(e)-1,e),t,2)}function PO(e){var t=e.getDay();return t>=4||t===0?Vi(e):Vi.ceil(e)}function MF(e,t){return e=PO(e),ue(Vi.count(Dr(e),e)+(Dr(e).getDay()===4),t,2)}function NF(e){return e.getDay()}function IF(e,t){return ue(cs.count(Dr(e)-1,e),t,2)}function DF(e,t){return ue(e.getFullYear()%100,t,2)}function LF(e,t){return e=PO(e),ue(e.getFullYear()%100,t,2)}function RF(e,t){return ue(e.getFullYear()%1e4,t,4)}function BF(e,t){var r=e.getDay();return e=r>=4||r===0?Vi(e):Vi.ceil(e),ue(e.getFullYear()%1e4,t,4)}function zF(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ue(t/60|0,"0",2)+ue(t%60,"0",2)}function M0(e,t){return ue(e.getUTCDate(),t,2)}function FF(e,t){return ue(e.getUTCHours(),t,2)}function WF(e,t){return ue(e.getUTCHours()%12||12,t,2)}function UF(e,t){return ue(1+_c.count(Lr(e),e),t,3)}function AO(e,t){return ue(e.getUTCMilliseconds(),t,3)}function HF(e,t){return AO(e,t)+"000"}function VF(e,t){return ue(e.getUTCMonth()+1,t,2)}function GF(e,t){return ue(e.getUTCMinutes(),t,2)}function KF(e,t){return ue(e.getUTCSeconds(),t,2)}function qF(e){var t=e.getUTCDay();return t===0?7:t}function XF(e,t){return ue(Ac.count(Lr(e)-1,e),t,2)}function EO(e){var t=e.getUTCDay();return t>=4||t===0?Gi(e):Gi.ceil(e)}function YF(e,t){return e=EO(e),ue(Gi.count(Lr(e),e)+(Lr(e).getUTCDay()===4),t,2)}function QF(e){return e.getUTCDay()}function ZF(e,t){return ue(fs.count(Lr(e)-1,e),t,2)}function JF(e,t){return ue(e.getUTCFullYear()%100,t,2)}function e8(e,t){return e=EO(e),ue(e.getUTCFullYear()%100,t,2)}function t8(e,t){return ue(e.getUTCFullYear()%1e4,t,4)}function r8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Gi(e):Gi.ceil(e),ue(e.getUTCFullYear()%1e4,t,4)}function n8(){return"+0000"}function N0(){return"%"}function I0(e){return+e}function D0(e){return Math.floor(+e/1e3)}var ai,$O,TO;i8({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 i8(e){return ai=iF(e),$O=ai.format,ai.parse,TO=ai.utcFormat,ai.utcParse,ai}function a8(e){return new Date(e)}function o8(e){return e instanceof Date?+e:+new Date(+e)}function ty(e,t,r,n,i,a,o,l,u,s){var f=Fv(),c=f.invert,d=f.domain,p=s(".%L"),h=s(":%S"),g=s("%I:%M"),w=s("%I %p"),y=s("%a %d"),v=s("%b %d"),m=s("%B"),S=s("%Y");function b(x){return(u(x)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>Xz(e,a/n))},r.copy=function(){return MO(t).domain(e)},Wr.apply(r,arguments)}function $c(){var e=0,t=.5,r=1,n=1,i,a,o,l,u,s=ct,f,c=!1,d;function p(g){return isNaN(g=+g)?d:(g=.5+((g=+f(g))-a)*(n*gt}var h8=p8,v8=LO,y8=h8,m8=ma;function g8(e){return e&&e.length?v8(e,m8,y8):void 0}var b8=g8;const Tc=me(b8);function w8(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};X.decimalPlaces=X.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Se;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};X.dividedBy=X.div=function(e){return Cr(this,new this.constructor(e))};X.dividedToIntegerBy=X.idiv=function(e){var t=this,r=t.constructor;return ye(Cr(t,new r(e),0,1),r.precision)};X.equals=X.eq=function(e){return!this.cmp(e)};X.exponent=function(){return Re(this)};X.greaterThan=X.gt=function(e){return this.cmp(e)>0};X.greaterThanOrEqualTo=X.gte=function(e){return this.cmp(e)>=0};X.isInteger=X.isint=function(){return this.e>this.d.length-2};X.isNegative=X.isneg=function(){return this.s<0};X.isPositive=X.ispos=function(){return this.s>0};X.isZero=function(){return this.s===0};X.lessThan=X.lt=function(e){return this.cmp(e)<0};X.lessThanOrEqualTo=X.lte=function(e){return this.cmp(e)<1};X.logarithm=X.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(At))throw Error(Vt+"NaN");if(r.s<1)throw Error(Vt+(r.s?"NaN":"-Infinity"));return r.eq(At)?new n(0):(Pe=!1,t=Cr(Lo(r,a),Lo(e,a),a),Pe=!0,ye(t,i))};X.minus=X.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FO(t,e):BO(t,(e.s=-e.s,e))};X.modulo=X.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Vt+"NaN");return r.s?(Pe=!1,t=Cr(r,e,0,1).times(e),Pe=!0,r.minus(t)):ye(new n(r),i)};X.naturalExponential=X.exp=function(){return zO(this)};X.naturalLogarithm=X.ln=function(){return Lo(this)};X.negated=X.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};X.plus=X.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?BO(t,e):FO(t,(e.s=-e.s,e))};X.precision=X.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Bn+e);if(t=Re(i)+1,n=i.d.length-1,r=n*Se+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};X.squareRoot=X.sqrt=function(){var e,t,r,n,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(Vt+"NaN")}for(e=Re(l),Pe=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=dr(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=xa((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 u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(Cr(l,a,o+2)).times(.5),dr(a.d).slice(0,o)===(t=dr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ye(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return Pe=!0,ye(n,r)};X.times=X.mul=function(e){var t,r,n,i,a,o,l,u,s,f=this,c=f.constructor,d=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,u=d.length,s=p.length,u=0;){for(t=0,i=u+n;i>n;)l=a[i]+p[n]*d[i-n-1]+t,a[i--]=l%He|0,t=l/He|0;a[i]=(a[i]+t)%He|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Pe?ye(e,c.precision):e};X.toDecimalPlaces=X.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(mr(e,0,wa),t===void 0?t=n.rounding:mr(t,0,8),ye(r,e+Re(r)+1,t))};X.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Kn(n,!0):(mr(e,0,wa),t===void 0?t=i.rounding:mr(t,0,8),n=ye(new i(n),e+1,t),r=Kn(n,!0,e+1)),r};X.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Kn(i):(mr(e,0,wa),t===void 0?t=a.rounding:mr(t,0,8),n=ye(new a(i),e+Re(i)+1,t),r=Kn(n.abs(),!1,e+Re(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};X.toInteger=X.toint=function(){var e=this,t=e.constructor;return ye(new t(e),Re(e)+1,t.rounding)};X.toNumber=function(){return+this};X.toPower=X.pow=function(e){var t,r,n,i,a,o,l=this,u=l.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(At);if(l=new u(l),!l.s){if(e.s<1)throw Error(Vt+"Infinity");return l}if(l.eq(At))return l;if(n=u.precision,e.eq(At))return ye(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=f<0?-f:f)<=RO){for(i=new u(At),t=Math.ceil(n/Se+4),Pe=!1;r%2&&(i=i.times(l),B0(i.d,t)),r=xa(r/2),r!==0;)l=l.times(l),B0(l.d,t);return Pe=!0,e.s<0?new u(At).div(i):ye(i,n)}}else if(a<0)throw Error(Vt+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Pe=!1,i=e.times(Lo(l,n+s)),Pe=!0,i=zO(i),i.s=a,i};X.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Re(i),n=Kn(i,r<=a.toExpNeg||r>=a.toExpPos)):(mr(e,1,wa),t===void 0?t=a.rounding:mr(t,0,8),i=ye(new a(i),e,t),r=Re(i),n=Kn(i,e<=r||r<=a.toExpNeg,e)),n};X.toSignificantDigits=X.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(mr(e,1,wa),t===void 0?t=n.rounding:mr(t,0,8)),ye(new n(r),e,t)};X.toString=X.valueOf=X.val=X.toJSON=X[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Re(e),r=e.constructor;return Kn(e,t<=r.toExpNeg||t>=r.toExpPos)};function BO(e,t){var r,n,i,a,o,l,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Pe?ye(t,c):t;if(u=e.d,s=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,l=s.length):(n=s,i=o,l=u.length),o=Math.ceil(c/Se),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=u.length,a=s.length,l-a<0&&(a=l,n=s,s=u,u=n),r=0;a;)r=(u[--a]=u[a]+s[a]+r)/He|0,u[a]%=He;for(r&&(u.unshift(r),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Pe?ye(t,c):t}function mr(e,t,r){if(e!==~~e||er)throw Error(Bn+e)}function dr(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(l=u=0;li[l]?1:-1;break}return u}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 l,u,s,f,c,d,p,h,g,w,y,v,m,S,b,x,O,_,E=n.constructor,A=n.s==i.s?1:-1,P=n.d,T=i.d;if(!n.s)return new E(n);if(!i.s)throw Error(Vt+"Division by zero");for(u=n.e-i.e,O=T.length,b=P.length,p=new E(A),h=p.d=[],s=0;T[s]==(P[s]||0);)++s;if(T[s]>(P[s]||0)&&--u,a==null?v=a=E.precision:o?v=a+(Re(n)-Re(i))+1:v=a,v<0)return new E(0);if(v=v/Se+2|0,s=0,O==1)for(f=0,T=T[0],v++;(s1&&(T=e(T,f),P=e(P,f),O=T.length,b=P.length),S=O,g=P.slice(0,O),w=g.length;w=He/2&&++x;do f=0,l=t(T,g,O,w),l<0?(y=g[0],O!=w&&(y=y*He+(g[1]||0)),f=y/x|0,f>1?(f>=He&&(f=He-1),c=e(T,f),d=c.length,w=g.length,l=t(c,g,d,w),l==1&&(f--,r(c,O16)throw Error(iy+Re(e));if(!e.s)return new f(At);for(Pe=!1,l=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),s+=5;for(n=Math.log(En(2,s))/Math.LN10*2+5|0,l+=n,r=i=a=new f(At),f.precision=l;;){if(i=ye(i.times(e),l),r=r.times(++u),o=a.plus(Cr(i,r,l)),dr(o.d).slice(0,l)===dr(a.d).slice(0,l)){for(;s--;)a=ye(a.times(a),l);return f.precision=c,t==null?(Pe=!0,ye(a,c)):a}a=o}}function Re(e){for(var t=e.e*Se,r=e.d[0];r>=10;r/=10)t++;return t}function zf(e,t,r){if(t>e.LN10.sd())throw Pe=!0,r&&(e.precision=r),Error(Vt+"LN10 precision limit exceeded");return ye(new e(e.LN10),t)}function Gr(e){for(var t="";e--;)t+="0";return t}function Lo(e,t){var r,n,i,a,o,l,u,s,f,c=1,d=10,p=e,h=p.d,g=p.constructor,w=g.precision;if(p.s<1)throw Error(Vt+(p.s?"NaN":"-Infinity"));if(p.eq(At))return new g(0);if(t==null?(Pe=!1,s=w):s=t,p.eq(10))return t==null&&(Pe=!0),zf(g,s);if(s+=d,g.precision=s,r=dr(h),n=r.charAt(0),a=Re(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=dr(p.d),n=r.charAt(0),c++;a=Re(p),n>1?(p=new g("0."+r),a++):p=new g(n+"."+r.slice(1))}else return u=zf(g,s+2,w).times(a+""),p=Lo(new g(n+"."+r.slice(1)),s-d).plus(u),g.precision=w,t==null?(Pe=!0,ye(p,w)):p;for(l=o=p=Cr(p.minus(At),p.plus(At),s),f=ye(p.times(p),s),i=3;;){if(o=ye(o.times(f),s),u=l.plus(Cr(o,new g(i),s)),dr(u.d).slice(0,s)===dr(l.d).slice(0,s))return l=l.times(2),a!==0&&(l=l.plus(zf(g,s+2,w).times(a+""))),l=Cr(l,new g(c),s),g.precision=w,t==null?(Pe=!0,ye(l,w)):l;l=u,i+=2}}function R0(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=xa(r/Se),e.d=[],n=(r+1)%Se,r<0&&(n+=Se),nds||e.e<-ds))throw Error(iy+r)}else e.s=0,e.e=0,e.d=[0];return e}function ye(e,t,r){var n,i,a,o,l,u,s,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Se,i=t,s=c[f=0];else{if(f=Math.ceil((n+1)/Se),a=c.length,f>=a)return e;for(s=a=c[f],o=1;a>=10;a/=10)o++;n%=Se,i=n-Se+o}if(r!==void 0&&(a=En(10,o-i-1),l=s/a%10|0,u=t<0||c[f+1]!==void 0||s%a,u=r<4?(l||u)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||u||r==6&&(n>0?i>0?s/En(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return u?(a=Re(e),c.length=1,t=t-a-1,c[0]=En(10,(Se-t%Se)%Se),e.e=xa(-t/Se)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,a=1,f--):(c.length=f+1,a=En(10,Se-n),c[f]=i>0?(s/En(10,o-i)%En(10,i)|0)*a:0),u)for(;;)if(f==0){(c[0]+=a)==He&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=He)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(Pe&&(e.e>ds||e.e<-ds))throw Error(iy+Re(e));return e}function FO(e,t){var r,n,i,a,o,l,u,s,f,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Pe?ye(t,p):t;if(u=e.d,c=t.d,n=t.e,s=e.e,u=u.slice(),o=s-n,o){for(f=o<0,f?(r=u,o=-o,l=c.length):(r=c,n=s,l=u.length),i=Math.max(Math.ceil(p/Se),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,l=c.length,f=i0;--i)u[l++]=0;for(i=c.length;i>o;){if(u[--i]0?a=a.charAt(0)+"."+a.slice(1)+Gr(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Gr(-i-1)+a,r&&(n=r-o)>0&&(a+=Gr(n))):i>=o?(a+=Gr(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Gr(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=Gr(n))),e.s<0?"-"+a:a}function B0(e,t){if(e.length>t)return e.length=t,!0}function WO(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(Bn+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 R0(o,a.toString())}else if(typeof a!="string")throw Error(Bn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,W8.test(a))R0(o,a);else throw Error(Bn+a)}if(i.prototype=X,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=WO,i.config=i.set=U8,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(Bn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Bn+r+": "+n);return this}var ay=WO(F8);At=new ay(1);const ve=ay;function H8(e){return q8(e)||K8(e)||G8(e)||V8()}function V8(){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 G8(e,t){if(e){if(typeof e=="string")return Pp(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 Pp(e,t)}}function K8(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function q8(e){if(Array.isArray(e))return Pp(e)}function Pp(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,z0(function(){for(var l=arguments.length,u=new Array(l),s=0;se.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](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function s5(e){if(Array.isArray(e))return e}function KO(e){var t=Ro(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function qO(e,t,r){if(e.lte(0))return new ve(0);var n=Mc.getDigitCount(e.toNumber()),i=new ve(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new ve(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=l.mul(i);return t?u:new ve(Math.ceil(u))}function c5(e,t,r){var n=1,i=new ve(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ve(10).pow(Mc.getDigitCount(e)-1),i=new ve(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ve(Math.floor(e)))}else e===0?i=new ve(Math.floor((t-1)/2)):r||(i=new ve(Math.floor(e)));var o=Math.floor((t-1)/2),l=Z8(Q8(function(u){return i.add(new ve(u-o).mul(n)).toNumber()}),Ap);return l(0,t)}function XO(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 ve(0),tickMin:new ve(0),tickMax:new ve(0)};var a=qO(new ve(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new ve(0):(o=new ve(e).add(t).div(2),o=o.sub(new ve(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new ve(t).sub(o).div(a).toNumber()),s=l+u+1;return s>r?XO(e,t,r,n,i+1):(s0?u+(r-s):u,l=t>0?l:l+(r-s)),{step:a,tickMin:o.sub(new ve(l).mul(a)),tickMax:o.add(new ve(u).mul(a))})}function f5(e){var t=Ro(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),l=KO([r,n]),u=Ro(l,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat($p(Ap(0,i-1).map(function(){return 1/0}))):[].concat($p(Ap(0,i-1).map(function(){return-1/0})),[f]);return r>n?Ep(c):c}if(s===f)return c5(s,i,a);var d=XO(s,f,o,a),p=d.step,h=d.tickMin,g=d.tickMax,w=Mc.rangeStep(h,g.add(new ve(.1).mul(p)),p);return r>n?Ep(w):w}function d5(e,t){var r=Ro(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=KO([n,i]),l=Ro(o,2),u=l[0],s=l[1];if(u===-1/0||s===1/0)return[n,i];if(u===s)return[u];var f=Math.max(t,2),c=qO(new ve(s).sub(u).div(f-1),a,0),d=[].concat($p(Mc.rangeStep(new ve(u),new ve(s).sub(new ve(.99).mul(c)),c)),[s]);return n>i?Ep(d):d}var p5=VO(f5),h5=VO(d5),v5="Invariant failed";function qn(e,t){throw new Error(v5)}var y5=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ki(e){"@babel/helpers - typeof";return Ki=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},Ki(e)}function ps(){return ps=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 O5(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 _5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P5(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,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,s=0;s0?i[s-1].coordinate:i[l-1].coordinate,c=i[s].coordinate,d=s>=l-1?i[0].coordinate:i[s+1].coordinate,p=void 0;if(nr(c-f)!==nr(d-c)){var h=[];if(nr(d-c)===nr(u[1]-u[0])){p=d;var g=c+u[1]-u[0];h[0]=Math.min(g,(g+f)/2),h[1]=Math.max(g,(g+f)/2)}else{p=f;var w=d+u[1]-u[0];h[0]=Math.min(c,(w+c)/2),h[1]=Math.max(c,(w+c)/2)}var y=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>y[0]&&t<=y[1]||t>=h[0]&&t<=h[1]){o=i[s].index;break}}else{var v=Math.min(f,d),m=Math.max(f,d);if(t>(v+c)/2&&t<=(m+c)/2){o=i[s].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===l-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},oy=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,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},W5=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,s=l.length;u=0});if(y&&y.length){var v=y[0].type.defaultProps,m=v!==void 0?je(je({},v),y[0].props):y[0].props,S=m.barSize,b=m[w];o[b]||(o[b]=[]);var x=ie(S)?r:S;o[b].push({item:y[0],stackList:y.slice(1),barSize:ie(x)?void 0:Gn(x,n,0)})}}return o},U5=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var s=Gn(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/u,h=o.reduce(function(S,b){return S+b.barSize||0},0);h+=(u-1)*s,h>=i&&(h-=(u-1)*s,s=0),h>=i&&p>0&&(d=!0,p*=.9,h=u*p);var g=(i-h)/2>>0,w={offset:g-s,size:0};f=o.reduce(function(S,b){var x={item:b.item,position:{offset:w.offset+w.size+s,size:d?p:b.barSize}},O=[].concat(U0(S),[x]);return w=O[O.length-1].position,b.stackList&&b.stackList.length&&b.stackList.forEach(function(_){O.push({item:_,position:w})}),O},c)}else{var y=Gn(n,i,0,!0);i-2*y-(u-1)*s<=0&&(s=0);var v=(i-2*y-(u-1)*s)/u;v>1&&(v>>=0);var m=l===+l?Math.min(v,l):v;f=o.reduce(function(S,b,x){var O=[].concat(U0(S),[{item:b.item,position:{offset:y+(v+s)*x+(v-m)/2,size:m}}]);return b.stackList&&b.stackList.length&&b.stackList.forEach(function(_){O.push({item:_,position:O[O.length-1].position})}),O},c)}return f},H5=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,u=o-(l.left||0)-(l.right||0),s=JO({children:a,legendWidth:u});if(s){var f=i||{},c=f.width,d=f.height,p=s.align,h=s.verticalAlign,g=s.layout;if((g==="vertical"||g==="horizontal"&&h==="middle")&&p!=="center"&&G(t[p]))return je(je({},t),{},ji({},p,t[p]+(c||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&h!=="middle"&&G(t[h]))return je(je({},t),{},ji({},h,t[h]+(d||0)))}return t},V5=function(t,r,n){return ie(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},e_=function(t,r,n,i,a){var o=r.props.children,l=Wt(o,wl).filter(function(s){return V5(i,a,s.props.direction)});if(l&&l.length){var u=l.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=Ct(f,n);if(ie(c))return s;var d=Array.isArray(c)?[Cc(c),Tc(c)]:[c,c],p=u.reduce(function(h,g){var w=Ct(f,g,0),y=d[0]-Math.abs(Array.isArray(w)?w[0]:w),v=d[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(y,h[0]),Math.max(v,h[1])]},[1/0,-1/0]);return[Math.min(p[0],s[0]),Math.max(p[1],s[1])]},[1/0,-1/0])}return null},G5=function(t,r,n,i,a){var o=r.map(function(l){return e_(t,l,n,a,i)}).filter(function(l){return!ie(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},t_=function(t,r,n,i,a){var o=r.map(function(u){var s=u.props.dataKey;return n==="number"&&s&&e_(t,u,s,i)||io(t,s,n,a)});if(n==="number")return o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,s){for(var f=0,c=s.length;f=2?nr(l[0]-l[1])*2*s:s,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+s,value:c,offset:s}});return f.filter(function(c){return!pl(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+s,value:c,index:d,offset:s}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+s,value:c,offset:s}}):i.domain().map(function(c,d){return{coordinate:i(c)+s,value:a?a[c]:c,index:d,offset:s}})},Ff=new WeakMap,Ql=function(t,r){if(typeof r!="function")return t;Ff.has(t)||Ff.set(t,new WeakMap);var n=Ff.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},K5=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:ko(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:us(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:no(),realScaleType:"point"}:a==="category"?{scale:ko(),realScaleType:"band"}:{scale:us(),realScaleType:"linear"};if(Vn(i)){var u="scale".concat(yc(i));return{scale:(L0[u]||no)(),realScaleType:L0[u]?u:"point"}}return te(i)?{scale:i}:{scale:no(),realScaleType:"point"}},V0=1e-4,q5=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])-V0,o=Math.max(i[0],i[1])+V0,l=t(r[0]),u=t(r[n-1]);(lo||uo)&&t.domain([r[0],r[n-1]])}},X5=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[l][n][0]=a,t[l][n][1]=a+u,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+u,o=t[l][n][1])}},Z5=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+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},J5={sign:Q5,expand:pM,none:Bi,silhouette:hM,wiggle:vM,positive:Z5},eW=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=J5[n],o=dM().keys(i).value(function(l,u){return+Ct(l,u,0)}).order(rp).offset(a);return o(t)},tW=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,u={},s=l.reduce(function(c,d){var p,h=(p=d.type)!==null&&p!==void 0&&p.defaultProps?je(je({},d.type.defaultProps),d.props):d.props,g=h.stackId,w=h.hide;if(w)return c;var y=h[n],v=c[y]||{hasStack:!1,stackGroups:{}};if(We(g)){var m=v.stackGroups[g]||{numericAxisId:n,cateAxisId:i,items:[]};m.items.push(d),v.hasStack=!0,v.stackGroups[g]=m}else v.stackGroups[hl("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return je(je({},c),{},ji({},y,v))},u),f={};return Object.keys(s).reduce(function(c,d){var p=s[d];if(p.hasStack){var h={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,w){var y=p.stackGroups[w];return je(je({},g),{},ji({},w,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:eW(t,y.items,a)}))},h)}return je(je({},c),{},ji({},d,p))},f)},rW=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=p5(s,a,l);return t.domain([Cc(f),Tc(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=h5(c,a,l);return{niceTicks:d}}return null};function G0(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&&!ie(i[t.dataKey])){var l=Bu(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=Ct(i,ie(o)?t.dataKey:o);return ie(u)?null:t.scale(u)}var K0=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var u=Ct(o,r.dataKey,r.domain[l]);return ie(u)?null:r.scale(u)-a/2+i},nW=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]},iW=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(We(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},aW=function(t){return t.reduce(function(r,n){return[Cc(n.concat([r[0]]).filter(G)),Tc(n.concat([r[1]]).filter(G))]},[1/0,-1/0])},i_=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(s,f){var c=aW(f.slice(r,n+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},q0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,X0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,kp=function(t,r,n){if(te(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(G(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(q0.test(t[0])){var a=+q0.exec(t[0])[1];i[0]=r[0]-a}else te(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(G(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(X0.test(t[1])){var o=+X0.exec(t[1])[1];i[1]=r[1]+o}else te(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},vs=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=Nv(r,function(c){return c.coordinate}),o=1/0,l=1,u=a.length;lo&&(s=2*Math.PI-s),{radius:l,angle:sW(s),angleInRadian:s}},dW=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}},pW=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},J0=function(t,r){var n=t.x,i=t.y,a=fW({x:n,y:i},r),o=a.radius,l=a.angle,u=r.innerRadius,s=r.outerRadius;if(os)return!1;if(o===0)return!0;var f=dW(r),c=f.startAngle,d=f.endAngle,p=l,h;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return h?Z0(Z0({},r),{},{radius:o,angle:pW(p,r)}):null};function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}var hW=["offset"];function vW(e){return bW(e)||gW(e)||mW(e)||yW()}function yW(){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 mW(e,t){if(e){if(typeof e=="string")return Mp(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 Mp(e,t)}}function gW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bW(e){if(Array.isArray(e))return Mp(e)}function Mp(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 xW(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 eb(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 Be(e){for(var t=1;t=0?1:-1,m,S;i==="insideStart"?(m=p+v*o,S=g):i==="insideEnd"?(m=h-v*o,S=!g):i==="end"&&(m=h+v*o,S=g),S=y<=0?S:!S;var b=Qe(s,f,w,m),x=Qe(s,f,w,m+(S?1:-1)*359),O="M".concat(b.x,",").concat(b.y,` - A`).concat(w,",").concat(w,",0,1,").concat(S?0:1,`, - `).concat(x.x,",").concat(x.y),_=ie(t.id)?hl("recharts-radial-line-"):t.id;return $.createElement("text",Uo({},n,{dominantBaseline:"central",className:le("recharts-radial-bar-label",l)}),$.createElement("defs",null,$.createElement("path",{id:_,d:O})),$.createElement("textPath",{xlinkHref:"#".concat(_)},r))},$W=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,u=a.innerRadius,s=a.outerRadius,f=a.startAngle,c=a.endAngle,d=(f+c)/2;if(i==="outside"){var p=Qe(o,l,s+n,d),h=p.x,g=p.y;return{x:h,y:g,textAnchor:h>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var w=(u+s)/2,y=Qe(o,l,w,d),v=y.x,m=y.y;return{x:v,y:m,textAnchor:"middle",verticalAnchor:"middle"}},TW=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,u=o.y,s=o.width,f=o.height,c=f>=0?1:-1,d=c*i,p=c>0?"end":"start",h=c>0?"start":"end",g=s>=0?1:-1,w=g*i,y=g>0?"end":"start",v=g>0?"start":"end";if(a==="top"){var m={x:l+s/2,y:u-c*i,textAnchor:"middle",verticalAnchor:p};return Be(Be({},m),n?{height:Math.max(u-n.y,0),width:s}:{})}if(a==="bottom"){var S={x:l+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:h};return Be(Be({},S),n?{height:Math.max(n.y+n.height-(u+f),0),width:s}:{})}if(a==="left"){var b={x:l-w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"};return Be(Be({},b),n?{width:Math.max(b.x-n.x,0),height:f}:{})}if(a==="right"){var x={x:l+s+w,y:u+f/2,textAnchor:v,verticalAnchor:"middle"};return Be(Be({},x),n?{width:Math.max(n.x+n.width-x.x,0),height:f}:{})}var O=n?{width:s,height:f}:{};return a==="insideLeft"?Be({x:l+w,y:u+f/2,textAnchor:v,verticalAnchor:"middle"},O):a==="insideRight"?Be({x:l+s-w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"},O):a==="insideTop"?Be({x:l+s/2,y:u+d,textAnchor:"middle",verticalAnchor:h},O):a==="insideBottom"?Be({x:l+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:p},O):a==="insideTopLeft"?Be({x:l+w,y:u+d,textAnchor:v,verticalAnchor:h},O):a==="insideTopRight"?Be({x:l+s-w,y:u+d,textAnchor:y,verticalAnchor:h},O):a==="insideBottomLeft"?Be({x:l+w,y:u+f-d,textAnchor:v,verticalAnchor:p},O):a==="insideBottomRight"?Be({x:l+s-w,y:u+f-d,textAnchor:y,verticalAnchor:p},O):fa(a)&&(G(a.x)||jn(a.x))&&(G(a.y)||jn(a.y))?Be({x:l+Gn(a.x,s),y:u+Gn(a.y,f),textAnchor:"end",verticalAnchor:"end"},O):Be({x:l+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},CW=function(t){return"cx"in t&&G(t.cx)};function at(e){var t=e.offset,r=t===void 0?5:t,n=wW(e,hW),i=Be({offset:r},n),a=i.viewBox,o=i.position,l=i.value,u=i.children,s=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!a||ie(l)&&ie(u)&&!R.isValidElement(s)&&!te(s))return null;if(R.isValidElement(s))return R.cloneElement(s,i);var p;if(te(s)){if(p=R.createElement(s,i),R.isValidElement(p))return p}else p=PW(i);var h=CW(a),g=ae(i,!0);if(h&&(o==="insideStart"||o==="insideEnd"||o==="end"))return EW(i,p,g);var w=h?$W(i):TW(i);return $.createElement(ts,Uo({className:le("recharts-label",c)},g,w,{breakAll:d}),p)}at.displayName="Label";var o_=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,h=t.left,g=t.width,w=t.height,y=t.clockWise,v=t.labelViewBox;if(v)return v;if(G(g)&&G(w)){if(G(c)&&G(d))return{x:c,y:d,width:g,height:w};if(G(p)&&G(h))return{x:p,y:h,width:g,height:w}}return G(c)&&G(d)?{x:c,y:d,width:0,height:0}:G(r)&&G(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:s||0,outerRadius:f||u||l||0,clockWise:y}:t.viewBox?t.viewBox:{}},jW=function(t,r){return t?t===!0?$.createElement(at,{key:"label-implicit",viewBox:r}):We(t)?$.createElement(at,{key:"label-implicit",viewBox:r,value:t}):R.isValidElement(t)?t.type===at?R.cloneElement(t,{key:"label-implicit",viewBox:r}):$.createElement(at,{key:"label-implicit",content:t,viewBox:r}):te(t)?$.createElement(at,{key:"label-implicit",content:t,viewBox:r}):fa(t)?$.createElement(at,Uo({viewBox:r},t,{key:"label-implicit"})):null:null},kW=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=o_(t),o=Wt(i,at).map(function(u,s){return R.cloneElement(u,{viewBox:r||a,key:"label-".concat(s)})});if(!n)return o;var l=jW(t.label,r||a);return[l].concat(vW(o))};at.parseViewBox=o_;at.renderCallByParent=kW;function MW(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var NW=MW;const IW=me(NW);function Ho(e){"@babel/helpers - typeof";return Ho=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},Ho(e)}var DW=["valueAccessor"],LW=["data","dataKey","clockWise","id","textBreakAll"];function RW(e){return WW(e)||FW(e)||zW(e)||BW()}function BW(){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 zW(e,t){if(e){if(typeof e=="string")return Np(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 Np(e,t)}}function FW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WW(e){if(Array.isArray(e))return Np(e)}function Np(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 GW(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 KW=function(t){return Array.isArray(t.value)?IW(t.value):t.value};function sn(e){var t=e.valueAccessor,r=t===void 0?KW:t,n=nb(e,DW),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,u=n.textBreakAll,s=nb(n,LW);return!i||!i.length?null:$.createElement(Ne,{className:"recharts-label-list"},i.map(function(f,c){var d=ie(a)?r(f,c):Ct(f&&f.payload,a),p=ie(l)?{}:{id:"".concat(l,"-").concat(c)};return $.createElement(at,ms({},ae(f,!0),s,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:at.parseViewBox(ie(o)?f:rb(rb({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}sn.displayName="LabelList";function qW(e,t){return e?e===!0?$.createElement(sn,{key:"labelList-implicit",data:t}):$.isValidElement(e)||te(e)?$.createElement(sn,{key:"labelList-implicit",data:t,content:e}):fa(e)?$.createElement(sn,ms({data:t},e,{key:"labelList-implicit"})):null:null}function XW(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=Wt(n,sn).map(function(o,l){return R.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=qW(e.label,t);return[a].concat(RW(i))}sn.renderCallByParent=XW;function Vo(e){"@babel/helpers - typeof";return Vo=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},Vo(e)}function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>s),`, - `).concat(c.x,",").concat(c.y,` - `);if(i>0){var p=Qe(r,n,i,o),h=Qe(r,n,i,s);d+="L ".concat(h.x,",").concat(h.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(u)>180),",").concat(+(o<=s),`, - `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},e6=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=nr(f-s),d=Zl({cx:r,cy:n,radius:a,angle:s,sign:c,cornerRadius:o,cornerIsExternal:u}),p=d.circleTangency,h=d.lineTangency,g=d.theta,w=Zl({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:u}),y=w.circleTangency,v=w.lineTangency,m=w.theta,S=u?Math.abs(s-f):Math.abs(s-f)-g-m;if(S<0)return l?"M ".concat(h.x,",").concat(h.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 - `):l_({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:s,endAngle:f});var b="M ".concat(h.x,",").concat(h.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(c<0),",").concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(v.x,",").concat(v.y,` - `);if(i>0){var x=Zl({cx:r,cy:n,radius:i,angle:s,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=x.circleTangency,_=x.lineTangency,E=x.theta,A=Zl({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),P=A.circleTangency,T=A.lineTangency,I=A.theta,M=u?Math.abs(s-f):Math.abs(s-f)-E-I;if(M<0&&o===0)return"".concat(b,"L").concat(r,",").concat(n,"Z");b+="L".concat(T.x,",").concat(T.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(P.x,",").concat(P.y,` - A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(c>0),",").concat(O.x,",").concat(O.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(_.x,",").concat(_.y,"Z")}else b+="L".concat(r,",").concat(n,"Z");return b},t6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},u_=function(t){var r=ab(ab({},t6),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,s=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(o0&&Math.abs(f-c)<360?w=e6({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(g,h/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):w=l_({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),$.createElement("path",Ip({},ae(r,!0),{className:p,d:w,role:"img"}))};function Go(e){"@babel/helpers - typeof";return Go=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},Go(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function w6(e,t){return ti(e.getTime(),t.getTime())}function x6(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function S6(e,t){return e===t}function pb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,u=0;(o=a.next())&&!o.done;){for(var s=t.entries(),f=!1,c=0;(l=s.next())&&!l.done;){if(i[c]){c++;continue}var d=o.value,p=l.value;if(r.equals(d[0],p[0],u,c,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;u++}return!0}var O6=ti;function _6(e,t,r){var n=db(e),i=n.length;if(db(t).length!==i)return!1;for(;i-- >0;)if(!d_(e,t,r,n[i]))return!1;return!0}function Ba(e,t,r){var n=cb(e),i=n.length;if(cb(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!d_(e,t,r,a)||(o=fb(e,a),l=fb(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function P6(e,t){return ti(e.valueOf(),t.valueOf())}function A6(e,t){return e.source===t.source&&e.flags===t.flags}function hb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var u=t.values(),s=!1,f=0;(l=u.next())&&!l.done;){if(!i[f]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){s=i[f]=!0;break}f++}if(!s)return!1}return!0}function E6(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function $6(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 d_(e,t,r,n){return(n===g6||n===m6||n===y6)&&(e.$$typeof||t.$$typeof)?!0:v6(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var T6="[object Arguments]",C6="[object Boolean]",j6="[object Date]",k6="[object Error]",M6="[object Map]",N6="[object Number]",I6="[object Object]",D6="[object RegExp]",L6="[object Set]",R6="[object String]",B6="[object URL]",z6=Array.isArray,vb=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,yb=Object.assign,F6=Object.prototype.toString.call.bind(Object.prototype.toString);function W6(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,s=e.areRegExpsEqual,f=e.areSetsEqual,c=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(h,g,w){if(h===g)return!0;if(h==null||g==null)return!1;var y=typeof h;if(y!==typeof g)return!1;if(y!=="object")return y==="number"?o(h,g,w):y==="function"?i(h,g,w):!1;var v=h.constructor;if(v!==g.constructor)return!1;if(v===Object)return l(h,g,w);if(z6(h))return t(h,g,w);if(vb!=null&&vb(h))return c(h,g,w);if(v===Date)return r(h,g,w);if(v===RegExp)return s(h,g,w);if(v===Map)return a(h,g,w);if(v===Set)return f(h,g,w);var m=F6(h);return m===j6?r(h,g,w):m===D6?s(h,g,w):m===M6?a(h,g,w):m===L6?f(h,g,w):m===I6?typeof h.then!="function"&&typeof g.then!="function"&&l(h,g,w):m===B6?d(h,g,w):m===k6?n(h,g,w):m===T6?l(h,g,w):m===C6||m===N6||m===R6?u(h,g,w):!1}}function U6(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ba:b6,areDatesEqual:w6,areErrorsEqual:x6,areFunctionsEqual:S6,areMapsEqual:n?sb(pb,Ba):pb,areNumbersEqual:O6,areObjectsEqual:n?Ba:_6,arePrimitiveWrappersEqual:P6,areRegExpsEqual:A6,areSetsEqual:n?sb(hb,Ba):hb,areTypedArraysEqual:n?Ba:E6,areUrlsEqual:$6};if(r&&(i=yb({},i,r(i))),t){var a=eu(i.areArraysEqual),o=eu(i.areMapsEqual),l=eu(i.areObjectsEqual),u=eu(i.areSetsEqual);i=yb({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return i}function H6(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function V6(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(u,s){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,p=f.meta;return r(u,s,{cache:d,equals:i,meta:p,strict:a})};if(t)return function(u,s){return r(u,s,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(u,s){return r(u,s,o)}}var G6=bn();bn({strict:!0});bn({circular:!0});bn({circular:!0,strict:!0});bn({createInternalComparator:function(){return ti}});bn({strict:!0,createInternalComparator:function(){return ti}});bn({circular:!0,createInternalComparator:function(){return ti}});bn({circular:!0,createInternalComparator:function(){return ti},strict:!0});function bn(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=U6(e),u=W6(l),s=n?n(u):H6(u);return V6({circular:r,comparator:u,createState:i,equals:s,strict:o})}function K6(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mb(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):K6(i)};requestAnimationFrame(n)}function Rp(e){"@babel/helpers - typeof";return Rp=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},Rp(e)}function q6(e){return Z6(e)||Q6(e)||Y6(e)||X6()}function X6(){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 Y6(e,t){if(e){if(typeof e=="string")return gb(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 gb(e,t)}}function gb(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},g=function(y){for(var v=y>1?1:y,m=v,S=0;S<8;++S){var b=c(m)-v,x=p(m);if(Math.abs(b-v)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,l=o===void 0?17:o,u=function(f,c,d){var p=-(f-c)*n,h=d*a,g=d+(p-h)*l/1e3,w=d*l/1e3+f;return Math.abs(w-c)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 TU(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 Wf(e){return MU(e)||kU(e)||jU(e)||CU()}function CU(){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 jU(e,t){if(e){if(typeof e=="string")return Up(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 Up(e,t)}}function kU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MU(e){if(Array.isArray(e))return Up(e)}function Up(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 ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}var Rr=function(e){RU(r,e);var t=BU(r);function r(n,i){var a;NU(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,u=o.attributeName,s=o.from,f=o.to,c=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Gp(a)),a.changeStyle=a.changeStyle.bind(Gp(a)),!l||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),Vp(a);if(c&&c.length)a.state={style:c[0].style};else if(s){if(typeof d=="function")return a.state={style:s},Vp(a);a.state={style:u?Ga({},u,s):s}}else a.state={style:{}};return a}return DU(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,l=a.canBegin,u=a.attributeName,s=a.shouldReAnimate,f=a.to,c=a.from,d=this.state.style;if(l){if(!o){var p={style:u?Ga({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(p);return}if(!(G6(i.to,f)&&i.canBegin&&i.isActive)){var h=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=h||s?c:i.to;if(this.state&&d){var w={style:u?Ga({},u,g):g};(u&&d[u]!==g||!u&&d!==g)&&this.setState(w)}this.runAnimation(Xt(Xt({},this.props),{},{from:g,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,l=i.to,u=i.duration,s=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,p=AU(o,l,vU(s),u,this.changeStyle),h=function(){a.stopJSAnimation=p()};this.manager.start([d,f,h,u,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,s=o[0],f=s.style,c=s.duration,d=c===void 0?0:c,p=function(g,w,y){if(y===0)return g;var v=w.duration,m=w.easing,S=m===void 0?"ease":m,b=w.style,x=w.properties,O=w.onAnimationEnd,_=y>0?o[y-1]:w,E=x||Object.keys(b);if(typeof S=="function"||S==="spring")return[].concat(Wf(g),[a.runJSAnimation.bind(a,{from:_.style,to:b,duration:v,easing:S}),v]);var A=xb(E,v,S),P=Xt(Xt(Xt({},_.style),b),{},{transition:A});return[].concat(Wf(g),[P,v,O]).filter(nU)};return this.manager.start([u].concat(Wf(o.reduce(p,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=J6());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,s=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,p=i.children,h=this.manager;if(this.unSubscribe=h.subscribe(this.handleStyleChange),typeof s=="function"||typeof p=="function"||s==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var g=l?Ga({},l,u):u,w=xb(Object.keys(g),o,s);h.start([f,a,Xt(Xt({},g),{},{transition:w}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=$U(i,EU),s=R.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||s===0||o<=0)return a;var c=function(p){var h=p.props,g=h.style,w=g===void 0?{}:g,y=h.className,v=R.cloneElement(p,Xt(Xt({},u),{},{style:Xt(Xt({},w),f),className:y}));return v};return s===1?c(R.Children.only(a)):$.createElement("div",null,R.Children.map(a,function(d){return c(d)}))}}]),r}(R.PureComponent);Rr.displayName="Animate";Rr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Rr.propTypes={from:ce.oneOfType([ce.object,ce.string]),to:ce.oneOfType([ce.object,ce.string]),attributeName:ce.string,duration:ce.number,begin:ce.number,easing:ce.oneOfType([ce.string,ce.func]),steps:ce.arrayOf(ce.shape({duration:ce.number.isRequired,style:ce.object.isRequired,easing:ce.oneOfType([ce.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ce.func]),properties:ce.arrayOf("string"),onAnimationEnd:ce.func})),children:ce.oneOfType([ce.node,ce.func]),isActive:ce.bool,canBegin:ce.bool,onAnimationEnd:ce.func,shouldReAnimate:ce.bool,onAnimationStart:ce.func,onAnimationReStart:ce.func};function Xo(e){"@babel/helpers - typeof";return Xo=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},Xo(e)}function xs(){return xs=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,u=n>=0?1:-1,s=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],d=0,p=4;do?o:a[d];f="M".concat(t,",").concat(r+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(r)),f+="L ".concat(t+n-u*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`, - `).concat(t+n,",").concat(r+l*c[1])),f+="L ".concat(t+n,",").concat(r+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`, - `).concat(t+n-u*c[2],",").concat(r+i)),f+="L ".concat(t+u*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`, - `).concat(t,",").concat(r+i-l*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var h=Math.min(o,a);f="M ".concat(t,",").concat(r+l*h,` - A `).concat(h,",").concat(h,",0,0,").concat(s,",").concat(t+u*h,",").concat(r,` - L `).concat(t+n-u*h,",").concat(r,` - A `).concat(h,",").concat(h,",0,0,").concat(s,",").concat(t+n,",").concat(r+l*h,` - L `).concat(t+n,",").concat(r+i-l*h,` - A `).concat(h,",").concat(h,",0,0,").concat(s,",").concat(t+n-u*h,",").concat(r+i,` - L `).concat(t+u*h,",").concat(r+i,` - A `).concat(h,",").concat(h,",0,0,").concat(s,",").concat(t,",").concat(r+i-l*h," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},XU=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,u=r.height;if(Math.abs(l)>0&&Math.abs(u)>0){var s=Math.min(a,a+l),f=Math.max(a,a+l),c=Math.min(o,o+u),d=Math.max(o,o+u);return n>=s&&n<=f&&i>=c&&i<=d}return!1},YU={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ly=function(t){var r=Tb(Tb({},YU),t),n=R.useRef(),i=R.useState(-1),a=FU(i,2),o=a[0],l=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&l(S)}catch{}},[]);var u=r.x,s=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,h=r.animationEasing,g=r.animationDuration,w=r.animationBegin,y=r.isAnimationActive,v=r.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var m=le("recharts-rectangle",p);return v?$.createElement(Rr,{canBegin:o>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:g,animationEasing:h,isActive:v},function(S){var b=S.width,x=S.height,O=S.x,_=S.y;return $.createElement(Rr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:g,isActive:y,easing:h},$.createElement("path",xs({},ae(r,!0),{className:m,d:Cb(O,_,b,x,d),ref:n})))}):$.createElement("path",xs({},ae(r,!0),{className:m,d:Cb(u,s,f,c,d)}))};function Kp(){return Kp=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 nH(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 iH=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},aH=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,h=t.className,g=rH(t,QU),w=ZU({x:n,y:a,top:l,left:s,width:c,height:p},g);return!G(n)||!G(a)||!G(c)||!G(p)||!G(l)||!G(s)?null:$.createElement("path",qp({},ae(w,!0),{className:le("recharts-cross",h),d:iH(n,a,c,p,l,s)}))},oH=kS,lH=oH(Object.getPrototypeOf,Object),uH=lH,sH=zr,cH=uH,fH=Fr,dH="[object Object]",pH=Function.prototype,hH=Object.prototype,b_=pH.toString,vH=hH.hasOwnProperty,yH=b_.call(Object);function mH(e){if(!fH(e)||sH(e)!=dH)return!1;var t=cH(e);if(t===null)return!0;var r=vH.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&b_.call(r)==yH}var gH=mH;const bH=me(gH);var wH=zr,xH=Fr,SH="[object Boolean]";function OH(e){return e===!0||e===!1||xH(e)&&wH(e)==SH}var _H=OH;const PH=me(_H);function Qo(e){"@babel/helpers - typeof";return Qo=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},Qo(e)}function Ss(){return Ss=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:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:g,animationEasing:h,isActive:y},function(m){var S=m.upperWidth,b=m.lowerWidth,x=m.height,O=m.x,_=m.y;return $.createElement(Rr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:g,easing:h},$.createElement("path",Ss({},ae(r,!0),{className:v,d:Ib(O,_,S,b,x),ref:n})))}):$.createElement("g",null,$.createElement("path",Ss({},ae(r,!0),{className:v,d:Ib(u,s,f,c,d)})))},DH=["option","shapeType","propTransformer","activeClassName","isActive"];function Zo(e){"@babel/helpers - typeof";return Zo=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},Zo(e)}function LH(e,t){if(e==null)return{};var r=RH(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 RH(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 Db(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 Os(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),Ot(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Ot(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Ot(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Ot(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Ot(n,"handleSlideDragStart",function(i){var a=Ub(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 S9(t,e),g9(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,l=this.props,u=l.gap,s=l.data,f=s.length-1,c=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,c),h=t.getIndexInRange(o,d);return{startIndex:p-p%u,endIndex:h===f?f:h-h%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=Ct(a[n],l,n);return te(o)?o(u,n):u}},{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,l=i.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,p=u.endIndex,h=u.onChange,g=n.pageX-a;g>0?g=Math.min(g,s+f-c-l,s+f-c-o):g<0&&(g=Math.max(g,s-o,s-l));var w=this.getIndex({startX:o+g,endX:l+g});(w.startIndex!==d||w.endIndex!==p)&&h&&h(w),this.setState({startX:o+g,endX:l+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=Ub(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,l=i.endX,u=i.startX,s=this.state[o],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,h=f.onChange,g=f.gap,w=f.data,y={startX:this.state.startX,endX:this.state.endX},v=n.pageX-a;v>0?v=Math.min(v,c+d-p-s):v<0&&(v=Math.max(v,c-s)),y[o]=s+v;var m=this.getIndex(y),S=m.startIndex,b=m.endIndex,x=function(){var _=w.length-1;return o==="startX"&&(l>u?S%g===0:b%g===0)||lu?b%g===0:S%g===0)||l>u&&b===_};this.setState(Ot(Ot({},o,s+v),"brushMoveStartX",n.pageX),function(){h&&x()&&h(m)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,s=o.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=l.length)){var p=l[d];i==="startX"&&p>=s||i==="endX"&&p<=u||this.setState(Ot({},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,l=n.height,u=n.fill,s=n.stroke;return $.createElement("rect",{stroke:s,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.data,s=n.children,f=n.padding,c=R.Children.only(s);return c?$.cloneElement(c,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,p=u.ariaLabel,h=u.data,g=u.startIndex,w=u.endIndex,y=Math.max(n,this.props.x),v=Hf(Hf({},ae(this.props,!1)),{},{x:y,y:s,width:f,height:c}),m=p||"Min value: ".concat((a=h[g])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=h[w])===null||o===void 0?void 0:o.name);return $.createElement(Ne,{tabIndex:0,role:"slider","aria-label":m,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(b){["ArrowLeft","ArrowRight"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),l.handleTravellerMoveKeyboard(b.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,v))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,s=a.travellerWidth,f=Math.min(n,i)+s,c=Math.max(Math.abs(i-n)-s,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:c,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,u=n.travellerWidth,s=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,h={pointerEvents:"none",fill:s};return $.createElement(Ne,{className:"recharts-brush-texts"},$.createElement(ts,Ps({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:o+l/2},h),this.getTextOfTick(i)),$.createElement(ts,Ps({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+p,y:o+l/2},h),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,u=n.y,s=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,h=d.endX,g=d.isTextActive,w=d.isSlideMoving,y=d.isTravellerMoving,v=d.isTravellerFocused;if(!i||!i.length||!G(l)||!G(u)||!G(s)||!G(f)||s<=0||f<=0)return null;var m=le("recharts-brush",a),S=$.Children.count(o)===1,b=y9("userSelect","none");return $.createElement(Ne,{className:m,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,h),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(h,"endX"),(g||w||y||v||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,u=n.stroke,s=Math.floor(a+l/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),$.createElement("line",{x1:i+1,y1:s,x2:i+o-1,y2:s,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:s+2,x2:i+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return $.isValidElement(n)?a=$.cloneElement(n,i):te(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,u=n.travellerWidth,s=n.updateId,f=n.startIndex,c=n.endIndex;if(a!==i.prevData||s!==i.prevUpdateId)return Hf({prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o},a&&a.length?_9({data:a,width:o,x:l,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,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,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);n[u]>i?l=u:o=u}return i>=n[l]?l:o}}])}(R.PureComponent);Ot(Yi,"displayName","Brush");Ot(Yi,"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 P9=Mv;function A9(e,t){var r;return P9(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var E9=A9,$9=_S,T9=yn,C9=E9,j9=wt,k9=Sc;function M9(e,t,r){var n=j9(e)?$9:C9;return r&&k9(e,t,r)&&(t=void 0),n(e,T9(t))}var N9=M9;const I9=me(N9);var yr=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Hb=GS;function D9(e,t,r){t=="__proto__"&&Hb?Hb(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var L9=D9,R9=L9,B9=HS,z9=yn;function F9(e,t){var r={};return t=z9(t),B9(e,function(n,i,a){R9(r,i,t(n,i,a))}),r}var W9=F9;const U9=me(W9);function H9(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 l7(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 u7(e,t){var r=e.x,n=e.y,i=o7(e,r7),a="".concat(r),o=parseInt(a,10),l="".concat(n),u=parseInt(l,10),s="".concat(t.height||i.height),f=parseInt(s,10),c="".concat(t.width||i.width),d=parseInt(c,10);return za(za(za(za(za({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function Gb(e){return $.createElement(VH,Yp({shapeType:"rectangle",propTransformer:u7,activeClassName:"recharts-active-bar"},e))}var s7=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=typeof n=="number";return a?t(n,i):(a||qn(),r)}},c7=["value","background"],P_;function Qi(e){"@babel/helpers - typeof";return Qi=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},Qi(e)}function f7(e,t){if(e==null)return{};var r=d7(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 d7(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 Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(N)0&&Math.abs(M)0&&(I=Math.min((Z||0)-(M[fe-1]||0),I))}),Number.isFinite(I)){var N=I/T,L=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(O=N*L/2),g.padding==="no-gap"){var B=Gn(t.barCategoryGap,N*L),C=N*L/2;O=C-B-(C-B)/L*B}}}i==="xAxis"?_=[n.left+(m.left||0)+(O||0),n.left+n.width-(m.right||0)-(O||0)]:i==="yAxis"?_=u==="horizontal"?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(O||0),n.top+n.height-(m.bottom||0)-(O||0)]:_=g.range,b&&(_=[_[1],_[0]]);var k=K5(g,a,d),F=k.scale,H=k.realScaleType;F.domain(y).range(_),q5(F);var z=rW(F,Zt(Zt({},g),{},{realScaleType:H}));i==="xAxis"?(P=w==="top"&&!S||w==="bottom"&&S,E=n.left,A=c[x]-P*g.height):i==="yAxis"&&(P=w==="left"&&!S||w==="right"&&S,E=c[x]-P*g.width,A=n.top);var V=Zt(Zt(Zt({},g),z),{},{realScaleType:H,x:E,y:A,scale:F,width:i==="xAxis"?n.width:g.width,height:i==="yAxis"?n.height:g.height});return V.bandSize=vs(V,z),!g.hide&&i==="xAxis"?c[x]+=(P?-1:1)*V.height:g.hide||(c[x]+=(P?-1:1)*V.width),Zt(Zt({},p),{},Dc({},h,V))},{})},T_=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)}},_7=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return T_({x:r,y:n},{x:i,y:a})},C_=function(){function e(t){w7(this,e),this.scale=t}return x7(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 l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}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)}}])}();Dc(C_,"EPS",1e-4);var sy=function(t){var r=Object.keys(t).reduce(function(n,i){return Zt(Zt({},n),{},Dc({},i,C_.create(t[i])))},{});return Zt(Zt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return U9(i,function(u,s){return r[s].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return __(i,function(a,o){return r[o].isInRange(a)})}})};function P7(e){return(e%180+180)%180}var A7=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=P7(i),o=a*Math.PI/180,l=Math.atan(n/r),u=o>l&&o-1?i[a?t[o]:o]:void 0}}var j7=C7,k7=w_;function M7(e){var t=k7(e),r=t%1;return t===t?r?t-r:t:0}var N7=M7,I7=RS,D7=yn,L7=N7,R7=Math.max;function B7(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:L7(r);return i<0&&(i=R7(n+i,0)),I7(e,D7(t),i)}var z7=B7,F7=j7,W7=z7,U7=F7(W7),H7=U7;const V7=me(H7);var G7=kC(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("")}),cy=R.createContext(void 0),fy=R.createContext(void 0),j_=R.createContext(void 0),k_=R.createContext({}),M_=R.createContext(void 0),N_=R.createContext(0),I_=R.createContext(0),Qb=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,u=t.width,s=t.height,f=G7(a);return $.createElement(cy.Provider,{value:n},$.createElement(fy.Provider,{value:i},$.createElement(k_.Provider,{value:a},$.createElement(j_.Provider,{value:f},$.createElement(M_.Provider,{value:o},$.createElement(N_.Provider,{value:s},$.createElement(I_.Provider,{value:u},l)))))))},K7=function(){return R.useContext(M_)},D_=function(t){var r=R.useContext(cy);r==null&&qn();var n=r[t];return n==null&&qn(),n},q7=function(){var t=R.useContext(cy);return Xr(t)},X7=function(){var t=R.useContext(fy),r=V7(t,function(n){return __(n.domain,Number.isFinite)});return r||Xr(t)},L_=function(t){var r=R.useContext(fy);r==null&&qn();var n=r[t];return n==null&&qn(),n},Y7=function(){var t=R.useContext(j_);return t},Q7=function(){return R.useContext(k_)},dy=function(){return R.useContext(I_)},py=function(){return R.useContext(N_)};function Zi(e){"@babel/helpers - typeof";return Zi=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},Zi(e)}function Z7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J7(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 NV(e,t){return H_(e,t+1)}function IV(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,u=0,s=1,f=o,c=function(){var h=n==null?void 0:n[u];if(h===void 0)return{v:H_(n,s)};var g=u,w,y=function(){return w===void 0&&(w=r(h,g)),w},v=h.coordinate,m=u===0||ks(e,v,y,f,l);m||(u=0,f=o,s+=1),m&&(f=v+e*(y()/2+i),u+=s)},d;s<=a.length;)if(d=c(),d)return d.v;return[]}function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function a1(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-w*e:p.coordinate})}else a[d]=p=nt(nt({},p),{},{tickCoord:p.coordinate});var y=ks(e,p.tickCoord,g,l,u);y&&(u=p.tickCoord-e*(g()/2+i),a[d]=nt(nt({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)s(f);return a}function zV(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,u=t.start,s=t.end;if(a){var f=n[l-1],c=r(f,l-1),d=e*(f.coordinate+e*c/2-s);o[l-1]=f=nt(nt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=ks(e,f.tickCoord,function(){return c},u,s);p&&(s=f.tickCoord-e*(c/2+i),o[l-1]=nt(nt({},f),{},{isShow:!0}))}for(var h=a?l-1:l,g=function(v){var m=o[v],S,b=function(){return S===void 0&&(S=r(m,v)),S};if(v===0){var x=e*(m.coordinate-e*b()/2-u);o[v]=m=nt(nt({},m),{},{tickCoord:x<0?m.coordinate-x*e:m.coordinate})}else o[v]=m=nt(nt({},m),{},{tickCoord:m.coordinate});var O=ks(e,m.tickCoord,b,u,s);O&&(u=m.tickCoord+e*(b()/2+i),o[v]=nt(nt({},m),{},{isShow:!0}))},w=0;w=2?nr(i[1].coordinate-i[0].coordinate):1,y=MV(a,w,p);return u==="equidistantPreserveStart"?IV(w,y,g,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=zV(w,y,g,i,o,u==="preserveStartEnd"):d=BV(w,y,g,i,o),d.filter(function(v){return v.isShow}))}var FV=["viewBox"],WV=["viewBox"],UV=["ticks"];function ta(e){"@babel/helpers - typeof";return ta=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},ta(e)}function xi(){return xi=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 HV(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 VV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l1(e,t){for(var r=0;r0?u(this.props):u(p)),o<=0||l<=0||!h||!h.length?null:$.createElement(Ne,{className:le("recharts-cartesian-axis",s),ref:function(w){n.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(h,this.state.fontSize,this.state.letterSpacing),at.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return $.isValidElement(n)?o=$.cloneElement(n,i):te(n)?o=n(i):o=$.createElement(ts,xi({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(R.Component);my(Sa,"displayName","CartesianAxis");my(Sa,"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 ZV=["x1","y1","x2","y2","key"],JV=["offset"];function Xn(e){"@babel/helpers - typeof";return Xn=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},Xn(e)}function u1(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 ot(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nG(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 iG=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,l=t.height,u=t.ry;return $.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function K_(e,t){var r;if($.isValidElement(e))r=$.cloneElement(e,t);else if(te(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=s1(t,ZV),s=ae(u,!1);s.offset;var f=s1(s,JV);r=$.createElement("line",Nn({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function aG(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(l,u){var s=ot(ot({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return K_(i,s)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function oG(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(l,u){var s=ot(ot({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return K_(i,s)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function lG(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,s=u===void 0?!0:u;if(!s||!t||!t.length)return null;var f=l.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var h=!f[p+1],g=h?i+o-d:f[p+1]-d;if(g<=0)return null;var w=p%t.length;return $.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:g,width:a,stroke:"none",fill:t[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function uG(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,s=e.verticalPoints;if(!r||!n||!n.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var h=!f[p+1],g=h?a+l-d:f[p+1]-d;if(g<=0)return null;var w=p%n.length;return $.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:g,height:u,stroke:"none",fill:n[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var sG=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return n_(yy(ot(ot(ot({},Sa.defaultProps),n),{},{ticks:Ar(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},cG=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return n_(yy(ot(ot(ot({},Sa.defaultProps),n),{},{ticks:Ar(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},oi={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function q_(e){var t,r,n,i,a,o,l=dy(),u=py(),s=Q7(),f=ot(ot({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:oi.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:oi.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:oi.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:oi.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:oi.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:oi.verticalFill,x:G(e.x)?e.x:s.left,y:G(e.y)?e.y:s.top,width:G(e.width)?e.width:s.width,height:G(e.height)?e.height:s.height}),c=f.x,d=f.y,p=f.width,h=f.height,g=f.syncWithTicks,w=f.horizontalValues,y=f.verticalValues,v=q7(),m=X7();if(!G(p)||p<=0||!G(h)||h<=0||!G(c)||c!==+c||!G(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||sG,b=f.horizontalCoordinatesGenerator||cG,x=f.horizontalPoints,O=f.verticalPoints;if((!x||!x.length)&&te(b)){var _=w&&w.length,E=b({yAxis:m?ot(ot({},m),{},{ticks:_?w:m.ticks}):void 0,width:l,height:u,offset:s},_?!0:g);Tr(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Xn(E),"]")),Array.isArray(E)&&(x=E)}if((!O||!O.length)&&te(S)){var A=y&&y.length,P=S({xAxis:v?ot(ot({},v),{},{ticks:A?y:v.ticks}):void 0,width:l,height:u,offset:s},A?!0:g);Tr(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Xn(P),"]")),Array.isArray(P)&&(O=P)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement(iG,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),$.createElement(aG,Nn({},f,{offset:s,horizontalPoints:x,xAxis:v,yAxis:m})),$.createElement(oG,Nn({},f,{offset:s,verticalPoints:O,xAxis:v,yAxis:m})),$.createElement(lG,Nn({},f,{horizontalPoints:x})),$.createElement(uG,Nn({},f,{verticalPoints:O})))}q_.displayName="CartesianGrid";var fG=["type","layout","connectNulls","ref"],dG=["key"];function ra(e){"@babel/helpers - typeof";return ra=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},ra(e)}function c1(e,t){if(e==null)return{};var r=pG(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 pG(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 oo(){return oo=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(li(u.slice(0,h)),[c-g]);break}var w=p.length%2===0?[0,d]:[d];return[].concat(li(t.repeat(u,f)),li(p),w).map(function(y){return"".concat(y,"px")}).join(", ")}),Jt(r,"id",hl("recharts-line-")),Jt(r,"pathRef",function(o){r.mainCurve=o}),Jt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Jt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return OG(t,e),bG(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,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=Wt(f,wl);if(!c)return null;var d=function(g,w){return{x:g.x,y:g.y,value:g.value,errorVal:Ct(g.payload,w)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return $.createElement(Ne,p,c.map(function(h){return $.cloneElement(h,{key:"bar-".concat(h.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,s=l.points,f=l.dataKey,c=ae(this.props,!1),d=ae(u,!0),p=s.map(function(g,w){var y=St(St(St({key:"dot-".concat(w),r:3},c),d),{},{index:w,cx:g.x,cy:g.y,value:g.value,dataKey:f,payload:g.payload,points:s});return t.renderDotItem(u,y)}),h={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return $.createElement(Ne,oo({className:"recharts-line-dots",key:"dots"},h),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var l=this.props,u=l.type,s=l.layout,f=l.connectNulls;l.ref;var c=c1(l,fG),d=St(St(St({},ae(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:s,connectNulls:f});return $.createElement(Lp,oo({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,s=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,p=o.animationId,h=o.animateNewValues,g=o.width,w=o.height,y=this.state,v=y.prevPoints,m=y.totalLength;return $.createElement(Rr,{begin:f,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var b=S.t;if(v){var x=v.length/l.length,O=l.map(function(T,I){var M=Math.floor(I*x);if(v[M]){var N=v[M],L=tr(N.x,T.x),B=tr(N.y,T.y);return St(St({},T),{},{x:L(b),y:B(b)})}if(h){var C=tr(g*2,T.x),k=tr(w/2,T.y);return St(St({},T),{},{x:C(b),y:k(b)})}return St(St({},T),{},{x:T.x,y:T.y})});return a.renderCurveStatically(O,n,i)}var _=tr(0,m),E=_(b),A;if(u){var P="".concat(u).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});A=a.getStrokeDasharray(E,m,P)}else A=a.generateSimpleStrokeDasharray(m,E);return a.renderCurveStatically(l,n,i,{strokeDasharray:A})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,l=a.isAnimationActive,u=this.state,s=u.prevPoints,f=u.totalLength;return l&&o&&o.length&&(!s&&f>0||!jc(s,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,l=i.points,u=i.className,s=i.xAxis,f=i.yAxis,c=i.top,d=i.left,p=i.width,h=i.height,g=i.isAnimationActive,w=i.id;if(a||!l||!l.length)return null;var y=this.state.isAnimationFinished,v=l.length===1,m=le("recharts-line",u),S=s&&s.allowDataOverflow,b=f&&f.allowDataOverflow,x=S||b,O=ie(w)?this.id:w,_=(n=ae(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=_.r,A=E===void 0?3:E,P=_.strokeWidth,T=P===void 0?2:P,I=Lj(o)?o:{},M=I.clipDot,N=M===void 0?!0:M,L=A*2+T;return $.createElement(Ne,{className:m},S||b?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(O)},$.createElement("rect",{x:S?d:d-p/2,y:b?c:c-h/2,width:S?p:p*2,height:b?h:h*2})),!N&&$.createElement("clipPath",{id:"clipPath-dots-".concat(O)},$.createElement("rect",{x:d-L/2,y:c-L/2,width:p+L,height:h+L}))):null,!v&&this.renderCurve(x,O),this.renderErrorBar(x,O),(v||o)&&this.renderDots(x,N,O),(!g||y)&&sn.renderCallByParent(this.props,l))}}],[{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(li(n),[0]):n,o=[],l=0;le.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 dK(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 pK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hK(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&G(i)&&G(a)?t.slice(i,a+1):[]};function cP(e){return e==="number"?[0,"auto"]:void 0}var vh=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=Uc(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=c===void 0?l:c;d=Bu(p,o.dataKey,i)}else d=c&&c[n]||l[n];return d?[].concat(oa(u),[a_(s,d)]):u},[])},g1=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=AK(a,n),l=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=F5(o,l,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=vh(t,r,f,c),p=EK(n,l,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},$K=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=r_(f,a);return n.reduce(function(h,g){var w,y=g.type.defaultProps!==void 0?D(D({},g.type.defaultProps),g.props):g.props,v=y.type,m=y.dataKey,S=y.allowDataOverflow,b=y.allowDuplicatedCategory,x=y.scale,O=y.ticks,_=y.includeHidden,E=y[o];if(h[E])return h;var A=Uc(t.data,{graphicalItems:i.filter(function(z){var V,Z=o in z.props?z.props[o]:(V=z.type.defaultProps)===null||V===void 0?void 0:V[o];return Z===E}),dataStartIndex:u,dataEndIndex:s}),P=A.length,T,I,M;eK(y.domain,S,v)&&(T=kp(y.domain,null,S),p&&(v==="number"||x!=="auto")&&(M=io(A,m,"category")));var N=cP(v);if(!T||T.length===0){var L,B=(L=y.domain)!==null&&L!==void 0?L:N;if(m){if(T=io(A,m,v),v==="category"&&p){var C=Ej(T);b&&C?(I=T,T=_s(0,P)):b||(T=Y0(B,T,g).reduce(function(z,V){return z.indexOf(V)>=0?z:[].concat(oa(z),[V])},[]))}else if(v==="category")b?T=T.filter(function(z){return z!==""&&!ie(z)}):T=Y0(B,T,g).reduce(function(z,V){return z.indexOf(V)>=0||V===""||ie(V)?z:[].concat(oa(z),[V])},[]);else if(v==="number"){var k=G5(A,i.filter(function(z){var V,Z,fe=o in z.props?z.props[o]:(V=z.type.defaultProps)===null||V===void 0?void 0:V[o],se="hide"in z.props?z.props.hide:(Z=z.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return fe===E&&(_||!se)}),m,a,f);k&&(T=k)}p&&(v==="number"||x!=="auto")&&(M=io(A,m,"category"))}else p?T=_s(0,P):l&&l[E]&&l[E].hasStack&&v==="number"?T=d==="expand"?[0,1]:i_(l[E].stackGroups,u,s):T=t_(A,i.filter(function(z){var V=o in z.props?z.props[o]:z.type.defaultProps[o],Z="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return V===E&&(_||!Z)}),v,f,!0);if(v==="number")T=dh(c,T,E,a,O),B&&(T=kp(B,T,S));else if(v==="category"&&B){var F=B,H=T.every(function(z){return F.indexOf(z)>=0});H&&(T=F)}}return D(D({},h),{},Y({},E,D(D({},y),{},{axisType:a,domain:T,categoricalDomain:M,duplicateDomain:I,originalDomain:(w=y.domain)!==null&&w!==void 0?w:N,isCategorical:p,layout:f})))},{})},TK=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=Uc(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:s}),p=d.length,h=r_(f,a),g=-1;return n.reduce(function(w,y){var v=y.type.defaultProps!==void 0?D(D({},y.type.defaultProps),y.props):y.props,m=v[o],S=cP("number");if(!w[m]){g++;var b;return h?b=_s(0,p):l&&l[m]&&l[m].hasStack?(b=i_(l[m].stackGroups,u,s),b=dh(c,b,m,a)):(b=kp(S,t_(d,n.filter(function(x){var O,_,E=o in x.props?x.props[o]:(O=x.type.defaultProps)===null||O===void 0?void 0:O[o],A="hide"in x.props?x.props.hide:(_=x.type.defaultProps)===null||_===void 0?void 0:_.hide;return E===m&&!A}),"number",f),i.defaultProps.allowDataOverflow),b=dh(c,b,m,a)),D(D({},w),{},Y({},m,D(D({axisType:a},i.defaultProps),{},{hide:!0,orientation:Ft(_K,"".concat(a,".").concat(g%2),null),domain:b,originalDomain:S,isCategorical:h,layout:f})))}return w},{})},CK=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=Wt(f,a),p={};return d&&d.length?p=$K(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s}):o&&o.length&&(p=TK(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s})),p},jK=function(t){var r=Xr(t),n=Ar(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Nv(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:vs(r,n)}},b1=function(t){var r=t.children,n=t.defaultShowTooltip,i=Pt(r,Yi),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}},kK=function(t){return!t||!t.length?!1:t.some(function(r){var n=$r(r&&r.type);return n&&n.indexOf("Bar")>=0})},w1=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"}},MK=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,s=n.width,f=n.height,c=n.children,d=n.margin||{},p=Pt(c,Yi),h=Pt(c,Ln),g=Object.keys(u).reduce(function(b,x){var O=u[x],_=O.orientation;return!O.mirror&&!O.hide?D(D({},b),{},Y({},_,b[_]+O.width)):b},{left:d.left||0,right:d.right||0}),w=Object.keys(o).reduce(function(b,x){var O=o[x],_=O.orientation;return!O.mirror&&!O.hide?D(D({},b),{},Y({},_,Ft(b,"".concat(_))+O.height)):b},{top:d.top||0,bottom:d.bottom||0}),y=D(D({},w),g),v=y.bottom;p&&(y.bottom+=p.props.height||Yi.defaultProps.height),h&&r&&(y=H5(y,i,n,r));var m=s-y.left-y.right,S=f-y.top-y.bottom;return D(D({brushBottom:v},y),{},{width:Math.max(m,0),height:Math.max(S,0)})},NK=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},IK=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(y,v){var m=v.graphicalItems,S=v.stackGroups,b=v.offset,x=v.updateId,O=v.dataStartIndex,_=v.dataEndIndex,E=y.barSize,A=y.layout,P=y.barGap,T=y.barCategoryGap,I=y.maxBarSize,M=w1(A),N=M.numericAxisName,L=M.cateAxisName,B=kK(m),C=[];return m.forEach(function(k,F){var H=Uc(y.data,{graphicalItems:[k],dataStartIndex:O,dataEndIndex:_}),z=k.type.defaultProps!==void 0?D(D({},k.type.defaultProps),k.props):k.props,V=z.dataKey,Z=z.maxBarSize,fe=z["".concat(N,"Id")],se=z["".concat(L,"Id")],Ie={},ke=u.reduce(function(wn,xn){var Hc=v["".concat(xn.axisType,"Map")],gy=z["".concat(xn.axisType,"Id")];Hc&&Hc[gy]||xn.axisType==="zAxis"||qn();var by=Hc[gy];return D(D({},wn),{},Y(Y({},xn.axisType,by),"".concat(xn.axisType,"Ticks"),Ar(by)))},Ie),K=ke[L],J=ke["".concat(L,"Ticks")],ee=S&&S[fe]&&S[fe].hasStack&&iW(k,S[fe].stackGroups),W=$r(k.type).indexOf("Bar")>=0,re=vs(K,J),Q=[],Te=B&&W5({barSize:E,stackGroups:S,totalSize:NK(ke,L)});if(W){var de,et,xt=ie(Z)?I:Z,ri=(de=(et=vs(K,J,!0))!==null&&et!==void 0?et:xt)!==null&&de!==void 0?de:0;Q=U5({barGap:P,barCategoryGap:T,bandSize:ri!==re?ri:re,sizeList:Te[se],maxBarSize:xt}),ri!==re&&(Q=Q.map(function(wn){return D(D({},wn),{},{position:D(D({},wn.position),{},{offset:wn.position.offset-ri/2})})}))}var Ol=k&&k.type&&k.type.getComposedData;Ol&&C.push({props:D(D({},Ol(D(D({},ke),{},{displayedData:H,props:y,dataKey:V,item:k,bandSize:re,barPosition:Q,offset:b,stackedData:ee,layout:A,dataStartIndex:O,dataEndIndex:_}))),{},Y(Y(Y({key:k.key||"item-".concat(F)},N,ke[N]),L,ke[L]),"animationId",x)),childIndex:zj(k,y.children),item:k})}),C},p=function(y,v){var m=y.props,S=y.dataStartIndex,b=y.dataEndIndex,x=y.updateId;if(!Um({props:m}))return null;var O=m.children,_=m.layout,E=m.stackOffset,A=m.data,P=m.reverseStackOrder,T=w1(_),I=T.numericAxisName,M=T.cateAxisName,N=Wt(O,n),L=tW(A,N,"".concat(I,"Id"),"".concat(M,"Id"),E,P),B=u.reduce(function(z,V){var Z="".concat(V.axisType,"Map");return D(D({},z),{},Y({},Z,CK(m,D(D({},V),{},{graphicalItems:N,stackGroups:V.axisType===I&&L,dataStartIndex:S,dataEndIndex:b}))))},{}),C=MK(D(D({},B),{},{props:m,graphicalItems:N}),v==null?void 0:v.legendBBox);Object.keys(B).forEach(function(z){B[z]=f(m,B[z],C,z.replace("Map",""),r)});var k=B["".concat(M,"Map")],F=jK(k),H=d(m,D(D({},B),{},{dataStartIndex:S,dataEndIndex:b,updateId:x,graphicalItems:N,stackGroups:L,offset:C}));return D(D({formattedGraphicalItems:H,graphicalItems:N,offset:C,stackGroups:L},F),B)},h=function(w){function y(v){var m,S,b;return pK(this,y),b=yK(this,y,[v]),Y(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Y(b,"accessibilityManager",new JG),Y(b,"handleLegendBBoxUpdate",function(x){if(x){var O=b.state,_=O.dataStartIndex,E=O.dataEndIndex,A=O.updateId;b.setState(D({legendBBox:x},p({props:b.props,dataStartIndex:_,dataEndIndex:E,updateId:A},D(D({},b.state),{},{legendBBox:x}))))}}),Y(b,"handleReceiveSyncEvent",function(x,O,_){if(b.props.syncId===x){if(_===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(O)}}),Y(b,"handleBrushChange",function(x){var O=x.startIndex,_=x.endIndex;if(O!==b.state.dataStartIndex||_!==b.state.dataEndIndex){var E=b.state.updateId;b.setState(function(){return D({dataStartIndex:O,dataEndIndex:_},p({props:b.props,dataStartIndex:O,dataEndIndex:_,updateId:E},b.state))}),b.triggerSyncEvent({dataStartIndex:O,dataEndIndex:_})}}),Y(b,"handleMouseEnter",function(x){var O=b.getMouseInfo(x);if(O){var _=D(D({},O),{},{isTooltipActive:!0});b.setState(_),b.triggerSyncEvent(_);var E=b.props.onMouseEnter;te(E)&&E(_,x)}}),Y(b,"triggeredAfterMouseMove",function(x){var O=b.getMouseInfo(x),_=O?D(D({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(_),b.triggerSyncEvent(_);var E=b.props.onMouseMove;te(E)&&E(_,x)}),Y(b,"handleItemMouseEnter",function(x){b.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),Y(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),Y(b,"handleMouseMove",function(x){x.persist(),b.throttleTriggeredAfterMouseMove(x)}),Y(b,"handleMouseLeave",function(x){b.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};b.setState(O),b.triggerSyncEvent(O);var _=b.props.onMouseLeave;te(_)&&_(O,x)}),Y(b,"handleOuterEvent",function(x){var O=Bj(x),_=Ft(b.props,"".concat(O));if(O&&te(_)){var E,A;/.*touch.*/i.test(O)?A=b.getMouseInfo(x.changedTouches[0]):A=b.getMouseInfo(x),_((E=A)!==null&&E!==void 0?E:{},x)}}),Y(b,"handleClick",function(x){var O=b.getMouseInfo(x);if(O){var _=D(D({},O),{},{isTooltipActive:!0});b.setState(_),b.triggerSyncEvent(_);var E=b.props.onClick;te(E)&&E(_,x)}}),Y(b,"handleMouseDown",function(x){var O=b.props.onMouseDown;if(te(O)){var _=b.getMouseInfo(x);O(_,x)}}),Y(b,"handleMouseUp",function(x){var O=b.props.onMouseUp;if(te(O)){var _=b.getMouseInfo(x);O(_,x)}}),Y(b,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),Y(b,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.handleMouseDown(x.changedTouches[0])}),Y(b,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.handleMouseUp(x.changedTouches[0])}),Y(b,"handleDoubleClick",function(x){var O=b.props.onDoubleClick;if(te(O)){var _=b.getMouseInfo(x);O(_,x)}}),Y(b,"handleContextMenu",function(x){var O=b.props.onContextMenu;if(te(O)){var _=b.getMouseInfo(x);O(_,x)}}),Y(b,"triggerSyncEvent",function(x){b.props.syncId!==void 0&&Gf.emit(Kf,b.props.syncId,x,b.eventEmitterSymbol)}),Y(b,"applySyncEvent",function(x){var O=b.props,_=O.layout,E=O.syncMethod,A=b.state.updateId,P=x.dataStartIndex,T=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)b.setState(D({dataStartIndex:P,dataEndIndex:T},p({props:b.props,dataStartIndex:P,dataEndIndex:T,updateId:A},b.state)));else if(x.activeTooltipIndex!==void 0){var I=x.chartX,M=x.chartY,N=x.activeTooltipIndex,L=b.state,B=L.offset,C=L.tooltipTicks;if(!B)return;if(typeof E=="function")N=E(C,x);else if(E==="value"){N=-1;for(var k=0;k=0){var ee,W;if(I.dataKey&&!I.allowDuplicatedCategory){var re=typeof I.dataKey=="function"?J:"payload.".concat(I.dataKey.toString());ee=Bu(k,re,N),W=F&&H&&Bu(H,re,N)}else ee=k==null?void 0:k[M],W=F&&H&&H[M];if(se||fe){var Q=x.props.activeIndex!==void 0?x.props.activeIndex:M;return[R.cloneElement(x,D(D(D({},E.props),ke),{},{activeIndex:Q})),null,null]}if(!ie(ee))return[K].concat(oa(b.renderActivePoints({item:E,activePoint:ee,basePoint:W,childIndex:M,isRange:F})))}else{var Te,de=(Te=b.getItemByXY(b.state.activeCoordinate))!==null&&Te!==void 0?Te:{graphicalItem:K},et=de.graphicalItem,xt=et.item,ri=xt===void 0?x:xt,Ol=et.childIndex,wn=D(D(D({},E.props),ke),{},{activeIndex:Ol});return[R.cloneElement(ri,wn),null,null]}return F?[K,null,null]:[K,null]}),Y(b,"renderCustomized",function(x,O,_){return R.cloneElement(x,D(D({key:"recharts-customized-".concat(_)},b.props),b.state))}),Y(b,"renderMap",{CartesianGrid:{handler:ru,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:ru},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:ru},YAxis:{handler:ru},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((m=v.id)!==null&&m!==void 0?m:hl("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=ZS(b.triggeredAfterMouseMove,(S=v.throttleDelay)!==null&&S!==void 0?S:1e3/60),b.state={},b}return bK(y,w),vK(y,[{key:"componentDidMount",value:function(){var m,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m: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 m=this.props,S=m.children,b=m.data,x=m.height,O=m.layout,_=Pt(S,cr);if(_){var E=_.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,P=vh(this.state,b,E,A),T=this.state.tooltipTicks[E].coordinate,I=(this.state.offset.top+x)/2,M=O==="horizontal",N=M?{x:T,y:I}:{y:T,x:I},L=this.state.formattedGraphicalItems.find(function(C){var k=C.item;return k.type.name==="Scatter"});L&&(N=D(D({},N),L.props.points[E].tooltipPosition),P=L.props.points[E].tooltipPayload);var B={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:A,activePayload:P,activeCoordinate:N};this.setState(B),this.renderCursor(_),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(m,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==m.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==m.margin){var b,x;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(m){Kd([Pt(m.children,cr)],[Pt(this.props.children,cr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var m=Pt(this.props.children,cr);if(m&&typeof m.props.shared=="boolean"){var S=m.props.shared?"axis":"item";return l.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(m){if(!this.container)return null;var S=this.container,b=S.getBoundingClientRect(),x=pz(b),O={chartX:Math.round(m.pageX-x.left),chartY:Math.round(m.pageY-x.top)},_=b.width/S.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,_);if(!E)return null;var A=this.state,P=A.xAxisMap,T=A.yAxisMap,I=this.getTooltipEventType(),M=g1(this.state,this.props.data,this.props.layout,E);if(I!=="axis"&&P&&T){var N=Xr(P).scale,L=Xr(T).scale,B=N&&N.invert?N.invert(O.chartX):null,C=L&&L.invert?L.invert(O.chartY):null;return D(D({},O),{},{xValue:B,yValue:C},M)}return M?D(D({},O),M):null}},{key:"inRange",value:function(m,S){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,O=m/b,_=S/b;if(x==="horizontal"||x==="vertical"){var E=this.state.offset,A=O>=E.left&&O<=E.left+E.width&&_>=E.top&&_<=E.top+E.height;return A?{x:O,y:_}:null}var P=this.state,T=P.angleAxisMap,I=P.radiusAxisMap;if(T&&I){var M=Xr(T);return J0({x:O,y:_},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var m=this.props.children,S=this.getTooltipEventType(),b=Pt(m,cr),x={};b&&S==="axis"&&(b.props.trigger==="click"?x={onClick:this.handleClick}:x={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 O=zu(this.props,this.handleOuterEvent);return D(D({},O),x)}},{key:"addListener",value:function(){Gf.on(Kf,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gf.removeListener(Kf,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(m,S,b){for(var x=this.state.formattedGraphicalItems,O=0,_=x.length;O<_;O++){var E=x[O];if(E.item===m||E.props.key===m.key||S===$r(E.item.type)&&b===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var m=this.clipPathId,S=this.state.offset,b=S.left,x=S.top,O=S.height,_=S.width;return $.createElement("defs",null,$.createElement("clipPath",{id:m},$.createElement("rect",{x:b,y:x,height:O,width:_})))}},{key:"getXScales",value:function(){var m=this.state.xAxisMap;return m?Object.entries(m).reduce(function(S,b){var x=v1(b,2),O=x[0],_=x[1];return D(D({},S),{},Y({},O,_.scale))},{}):null}},{key:"getYScales",value:function(){var m=this.state.yAxisMap;return m?Object.entries(m).reduce(function(S,b){var x=v1(b,2),O=x[0],_=x[1];return D(D({},S),{},Y({},O,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(m){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[m])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(m){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[m])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(m){var S=this.state,b=S.formattedGraphicalItems,x=S.activeItem;if(b&&b.length)for(var O=0,_=b.length;O<_;O++){var E=b[O],A=E.props,P=E.item,T=P.type.defaultProps!==void 0?D(D({},P.type.defaultProps),P.props):P.props,I=$r(P.type);if(I==="Bar"){var M=(A.data||[]).find(function(C){return XU(m,C)});if(M)return{graphicalItem:E,payload:M}}else if(I==="RadialBar"){var N=(A.data||[]).find(function(C){return J0(m,C)});if(N)return{graphicalItem:E,payload:N}}else if(Nc(E,x)||Ic(E,x)||Jo(E,x)){var L=ZH({graphicalItem:E,activeTooltipItem:x,itemData:T.data}),B=T.activeIndex===void 0?L:T.activeIndex;return{graphicalItem:D(D({},E),{},{childIndex:B}),payload:Jo(E,x)?T.data[L]:E.props.data[L]}}}return null}},{key:"render",value:function(){var m=this;if(!Um(this))return null;var S=this.props,b=S.children,x=S.className,O=S.width,_=S.height,E=S.style,A=S.compact,P=S.title,T=S.desc,I=y1(S,uK),M=ae(I,!1);if(A)return $.createElement(Qb,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement(Xd,Si({},M,{width:O,height:_,title:P,desc:T}),this.renderClipPath(),Vm(b,this.renderMap)));if(this.props.accessibilityLayer){var N,L;M.tabIndex=(N=this.props.tabIndex)!==null&&N!==void 0?N:0,M.role=(L=this.props.role)!==null&&L!==void 0?L:"application",M.onKeyDown=function(C){m.accessibilityManager.keyboardEvent(C)},M.onFocus=function(){m.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return $.createElement(Qb,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement("div",Si({className:le("recharts-wrapper",x),style:D({position:"relative",cursor:"default",width:O,height:_},E)},B,{ref:function(k){m.container=k}}),$.createElement(Xd,Si({},M,{width:O,height:_,title:P,desc:T,style:PK}),this.renderClipPath(),Vm(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(R.Component);Y(h,"displayName",r),Y(h,"defaultProps",D({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),Y(h,"getDerivedStateFromProps",function(w,y){var v=w.dataKey,m=w.data,S=w.children,b=w.width,x=w.height,O=w.layout,_=w.stackOffset,E=w.margin,A=y.dataStartIndex,P=y.dataEndIndex;if(y.updateId===void 0){var T=b1(w);return D(D(D({},T),{},{updateId:0},p(D(D({props:w},T),{},{updateId:0}),y)),{},{prevDataKey:v,prevData:m,prevWidth:b,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:E,prevChildren:S})}if(v!==y.prevDataKey||m!==y.prevData||b!==y.prevWidth||x!==y.prevHeight||O!==y.prevLayout||_!==y.prevStackOffset||!Ti(E,y.prevMargin)){var I=b1(w),M={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},N=D(D({},g1(y,m,O)),{},{updateId:y.updateId+1}),L=D(D(D({},I),M),N);return D(D(D({},L),p(D({props:w},L),y)),{},{prevDataKey:v,prevData:m,prevWidth:b,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:E,prevChildren:S})}if(!Kd(S,y.prevChildren)){var B,C,k,F,H=Pt(S,Yi),z=H&&(B=(C=H.props)===null||C===void 0?void 0:C.startIndex)!==null&&B!==void 0?B:A,V=H&&(k=(F=H.props)===null||F===void 0?void 0:F.endIndex)!==null&&k!==void 0?k:P,Z=z!==A||V!==P,fe=!ie(m),se=fe&&!Z?y.updateId:y.updateId+1;return D(D({updateId:se},p(D(D({props:w},y),{},{updateId:se,dataStartIndex:z,dataEndIndex:V}),y)),{},{prevChildren:S,dataStartIndex:z,dataEndIndex:V})}return null}),Y(h,"renderActiveDot",function(w,y,v){var m;return R.isValidElement(w)?m=R.cloneElement(w,y):te(w)?m=w(y):m=$.createElement(uy,y),$.createElement(Ne,{className:"recharts-active-dot",key:v},m)});var g=R.forwardRef(function(y,v){return $.createElement(h,Si({},y,{ref:v}))});return g.displayName=h.displayName,g},DK=IK({chartName:"LineChart",GraphicalChild:Sl,axisComponents:[{axisType:"xAxis",AxisComp:Fc},{axisType:"yAxis",AxisComp:Wc}],formatAxisMap:O7});const LK=({metrics:e,selectedMetric:t,onMetricChange:r})=>j.jsxs("fieldset",{className:"fieldset",children:[j.jsx("legend",{className:"fieldset-legend",children:"Metric"}),j.jsx("select",{id:"metric-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>j.jsx("option",{value:n,children:n},n))})]}),RK=({attacks:e,selectedAttack:t,onAttackChange:r})=>j.jsxs("fieldset",{className:"fieldset mb-4",children:[j.jsx("legend",{className:"fieldset-legend",children:"Attack"}),j.jsx("select",{id:"attack-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>j.jsx("option",{value:n,children:n},n))})]}),BK=({dataset:e,selectedModels:t})=>{const[r,n]=R.useState([]),[i,a]=R.useState(!0),[o,l]=R.useState(null),[u,s]=R.useState(new Set),[f,c]=R.useState(new Set),[d,p]=R.useState(null),[h,g]=R.useState(null);R.useEffect(()=>{a(!0),ec.fetchStaticFile(`data/${e}?dataset_type=attacks_variations`).then(m=>{const S=JSON.parse(m),b=S.all_attacks_df.map(x=>{const O={...x};return typeof O.strength=="string"&&(O.strength=parseFloat(O.strength)),O});p(S.metrics[0]),s(new Set(S.metrics)),g(S.attacks_with_variations[0]),c(new Set(S.attacks_with_variations)),n(b),a(!1)}).catch(m=>{l("Failed to fetch JSON: "+m.message),a(!1)})},[e]);const w=m=>{p(m.target.value)},y=m=>{g(m.target.value)},v=r.filter(m=>!h||m.attack===h).sort((m,S)=>m.strength-S.strength);return j.jsxs("div",{className:"rounded shadow p-4 overflow-auto mb-8",children:[i&&j.jsx(cv,{}),o&&j.jsx("div",{className:"text-red-500",children:o}),!i&&!o&&j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"flex flex-col md:flex-row md:gap-x-4 mb-4",children:[j.jsx("div",{className:"w-full md:w-1/2",children:j.jsx(LK,{metrics:u,selectedMetric:d,onMetricChange:w})}),j.jsx("div",{className:"w-full md:w-1/2",children:j.jsx(RK,{attacks:f,selectedAttack:h,onAttackChange:y})})]}),r.length>0&&j.jsx("div",{className:"h-64 mb-4",children:j.jsx(oz,{width:"100%",height:"100%",children:j.jsxs(DK,{data:v,margin:{top:5,right:30,left:20,bottom:5},children:[j.jsx(q_,{strokeDasharray:"3 3"}),j.jsx(Fc,{dataKey:"strength",domain:[Math.min(...v.map(m=>Number(m.strength))),Math.max(...v.map(m=>Number(m.strength)))],type:"number",tickFormatter:m=>m.toFixed(3),label:{value:"Strength",position:"insideBottomRight",offset:-5}}),j.jsx(Wc,{label:{value:d||"",angle:-90,position:"insideLeft",style:{textAnchor:"middle"}},tickFormatter:m=>m.toFixed(3)}),j.jsx(cr,{contentStyle:{backgroundColor:"#2a303c",borderColor:"#374151",color:"white"},formatter:m=>m.toFixed(3)}),j.jsx(Ln,{}),(()=>{if(!d)return null;const m=new Set(v.filter(b=>t.has(b.model)).map(b=>b.model)),S=["#8884d8","#82ca9d","#ffc658","#ff8042","#0088fe","#00C49F"];return[...m].map((b,x)=>j.jsx(Sl,{type:"monotone",dataKey:d,data:v.filter(O=>O.model===b),name:b,stroke:S[x%S.length],dot:!1},b))})()]})})})]})]})},zK=({models:e,selectedModels:t,setSelectedModels:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return j.jsx("div",{className:"w-full mb-4",children:j.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700",children:[j.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Models (",t.size,"/",e.length,")"]}),j.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>j.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[j.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),j.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},FK=()=>{const e=["voxpopuli_1k/audio","ravdess_1k/audio","val2014_1k/image","sav_val_full/video"],[t,r]=R.useState(e[0]),[n,i]=R.useState([]),[a,o]=R.useState(new Set),[l,u]=R.useState(!0),[s,f]=R.useState(null);return R.useEffect(()=>{u(!0),ec.fetchStaticFile(`data/${t}?dataset_type=benchmark`).then(c=>{const d=JSON.parse(c);f(d);const p=d.rows,g=Array.from(new Set(p.flatMap(w=>Object.keys(w)))).filter(w=>w!=="metric");i(g),o(new Set(g)),u(!1)}).catch(c=>{console.error("Failed to fetch models:",c),u(!1)})},[t]),j.jsxs("div",{className:"",children:[j.jsx("div",{className:"flex flex-col gap-4",children:j.jsx(KE,{datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})}),l?j.jsx(cv,{}):j.jsxs(j.Fragment,{children:[n.length>0&&j.jsx(zK,{models:n,selectedModels:a,setSelectedModels:o}),j.jsxs("div",{className:"space-y-8",children:[j.jsx(XE,{benchmarkData:s,selectedModels:a}),j.jsx("div",{className:"mt-8 pt-4 border-t border-gray-200",children:j.jsx(BK,{dataset:t,selectedModels:a})})]})]})]})};function WK(){const[e,t]=R.useState("leaderboard"),[r,n]=R.useState("dark");return R.useEffect(()=>{document.documentElement.setAttribute("data-theme",r)},[r]),j.jsxs("div",{className:"min-h-screen w-11/12 mx-auto",children:[j.jsx("div",{className:"bg-base-100 my-4",children:j.jsxs("div",{className:"flex flex-row justify-between items-center",children:[j.jsx("h2",{className:"card-title",children:"🥇 Omni Seal Bench Watermarking Leaderboard"}),j.jsxs("div",{className:"flex justify-end items-center gap-2",children:[j.jsx("span",{className:"text-sm",children:r==="dark"?"🌙 Dark Mode":"☀️ Light Mode"}),j.jsx("input",{type:"checkbox",className:"toggle",checked:r==="dark",onChange:()=>n(r==="dark"?"light":"dark"),"aria-label":"Toggle dark mode"})]})]})}),j.jsxs("div",{className:"tabs tabs-border",children:[j.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Leaderboard Table",checked:e==="leaderboard",onChange:()=>t("leaderboard")}),j.jsx("div",{className:"tab-content bg-base-100 ",children:j.jsx(FK,{})}),j.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Image Examples",checked:e==="imageExamples",onChange:()=>t("imageExamples")}),j.jsx("div",{className:"tab-content bg-base-100 ",children:e==="imageExamples"?j.jsx(wf,{fileType:"image"}):null}),j.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Audio Examples",checked:e==="audioExamples",onChange:()=>t("audioExamples")}),j.jsx("div",{className:"tab-content bg-base-100 ",children:e==="audioExamples"?j.jsx(wf,{fileType:"audio"}):null}),j.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Video Examples",checked:e==="videoExamples",onChange:()=>t("videoExamples")}),j.jsx("div",{className:"tab-content bg-base-100 ",children:e==="videoExamples"?j.jsx(wf,{fileType:"video"}):null})]})]})}Xf.createRoot(document.getElementById("root")).render(j.jsx($.StrictMode,{children:j.jsx(WK,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 056dd439ce46d6f3c90e7e1da16ce880b66caa98..9f852586993c6b1ea6e5e3cfc2388d91e196a3e0 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -5,8 +5,8 @@ 🥇 Omni Seal Bench Watermarking Leaderboard - - + +
diff --git a/frontend/src/components/DatasetSelector.tsx b/frontend/src/components/DatasetSelector.tsx index 6c39deec1e91c1849d7daebcd6a585880f9d650f..8c005ccf6ced214ec2b95e06295e8f5c04c0c71e 100644 --- a/frontend/src/components/DatasetSelector.tsx +++ b/frontend/src/components/DatasetSelector.tsx @@ -12,8 +12,8 @@ const DatasetSelector: React.FC = ({ onDatasetNameChange, }) => { return ( -
-
+
+
Dataset
{datasetNames.map((datasetName) => ( diff --git a/frontend/src/components/IndependentMetricsTable.tsx b/frontend/src/components/IndependentMetricsTable.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e428d8ad934e1fb11caf3432cee435bfe654c41e --- /dev/null +++ b/frontend/src/components/IndependentMetricsTable.tsx @@ -0,0 +1,69 @@ +import React from 'react' + +interface Row { + metric: string + [key: string]: string | number +} + +interface IndependentMetricsTableProps { + independentMetrics: string[] + tableHeader: string[] + selectedModels: Set + tableRows: Row[] +} + +const IndependentMetricsTable: React.FC = ({ + independentMetrics, + tableHeader, + selectedModels, + tableRows, +}) => { + if (independentMetrics.length === 0) return null + return ( +
+ + + + + {tableHeader + .filter((model) => selectedModels.has(model)) + .map((model) => ( + + ))} + + + + {independentMetrics.sort().map((metric) => { + const row = tableRows.find((r) => r.metric === metric) + if (!row) return null + return ( + + + {tableHeader + .filter((model) => selectedModels.has(model)) + .map((col) => { + const cell = row[col] + return ( + + ) + })} + + ) + })} + +
Metric + {model} +
{metric} + {!isNaN(Number(cell)) ? Number(Number(cell).toFixed(3)) : cell} +
+
+ ) +} + +export default IndependentMetricsTable diff --git a/frontend/src/components/LeaderboardFilter.tsx b/frontend/src/components/LeaderboardFilter.tsx index 11f1ceadc6198642c2eb06e3c5802ac07af0ed2d..d23ab16d33857e88f9a02f753e033bfaf00f1265 100644 --- a/frontend/src/components/LeaderboardFilter.tsx +++ b/frontend/src/components/LeaderboardFilter.tsx @@ -20,6 +20,7 @@ const LeaderboardFilter: React.FC = ({ {} ) const [searchTerm, setSearchTerm] = useState('') + const [filterOpen, setFilterOpen] = useState(false) const toggleGroup = (group: string) => { setOpenGroups((prev) => ({ ...prev, [group]: !prev[group] })) @@ -164,166 +165,199 @@ const LeaderboardFilter: React.FC = ({ setOpenSubGroups(openSubGroups) } + // Open all groups and subgroups if all metrics are selected (initial load) + useEffect(() => { + // Only run on initial mount + const allMetrics = Object.values(groups).flatMap((subGroups) => Object.values(subGroups).flat()) + const allSelected = allMetrics.every((metric) => selectedMetrics.has(metric)) + if (allSelected && Object.keys(groups).length > 0) { + const openGroups: { [key: string]: boolean } = {} + const openSubGroups: { [key: string]: { [key: string]: boolean } } = {} + Object.entries(groups).forEach(([group, subGroups]) => { + openGroups[group] = true + openSubGroups[group] = {} + Object.keys(subGroups).forEach((subGroup) => { + openSubGroups[group][subGroup] = true + }) + }) + setOpenGroups(openGroups) + setOpenSubGroups(openSubGroups) + } + // eslint-disable-next-line + }, [groups, selectedMetrics]) + return (
-
- Filter Metrics -
-
- { - const value = e.target.value - setSearchTerm(value) - const openGroups: { [key: string]: boolean } = {} - const openSubGroups: { [key: string]: { [key: string]: boolean } } = {} - Object.entries(groups).forEach(([group, subGroups]) => { - let groupHasMatch = false - openSubGroups[group] = {} - Object.entries(subGroups).forEach(([subGroup, metrics]) => { - const hasMatch = metrics.some((metric) => - metric.toLowerCase().includes(value.toLowerCase()) - ) - openSubGroups[group][subGroup] = hasMatch || value === '' - if (hasMatch) groupHasMatch = true - }) - openGroups[group] = groupHasMatch || value === '' - }) - setOpenGroups(openGroups) - setOpenSubGroups(openSubGroups) - }} - /> - - - - - -
- - +
+ setFilterOpen((open) => !open)} + /> +
+ Filter Individual Metrics
-
- {Object.entries(groups).map(([group, subGroups]) => ( -
-
- - - -
- {openGroups[group] && ( -
- {Object.entries(subGroups).map(([subGroup, metrics]) => { - const filteredMetrics = searchTerm - ? metrics.filter((metric) => - metric.toLowerCase().includes(searchTerm.toLowerCase()) +
+
+
+
+ { + const value = e.target.value + setSearchTerm(value) + const openGroups: { [key: string]: boolean } = {} + const openSubGroups: { [key: string]: { [key: string]: boolean } } = {} + Object.entries(groups).forEach(([group, subGroups]) => { + let groupHasMatch = false + openSubGroups[group] = {} + Object.entries(subGroups).forEach(([subGroup, metrics]) => { + const hasMatch = metrics.some((metric) => + metric.toLowerCase().includes(value.toLowerCase()) ) - : metrics - if (filteredMetrics.length === 0) return null - return ( -
-
- - - -
- {openSubGroups[group]?.[subGroup] && ( -
- {filteredMetrics.map((metric) => ( - - ))} + openSubGroups[group][subGroup] = hasMatch || value === '' + if (hasMatch) groupHasMatch = true + }) + openGroups[group] = groupHasMatch || value === '' + }) + setOpenGroups(openGroups) + setOpenSubGroups(openSubGroups) + }} + /> + + + + + +
+ + +
+
+ {Object.entries(groups).map(([group, subGroups]) => ( +
+
+ + + +
+ {openGroups[group] && ( +
+ {Object.entries(subGroups).map(([subGroup, metrics]) => { + const filteredMetrics = searchTerm + ? metrics.filter((metric) => + metric.toLowerCase().includes(searchTerm.toLowerCase()) + ) + : metrics + if (filteredMetrics.length === 0) return null + return ( +
+
+ + + +
+ {openSubGroups[group]?.[subGroup] && ( +
+ {filteredMetrics.map((metric) => ( + + ))} +
+ )}
- )} -
- ) - })} + ) + })} +
+ )}
- )} + ))}
- ))} +
-
+
) } diff --git a/frontend/src/components/LeaderboardTable.tsx b/frontend/src/components/LeaderboardTable.tsx index a606a94c992330cf3a78ba27ddf457d33892f2d6..d8c25053a428b561e7d7618d932cb61cee06ce05 100644 --- a/frontend/src/components/LeaderboardTable.tsx +++ b/frontend/src/components/LeaderboardTable.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react' import LeaderboardFilter from './LeaderboardFilter' import LoadingSpinner from './LoadingSpinner' +import IndependentMetricsTable from './IndependentMetricsTable' interface LeaderboardTableProps { benchmarkData: any @@ -16,6 +17,12 @@ interface Groups { [group: string]: { [subgroup: string]: string[] } } +interface SortState { + [overallMetric: string]: { + [model: string]: { direction: 'asc' | 'desc' } + } +} + const OverallMetricFilter: React.FC<{ overallMetrics: string[] selectedOverallMetrics: Set @@ -31,8 +38,8 @@ const OverallMetricFilter: React.FC<{ setSelectedOverallMetrics(newSelected) } return ( -
-
+
+
Metrics ({selectedOverallMetrics.size}/{overallMetrics.length}) @@ -60,14 +67,20 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele const [tableRows, setTableRows] = useState([]) const [tableHeader, setTableHeader] = useState([]) const [error, setError] = useState(null) - const [groups, setGroups] = useState({}) - const [openGroups, setOpenGroups] = useState<{ [key: string]: boolean }>({}) - const [openSubGroups, setOpenSubGroups] = useState<{ [key: string]: { [key: string]: boolean } }>( - {} - ) + const [groupRows, setGroupRows] = useState({}) + const [openGroupRows, setOpenGroupRows] = useState<{ [key: string]: boolean }>({}) + const [openSubGroupRows, setOpenSubGroupRows] = useState<{ + [key: string]: { [key: string]: boolean } + }>({}) const [selectedMetrics, setSelectedMetrics] = useState>(new Set()) const [overallMetrics, setOverallMetrics] = useState([]) const [selectedOverallMetrics, setSelectedOverallMetrics] = useState>(new Set()) + const [sortState, setSortState] = useState({}) + const [columnSortState, setColumnSortState] = useState({}) + // Add state for row-based column sorting + const [selectedRowForSort, setSelectedRowForSort] = useState<{ + [rowKey: string]: { direction: 'asc' | 'desc' } + }>({}) useEffect(() => { if (!benchmarkData) { @@ -128,9 +141,9 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele setSelectedMetrics(new Set(allMetrics)) setTableHeader(headers) setTableRows(rows) - setGroups(groupsData) - setOpenGroups(initialOpenGroups) - setOpenSubGroups(initialOpenSubGroups) + setGroupRows(groupsData) + setOpenGroupRows(initialOpenGroups) + setOpenSubGroupRows(initialOpenSubGroups) setError(null) } catch (err: any) { setError('Failed to parse benchmark data, please try again: ' + err.message) @@ -138,11 +151,11 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele }, [benchmarkData]) const toggleGroup = (group: string) => { - setOpenGroups((prev) => ({ ...prev, [group]: !prev[group] })) + setOpenGroupRows((prev) => ({ ...prev, [group]: !prev[group] })) } const toggleSubGroup = (group: string, subGroup: string) => { - setOpenSubGroups((prev) => ({ + setOpenSubGroupRows((prev) => ({ ...prev, [group]: { ...(prev[group] || {}), @@ -151,6 +164,138 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele })) } + const handleSort = (overallMetric: string, model: string) => { + setSortState((prev) => { + const prevDir = prev[overallMetric]?.[model]?.direction + let newSortState: SortState = {} + if (!prevDir) { + // No sort yet, set to 'asc' + newSortState[overallMetric] = { [model]: { direction: 'asc' } } + } else if (prevDir === 'asc') { + // Was 'asc', set to 'desc' + newSortState[overallMetric] = { [model]: { direction: 'desc' } } + } + // Else revert back to unsorted state + return newSortState + }) + } + + // Helper to generate a stable composite key for row-based column sorting + function getRowSortKey(group: string | null, subGroup: string | null, metric: string | null) { + return `${group ?? ''}||${subGroup ?? ''}||${metric ?? ''}` + } + + // Update handleColumnSort to use setSelectedRowForSort + const handleColumnSort = ( + group: string | null, + subGroup: string | null, + metric: string | null + ) => { + const rowKey = getRowSortKey(group, subGroup, metric) + setSelectedRowForSort((prev) => { + const prevDir = prev[rowKey]?.direction + const newSortState: { [rowKey: string]: { direction: 'asc' | 'desc' } } = {} + if (!prevDir) { + newSortState[rowKey] = { direction: 'asc' } + } else if (prevDir === 'asc') { + newSortState[rowKey] = { direction: 'desc' } + } else if (prevDir === 'desc') { + delete newSortState[rowKey] + } + return newSortState + }) + } + + // Helper to get current row sort config for a row + function getRowColumnSort(group: string | null, subGroup: string | null, metric: string | null) { + return selectedRowForSort[getRowSortKey(group, subGroup, metric)] || null + } + + const getSortConfig = () => { + // Find the first sorted column (overallMetric, model) + console.log({ sortState }) + for (const overallMetric of overallMetrics) { + if (!selectedOverallMetrics.has(overallMetric)) continue + const models = tableHeader.filter((model) => selectedModels.has(model)) + for (const model of models) { + if (sortState[overallMetric]?.[model]) { + return { overallMetric, model, direction: sortState[overallMetric][model].direction } + } + } + } + return null + } + + // Move getRowSortConfig above sortModelColumns so it is defined before use + const getRowSortConfig = () => { + for (const overallMetric of overallMetrics) { + if (!selectedOverallMetrics.has(overallMetric)) continue + const models = tableHeader.filter((model) => selectedModels.has(model)) + for (const model of models) { + if (sortState[overallMetric]?.[model]) { + return { overallMetric, model, direction: sortState[overallMetric][model].direction } + } + } + } + return null + } + + const getColumnSortConfig = () => { + for (const overallMetric of overallMetrics) { + if (!selectedOverallMetrics.has(overallMetric)) continue + if (columnSortState[overallMetric]?.['__col__']) { + return { overallMetric, direction: columnSortState[overallMetric]['__col__'].direction } + } + } + return null + } + + const sortModelColumns = (models: string[], overallMetric: string): string[] => { + // Column sort takes precedence; if no column sort, return models in default order + const columnSortConfig = getColumnSortConfig() + console.log({ columnSortConfig, overallMetric }) + if (columnSortConfig && columnSortConfig.overallMetric === overallMetric) { + // Sort by average value for each model in this overallMetric + return [...models].sort((a, b) => { + const valsA = tableRows + .filter((row) => findAllMetricsForName(overallMetric).includes(row.metric as string)) + .map((row) => Number(row[a])) + .filter((v) => !isNaN(v)) + const valsB = tableRows + .filter((row) => findAllMetricsForName(overallMetric).includes(row.metric as string)) + .map((row) => Number(row[b])) + .filter((v) => !isNaN(v)) + const avgA = valsA.length ? valsA.reduce((s, v) => s + v, 0) / valsA.length : NaN + const avgB = valsB.length ? valsB.reduce((s, v) => s + v, 0) / valsB.length : NaN + if (isNaN(avgA) && isNaN(avgB)) return 0 + if (isNaN(avgA)) return 1 + if (isNaN(avgB)) return -1 + return columnSortConfig.direction === 'asc' ? avgA - avgB : avgB - avgA + }) + } + // No column sort: return models in default order + return models + } + + const sortRowsBySubcolumn = ( + rows: string[], + overallMetric: string, + model: string, + direction: 'asc' | 'desc' + ) => { + return [...rows].sort((a, b) => { + const rowA = tableRows.find((r) => r.metric === a) + const rowB = tableRows.find((r) => r.metric === b) + if (!rowA || !rowB) return 0 + const valA = Number(rowA[model]) + const valB = Number(rowB[model]) + if (isNaN(valA) && isNaN(valB)) return 0 + if (isNaN(valA)) return 1 + if (isNaN(valB)) return -1 + return direction === 'asc' ? valA - valB : valB - valA + }) + } + // Find all metrics matching a particular extracted metric name (like "log10_p_value") const findAllMetricsForName = (metricName: string): string[] => { return tableRows @@ -218,12 +363,12 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele if (!group) return metricNames // Get all metrics for the specified group - const groupMetrics = Object.values(groups[group] || {}).flat() + const groupMetrics = Object.values(groupRows[group] || {}).flat() as string[] // If subgroup is specified, further filter to that subgroup - if (subgroup && groups[group]?.[subgroup]) { + if (subgroup && groupRows[group]?.[subgroup]) { return metricNames.filter( - (metric) => groups[group][subgroup].includes(metric) && selectedMetrics.has(metric) + (metric) => groupRows[group][subgroup].includes(metric) && selectedMetrics.has(metric) ) } @@ -233,8 +378,101 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele ) } + // Before rendering group rows: + const groupSortConfig = getSortConfig() + let groupEntries = Object.entries(groupRows).filter(([group]) => group !== 'Overall') + if (groupSortConfig) { + groupEntries = groupEntries.sort(([groupA, subGroupsA], [groupB, subGroupsB]) => { + // For each group, get all metrics in the group for the selected overallMetric + const allMetricsWithName = findAllMetricsForName(groupSortConfig.overallMetric) + const getGroupAvg = (subGroups: { [key: string]: string[] }) => { + const allGroupMetrics = Object.values(subGroups).flat() + const metricsInGroupForThisMetric = allGroupMetrics.filter((m) => + allMetricsWithName.includes(m) + ) + const stats = calculateStats(metricsInGroupForThisMetric, groupSortConfig.model) + return stats.avg + } + const avgA = getGroupAvg(subGroupsA) + const avgB = getGroupAvg(subGroupsB) + if (isNaN(avgA) && isNaN(avgB)) return 0 + if (isNaN(avgA)) return 1 + if (isNaN(avgB)) return -1 + return groupSortConfig.direction === 'asc' ? avgA - avgB : avgB - avgA + }) + } + + // Compute model order for each overall metric before rendering + const modelOrderByOverallMetric: { [metric: string]: string[] } = {} + overallMetrics + .filter((metric) => selectedOverallMetrics.has(metric)) + .forEach((metric) => { + // Check if there is an active row-based column sort for this metric + let sortedModels: string[] | null = null + // Find the active rowKey for this metric in rowColumnSort + const activeRowKey = Object.keys(selectedRowForSort).find((rowKey) => { + // rowKey format: group||subGroup||metric + const [group, subGroup, rowMetric] = rowKey.split('||') + // If rowMetric is empty, it's a group or subgroup row + if (rowMetric === '' && metric === metric) return true + // If rowMetric matches this metric, it's an individual metric row + if (rowMetric && findAllMetricsForName(metric).includes(rowMetric)) return true + return false + }) + if (activeRowKey && selectedRowForSort[activeRowKey]) { + const direction = selectedRowForSort[activeRowKey].direction + const [group, subGroup, rowMetric] = activeRowKey.split('||') + const models = tableHeader.filter((model) => selectedModels.has(model)) + if (!rowMetric) { + // Group or subgroup row: sort by average for this group/subgroup and metric + // Find all metrics in this group/subgroup for this overall metric + let relevantMetrics: string[] = [] + if (group && !subGroup) { + // Group row + const groupMetrics = Object.values(groupRows[group] || {}).flat() as string[] + relevantMetrics = groupMetrics.filter((m: string) => + findAllMetricsForName(metric).includes(m) + ) + } else if (group && subGroup) { + // Subgroup row + relevantMetrics = (groupRows[group]?.[subGroup] || []).filter((m: string) => + findAllMetricsForName(metric).includes(m) + ) + } + sortedModels = [...models].sort((a, b) => { + const statsA = calculateStats(relevantMetrics, a) + const statsB = calculateStats(relevantMetrics, b) + if (isNaN(statsA.avg) && isNaN(statsB.avg)) return 0 + if (isNaN(statsA.avg)) return 1 + if (isNaN(statsB.avg)) return -1 + return direction === 'asc' ? statsA.avg - statsB.avg : statsB.avg - statsA.avg + }) + } else { + // Individual metric row: sort by value for that metric + sortedModels = [...models].sort((a, b) => { + const rowA = tableRows.find((r) => r.metric === rowMetric) + const rowB = rowA // same row + const valA = rowA ? Number(rowA[a]) : NaN + const valB = rowB ? Number(rowB[b]) : NaN + if (isNaN(valA) && isNaN(valB)) return 0 + if (isNaN(valA)) return 1 + if (isNaN(valB)) return -1 + return direction === 'asc' ? valA - valB : valB - valA + }) + } + } + modelOrderByOverallMetric[metric] = + sortedModels || + sortModelColumns( + tableHeader.filter((model) => selectedModels.has(model)), + metric + ) + }) + + console.log({ modelOrderByOverallMetric }) + return ( -
+
{error &&
{error}
} {!error && (
@@ -244,11 +482,11 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele selectedOverallMetrics={selectedOverallMetrics} setSelectedOverallMetrics={setSelectedOverallMetrics} /> - {/* */} + />
{selectedModels.size === 0 || selectedMetrics.size === 0 ? ( @@ -258,61 +496,12 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele ) : ( <> {/* Standalone metrics table */} - {(() => { - const standaloneMetrics = findStandaloneMetrics() - if (standaloneMetrics.length === 0) return null - return ( -
- - - - - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((model) => ( - - ))} - - - - {standaloneMetrics.sort().map((metric) => { - const row = tableRows.find((r) => r.metric === metric) - if (!row) return null - return ( - - - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((col) => { - const cell = row[col] - return ( - - ) - })} - - ) - })} - -
- Metric - - {model} -
- {metric} - - {!isNaN(Number(cell)) - ? Number(Number(cell).toFixed(3)) - : cell} -
-
- ) - })()} + {/* Main metrics table */}
@@ -326,11 +515,9 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele .filter((metric) => selectedOverallMetrics.has(metric)) .map((metric) => ( selectedModels.has(model)).length - } - className="sticky top-0 bg-base-100 z-10 text-center border-x border-gray-300 border border-gray-700 border" + key={`header-metric-${metric}`} + className="bg-base-100 z-10 text-center text-xs border-gray-700 border" + colSpan={modelOrderByOverallMetric[metric].length} > {metric} @@ -342,27 +529,33 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele .filter((metric) => selectedOverallMetrics.has(metric)) .map((metric) => ( - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((model) => ( + {modelOrderByOverallMetric[metric].map((model) => { + const isSorted = sortState[metric]?.[model]?.direction !== undefined + const direction = sortState[metric]?.[model]?.direction || 'desc' + return ( handleSort(metric, model)} > {model} + + {isSorted ? (direction === 'asc' ? '↑' : '↓') : '⇅'} + - ))} + ) + })} ))} - {/* First render each group */} - {Object.entries(groups).map(([group, subGroups]) => { + {/* First render each group row */} + {groupEntries.map(([group, subGroups]) => { // Skip the "Overall" group completely if (group === 'Overall') return null - // Get all metrics for this group + // Get all metrics for this group row const allGroupMetrics = Object.values(subGroups).flat() // Filter to only include selected metrics const visibleGroupMetrics = filterMetricsByGroupAndSubgroup( @@ -370,9 +563,35 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele group ) - // Skip this group if no metrics are selected + // Skip this group row if no metrics are selected if (visibleGroupMetrics.length === 0) return null + // Sort subgroups by average if sort config is active + let subGroupEntries = Object.entries(subGroups) + if (groupSortConfig) { + const allMetricsWithName = findAllMetricsForName( + groupSortConfig.overallMetric + ) + const getSubGroupAvg = (metrics: string[]) => { + const metricsInSubGroupForThisMetric = metrics.filter((m) => + allMetricsWithName.includes(m) + ) + const stats = calculateStats( + metricsInSubGroupForThisMetric, + groupSortConfig.model + ) + return stats.avg + } + subGroupEntries = subGroupEntries.sort(([, metricsA], [, metricsB]) => { + const avgA = getSubGroupAvg(metricsA) + const avgB = getSubGroupAvg(metricsB) + if (isNaN(avgA) && isNaN(avgB)) return 0 + if (isNaN(avgA)) return 1 + if (isNaN(avgB)) return -1 + return groupSortConfig.direction === 'asc' ? avgA - avgB : avgB - avgA + }) + } + return ( {/* Group row with average stats for the entire group */} @@ -380,27 +599,45 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele className="bg-base-200 cursor-pointer hover:bg-base-300" onClick={() => toggleGroup(group)} > - - {openGroups[group] ? '▼ ' : '▶ '} - {group} + + {openGroupRows[group] ? '▼ ' : '▶ '} + {group} + {/* Sort icon: only this triggers sort, and shows default if unsorted */} + { + e.stopPropagation() + handleColumnSort(group, null, null) + }} + title={ + getRowColumnSort(group, null, null) + ? getRowColumnSort(group, null, null)?.direction === 'asc' + ? 'Sort descending' + : 'Clear sort' + : 'Sort by this row' + } + > + {getRowColumnSort(group, null, null) + ? getRowColumnSort(group, null, null)?.direction === 'asc' + ? '↑' + : '↓' + : '⇅'} + {/* For each metric column */} {overallMetrics .filter((metric) => selectedOverallMetrics.has(metric)) - .map((metric) => ( - // Render sub-columns for each model - - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((col) => { - // Find all metrics in this group that match the current metric name + .map((metric) => { + const rowKey = getRowSortKey(group, null, null) + return ( + + {modelOrderByOverallMetric[metric].map((col: string) => { const allMetricsWithName = findAllMetricsForName(metric) const metricsInGroupForThisMetric = visibleGroupMetrics.filter((m) => allMetricsWithName.includes(m) ) const stats = calculateStats(metricsInGroupForThisMetric, col) - return ( = ({ benchmarkData, sele ) })} - - ))} + + ) + })} - {/* Only render subgroups if group is open */} - {openGroups[group] && - Object.entries(subGroups).map(([subGroup, metrics]) => { - // Filter to only include selected metrics in this subgroup + {/* Only render subgroups if group row is open */} + {openGroupRows[group] && + subGroupEntries.map(([subGroup, metrics]) => { + // Filter to only include selected metrics in this subgroup row const visibleSubgroupMetrics = filterMetricsByGroupAndSubgroup( metrics, group, subGroup ) - // Skip this subgroup if no metrics are selected + // Skip this subgroup row if no metrics are selected if (visibleSubgroupMetrics.length === 0) return null return ( @@ -436,147 +674,208 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele className="bg-base-100 cursor-pointer hover:bg-base-200" onClick={() => toggleSubGroup(group, subGroup)} > - - {openSubGroups[group]?.[subGroup] ? '▼ ' : '▶ '} - {subGroup} + + + {openSubGroupRows[group]?.[subGroup] ? '▼ ' : '▶ '} + + {subGroup} + { + e.stopPropagation() + handleColumnSort(group, subGroup, null) + }} + title={ + getRowColumnSort(group, subGroup, null) + ? getRowColumnSort(group, subGroup, null)?.direction === + 'asc' + ? 'Sort descending' + : 'Clear sort' + : 'Sort by this row' + } + > + {getRowColumnSort(group, subGroup, null) + ? getRowColumnSort(group, subGroup, null)?.direction === + 'asc' + ? '↑' + : '↓' + : '⇅'} + {/* For each metric column */} {overallMetrics .filter((metric) => selectedOverallMetrics.has(metric)) - .map((metric) => ( - // Render sub-columns for each model - - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((col) => { - // Find all metrics in this subgroup that match the current metric name - const allMetricsWithName = - findAllMetricsForName(metric) - const metricsInSubgroupForThisMetric = - visibleSubgroupMetrics.filter((m) => - allMetricsWithName.includes(m) + .map((metric) => { + const rowKey = getRowSortKey(group, subGroup, null) + return ( + + {modelOrderByOverallMetric[metric].map( + (col: string) => { + const allMetricsWithName = + findAllMetricsForName(metric) + const metricsInSubgroupForThisMetric = + visibleSubgroupMetrics.filter((m) => + allMetricsWithName.includes(m) + ) + const stats = calculateStats( + metricsInSubgroupForThisMetric, + col ) - const stats = calculateStats( - metricsInSubgroupForThisMetric, - col - ) - - return ( - - {!isNaN(stats.avg) - ? `${stats.avg.toFixed(3)} ± ${stats.stdDev.toFixed(3)}` - : 'N/A'} - - ) - })} - - ))} + return ( + + {!isNaN(stats.avg) + ? `${stats.avg.toFixed(3)} ± ${stats.stdDev.toFixed(3)}` + : 'N/A'} + + ) + } + )} + + ) + })} {/* Individual metric rows */} - {openSubGroups[group]?.[subGroup] && - // Sort visibleSubgroupMetrics alphabetically by the clean metric name - [...visibleSubgroupMetrics] - .sort((a, b) => { - // For metrics with format {category}_{strength}_{overall_metric_name}, - // First sort by category, then by overall_metric_name, then by strength - - // First extract the overall metric group - const getOverallMetricGroup = (metric: string) => { - for (const overall of overallMetrics) { - if ( - metric.endsWith(`_${overall}`) || - metric === overall - ) { - return overall + {openSubGroupRows[group]?.[subGroup] && + (() => { + // Sorting logic for individual metric rows + const sortConfig = getSortConfig() + let sortedMetrics = [...visibleSubgroupMetrics] + console.log( + 'Sorting metrics for subgroup:', + group, + subGroup, + 'with config:', + sortConfig + ) + if (sortConfig) { + // Only sort metrics that match the selected overallMetric and model + const allMetricsWithName = findAllMetricsForName( + sortConfig.overallMetric + ) + const metricsInSubgroupForThisMetric = sortedMetrics.filter( + (m) => allMetricsWithName.includes(m) + ) + const metricsNotInSubgroupForThisMetric = + sortedMetrics.filter( + (m) => !allMetricsWithName.includes(m) + ) + // Only apply subcolumn sort to matching metrics, leave others in original order + sortedMetrics = [ + ...sortRowsBySubcolumn( + metricsInSubgroupForThisMetric, + sortConfig.overallMetric, + sortConfig.model, + sortConfig.direction + ), + ...metricsNotInSubgroupForThisMetric, + ] + } else { + // Fallback sort logic (category, overall, strength) + sortedMetrics = sortedMetrics.sort((a, b) => { + // For metrics with format {category}_{strength}_{overall_metric_name}, + // First sort by category, then by overall_metric_name, then by strength + + // First extract the overall metric group + const getOverallMetricGroup = (metric: string) => { + for (const overall of overallMetrics) { + if ( + metric.endsWith(`_${overall}`) || + metric === overall + ) { + return overall + } } + return '' } - return '' - } - const overallA = getOverallMetricGroup(a) - const overallB = getOverallMetricGroup(b) - - // Extract the strength (last part before the overall metric) - const stripOverall = (metric: string, overall: string) => { - if (metric.endsWith(`_${overall}`)) { - // Remove the overall metric group and any preceding underscore - const stripped = metric.slice( - 0, - metric.length - overall.length - 1 - ) - const parts = stripped.split('_') - return parts.length > 0 ? parts[parts.length - 1] : '' + const overallA = getOverallMetricGroup(a) + const overallB = getOverallMetricGroup(b) + + // Extract the strength (last part before the overall metric) + const stripOverall = ( + metric: string, + overall: string + ) => { + if (metric.endsWith(`_${overall}`)) { + // Remove the overall metric group and any preceding underscore + const stripped = metric.slice( + 0, + metric.length - overall.length - 1 + ) + const parts = stripped.split('_') + return parts.length > 0 ? parts[parts.length - 1] : '' + } + return metric } - return metric - } - // Extract the category (what remains after removing strength and overall_metric_name) - const getCategory = (metric: string, overall: string) => { - if (metric.endsWith(`_${overall}`)) { - const stripped = metric.slice( - 0, - metric.length - overall.length - 1 - ) - const parts = stripped.split('_') - // Remove the last part (strength) and join the rest (category) - return parts.length > 1 - ? parts.slice(0, parts.length - 1).join('_') - : '' + // Extract the category (what remains after removing strength and overall_metric_name) + const getCategory = (metric: string, overall: string) => { + if (metric.endsWith(`_${overall}`)) { + const stripped = metric.slice( + 0, + metric.length - overall.length - 1 + ) + const parts = stripped.split('_') + // Remove the last part (strength) and join the rest (category) + return parts.length > 1 + ? parts.slice(0, parts.length - 1).join('_') + : '' + } + return metric } - return metric - } - const categoryA = getCategory(a, overallA) - const categoryB = getCategory(b, overallB) + const categoryA = getCategory(a, overallA) + const categoryB = getCategory(b, overallB) - // First sort by category - if (categoryA !== categoryB) { - return categoryA.localeCompare(categoryB) - } + // First sort by category + if (categoryA !== categoryB) { + return categoryA.localeCompare(categoryB) + } - // Then sort by overall metric name - if (overallA !== overallB) { - return overallA.localeCompare(overallB) - } + // Then sort by overall metric name + if (overallA !== overallB) { + return overallA.localeCompare(overallB) + } - // Finally sort by strength - const subA = stripOverall(a, overallA) - const subB = stripOverall(b, overallB) - - // Try to parse subA and subB as numbers, handling k/m/b suffixes - const parseNumber = (str: string) => { - const match = str.match(/^(\d+(?:\.\d+)?)([kKmMbB]?)$/) - if (!match) return NaN - let [_, num, suffix] = match - let value = parseFloat(num) - switch (suffix.toLowerCase()) { - case 'k': - value *= 1e3 - break - case 'm': - value *= 1e6 - break - case 'b': - value *= 1e9 - break + // Finally sort by strength + const subA = stripOverall(a, overallA) + const subB = stripOverall(b, overallB) + + // Try to parse subA and subB as numbers, handling k/m/b suffixes + const parseNumber = (str: string) => { + const match = str.match(/^\d+(?:\.\d+)?([kKmMbB]?)$/) + if (!match) return NaN + let [_, suffix] = match + let value = parseFloat(str) + switch (suffix?.toLowerCase()) { + case 'k': + value *= 1e3 + break + case 'm': + value *= 1e6 + break + case 'b': + value *= 1e9 + break + } + return value } - return value - } - const numA = parseNumber(subA) - const numB = parseNumber(subB) + const numA = parseNumber(subA) + const numB = parseNumber(subB) - if (!isNaN(numA) && !isNaN(numB)) { - return numA - numB - } - // Fallback to string comparison if not both numbers - return subA.localeCompare(subB) - }) - .map((metric) => { + if (!isNaN(numA) && !isNaN(numB)) { + return numA - numB + } + // Fallback to string comparison if not both numbers + return subA.localeCompare(subB) + }) + } + return sortedMetrics.map((metric) => { const row = tableRows.find((r) => r.metric === metric) if (!row) return null @@ -587,41 +886,56 @@ const LeaderboardTable: React.FC = ({ benchmarkData, sele return ( - - {metric} + + {metric} + { + e.stopPropagation() + handleColumnSort(group, subGroup, metric) + }} + title={ + getRowColumnSort(group, subGroup, metric) + ? getRowColumnSort(group, subGroup, metric) + ?.direction === 'asc' + ? 'Sort descending' + : 'Clear sort' + : 'Sort by this row' + } + > + {getRowColumnSort(group, subGroup, metric) + ? getRowColumnSort(group, subGroup, metric) + ?.direction === 'asc' + ? '▲' + : '▼' + : '⇅'} + - {/* For each metric column */} {overallMetrics .filter((oMetric) => selectedOverallMetrics.has(oMetric) ) .map((oMetric) => { - // Only show values for the matching metric const isMatchingMetric = findAllMetricsForName(oMetric).includes(metric) - if (!isMatchingMetric) { - // Fill empty cells for non-matching metrics return ( - {tableHeader - .filter((model) => - selectedModels.has(model) - ) - .map((col) => ( + {modelOrderByOverallMetric[oMetric].map( + (col) => ( - ))} + ) + )} ) } return ( - {tableHeader - .filter((model) => selectedModels.has(model)) - .map((col) => { + {modelOrderByOverallMetric[oMetric].map( + (col) => { const cell = row[col] return ( = ({ benchmarkData, sele : cell} ) - })} + } + )} ) })} ) - })} + }) + })()} ) })} diff --git a/frontend/src/components/ModelFilter.tsx b/frontend/src/components/ModelFilter.tsx index c3bb841112c2e1a255a60aefb89465c3ad8e50fe..777e2b02bf7b7901583e25d3f3fd6042529ec404 100644 --- a/frontend/src/components/ModelFilter.tsx +++ b/frontend/src/components/ModelFilter.tsx @@ -18,8 +18,8 @@ const ModelFilter: React.FC = ({ models, selectedModels, setSe } return ( -
-
+
+
Models ({selectedModels.size}/{models.length})