@rinzai/zen 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/badge/index.d.ts +20 -0
  2. package/dist/badge/index.d.ts.map +1 -0
  3. package/dist/{component/Component.stories.d.ts → badge/index.stories.d.ts} +3 -3
  4. package/dist/badge/index.stories.d.ts.map +1 -0
  5. package/dist/button/index.d.ts +5 -6
  6. package/dist/button/index.d.ts.map +1 -1
  7. package/dist/button/{Button.stories.d.ts → index.stories.d.ts} +1 -1
  8. package/dist/button/index.stories.d.ts.map +1 -0
  9. package/dist/collapse/index.d.ts +16 -0
  10. package/dist/collapse/index.d.ts.map +1 -0
  11. package/dist/collapse/index.stories.d.ts +4 -0
  12. package/dist/collapse/index.stories.d.ts.map +1 -0
  13. package/dist/component/index.d.ts +6 -9
  14. package/dist/component/index.d.ts.map +1 -1
  15. package/dist/component/index.stories.d.ts +25 -0
  16. package/dist/component/index.stories.d.ts.map +1 -0
  17. package/dist/container/index.d.ts +3 -2
  18. package/dist/container/index.d.ts.map +1 -1
  19. package/dist/container/index.stories.d.ts +5 -0
  20. package/dist/container/index.stories.d.ts.map +1 -0
  21. package/dist/dropdown/index.d.ts +20 -0
  22. package/dist/dropdown/index.d.ts.map +1 -0
  23. package/dist/dropdown/index.stories.d.ts +7 -0
  24. package/dist/dropdown/index.stories.d.ts.map +1 -0
  25. package/dist/icons/chevron-down.d.ts +3 -0
  26. package/dist/icons/chevron-down.d.ts.map +1 -0
  27. package/dist/icons/chevron-up.d.ts +3 -0
  28. package/dist/icons/chevron-up.d.ts.map +1 -0
  29. package/dist/icons/icon.types.d.ts +4 -0
  30. package/dist/icons/icon.types.d.ts.map +1 -0
  31. package/dist/icons/index.d.ts +4 -0
  32. package/dist/icons/index.d.ts.map +1 -0
  33. package/dist/icons/search.d.ts +3 -0
  34. package/dist/icons/search.d.ts.map +1 -0
  35. package/dist/icons/x-mark.d.ts +3 -0
  36. package/dist/icons/x-mark.d.ts.map +1 -0
  37. package/dist/index.d.ts +6 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/input/index.d.ts +5 -0
  40. package/dist/input/index.d.ts.map +1 -0
  41. package/dist/input/index.stories.d.ts +4 -0
  42. package/dist/input/index.stories.d.ts.map +1 -0
  43. package/dist/popover/index.d.ts +20 -0
  44. package/dist/popover/index.d.ts.map +1 -0
  45. package/dist/toggle/index.d.ts +2 -2
  46. package/dist/toggle/index.d.ts.map +1 -1
  47. package/dist/toggle/{Toggle.Stories.d.ts → index.stories.d.ts} +1 -1
  48. package/dist/toggle/index.stories.d.ts.map +1 -0
  49. package/dist/utils/cva.d.ts +2 -2
  50. package/dist/utils/cva.d.ts.map +1 -1
  51. package/dist/utils/cx.d.ts.map +1 -1
  52. package/dist/utils/useClickOutside.d.ts +3 -0
  53. package/dist/utils/useClickOutside.d.ts.map +1 -0
  54. package/dist/zen.js +2639 -0
  55. package/package.json +79 -79
  56. package/dist/button/Button.stories.d.ts.map +0 -1
  57. package/dist/component/Component.stories.d.ts.map +0 -1
  58. package/dist/container/Container.stories.d.ts +0 -21
  59. package/dist/container/Container.stories.d.ts.map +0 -1
  60. package/dist/style.css +0 -1
  61. package/dist/toggle/Toggle.Stories.d.ts.map +0 -1
  62. package/dist/zen.es.js +0 -743
  63. package/dist/zen.umd.js +0 -27
package/dist/zen.js ADDED
@@ -0,0 +1,2639 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}h1{scroll-margin:5rem;font-size:2.25rem;line-height:2.5rem;font-weight:800;letter-spacing:-.025em}@media (min-width: 1024px){h1{font-size:3rem;line-height:1}}h2{scroll-margin:5rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;letter-spacing:-.025em}h2:first-child{margin-top:0}h3{scroll-margin:5rem;font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em}h4{scroll-margin:5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em}h5{scroll-margin:5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em}h6{scroll-margin:5rem;font-size:1rem;line-height:1.5rem;font-weight:600;letter-spacing:-.025em}p{line-height:1.75rem}p:not(:first-child){margin-top:1.5rem}blockquote{margin-top:1.5rem;border-left-width:2px;padding-left:1.5rem;font-style:italic}code,pre{position:relative;border-radius:.25rem;background-color:hsl(var(--muted));padding:.2rem .3rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;font-weight:600;color:hsl(var(--muted-foreground))}label{font-size:.875rem;line-height:1.25rem;font-weight:500;line-height:1}.peer:disabled~label{cursor:not-allowed;opacity:.7}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.left-3{left:.75rem}.top-0{top:0}.top-3{top:.75rem}.z-50{z-index:50}.z-auto{z-index:auto}.mr-2{margin-right:.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-60{max-height:15rem}.w-10{width:2.5rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-fit{width:fit-content}.w-full{width:100%}.min-w-max{min-width:max-content}.min-w-min{min-width:min-content}.max-w-\\[calc\\(100\\%-30px\\)\\]{max-width:calc(100% - 30px)}.flex-none{flex:none}.grow{flex-grow:1}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-flow-row{grid-auto-flow:row}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.divide-y-2>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(2px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(2px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-border{border-color:hsl(var(--border))}.border-input{border-color:hsl(var(--input))}.border-muted{border-color:hsl(var(--muted))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.\\!bg-input{background-color:hsl(var(--input))!important}.bg-background{background-color:hsl(var(--background))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-input{background-color:hsl(var(--input))}.bg-muted{background-color:hsl(var(--muted))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\\/90{background-color:hsl(var(--primary) / .9)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pr-1{padding-right:.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted{color:hsl(var(--muted))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline-offset-4{text-underline-offset:4px}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-ring{--tw-shadow-color: hsl(var(--ring));--tw-shadow: var(--tw-shadow-colored)}.shadow-secondary{--tw-shadow-color: hsl(var(--secondary));--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-muted-foreground:hover{background-color:hsl(var(--muted-foreground))}.hover\\:bg-primary\\/60:hover{background-color:hsl(var(--primary) / .6)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:border-primary:focus-visible{border-color:hsl(var(--primary))}.focus-visible\\:shadow-sm:focus-visible{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\\:shadow-ring:focus-visible{--tw-shadow-color: hsl(var(--ring));--tw-shadow: var(--tw-shadow-colored)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-muted:disabled{background-color:hsl(var(--muted))}.disabled\\:text-muted:disabled{color:hsl(var(--muted))}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:text-muted{color:hsl(var(--muted))}')),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ import * as M from "react";
3
+ import It, { forwardRef as Ze, useLayoutEffect as Rn, useEffect as Se, useState as Me, useId as Cn, useMemo as Xe, useRef as Pt } from "react";
4
+ import * as On from "react-dom";
5
+ import { createPortal as Sn, flushSync as Tn } from "react-dom";
6
+ var Je = { exports: {} }, ge = {};
7
+ /**
8
+ * @license React
9
+ * react-jsx-runtime.development.js
10
+ *
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ var wt;
17
+ function _n() {
18
+ return wt || (wt = 1, process.env.NODE_ENV !== "production" && function() {
19
+ var t = It, r = Symbol.for("react.element"), e = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), p = Symbol.iterator, y = "@@iterator";
20
+ function R(i) {
21
+ if (i === null || typeof i != "object")
22
+ return null;
23
+ var f = p && i[p] || i[y];
24
+ return typeof f == "function" ? f : null;
25
+ }
26
+ var b = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
27
+ function x(i) {
28
+ {
29
+ for (var f = arguments.length, v = new Array(f > 1 ? f - 1 : 0), E = 1; E < f; E++)
30
+ v[E - 1] = arguments[E];
31
+ _("error", i, v);
32
+ }
33
+ }
34
+ function _(i, f, v) {
35
+ {
36
+ var E = b.ReactDebugCurrentFrame, T = E.getStackAddendum();
37
+ T !== "" && (f += "%s", v = v.concat([T]));
38
+ var k = v.map(function(S) {
39
+ return String(S);
40
+ });
41
+ k.unshift("Warning: " + f), Function.prototype.apply.call(console[i], console, k);
42
+ }
43
+ }
44
+ var j = !1, O = !1, N = !1, z = !1, F = !1, Z;
45
+ Z = Symbol.for("react.module.reference");
46
+ function re(i) {
47
+ return !!(typeof i == "string" || typeof i == "function" || i === n || i === s || F || i === o || i === u || i === d || z || i === h || j || O || N || typeof i == "object" && i !== null && (i.$$typeof === g || i.$$typeof === m || i.$$typeof === a || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
48
+ // types supported by any Flight configuration anywhere since
49
+ // we don't know which Flight build this will end up being used
50
+ // with.
51
+ i.$$typeof === Z || i.getModuleId !== void 0));
52
+ }
53
+ function J(i, f, v) {
54
+ var E = i.displayName;
55
+ if (E)
56
+ return E;
57
+ var T = f.displayName || f.name || "";
58
+ return T !== "" ? v + "(" + T + ")" : v;
59
+ }
60
+ function B(i) {
61
+ return i.displayName || "Context";
62
+ }
63
+ function L(i) {
64
+ if (i == null)
65
+ return null;
66
+ if (typeof i.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
67
+ return i.displayName || i.name || null;
68
+ if (typeof i == "string")
69
+ return i;
70
+ switch (i) {
71
+ case n:
72
+ return "Fragment";
73
+ case e:
74
+ return "Portal";
75
+ case s:
76
+ return "Profiler";
77
+ case o:
78
+ return "StrictMode";
79
+ case u:
80
+ return "Suspense";
81
+ case d:
82
+ return "SuspenseList";
83
+ }
84
+ if (typeof i == "object")
85
+ switch (i.$$typeof) {
86
+ case l:
87
+ var f = i;
88
+ return B(f) + ".Consumer";
89
+ case a:
90
+ var v = i;
91
+ return B(v._context) + ".Provider";
92
+ case c:
93
+ return J(i, i.render, "ForwardRef");
94
+ case m:
95
+ var E = i.displayName || null;
96
+ return E !== null ? E : L(i.type) || "Memo";
97
+ case g: {
98
+ var T = i, k = T._payload, S = T._init;
99
+ try {
100
+ return L(S(k));
101
+ } catch {
102
+ return null;
103
+ }
104
+ }
105
+ }
106
+ return null;
107
+ }
108
+ var I = Object.assign, V = 0, A, Y, q, nt, rt, ot, it;
109
+ function st() {
110
+ }
111
+ st.__reactDisabledLog = !0;
112
+ function Gt() {
113
+ {
114
+ if (V === 0) {
115
+ A = console.log, Y = console.info, q = console.warn, nt = console.error, rt = console.group, ot = console.groupCollapsed, it = console.groupEnd;
116
+ var i = {
117
+ configurable: !0,
118
+ enumerable: !0,
119
+ value: st,
120
+ writable: !0
121
+ };
122
+ Object.defineProperties(console, {
123
+ info: i,
124
+ log: i,
125
+ warn: i,
126
+ error: i,
127
+ group: i,
128
+ groupCollapsed: i,
129
+ groupEnd: i
130
+ });
131
+ }
132
+ V++;
133
+ }
134
+ }
135
+ function Zt() {
136
+ {
137
+ if (V--, V === 0) {
138
+ var i = {
139
+ configurable: !0,
140
+ enumerable: !0,
141
+ writable: !0
142
+ };
143
+ Object.defineProperties(console, {
144
+ log: I({}, i, {
145
+ value: A
146
+ }),
147
+ info: I({}, i, {
148
+ value: Y
149
+ }),
150
+ warn: I({}, i, {
151
+ value: q
152
+ }),
153
+ error: I({}, i, {
154
+ value: nt
155
+ }),
156
+ group: I({}, i, {
157
+ value: rt
158
+ }),
159
+ groupCollapsed: I({}, i, {
160
+ value: ot
161
+ }),
162
+ groupEnd: I({}, i, {
163
+ value: it
164
+ })
165
+ });
166
+ }
167
+ V < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
168
+ }
169
+ }
170
+ var Ve = b.ReactCurrentDispatcher, $e;
171
+ function xe(i, f, v) {
172
+ {
173
+ if ($e === void 0)
174
+ try {
175
+ throw Error();
176
+ } catch (T) {
177
+ var E = T.stack.trim().match(/\n( *(at )?)/);
178
+ $e = E && E[1] || "";
179
+ }
180
+ return `
181
+ ` + $e + i;
182
+ }
183
+ }
184
+ var Be = !1, ye;
185
+ {
186
+ var Qt = typeof WeakMap == "function" ? WeakMap : Map;
187
+ ye = new Qt();
188
+ }
189
+ function at(i, f) {
190
+ if (!i || Be)
191
+ return "";
192
+ {
193
+ var v = ye.get(i);
194
+ if (v !== void 0)
195
+ return v;
196
+ }
197
+ var E;
198
+ Be = !0;
199
+ var T = Error.prepareStackTrace;
200
+ Error.prepareStackTrace = void 0;
201
+ var k;
202
+ k = Ve.current, Ve.current = null, Gt();
203
+ try {
204
+ if (f) {
205
+ var S = function() {
206
+ throw Error();
207
+ };
208
+ if (Object.defineProperty(S.prototype, "props", {
209
+ set: function() {
210
+ throw Error();
211
+ }
212
+ }), typeof Reflect == "object" && Reflect.construct) {
213
+ try {
214
+ Reflect.construct(S, []);
215
+ } catch (Q) {
216
+ E = Q;
217
+ }
218
+ Reflect.construct(i, [], S);
219
+ } else {
220
+ try {
221
+ S.call();
222
+ } catch (Q) {
223
+ E = Q;
224
+ }
225
+ i.call(S.prototype);
226
+ }
227
+ } else {
228
+ try {
229
+ throw Error();
230
+ } catch (Q) {
231
+ E = Q;
232
+ }
233
+ i();
234
+ }
235
+ } catch (Q) {
236
+ if (Q && E && typeof Q.stack == "string") {
237
+ for (var C = Q.stack.split(`
238
+ `), $ = E.stack.split(`
239
+ `), P = C.length - 1, D = $.length - 1; P >= 1 && D >= 0 && C[P] !== $[D]; )
240
+ D--;
241
+ for (; P >= 1 && D >= 0; P--, D--)
242
+ if (C[P] !== $[D]) {
243
+ if (P !== 1 || D !== 1)
244
+ do
245
+ if (P--, D--, D < 0 || C[P] !== $[D]) {
246
+ var H = `
247
+ ` + C[P].replace(" at new ", " at ");
248
+ return i.displayName && H.includes("<anonymous>") && (H = H.replace("<anonymous>", i.displayName)), typeof i == "function" && ye.set(i, H), H;
249
+ }
250
+ while (P >= 1 && D >= 0);
251
+ break;
252
+ }
253
+ }
254
+ } finally {
255
+ Be = !1, Ve.current = k, Zt(), Error.prepareStackTrace = T;
256
+ }
257
+ var ue = i ? i.displayName || i.name : "", yt = ue ? xe(ue) : "";
258
+ return typeof i == "function" && ye.set(i, yt), yt;
259
+ }
260
+ function en(i, f, v) {
261
+ return at(i, !1);
262
+ }
263
+ function tn(i) {
264
+ var f = i.prototype;
265
+ return !!(f && f.isReactComponent);
266
+ }
267
+ function we(i, f, v) {
268
+ if (i == null)
269
+ return "";
270
+ if (typeof i == "function")
271
+ return at(i, tn(i));
272
+ if (typeof i == "string")
273
+ return xe(i);
274
+ switch (i) {
275
+ case u:
276
+ return xe("Suspense");
277
+ case d:
278
+ return xe("SuspenseList");
279
+ }
280
+ if (typeof i == "object")
281
+ switch (i.$$typeof) {
282
+ case c:
283
+ return en(i.render);
284
+ case m:
285
+ return we(i.type, f, v);
286
+ case g: {
287
+ var E = i, T = E._payload, k = E._init;
288
+ try {
289
+ return we(k(T), f, v);
290
+ } catch {
291
+ }
292
+ }
293
+ }
294
+ return "";
295
+ }
296
+ var Ee = Object.prototype.hasOwnProperty, lt = {}, ct = b.ReactDebugCurrentFrame;
297
+ function Re(i) {
298
+ if (i) {
299
+ var f = i._owner, v = we(i.type, i._source, f ? f.type : null);
300
+ ct.setExtraStackFrame(v);
301
+ } else
302
+ ct.setExtraStackFrame(null);
303
+ }
304
+ function nn(i, f, v, E, T) {
305
+ {
306
+ var k = Function.call.bind(Ee);
307
+ for (var S in i)
308
+ if (k(i, S)) {
309
+ var C = void 0;
310
+ try {
311
+ if (typeof i[S] != "function") {
312
+ var $ = Error((E || "React class") + ": " + v + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
313
+ throw $.name = "Invariant Violation", $;
314
+ }
315
+ C = i[S](f, S, E, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
316
+ } catch (P) {
317
+ C = P;
318
+ }
319
+ C && !(C instanceof Error) && (Re(T), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", v, S, typeof C), Re(null)), C instanceof Error && !(C.message in lt) && (lt[C.message] = !0, Re(T), x("Failed %s type: %s", v, C.message), Re(null));
320
+ }
321
+ }
322
+ }
323
+ var rn = Array.isArray;
324
+ function We(i) {
325
+ return rn(i);
326
+ }
327
+ function on(i) {
328
+ {
329
+ var f = typeof Symbol == "function" && Symbol.toStringTag, v = f && i[Symbol.toStringTag] || i.constructor.name || "Object";
330
+ return v;
331
+ }
332
+ }
333
+ function sn(i) {
334
+ try {
335
+ return ut(i), !1;
336
+ } catch {
337
+ return !0;
338
+ }
339
+ }
340
+ function ut(i) {
341
+ return "" + i;
342
+ }
343
+ function ft(i) {
344
+ if (sn(i))
345
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", on(i)), ut(i);
346
+ }
347
+ var he = b.ReactCurrentOwner, an = {
348
+ key: !0,
349
+ ref: !0,
350
+ __self: !0,
351
+ __source: !0
352
+ }, dt, mt, Ye;
353
+ Ye = {};
354
+ function ln(i) {
355
+ if (Ee.call(i, "ref")) {
356
+ var f = Object.getOwnPropertyDescriptor(i, "ref").get;
357
+ if (f && f.isReactWarning)
358
+ return !1;
359
+ }
360
+ return i.ref !== void 0;
361
+ }
362
+ function cn(i) {
363
+ if (Ee.call(i, "key")) {
364
+ var f = Object.getOwnPropertyDescriptor(i, "key").get;
365
+ if (f && f.isReactWarning)
366
+ return !1;
367
+ }
368
+ return i.key !== void 0;
369
+ }
370
+ function un(i, f) {
371
+ if (typeof i.ref == "string" && he.current && f && he.current.stateNode !== f) {
372
+ var v = L(he.current.type);
373
+ Ye[v] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(he.current.type), i.ref), Ye[v] = !0);
374
+ }
375
+ }
376
+ function fn(i, f) {
377
+ {
378
+ var v = function() {
379
+ dt || (dt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
380
+ };
381
+ v.isReactWarning = !0, Object.defineProperty(i, "key", {
382
+ get: v,
383
+ configurable: !0
384
+ });
385
+ }
386
+ }
387
+ function dn(i, f) {
388
+ {
389
+ var v = function() {
390
+ mt || (mt = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
391
+ };
392
+ v.isReactWarning = !0, Object.defineProperty(i, "ref", {
393
+ get: v,
394
+ configurable: !0
395
+ });
396
+ }
397
+ }
398
+ var mn = function(i, f, v, E, T, k, S) {
399
+ var C = {
400
+ // This tag allows us to uniquely identify this as a React Element
401
+ $$typeof: r,
402
+ // Built-in properties that belong on the element
403
+ type: i,
404
+ key: f,
405
+ ref: v,
406
+ props: S,
407
+ // Record the component responsible for creating this element.
408
+ _owner: k
409
+ };
410
+ return C._store = {}, Object.defineProperty(C._store, "validated", {
411
+ configurable: !1,
412
+ enumerable: !1,
413
+ writable: !0,
414
+ value: !1
415
+ }), Object.defineProperty(C, "_self", {
416
+ configurable: !1,
417
+ enumerable: !1,
418
+ writable: !1,
419
+ value: E
420
+ }), Object.defineProperty(C, "_source", {
421
+ configurable: !1,
422
+ enumerable: !1,
423
+ writable: !1,
424
+ value: T
425
+ }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
426
+ };
427
+ function hn(i, f, v, E, T) {
428
+ {
429
+ var k, S = {}, C = null, $ = null;
430
+ v !== void 0 && (ft(v), C = "" + v), cn(f) && (ft(f.key), C = "" + f.key), ln(f) && ($ = f.ref, un(f, T));
431
+ for (k in f)
432
+ Ee.call(f, k) && !an.hasOwnProperty(k) && (S[k] = f[k]);
433
+ if (i && i.defaultProps) {
434
+ var P = i.defaultProps;
435
+ for (k in P)
436
+ S[k] === void 0 && (S[k] = P[k]);
437
+ }
438
+ if (C || $) {
439
+ var D = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
440
+ C && fn(S, D), $ && dn(S, D);
441
+ }
442
+ return mn(i, C, $, T, E, he.current, S);
443
+ }
444
+ }
445
+ var Ue = b.ReactCurrentOwner, ht = b.ReactDebugCurrentFrame;
446
+ function ce(i) {
447
+ if (i) {
448
+ var f = i._owner, v = we(i.type, i._source, f ? f.type : null);
449
+ ht.setExtraStackFrame(v);
450
+ } else
451
+ ht.setExtraStackFrame(null);
452
+ }
453
+ var He;
454
+ He = !1;
455
+ function Ke(i) {
456
+ return typeof i == "object" && i !== null && i.$$typeof === r;
457
+ }
458
+ function gt() {
459
+ {
460
+ if (Ue.current) {
461
+ var i = L(Ue.current.type);
462
+ if (i)
463
+ return `
464
+
465
+ Check the render method of \`` + i + "`.";
466
+ }
467
+ return "";
468
+ }
469
+ }
470
+ function gn(i) {
471
+ {
472
+ if (i !== void 0) {
473
+ var f = i.fileName.replace(/^.*[\\\/]/, ""), v = i.lineNumber;
474
+ return `
475
+
476
+ Check your code at ` + f + ":" + v + ".";
477
+ }
478
+ return "";
479
+ }
480
+ }
481
+ var vt = {};
482
+ function vn(i) {
483
+ {
484
+ var f = gt();
485
+ if (!f) {
486
+ var v = typeof i == "string" ? i : i.displayName || i.name;
487
+ v && (f = `
488
+
489
+ Check the top-level render call using <` + v + ">.");
490
+ }
491
+ return f;
492
+ }
493
+ }
494
+ function pt(i, f) {
495
+ {
496
+ if (!i._store || i._store.validated || i.key != null)
497
+ return;
498
+ i._store.validated = !0;
499
+ var v = vn(f);
500
+ if (vt[v])
501
+ return;
502
+ vt[v] = !0;
503
+ var E = "";
504
+ i && i._owner && i._owner !== Ue.current && (E = " It was passed a child from " + L(i._owner.type) + "."), ce(i), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, E), ce(null);
505
+ }
506
+ }
507
+ function bt(i, f) {
508
+ {
509
+ if (typeof i != "object")
510
+ return;
511
+ if (We(i))
512
+ for (var v = 0; v < i.length; v++) {
513
+ var E = i[v];
514
+ Ke(E) && pt(E, f);
515
+ }
516
+ else if (Ke(i))
517
+ i._store && (i._store.validated = !0);
518
+ else if (i) {
519
+ var T = R(i);
520
+ if (typeof T == "function" && T !== i.entries)
521
+ for (var k = T.call(i), S; !(S = k.next()).done; )
522
+ Ke(S.value) && pt(S.value, f);
523
+ }
524
+ }
525
+ }
526
+ function pn(i) {
527
+ {
528
+ var f = i.type;
529
+ if (f == null || typeof f == "string")
530
+ return;
531
+ var v;
532
+ if (typeof f == "function")
533
+ v = f.propTypes;
534
+ else if (typeof f == "object" && (f.$$typeof === c || // Note: Memo only checks outer props here.
535
+ // Inner props are checked in the reconciler.
536
+ f.$$typeof === m))
537
+ v = f.propTypes;
538
+ else
539
+ return;
540
+ if (v) {
541
+ var E = L(f);
542
+ nn(v, i.props, "prop", E, i);
543
+ } else if (f.PropTypes !== void 0 && !He) {
544
+ He = !0;
545
+ var T = L(f);
546
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
547
+ }
548
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
549
+ }
550
+ }
551
+ function bn(i) {
552
+ {
553
+ for (var f = Object.keys(i.props), v = 0; v < f.length; v++) {
554
+ var E = f[v];
555
+ if (E !== "children" && E !== "key") {
556
+ ce(i), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), ce(null);
557
+ break;
558
+ }
559
+ }
560
+ i.ref !== null && (ce(i), x("Invalid attribute `ref` supplied to `React.Fragment`."), ce(null));
561
+ }
562
+ }
563
+ function xt(i, f, v, E, T, k) {
564
+ {
565
+ var S = re(i);
566
+ if (!S) {
567
+ var C = "";
568
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
569
+ var $ = gn(T);
570
+ $ ? C += $ : C += gt();
571
+ var P;
572
+ i === null ? P = "null" : We(i) ? P = "array" : i !== void 0 && i.$$typeof === r ? (P = "<" + (L(i.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : P = typeof i, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, C);
573
+ }
574
+ var D = hn(i, f, v, T, k);
575
+ if (D == null)
576
+ return D;
577
+ if (S) {
578
+ var H = f.children;
579
+ if (H !== void 0)
580
+ if (E)
581
+ if (We(H)) {
582
+ for (var ue = 0; ue < H.length; ue++)
583
+ bt(H[ue], i);
584
+ Object.freeze && Object.freeze(H);
585
+ } else
586
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
587
+ else
588
+ bt(H, i);
589
+ }
590
+ return i === n ? bn(D) : pn(D), D;
591
+ }
592
+ }
593
+ function xn(i, f, v) {
594
+ return xt(i, f, v, !0);
595
+ }
596
+ function yn(i, f, v) {
597
+ return xt(i, f, v, !1);
598
+ }
599
+ var wn = yn, En = xn;
600
+ ge.Fragment = n, ge.jsx = wn, ge.jsxs = En;
601
+ }()), ge;
602
+ }
603
+ var ve = {};
604
+ /**
605
+ * @license React
606
+ * react-jsx-runtime.production.min.js
607
+ *
608
+ * Copyright (c) Facebook, Inc. and its affiliates.
609
+ *
610
+ * This source code is licensed under the MIT license found in the
611
+ * LICENSE file in the root directory of this source tree.
612
+ */
613
+ var Et;
614
+ function jn() {
615
+ if (Et)
616
+ return ve;
617
+ Et = 1;
618
+ var t = It, r = Symbol.for("react.element"), e = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
619
+ function a(l, c, u) {
620
+ var d, m = {}, g = null, h = null;
621
+ u !== void 0 && (g = "" + u), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (h = c.ref);
622
+ for (d in c)
623
+ n.call(c, d) && !s.hasOwnProperty(d) && (m[d] = c[d]);
624
+ if (l && l.defaultProps)
625
+ for (d in c = l.defaultProps, c)
626
+ m[d] === void 0 && (m[d] = c[d]);
627
+ return { $$typeof: r, type: l, key: g, ref: h, props: m, _owner: o.current };
628
+ }
629
+ return ve.Fragment = e, ve.jsx = a, ve.jsxs = a, ve;
630
+ }
631
+ process.env.NODE_ENV === "production" ? Je.exports = jn() : Je.exports = _n();
632
+ var w = Je.exports;
633
+ const X = Ze(
634
+ ({ tag: t, children: r, visible: e = !0, asChild: n, ...o }, s) => {
635
+ if (!e)
636
+ return /* @__PURE__ */ w.jsx(w.Fragment, {});
637
+ if (n) {
638
+ const l = Mt(r);
639
+ if (!l)
640
+ return /* @__PURE__ */ w.jsx(w.Fragment, {});
641
+ const { Tag: c, props: u } = l;
642
+ return /* @__PURE__ */ w.jsx(c, { ref: s, ...o, ...u });
643
+ }
644
+ const a = t ?? "div";
645
+ return /* @__PURE__ */ w.jsx(a, { ref: s, ...o, children: r });
646
+ }
647
+ ), Mt = (t) => {
648
+ if (typeof t != "string") {
649
+ if (Array.isArray(t))
650
+ return t.reduce((r, e) => r || Mt(e), void 0);
651
+ if (typeof t == "object" && t !== null)
652
+ return {
653
+ Tag: t.type,
654
+ props: t.props
655
+ };
656
+ }
657
+ }, ee = Ze((t, r) => /* @__PURE__ */ w.jsx(X, { tag: "div", ...t, ref: r })), W = (...t) => t.reduce((r, e) => e == null || e === !1 ? r : typeof e == "string" || typeof e == "number" ? r + " " + e : Array.isArray(e) ? r + " " + W(...e) : typeof e == "object" ? r + " " + Object.entries(e).reduce((n, [o, s]) => s == null || s === !1 ? n : typeof s == "string" || typeof s == "number" ? n + " " + o + "-" + s : typeof s == "boolean" && s ? n + " " + o : n, "") : r, ""), Rt = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Dt = (t, r) => (e) => {
658
+ var c;
659
+ if ((r == null ? void 0 : r.variants) == null)
660
+ return W(t, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
661
+ const { variants: n, defaultVariants: o } = r, s = Object.keys(n).map((u) => {
662
+ const d = e == null ? void 0 : e[u], m = o == null ? void 0 : o[u];
663
+ if (d === null)
664
+ return null;
665
+ const g = Rt(d) || Rt(m);
666
+ return n[u][g];
667
+ }), a = e && Object.entries(e).reduce(
668
+ (u, [d, m]) => (m === void 0 || (u[d] = m), u),
669
+ {}
670
+ ), l = (c = r == null ? void 0 : r.compoundVariants) == null ? void 0 : c.reduce(
671
+ (u, { class: d, className: m, ...g }) => Object.entries(g).every(
672
+ ([h, p]) => Array.isArray(p) ? p.includes(
673
+ {
674
+ ...o,
675
+ ...a
676
+ }[h]
677
+ ) : {
678
+ ...o,
679
+ ...a
680
+ }[h] === p
681
+ ) ? [...u, d, m] : u,
682
+ []
683
+ );
684
+ return W(t, s, l, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
685
+ }, Nt = Ze(function(r, e) {
686
+ const { variant: n, className: o, ...s } = r;
687
+ return /* @__PURE__ */ w.jsx(ee, { ...s, className: kn({ variant: n, className: o }), ref: e });
688
+ }), kn = Dt(
689
+ "zen__badge inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors whitespace-nowrap",
690
+ {
691
+ variants: {
692
+ variant: {
693
+ default: "border-transparent bg-primary text-primary-foreground shadow",
694
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
695
+ destructive: "border-transparent bg-destructive text-destructive-foreground shadow",
696
+ outline: "text-foreground"
697
+ }
698
+ },
699
+ defaultVariants: {
700
+ variant: "default"
701
+ }
702
+ }
703
+ ), An = (t) => {
704
+ let { children: r, className: e, variant: n = "default", size: o = "default", ...s } = t;
705
+ return /* @__PURE__ */ w.jsx(X, { tag: "button", className: In({ variant: n, size: o, className: e }), ...s, children: r });
706
+ }, In = Dt(
707
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
708
+ {
709
+ variants: {
710
+ variant: {
711
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
712
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
713
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
714
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
715
+ ghost: "hover:bg-accent hover:text-accent-foreground",
716
+ link: "text-primary underline-offset-4 hover:underline",
717
+ icon: ""
718
+ },
719
+ size: {
720
+ default: "h-9 px-4 py-2",
721
+ sm: "h-8 rounded-md px-3 text-xs",
722
+ lg: "h-10 rounded-md px-8",
723
+ icon: ""
724
+ }
725
+ },
726
+ defaultVariants: {
727
+ variant: "default",
728
+ size: "default"
729
+ }
730
+ }
731
+ ), Te = Math.min, se = Math.max, _e = Math.round, Ce = Math.floor, oe = (t) => ({
732
+ x: t,
733
+ y: t
734
+ }), Pn = {
735
+ left: "right",
736
+ right: "left",
737
+ bottom: "top",
738
+ top: "bottom"
739
+ }, Mn = {
740
+ start: "end",
741
+ end: "start"
742
+ };
743
+ function Ct(t, r, e) {
744
+ return se(t, Te(r, e));
745
+ }
746
+ function De(t, r) {
747
+ return typeof t == "function" ? t(r) : t;
748
+ }
749
+ function ae(t) {
750
+ return t.split("-")[0];
751
+ }
752
+ function Ne(t) {
753
+ return t.split("-")[1];
754
+ }
755
+ function zt(t) {
756
+ return t === "x" ? "y" : "x";
757
+ }
758
+ function Ft(t) {
759
+ return t === "y" ? "height" : "width";
760
+ }
761
+ function ze(t) {
762
+ return ["top", "bottom"].includes(ae(t)) ? "y" : "x";
763
+ }
764
+ function Lt(t) {
765
+ return zt(ze(t));
766
+ }
767
+ function Dn(t, r, e) {
768
+ e === void 0 && (e = !1);
769
+ const n = Ne(t), o = Lt(t), s = Ft(o);
770
+ let a = o === "x" ? n === (e ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
771
+ return r.reference[s] > r.floating[s] && (a = je(a)), [a, je(a)];
772
+ }
773
+ function Nn(t) {
774
+ const r = je(t);
775
+ return [Ge(t), r, Ge(r)];
776
+ }
777
+ function Ge(t) {
778
+ return t.replace(/start|end/g, (r) => Mn[r]);
779
+ }
780
+ function zn(t, r, e) {
781
+ const n = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], a = ["bottom", "top"];
782
+ switch (t) {
783
+ case "top":
784
+ case "bottom":
785
+ return e ? r ? o : n : r ? n : o;
786
+ case "left":
787
+ case "right":
788
+ return r ? s : a;
789
+ default:
790
+ return [];
791
+ }
792
+ }
793
+ function Fn(t, r, e, n) {
794
+ const o = Ne(t);
795
+ let s = zn(ae(t), e === "start", n);
796
+ return o && (s = s.map((a) => a + "-" + o), r && (s = s.concat(s.map(Ge)))), s;
797
+ }
798
+ function je(t) {
799
+ return t.replace(/left|right|bottom|top/g, (r) => Pn[r]);
800
+ }
801
+ function Ln(t) {
802
+ return {
803
+ top: 0,
804
+ right: 0,
805
+ bottom: 0,
806
+ left: 0,
807
+ ...t
808
+ };
809
+ }
810
+ function Vn(t) {
811
+ return typeof t != "number" ? Ln(t) : {
812
+ top: t,
813
+ right: t,
814
+ bottom: t,
815
+ left: t
816
+ };
817
+ }
818
+ function ke(t) {
819
+ return {
820
+ ...t,
821
+ top: t.y,
822
+ left: t.x,
823
+ right: t.x + t.width,
824
+ bottom: t.y + t.height
825
+ };
826
+ }
827
+ function Ot(t, r, e) {
828
+ let {
829
+ reference: n,
830
+ floating: o
831
+ } = t;
832
+ const s = ze(r), a = Lt(r), l = Ft(a), c = ae(r), u = s === "y", d = n.x + n.width / 2 - o.width / 2, m = n.y + n.height / 2 - o.height / 2, g = n[l] / 2 - o[l] / 2;
833
+ let h;
834
+ switch (c) {
835
+ case "top":
836
+ h = {
837
+ x: d,
838
+ y: n.y - o.height
839
+ };
840
+ break;
841
+ case "bottom":
842
+ h = {
843
+ x: d,
844
+ y: n.y + n.height
845
+ };
846
+ break;
847
+ case "right":
848
+ h = {
849
+ x: n.x + n.width,
850
+ y: m
851
+ };
852
+ break;
853
+ case "left":
854
+ h = {
855
+ x: n.x - o.width,
856
+ y: m
857
+ };
858
+ break;
859
+ default:
860
+ h = {
861
+ x: n.x,
862
+ y: n.y
863
+ };
864
+ }
865
+ switch (Ne(r)) {
866
+ case "start":
867
+ h[a] -= g * (e && u ? -1 : 1);
868
+ break;
869
+ case "end":
870
+ h[a] += g * (e && u ? -1 : 1);
871
+ break;
872
+ }
873
+ return h;
874
+ }
875
+ const $n = async (t, r, e) => {
876
+ const {
877
+ placement: n = "bottom",
878
+ strategy: o = "absolute",
879
+ middleware: s = [],
880
+ platform: a
881
+ } = e, l = s.filter(Boolean), c = await (a.isRTL == null ? void 0 : a.isRTL(r));
882
+ let u = await a.getElementRects({
883
+ reference: t,
884
+ floating: r,
885
+ strategy: o
886
+ }), {
887
+ x: d,
888
+ y: m
889
+ } = Ot(u, n, c), g = n, h = {}, p = 0;
890
+ for (let y = 0; y < l.length; y++) {
891
+ const {
892
+ name: R,
893
+ fn: b
894
+ } = l[y], {
895
+ x,
896
+ y: _,
897
+ data: j,
898
+ reset: O
899
+ } = await b({
900
+ x: d,
901
+ y: m,
902
+ initialPlacement: n,
903
+ placement: g,
904
+ strategy: o,
905
+ middlewareData: h,
906
+ rects: u,
907
+ platform: a,
908
+ elements: {
909
+ reference: t,
910
+ floating: r
911
+ }
912
+ });
913
+ if (d = x ?? d, m = _ ?? m, h = {
914
+ ...h,
915
+ [R]: {
916
+ ...h[R],
917
+ ...j
918
+ }
919
+ }, O && p <= 50) {
920
+ p++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (u = O.rects === !0 ? await a.getElementRects({
921
+ reference: t,
922
+ floating: r,
923
+ strategy: o
924
+ }) : O.rects), {
925
+ x: d,
926
+ y: m
927
+ } = Ot(u, g, c)), y = -1;
928
+ continue;
929
+ }
930
+ }
931
+ return {
932
+ x: d,
933
+ y: m,
934
+ placement: g,
935
+ strategy: o,
936
+ middlewareData: h
937
+ };
938
+ };
939
+ async function Vt(t, r) {
940
+ var e;
941
+ r === void 0 && (r = {});
942
+ const {
943
+ x: n,
944
+ y: o,
945
+ platform: s,
946
+ rects: a,
947
+ elements: l,
948
+ strategy: c
949
+ } = t, {
950
+ boundary: u = "clippingAncestors",
951
+ rootBoundary: d = "viewport",
952
+ elementContext: m = "floating",
953
+ altBoundary: g = !1,
954
+ padding: h = 0
955
+ } = De(r, t), p = Vn(h), R = l[g ? m === "floating" ? "reference" : "floating" : m], b = ke(await s.getClippingRect({
956
+ element: (e = await (s.isElement == null ? void 0 : s.isElement(R))) == null || e ? R : R.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
957
+ boundary: u,
958
+ rootBoundary: d,
959
+ strategy: c
960
+ })), x = m === "floating" ? {
961
+ ...a.floating,
962
+ x: n,
963
+ y: o
964
+ } : a.reference, _ = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), j = await (s.isElement == null ? void 0 : s.isElement(_)) ? await (s.getScale == null ? void 0 : s.getScale(_)) || {
965
+ x: 1,
966
+ y: 1
967
+ } : {
968
+ x: 1,
969
+ y: 1
970
+ }, O = ke(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
971
+ rect: x,
972
+ offsetParent: _,
973
+ strategy: c
974
+ }) : x);
975
+ return {
976
+ top: (b.top - O.top + p.top) / j.y,
977
+ bottom: (O.bottom - b.bottom + p.bottom) / j.y,
978
+ left: (b.left - O.left + p.left) / j.x,
979
+ right: (O.right - b.right + p.right) / j.x
980
+ };
981
+ }
982
+ const Bn = function(t) {
983
+ return t === void 0 && (t = {}), {
984
+ name: "flip",
985
+ options: t,
986
+ async fn(r) {
987
+ var e, n;
988
+ const {
989
+ placement: o,
990
+ middlewareData: s,
991
+ rects: a,
992
+ initialPlacement: l,
993
+ platform: c,
994
+ elements: u
995
+ } = r, {
996
+ mainAxis: d = !0,
997
+ crossAxis: m = !0,
998
+ fallbackPlacements: g,
999
+ fallbackStrategy: h = "bestFit",
1000
+ fallbackAxisSideDirection: p = "none",
1001
+ flipAlignment: y = !0,
1002
+ ...R
1003
+ } = De(t, r);
1004
+ if ((e = s.arrow) != null && e.alignmentOffset)
1005
+ return {};
1006
+ const b = ae(o), x = ae(l) === l, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), j = g || (x || !y ? [je(l)] : Nn(l));
1007
+ !g && p !== "none" && j.push(...Fn(l, y, p, _));
1008
+ const O = [l, ...j], N = await Vt(r, R), z = [];
1009
+ let F = ((n = s.flip) == null ? void 0 : n.overflows) || [];
1010
+ if (d && z.push(N[b]), m) {
1011
+ const B = Dn(o, a, _);
1012
+ z.push(N[B[0]], N[B[1]]);
1013
+ }
1014
+ if (F = [...F, {
1015
+ placement: o,
1016
+ overflows: z
1017
+ }], !z.every((B) => B <= 0)) {
1018
+ var Z, re;
1019
+ const B = (((Z = s.flip) == null ? void 0 : Z.index) || 0) + 1, L = O[B];
1020
+ if (L)
1021
+ return {
1022
+ data: {
1023
+ index: B,
1024
+ overflows: F
1025
+ },
1026
+ reset: {
1027
+ placement: L
1028
+ }
1029
+ };
1030
+ let I = (re = F.filter((V) => V.overflows[0] <= 0).sort((V, A) => V.overflows[1] - A.overflows[1])[0]) == null ? void 0 : re.placement;
1031
+ if (!I)
1032
+ switch (h) {
1033
+ case "bestFit": {
1034
+ var J;
1035
+ const V = (J = F.map((A) => [A.placement, A.overflows.filter((Y) => Y > 0).reduce((Y, q) => Y + q, 0)]).sort((A, Y) => A[1] - Y[1])[0]) == null ? void 0 : J[0];
1036
+ V && (I = V);
1037
+ break;
1038
+ }
1039
+ case "initialPlacement":
1040
+ I = l;
1041
+ break;
1042
+ }
1043
+ if (o !== I)
1044
+ return {
1045
+ reset: {
1046
+ placement: I
1047
+ }
1048
+ };
1049
+ }
1050
+ return {};
1051
+ }
1052
+ };
1053
+ };
1054
+ async function Wn(t, r) {
1055
+ const {
1056
+ placement: e,
1057
+ platform: n,
1058
+ elements: o
1059
+ } = t, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), a = ae(e), l = Ne(e), c = ze(e) === "y", u = ["left", "top"].includes(a) ? -1 : 1, d = s && c ? -1 : 1, m = De(r, t);
1060
+ let {
1061
+ mainAxis: g,
1062
+ crossAxis: h,
1063
+ alignmentAxis: p
1064
+ } = typeof m == "number" ? {
1065
+ mainAxis: m,
1066
+ crossAxis: 0,
1067
+ alignmentAxis: null
1068
+ } : {
1069
+ mainAxis: 0,
1070
+ crossAxis: 0,
1071
+ alignmentAxis: null,
1072
+ ...m
1073
+ };
1074
+ return l && typeof p == "number" && (h = l === "end" ? p * -1 : p), c ? {
1075
+ x: h * d,
1076
+ y: g * u
1077
+ } : {
1078
+ x: g * u,
1079
+ y: h * d
1080
+ };
1081
+ }
1082
+ const Yn = function(t) {
1083
+ return t === void 0 && (t = 0), {
1084
+ name: "offset",
1085
+ options: t,
1086
+ async fn(r) {
1087
+ var e, n;
1088
+ const {
1089
+ x: o,
1090
+ y: s,
1091
+ placement: a,
1092
+ middlewareData: l
1093
+ } = r, c = await Wn(r, t);
1094
+ return a === ((e = l.offset) == null ? void 0 : e.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
1095
+ x: o + c.x,
1096
+ y: s + c.y,
1097
+ data: {
1098
+ ...c,
1099
+ placement: a
1100
+ }
1101
+ };
1102
+ }
1103
+ };
1104
+ }, Un = function(t) {
1105
+ return t === void 0 && (t = {}), {
1106
+ name: "shift",
1107
+ options: t,
1108
+ async fn(r) {
1109
+ const {
1110
+ x: e,
1111
+ y: n,
1112
+ placement: o
1113
+ } = r, {
1114
+ mainAxis: s = !0,
1115
+ crossAxis: a = !1,
1116
+ limiter: l = {
1117
+ fn: (R) => {
1118
+ let {
1119
+ x: b,
1120
+ y: x
1121
+ } = R;
1122
+ return {
1123
+ x: b,
1124
+ y: x
1125
+ };
1126
+ }
1127
+ },
1128
+ ...c
1129
+ } = De(t, r), u = {
1130
+ x: e,
1131
+ y: n
1132
+ }, d = await Vt(r, c), m = ze(ae(o)), g = zt(m);
1133
+ let h = u[g], p = u[m];
1134
+ if (s) {
1135
+ const R = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", x = h + d[R], _ = h - d[b];
1136
+ h = Ct(x, h, _);
1137
+ }
1138
+ if (a) {
1139
+ const R = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", x = p + d[R], _ = p - d[b];
1140
+ p = Ct(x, p, _);
1141
+ }
1142
+ const y = l.fn({
1143
+ ...r,
1144
+ [g]: h,
1145
+ [m]: p
1146
+ });
1147
+ return {
1148
+ ...y,
1149
+ data: {
1150
+ x: y.x - e,
1151
+ y: y.y - n
1152
+ }
1153
+ };
1154
+ }
1155
+ };
1156
+ };
1157
+ function ie(t) {
1158
+ return $t(t) ? (t.nodeName || "").toLowerCase() : "#document";
1159
+ }
1160
+ function U(t) {
1161
+ var r;
1162
+ return (t == null || (r = t.ownerDocument) == null ? void 0 : r.defaultView) || window;
1163
+ }
1164
+ function ne(t) {
1165
+ var r;
1166
+ return (r = ($t(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : r.documentElement;
1167
+ }
1168
+ function $t(t) {
1169
+ return t instanceof Node || t instanceof U(t).Node;
1170
+ }
1171
+ function te(t) {
1172
+ return t instanceof Element || t instanceof U(t).Element;
1173
+ }
1174
+ function G(t) {
1175
+ return t instanceof HTMLElement || t instanceof U(t).HTMLElement;
1176
+ }
1177
+ function St(t) {
1178
+ return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof U(t).ShadowRoot;
1179
+ }
1180
+ function be(t) {
1181
+ const {
1182
+ overflow: r,
1183
+ overflowX: e,
1184
+ overflowY: n,
1185
+ display: o
1186
+ } = K(t);
1187
+ return /auto|scroll|overlay|hidden|clip/.test(r + n + e) && !["inline", "contents"].includes(o);
1188
+ }
1189
+ function Hn(t) {
1190
+ return ["table", "td", "th"].includes(ie(t));
1191
+ }
1192
+ function Qe(t) {
1193
+ const r = et(), e = K(t);
1194
+ return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !r && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !r && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (e.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (e.contain || "").includes(n));
1195
+ }
1196
+ function Kn(t) {
1197
+ let r = me(t);
1198
+ for (; G(r) && !Fe(r); ) {
1199
+ if (Qe(r))
1200
+ return r;
1201
+ r = me(r);
1202
+ }
1203
+ return null;
1204
+ }
1205
+ function et() {
1206
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1207
+ }
1208
+ function Fe(t) {
1209
+ return ["html", "body", "#document"].includes(ie(t));
1210
+ }
1211
+ function K(t) {
1212
+ return U(t).getComputedStyle(t);
1213
+ }
1214
+ function Le(t) {
1215
+ return te(t) ? {
1216
+ scrollLeft: t.scrollLeft,
1217
+ scrollTop: t.scrollTop
1218
+ } : {
1219
+ scrollLeft: t.pageXOffset,
1220
+ scrollTop: t.pageYOffset
1221
+ };
1222
+ }
1223
+ function me(t) {
1224
+ if (ie(t) === "html")
1225
+ return t;
1226
+ const r = (
1227
+ // Step into the shadow DOM of the parent of a slotted node.
1228
+ t.assignedSlot || // DOM Element detected.
1229
+ t.parentNode || // ShadowRoot detected.
1230
+ St(t) && t.host || // Fallback.
1231
+ ne(t)
1232
+ );
1233
+ return St(r) ? r.host : r;
1234
+ }
1235
+ function Bt(t) {
1236
+ const r = me(t);
1237
+ return Fe(r) ? t.ownerDocument ? t.ownerDocument.body : t.body : G(r) && be(r) ? r : Bt(r);
1238
+ }
1239
+ function pe(t, r, e) {
1240
+ var n;
1241
+ r === void 0 && (r = []), e === void 0 && (e = !0);
1242
+ const o = Bt(t), s = o === ((n = t.ownerDocument) == null ? void 0 : n.body), a = U(o);
1243
+ return s ? r.concat(a, a.visualViewport || [], be(o) ? o : [], a.frameElement && e ? pe(a.frameElement) : []) : r.concat(o, pe(o, [], e));
1244
+ }
1245
+ function Wt(t) {
1246
+ const r = K(t);
1247
+ let e = parseFloat(r.width) || 0, n = parseFloat(r.height) || 0;
1248
+ const o = G(t), s = o ? t.offsetWidth : e, a = o ? t.offsetHeight : n, l = _e(e) !== s || _e(n) !== a;
1249
+ return l && (e = s, n = a), {
1250
+ width: e,
1251
+ height: n,
1252
+ $: l
1253
+ };
1254
+ }
1255
+ function tt(t) {
1256
+ return te(t) ? t : t.contextElement;
1257
+ }
1258
+ function de(t) {
1259
+ const r = tt(t);
1260
+ if (!G(r))
1261
+ return oe(1);
1262
+ const e = r.getBoundingClientRect(), {
1263
+ width: n,
1264
+ height: o,
1265
+ $: s
1266
+ } = Wt(r);
1267
+ let a = (s ? _e(e.width) : e.width) / n, l = (s ? _e(e.height) : e.height) / o;
1268
+ return (!a || !Number.isFinite(a)) && (a = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1269
+ x: a,
1270
+ y: l
1271
+ };
1272
+ }
1273
+ const qn = /* @__PURE__ */ oe(0);
1274
+ function Yt(t) {
1275
+ const r = U(t);
1276
+ return !et() || !r.visualViewport ? qn : {
1277
+ x: r.visualViewport.offsetLeft,
1278
+ y: r.visualViewport.offsetTop
1279
+ };
1280
+ }
1281
+ function Xn(t, r, e) {
1282
+ return r === void 0 && (r = !1), !e || r && e !== U(t) ? !1 : r;
1283
+ }
1284
+ function le(t, r, e, n) {
1285
+ r === void 0 && (r = !1), e === void 0 && (e = !1);
1286
+ const o = t.getBoundingClientRect(), s = tt(t);
1287
+ let a = oe(1);
1288
+ r && (n ? te(n) && (a = de(n)) : a = de(t));
1289
+ const l = Xn(s, e, n) ? Yt(s) : oe(0);
1290
+ let c = (o.left + l.x) / a.x, u = (o.top + l.y) / a.y, d = o.width / a.x, m = o.height / a.y;
1291
+ if (s) {
1292
+ const g = U(s), h = n && te(n) ? U(n) : n;
1293
+ let p = g.frameElement;
1294
+ for (; p && n && h !== g; ) {
1295
+ const y = de(p), R = p.getBoundingClientRect(), b = K(p), x = R.left + (p.clientLeft + parseFloat(b.paddingLeft)) * y.x, _ = R.top + (p.clientTop + parseFloat(b.paddingTop)) * y.y;
1296
+ c *= y.x, u *= y.y, d *= y.x, m *= y.y, c += x, u += _, p = U(p).frameElement;
1297
+ }
1298
+ }
1299
+ return ke({
1300
+ width: d,
1301
+ height: m,
1302
+ x: c,
1303
+ y: u
1304
+ });
1305
+ }
1306
+ function Jn(t) {
1307
+ let {
1308
+ rect: r,
1309
+ offsetParent: e,
1310
+ strategy: n
1311
+ } = t;
1312
+ const o = G(e), s = ne(e);
1313
+ if (e === s)
1314
+ return r;
1315
+ let a = {
1316
+ scrollLeft: 0,
1317
+ scrollTop: 0
1318
+ }, l = oe(1);
1319
+ const c = oe(0);
1320
+ if ((o || !o && n !== "fixed") && ((ie(e) !== "body" || be(s)) && (a = Le(e)), G(e))) {
1321
+ const u = le(e);
1322
+ l = de(e), c.x = u.x + e.clientLeft, c.y = u.y + e.clientTop;
1323
+ }
1324
+ return {
1325
+ width: r.width * l.x,
1326
+ height: r.height * l.y,
1327
+ x: r.x * l.x - a.scrollLeft * l.x + c.x,
1328
+ y: r.y * l.y - a.scrollTop * l.y + c.y
1329
+ };
1330
+ }
1331
+ function Gn(t) {
1332
+ return Array.from(t.getClientRects());
1333
+ }
1334
+ function Ut(t) {
1335
+ return le(ne(t)).left + Le(t).scrollLeft;
1336
+ }
1337
+ function Zn(t) {
1338
+ const r = ne(t), e = Le(t), n = t.ownerDocument.body, o = se(r.scrollWidth, r.clientWidth, n.scrollWidth, n.clientWidth), s = se(r.scrollHeight, r.clientHeight, n.scrollHeight, n.clientHeight);
1339
+ let a = -e.scrollLeft + Ut(t);
1340
+ const l = -e.scrollTop;
1341
+ return K(n).direction === "rtl" && (a += se(r.clientWidth, n.clientWidth) - o), {
1342
+ width: o,
1343
+ height: s,
1344
+ x: a,
1345
+ y: l
1346
+ };
1347
+ }
1348
+ function Qn(t, r) {
1349
+ const e = U(t), n = ne(t), o = e.visualViewport;
1350
+ let s = n.clientWidth, a = n.clientHeight, l = 0, c = 0;
1351
+ if (o) {
1352
+ s = o.width, a = o.height;
1353
+ const u = et();
1354
+ (!u || u && r === "fixed") && (l = o.offsetLeft, c = o.offsetTop);
1355
+ }
1356
+ return {
1357
+ width: s,
1358
+ height: a,
1359
+ x: l,
1360
+ y: c
1361
+ };
1362
+ }
1363
+ function er(t, r) {
1364
+ const e = le(t, !0, r === "fixed"), n = e.top + t.clientTop, o = e.left + t.clientLeft, s = G(t) ? de(t) : oe(1), a = t.clientWidth * s.x, l = t.clientHeight * s.y, c = o * s.x, u = n * s.y;
1365
+ return {
1366
+ width: a,
1367
+ height: l,
1368
+ x: c,
1369
+ y: u
1370
+ };
1371
+ }
1372
+ function Tt(t, r, e) {
1373
+ let n;
1374
+ if (r === "viewport")
1375
+ n = Qn(t, e);
1376
+ else if (r === "document")
1377
+ n = Zn(ne(t));
1378
+ else if (te(r))
1379
+ n = er(r, e);
1380
+ else {
1381
+ const o = Yt(t);
1382
+ n = {
1383
+ ...r,
1384
+ x: r.x - o.x,
1385
+ y: r.y - o.y
1386
+ };
1387
+ }
1388
+ return ke(n);
1389
+ }
1390
+ function Ht(t, r) {
1391
+ const e = me(t);
1392
+ return e === r || !te(e) || Fe(e) ? !1 : K(e).position === "fixed" || Ht(e, r);
1393
+ }
1394
+ function tr(t, r) {
1395
+ const e = r.get(t);
1396
+ if (e)
1397
+ return e;
1398
+ let n = pe(t, [], !1).filter((l) => te(l) && ie(l) !== "body"), o = null;
1399
+ const s = K(t).position === "fixed";
1400
+ let a = s ? me(t) : t;
1401
+ for (; te(a) && !Fe(a); ) {
1402
+ const l = K(a), c = Qe(a);
1403
+ !c && l.position === "fixed" && (o = null), (s ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || be(a) && !c && Ht(t, a)) ? n = n.filter((d) => d !== a) : o = l, a = me(a);
1404
+ }
1405
+ return r.set(t, n), n;
1406
+ }
1407
+ function nr(t) {
1408
+ let {
1409
+ element: r,
1410
+ boundary: e,
1411
+ rootBoundary: n,
1412
+ strategy: o
1413
+ } = t;
1414
+ const a = [...e === "clippingAncestors" ? tr(r, this._c) : [].concat(e), n], l = a[0], c = a.reduce((u, d) => {
1415
+ const m = Tt(r, d, o);
1416
+ return u.top = se(m.top, u.top), u.right = Te(m.right, u.right), u.bottom = Te(m.bottom, u.bottom), u.left = se(m.left, u.left), u;
1417
+ }, Tt(r, l, o));
1418
+ return {
1419
+ width: c.right - c.left,
1420
+ height: c.bottom - c.top,
1421
+ x: c.left,
1422
+ y: c.top
1423
+ };
1424
+ }
1425
+ function rr(t) {
1426
+ return Wt(t);
1427
+ }
1428
+ function or(t, r, e) {
1429
+ const n = G(r), o = ne(r), s = e === "fixed", a = le(t, !0, s, r);
1430
+ let l = {
1431
+ scrollLeft: 0,
1432
+ scrollTop: 0
1433
+ };
1434
+ const c = oe(0);
1435
+ if (n || !n && !s)
1436
+ if ((ie(r) !== "body" || be(o)) && (l = Le(r)), n) {
1437
+ const u = le(r, !0, s, r);
1438
+ c.x = u.x + r.clientLeft, c.y = u.y + r.clientTop;
1439
+ } else
1440
+ o && (c.x = Ut(o));
1441
+ return {
1442
+ x: a.left + l.scrollLeft - c.x,
1443
+ y: a.top + l.scrollTop - c.y,
1444
+ width: a.width,
1445
+ height: a.height
1446
+ };
1447
+ }
1448
+ function _t(t, r) {
1449
+ return !G(t) || K(t).position === "fixed" ? null : r ? r(t) : t.offsetParent;
1450
+ }
1451
+ function Kt(t, r) {
1452
+ const e = U(t);
1453
+ if (!G(t))
1454
+ return e;
1455
+ let n = _t(t, r);
1456
+ for (; n && Hn(n) && K(n).position === "static"; )
1457
+ n = _t(n, r);
1458
+ return n && (ie(n) === "html" || ie(n) === "body" && K(n).position === "static" && !Qe(n)) ? e : n || Kn(t) || e;
1459
+ }
1460
+ const ir = async function(t) {
1461
+ let {
1462
+ reference: r,
1463
+ floating: e,
1464
+ strategy: n
1465
+ } = t;
1466
+ const o = this.getOffsetParent || Kt, s = this.getDimensions;
1467
+ return {
1468
+ reference: or(r, await o(e), n),
1469
+ floating: {
1470
+ x: 0,
1471
+ y: 0,
1472
+ ...await s(e)
1473
+ }
1474
+ };
1475
+ };
1476
+ function sr(t) {
1477
+ return K(t).direction === "rtl";
1478
+ }
1479
+ const ar = {
1480
+ convertOffsetParentRelativeRectToViewportRelativeRect: Jn,
1481
+ getDocumentElement: ne,
1482
+ getClippingRect: nr,
1483
+ getOffsetParent: Kt,
1484
+ getElementRects: ir,
1485
+ getClientRects: Gn,
1486
+ getDimensions: rr,
1487
+ getScale: de,
1488
+ isElement: te,
1489
+ isRTL: sr
1490
+ };
1491
+ function lr(t, r) {
1492
+ let e = null, n;
1493
+ const o = ne(t);
1494
+ function s() {
1495
+ clearTimeout(n), e && e.disconnect(), e = null;
1496
+ }
1497
+ function a(l, c) {
1498
+ l === void 0 && (l = !1), c === void 0 && (c = 1), s();
1499
+ const {
1500
+ left: u,
1501
+ top: d,
1502
+ width: m,
1503
+ height: g
1504
+ } = t.getBoundingClientRect();
1505
+ if (l || r(), !m || !g)
1506
+ return;
1507
+ const h = Ce(d), p = Ce(o.clientWidth - (u + m)), y = Ce(o.clientHeight - (d + g)), R = Ce(u), x = {
1508
+ rootMargin: -h + "px " + -p + "px " + -y + "px " + -R + "px",
1509
+ threshold: se(0, Te(1, c)) || 1
1510
+ };
1511
+ let _ = !0;
1512
+ function j(O) {
1513
+ const N = O[0].intersectionRatio;
1514
+ if (N !== c) {
1515
+ if (!_)
1516
+ return a();
1517
+ N ? a(!1, N) : n = setTimeout(() => {
1518
+ a(!1, 1e-7);
1519
+ }, 100);
1520
+ }
1521
+ _ = !1;
1522
+ }
1523
+ try {
1524
+ e = new IntersectionObserver(j, {
1525
+ ...x,
1526
+ // Handle <iframe>s
1527
+ root: o.ownerDocument
1528
+ });
1529
+ } catch {
1530
+ e = new IntersectionObserver(j, x);
1531
+ }
1532
+ e.observe(t);
1533
+ }
1534
+ return a(!0), s;
1535
+ }
1536
+ function cr(t, r, e, n) {
1537
+ n === void 0 && (n = {});
1538
+ const {
1539
+ ancestorScroll: o = !0,
1540
+ ancestorResize: s = !0,
1541
+ elementResize: a = typeof ResizeObserver == "function",
1542
+ layoutShift: l = typeof IntersectionObserver == "function",
1543
+ animationFrame: c = !1
1544
+ } = n, u = tt(t), d = o || s ? [...u ? pe(u) : [], ...pe(r)] : [];
1545
+ d.forEach((b) => {
1546
+ o && b.addEventListener("scroll", e, {
1547
+ passive: !0
1548
+ }), s && b.addEventListener("resize", e);
1549
+ });
1550
+ const m = u && l ? lr(u, e) : null;
1551
+ let g = -1, h = null;
1552
+ a && (h = new ResizeObserver((b) => {
1553
+ let [x] = b;
1554
+ x && x.target === u && h && (h.unobserve(r), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1555
+ h && h.observe(r);
1556
+ })), e();
1557
+ }), u && !c && h.observe(u), h.observe(r));
1558
+ let p, y = c ? le(t) : null;
1559
+ c && R();
1560
+ function R() {
1561
+ const b = le(t);
1562
+ y && (b.x !== y.x || b.y !== y.y || b.width !== y.width || b.height !== y.height) && e(), y = b, p = requestAnimationFrame(R);
1563
+ }
1564
+ return e(), () => {
1565
+ d.forEach((b) => {
1566
+ o && b.removeEventListener("scroll", e), s && b.removeEventListener("resize", e);
1567
+ }), m && m(), h && h.disconnect(), h = null, c && cancelAnimationFrame(p);
1568
+ };
1569
+ }
1570
+ const ur = (t, r, e) => {
1571
+ const n = /* @__PURE__ */ new Map(), o = {
1572
+ platform: ar,
1573
+ ...e
1574
+ }, s = {
1575
+ ...o.platform,
1576
+ _c: n
1577
+ };
1578
+ return $n(t, r, {
1579
+ ...o,
1580
+ platform: s
1581
+ });
1582
+ };
1583
+ var Oe = typeof document < "u" ? Rn : Se;
1584
+ function Ae(t, r) {
1585
+ if (t === r)
1586
+ return !0;
1587
+ if (typeof t != typeof r)
1588
+ return !1;
1589
+ if (typeof t == "function" && t.toString() === r.toString())
1590
+ return !0;
1591
+ let e, n, o;
1592
+ if (t && r && typeof t == "object") {
1593
+ if (Array.isArray(t)) {
1594
+ if (e = t.length, e != r.length)
1595
+ return !1;
1596
+ for (n = e; n-- !== 0; )
1597
+ if (!Ae(t[n], r[n]))
1598
+ return !1;
1599
+ return !0;
1600
+ }
1601
+ if (o = Object.keys(t), e = o.length, e !== Object.keys(r).length)
1602
+ return !1;
1603
+ for (n = e; n-- !== 0; )
1604
+ if (!{}.hasOwnProperty.call(r, o[n]))
1605
+ return !1;
1606
+ for (n = e; n-- !== 0; ) {
1607
+ const s = o[n];
1608
+ if (!(s === "_owner" && t.$$typeof) && !Ae(t[s], r[s]))
1609
+ return !1;
1610
+ }
1611
+ return !0;
1612
+ }
1613
+ return t !== t && r !== r;
1614
+ }
1615
+ function qt(t) {
1616
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1617
+ }
1618
+ function jt(t, r) {
1619
+ const e = qt(t);
1620
+ return Math.round(r * e) / e;
1621
+ }
1622
+ function kt(t) {
1623
+ const r = M.useRef(t);
1624
+ return Oe(() => {
1625
+ r.current = t;
1626
+ }), r;
1627
+ }
1628
+ function fr(t) {
1629
+ t === void 0 && (t = {});
1630
+ const {
1631
+ placement: r = "bottom",
1632
+ strategy: e = "absolute",
1633
+ middleware: n = [],
1634
+ platform: o,
1635
+ elements: {
1636
+ reference: s,
1637
+ floating: a
1638
+ } = {},
1639
+ transform: l = !0,
1640
+ whileElementsMounted: c,
1641
+ open: u
1642
+ } = t, [d, m] = M.useState({
1643
+ x: 0,
1644
+ y: 0,
1645
+ strategy: e,
1646
+ placement: r,
1647
+ middlewareData: {},
1648
+ isPositioned: !1
1649
+ }), [g, h] = M.useState(n);
1650
+ Ae(g, n) || h(n);
1651
+ const [p, y] = M.useState(null), [R, b] = M.useState(null), x = M.useCallback((A) => {
1652
+ A != N.current && (N.current = A, y(A));
1653
+ }, [y]), _ = M.useCallback((A) => {
1654
+ A !== z.current && (z.current = A, b(A));
1655
+ }, [b]), j = s || p, O = a || R, N = M.useRef(null), z = M.useRef(null), F = M.useRef(d), Z = kt(c), re = kt(o), J = M.useCallback(() => {
1656
+ if (!N.current || !z.current)
1657
+ return;
1658
+ const A = {
1659
+ placement: r,
1660
+ strategy: e,
1661
+ middleware: g
1662
+ };
1663
+ re.current && (A.platform = re.current), ur(N.current, z.current, A).then((Y) => {
1664
+ const q = {
1665
+ ...Y,
1666
+ isPositioned: !0
1667
+ };
1668
+ B.current && !Ae(F.current, q) && (F.current = q, On.flushSync(() => {
1669
+ m(q);
1670
+ }));
1671
+ });
1672
+ }, [g, r, e, re]);
1673
+ Oe(() => {
1674
+ u === !1 && F.current.isPositioned && (F.current.isPositioned = !1, m((A) => ({
1675
+ ...A,
1676
+ isPositioned: !1
1677
+ })));
1678
+ }, [u]);
1679
+ const B = M.useRef(!1);
1680
+ Oe(() => (B.current = !0, () => {
1681
+ B.current = !1;
1682
+ }), []), Oe(() => {
1683
+ if (j && (N.current = j), O && (z.current = O), j && O) {
1684
+ if (Z.current)
1685
+ return Z.current(j, O, J);
1686
+ J();
1687
+ }
1688
+ }, [j, O, J, Z]);
1689
+ const L = M.useMemo(() => ({
1690
+ reference: N,
1691
+ floating: z,
1692
+ setReference: x,
1693
+ setFloating: _
1694
+ }), [x, _]), I = M.useMemo(() => ({
1695
+ reference: j,
1696
+ floating: O
1697
+ }), [j, O]), V = M.useMemo(() => {
1698
+ const A = {
1699
+ position: e,
1700
+ left: 0,
1701
+ top: 0
1702
+ };
1703
+ if (!I.floating)
1704
+ return A;
1705
+ const Y = jt(I.floating, d.x), q = jt(I.floating, d.y);
1706
+ return l ? {
1707
+ ...A,
1708
+ transform: "translate(" + Y + "px, " + q + "px)",
1709
+ ...qt(I.floating) >= 1.5 && {
1710
+ willChange: "transform"
1711
+ }
1712
+ } : {
1713
+ position: e,
1714
+ left: Y,
1715
+ top: q
1716
+ };
1717
+ }, [e, l, I.floating, d.x, d.y]);
1718
+ return M.useMemo(() => ({
1719
+ ...d,
1720
+ update: J,
1721
+ refs: L,
1722
+ elements: I,
1723
+ floatingStyles: V
1724
+ }), [d, J, L, I, V]);
1725
+ }
1726
+ function dr(t, r) {
1727
+ const e = (n) => {
1728
+ !t.current || t.current.contains(n.target) || r(!0);
1729
+ };
1730
+ return document.addEventListener("mousedown", e), () => {
1731
+ document.removeEventListener("mousedown", e);
1732
+ };
1733
+ }
1734
+ const Xt = (t) => {
1735
+ let {
1736
+ className: r,
1737
+ placement: e = "bottom-start",
1738
+ trigger: n = "hover",
1739
+ content: o,
1740
+ children: s,
1741
+ onClose: a,
1742
+ onOpen: l,
1743
+ disabled: c = !1,
1744
+ show: u = !1,
1745
+ setShow: d,
1746
+ role: m = "tooltip"
1747
+ } = t;
1748
+ const [g, h] = Me(u), p = () => d !== void 0 && u !== void 0 ? u : g, y = () => d !== void 0 && u !== void 0 ? d : h, { x: R, y: b, strategy: x, refs: _ } = fr({
1749
+ open: p(),
1750
+ middleware: [Yn(4), Bn(), Un()],
1751
+ whileElementsMounted: cr,
1752
+ placement: e
1753
+ }), j = Cn();
1754
+ return Se(() => dr(_.floating, (O) => {
1755
+ O && y()(!1);
1756
+ }), []), /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
1757
+ /* @__PURE__ */ w.jsx(
1758
+ X,
1759
+ {
1760
+ className: "z-auto block min-w-max",
1761
+ id: `zen__popover-${j}`,
1762
+ ref: _.setReference,
1763
+ onClick: (O) => {
1764
+ if (n === "click") {
1765
+ if (c)
1766
+ return;
1767
+ p() ? (y()(!1), a == null || a()) : (y()(!0), l == null || l());
1768
+ }
1769
+ O.stopPropagation();
1770
+ },
1771
+ role: m,
1772
+ asChild: !0,
1773
+ children: s
1774
+ }
1775
+ ),
1776
+ p() && Sn(
1777
+ /* @__PURE__ */ w.jsx(
1778
+ ee,
1779
+ {
1780
+ onClick: (O) => O.stopPropagation(),
1781
+ visible: p(),
1782
+ role: "tooltip",
1783
+ className: W(
1784
+ "zen__popover z-50 w-fit rounded border border-border bg-background shadow-secondary",
1785
+ r
1786
+ ),
1787
+ ref: _.setFloating,
1788
+ style: {
1789
+ position: x,
1790
+ top: b ?? 0,
1791
+ left: R ?? 0
1792
+ },
1793
+ children: o
1794
+ }
1795
+ ),
1796
+ document.body
1797
+ )
1798
+ ] });
1799
+ }, mr = (t) => {
1800
+ var y, R;
1801
+ const {
1802
+ items: r = [],
1803
+ children: e,
1804
+ moreItemsLabel: n = "",
1805
+ parentRef: o,
1806
+ data: s,
1807
+ estimator: a = (b, x) => x + 30,
1808
+ font: l = "12px Inter",
1809
+ badgeVariant: c = "secondary",
1810
+ badgeStyles: u
1811
+ } = t, [d, m] = Me({
1812
+ visible: r,
1813
+ hidden: []
1814
+ }), g = Xe(() => {
1815
+ let x = document.createElement("canvas").getContext("2d");
1816
+ return x && (x.font = l), x;
1817
+ }, []), h = () => {
1818
+ const b = o == null ? void 0 : o.current;
1819
+ if (!b)
1820
+ return;
1821
+ const x = b.offsetWidth, _ = [], j = [], O = a(n, g.measureText(n).width + 10);
1822
+ p == null || p.reduce((N, z, F) => (N + z + O > x - 20 ? j.push(r[F]) : _.push(r[F]), N + z), 0), m({
1823
+ visible: _,
1824
+ hidden: j
1825
+ });
1826
+ }, p = Xe(
1827
+ () => (r == null ? void 0 : r.map((b) => a(b, g.measureText(b).width))) ?? [],
1828
+ [r]
1829
+ );
1830
+ return Se(() => {
1831
+ h();
1832
+ }, [r]), Se(() => {
1833
+ if (!(o != null && o.current))
1834
+ return;
1835
+ const b = new ResizeObserver(() => {
1836
+ h();
1837
+ });
1838
+ return b.observe(o.current), () => {
1839
+ b.disconnect();
1840
+ };
1841
+ }, [r]), /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
1842
+ (y = d.visible) == null ? void 0 : y.map((b, x) => e(b, x, s == null ? void 0 : s[x])),
1843
+ ((R = d.hidden) == null ? void 0 : R.length) > 0 && /* @__PURE__ */ w.jsx(
1844
+ Xt,
1845
+ {
1846
+ trigger: "click",
1847
+ content: /* @__PURE__ */ w.jsx(ee, { className: "grid max-h-60 grid-flow-row grid-cols-2 gap-3 overflow-auto p-2", children: d.hidden.map(
1848
+ (b, x) => e(
1849
+ b,
1850
+ d.visible.length + x,
1851
+ s == null ? void 0 : s[d.visible.length + x]
1852
+ )
1853
+ ) }),
1854
+ children: /* @__PURE__ */ w.jsx(Nt, { className: u, variant: c, children: /* @__PURE__ */ w.jsx(X, { tag: "p", children: `+${d.hidden.length} ${n}` }) }, "more_items_button")
1855
+ }
1856
+ )
1857
+ ] });
1858
+ };
1859
+ function hr(t) {
1860
+ return /* @__PURE__ */ w.jsx(
1861
+ "svg",
1862
+ {
1863
+ xmlns: "http://www.w3.org/2000/svg",
1864
+ fill: "none",
1865
+ viewBox: "0 0 24 24",
1866
+ strokeWidth: 1.5,
1867
+ stroke: "currentColor",
1868
+ className: "h-6 w-6",
1869
+ ...t,
1870
+ children: /* @__PURE__ */ w.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" })
1871
+ }
1872
+ );
1873
+ }
1874
+ function gr(t) {
1875
+ return /* @__PURE__ */ w.jsx(
1876
+ "svg",
1877
+ {
1878
+ xmlns: "http://www.w3.org/2000/svg",
1879
+ fill: "none",
1880
+ viewBox: "0 0 24 24",
1881
+ strokeWidth: 1.5,
1882
+ stroke: "currentColor",
1883
+ className: "h-6 w-6",
1884
+ ...t,
1885
+ children: /* @__PURE__ */ w.jsx(
1886
+ "path",
1887
+ {
1888
+ strokeLinecap: "round",
1889
+ strokeLinejoin: "round",
1890
+ d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
1891
+ }
1892
+ )
1893
+ }
1894
+ );
1895
+ }
1896
+ function vr(t) {
1897
+ return /* @__PURE__ */ w.jsx(
1898
+ "svg",
1899
+ {
1900
+ xmlns: "http://www.w3.org/2000/svg",
1901
+ fill: "none",
1902
+ viewBox: "0 0 24 24",
1903
+ strokeWidth: 1.5,
1904
+ stroke: "currentColor",
1905
+ className: "h-6 w-6",
1906
+ ...t,
1907
+ children: /* @__PURE__ */ w.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18 18 6M6 6l12 12" })
1908
+ }
1909
+ );
1910
+ }
1911
+ /**
1912
+ * react-virtual
1913
+ *
1914
+ * Copyright (c) TanStack
1915
+ *
1916
+ * This source code is licensed under the MIT license found in the
1917
+ * LICENSE.md file in the root directory of this source tree.
1918
+ *
1919
+ * @license MIT
1920
+ */
1921
+ function Ie() {
1922
+ return Ie = Object.assign ? Object.assign.bind() : function(t) {
1923
+ for (var r = 1; r < arguments.length; r++) {
1924
+ var e = arguments[r];
1925
+ for (var n in e)
1926
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
1927
+ }
1928
+ return t;
1929
+ }, Ie.apply(this, arguments);
1930
+ }
1931
+ /**
1932
+ * virtual-core
1933
+ *
1934
+ * Copyright (c) TanStack
1935
+ *
1936
+ * This source code is licensed under the MIT license found in the
1937
+ * LICENSE.md file in the root directory of this source tree.
1938
+ *
1939
+ * @license MIT
1940
+ */
1941
+ function Pe() {
1942
+ return Pe = Object.assign ? Object.assign.bind() : function(t) {
1943
+ for (var r = 1; r < arguments.length; r++) {
1944
+ var e = arguments[r];
1945
+ for (var n in e)
1946
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
1947
+ }
1948
+ return t;
1949
+ }, Pe.apply(this, arguments);
1950
+ }
1951
+ /**
1952
+ * virtual-core
1953
+ *
1954
+ * Copyright (c) TanStack
1955
+ *
1956
+ * This source code is licensed under the MIT license found in the
1957
+ * LICENSE.md file in the root directory of this source tree.
1958
+ *
1959
+ * @license MIT
1960
+ */
1961
+ function fe(t, r, e) {
1962
+ var n, o = (n = e.initialDeps) != null ? n : [], s;
1963
+ return function() {
1964
+ var a;
1965
+ e.key && e.debug != null && e.debug() && (a = Date.now());
1966
+ var l = t(), c = l.length !== o.length || l.some(function(p, y) {
1967
+ return o[y] !== p;
1968
+ });
1969
+ if (!c)
1970
+ return s;
1971
+ o = l;
1972
+ var u;
1973
+ if (e.key && e.debug != null && e.debug() && (u = Date.now()), s = r.apply(void 0, l), e.key && e.debug != null && e.debug()) {
1974
+ var d = Math.round((Date.now() - a) * 100) / 100, m = Math.round((Date.now() - u) * 100) / 100, g = m / 16, h = function(y, R) {
1975
+ for (y = String(y); y.length < R; )
1976
+ y = " " + y;
1977
+ return y;
1978
+ };
1979
+ console.info("%c⏱ " + h(m, 5) + " /" + h(d, 5) + " ms", `
1980
+ font-size: .6rem;
1981
+ font-weight: bold;
1982
+ color: hsl(` + Math.max(0, Math.min(120 - 120 * g, 120)) + "deg 100% 31%);", e == null ? void 0 : e.key);
1983
+ }
1984
+ return e == null || e.onChange == null || e.onChange(s), s;
1985
+ };
1986
+ }
1987
+ function qe(t, r) {
1988
+ if (t === void 0)
1989
+ throw new Error("Unexpected undefined" + (r ? ": " + r : ""));
1990
+ return t;
1991
+ }
1992
+ var pr = function(r, e) {
1993
+ return Math.abs(r - e) < 1;
1994
+ };
1995
+ /**
1996
+ * virtual-core
1997
+ *
1998
+ * Copyright (c) TanStack
1999
+ *
2000
+ * This source code is licensed under the MIT license found in the
2001
+ * LICENSE.md file in the root directory of this source tree.
2002
+ *
2003
+ * @license MIT
2004
+ */
2005
+ var br = function(r) {
2006
+ return r;
2007
+ }, xr = function(r) {
2008
+ for (var e = Math.max(r.startIndex - r.overscan, 0), n = Math.min(r.endIndex + r.overscan, r.count - 1), o = [], s = e; s <= n; s++)
2009
+ o.push(s);
2010
+ return o;
2011
+ }, yr = function(r, e) {
2012
+ var n = r.scrollElement;
2013
+ if (n) {
2014
+ var o = function(l) {
2015
+ var c = l.width, u = l.height;
2016
+ e({
2017
+ width: Math.round(c),
2018
+ height: Math.round(u)
2019
+ });
2020
+ };
2021
+ o(n.getBoundingClientRect());
2022
+ var s = new ResizeObserver(function(a) {
2023
+ var l = a[0];
2024
+ if (l != null && l.borderBoxSize) {
2025
+ var c = l.borderBoxSize[0];
2026
+ if (c) {
2027
+ o({
2028
+ width: c.inlineSize,
2029
+ height: c.blockSize
2030
+ });
2031
+ return;
2032
+ }
2033
+ }
2034
+ o(n.getBoundingClientRect());
2035
+ });
2036
+ return s.observe(n, {
2037
+ box: "border-box"
2038
+ }), function() {
2039
+ s.unobserve(n);
2040
+ };
2041
+ }
2042
+ }, wr = function(r, e) {
2043
+ var n = r.scrollElement;
2044
+ if (n) {
2045
+ var o = function() {
2046
+ e(n[r.options.horizontal ? "scrollLeft" : "scrollTop"]);
2047
+ };
2048
+ return o(), n.addEventListener("scroll", o, {
2049
+ passive: !0
2050
+ }), function() {
2051
+ n.removeEventListener("scroll", o);
2052
+ };
2053
+ }
2054
+ }, Er = function(r, e, n) {
2055
+ if (e != null && e.borderBoxSize) {
2056
+ var o = e.borderBoxSize[0];
2057
+ if (o) {
2058
+ var s = Math.round(o[n.options.horizontal ? "inlineSize" : "blockSize"]);
2059
+ return s;
2060
+ }
2061
+ }
2062
+ return Math.round(r.getBoundingClientRect()[n.options.horizontal ? "width" : "height"]);
2063
+ }, Rr = function(r, e, n) {
2064
+ var o, s, a = e.adjustments, l = a === void 0 ? 0 : a, c = e.behavior, u = r + l;
2065
+ (o = n.scrollElement) == null || o.scrollTo == null || o.scrollTo((s = {}, s[n.options.horizontal ? "left" : "top"] = u, s.behavior = c, s));
2066
+ }, Cr = function(r) {
2067
+ var e = this;
2068
+ this.unsubs = [], this.scrollElement = null, this.isScrolling = !1, this.isScrollingTimeoutId = null, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollDirection = null, this.scrollAdjustments = 0, this.measureElementCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ function() {
2069
+ var n = null, o = function() {
2070
+ return n || (typeof ResizeObserver < "u" ? n = new ResizeObserver(function(a) {
2071
+ a.forEach(function(l) {
2072
+ e._measureElement(l.target, l);
2073
+ });
2074
+ }) : null);
2075
+ };
2076
+ return {
2077
+ disconnect: function() {
2078
+ var a;
2079
+ return (a = o()) == null ? void 0 : a.disconnect();
2080
+ },
2081
+ observe: function(a) {
2082
+ var l;
2083
+ return (l = o()) == null ? void 0 : l.observe(a, {
2084
+ box: "border-box"
2085
+ });
2086
+ },
2087
+ unobserve: function(a) {
2088
+ var l;
2089
+ return (l = o()) == null ? void 0 : l.unobserve(a);
2090
+ }
2091
+ };
2092
+ }(), this.range = null, this.setOptions = function(n) {
2093
+ Object.entries(n).forEach(function(o) {
2094
+ var s = o[0], a = o[1];
2095
+ typeof a > "u" && delete n[s];
2096
+ }), e.options = Pe({
2097
+ debug: !1,
2098
+ initialOffset: 0,
2099
+ overscan: 1,
2100
+ paddingStart: 0,
2101
+ paddingEnd: 0,
2102
+ scrollPaddingStart: 0,
2103
+ scrollPaddingEnd: 0,
2104
+ horizontal: !1,
2105
+ getItemKey: br,
2106
+ rangeExtractor: xr,
2107
+ onChange: function() {
2108
+ },
2109
+ measureElement: Er,
2110
+ initialRect: {
2111
+ width: 0,
2112
+ height: 0
2113
+ },
2114
+ scrollMargin: 0,
2115
+ scrollingDelay: 150,
2116
+ indexAttribute: "data-index",
2117
+ initialMeasurementsCache: [],
2118
+ lanes: 1
2119
+ }, n);
2120
+ }, this.notify = function(n) {
2121
+ e.options.onChange == null || e.options.onChange(e, n);
2122
+ }, this.maybeNotify = fe(function() {
2123
+ return e.calculateRange(), [e.isScrolling, e.range ? e.range.startIndex : null, e.range ? e.range.endIndex : null];
2124
+ }, function(n) {
2125
+ e.notify(n);
2126
+ }, {
2127
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
2128
+ debug: function() {
2129
+ return e.options.debug;
2130
+ },
2131
+ initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]
2132
+ }), this.cleanup = function() {
2133
+ e.unsubs.filter(Boolean).forEach(function(n) {
2134
+ return n();
2135
+ }), e.unsubs = [], e.scrollElement = null;
2136
+ }, this._didMount = function() {
2137
+ return e.measureElementCache.forEach(e.observer.observe), function() {
2138
+ e.observer.disconnect(), e.cleanup();
2139
+ };
2140
+ }, this._willUpdate = function() {
2141
+ var n = e.options.getScrollElement();
2142
+ e.scrollElement !== n && (e.cleanup(), e.scrollElement = n, e._scrollToOffset(e.scrollOffset, {
2143
+ adjustments: void 0,
2144
+ behavior: void 0
2145
+ }), e.unsubs.push(e.options.observeElementRect(e, function(o) {
2146
+ e.scrollRect = o, e.maybeNotify();
2147
+ })), e.unsubs.push(e.options.observeElementOffset(e, function(o) {
2148
+ e.scrollAdjustments = 0, e.scrollOffset !== o && (e.isScrollingTimeoutId !== null && (clearTimeout(e.isScrollingTimeoutId), e.isScrollingTimeoutId = null), e.isScrolling = !0, e.scrollDirection = e.scrollOffset < o ? "forward" : "backward", e.scrollOffset = o, e.maybeNotify(), e.isScrollingTimeoutId = setTimeout(function() {
2149
+ e.isScrollingTimeoutId = null, e.isScrolling = !1, e.scrollDirection = null, e.maybeNotify();
2150
+ }, e.options.scrollingDelay));
2151
+ })));
2152
+ }, this.getSize = function() {
2153
+ return e.scrollRect[e.options.horizontal ? "width" : "height"];
2154
+ }, this.memoOptions = fe(function() {
2155
+ return [e.options.count, e.options.paddingStart, e.options.scrollMargin, e.options.getItemKey];
2156
+ }, function(n, o, s, a) {
2157
+ return e.pendingMeasuredCacheIndexes = [], {
2158
+ count: n,
2159
+ paddingStart: o,
2160
+ scrollMargin: s,
2161
+ getItemKey: a
2162
+ };
2163
+ }, {
2164
+ key: !1
2165
+ }), this.getFurthestMeasurement = function(n, o) {
2166
+ for (var s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = o - 1; l >= 0; l--) {
2167
+ var c = n[l];
2168
+ if (!s.has(c.lane)) {
2169
+ var u = a.get(c.lane);
2170
+ if (u == null || c.end > u.end ? a.set(c.lane, c) : c.end < u.end && s.set(c.lane, !0), s.size === e.options.lanes)
2171
+ break;
2172
+ }
2173
+ }
2174
+ return a.size === e.options.lanes ? Array.from(a.values()).sort(function(d, m) {
2175
+ return d.end - m.end;
2176
+ })[0] : void 0;
2177
+ }, this.getMeasurements = fe(function() {
2178
+ return [e.memoOptions(), e.itemSizeCache];
2179
+ }, function(n, o) {
2180
+ var s = n.count, a = n.paddingStart, l = n.scrollMargin, c = n.getItemKey, u = e.pendingMeasuredCacheIndexes.length > 0 ? Math.min.apply(Math, e.pendingMeasuredCacheIndexes) : 0;
2181
+ e.pendingMeasuredCacheIndexes = [];
2182
+ for (var d = e.measurementsCache.slice(0, u), m = u; m < s; m++) {
2183
+ var g = c(m), h = e.options.lanes === 1 ? d[m - 1] : e.getFurthestMeasurement(d, m), p = h ? h.end : a + l, y = o.get(g), R = typeof y == "number" ? y : e.options.estimateSize(m), b = p + R, x = h ? h.lane : m % e.options.lanes;
2184
+ d[m] = {
2185
+ index: m,
2186
+ start: p,
2187
+ size: R,
2188
+ end: b,
2189
+ key: g,
2190
+ lane: x
2191
+ };
2192
+ }
2193
+ return e.measurementsCache = d, d;
2194
+ }, {
2195
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
2196
+ debug: function() {
2197
+ return e.options.debug;
2198
+ }
2199
+ }), this.calculateRange = fe(function() {
2200
+ return [e.getMeasurements(), e.getSize(), e.scrollOffset];
2201
+ }, function(n, o, s) {
2202
+ return e.range = n.length > 0 && o > 0 ? Or({
2203
+ measurements: n,
2204
+ outerSize: o,
2205
+ scrollOffset: s
2206
+ }) : null;
2207
+ }, {
2208
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
2209
+ debug: function() {
2210
+ return e.options.debug;
2211
+ }
2212
+ }), this.getIndexes = fe(function() {
2213
+ return [e.options.rangeExtractor, e.calculateRange(), e.options.overscan, e.options.count];
2214
+ }, function(n, o, s, a) {
2215
+ return o === null ? [] : n(Pe({}, o, {
2216
+ overscan: s,
2217
+ count: a
2218
+ }));
2219
+ }, {
2220
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
2221
+ debug: function() {
2222
+ return e.options.debug;
2223
+ }
2224
+ }), this.indexFromElement = function(n) {
2225
+ var o = e.options.indexAttribute, s = n.getAttribute(o);
2226
+ return s ? parseInt(s, 10) : (console.warn("Missing attribute name '" + o + "={index}' on measured element."), -1);
2227
+ }, this._measureElement = function(n, o) {
2228
+ var s = e.measurementsCache[e.indexFromElement(n)];
2229
+ if (!s || !n.isConnected) {
2230
+ e.measureElementCache.forEach(function(c, u) {
2231
+ c === n && (e.observer.unobserve(n), e.measureElementCache.delete(u));
2232
+ });
2233
+ return;
2234
+ }
2235
+ var a = e.measureElementCache.get(s.key);
2236
+ a !== n && (a && e.observer.unobserve(a), e.observer.observe(n), e.measureElementCache.set(s.key, n));
2237
+ var l = e.options.measureElement(n, o, e);
2238
+ e.resizeItem(s, l);
2239
+ }, this.resizeItem = function(n, o) {
2240
+ var s, a = (s = e.itemSizeCache.get(n.key)) != null ? s : n.size, l = o - a;
2241
+ l !== 0 && (n.start < e.scrollOffset && (process.env.NODE_ENV !== "production" && e.options.debug && console.info("correction", l), e._scrollToOffset(e.scrollOffset, {
2242
+ adjustments: e.scrollAdjustments += l,
2243
+ behavior: void 0
2244
+ })), e.pendingMeasuredCacheIndexes.push(n.index), e.itemSizeCache = new Map(e.itemSizeCache.set(n.key, o)), e.notify(!1));
2245
+ }, this.measureElement = function(n) {
2246
+ n && e._measureElement(n, void 0);
2247
+ }, this.getVirtualItems = fe(function() {
2248
+ return [e.getIndexes(), e.getMeasurements()];
2249
+ }, function(n, o) {
2250
+ for (var s = [], a = 0, l = n.length; a < l; a++) {
2251
+ var c = n[a], u = o[c];
2252
+ s.push(u);
2253
+ }
2254
+ return s;
2255
+ }, {
2256
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
2257
+ debug: function() {
2258
+ return e.options.debug;
2259
+ }
2260
+ }), this.getVirtualItemForOffset = function(n) {
2261
+ var o = e.getMeasurements();
2262
+ return qe(o[Jt(0, o.length - 1, function(s) {
2263
+ return qe(o[s]).start;
2264
+ }, n)]);
2265
+ }, this.getOffsetForAlignment = function(n, o) {
2266
+ var s = e.getSize();
2267
+ o === "auto" && (n <= e.scrollOffset ? o = "start" : n >= e.scrollOffset + s ? o = "end" : o = "start"), o === "start" ? n = n : o === "end" ? n = n - s : o === "center" && (n = n - s / 2);
2268
+ var a = e.options.horizontal ? "scrollWidth" : "scrollHeight", l = e.scrollElement ? "document" in e.scrollElement ? e.scrollElement.document.documentElement[a] : e.scrollElement[a] : 0, c = l - e.getSize();
2269
+ return Math.max(Math.min(c, n), 0);
2270
+ }, this.getOffsetForIndex = function(n, o) {
2271
+ o === void 0 && (o = "auto"), n = Math.max(0, Math.min(n, e.options.count - 1));
2272
+ var s = qe(e.getMeasurements()[n]);
2273
+ if (o === "auto")
2274
+ if (s.end >= e.scrollOffset + e.getSize() - e.options.scrollPaddingEnd)
2275
+ o = "end";
2276
+ else if (s.start <= e.scrollOffset + e.options.scrollPaddingStart)
2277
+ o = "start";
2278
+ else
2279
+ return [e.scrollOffset, o];
2280
+ var a = o === "end" ? s.end + e.options.scrollPaddingEnd : s.start - e.options.scrollPaddingStart;
2281
+ return [e.getOffsetForAlignment(a, o), o];
2282
+ }, this.isDynamicMode = function() {
2283
+ return e.measureElementCache.size > 0;
2284
+ }, this.cancelScrollToIndex = function() {
2285
+ e.scrollToIndexTimeoutId !== null && (clearTimeout(e.scrollToIndexTimeoutId), e.scrollToIndexTimeoutId = null);
2286
+ }, this.scrollToOffset = function(n, o) {
2287
+ var s = o === void 0 ? {} : o, a = s.align, l = a === void 0 ? "start" : a, c = s.behavior;
2288
+ e.cancelScrollToIndex(), c === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), e._scrollToOffset(e.getOffsetForAlignment(n, l), {
2289
+ adjustments: void 0,
2290
+ behavior: c
2291
+ });
2292
+ }, this.scrollToIndex = function(n, o) {
2293
+ var s = o === void 0 ? {} : o, a = s.align, l = a === void 0 ? "auto" : a, c = s.behavior;
2294
+ n = Math.max(0, Math.min(n, e.options.count - 1)), e.cancelScrollToIndex(), c === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");
2295
+ var u = e.getOffsetForIndex(n, l), d = u[0], m = u[1];
2296
+ e._scrollToOffset(d, {
2297
+ adjustments: void 0,
2298
+ behavior: c
2299
+ }), c !== "smooth" && e.isDynamicMode() && (e.scrollToIndexTimeoutId = setTimeout(function() {
2300
+ e.scrollToIndexTimeoutId = null;
2301
+ var g = e.measureElementCache.has(e.options.getItemKey(n));
2302
+ if (g) {
2303
+ var h = e.getOffsetForIndex(n, m), p = h[0];
2304
+ pr(p, e.scrollOffset) || e.scrollToIndex(n, {
2305
+ align: m,
2306
+ behavior: c
2307
+ });
2308
+ } else
2309
+ e.scrollToIndex(n, {
2310
+ align: m,
2311
+ behavior: c
2312
+ });
2313
+ }));
2314
+ }, this.scrollBy = function(n, o) {
2315
+ var s = o === void 0 ? {} : o, a = s.behavior;
2316
+ e.cancelScrollToIndex(), a === "smooth" && e.isDynamicMode() && console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."), e._scrollToOffset(e.scrollOffset + n, {
2317
+ adjustments: void 0,
2318
+ behavior: a
2319
+ });
2320
+ }, this.getTotalSize = function() {
2321
+ var n;
2322
+ return (((n = e.getMeasurements()[e.options.count - 1]) == null ? void 0 : n.end) || e.options.paddingStart) - e.options.scrollMargin + e.options.paddingEnd;
2323
+ }, this._scrollToOffset = function(n, o) {
2324
+ var s = o.adjustments, a = o.behavior;
2325
+ e.options.scrollToFn(n, {
2326
+ behavior: a,
2327
+ adjustments: s
2328
+ }, e);
2329
+ }, this.measure = function() {
2330
+ e.itemSizeCache = /* @__PURE__ */ new Map(), e.notify(!1);
2331
+ }, this.setOptions(r), this.scrollRect = this.options.initialRect, this.scrollOffset = this.options.initialOffset, this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach(function(n) {
2332
+ e.itemSizeCache.set(n.key, n.size);
2333
+ }), this.maybeNotify();
2334
+ }, Jt = function(r, e, n, o) {
2335
+ for (; r <= e; ) {
2336
+ var s = (r + e) / 2 | 0, a = n(s);
2337
+ if (a < o)
2338
+ r = s + 1;
2339
+ else if (a > o)
2340
+ e = s - 1;
2341
+ else
2342
+ return s;
2343
+ }
2344
+ return r > 0 ? r - 1 : 0;
2345
+ };
2346
+ function Or(t) {
2347
+ for (var r = t.measurements, e = t.outerSize, n = t.scrollOffset, o = r.length - 1, s = function(u) {
2348
+ return r[u].start;
2349
+ }, a = Jt(0, o, s, n), l = a; l < o && r[l].end < n + e; )
2350
+ l++;
2351
+ return {
2352
+ startIndex: a,
2353
+ endIndex: l
2354
+ };
2355
+ }
2356
+ /**
2357
+ * react-virtual
2358
+ *
2359
+ * Copyright (c) TanStack
2360
+ *
2361
+ * This source code is licensed under the MIT license found in the
2362
+ * LICENSE.md file in the root directory of this source tree.
2363
+ *
2364
+ * @license MIT
2365
+ */
2366
+ var Sr = typeof document < "u" ? M.useLayoutEffect : M.useEffect;
2367
+ function Tr(t) {
2368
+ var r = M.useReducer(function() {
2369
+ return {};
2370
+ }, {})[1], e = Ie({}, t, {
2371
+ onChange: function(a, l) {
2372
+ l ? Tn(r) : r(), t.onChange == null || t.onChange(a, l);
2373
+ }
2374
+ }), n = M.useState(function() {
2375
+ return new Cr(e);
2376
+ }), o = n[0];
2377
+ return o.setOptions(e), M.useEffect(function() {
2378
+ return o._didMount();
2379
+ }, []), Sr(function() {
2380
+ return o._willUpdate();
2381
+ }), o;
2382
+ }
2383
+ function _r(t) {
2384
+ return Tr(Ie({
2385
+ observeElementRect: yr,
2386
+ observeElementOffset: wr,
2387
+ scrollToFn: Rr
2388
+ }, t));
2389
+ }
2390
+ function Ar(t) {
2391
+ const {
2392
+ items: r,
2393
+ selected: e,
2394
+ className: n,
2395
+ onChange: o,
2396
+ disabled: s,
2397
+ placeholder: a = "Select an Item",
2398
+ multiple: l,
2399
+ width: c = "215px",
2400
+ height: u = "40px",
2401
+ ...d
2402
+ } = t, m = Pt(null), [g, h] = Me(!1);
2403
+ return /* @__PURE__ */ w.jsx(
2404
+ Xt,
2405
+ {
2406
+ placement: "bottom",
2407
+ trigger: "click",
2408
+ show: g,
2409
+ setShow: h,
2410
+ role: "combobox",
2411
+ disabled: s,
2412
+ content: l ? /* @__PURE__ */ w.jsx(At, { multiple: !0, items: r, selected: e, onChange: o, width: c }) : /* @__PURE__ */ w.jsx(At, { items: r, selected: e, onChange: o, width: c }),
2413
+ children: /* @__PURE__ */ w.jsxs(
2414
+ ee,
2415
+ {
2416
+ style: { width: c, height: u },
2417
+ className: W(
2418
+ "inline-flex grow items-center justify-between rounded border-2 border-input bg-background p-2 transition",
2419
+ s ? "cursor-not-allowed bg-muted text-muted" : "cursor-pointer",
2420
+ g && "border-primary shadow-sm shadow-ring",
2421
+ n
2422
+ ),
2423
+ children: [
2424
+ /* @__PURE__ */ w.jsx(
2425
+ ee,
2426
+ {
2427
+ className: W(
2428
+ "flex max-w-[calc(100%-30px)] flex-none grow items-center gap-1 text-sm",
2429
+ s ? "text-muted-foreground" : "text-foreground"
2430
+ ),
2431
+ ref: m,
2432
+ children: l ? /* @__PURE__ */ w.jsx(
2433
+ mr,
2434
+ {
2435
+ items: e.map((p) => p.text),
2436
+ data: e,
2437
+ parentRef: m,
2438
+ badgeVariant: "secondary",
2439
+ badgeStyles: "!bg-input h-6 min-w-min gap-2 !bg-input",
2440
+ children: (p, y, R) => /* @__PURE__ */ w.jsxs(
2441
+ Nt,
2442
+ {
2443
+ className: "flex h-6 min-w-min gap-2 !bg-input pr-1",
2444
+ variant: "secondary",
2445
+ children: [
2446
+ p,
2447
+ /* @__PURE__ */ w.jsx(
2448
+ An,
2449
+ {
2450
+ onClick: () => {
2451
+ o(e.filter((b) => b.key !== (R == null ? void 0 : R.key)));
2452
+ },
2453
+ variant: "icon",
2454
+ size: "icon",
2455
+ className: "group bg-muted p-0.5 hover:bg-muted-foreground ",
2456
+ children: /* @__PURE__ */ w.jsx(vr, { className: "size-3 transition duration-300 group-hover:rotate-90 group-hover:text-muted" })
2457
+ }
2458
+ )
2459
+ ]
2460
+ },
2461
+ `collapsed_item_${y}`
2462
+ )
2463
+ }
2464
+ ) : e.text ?? "Select an item"
2465
+ }
2466
+ ),
2467
+ /* @__PURE__ */ w.jsx(
2468
+ hr,
2469
+ {
2470
+ className: W(
2471
+ "size-4 rounded-full bg-input p-0.5 transition duration-300 ease-in-out",
2472
+ g ? "rotate-180" : "rotate-0",
2473
+ s ? "text-muted-foreground" : "text-foreground"
2474
+ )
2475
+ }
2476
+ )
2477
+ ]
2478
+ }
2479
+ )
2480
+ }
2481
+ );
2482
+ }
2483
+ const At = (t) => {
2484
+ const { items: r, multiple: e, selected: n, onChange: o, width: s } = t, [a, l] = Me(""), c = Pt(null), u = Xe(
2485
+ () => r.reduce((g, h, p, y) => ((!a.length || h.text.toLowerCase().includes(a.toLowerCase())) && g.push(h), g), []),
2486
+ [r, a]
2487
+ ), d = _r({
2488
+ count: u.length,
2489
+ getScrollElement: () => c.current,
2490
+ estimateSize: () => 35
2491
+ }), m = n instanceof Array ? n : [n];
2492
+ return /* @__PURE__ */ w.jsxs(
2493
+ ee,
2494
+ {
2495
+ className: "flex flex-col divide-y-2 divide-border overflow-hidden rounded border border-input bg-background",
2496
+ style: { width: s },
2497
+ children: [
2498
+ /* @__PURE__ */ w.jsxs(ee, { className: W("inline-flex grow items-center rounded px-3 py-2"), children: [
2499
+ /* @__PURE__ */ w.jsx(gr, { className: "left-3 top-3 mr-2 size-4 text-muted-foreground" }),
2500
+ /* @__PURE__ */ w.jsx(
2501
+ X,
2502
+ {
2503
+ tag: "input",
2504
+ className: "inline-flex grow bg-transparent text-sm text-foreground outline-none",
2505
+ placeholder: "Search",
2506
+ value: a,
2507
+ onChange: (g) => l(g.target.value)
2508
+ }
2509
+ )
2510
+ ] }),
2511
+ /* @__PURE__ */ w.jsx(
2512
+ X,
2513
+ {
2514
+ tag: "ul",
2515
+ className: W("max-h-60 grow overflow-auto shadow", "focus:outline-none focus:ring-0"),
2516
+ ref: c,
2517
+ children: /* @__PURE__ */ w.jsxs(
2518
+ ee,
2519
+ {
2520
+ style: {
2521
+ height: `${d.getTotalSize()}px`,
2522
+ width: "100%",
2523
+ position: "relative"
2524
+ },
2525
+ children: [
2526
+ d.getVirtualItems().map((g) => /* @__PURE__ */ w.jsx(
2527
+ X,
2528
+ {
2529
+ tag: "li",
2530
+ style: {
2531
+ height: `${g.size}px`,
2532
+ transform: `translateY(${g.start}px)`
2533
+ },
2534
+ className: W(
2535
+ "absolute left-0 top-0 w-full cursor-pointer px-3 py-2 text-sm text-foreground",
2536
+ m.some((h) => h.key === u[g.index].key) ? "bg-primary/90 text-primary-foreground" : "transition hover:bg-primary/60"
2537
+ ),
2538
+ onClick: () => {
2539
+ e ? m.some((h) => h.key === u[g.index].key) ? o(
2540
+ structuredClone(
2541
+ n.filter(
2542
+ (h) => h.key !== u[g.index].key
2543
+ )
2544
+ )
2545
+ ) : o(structuredClone([...n, u[g.index]])) : o(u[g.index]);
2546
+ },
2547
+ children: u[g.index].text
2548
+ },
2549
+ g.key
2550
+ )),
2551
+ u.length === 0 && /* @__PURE__ */ w.jsx(X, { tag: "li", className: W("cursor-not-allowed px-3 py-2 text-sm text-foreground"), children: "No results found" })
2552
+ ]
2553
+ }
2554
+ )
2555
+ }
2556
+ )
2557
+ ]
2558
+ }
2559
+ );
2560
+ };
2561
+ function Ir(t) {
2562
+ return /* @__PURE__ */ w.jsx(
2563
+ "svg",
2564
+ {
2565
+ xmlns: "http://www.w3.org/2000/svg",
2566
+ fill: "none",
2567
+ viewBox: "0 0 24 24",
2568
+ strokeWidth: 1.5,
2569
+ stroke: "currentColor",
2570
+ className: "h-6 w-6",
2571
+ ...t,
2572
+ children: /* @__PURE__ */ w.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m4.5 15.75 7.5-7.5 7.5 7.5" })
2573
+ }
2574
+ );
2575
+ }
2576
+ function Pr(t) {
2577
+ const { className: r, ...e } = t;
2578
+ return /* @__PURE__ */ w.jsx(
2579
+ X,
2580
+ {
2581
+ tag: "input",
2582
+ className: W(
2583
+ "h-10 w-full rounded border-2 border-input bg-background px-3 py-2 text-sm text-foreground transition",
2584
+ "focus-visible:border-primary focus-visible:shadow-sm focus-visible:shadow-ring focus-visible:outline-none",
2585
+ "disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted",
2586
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
2587
+ r
2588
+ ),
2589
+ ...e
2590
+ }
2591
+ );
2592
+ }
2593
+ function Mr(t) {
2594
+ const { className: r, checked: e, onChange: n, ...o } = t;
2595
+ return /* @__PURE__ */ w.jsxs(
2596
+ X,
2597
+ {
2598
+ tag: "div",
2599
+ className: W(
2600
+ "rounded-full",
2601
+ "h-5 w-10",
2602
+ "border border-muted bg-secondary",
2603
+ "flex items-center",
2604
+ r
2605
+ ),
2606
+ onClick: () => {
2607
+ n(!e);
2608
+ },
2609
+ children: [
2610
+ /* @__PURE__ */ w.jsx(X, { tag: "input", type: "hidden", checked: e, ...o }),
2611
+ /* @__PURE__ */ w.jsx(
2612
+ ee,
2613
+ {
2614
+ className: W(
2615
+ "h-4 w-4 rounded-full bg-primary transition",
2616
+ e ? "translate-x-5" : "translate-x-1"
2617
+ )
2618
+ }
2619
+ )
2620
+ ]
2621
+ }
2622
+ );
2623
+ }
2624
+ export {
2625
+ Nt as Badge,
2626
+ An as Button,
2627
+ Ir as ChevronDown,
2628
+ hr as ChevronUp,
2629
+ mr as Collapse,
2630
+ X as Component,
2631
+ ee as Container,
2632
+ Ar as Dropdown,
2633
+ Pr as Input,
2634
+ Xt as Popover,
2635
+ gr as Search,
2636
+ Mr as Toggle,
2637
+ Dt as cva,
2638
+ W as cx
2639
+ };