diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000000000000000000000000000000000..24ee5b1be9961e38a503c8e764b7385dbb6ba124 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ddd6705c7aaa2ff5e84aa5eef6d47b8eb0012d82 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,40 @@ +FROM node:22-bookworm-slim + +WORKDIR /app + +ENV PYTHONUNBUFFERED=1 \ + UV_PYTHON=3.13 \ + UV_LINK_MODE=copy + +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +RUN uv python install 3.13 + +COPY .python-version pyproject.toml uv.lock ./ + +COPY koja_diffuser ./koja_diffuser + +RUN uv sync --locked + +COPY frontend ./frontend + +EXPOSE 7860 + +CMD ["bash", "-lc", "\ + set -euo pipefail; \ + node frontend/server.js & \ + node_pid=$!; \ + uv run uvicorn koja_diffuser.runtime.api:app --host 127.0.0.1 --port 8000 & \ + api_pid=$!; \ + trap 'kill $node_pid $api_pid 2>/dev/null || true' INT TERM EXIT; \ + wait -n $node_pid $api_pid; \ + status=$?; \ + kill $node_pid $api_pid 2>/dev/null || true; \ + wait 2>/dev/null || true; \ + exit $status \ + "] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1b251807cc41801fa7f29f857bb11ca89f0edeac --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +--- +title: KoJaDiffuser +emoji: 🔥 +colorFrom: yellow +colorTo: yellow +sdk: docker +app_port: 7860 +pinned: false +--- diff --git a/frontend/client/_app/immutable/assets/0.DpcAwFkV.css b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css new file mode 100644 index 0000000000000000000000000000000000000000..a2c3c303922f215482c6da17c666148bed0af15e --- /dev/null +++ b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.0 | 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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-outline-style:solid;--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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-4xl:calc(var(--radius) * 2.6);--ease-out:cubic-bezier(0, 0, .2, 1);--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"IBM Plex Sans Variable", sans-serif;--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%;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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}html{font-family:IBM Plex Sans Variable,sans-serif}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.top-6{top:calc(var(--spacing) * 6)}.right-7{right:calc(var(--spacing) * 7)}.bottom-6{bottom:calc(var(--spacing) * 6)}.left-7{left:calc(var(--spacing) * 7)}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.order-first{order:-9999}.order-last{order:9999}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.ms-auto{margin-inline-start:auto}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.h-2{height:calc(var(--spacing) * 2)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.min-h-16{min-height:calc(var(--spacing) * 16)}.w-11\/12{width:91.6667%}.w-80{width:calc(var(--spacing) * 80)}.w-\[min\(620px\,100\%\)\]{width:min(620px,100%)}.w-\[min\(780px\,calc\(100vw-360px\)\)\]{width:min(780px,100vw - 360px)}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-\[min\(560px\,100\%\)\]{max-width:min(560px,100%)}.max-w-\[min\(640px\,92\%\)\]{max-width:min(640px,92%)}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-13{min-width:calc(var(--spacing) * 13)}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-70{min-width:calc(var(--spacing) * 70)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-\[42vh\]{flex-basis:42vh}.origin-center{transform-origin:50%}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[0\.96\]{scale:.96}.cursor-text{cursor:text}.touch-none{touch-action:none}.resize-none{resize:none}.scrollbar-none{scrollbar-width:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded-2xl{border-radius:calc(var(--radius) * 1.8)}.rounded-\[min\(var\(--radius-4xl\)\,24px\)\]{border-radius:min(var(--radius-4xl), 24px)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-t-\[min\(var\(--radius-4xl\)\,24px\)\]{border-top-left-radius:min(var(--radius-4xl), 24px);border-top-right-radius:min(var(--radius-4xl), 24px)}.rounded-b-\[min\(var\(--radius-4xl\)\,24px\)\]{border-bottom-right-radius:min(var(--radius-4xl), 24px);border-bottom-left-radius:min(var(--radius-4xl), 24px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-\[\#afcbff\]{border-color:#afcbff}.border-\[\#e8a7b8\]{border-color:#e8a7b8}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-transparent\!{border-color:#0000!important}.border-zinc-900\/10{border-color:#18181b1a}@supports (color:color-mix(in lab, red, red)){.border-zinc-900\/10{border-color:color-mix(in oklab, var(--color-zinc-900) 10%, transparent)}}.bg-background,.bg-background\/75{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/75{background-color:color-mix(in oklab, var(--background) 75%, transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/80{background-color:color-mix(in oklab, var(--background) 80%, transparent)}}.bg-card{background-color:var(--card)}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-input\/50{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.bg-input\/50{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-zinc-900\/90{background-color:#18181be6}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\/90{background-color:color-mix(in oklab, var(--color-zinc-900) 90%, transparent)}}.bg-clip-padding{background-clip:padding-box}.p-0{padding:calc(var(--spacing) * 0)}.p-\[3px\]{padding:3px}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-20{padding-bottom:calc(var(--spacing) * 20)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:IBM Plex Sans Variable,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--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))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[clamp\(10px\,1\.45vw\,17px\)\]{font-size:clamp(10px,1.45vw,17px)}.text-\[clamp\(30px\,6vw\,70px\)\]{font-size:clamp(30px,6vw,70px)}.text-\[clamp\(42px\,8vw\,96px\)\]{font-size:clamp(42px,8vw,96px)}.leading-\[1\.02\]{--tw-leading:1.02;line-height:1.02}.leading-\[1\.05\]{--tw-leading:1.05;line-height:1.05}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-none{--tw-leading:1;line-height:1}.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-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.accent-\[\#afcbff\]{accent-color:#afcbff}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-\[0_8px_20px_rgba\(0\,0\,0\,0\.16\)\]{--tw-shadow:0 8px 20px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_12px_32px_rgba\(24\,24\,27\,0\.05\)\]{--tw-shadow:0 12px 32px var(--tw-shadow-color,#18181b0d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--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)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-black\/10{--tw-ring-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.ring-black\/10{--tw-ring-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.ring-foreground\/5{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.ring-foreground\/5{--tw-ring-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.saturate-100{--tw-saturate:saturate(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,)}.saturate-\[0\.88\]{--tw-saturate:saturate(.88);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,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[opacity\,transform\,filter\]{transition-property:opacity,transform,filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[opacity\,transform\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[image-rendering\:pixelated\]{image-rendering:pixelated}.not-dark\:bg-clip-padding:not(:is(.dark *)){background-clip:padding-box}.group-has-\[\>input\]\/input-group\:pt-2:is(:where(.group\/input-group):has(>input) *){padding-top:calc(var(--spacing) * 2)}.group-has-\[\>input\]\/input-group\:pb-2:is(:where(.group\/input-group):has(>input) *){padding-bottom:calc(var(--spacing) * 2)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *),.group-data-\[disabled\=true\]\/input-group\:opacity-50:is(:where(.group\/input-group)[data-disabled=true] *){opacity:.5}.group-data-\[orientation\=vertical\]\/tabs\:h-fit:is(:where(.group\/tabs)[data-orientation=vertical] *){height:fit-content}.group-data-\[orientation\=vertical\]\/tabs\:w-full:is(:where(.group\/tabs)[data-orientation=vertical] *){width:100%}.group-data-\[orientation\=vertical\]\/tabs\:flex-col:is(:where(.group\/tabs)[data-orientation=vertical] *){flex-direction:column}.group-data-\[orientation\=vertical\]\/tabs\:justify-start:is(:where(.group\/tabs)[data-orientation=vertical] *){justify-content:flex-start}.group-data-\[size\=sm\]\/card\:px-4:is(:where(.group\/card)[data-size=sm] *){padding-inline:calc(var(--spacing) * 4)}.group-data-\[variant\=line\]\/tabs-list\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *){background-color:#0000}.group-data-horizontal\/tabs\:h-8:is(:where(.group\/tabs):where([data-orientation=horizontal]) *){height:calc(var(--spacing) * 8)}.group-data-vertical\/tabs\:p-1:is(:where(.group\/tabs):where([data-orientation=vertical]) *){padding:calc(var(--spacing) * 1)}.group-data-vertical\/tabs\:px-3:is(:where(.group\/tabs):where([data-orientation=vertical]) *){padding-inline:calc(var(--spacing) * 3)}.group-data-vertical\/tabs\:py-0\.5:is(:where(.group\/tabs):where([data-orientation=vertical]) *){padding-block:calc(var(--spacing) * .5)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);inset-inline:calc(var(--spacing) * 0)}.group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);bottom:-5px}.group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}.group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}.group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}@media (hover:hover){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-\[color-mix\(in_oklch\,var\(--secondary\)\,var\(--foreground\)_5\%\)\]:hover{background-color:color-mix(in oklch,var(--secondary),var(--foreground) 5%)}}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:ring-ring\/30:hover{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.hover\:ring-ring\/30:hover{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.active\:not-aria-\[haspopup\]\:translate-y-px:active:not([aria-haspopup]){--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:border-inherit:focus-within{border-color:inherit}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:ring-0:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-end\]\:pr-2\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-end\]\:pr-3:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 3)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-2\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-start\]\:pl-3:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 3)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[slot\=card-description\]\:grid-rows-\[auto_auto\]:has([data-slot=card-description]){grid-template-rows:auto auto}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:border-ring:has([data-slot=input-group-control]:focus-visible){border-color:var(--ring)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-3:has([data-slot=input-group-control]:focus-visible){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:border-destructive:has([data-slot][aria-invalid=true]){border-color:var(--destructive)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-3:has([data-slot][aria-invalid=true]){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.has-\[\>\[data-align\=block-end\]\]\:h-auto:has(>[data-align=block-end]){height:auto}.has-\[\>\[data-align\=block-end\]\]\:flex-col:has(>[data-align=block-end]){flex-direction:column}.has-\[\>\[data-align\=block-start\]\]\:h-auto:has(>[data-align=block-start]){height:auto}.has-\[\>\[data-align\=block-start\]\]\:flex-col:has(>[data-align=block-start]){flex-direction:column}.has-\[\>button\]\:mr-\[-0\.3rem\]:has(>button){margin-right:-.3rem}.has-\[\>button\]\:ml-\[-0\.3rem\]:has(>button){margin-left:-.3rem}.has-\[\>img\:first-child\]\:pt-0:has(>img:first-child){padding-top:calc(var(--spacing) * 0)}.has-\[\>kbd\]\:mr-\[-0\.15rem\]:has(>kbd){margin-right:-.15rem}.has-\[\>kbd\]\:ml-\[-0\.15rem\]:has(>kbd){margin-left:-.15rem}.has-\[\>svg\]\:p-0:has(>svg){padding:calc(var(--spacing) * 0)}.has-\[\>textarea\]\:h-auto:has(>textarea){height:auto}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-3[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-bounded\:text-foreground[data-bounded]{color:var(--foreground)}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[size\=sm\]\:gap-4[data-size=sm]{gap:calc(var(--spacing) * 4)}.data-\[size\=sm\]\:py-4[data-size=sm]{padding-block:calc(var(--spacing) * 4)}:is(.\*\*\:data-\[slot\=kbd\]\:rounded-2xl *)[data-slot=kbd]{border-radius:calc(var(--radius) * 1.8)}:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:color-mix(in oklab, var(--muted-foreground) 10%, transparent)}}:is(.\*\*\:data-\[slot\=kbd\]\:px-1\.5 *)[data-slot=kbd]{padding-inline:calc(var(--spacing) * 1.5)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}@media not all and (width>=48rem){.max-md\:top-4{top:calc(var(--spacing) * 4)}.max-md\:right-4{right:calc(var(--spacing) * 4)}.max-md\:bottom-4{bottom:calc(var(--spacing) * 4)}.max-md\:left-4{left:calc(var(--spacing) * 4)}.max-md\:w-\[min\(100\%-32px\,560px\)\]{width:min(100% - 32px,560px)}}@media (width>=48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:bg-background\/20:is(.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-background\/20:is(.dark *){background-color:color-mix(in oklab, var(--background) 20%, transparent)}}.dark\:bg-destructive\/20:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/20:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}.dark\:ring-foreground\/10:is(.dark *){--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.dark\:ring-foreground\/10:is(.dark *){--tw-ring-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}@media (hover:hover){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-input\/30:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:is(.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:is(.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:is(.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.data-disabled\:opacity-50:where([data-disabled=true]),.data-disabled\:opacity-50:where([data-disabled]:not([data-disabled=false])){opacity:.5}.data-active\:bg-background:where([data-state=active]),.data-active\:bg-background:where([data-active]:not([data-active=false])){background-color:var(--background)}.data-active\:text-foreground:where([data-state=active]),.data-active\:text-foreground:where([data-active]:not([data-active=false])){color:var(--foreground)}.group-data-\[variant\=line\]\/tabs-list\:data-active\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *):where([data-state=active]),.group-data-\[variant\=line\]\/tabs-list\:data-active\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *):where([data-active]:not([data-active=false])){background-color:#0000}:is(.group-data-\[variant\=line\]\/tabs-list\:data-active\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *):where([data-state=active]),.group-data-\[variant\=line\]\/tabs-list\:data-active\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *):where([data-active]:not([data-active=false]))):after{content:var(--tw-content);opacity:1}.dark\:data-active\:border-input:is(.dark *):where([data-state=active]),.dark\:data-active\:border-input:is(.dark *):where([data-active]:not([data-active=false])){border-color:var(--input)}.dark\:data-active\:bg-input\/30:is(.dark *):where([data-state=active]),.dark\:data-active\:bg-input\/30:is(.dark *):where([data-active]:not([data-active=false])){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-active\:bg-input\/30:is(.dark *):where([data-state=active]),.dark\:data-active\:bg-input\/30:is(.dark *):where([data-active]:not([data-active=false])){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-active\:text-foreground:is(.dark *):where([data-state=active]),.dark\:data-active\:text-foreground:is(.dark *):where([data-active]:not([data-active=false])){color:var(--foreground)}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-active\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *):where([data-state=active]),.dark\:group-data-\[variant\=line\]\/tabs-list\:data-active\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *):where([data-active]:not([data-active=false])){border-color:#0000}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-active\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *):where([data-state=active]),.dark\:group-data-\[variant\=line\]\/tabs-list\:data-active\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *):where([data-active]:not([data-active=false])){background-color:#0000}.data-horizontal\:h-1:where([data-orientation=horizontal]){height:calc(var(--spacing) * 1)}.data-horizontal\:h-full:where([data-orientation=horizontal]){height:100%}.data-horizontal\:w-full:where([data-orientation=horizontal]){width:100%}.data-vertical\:h-full:where([data-orientation=vertical]){height:100%}.data-vertical\:min-h-40:where([data-orientation=vertical]){min-height:calc(var(--spacing) * 40)}.data-vertical\:w-1:where([data-orientation=vertical]){width:calc(var(--spacing) * 1)}.data-vertical\:w-auto:where([data-orientation=vertical]){width:auto}.data-vertical\:w-full:where([data-orientation=vertical]){width:100%}.data-vertical\:flex-col:where([data-orientation=vertical]){flex-direction:column}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\.border-b\]\:pb-2.border-b{padding-bottom:calc(var(--spacing) * 2)}.\[\.border-b\]\:pb-5.border-b{padding-bottom:calc(var(--spacing) * 5)}.group-data-\[size\=sm\]\/card\:\[\.border-b\]\:pb-4:is(:where(.group\/card)[data-size=sm] *).border-b{padding-bottom:calc(var(--spacing) * 4)}.\[\.border-t\]\:pt-2.border-t{padding-top:calc(var(--spacing) * 2)}.\[\.border-t\]\:pt-5.border-t{padding-top:calc(var(--spacing) * 5)}.group-data-\[size\=sm\]\/card\:\[\.border-t\]\:pt-4:is(:where(.group\/card)[data-size=sm] *).border-t{padding-top:calc(var(--spacing) * 4)}:is(.\*\:\[img\:first-child\]\:rounded-t-\[min\(var\(--radius-4xl\)\,24px\)\]>*):is(img:first-child){border-top-left-radius:min(var(--radius-4xl), 24px);border-top-right-radius:min(var(--radius-4xl), 24px)}:is(.\*\:\[img\:last-child\]\:rounded-b-\[min\(var\(--radius-4xl\)\,24px\)\]>*):is(img:last-child){border-bottom-right-radius:min(var(--radius-4xl), 24px);border-bottom-left-radius:min(var(--radius-4xl), 24px)}.has-\[\>\[data-align\=block-end\]\]\:\[\&\>input\]\:pt-3:has(>[data-align=block-end])>input{padding-top:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=block-start\]\]\:\[\&\>input\]\:pb-3:has(>[data-align=block-start])>input{padding-bottom:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=inline-end\]\]\:\[\&\>input\]\:pr-1\.5:has(>[data-align=inline-end])>input{padding-right:calc(var(--spacing) * 1.5)}.has-\[\>\[data-align\=inline-start\]\]\:\[\&\>input\]\:pl-1\.5:has(>[data-align=inline-start])>input{padding-left:calc(var(--spacing) * 1.5)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5>svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(./ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--background:oklch(100% 0 0);--foreground:oklch(14.8% .004 228.8);--card:oklch(100% 0 0);--card-foreground:oklch(14.8% .004 228.8);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.8% .004 228.8);--primary:oklch(21.8% .008 223.9);--primary-foreground:oklch(98.7% .002 197.1);--secondary:oklch(96.3% .002 197.1);--secondary-foreground:oklch(21.8% .008 223.9);--muted:oklch(96.3% .002 197.1);--muted-foreground:oklch(56% .021 213.5);--accent:oklch(96.3% .002 197.1);--accent-foreground:oklch(21.8% .008 223.9);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.5% .005 214.3);--input:oklch(92.5% .005 214.3);--ring:oklch(72.3% .014 214.4);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--radius:.45rem;--sidebar:oklch(98.7% .002 197.1);--sidebar-foreground:oklch(14.8% .004 228.8);--sidebar-primary:oklch(21.8% .008 223.9);--sidebar-primary-foreground:oklch(98.7% .002 197.1);--sidebar-accent:oklch(96.3% .002 197.1);--sidebar-accent-foreground:oklch(21.8% .008 223.9);--sidebar-border:oklch(92.5% .005 214.3);--sidebar-ring:oklch(72.3% .014 214.4)}.dark{--background:oklch(14.8% .004 228.8);--foreground:oklch(98.7% .002 197.1);--card:oklch(21.8% .008 223.9);--card-foreground:oklch(98.7% .002 197.1);--popover:oklch(21.8% .008 223.9);--popover-foreground:oklch(98.7% .002 197.1);--primary:oklch(92.5% .005 214.3);--primary-foreground:oklch(21.8% .008 223.9);--secondary:oklch(27.5% .011 216.9);--secondary-foreground:oklch(98.7% .002 197.1);--muted:oklch(27.5% .011 216.9);--muted-foreground:oklch(72.3% .014 214.4);--accent:oklch(27.5% .011 216.9);--accent-foreground:oklch(98.7% .002 197.1);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(56% .021 213.5);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--sidebar:oklch(21.8% .008 223.9);--sidebar-foreground:oklch(98.7% .002 197.1);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.7% .002 197.1);--sidebar-accent:oklch(27.5% .011 216.9);--sidebar-accent-foreground:oklch(98.7% .002 197.1);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(56% .021 213.5)}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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-outline-style{syntax:"*";inherits:false;initial-value:solid}@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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@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} diff --git a/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.br b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.br new file mode 100644 index 0000000000000000000000000000000000000000..9b71a372c676cb01ee17b231b9b29a68c9cfbb2d Binary files /dev/null and b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.br differ diff --git a/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.gz b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.gz new file mode 100644 index 0000000000000000000000000000000000000000..a5ef10bcf568f025ae3d530479948def26b620f5 Binary files /dev/null and b/frontend/client/_app/immutable/assets/0.DpcAwFkV.css.gz differ diff --git a/frontend/client/_app/immutable/assets/2.BIbYdWBv.css b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css new file mode 100644 index 0000000000000000000000000000000000000000..e11d2326440ed9de16a45e6c78b678a0fcc674e3 --- /dev/null +++ b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css @@ -0,0 +1 @@ +.step-column.svelte-1szbnx{scrollbar-width:none}.step-column.svelte-1szbnx::-webkit-scrollbar{display:none} diff --git a/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.br b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.br new file mode 100644 index 0000000000000000000000000000000000000000..fdc777173ebeb7b94f785410a33b9b49b24c4754 Binary files /dev/null and b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.br differ diff --git a/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.gz b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.gz new file mode 100644 index 0000000000000000000000000000000000000000..e88a78513a047adeecc2f96f2184fdeef3781390 Binary files /dev/null and b/frontend/client/_app/immutable/assets/2.BIbYdWBv.css.gz differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5f9ba79bb64c64182a934947fc3be04073c175b8 Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2 differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..92a56296393e985d5741d35403408d497c8ef161 Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2 differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..4ffe304cd71e48e7a8a563c0f006840d888f39cf Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2 differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..394ebbb3436c533e230c9bef0fcc41480e59efeb Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2 differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b757bc5ca2d8845a5b8d5349c860553f1772dd69 Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2 differ diff --git a/frontend/client/_app/immutable/assets/ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2 b/frontend/client/_app/immutable/assets/ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..355e94162150315e4cf8c1908fbf27435e8b7b04 Binary files /dev/null and b/frontend/client/_app/immutable/assets/ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2 differ diff --git a/frontend/client/_app/immutable/chunks/Bw-0QipA.js b/frontend/client/_app/immutable/chunks/Bw-0QipA.js new file mode 100644 index 0000000000000000000000000000000000000000..e2ed4d6f3b267f508d99057032824cc9ee58c999 --- /dev/null +++ b/frontend/client/_app/immutable/chunks/Bw-0QipA.js @@ -0,0 +1,3 @@ +var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=Array.isArray,r=Array.prototype.indexOf,i=Array.prototype.includes,a=Array.from,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,l=Object.prototype,u=Array.prototype,d=Object.getPrototypeOf,f=Object.isExtensible;function p(e){return typeof e==`function`}var m=()=>{};function h(e){for(var t=0;t{e=n,t=r}),resolve:e,reject:t}}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var v=1<<24,y=1024,b=2048,x=4096,S=8192,ee=16384,te=32768,ne=1<<25,re=65536,ie=1<<18,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,ue=1<<22,de=1<<23,fe=Symbol(`$state`),pe=Symbol(`legacy props`),me=Symbol(``),he=Symbol(`proxy path`),ge=Symbol(`attributes`),_e=Symbol(`class`),ve=Symbol(`style`),ye=Symbol(`text`),be=Symbol(`form reset`),xe=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Se=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function Ce(e){throw Error(`https://svelte.dev/e/experimental_async_required`)}function we(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Te(){throw Error(`https://svelte.dev/e/missing_context`)}function Ee(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function De(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Oe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ke(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ae(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function je(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Me(){throw Error(`https://svelte.dev/e/fork_discarded`)}function Ne(){throw Error(`https://svelte.dev/e/fork_timing`)}function Pe(){throw Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`)}function Fe(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Ie(e){throw Error(`https://svelte.dev/e/lifecycle_legacy_only`)}function Le(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Re(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ue={},C=Symbol(`uninitialized`),We=`http://www.w3.org/1999/xhtml`,Ge=`http://www.w3.org/2000/svg`,Ke=`@attach`;function qe(){console.warn(`https://svelte.dev/e/derived_inert`)}function Je(e){console.warn(`https://svelte.dev/e/hydratable_missing_but_expected`)}function Ye(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Xe(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ze(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var w=!1;function T(e){w=e}var E;function D(e){if(e===null)throw Ye(),Ue;return E=e}function Qe(){return D(z(E))}function $e(e){if(w){if(z(E)!==null)throw Ye(),Ue;E=e}}function et(e=1){if(w){for(var t=e,n=E;t--;)n=z(n);E=n}}function tt(e=!0){for(var t=0,n=E;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=z(n);e&&n.remove(),n=i}}function nt(e){if(!e||e.nodeType!==8)throw Ye(),Ue;return e.data}function rt(e){return e===this.v}function it(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function at(e){return!it(e,this.v)}var O=!1,ot=!1;function st(e,t){return e.label=t,ct(e.v,t),e}function ct(e,t){return e?.[he]?.(t),e}function lt(e){return typeof e==`symbol`?`Symbol(${e.description})`:typeof e==`function`?``:typeof e==`object`&&e?``:String(e)}var k=null;function ut(e){k=e}function dt(){let e={};return[()=>(mt(e)||Te(),ft(e)),t=>pt(e,t)]}function ft(e){return yt(`getContext`).get(e)}function pt(e,t){let n=yt(`setContext`);if(O){var r=K.f;!U&&r&32&&!k.i||Re()}return n.set(e,t),t}function mt(e){return yt(`hasContext`).has(e)}function ht(){return yt(`getAllContexts`)}function gt(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:K,l:ot&&!t?{s:null,u:null,$:[]}:null}}function _t(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)nr(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function vt(){return!ot||k!==null&&k.l===null}function yt(e){return k===null&&we(e),k.c??=new Map(bt(k)||void 0)}function bt(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var xt=[];function St(){var e=xt;xt=[],h(e)}function A(e){if(xt.length===0&&!zt){var t=xt;queueMicrotask(()=>{t===xt&&St()})}xt.push(e)}function Ct(){for(;xt.length>0;)St()}function wt(e){var t=K;if(t===null)return U.f|=de,e;if(!(t.f&32768)&&!(t.f&4))throw e;Tt(e,t)}function Tt(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var Et=~(b|x|y);function j(e,t){e.f=e.f&Et|t}function Dt(e){e.f&512||e.deps===null?j(e,y):j(e,x)}function Ot(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,Ot(t.deps))}function kt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Ot(e.deps),j(e,y)}var At=[];function jt(e,t=m){let n=null,r=new Set;function i(t){if(it(e,t)&&(e=t,n)){let t=!At.length;for(let t of r)t[1](),At.push(t,e);if(t){for(let e=0;e{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var Mt=!1,Nt=!1;function Pt(e){var t=Nt;try{return Nt=!1,[e(),Nt]}finally{Nt=t}}var Ft=null,It=null,M=null,Lt=null,N=null,Rt=null,zt=!1,Bt=!1,Vt=null,Ht=null,Ut=0,Wt=1,Gt=class e{id=Wt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#r=new Set;#i=new Set;#a=new Set;#o=0;#s=new Map;#c=null;#l=[];#u=[];#d=new Set;#f=new Set;#p=new Map;#m=new Set;is_fork=!1;#h=!1;#g(){if(this.is_fork)return!0;for(let n of this.#s.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#p.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#p.has(e)||this.#p.set(e,{d:[],m:[]}),this.#m.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#p.get(e);if(n){this.#p.delete(e);for(var r of n.d)j(r,b),t(r);for(r of n.m)j(r,x),t(r)}this.#m.add(e)}#_(){if(this.#e=!0,Ut++>1e3&&(this.#w(),qt()),!this.#g()){for(let e of this.#d)this.#f.delete(e),j(e,b),this.schedule(e);for(let e of this.#f)j(e,x),this.schedule(e)}let t=this.#l;this.#l=[],this.apply();var n=Vt=[],r=[],i=Ht=[];for(let e of t)try{this.#v(e,n,r)}catch(t){throw en(e),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Vt=null,Ht=null,this.#g()){this.#x(r),this.#x(n);for(let[e,t]of this.#p)$t(e,t);i.length>0&&M.#_();return}let o=this.#y();if(o){o.#b(this);return}this.#d.clear(),this.#f.clear();for(let e of this.#r)e(this);this.#r.clear(),Lt=this,Jt(r),Jt(n),Lt=null,this.#c?.resolve();var s=M;if(this.linked&&this.#o===0&&this.#w(),O&&!this.linked&&(this.#S(),M=s),this.#l.length>0){s===null&&(s=this,this.#C());let e=s;e.#l.push(...this.#l.filter(t=>!e.#l.includes(t)))}s!==null&&s.#_()}#v(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#p.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):O&&i&16777224?n.push(r):Nr(r)&&(i&16&&this.#f.add(r),Rr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#f.delete(i),j(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#w(),M=this,this.#_()}#x(e){for(var t=0;t!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#m)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#x([e])});l.activate();var i=new Set,a=new Map;for(var o of t)Yt(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e.v:!0);if(s.length>0)for(let e of this.#u)!(e.f&155648)&&Zt(e,s,a)&&(e.f&4194320?(j(e,b),l.schedule(e)):l.#d.add(e));if(l.#l.length>0&&!l.#h){l.apply();for(var c of l.#l)l.#v(c,[],[]);l.#l=[]}l.deactivate()}}}}increment(e,t){if(this.#o+=1,e){let e=this.#s.get(t)??0;this.#s.set(t,e+1)}}decrement(e,t){if(--this.#o,e){let e=this.#s.get(t)??0;e===1?this.#s.delete(t):this.#s.set(t,e-1)}this.#h||(this.#h=!0,A(()=>{this.#h=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#d.add(t);for(let e of t)this.#f.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}on_fork_commit(e){this.#a.add(e)}run_fork_commit_callbacks(){for(let e of this.#a)e(this);this.#a.clear()}settled(){return(this.#c??=g()).promise}static ensure(){if(M===null){let t=M=new e;t.#C(),!Bt&&!zt&&A(()=>{t.#e||t.flush()})}return M}apply(){if(!O||!this.is_fork&&this.#t===null&&this.#n===null){N=null;return}N=new Map;for(let[e,[t]]of this.current)N.set(e,t);for(let t=Ft;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id0)){Sn.clear();for(let e of P){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)P.has(n)&&(P.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Rr(n)}}P.clear()}}P=null}}function Yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Yt(i,t,n,r):e&4194320&&!(e&2048)&&Zt(i,t,r)&&(j(i,b),Qt(i))}}function Xt(e,t){if(e.reactions!==null)for(let n of e.reactions){let e=n.f;e&2?Xt(n,t):e&131072&&(j(n,b),t.add(n))}}function Zt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(i.call(t,r))return!0;if(r.f&2&&Zt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Qt(e){M.schedule(e)}function $t(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,y);for(var n=e.first;n!==null;)$t(n,t),n=n.next}}function en(e){j(e,y);for(var t=e.first;t!==null;)en(t),t=t.next}function tn(e){O||Ce(`fork`),M!==null&&Ne();var t=Gt.ensure();t.is_fork=!0,N=new Map;var n=!1,r=t.settled();return Kt(e),{commit:async()=>{if(n){await r;return}t.linked||Me(),n=!0,t.is_fork=!1;for(var[e,[i]]of t.current)e.v=i,e.wv=Mr();t.activate(),t.run_fork_commit_callbacks(),t.deactivate(),Kt(()=>{var e=new Set;for(var n of t.current.keys())Xt(n,e);Cn(e),On()}),t.flush(),await r},discard:()=>{for(var e of t.current.keys())e.wv=Mr();!n&&t.linked&&t.discard()}}}function nn(e){let t=0,n=Tn(0),r;return()=>{$n()&&(Q(n),cr(()=>(t===0&&(r=Ur(()=>e(()=>kn(n)))),t+=1,()=>{A(()=>{--t,t===0&&(r?.(),r=void 0,kn(n))})})))}}var rn=re|ae;function an(e,t,n,r){new on(e,t,n,r)}var on=class{parent;is_pending=!1;transform_error;#e;#t=w?E:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=nn(()=>(this.#m=Tn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=K;t.b=this,t.f|=128,n(e)},this.parent=K.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=ur(()=>{if(w){let e=this.#t;Qe();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},rn),w&&(this.#e=E)}#g(){try{this.#a=V(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=V(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=V(()=>e(this.#e)),A(()=>{var e=this.#c=document.createDocumentFragment(),t=L();e.append(t),this.#a=this.#x(()=>V(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,_r(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=V(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();xr(this.#a,e);let t=this.#n.pending;this.#o=V(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){kt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=K,n=U,r=k;q(this.#i),G(this.#i),ut(this.#i.ctx);try{return Gt.ensure(),e()}catch(e){return wt(e),null}finally{q(t),G(n),ut(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&_r(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,A(()=>{this.#d=!1,this.#m&&Dn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),Q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),w&&(D(this.#t),et(),D(tt()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Ze();return}r=!0,i&&He(),this.#s!==null&&_r(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Tt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return V(()=>{var t=K;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Tt(e,this.#i.parent),null}}))};A(()=>{var t;try{t=this.transform_error(e)}catch(e){Tt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Tt(e,this.#i&&this.#i.parent)):o(t)})}};function sn(e,t,n,r){let i=vt()?dn:hn;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=K,s=cn(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){if(!(o.f&16384)){s();try{r(e)}catch(e){Tt(e,o)}ln()}}var u=un();if(n.length===0){c.then(()=>l(t.map(i))).finally(u);return}function d(){Promise.all(n.map(e=>pn(e))).then(e=>l([...t.map(i),...e])).catch(e=>Tt(e,o)).finally(u)}c?c.then(()=>{s(),d(),ln()}):d()}function cn(){var e=K,t=U,n=k,r=M;return function(i=!0){q(e),G(t),ut(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ln(e=!0){q(null),G(null),ut(null),e&&M?.deactivate()}function un(){var e=K,t=e.b,n=M,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function dn(e){var t=2|b;return K!==null&&(K.f|=ae),{ctx:k,deps:null,effects:null,equals:rt,f:t,fn:e,reactions:null,rv:0,v:C,wv:0,parent:K,ac:null}}var fn=Symbol(`obsolete`);function pn(e,t,n){let r=K;r===null&&Ee();var i=void 0,a=Tn(C),o=!U,s=new Set;return sr(()=>{var t=K,n=g();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==xe&&n.reject(e)}).finally(ln)}catch(e){n.reject(e),ln()}var c=M;if(o){if(t.f&32768)var l=un();if(r.b.is_rendered())c.async_deriveds.get(t)?.reject(fn);else for(let e of s.values())e.reject(fn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==fn&&(c.activate(),t?(a.f|=de,Dn(a,t)):(a.f&8388608&&(a.f^=de),Dn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),er(()=>{for(let e of s)e.reject(fn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function mn(e){let t=dn(e);return O||Er(t),t}function hn(e){let t=dn(e);return t.equals=at,t}function gn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!wn&&On()}return t}function On(){wn=!1;for(let e of xn){e.f&1024&&j(e,x);let t;try{t=Nr(e)}catch{t=!0}t&&Rr(e)}xn.clear()}function kn(e){I(e,e.v+1)}function An(e,t,n){var r=e.reactions;if(r!==null)for(var i=vt(),a=r.length,o=0;o{if(Ar===c)return e();var t=U,n=Ar;G(null),jr(c);var r=e();return G(t),jr(n),r};return i&&r.set(`length`,F(e.length,o)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?f(()=>{var e=F(n.value,o);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>F(C,o));r.set(t,e),kn(a)}}else I(n,C),kn(a);return!0},get(t,n,i){if(n===fe)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||s(t,n)?.writable)&&(a=f(()=>F(jn(c?t[n]:C),o)),r.set(n,a)),a!==void 0){var l=Q(a);return l===C?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=Q(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==C)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===fe)return!0;var n=r.get(t),i=n!==void 0&&n.v!==C||Reflect.has(e,t);return(n!==void 0||K!==null&&(!i||s(e,t)?.writable))&&(n===void 0&&(n=f(()=>F(i?jn(e[t]):C,o)),r.set(t,n)),Q(n)===C)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;dF(C,o)),r.set(d+``,p)):I(p,C)}if(l===void 0)(!u||s(e,t)?.writable)&&(l=f(()=>F(void 0,o)),I(l,jn(n)),r.set(t,l));else{u=l.v!==C;var m=f(()=>jn(n));I(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&I(g,_+1)}kn(a)}return!0},ownKeys(e){Q(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==C});for(var[n,i]of r)i.v!==C&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Be()}})}function Mn(e){try{if(typeof e==`object`&&e&&fe in e)return e[fe]}catch{}return e}function Nn(e,t){return Object.is(Mn(e),Mn(t))}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var Pn,Fn,In,Ln;function Rn(){if(Pn===void 0){Pn=window,Fn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;In=s(t,`firstChild`).get,Ln=s(t,`nextSibling`).get,f(e)&&(e[_e]=void 0,e[ge]=null,e[ve]=void 0,e.__e=void 0),f(n)&&(n[ye]=void 0)}}function L(e=``){return document.createTextNode(e)}function R(e){return In.call(e)}function z(e){return Ln.call(e)}function zn(e,t){if(!w)return R(e);var n=R(E);if(n===null)n=E.appendChild(L());else if(t&&n.nodeType!==3){var r=L();return n?.before(r),D(r),r}return t&&Gn(n),D(n),n}function Bn(e,t=!1){if(!w){var n=R(e);return n instanceof Comment&&n.data===``?z(n):n}if(t){if(E?.nodeType!==3){var r=L();return E?.before(r),D(r),r}Gn(E)}return E}function Vn(e,t=1,n=!1){let r=w?E:e;for(var i;t--;)i=r,r=z(r);if(!w)return r;if(n){if(r?.nodeType!==3){var a=L();return r===null?i?.after(a):r.before(a),D(a),a}Gn(r)}return D(r),r}function Hn(e){e.textContent=``}function Un(){return!O||P!==null?!1:(K.f&te)!==0}function Wn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function Gn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Kn(e,t){if(t){let t=document.body;e.autofocus=!0,A(()=>{document.activeElement===t&&e.focus()})}}var qn=!1;function Jn(){qn||(qn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[be]?.()})},{capture:!0}))}function Yn(e){var t=U,n=K;G(null),q(null);try{return e()}finally{G(t),q(n)}}function Xn(e,t,n,r=n){e.addEventListener(t,()=>Yn(n));let i=e[be];i?e[be]=()=>{i(),r(!0)}:e[be]=()=>r(!0),Jn()}function Zn(e){K===null&&(U===null&&Ae(e),ke()),wr&&Oe(e)}function Qn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function B(e,t){var n=K;n!==null&&n.f&8192&&(e|=S);var r={ctx:k,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Vt===null?Gt.ensure().schedule(r):Vt.push(r);else if(t!==null){try{Rr(r)}catch(e){throw H(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&Qn(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function $n(){return U!==null&&!W}function er(e){let t=B(8,null);return j(t,y),t.teardown=e,t}function tr(e){Zn(`$effect`);var t=K.f;if(!U&&t&32&&!(t&32768)){var n=k;(n.e??=[]).push(e)}else return nr(e)}function nr(e){return B(4|oe,e)}function rr(e){return Zn(`$effect.pre`),B(8|oe,e)}function ir(e){Gt.ensure();let t=B(64|ae,e);return()=>{H(t)}}function ar(e){Gt.ensure();let t=B(64|ae,e);return(e={})=>new Promise(n=>{e.outro?_r(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function or(e){return B(4,e)}function sr(e){return B(ue|ae,e)}function cr(e,t=0){return B(8|t,e)}function lr(e,t=[],n=[],r=[]){sn(r,t,n,t=>{B(8,()=>e(...t.map(Q)))})}function ur(e,t=0){return B(16|t,e)}function dr(e,t=0){return B(v|t,e)}function V(e){return B(32|ae,e)}function fr(e){var t=e.teardown;if(t!==null){let e=wr,n=U;Tr(!0),G(null);try{t.call(null)}finally{Tr(e),G(n)}}}function pr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Yn(()=>{e.abort(xe)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function mr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(hr(e.nodes.start,e.nodes.end),n=!0),j(e,ne),pr(e,t&&!n),Lr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();fr(e),e.f^=ne,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&gr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function hr(e,t){for(;e!==null;){var n=e===t?null:z(e);e.remove(),e=n}}function gr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function _r(e,t,n=!0){var r=[];vr(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function vr(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;vr(i,t,o?n:!1)}i=a}}}function yr(e){br(e,!0)}function br(e,t){if(e.f&8192){e.f^=S,e.f&1024||(j(e,b),Gt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;br(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function xr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:z(n);t.append(n),n=i}}var Sr=null,Cr=!1,wr=!1;function Tr(e){wr=e}var U=null,W=!1;function G(e){U=e}var K=null;function q(e){K=e}var J=null;function Er(e){U!==null&&(!O||U.f&2)&&(J===null?J=[e]:J.push(e))}var Y=null,X=0,Z=null;function Dr(e){Z=e}var Or=1,kr=0,Ar=kr;function jr(e){Ar=e}function Mr(){return++Or}function Nr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}t&512&&N===null&&j(e,y)}return!1}function Pr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!O&&J!==null&&i.call(J,e)))for(var a=0;a{e.ac.abort(xe)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=te;var f=e.deps,p=M?.is_fork;if(Y!==null){var m;if(p||Lr(e,X),f!==null&&X>0)for(f.length=X+Y.length,m=0;m{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Kt()}function Br(){return Gt.ensure().settled()}function Q(e){var t=(e.f&2)!=0;if(Sr?.add(e),U!==null&&!W&&!(K!==null&&K.f&16384)&&(J===null||!i.call(J,e))){var n=U.deps;if(U.f&2097152)e.rvn?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?A(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ai(e,t,n,r={}){var i=ii(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function oi(e,t,n,r,i){var a={capture:r,passive:i},o=ii(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&er(()=>{t.removeEventListener(e,o,a)})}function si(e,t,n){(t[ti]??={})[e]=n}function ci(e){for(var t=0;t{throw e});throw p}}finally{e[ti]=t,delete e.currentTarget,G(d),q(f)}}}var di=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function fi(e){return di?.createHTML(e)??e}function pi(e){var t=Wn(`template`);return t.innerHTML=fi(e.replaceAll(``,``)),t.content}function $(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function mi(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(``);return()=>{if(w)return $(E,null),E;i===void 0&&(i=pi(a?e:``+e),n||(i=R(i)));var t=r||Fn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=R(t),s=t.lastChild;$(o,s)}else $(t,t);return t}}function hi(e,t,n=`svg`){var r=!e.startsWith(``),i=(t&1)!=0,a=`<${n}>${r?e:``+e}`,o;return()=>{if(w)return $(E,null),E;if(!o){var e=R(pi(a));if(i)for(o=document.createDocumentFragment();R(e);)o.appendChild(R(e));else o=R(e)}var t=o.cloneNode(!0);if(i){var n=R(t),r=t.lastChild;$(n,r)}else $(t,t);return t}}function gi(e,t){return hi(e,t,`svg`)}function _i(e=``){if(!w){var t=L(e+``);return $(t,t),t}var n=E;return n.nodeType===3?Gn(n):(n.before(n=L()),D(n)),$(n,n),n}function vi(){if(w)return $(E,null),E;var e=document.createDocumentFragment(),t=document.createComment(``),n=L();return e.append(t,n),$(t,n),e}function yi(e,t){if(w){var n=K;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=E),Qe();return}e!==null&&e.before(t)}function bi(){if(w&&E&&E.nodeType===8&&E.textContent?.startsWith(`$`)){let e=E.textContent.substring(1);return Qe(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function xi(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ye]??=e.nodeValue)&&(e[ye]=n,e.nodeValue=`${n}`)}function Si(e,t){return Ti(e,t)}function Ci(e,t){Rn(),t.intro=t.intro??!1;let n=t.target,r=w,i=E;try{for(var a=R(n);a&&(a.nodeType!==8||a.data!==`[`);)a=z(a);if(!a)throw Ue;T(!0),D(a);let r=Ti(e,{...t,anchor:a});return T(!1),r}catch(r){if(r instanceof Error&&r.message.split(` +`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==Ue&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Fe(),Rn(),Hn(n),T(!1),Si(e,t)}finally{T(r),D(i)}}var wi=new Map;function Ti(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:c}){Rn();var l=void 0,u=ar(()=>{var s=n??t.appendChild(L());an(s,{pending:()=>{}},t=>{gt({});var n=k;if(o&&(n.c=o),i&&(r.$$events=i),w&&$(t,null),l=e(t,r)||{},w&&(K.nodes.end=E,E===null||E.nodeType!==8||E.data!==`]`))throw Ye(),Ue;_t()},c);var u=new Set,d=e=>{for(var n=0;n{for(var e of u)for(let n of[t,document]){var r=wi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ui),r.delete(e),r.size===0&&wi.delete(n)):r.set(e,i)}ri.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return Ei.set(l,u),l}var Ei=new WeakMap;function Di(e,t){let n=Ei.get(e);return n?(Ei.delete(e),n(t)):Promise.resolve()}var Oi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)yr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(H(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();xr(r,t),t.append(L()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),_r(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=Un();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=L();i.append(a),this.#n.set(e,{effect:V(()=>t(a)),fragment:i})}else this.#t.set(e,V(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else w&&(this.anchor=E),this.#a(n)}};function ki(e,t,n=!1){var r;w&&(r=E,Qe());var i=new Oi(e),a=n?re:0;function o(e,t){if(w){var n=nt(r);if(e!==parseInt(n.substring(1))){var a=tt();D(a),i.anchor=a,T(!1),i.ensure(e,t),T(!0);return}}i.ensure(e,t)}ur(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ai(e,t){return t}function ji(e,t,n){for(var r=[],i=t.length,o,s=t.length,c=0;c{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Mi(e,a(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else --s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Hn(d),d.append(u),e.items.clear()}Mi(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function Mi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i{var e=r();return n(e)?e:e==null?[]:a(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Ii(v,p,c,t,i),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,Ri(d,null,c)):yr(d):_r(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:ur(()=>{p=Q(f);var e=p.length;let n=!1;w&&nt(c)===`[!`!=(e===0)&&(c=tt(),D(c),T(!1),n=!0);for(var a=new Set,u=M,v=Un(),y=0;ys(c)):(d=V(()=>s(Ni??=L())),d.f|=se)),e>a.size&&De(``,``,``),w&&e>0&&D(tt()),!h)if(m.set(u,a),v){for(let[e,t]of l)a.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);n&&T(!0),Q(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,w&&(c=E)}function Fi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Ii(e,t,n,r,i){var o=(r&8)!=0,s=t.length,c=e.items,l=Fi(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v0){var re=r&4&&s===0?n:null;if(o){for(v=0;v{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Li(e,t,n,r,i,a,o,s){var c=o&1?o&16?Tn(n):En(n,!1,!1):null,l=o&2?Tn(i):null;return{v:c,i:l,e:V(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ri(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=z(r);if(a.before(r),r===i)return;r=o}}function zi(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Bi(e,t,...n){var r=new Oi(e);ur(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},re)}function Vi(e){return(t,...n)=>{var r=e(...n),i;w?(i=E,Qe()):(i=R(pi(r.render().trim())),t.before(i));let a=r.setup?.(i);$(i,i),typeof a==`function`&&er(a)}}function Hi(e,t,n){var r;w&&(r=E,Qe());var i=new Oi(e);ur(()=>{var e=t()??null;if(w&&nt(r)===`[`!=(e!==null)){var a=tt();D(a),i.anchor=a,T(!1),i.ensure(e,e&&(t=>n(t,e))),T(!0);return}i.ensure(e,e&&(t=>n(t,e)))},re)}function Ui(e,t,n,r,i,a){let o=w;w&&Qe();var s=null;w&&E.nodeType===1&&(s=E,Qe());var c=w?E:e,l=new Oi(c,!1);ur(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Ge:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=w?s:Wn(e,a),$(s,s),r){w&&ei(e)&&s.append(document.createComment(``));var n=w?R(s):s.appendChild(L());w&&(n===null?T(!1):D(n)),r(s,n)}K.nodes.end=s,t.before(s)}w&&D(t)}),()=>{}},re),er(()=>{}),o&&(T(!0),D(c))}function Wi(e,t){let n=null,r=w;var i;if(w){n=E;for(var a=R(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=z(a);if(a===null)T(!1);else{var o=z(a);a.remove(),D(o)}}w||(i=document.head.appendChild(L()));try{ur(()=>{var e=V(()=>t(i));e.f|=ie})}finally{r&&(T(!0),D(n))}}function Gi(e,t){var n=void 0,r;dr(()=>{n!==(n=t())&&(r&&=(H(r),null),n&&(r=V(()=>{or(()=>n(e))})))})}function Ki(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t=0;){var s=o+a;(o===0||Yi.includes(r[o-1]))&&(s===r.length||Yi.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Zi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Qi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function $i(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Qi)),i&&c.push(...Object.keys(i).map(Qi));var l=0,u=-1;let t=e.length;for(var d=0;d{ra(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),er(()=>{t.disconnect()})}function aa(e){return`__value`in e?e.__value:e.value}var oa=Symbol(`class`),sa=Symbol(`style`),ca=Symbol(`is custom element`),la=Symbol(`is html`),ua=Se?`link`:`LINK`,da=Se?`input`:`INPUT`,fa=Se?`option`:`OPTION`,pa=Se?`select`:`SELECT`,ma=Se?`progress`:`PROGRESS`;function ha(e){if(w){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;va(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;va(e,`checked`,null),e.checked=r}}};e[be]=n,A(n),Jn()}}function ga(e,t){var n=xa(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ma)||(e.value=t??``)}function _a(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function va(e,t,n,r){var i=xa(e);w&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ua)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[me]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Ca(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ya(e,t,n,r,i=!1,a=!1){if(w&&i&&e.nodeName===da){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||ha(o)}var s=xa(e),c=s[ca],l=!s[la];let u=w&&c;u&&T(!1);var d=t||{},f=e.nodeName===fa;for(var p in t)p in n||(n[p]=null);n.class?n.class=Ji(n.class):(r||n[oa])&&(n.class=null),n[sa]&&(n.style??=null);var m=Ca(e);for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){ea(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[oa],n[oa]),d[i]=o,d[oa]=n[oa];continue}if(i===`style`){na(e,o,t?.[sa],n[sa]),d[i]=o,d[sa]=n[sa];continue}var h=d[i];if(!(o===h&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var g=i[0]+i[1];if(g!==`$$`)if(g===`on`){let t={},n=`$$`+i,r=i.slice(2);var _=qr(r);if(Gr(r)&&(r=r.slice(0,-7),t.capture=!0),!_&&h){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(_)si(r,e,o),ci([r]);else if(o!=null){function a(e){d[i].call(this,e)}d[n]=ii(r,e,a,t)}}else if(i===`style`)va(e,i,o);else if(i===`autofocus`)Kn(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)_a(e,o);else{var v=i;l||(v=Xr(v));var y=v===`defaultValue`||v===`defaultChecked`;if(o==null&&!c&&!y)if(s[i]=null,v===`value`||v===`checked`){let n=e,r=t===void 0;if(v===`value`){let e=n.defaultValue;n.removeAttribute(v),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else y||m.includes(v)&&(c||typeof o!=`string`)?(e[v]=o,v in s&&(s[v]=C)):typeof o!=`function`&&va(e,v,o,a)}}}return u&&T(!0),d}function ba(e,t,n=[],r=[],i=[],a,o=!1,s=!1){sn(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===pa,l=!1;if(dr(()=>{var u=t(...n.map(Q)),d=ya(e,r,u,a,o,s);l&&c&&`value`in u&&ra(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||H(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&H(i[t]),i[t]=V(()=>Gi(e,()=>f))),d[t]=f}r=d}),c){var u=e;or(()=>{ra(u,r.value,!0),ia(u)})}l=!0})}function xa(e){return e[ge]??={[ca]:e.nodeName.includes(`-`),[la]:e.namespaceURI===We}}var Sa=new Map;function Ca(e){var t=e.getAttribute(`is`)||e.nodeName,n=Sa.get(t);if(n)return n;Sa.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=c(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=d(i)}return n}function wa(e,t,n=t){var r=new WeakSet;Xn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Ta(e)?Ea(a):a,n(a),M!==null&&r.add(M),await zr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(w&&e.defaultValue!==e.value||Ur(t)==null&&e.value)&&(n(Ta(e)?Ea(e.value):e.value),M!==null&&r.add(M)),cr(()=>{var n=t();if(e===document.activeElement){var i=O?Lt:M;if(r.has(i))return}Ta(e)&&n===Ea(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function Ta(e){var t=e.type;return t===`number`||t===`range`}function Ea(e){return e===``?null:+e}function Da(e,t,n=t){Xn(e,`change`,()=>{n(e.files)}),w&&e.files&&n(e.files),cr(()=>{e.files=t()})}function Oa(e,t){return e===t||e?.[fe]===t}function ka(e={},t,n,r){var i=k.r,a=K;return or(()=>{var o,s;return cr(()=>{o=s,s=r?.()||[],Ur(()=>{Oa(n(...s),e)||(t(e,...s),o&&Oa(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Oa(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Aa={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ja(e,t,n){return new Proxy({props:e,exclude:t},Aa)}var Ma={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(p(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];p(i)&&(i=i());let a=s(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(p(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=s(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===fe||t===pe)return!1;for(let n of e.props)if(p(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(p(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Na(...e){return new Proxy({props:e},Ma)}function Pa(e,t,n,r){var i=!ot||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>o&&i?(u??=dn(r),Q(u)):(l&&(l=!1,c=o?Ur(r):r),c);let f;if(a){var p=fe in e||pe in e;f=s(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=Pt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Le(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?dn:hn)(()=>(v=!1,g()));a&&Q(y);var b=K;return(function(e,t){if(arguments.length>0){let n=t?Q(y):i&&a?jn(e):e;return I(y,n),v=!0,c!==void 0&&(c=n),e}return wr&&v||b.f&16384?y.v:Q(y)})}function Fa(e){return class extends Ia{constructor(t){super({component:e,...t})}}}var Ia=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=En(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return Q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===pe?!0:(Q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Ci:Si)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!O&&(!e?.props?.$$host||e.sync===!1)&&Kt(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||o(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Di(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}};function La(e,t){if(O||Ce(`hydratable`),w){let t=window.__svelte?.h;if(t?.has(e))return t.get(e);Je(e)}return t()}var Ra=t({afterUpdate:()=>Ga,beforeUpdate:()=>Wa,createContext:()=>dt,createEventDispatcher:()=>Ua,createRawSnippet:()=>Vi,flushSync:()=>Kt,fork:()=>tn,getAbortSignal:()=>za,getAllContexts:()=>ht,getContext:()=>ft,hasContext:()=>mt,hydratable:()=>La,hydrate:()=>Ci,mount:()=>Si,onDestroy:()=>Va,onMount:()=>Ba,setContext:()=>pt,settled:()=>Br,tick:()=>zr,unmount:()=>Di,untrack:()=>Ur});function za(){return U===null&&Pe(),(U.ac??=new AbortController).signal}function Ba(e){k===null&&we(`onMount`),ot&&k.l!==null?Ka(k).m.push(e):tr(()=>{let t=Ur(e);if(typeof t==`function`)return t})}function Va(e){k===null&&we(`onDestroy`),Ba(()=>()=>Ur(e))}function Ha(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function Ua(){let e=k;return e===null&&we(`createEventDispatcher`),(t,r,i)=>{let a=e.s.$$events?.[t];if(a){let o=n(a)?a.slice():[a],s=Ha(t,r,i);for(let t of o)t.call(e.x,s);return!s.defaultPrevented}return!0}}function Wa(e){k===null&&we(`beforeUpdate`),k.l===null&&Ie(`beforeUpdate`),Ka(k).b.push(e)}function Ga(e){k===null&&we(`afterUpdate`),k.l===null&&Ie(`afterUpdate`),Ka(k).a.push(e)}function Ka(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Tn as $,gi as A,zr as B,Pi as C,yi as D,xi as E,oi as F,tr as G,Ar as H,ai as I,Bn as J,rr as K,Wr as L,_i as M,ci as N,vi as O,si as P,I as Q,Q as R,Bi as S,ki as T,ir as U,Ur as V,lr as W,jn as X,Vn as Y,kn as Z,Ji as _,Pa as a,mt as at,Ui as b,ka as c,pt as ct,ba as d,et as dt,F as et,ha as f,$e as ft,ea as g,na as h,Fa as i,ft as it,bi as j,mi as k,Da as l,lt,ga as m,_ as mt,Va as n,nn as nt,ja as o,_t as ot,va as p,m as pt,zn as q,Ba as r,jt as rt,Na as s,gt as st,Ra as t,mn as tt,wa as u,st as ut,qi as v,Ai as w,Hi as x,Wi as y,Br as z}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/chunks/Bw-0QipA.js.br b/frontend/client/_app/immutable/chunks/Bw-0QipA.js.br new file mode 100644 index 0000000000000000000000000000000000000000..c9038bc3cf95930c7795d9892a7de211b1597b56 Binary files /dev/null and b/frontend/client/_app/immutable/chunks/Bw-0QipA.js.br differ diff --git a/frontend/client/_app/immutable/chunks/Bw-0QipA.js.gz b/frontend/client/_app/immutable/chunks/Bw-0QipA.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..2714a9dbf702e822027c551024d72845ab8d8c03 Binary files /dev/null and b/frontend/client/_app/immutable/chunks/Bw-0QipA.js.gz differ diff --git a/frontend/client/_app/immutable/chunks/H_O4PGe5.js b/frontend/client/_app/immutable/chunks/H_O4PGe5.js new file mode 100644 index 0000000000000000000000000000000000000000..82ff4d166c118f1da1498687dfaddaeafb292e7d --- /dev/null +++ b/frontend/client/_app/immutable/chunks/H_O4PGe5.js @@ -0,0 +1 @@ +import{B as e,Q as t,R as n,et as r,r as i,rt as a,t as o,z as s}from"./Bw-0QipA.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&y.delete(x(e)),v(e,t));var y=new Map;function ee(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&y.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=_(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(y.size>0){let t=x(e,n),r=y.get(t);if(r){if(performance.now(){let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=te.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;ee).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ce({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function le(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ue(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var S=globalThis.__sveltekit_eb6xtf?.base??``,de=globalThis.__sveltekit_eb6xtf?.assets??S??``,fe=`1780234183272`,pe=`sveltekit:snapshot`,me=`sveltekit:scroll`,he=`sveltekit:states`,C=`sveltekit:history`,w=`sveltekit:navigation`,T={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ge=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...T,"":T.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||k(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===ge&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function O(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Se(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var Ce={v:h};function we(){let{set:e,subscribe:t}=a(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${de}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==fe;return n&&(e(!0),Ce.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function k(e,t,n){return e.origin!==ge||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Te(e){}var Ee=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ee,`entries`]);var De=new Set([...Ee]);new Set([...De,`actions`,`entries`]),new Set([`GET`,`POST`,`PATCH`,`PUT`,`DELETE`,`OPTIONS`,`HEAD`,`fallback`,`prerender`,`trailingSlash`,`config`,`entries`]);function Oe(e){return e.filter(e=>e!=null)}function A(e,t){return e+`/`+t}function ke(e){return e instanceof c||e instanceof u?e.status:500}function Ae(e){return e instanceof u?e.text:`Internal Error`}var j,M,N,je=i.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(i.toString()),Me=`a:`;je?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},M={current:null},N={current:!1}):(j=new class{#e=r({});get data(){return n(this.#e)}set data(e){t(this.#e,e)}#t=r(null);get form(){return n(this.#t)}set form(e){t(this.#t,e)}#n=r(null);get error(){return n(this.#n)}set error(e){t(this.#n,e)}#r=r({});get params(){return n(this.#r)}set params(e){t(this.#r,e)}#i=r({id:null});get route(){return n(this.#i)}set route(e){t(this.#i,e)}#a=r({});get state(){return n(this.#a)}set state(e){t(this.#a,e)}#o=r(-1);get status(){return n(this.#o)}set status(e){t(this.#o,e)}#s=r(new URL(Me));get url(){return n(this.#s)}set url(e){t(this.#s,e)}},M=new class{#e=r(null);get current(){return n(this.#e)}set current(e){t(this.#e,e)}},N=new class{#e=r(!1);get current(){return n(this.#e)}set current(e){t(this.#e,e)}},Ce.v=()=>N.current=!0);function Ne(e){Object.assign(j,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),P=null,F=le(`sveltekit:scroll`)??{},I=le(`sveltekit:snapshot`)??{},L={url:Se({}),page:Se({}),navigating:a(null),updated:we()};function Le(e){F[e]=E()}function Re(e,t){let n=e+1;for(;F[n];)delete F[n],n+=1;for(n=t+1;I[n];)delete I[n],n+=1}function R(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(S||`/`);e&&await e.update()}}var Be,Ve,z,B,He,V,H=[],U=[],W=null;function Ue(){W?.fork?.then(e=>e?.discard()),W=null}var We=new Map,Ge=new Set,Ke=new Set,G=new Set,K={branch:[],error:null,url:null,nav:null},qe=!1,Je=!1,Ye=!0,q=!1,J=!1,Xe=!1,Ze=!1,Qe,Y,X,Z,$e=new Set,et=new Map,tt=new Map;async function nt(e,t,n){globalThis.__sveltekit_eb6xtf&&(globalThis.__sveltekit_eb6xtf.query,globalThis.__sveltekit_eb6xtf.prerender),document.URL!==location.href&&(location.href=location.href),V=e,await e.hooks.init?.(),Be=ce(e),B=document.documentElement,He=t,Ve=e.nodes[0],z=e.nodes[1],Ve(),z(),Y=history.state?.[C],X=history.state?.[w],Y||(Y=X=Date.now(),history.replaceState({...history.state,[C]:Y,[w]:X},``));let r=F[Y];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await At(He,n)):(await Q({type:`enter`,url:_e(V.hash?It(new URL(location.href)):location.href),replace_state:!0}),i()),kt()}function rt(){H.length=0,Ze=!1}function it(e){U.some(e=>e?.snapshot)&&(I[e]=U.map(e=>e?.snapshot?.capture()))}function at(e){I[e]?.forEach((e,t)=>{U[t]?.snapshot?.restore(e)})}function ot(){Le(Y),ue(me,F),it(X),ue(pe,I)}async function st(t,n,r,i){let a,o;n.invalidateAll&&Ue(),await Q({type:`goto`,url:_e(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){Ze=!0,a=new Set;for(let[e,t]of et)for(let n of t.keys())a.add(A(e,n));o=new Set;for(let[e,t]of tt)for(let n of t.keys())o.add(A(e,n))}n.invalidate&&n.invalidate.forEach(Ot)}}),n.invalidateAll&&e().then(e).then(()=>{for(let[e,t]of et)for(let[n,{resource:r}]of t)a?.has(A(e,n))&&r.refresh();for(let[e,t]of tt)for(let[n,{resource:r}]of t)o?.has(A(e,n))&&r.reconnect()})}async function ct(e){if(e.id!==W?.id){Ue();let t={};$e.add(t),W={id:e.id,token:t,promise:vt({...e,preload:t}).then(e=>($e.delete(t),e.type===`loaded`&&e.state.error&&Ue(),e)),fork:null}}return W.promise}async function lt(e){let t=(await St(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ut(e,t,n){let r={params:K.params,route:{id:K.route?.id??null},url:new URL(location.href)};if(K={...e.state,nav:r},Ne(e.props.page),Qe=new V.root({target:t,props:{...e.props,stores:L,components:U},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),at(X),n){let e={from:null,to:{...r,scroll:F[Y]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};G.forEach(t=>t(e))}Je=!0}async function dt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(S&&(e.pathname===S||e.pathname===S+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Oe(n).map(e=>e.node.component),page:Ft(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;et(new URL(e))))return!0;return!1}function ht(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function gt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function _t({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ft(j),constructors:[]}}}async function vt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(W?.id===e)return $e.delete(W.token),W.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=K.url?e!==wt(K.url):!1,p=K.route?i.id!==K.route.id:!1,m=gt(K.url,n),g=!1,_=d.map(async(e,t)=>{if(!e)return;let a=K.branch[t];return e[1]===a?.loader&&!mt(g,p,f,m,a.universal?.uses,r)?a:(g=!0,ft({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;nPromise.resolve({}),server_data_node:ht(null)}),{node:await z(),loader:z,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return st(new URL(e.location,location.href),{},0);throw e}}async function xt(e){let t=e.href;if(We.has(t))return We.get(t);let n;try{let r=(async()=>{let t=await V.hooks.reroute({url:new URL(e),fetch:async(t,n)=>pt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);V.hash?n.hash=t:n.pathname=t,t=n}return t})();We.set(t,r),n=await r}catch{We.delete(t);return}return n}async function St(e,t){if(e&&!k(e,S,V.hash)){let n=await xt(e);if(!n)return;let r=Ct(n);for(let n of Be){let i=n.exec(r);if(i)return{id:wt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Ct(e){return f(V.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(S.length))||`/`}function wt(e){return(V.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Tt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Pt(K,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return q||Ge.forEach(e=>e(c)),o?null:s}async function Q({type:t,url:n,popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let g=Z;Z=d;let _=await St(n,!1),v=t===`enter`?Pt(K,_,n,t):Tt({url:n,type:t,delta:r?.delta,intent:_,scroll:r?.scroll,event:m});if(!v){p(),Z===d&&(Z=g);return}let y=Y,ee=X;f(),q=!0,Je&&v.navigation.type!==`enter`&&L.navigating.set(M.current=v.navigation);let b=_&&await vt(_);if(!b){if(k(n,S,V.hash))return await R(n,o);b=await Et(n,{id:null},await $(new u(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,o)}if(n=_?.url||n,Z!==d)return v.reject(Error(`navigation aborted`)),!1;if(b.type===`redirect`){if(l<20){await Q({type:t,url:new URL(b.location,n),popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c,redirect_count:l+1,nav_token:d}),v.fulfil(void 0);return}b=await bt({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}})}else b.props.page.status>=400&&await L.updated.check()&&(await ze(),await R(n,o));if(rt(),Le(y),it(ee),b.props.page.url.pathname!==n.pathname&&(n.pathname=b.props.page.url.pathname),c=r?r.state:c,!r){let e=+!o,t={[C]:Y+=e,[w]:X+=e,[he]:c};(o?history.replaceState:history.pushState).call(history,t,``,n),o||Re(Y,X)}let x=_&&W?.id===_.id?W.fork:null;W?.fork&&!x&&Ue(),W=null,b.props.page.state=c;let te;if(Je){let e=(await Promise.all(Array.from(Ke,e=>e(v.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{G.delete(e)})}e.push(t),e.forEach(e=>{G.add(e)})}let t=v.navigation.to;K={...b.state,nav:{params:t.params,route:t.route,url:t.url}},b.props.page&&(b.props.page.url=n);let r=x&&await x;r?te=r.commit():(P=null,Qe.$set(b.props),P&&Object.assign(b.props.page,P),Ne(b.props.page),te=s?.()),Xe=!0}else await ut(b,He,!1);let{activeElement:ne}=document;if(await te,await e(),await e(),Z!==d)return v.reject(Error(`navigation aborted`)),!1;b.props.page&&P&&Object.assign(b.props.page,P);let re=null;if(Ye){let e=r?r.scroll:a?E():null;e?scrollTo(e.x,e.y):(re=n.hash&&document.getElementById(Lt(n)))?re.scrollIntoView():scrollTo(0,0)}let ie=document.activeElement!==ne&&document.activeElement!==document.body;!i&&!ie&&Nt(n,!re),Ye=!0,q=!1,t===`popstate`&&at(X),v.fulfil(void 0),v.navigation.to&&(v.navigation.to.scroll=E()),G.forEach(e=>e(v.navigation)),L.navigating.set(M.current=null)}async function Et(e,t,n,r,i){return e.origin===ge&&e.pathname===location.pathname&&!qe?await bt({status:r,error:n,url:e,route:t}):await R(e,i)}function Dt(){let e,t={element:void 0,href:void 0},n;B.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,T.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],T.tap)}B.addEventListener(`mousedown`,r),B.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(lt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=be(e,B),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=xe(i,S,V.hash);if(s||c)return;let l=O(i),u=o&&wt(K.url)===wt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=T.tap;let e=await St(o,!1);if(!e)return;ct(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,lt(o))}function o(){i.disconnect();for(let e of B.querySelectorAll(`a`)){let{url:t,external:n,download:r}=xe(e,S,V.hash);if(n||r)continue;let a=O(e);a.reload||(a.preload_code===T.viewport&&i.observe(e),a.preload_code===T.eager&<(t))}}G.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=ke(e),r=Ae(e);return V.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Ot(e){if(typeof e==`function`)H.push(e);else{let{href:t}=new URL(e,location.href);H.push(e=>e.href===t)}}function kt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ot(),!q){let e=Pt(K,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};Ge.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ot()}),!navigator.connection?.saveData&&!/2g/.test(navigator.connection?.effectiveType)&&Dt(),B.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],B);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,S,V.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=O(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(V.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Tt({url:r,type:`link`,event:t})?q=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=K.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(J=!0,Le(Y),e(r),!s.replace_state)return;J=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),B.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(k(r,S,!1))return;let i=e.target,a=O(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Mt)if(t.state?.[`sveltekit:history`]){let n=t.state[C];if(Z={},n===Y)return;let r=F[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[w],s=K.url?m(location)===m(K.url):!1;if(o===X&&(Xe||s)){i!==j.state&&(j.state=i),e(a),F[Y]=E(),r&&scrollTo(r.x,r.y),Y=n;return}let c=n-Y;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{Y=n,X=o},block:()=>{history.go(-c)},nav_token:Z,event:t})}else J||(e(new URL(location.href)),V.hash&&location.reload())}),addEventListener(`hashchange`,()=>{J&&(J=!1,history.replaceState({...history.state,[C]:++Y,[w]:X},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&L.navigating.set(M.current=null)});function e(e){K.url=j.url=e,L.page.set(Ft(j)),L.page.notify()}}async function At(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){qe=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await St(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=jt(r.uses)),ft({loader:V.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r{let a=history.state;Mt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Mt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t{if(r.rangeCount===e.length){for(let t=0;t{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Ft(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function It(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Lt(e){let t;if(V.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{N as a,j as i,L as n,Te as o,M as r,nt as t}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/chunks/H_O4PGe5.js.br b/frontend/client/_app/immutable/chunks/H_O4PGe5.js.br new file mode 100644 index 0000000000000000000000000000000000000000..9bc227564ef0a438ef935af61866fa16b897483d Binary files /dev/null and b/frontend/client/_app/immutable/chunks/H_O4PGe5.js.br differ diff --git a/frontend/client/_app/immutable/chunks/H_O4PGe5.js.gz b/frontend/client/_app/immutable/chunks/H_O4PGe5.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..a27469171465db6d7541bb3effec3e002b15687f Binary files /dev/null and b/frontend/client/_app/immutable/chunks/H_O4PGe5.js.gz differ diff --git a/frontend/client/_app/immutable/chunks/kNaey6uv.js b/frontend/client/_app/immutable/chunks/kNaey6uv.js new file mode 100644 index 0000000000000000000000000000000000000000..2994da7d804b146a42ad1d1707aa03e3120fe2ff --- /dev/null +++ b/frontend/client/_app/immutable/chunks/kNaey6uv.js @@ -0,0 +1 @@ +var e=`modulepreload`,t=function(e,t){return new URL(e,t).href},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(i.map(i=>{if(i=t(i,a),i in n)return;n[i]=!0;let o=i.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:e,o||(l.as=`script`),l.crossOrigin=``,l.href=i,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,t)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})};export{r as t}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/chunks/kNaey6uv.js.br b/frontend/client/_app/immutable/chunks/kNaey6uv.js.br new file mode 100644 index 0000000000000000000000000000000000000000..759707d636552e4b7718d021e18a229b7a49f633 Binary files /dev/null and b/frontend/client/_app/immutable/chunks/kNaey6uv.js.br differ diff --git a/frontend/client/_app/immutable/chunks/kNaey6uv.js.gz b/frontend/client/_app/immutable/chunks/kNaey6uv.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..b5a0ef2a9e587fb6f45df2384e2f1bda9a3a47b2 Binary files /dev/null and b/frontend/client/_app/immutable/chunks/kNaey6uv.js.gz differ diff --git a/frontend/client/_app/immutable/chunks/xihTtKlq.js b/frontend/client/_app/immutable/chunks/xihTtKlq.js new file mode 100644 index 0000000000000000000000000000000000000000..afdd2d091c98355be50991e9c6227b22ad99c167 --- /dev/null +++ b/frontend/client/_app/immutable/chunks/xihTtKlq.js @@ -0,0 +1 @@ +typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`); \ No newline at end of file diff --git a/frontend/client/_app/immutable/chunks/xihTtKlq.js.br b/frontend/client/_app/immutable/chunks/xihTtKlq.js.br new file mode 100644 index 0000000000000000000000000000000000000000..4d7afd2ad393c160a088f14e731ac7b33f289e5e --- /dev/null +++ b/frontend/client/_app/immutable/chunks/xihTtKlq.js.br @@ -0,0 +1 @@ + €typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`); \ No newline at end of file diff --git a/frontend/client/_app/immutable/chunks/xihTtKlq.js.gz b/frontend/client/_app/immutable/chunks/xihTtKlq.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..c8fbae3ee3ecb62fa2aebc810972fe30d2a690c2 Binary files /dev/null and b/frontend/client/_app/immutable/chunks/xihTtKlq.js.gz differ diff --git a/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js new file mode 100644 index 0000000000000000000000000000000000000000..91d6ba7f913037f3fa0f1fb136ff66e550ac549e --- /dev/null +++ b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Df0rgt8-.js","../chunks/Bw-0QipA.js","../chunks/xihTtKlq.js","../assets/0.DpcAwFkV.css","../nodes/1.Cp2o0XAs.js","../chunks/H_O4PGe5.js","../nodes/2.BTNl2Bsv.js","../assets/2.BIbYdWBv.css"])))=>i.map(i=>d[i]); +import{B as e,D as t,E as n,G as r,J as i,K as a,M as o,O as s,Q as c,R as l,T as u,W as d,Y as f,a as p,c as m,et as h,ft as g,i as _,k as v,ot as y,q as b,r as x,st as S,tt as C,x as w}from"../chunks/Bw-0QipA.js";import{t as T}from"../chunks/kNaey6uv.js";import"../chunks/xihTtKlq.js";var E={},D=v(`
`),O=v(` `,1);function k(_,v){S(v,!0);let T=p(v,`components`,23,()=>[]),E=p(v,`data_0`,3,null),k=p(v,`data_1`,3,null);a(()=>v.stores.page.set(v.page)),r(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),k(),v.stores.page.notify()});let A=h(!1),j=h(!1),M=h(null);x(()=>{let t=v.stores.page.subscribe(()=>{l(A)&&(c(j,!0),e().then(()=>{c(M,document.title||`untitled page`,!0)}))});return c(A,!0),t});let N=C(()=>v.constructors[1]);var P=O(),F=i(P),I=e=>{let n=C(()=>v.constructors[0]);var r=s();w(i(r),()=>l(n),(e,n)=>{m(n(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(e,n)=>{var r=s();w(i(r),()=>l(N),(e,t)=>{m(t(e,{get data(){return k()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),t(e,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),t(e,r)},L=e=>{let n=C(()=>v.constructors[0]);var r=s();w(i(r),()=>l(n),(e,t)=>{m(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),t(e,r)};u(F,e=>{v.constructors[1]?e(I):e(L,-1)});var R=f(F,2),z=e=>{var r=D(),i=b(r),a=e=>{var r=o();d(()=>n(r,l(M))),t(e,r)};u(i,e=>{l(j)&&e(a)}),g(r),t(e,r)};u(R,e=>{l(A)&&e(z)}),t(_,P),y()}var A=_(k),j=[()=>T(()=>import(`../nodes/0.Df0rgt8-.js`),__vite__mapDeps([0,1,2,3]),import.meta.url),()=>T(()=>import(`../nodes/1.Cp2o0XAs.js`),__vite__mapDeps([4,1,5,2]),import.meta.url),()=>T(()=>import(`../nodes/2.BTNl2Bsv.js`),__vite__mapDeps([6,1,2,7]),import.meta.url)],M=[],N={"/":[2]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t);export{R as decode,F as decoders,N as dictionary,I as encoders,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.br b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.br new file mode 100644 index 0000000000000000000000000000000000000000..d8b9802aae0be0a76f07b89c91c607522c28ade8 Binary files /dev/null and b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.br differ diff --git a/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.gz b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..69f5105da19cf12e03131bf48a3b3827ea5b5377 Binary files /dev/null and b/frontend/client/_app/immutable/entry/app.BHLFJpHZ.js.gz differ diff --git a/frontend/client/_app/immutable/entry/start.Bbjycs44.js b/frontend/client/_app/immutable/entry/start.Bbjycs44.js new file mode 100644 index 0000000000000000000000000000000000000000..44c085a3df448db4f09394acbc668634f1cb8729 --- /dev/null +++ b/frontend/client/_app/immutable/entry/start.Bbjycs44.js @@ -0,0 +1 @@ +import{o as e,t}from"../chunks/H_O4PGe5.js";export{e as load_css,t as start}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/entry/start.Bbjycs44.js.br b/frontend/client/_app/immutable/entry/start.Bbjycs44.js.br new file mode 100644 index 0000000000000000000000000000000000000000..f4777152606d71b67fb6519120236209e9757922 --- /dev/null +++ b/frontend/client/_app/immutable/entry/start.Bbjycs44.js.br @@ -0,0 +1 @@ + &€import{o as e,t}from"../chunks/H_O4PGe5.js";export{e as load_css,t as start}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/entry/start.Bbjycs44.js.gz b/frontend/client/_app/immutable/entry/start.Bbjycs44.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..42474e3cdd8361aac57ac4b04556563090f69c0b Binary files /dev/null and b/frontend/client/_app/immutable/entry/start.Bbjycs44.js.gz differ diff --git a/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js new file mode 100644 index 0000000000000000000000000000000000000000..410a91f12cd1ac3cf813f9f363567a8ab42fc9c5 --- /dev/null +++ b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js @@ -0,0 +1 @@ +import{D as e,J as t,O as n,S as r,W as i,k as a,p as o,y as s}from"../chunks/Bw-0QipA.js";import"../chunks/xihTtKlq.js";var c=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e`,l=a(``);function u(a,u){var d=n();s(`12qhfyh`,t=>{var n=l();i(()=>o(n,`href`,c)),e(t,n)}),r(t(d),()=>u.children),e(a,d)}export{u as component}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.br b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.br new file mode 100644 index 0000000000000000000000000000000000000000..d28adb414dc0bb85d6a5b6fa2c501dbdae036067 Binary files /dev/null and b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.br differ diff --git a/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.gz b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..c324c15dd7734462e7803b67dafc4863aac859f9 Binary files /dev/null and b/frontend/client/_app/immutable/nodes/0.Df0rgt8-.js.gz differ diff --git a/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js new file mode 100644 index 0000000000000000000000000000000000000000..2b48175136a9e6fdff0b73adcd2f26ba3290f06e --- /dev/null +++ b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js @@ -0,0 +1 @@ +import{D as e,E as t,J as n,W as r,Y as i,ft as a,k as o,ot as s,q as c,st as l}from"../chunks/Bw-0QipA.js";import{i as u,n as d,r as f}from"../chunks/H_O4PGe5.js";import"../chunks/xihTtKlq.js";var p={get data(){return u.data},get error(){return u.error},get form(){return u.form},get params(){return u.params},get route(){return u.route},get state(){return u.state},get status(){return u.status},get url(){return u.url}};Object.defineProperty({get from(){return f.current?f.current.from:null},get to(){return f.current?f.current.to:null},get type(){return f.current?f.current.type:null},get willUnload(){return f.current?f.current.willUnload:null},get delta(){return f.current?f.current.delta:null},get complete(){return f.current?f.current.complete:null}},"current",{get(){throw Error(`Replace navigating.current. with navigating.`)}}),d.updated.check;var m=p,h=o(`

`,1);function g(o,u){l(u,!0);var d=h(),f=n(d),p=c(f,!0);a(f);var g=i(f,2),_=c(g,!0);a(g),r(()=>{t(p,m.status),t(_,m.error?.message)}),e(o,d),s()}export{g as component}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.br b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.br new file mode 100644 index 0000000000000000000000000000000000000000..a51c27655d143a25124c09782fd7fd02651bea3c Binary files /dev/null and b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.br differ diff --git a/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.gz b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..48866cf9c890ffebab19417403001e74b7b831d0 Binary files /dev/null and b/frontend/client/_app/immutable/nodes/1.Cp2o0XAs.js.gz differ diff --git a/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js new file mode 100644 index 0000000000000000000000000000000000000000..95a16953da6d65df8e8e19aa9132265635671131 --- /dev/null +++ b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js @@ -0,0 +1,6 @@ +import{$ as e,A as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,Q as g,R as _,S as v,T as y,U as b,V as x,W as S,X as C,Y as w,Z as T,_ as E,a as D,at as O,b as k,c as A,ct as ee,d as j,dt as M,et as N,f as te,ft as P,g as ne,h as re,it as F,j as ie,k as I,l as L,m as ae,mt as oe,n as R,nt as se,o as z,ot as B,p as ce,pt as V,q as H,r as le,s as ue,st as U,tt as W,u as de,v as fe,w as pe,x as G}from"../chunks/Bw-0QipA.js";import"../chunks/xihTtKlq.js";var me=I(`
`),he=I(`
`);function ge(e,t){U(t,!0);let n=[We(`#c7b7e8`),We(`#afcbff`),We(`#a8dadc`),We(`#b7d7a8`),We(`#e6d3a3`),We(`#f0bfa7`),We(`#e8a7b8`),We(`#c9b6e4`)],s=D(t,`frameIndex`,3,0),c=D(t,`cellSize`,3,8),l=D(t,`maxWidth`,3,680),u=D(t,`maxHeight`,3,360),d=D(t,`duration`,3,760),f=D(t,`animated`,3,!0),p=D(t,`interactive`,3,!0),m=D(t,`opacity`,3,1),v=D(t,`class`,3,``),b,C=null,T=0,E=N(1),O=N(1),k=1,ee=N(1),j=N(1),M=!1,te=0,F=0,ie=0,I=1,L,ae=-1,oe=!1,se=-1,z=-1,V=-1,ue=-1,de=-1,fe=-1,pe=new Float32Array(1),G=new Float32Array(1),ge=new Float32Array(1),_e=new Float32Array(1),ve=new Float32Array(1),ye=new Float32Array(1),K=new Float32Array(1),be=new Float32Array(1),xe=new Float32Array(1),Se=new Float32Array(1),Ce=new Float32Array(1),we=new Float32Array(1),Te=new Float32Array(1),Ee=new Float32Array(1),De=new Float32Array(1),Oe=new Float64Array(1),ke=new Float64Array(1),Ae=new Uint8Array(1),je=new Uint8Array(1),Me=new Uint8Array(1),Ne=N(!1),Pe=N(0),Fe=N(0),Ie=N(null),Le=N(0),Re=N(0),ze=W(()=>t.tensors[s()]??[]),Be=W(()=>_(Fe)*_(E)+_(Pe)),Ve=W(()=>Ze(_(Ie)));function He(e){return Math.max(0,...e.map(e=>e.length))}function Ue(e,t,n){return Math.max(t,Math.min(n,e))}function We(e){let t=e.replace(`#`,``);return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}}function Ge(e,t,n){return e+(t-e)*n}function Ke(e){return e*e*(3-2*e)}function qe(e){return 1-(1-e)**3}function Je(e){let t=Math.sin((e+1)*12.9898)*43758.5453;return t-Math.floor(t)}function q(e,t,n,r,i,a){let o=Math.min(n,i),s=Math.min(r,a);for(let r=0;r0&&i>0&&(q(a,pe,r,i,_(E),_(O)),q(o,G,r,i,_(E),_(O)),q(s,ge,r,i,_(E),_(O)),q(d,_e,r,i,_(E),_(O)),q(f,ve,r,i,_(E),_(O)),q(p,ye,r,i,_(E),_(O)),q(m,K,r,i,_(E),_(O)),q(h,be,r,i,_(E),_(O)),q(v,xe,r,i,_(E),_(O)),q(y,Se,r,i,_(E),_(O)),q(x,Ce,r,i,_(E),_(O)),q(S,we,r,i,_(E),_(O)),q(w,Te,r,i,_(E),_(O)),q(T,Ee,r,i,_(E),_(O)),q(D,De,r,i,_(E),_(O)),q(A,Oe,r,i,_(E),_(O)),q(M,ke,r,i,_(E),_(O)),q(N,Ae,r,i,_(E),_(O)),q(P,Me,r,i,_(E),_(O))),k=Math.min(1,l()/(_(E)*c()),u()/(_(O)*c())),g(ee,Math.max(1,Math.floor(_(E)*c()*k)),!0),g(j,Math.max(1,Math.floor(_(O)*c()*k)),!0);let ne=window.devicePixelRatio||1,re=Math.max(1,Math.floor(_(ee)*ne)),L=Math.max(1,Math.floor(_(j)*ne));(b.width!==re||b.height!==L)&&(b.width=re,b.height=L),b.style.width=`${_(ee)}px`,b.style.height=`${_(j)}px`,C=b.getContext(`2d`),C&&(C.setTransform(ne*k,0,0,ne*k,0,0),C.imageSmoothingEnabled=!1)}function Ze(e){return e===null?`none`:String(Number.isInteger(e)?e:Number(e.toFixed(6)))}function Qe(e,t){let n=_(ze)[t]?.[e];return Number.isFinite(n)?n:null}function $e(e,t){if(!Ae[e]||t=1&&(pe[e]=ge[e],_e[e]=ye[e],K[e]=Te[e],be[e]=Ee[e],xe[e]=De[e],Ae[e]=0,Me[e]=0)}function et(e,t){let n=t.now??performance.now();$e(e,n),G[e]=pe[e],ge[e]=t.nextScale,ve[e]=_e[e],ye[e]=t.nextAlpha,Se[e]=K[e],Ce[e]=be[e],we[e]=xe[e],Te[e]=t.nextR,Ee[e]=t.nextG,De[e]=t.nextB,Oe[e]=n+t.delay,ke[e]=Oe[e]+(t.duration??d()),Ae[e]=1,Me[e]=t.type??3}function tt(e,t){pe[e]=t.nextScale,_e[e]=t.nextAlpha,K[e]=t.nextR,be[e]=t.nextG,xe[e]=t.nextB,G[e]=t.nextScale,ge[e]=t.nextScale,ve[e]=t.nextAlpha,ye[e]=t.nextAlpha,Se[e]=t.nextR,Ce[e]=t.nextG,we[e]=t.nextB,Te[e]=t.nextR,Ee[e]=t.nextG,De[e]=t.nextB,Ae[e]=0,Me[e]=0}function nt(e,t=!0){if(I===0)return;je.fill(0);let n=Math.max(1,I),r=Math.min(220,Math.max(90,d()*.28)),i=Math.max(0,d()-r),a=performance.now();for(let o=0;o=_(O))continue;let s=e[o];for(let e=0;e=_(E))continue;let c=s[e];if(!Number.isFinite(c))continue;let l=o*_(E)+e,u=Ye(c),f=_e[l]<=.001&&ye[l]<=.001,p=t&&f?Math.floor(Je(l)*n)/Math.max(1,n-1)*i:0;if(je[l]=1,!t){tt(l,{nextScale:1,nextAlpha:m(),nextR:u.r,nextG:u.g,nextB:u.b});continue}f&&(pe[l]=.12,_e[l]=0),et(l,{nextScale:1,nextAlpha:m(),nextR:u.r,nextG:u.g,nextB:u.b,delay:p,duration:f?r:d(),type:f?1:3,now:a})}}for(let e=0;e.001||_e[e]>.001||ye[e]>.001||Ae[e])){if(!t){tt(e,{nextScale:0,nextAlpha:0,nextR:K[e],nextG:be[e],nextB:xe[e]});continue}et(e,{nextScale:0,nextAlpha:0,nextR:K[e],nextG:be[e],nextB:xe[e],delay:0,type:2,now:a})}at()}function rt(){if(!C)return!1;let e=performance.now(),t=!1;C.clearRect(0,0,_(E)*c(),_(O)*c());for(let n=0;n=_(E)||a<0||a>=_(O)){st();return}g(Ne,!0),g(Pe,i,!0),g(Fe,a,!0),g(Ie,Qe(i,a),!0),g(Le,n+12),g(Re,r+12)}le(()=>{M=!0}),o(()=>{if(!M)return;let e=_(ze),n=f(),r={frameIndex:s(),cellSize:c(),maxWidth:l(),maxHeight:u(),duration:d(),opacity:m(),tensorCount:t.tensors.length};e===L&&r.frameIndex===ae&&n===oe&&r.cellSize===se&&r.maxWidth===z&&r.maxHeight===V&&r.duration===ue&&r.opacity===de&&r.tensorCount===fe||x(()=>{ot(e,n,r)})}),R(()=>{cancelAnimationFrame(T)});var lt=he(),ut=H(lt);A(ut,e=>b=e,()=>b);var dt=w(ut,2),ft=e=>{var t=me(),n=H(t),a=H(n);P(n);var o=w(n,2),s=H(o);P(o);var c=w(o,2),l=H(c);P(c),P(t),S(()=>{re(t,`left: ${_(Le)}px; top: ${_(Re)}px;`),i(a,`index: ${_(Be)??``}`),i(s,`row: ${_(Fe)??``}, col: ${_(Pe)??``}`),i(l,`value: ${_(Ve)??``}`)}),r(e,t)};y(dt,e=>{_(Ne)&&e(ft)}),P(lt),S(()=>{ne(lt,1,`relative inline-block max-w-full touch-none ${v()}`),re(lt,`width: ${_(ee)}px; height: ${_(j)}px;`),ce(lt,`role`,p()?`img`:void 0),ce(lt,`aria-label`,p()?`tensor ${_(E)} by ${_(O)}`:void 0)}),h(`pointermove`,lt,ct),a(`pointerleave`,lt,st),r(e,lt),B()}p([`pointermove`]);var _e={assimilateNasal:!0,useSimpleParticleRules:!0,keepUnknown:!0,longVowelStyle:`expand`,naturalizeRepeatedVowels:!0,kanaLongVowelStyle:`collapse`};function ve(e){let t=ke(e),n=t[t.length-1];return`ã‚ã‹ãŒã•ã–ãŸã ãªã¯ã°ã±ã¾ã‚„らã‚ãゃ`.includes(n)?`a`:`ã„ããŽã—ã˜ã¡ã¢ã«ã²ã³ã´ã¿ã‚Šã‚ãƒ`.includes(n)?`i`:`ã†ããã™ãšã¤ã¥ã¬ãµã¶ã·ã‚€ã‚†ã‚‹ã…ã‚…ã‚”`.includes(n)?`u`:`ãˆã‘ã’ã›ãœã¦ã§ã­ã¸ã¹ãºã‚れゑã‡`.includes(n)?`e`:`ãŠã“ã”ããžã¨ã©ã®ã»ã¼ã½ã‚‚よã‚ã‚’ã‰ã‚‡`.includes(n)?`o`:null}function ye(e,t){if(!e)return!1;let n=ke(t);return e===`o`&&(n===`ã†`||n===`ãŠ`)||e===`e`&&(n===`ã„`||n===`ãˆ`)}function K(e,t){switch(t){case`keep`:return e;case`expand`:return Pe(e);case`collapse`:return e;default:return e}}var be=[`ㄱ`,`ㄲ`,`ã„´`,`ã„·`,`ㄸ`,`ㄹ`,`ã…`,`ã…‚`,`ã…ƒ`,`ã……`,`ã…†`,`ã…‡`,`ã…ˆ`,`ã…‰`,`ã…Š`,`ã…‹`,`ã…Œ`,`ã…`,`ã…Ž`],xe=[`ã…`,`ã…`,`ã…‘`,`ã…’`,`ã…“`,`ã…”`,`ã…•`,`ã…–`,`ã…—`,`ã…˜`,`ã…™`,`ã…š`,`ã…›`,`ã…œ`,`ã…`,`ã…ž`,`ã…Ÿ`,`ã… `,`ã…¡`,`ã…¢`,`ã…£`],Se=`.ㄱ.ㄲ.ㄳ.ã„´.ㄵ.ã„¶.ã„·.ㄹ.ㄺ.ã„».ㄼ.ㄽ.ㄾ.ã„¿.ã…€.ã….ã…‚.ã…„.ã…….ã…†.ã…‡.ã…ˆ.ã…Š.ã…‹.ã…Œ.ã….ã…Ž`.split(`.`);function Ce(e,t,n=``){let r=be.indexOf(e),i=xe.indexOf(t),a=Se.indexOf(n);return r===-1||i===-1||a===-1?e+t+n:String.fromCharCode(44032+r*21*28+i*28+a)}function we(e){if(!e)return null;let t=e.charCodeAt(0)-44032;if(t<0||t>11171)return null;let n=Math.floor(t/588),r=Math.floor(t%588/28),i=t%28;return{cho:be[n],jung:xe[r],jong:Se[i]}}function Te(e){return we(e)!==null}function Ee(e,t){let n=we(e);return n?Ce(n.cho,n.jung,t):e}function De(e){let t=we(e);return!!(t&&!t.jong)}function Oe(e,t){if(!e)return e+t;let n=e[e.length-1];return De(n)?e.slice(0,-1)+Ee(n,t):e+t}function ke(e){return e.replace(/[\u30a1-\u30f6]/g,e=>String.fromCharCode(e.charCodeAt(0)-96))}var Ae={ã‚:`ì•„`,ã„:`ì´`,ã†:`ìš°`,ãˆ:`ì—`,ãŠ:`오`,ã‹:`ì¹´`,ã:`키`,ã:`ì¿ `,ã‘:`ì¼€`,ã“:`ì½”`,ã•:`사`,ã—:`시`,ã™:`스`,ã›:`세`,ã:`소`,ãŸ:`타`,ã¡:`치`,ã¤:`ì“°`,ã¦:`í…Œ`,ã¨:`토`,ãª:`나`,ã«:`니`,ã¬:`누`,ã­:`네`,ã®:`ë…¸`,ã¯:`하`,ã²:`히`,ãµ:`후`,ã¸:`í—¤`,ã»:`호`,ã¾:`마`,ã¿:`미`,ã‚€:`무`,ã‚:`ë©”`,ã‚‚:`모`,ã‚„:`야`,ゆ:`유`,よ:`ìš”`,ら:`ë¼`,り:`리`,ã‚‹:`루`,れ:`ë ˆ`,ã‚:`로`,ã‚:`와`,ã‚:`ì´`,ã‚‘:`ì—`,ã‚’:`오`,ãŒ:`ê°€`,ãŽ:`기`,ã:`구`,ã’:`게`,ã”:`ê³ `,ã–:`ìž`,ã˜:`ì§€`,ãš:`즈`,ãœ:`ì œ`,ãž:`ì¡°`,ã :`다`,ã¢:`ì§€`,ã¥:`즈`,ã§:`ë°`,ã©:`ë„`,ã°:`ë°”`,ã³:`비`,ã¶:`ë¶€`,ã¹:`ë² `,ã¼:`ë³´`,ã±:`파`,ã´:`피`,ã·:`푸`,ãº:`페`,ã½:`í¬`,ã:`ì•„`,ãƒ:`ì´`,ã…:`ìš°`,ã‡:`ì—`,ã‰:`오`,ゃ:`야`,ã‚…:`유`,ょ:`ìš”`,ゎ:`와`,ã‚”:`ë¶€`},je={ãゃ:`캬`,ãã‚…:`í`,ãょ:`ì¿„`,ãã‡:`켸`,ãŽã‚ƒ:`ê°¸`,ãŽã‚…:`ê·œ`,ãŽã‚‡:`êµ`,ãŽã‡:`계`,ã—ゃ:`샤`,ã—ã‚…:`슈`,ã—ょ:`쇼`,ã—ã‡:`ì…°`,ã˜ã‚ƒ:`ìž`,ã˜ã‚…:`주`,ã˜ã‚‡:`ì¡°`,ã˜ã‡:`ì œ`,ã¢ã‚ƒ:`ìž`,ã¢ã‚…:`주`,ã¢ã‚‡:`ì¡°`,ã¢ã‡:`ì œ`,ã¡ã‚ƒ:`ì°¨`,ã¡ã‚…:`ì¶”`,ã¡ã‚‡:`ì´ˆ`,ã¡ã‡:`ì²´`,ã«ã‚ƒ:`ëƒ`,ã«ã‚…:`뉴`,ã«ã‚‡:`뇨`,ã«ã‡:`ë…œ`,ã²ã‚ƒ:`í–`,ã²ã‚…:`휴`,ã²ã‚‡:`효`,ã²ã‡:`혜`,ã³ã‚ƒ:`뱌`,ã³ã‚…:`ë·°`,ã³ã‚‡:`뵤`,ã³ã‡:`볘`,ã´ã‚ƒ:`í„`,ã´ã‚…:`퓨`,ã´ã‚‡:`표`,ã´ã‡:`í`,ã¿ã‚ƒ:`먀`,ã¿ã‚…:`뮤`,ã¿ã‚‡:`묘`,ã¿ã‡:`몌`,りゃ:`ëž´`,りゅ:`류`,りょ:`료`,りã‡:`ë¡€`,ãµã:`파`,ãµãƒ:`피`,ãµã‡:`페`,ãµã‰:`í¬`,ãµã‚…:`퓨`,ã‚”ã:`ë°”`,ã‚”ãƒ:`비`,ã‚”ã‡:`ë² `,ã‚”ã‰:`ë³´`,ã†ãƒ:`위`,ã†ã‡:`웨`,ã†ã‰:`워`,ãã:`ì½°`,ããƒ:`퀴`,ãã‡:`퀘`,ãã‰:`쿼`,ãã:`ê³¼`,ããƒ:`ê·€`,ãã‡:`궤`,ãã‰:`궈`,ã¤ã:`ì°¨`,ã¤ãƒ:`치`,ã¤ã‡:`ì²´`,ã¤ã‰:`ì´ˆ`,ã¦ãƒ:`í‹°`,ã¦ã‚…:`튜`,ã¨ã…:`투`,ã§ãƒ:`ë””`,ã§ã‚…:`ë“€`,ã©ã…:`ë‘`},Me={ã…:`ì•„`,ã…:`ì• `,ã…‘:`야`,ã…’:`ì–˜`,ã…“:`ì–´`,ã…”:`ì—`,ã…•:`ì—¬`,ã…–:`예`,ã…—:`오`,ã…˜:`ì•„`,ã…™:`ì• `,ã…š:`외`,ã…›:`ìš”`,ã…œ:`ìš°`,ã…:`ì–´`,ã…ž:`ì—`,ã…Ÿ:`위`,ã… :`유`,ã…¡:`으`,ã…¢:`ì˜`,ã…£:`ì´`};function Ne(e){for(let t=e.length-1;t>=0;t--)if(Te(e[t]))return e[t];return null}function Pe(e){let t=Ne(e);if(!t)return e+`ー`;let n=we(t);return n?e+(Me[n.jung]??``):e+`ー`}function Fe(e,t){switch(t){case`expand`:return Pe(e);case`collapse`:return e;case`remove`:return e;case`keepMark`:return e+`ー`;default:return e}}function Ie(e){let t=ke(e??``);return`ã‹ããã‘ã“ãŒãŽãã’ã”`.includes(t)?`ㄱ`:`ã•ã—ã™ã›ãã–ã˜ãšãœãž`.includes(t)||`ãŸã¡ã¤ã¦ã¨ã ã¢ã¥ã§ã©`.includes(t)?`ã……`:`ã¯ã²ãµã¸ã»ã°ã³ã¶ã¹ã¼ã±ã´ã·ãºã½`.includes(t)?`ã…‚`:`ã……`}function Le(e,t){return Oe(e,Ie(t))}function Re(e,t){if(!t.assimilateNasal)return`ã„´`;let n=ke(e??``);return`ã¾ã¿ã‚€ã‚ã‚‚ã°ã³ã¶ã¹ã¼ã±ã´ã·ãºã½`.includes(n)?`ã…`:`ã‹ããã‘ã“ãŒãŽãã’ã”`.includes(n)?`ã…‡`:`ã„´`}function ze(e,t,n){return Oe(e,Re(t,n))}function Be(e){return e.replace(/(^|[\sã€ã€‚ï¼ï¼Ÿ!?])ã¯(?=$|[\sã€ã€‚ï¼ï¼Ÿ!?])/g,`$1ã‚`).replace(/(^|[\sã€ã€‚ï¼ï¼Ÿ!?])ã¸(?=$|[\sã€ã€‚ï¼ï¼Ÿ!?])/g,`$1ãˆ`).replace(/ã‚’/g,`ãŠ`)}function Ve(e,t){let n=String(e??``);return n=n.normalize(`NFKC`),n=ke(n),t.useSimpleParticleRules&&(n=Be(n)),n}function He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(e,t){for(let n of[3,2]){let r=e.slice(t,t+n);if(He(je,r))return{value:je[r],length:n}}let n=e[t];return He(Ae,n)?{value:Ae[n],length:1}:null}function We(e){let t=``;for(let n of e){let e=t[t.length-1],r=e?we(e):null;r&&!r.jong&&n===Me[r.jung]||(t+=n)}return t}function Ge(e,t={}){let n={..._e,...t},r=Ve(e,n),i=``,a=null;for(let e=0;e0&&/^[\p{Script=Hiragana}\s]+$/u.test(t)?`hiragana`:`hangul`}var qe=I(`

`),Je=I(`
`),q=I(`
`,1),Ye=I(`
`),Xe=I(`
`),Ze=I(`
`,1),Qe=I(`
`),$e=I(`

`),et=I(`
`,1),tt=I(`
`),nt=I(`
`);function rt(e,t){U(t,!0);let s=D(t,`class`,3,``),c=N(0),u=N(!1),d,f,p,m=0,v=W(()=>t.name.trim()),b=W(()=>Array.from(_(v))),T=W(()=>t.language===`hiragana`?20:10),E=W(()=>Array.from({length:_(T)},(e,t)=>t)),O=(()=>{let e=C([]),n=C([]),r,i=_(v);function a(t,i){r=t,n.length=0,e.length=0,e.push({kind:`input`,label:i})}return o(()=>{let o=_(v)?`input slots`:`waiting`;if(_(v)!==i){x(()=>{i=_(v),a(t.api,o)});return}if(e.length===0||t.api!==r?a(t.api,o):e[0]?.kind===`input`&&(e[0].label=o),t.api?.name===_(v)){t.api?.encoded?.ids&&e.length===1&&e.push({kind:`encoded`,label:`encoded ids`,ids:t.api.encoded.ids}),t.api?.encoded?.tensor&&e.length===2&&e.push({kind:`tensor`,label:`encoded tensor`,tensor:t.api.encoded.tensor}),t.api?.bridge_guide&&e.length===3&&e.push({kind:`tensor`,label:`encoded guide`,tensor:t.api.bridge_guide});for(let e=x(()=>n.length);e0&&e.push({kind:`diffusion`,label:`diffusion`,tensors:n}),t.api?.decoded?.ids&&e.length===5&&e.push({kind:`decoded`,label:`decoded ids`,ids:t.api.decoded.ids}),t.api?.decoded?.result!==void 0&&t.api.decoded.ids&&e.length===6&&e.push({kind:`result`,label:`result`,ids:t.api.decoded.ids,result:t.api.decoded.result})}}),{get current(){return e}}})(),k=W(()=>O.current.flatMap((e,t)=>e.kind===`diffusion`?e.tensors.map((e,n)=>({stepIndex:t,diffusionIndex:n})):[{stepIndex:t}])),ee=W(()=>z(_(c),0,Math.max(0,_(k).length-1))),j=W(()=>_(k)[_(ee)]),F=W(()=>_(j)?.stepIndex??0),ie=W(()=>O.current[_(F)]??O.current[0]),I=W(()=>_(j)?.diffusionIndex??0),L=W(()=>O.current.slice(0,_(F)+1)),oe=W(()=>V(_(ie),_(I))),R=W(()=>Math.max(0,_(k).length-1)),se=W(()=>_(k).length>1);o(()=>{t.api!==f&&(f=t.api,g(u,!1),g(c,0))}),o(()=>{_(c)<=_(R)||g(c,_(R),!0)}),o(()=>{if(p&&=(window.clearTimeout(p),void 0),!_(u)&&!(_(c)>=_(k).length-1))return p=window.setTimeout(()=>{g(c,Math.min(_(c)+1,_(k).length-1),!0),p=void 0},500),()=>{p&&=(window.clearTimeout(p),void 0)}}),o(()=>{d&&(_(c),_(F),window.requestAnimationFrame(()=>{(d?.querySelector(`[data-active="true"]`))?.scrollIntoView({block:`center`,behavior:`smooth`})}))});function z(e,t,n){return Math.max(t,Math.min(n,e))}function V(e,t){return e?e.kind===`diffusion`?`diffusion step ${t+1} / ${e.tensors.length}`:e.label:`waiting`}function le(e){if(e&&(e.kind===`encoded`||e.kind===`decoded`||e.kind===`result`))return e.ids}function ue(e){let t=e.currentTarget;g(u,!0),g(c,Number(t.value),!0)}function de(){g(u,!1)}function fe(e,t){let n=le(e)?.[t];return Number.isFinite(n)?String(n):e.kind===`input`?_(b)[t]??``:``}function pe(e){if(_(k).length<=1)return;e.preventDefault();let t=performance.now();t-m<120||Math.abs(e.deltaY)<8||(m=t,g(u,!0),g(c,z(_(c)+(e.deltaY>0?1:-1),0,_(k).length-1),!0))}var G=nt(),me=H(G),he=H(me,!0);P(me);var _e=w(me,2),ve=H(_e);n(w(H(ve),2),19,()=>_(L),(e,t)=>`${t}-${e.label}`,(e,t,a)=>{var o=tt(),s=H(o),c=H(s,!0);P(s);var d=w(s,2),f=e=>{var a=q(),o=l(a),s=H(o,!0);P(o);var c=w(o,2),u=e=>{var t=qe(),n=H(t,!0);P(t),S(e=>i(n,e),[()=>Ge(_(v))]),r(e,t)},d=W(()=>Ke(_(v))===`hiragana`);y(c,e=>{_(d)&&e(u)});var f=w(c,2);n(f,20,()=>_(E),e=>e,(e,n)=>{let a=W(()=>fe(_(t),n));var o=Je(),s=H(o),c=H(s,!0);P(s),P(o),S(()=>{ne(o,1,`relative flex aspect-square min-w-0 items-center justify-center overflow-hidden rounded-lg border border-border text-[clamp(10px,1.45vw,17px)] leading-none font-semibold tabular-nums ${_(a)?`bg-background text-foreground shadow-[0_12px_32px_rgba(24,24,27,0.05)]`:`bg-muted text-transparent shadow-none`}`,`svelte-1szbnx`),i(c,_(a))}),r(e,o)}),P(f),S(()=>{ne(o,1,`max-w-[min(560px,100%)] overflow-hidden text-center leading-[1.05] font-semibold text-ellipsis whitespace-nowrap ${_(v)?`text-[clamp(30px,6vw,70px)] text-foreground`:`text-2xl font-medium text-muted-foreground`}`,`svelte-1szbnx`),i(s,_(v)||`waiting`),re(f,`grid-template-columns: repeat(${_(T)}, minmax(0, 1fr));`)}),r(e,a)},p=e=>{var a=Xe();n(a,20,()=>_(E),e=>e,(e,n)=>{let a=W(()=>fe(_(t),n));var o=Ye(),s=H(o),c=H(s,!0);P(s),P(o),S(()=>{ne(o,1,`relative flex aspect-square min-w-0 items-center justify-center overflow-hidden rounded-lg border text-[clamp(10px,1.45vw,17px)] leading-none font-semibold tabular-nums ${_(a)?`${_(t).kind===`decoded`?`border-[#e8a7b8]`:`border-[#afcbff]`} bg-background text-foreground shadow-[0_12px_32px_rgba(24,24,27,0.05)]`:`border-border bg-muted text-transparent shadow-none`}`,`svelte-1szbnx`),i(c,_(a))}),r(e,o)}),P(a),S(()=>re(a,`grid-template-columns: repeat(${_(T)}, minmax(0, 1fr));`)),r(e,a)},m=e=>{{let n=W(()=>[_(t).tensor]),r=W(()=>_(a)===_(F)&&!_(u)),i=W(()=>_(a)===_(F)),o=W(()=>_(a)===_(F)?8:4),s=W(()=>_(a)===_(F)?680:560),c=W(()=>_(a)===_(F)?360:140),l=W(()=>340),d=W(()=>_(a)===_(F)?1:.92);ge(e,{get tensors(){return _(n)},get animated(){return _(r)},get interactive(){return _(i)},get cellSize(){return _(o)},get maxWidth(){return _(s)},get maxHeight(){return _(c)},get duration(){return _(l)},get opacity(){return _(d)}})}},h=e=>{var n=Ze(),o=l(n);{let e=W(()=>_(a)===_(F)?_(I):_(t).tensors.length-1),n=W(()=>_(a)===_(F)&&!_(u)),r=W(()=>_(a)===_(F)),i=W(()=>_(a)===_(F)?8:4),s=W(()=>_(a)===_(F)?680:560),c=W(()=>_(a)===_(F)?360:140),l=W(()=>340),d=W(()=>_(a)===_(F)?1:.92);ge(o,{get tensors(){return _(t).tensors},get frameIndex(){return _(e)},get animated(){return _(n)},get interactive(){return _(r)},get cellSize(){return _(i)},get maxWidth(){return _(s)},get maxHeight(){return _(c)},get duration(){return _(l)},get opacity(){return _(d)}})}var s=w(o,2),c=H(s);P(s),S(()=>i(c,`step ${(_(a)===_(F)?_(I)+1:_(t).tensors.length)??``} / ${_(t).tensors.length??``}`)),r(e,n)},g=e=>{var a=et(),o=l(a);n(o,20,()=>_(E),e=>e,(e,n)=>{let a=W(()=>fe(_(t),n));var o=Qe(),s=H(o),c=H(s,!0);P(s),P(o),S(()=>{ne(o,1,`relative flex aspect-square min-w-0 items-center justify-center overflow-hidden rounded-lg border text-[clamp(10px,1.45vw,17px)] leading-none font-semibold tabular-nums ${_(a)?`border-[#e8a7b8] bg-background text-foreground shadow-[0_12px_32px_rgba(24,24,27,0.05)]`:`border-border bg-muted text-transparent shadow-none`}`,`svelte-1szbnx`),i(c,_(a))}),r(e,o)}),P(o);var s=w(o,2),c=H(s,!0);P(s);var u=w(s,2),d=e=>{var n=$e(),a=H(n,!0);P(n),S(e=>i(a,e),[()=>Ge(_(t).result)]),r(e,n)},f=W(()=>Ke(_(t).result)===`hiragana`);y(u,e=>{_(f)&&e(d)}),S(()=>{re(o,`grid-template-columns: repeat(${_(T)}, minmax(0, 1fr));`),i(c,_(t).result)}),r(e,a)};y(d,e=>{_(t).kind===`input`?e(f):_(t).kind===`encoded`||_(t).kind===`decoded`?e(p,1):_(t).kind===`tensor`?e(m,2):_(t).kind===`diffusion`?e(h,3):_(t).kind===`result`&&e(g,4)}),P(o),S(()=>{ne(o,1,`flex w-full shrink-0 origin-center flex-col items-center gap-2.5 filter transition-[opacity,transform,filter] duration-300 ease-out ${_(a)===_(F)?`scale-100 opacity-100 saturate-100`:`scale-[0.96] opacity-60 saturate-[0.88]`}`,`svelte-1szbnx`),ce(o,`data-active`,_(a)===_(F)),ne(s,1,`rounded-full border border-border bg-background/75 px-2.5 py-1 text-[10px] leading-none uppercase tabular-nums backdrop-blur-md ${_(a)===_(F)?`text-foreground`:`text-muted-foreground`}`,`svelte-1szbnx`),i(c,_(t).label)}),r(e,o)}),M(2),P(ve),A(ve,e=>d=e,()=>d),P(_e);var ye=w(_e,2),K=H(ye);te(K);var be=w(K,2),xe=w(be,2),Se=H(xe);P(xe),P(ye),P(G),S(()=>{ne(G,1,`relative flex h-screen flex-1 items-center justify-center overflow-hidden bg-background ${s()}`,`svelte-1szbnx`),i(he,_(oe)),ce(K,`max`,_(R)),ae(K,_(ee)),K.disabled=!_(se),be.disabled=!_(se)||_(ee)>=_(R),i(Se,`${_(ee)+1} / ${_(k).length??``}`)}),a(`wheel`,G,pe),h(`input`,K,ue),h(`click`,be,de),r(e,G),B()}p([`input`,`click`]);var it=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),ot=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),st=`-`,ct=[],lt=`arbitrary..`,ut=e=>{let t=pt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ft(e);let n=e.split(st);return dt(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?it(i,t):t:i||ct}return n[e]||ct}}},dt=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=dt(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(st):e.slice(t).join(st),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?lt+r:void 0})(),pt=e=>{let{theme:t,classGroups:n}=e;return mt(n,t)},mt=(e,t)=>{let n=ot();for(let r in e){let i=e[r];ht(i,n,r,t)}return n},ht=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){_t(e,t,n);return}if(typeof e==`function`){vt(e,t,n,r);return}yt(e,t,n,r)},_t=(e,t,n)=>{let r=e===``?t:bt(t,e);r.classGroupId=n},vt=(e,t,n,r)=>{if(xt(e)){ht(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(at(n,e))},yt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(st),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,St=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ct=`!`,wt=`:`,Tt=[],Et=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Dt=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;si?a-i:void 0;return Et(t,l,c,u)};if(t){let e=t+wt,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Et(Tt,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ot=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},kt=e=>({cache:St(e.cacheSize),parseClassName:Dt(e),sortModifiers:Ot(e),postfixLookupClassGroupIds:At(e),...ut(e)}),At=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(jt),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ct:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e0?` `+l:l)}return l},Nt=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=kt(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Mt(e,n);return i(e,a),a};return a=o,(...e)=>a(Nt(...e))},It=[],J=e=>{let t=t=>t[e]||It;return t.isThemeGetter=!0,t},Lt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Bt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ht=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ut=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>zt.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>!!e&&Number.isInteger(Number(e)),qt=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),Jt=e=>Bt.test(e),Yt=()=>!0,Xt=e=>Vt.test(e)&&!Ht.test(e),Zt=()=>!1,Qt=e=>Ut.test(e),$t=e=>Wt.test(e),en=e=>!X(e)&&!Z(e),tn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),nn=e=>vn(e,Sn,Zt),X=e=>Lt.test(e),rn=e=>vn(e,Cn,Xt),an=e=>vn(e,wn,Y),on=e=>vn(e,En,Yt),sn=e=>vn(e,Tn,Zt),cn=e=>vn(e,bn,Zt),ln=e=>vn(e,xn,$t),un=e=>vn(e,Dn,Qt),Z=e=>Rt.test(e),dn=e=>yn(e,Cn),fn=e=>yn(e,Tn),pn=e=>yn(e,bn),mn=e=>yn(e,Sn),hn=e=>yn(e,xn),gn=e=>yn(e,Dn,!0),_n=e=>yn(e,En,!0),vn=(e,t,n)=>{let r=Lt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yn=(e,t,n=!1)=>{let r=Rt.exec(e);return r?r[1]?t(r[1]):n:!1},bn=e=>e===`position`||e===`percentage`,xn=e=>e===`image`||e===`url`,Sn=e=>e===`length`||e===`size`||e===`bg-size`,Cn=e=>e===`length`,wn=e=>e===`number`,Tn=e=>e===`family-name`,En=e=>e===`number`||e===`weight`,Dn=e=>e===`shadow`,On=()=>{let e=J(`color`),t=J(`font`),n=J(`text`),r=J(`font-weight`),i=J(`tracking`),a=J(`leading`),o=J(`breakpoint`),s=J(`container`),c=J(`spacing`),l=J(`radius`),u=J(`shadow`),d=J(`inset-shadow`),f=J(`text-shadow`),p=J(`drop-shadow`),m=J(`blur`),h=J(`perspective`),g=J(`aspect`),_=J(`ease`),v=J(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[Gt,`full`,`auto`,...w()],E=()=>[Kt,`none`,`subgrid`,Z,X],D=()=>[`auto`,{span:[`full`,Kt,Z,X]},Kt,Z,X],O=()=>[Kt,`auto`,Z,X],k=()=>[`auto`,`min`,`max`,`fr`,Z,X],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ee=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[Gt,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[Gt,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[Gt,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,Z,X],ne=()=>[...b(),pn,cn,{position:[Z,X]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,mn,nn,{size:[Z,X]}],ie=()=>[qt,dn,rn],I=()=>[``,`none`,`full`,l,Z,X],L=()=>[``,Y,dn,rn],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[Y,qt,pn,cn],se=()=>[``,`none`,m,Z,X],z=()=>[`none`,Y,Z,X],B=()=>[`none`,Y,Z,X],ce=()=>[Y,Z,X],V=()=>[Gt,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Jt],breakpoint:[Jt],color:[Yt],container:[Jt],"drop-shadow":[Jt],ease:[`in`,`out`,`in-out`],font:[en],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Jt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Jt],shadow:[Jt],spacing:[`px`,Y],text:[Jt],"text-shadow":[Jt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Gt,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[tn],columns:[{columns:[Y,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Kt,`auto`,Z,X]}],basis:[{basis:[Gt,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,Gt,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[Kt,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...ee(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ee()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...ee(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ee(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...ee(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ee()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...N()]}],"min-inline-size":[{"min-inline":[`auto`,...N()]}],"max-inline-size":[{"max-inline":[`none`,...N()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,dn,rn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,_n,on]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,qt,X]}],"font-family":[{font:[fn,sn,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,an]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,Z,rn]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Kt,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:F()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Kt,Z,X],radial:[``,Z,X],conic:[Kt,Z,X]},hn,ln]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,dn,rn]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,gn,un]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,gn,un]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Y,rn]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,gn,un]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:se()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,gn,un]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":[`translate-none`],zoom:[{zoom:[Kt,Z,X]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[Y,dn,rn,an]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},kn=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(An(e,`cacheSize`,t),An(e,`prefix`,n),An(e,`experimentalParseClassName`,r),jn(e.theme,a.theme),jn(e.classGroups,a.classGroups),jn(e.conflictingClassGroups,a.conflictingClassGroups),jn(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),An(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),An(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),Mn(e.theme,i.theme),Mn(e.classGroups,i.classGroups),Mn(e.conflictingClassGroups,i.conflictingClassGroups),Mn(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Nn(e,i,`postfixLookupClassGroups`),Nn(e,i,`orderSensitiveModifiers`),e),An=(e,t,n)=>{n!==void 0&&(e[t]=n)},jn=(e,t)=>{if(t)for(let n in t)An(e,n,t[n])},Mn=(e,t)=>{if(t)for(let n in t)Nn(e,t,n)},Nn=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Pn=(e,...t)=>typeof e==`function`?Ft(On,e,...t):Ft(()=>kn(On(),e),...t),Fn=Ft(On);function Q(...e){return Fn(fe(e))}var In=/\s+/g,Ln=e=>typeof e!=`string`||!e?e:e.replace(In,` `).trim(),Rn=(...e)=>{let t=[],n=e=>{if(!e&&e!==0&&e!==0n)return;if(Array.isArray(e)){for(let t=0,r=e.length;t0?Ln(t.join(` `)):void 0},zn=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,Bn=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},Vn=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];n in e?e[n]=Rn(e[n],r):e[n]=r}return e},Un=(e,t)=>{for(let n=0;n{let t=[];Un(e,t);let n=[];for(let e=0;e{let n={};for(let r in e){let i=e[r];if(r in t){let e=t[r];Array.isArray(i)||Array.isArray(e)?n[r]=Wn(e,i):typeof i==`object`&&typeof e==`object`&&i&&e?n[r]=Gn(i,e):n[r]=e+` `+i}else n[r]=i}for(let r in t)r in e||(n[r]=t[r]);return n},Kn={twMerge:!0,twMergeConfig:{}};function qn(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Jn=qn(),Yn=e=>{let t=(t,n)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=t,l={...Kn,...n},u=r?.base?Rn(r.base,t?.base):t?.base,d=r?.variants&&!Bn(r.variants)?Gn(a,r.variants):a,f=r?.defaultVariants&&!Bn(r.defaultVariants)?{...r.defaultVariants,...c}:c;!Bn(l.twMergeConfig)&&!Vn(l.twMergeConfig,Jn.cachedTwMergeConfig)&&(Jn.didTwMergeConfigChange=!0,Jn.cachedTwMergeConfig=l.twMergeConfig);let p=Bn(r?.slots),m=Bn(i)?{}:{base:Rn(t?.base,p&&r?.base),...i},h=p?m:Hn({...r?.slots},Bn(m)?{base:t?.base}:m),g=Bn(r?.compoundVariants)?o:Wn(r?.compoundVariants,o),_=t=>{if(Bn(d)&&Bn(i)&&p)return e(u,t?.class,t?.className)(l);if(g&&!Array.isArray(g))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof g}`);if(s&&!Array.isArray(s))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let n=(e,n=d,r=null,i=null)=>{let a=n[e];if(!a||Bn(a))return null;let o=i?.[e]??t?.[e];if(o===null)return null;let s=zn(o);if(typeof s==`object`)return null;let c=f?.[e];return a[(s??zn(c))||`false`]},r=()=>{if(!d)return null;let e=Object.keys(d),t=[];for(let r=0;r{if(!d||typeof d!=`object`)return null;let r=[];for(let i in d){let a=n(i,d,e,t),o=e===`base`&&typeof a==`string`?a:a&&a[e];o&&r.push(o)}return r},o={};for(let e in t){let n=t[e];n!==void 0&&(o[e]=n)}let c=(e,n)=>{let r=typeof t?.[e]==`object`?{[e]:t[e]?.initial}:{};return{...f,...o,...r,...n}},m=(e=[],t)=>{let n=[],r=e.length;for(let i=0;i{let n=m(g,t);if(!Array.isArray(n))return n;let r={},i=e;for(let e=0;e{if(s.length<1)return null;let t={},n=c(null,e);for(let e=0;e{let r=_(t),i=v(t);return n(h[e],a(e,t),r?r[e]:void 0,i?i[e]:void 0,t?.class,t?.className)(l)}}return t}return e(u,r(),m(g),t?.class,t?.className)(l)};return _.variantKeys=(()=>{if(!(!d||typeof d!=`object`))return Object.keys(d)})(),_.extend=r,_.base=u,_.slots=h,_.variants=d,_.defaultVariants=f,_.compoundSlots=s,_.compoundVariants=g,_};return{tv:t,createTV:e=>(n,r)=>t(n,r?Gn(e,r):e)}},Xn=e=>Bn(e)?Fn:Pn({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),Zn=(e,t)=>{let n=Rn(e);return!n||!(t?.twMerge??!0)?n:((!Jn.cachedTwMerge||Jn.didTwMergeConfigChange)&&(Jn.didTwMergeConfigChange=!1,Jn.cachedTwMerge=Xn(Jn.cachedTwMergeConfig)),Jn.cachedTwMerge(n)||void 0)},{createTV:Qn,tv:$n}=Yn((...e)=>t=>Zn(e,t)),er=$n({base:`focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-2xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent`,secondary:`bg-secondary text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,lg:`h-9 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),tr=I(``),nr=I(``);function rr(e,t){U(t,!0);let n=D(t,`variant`,3,`default`),i=D(t,`size`,3,`default`),a=D(t,`ref`,15,null),o=D(t,`href`,3,void 0),s=D(t,`type`,3,`button`),c=z(t,[`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]);var u=m(),d=l(u),f=e=>{var s=tr();j(s,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:o(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...c}),[()=>Q(er({variant:n(),size:i()}),t.class)]),v(H(s),()=>t.children??V),P(s),A(s,e=>a(e),()=>a()),r(e,s)},p=e=>{var o=nr();j(o,e=>({"data-slot":`button`,class:e,type:s(),disabled:t.disabled,...c}),[()=>Q(er({variant:n(),size:i()}),t.class)]),v(H(o),()=>t.children??V),P(o),A(o,e=>a(e),()=>a()),r(e,o)};y(d,e=>{o()?e(f):e(p,-1)}),r(e,u),B()}var ir=I(`
`);function ar(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=D(t,`size`,3,`default`),a=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]);var o=ir();j(o,e=>({"data-slot":`card`,"data-size":i(),class:e,...a}),[()=>Q(`bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-5 overflow-hidden rounded-[min(var(--radius-4xl),24px)] py-5 text-sm shadow-sm ring-1 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] *:[img:last-child]:rounded-b-[min(var(--radius-4xl),24px)] group/card flex flex-col`,t.class)]),v(H(o),()=>t.children??V),P(o),A(o,e=>n(e),()=>n()),r(e,o),B()}var or=I(`
`);function sr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=or();j(a,e=>({"data-slot":`card-content`,class:e,...i}),[()=>Q(`px-5 group-data-[size=sm]/card:px-4`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}var cr=I(`

`);function lr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=cr();j(a,e=>({"data-slot":`card-description`,class:e,...i}),[()=>Q(`text-muted-foreground text-sm`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}var ur=I(`
`);function dr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=ur();j(a,e=>({"data-slot":`card-footer`,class:e,...i}),[()=>Q(`rounded-b-[min(var(--radius-4xl),24px)] px-5 group-data-[size=sm]/card:px-4 [.border-t]:pt-5 group-data-[size=sm]/card:[.border-t]:pt-4 flex items-center`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}var fr=I(`
`);function pr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=fr();j(a,e=>({"data-slot":`card-header`,class:e,...i}),[()=>Q(`gap-1.5 rounded-t-[min(var(--radius-4xl),24px)] px-5 group-data-[size=sm]/card:px-4 [.border-b]:pb-5 group-data-[size=sm]/card:[.border-b]:pb-4 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}var mr=I(`
`);function hr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=mr();j(a,e=>({"data-slot":`card-title`,class:e,...i}),[()=>Q(`font-heading text-base font-medium`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}I(`
`);var gr=I(`
`);function _r(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]);var a=gr();j(a,e=>({"data-slot":`input-group`,role:`group`,class:e,...i}),[()=>Q(`group/input-group bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-8 rounded-2xl border border-transparent transition-[color,box-shadow] duration-200 in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto`,t.class)]),v(H(a),()=>t.children??V),P(a),A(a,e=>n(e),()=>n()),r(e,a),B()}var vr=$n({base:`text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-2xl **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none`,variants:{align:{"inline-start":`pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first`,"inline-end":`pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last`,"block-start":`px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start`,"block-end":`px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start`}},defaultVariants:{align:`inline-start`}}),yr=I(`
`);function br(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=D(t,`align`,3,`inline-start`),a=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`align`]);var o=yr(),s=e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()};j(o,e=>({role:`group`,"data-slot":`input-group-addon`,"data-align":i(),class:e,onclick:s,...a}),[()=>Q(vr({align:i()}),t.class)]),v(H(o),()=>t.children??V),P(o),A(o,e=>n(e),()=>n()),r(e,o),B()}$n({base:`gap-2 rounded-2xl text-sm flex items-center shadow-none`,variants:{size:{xs:`h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:`cn-input-group-button-size-sm`,"icon-xs":`size-6 rounded-xl p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});var xr=I(``),Sr=I(``);function Cr(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=D(t,`value`,15),a=D(t,`files`,15),o=D(t,`data-slot`,3,`input`),s=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]);var c=m(),u=l(c),d=e=>{var c=xr();j(c,e=>({"data-slot":o(),class:e,type:`file`,...s}),[()=>Q(`bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 rounded-2xl border border-transparent px-2.5 py-1 text-base transition-[color,box-shadow] duration-200 file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),A(c,e=>n(e),()=>n()),L(c,a),de(c,i),r(e,c)},f=e=>{var a=Sr();j(a,e=>({"data-slot":o(),class:e,type:t.type,...s}),[()=>Q(`bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 rounded-2xl border border-transparent px-2.5 py-1 text-base transition-[color,box-shadow] duration-200 file:h-6 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),A(a,e=>n(e),()=>n()),de(a,i),r(e,a)};y(u,e=>{t.type===`file`?e(d):e(f,-1)}),r(e,c),B()}function wr(e,t){U(t,!0);let n=D(t,`ref`,15,null),r=D(t,`value`,15),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);{let a=W(()=>Q(`rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1`,t.class));Cr(e,ue({"data-slot":`input-group-control`,get class(){return _(a)}},()=>i,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))}B()}I(``),I(``);function Tr(e){return typeof e==`function`}function Er(e){return typeof e==`object`&&!!e}var Dr=[`string`,`number`,`bigint`,`boolean`];function Or(e){return e==null||Dr.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Or(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var kr=Symbol(`box`),Ar=Symbol(`is-writable`);function $(e,t){let n=W(e);return t?{[kr]:!0,[Ar]:!0,get current(){return _(n)},set current(e){t(e)}}:{[kr]:!0,get current(){return e()}}}function jr(e){return Er(e)&&kr in e}function Mr(e){return jr(e)&&Ar in e}function Nr(e){return jr(e)?e:Tr(e)?$(e):Ir(e)}function Pr(e){return Object.entries(e).reduce((e,[t,n])=>jr(n)?(Mr(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function Fr(e){return Mr(e)?{[kr]:!0,get current(){return e.current}}:e}function Ir(e){let t=N(C(e));return{[kr]:!0,[Ar]:!0,get current(){return _(t)},set current(e){g(t,e,!0)}}}function Lr(e){let t=N(C(e));return{[kr]:!0,[Ar]:!0,get current(){return _(t)},set current(e){g(t,e,!0)}}}Lr.from=Nr,Lr.with=$,Lr.flatten=Pr,Lr.readonly=Fr,Lr.isBox=jr,Lr.isWritableBox=Mr;function Rr(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var zr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Br=/\n/g,Vr=/^\s*/,Hr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ur=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Gr=/^[;\s]*/,Kr=/^\s+|\s+$/g,qr=` +`,Jr=`/`,Yr=`*`,Xr=``,Zr=`comment`,Qr=`declaration`;function $r(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Br);t&&(n+=t.length);var i=e.lastIndexOf(qr);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Vr)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(Jr!=e.charAt(0)||Yr!=e.charAt(1))){for(var n=2;Xr!=e.charAt(n)&&(Yr!=e.charAt(n)||Jr!=e.charAt(n+1));)++n;if(n+=2,Xr===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Zr,comment:o})}}function f(){var e=a(),t=c(Hr);if(t){if(d(),!c(Ur))return s(`property missing ':'`);var n=c(Wr),r=e({type:Qr,property:ei(t[0].replace(zr,Xr)),value:n?ei(n[0].replace(zr,Xr)):Xr});return c(Gr),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function ei(e){return e?e.replace(Kr,Xr):Xr}function ti(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=$r(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var ni=/\d/,ri=[`-`,`_`,`/`,`.`];function ii(e=``){if(!ni.test(e))return e!==e.toLowerCase()}function ai(e){let t=[],n=``,r,i;for(let a of e){let e=ri.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=ii(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function oi(e){return e?ai(e).map(e=>ci(e)).join(``):``}function si(e){return li(oi(e||``))}function ci(e){return e?e[0].toUpperCase()+e.slice(1):``}function li(e){return e?e[0].toLowerCase()+e.slice(1):``}function ui(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[oi(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[si(e)]=n}return ti(e,n),t}function di(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function fi(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var pi=fi(/[A-Z]/,e=>`-${e.toLowerCase()}`);function mi(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${pi(t)}: ${e[t]};`).join(` +`)}function hi(e={}){return mi(e).replace(` +`,` `)}var gi=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function _i(e){return gi.has(e)}function vi(...e){let t={...e[0]};for(let n=1;ns.has(e)))&&T(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),g(n,-1)),r&&(g(this.#n,super.size),T(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;g(this.#n,0);for(var t of e.values())g(t,-1);T(this.#t),e.clear()}}#a(){_(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)_(n)}keys(){return _(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return _(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=yi,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=se(e=>{let n=c(t,`focusin`,e),r=c(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?bi(this.#e):null}};var Si=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return O(this.#t)}get(){let e=F(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=F(this.#t);return t===void 0?e:t}set(e){return ee(this.#t,e)}};function Ci(e,t){switch(e){case`post`:o(t);break;case`pre`:u(t);break}}function wi(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;Ci(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=x(()=>n(t,o));return o=t,r})}function Ti(e,t,n){let r=b(()=>{let i=!1;wi(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});o(()=>r)}function Ei(e,t,n){wi(e,`post`,t,n)}function Di(e,t,n){wi(e,`pre`,t,n)}Ei.pre=Di;function Oi(e,t){Ti(e,`post`,t)}function ki(e,t){Ti(e,`pre`,t)}Oi.pre=ki;function Ai(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function ji(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n{_(f).forEach(e=>e()),g(f,[],!0)},m=e=>{g(f,[..._(f),e],!0)},h=async(e,n,r=!1)=>{try{g(u,!0),g(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:_(l),refetching:r,onCleanup:m,signal:i.signal});return g(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||g(d,e,!0);return}finally{g(u,!1)}},v=s?Ai(h,s):c?ji(h,c):h,y=Array.isArray(e)?e:[e],b;return r((t,n)=>{a&&b||(b=t,v(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return _(l)},get loading(){return _(u)},get error(){return _(d)},mutate:e=>{g(l,e,!0)},refetch:t=>{let n=y.map(e=>e());return v(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function Ni(e,t,n){return Mi(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Ei(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function Pi(e,t,n){return Mi(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];Ei.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}Ni.pre=Pi;function Fi(e){o(()=>x(()=>e()))}var Ii=9;function Li(e){return Er(e)&&e.nodeType===Ii}function Ri(e){return Er(e)&&e.constructor?.name===`VisualViewport`}function zi(e){return Li(e)?e:Ri(e)?e.document:e?.ownerDocument??document}function Bi(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Vi=class{element;#e=W(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return _(this.#e)}set root(e){g(this.#e,e)}constructor(e){typeof e==`function`?this.element=$(e):this.element=e}getDocument=()=>zi(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Bi(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Hi(e,t){return{[d()]:n=>jr(e)?(e.current=n,x(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),x(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Ui(e){return e?`true`:`false`}function Wi(e){return e?``:void 0}function Gi(e){return e?!0:void 0}var Ki=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function qi(e){let t=new Ki(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Ji=`ArrowDown`,Yi=`ArrowLeft`,Xi=`ArrowRight`,Zi=`ArrowUp`,Qi=`Home`,$i=`PageDown`,ea=`PageUp`;function ta(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var na=[Ji,ea,Qi],ra=[Zi,$i,`End`];[...na,...ra];function ia(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Yi:Xi,vertical:Ji}[t]}function aa(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Xi:Yi,vertical:Zi}[t]}function oa(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:ia(e,t),prevKey:aa(e,t)}}var sa=typeof document<`u`;ca();function ca(){return sa&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function la(e){return e instanceof HTMLElement}function ua(e){return e instanceof Element||e instanceof SVGElement}var da=class{#e;#t=Lr(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=oa(ta(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Qi]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Xi:Ji,t=s===`ArrowUp`?Yi:Zi;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);!t||!la(t)||t.focus()}};function fa(){}function pa(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function ma(e,t){return e>=0&&e1&&e.preventDefault()}#e=W(()=>({id:this.opts.id.current,[ha.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return _(this.#e)}set props(e){g(this.#e,e)}},_a=I(``);function va(e,t){let n=ie();U(t,!0);let i=D(t,`id`,19,()=>pa(n)),a=D(t,`ref`,15,null),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),s=ga.create({id:$(()=>i()),ref:$(()=>a(),e=>a(e))}),c=W(()=>vi(o,s.props,{for:t.for}));var u=m(),d=l(u),f=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(c)})),r(e,n)},p=e=>{var n=_a();j(n,()=>({..._(c),for:t.for})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(d,e=>{t.child?e(f):e(p,-1)}),r(e,u),B()}var ya=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t,this.handler=this.handler.bind(this),o(this.handler)}handler(){let e=0,t=this.#e();if(!t)return;let n=new ResizeObserver(()=>{cancelAnimationFrame(e),e=window.requestAnimationFrame(this.#t)});return n.observe(t),()=>{window.cancelAnimationFrame(e),n.unobserve(t)}}};function ba(e,t,n){let r={position:`absolute`};return e===`lr`?(r.left=`${t}%`,r.right=`${n}%`):e===`rl`?(r.right=`${t}%`,r.left=`${n}%`):e===`bt`?(r.bottom=`${t}%`,r.top=`${n}%`):(r.top=`${t}%`,r.bottom=`${n}%`),r}function xa(e,t){let n={position:`absolute`};return e===`lr`?(n.left=`${t}%`,n.translate=`-50% 0`):e===`rl`?(n.right=`${t}%`,n.translate=`50% 0`):e===`bt`?(n.bottom=`${t}%`,n.translate=`0 50%`):(n.top=`${t}%`,n.translate=`0 -50%`),n}function Sa(e,t,n){let r={position:`absolute`};return e===`lr`?(r.left=`${t}%`,r.translate=`${n}% 0`):e===`rl`?(r.right=`${t}%`,r.translate=`${-n}% 0`):e===`bt`?(r.bottom=`${t}%`,r.translate=`0 ${-n}%`):(r.top=`${t}%`,r.translate=`0 ${n}%`),r}function Ca(e,t,n=`top`){let r={position:`absolute`};return e===`lr`||e===`rl`?(r.left=e===`lr`?`${t}%`:void 0,r.right=e===`rl`?`${t}%`:void 0,r.translate=`-50% 0`,n===`top`?r.bottom=`100%`:n===`bottom`&&(r.top=`100%`)):(e===`tb`?r.top=`${t}%`:r.bottom=`${t}%`,r.translate=`0 50%`,n===`left`?r.right=`100%`:n===`right`&&(r.left=`100%`)),r}function wa(e){if(Math.floor(e)===e)return 0;let t=e.toString();if(t.indexOf(`.`)!==-1&&t.indexOf(`e-`)===-1)return t.split(`.`)[1].length;if(t.indexOf(`e-`)!==-1){let e=t.split(`e-`);return parseInt(e[1],10)}return 0}function Ta(e,t){let n=10**t;return Math.round(e*n)/n}function Ea(e,t,n){if(typeof e==`number`){let r=n-t,i=Math.ceil(r/e),a=wa(e),o=10**a;Math.round(r*o)%Math.round(e*o)===0&&i++;let s=[];for(let n=0;ne>=t&&e<=n).sort((e,t)=>e-t)}function Da(e,t){if(t.length===0)return e;let n=t[0],r=Math.abs(e-n);for(let i of t){let t=Math.abs(e-i);t0?t[r-1]:e}function ka(e,t,n=!0){let[r,i]=e,[a,o]=t,s=(o-a)/(i-r);return e=>{let t=a+s*(e-r);return n?t>Math.max(a,o)?Math.max(a,o):tthis.opts.orientation.current===`horizontal`?this.opts.dir.current===`rtl`?`rl`:`lr`:this.opts.dir.current===`rtl`?`tb`:`bt`);get direction(){return _(this.#n)}set direction(e){g(this.#n,e)}#r=W(()=>Ea(this.opts.step.current,this.opts.min.current,this.opts.max.current));get normalizedSteps(){return _(this.#r)}set normalizedSteps(e){g(this.#r,e)}domContext;constructor(e){this.opts=e,this.attachment=Hi(e.ref),this.domContext=new Vi(this.opts.ref),new ya(()=>this.opts.ref.current,this.#i)}#i=()=>{g(this.#t,_(this.#t)+1)};isThumbActive(e){return this.isActive}#a=W(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current===`horizontal`?`pan-y`:`pan-x`});getAllThumbs=()=>{let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(Aa.selector(`thumb`))):[]};getThumbScale=()=>{_(this.#t);let e=this.opts.trackPadding?.current;if(e!==void 0&&e>0)return[e,100-e];if(this.opts.thumbPositioning.current===`exact`)return[0,100];let t=this.opts.orientation.current===`vertical`,n=this.getAllThumbs()[0],r=t?n?.offsetHeight:n?.offsetWidth;if(r===void 0||Number.isNaN(r)||r===0)return[0,100];let i=t?this.opts.ref.current?.offsetHeight:this.opts.ref.current?.offsetWidth;if(i===void 0||Number.isNaN(i)||i===0)return[0,100];let a=r/2/i*100;return[a,100-a]};getPositionFromValue=e=>{let t=this.getThumbScale();return ka([this.opts.min.current,this.opts.max.current],t)(e)};#o=W(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":Wi(this.opts.disabled.current),style:{touchAction:_(this.#a)},[Aa.root]:``,...this.attachment}));get props(){return _(this.#o)}set props(e){g(this.#o,e)}},Na=class extends Ma{opts;isMulti=!1;constructor(e){super(e),this.opts=e,Fi(()=>di(c(this.domContext.getDocument(),`pointerdown`,this.handlePointerDown),c(this.domContext.getDocument(),`pointerup`,this.handlePointerUp),c(this.domContext.getDocument(),`pointermove`,this.handlePointerMove),c(this.domContext.getDocument(),`pointerleave`,this.handlePointerUp))),Ei([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([e,t,n,r])=>{let i=Ea(e,t,n),a=e=>i.includes(e),o=e=>Da(e,i);a(r)||(this.opts.value.current=o(r))})}isTickValueSelected=e=>this.opts.value.current===e;applyPosition({clientXY:e,start:t,end:n}){let r=this.opts.min.current,i=this.opts.max.current,a=(e-t)/(n-t)*(i-r)+r;if(ai)this.updateValue(i);else{let e=this.normalizedSteps,t=Da(a,e);this.updateValue(t)}}updateValue=e=>{this.opts.value.current=Da(e,this.normalizedSteps)};handlePointerMove=e=>{if(!this.isActive||this.opts.disabled.current)return;e.preventDefault(),e.stopPropagation();let t=this.opts.ref.current,n=this.getAllThumbs()[0];if(!t||!n)return;n.focus();let{left:r,right:i,top:a,bottom:o}=t.getBoundingClientRect();this.direction===`lr`?this.applyPosition({clientXY:e.clientX,start:r,end:i}):this.direction===`rl`?this.applyPosition({clientXY:e.clientX,start:i,end:r}):this.direction===`bt`?this.applyPosition({clientXY:e.clientY,start:o,end:a}):this.direction===`tb`&&this.applyPosition({clientXY:e.clientY,start:a,end:o})};handlePointerDown=e=>{if(e.button!==0||this.opts.disabled.current)return;let t=this.opts.ref.current,n=this.getAllThumbs()[0];if(!n||!t)return;let r=e.composedPath()[0]??e.target;!ua(r)||!t.contains(r)||(e.preventDefault(),n.focus(),this.isActive=!0,this.handlePointerMove(e))};handlePointerUp=()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(x(()=>this.opts.value.current)),this.isActive=!1)};#e=W(()=>{let e=this.opts.value.current;return Array.from({length:1},()=>{let t=e,n=this.getPositionFromValue(t),r=xa(this.direction,n);return{role:`slider`,"aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":t,"aria-disabled":Ui(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":t,"data-orientation":this.opts.orientation.current,style:r,[Aa.thumb]:``}})});get thumbsPropsArr(){return _(this.#e)}set thumbsPropsArr(e){g(this.#e,e)}#t=W(()=>this.thumbsPropsArr.map((e,t)=>t));get thumbsRenderArr(){return _(this.#t)}set thumbsRenderArr(e){g(this.#t,e)}#n=W(()=>{let e=this.normalizedSteps,t=this.opts.value.current;return e.map((n,r)=>{let i=this.getPositionFromValue(n),a=r===0,o=r===e.length-1,s=a?0:o?-100:-50,c=Sa(this.direction,i,s),l=n<=t;return{"data-disabled":Wi(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":l?``:void 0,"data-value":n,"data-selected":this.isTickValueSelected(n)?``:void 0,style:c,[Aa.tick]:``}})});get ticksPropsArr(){return _(this.#n)}set ticksPropsArr(e){g(this.#n,e)}#r=W(()=>this.ticksPropsArr.map((e,t)=>t));get ticksRenderArr(){return _(this.#r)}set ticksRenderArr(e){g(this.#r,e)}#i=W(()=>this.ticksPropsArr.map((e,t)=>({value:e[`data-value`],index:t})));get tickItemsArr(){return _(this.#i)}set tickItemsArr(e){g(this.#i,e)}#a=W(()=>[{value:this.opts.value.current,index:0}]);get thumbItemsArr(){return _(this.#a)}set thumbItemsArr(e){g(this.#a,e)}#o=W(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr,tickItems:this.tickItemsArr,thumbItems:this.thumbItemsArr}));get snippetProps(){return _(this.#o)}set snippetProps(e){g(this.#o,e)}},Pa=class extends Ma{opts;isMulti=!0;#e=N(null);get activeThumb(){return _(this.#e)}set activeThumb(e){g(this.#e,e,!0)}#t=N(0);get currentThumbIdx(){return _(this.#t)}set currentThumbIdx(e){g(this.#t,e,!0)}constructor(e){super(e),this.opts=e,Fi(()=>di(c(this.domContext.getDocument(),`pointerdown`,this.handlePointerDown),c(this.domContext.getDocument(),`pointerup`,this.handlePointerUp),c(this.domContext.getDocument(),`pointermove`,this.handlePointerMove),c(this.domContext.getDocument(),`pointerleave`,this.handlePointerUp))),Ei([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([e,t,n,r])=>{let i=Ea(e,t,n),a=e=>i.includes(e),o=e=>Da(e,i);r.some(e=>!a(e))&&(this.opts.value.current=r.map(o))})}isTickValueSelected=e=>this.opts.value.current.includes(e);isThumbActive(e){return this.isActive&&this.activeThumb?.idx===e}applyPosition({clientXY:e,activeThumbIdx:t,start:n,end:r}){let i=this.opts.min.current,a=this.opts.max.current,o=(e-n)/(r-n)*(a-i)+i;if(oa)this.updateValue(a,t);else{let e=this.normalizedSteps,n=Da(o,e);this.updateValue(n,t)}}#n=e=>{let t=this.getAllThumbs();if(!t.length)return;for(let e of t)e.blur();let n=t.map(t=>{if(this.opts.orientation.current===`horizontal`){let{left:n,right:r}=t.getBoundingClientRect();return Math.abs(e.clientX-(n+r)/2)}else{let{top:n,bottom:r}=t.getBoundingClientRect();return Math.abs(e.clientY-(n+r)/2)}}),r=t[n.indexOf(Math.min(...n))];return{node:r,idx:t.indexOf(r)}};handlePointerMove=e=>{if(!this.isActive||this.opts.disabled.current)return;e.preventDefault(),e.stopPropagation();let t=this.opts.ref.current,n=this.activeThumb;if(!t||!n)return;n.node.focus();let{left:r,right:i,top:a,bottom:o}=t.getBoundingClientRect(),s=this.direction;s===`lr`?this.applyPosition({clientXY:e.clientX,activeThumbIdx:n.idx,start:r,end:i}):s===`rl`?this.applyPosition({clientXY:e.clientX,activeThumbIdx:n.idx,start:i,end:r}):s===`bt`?this.applyPosition({clientXY:e.clientY,activeThumbIdx:n.idx,start:o,end:a}):s===`tb`&&this.applyPosition({clientXY:e.clientY,activeThumbIdx:n.idx,start:a,end:o})};handlePointerDown=e=>{if(e.button!==0||this.opts.disabled.current)return;let t=this.opts.ref.current,n=this.#n(e);if(!n||!t)return;let r=e.composedPath()[0]??e.target;!ua(r)||!t.contains(r)||(e.preventDefault(),this.activeThumb=n,n.node.focus(),this.isActive=!0,this.handlePointerMove(e))};handlePointerUp=()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(x(()=>this.opts.value.current)),this.isActive=!1)};getAllThumbs=()=>{let e=this.opts.ref.current;return e?Array.from(e.querySelectorAll(Aa.selector(`thumb`))):[]};updateValue=(e,t)=>{let n=this.opts.value.current;if(!n.length){this.opts.value.current.push(e);return}if(n[t]===e)return;let r=[...n];if(!ma(t,r))return;let i=r[t]>e?-1:1,a=()=>{let n=t+i;r[t]=r[n],r[n]=e;let a=this.getAllThumbs();a.length&&(a[n]?.focus(),this.activeThumb={node:a[n],idx:n})};if(this.opts.autoSort.current&&(i===-1&&er[t+1])){a(),this.opts.value.current=r;return}let o=this.normalizedSteps;r[t]=Da(e,o),this.opts.value.current=r};#r=W(()=>{let e=this.opts.value.current;return Array.from({length:e.length||1},(t,n)=>{let r=x(()=>this.currentThumbIdx);r{this.currentThumbIdx=r+1});let i=e[n],a=this.getPositionFromValue(i??0),o=xa(this.direction,a);return{role:`slider`,"aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":Ui(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,"data-orientation":this.opts.orientation.current,style:o,[Aa.thumb]:``}})});get thumbsPropsArr(){return _(this.#r)}set thumbsPropsArr(e){g(this.#r,e)}#i=W(()=>this.thumbsPropsArr.map((e,t)=>t));get thumbsRenderArr(){return _(this.#i)}set thumbsRenderArr(e){g(this.#i,e)}#a=W(()=>{let e=this.normalizedSteps,t=this.opts.value.current;return e.map((n,r)=>{let i=this.getPositionFromValue(n),a=r===0,o=r===e.length-1,s=a?0:o?-100:-50,c=Sa(this.direction,i,s),l=t.length===1?n<=t[0]:t[0]<=n&&n<=t[t.length-1];return{"data-disabled":Wi(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":l?``:void 0,"data-value":n,style:c,[Aa.tick]:``}})});get ticksPropsArr(){return _(this.#a)}set ticksPropsArr(e){g(this.#a,e)}#o=W(()=>this.ticksPropsArr.map((e,t)=>t));get ticksRenderArr(){return _(this.#o)}set ticksRenderArr(e){g(this.#o,e)}#s=W(()=>this.ticksPropsArr.map((e,t)=>({value:e[`data-value`],index:t})));get tickItemsArr(){return _(this.#s)}set tickItemsArr(e){g(this.#s,e)}#c=W(()=>this.opts.value.current.map((e,t)=>({value:e,index:t})));get thumbItemsArr(){return _(this.#c)}set thumbItemsArr(e){g(this.#c,e)}#l=W(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr,tickItems:this.tickItemsArr,thumbItems:this.thumbItemsArr}));get snippetProps(){return _(this.#l)}set snippetProps(e){g(this.#l,e)}},Fa=class{static create(e){let{type:t,...n}=e,r=t===`single`?new Na(n):new Pa(n);return ja.set(r)}},Ia=[Yi,Xi,Zi,Ji,Qi,`End`],La=class e{static create(t){return new e(t,ja.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref)}#e=W(()=>{if(Array.isArray(this.root.opts.value.current)){let e=this.root.opts.value.current.length>1?this.root.getPositionFromValue(Math.min(...this.root.opts.value.current)??0):0,t=100-this.root.getPositionFromValue(Math.max(...this.root.opts.value.current)??0);return{position:`absolute`,...ba(this.root.direction,e,t)}}else{let e=this.root.opts.trackPadding?.current,t=this.root.opts.value.current,n=this.root.opts.max.current,r=e!==void 0&&e>0&&t===n?0:100-this.root.getPositionFromValue(t);return{position:`absolute`,...ba(this.root.direction,0,r)}}});get rangeStyles(){return _(this.#e)}set rangeStyles(e){g(this.#e,e)}#t=W(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Wi(this.root.opts.disabled.current),style:this.rangeStyles,[Aa.range]:``,...this.attachment}));get props(){return _(this.#t)}set props(e){g(this.#t,e)}},Ra=class e{static create(t){return new e(t,ja.get())}opts;root;attachment;#e=W(()=>this.root.opts.disabled.current||this.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref),this.onkeydown=this.onkeydown.bind(this)}#t(e){this.root.isMulti?this.root.updateValue(e,this.opts.index.current):this.root.updateValue(e)}onkeydown(e){if(_(this.#e))return;let t=this.opts.ref.current;if(!t)return;let n=this.root.getAllThumbs();if(!n.length)return;let r=n.indexOf(t);if(this.root.isMulti&&(this.root.currentThumbIdx=r),!Ia.includes(e.key))return;e.preventDefault();let i=this.root.opts.min.current,a=this.root.opts.max.current,o=this.root.opts.value.current,s=Array.isArray(o)?o[r]:o,c=this.root.opts.orientation.current,l=this.root.direction,u=this.root.normalizedSteps;switch(e.key){case Qi:this.#t(i);break;case`End`:this.#t(a);break;case Yi:if(c!==`horizontal`)break;if(e.metaKey){let e=l===`rl`?a:i;this.#t(e)}else{let e=Oa(s,u,l===`rl`?`next`:`prev`);this.#t(e)}break;case Xi:if(c!==`horizontal`)break;if(e.metaKey){let e=l===`rl`?i:a;this.#t(e)}else{let e=Oa(s,u,l===`rl`?`prev`:`next`);this.#t(e)}break;case Zi:if(e.metaKey){let e=l===`tb`?i:a;this.#t(e)}else{let e=Oa(s,u,l===`tb`?`prev`:`next`);this.#t(e)}break;case Ji:if(e.metaKey){let e=l===`tb`?a:i;this.#t(e)}else{let e=Oa(s,u,l===`tb`?`next`:`prev`);this.#t(e)}break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}#n=W(()=>({...this.root.thumbsPropsArr[this.opts.index.current],id:this.opts.id.current,onkeydown:this.onkeydown,"data-active":this.root.isThumbActive(this.opts.index.current)?``:void 0,"data-disabled":Wi(this.opts.disabled.current||this.root.opts.disabled.current),tabindex:this.opts.disabled.current||this.root.opts.disabled.current?-1:0,...this.attachment}));get props(){return _(this.#n)}set props(e){g(this.#n,e)}},za=class e{static create(t){return new e(t,ja.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref)}#e=W(()=>({...this.root.ticksPropsArr[this.opts.index.current],id:this.opts.id.current,...this.attachment}));get props(){return _(this.#e)}set props(e){g(this.#e,e)}},Ba=class e{static create(t){return new e(t,ja.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref)}#e=W(()=>{let e=this.root.ticksPropsArr[this.opts.index.current],t=this.root.normalizedSteps[this.opts.index.current],n=this.root.getPositionFromValue(t),r=this.opts.position?.current??`top`,i=Ca(this.root.direction,n,r);return{id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Wi(this.root.opts.disabled.current),"data-bounded":e[`data-bounded`],"data-value":t,"data-selected":this.root.isTickValueSelected(t)?``:void 0,"data-position":r,style:i,[Aa[`tick-label`]]:``,...this.attachment}});get props(){return _(this.#e)}set props(e){g(this.#e,e)}},Va=I(``);function Ha(e,t){let n=ie();U(t,!0);let i=D(t,`id`,19,()=>pa(n)),a=D(t,`ref`,15,null),o=D(t,`value`,15),s=D(t,`onValueChange`,3,fa),c=D(t,`onValueCommit`,3,fa),u=D(t,`disabled`,3,!1),d=D(t,`step`,3,1),f=D(t,`dir`,3,`ltr`),p=D(t,`autoSort`,3,!0),h=D(t,`orientation`,3,`horizontal`),g=D(t,`thumbPositioning`,3,`contain`),b=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`,`type`,`onValueChange`,`onValueCommit`,`disabled`,`min`,`max`,`step`,`dir`,`autoSort`,`orientation`,`thumbPositioning`,`trackPadding`]),x=W(()=>t.min===void 0?Array.isArray(d())?Math.min(...d()):0:t.min),S=W(()=>t.max===void 0?Array.isArray(d())?Math.max(...d()):100:t.max);function C(){if(o()===void 0)return t.type===`single`?_(x):[]}C(),Ei.pre(()=>o(),()=>{C()});let w=Fa.create({id:$(()=>i()),ref:$(()=>a(),e=>a(e)),value:$(()=>o(),e=>{o(e),s()(e)}),onValueCommit:$(()=>c()),disabled:$(()=>u()),min:$(()=>_(x)),max:$(()=>_(S)),step:$(()=>d()),dir:$(()=>f()),autoSort:$(()=>p()),orientation:$(()=>h()),thumbPositioning:$(()=>g()),type:t.type,trackPadding:$(()=>t.trackPadding)}),T=W(()=>vi(b,w.props));var E=m(),O=l(E),k=e=>{var n=m(),i=l(n);{let e=W(()=>({props:_(T),...w.snippetProps}));v(i,()=>t.child,()=>_(e))}r(e,n)},A=e=>{var n=Va();j(n,()=>({..._(T)})),v(H(n),()=>t.children??V,()=>w.snippetProps),P(n),r(e,n)};y(O,e=>{t.child?e(k):e(A,-1)}),r(e,E),B()}var Ua=I(``);function Wa(e,t){let n=ie();U(t,!0);let i=D(t,`ref`,15,null),a=D(t,`id`,19,()=>pa(n)),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),s=La.create({id:$(()=>a()),ref:$(()=>i(),e=>i(e))}),c=W(()=>vi(o,s.props));var u=m(),d=l(u),f=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(c)})),r(e,n)},p=e=>{var n=Ua();j(n,()=>({..._(c)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(d,e=>{t.child?e(f):e(p,-1)}),r(e,u),B()}var Ga=I(``);function Ka(e,t){let n=ie();U(t,!0);let i=D(t,`ref`,15,null),a=D(t,`id`,19,()=>pa(n)),o=D(t,`disabled`,3,!1),s=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`index`,`disabled`]),c=Ra.create({id:$(()=>a()),ref:$(()=>i(),e=>i(e)),index:$(()=>t.index),disabled:$(()=>o())}),u=W(()=>vi(s,c.props));var d=m(),f=l(d),p=e=>{var n=m(),i=l(n);{let e=W(()=>({active:c.root.isThumbActive(c.opts.index.current),props:_(u)}));v(i,()=>t.child,()=>_(e))}r(e,n)},h=e=>{var n=Ga();j(n,()=>({..._(u)}));var i=H(n);{let e=W(()=>({active:c.root.isThumbActive(c.opts.index.current)}));v(i,()=>t.children??V,()=>_(e))}P(n),r(e,n)};y(f,e=>{t.child?e(p):e(h,-1)}),r(e,d),B()}var qa=I(``);function Ja(e,t){let n=ie();U(t,!0);let i=D(t,`ref`,15,null),a=D(t,`id`,19,()=>pa(n)),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`index`]),s=za.create({id:$(()=>a()),ref:$(()=>i(),e=>i(e)),index:$(()=>t.index)}),c=W(()=>vi(o,s.props));var u=m(),d=l(u),f=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(c)})),r(e,n)},p=e=>{var n=qa();j(n,()=>({..._(c)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(d,e=>{t.child?e(f):e(p,-1)}),r(e,u),B()}var Ya=I(``);function Xa(e,t){let n=ie();U(t,!0);let i=D(t,`ref`,15,null),a=D(t,`id`,19,()=>pa(n)),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`index`,`position`]),s=ja.get(),c=W(()=>{if(t.position!==void 0)return t.position;switch(s.direction){case`lr`:case`rl`:return`top`;case`tb`:case`bt`:return`left`}}),u=Ba.create({id:$(()=>a()),ref:$(()=>i(),e=>i(e)),index:$(()=>t.index),position:$(()=>_(c))}),d=W(()=>vi(o,u.props));var f=m(),p=l(f),h=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(d)})),r(e,n)},g=e=>{var n=Ya();j(n,()=>({..._(d)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(p,e=>{t.child?e(h):e(g,-1)}),r(e,f),B()}var Za=qi({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),Qa=new Si(`Tabs.Root`),$a=class e{static create(t){return Qa.set(new e(t))}opts;attachment;rovingFocusGroup;#e=N(C([]));get triggerIds(){return _(this.#e)}set triggerIds(e){g(this.#e,e,!0)}valueToTriggerId=new xi;valueToContentId=new xi;constructor(e){this.opts=e,this.attachment=Hi(e.ref),this.rovingFocusGroup=new da({candidateAttr:Za.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=W(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[Za.root]:``,...this.attachment}));get props(){return _(this.#t)}set props(e){g(this.#t,e)}},eo=class e{static create(t){return new e(t,Qa.get())}opts;root;attachment;#e=W(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref)}#t=W(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[Za.list]:``,"data-disabled":Wi(_(this.#e)),...this.attachment}));get props(){return _(this.#t)}set props(e){g(this.#t,e)}},to=class e{static create(t){return new e(t,Qa.get())}opts;root;attachment;#e=N(0);#t=W(()=>this.root.opts.value.current===this.opts.value.current);#n=W(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=W(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref),Ei([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),o(()=>{this.root.triggerIds.length,_(this.#t)||!this.root.opts.value.current?g(this.#e,0):g(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||_(this.#n)||this.#i()}onclick(e){_(this.#n)||this.#i()}onkeydown(e){if(!_(this.#n)){if(e.key===` `||e.key===`Enter`){e.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#a=W(()=>({id:this.opts.id.current,role:`tab`,"data-state":ro(_(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Wi(_(this.#n)),"aria-selected":Ui(_(this.#t)),"aria-controls":_(this.#r),[Za.trigger]:``,disabled:Gi(_(this.#n)),tabindex:_(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return _(this.#a)}set props(e){g(this.#a,e)}},no=class e{static create(t){return new e(t,Qa.get())}opts;root;attachment;#e=W(()=>this.root.opts.value.current===this.opts.value.current);#t=W(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Hi(e.ref),Ei([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=W(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:Gi(!_(this.#e)),tabindex:0,"data-value":this.opts.value.current,"data-state":ro(_(this.#e)),"aria-labelledby":_(this.#t),"data-orientation":this.root.opts.orientation.current,[Za.content]:``,...this.attachment}));get props(){return _(this.#n)}set props(e){g(this.#n,e)}};function ro(e){return e?`active`:`inactive`}var io=I(`
`);function ao(e,t){let n=ie();U(t,!0);let i=D(t,`id`,19,()=>pa(n)),a=D(t,`ref`,15,null),o=D(t,`value`,15,``),s=D(t,`onValueChange`,3,fa),c=D(t,`orientation`,3,`horizontal`),u=D(t,`loop`,3,!0),d=D(t,`activationMode`,3,`automatic`),f=D(t,`disabled`,3,!1),p=z(t,[`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),h=$a.create({id:$(()=>i()),value:$(()=>o(),e=>{o(e),s()(e)}),orientation:$(()=>c()),loop:$(()=>u()),activationMode:$(()=>d()),disabled:$(()=>f()),ref:$(()=>a(),e=>a(e))}),g=W(()=>vi(p,h.props));var b=m(),x=l(b),S=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(g)})),r(e,n)},C=e=>{var n=io();j(n,()=>({..._(g)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(x,e=>{t.child?e(S):e(C,-1)}),r(e,b),B()}var oo=I(`
`);function so(e,t){let n=ie();U(t,!0);let i=D(t,`id`,19,()=>pa(n)),a=D(t,`ref`,15,null),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`]),s=no.create({value:$(()=>t.value),id:$(()=>i()),ref:$(()=>a(),e=>a(e))}),c=W(()=>vi(o,s.props));var u=m(),d=l(u),f=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(c)})),r(e,n)},p=e=>{var n=oo();j(n,()=>({..._(c)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(d,e=>{t.child?e(f):e(p,-1)}),r(e,u),B()}var co=I(`
`);function lo(e,t){let n=ie();U(t,!0);let i=D(t,`id`,19,()=>pa(n)),a=D(t,`ref`,15,null),o=z(t,[`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),s=eo.create({id:$(()=>i()),ref:$(()=>a(),e=>a(e))}),c=W(()=>vi(o,s.props));var u=m(),d=l(u),f=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(c)})),r(e,n)},p=e=>{var n=co();j(n,()=>({..._(c)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(d,e=>{t.child?e(f):e(p,-1)}),r(e,u),B()}var uo=I(``);function fo(e,t){let n=ie();U(t,!0);let i=D(t,`disabled`,3,!1),a=D(t,`id`,19,()=>pa(n)),o=D(t,`type`,3,`button`),s=D(t,`ref`,15,null),c=z(t,[`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),u=to.create({id:$(()=>a()),disabled:$(()=>i()??!1),value:$(()=>t.value),ref:$(()=>s(),e=>s(e))}),d=W(()=>vi(c,u.props,{type:o()}));var f=m(),p=l(f),h=e=>{var n=m();v(l(n),()=>t.child,()=>({props:_(d)})),r(e,n)},g=e=>{var n=uo();j(n,()=>({..._(d)})),v(H(n),()=>t.children??V),P(n),r(e,n)};y(p,e=>{t.child?e(h):e(g,-1)}),r(e,f),B()}function po(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var a=m(),o=l(a);{let e=W(()=>Q(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));G(o,()=>va,(t,r)=>{r(t,ue({"data-slot":`label`,get class(){return _(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}r(e,a),B()}async function mo(e,t){let n=e.getReader(),r;for(;!(r=await n.read()).done;)t(r.value)}function ho(e){let t,n,r,i=!1;return function(a){t===void 0?(t=a,n=0,r=-1):t=_o(t,a);let o=t.length,s=0;for(;n0){let n=i.decode(a.subarray(0,o)),s=o+(a[o+1]===32?2:1),c=i.decode(a.subarray(s));switch(n){case`data`:r.data=r.data?r.data+` +`+c:c;break;case`event`:r.event=c;break;case`id`:e(r.id=c);break;case`retry`:let n=parseInt(c,10);isNaN(n)||t(r.retry=n);break}}}}function _o(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function vo(){return{data:``,event:``,id:``,retry:void 0}}var yo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i{let f=Object.assign({},r);f.accept||=bo;let p;function m(){p.abort(),document.hidden||b()}c||document.addEventListener(`visibilitychange`,m);let h=xo,g=0;function _(){document.removeEventListener(`visibilitychange`,m),window.clearTimeout(g),p.abort()}n?.addEventListener(`abort`,()=>{_(),t()});let v=l??window.fetch,y=i??wo;async function b(){p=new AbortController;try{let n=await v(e,Object.assign(Object.assign({},u),{headers:f,signal:p.signal}));await y(n),await mo(n.body,ho(go(e=>{e?f[So]=e:delete f[So]},e=>{h=e},a))),o?.(),_(),t()}catch(e){if(!p.signal.aborted)try{let t=s?.(e)??h;window.clearTimeout(g),g=window.setTimeout(b,t)}catch(e){_(),d(e)}}}b()})}function wo(e){let t=e.headers.get(`content-type`);if(!t?.startsWith(`text/event-stream`))throw Error(`Expected content-type to be ${bo}, Actual: ${t}`)}var To=class{#e=N(``);get name(){return _(this.#e)}set name(e){g(this.#e,e,!0)}#t=N(0);get age(){return _(this.#t)}set age(e){g(this.#t,e,!0)}#n=N(C({}));get options(){return _(this.#n)}set options(e){g(this.#n,e,!0)}#r=N();get info(){return _(this.#r)}set info(e){g(this.#r,e,!0)}#i=N();get encoded(){return _(this.#i)}set encoded(e){g(this.#i,e,!0)}#a=N();get decoded(){return _(this.#a)}set decoded(e){g(this.#a,e,!0)}#o=N();get bridge_guide(){return _(this.#o)}set bridge_guide(e){g(this.#o,e,!0)}#s=N(C([]));get ddim(){return _(this.#s)}set ddim(e){g(this.#s,e,!0)}current=0;stages=[`encoded/0`,`bridge_guide/0`,...Array.from({length:6},(e,t)=>`ddim/${t}`),`decoded/0`];constructor(e,t,n){this.name=e,this.age=t,this.options=n,this.fetch()}async fetch(){await Co(`/api/stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:this.name,age:this.age,...this.options}),onmessage:e=>{let t=JSON.parse(e.data);switch(e.event){case`info`:this.info=t;break;case`encoded`:this.encoded={tensor:t.guide[0],ids:t.names_ids[0]};break;case`ddim.init_noise`:this.bridge_guide=t.guide_encoded[0],this.ddim.push({x:t.x[0]});break;case`ddim.step`:this.ddim.push({x:t.x[0]});break;case`decoded`:this.decoded={result:t.result[0],ids:t.names_ids[0]};break;default:break}},onerror(e){throw console.error(`SSE error:`,e),e}})}#c=W(()=>{let e=[];for(let t=0;ti){e.push({name:n,i,stage:this[n][i]});continue}}else{e.push({name:n,i,stage:this[n]});continue}break}return e});get loadedStages(){return _(this.#c)}set loadedStages(e){g(this.#c,e)}},Eo={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Do=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Oo=Symbol(`lucide-context`),ko=()=>F(Oo),Ao=t(``);function jo(e,t){U(t,!0);let i=ko()??{},a=D(t,`color`,19,()=>i.color??`currentColor`),o=D(t,`size`,19,()=>i.size??24),s=D(t,`strokeWidth`,19,()=>i.strokeWidth??2),c=D(t,`absoluteStrokeWidth`,19,()=>i.absoluteStrokeWidth??!1),u=D(t,`iconNode`,19,()=>[]),d=z(t,[`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),f=W(()=>c()?Number(s())*24/Number(o()):s());var p=Ao();j(p,e=>({...Eo,...e,...d,width:o(),height:o(),stroke:a(),"stroke-width":_(f),class:[`lucide-icon lucide`,i.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Do(d)&&{"aria-hidden":`true`}]);var h=H(p);n(h,17,u,pe,(e,t)=>{var n=W(()=>oe(_(t),2));let i=()=>_(n)[0],a=()=>_(n)[1];var o=m();k(l(o),i,!0,(e,t)=>{j(e,()=>({...a()}))}),r(e,o)}),v(w(h),()=>t.children??V),P(p),r(e,p),B()}function Mo(e,t){let n=z(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M4 10a8 8 0 1 1 8 8H4`}],[`path`,{d:`m8 22-4-4 4-4`}]];jo(e,ue({name:`iteration-cw`},()=>n,{get iconNode(){return r}}))}function No(e,t){let n=z(t,[`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m5 8 6 6`}],[`path`,{d:`m4 14 6-6 2-3`}],[`path`,{d:`M2 5h12`}],[`path`,{d:`M7 2h1`}],[`path`,{d:`m22 22-5-10-5 10`}],[`path`,{d:`M14 18h6`}]];jo(e,ue({name:`languages`},()=>n,{get iconNode(){return r}}))}var Po=I(` `,1),Fo=I(` `,1);function Io(e,t){U(t,!0);let a=D(t,`ref`,15,null),o=D(t,`value`,15),s=D(t,`orientation`,3,`horizontal`),c=D(t,`tick`,3,!1),u=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`orientation`,`class`,`tick`]);var d=m(),p=l(d);{let e=(e,t)=>{let a=()=>t?.().thumbItems,o=()=>t?.().tickItems;var u=Fo(),d=l(u),p=H(d);{let e=W(()=>Q(`absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full`));G(p,()=>Wa,(t,n)=>{n(t,{"data-slot":`slider-range`,get class(){return _(e)}})})}P(d);var h=w(d,2);n(h,17,a,e=>e.index,(e,t)=>{var n=m();G(l(n),()=>Ka,(e,n)=>{n(e,{"data-slot":`slider-thumb`,get index(){return _(t).index},class:`block size-4 shrink-0 rounded-2xl bg-white shadow-md ring-1 ring-black/10 transition-[color,box-shadow] duration-200 select-none not-dark:bg-clip-padding hover:ring-4 hover:ring-ring/30 focus-visible:ring-4 focus-visible:ring-ring/30 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`})}),r(e,n)}),n(w(h,2),17,o,({index:e,value:t})=>e,(e,t,n,a)=>{let o=()=>_(t).index,s=()=>_(t).value;var u=m(),d=l(u),p=e=>{var t=Po(),n=l(t);G(n,()=>Ja,(e,t)=>{t(e,{get index(){return o()},class:`z-1 h-2 w-px bg-background dark:bg-background/20`})}),G(w(n,2),()=>Xa,(e,t)=>{t(e,{get index(){return o()},class:`mb-5 text-sm leading-none font-medium text-muted-foreground data-bounded:text-foreground`,position:`top`,children:(e,t)=>{M();var n=f();S(()=>i(n,s())),r(e,n)},$$slots:{default:!0}})}),r(e,t)},h=W(()=>typeof c()==`boolean`?c():c()({index:o(),value:s()}));y(d,e=>{_(h)&&e(p)}),r(e,u)}),S(e=>{ce(d,`data-orientation`,s()),ne(d,1,e)},[()=>E(Q(`relative grow overflow-hidden rounded-2xl bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1`))]),r(e,u)},d=W(()=>Q(`relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col`,t.class));G(p,()=>Ha,(t,n)=>{n(t,ue({"data-slot":`slider`,get orientation(){return s()},get class(){return _(d)}},()=>u,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)},children:e,$$slots:{default:!0}}))})}r(e,d),B()}function Lo(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=D(t,`value`,15,``),a=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);var o=m(),s=l(o);{let e=W(()=>Q(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,t.class));G(s,()=>ao,(t,r)=>{r(t,ue({"data-slot":`tabs`,get class(){return _(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get value(){return i()},set value(e){i(e)}}))})}r(e,o),B()}function Ro(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var a=m(),o=l(a);{let e=W(()=>Q(`text-sm flex-1 outline-none`,t.class));G(o,()=>so,(t,r)=>{r(t,ue({"data-slot":`tabs-content`,get class(){return _(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}r(e,a),B()}var zo=$n({base:`rounded-2xl p-[3px] group-data-horizontal/tabs:h-8 group-data-vertical/tabs:p-1 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,variants:{variant:{default:`cn-tabs-list-variant-default bg-muted`,line:`cn-tabs-list-variant-line gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Bo(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=D(t,`variant`,3,`default`),a=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);var o=m(),s=l(o);{let e=W(()=>Q(zo({variant:i()}),t.class));G(s,()=>lo,(t,r)=>{r(t,ue({"data-slot":`tabs-list`,get"data-variant"(){return i()},get class(){return _(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)}}))})}r(e,o),B()}function Vo(e,t){U(t,!0);let n=D(t,`ref`,15,null),i=z(t,[`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);var a=m(),o=l(a);{let e=W(()=>Q(`gap-1.5 rounded-2xl border border-transparent! px-1.5 py-0.5 text-sm font-medium group-data-vertical/tabs:px-3 group-data-vertical/tabs:py-0.5 [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground`,`after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,t.class));G(o,()=>fo,(t,r)=>{r(t,ue({"data-slot":`tabs-trigger`,get class(){return _(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}r(e,a),B()}var Ho=I(` `,1),Uo=I(` `,1),Wo=I(` `,1),Go=I(` `,1),Ko=I(`
`,1),qo=I(` `,1),Jo=I(` `,1),Yo=I(`
`,1),Xo=I(` `,1),Zo=I(`
`,1),Qo=I(` `,1),$o=I(`
`,1),es=I(` `,1),ts=I(` `,1),ns=I(` `,1),rs=I(` `,1),is=I(` `,1),as=I(` `,1),os=I(`
`);function ss(e,t){U(t,!0);let n=(e,t=V)=>{var n=m(),i=l(n),a=e=>{rr(e,{size:`icon-xs`,variant:`ghost`,onclick:()=>h[t()]=p[t()],children:(e,t)=>{Mo(e,{})},$$slots:{default:!0}})};y(i,e=>{h[t()]!==p[t()]&&e(a)}),r(e,n)},a=N(``),s=W(()=>Ke(_(a))),c=N(void 0),u=N(C([0,10])),d=N(C([0,10])),p={sampling_mode:`sample`,temperature:.8,top_k:20,top_p:.9,seed:void 0},h=C({...p});function v(e){g(d,[e,e+10],!0)}o(()=>{let e=_(d)[1]-_(d)[0];if(e>=20){let t=(Math.floor(e/10)-1)*10;console.log(_(d)[0],_(d)[1],t),_(d)[0]==_(u)[0]?v(_(d)[0]+t):v(_(d)[0]-t)}else e===0&&(_(d)[0]===0?g(d,[0,10],!0):_(d)[0]===9?g(d,[90,100],!0):_(d)[0]==_(u)[0]?v(_(d)[0]+10):v(_(d)[0]-10));g(u,_(d),!0)});function b(){let e=_(a).trim();e&&g(c,new To(e,Math.floor(_(d)[0]/10),h),!0)}var x=os(),T=H(x);G(T,()=>ar,(e,t)=>{t(e,{class:`z-10 h-screen w-80 shrink-0 rounded-none border-r shadow-none`,size:`sm`,children:(e,t)=>{var o=as(),c=l(o);G(c,()=>pr,(e,t)=>{t(e,{children:(e,t)=>{var n=Ho(),i=l(n);G(i,()=>hr,(e,t)=>{t(e,{children:(e,t)=>{M(),r(e,f(`ì´ë¦„ ìƒì„±ê¸°`))},$$slots:{default:!0}})}),G(w(i,2),()=>lr,(e,t)=>{t(e,{children:(e,t)=>{M(),r(e,f(`ì¸ì½”딩, 확산, 디코딩 ê³¼ì •ì„ ì‹œê°í™”합니다.`))},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})});var u=w(c,2);G(u,()=>sr,(e,t)=>{t(e,{class:`flex flex-col gap-2`,children:(e,t)=>{var o=is(),c=l(o);G(c,()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var n=Go(),o=l(n);{let e=W(()=>_(s)===`hiragana`?`ã²ã‚‰ãŒãª`:`ì´ë¦„`);G(o,()=>wr,(t,n)=>{n(t,{id:`name`,get placeholder(){return _(e)},onkeydown:e=>{e.key===`Enter`&&b()},get value(){return _(a)},set value(e){g(a,e,!0)}})})}G(w(o,2),()=>br,(e,t)=>{t(e,{align:`block-start`,children:(e,t)=>{var n=Wo(),a=l(n);G(a,()=>po,(e,t)=>{t(e,{for:`name`,class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`ì´ë¦„`))},$$slots:{default:!0}})}),G(w(a,2),()=>po,(e,t)=>{t(e,{for:`name`,class:`ms-auto`,children:(e,t)=>{var n=Uo(),a=l(n);No(a,{size:14});var o=w(a);S(()=>i(o,` ${_(s)===`hangul`?`Korean`:`Japanese`}`)),r(e,n)},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})});var u=w(c,2);G(u,()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var n=Ko(),i=l(n);Io(H(i),{type:`multiple`,min:0,max:100,step:10,tick:!0,get value(){return _(d)},set value(e){g(d,e,!0)}}),P(i),G(w(i,2),()=>br,(e,t)=>{t(e,{align:`block-start`,children:(e,t)=>{var n=m();G(l(n),()=>po,(e,t)=>{t(e,{for:`age`,class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`연령대`))},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})});var p=w(u,2);G(p,()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var n=qo(),i=l(n);G(i,()=>wr,(e,t)=>{t(e,{id:`seed`,placeholder:`-1`,type:`number`,get value(){return h.seed},set value(e){h.seed=e}})}),G(w(i,2),()=>br,(e,t)=>{t(e,{align:`block-start`,children:(e,t)=>{var n=m();G(l(n),()=>po,(e,t)=>{t(e,{for:`seed`,class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`시드`))},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),G(w(p,2),()=>Lo,(e,t)=>{t(e,{get value(){return h.sampling_mode},set value(e){h.sampling_mode=e},children:(e,t)=>{var a=m();G(l(a),()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var a=rs(),o=l(a);G(o,()=>Ro,(e,t)=>{t(e,{value:`sample`,class:`w-full`,children:(e,t)=>{var a=es(),o=l(a);G(o,()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var a=Yo(),o=l(a);Io(H(o),{type:`single`,min:.1,max:2,step:.05,tick:({value:e})=>e===.1||e%.5==0,get value(){return h.temperature},set value(e){h.temperature=e}}),P(o),G(w(o,2),()=>br,(e,t)=>{t(e,{align:`block-start`,class:`h-6`,children:(e,t)=>{var a=Jo(),o=l(a);G(o,()=>po,(e,t)=>{t(e,{class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`Temperature`))},$$slots:{default:!0}})});var s=w(o,2);G(s,()=>po,(e,t)=>{t(e,{for:`name`,class:`ms-auto`,children:(e,t)=>{M();var n=f();S(()=>i(n,h.temperature)),r(e,n)},$$slots:{default:!0}})}),n(w(s,2),()=>`temperature`),r(e,a)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})});var s=w(o,2);G(s,()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var a=Zo(),o=l(a);Io(H(o),{type:`single`,min:1,max:100,step:1,tick:({value:e})=>e===1||e%10==0,get value(){return h.top_k},set value(e){h.top_k=e}}),P(o),G(w(o,2),()=>br,(e,t)=>{t(e,{align:`block-start`,class:`h-6`,children:(e,t)=>{var a=Xo(),o=l(a);G(o,()=>po,(e,t)=>{t(e,{class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`Top-K`))},$$slots:{default:!0}})});var s=w(o,2);G(s,()=>po,(e,t)=>{t(e,{for:`name`,class:`ms-auto`,children:(e,t)=>{M();var n=f();S(()=>i(n,h.top_k)),r(e,n)},$$slots:{default:!0}})}),n(w(s,2),()=>`top_k`),r(e,a)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})}),G(w(s,2),()=>_r,(e,t)=>{t(e,{children:(e,t)=>{var a=$o(),o=l(a);Io(H(o),{type:`single`,min:.1,max:1,step:.01,tick:({value:e})=>e===1||String(e).length===3,get value(){return h.top_p},set value(e){h.top_p=e}}),P(o),G(w(o,2),()=>br,(e,t)=>{t(e,{align:`block-start`,class:`h-6`,children:(e,t)=>{var a=Qo(),o=l(a);G(o,()=>po,(e,t)=>{t(e,{class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`Top-P`))},$$slots:{default:!0}})});var s=w(o,2);G(s,()=>po,(e,t)=>{t(e,{for:`name`,class:`ms-auto`,children:(e,t)=>{M();var n=f();S(()=>i(n,h.top_p)),r(e,n)},$$slots:{default:!0}})}),n(w(s,2),()=>`top_p`),r(e,a)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})});var s=w(o,2);G(s,()=>Ro,(e,t)=>{t(e,{value:`greedy`})}),G(w(s,2),()=>br,(e,t)=>{t(e,{align:`block-start`,children:(e,t)=>{var n=ns(),i=l(n);G(i,()=>po,(e,t)=>{t(e,{for:`sampling`,class:`text-foreground`,children:(e,t)=>{M(),r(e,f(`샘플ë§`))},$$slots:{default:!0}})}),G(w(i,2),()=>Bo,(e,t)=>{t(e,{class:`ms-auto`,children:(e,t)=>{var n=ts(),i=l(n);G(i,()=>Vo,(e,t)=>{t(e,{value:`sample`,children:(e,t)=>{M(),r(e,f(`Sample`))},$$slots:{default:!0}})}),G(w(i,2),()=>Vo,(e,t)=>{t(e,{value:`greedy`,children:(e,t)=>{M(),r(e,f(`Greedy`))},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),r(e,n)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})}),r(e,a)},$$slots:{default:!0}})}),r(e,o)},$$slots:{default:!0}})}),G(w(u,2),()=>dr,(e,t)=>{t(e,{children:(e,t)=>{{let t=W(()=>!_(a).trim());rr(e,{class:`w-full`,get disabled(){return _(t)},onclick:b,children:(e,t)=>{M(),r(e,f(`Generate`))},$$slots:{default:!0}})}},$$slots:{default:!0}})}),r(e,o)},$$slots:{default:!0}})}),rt(w(T,2),{get name(){return _(a)},get language(){return _(s)},get api(){return _(c)}}),P(x),r(e,x),B()}export{ss as component}; \ No newline at end of file diff --git a/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.br b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.br new file mode 100644 index 0000000000000000000000000000000000000000..fef0963764a6a27df8baa9a212d6c1de1a0ac437 Binary files /dev/null and b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.br differ diff --git a/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.gz b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.gz new file mode 100644 index 0000000000000000000000000000000000000000..5dad89281179c35a478fa003b611acdee94ec29f Binary files /dev/null and b/frontend/client/_app/immutable/nodes/2.BTNl2Bsv.js.gz differ diff --git a/frontend/client/_app/version.json b/frontend/client/_app/version.json new file mode 100644 index 0000000000000000000000000000000000000000..241f48147b41eed589e6874ab830e9e707b35e79 --- /dev/null +++ b/frontend/client/_app/version.json @@ -0,0 +1 @@ +{"version":"1780234183272"} \ No newline at end of file diff --git a/frontend/client/_app/version.json.br b/frontend/client/_app/version.json.br new file mode 100644 index 0000000000000000000000000000000000000000..1d60473f8653fb0ece173163cfee61c06e9f3b70 Binary files /dev/null and b/frontend/client/_app/version.json.br differ diff --git a/frontend/client/_app/version.json.gz b/frontend/client/_app/version.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..43b54957cafc2b430da1825919355b0c005aaf08 Binary files /dev/null and b/frontend/client/_app/version.json.gz differ diff --git a/frontend/client/robots.txt b/frontend/client/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..1f53798bb4fe33c86020be7f10c44f29486fd190 --- /dev/null +++ b/frontend/client/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/frontend/client/robots.txt.br b/frontend/client/robots.txt.br new file mode 100644 index 0000000000000000000000000000000000000000..133f0fe0c2bb351914feda2262a54dd367d68c3d --- /dev/null +++ b/frontend/client/robots.txt.br @@ -0,0 +1,3 @@ +‹ €User-agent: * +Disallow: / + \ No newline at end of file diff --git a/frontend/client/robots.txt.gz b/frontend/client/robots.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..51d90f9ab69a97bbab25d8809679f0dd7c58cb27 Binary files /dev/null and b/frontend/client/robots.txt.gz differ diff --git a/frontend/env.js b/frontend/env.js new file mode 100644 index 0000000000000000000000000000000000000000..f69f5c0e6b92b6b07b318c22a66179e7d0979963 --- /dev/null +++ b/frontend/env.js @@ -0,0 +1,94 @@ +import process from 'node:process'; + +/* global "" */ + +const expected = new Set([ + 'SOCKET_PATH', + 'HOST', + 'PORT', + 'ORIGIN', + 'XFF_DEPTH', + 'ADDRESS_HEADER', + 'PROTOCOL_HEADER', + 'HOST_HEADER', + 'PORT_HEADER', + 'BODY_SIZE_LIMIT', + 'SHUTDOWN_TIMEOUT', + 'IDLE_TIMEOUT', + 'KEEP_ALIVE_TIMEOUT', + 'HEADERS_TIMEOUT' +]); + +const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']); + +if ("") { + for (const name in process.env) { + if (name.startsWith("")) { + const unprefixed = name.slice("".length); + if (!expected.has(unprefixed)) { + throw new Error( + `You should change envPrefix (${""}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}` + ); + } + } + } +} + +/** + * @param {string} name + * @param {any} fallback + */ +function env(name, fallback) { + const prefix = expected_unprefixed.has(name) ? '' : ""; + const prefixed = prefix + name; + return prefixed in process.env ? process.env[prefixed] : fallback; +} + +const integer_regexp = /^\d+$/; + +/** + * Throw a consistently-structured parsing error for environment variables. + * @param {string} name + * @param {any} value + * @param {string} description + * @returns {never} + */ +function parsing_error(name, value, description) { + throw new Error( + `Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})` + ); +} + +/** + * Check the environment for a timeout value (non-negative integer) in seconds. + * @param {string} name + * @param {number} [fallback] + * @returns {number | undefined} + */ +function timeout_env(name, fallback) { + const raw = env(name, fallback); + if (!raw) { + return fallback; + } + + if (!integer_regexp.test(raw)) { + parsing_error(name, raw, 'should be a non-negative integer'); + } + + const parsed = Number.parseInt(raw, 10); + + // We don't technically need to check `Number.isNaN` because the value already passed the regexp test. + // However, just in case there's some new codepath introduced somewhere down the line, it's probably good + // to stick this in here. + if (Number.isNaN(parsed)) { + parsing_error(name, raw, 'should be a non-negative integer'); + } + + if (parsed < 0) { + parsing_error(name, raw, 'should be a non-negative integer'); + } + + return parsed; +} + +export { env, timeout_env }; diff --git a/frontend/handler.js b/frontend/handler.js new file mode 100644 index 0000000000000000000000000000000000000000..013c685e4f8fdd951804da6e6c80addfd10f0e4d --- /dev/null +++ b/frontend/handler.js @@ -0,0 +1,1494 @@ +import './shims.js'; +import * as fs from 'node:fs'; +import fs__default, { readdirSync, statSync, createReadStream } from 'node:fs'; +import path, { resolve, join, sep, normalize } from 'node:path'; +import process from 'node:process'; +import * as qs from 'node:querystring'; +import { fileURLToPath } from 'node:url'; +import { Readable } from 'node:stream'; +import { Server } from './server/index.js'; +import { manifest, prerendered, base } from './server/manifest.js'; +import { env } from './env.js'; + +function totalist(dir, callback, pre='') { + dir = resolve('.', dir); + let arr = readdirSync(dir); + let i=0, abs, stats; + for (; i < arr.length; i++) { + abs = join(dir, arr[i]); + stats = statSync(abs); + stats.isDirectory() + ? totalist(abs, callback, join(pre, arr[i])) + : callback(join(pre, arr[i]), abs, stats); + } +} + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query; + + if (raw.length > 1) { + let idx = raw.indexOf('?', 1); + + if (idx !== -1) { + search = raw.substring(idx); + pathname = raw.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, raw }; +} + +const mimes = { + "3g2": "video/3gpp2", + "3gp": "video/3gpp", + "3gpp": "video/3gpp", + "3mf": "model/3mf", + "aac": "audio/aac", + "ac": "application/pkix-attr-cert", + "adp": "audio/adpcm", + "adts": "audio/aac", + "ai": "application/postscript", + "aml": "application/automationml-aml+xml", + "amlx": "application/automationml-amlx+zip", + "amr": "audio/amr", + "apng": "image/apng", + "appcache": "text/cache-manifest", + "appinstaller": "application/appinstaller", + "appx": "application/appx", + "appxbundle": "application/appxbundle", + "asc": "application/pgp-keys", + "atom": "application/atom+xml", + "atomcat": "application/atomcat+xml", + "atomdeleted": "application/atomdeleted+xml", + "atomsvc": "application/atomsvc+xml", + "au": "audio/basic", + "avci": "image/avci", + "avcs": "image/avcs", + "avif": "image/avif", + "aw": "application/applixware", + "bdoc": "application/bdoc", + "bin": "application/octet-stream", + "bmp": "image/bmp", + "bpk": "application/octet-stream", + "btf": "image/prs.btif", + "btif": "image/prs.btif", + "buffer": "application/octet-stream", + "ccxml": "application/ccxml+xml", + "cdfx": "application/cdfx+xml", + "cdmia": "application/cdmi-capability", + "cdmic": "application/cdmi-container", + "cdmid": "application/cdmi-domain", + "cdmio": "application/cdmi-object", + "cdmiq": "application/cdmi-queue", + "cer": "application/pkix-cert", + "cgm": "image/cgm", + "cjs": "application/node", + "class": "application/java-vm", + "coffee": "text/coffeescript", + "conf": "text/plain", + "cpl": "application/cpl+xml", + "cpt": "application/mac-compactpro", + "crl": "application/pkix-crl", + "css": "text/css", + "csv": "text/csv", + "cu": "application/cu-seeme", + "cwl": "application/cwl", + "cww": "application/prs.cww", + "davmount": "application/davmount+xml", + "dbk": "application/docbook+xml", + "deb": "application/octet-stream", + "def": "text/plain", + "deploy": "application/octet-stream", + "dib": "image/bmp", + "disposition-notification": "message/disposition-notification", + "dist": "application/octet-stream", + "distz": "application/octet-stream", + "dll": "application/octet-stream", + "dmg": "application/octet-stream", + "dms": "application/octet-stream", + "doc": "application/msword", + "dot": "application/msword", + "dpx": "image/dpx", + "drle": "image/dicom-rle", + "dsc": "text/prs.lines.tag", + "dssc": "application/dssc+der", + "dtd": "application/xml-dtd", + "dump": "application/octet-stream", + "dwd": "application/atsc-dwd+xml", + "ear": "application/java-archive", + "ecma": "application/ecmascript", + "elc": "application/octet-stream", + "emf": "image/emf", + "eml": "message/rfc822", + "emma": "application/emma+xml", + "emotionml": "application/emotionml+xml", + "eps": "application/postscript", + "epub": "application/epub+zip", + "exe": "application/octet-stream", + "exi": "application/exi", + "exp": "application/express", + "exr": "image/aces", + "ez": "application/andrew-inset", + "fdf": "application/fdf", + "fdt": "application/fdt+xml", + "fits": "image/fits", + "g3": "image/g3fax", + "gbr": "application/rpki-ghostbusters", + "geojson": "application/geo+json", + "gif": "image/gif", + "glb": "model/gltf-binary", + "gltf": "model/gltf+json", + "gml": "application/gml+xml", + "gpx": "application/gpx+xml", + "gram": "application/srgs", + "grxml": "application/srgs+xml", + "gxf": "application/gxf", + "gz": "application/gzip", + "h261": "video/h261", + "h263": "video/h263", + "h264": "video/h264", + "heic": "image/heic", + "heics": "image/heic-sequence", + "heif": "image/heif", + "heifs": "image/heif-sequence", + "hej2": "image/hej2k", + "held": "application/atsc-held+xml", + "hjson": "application/hjson", + "hlp": "application/winhlp", + "hqx": "application/mac-binhex40", + "hsj2": "image/hsj2", + "htm": "text/html", + "html": "text/html", + "ics": "text/calendar", + "ief": "image/ief", + "ifb": "text/calendar", + "iges": "model/iges", + "igs": "model/iges", + "img": "application/octet-stream", + "in": "text/plain", + "ini": "text/plain", + "ink": "application/inkml+xml", + "inkml": "application/inkml+xml", + "ipfix": "application/ipfix", + "iso": "application/octet-stream", + "its": "application/its+xml", + "jade": "text/jade", + "jar": "application/java-archive", + "jhc": "image/jphc", + "jls": "image/jls", + "jp2": "image/jp2", + "jpe": "image/jpeg", + "jpeg": "image/jpeg", + "jpf": "image/jpx", + "jpg": "image/jpeg", + "jpg2": "image/jp2", + "jpgm": "image/jpm", + "jpgv": "video/jpeg", + "jph": "image/jph", + "jpm": "image/jpm", + "jpx": "image/jpx", + "js": "text/javascript", + "json": "application/json", + "json5": "application/json5", + "jsonld": "application/ld+json", + "jsonml": "application/jsonml+json", + "jsx": "text/jsx", + "jt": "model/jt", + "jxr": "image/jxr", + "jxra": "image/jxra", + "jxrs": "image/jxrs", + "jxs": "image/jxs", + "jxsc": "image/jxsc", + "jxsi": "image/jxsi", + "jxss": "image/jxss", + "kar": "audio/midi", + "ktx": "image/ktx", + "ktx2": "image/ktx2", + "less": "text/less", + "lgr": "application/lgr+xml", + "list": "text/plain", + "litcoffee": "text/coffeescript", + "log": "text/plain", + "lostxml": "application/lost+xml", + "lrf": "application/octet-stream", + "m1v": "video/mpeg", + "m21": "application/mp21", + "m2a": "audio/mpeg", + "m2v": "video/mpeg", + "m3a": "audio/mpeg", + "m4a": "audio/mp4", + "m4p": "application/mp4", + "m4s": "video/iso.segment", + "ma": "application/mathematica", + "mads": "application/mads+xml", + "maei": "application/mmt-aei+xml", + "man": "text/troff", + "manifest": "text/cache-manifest", + "map": "application/json", + "mar": "application/octet-stream", + "markdown": "text/markdown", + "mathml": "application/mathml+xml", + "mb": "application/mathematica", + "mbox": "application/mbox", + "md": "text/markdown", + "mdx": "text/mdx", + "me": "text/troff", + "mesh": "model/mesh", + "meta4": "application/metalink4+xml", + "metalink": "application/metalink+xml", + "mets": "application/mets+xml", + "mft": "application/rpki-manifest", + "mid": "audio/midi", + "midi": "audio/midi", + "mime": "message/rfc822", + "mj2": "video/mj2", + "mjp2": "video/mj2", + "mjs": "text/javascript", + "mml": "text/mathml", + "mods": "application/mods+xml", + "mov": "video/quicktime", + "mp2": "audio/mpeg", + "mp21": "application/mp21", + "mp2a": "audio/mpeg", + "mp3": "audio/mpeg", + "mp4": "video/mp4", + "mp4a": "audio/mp4", + "mp4s": "application/mp4", + "mp4v": "video/mp4", + "mpd": "application/dash+xml", + "mpe": "video/mpeg", + "mpeg": "video/mpeg", + "mpf": "application/media-policy-dataset+xml", + "mpg": "video/mpeg", + "mpg4": "video/mp4", + "mpga": "audio/mpeg", + "mpp": "application/dash-patch+xml", + "mrc": "application/marc", + "mrcx": "application/marcxml+xml", + "ms": "text/troff", + "mscml": "application/mediaservercontrol+xml", + "msh": "model/mesh", + "msi": "application/octet-stream", + "msix": "application/msix", + "msixbundle": "application/msixbundle", + "msm": "application/octet-stream", + "msp": "application/octet-stream", + "mtl": "model/mtl", + "musd": "application/mmt-usd+xml", + "mxf": "application/mxf", + "mxmf": "audio/mobile-xmf", + "mxml": "application/xv+xml", + "n3": "text/n3", + "nb": "application/mathematica", + "nq": "application/n-quads", + "nt": "application/n-triples", + "obj": "model/obj", + "oda": "application/oda", + "oga": "audio/ogg", + "ogg": "audio/ogg", + "ogv": "video/ogg", + "ogx": "application/ogg", + "omdoc": "application/omdoc+xml", + "onepkg": "application/onenote", + "onetmp": "application/onenote", + "onetoc": "application/onenote", + "onetoc2": "application/onenote", + "opf": "application/oebps-package+xml", + "opus": "audio/ogg", + "otf": "font/otf", + "owl": "application/rdf+xml", + "oxps": "application/oxps", + "p10": "application/pkcs10", + "p7c": "application/pkcs7-mime", + "p7m": "application/pkcs7-mime", + "p7s": "application/pkcs7-signature", + "p8": "application/pkcs8", + "pdf": "application/pdf", + "pfr": "application/font-tdpfr", + "pgp": "application/pgp-encrypted", + "pkg": "application/octet-stream", + "pki": "application/pkixcmp", + "pkipath": "application/pkix-pkipath", + "pls": "application/pls+xml", + "png": "image/png", + "prc": "model/prc", + "prf": "application/pics-rules", + "provx": "application/provenance+xml", + "ps": "application/postscript", + "pskcxml": "application/pskc+xml", + "pti": "image/prs.pti", + "qt": "video/quicktime", + "raml": "application/raml+yaml", + "rapd": "application/route-apd+xml", + "rdf": "application/rdf+xml", + "relo": "application/p2p-overlay+xml", + "rif": "application/reginfo+xml", + "rl": "application/resource-lists+xml", + "rld": "application/resource-lists-diff+xml", + "rmi": "audio/midi", + "rnc": "application/relax-ng-compact-syntax", + "rng": "application/xml", + "roa": "application/rpki-roa", + "roff": "text/troff", + "rq": "application/sparql-query", + "rs": "application/rls-services+xml", + "rsat": "application/atsc-rsat+xml", + "rsd": "application/rsd+xml", + "rsheet": "application/urc-ressheet+xml", + "rss": "application/rss+xml", + "rtf": "text/rtf", + "rtx": "text/richtext", + "rusd": "application/route-usd+xml", + "s3m": "audio/s3m", + "sbml": "application/sbml+xml", + "scq": "application/scvp-cv-request", + "scs": "application/scvp-cv-response", + "sdp": "application/sdp", + "senmlx": "application/senml+xml", + "sensmlx": "application/sensml+xml", + "ser": "application/java-serialized-object", + "setpay": "application/set-payment-initiation", + "setreg": "application/set-registration-initiation", + "sgi": "image/sgi", + "sgm": "text/sgml", + "sgml": "text/sgml", + "shex": "text/shex", + "shf": "application/shf+xml", + "shtml": "text/html", + "sieve": "application/sieve", + "sig": "application/pgp-signature", + "sil": "audio/silk", + "silo": "model/mesh", + "siv": "application/sieve", + "slim": "text/slim", + "slm": "text/slim", + "sls": "application/route-s-tsid+xml", + "smi": "application/smil+xml", + "smil": "application/smil+xml", + "snd": "audio/basic", + "so": "application/octet-stream", + "spdx": "text/spdx", + "spp": "application/scvp-vp-response", + "spq": "application/scvp-vp-request", + "spx": "audio/ogg", + "sql": "application/sql", + "sru": "application/sru+xml", + "srx": "application/sparql-results+xml", + "ssdl": "application/ssdl+xml", + "ssml": "application/ssml+xml", + "stk": "application/hyperstudio", + "stl": "model/stl", + "stpx": "model/step+xml", + "stpxz": "model/step-xml+zip", + "stpz": "model/step+zip", + "styl": "text/stylus", + "stylus": "text/stylus", + "svg": "image/svg+xml", + "svgz": "image/svg+xml", + "swidtag": "application/swid+xml", + "t": "text/troff", + "t38": "image/t38", + "td": "application/urc-targetdesc+xml", + "tei": "application/tei+xml", + "teicorpus": "application/tei+xml", + "text": "text/plain", + "tfi": "application/thraud+xml", + "tfx": "image/tiff-fx", + "tif": "image/tiff", + "tiff": "image/tiff", + "toml": "application/toml", + "tr": "text/troff", + "trig": "application/trig", + "ts": "video/mp2t", + "tsd": "application/timestamped-data", + "tsv": "text/tab-separated-values", + "ttc": "font/collection", + "ttf": "font/ttf", + "ttl": "text/turtle", + "ttml": "application/ttml+xml", + "txt": "text/plain", + "u3d": "model/u3d", + "u8dsn": "message/global-delivery-status", + "u8hdr": "message/global-headers", + "u8mdn": "message/global-disposition-notification", + "u8msg": "message/global", + "ubj": "application/ubjson", + "uri": "text/uri-list", + "uris": "text/uri-list", + "urls": "text/uri-list", + "vcard": "text/vcard", + "vrml": "model/vrml", + "vtt": "text/vtt", + "vxml": "application/voicexml+xml", + "war": "application/java-archive", + "wasm": "application/wasm", + "wav": "audio/wav", + "weba": "audio/webm", + "webm": "video/webm", + "webmanifest": "application/manifest+json", + "webp": "image/webp", + "wgsl": "text/wgsl", + "wgt": "application/widget", + "wif": "application/watcherinfo+xml", + "wmf": "image/wmf", + "woff": "font/woff", + "woff2": "font/woff2", + "wrl": "model/vrml", + "wsdl": "application/wsdl+xml", + "wspolicy": "application/wspolicy+xml", + "x3d": "model/x3d+xml", + "x3db": "model/x3d+fastinfoset", + "x3dbz": "model/x3d+binary", + "x3dv": "model/x3d-vrml", + "x3dvz": "model/x3d+vrml", + "x3dz": "model/x3d+xml", + "xaml": "application/xaml+xml", + "xav": "application/xcap-att+xml", + "xca": "application/xcap-caps+xml", + "xcs": "application/calendar+xml", + "xdf": "application/xcap-diff+xml", + "xdssc": "application/dssc+xml", + "xel": "application/xcap-el+xml", + "xenc": "application/xenc+xml", + "xer": "application/patch-ops-error+xml", + "xfdf": "application/xfdf", + "xht": "application/xhtml+xml", + "xhtml": "application/xhtml+xml", + "xhvml": "application/xv+xml", + "xlf": "application/xliff+xml", + "xm": "audio/xm", + "xml": "text/xml", + "xns": "application/xcap-ns+xml", + "xop": "application/xop+xml", + "xpl": "application/xproc+xml", + "xsd": "application/xml", + "xsf": "application/prs.xsf+xml", + "xsl": "application/xml", + "xslt": "application/xml", + "xspf": "application/xspf+xml", + "xvm": "application/xv+xml", + "xvml": "application/xv+xml", + "yaml": "text/yaml", + "yang": "application/yang", + "yin": "application/yin+xml", + "yml": "text/yaml", + "zip": "application/zip" +}; + +function lookup(extn) { + let tmp = ('' + extn).trim().toLowerCase(); + let idx = tmp.lastIndexOf('.'); + return mimes[!~idx ? tmp : tmp.substring(++idx)]; +} + +const noop = () => {}; + +function isMatch(uri, arr) { + for (let i=0; i < arr.length; i++) { + if (arr[i].test(uri)) return true; + } +} + +function toAssume(uri, extns) { + let i=0, x, len=uri.length - 1; + if (uri.charCodeAt(len) === 47) { + uri = uri.substring(0, len); + } + + let arr=[], tmp=`${uri}/index`; + for (; i < extns.length; i++) { + x = extns[i] ? `.${extns[i]}` : ''; + if (uri) arr.push(uri + x); + arr.push(tmp + x); + } + + return arr; +} + +function viaCache(cache, uri, extns) { + let i=0, data, arr=toAssume(uri, extns); + for (; i < arr.length; i++) { + if (data = cache[arr[i]]) return data; + } +} + +function viaLocal(dir, isEtag, uri, extns) { + let i=0, arr=toAssume(uri, extns); + let abs, stats, name, headers; + for (; i < arr.length; i++) { + abs = normalize( + join(dir, name=arr[i]) + ); + + if (abs.startsWith(dir) && fs.existsSync(abs)) { + stats = fs.statSync(abs); + if (stats.isDirectory()) continue; + headers = toHeaders(name, stats, isEtag); + headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store'; + return { abs, stats, headers }; + } + } +} + +function is404(req, res) { + return (res.statusCode=404,res.end()); +} + +function send(req, res, file, stats, headers) { + let code=200, tmp, opts={}; + headers = { ...headers }; + + for (let key in headers) { + tmp = res.getHeader(key); + if (tmp) headers[key] = tmp; + } + + if (tmp = res.getHeader('content-type')) { + headers['Content-Type'] = tmp; + } + + if (req.headers.range) { + code = 206; + let [x, y] = req.headers.range.replace('bytes=', '').split('-'); + let end = opts.end = parseInt(y, 10) || stats.size - 1; + let start = opts.start = parseInt(x, 10) || 0; + + if (end >= stats.size) { + end = stats.size - 1; + } + + if (start >= stats.size) { + res.setHeader('Content-Range', `bytes */${stats.size}`); + res.statusCode = 416; + return res.end(); + } + + headers['Content-Range'] = `bytes ${start}-${end}/${stats.size}`; + headers['Content-Length'] = (end - start + 1); + headers['Accept-Ranges'] = 'bytes'; + } + + res.writeHead(code, headers); + fs.createReadStream(file, opts).pipe(res); +} + +const ENCODING = { + '.br': 'br', + '.gz': 'gzip', +}; + +function toHeaders(name, stats, isEtag) { + let enc = ENCODING[name.slice(-3)]; + + let ctype = lookup(name.slice(0, enc && -3)) || ''; + if (ctype === 'text/html') ctype += ';charset=utf-8'; + + let headers = { + 'Content-Length': stats.size, + 'Content-Type': ctype, + 'Last-Modified': stats.mtime.toUTCString(), + }; + + if (enc) headers['Content-Encoding'] = enc; + if (isEtag) headers['ETag'] = `W/"${stats.size}-${stats.mtime.getTime()}"`; + + return headers; +} + +function sirv (dir, opts={}) { + dir = resolve(dir || '.'); + + let isNotFound = opts.onNoMatch || is404; + let setHeaders = opts.setHeaders || noop; + + let extensions = opts.extensions || ['html', 'htm']; + let gzips = opts.gzip && extensions.map(x => `${x}.gz`).concat('gz'); + let brots = opts.brotli && extensions.map(x => `${x}.br`).concat('br'); + + const FILES = {}; + + let fallback = '/'; + let isEtag = !!opts.etag; + let isSPA = !!opts.single; + if (typeof opts.single === 'string') { + let idx = opts.single.lastIndexOf('.'); + fallback += !!~idx ? opts.single.substring(0, idx) : opts.single; + } + + let ignores = []; + if (opts.ignores !== false) { + ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/); // any extn + if (opts.dotfiles) ignores.push(/\/\.\w/); + else ignores.push(/\/\.well-known/); + [].concat(opts.ignores || []).forEach(x => { + ignores.push(new RegExp(x, 'i')); + }); + } + + let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`; + if (cc && opts.immutable) cc += ',immutable'; + else if (cc && opts.maxAge === 0) cc += ',must-revalidate'; + + if (!opts.dev) { + totalist(dir, (name, abs, stats) => { + if (/\.well-known[\\+\/]/.test(name)) ; // keep + else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return; + + let headers = toHeaders(name, stats, isEtag); + if (cc) headers['Cache-Control'] = cc; + + FILES['/' + name.normalize().replace(/\\+/g, '/')] = { abs, stats, headers }; + }); + } + + let lookup = opts.dev ? viaLocal.bind(0, dir + sep, isEtag) : viaCache.bind(0, FILES); + + return function (req, res, next) { + let extns = ['']; + let pathname = parse(req).pathname; + let val = req.headers['accept-encoding'] || ''; + if (gzips && val.includes('gzip')) extns.unshift(...gzips); + if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots); + extns.push(...extensions); // [...br, ...gz, orig, ...exts] + + if (pathname.indexOf('%') !== -1) { + try { pathname = decodeURI(pathname); } + catch (err) { /* malform uri */ } + } + + let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns); + if (!data) return next ? next() : isNotFound(req, res); + + if (isEtag && req.headers['if-none-match'] === data.headers['ETag']) { + res.writeHead(304); + return res.end(); + } + + if (gzips || brots) { + res.setHeader('Vary', 'Accept-Encoding'); + } + + setHeaders(res, pathname, data.stats); + send(req, res, data.abs, data.stats, data.headers); + }; +} + +var defaultParseOptions = { + decodeValues: true, + map: false, + silent: false, + split: "auto", // auto = split strings but not arrays +}; + +function isForbiddenKey(key) { + return typeof key !== "string" || key in {}; +} + +function createNullObj() { + return Object.create(null); +} + +function isNonEmptyString(str) { + return typeof str === "string" && !!str.trim(); +} + +function parseString(setCookieValue, options) { + var parts = setCookieValue.split(";").filter(isNonEmptyString); + + var nameValuePairStr = parts.shift(); + var parsed = parseNameValuePair(nameValuePairStr); + var name = parsed.name; + var value = parsed.value; + + options = options + ? Object.assign({}, defaultParseOptions, options) + : defaultParseOptions; + + if (isForbiddenKey(name)) { + return null; + } + + try { + value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value + } catch (e) { + console.error( + "set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.", + e + ); + } + + var cookie = createNullObj(); + cookie.name = name; + cookie.value = value; + + parts.forEach(function (part) { + var sides = part.split("="); + var key = sides.shift().trimLeft().toLowerCase(); + if (isForbiddenKey(key)) { + return; + } + var value = sides.join("="); + if (key === "expires") { + cookie.expires = new Date(value); + } else if (key === "max-age") { + var n = parseInt(value, 10); + if (!Number.isNaN(n)) cookie.maxAge = n; + } else if (key === "secure") { + cookie.secure = true; + } else if (key === "httponly") { + cookie.httpOnly = true; + } else if (key === "samesite") { + cookie.sameSite = value; + } else if (key === "partitioned") { + cookie.partitioned = true; + } else if (key) { + cookie[key] = value; + } + }); + + return cookie; +} + +function parseNameValuePair(nameValuePairStr) { + // Parses name-value-pair according to rfc6265bis draft + + var name = ""; + var value = ""; + var nameValueArr = nameValuePairStr.split("="); + if (nameValueArr.length > 1) { + name = nameValueArr.shift(); + value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part + } else { + value = nameValuePairStr; + } + + return { name: name, value: value }; +} + +function parseSetCookie(input, options) { + options = options + ? Object.assign({}, defaultParseOptions, options) + : defaultParseOptions; + + if (!input) { + if (!options.map) { + return []; + } else { + return createNullObj(); + } + } + + if (input.headers) { + if (typeof input.headers.getSetCookie === "function") { + // for fetch responses - they combine headers of the same type in the headers array, + // but getSetCookie returns an uncombined array + input = input.headers.getSetCookie(); + } else if (input.headers["set-cookie"]) { + // fast-path for node.js (which automatically normalizes header names to lower-case) + input = input.headers["set-cookie"]; + } else { + // slow-path for other environments - see #25 + var sch = + input.headers[ + Object.keys(input.headers).find(function (key) { + return key.toLowerCase() === "set-cookie"; + }) + ]; + // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36 + if (!sch && input.headers.cookie && !options.silent) { + console.warn( + "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning." + ); + } + input = sch; + } + } + + var split = options.split; + var isArray = Array.isArray(input); + + if (split === "auto") { + split = !isArray; + } + + if (!isArray) { + input = [input]; + } + + input = input.filter(isNonEmptyString); + + if (split) { + input = input.map(splitCookiesString).flat(); + } + + if (!options.map) { + return input + .map(function (str) { + return parseString(str, options); + }) + .filter(Boolean); + } else { + var cookies = createNullObj(); + return input.reduce(function (cookies, str) { + var cookie = parseString(str, options); + if (cookie && !isForbiddenKey(cookie.name)) { + cookies[cookie.name] = cookie; + } + return cookies; + }, cookies); + } +} + +/* + Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas + that are within a single set-cookie field-value, such as in the Expires portion. + + This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2 + Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128 + React Native's fetch does this for *every* header, including set-cookie. + + Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25 + Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation +*/ +function splitCookiesString(cookiesString) { + if (Array.isArray(cookiesString)) { + return cookiesString; + } + if (typeof cookiesString !== "string") { + return []; + } + + var cookiesStrings = []; + var pos = 0; + var start; + var ch; + var lastComma; + var nextStart; + var cookiesSeparatorFound; + + function skipWhitespace() { + while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { + pos += 1; + } + return pos < cookiesString.length; + } + + function notSpecialChar() { + ch = cookiesString.charAt(pos); + + return ch !== "=" && ch !== ";" && ch !== ","; + } + + while (pos < cookiesString.length) { + start = pos; + cookiesSeparatorFound = false; + + while (skipWhitespace()) { + ch = cookiesString.charAt(pos); + if (ch === ",") { + // ',' is a cookie separator if we have later first '=', not ';' or ',' + lastComma = pos; + pos += 1; + + skipWhitespace(); + nextStart = pos; + + while (pos < cookiesString.length && notSpecialChar()) { + pos += 1; + } + + // currently special character + if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { + // we found cookies separator + cookiesSeparatorFound = true; + // pos is inside the next cookie, so back up and return it. + pos = nextStart; + cookiesStrings.push(cookiesString.substring(start, lastComma)); + start = pos; + } else { + // in param ',' or param separator ';', + // we continue from that comma + pos = lastComma + 1; + } + } else { + pos += 1; + } + } + + if (!cookiesSeparatorFound || pos >= cookiesString.length) { + cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); + } + } + + return cookiesStrings; +} + +// named export for CJS +parseSetCookie.parseSetCookie = parseSetCookie; +// for backwards compatibility +parseSetCookie.parse = parseSetCookie; +parseSetCookie.parseString = parseString; +parseSetCookie.splitCookiesString = splitCookiesString; + +/** @import { StandardSchemaV1 } from '@standard-schema/spec' */ + + +/** + * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404. + * `SvelteKitError` goes through `handleError`. + * @extends Error + */ +class SvelteKitError extends Error { + /** + * @param {number} status + * @param {string} text + * @param {string} message + */ + constructor(status, text, message) { + super(message); + this.status = status; + this.text = text; + } +} + +/** + * @param {import('http').IncomingMessage} req + * @param {number} [body_size_limit] + */ +function get_raw_body(req, body_size_limit) { + const h = req.headers; + + if (!h['content-type']) { + return null; + } + + const content_length = Number(h['content-length']); + + // check if no request body + if ( + (req.httpVersionMajor === 1 && isNaN(content_length) && h['transfer-encoding'] == null) || + content_length === 0 + ) { + return null; + } + + if (req.destroyed) { + const readable = new ReadableStream(); + void readable.cancel(); + return readable; + } + + let size = 0; + let cancelled = false; + + return new ReadableStream({ + start(controller) { + if (body_size_limit !== undefined && content_length > body_size_limit) { + let message = `Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`; + + if (body_size_limit === 0) { + // https://github.com/sveltejs/kit/pull/11589 + // TODO this exists to aid migration — remove in a future version + message += ' To disable body size limits, specify Infinity rather than 0.'; + } + + const error = new SvelteKitError(413, 'Payload Too Large', message); + + controller.error(error); + return; + } + + req.on('error', (error) => { + cancelled = true; + controller.error(error); + }); + + req.on('end', () => { + if (cancelled) return; + controller.close(); + }); + + req.on('data', (chunk) => { + if (cancelled) return; + + size += chunk.length; + if (size > content_length) { + cancelled = true; + + const constraint = content_length ? 'content-length' : 'BODY_SIZE_LIMIT'; + const message = `request body size exceeded ${constraint} of ${content_length}`; + + const error = new SvelteKitError(413, 'Payload Too Large', message); + controller.error(error); + + return; + } + + controller.enqueue(chunk); + + if (controller.desiredSize === null || controller.desiredSize <= 0) { + req.pause(); + } + }); + }, + + pull() { + req.resume(); + }, + + cancel(reason) { + cancelled = true; + req.destroy(reason); + } + }); +} + +/** + * @param {{ + * request: import('http').IncomingMessage; + * base: string; + * bodySizeLimit?: number; + * }} options + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +async function getRequest({ request, base, bodySizeLimit }) { + let headers = /** @type {Record} */ (request.headers); + if (request.httpVersionMajor >= 2) { + // the Request constructor rejects headers with ':' in the name + headers = Object.assign({}, headers); + // https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.5 + if (headers[':authority']) { + headers.host = headers[':authority']; + } + delete headers[':authority']; + delete headers[':method']; + delete headers[':path']; + delete headers[':scheme']; + } + + // TODO: Whenever Node >=22 is minimum supported version, we can use `request.readableAborted` + // @see https://github.com/nodejs/node/blob/5cf3c3e24c7257a0c6192ed8ef71efec8ddac22b/lib/internal/streams/readable.js#L1443-L1453 + const controller = new AbortController(); + let errored = false; + let end_emitted = false; + request.once('error', () => (errored = true)); + request.once('end', () => (end_emitted = true)); + request.once('close', () => { + if ((errored || request.destroyed) && !end_emitted) { + controller.abort(); + } + }); + + return new Request(base + request.url, { + // @ts-expect-error + duplex: 'half', + method: request.method, + headers: Object.entries(headers), + signal: controller.signal, + body: + request.method === 'GET' || request.method === 'HEAD' + ? undefined + : get_raw_body(request, bodySizeLimit) + }); +} + +/** + * @param {import('http').ServerResponse} res + * @param {Response} response + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +async function setResponse(res, response) { + for (const [key, value] of response.headers) { + try { + res.setHeader( + key, + key === 'set-cookie' + ? splitCookiesString( + // This is absurd but necessary, TODO: investigate why + /** @type {string}*/ (response.headers.get(key)) + ) + : value + ); + } catch (error) { + res.getHeaderNames().forEach((name) => res.removeHeader(name)); + res.writeHead(500).end(String(error)); + return; + } + } + + res.writeHead(response.status); + + if (!response.body) { + res.end(); + return; + } + + if (response.body.locked) { + res.end( + 'Fatal error: Response body is locked. ' + + "This can happen when the response was already read (for example through 'response.json()' or 'response.text()')." + ); + return; + } + + const reader = response.body.getReader(); + + if (res.destroyed) { + void reader.cancel(); + return; + } + + const cancel = (/** @type {Error|undefined} */ error) => { + res.off('close', cancel); + res.off('error', cancel); + + // If the reader has already been interrupted with an error earlier, + // then it will appear here, it is useless, but it needs to be catch. + reader.cancel(error).catch(() => {}); + if (error) res.destroy(error); + }; + + res.on('close', cancel); + res.on('error', cancel); + + void next(); + async function next() { + try { + for (;;) { + const { done, value } = await reader.read(); + + if (done) break; + + if (!res.write(value)) { + res.once('drain', next); + return; + } + } + res.end(); + } catch (error) { + cancel(error instanceof Error ? error : new Error(String(error))); + } + } +} + +/** + * Converts a file on disk to a readable stream + * @param {string} file + * @returns {ReadableStream} + * @since 2.4.0 + */ +function createReadableStream(file) { + return /** @type {ReadableStream} */ (Readable.toWeb(createReadStream(file))); +} + +/** + * Parses the given value into number of bytes. + * + * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G). + * @returns {number} + */ +function parse_as_bytes(value) { + const multiplier = + { + K: 1024, + M: 1024 * 1024, + G: 1024 * 1024 * 1024 + }[value[value.length - 1]?.toUpperCase()] ?? 1; + return Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier; +} + +/** + * Parses and validates an origin URL. + * + * @param {string | undefined} value - Origin URL with http:// or https:// protocol + * @returns {string | undefined} The validated origin, or undefined if value is undefined + * @throws {Error} If value is provided but invalid + */ +function parse_origin(value) { + if (value === undefined) { + return undefined; + } + + const trimmed = value.trim(); + + let url; + try { + url = new URL(trimmed); + } catch (error) { + throw new Error( + `Invalid ORIGIN: '${trimmed}'. ` + + `ORIGIN must be a valid URL with http:// or https:// protocol. ` + + `For example: 'http://localhost:3000' or 'https://my.site'`, + { cause: error } + ); + } + + if (url.protocol !== 'http:' && url.protocol !== 'https:') { + throw new Error( + `Invalid ORIGIN: '${trimmed}'. ` + + `Only http:// and https:// protocols are supported. ` + + `Received protocol: ${url.protocol}` + ); + } + + return url.origin; +} + +/* global "" */ +/* global true */ + +const server = new Server(manifest); + +// parse_origin validates ORIGIN and throws descriptive errors for invalid values +const origin = parse_origin(env('ORIGIN', undefined)); + +const xff_depth = parseInt(env('XFF_DEPTH', '1')); +const address_header = env('ADDRESS_HEADER', '').toLowerCase(); +const protocol_header = env('PROTOCOL_HEADER', '').toLowerCase(); +const host_header = env('HOST_HEADER', '').toLowerCase(); +const port_header = env('PORT_HEADER', '').toLowerCase(); + +const body_size_limit = parse_as_bytes(env('BODY_SIZE_LIMIT', '512K')); + +if (isNaN(body_size_limit)) { + throw new Error( + `Invalid BODY_SIZE_LIMIT: '${env('BODY_SIZE_LIMIT')}'. Please provide a numeric value.` + ); +} + +const dir = path.dirname(fileURLToPath(import.meta.url)); + +const asset_dir = `${dir}/client${base}`; + +await server.init({ + env: /** @type {Record} */ (process.env), + read: (file) => createReadableStream(`${asset_dir}/${file}`) +}); + +/** + * @param {string} path + * @param {boolean} client + */ +function serve(path, client = false) { + return fs__default.existsSync(path) + ? sirv(path, { + etag: true, + gzip: true, + brotli: true, + setHeaders: client + ? (res, pathname) => { + // only apply to build directory, not e.g. version.json + if ( + pathname.startsWith(`/${manifest.appPath}/immutable/`) && + res.statusCode === 200 + ) { + res.setHeader('cache-control', 'public,max-age=31536000,immutable'); + } + } + : undefined + }) + : undefined; +} + +// required because the static file server ignores trailing slashes +/** @returns {import('polka').Middleware} */ +function serve_prerendered() { + const handler = serve(path.join(dir, 'prerendered')); + + return (req, res, next) => { + let { pathname, search, query } = parse(req); + + try { + pathname = decodeURIComponent(pathname); + } catch { + // ignore invalid URI + } + + if (prerendered.has(pathname)) { + return handler?.(req, res, next); + } + + // remove or add trailing slash as appropriate + let location = pathname.at(-1) === '/' ? pathname.slice(0, -1) : pathname + '/'; + if (prerendered.has(location)) { + if (query) location += search; + res.writeHead(308, { location }).end(); + } else { + void next(); + } + }; +} + +/** @type {import('polka').Middleware} */ +const ssr = async (req, res) => { + /** @type {Request} */ + let request; + + try { + request = await getRequest({ + base: origin || get_origin(req.headers), + request: req, + bodySizeLimit: body_size_limit + }); + } catch { + res.statusCode = 400; + res.end('Bad Request'); + return; + } + + await setResponse( + res, + await server.respond(request, { + platform: { req }, + getClientAddress: () => { + if (address_header) { + if (!(address_header in req.headers)) { + throw new Error( + `Address header was specified with ${ + "" + 'ADDRESS_HEADER' + }=${address_header} but is absent from request` + ); + } + + const value = /** @type {string} */ (req.headers[address_header]) || ''; + + if (address_header === 'x-forwarded-for') { + const addresses = value.split(','); + + if (xff_depth < 1) { + throw new Error(`${"" + 'XFF_DEPTH'} must be a positive integer`); + } + + if (xff_depth > addresses.length) { + throw new Error( + `${"" + 'XFF_DEPTH'} is ${xff_depth}, but only found ${ + addresses.length + } addresses` + ); + } + return addresses[addresses.length - xff_depth].trim(); + } + + return value; + } + + return ( + req.connection?.remoteAddress || + // @ts-expect-error + req.connection?.socket?.remoteAddress || + req.socket?.remoteAddress || + // @ts-expect-error + req.info?.remoteAddress + ); + } + }) + ); +}; + +/** @param {import('polka').Middleware[]} handlers */ +function sequence(handlers) { + /** @type {import('polka').Middleware} */ + return (req, res, next) => { + /** + * @param {number} i + * @returns {ReturnType} + */ + function handle(i) { + if (i < handlers.length) { + return handlers[i](req, res, () => handle(i + 1)); + } else { + return next(); + } + } + + return handle(0); + }; +} + +/** + * @param {string} name + * @param {string | string[] | undefined} value + * @returns {string | undefined} + */ +function normalise_header(name, value) { + if (!name) return undefined; + if (Array.isArray(value)) { + if (value.length === 0) return undefined; + if (value.length === 1) return value[0]; + throw new Error( + `Multiple values provided for ${name} header where only one expected: ${value}` + ); + } + return value; +} + +/** + * @param {import('http').IncomingHttpHeaders} headers + * @returns {string} + */ +function get_origin(headers) { + const protocol = decodeURIComponent( + normalise_header(protocol_header, headers[protocol_header]) || 'https' + ); + + // this helps us avoid host injections through the protocol header + if (protocol.includes(':')) { + throw new Error( + `The ${protocol_header} header specified ${protocol} which is an invalid because it includes \`:\`. It should only contain the protocol scheme (e.g. \`https\`)` + ); + } + + const host = + normalise_header(host_header, headers[host_header]) || + normalise_header('host', headers['host']); + if (!host) { + const header_names = host_header ? `${host_header} or host headers` : 'host header'; + throw new Error( + `Could not determine host. The request must have a value provided by the ${header_names}` + ); + } + + const port = normalise_header(port_header, headers[port_header]); + if (port && isNaN(+port)) { + throw new Error( + `The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)` + ); + } + + return port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`; +} + +const handler = sequence( + /** @type {(import('sirv').RequestHandler | import('polka').Middleware)[]} */ + ([serve(path.join(dir, 'client'), true), serve_prerendered(), ssr].filter(Boolean)) +); + +export { handler }; diff --git a/frontend/index.js b/frontend/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d5534bd0c3d7943a1f9a5b10198bb0e7dd70cd8f --- /dev/null +++ b/frontend/index.js @@ -0,0 +1,345 @@ +import http from 'node:http'; +import process from 'node:process'; +import { handler } from './handler.js'; +import { env, timeout_env } from './env.js'; +import { setImmediate } from 'node:timers'; +import * as qs from 'node:querystring'; + +/** + * @param {string|RegExp} input The route pattern + * @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input. + */ +function parse$1(input, loose) { + if (input instanceof RegExp) return { keys:false, pattern:input }; + var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/'); + arr[0] || arr.shift(); + + while (tmp = arr.shift()) { + c = tmp[0]; + if (c === '*') { + keys.push(c); + pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)'; + } else if (c === ':') { + o = tmp.indexOf('?', 1); + ext = tmp.indexOf('.', 1); + keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) ); + pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)'; + if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext); + } else { + pattern += '/' + tmp; + } + } + + return { + keys: keys, + pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i') + }; +} + +const MAP = { + "": 0, + GET: 1, + HEAD: 2, + PATCH: 3, + OPTIONS: 4, + CONNECT: 5, + DELETE: 6, + TRACE: 7, + POST: 8, + PUT: 9, +}; + +class Trouter { + constructor() { + this.routes = []; + + this.all = this.add.bind(this, ''); + this.get = this.add.bind(this, 'GET'); + this.head = this.add.bind(this, 'HEAD'); + this.patch = this.add.bind(this, 'PATCH'); + this.options = this.add.bind(this, 'OPTIONS'); + this.connect = this.add.bind(this, 'CONNECT'); + this.delete = this.add.bind(this, 'DELETE'); + this.trace = this.add.bind(this, 'TRACE'); + this.post = this.add.bind(this, 'POST'); + this.put = this.add.bind(this, 'PUT'); + } + + use(route, ...fns) { + let handlers = [].concat.apply([], fns); + let { keys, pattern } = parse$1(route, true); + this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] }); + return this; + } + + add(method, route, ...fns) { + let { keys, pattern } = parse$1(route); + let handlers = [].concat.apply([], fns); + this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] }); + return this; + } + + find(method, url) { + let midx = MAP[method]; + let isHEAD = (midx === 2); + let i=0, j=0, k, tmp, arr=this.routes; + let matches=[], params={}, handlers=[]; + for (; i < arr.length; i++) { + tmp = arr[i]; + if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) { + if (tmp.keys === false) { + matches = tmp.pattern.exec(url); + if (matches === null) continue; + if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k]; + tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]); + } else if (tmp.keys.length > 0) { + matches = tmp.pattern.exec(url); + if (matches === null) continue; + for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j]; + tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]); + } else if (tmp.pattern.test(url)) { + tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]); + } + } // else not a match + } + + return { params, handlers }; + } +} + +/** + * @typedef ParsedURL + * @type {import('.').ParsedURL} + */ + +/** + * @typedef Request + * @property {string} url + * @property {ParsedURL} _parsedUrl + */ + +/** + * @param {Request} req + * @returns {ParsedURL|void} + */ +function parse(req) { + let raw = req.url; + if (raw == null) return; + + let prev = req._parsedUrl; + if (prev && prev.raw === raw) return prev; + + let pathname=raw, search='', query; + + if (raw.length > 1) { + let idx = raw.indexOf('?', 1); + + if (idx !== -1) { + search = raw.substring(idx); + pathname = raw.substring(0, idx); + if (search.length > 1) { + query = qs.parse(search.substring(1)); + } + } + } + + return req._parsedUrl = { pathname, search, query, raw }; +} + +function onError(err, req, res) { + let code = typeof err.status === 'number' && err.status; + code = res.statusCode = (code && code >= 100 ? code : 500); + if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err); + else res.end(err.message || http.STATUS_CODES[code]); +} + +const mount = fn => fn instanceof Polka ? fn.attach : fn; + +class Polka extends Trouter { + constructor(opts={}) { + super(); + this.parse = parse; + this.server = opts.server; + this.handler = this.handler.bind(this); + this.onError = opts.onError || onError; // catch-all handler + this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 }); + this.attach = (req, res) => setImmediate(this.handler, req, res); + } + + use(base, ...fns) { + if (base === '/') { + super.use(base, fns.map(mount)); + } else if (typeof base === 'function' || base instanceof Polka) { + super.use('/', [base, ...fns].map(mount)); + } else { + super.use(base, + (req, _, next) => { + if (typeof base === 'string') { + let len = base.length; + base.startsWith('/') || len++; + req.url = req.url.substring(len) || '/'; + req.path = req.path.substring(len) || '/'; + } else { + req.url = req.url.replace(base, '') || '/'; + req.path = req.path.replace(base, '') || '/'; + } + if (req.url.charAt(0) !== '/') { + req.url = '/' + req.url; + } + next(); + }, + fns.map(mount), + (req, _, next) => { + req.path = req._parsedUrl.pathname; + req.url = req.path + req._parsedUrl.search; + next(); + } + ); + } + return this; // chainable + } + + listen() { + (this.server = this.server || http.createServer()).on('request', this.attach); + this.server.listen.apply(this.server, arguments); + return this; + } + + handler(req, res, next) { + let info = this.parse(req), path = info.pathname; + let obj = this.find(req.method, req.path=path); + + req.url = path + info.search; + req.originalUrl = req.originalUrl || req.url; + req.query = info.query || {}; + req.search = info.search; + req.params = obj.params; + + if (path.length > 1 && path.indexOf('%', 1) !== -1) { + for (let k in req.params) { + try { req.params[k] = decodeURIComponent(req.params[k]); } + catch (e) { /* malform uri segment */ } + } + } + + let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length; + let loop = async () => res.finished || (i < len) && arr[i++](req, res, next); + (next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init + } +} + +function polka (opts) { + return new Polka(opts); +} + +const path = env('SOCKET_PATH', false); +const host = env('HOST', '0.0.0.0'); +const port = env('PORT', !path && '3000'); + +const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30')); +const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0')); +const listen_pid = parseInt(env('LISTEN_PID', '0')); +const listen_fds = parseInt(env('LISTEN_FDS', '0')); +// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html +const SD_LISTEN_FDS_START = 3; + +if (listen_pid !== 0 && listen_pid !== process.pid) { + throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`); +} +if (listen_fds > 1) { + throw new Error( + `only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}` + ); +} + +const socket_activation = listen_pid === process.pid && listen_fds === 1; + +let requests = 0; +/** @type {NodeJS.Timeout | void} */ +let shutdown_timeout_id; +/** @type {NodeJS.Timeout | void} */ +let idle_timeout_id; + +// Initialize the HTTP server here so that we can set properties before starting to listen. +// Otherwise, polka delays creating the server until listen() is called. Settings these +// properties after the server has started listening could lead to race conditions. +const httpServer = http.createServer(); + +const keep_alive_timeout = timeout_env('KEEP_ALIVE_TIMEOUT'); +if (keep_alive_timeout !== undefined) { + // Convert the keep-alive timeout from seconds to milliseconds (the unit Node.js expects). + httpServer.keepAliveTimeout = keep_alive_timeout * 1000; +} + +const headers_timeout = timeout_env('HEADERS_TIMEOUT'); +if (headers_timeout !== undefined) { + // Convert the headers timeout from seconds to milliseconds (the unit Node.js expects). + httpServer.headersTimeout = headers_timeout * 1000; +} + +const server = polka({ server: httpServer }).use(handler); + +if (socket_activation) { + server.listen({ fd: SD_LISTEN_FDS_START }, () => { + console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`); + }); +} else { + server.listen({ path, host, port }, () => { + console.log(`Listening on ${path || `http://${host}:${port}`}`); + }); +} + +/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */ +function graceful_shutdown(reason) { + if (shutdown_timeout_id) return; + + // If a connection was opened with a keep-alive header close() will wait for the connection to + // time out rather than close it even if it is not handling any requests, so call this first + httpServer.closeIdleConnections(); + + httpServer.close((error) => { + // occurs if the server is already closed + if (error) return; + + if (shutdown_timeout_id) { + clearTimeout(shutdown_timeout_id); + } + if (idle_timeout_id) { + clearTimeout(idle_timeout_id); + } + + // @ts-expect-error custom events cannot be typed + process.emit('sveltekit:shutdown', reason); + }); + + shutdown_timeout_id = setTimeout(() => httpServer.closeAllConnections(), shutdown_timeout * 1000); +} + +httpServer.on( + 'request', + /** @param {import('node:http').IncomingMessage} req */ + (req) => { + requests++; + + if (socket_activation && idle_timeout_id) { + idle_timeout_id = clearTimeout(idle_timeout_id); + } + + req.on('close', () => { + requests--; + + if (shutdown_timeout_id) { + // close connections as soon as they become idle, so they don't accept new requests + httpServer.closeIdleConnections(); + } + if (requests === 0 && socket_activation && idle_timeout) { + idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000); + } + }); + } +); + +process.on('SIGTERM', graceful_shutdown); +process.on('SIGINT', graceful_shutdown); + +export { host, path, port, server }; diff --git a/frontend/server.js b/frontend/server.js new file mode 100644 index 0000000000000000000000000000000000000000..33c391c85d33108ba4c0aa5eb032883401cd00c4 --- /dev/null +++ b/frontend/server.js @@ -0,0 +1,3 @@ +import{STATUS_CODES as e,createServer as t}from"node:http";import{Http2ServerRequest as n,constants as r}from"node:http2";import{Readable as i}from"node:stream";import{handler as a}from"./handler.js";var o=(e,t,n)=>(r,i)=>{let a=-1;return o(0);async function o(s){if(s<=a)throw Error(`next() called multiple times`);a=s;let c,l=!1,u;if(e[s]?(u=e[s][0][0],r.req.routeIndex=s):u=s===e.length&&i||void 0,u)try{c=await u(r,()=>o(s+1))}catch(e){if(e instanceof Error&&t)r.error=e,c=await t(e,r),l=!0;else throw e}else r.finalized===!1&&n&&(c=await n(r));return c&&(r.finalized===!1||l)&&(r.res=c),r}},s=class extends Error{res;status;constructor(e=500,t){super(t?.message,{cause:t?.cause}),this.res=t?.res,this.status=e}getResponse(){return this.res?new Response(this.res.body,{status:this.status,headers:this.res.headers}):new Response(this.message,{status:this.status})}},c=Symbol(),l=async(e,t=Object.create(null))=>{let{all:n=!1,dot:r=!1}=t,i=(e instanceof de?e.raw.headers:e.headers).get(`Content-Type`);return i?.startsWith(`multipart/form-data`)||i?.startsWith(`application/x-www-form-urlencoded`)?u(e,{all:n,dot:r}):{}};async function u(e,t){let n=await e.formData();return n?d(n,t):{}}function d(e,t){let n=Object.create(null);return e.forEach((e,r)=>{t.all||r.endsWith(`[]`)?f(n,r,e):n[r]=e}),t.dot&&Object.entries(n).forEach(([e,t])=>{e.includes(`.`)&&(p(n,e,t),delete n[e])}),n}var f=(e,t,n)=>{e[t]===void 0?t.endsWith(`[]`)?e[t]=[n]:e[t]=n:Array.isArray(e[t])?e[t].push(n):e[t]=[e[t],n]},p=(e,t,n)=>{if(/(?:^|\.)__proto__\./.test(t))return;let r=e,i=t.split(`.`);i.forEach((e,t)=>{t===i.length-1?r[e]=n:((!r[e]||typeof r[e]!=`object`||Array.isArray(r[e])||r[e]instanceof File)&&(r[e]=Object.create(null)),r=r[e])})},m=e=>{let t=e.split(`/`);return t[0]===``&&t.shift(),t},ee=e=>{let{groups:t,path:n}=h(e);return g(m(n),t)},h=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(e,n)=>{let r=`@${n}`;return t.push([r,e]),r}),{groups:t,path:e}},g=(e,t)=>{for(let n=t.length-1;n>=0;n--){let[r]=t[n];for(let i=e.length-1;i>=0;i--)if(e[i].includes(r)){e[i]=e[i].replace(r,t[n][1]);break}}return e},_={},te=(e,t)=>{if(e===`*`)return`*`;let n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){let r=`${e}#${t}`;return _[r]||(n[2]?_[r]=t&&t[0]!==`:`&&t[0]!==`*`?[r,n[1],RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],RegExp(`^${n[2]}$`)]:_[r]=[e,n[1],!0]),_[r]}return null},v=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,e=>{try{return t(e)}catch{return e}})}},ne=e=>v(e,decodeURI),re=e=>{let t=e.url,n=t.indexOf(`/`,t.indexOf(`:`)+4),r=n;for(;r{let t=re(e);return t.length>1&&t.at(-1)===`/`?t.slice(0,-1):t},y=(e,t,...n)=>(n.length&&(t=y(t,...n)),`${e?.[0]===`/`?``:`/`}${e}${t===`/`?``:`${e?.at(-1)===`/`?``:`/`}${t?.[0]===`/`?t.slice(1):t}`}`),ae=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(`:`))return null;let t=e.split(`/`),n=[],r=``;return t.forEach(e=>{if(e!==``&&!/\:/.test(e))r+=`/`+e;else if(/\:/.test(e))if(/\?/.test(e)){n.length===0&&r===``?n.push(`/`):n.push(r);let t=e.replace(`?`,``);r+=`/`+t,n.push(r)}else r+=`/`+e}),n.filter((e,t,n)=>n.indexOf(e)===t)},b=e=>/[%+]/.test(e)?(e.indexOf(`+`)!==-1&&(e=e.replace(/\+/g,` `)),e.indexOf(`%`)===-1?e:v(e,le)):e,oe=(e,t,n)=>{let r;if(!n&&t&&!/[%+]/.test(t)){let n=e.indexOf(`?`,8);if(n===-1)return;for(e.startsWith(t,n+1)||(n=e.indexOf(`&${t}`,n+1));n!==-1;){let r=e.charCodeAt(n+t.length+1);if(r===61){let r=n+t.length+2,i=e.indexOf(`&`,r);return b(e.slice(r,i===-1?void 0:i))}else if(r==38||isNaN(r))return``;n=e.indexOf(`&${t}`,n+1)}if(r=/[%+]/.test(e),!r)return}let i={};r??=/[%+]/.test(e);let a=e.indexOf(`?`,8);for(;a!==-1;){let t=e.indexOf(`&`,a+1),o=e.indexOf(`=`,a);o>t&&t!==-1&&(o=-1);let s=e.slice(a+1,o===-1?t===-1?void 0:t:o);if(r&&(s=b(s)),a=t,s===``)continue;let c;o===-1?c=``:(c=e.slice(o+1,t===-1?void 0:t),r&&(c=b(c))),n?(i[s]&&Array.isArray(i[s])||(i[s]=[]),i[s].push(c)):i[s]??=c}return t?i[t]:i},se=oe,ce=(e,t)=>oe(e,t,!0),le=decodeURIComponent,ue=e=>v(e,le),de=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t=`/`,n=[[]]){this.raw=e,this.path=t,this.#t=n,this.#e={}}param(e){return e?this.#n(e):this.#r()}#n(e){let t=this.#t[0][this.routeIndex][1][e],n=this.#i(t);return n&&/\%/.test(n)?ue(n):n}#r(){let e={},t=Object.keys(this.#t[0][this.routeIndex][1]);for(let n of t){let t=this.#i(this.#t[0][this.routeIndex][1][n]);t!==void 0&&(e[n]=/\%/.test(t)?ue(t):t)}return e}#i(e){return this.#t[1]?this.#t[1][e]:e}query(e){return se(this.url,e)}queries(e){return ce(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t={};return this.raw.headers.forEach((e,n)=>{t[n]=e}),t}async parseBody(e){return l(this,e)}#a=e=>{let{bodyCache:t,raw:n}=this,r=t[e];if(r)return r;let i=Object.keys(t)[0];return i?t[i].then(t=>(i===`json`&&(t=JSON.stringify(t)),new Response(t)[e]())):t[e]=n[e]()};json(){return this.#a(`text`).then(e=>JSON.parse(e))}text(){return this.#a(`text`)}arrayBuffer(){return this.#a(`arrayBuffer`)}bytes(){return this.#a(`arrayBuffer`).then(e=>new Uint8Array(e))}blob(){return this.#a(`blob`)}formData(){return this.#a(`formData`)}addValidatedData(e,t){this.#e[e]=t}valid(e){return this.#e[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[c](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}},fe={Stringify:1,BeforeStream:2,Stream:3},pe=(e,t)=>{let n=new String(e);return n.isEscaped=!0,n.callbacks=t,n},me=async(e,t,n,r,i)=>{typeof e==`object`&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let a=e.callbacks;if(!a?.length)return Promise.resolve(e);i?i[0]+=e:i=[e];let o=Promise.all(a.map(e=>e({phase:t,buffer:i,context:r}))).then(e=>Promise.all(e.filter(Boolean).map(e=>me(e,t,!1,r,i))).then(()=>i[0]));return n?pe(await o,a):o},he=`text/plain; charset=UTF-8`,x=(e,t)=>({"Content-Type":e,...t}),S=(e,t)=>new Response(e,t),ge=class{#e;#t;env={};#n;finalized=!1;error;#r;#i;#a;#o;#s;#c;#l;#u;#d;constructor(e,t){this.#e=e,t&&(this.#i=t.executionCtx,this.env=t.env,this.#c=t.notFoundHandler,this.#d=t.path,this.#u=t.matchResult)}get req(){return this.#t??=new de(this.#e,this.#d,this.#u),this.#t}get event(){if(this.#i&&`respondWith`in this.#i)return this.#i;throw Error(`This context has no FetchEvent`)}get executionCtx(){if(this.#i)return this.#i;throw Error(`This context has no ExecutionContext`)}get res(){return this.#a||=S(null,{headers:this.#l??=new Headers})}set res(e){if(this.#a&&e){e=S(e.body,e);for(let[t,n]of this.#a.headers.entries())if(t!==`content-type`)if(t===`set-cookie`){let t=this.#a.headers.getSetCookie();e.headers.delete(`set-cookie`);for(let n of t)e.headers.append(`set-cookie`,n)}else e.headers.set(t,n)}this.#a=e,this.finalized=!0}render=(...e)=>(this.#s??=e=>this.html(e),this.#s(...e));setLayout=e=>this.#o=e;getLayout=()=>this.#o;setRenderer=e=>{this.#s=e};header=(e,t,n)=>{this.finalized&&(this.#a=S(this.#a.body,this.#a));let r=this.#a?this.#a.headers:this.#l??=new Headers;t===void 0?r.delete(e):n?.append?r.append(e,t):r.set(e,t)};status=e=>{this.#r=e};set=(e,t)=>{this.#n??=new Map,this.#n.set(e,t)};get=e=>this.#n?this.#n.get(e):void 0;get var(){return this.#n?Object.fromEntries(this.#n):{}}#f(e,t,n){let r=this.#a?new Headers(this.#a.headers):this.#l??new Headers;if(typeof t==`object`&&`headers`in t){let e=t.headers instanceof Headers?t.headers:new Headers(t.headers);for(let[t,n]of e)t.toLowerCase()===`set-cookie`?r.append(t,n):r.set(t,n)}if(n)for(let[e,t]of Object.entries(n))if(typeof t==`string`)r.set(e,t);else{r.delete(e);for(let n of t)r.append(e,n)}return S(e,{status:typeof t==`number`?t:t?.status??this.#r,headers:r})}newResponse=(...e)=>this.#f(...e);body=(e,t,n)=>this.#f(e,t,n);text=(e,t,n)=>!this.#l&&!this.#r&&!t&&!n&&!this.finalized?new Response(e):this.#f(e,t,x(he,n));json=(e,t,n)=>this.#f(JSON.stringify(e),t,x(`application/json`,n));html=(e,t,n)=>{let r=e=>this.#f(e,t,x(`text/html; charset=UTF-8`,n));return typeof e==`object`?me(e,fe.Stringify,!1,{}).then(r):r(e)};redirect=(e,t)=>{let n=String(e);return this.header(`Location`,/[^\x00-\xFF]/.test(n)?encodeURI(n):n),this.newResponse(null,t??302)};notFound=()=>(this.#c??=()=>S(),this.#c(this))},_e=[`get`,`post`,`put`,`delete`,`options`,`patch`],ve=`Can not add a route since the matcher is already built.`,ye=class extends Error{},be=`__COMPOSED_HANDLER`,xe=e=>e.text(`404 Not Found`,404),Se=(e,t)=>{if(`getResponse`in e){let n=e.getResponse();return t.newResponse(n.body,n)}return console.error(e),t.text(`Internal Server Error`,500)},Ce=class e{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath=`/`;#e=`/`;routes=[];constructor(e={}){[..._e,`all`].forEach(e=>{this[e]=(t,...n)=>(typeof t==`string`?this.#e=t:this.#r(e,this.#e,t),n.forEach(t=>{this.#r(e,this.#e,t)}),this)}),this.on=(e,t,...n)=>{for(let r of[t].flat()){this.#e=r;for(let t of[e].flat())n.map(e=>{this.#r(t.toUpperCase(),this.#e,e)})}return this},this.use=(e,...t)=>(typeof e==`string`?this.#e=e:(this.#e=`*`,t.unshift(e)),t.forEach(e=>{this.#r(`ALL`,this.#e,e)}),this);let{strict:t,...n}=e;Object.assign(this,n),this.getPath=t??!0?e.getPath??re:ie}#t(){let t=new e({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#n=this.#n,t.routes=this.routes,t}#n=xe;errorHandler=Se;route(e,t){let n=this.basePath(e);return t.routes.map(e=>{let r;t.errorHandler===Se?r=e.handler:(r=async(n,r)=>(await o([],t.errorHandler)(n,()=>e.handler(n,r))).res,r[be]=e.handler),n.#r(e.method,e.path,r,e.basePath)}),this}basePath(e){let t=this.#t();return t._basePath=y(this._basePath,e),t}onError=e=>(this.errorHandler=e,this);notFound=e=>(this.#n=e,this);mount(e,t,n){let r,i;n&&(typeof n==`function`?i=n:(i=n.optionHandler,r=n.replaceRequest===!1?e=>e:n.replaceRequest));let a=i?e=>{let t=i(e);return Array.isArray(t)?t:[t]}:e=>{let t;try{t=e.executionCtx}catch{}return[e.env,t]};return r||=(()=>{let t=y(this._basePath,e),n=t===`/`?0:t.length;return e=>{let t=new URL(e.url);return t.pathname=this.getPath(e).slice(n)||`/`,new Request(t,e)}})(),this.#r(`ALL`,y(e,`*`),async(e,n)=>{let i=await t(r(e.req.raw),...a(e));if(i)return i;await n()}),this}#r(e,t,n,r){e=e.toUpperCase(),t=y(this._basePath,t);let i={basePath:r===void 0?this._basePath:y(this._basePath,r),path:t,method:e,handler:n};this.router.add(e,t,[n,i]),this.routes.push(i)}#i(e,t){if(e instanceof Error)return this.errorHandler(e,t);throw e}#a(e,t,n,r){if(r===`HEAD`)return(async()=>new Response(null,await this.#a(e,t,n,`GET`)))();let i=this.getPath(e,{env:n}),a=this.router.match(r,i),s=new ge(e,{path:i,matchResult:a,env:n,executionCtx:t,notFoundHandler:this.#n});if(a[0].length===1){let e;try{e=a[0][0][0][0](s,async()=>{s.res=await this.#n(s)})}catch(e){return this.#i(e,s)}return e instanceof Promise?e.then(e=>e||(s.finalized?s.res:this.#n(s))).catch(e=>this.#i(e,s)):e??this.#n(s)}let c=o(a[0],this.errorHandler,this.#n);return(async()=>{try{let e=await c(s);if(!e.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return e.res}catch(e){return this.#i(e,s)}})()}fetch=(e,...t)=>this.#a(e,t[1],t[0],e.method);request=(e,t,n,r)=>e instanceof Request?this.fetch(t?new Request(e,t):e,n,r):(e=e.toString(),this.fetch(new Request(/^https?:\/\//.test(e)?e:`http://localhost${y(`/`,e)}`,t),n,r));fire=()=>{addEventListener(`fetch`,e=>{e.respondWith(this.#a(e.request,e,void 0,e.request.method))})}},we=[];function Te(e,t){let n=this.buildAllMatchers(),r=((e,t)=>{let r=n[e]||n.ALL,i=r[2][t];if(i)return i;let a=t.match(r[0]);if(!a)return[[],we];let o=a.indexOf(``,1);return[r[1][o],a]});return this.match=r,r(e,t)}var C=`[^/]+`,w=`.*`,T=`(?:|/.*)`,E=Symbol(),Ee=new Set(`.\\+*[^]$()`);function De(e,t){return e.length===1?t.length===1?ee!==w&&e!==T))throw E;if(a)return;l=this.#n[n]=new e,t!==``&&(l.#t=i.varIndex++)}!a&&t!==``&&r.push([t,l.#t])}else if(l=this.#n[o],!l){if(Object.keys(this.#n).some(e=>e.length>1&&e!==w&&e!==T))throw E;if(a)return;l=this.#n[o]=new e}l.insert(s,n,r,i,a)}buildRegExpStr(){let e=Object.keys(this.#n).sort(De).map(e=>{let t=this.#n[e];return(typeof t.#t==`number`?`(${e})@${t.#t}`:Ee.has(e)?`\\${e}`:e)+t.buildRegExpStr()});return typeof this.#e==`number`&&e.unshift(`#${this.#e}`),e.length===0?``:e.length===1?e[0]:`(?:`+e.join(`|`)+`)`}},ke=class{#e={varIndex:0};#t=new Oe;insert(e,t,n){let r=[],i=[];for(let t=0;;){let n=!1;if(e=e.replace(/\{[^}]+\}/g,e=>{let r=`@\\${t}`;return i[t]=[r,e],t++,n=!0,r}),!n)break}let a=e.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let e=i.length-1;e>=0;e--){let[t]=i[e];for(let n=a.length-1;n>=0;n--)if(a[n].indexOf(t)!==-1){a[n]=a[n].replace(t,i[e][1]);break}}return this.#t.insert(a,t,r,this.#e,n),r}buildRegExp(){let e=this.#t.buildRegExpStr();if(e===``)return[/^$/,[],[]];let t=0,n=[],r=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(e,i,a)=>i===void 0?(a===void 0||(r[Number(a)]=++t),``):(n[++t]=Number(i),`$()`)),[RegExp(`^${e}`),n,r]}},Ae=[/^$/,[],Object.create(null)],je=Object.create(null);function Me(e){return je[e]??=RegExp(e===`*`?``:`^${e.replace(/\/\*$|([.\\+*[^\]$()])/g,(e,t)=>t?`\\${t}`:`(?:|/.*)`)}$`)}function Ne(){je=Object.create(null)}function Pe(e){let t=new ke,n=[];if(e.length===0)return Ae;let r=e.map(e=>[!/\*|\/:/.test(e[0]),...e]).sort(([e,t],[n,r])=>e?1:n?-1:t.length-r.length),i=Object.create(null);for(let e=0,a=-1,o=r.length;e[e,Object.create(null)]),we]:a++;let l;try{l=t.insert(s,a,o)}catch(e){throw e===E?new ye(s):e}o||(n[a]=c.map(([e,t])=>{let n=Object.create(null);for(--t;t>=0;t--){let[e,r]=l[t];n[e]=r}return[e,n]}))}let[a,o,s]=t.buildRegExp();for(let e=0,t=n.length;et.length-e.length))if(Me(n).test(t))return[...e[n]]}}var Fe=class{name=`RegExpRouter`;#e;#t;constructor(){this.#e={ALL:Object.create(null)},this.#t={ALL:Object.create(null)}}add(e,t,n){let r=this.#e,i=this.#t;if(!r||!i)throw Error(ve);r[e]||[r,i].forEach(t=>{t[e]=Object.create(null),Object.keys(t.ALL).forEach(n=>{t[e][n]=[...t.ALL[n]]})}),t===`/*`&&(t=`*`);let a=(t.match(/\/:/g)||[]).length;if(/\*$/.test(t)){let o=Me(t);e===`ALL`?Object.keys(r).forEach(e=>{r[e][t]||=D(r[e],t)||D(r.ALL,t)||[]}):r[e][t]||=D(r[e],t)||D(r.ALL,t)||[],Object.keys(r).forEach(t=>{(e===`ALL`||e===t)&&Object.keys(r[t]).forEach(e=>{o.test(e)&&r[t][e].push([n,a])})}),Object.keys(i).forEach(t=>{(e===`ALL`||e===t)&&Object.keys(i[t]).forEach(e=>o.test(e)&&i[t][e].push([n,a]))});return}let o=ae(t)||[t];for(let t=0,s=o.length;t{(e===`ALL`||e===o)&&(i[o][c]||=[...D(r[o],c)||D(r.ALL,c)||[]],i[o][c].push([n,a-s+t+1]))})}}match=Te;buildAllMatchers(){let e=Object.create(null);return Object.keys(this.#t).concat(Object.keys(this.#e)).forEach(t=>{e[t]||=this.#n(t)}),this.#e=this.#t=void 0,Ne(),e}#n(e){let t=[],n=e===`ALL`;return[this.#e,this.#t].forEach(r=>{let i=r[e]?Object.keys(r[e]).map(t=>[t,r[e][t]]):[];i.length===0?e!==`ALL`&&t.push(...Object.keys(r.ALL).map(e=>[e,r.ALL[e]])):(n||=!0,t.push(...i))}),n?Pe(t):null}},Ie=class{name=`SmartRouter`;#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,n){if(!this.#t)throw Error(ve);this.#t.push([e,t,n])}match(e,t){if(!this.#t)throw Error(`Fatal error`);let n=this.#e,r=this.#t,i=n.length,a=0,o;for(;a{for(let t in e)return!0;return!1},Re=class e{#e;#t;#n;#r=0;#i=O;constructor(e,t,n){if(this.#t=n||Object.create(null),this.#e=[],e&&t){let n=Object.create(null);n[e]={handler:t,possibleKeys:[],score:0},this.#e=[n]}this.#n=[]}insert(t,n,r){this.#r=++this.#r;let i=this,a=ee(n),o=[];for(let t=0,n=a.length;tn.indexOf(e)===t),score:this.#r}}),i}#a(e,t,n,r,i){for(let a=0,o=t.#e.length;a1&&n.sort((e,t)=>e.score-t.score),[n.map(({handler:e,params:t})=>[e,t])]}},ze=class{name=`TrieRouter`;#e;constructor(){this.#e=new Re}add(e,t,n){let r=ae(t);if(r){for(let t=0,i=r.length;t{if(!e)return{};let n=new Headers(e.headers);if(t){let e=n.get(`connection`);if(e){let t=e.split(`,`).map(e=>e.trim()),r=t.filter(e=>!He.test(e));if(r.length>0)throw new s(400,{message:`Invalid Connection header value: ${r.join(`, `)}`});t.forEach(e=>{n.delete(e)})}}return Ve.forEach(e=>{n.delete(e)}),{method:e.method,body:e.body,duplex:e.body?`half`:void 0,headers:n,signal:e.signal}},We=e=>{if(!e.headers||Array.isArray(e.headers)||e.headers instanceof Headers)return e;let t=new Headers;for(let[n,r]of Object.entries(e.headers))r==null?t.delete(n):t.set(n,r);return e.headers=t,e},Ge=async(e,t)=>{let{raw:n,customFetch:r,strictConnectionProcessing:i=!1,...a}=t instanceof Request?{raw:t}:t??{},o=new Request(e,{...Ue(n,i),...We(a)});o.headers.delete(`accept-encoding`);let s=await(r||fetch)(o),c=new Headers(s.headers);return Ve.forEach(e=>{c.delete(e)}),c.has(`content-encoding`)&&(c.delete(`content-encoding`),c.delete(`content-length`)),new Response(s.body,{status:s.status,statusText:s.statusText,headers:c})},Ke=`x-hono-already-sent`,k=class extends Error{constructor(e,t){super(e,t),this.name=`RequestError`}},qe=/^\/[!#$&-;=?-\[\]_a-z~]*$/,Je=/\/\.\.?(?:[/?#]|$)/,Ye=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,Xe=(e,t,n)=>{let r=`${e}://${t}${n}`;if(!Ye.test(t)){let e=new URL(r);if(e.hostname.length!==t.length&&e.hostname!==(t.includes(`:`)?t.replace(/:\d+$/,``):t).toLowerCase())throw new k(`Invalid host header`);return e.href}else if(n.length===0)return r+`/`;else{if(n.charCodeAt(0)!==47)throw new k(`Invalid URL`);return!qe.test(n)||Je.test(n)?new URL(r).href:r}},Ze=e=>e instanceof k?e:new k(e.message,{cause:e}),Qe=global.Request,A=class extends Qe{constructor(e,t){if(typeof e==`object`&&j in e){let n=t!==void 0&&`body`in t&&t.body!=null;if(e[B]&&!n)throw TypeError(`Cannot construct a Request with a Request object that has already been used.`);e=e[j]()}t?.body?.getReader!==void 0&&(t.duplex??=`half`),super(e,t)}},$e=e=>{let t=[],n=e.rawHeaders;for(let e=0,r=n.length;e{let o={method:e,headers:n,signal:a.signal};if(e===`TRACE`){o.method=`GET`;let e=new A(t,o);return Object.defineProperty(e,"method",{get(){return`TRACE`}}),e}if(!(e===`GET`||e===`HEAD`))if(`rawBody`in r&&r.rawBody instanceof Buffer)o.body=new ReadableStream({start(e){e.enqueue(r.rawBody),e.close()}});else if(r[et]){let e;o.body=new ReadableStream({async pull(t){try{e||=i.toWeb(r).getReader();let{done:n,value:a}=await e.read();n?t.close():t.enqueue(a)}catch(e){t.error(e)}}})}else o.body=i.toWeb(r);return new A(t,o)},j=Symbol(`getRequestCache`),M=Symbol(`requestCache`),N=Symbol(`incomingKey`),P=Symbol(`urlKey`),nt=Symbol(`methodKey`),rt=Symbol(`headersKey`),F=Symbol(`abortControllerKey`),I=Symbol(`getAbortController`),L=Symbol(`abortRequest`),R=Symbol(`bodyBuffer`),z=Symbol(`bodyReadPromise`),B=Symbol(`bodyConsumedDirectly`),it=Symbol(`bodyLockReader`),V=Symbol(`abortReason`),at=()=>TypeError(`Body is unusable`),H=()=>Promise.reject(at()),ot=new TextDecoder,st=e=>{if(e[B])return H();e[B]=!0},ct=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),lt=e=>(e[rt]||=$e(e[N])).get(`content-type`)||``,ut=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,dt=e=>{if(typeof e!=`string`||e.length===0)return`GET`;switch(e){case`DELETE`:case`GET`:case`HEAD`:case`OPTIONS`:case`POST`:case`PUT`:return e}let t=e.toUpperCase();switch(t){case`DELETE`:case`GET`:case`HEAD`:case`OPTIONS`:case`POST`:case`PUT`:return t;default:return e}},ft=e=>{if(!ut.test(e))return TypeError(`'${e}' is not a valid HTTP method.`);let t=e.toUpperCase();if(t===`CONNECT`||t===`TRACK`||t===`TRACE`&&e!==`TRACE`)return TypeError(`'${e}' HTTP method is unsupported.`)},U=(e,t,n)=>{if(e[B])return H();let r=e.method;if(r===`GET`||r===`HEAD`)return e[j]()[t]();let i=ft(r);if(i)return Promise.reject(i);if(e[M]&&r!==`TRACE`)return e[M][t]();let a=st(e);if(a)return a;let o=pt(e);if(o){let t=Promise.resolve(n(o,e));return e[R]=void 0,t}return mt(e).then(t=>{let r=n(t,e);return e[R]=void 0,r})},pt=e=>{let t=e[N];if(`rawBody`in t&&t.rawBody instanceof Buffer)return t.rawBody},mt=e=>{if(e[R])return Promise.resolve(e[R]);if(e[z])return e[z];let t=e[N];if(i.isDisturbed(t))return H();let n=new Promise((n,r)=>{let i=[],a=!1,o=e=>{a||(a=!0,d(),e())},s=e=>{i.push(Buffer.isBuffer(e)?e:Buffer.from(e))},c=()=>{o(()=>{let t=i.length===1?i[0]:Buffer.concat(i);e[R]=t,n(t)})},l=e=>{o(()=>{r(e)})},u=()=>{if(t.readableEnded){c();return}o(()=>{if(t.errored){r(t.errored);return}let n=e[V];if(n!==void 0){r(n instanceof Error?n:Error(String(n)));return}r(Error(`Client connection prematurely closed.`))})},d=()=>{t.off(`data`,s),t.off(`end`,c),t.off(`error`,l),t.off(`close`,u),e[z]=void 0};t.on(`data`,s),t.on(`end`,c),t.on(`error`,l),t.on(`close`,u),queueMicrotask(()=>{a||(t.readableEnded?c():t.errored?l(t.errored):t.destroyed&&u())})});return e[z]=n,n},W={get method(){return this[nt]},get url(){return this[P]},get headers(){return this[rt]||=$e(this[N])},[L](e){this[V]===void 0&&(this[V]=e);let t=this[F];t&&!t.signal.aborted&&t.abort(e)},[I](){return this[F]||=new AbortController,this[V]!==void 0&&!this[F].signal.aborted&&this[F].abort(this[V]),this[F]},[j](){let e=this[I]();if(this[M])return this[M];let t=this.method;if(this[B]&&!(t===`GET`||t===`HEAD`)){this[R]=void 0;let n={method:t===`TRACE`?`GET`:t,headers:this.headers,signal:e.signal};t!==`TRACE`&&(n.body=new ReadableStream({start(e){e.close()}}),n.duplex=`half`);let r=new A(this[P],n);return t===`TRACE`&&Object.defineProperty(r,"method",{get(){return`TRACE`}}),this[M]=r}return this[M]=tt(this.method,this[P],this.headers,this[N],e)},get body(){if(!this[B])return this[j]().body;let e=this[j]();return!this[it]&&e.body&&(this[it]=e.body.getReader()),e.body},get bodyUsed(){return this[B]?!0:this[M]?this[M].bodyUsed:!1}};Object.defineProperty(W,"signal",{get(){return this[I]().signal}}),[`cache`,`credentials`,`destination`,`integrity`,`mode`,`redirect`,`referrer`,`referrerPolicy`,`keepalive`].forEach(e=>{Object.defineProperty(W,e,{get(){return this[j]()[e]}})}),[`clone`,`formData`].forEach(e=>{Object.defineProperty(W,e,{value:function(){if(this[B]){if(e===`clone`)throw at();return H()}return this[j]()[e]()}})}),Object.defineProperty(W,"text",{value:function(){return U(this,`text`,e=>ot.decode(e))}}),Object.defineProperty(W,"arrayBuffer",{value:function(){return U(this,`arrayBuffer`,e=>ct(e))}}),Object.defineProperty(W,"blob",{value:function(){return U(this,`blob`,(e,t)=>{let n=lt(t);return new Response(e,n?{headers:{"content-type":n}}:void 0).blob()})}}),Object.defineProperty(W,"json",{value:function(){return this[B]?H():this.text().then(JSON.parse)}}),Object.defineProperty(W,Symbol.for(`nodejs.util.inspect.custom`),{value:function(e,t,n){return`Request (lightweight) ${n({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[M]},{...t,depth:e==null?null:e-1})}`}}),Object.setPrototypeOf(W,A.prototype);var ht=(e,t)=>{let r=Object.create(W);r[N]=e,r[nt]=dt(e.method);let i=e.url||``;if(i[0]!==`/`&&(i.startsWith(`http://`)||i.startsWith(`https://`))){if(e instanceof n)throw new k(`Absolute URL for :path is not allowed in HTTP/2`);try{r[P]=new URL(i).href}catch(e){throw new k(`Invalid absolute URL`,{cause:e})}return r}let a=(e instanceof n?e.authority:e.headers.host)||t;if(!a)throw new k(`Missing host header`);let o;if(e instanceof n){if(o=e.scheme,!(o===`http`||o===`https`))throw new k(`Unsupported scheme`)}else o=e.socket&&e.socket.encrypted?`https`:`http`;try{r[P]=Xe(o,a,i)}catch(e){throw e instanceof k?e:new k(`Invalid URL`,{cause:e})}return r},G=`text/plain; charset=UTF-8`,K=Symbol(`responseCache`),q=Symbol(`getResponseCache`),J=Symbol(`cache`),Y=global.Response,X=class e{#e;#t;[q](){let e=this[J],t=e&&e[2]instanceof Headers?e[2]:void 0;return delete this[J],this[K]||=new Y(this.#e,t?{...this.#t,headers:t}:this.#t)}constructor(t,n){let r;if(this.#e=t,n instanceof e){let e=n[K];if(e){this.#t=e,this[q]();return}else this.#t=n.#t,r=new Headers(n.headers)}else this.#t=n;(t==null||typeof t==`string`||t?.getReader!==void 0||t instanceof Blob||t instanceof Uint8Array)&&(this[J]=[n?.status||200,t??null,r||n?.headers])}get headers(){let e=this[J];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||(e[1]===null?void 0:{"content-type":G}))),e[2]):this[q]().headers}get status(){return this[J]?.[0]??this[q]().status}get ok(){let e=this.status;return e>=200&&e<300}};[`body`,`bodyUsed`,`redirected`,`statusText`,`trailers`,`type`,`url`].forEach(e=>{Object.defineProperty(X.prototype,e,{get(){return this[q]()[e]}})}),[`arrayBuffer`,`blob`,`clone`,`formData`,`json`,`text`].forEach(e=>{Object.defineProperty(X.prototype,e,{value:function(){return this[q]()[e]()}})}),Object.defineProperty(X.prototype,Symbol.for(`nodejs.util.inspect.custom`),{value:function(e,t,n){return`Response (lightweight) ${n({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[K]},{...t,depth:e==null?null:e-1})}`}}),Object.setPrototypeOf(X,Y),Object.setPrototypeOf(X.prototype,Y.prototype);var gt=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,_t=e=>e instanceof URL?e.href:gt.test(e)?e:new URL(e).href,vt=new Set([301,302,303,307,308]);Object.defineProperty(X,"redirect",{value:function(e,t=302){if(!vt.has(t))throw RangeError(`Invalid status code`);return new X(null,{status:t,headers:{location:_t(e)}})},writable:!0,configurable:!0}),Object.defineProperty(X,"json",{value:function(e,t){let n=JSON.stringify(e);if(n===void 0)throw TypeError(`The data is not JSON serializable`);let r=t?.headers,i;return r?(i=new Headers(r),i.has(`content-type`)||i.set(`content-type`,`application/json`)):i={"content-type":`application/json`},new X(n,{status:t?.status??200,statusText:t?.statusText,headers:i})},writable:!0,configurable:!0});async function yt(e){return Promise.race([e,Promise.resolve().then(()=>Promise.resolve(void 0))])}function bt(e,t,n){let r=t=>{e.cancel(t).catch(()=>{})};return t.on(`close`,r),t.on(`error`,r),(n??e.read()).then(o,i),e.closed.finally(()=>{t.off(`close`,r),t.off(`error`,r)});function i(e){e&&t.destroy(e)}function a(){e.read().then(o,i)}function o({done:n,value:r}){try{if(n)t.end();else if(!t.write(r))t.once(`drain`,a);else return e.read().then(o,i)}catch(e){i(e)}}}function xt(e,t){if(e.locked)throw TypeError(`ReadableStream is locked.`);return t.destroyed?void 0:bt(e.getReader(),t)}var Z=(e,t)=>{let n={};if(e instanceof Headers||(e=new Headers(e??void 0)),e.has(`set-cookie`)){let t=[];for(let[r,i]of e)r===`set-cookie`?t.push(i):n[r]=i;t.length>0&&(n[`set-cookie`]=t)}else for(let[t,r]of e)n[t]=r;return t&&(n[`content-type`]??=t),n},Q=Symbol(`outgoingEnded`),St=Symbol(`incomingDraining`),Ct=500,wt=64*1024*1024,Tt=e=>{let t=e;if(e.destroyed||t[St])return;if(t[St]=!0,e instanceof n){try{e.stream?.close?.(r.NGHTTP2_NO_ERROR)}catch{}return}let i=0,a=()=>{clearTimeout(s),e.off(`data`,c),e.off(`end`,a),e.off(`error`,a)},o=()=>{a();let t=e.socket;t&&!t.destroyed&&t.destroySoon()},s=setTimeout(o,Ct);s.unref?.();let c=e=>{i+=e.length,i>wt&&o()};e.on(`data`,c),e.on(`end`,a),e.on(`error`,a),e.resume()},Et=(e,t,n,r)=>()=>{t.errored?e[L](t.errored.toString()):n.writableFinished||e[L](`Client connection prematurely closed.`),r&&!t.readableEnded&&setTimeout(()=>{t.readableEnded||setTimeout(()=>{Tt(t)})})},Dt=e=>{if(!(J in e))return!1;let t=e[J][1];return t===null||typeof t==`string`||t instanceof Uint8Array},Ot=()=>new Response(null,{status:400}),kt=e=>new Response(null,{status:e instanceof Error&&(e.name===`TimeoutError`||e.constructor.name===`TimeoutError`)?504:500}),$=(e,t)=>{let n=e instanceof Error?e:Error(`unknown error`,{cause:e});n.code===`ERR_STREAM_PREMATURE_CLOSE`?console.info(`The user aborted a request.`):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":`text/plain`}),t.end(`Error: ${n.message}`),t.destroy(n))},At=e=>{`flushHeaders`in e&&e.writable&&e.flushHeaders()},jt=async(e,t)=>{let[n,r,i]=e[J];if(!i){r===null?(t.writeHead(n),t.end()):typeof r==`string`?(t.writeHead(n,{"Content-Type":G,"Content-Length":Buffer.byteLength(r)}),t.end(r)):r instanceof Uint8Array?(t.writeHead(n,{"Content-Type":G,"Content-Length":r.byteLength}),t.end(r)):r instanceof Blob?(t.writeHead(n,{"Content-Type":G,"Content-Length":r.size}),t.end(new Uint8Array(await r.arrayBuffer()))):(t.writeHead(n,{"Content-Type":G}),At(t),await xt(r,t)?.catch(e=>$(e,t))),t[Q]?.();return}let a=!1;if(i instanceof Headers)a=i.has(`content-length`),i=Z(i,r===null?void 0:G);else if(Array.isArray(i)){let e=new Headers(i);a=e.has(`content-length`),i=Z(e,r===null?void 0:G)}else for(let e in i)if(e.length===14&&e.toLowerCase()===`content-length`){a=!0;break}a||(typeof r==`string`?i[`Content-Length`]=Buffer.byteLength(r):r instanceof Uint8Array?i[`Content-Length`]=r.byteLength:r instanceof Blob&&(i[`Content-Length`]=r.size)),t.writeHead(n,i),r==null?t.end():typeof r==`string`||r instanceof Uint8Array?t.end(r):r instanceof Blob?t.end(new Uint8Array(await r.arrayBuffer())):(At(t),await xt(r,t)?.catch(e=>$(e,t))),t[Q]?.()},Mt=e=>typeof e.then==`function`,Nt=async(e,t,n={})=>{if(Mt(e))if(n.errorHandler)try{e=await e}catch(t){let r=await n.errorHandler(t);if(!r)return;e=r}else e=await e.catch(kt);if(J in e)return jt(e,t);let r=Z(e.headers,e.body===null?void 0:G);if(e.body){let n=e.body.getReader(),i=[],a=!1,o;if(r[`transfer-encoding`]!==`chunked`){let e=2;for(let t=0;t{console.error(e),a=!0});if(!r){if(t===1){await new Promise(e=>setTimeout(e)),e=3;continue}break}if(o=void 0,r.value&&i.push(r.value),r.done){a=!0;break}}a&&!(`content-length`in r)&&(r[`content-length`]=i.reduce((e,t)=>e+t.length,0))}t.writeHead(e.status,r),i.forEach(e=>{t.write(e)}),a?t.end():(i.length===0&&At(t),await bt(n,t,o))}else r[`x-hono-already-sent`]||(t.writeHead(e.status,r),t.end());t[Q]?.()},Pt=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return t.overrideGlobalObjects!==!1&&global.Request!==A&&(Object.defineProperty(global,"Request",{value:A}),Object.defineProperty(global,"Response",{value:X})),async(i,a)=>{let o,s,c=!1,l=!1,u=()=>{!s||l||(l=!0,a.on(`close`,Et(s,i,a,c)))};try{if(s=ht(i,t.hostname),c=r&&!(i.method===`GET`||i.method===`HEAD`),c&&(i[et]=!0,i instanceof n&&(a[Q]=()=>{i.readableEnded||setTimeout(()=>{i.readableEnded||setTimeout(()=>{i.destroy(),a.destroy()})})})),o=e(s,{incoming:i,outgoing:a}),!Mt(o)&&Dt(o))return c&&!i.readableEnded&&a.once(`finish`,()=>{i.readableEnded||Tt(i)}),jt(o,a);u()}catch(e){if(o)return $(e,a);if(t.errorHandler){if(u(),o=await t.errorHandler(s?e:Ze(e)),!o)return}else o=s?kt(e):Ot()}try{return await Nt(o,a,t)}catch(e){return $(e,a)}}};globalThis.CloseEvent;var Ft=Symbol(`CONNECTION_SYMBOL_KEY`),It=Symbol(`WAIT_FOR_WEBSOCKET_SYMBOL`),Lt=new Set([`connection`,`content-length`,`keep-alive`,`proxy-authenticate`,`proxy-authorization`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`sec-websocket-accept`,`sec-websocket-extensions`,`sec-websocket-protocol`]),Rt=(e,t)=>{t&&t.forEach((t,n)=>{Lt.has(n.toLowerCase())||e.push(`${n}: ${t}`)})},zt=(t,n,r)=>{let i=[`Connection: close`,`Content-Length: 0`];Rt(i,r),t.end(`HTTP/1.1 ${n.toString()} ${e[n]??``}\r\n${i.join(`\r +`)}\r\n\r +`)},Bt=e=>{let t=e.socket.encrypted?`https`:`http`,n=new URL(e.url??`/`,`${t}://${e.headers.host??`localhost`}`),r=new Headers;for(let t in e.headers){let n=e.headers[t];n&&r.append(t,Array.isArray(n)?n[0]:n)}return new Request(n,{headers:r})},Vt=e=>{let{server:t,fetchCallback:n,wss:r}=e,i=new Map;r.on(`connection`,(e,t)=>{let n=i.get(t);n&&(n.resolve(e),i.delete(t))});let a=(e,t)=>new Promise(n=>{i.set(e,{resolve:n,connectionSymbol:t})});t.on(`upgrade`,async(e,o,s)=>{if(e.headers.upgrade?.toLowerCase()!==`websocket`)return;let c={incoming:e,outgoing:void 0,wss:r,[It]:a},l=400,u;try{let t=await n(Bt(e),c);t instanceof Response&&(l=t.status,u=t.headers)}catch{t.listenerCount(`upgrade`)===1&&zt(o,500);return}let d=i.get(e);if(!d||d.connectionSymbol!==c[Ft]){i.delete(e),t.listenerCount(`upgrade`)===1&&zt(o,l,u);return}let f=e=>{Rt(e,u)};r.on(`headers`,f);try{r.handleUpgrade(e,o,s,t=>{r.emit(`connection`,t,e)})}finally{r.off(`headers`,f)}}),t.on(`close`,()=>{r.close()})},Ht=e=>{let n=e.fetch,r=Pt(n,{hostname:e.hostname,overrideGlobalObjects:e.overrideGlobalObjects,autoCleanupIncoming:e.autoCleanupIncoming}),i=(e.createServer||t)(e.serverOptions||{},r);if(e.websocket&&e.websocket.server){if(e.websocket.server.options.noServer!==!0)throw Error(`WebSocket server must be created with { noServer: true } option`);Vt({server:i,fetchCallback:n,wss:e.websocket.server})}return i},Ut=(e,t)=>{let n=Ht(e);return n.listen(e?.port??3e3,e.hostname,()=>{let e=n.address();t&&t(e)}),n},Wt=new Response(null,{headers:{[Ke]:`true`}}),Gt=new Be,Kt=`http://localhost:8000`;Gt.all(`/api/*`,async e=>{let t=new URL(e.req.url),n=t.pathname.replace(/^\/api/,``)||`/`;return Ge(new URL(n+t.search,Kt).toString(),{...e.req,headers:{...Object.fromEntries(e.req.raw.headers),host:new URL(Kt).host}})}),Gt.use(`*`,async e=>{let t=e.env.incoming,n=e.env.outgoing;return await new Promise((e,r)=>{let i=!1,o=()=>{i||(i=!0,c(),e())},s=e=>{i||(i=!0,c(),r(e))},c=()=>{n.off(`finish`,o),n.off(`close`,o),n.off(`error`,s)};n.once(`finish`,o),n.once(`close`,o),n.once(`error`,s);try{a(t,n,e=>{e?s(e):o()})}catch(e){s(e)}}),Wt}),Ut({fetch:Gt.fetch,port:7860,hostname:`0.0.0.0`}); \ No newline at end of file diff --git a/frontend/server/chunks/0-BU5PLkoS.js b/frontend/server/chunks/0-BU5PLkoS.js new file mode 100644 index 0000000000000000000000000000000000000000..bfaa2173da6bcb7b01f19c1fda4e2232a34fd874 --- /dev/null +++ b/frontend/server/chunks/0-BU5PLkoS.js @@ -0,0 +1,9 @@ +const index = 0; +let component_cache; +const component = async () => component_cache ??= (await import('./_layout.svelte-C7OgEBqS.js')).default; +const imports = ["_app/immutable/nodes/0.Df0rgt8-.js","_app/immutable/chunks/Bw-0QipA.js","_app/immutable/chunks/xihTtKlq.js"]; +const stylesheets = ["_app/immutable/assets/0.DpcAwFkV.css"]; +const fonts = ["_app/immutable/assets/ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2","_app/immutable/assets/ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2","_app/immutable/assets/ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2","_app/immutable/assets/ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2","_app/immutable/assets/ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2","_app/immutable/assets/ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2"]; + +export { component, fonts, imports, index, stylesheets }; +//# sourceMappingURL=0-BU5PLkoS.js.map diff --git a/frontend/server/chunks/0-BU5PLkoS.js.map b/frontend/server/chunks/0-BU5PLkoS.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8850b72fae41992693d4948a37a980fd68633815 --- /dev/null +++ b/frontend/server/chunks/0-BU5PLkoS.js.map @@ -0,0 +1 @@ +{"version":3,"file":"0-BU5PLkoS.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/0.Df0rgt8-.js\",\"_app/immutable/chunks/Bw-0QipA.js\",\"_app/immutable/chunks/xihTtKlq.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.DpcAwFkV.css\"];\nexport const fonts = [\"_app/immutable/assets/ibm-plex-sans-cyrillic-ext-wght-normal.d45eAU9y.woff2\",\"_app/immutable/assets/ibm-plex-sans-cyrillic-wght-normal.BAAhND-U.woff2\",\"_app/immutable/assets/ibm-plex-sans-greek-wght-normal.CmyJS8uq.woff2\",\"_app/immutable/assets/ibm-plex-sans-vietnamese-wght-normal.Dg1JeJN0.woff2\",\"_app/immutable/assets/ibm-plex-sans-latin-ext-wght-normal.CIII54If.woff2\",\"_app/immutable/assets/ibm-plex-sans-latin-wght-normal.IvpUvPa2.woff2\"];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAClG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC;AACxH,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG,CAAC,6EAA6E,CAAC,yEAAyE,CAAC,sEAAsE,CAAC,2EAA2E,CAAC,0EAA0E,CAAC,sEAAsE;;;;"} \ No newline at end of file diff --git a/frontend/server/chunks/1-BRwugLe_.js b/frontend/server/chunks/1-BRwugLe_.js new file mode 100644 index 0000000000000000000000000000000000000000..4f4c8757050a5710efd3d6b69b95eaa33b9f40b2 --- /dev/null +++ b/frontend/server/chunks/1-BRwugLe_.js @@ -0,0 +1,9 @@ +const index = 1; +let component_cache; +const component = async () => component_cache ??= (await import('./error.svelte-DFhloolM.js')).default; +const imports = ["_app/immutable/nodes/1.Cp2o0XAs.js","_app/immutable/chunks/Bw-0QipA.js","_app/immutable/chunks/H_O4PGe5.js","_app/immutable/chunks/xihTtKlq.js"]; +const stylesheets = []; +const fonts = []; + +export { component, fonts, imports, index, stylesheets }; +//# sourceMappingURL=1-BRwugLe_.js.map diff --git a/frontend/server/chunks/1-BRwugLe_.js.map b/frontend/server/chunks/1-BRwugLe_.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e8018b331d8d68b6bf593a508b834ba3f6cf621a --- /dev/null +++ b/frontend/server/chunks/1-BRwugLe_.js.map @@ -0,0 +1 @@ +{"version":3,"file":"1-BRwugLe_.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.Cp2o0XAs.js\",\"_app/immutable/chunks/Bw-0QipA.js\",\"_app/immutable/chunks/H_O4PGe5.js\",\"_app/immutable/chunks/xihTtKlq.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"} \ No newline at end of file diff --git a/frontend/server/chunks/2-XEMhhANk.js b/frontend/server/chunks/2-XEMhhANk.js new file mode 100644 index 0000000000000000000000000000000000000000..81897ca018681a21902d6e9b98e7829cb922a7c9 --- /dev/null +++ b/frontend/server/chunks/2-XEMhhANk.js @@ -0,0 +1,9 @@ +const index = 2; +let component_cache; +const component = async () => component_cache ??= (await import('./_page.svelte-Ctrv2mtw.js')).default; +const imports = ["_app/immutable/nodes/2.BTNl2Bsv.js","_app/immutable/chunks/Bw-0QipA.js","_app/immutable/chunks/xihTtKlq.js"]; +const stylesheets = ["_app/immutable/assets/2.BIbYdWBv.css"]; +const fonts = []; + +export { component, fonts, imports, index, stylesheets }; +//# sourceMappingURL=2-XEMhhANk.js.map diff --git a/frontend/server/chunks/2-XEMhhANk.js.map b/frontend/server/chunks/2-XEMhhANk.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3e01ca193b7abde768bb6ea25ab5ec8f6d360e80 --- /dev/null +++ b/frontend/server/chunks/2-XEMhhANk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2-XEMhhANk.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.BTNl2Bsv.js\",\"_app/immutable/chunks/Bw-0QipA.js\",\"_app/immutable/chunks/xihTtKlq.js\"];\nexport const stylesheets = [\"_app/immutable/assets/2.BIbYdWBv.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAChG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC;AACxH,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"} \ No newline at end of file diff --git a/frontend/server/chunks/_layout.svelte-C7OgEBqS.js b/frontend/server/chunks/_layout.svelte-C7OgEBqS.js new file mode 100644 index 0000000000000000000000000000000000000000..cdabafc24f80a7b4053afb25b37b7496d5dc927b --- /dev/null +++ b/frontend/server/chunks/_layout.svelte-C7OgEBqS.js @@ -0,0 +1,17 @@ +import { K as head, d as attr } from './dev-B3xIfLjQ.js'; + +//#region src/lib/assets/favicon.svg +var favicon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e"; +//#endregion +//#region src/routes/+layout.svelte +function _layout($$renderer, $$props) { + let { children } = $$props; + head("12qhfyh", $$renderer, ($$renderer) => { + $$renderer.push(``); + }); + children($$renderer); + $$renderer.push(``); +} + +export { _layout as default }; +//# sourceMappingURL=_layout.svelte-C7OgEBqS.js.map diff --git a/frontend/server/chunks/_layout.svelte-C7OgEBqS.js.map b/frontend/server/chunks/_layout.svelte-C7OgEBqS.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5f487d9a3af0210a33a0e4a21de2705e501f1e33 --- /dev/null +++ b/frontend/server/chunks/_layout.svelte-C7OgEBqS.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_layout.svelte-C7OgEBqS.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { Y as attr, l as head } from \"../../chunks/dev.js\";\n//#region src/lib/assets/favicon.svg\nvar favicon_default = \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e\";\n//#endregion\n//#region src/routes/+layout.svelte\nfunction _layout($$renderer, $$props) {\n\tlet { children } = $$props;\n\thead(\"12qhfyh\", $$renderer, ($$renderer) => {\n\t\t$$renderer.push(``);\n\t});\n\tchildren($$renderer);\n\t$$renderer.push(``);\n}\n//#endregion\nexport { _layout as default };\n"],"names":[],"mappings":";;AACA;AACA,IAAI,eAAe,GAAG,skEAAskE;AAC5lE;AACA;AACA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC3B,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,UAAU,KAAK;AAC7C,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;AACvE,CAAC,CAAC,CAAC;AACH,CAAC,QAAQ,CAAC,UAAU,CAAC;AACrB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3B;;;;"} \ No newline at end of file diff --git a/frontend/server/chunks/_page.svelte-Ctrv2mtw.js b/frontend/server/chunks/_page.svelte-Ctrv2mtw.js new file mode 100644 index 0000000000000000000000000000000000000000..23e5686038a823a1a02ad97b89e38dc42f04ca3d --- /dev/null +++ b/frontend/server/chunks/_page.svelte-Ctrv2mtw.js @@ -0,0 +1,8785 @@ +import { o as onDestroy } from './index-server-C6vKN1Ke.js'; +import { g as attributes, l as clsx$1, h as bind_props, e as attr_class, v as escape_html, t as ensure_array_like, d as attr, f as attr_style, r as derived, k as clsx, ab as spread_props, a0 as props_id, J as hasContext, C as getContext, a6 as setContext, a4 as run, A as ATTACHMENT_KEY, s as element } from './dev-B3xIfLjQ.js'; + +/** + * Concatenates two arrays faster than the array spread operator. + */ +const concatArrays = (array1, array2) => { + // Pre-allocate for better V8 optimization + const combinedArray = new Array(array1.length + array2.length); + for (let i = 0; i < array1.length; i++) { + combinedArray[i] = array1[i]; + } + for (let i = 0; i < array2.length; i++) { + combinedArray[array1.length + i] = array2[i]; + } + return combinedArray; +}; + +// Factory function ensures consistent object shapes +const createClassValidatorObject = (classGroupId, validator) => ({ + classGroupId, + validator +}); +// Factory ensures consistent ClassPartObject shape +const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({ + nextPart, + validators, + classGroupId +}); +const CLASS_PART_SEPARATOR = '-'; +const EMPTY_CONFLICTS = []; +// I use two dots here because one dot is used as prefix for class groups in plugins +const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..'; +const createClassGroupUtils = config => { + const classMap = createClassMap(config); + const { + conflictingClassGroups, + conflictingClassGroupModifiers + } = config; + const getClassGroupId = className => { + if (className.startsWith('[') && className.endsWith(']')) { + return getGroupIdForArbitraryProperty(className); + } + const classParts = className.split(CLASS_PART_SEPARATOR); + // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it. + const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0; + return getGroupRecursive(classParts, startIndex, classMap); + }; + const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => { + if (hasPostfixModifier) { + const modifierConflicts = conflictingClassGroupModifiers[classGroupId]; + const baseConflicts = conflictingClassGroups[classGroupId]; + if (modifierConflicts) { + if (baseConflicts) { + // Merge base conflicts with modifier conflicts + return concatArrays(baseConflicts, modifierConflicts); + } + // Only modifier conflicts + return modifierConflicts; + } + // Fall back to without postfix if no modifier conflicts + return baseConflicts || EMPTY_CONFLICTS; + } + return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS; + }; + return { + getClassGroupId, + getConflictingClassGroupIds + }; +}; +const getGroupRecursive = (classParts, startIndex, classPartObject) => { + const classPathsLength = classParts.length - startIndex; + if (classPathsLength === 0) { + return classPartObject.classGroupId; + } + const currentClassPart = classParts[startIndex]; + const nextClassPartObject = classPartObject.nextPart.get(currentClassPart); + if (nextClassPartObject) { + const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject); + if (result) return result; + } + const validators = classPartObject.validators; + if (validators === null) { + return undefined; + } + // Build classRest string efficiently by joining from startIndex onwards + const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR); + const validatorsLength = validators.length; + for (let i = 0; i < validatorsLength; i++) { + const validatorObj = validators[i]; + if (validatorObj.validator(classRest)) { + return validatorObj.classGroupId; + } + } + return undefined; +}; +/** + * Get the class group ID for an arbitrary property. + * + * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`. + */ +const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => { + const content = className.slice(1, -1); + const colonIndex = content.indexOf(':'); + const property = content.slice(0, colonIndex); + return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined; +})(); +/** + * Exported for testing only + */ +const createClassMap = config => { + const { + theme, + classGroups + } = config; + return processClassGroups(classGroups, theme); +}; +// Split into separate functions to maintain monomorphic call sites +const processClassGroups = (classGroups, theme) => { + const classMap = createClassPartObject(); + for (const classGroupId in classGroups) { + const group = classGroups[classGroupId]; + processClassesRecursively(group, classMap, classGroupId, theme); + } + return classMap; +}; +const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => { + const len = classGroup.length; + for (let i = 0; i < len; i++) { + const classDefinition = classGroup[i]; + processClassDefinition(classDefinition, classPartObject, classGroupId, theme); + } +}; +// Split into separate functions for each type to maintain monomorphic call sites +const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => { + if (typeof classDefinition === 'string') { + processStringDefinition(classDefinition, classPartObject, classGroupId); + return; + } + if (typeof classDefinition === 'function') { + processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme); + return; + } + processObjectDefinition(classDefinition, classPartObject, classGroupId, theme); +}; +const processStringDefinition = (classDefinition, classPartObject, classGroupId) => { + const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition); + classPartObjectToEdit.classGroupId = classGroupId; +}; +const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => { + if (isThemeGetter(classDefinition)) { + processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme); + return; + } + if (classPartObject.validators === null) { + classPartObject.validators = []; + } + classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition)); +}; +const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => { + const entries = Object.entries(classDefinition); + const len = entries.length; + for (let i = 0; i < len; i++) { + const [key, value] = entries[i]; + processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme); + } +}; +const getPart = (classPartObject, path) => { + let current = classPartObject; + const parts = path.split(CLASS_PART_SEPARATOR); + const len = parts.length; + for (let i = 0; i < len; i++) { + const part = parts[i]; + let next = current.nextPart.get(part); + if (!next) { + next = createClassPartObject(); + current.nextPart.set(part, next); + } + current = next; + } + return current; +}; +// Type guard maintains monomorphic check +const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true; + +// LRU cache implementation using plain objects for simplicity +const createLruCache = maxCacheSize => { + if (maxCacheSize < 1) { + return { + get: () => undefined, + set: () => {} + }; + } + let cacheSize = 0; + let cache = Object.create(null); + let previousCache = Object.create(null); + const update = (key, value) => { + cache[key] = value; + cacheSize++; + if (cacheSize > maxCacheSize) { + cacheSize = 0; + previousCache = cache; + cache = Object.create(null); + } + }; + return { + get(key) { + let value = cache[key]; + if (value !== undefined) { + return value; + } + if ((value = previousCache[key]) !== undefined) { + update(key, value); + return value; + } + }, + set(key, value) { + if (key in cache) { + cache[key] = value; + } else { + update(key, value); + } + } + }; +}; +const IMPORTANT_MODIFIER = '!'; +const MODIFIER_SEPARATOR = ':'; +const EMPTY_MODIFIERS = []; +// Pre-allocated result object shape for consistency +const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({ + modifiers, + hasImportantModifier, + baseClassName, + maybePostfixModifierPosition, + isExternal +}); +const createParseClassName = config => { + const { + prefix, + experimentalParseClassName + } = config; + /** + * Parse class name into parts. + * + * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS + * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js + */ + let parseClassName = className => { + // Use simple array with push for better performance + const modifiers = []; + let bracketDepth = 0; + let parenDepth = 0; + let modifierStart = 0; + let postfixModifierPosition; + const len = className.length; + for (let index = 0; index < len; index++) { + const currentCharacter = className[index]; + if (bracketDepth === 0 && parenDepth === 0) { + if (currentCharacter === MODIFIER_SEPARATOR) { + modifiers.push(className.slice(modifierStart, index)); + modifierStart = index + 1; + continue; + } + if (currentCharacter === '/') { + postfixModifierPosition = index; + continue; + } + } + if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--; + } + const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart); + // Inline important modifier check + let baseClassName = baseClassNameWithImportantModifier; + let hasImportantModifier = false; + if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) { + baseClassName = baseClassNameWithImportantModifier.slice(0, -1); + hasImportantModifier = true; + } else if ( + /** + * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons. + * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864 + */ + baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) { + baseClassName = baseClassNameWithImportantModifier.slice(1); + hasImportantModifier = true; + } + const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined; + return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition); + }; + if (prefix) { + const fullPrefix = prefix + MODIFIER_SEPARATOR; + const parseClassNameOriginal = parseClassName; + parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true); + } + if (experimentalParseClassName) { + const parseClassNameOriginal = parseClassName; + parseClassName = className => experimentalParseClassName({ + className, + parseClassName: parseClassNameOriginal + }); + } + return parseClassName; +}; + +/** + * Sorts modifiers according to following schema: + * - Predefined modifiers are sorted alphabetically + * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it + */ +const createSortModifiers = config => { + // Pre-compute weights for all known modifiers for O(1) comparison + const modifierWeights = new Map(); + // Assign weights to sensitive modifiers (highest priority, but preserve order) + config.orderSensitiveModifiers.forEach((mod, index) => { + modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods + }); + return modifiers => { + const result = []; + let currentSegment = []; + // Process modifiers in one pass + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers) + const isArbitrary = modifier[0] === '['; + const isOrderSensitive = modifierWeights.has(modifier); + if (isArbitrary || isOrderSensitive) { + // Sort and flush current segment alphabetically + if (currentSegment.length > 0) { + currentSegment.sort(); + result.push(...currentSegment); + currentSegment = []; + } + result.push(modifier); + } else { + // Regular modifier - add to current segment for batch sorting + currentSegment.push(modifier); + } + } + // Sort and add any remaining segment items + if (currentSegment.length > 0) { + currentSegment.sort(); + result.push(...currentSegment); + } + return result; + }; +}; +const createConfigUtils = config => ({ + cache: createLruCache(config.cacheSize), + parseClassName: createParseClassName(config), + sortModifiers: createSortModifiers(config), + postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config), + ...createClassGroupUtils(config) +}); +const createPostfixLookupClassGroupIds = config => { + const lookup = Object.create(null); + const classGroupIds = config.postfixLookupClassGroups; + if (classGroupIds) { + for (let i = 0; i < classGroupIds.length; i++) { + lookup[classGroupIds[i]] = true; + } + } + return lookup; +}; +const SPLIT_CLASSES_REGEX = /\s+/; +const mergeClassList = (classList, configUtils) => { + const { + parseClassName, + getClassGroupId, + getConflictingClassGroupIds, + sortModifiers, + postfixLookupClassGroupIds + } = configUtils; + /** + * Set of classGroupIds in following format: + * `{importantModifier}{variantModifiers}{classGroupId}` + * @example 'float' + * @example 'hover:focus:bg-color' + * @example 'md:!pr' + */ + const classGroupsInConflict = []; + const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); + let result = ''; + for (let index = classNames.length - 1; index >= 0; index -= 1) { + const originalClassName = classNames[index]; + const { + isExternal, + modifiers, + hasImportantModifier, + baseClassName, + maybePostfixModifierPosition + } = parseClassName(originalClassName); + if (isExternal) { + result = originalClassName + (result.length > 0 ? ' ' + result : result); + continue; + } + let hasPostfixModifier = !!maybePostfixModifierPosition; + let classGroupId; + if (hasPostfixModifier) { + const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition); + classGroupId = getClassGroupId(baseClassNameWithoutPostfix); + const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : undefined; + if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) { + classGroupId = classGroupIdWithPostfix; + hasPostfixModifier = false; + } + } else { + classGroupId = getClassGroupId(baseClassName); + } + if (!classGroupId) { + if (!hasPostfixModifier) { + // Not a Tailwind class + result = originalClassName + (result.length > 0 ? ' ' + result : result); + continue; + } + classGroupId = getClassGroupId(baseClassName); + if (!classGroupId) { + // Not a Tailwind class + result = originalClassName + (result.length > 0 ? ' ' + result : result); + continue; + } + hasPostfixModifier = false; + } + // Fast path: skip sorting for empty or single modifier + const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':'); + const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier; + const classId = modifierId + classGroupId; + if (classGroupsInConflict.indexOf(classId) > -1) { + // Tailwind class omitted due to conflict + continue; + } + classGroupsInConflict.push(classId); + const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier); + for (let i = 0; i < conflictGroups.length; ++i) { + const group = conflictGroups[i]; + classGroupsInConflict.push(modifierId + group); + } + // Tailwind class not in conflict + result = originalClassName + (result.length > 0 ? ' ' + result : result); + } + return result; +}; + +/** + * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better. + * + * Specifically: + * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js + * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts + * + * Original code has MIT license: Copyright (c) Luke Edwards (lukeed.com) + */ +const twJoin = (...classLists) => { + let index = 0; + let argument; + let resolvedValue; + let string = ''; + while (index < classLists.length) { + if (argument = classLists[index++]) { + if (resolvedValue = toValue(argument)) { + string && (string += ' '); + string += resolvedValue; + } + } + } + return string; +}; +const toValue = mix => { + // Fast path for strings + if (typeof mix === 'string') { + return mix; + } + let resolvedValue; + let string = ''; + for (let k = 0; k < mix.length; k++) { + if (mix[k]) { + if (resolvedValue = toValue(mix[k])) { + string && (string += ' '); + string += resolvedValue; + } + } + } + return string; +}; +const createTailwindMerge = (createConfigFirst, ...createConfigRest) => { + let configUtils; + let cacheGet; + let cacheSet; + let functionToCall; + const initTailwindMerge = classList => { + const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()); + configUtils = createConfigUtils(config); + cacheGet = configUtils.cache.get; + cacheSet = configUtils.cache.set; + functionToCall = tailwindMerge; + return tailwindMerge(classList); + }; + const tailwindMerge = classList => { + const cachedResult = cacheGet(classList); + if (cachedResult) { + return cachedResult; + } + const result = mergeClassList(classList, configUtils); + cacheSet(classList, result); + return result; + }; + functionToCall = initTailwindMerge; + return (...args) => functionToCall(twJoin(...args)); +}; +const fallbackThemeArr = []; +const fromTheme = key => { + const themeGetter = theme => theme[key] || fallbackThemeArr; + themeGetter.isThemeGetter = true; + return themeGetter; +}; +const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i; +const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i; +const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/; +const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; +const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; +const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/; +// Shadow always begins with x and y offset separated by underscore optionally prepended by inset +const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/; +const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/; +const isFraction = value => fractionRegex.test(value); +const isNumber = value => !!value && !Number.isNaN(Number(value)); +const isInteger = value => !!value && Number.isInteger(Number(value)); +const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1)); +const isTshirtSize = value => tshirtUnitRegex.test(value); +const isAny = () => true; +const isLengthOnly = value => +// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. +// For example, `hsl(0 0% 0%)` would be classified as a length without this check. +// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. +lengthUnitRegex.test(value) && !colorFunctionRegex.test(value); +const isNever = () => false; +const isShadow = value => shadowRegex.test(value); +const isImage = value => imageRegex.test(value); +const isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value); +const isNamedContainerQuery = value => value.startsWith('@container') && (value[10] === '/' && value[11] !== undefined || value[11] === 's' && value[16] !== undefined && value.startsWith('-size/', 10) || value[11] === 'n' && value[18] !== undefined && value.startsWith('-normal/', 10)); +const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever); +const isArbitraryValue = value => arbitraryValueRegex.test(value); +const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly); +const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber); +const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny); +const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever); +const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever); +const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage); +const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow); +const isArbitraryVariable = value => arbitraryVariableRegex.test(value); +const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength); +const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName); +const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition); +const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize); +const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage); +const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true); +const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true); +// Helpers +const getIsArbitraryValue = (value, testLabel, testValue) => { + const result = arbitraryValueRegex.exec(value); + if (result) { + if (result[1]) { + return testLabel(result[1]); + } + return testValue(result[2]); + } + return false; +}; +const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => { + const result = arbitraryVariableRegex.exec(value); + if (result) { + if (result[1]) { + return testLabel(result[1]); + } + return shouldMatchNoLabel; + } + return false; +}; +// Labels +const isLabelPosition = label => label === 'position' || label === 'percentage'; +const isLabelImage = label => label === 'image' || label === 'url'; +const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size'; +const isLabelLength = label => label === 'length'; +const isLabelNumber = label => label === 'number'; +const isLabelFamilyName = label => label === 'family-name'; +const isLabelWeight = label => label === 'number' || label === 'weight'; +const isLabelShadow = label => label === 'shadow'; +const getDefaultConfig = () => { + /** + * Theme getters for theme variable namespaces + * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces + */ + /***/ + const themeColor = fromTheme('color'); + const themeFont = fromTheme('font'); + const themeText = fromTheme('text'); + const themeFontWeight = fromTheme('font-weight'); + const themeTracking = fromTheme('tracking'); + const themeLeading = fromTheme('leading'); + const themeBreakpoint = fromTheme('breakpoint'); + const themeContainer = fromTheme('container'); + const themeSpacing = fromTheme('spacing'); + const themeRadius = fromTheme('radius'); + const themeShadow = fromTheme('shadow'); + const themeInsetShadow = fromTheme('inset-shadow'); + const themeTextShadow = fromTheme('text-shadow'); + const themeDropShadow = fromTheme('drop-shadow'); + const themeBlur = fromTheme('blur'); + const themePerspective = fromTheme('perspective'); + const themeAspect = fromTheme('aspect'); + const themeEase = fromTheme('ease'); + const themeAnimate = fromTheme('animate'); + /** + * Helpers to avoid repeating the same scales + * + * We use functions that create a new array every time they're called instead of static arrays. + * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config. + */ + /***/ + const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column']; + const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left', + // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 + 'left-top', 'top-right', + // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 + 'right-top', 'bottom-right', + // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 + 'right-bottom', 'bottom-left', + // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378 + 'left-bottom']; + const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue]; + const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll']; + const scaleOverscroll = () => ['auto', 'contain', 'none']; + const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing]; + const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()]; + const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue]; + const scaleGridColRowStartAndEnd = () => ['auto', { + span: ['full', isInteger, isArbitraryVariable, isArbitraryValue] + }, isInteger, isArbitraryVariable, isArbitraryValue]; + const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]; + const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue]; + const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe']; + const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe']; + const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()]; + const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()]; + const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()]; + const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()]; + const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue]; + const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, { + position: [isArbitraryVariable, isArbitraryValue] + }]; + const scaleBgRepeat = () => ['no-repeat', { + repeat: ['', 'x', 'y', 'space', 'round'] + }]; + const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, { + size: [isArbitraryVariable, isArbitraryValue] + }]; + const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength]; + const scaleRadius = () => [ + // Deprecated since Tailwind CSS v4.0.0 + '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue]; + const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength]; + const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double']; + const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']; + const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition]; + const scaleBlur = () => [ + // Deprecated since Tailwind CSS v4.0.0 + '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue]; + const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue]; + const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue]; + const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue]; + const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()]; + return { + cacheSize: 500, + theme: { + animate: ['spin', 'ping', 'pulse', 'bounce'], + aspect: ['video'], + blur: [isTshirtSize], + breakpoint: [isTshirtSize], + color: [isAny], + container: [isTshirtSize], + 'drop-shadow': [isTshirtSize], + ease: ['in', 'out', 'in-out'], + font: [isAnyNonArbitrary], + 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'], + 'inset-shadow': [isTshirtSize], + leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'], + perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'], + radius: [isTshirtSize], + shadow: [isTshirtSize], + spacing: ['px', isNumber], + text: [isTshirtSize], + 'text-shadow': [isTshirtSize], + tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest'] + }, + classGroups: { + // -------------- + // --- Layout --- + // -------------- + /** + * Aspect Ratio + * @see https://tailwindcss.com/docs/aspect-ratio + */ + aspect: [{ + aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect] + }], + /** + * Container + * @see https://tailwindcss.com/docs/container + * @deprecated since Tailwind CSS v4.0.0 + */ + container: ['container'], + /** + * Container Type + * @see https://tailwindcss.com/docs/responsive-design#container-queries + */ + 'container-type': [{ + '@container': ['', 'normal', 'size', isArbitraryVariable, isArbitraryValue] + }], + /** + * Container Name + * @see https://tailwindcss.com/docs/responsive-design#named-containers + */ + 'container-named': [isNamedContainerQuery], + /** + * Columns + * @see https://tailwindcss.com/docs/columns + */ + columns: [{ + columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer] + }], + /** + * Break After + * @see https://tailwindcss.com/docs/break-after + */ + 'break-after': [{ + 'break-after': scaleBreak() + }], + /** + * Break Before + * @see https://tailwindcss.com/docs/break-before + */ + 'break-before': [{ + 'break-before': scaleBreak() + }], + /** + * Break Inside + * @see https://tailwindcss.com/docs/break-inside + */ + 'break-inside': [{ + 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column'] + }], + /** + * Box Decoration Break + * @see https://tailwindcss.com/docs/box-decoration-break + */ + 'box-decoration': [{ + 'box-decoration': ['slice', 'clone'] + }], + /** + * Box Sizing + * @see https://tailwindcss.com/docs/box-sizing + */ + box: [{ + box: ['border', 'content'] + }], + /** + * Display + * @see https://tailwindcss.com/docs/display + */ + display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'], + /** + * Screen Reader Only + * @see https://tailwindcss.com/docs/display#screen-reader-only + */ + sr: ['sr-only', 'not-sr-only'], + /** + * Floats + * @see https://tailwindcss.com/docs/float + */ + float: [{ + float: ['right', 'left', 'none', 'start', 'end'] + }], + /** + * Clear + * @see https://tailwindcss.com/docs/clear + */ + clear: [{ + clear: ['left', 'right', 'both', 'none', 'start', 'end'] + }], + /** + * Isolation + * @see https://tailwindcss.com/docs/isolation + */ + isolation: ['isolate', 'isolation-auto'], + /** + * Object Fit + * @see https://tailwindcss.com/docs/object-fit + */ + 'object-fit': [{ + object: ['contain', 'cover', 'fill', 'none', 'scale-down'] + }], + /** + * Object Position + * @see https://tailwindcss.com/docs/object-position + */ + 'object-position': [{ + object: scalePositionWithArbitrary() + }], + /** + * Overflow + * @see https://tailwindcss.com/docs/overflow + */ + overflow: [{ + overflow: scaleOverflow() + }], + /** + * Overflow X + * @see https://tailwindcss.com/docs/overflow + */ + 'overflow-x': [{ + 'overflow-x': scaleOverflow() + }], + /** + * Overflow Y + * @see https://tailwindcss.com/docs/overflow + */ + 'overflow-y': [{ + 'overflow-y': scaleOverflow() + }], + /** + * Overscroll Behavior + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + overscroll: [{ + overscroll: scaleOverscroll() + }], + /** + * Overscroll Behavior X + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + 'overscroll-x': [{ + 'overscroll-x': scaleOverscroll() + }], + /** + * Overscroll Behavior Y + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + 'overscroll-y': [{ + 'overscroll-y': scaleOverscroll() + }], + /** + * Position + * @see https://tailwindcss.com/docs/position + */ + position: ['static', 'fixed', 'absolute', 'relative', 'sticky'], + /** + * Inset + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + inset: [{ + inset: scaleInset() + }], + /** + * Inset Inline + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + 'inset-x': [{ + 'inset-x': scaleInset() + }], + /** + * Inset Block + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + 'inset-y': [{ + 'inset-y': scaleInset() + }], + /** + * Inset Inline Start + * @see https://tailwindcss.com/docs/top-right-bottom-left + * @todo class group will be renamed to `inset-s` in next major release + */ + start: [{ + 'inset-s': scaleInset(), + /** + * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities. + * @see https://github.com/tailwindlabs/tailwindcss/pull/19613 + */ + start: scaleInset() + }], + /** + * Inset Inline End + * @see https://tailwindcss.com/docs/top-right-bottom-left + * @todo class group will be renamed to `inset-e` in next major release + */ + end: [{ + 'inset-e': scaleInset(), + /** + * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities. + * @see https://github.com/tailwindlabs/tailwindcss/pull/19613 + */ + end: scaleInset() + }], + /** + * Inset Block Start + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + 'inset-bs': [{ + 'inset-bs': scaleInset() + }], + /** + * Inset Block End + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + 'inset-be': [{ + 'inset-be': scaleInset() + }], + /** + * Top + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + top: [{ + top: scaleInset() + }], + /** + * Right + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + right: [{ + right: scaleInset() + }], + /** + * Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + bottom: [{ + bottom: scaleInset() + }], + /** + * Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + left: [{ + left: scaleInset() + }], + /** + * Visibility + * @see https://tailwindcss.com/docs/visibility + */ + visibility: ['visible', 'invisible', 'collapse'], + /** + * Z-Index + * @see https://tailwindcss.com/docs/z-index + */ + z: [{ + z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue] + }], + // ------------------------ + // --- Flexbox and Grid --- + // ------------------------ + /** + * Flex Basis + * @see https://tailwindcss.com/docs/flex-basis + */ + basis: [{ + basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()] + }], + /** + * Flex Direction + * @see https://tailwindcss.com/docs/flex-direction + */ + 'flex-direction': [{ + flex: ['row', 'row-reverse', 'col', 'col-reverse'] + }], + /** + * Flex Wrap + * @see https://tailwindcss.com/docs/flex-wrap + */ + 'flex-wrap': [{ + flex: ['nowrap', 'wrap', 'wrap-reverse'] + }], + /** + * Flex + * @see https://tailwindcss.com/docs/flex + */ + flex: [{ + flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue] + }], + /** + * Flex Grow + * @see https://tailwindcss.com/docs/flex-grow + */ + grow: [{ + grow: ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Flex Shrink + * @see https://tailwindcss.com/docs/flex-shrink + */ + shrink: [{ + shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Order + * @see https://tailwindcss.com/docs/order + */ + order: [{ + order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue] + }], + /** + * Grid Template Columns + * @see https://tailwindcss.com/docs/grid-template-columns + */ + 'grid-cols': [{ + 'grid-cols': scaleGridTemplateColsRows() + }], + /** + * Grid Column Start / End + * @see https://tailwindcss.com/docs/grid-column + */ + 'col-start-end': [{ + col: scaleGridColRowStartAndEnd() + }], + /** + * Grid Column Start + * @see https://tailwindcss.com/docs/grid-column + */ + 'col-start': [{ + 'col-start': scaleGridColRowStartOrEnd() + }], + /** + * Grid Column End + * @see https://tailwindcss.com/docs/grid-column + */ + 'col-end': [{ + 'col-end': scaleGridColRowStartOrEnd() + }], + /** + * Grid Template Rows + * @see https://tailwindcss.com/docs/grid-template-rows + */ + 'grid-rows': [{ + 'grid-rows': scaleGridTemplateColsRows() + }], + /** + * Grid Row Start / End + * @see https://tailwindcss.com/docs/grid-row + */ + 'row-start-end': [{ + row: scaleGridColRowStartAndEnd() + }], + /** + * Grid Row Start + * @see https://tailwindcss.com/docs/grid-row + */ + 'row-start': [{ + 'row-start': scaleGridColRowStartOrEnd() + }], + /** + * Grid Row End + * @see https://tailwindcss.com/docs/grid-row + */ + 'row-end': [{ + 'row-end': scaleGridColRowStartOrEnd() + }], + /** + * Grid Auto Flow + * @see https://tailwindcss.com/docs/grid-auto-flow + */ + 'grid-flow': [{ + 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense'] + }], + /** + * Grid Auto Columns + * @see https://tailwindcss.com/docs/grid-auto-columns + */ + 'auto-cols': [{ + 'auto-cols': scaleGridAutoColsRows() + }], + /** + * Grid Auto Rows + * @see https://tailwindcss.com/docs/grid-auto-rows + */ + 'auto-rows': [{ + 'auto-rows': scaleGridAutoColsRows() + }], + /** + * Gap + * @see https://tailwindcss.com/docs/gap + */ + gap: [{ + gap: scaleUnambiguousSpacing() + }], + /** + * Gap X + * @see https://tailwindcss.com/docs/gap + */ + 'gap-x': [{ + 'gap-x': scaleUnambiguousSpacing() + }], + /** + * Gap Y + * @see https://tailwindcss.com/docs/gap + */ + 'gap-y': [{ + 'gap-y': scaleUnambiguousSpacing() + }], + /** + * Justify Content + * @see https://tailwindcss.com/docs/justify-content + */ + 'justify-content': [{ + justify: [...scaleAlignPrimaryAxis(), 'normal'] + }], + /** + * Justify Items + * @see https://tailwindcss.com/docs/justify-items + */ + 'justify-items': [{ + 'justify-items': [...scaleAlignSecondaryAxis(), 'normal'] + }], + /** + * Justify Self + * @see https://tailwindcss.com/docs/justify-self + */ + 'justify-self': [{ + 'justify-self': ['auto', ...scaleAlignSecondaryAxis()] + }], + /** + * Align Content + * @see https://tailwindcss.com/docs/align-content + */ + 'align-content': [{ + content: ['normal', ...scaleAlignPrimaryAxis()] + }], + /** + * Align Items + * @see https://tailwindcss.com/docs/align-items + */ + 'align-items': [{ + items: [...scaleAlignSecondaryAxis(), { + baseline: ['', 'last'] + }] + }], + /** + * Align Self + * @see https://tailwindcss.com/docs/align-self + */ + 'align-self': [{ + self: ['auto', ...scaleAlignSecondaryAxis(), { + baseline: ['', 'last'] + }] + }], + /** + * Place Content + * @see https://tailwindcss.com/docs/place-content + */ + 'place-content': [{ + 'place-content': scaleAlignPrimaryAxis() + }], + /** + * Place Items + * @see https://tailwindcss.com/docs/place-items + */ + 'place-items': [{ + 'place-items': [...scaleAlignSecondaryAxis(), 'baseline'] + }], + /** + * Place Self + * @see https://tailwindcss.com/docs/place-self + */ + 'place-self': [{ + 'place-self': ['auto', ...scaleAlignSecondaryAxis()] + }], + // Spacing + /** + * Padding + * @see https://tailwindcss.com/docs/padding + */ + p: [{ + p: scaleUnambiguousSpacing() + }], + /** + * Padding Inline + * @see https://tailwindcss.com/docs/padding + */ + px: [{ + px: scaleUnambiguousSpacing() + }], + /** + * Padding Block + * @see https://tailwindcss.com/docs/padding + */ + py: [{ + py: scaleUnambiguousSpacing() + }], + /** + * Padding Inline Start + * @see https://tailwindcss.com/docs/padding + */ + ps: [{ + ps: scaleUnambiguousSpacing() + }], + /** + * Padding Inline End + * @see https://tailwindcss.com/docs/padding + */ + pe: [{ + pe: scaleUnambiguousSpacing() + }], + /** + * Padding Block Start + * @see https://tailwindcss.com/docs/padding + */ + pbs: [{ + pbs: scaleUnambiguousSpacing() + }], + /** + * Padding Block End + * @see https://tailwindcss.com/docs/padding + */ + pbe: [{ + pbe: scaleUnambiguousSpacing() + }], + /** + * Padding Top + * @see https://tailwindcss.com/docs/padding + */ + pt: [{ + pt: scaleUnambiguousSpacing() + }], + /** + * Padding Right + * @see https://tailwindcss.com/docs/padding + */ + pr: [{ + pr: scaleUnambiguousSpacing() + }], + /** + * Padding Bottom + * @see https://tailwindcss.com/docs/padding + */ + pb: [{ + pb: scaleUnambiguousSpacing() + }], + /** + * Padding Left + * @see https://tailwindcss.com/docs/padding + */ + pl: [{ + pl: scaleUnambiguousSpacing() + }], + /** + * Margin + * @see https://tailwindcss.com/docs/margin + */ + m: [{ + m: scaleMargin() + }], + /** + * Margin Inline + * @see https://tailwindcss.com/docs/margin + */ + mx: [{ + mx: scaleMargin() + }], + /** + * Margin Block + * @see https://tailwindcss.com/docs/margin + */ + my: [{ + my: scaleMargin() + }], + /** + * Margin Inline Start + * @see https://tailwindcss.com/docs/margin + */ + ms: [{ + ms: scaleMargin() + }], + /** + * Margin Inline End + * @see https://tailwindcss.com/docs/margin + */ + me: [{ + me: scaleMargin() + }], + /** + * Margin Block Start + * @see https://tailwindcss.com/docs/margin + */ + mbs: [{ + mbs: scaleMargin() + }], + /** + * Margin Block End + * @see https://tailwindcss.com/docs/margin + */ + mbe: [{ + mbe: scaleMargin() + }], + /** + * Margin Top + * @see https://tailwindcss.com/docs/margin + */ + mt: [{ + mt: scaleMargin() + }], + /** + * Margin Right + * @see https://tailwindcss.com/docs/margin + */ + mr: [{ + mr: scaleMargin() + }], + /** + * Margin Bottom + * @see https://tailwindcss.com/docs/margin + */ + mb: [{ + mb: scaleMargin() + }], + /** + * Margin Left + * @see https://tailwindcss.com/docs/margin + */ + ml: [{ + ml: scaleMargin() + }], + /** + * Space Between X + * @see https://tailwindcss.com/docs/margin#adding-space-between-children + */ + 'space-x': [{ + 'space-x': scaleUnambiguousSpacing() + }], + /** + * Space Between X Reverse + * @see https://tailwindcss.com/docs/margin#adding-space-between-children + */ + 'space-x-reverse': ['space-x-reverse'], + /** + * Space Between Y + * @see https://tailwindcss.com/docs/margin#adding-space-between-children + */ + 'space-y': [{ + 'space-y': scaleUnambiguousSpacing() + }], + /** + * Space Between Y Reverse + * @see https://tailwindcss.com/docs/margin#adding-space-between-children + */ + 'space-y-reverse': ['space-y-reverse'], + // -------------- + // --- Sizing --- + // -------------- + /** + * Size + * @see https://tailwindcss.com/docs/width#setting-both-width-and-height + */ + size: [{ + size: scaleSizing() + }], + /** + * Inline Size + * @see https://tailwindcss.com/docs/width + */ + 'inline-size': [{ + inline: ['auto', ...scaleSizingInline()] + }], + /** + * Min-Inline Size + * @see https://tailwindcss.com/docs/min-width + */ + 'min-inline-size': [{ + 'min-inline': ['auto', ...scaleSizingInline()] + }], + /** + * Max-Inline Size + * @see https://tailwindcss.com/docs/max-width + */ + 'max-inline-size': [{ + 'max-inline': ['none', ...scaleSizingInline()] + }], + /** + * Block Size + * @see https://tailwindcss.com/docs/height + */ + 'block-size': [{ + block: ['auto', ...scaleSizingBlock()] + }], + /** + * Min-Block Size + * @see https://tailwindcss.com/docs/min-height + */ + 'min-block-size': [{ + 'min-block': ['auto', ...scaleSizingBlock()] + }], + /** + * Max-Block Size + * @see https://tailwindcss.com/docs/max-height + */ + 'max-block-size': [{ + 'max-block': ['none', ...scaleSizingBlock()] + }], + /** + * Width + * @see https://tailwindcss.com/docs/width + */ + w: [{ + w: [themeContainer, 'screen', ...scaleSizing()] + }], + /** + * Min-Width + * @see https://tailwindcss.com/docs/min-width + */ + 'min-w': [{ + 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ + 'none', ...scaleSizing()] + }], + /** + * Max-Width + * @see https://tailwindcss.com/docs/max-width + */ + 'max-w': [{ + 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ + 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ + { + screen: [themeBreakpoint] + }, ...scaleSizing()] + }], + /** + * Height + * @see https://tailwindcss.com/docs/height + */ + h: [{ + h: ['screen', 'lh', ...scaleSizing()] + }], + /** + * Min-Height + * @see https://tailwindcss.com/docs/min-height + */ + 'min-h': [{ + 'min-h': ['screen', 'lh', 'none', ...scaleSizing()] + }], + /** + * Max-Height + * @see https://tailwindcss.com/docs/max-height + */ + 'max-h': [{ + 'max-h': ['screen', 'lh', ...scaleSizing()] + }], + // ------------------ + // --- Typography --- + // ------------------ + /** + * Font Size + * @see https://tailwindcss.com/docs/font-size + */ + 'font-size': [{ + text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength] + }], + /** + * Font Smoothing + * @see https://tailwindcss.com/docs/font-smoothing + */ + 'font-smoothing': ['antialiased', 'subpixel-antialiased'], + /** + * Font Style + * @see https://tailwindcss.com/docs/font-style + */ + 'font-style': ['italic', 'not-italic'], + /** + * Font Weight + * @see https://tailwindcss.com/docs/font-weight + */ + 'font-weight': [{ + font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight] + }], + /** + * Font Stretch + * @see https://tailwindcss.com/docs/font-stretch + */ + 'font-stretch': [{ + 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue] + }], + /** + * Font Family + * @see https://tailwindcss.com/docs/font-family + */ + 'font-family': [{ + font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont] + }], + /** + * Font Feature Settings + * @see https://tailwindcss.com/docs/font-feature-settings + */ + 'font-features': [{ + 'font-features': [isArbitraryValue] + }], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-normal': ['normal-nums'], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-ordinal': ['ordinal'], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-slashed-zero': ['slashed-zero'], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-figure': ['lining-nums', 'oldstyle-nums'], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-spacing': ['proportional-nums', 'tabular-nums'], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'], + /** + * Letter Spacing + * @see https://tailwindcss.com/docs/letter-spacing + */ + tracking: [{ + tracking: [themeTracking, isArbitraryVariable, isArbitraryValue] + }], + /** + * Line Clamp + * @see https://tailwindcss.com/docs/line-clamp + */ + 'line-clamp': [{ + 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber] + }], + /** + * Line Height + * @see https://tailwindcss.com/docs/line-height + */ + leading: [{ + leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */ + themeLeading, ...scaleUnambiguousSpacing()] + }], + /** + * List Style Image + * @see https://tailwindcss.com/docs/list-style-image + */ + 'list-image': [{ + 'list-image': ['none', isArbitraryVariable, isArbitraryValue] + }], + /** + * List Style Position + * @see https://tailwindcss.com/docs/list-style-position + */ + 'list-style-position': [{ + list: ['inside', 'outside'] + }], + /** + * List Style Type + * @see https://tailwindcss.com/docs/list-style-type + */ + 'list-style-type': [{ + list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue] + }], + /** + * Text Alignment + * @see https://tailwindcss.com/docs/text-align + */ + 'text-alignment': [{ + text: ['left', 'center', 'right', 'justify', 'start', 'end'] + }], + /** + * Placeholder Color + * @deprecated since Tailwind CSS v3.0.0 + * @see https://v3.tailwindcss.com/docs/placeholder-color + */ + 'placeholder-color': [{ + placeholder: scaleColor() + }], + /** + * Text Color + * @see https://tailwindcss.com/docs/text-color + */ + 'text-color': [{ + text: scaleColor() + }], + /** + * Text Decoration + * @see https://tailwindcss.com/docs/text-decoration + */ + 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'], + /** + * Text Decoration Style + * @see https://tailwindcss.com/docs/text-decoration-style + */ + 'text-decoration-style': [{ + decoration: [...scaleLineStyle(), 'wavy'] + }], + /** + * Text Decoration Thickness + * @see https://tailwindcss.com/docs/text-decoration-thickness + */ + 'text-decoration-thickness': [{ + decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength] + }], + /** + * Text Decoration Color + * @see https://tailwindcss.com/docs/text-decoration-color + */ + 'text-decoration-color': [{ + decoration: scaleColor() + }], + /** + * Text Underline Offset + * @see https://tailwindcss.com/docs/text-underline-offset + */ + 'underline-offset': [{ + 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue] + }], + /** + * Text Transform + * @see https://tailwindcss.com/docs/text-transform + */ + 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'], + /** + * Text Overflow + * @see https://tailwindcss.com/docs/text-overflow + */ + 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'], + /** + * Text Wrap + * @see https://tailwindcss.com/docs/text-wrap + */ + 'text-wrap': [{ + text: ['wrap', 'nowrap', 'balance', 'pretty'] + }], + /** + * Text Indent + * @see https://tailwindcss.com/docs/text-indent + */ + indent: [{ + indent: scaleUnambiguousSpacing() + }], + /** + * Tab Size + * @see https://tailwindcss.com/docs/tab-size + */ + 'tab-size': [{ + tab: [isInteger, isArbitraryVariable, isArbitraryValue] + }], + /** + * Vertical Alignment + * @see https://tailwindcss.com/docs/vertical-align + */ + 'vertical-align': [{ + align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue] + }], + /** + * Whitespace + * @see https://tailwindcss.com/docs/whitespace + */ + whitespace: [{ + whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'] + }], + /** + * Word Break + * @see https://tailwindcss.com/docs/word-break + */ + break: [{ + break: ['normal', 'words', 'all', 'keep'] + }], + /** + * Overflow Wrap + * @see https://tailwindcss.com/docs/overflow-wrap + */ + wrap: [{ + wrap: ['break-word', 'anywhere', 'normal'] + }], + /** + * Hyphens + * @see https://tailwindcss.com/docs/hyphens + */ + hyphens: [{ + hyphens: ['none', 'manual', 'auto'] + }], + /** + * Content + * @see https://tailwindcss.com/docs/content + */ + content: [{ + content: ['none', isArbitraryVariable, isArbitraryValue] + }], + // ------------------- + // --- Backgrounds --- + // ------------------- + /** + * Background Attachment + * @see https://tailwindcss.com/docs/background-attachment + */ + 'bg-attachment': [{ + bg: ['fixed', 'local', 'scroll'] + }], + /** + * Background Clip + * @see https://tailwindcss.com/docs/background-clip + */ + 'bg-clip': [{ + 'bg-clip': ['border', 'padding', 'content', 'text'] + }], + /** + * Background Origin + * @see https://tailwindcss.com/docs/background-origin + */ + 'bg-origin': [{ + 'bg-origin': ['border', 'padding', 'content'] + }], + /** + * Background Position + * @see https://tailwindcss.com/docs/background-position + */ + 'bg-position': [{ + bg: scaleBgPosition() + }], + /** + * Background Repeat + * @see https://tailwindcss.com/docs/background-repeat + */ + 'bg-repeat': [{ + bg: scaleBgRepeat() + }], + /** + * Background Size + * @see https://tailwindcss.com/docs/background-size + */ + 'bg-size': [{ + bg: scaleBgSize() + }], + /** + * Background Image + * @see https://tailwindcss.com/docs/background-image + */ + 'bg-image': [{ + bg: ['none', { + linear: [{ + to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl'] + }, isInteger, isArbitraryVariable, isArbitraryValue], + radial: ['', isArbitraryVariable, isArbitraryValue], + conic: [isInteger, isArbitraryVariable, isArbitraryValue] + }, isArbitraryVariableImage, isArbitraryImage] + }], + /** + * Background Color + * @see https://tailwindcss.com/docs/background-color + */ + 'bg-color': [{ + bg: scaleColor() + }], + /** + * Gradient Color Stops From Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-from-pos': [{ + from: scaleGradientStopPosition() + }], + /** + * Gradient Color Stops Via Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-via-pos': [{ + via: scaleGradientStopPosition() + }], + /** + * Gradient Color Stops To Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-to-pos': [{ + to: scaleGradientStopPosition() + }], + /** + * Gradient Color Stops From + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-from': [{ + from: scaleColor() + }], + /** + * Gradient Color Stops Via + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-via': [{ + via: scaleColor() + }], + /** + * Gradient Color Stops To + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + 'gradient-to': [{ + to: scaleColor() + }], + // --------------- + // --- Borders --- + // --------------- + /** + * Border Radius + * @see https://tailwindcss.com/docs/border-radius + */ + rounded: [{ + rounded: scaleRadius() + }], + /** + * Border Radius Start + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-s': [{ + 'rounded-s': scaleRadius() + }], + /** + * Border Radius End + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-e': [{ + 'rounded-e': scaleRadius() + }], + /** + * Border Radius Top + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-t': [{ + 'rounded-t': scaleRadius() + }], + /** + * Border Radius Right + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-r': [{ + 'rounded-r': scaleRadius() + }], + /** + * Border Radius Bottom + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-b': [{ + 'rounded-b': scaleRadius() + }], + /** + * Border Radius Left + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-l': [{ + 'rounded-l': scaleRadius() + }], + /** + * Border Radius Start Start + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-ss': [{ + 'rounded-ss': scaleRadius() + }], + /** + * Border Radius Start End + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-se': [{ + 'rounded-se': scaleRadius() + }], + /** + * Border Radius End End + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-ee': [{ + 'rounded-ee': scaleRadius() + }], + /** + * Border Radius End Start + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-es': [{ + 'rounded-es': scaleRadius() + }], + /** + * Border Radius Top Left + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-tl': [{ + 'rounded-tl': scaleRadius() + }], + /** + * Border Radius Top Right + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-tr': [{ + 'rounded-tr': scaleRadius() + }], + /** + * Border Radius Bottom Right + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-br': [{ + 'rounded-br': scaleRadius() + }], + /** + * Border Radius Bottom Left + * @see https://tailwindcss.com/docs/border-radius + */ + 'rounded-bl': [{ + 'rounded-bl': scaleRadius() + }], + /** + * Border Width + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w': [{ + border: scaleBorderWidth() + }], + /** + * Border Width Inline + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-x': [{ + 'border-x': scaleBorderWidth() + }], + /** + * Border Width Block + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-y': [{ + 'border-y': scaleBorderWidth() + }], + /** + * Border Width Inline Start + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-s': [{ + 'border-s': scaleBorderWidth() + }], + /** + * Border Width Inline End + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-e': [{ + 'border-e': scaleBorderWidth() + }], + /** + * Border Width Block Start + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-bs': [{ + 'border-bs': scaleBorderWidth() + }], + /** + * Border Width Block End + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-be': [{ + 'border-be': scaleBorderWidth() + }], + /** + * Border Width Top + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-t': [{ + 'border-t': scaleBorderWidth() + }], + /** + * Border Width Right + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-r': [{ + 'border-r': scaleBorderWidth() + }], + /** + * Border Width Bottom + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-b': [{ + 'border-b': scaleBorderWidth() + }], + /** + * Border Width Left + * @see https://tailwindcss.com/docs/border-width + */ + 'border-w-l': [{ + 'border-l': scaleBorderWidth() + }], + /** + * Divide Width X + * @see https://tailwindcss.com/docs/border-width#between-children + */ + 'divide-x': [{ + 'divide-x': scaleBorderWidth() + }], + /** + * Divide Width X Reverse + * @see https://tailwindcss.com/docs/border-width#between-children + */ + 'divide-x-reverse': ['divide-x-reverse'], + /** + * Divide Width Y + * @see https://tailwindcss.com/docs/border-width#between-children + */ + 'divide-y': [{ + 'divide-y': scaleBorderWidth() + }], + /** + * Divide Width Y Reverse + * @see https://tailwindcss.com/docs/border-width#between-children + */ + 'divide-y-reverse': ['divide-y-reverse'], + /** + * Border Style + * @see https://tailwindcss.com/docs/border-style + */ + 'border-style': [{ + border: [...scaleLineStyle(), 'hidden', 'none'] + }], + /** + * Divide Style + * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style + */ + 'divide-style': [{ + divide: [...scaleLineStyle(), 'hidden', 'none'] + }], + /** + * Border Color + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color': [{ + border: scaleColor() + }], + /** + * Border Color Inline + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-x': [{ + 'border-x': scaleColor() + }], + /** + * Border Color Block + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-y': [{ + 'border-y': scaleColor() + }], + /** + * Border Color Inline Start + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-s': [{ + 'border-s': scaleColor() + }], + /** + * Border Color Inline End + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-e': [{ + 'border-e': scaleColor() + }], + /** + * Border Color Block Start + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-bs': [{ + 'border-bs': scaleColor() + }], + /** + * Border Color Block End + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-be': [{ + 'border-be': scaleColor() + }], + /** + * Border Color Top + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-t': [{ + 'border-t': scaleColor() + }], + /** + * Border Color Right + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-r': [{ + 'border-r': scaleColor() + }], + /** + * Border Color Bottom + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-b': [{ + 'border-b': scaleColor() + }], + /** + * Border Color Left + * @see https://tailwindcss.com/docs/border-color + */ + 'border-color-l': [{ + 'border-l': scaleColor() + }], + /** + * Divide Color + * @see https://tailwindcss.com/docs/divide-color + */ + 'divide-color': [{ + divide: scaleColor() + }], + /** + * Outline Style + * @see https://tailwindcss.com/docs/outline-style + */ + 'outline-style': [{ + outline: [...scaleLineStyle(), 'none', 'hidden'] + }], + /** + * Outline Offset + * @see https://tailwindcss.com/docs/outline-offset + */ + 'outline-offset': [{ + 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Outline Width + * @see https://tailwindcss.com/docs/outline-width + */ + 'outline-w': [{ + outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength] + }], + /** + * Outline Color + * @see https://tailwindcss.com/docs/outline-color + */ + 'outline-color': [{ + outline: scaleColor() + }], + // --------------- + // --- Effects --- + // --------------- + /** + * Box Shadow + * @see https://tailwindcss.com/docs/box-shadow + */ + shadow: [{ + shadow: [ + // Deprecated since Tailwind CSS v4.0.0 + '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow] + }], + /** + * Box Shadow Color + * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color + */ + 'shadow-color': [{ + shadow: scaleColor() + }], + /** + * Inset Box Shadow + * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow + */ + 'inset-shadow': [{ + 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow] + }], + /** + * Inset Box Shadow Color + * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color + */ + 'inset-shadow-color': [{ + 'inset-shadow': scaleColor() + }], + /** + * Ring Width + * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring + */ + 'ring-w': [{ + ring: scaleBorderWidth() + }], + /** + * Ring Width Inset + * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings + * @deprecated since Tailwind CSS v4.0.0 + * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158 + */ + 'ring-w-inset': ['ring-inset'], + /** + * Ring Color + * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color + */ + 'ring-color': [{ + ring: scaleColor() + }], + /** + * Ring Offset Width + * @see https://v3.tailwindcss.com/docs/ring-offset-width + * @deprecated since Tailwind CSS v4.0.0 + * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158 + */ + 'ring-offset-w': [{ + 'ring-offset': [isNumber, isArbitraryLength] + }], + /** + * Ring Offset Color + * @see https://v3.tailwindcss.com/docs/ring-offset-color + * @deprecated since Tailwind CSS v4.0.0 + * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158 + */ + 'ring-offset-color': [{ + 'ring-offset': scaleColor() + }], + /** + * Inset Ring Width + * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring + */ + 'inset-ring-w': [{ + 'inset-ring': scaleBorderWidth() + }], + /** + * Inset Ring Color + * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color + */ + 'inset-ring-color': [{ + 'inset-ring': scaleColor() + }], + /** + * Text Shadow + * @see https://tailwindcss.com/docs/text-shadow + */ + 'text-shadow': [{ + 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow] + }], + /** + * Text Shadow Color + * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color + */ + 'text-shadow-color': [{ + 'text-shadow': scaleColor() + }], + /** + * Opacity + * @see https://tailwindcss.com/docs/opacity + */ + opacity: [{ + opacity: [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Mix Blend Mode + * @see https://tailwindcss.com/docs/mix-blend-mode + */ + 'mix-blend': [{ + 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter'] + }], + /** + * Background Blend Mode + * @see https://tailwindcss.com/docs/background-blend-mode + */ + 'bg-blend': [{ + 'bg-blend': scaleBlendMode() + }], + /** + * Mask Clip + * @see https://tailwindcss.com/docs/mask-clip + */ + 'mask-clip': [{ + 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view'] + }, 'mask-no-clip'], + /** + * Mask Composite + * @see https://tailwindcss.com/docs/mask-composite + */ + 'mask-composite': [{ + mask: ['add', 'subtract', 'intersect', 'exclude'] + }], + /** + * Mask Image + * @see https://tailwindcss.com/docs/mask-image + */ + 'mask-image-linear-pos': [{ + 'mask-linear': [isNumber] + }], + 'mask-image-linear-from-pos': [{ + 'mask-linear-from': scaleMaskImagePosition() + }], + 'mask-image-linear-to-pos': [{ + 'mask-linear-to': scaleMaskImagePosition() + }], + 'mask-image-linear-from-color': [{ + 'mask-linear-from': scaleColor() + }], + 'mask-image-linear-to-color': [{ + 'mask-linear-to': scaleColor() + }], + 'mask-image-t-from-pos': [{ + 'mask-t-from': scaleMaskImagePosition() + }], + 'mask-image-t-to-pos': [{ + 'mask-t-to': scaleMaskImagePosition() + }], + 'mask-image-t-from-color': [{ + 'mask-t-from': scaleColor() + }], + 'mask-image-t-to-color': [{ + 'mask-t-to': scaleColor() + }], + 'mask-image-r-from-pos': [{ + 'mask-r-from': scaleMaskImagePosition() + }], + 'mask-image-r-to-pos': [{ + 'mask-r-to': scaleMaskImagePosition() + }], + 'mask-image-r-from-color': [{ + 'mask-r-from': scaleColor() + }], + 'mask-image-r-to-color': [{ + 'mask-r-to': scaleColor() + }], + 'mask-image-b-from-pos': [{ + 'mask-b-from': scaleMaskImagePosition() + }], + 'mask-image-b-to-pos': [{ + 'mask-b-to': scaleMaskImagePosition() + }], + 'mask-image-b-from-color': [{ + 'mask-b-from': scaleColor() + }], + 'mask-image-b-to-color': [{ + 'mask-b-to': scaleColor() + }], + 'mask-image-l-from-pos': [{ + 'mask-l-from': scaleMaskImagePosition() + }], + 'mask-image-l-to-pos': [{ + 'mask-l-to': scaleMaskImagePosition() + }], + 'mask-image-l-from-color': [{ + 'mask-l-from': scaleColor() + }], + 'mask-image-l-to-color': [{ + 'mask-l-to': scaleColor() + }], + 'mask-image-x-from-pos': [{ + 'mask-x-from': scaleMaskImagePosition() + }], + 'mask-image-x-to-pos': [{ + 'mask-x-to': scaleMaskImagePosition() + }], + 'mask-image-x-from-color': [{ + 'mask-x-from': scaleColor() + }], + 'mask-image-x-to-color': [{ + 'mask-x-to': scaleColor() + }], + 'mask-image-y-from-pos': [{ + 'mask-y-from': scaleMaskImagePosition() + }], + 'mask-image-y-to-pos': [{ + 'mask-y-to': scaleMaskImagePosition() + }], + 'mask-image-y-from-color': [{ + 'mask-y-from': scaleColor() + }], + 'mask-image-y-to-color': [{ + 'mask-y-to': scaleColor() + }], + 'mask-image-radial': [{ + 'mask-radial': [isArbitraryVariable, isArbitraryValue] + }], + 'mask-image-radial-from-pos': [{ + 'mask-radial-from': scaleMaskImagePosition() + }], + 'mask-image-radial-to-pos': [{ + 'mask-radial-to': scaleMaskImagePosition() + }], + 'mask-image-radial-from-color': [{ + 'mask-radial-from': scaleColor() + }], + 'mask-image-radial-to-color': [{ + 'mask-radial-to': scaleColor() + }], + 'mask-image-radial-shape': [{ + 'mask-radial': ['circle', 'ellipse'] + }], + 'mask-image-radial-size': [{ + 'mask-radial': [{ + closest: ['side', 'corner'], + farthest: ['side', 'corner'] + }] + }], + 'mask-image-radial-pos': [{ + 'mask-radial-at': scalePosition() + }], + 'mask-image-conic-pos': [{ + 'mask-conic': [isNumber] + }], + 'mask-image-conic-from-pos': [{ + 'mask-conic-from': scaleMaskImagePosition() + }], + 'mask-image-conic-to-pos': [{ + 'mask-conic-to': scaleMaskImagePosition() + }], + 'mask-image-conic-from-color': [{ + 'mask-conic-from': scaleColor() + }], + 'mask-image-conic-to-color': [{ + 'mask-conic-to': scaleColor() + }], + /** + * Mask Mode + * @see https://tailwindcss.com/docs/mask-mode + */ + 'mask-mode': [{ + mask: ['alpha', 'luminance', 'match'] + }], + /** + * Mask Origin + * @see https://tailwindcss.com/docs/mask-origin + */ + 'mask-origin': [{ + 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view'] + }], + /** + * Mask Position + * @see https://tailwindcss.com/docs/mask-position + */ + 'mask-position': [{ + mask: scaleBgPosition() + }], + /** + * Mask Repeat + * @see https://tailwindcss.com/docs/mask-repeat + */ + 'mask-repeat': [{ + mask: scaleBgRepeat() + }], + /** + * Mask Size + * @see https://tailwindcss.com/docs/mask-size + */ + 'mask-size': [{ + mask: scaleBgSize() + }], + /** + * Mask Type + * @see https://tailwindcss.com/docs/mask-type + */ + 'mask-type': [{ + 'mask-type': ['alpha', 'luminance'] + }], + /** + * Mask Image + * @see https://tailwindcss.com/docs/mask-image + */ + 'mask-image': [{ + mask: ['none', isArbitraryVariable, isArbitraryValue] + }], + // --------------- + // --- Filters --- + // --------------- + /** + * Filter + * @see https://tailwindcss.com/docs/filter + */ + filter: [{ + filter: [ + // Deprecated since Tailwind CSS v3.0.0 + '', 'none', isArbitraryVariable, isArbitraryValue] + }], + /** + * Blur + * @see https://tailwindcss.com/docs/blur + */ + blur: [{ + blur: scaleBlur() + }], + /** + * Brightness + * @see https://tailwindcss.com/docs/brightness + */ + brightness: [{ + brightness: [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Contrast + * @see https://tailwindcss.com/docs/contrast + */ + contrast: [{ + contrast: [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Drop Shadow + * @see https://tailwindcss.com/docs/drop-shadow + */ + 'drop-shadow': [{ + 'drop-shadow': [ + // Deprecated since Tailwind CSS v4.0.0 + '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow] + }], + /** + * Drop Shadow Color + * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color + */ + 'drop-shadow-color': [{ + 'drop-shadow': scaleColor() + }], + /** + * Grayscale + * @see https://tailwindcss.com/docs/grayscale + */ + grayscale: [{ + grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Hue Rotate + * @see https://tailwindcss.com/docs/hue-rotate + */ + 'hue-rotate': [{ + 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Invert + * @see https://tailwindcss.com/docs/invert + */ + invert: [{ + invert: ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Saturate + * @see https://tailwindcss.com/docs/saturate + */ + saturate: [{ + saturate: [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Sepia + * @see https://tailwindcss.com/docs/sepia + */ + sepia: [{ + sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Filter + * @see https://tailwindcss.com/docs/backdrop-filter + */ + 'backdrop-filter': [{ + 'backdrop-filter': [ + // Deprecated since Tailwind CSS v3.0.0 + '', 'none', isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Blur + * @see https://tailwindcss.com/docs/backdrop-blur + */ + 'backdrop-blur': [{ + 'backdrop-blur': scaleBlur() + }], + /** + * Backdrop Brightness + * @see https://tailwindcss.com/docs/backdrop-brightness + */ + 'backdrop-brightness': [{ + 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Contrast + * @see https://tailwindcss.com/docs/backdrop-contrast + */ + 'backdrop-contrast': [{ + 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Grayscale + * @see https://tailwindcss.com/docs/backdrop-grayscale + */ + 'backdrop-grayscale': [{ + 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Hue Rotate + * @see https://tailwindcss.com/docs/backdrop-hue-rotate + */ + 'backdrop-hue-rotate': [{ + 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Invert + * @see https://tailwindcss.com/docs/backdrop-invert + */ + 'backdrop-invert': [{ + 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Opacity + * @see https://tailwindcss.com/docs/backdrop-opacity + */ + 'backdrop-opacity': [{ + 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Saturate + * @see https://tailwindcss.com/docs/backdrop-saturate + */ + 'backdrop-saturate': [{ + 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Backdrop Sepia + * @see https://tailwindcss.com/docs/backdrop-sepia + */ + 'backdrop-sepia': [{ + 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue] + }], + // -------------- + // --- Tables --- + // -------------- + /** + * Border Collapse + * @see https://tailwindcss.com/docs/border-collapse + */ + 'border-collapse': [{ + border: ['collapse', 'separate'] + }], + /** + * Border Spacing + * @see https://tailwindcss.com/docs/border-spacing + */ + 'border-spacing': [{ + 'border-spacing': scaleUnambiguousSpacing() + }], + /** + * Border Spacing X + * @see https://tailwindcss.com/docs/border-spacing + */ + 'border-spacing-x': [{ + 'border-spacing-x': scaleUnambiguousSpacing() + }], + /** + * Border Spacing Y + * @see https://tailwindcss.com/docs/border-spacing + */ + 'border-spacing-y': [{ + 'border-spacing-y': scaleUnambiguousSpacing() + }], + /** + * Table Layout + * @see https://tailwindcss.com/docs/table-layout + */ + 'table-layout': [{ + table: ['auto', 'fixed'] + }], + /** + * Caption Side + * @see https://tailwindcss.com/docs/caption-side + */ + caption: [{ + caption: ['top', 'bottom'] + }], + // --------------------------------- + // --- Transitions and Animation --- + // --------------------------------- + /** + * Transition Property + * @see https://tailwindcss.com/docs/transition-property + */ + transition: [{ + transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue] + }], + /** + * Transition Behavior + * @see https://tailwindcss.com/docs/transition-behavior + */ + 'transition-behavior': [{ + transition: ['normal', 'discrete'] + }], + /** + * Transition Duration + * @see https://tailwindcss.com/docs/transition-duration + */ + duration: [{ + duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue] + }], + /** + * Transition Timing Function + * @see https://tailwindcss.com/docs/transition-timing-function + */ + ease: [{ + ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue] + }], + /** + * Transition Delay + * @see https://tailwindcss.com/docs/transition-delay + */ + delay: [{ + delay: [isNumber, isArbitraryVariable, isArbitraryValue] + }], + /** + * Animation + * @see https://tailwindcss.com/docs/animation + */ + animate: [{ + animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue] + }], + // ------------------ + // --- Transforms --- + // ------------------ + /** + * Backface Visibility + * @see https://tailwindcss.com/docs/backface-visibility + */ + backface: [{ + backface: ['hidden', 'visible'] + }], + /** + * Perspective + * @see https://tailwindcss.com/docs/perspective + */ + perspective: [{ + perspective: [themePerspective, isArbitraryVariable, isArbitraryValue] + }], + /** + * Perspective Origin + * @see https://tailwindcss.com/docs/perspective-origin + */ + 'perspective-origin': [{ + 'perspective-origin': scalePositionWithArbitrary() + }], + /** + * Rotate + * @see https://tailwindcss.com/docs/rotate + */ + rotate: [{ + rotate: scaleRotate() + }], + /** + * Rotate X + * @see https://tailwindcss.com/docs/rotate + */ + 'rotate-x': [{ + 'rotate-x': scaleRotate() + }], + /** + * Rotate Y + * @see https://tailwindcss.com/docs/rotate + */ + 'rotate-y': [{ + 'rotate-y': scaleRotate() + }], + /** + * Rotate Z + * @see https://tailwindcss.com/docs/rotate + */ + 'rotate-z': [{ + 'rotate-z': scaleRotate() + }], + /** + * Scale + * @see https://tailwindcss.com/docs/scale + */ + scale: [{ + scale: scaleScale() + }], + /** + * Scale X + * @see https://tailwindcss.com/docs/scale + */ + 'scale-x': [{ + 'scale-x': scaleScale() + }], + /** + * Scale Y + * @see https://tailwindcss.com/docs/scale + */ + 'scale-y': [{ + 'scale-y': scaleScale() + }], + /** + * Scale Z + * @see https://tailwindcss.com/docs/scale + */ + 'scale-z': [{ + 'scale-z': scaleScale() + }], + /** + * Scale 3D + * @see https://tailwindcss.com/docs/scale + */ + 'scale-3d': ['scale-3d'], + /** + * Skew + * @see https://tailwindcss.com/docs/skew + */ + skew: [{ + skew: scaleSkew() + }], + /** + * Skew X + * @see https://tailwindcss.com/docs/skew + */ + 'skew-x': [{ + 'skew-x': scaleSkew() + }], + /** + * Skew Y + * @see https://tailwindcss.com/docs/skew + */ + 'skew-y': [{ + 'skew-y': scaleSkew() + }], + /** + * Transform + * @see https://tailwindcss.com/docs/transform + */ + transform: [{ + transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu'] + }], + /** + * Transform Origin + * @see https://tailwindcss.com/docs/transform-origin + */ + 'transform-origin': [{ + origin: scalePositionWithArbitrary() + }], + /** + * Transform Style + * @see https://tailwindcss.com/docs/transform-style + */ + 'transform-style': [{ + transform: ['3d', 'flat'] + }], + /** + * Translate + * @see https://tailwindcss.com/docs/translate + */ + translate: [{ + translate: scaleTranslate() + }], + /** + * Translate X + * @see https://tailwindcss.com/docs/translate + */ + 'translate-x': [{ + 'translate-x': scaleTranslate() + }], + /** + * Translate Y + * @see https://tailwindcss.com/docs/translate + */ + 'translate-y': [{ + 'translate-y': scaleTranslate() + }], + /** + * Translate Z + * @see https://tailwindcss.com/docs/translate + */ + 'translate-z': [{ + 'translate-z': scaleTranslate() + }], + /** + * Translate None + * @see https://tailwindcss.com/docs/translate + */ + 'translate-none': ['translate-none'], + /** + * Zoom + * @see https://tailwindcss.com/docs/zoom + */ + zoom: [{ + zoom: [isInteger, isArbitraryVariable, isArbitraryValue] + }], + // --------------------- + // --- Interactivity --- + // --------------------- + /** + * Accent Color + * @see https://tailwindcss.com/docs/accent-color + */ + accent: [{ + accent: scaleColor() + }], + /** + * Appearance + * @see https://tailwindcss.com/docs/appearance + */ + appearance: [{ + appearance: ['none', 'auto'] + }], + /** + * Caret Color + * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities + */ + 'caret-color': [{ + caret: scaleColor() + }], + /** + * Color Scheme + * @see https://tailwindcss.com/docs/color-scheme + */ + 'color-scheme': [{ + scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light'] + }], + /** + * Cursor + * @see https://tailwindcss.com/docs/cursor + */ + cursor: [{ + cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue] + }], + /** + * Field Sizing + * @see https://tailwindcss.com/docs/field-sizing + */ + 'field-sizing': [{ + 'field-sizing': ['fixed', 'content'] + }], + /** + * Pointer Events + * @see https://tailwindcss.com/docs/pointer-events + */ + 'pointer-events': [{ + 'pointer-events': ['auto', 'none'] + }], + /** + * Resize + * @see https://tailwindcss.com/docs/resize + */ + resize: [{ + resize: ['none', '', 'y', 'x'] + }], + /** + * Scroll Behavior + * @see https://tailwindcss.com/docs/scroll-behavior + */ + 'scroll-behavior': [{ + scroll: ['auto', 'smooth'] + }], + /** + * Scrollbar Thumb Color + * @see https://tailwindcss.com/docs/scrollbar-color + */ + 'scrollbar-thumb-color': [{ + 'scrollbar-thumb': scaleColor() + }], + /** + * Scrollbar Track Color + * @see https://tailwindcss.com/docs/scrollbar-color + */ + 'scrollbar-track-color': [{ + 'scrollbar-track': scaleColor() + }], + /** + * Scrollbar Gutter + * @see https://tailwindcss.com/docs/scrollbar-gutter + */ + 'scrollbar-gutter': [{ + 'scrollbar-gutter': ['auto', 'stable', 'both'] + }], + /** + * Scrollbar Width + * @see https://tailwindcss.com/docs/scrollbar-width + */ + 'scrollbar-w': [{ + scrollbar: ['auto', 'thin', 'none'] + }], + /** + * Scroll Margin + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-m': [{ + 'scroll-m': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Inline + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mx': [{ + 'scroll-mx': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Block + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-my': [{ + 'scroll-my': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Inline Start + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-ms': [{ + 'scroll-ms': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Inline End + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-me': [{ + 'scroll-me': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Block Start + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mbs': [{ + 'scroll-mbs': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Block End + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mbe': [{ + 'scroll-mbe': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Top + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mt': [{ + 'scroll-mt': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Right + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mr': [{ + 'scroll-mr': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Bottom + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-mb': [{ + 'scroll-mb': scaleUnambiguousSpacing() + }], + /** + * Scroll Margin Left + * @see https://tailwindcss.com/docs/scroll-margin + */ + 'scroll-ml': [{ + 'scroll-ml': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-p': [{ + 'scroll-p': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Inline + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-px': [{ + 'scroll-px': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Block + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-py': [{ + 'scroll-py': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Inline Start + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-ps': [{ + 'scroll-ps': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Inline End + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pe': [{ + 'scroll-pe': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Block Start + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pbs': [{ + 'scroll-pbs': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Block End + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pbe': [{ + 'scroll-pbe': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Top + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pt': [{ + 'scroll-pt': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Right + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pr': [{ + 'scroll-pr': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Bottom + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pb': [{ + 'scroll-pb': scaleUnambiguousSpacing() + }], + /** + * Scroll Padding Left + * @see https://tailwindcss.com/docs/scroll-padding + */ + 'scroll-pl': [{ + 'scroll-pl': scaleUnambiguousSpacing() + }], + /** + * Scroll Snap Align + * @see https://tailwindcss.com/docs/scroll-snap-align + */ + 'snap-align': [{ + snap: ['start', 'end', 'center', 'align-none'] + }], + /** + * Scroll Snap Stop + * @see https://tailwindcss.com/docs/scroll-snap-stop + */ + 'snap-stop': [{ + snap: ['normal', 'always'] + }], + /** + * Scroll Snap Type + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + 'snap-type': [{ + snap: ['none', 'x', 'y', 'both'] + }], + /** + * Scroll Snap Type Strictness + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + 'snap-strictness': [{ + snap: ['mandatory', 'proximity'] + }], + /** + * Touch Action + * @see https://tailwindcss.com/docs/touch-action + */ + touch: [{ + touch: ['auto', 'none', 'manipulation'] + }], + /** + * Touch Action X + * @see https://tailwindcss.com/docs/touch-action + */ + 'touch-x': [{ + 'touch-pan': ['x', 'left', 'right'] + }], + /** + * Touch Action Y + * @see https://tailwindcss.com/docs/touch-action + */ + 'touch-y': [{ + 'touch-pan': ['y', 'up', 'down'] + }], + /** + * Touch Action Pinch Zoom + * @see https://tailwindcss.com/docs/touch-action + */ + 'touch-pz': ['touch-pinch-zoom'], + /** + * User Select + * @see https://tailwindcss.com/docs/user-select + */ + select: [{ + select: ['none', 'text', 'all', 'auto'] + }], + /** + * Will Change + * @see https://tailwindcss.com/docs/will-change + */ + 'will-change': [{ + 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue] + }], + // ----------- + // --- SVG --- + // ----------- + /** + * Fill + * @see https://tailwindcss.com/docs/fill + */ + fill: [{ + fill: ['none', ...scaleColor()] + }], + /** + * Stroke Width + * @see https://tailwindcss.com/docs/stroke-width + */ + 'stroke-w': [{ + stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber] + }], + /** + * Stroke + * @see https://tailwindcss.com/docs/stroke + */ + stroke: [{ + stroke: ['none', ...scaleColor()] + }], + // --------------------- + // --- Accessibility --- + // --------------------- + /** + * Forced Color Adjust + * @see https://tailwindcss.com/docs/forced-color-adjust + */ + 'forced-color-adjust': [{ + 'forced-color-adjust': ['auto', 'none'] + }] + }, + conflictingClassGroups: { + 'container-named': ['container-type'], + overflow: ['overflow-x', 'overflow-y'], + overscroll: ['overscroll-x', 'overscroll-y'], + inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'], + 'inset-x': ['right', 'left'], + 'inset-y': ['top', 'bottom'], + flex: ['basis', 'grow', 'shrink'], + gap: ['gap-x', 'gap-y'], + p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'], + px: ['pr', 'pl'], + py: ['pt', 'pb'], + m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'], + mx: ['mr', 'ml'], + my: ['mt', 'mb'], + size: ['w', 'h'], + 'font-size': ['leading'], + 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'], + 'fvn-ordinal': ['fvn-normal'], + 'fvn-slashed-zero': ['fvn-normal'], + 'fvn-figure': ['fvn-normal'], + 'fvn-spacing': ['fvn-normal'], + 'fvn-fraction': ['fvn-normal'], + 'line-clamp': ['display', 'overflow'], + rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'], + 'rounded-s': ['rounded-ss', 'rounded-es'], + 'rounded-e': ['rounded-se', 'rounded-ee'], + 'rounded-t': ['rounded-tl', 'rounded-tr'], + 'rounded-r': ['rounded-tr', 'rounded-br'], + 'rounded-b': ['rounded-br', 'rounded-bl'], + 'rounded-l': ['rounded-tl', 'rounded-bl'], + 'border-spacing': ['border-spacing-x', 'border-spacing-y'], + 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'], + 'border-w-x': ['border-w-r', 'border-w-l'], + 'border-w-y': ['border-w-t', 'border-w-b'], + 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'], + 'border-color-x': ['border-color-r', 'border-color-l'], + 'border-color-y': ['border-color-t', 'border-color-b'], + translate: ['translate-x', 'translate-y', 'translate-none'], + 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'], + 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'], + 'scroll-mx': ['scroll-mr', 'scroll-ml'], + 'scroll-my': ['scroll-mt', 'scroll-mb'], + 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'], + 'scroll-px': ['scroll-pr', 'scroll-pl'], + 'scroll-py': ['scroll-pt', 'scroll-pb'], + touch: ['touch-x', 'touch-y', 'touch-pz'], + 'touch-x': ['touch'], + 'touch-y': ['touch'], + 'touch-pz': ['touch'] + }, + conflictingClassGroupModifiers: { + 'font-size': ['leading'] + }, + postfixLookupClassGroups: ['container-type'], + orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection'] + }; +}; + +/** + * @param baseConfig Config where other config will be merged into. This object will be mutated. + * @param configExtension Partial config to merge into the `baseConfig`. + */ +const mergeConfigs = (baseConfig, { + cacheSize, + prefix, + experimentalParseClassName, + extend = {}, + override = {} +}) => { + overrideProperty(baseConfig, 'cacheSize', cacheSize); + overrideProperty(baseConfig, 'prefix', prefix); + overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName); + overrideConfigProperties(baseConfig.theme, override.theme); + overrideConfigProperties(baseConfig.classGroups, override.classGroups); + overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups); + overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers); + overrideProperty(baseConfig, 'postfixLookupClassGroups', override.postfixLookupClassGroups); + overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers); + mergeConfigProperties(baseConfig.theme, extend.theme); + mergeConfigProperties(baseConfig.classGroups, extend.classGroups); + mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups); + mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers); + mergeArrayProperties(baseConfig, extend, 'postfixLookupClassGroups'); + mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers'); + return baseConfig; +}; +const overrideProperty = (baseObject, overrideKey, overrideValue) => { + if (overrideValue !== undefined) { + baseObject[overrideKey] = overrideValue; + } +}; +const overrideConfigProperties = (baseObject, overrideObject) => { + if (overrideObject) { + for (const key in overrideObject) { + overrideProperty(baseObject, key, overrideObject[key]); + } + } +}; +const mergeConfigProperties = (baseObject, mergeObject) => { + if (mergeObject) { + for (const key in mergeObject) { + mergeArrayProperties(baseObject, mergeObject, key); + } + } +}; +const mergeArrayProperties = (baseObject, mergeObject, key) => { + const mergeValue = mergeObject[key]; + if (mergeValue !== undefined) { + baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue; + } +}; +const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig); +const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig); + +// src/utils.js +var SPACE_REGEX = /\s+/g; +var removeExtraSpaces = (str) => { + if (typeof str !== "string" || !str) return str; + return str.replace(SPACE_REGEX, " ").trim(); +}; +var cx = (...classnames) => { + const classList = []; + const buildClassString = (input) => { + if (!input && input !== 0 && input !== 0n) return; + if (Array.isArray(input)) { + for (let i = 0, len = input.length; i < len; i++) buildClassString(input[i]); + return; + } + const type = typeof input; + if (type === "string" || type === "number" || type === "bigint") { + if (type === "number" && input !== input) return; + classList.push(String(input)); + } else if (type === "object") { + const keys = Object.keys(input); + for (let i = 0, len = keys.length; i < len; i++) { + const key = keys[i]; + if (input[key]) classList.push(key); + } + } + }; + for (let i = 0, len = classnames.length; i < len; i++) { + const c = classnames[i]; + if (c !== null && c !== void 0) buildClassString(c); + } + return classList.length > 0 ? removeExtraSpaces(classList.join(" ")) : void 0; +}; +var falsyToString = (value) => value === false ? "false" : value === true ? "true" : value === 0 ? "0" : value; +var isEmptyObject = (obj) => { + if (!obj || typeof obj !== "object") return true; + for (const _ in obj) return false; + return true; +}; +var isEqual = (obj1, obj2) => { + if (obj1 === obj2) return true; + if (!obj1 || !obj2) return false; + const keys1 = Object.keys(obj1); + const keys2 = Object.keys(obj2); + if (keys1.length !== keys2.length) return false; + for (let i = 0; i < keys1.length; i++) { + const key = keys1[i]; + if (!keys2.includes(key)) return false; + if (obj1[key] !== obj2[key]) return false; + } + return true; +}; +var joinObjects = (obj1, obj2) => { + for (const key in obj2) { + if (Object.prototype.hasOwnProperty.call(obj2, key)) { + const val2 = obj2[key]; + if (key in obj1) { + obj1[key] = cx(obj1[key], val2); + } else { + obj1[key] = val2; + } + } + } + return obj1; +}; +var flat = (arr, target) => { + for (let i = 0; i < arr.length; i++) { + const el = arr[i]; + if (Array.isArray(el)) flat(el, target); + else if (el) target.push(el); + } +}; +var flatMergeArrays = (...arrays) => { + const result = []; + flat(arrays, result); + const filtered = []; + for (let i = 0; i < result.length; i++) { + if (result[i]) filtered.push(result[i]); + } + return filtered; +}; +var mergeObjects = (obj1, obj2) => { + const result = {}; + for (const key in obj1) { + const val1 = obj1[key]; + if (key in obj2) { + const val2 = obj2[key]; + if (Array.isArray(val1) || Array.isArray(val2)) { + result[key] = flatMergeArrays(val2, val1); + } else if (typeof val1 === "object" && typeof val2 === "object" && val1 && val2) { + result[key] = mergeObjects(val1, val2); + } else { + result[key] = val2 + " " + val1; + } + } else { + result[key] = val1; + } + } + for (const key in obj2) { + if (!(key in obj1)) { + result[key] = obj2[key]; + } + } + return result; +}; + +// src/config.js +var defaultConfig = { + twMerge: true, + twMergeConfig: {} +}; + +// src/state.js +function createState() { + let cachedTwMerge = null; + let cachedTwMergeConfig = {}; + let didTwMergeConfigChange = false; + return { + get cachedTwMerge() { + return cachedTwMerge; + }, + set cachedTwMerge(value) { + cachedTwMerge = value; + }, + get cachedTwMergeConfig() { + return cachedTwMergeConfig; + }, + set cachedTwMergeConfig(value) { + cachedTwMergeConfig = value; + }, + get didTwMergeConfigChange() { + return didTwMergeConfigChange; + }, + set didTwMergeConfigChange(value) { + didTwMergeConfigChange = value; + }, + reset() { + cachedTwMerge = null; + cachedTwMergeConfig = {}; + didTwMergeConfigChange = false; + } + }; +} +var state = createState(); + +// src/core.js +var getTailwindVariants = (cn) => { + const tv = (options, configProp) => { + const { + extend = null, + slots: slotProps = {}, + variants: variantsProps = {}, + compoundVariants: compoundVariantsProps = [], + compoundSlots = [], + defaultVariants: defaultVariantsProps = {} + } = options; + const config = { ...defaultConfig, ...configProp }; + const base = extend?.base ? cx(extend.base, options?.base) : options?.base; + const variants = extend?.variants && !isEmptyObject(extend.variants) ? mergeObjects(variantsProps, extend.variants) : variantsProps; + const defaultVariants = extend?.defaultVariants && !isEmptyObject(extend.defaultVariants) ? { ...extend.defaultVariants, ...defaultVariantsProps } : defaultVariantsProps; + if (!isEmptyObject(config.twMergeConfig) && !isEqual(config.twMergeConfig, state.cachedTwMergeConfig)) { + state.didTwMergeConfigChange = true; + state.cachedTwMergeConfig = config.twMergeConfig; + } + const isExtendedSlotsEmpty = isEmptyObject(extend?.slots); + const componentSlots = !isEmptyObject(slotProps) ? { + // add "base" to the slots object + base: cx(options?.base, isExtendedSlotsEmpty && extend?.base), + ...slotProps + } : {}; + const slots = isExtendedSlotsEmpty ? componentSlots : joinObjects( + { ...extend?.slots }, + isEmptyObject(componentSlots) ? { base: options?.base } : componentSlots + ); + const compoundVariants = isEmptyObject(extend?.compoundVariants) ? compoundVariantsProps : flatMergeArrays(extend?.compoundVariants, compoundVariantsProps); + const component = (props) => { + if (isEmptyObject(variants) && isEmptyObject(slotProps) && isExtendedSlotsEmpty) { + return cn(base, props?.class, props?.className)(config); + } + if (compoundVariants && !Array.isArray(compoundVariants)) { + throw new TypeError( + `The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}` + ); + } + if (compoundSlots && !Array.isArray(compoundSlots)) { + throw new TypeError( + `The "compoundSlots" prop must be an array. Received: ${typeof compoundSlots}` + ); + } + const getVariantValue = (variant, vrs = variants, _slotKey = null, slotProps2 = null) => { + const variantObj = vrs[variant]; + if (!variantObj || isEmptyObject(variantObj)) { + return null; + } + const variantProp = slotProps2?.[variant] ?? props?.[variant]; + if (variantProp === null) return null; + const variantKey = falsyToString(variantProp); + if (typeof variantKey === "object") { + return null; + } + const defaultVariantProp = defaultVariants?.[variant]; + const key = variantKey != null ? variantKey : falsyToString(defaultVariantProp); + const value = variantObj[key || "false"]; + return value; + }; + const getVariantClassNames = () => { + if (!variants) return null; + const keys = Object.keys(variants); + const result = []; + for (let i = 0; i < keys.length; i++) { + const value = getVariantValue(keys[i], variants); + if (value) result.push(value); + } + return result; + }; + const getVariantClassNamesBySlotKey = (slotKey, slotProps2) => { + if (!variants || typeof variants !== "object") return null; + const result = []; + for (const variant in variants) { + const variantValue = getVariantValue(variant, variants, slotKey, slotProps2); + const value = slotKey === "base" && typeof variantValue === "string" ? variantValue : variantValue && variantValue[slotKey]; + if (value) result.push(value); + } + return result; + }; + const propsWithoutUndefined = {}; + for (const prop in props) { + const value = props[prop]; + if (value !== void 0) propsWithoutUndefined[prop] = value; + } + const getCompleteProps = (key, slotProps2) => { + const initialProp = typeof props?.[key] === "object" ? { + [key]: props[key]?.initial + } : {}; + return { + ...defaultVariants, + ...propsWithoutUndefined, + ...initialProp, + ...slotProps2 + }; + }; + const getCompoundVariantsValue = (cv = [], slotProps2) => { + const result = []; + const cvLength = cv.length; + for (let i = 0; i < cvLength; i++) { + const { class: tvClass, className: tvClassName, ...compoundVariantOptions } = cv[i]; + let isValid = true; + const completeProps = getCompleteProps(null, slotProps2); + for (const key in compoundVariantOptions) { + const value = compoundVariantOptions[key]; + const completePropsValue = completeProps[key]; + if (Array.isArray(value)) { + if (!value.includes(completePropsValue)) { + isValid = false; + break; + } + } else { + if ((value == null || value === false) && (completePropsValue == null || completePropsValue === false)) + continue; + if (completePropsValue !== value) { + isValid = false; + break; + } + } + } + if (isValid) { + if (tvClass) result.push(tvClass); + if (tvClassName) result.push(tvClassName); + } + } + return result; + }; + const getCompoundVariantClassNamesBySlot = (slotProps2) => { + const compoundClassNames = getCompoundVariantsValue(compoundVariants, slotProps2); + if (!Array.isArray(compoundClassNames)) return compoundClassNames; + const result = {}; + const cnFn = cn; + for (let i = 0; i < compoundClassNames.length; i++) { + const className = compoundClassNames[i]; + if (typeof className === "string") { + result.base = cnFn(result.base, className)(config); + } else if (typeof className === "object") { + for (const slot in className) { + result[slot] = cnFn(result[slot], className[slot])(config); + } + } + } + return result; + }; + const getCompoundSlotClassNameBySlot = (slotProps2) => { + if (compoundSlots.length < 1) return null; + const result = {}; + const completeProps = getCompleteProps(null, slotProps2); + for (let i = 0; i < compoundSlots.length; i++) { + const { + slots: slots2 = [], + class: slotClass, + className: slotClassName, + ...slotVariants + } = compoundSlots[i]; + if (!isEmptyObject(slotVariants)) { + let isValid = true; + for (const key in slotVariants) { + const completePropsValue = completeProps[key]; + const slotVariantValue = slotVariants[key]; + if (completePropsValue === void 0 || (Array.isArray(slotVariantValue) ? !slotVariantValue.includes(completePropsValue) : slotVariantValue !== completePropsValue)) { + isValid = false; + break; + } + } + if (!isValid) continue; + } + for (let j = 0; j < slots2.length; j++) { + const slotName = slots2[j]; + if (!result[slotName]) result[slotName] = []; + result[slotName].push([slotClass, slotClassName]); + } + } + return result; + }; + if (!isEmptyObject(slotProps) || !isExtendedSlotsEmpty) { + const slotsFns = {}; + if (typeof slots === "object" && !isEmptyObject(slots)) { + const cnFn = cn; + for (const slotKey in slots) { + slotsFns[slotKey] = (slotProps2) => { + const compoundVariantClasses = getCompoundVariantClassNamesBySlot(slotProps2); + const compoundSlotClasses = getCompoundSlotClassNameBySlot(slotProps2); + return cnFn( + slots[slotKey], + getVariantClassNamesBySlotKey(slotKey, slotProps2), + compoundVariantClasses ? compoundVariantClasses[slotKey] : void 0, + compoundSlotClasses ? compoundSlotClasses[slotKey] : void 0, + slotProps2?.class, + slotProps2?.className + )(config); + }; + } + } + return slotsFns; + } + return cn( + base, + getVariantClassNames(), + getCompoundVariantsValue(compoundVariants), + props?.class, + props?.className + )(config); + }; + const getVariantKeys = () => { + if (!variants || typeof variants !== "object") return; + return Object.keys(variants); + }; + component.variantKeys = getVariantKeys(); + component.extend = extend; + component.base = base; + component.slots = slots; + component.variants = variants; + component.defaultVariants = defaultVariants; + component.compoundSlots = compoundSlots; + component.compoundVariants = compoundVariants; + return component; + }; + const createTV = (configProp) => { + return (options, config) => tv(options, config ? mergeObjects(configProp, config) : configProp); + }; + return { + tv, + createTV + }; +}; + +var createTwMerge = (cachedTwMergeConfig) => { + return isEmptyObject(cachedTwMergeConfig) ? twMerge : extendTailwindMerge({ + ...cachedTwMergeConfig, + extend: { + theme: cachedTwMergeConfig.theme, + classGroups: cachedTwMergeConfig.classGroups, + conflictingClassGroupModifiers: cachedTwMergeConfig.conflictingClassGroupModifiers, + conflictingClassGroups: cachedTwMergeConfig.conflictingClassGroups, + ...cachedTwMergeConfig.extend + } + }); +}; +var executeMerge = (classnames, config) => { + const base = cx(classnames); + if (!base || !(config?.twMerge ?? true)) return base; + if (!state.cachedTwMerge || state.didTwMergeConfigChange) { + state.didTwMergeConfigChange = false; + state.cachedTwMerge = createTwMerge(state.cachedTwMergeConfig); + } + return state.cachedTwMerge(base) || void 0; +}; +var cnMerge = (...classnames) => { + return (config) => executeMerge(classnames, config); +}; + +// src/index.js +var { tv } = getTailwindVariants(cnMerge); + +async function getBytes(stream, onChunk) { + const reader = stream.getReader(); + let result; + while (!(result = await reader.read()).done) { + onChunk(result.value); + } +} +function getLines(onLine) { + let buffer; + let position; + let fieldLength; + let discardTrailingNewline = false; + return function onChunk(arr) { + if (buffer === undefined) { + buffer = arr; + position = 0; + fieldLength = -1; + } + else { + buffer = concat(buffer, arr); + } + const bufLength = buffer.length; + let lineStart = 0; + while (position < bufLength) { + if (discardTrailingNewline) { + if (buffer[position] === 10) { + lineStart = ++position; + } + discardTrailingNewline = false; + } + let lineEnd = -1; + for (; position < bufLength && lineEnd === -1; ++position) { + switch (buffer[position]) { + case 58: + if (fieldLength === -1) { + fieldLength = position - lineStart; + } + break; + case 13: + discardTrailingNewline = true; + case 10: + lineEnd = position; + break; + } + } + if (lineEnd === -1) { + break; + } + onLine(buffer.subarray(lineStart, lineEnd), fieldLength); + lineStart = position; + fieldLength = -1; + } + if (lineStart === bufLength) { + buffer = undefined; + } + else if (lineStart !== 0) { + buffer = buffer.subarray(lineStart); + position -= lineStart; + } + }; +} +function getMessages(onId, onRetry, onMessage) { + let message = newMessage(); + const decoder = new TextDecoder(); + return function onLine(line, fieldLength) { + if (line.length === 0) { + onMessage === null || onMessage === void 0 ? void 0 : onMessage(message); + message = newMessage(); + } + else if (fieldLength > 0) { + const field = decoder.decode(line.subarray(0, fieldLength)); + const valueOffset = fieldLength + (line[fieldLength + 1] === 32 ? 2 : 1); + const value = decoder.decode(line.subarray(valueOffset)); + switch (field) { + case 'data': + message.data = message.data + ? message.data + '\n' + value + : value; + break; + case 'event': + message.event = value; + break; + case 'id': + onId(message.id = value); + break; + case 'retry': + const retry = parseInt(value, 10); + if (!isNaN(retry)) { + onRetry(message.retry = retry); + } + break; + } + } + }; +} +function concat(a, b) { + const res = new Uint8Array(a.length + b.length); + res.set(a); + res.set(b, a.length); + return res; +} +function newMessage() { + return { + data: '', + event: '', + id: '', + retry: undefined, + }; +} + +var __rest = (undefined && undefined.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +const EventStreamContentType = 'text/event-stream'; +const DefaultRetryInterval = 1000; +const LastEventId = 'last-event-id'; +function fetchEventSource(input, _a) { + var { signal: inputSignal, headers: inputHeaders, onopen: inputOnOpen, onmessage, onclose, onerror, openWhenHidden, fetch: inputFetch } = _a, rest = __rest(_a, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]); + return new Promise((resolve, reject) => { + const headers = Object.assign({}, inputHeaders); + if (!headers.accept) { + headers.accept = EventStreamContentType; + } + let curRequestController; + function onVisibilityChange() { + curRequestController.abort(); + if (!document.hidden) { + create(); + } + } + if (!openWhenHidden) { + document.addEventListener('visibilitychange', onVisibilityChange); + } + let retryInterval = DefaultRetryInterval; + let retryTimer = 0; + function dispose() { + document.removeEventListener('visibilitychange', onVisibilityChange); + window.clearTimeout(retryTimer); + curRequestController.abort(); + } + inputSignal === null || inputSignal === void 0 ? void 0 : inputSignal.addEventListener('abort', () => { + dispose(); + resolve(); + }); + const fetch = inputFetch !== null && inputFetch !== void 0 ? inputFetch : window.fetch; + const onopen = inputOnOpen !== null && inputOnOpen !== void 0 ? inputOnOpen : defaultOnOpen; + async function create() { + var _a; + curRequestController = new AbortController(); + try { + const response = await fetch(input, Object.assign(Object.assign({}, rest), { headers, signal: curRequestController.signal })); + await onopen(response); + await getBytes(response.body, getLines(getMessages(id => { + if (id) { + headers[LastEventId] = id; + } + else { + delete headers[LastEventId]; + } + }, retry => { + retryInterval = retry; + }, onmessage))); + onclose === null || onclose === void 0 ? void 0 : onclose(); + dispose(); + resolve(); + } + catch (err) { + if (!curRequestController.signal.aborted) { + try { + const interval = (_a = onerror === null || onerror === void 0 ? void 0 : onerror(err)) !== null && _a !== void 0 ? _a : retryInterval; + window.clearTimeout(retryTimer); + retryTimer = window.setTimeout(create, interval); + } + catch (innerErr) { + dispose(); + reject(innerErr); + } + } + } + } + create(); + }); +} +function defaultOnOpen(response) { + const contentType = response.headers.get('content-type'); + if (!(contentType === null || contentType === void 0 ? void 0 : contentType.startsWith(EventStreamContentType))) { + throw new Error(`Expected content-type to be ${EventStreamContentType}, Actual: ${contentType}`); + } +} + +//#region src/lib/components/tensor-view.svelte +function Tensor_view($$renderer, $$props) { + $$renderer.component(($$renderer) => { + hexToRgb("#c7b7e8"), hexToRgb("#afcbff"), hexToRgb("#a8dadc"), hexToRgb("#b7d7a8"), hexToRgb("#e6d3a3"), hexToRgb("#f0bfa7"), hexToRgb("#e8a7b8"), hexToRgb("#c9b6e4"); + let { tensors, frameIndex = 0, cellSize = 8, maxWidth = 680, maxHeight = 360, duration = 760, animated = true, interactive = true, opacity = 1, class: className = "" } = $$props; + let rafId = 0; + let cols = 1; + let rows = 1; + let cssWidth = 1; + let cssHeight = 1; + function hexToRgb(hex) { + const normalized = hex.replace("#", ""); + return { + r: parseInt(normalized.slice(0, 2), 16), + g: parseInt(normalized.slice(2, 4), 16), + b: parseInt(normalized.slice(4, 6), 16) + }; + } + onDestroy(() => { + cancelAnimationFrame(rafId); + }); + $$renderer.push(` `); + $$renderer.push(""); + $$renderer.push(``); + }); +} +//#endregion +//#region src/lib/language.ts +var DEFAULT_OPTIONS = { + assimilateNasal: true, + useSimpleParticleRules: true, + keepUnknown: true, + longVowelStyle: "expand", + naturalizeRepeatedVowels: true, + kanaLongVowelStyle: "collapse" +}; +function getKanaVowel(kanaUnit) { + const unit = katakanaToHiragana(kanaUnit); + const last = unit[unit.length - 1]; + if ("ã‚ã‹ãŒã•ã–ãŸã ãªã¯ã°ã±ã¾ã‚„らã‚ãゃ".includes(last)) return "a"; + if ("ã„ããŽã—ã˜ã¡ã¢ã«ã²ã³ã´ã¿ã‚Šã‚ãƒ".includes(last)) return "i"; + if ("ã†ããã™ãšã¤ã¥ã¬ãµã¶ã·ã‚€ã‚†ã‚‹ã…ã‚…ã‚”".includes(last)) return "u"; + if ("ãˆã‘ã’ã›ãœã¦ã§ã­ã¸ã¹ãºã‚れゑã‡".includes(last)) return "e"; + if ("ãŠã“ã”ããžã¨ã©ã®ã»ã¼ã½ã‚‚よã‚ã‚’ã‰ã‚‡".includes(last)) return "o"; + return null; +} +/** +* 히ë¼ê°€ë‚˜ë¡œ ì ížŒ 장ìŒì¸ì§€ íŒë‹¨í•©ë‹ˆë‹¤. +* +* 대표 패턴: +* - ãŠæ®µ + ã†: ã¨ã†, ã“ã†, ã—ょã†, ãょㆠ+* - ãŠæ®µ + ãŠ: ãŠãŠã•ã‹ +* - ãˆæ®µ + ã„: ã›ã„, れã„, ã‘ã„ +* - ãˆæ®µ + ãˆ: ã­ãˆ +*/ +function isKanaLongVowelFollower(previousVowel, currentKana) { + if (!previousVowel) return false; + const current = katakanaToHiragana(currentKana); + if (previousVowel === "o" && (current === "ã†" || current === "ãŠ")) return true; + if (previousVowel === "e" && (current === "ã„" || current === "ãˆ")) return true; + return false; +} +function handleKanaLongVowel(result, style) { + switch (style) { + case "keep": return result; + case "expand": return appendLongVowel(result); + case "collapse": return result; + default: return result; + } +} +var CHOSEONG = [ + "ㄱ", + "ㄲ", + "ã„´", + "ã„·", + "ㄸ", + "ㄹ", + "ã…", + "ã…‚", + "ã…ƒ", + "ã……", + "ã…†", + "ã…‡", + "ã…ˆ", + "ã…‰", + "ã…Š", + "ã…‹", + "ã…Œ", + "ã…", + "ã…Ž" +]; +var JUNGSEONG = [ + "ã…", + "ã…", + "ã…‘", + "ã…’", + "ã…“", + "ã…”", + "ã…•", + "ã…–", + "ã…—", + "ã…˜", + "ã…™", + "ã…š", + "ã…›", + "ã…œ", + "ã…", + "ã…ž", + "ã…Ÿ", + "ã… ", + "ã…¡", + "ã…¢", + "ã…£" +]; +var JONGSEONG = [ + "", + "ㄱ", + "ㄲ", + "ㄳ", + "ã„´", + "ㄵ", + "ã„¶", + "ã„·", + "ㄹ", + "ㄺ", + "ã„»", + "ㄼ", + "ㄽ", + "ㄾ", + "ã„¿", + "ã…€", + "ã…", + "ã…‚", + "ã…„", + "ã……", + "ã…†", + "ã…‡", + "ã…ˆ", + "ã…Š", + "ã…‹", + "ã…Œ", + "ã…", + "ã…Ž" +]; +function composeHangul(cho, jung, jong = "") { + const choIndex = CHOSEONG.indexOf(cho); + const jungIndex = JUNGSEONG.indexOf(jung); + const jongIndex = JONGSEONG.indexOf(jong); + if (choIndex === -1 || jungIndex === -1 || jongIndex === -1) return cho + jung + jong; + return String.fromCharCode(44032 + choIndex * 21 * 28 + jungIndex * 28 + jongIndex); +} +function decomposeHangul(char) { + if (!char) return null; + const base = char.charCodeAt(0) - 44032; + if (base < 0 || base > 11171) return null; + const choIndex = Math.floor(base / 588); + const jungIndex = Math.floor(base % 588 / 28); + const jongIndex = base % 28; + return { + cho: CHOSEONG[choIndex], + jung: JUNGSEONG[jungIndex], + jong: JONGSEONG[jongIndex] + }; +} +function isHangulSyllable(char) { + return decomposeHangul(char) !== null; +} +function replaceJong(char, jong) { + const parts = decomposeHangul(char); + if (!parts) return char; + return composeHangul(parts.cho, parts.jung, jong); +} +function canAttachJong(char) { + const parts = decomposeHangul(char); + return Boolean(parts && !parts.jong); +} +function attachJongToLastSyllable(result, jong) { + if (!result) return result + jong; + const last = result[result.length - 1]; + if (!canAttachJong(last)) return result + jong; + return result.slice(0, -1) + replaceJong(last, jong); +} +/** +* Katakana -> Hiragana +*/ +function katakanaToHiragana(input) { + return input.replace(/[\u30a1-\u30f6]/g, (char) => { + return String.fromCharCode(char.charCodeAt(0) - 96); + }); +} +var KANA_MAP = { + ã‚: "ì•„", + ã„: "ì´", + ã†: "ìš°", + ãˆ: "ì—", + ãŠ: "오", + ã‹: "ì¹´", + ã: "키", + ã: "ì¿ ", + ã‘: "ì¼€", + ã“: "ì½”", + ã•: "사", + ã—: "시", + ã™: "스", + ã›: "세", + ã: "소", + ãŸ: "타", + ã¡: "치", + ã¤: "ì“°", + ã¦: "í…Œ", + ã¨: "토", + ãª: "나", + ã«: "니", + ã¬: "누", + ã­: "네", + ã®: "ë…¸", + ã¯: "하", + ã²: "히", + ãµ: "후", + ã¸: "í—¤", + ã»: "호", + ã¾: "마", + ã¿: "미", + ã‚€: "무", + ã‚: "ë©”", + ã‚‚: "모", + ã‚„: "야", + ゆ: "유", + よ: "ìš”", + ら: "ë¼", + り: "리", + ã‚‹: "루", + れ: "ë ˆ", + ã‚: "로", + ã‚: "와", + ã‚: "ì´", + ã‚‘: "ì—", + ã‚’: "오", + ãŒ: "ê°€", + ãŽ: "기", + ã: "구", + ã’: "게", + ã”: "ê³ ", + ã–: "ìž", + ã˜: "ì§€", + ãš: "즈", + ãœ: "ì œ", + ãž: "ì¡°", + ã : "다", + ã¢: "ì§€", + ã¥: "즈", + ã§: "ë°", + ã©: "ë„", + ã°: "ë°”", + ã³: "비", + ã¶: "ë¶€", + ã¹: "ë² ", + ã¼: "ë³´", + ã±: "파", + ã´: "피", + ã·: "푸", + ãº: "페", + ã½: "í¬", + ã: "ì•„", + ãƒ: "ì´", + ã…: "ìš°", + ã‡: "ì—", + ã‰: "오", + ゃ: "야", + ã‚…: "유", + ょ: "ìš”", + ゎ: "와", + ã‚”: "ë¶€" +}; +var COMBO_MAP = { + ãゃ: "캬", + ãã‚…: "í", + ãょ: "ì¿„", + ãã‡: "켸", + ãŽã‚ƒ: "ê°¸", + ãŽã‚…: "ê·œ", + ãŽã‚‡: "êµ", + ãŽã‡: "계", + ã—ゃ: "샤", + ã—ã‚…: "슈", + ã—ょ: "쇼", + ã—ã‡: "ì…°", + ã˜ã‚ƒ: "ìž", + ã˜ã‚…: "주", + ã˜ã‚‡: "ì¡°", + ã˜ã‡: "ì œ", + ã¢ã‚ƒ: "ìž", + ã¢ã‚…: "주", + ã¢ã‚‡: "ì¡°", + ã¢ã‡: "ì œ", + ã¡ã‚ƒ: "ì°¨", + ã¡ã‚…: "ì¶”", + ã¡ã‚‡: "ì´ˆ", + ã¡ã‡: "ì²´", + ã«ã‚ƒ: "ëƒ", + ã«ã‚…: "뉴", + ã«ã‚‡: "뇨", + ã«ã‡: "ë…œ", + ã²ã‚ƒ: "í–", + ã²ã‚…: "휴", + ã²ã‚‡: "효", + ã²ã‡: "혜", + ã³ã‚ƒ: "뱌", + ã³ã‚…: "ë·°", + ã³ã‚‡: "뵤", + ã³ã‡: "볘", + ã´ã‚ƒ: "í„", + ã´ã‚…: "퓨", + ã´ã‚‡: "표", + ã´ã‡: "í", + ã¿ã‚ƒ: "먀", + ã¿ã‚…: "뮤", + ã¿ã‚‡: "묘", + ã¿ã‡: "몌", + りゃ: "ëž´", + りゅ: "류", + りょ: "료", + りã‡: "ë¡€", + ãµã: "파", + ãµãƒ: "피", + ãµã‡: "페", + ãµã‰: "í¬", + ãµã‚…: "퓨", + ã‚”ã: "ë°”", + ã‚”ãƒ: "비", + ã‚”ã‡: "ë² ", + ã‚”ã‰: "ë³´", + ã†ãƒ: "위", + ã†ã‡: "웨", + ã†ã‰: "워", + ãã: "ì½°", + ããƒ: "퀴", + ãã‡: "퀘", + ãã‰: "쿼", + ãã: "ê³¼", + ããƒ: "ê·€", + ãã‡: "궤", + ãã‰: "궈", + ã¤ã: "ì°¨", + ã¤ãƒ: "치", + ã¤ã‡: "ì²´", + ã¤ã‰: "ì´ˆ", + ã¦ãƒ: "í‹°", + ã¦ã‚…: "튜", + ã¨ã…: "투", + ã§ãƒ: "ë””", + ã§ã‚…: "ë“€", + ã©ã…: "ë‘" +}; +var LONG_VOWEL_MAP = { + ã…: "ì•„", + ã…: "ì• ", + ã…‘: "야", + ã…’: "ì–˜", + ã…“: "ì–´", + ã…”: "ì—", + ã…•: "ì—¬", + ã…–: "예", + ã…—: "오", + ã…˜: "ì•„", + ã…™: "ì• ", + ã…š: "외", + ã…›: "ìš”", + ã…œ: "ìš°", + ã…: "ì–´", + ã…ž: "ì—", + ã…Ÿ: "위", + ã… : "유", + ã…¡: "으", + ã…¢: "ì˜", + ã…£: "ì´" +}; +function getLastHangulChar(text) { + for (let i = text.length - 1; i >= 0; i--) if (isHangulSyllable(text[i])) return text[i]; + return null; +} +function appendLongVowel(result) { + const last = getLastHangulChar(result); + if (!last) return result + "ー"; + const parts = decomposeHangul(last); + if (!parts) return result + "ー"; + return result + (LONG_VOWEL_MAP[parts.jung] ?? ""); +} +function handleLongVowelMark(result, style) { + switch (style) { + case "expand": return appendLongVowel(result); + case "collapse": return result; + case "remove": return result; + case "keepMark": return result + "ー"; + default: return result; + } +} +function getSokuonJongByNextKana(nextKana) { + const next = katakanaToHiragana(nextKana ?? ""); + if ("ã‹ããã‘ã“ãŒãŽãã’ã”".includes(next)) return "ㄱ"; + if ("ã•ã—ã™ã›ãã–ã˜ãšãœãž".includes(next)) return "ã……"; + if ("ãŸã¡ã¤ã¦ã¨ã ã¢ã¥ã§ã©".includes(next)) return "ã……"; + if ("ã¯ã²ãµã¸ã»ã°ã³ã¶ã¹ã¼ã±ã´ã·ãºã½".includes(next)) return "ã…‚"; + return "ã……"; +} +function handleSokuon(result, nextKana) { + return attachJongToLastSyllable(result, getSokuonJongByNextKana(nextKana)); +} +function getNasalJongByNextKana(nextKana, options) { + if (!options.assimilateNasal) return "ã„´"; + const next = katakanaToHiragana(nextKana ?? ""); + if ("ã¾ã¿ã‚€ã‚ã‚‚ã°ã³ã¶ã¹ã¼ã±ã´ã·ãºã½".includes(next)) return "ã…"; + if ("ã‹ããã‘ã“ãŒãŽãã’ã”".includes(next)) return "ã…‡"; + return "ã„´"; +} +function handleNasal(result, nextKana, options) { + return attachJongToLastSyllable(result, getNasalJongByNextKana(nextKana, options)); +} +function applySimpleParticleRules(input) { + return input.replace(/(^|[\sã€ã€‚ï¼ï¼Ÿ!?])ã¯(?=$|[\sã€ã€‚ï¼ï¼Ÿ!?])/g, "$1ã‚").replace(/(^|[\sã€ã€‚ï¼ï¼Ÿ!?])ã¸(?=$|[\sã€ã€‚ï¼ï¼Ÿ!?])/g, "$1ãˆ").replace(/ã‚’/g, "ãŠ"); +} +function normalizeKana(input, options) { + let text = String(input ?? ""); + text = text.normalize("NFKC"); + text = katakanaToHiragana(text); + if (options.useSimpleParticleRules) text = applySimpleParticleRules(text); + return text; +} +function hasOwnRecordValue(record, key) { + return Object.prototype.hasOwnProperty.call(record, key); +} +function findKanaMatch(text, index) { + for (const len of [3, 2]) { + const part = text.slice(index, index + len); + if (hasOwnRecordValue(COMBO_MAP, part)) return { + value: COMBO_MAP[part], + length: len + }; + } + const char = text[index]; + if (hasOwnRecordValue(KANA_MAP, char)) return { + value: KANA_MAP[char], + length: 1 + }; + return null; +} +/** +* UIìš© ìž¥ìŒ ìžì—°í™”입니다. +* +* 예: +* - ë ˆì— -> ë ˆ +* - 스우 -> 스 +* - 파아 -> 파 +* - 코오 -> ì½” +* - ì¿„ìš° -> ì¿„ +*/ +function naturalizeRepeatedVowels(text) { + let result = ""; + for (const char of text) { + const prev = result[result.length - 1]; + const prevParts = prev ? decomposeHangul(prev) : null; + if (prevParts && !prevParts.jong) { + if (char === LONG_VOWEL_MAP[prevParts.jung]) continue; + } + result += char; + } + return result; +} +/** +* Kana to Korean pronunciation. +*/ +function kanaToHangul(input, userOptions = {}) { + const options = { + ...DEFAULT_OPTIONS, + ...userOptions + }; + const text = normalizeKana(input, options); + let result = ""; + let previousKanaVowel = null; + for (let i = 0; i < text.length; i++) { + const char = text[i]; + const nextChar = text[i + 1]; + if (char === "ã£") { + result = handleSokuon(result, nextChar); + previousKanaVowel = null; + continue; + } + if (char === "ã‚“") { + result = handleNasal(result, nextChar, options); + previousKanaVowel = null; + continue; + } + if (char === "ー") { + result = handleLongVowelMark(result, options.longVowelStyle); + previousKanaVowel = null; + continue; + } + /** + * 히ë¼ê°€ë‚˜ì‹ ìž¥ìŒ ì²˜ë¦¬: + * + * - 㨠+ ㆠ-> 토오 / 토 + * - ãょ + ㆠ-> 쿄오 / ì¿„ + * - ã› + ã„ -> ì„¸ì— / 세 + */ + if (options.kanaLongVowelStyle !== "keep" && isKanaLongVowelFollower(previousKanaVowel, char)) { + result = handleKanaLongVowel(result, options.kanaLongVowelStyle); + previousKanaVowel = null; + continue; + } + const match = findKanaMatch(text, i); + if (match) { + result += match.value; + previousKanaVowel = getKanaVowel(text.slice(i, i + match.length)); + i += match.length - 1; + continue; + } + if (options.keepUnknown) result += char; + previousKanaVowel = null; + } + if (options.naturalizeRepeatedVowels) result = naturalizeRepeatedVowels(result); + return result; +} +function detectLang(str) { + const text = str.trim(); + if (text.length > 0 && /^[\p{Script=Hiragana}\s]+$/u.test(text)) return "hiragana"; + return "hangul"; +} +//#endregion +//#region src/lib/components/name-generation-visualizer.svelte +function Name_generation_visualizer($$renderer, $$props) { + $$renderer.component(($$renderer) => { + const minStepDelay = 500; + const activeCellSize = 8; + const historyCellSize = 4; + let { name, language, class: className = "" } = $$props; + let displayIndex = 0; + const trimmedName = derived(() => name.trim()); + const characters = derived(() => Array.from(trimmedName())); + const slotCount = derived(() => language === "hiragana" ? 20 : 10); + const slotIndexes = derived(() => Array.from({ length: slotCount() }, (_, index) => index)); + const stepList = (() => { + const items = []; + trimmedName(); + return { get current() { + return items; + } }; + })(); + const timelineUnits = derived(() => stepList.current.flatMap((step, stepIndex) => { + if (step.kind !== "diffusion") return [{ stepIndex }]; + return step.tensors.map((_, diffusionIndex) => ({ + stepIndex, + diffusionIndex + })); + })); + const safeDisplayIndex = derived(() => clamp(displayIndex, 0, Math.max(0, timelineUnits().length - 1))); + const activeUnit = derived(() => timelineUnits()[safeDisplayIndex()]); + const activeIndex = derived(() => activeUnit()?.stepIndex ?? 0); + const activeStep = derived(() => stepList.current[activeIndex()] ?? stepList.current[0]); + const activeDiffusionIndex = derived(() => activeUnit()?.diffusionIndex ?? 0); + const visibleSteps = derived(() => stepList.current.slice(0, activeIndex() + 1)); + const phaseLabel = derived(() => getPhaseLabel(activeStep(), activeDiffusionIndex())); + const sliderMax = derived(() => Math.max(0, timelineUnits().length - 1)); + const canUseTimeline = derived(() => timelineUnits().length > 1); + function clamp(n, min, max) { + return Math.max(min, Math.min(max, n)); + } + function getPhaseLabel(step, diffusionIndex) { + if (!step) return "waiting"; + if (step.kind === "diffusion") return `diffusion step ${diffusionIndex + 1} / ${step.tensors.length}`; + return step.label; + } + function getStepIds(step) { + if (!step) return void 0; + if (step.kind === "encoded" || step.kind === "decoded" || step.kind === "result") return step.ids; + } + function getStepSlotText(step, index) { + const id = getStepIds(step)?.[index]; + if (Number.isFinite(id)) return String(id); + if (step.kind === "input") return characters()[index] ?? ""; + return ""; + } + $$renderer.push(`
${escape_html(phaseLabel())}
`); + const each_array = ensure_array_like(visibleSteps()); + for (let index = 0, $$length = each_array.length; index < $$length; index++) { + let step = each_array[index]; + $$renderer.push(`${escape_html(step.label)}
`); + if (step.kind === "input") { + $$renderer.push(""); + $$renderer.push(`${escape_html(trimmedName() || "waiting")}
`); + if (detectLang(trimmedName()) === "hiragana") { + $$renderer.push(""); + $$renderer.push(`

${escape_html(kanaToHangul(trimmedName()))}

`); + } else $$renderer.push(""); + $$renderer.push(`
`); + const each_array_1 = ensure_array_like(slotIndexes()); + for (let $$index = 0, $$length = each_array_1.length; $$index < $$length; $$index++) { + let slotIndex = each_array_1[$$index]; + const text = getStepSlotText(step, slotIndex); + $$renderer.push(`${escape_html(text)}
`); + } + $$renderer.push(``); + } else if (step.kind === "encoded" || step.kind === "decoded") { + $$renderer.push(""); + $$renderer.push(`
`); + const each_array_2 = ensure_array_like(slotIndexes()); + for (let $$index_1 = 0, $$length = each_array_2.length; $$index_1 < $$length; $$index_1++) { + let slotIndex = each_array_2[$$index_1]; + const text = getStepSlotText(step, slotIndex); + $$renderer.push(`${escape_html(text)}
`); + } + $$renderer.push(``); + } else if (step.kind === "tensor") { + $$renderer.push(""); + Tensor_view($$renderer, { + tensors: [step.tensor], + animated: index === activeIndex() && true, + interactive: index === activeIndex(), + cellSize: index === activeIndex() ? activeCellSize : historyCellSize, + maxWidth: index === activeIndex() ? 680 : 560, + maxHeight: index === activeIndex() ? 360 : 140, + duration: Math.max(260, minStepDelay - 160), + opacity: index === activeIndex() ? 1 : .92 + }); + } else if (step.kind === "diffusion") { + $$renderer.push(""); + Tensor_view($$renderer, { + tensors: step.tensors, + frameIndex: index === activeIndex() ? activeDiffusionIndex() : step.tensors.length - 1, + animated: index === activeIndex() && true, + interactive: index === activeIndex(), + cellSize: index === activeIndex() ? activeCellSize : historyCellSize, + maxWidth: index === activeIndex() ? 680 : 560, + maxHeight: index === activeIndex() ? 360 : 140, + duration: Math.max(260, minStepDelay - 160), + opacity: index === activeIndex() ? 1 : .92 + }); + $$renderer.push(`
step ${escape_html(index === activeIndex() ? activeDiffusionIndex() + 1 : step.tensors.length)} / ${escape_html(step.tensors.length)}
`); + } else if (step.kind === "result") { + $$renderer.push(""); + $$renderer.push(`
`); + const each_array_3 = ensure_array_like(slotIndexes()); + for (let $$index_2 = 0, $$length = each_array_3.length; $$index_2 < $$length; $$index_2++) { + let slotIndex = each_array_3[$$index_2]; + const text = getStepSlotText(step, slotIndex); + $$renderer.push(`${escape_html(text)}
`); + } + $$renderer.push(`
${escape_html(step.result)}
`); + if (detectLang(step.result) === "hiragana") { + $$renderer.push(""); + $$renderer.push(`

${escape_html(kanaToHangul(step.result))}

`); + } else $$renderer.push(""); + $$renderer.push(``); + } else $$renderer.push(""); + $$renderer.push(``); + } + $$renderer.push(`
${escape_html(safeDisplayIndex() + 1)} / ${escape_html(timelineUnits().length)}
`); + }); +} +//#endregion +//#region src/lib/utils.ts +function cn(...inputs) { + return twMerge(clsx(inputs)); +} +//#endregion +//#region src/lib/components/ui/button/button.svelte +var buttonVariants = tv({ + base: "focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-2xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/80", + outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent", + secondary: "bg-secondary text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]", + ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground", + destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30", + link: "text-primary underline-offset-4 hover:underline" + }, + size: { + default: "h-8 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5", + xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3", + sm: "h-7 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", + lg: "h-9 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3", + icon: "size-8", + "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3", + "icon-sm": "size-7", + "icon-lg": "size-9" + } + }, + defaultVariants: { + variant: "default", + size: "default" + } +}); +function Button($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { class: className, variant = "default", size = "default", ref = null, href = void 0, type = "button", disabled, children, $$slots, $$events, ...restProps } = $$props; + if (href) { + $$renderer.push(""); + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + } else { + $$renderer.push(""); + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + } + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card.svelte +function Card($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, size = "default", $$slots, $$events, ...restProps } = $$props; + $$renderer.push(`img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] *:[img:last-child]:rounded-b-[min(var(--radius-4xl),24px)] group/card flex flex-col", className)), + ...restProps + })}>`); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card-content.svelte +function Card_content($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card-description.svelte +function Card_description($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(`

`); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card-footer.svelte +function Card_footer($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card-header.svelte +function Card_header($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/card/card-title.svelte +function Card_title($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/input-group/input-group.svelte +function Input_group($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, $$slots, $$events, ...props } = $$props; + $$renderer.push(`[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto", className)), + ...props + })}>`); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +//#endregion +//#region src/lib/components/ui/input-group/input-group-addon.svelte +var inputGroupAddonVariants = tv({ + base: "text-muted-foreground **:data-[slot=kbd]:bg-muted-foreground/10 h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-2xl **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", + variants: { align: { + "inline-start": "pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first", + "inline-end": "pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last", + "block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start", + "block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start" + } }, + defaultVariants: { align: "inline-start" } +}); +function Input_group_addon($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, class: className, children, align = "inline-start", $$slots, $$events, ...restProps } = $$props; + $$renderer.push(``); + children?.($$renderer); + $$renderer.push(``); + bind_props($$props, { ref }); + }); +} +tv({ + base: "gap-2 rounded-2xl text-sm flex items-center shadow-none", + variants: { size: { + xs: "h-6 gap-1 rounded-xl px-1.5 [&>svg:not([class*='size-'])]:size-3.5", + sm: "cn-input-group-button-size-sm", + "icon-xs": "size-6 rounded-xl p-0 has-[>svg]:p-0", + "icon-sm": "size-8 p-0 has-[>svg]:p-0" + } }, + defaultVariants: { size: "xs" } +}); +//#endregion +//#region src/lib/components/ui/input/input.svelte +function Input($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, value = void 0, type, files = void 0, class: className, "data-slot": dataSlot = "input", $$slots, $$events, ...restProps } = $$props; + if (type === "file") { + $$renderer.push(""); + $$renderer.push(``); + } else { + $$renderer.push(""); + $$renderer.push(``); + } + $$renderer.push(``); + bind_props($$props, { + ref, + value, + files + }); + }); +} +//#endregion +//#region src/lib/components/ui/input-group/input-group-input.svelte +function Input_group_input($$renderer, $$props) { + $$renderer.component(($$renderer) => { + let { ref = null, value = void 0, class: className, $$slots, $$events, ...props } = $$props; + let $$settled = true; + let $$inner_renderer; + function $$render_inner($$renderer) { + Input($$renderer, spread_props([ + { + "data-slot": "input-group-control", + class: cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1", className) + }, + props, + { + get ref() { + return ref; + }, + set ref($$value) { + ref = $$value; + $$settled = false; + }, + get value() { + return value; + }, + set value($$value) { + value = $$value; + $$settled = false; + } + } + ])); + } + do { + $$settled = true; + $$inner_renderer = $$renderer.copy(); + $$render_inner($$inner_renderer); + } while (!$$settled); + $$renderer.subsume($$inner_renderer); + bind_props($$props, { + ref, + value + }); + }); +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/is.js +function isFunction(value) { + return typeof value === "function"; +} +function isObject(value) { + return value !== null && typeof value === "object"; +} +var CLASS_VALUE_PRIMITIVE_TYPES = [ + "string", + "number", + "bigint", + "boolean" +]; +function isClassValue(value) { + if (value === null || value === void 0) return true; + if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value)) return true; + if (Array.isArray(value)) return value.every((item) => isClassValue(item)); + if (typeof value === "object") { + if (Object.getPrototypeOf(value) !== Object.prototype) return false; + return true; + } + return false; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/box/box-extras.svelte.js +var BoxSymbol = Symbol("box"); +var isWritableSymbol = Symbol("is-writable"); +function boxWith(getter, setter) { + const derived$1 = derived(getter); + if (setter) return { + [BoxSymbol]: true, + [isWritableSymbol]: true, + get current() { + return derived$1(); + }, + set current(v) { + setter(v); + } + }; + return { + [BoxSymbol]: true, + get current() { + return getter(); + } + }; +} +/** +* @returns Whether the value is a Box +* +* @see {@link https://runed.dev/docs/functions/box} +*/ +function isBox(value) { + return isObject(value) && BoxSymbol in value; +} +/** +* @returns Whether the value is a WritableBox +* +* @see {@link https://runed.dev/docs/functions/box} +*/ +function isWritableBox(value) { + return isBox(value) && isWritableSymbol in value; +} +function boxFrom(value) { + if (isBox(value)) return value; + if (isFunction(value)) return boxWith(value); + return simpleBox(value); +} +/** +* Function that gets an object of boxes, and returns an object of reactive values +* +* @example +* const count = box(0) +* const flat = box.flatten({ count, double: box.with(() => count.current) }) +* // type of flat is { count: number, readonly double: number } +* +* @see {@link https://runed.dev/docs/functions/box} +*/ +function boxFlatten(boxes) { + return Object.entries(boxes).reduce((acc, [key, b]) => { + if (!isBox(b)) return Object.assign(acc, { [key]: b }); + if (isWritableBox(b)) Object.defineProperty(acc, key, { + get() { + return b.current; + }, + set(v) { + b.current = v; + } + }); + else Object.defineProperty(acc, key, { get() { + return b.current; + } }); + return acc; + }, {}); +} +/** +* Function that converts a box to a readonly box. +* +* @example +* const count = box(0) // WritableBox +* const countReadonly = box.readonly(count) // ReadableBox +* +* @see {@link https://runed.dev/docs/functions/box} +*/ +function toReadonlyBox(b) { + if (!isWritableBox(b)) return b; + return { + [BoxSymbol]: true, + get current() { + return b.current; + } + }; +} +function simpleBox(initialValue) { + let current = initialValue; + return { + [BoxSymbol]: true, + [isWritableSymbol]: true, + get current() { + return current; + }, + set current(v) { + current = v; + } + }; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/box/box.svelte.js +function box(initialValue) { + let current = initialValue; + return { + [BoxSymbol]: true, + [isWritableSymbol]: true, + get current() { + return current; + }, + set current(v) { + current = v; + } + }; +} +box.from = boxFrom; +box.with = boxWith; +box.flatten = boxFlatten; +box.readonly = toReadonlyBox; +box.isBox = isBox; +box.isWritableBox = isWritableBox; +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/compose-handlers.js +/** +* Composes event handlers into a single function that can be called with an event. +* If the previous handler cancels the event using `event.preventDefault()`, the handlers +* that follow will not be called. +*/ +function composeHandlers(...handlers) { + return function(e) { + for (const handler of handlers) { + if (!handler) continue; + if (e.defaultPrevented) return; + if (typeof handler === "function") handler.call(this, e); + else handler.current?.call(this, e); + } + }; +} +//#endregion +//#region node_modules/.pnpm/inline-style-parser@0.2.7/node_modules/inline-style-parser/esm/index.mjs +var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; +var NEWLINE_REGEX = /\n/g; +var WHITESPACE_REGEX = /^\s*/; +var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/; +var COLON_REGEX = /^:\s*/; +var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/; +var SEMICOLON_REGEX = /^[;\s]*/; +var TRIM_REGEX = /^\s+|\s+$/g; +var NEWLINE = "\n"; +var FORWARD_SLASH = "/"; +var ASTERISK = "*"; +var EMPTY_STRING = ""; +var TYPE_COMMENT = "comment"; +var TYPE_DECLARATION = "declaration"; +/** +* @param {String} style +* @param {Object} [options] +* @return {Object[]} +* @throws {TypeError} +* @throws {Error} +*/ +function index(style, options) { + if (typeof style !== "string") throw new TypeError("First argument must be a string"); + if (!style) return []; + options = options || {}; + /** + * Positional. + */ + var lineno = 1; + var column = 1; + /** + * Update lineno and column based on `str`. + * + * @param {String} str + */ + function updatePosition(str) { + var lines = str.match(NEWLINE_REGEX); + if (lines) lineno += lines.length; + var i = str.lastIndexOf(NEWLINE); + column = ~i ? str.length - i : column + str.length; + } + /** + * Mark position and patch `node.position`. + * + * @return {Function} + */ + function position() { + var start = { + line: lineno, + column + }; + return function(node) { + node.position = new Position(start); + whitespace(); + return node; + }; + } + /** + * Store position information for a node. + * + * @constructor + * @property {Object} start + * @property {Object} end + * @property {undefined|String} source + */ + function Position(start) { + this.start = start; + this.end = { + line: lineno, + column + }; + this.source = options.source; + } + /** + * Non-enumerable source string. + */ + Position.prototype.content = style; + /** + * Error `msg`. + * + * @param {String} msg + * @throws {Error} + */ + function error(msg) { + var err = /* @__PURE__ */ new Error(options.source + ":" + lineno + ":" + column + ": " + msg); + err.reason = msg; + err.filename = options.source; + err.line = lineno; + err.column = column; + err.source = style; + if (options.silent); + else throw err; + } + /** + * Match `re` and return captures. + * + * @param {RegExp} re + * @return {undefined|Array} + */ + function match(re) { + var m = re.exec(style); + if (!m) return; + var str = m[0]; + updatePosition(str); + style = style.slice(str.length); + return m; + } + /** + * Parse whitespace. + */ + function whitespace() { + match(WHITESPACE_REGEX); + } + /** + * Parse comments. + * + * @param {Object[]} [rules] + * @return {Object[]} + */ + function comments(rules) { + var c; + rules = rules || []; + while (c = comment()) if (c !== false) rules.push(c); + return rules; + } + /** + * Parse comment. + * + * @return {Object} + * @throws {Error} + */ + function comment() { + var pos = position(); + if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return; + var i = 2; + while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) ++i; + i += 2; + if (EMPTY_STRING === style.charAt(i - 1)) return error("End of comment missing"); + var str = style.slice(2, i - 2); + column += 2; + updatePosition(str); + style = style.slice(i); + column += 2; + return pos({ + type: TYPE_COMMENT, + comment: str + }); + } + /** + * Parse declaration. + * + * @return {Object} + * @throws {Error} + */ + function declaration() { + var pos = position(); + var prop = match(PROPERTY_REGEX); + if (!prop) return; + comment(); + if (!match(COLON_REGEX)) return error("property missing ':'"); + var val = match(VALUE_REGEX); + var ret = pos({ + type: TYPE_DECLARATION, + property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)), + value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING + }); + match(SEMICOLON_REGEX); + return ret; + } + /** + * Parse declarations. + * + * @return {Object[]} + */ + function declarations() { + var decls = []; + comments(decls); + var decl; + while (decl = declaration()) if (decl !== false) { + decls.push(decl); + comments(decls); + } + return decls; + } + whitespace(); + return declarations(); +} +/** +* Trim `str`. +* +* @param {String} str +* @return {String} +*/ +function trim(str) { + return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING; +} +//#endregion +//#region node_modules/.pnpm/style-to-object@1.0.14/node_modules/style-to-object/esm/index.mjs +/** +* Parses inline style to object. +* +* @param style - Inline style. +* @param iterator - Iterator. +* @returns - Style object or null. +* +* @example Parsing inline style to object: +* +* ```js +* import parse from 'style-to-object'; +* parse('line-height: 42;'); // { 'line-height': '42' } +* ``` +*/ +function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== "string") return styleObject; + const declarations = index(style); + const hasIterator = typeof iterator === "function"; + declarations.forEach((declaration) => { + if (declaration.type !== "declaration") return; + const { property, value } = declaration; + if (hasIterator) iterator(property, value, declaration); + else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/strings.js +var NUMBER_CHAR_RE = /\d/; +var STR_SPLITTERS = [ + "-", + "_", + "/", + "." +]; +function isUppercase(char = "") { + if (NUMBER_CHAR_RE.test(char)) return void 0; + return char !== char.toLowerCase(); +} +function splitByCase(str) { + const parts = []; + let buff = ""; + let previousUpper; + let previousSplitter; + for (const char of str) { + const isSplitter = STR_SPLITTERS.includes(char); + if (isSplitter === true) { + parts.push(buff); + buff = ""; + previousUpper = void 0; + continue; + } + const isUpper = isUppercase(char); + if (previousSplitter === false) { + if (previousUpper === false && isUpper === true) { + parts.push(buff); + buff = char; + previousUpper = isUpper; + continue; + } + if (previousUpper === true && isUpper === false && buff.length > 1) { + const lastChar = buff.at(-1); + parts.push(buff.slice(0, Math.max(0, buff.length - 1))); + buff = lastChar + char; + previousUpper = isUpper; + continue; + } + } + buff += char; + previousUpper = isUpper; + previousSplitter = isSplitter; + } + parts.push(buff); + return parts; +} +function pascalCase(str) { + if (!str) return ""; + return splitByCase(str).map((p) => upperFirst(p)).join(""); +} +function camelCase(str) { + return lowerFirst(pascalCase(str || "")); +} +function upperFirst(str) { + return str ? str[0].toUpperCase() + str.slice(1) : ""; +} +function lowerFirst(str) { + return str ? str[0].toLowerCase() + str.slice(1) : ""; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/css-to-style-obj.js +function cssToStyleObj(css) { + if (!css) return {}; + const styleObj = {}; + function iterator(name, value) { + if (name.startsWith("-moz-") || name.startsWith("-webkit-") || name.startsWith("-ms-") || name.startsWith("-o-")) { + styleObj[pascalCase(name)] = value; + return; + } + if (name.startsWith("--")) { + styleObj[name] = value; + return; + } + styleObj[camelCase(name)] = value; + } + StyleToObject(css, iterator); + return styleObj; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/execute-callbacks.js +/** +* Executes an array of callback functions with the same arguments. +* @template T The types of the arguments that the callback functions take. +* @param callbacks array of callback functions to execute. +* @returns A new function that executes all of the original callback functions with the same arguments. +*/ +function executeCallbacks(...callbacks) { + return (...args) => { + for (const callback of callbacks) if (typeof callback === "function") callback(...args); + }; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/style-to-css.js +function createParser(matcher, replacer) { + const regex = RegExp(matcher, "g"); + return (str) => { + if (typeof str !== "string") throw new TypeError(`expected an argument of type string, but got ${typeof str}`); + if (!str.match(regex)) return str; + return str.replace(regex, replacer); + }; +} +var camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`); +function styleToCSS(styleObj) { + if (!styleObj || typeof styleObj !== "object" || Array.isArray(styleObj)) throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`); + return Object.keys(styleObj).map((property) => `${camelToKebab(property)}: ${styleObj[property]};`).join("\n"); +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/style.js +function styleToString(style = {}) { + return styleToCSS(style).replace("\n", " "); +} +var EVENT_LIST_SET = new Set([ + "onabort", + "onanimationcancel", + "onanimationend", + "onanimationiteration", + "onanimationstart", + "onauxclick", + "onbeforeinput", + "onbeforetoggle", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncompositionend", + "oncompositionstart", + "oncompositionupdate", + "oncontextlost", + "oncontextmenu", + "oncontextrestored", + "oncopy", + "oncuechange", + "oncut", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "onfocusin", + "onfocusout", + "onformdata", + "ongotpointercapture", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onlostpointercapture", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpointercancel", + "onpointerdown", + "onpointerenter", + "onpointerleave", + "onpointermove", + "onpointerout", + "onpointerover", + "onpointerup", + "onprogress", + "onratechange", + "onreset", + "onresize", + "onscroll", + "onscrollend", + "onsecuritypolicyviolation", + "onseeked", + "onseeking", + "onselect", + "onselectionchange", + "onselectstart", + "onslotchange", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "ontoggle", + "ontouchcancel", + "ontouchend", + "ontouchmove", + "ontouchstart", + "ontransitioncancel", + "ontransitionend", + "ontransitionrun", + "ontransitionstart", + "onvolumechange", + "onwaiting", + "onwebkitanimationend", + "onwebkitanimationiteration", + "onwebkitanimationstart", + "onwebkittransitionend", + "onwheel" +]); +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/merge-props.js +/** +* Modified from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/utils/src/mergeProps.ts (see NOTICE.txt for source) +*/ +function isEventHandler(key) { + return EVENT_LIST_SET.has(key); +} +/** +* Given a list of prop objects, merges them into a single object. +* - Automatically composes event handlers (e.g. `onclick`, `oninput`, etc.) +* - Chains regular functions with the same name so they are called in order +* - Merges class strings with `clsx` +* - Merges style objects and converts them to strings +* - Handles a bug with Svelte where setting the `hidden` attribute to `false` doesn't remove it +* - Overrides other values with the last one +*/ +function mergeProps(...args) { + const result = { ...args[0] }; + for (let i = 1; i < args.length; i++) { + const props = args[i]; + if (!props) continue; + for (const key of Object.keys(props)) { + const a = result[key]; + const b = props[key]; + const aIsFunction = typeof a === "function"; + const bIsFunction = typeof b === "function"; + if (aIsFunction && typeof bIsFunction && isEventHandler(key)) result[key] = composeHandlers(a, b); + else if (aIsFunction && bIsFunction) result[key] = executeCallbacks(a, b); + else if (key === "class") { + const aIsClassValue = isClassValue(a); + const bIsClassValue = isClassValue(b); + if (aIsClassValue && bIsClassValue) result[key] = clsx(a, b); + else if (aIsClassValue) result[key] = clsx(a); + else if (bIsClassValue) result[key] = clsx(b); + } else if (key === "style") { + const aIsObject = typeof a === "object"; + const bIsObject = typeof b === "object"; + const aIsString = typeof a === "string"; + const bIsString = typeof b === "string"; + if (aIsObject && bIsObject) result[key] = { + ...a, + ...b + }; + else if (aIsObject && bIsString) { + const parsedStyle = cssToStyleObj(b); + result[key] = { + ...a, + ...parsedStyle + }; + } else if (aIsString && bIsObject) result[key] = { + ...cssToStyleObj(a), + ...b + }; + else if (aIsString && bIsString) { + const parsedStyleA = cssToStyleObj(a); + const parsedStyleB = cssToStyleObj(b); + result[key] = { + ...parsedStyleA, + ...parsedStyleB + }; + } else if (aIsObject) result[key] = a; + else if (bIsObject) result[key] = b; + else if (aIsString) result[key] = a; + else if (bIsString) result[key] = b; + } else result[key] = b !== void 0 ? b : a; + } + for (const key of Object.getOwnPropertySymbols(props)) { + const a = result[key]; + const b = props[key]; + result[key] = b !== void 0 ? b : a; + } + } + if (typeof result.style === "object") result.style = styleToString(result.style).replaceAll("\n", " "); + if (result.hidden === false) { + result.hidden = void 0; + delete result.hidden; + } + if (result.disabled === false) { + result.disabled = void 0; + delete result.disabled; + } + return result; +} +//#endregion +//#region node_modules/.pnpm/runed@0.35.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typ_aa90655cdbf3de689965bd7091bbcc56/node_modules/runed/dist/internal/configurable-globals.js +var defaultWindow = void 0; +//#endregion +//#region node_modules/.pnpm/runed@0.35.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typ_aa90655cdbf3de689965bd7091bbcc56/node_modules/runed/dist/internal/utils/dom.js +/** +* Handles getting the active element in a document or shadow root. +* If the active element is within a shadow root, it will traverse the shadow root +* to find the active element. +* If not, it will return the active element in the document. +* +* @param document A document or shadow root to get the active element from. +* @returns The active element in the document or shadow root. +*/ +function getActiveElement$1(document) { + let activeElement = document.activeElement; + while (activeElement?.shadowRoot) { + const node = activeElement.shadowRoot.activeElement; + if (node === activeElement) break; + else activeElement = node; + } + return activeElement; +} +var SvelteMap = globalThis.Map; +/** +* @param {any} _ +*/ +function createSubscriber(_) { + return () => {}; +} +//#endregion +//#region node_modules/.pnpm/runed@0.35.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typ_aa90655cdbf3de689965bd7091bbcc56/node_modules/runed/dist/utilities/active-element/active-element.svelte.js +var ActiveElement = class { + #document; + #subscribe; + constructor(options = {}) { + const { window = defaultWindow, document = window?.document } = options; + if (window === void 0) return; + this.#document = document; + this.#subscribe = createSubscriber(); + } + get current() { + this.#subscribe?.(); + if (!this.#document) return null; + return getActiveElement$1(this.#document); + } +}; +new ActiveElement(); +//#endregion +//#region node_modules/.pnpm/runed@0.35.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typ_aa90655cdbf3de689965bd7091bbcc56/node_modules/runed/dist/utilities/context/context.js +var Context = class { + #name; + #key; + /** + * @param name The name of the context. + * This is used for generating the context key and error messages. + */ + constructor(name) { + this.#name = name; + this.#key = Symbol(name); + } + /** + * The key used to get and set the context. + * + * It is not recommended to use this value directly. + * Instead, use the methods provided by this class. + */ + get key() { + return this.#key; + } + /** + * Checks whether this has been set in the context of a parent component. + * + * Must be called during component initialisation. + */ + exists() { + return hasContext(this.#key); + } + /** + * Retrieves the context that belongs to the closest parent component. + * + * Must be called during component initialisation. + * + * @throws An error if the context does not exist. + */ + get() { + const context = getContext(this.#key); + if (context === void 0) throw new Error(`Context "${this.#name}" not found`); + return context; + } + /** + * Retrieves the context that belongs to the closest parent component, + * or the given fallback value if the context does not exist. + * + * Must be called during component initialisation. + */ + getOr(fallback) { + const context = getContext(this.#key); + if (context === void 0) return fallback; + return context; + } + /** + * Associates the given value with the current component and returns it. + * + * Must be called during component initialisation. + */ + set(context) { + return setContext(this.#key, context); + } +}; +//#endregion +//#region node_modules/.pnpm/runed@0.35.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typ_aa90655cdbf3de689965bd7091bbcc56/node_modules/runed/dist/utilities/watch/watch.svelte.js +function runWatcher(sources, flush, effect, options = {}) { + const { lazy = false } = options; +} +function watch(sources, effect, options) { + runWatcher(sources, "post", effect, options); +} +function watchPre(sources, effect, options) { + runWatcher(sources, "pre", effect, options); +} +watch.pre = watchPre; +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/dom.js +var DOCUMENT_NODE = 9; +function isDocument(node) { + return isObject(node) && node.nodeType === DOCUMENT_NODE; +} +function isWindow(node) { + return isObject(node) && node.constructor?.name === "VisualViewport"; +} +function getDocument(node) { + if (isDocument(node)) return node; + if (isWindow(node)) return node.document; + return node?.ownerDocument ?? document; +} +function getActiveElement(rootNode) { + let activeElement = rootNode.activeElement; + while (activeElement?.shadowRoot) { + const el = activeElement.shadowRoot.activeElement; + if (el === activeElement) break; + else activeElement = el; + } + return activeElement; +} +//#endregion +//#region node_modules/.pnpm/svelte-toolbelt@0.10.6_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5_340c40229bd128fd01ee508b9e3328e0/node_modules/svelte-toolbelt/dist/utils/dom-context.svelte.js +var DOMContext = class { + element; + #root = derived(() => { + if (!this.element.current) return document; + return this.element.current.getRootNode() ?? document; + }); + get root() { + return this.#root(); + } + set root($$value) { + return this.#root($$value); + } + constructor(element) { + if (typeof element === "function") this.element = boxWith(element); + else this.element = element; + } + getDocument = () => { + return getDocument(this.root); + }; + getWindow = () => { + return this.getDocument().defaultView ?? window; + }; + getActiveElement = () => { + return getActiveElement(this.root); + }; + isActiveElement = (node) => { + return node === this.getActiveElement(); + }; + getElementById(id) { + return this.root.getElementById(id); + } + querySelector = (selector) => { + if (!this.root) return null; + return this.root.querySelector(selector); + }; + querySelectorAll = (selector) => { + if (!this.root) return []; + return this.root.querySelectorAll(selector); + }; + setTimeout = (callback, delay) => { + return this.getWindow().setTimeout(callback, delay); + }; + clearTimeout = (timeoutId) => { + return this.getWindow().clearTimeout(timeoutId); + }; +}; +//#endregion +//#region node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.60.0/node_modules/svelte/src/attachments/index.js +/** +* Creates an object key that will be recognised as an attachment when the object is spread onto an element, +* as a programmatic alternative to using `{@attach ...}`. This can be useful for library authors, though +* is generally not needed when building an app. +* +* ```svelte +*