@turtleclub/ui 0.3.0-beta.9 → 0.3.0
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.
- package/.prettierrc.json +4 -0
- package/.turbo/turbo-build.log +152 -39
- package/CHANGELOG.md +334 -0
- package/dist/index.cjs +170 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23743 -4141
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/features/data-table.d.ts +9 -0
- package/dist/types/components/features/data-table.d.ts.map +1 -0
- package/dist/types/components/features/index.d.ts +5 -0
- package/dist/types/components/features/index.d.ts.map +1 -0
- package/dist/types/components/features/page-heading.d.ts +10 -0
- package/dist/types/components/features/page-heading.d.ts.map +1 -0
- package/dist/types/components/features/search-bar.d.ts +10 -0
- package/dist/types/components/features/search-bar.d.ts.map +1 -0
- package/dist/types/components/features/segmented-navigation.d.ts +7 -0
- package/dist/types/components/features/segmented-navigation.d.ts.map +1 -0
- package/dist/types/components/features/sidebar-layout.d.ts +36 -0
- package/dist/types/components/features/sidebar-layout.d.ts.map +1 -0
- package/dist/types/components/icons/arrow.d.ts +4 -0
- package/dist/types/components/icons/arrow.d.ts.map +1 -0
- package/dist/types/components/icons/beta.d.ts +4 -0
- package/dist/types/components/icons/beta.d.ts.map +1 -0
- package/dist/types/components/icons/dot.d.ts +4 -0
- package/dist/types/components/icons/dot.d.ts.map +1 -0
- package/dist/types/components/icons/index.d.ts +8 -0
- package/dist/types/components/icons/index.d.ts.map +1 -0
- package/dist/types/components/icons/issue.d.ts +4 -0
- package/dist/types/components/icons/issue.d.ts.map +1 -0
- package/dist/types/components/icons/turtle.d.ts +4 -0
- package/dist/types/components/icons/turtle.d.ts.map +1 -0
- package/dist/types/components/icons/update.d.ts +4 -0
- package/dist/types/components/icons/update.d.ts.map +1 -0
- package/dist/types/components/icons/warning.d.ts +4 -0
- package/dist/types/components/icons/warning.d.ts.map +1 -0
- package/dist/types/components/molecules/index.d.ts +0 -1
- package/dist/types/components/molecules/index.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-apr.d.ts +6 -2
- package/dist/types/components/molecules/opportunity/opportunity-apr.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-disclaimer.d.ts +1 -2
- package/dist/types/components/molecules/opportunity/opportunity-disclaimer.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-list/hooks/use-opportunity-filtering.d.ts +2 -1
- package/dist/types/components/molecules/opportunity/opportunity-list/hooks/use-opportunity-filtering.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-list/opportunity-list.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-rate-estimator.d.ts +1 -2
- package/dist/types/components/molecules/opportunity/opportunity-rate-estimator.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-section.d.ts +3 -0
- package/dist/types/components/molecules/opportunity/opportunity-section.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-selector.d.ts +1 -2
- package/dist/types/components/molecules/opportunity/opportunity-selector.d.ts.map +1 -1
- package/dist/types/components/molecules/opportunity/opportunity-type.d.ts +1 -2
- package/dist/types/components/molecules/opportunity/opportunity-type.d.ts.map +1 -1
- package/dist/types/components/molecules/route-details.d.ts +1 -1
- package/dist/types/components/molecules/route-details.d.ts.map +1 -1
- package/dist/types/components/molecules/slippage-selector.d.ts +1 -2
- package/dist/types/components/molecules/slippage-selector.d.ts.map +1 -1
- package/dist/types/components/molecules/swap-details.d.ts.map +1 -1
- package/dist/types/components/molecules/swap-input.d.ts +5 -1
- package/dist/types/components/molecules/swap-input.d.ts.map +1 -1
- package/dist/types/components/molecules/tabs.d.ts +2 -2
- package/dist/types/components/molecules/tabs.d.ts.map +1 -1
- package/dist/types/components/molecules/token-selector.d.ts +1 -1
- package/dist/types/components/molecules/token-selector.d.ts.map +1 -1
- package/dist/types/components/molecules/tx-status.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/asset-list/asset-filters.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/asset-list/asset-list.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/asset-list/hooks/use-asset-grouping.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/base-selector.d.ts +1 -1
- package/dist/types/components/molecules/widget/base-selector.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/campaign-item.d.ts +1 -1
- package/dist/types/components/molecules/widget/campaign-item.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/index.d.ts +3 -3
- package/dist/types/components/molecules/widget/index.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/opportunity-item.d.ts +7 -0
- package/dist/types/components/molecules/widget/opportunity-item.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/widget-item.d.ts +2 -2
- package/dist/types/components/molecules/widget/widget-item.d.ts.map +1 -1
- package/dist/types/components/molecules/widget/widget-list-items.d.ts +2 -2
- package/dist/types/components/molecules/widget/widget-list-items.d.ts.map +1 -1
- package/dist/types/components/ui/alert-dialog.d.ts +15 -0
- package/dist/types/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/types/components/ui/animated-background/animated-background.d.ts +9 -0
- package/dist/types/components/ui/animated-background/animated-background.d.ts.map +1 -0
- package/dist/types/components/ui/animated-background/index.d.ts +2 -0
- package/dist/types/components/ui/animated-background/index.d.ts.map +1 -0
- package/dist/types/components/ui/avatar.d.ts +10 -6
- package/dist/types/components/ui/avatar.d.ts.map +1 -1
- package/dist/types/components/ui/badge.d.ts +5 -4
- package/dist/types/components/ui/badge.d.ts.map +1 -1
- package/dist/types/components/ui/banner.d.ts +7 -0
- package/dist/types/components/ui/banner.d.ts.map +1 -0
- package/dist/types/components/ui/button.d.ts +8 -6
- package/dist/types/components/ui/button.d.ts.map +1 -1
- package/dist/types/components/ui/card.d.ts +10 -11
- package/dist/types/components/ui/card.d.ts.map +1 -1
- package/dist/types/components/ui/checkbox.d.ts +5 -0
- package/dist/types/components/ui/checkbox.d.ts.map +1 -0
- package/dist/types/components/ui/chip.d.ts +1 -1
- package/dist/types/components/ui/chip.d.ts.map +1 -1
- package/dist/types/components/ui/collapsible.d.ts +7 -0
- package/dist/types/components/ui/collapsible.d.ts.map +1 -0
- package/dist/types/components/ui/combobox.d.ts +148 -0
- package/dist/types/components/ui/combobox.d.ts.map +1 -0
- package/dist/types/components/ui/command.d.ts +19 -0
- package/dist/types/components/ui/command.d.ts.map +1 -0
- package/dist/types/components/ui/dialog.d.ts +10 -10
- package/dist/types/components/ui/dialog.d.ts.map +1 -1
- package/dist/types/components/ui/dropdown.d.ts +30 -0
- package/dist/types/components/ui/dropdown.d.ts.map +1 -0
- package/dist/types/components/ui/field.d.ts +26 -0
- package/dist/types/components/ui/field.d.ts.map +1 -0
- package/dist/types/components/ui/heading.d.ts +12 -0
- package/dist/types/components/ui/heading.d.ts.map +1 -0
- package/dist/types/components/ui/hover-card.d.ts +7 -7
- package/dist/types/components/ui/hover-card.d.ts.map +1 -1
- package/dist/types/components/ui/icon-animation.d.ts +1 -1
- package/dist/types/components/ui/icon-animation.d.ts.map +1 -1
- package/dist/types/components/ui/icon-list.d.ts +3 -0
- package/dist/types/components/ui/icon-list.d.ts.map +1 -1
- package/dist/types/components/ui/index.d.ts +28 -9
- package/dist/types/components/ui/index.d.ts.map +1 -1
- package/dist/types/components/ui/info-card.d.ts +4 -4
- package/dist/types/components/ui/info-card.d.ts.map +1 -1
- package/dist/types/components/ui/input-group.d.ts +17 -0
- package/dist/types/components/ui/input-group.d.ts.map +1 -0
- package/dist/types/components/ui/input.d.ts +1 -3
- package/dist/types/components/ui/input.d.ts.map +1 -1
- package/dist/types/components/ui/label-with-icon.d.ts +3 -3
- package/dist/types/components/ui/label-with-icon.d.ts.map +1 -1
- package/dist/types/components/ui/label.d.ts +1 -1
- package/dist/types/components/ui/label.d.ts.map +1 -1
- package/dist/types/components/ui/multi-select.d.ts +192 -0
- package/dist/types/components/ui/multi-select.d.ts.map +1 -0
- package/dist/types/components/ui/navigation-bar.d.ts +2 -2
- package/dist/types/components/ui/navigation-bar.d.ts.map +1 -1
- package/dist/types/components/ui/navigation-menu.d.ts +15 -0
- package/dist/types/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/types/components/ui/opportunity-details-v1.d.ts +1 -1
- package/dist/types/components/ui/opportunity-details-v1.d.ts.map +1 -1
- package/dist/types/components/ui/popover.d.ts +8 -0
- package/dist/types/components/ui/popover.d.ts.map +1 -0
- package/dist/types/components/ui/scroll-area.d.ts +2 -2
- package/dist/types/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/types/components/ui/segment-control.d.ts +19 -0
- package/dist/types/components/ui/segment-control.d.ts.map +1 -0
- package/dist/types/components/ui/select.d.ts +14 -13
- package/dist/types/components/ui/select.d.ts.map +1 -1
- package/dist/types/components/ui/separator.d.ts +1 -1
- package/dist/types/components/ui/separator.d.ts.map +1 -1
- package/dist/types/components/ui/sheet.d.ts +14 -0
- package/dist/types/components/ui/sheet.d.ts.map +1 -0
- package/dist/types/components/ui/sidebar.d.ts +69 -0
- package/dist/types/components/ui/sidebar.d.ts.map +1 -0
- package/dist/types/components/ui/skeleton.d.ts +4 -0
- package/dist/types/components/ui/skeleton.d.ts.map +1 -0
- package/dist/types/components/ui/slider.d.ts +5 -0
- package/dist/types/components/ui/slider.d.ts.map +1 -0
- package/dist/types/components/ui/sonner.d.ts +1 -2
- package/dist/types/components/ui/sonner.d.ts.map +1 -1
- package/dist/types/components/ui/switch.d.ts +1 -1
- package/dist/types/components/ui/switch.d.ts.map +1 -1
- package/dist/types/components/ui/table-shadcn.d.ts +11 -0
- package/dist/types/components/ui/table-shadcn.d.ts.map +1 -0
- package/dist/types/components/ui/table.d.ts +2 -2
- package/dist/types/components/ui/table.d.ts.map +1 -1
- package/dist/types/components/ui/textarea.d.ts +4 -0
- package/dist/types/components/ui/textarea.d.ts.map +1 -0
- package/dist/types/components/ui/toggle-group.d.ts +2 -2
- package/dist/types/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/types/components/ui/toggle.d.ts +2 -2
- package/dist/types/components/ui/toggle.d.ts.map +1 -1
- package/dist/types/components/ui/tooltip.d.ts +7 -4
- package/dist/types/components/ui/tooltip.d.ts.map +1 -1
- package/dist/types/hooks/useIsMobile.d.ts +7 -0
- package/dist/types/hooks/useIsMobile.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +38 -28
- package/src/components/features/data-table.tsx +96 -0
- package/src/components/features/index.ts +4 -0
- package/src/components/features/page-heading.tsx +22 -0
- package/src/components/features/search-bar.tsx +50 -0
- package/src/components/features/segmented-navigation.tsx +18 -0
- package/src/components/features/sidebar-layout.tsx +190 -0
- package/src/components/icons/arrow.tsx +23 -0
- package/src/components/icons/beta.tsx +86 -0
- package/src/components/icons/dot.tsx +89 -0
- package/src/components/icons/index.ts +7 -0
- package/src/components/icons/issue.tsx +97 -0
- package/src/components/icons/turtle.tsx +143 -0
- package/src/components/icons/update.tsx +108 -0
- package/src/components/icons/warning.tsx +86 -0
- package/src/components/molecules/index.ts +0 -2
- package/src/components/molecules/opportunity/opportunity-apr.tsx +97 -16
- package/src/components/molecules/opportunity/opportunity-list/hooks/use-opportunity-filtering.ts +4 -3
- package/src/components/molecules/opportunity/opportunity-list/hooks/use-opportunity-grouping.ts +1 -1
- package/src/components/molecules/opportunity/opportunity-list/opportunity-list.tsx +21 -17
- package/src/components/molecules/opportunity/opportunity-rate-estimator.tsx +4 -1
- package/src/components/molecules/opportunity/opportunity-section.tsx +19 -17
- package/src/components/molecules/opportunity/opportunity-selector.tsx +2 -3
- package/src/components/molecules/route-details.tsx +48 -37
- package/src/components/molecules/swap-details.tsx +2 -4
- package/src/components/molecules/swap-input.tsx +56 -21
- package/src/components/molecules/token-selector.tsx +2 -2
- package/src/components/molecules/tx-status.tsx +1 -5
- package/src/components/molecules/widget/asset-list/asset-filters.tsx +17 -23
- package/src/components/molecules/widget/asset-list/asset-list.tsx +23 -19
- package/src/components/molecules/widget/asset-list/asset-row.tsx +7 -7
- package/src/components/molecules/widget/asset-list/hooks/use-asset-grouping.ts +38 -23
- package/src/components/molecules/widget/base-selector.tsx +11 -11
- package/src/components/molecules/widget/campaign-item.tsx +2 -2
- package/src/components/molecules/widget/index.ts +10 -4
- package/src/components/molecules/widget/opportunity-item.tsx +8 -1
- package/src/components/molecules/widget/widget-item.tsx +45 -26
- package/src/components/molecules/widget/widget-list-items.tsx +6 -5
- package/src/components/ui/alert-dialog.tsx +146 -0
- package/src/components/ui/animated-background/animated-background.tsx +174 -0
- package/src/components/ui/animated-background/index.ts +1 -0
- package/src/components/ui/avatar.tsx +16 -3
- package/src/components/ui/badge.tsx +18 -8
- package/src/components/ui/banner.tsx +78 -0
- package/src/components/ui/button.tsx +51 -21
- package/src/components/ui/card.tsx +21 -61
- package/src/components/ui/checkbox.tsx +29 -0
- package/src/components/ui/collapsible.tsx +22 -0
- package/src/components/ui/combobox.tsx +617 -0
- package/src/components/ui/command.tsx +164 -0
- package/src/components/ui/dialog.tsx +5 -9
- package/src/components/ui/dropdown.tsx +263 -0
- package/src/components/ui/field.tsx +232 -0
- package/src/components/ui/heading.tsx +49 -0
- package/src/components/ui/hover-card.tsx +10 -10
- package/src/components/ui/icon-list.tsx +109 -21
- package/src/components/ui/index.ts +29 -10
- package/src/components/ui/info-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +158 -0
- package/src/components/ui/input.tsx +17 -25
- package/src/components/ui/label-with-icon.tsx +40 -30
- package/src/components/ui/label.tsx +8 -9
- package/src/components/ui/multi-select.tsx +1000 -0
- package/src/components/ui/navigation-menu.tsx +181 -0
- package/src/components/ui/opportunity-details-v1.tsx +2 -2
- package/src/components/ui/popover.tsx +42 -0
- package/src/components/ui/scroll-area.tsx +11 -11
- package/src/components/ui/segment-control.tsx +140 -0
- package/src/components/ui/select.tsx +26 -31
- package/src/components/ui/sheet.tsx +130 -0
- package/src/components/ui/sidebar.tsx +693 -0
- package/src/components/ui/skeleton.tsx +14 -0
- package/src/components/ui/slider.tsx +58 -0
- package/src/components/ui/switch.tsx +8 -11
- package/src/components/ui/{table-shad.tsx → table-shadcn.tsx} +25 -39
- package/src/components/ui/table.tsx +3 -2
- package/src/components/ui/textarea.tsx +22 -0
- package/src/components/ui/tooltip.tsx +11 -7
- package/src/hooks/useIsMobile.ts +74 -0
- package/src/index.ts +2 -0
- package/src/styles/globals.css +87 -20
- package/src/styles/themes/semantic.css +11 -5
- package/src/styles/tokens/colors.css +64 -53
- package/src/styles/tokens/radius.css +3 -34
- package/tsconfig.json +11 -15
- package/vite.config.js +41 -57
- package/dist/types/components/molecules/search-bar.d.ts +0 -10
- package/dist/types/components/molecules/search-bar.d.ts.map +0 -1
- package/dist/types/components/ui/table-shad.d.ts +0 -11
- package/dist/types/components/ui/table-shad.d.ts.map +0 -1
- package/src/components/molecules/search-bar.tsx +0 -42
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,140 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oo=require("clsx"),Po=require("tailwind-merge"),x=require("react"),V=require("class-variance-authority"),Do=require("@radix-ui/react-label"),Lo=require("@radix-ui/react-scroll-area"),Io=require("@radix-ui/react-select"),D=require("lucide-react"),Mo=require("@radix-ui/react-separator"),Fo=require("next-themes"),jo=require("sonner"),Bo=require("@radix-ui/react-switch"),$o=require("@radix-ui/react-toggle-group"),Wo=require("@radix-ui/react-toggle"),Uo=require("@radix-ui/react-tooltip"),mt=require("@radix-ui/react-slot"),A=require("react/jsx-runtime"),gr=require("react-dom");function ae(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=ae(x),Vo=ae(Do),Pe=ae(Lo),U=ae(Io),zo=ae(Mo),On=ae(Bo),vr=ae($o),Ho=ae(Wo),Ne=ae(Uo),xr=ae(gr);function y(...e){return Po.twMerge(Oo.clsx(e))}const $t=V.cva("flex w-full bg-transparent text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-none focus:ring-0 focus:border-none caret-primary",bordered:"border border-border rounded-md focus:border-primary focus:ring-2 focus:ring-primary/20 caret-primary",nofocus:"border-none focus:ring-0 focus:border-none focus:outline-none caret-primary"},size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs",lg:"h-12 px-4 py-3 text-base"},cursor:{primary:"caret-primary",foreground:"caret-foreground",white:"caret-white",green:"caret-green-500"}},defaultVariants:{variant:"default",size:"default",cursor:"primary"}}),Kt=a.forwardRef(({className:e,variant:t,size:n,cursor:r,type:o,prompt:s,...i},l)=>s?a.createElement("div",{className:"flex items-center gap-2"},a.createElement("span",{className:"text-primary text-sm font-medium shrink-0"},s),a.createElement("input",{type:o,"data-slot":"input",className:y($t({variant:t,size:n,cursor:r,className:e})),ref:l,...i})):a.createElement("input",{type:o,"data-slot":"input",className:y($t({variant:t,size:n,cursor:r,className:e})),ref:l,...i}));Kt.displayName="Input";function Go({className:e,...t}){return a.createElement(Vo.Root,{"data-slot":"label",className:y("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function br({className:e,children:t,...n}){return a.createElement(Pe.Root,{"data-slot":"scroll-area",className:y("relative overflow-hidden",e),...n},a.createElement(Pe.Viewport,{"data-slot":"scroll-area-viewport",className:"h-full w-full rounded-[inherit] focus-visible:ring-ring/50 transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:!block"},t),a.createElement(yr,null),a.createElement(Pe.Corner,null))}function yr({className:e,orientation:t="vertical",...n}){return a.createElement(Pe.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:y("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n},a.createElement(Pe.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"}))}function wr({...e}){return a.createElement(U.Root,{"data-slot":"select",...e})}function qo({...e}){return a.createElement(U.Group,{"data-slot":"select-group",...e})}function Xo({...e}){return a.createElement(U.Value,{"data-slot":"select-value",...e})}function Er({className:e,size:t="default",variant:n="bordered",children:r,...o}){return a.createElement(U.Trigger,{"data-slot":"select-trigger","data-size":t,"data-variant":n,className:y("flex w-fit items-center justify-between gap-2 bg-transparent px-3 py-2 text-sm text-foreground whitespace-nowrap transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=xs]:h-8 data-[size=xs]:px-4 data-[size=xs]:py-2 data-[size=xs]:text-xs focus:ring-0",n==="default"&&"border-none",n==="bordered"&&"border border-foreground/30","data-[placeholder]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",e),...o},r,a.createElement(U.Icon,{asChild:!0},a.createElement(D.ChevronDownIcon,{className:"size-4 opacity-50"})))}function Sr({className:e,children:t,position:n="popper",...r}){return a.createElement(U.Portal,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0},a.createElement(U.Content,{"data-slot":"select-content",className:y("bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r},a.createElement(Cr,null),a.createElement(U.Viewport,{className:y("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},t),a.createElement(Ar,null)))}function Ko({className:e,...t}){return a.createElement(U.Label,{"data-slot":"select-label",className:y("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function Nr({className:e,children:t,...n}){return a.createElement(U.Item,{"data-slot":"select-item",className:y("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm text-foreground outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50","bg-muted hover:bg-muted/80 focus:bg-muted/80","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n},a.createElement("span",{className:"absolute right-2 flex size-3.5 items-center justify-center"},a.createElement("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30 transition-colors"}),a.createElement(U.ItemIndicator,{className:"absolute"},a.createElement("div",{className:"w-2 h-2 rounded-full bg-primary"}))),a.createElement(U.ItemText,null,t))}function Yo({className:e,...t}){return a.createElement(U.Separator,{"data-slot":"select-separator",className:y("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function Cr({className:e,...t}){return a.createElement(U.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:y("flex cursor-default items-center justify-center py-1",e),...t},a.createElement(D.ChevronUpIcon,{className:"size-4"}))}function Ar({className:e,...t}){return a.createElement(U.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:y("flex cursor-default items-center justify-center py-1",e),...t},a.createElement(D.ChevronDownIcon,{className:"size-4"}))}function Yt({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return a.createElement(zo.Root,{"data-slot":"separator",decorative:n,orientation:t,className:y("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const Zo=({...e})=>{const{theme:t="system"}=Fo.useTheme();return a.createElement(jo.Toaster,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function Qo({className:e,...t}){return a.createElement(On.Root,{"data-slot":"switch",className:y("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t},a.createElement(On.Thumb,{"data-slot":"switch-thumb",className:y("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}))}const Zt=V.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Jo({className:e,variant:t,size:n,...r}){return a.createElement(Ho.Root,{"data-slot":"toggle",className:y(Zt({variant:t,size:n,className:e})),...r})}const Rr=a.createContext({size:"default",variant:"default"});function es({className:e,variant:t,size:n,children:r,...o}){return a.createElement(vr.Root,{"data-slot":"toggle-group","data-variant":t,"data-size":n,className:y("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",e),...o},a.createElement(Rr.Provider,{value:{variant:t,size:n}},r))}function ts({className:e,children:t,variant:n,size:r,...o}){const s=a.useContext(Rr);return a.createElement(vr.Item,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,className:y(Zt({variant:s.variant||n,size:s.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o},t)}function _r({delayDuration:e=0,...t}){return a.createElement(Ne.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ns({...e}){return a.createElement(_r,null,a.createElement(Ne.Root,{"data-slot":"tooltip",...e}))}function rs({...e}){return a.createElement(Ne.Trigger,{"data-slot":"tooltip-trigger",...e})}function as({className:e,sideOffset:t=0,children:n,...r}){return a.createElement(Ne.Portal,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0},a.createElement(Ne.Content,{"data-slot":"tooltip-content",sideOffset:t,className:y("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r},n,a.createElement(Ne.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})))}const Tr=V.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none border",{variants:{variant:{default:"bg-background text-primary border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-background/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",green:"bg-primary text-primary-foreground border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-primary/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",transparentWhite:"bg-secondary text-secondary-foreground border-secondary hover:bg-secondary/80",transparentGreen:"bg-secondary text-primary border-secondary hover:bg-secondary/80"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"},rounded:{default:"rounded-full",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}});function nt({className:e,variant:t,size:n,rounded:r,asChild:o=!1,...s}){const i=o?mt.Slot:"button";return a.createElement(i,{"data-slot":"button",className:y(Tr({variant:t,size:n,rounded:r,className:e})),...s})}const Ze=V.cva("transition-all",{variants:{variant:{container:"relative bg-background drop-shadow-lg",simple:"bg-muted",item:"bg-muted drop-shadow-lg"},gradientBorder:{none:"",white:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",green:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-[#73F36C]/60 before:via-transparent before:to-[#73F36C]/20 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",auto:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude] dark:before:from-white/40 dark:before:to-white/10 light:before:from-black/20 light:before:to-black/5"},padding:{none:"p-0",xs:"py-2 px-2",sm:"py-3.5 px-3.5",default:"py-4.5 px-4.5",md:"py-6.5 px-6",lg:"py-8.5 px-8"},rounded:{default:"rounded-turtle",infoCard:"rounded-info-card",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"container",padding:"default",rounded:"default",gradientBorder:"none"}});function q({className:e,variant:t,padding:n,rounded:r,gradientBorder:o,...s}){const i=o??(t==="container"?"white":"none"),l=i!=="none",c=Ze({gradientBorder:i}),u=y(Ze({variant:t,padding:n,rounded:r,gradientBorder:"none",className:e}));if(l){const f=Ze({rounded:r});return a.createElement("div",{className:y(c,f,"p-[1px] h-full"),"data-slot":"card-wrapper"},a.createElement("div",{"data-slot":"card",className:y(u,"h-full"),...s}))}return a.createElement("div",{"data-slot":"card",className:u,...s})}function os({className:e,...t}){return a.createElement("div",{"data-slot":"card-header",className:y("flex flex-col space-y-1.5 p-6",e),...t})}function ss({className:e,children:t,...n}){return a.createElement("h3",{"data-slot":"card-title",className:y("text-2xl font-semibold leading-none tracking-tight",e),...n},t)}function is({className:e,...t}){return a.createElement("p",{"data-slot":"card-description",className:y("text-sm text-muted-foreground",e),...t})}function ls({className:e,...t}){return a.createElement("div",{"data-slot":"card-content",className:y("p-6 pt-0",e),...t})}function cs({className:e,...t}){return a.createElement("div",{"data-slot":"card-footer",className:y("flex items-center p-6 pt-0",e),...t})}const kr=V.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{xs:"h-6 px-2 py-1 text-xs",default:"h-8 px-4 py-1",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-6 py-2"}},defaultVariants:{variant:"default",size:"default"}}),Qt=a.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>a.createElement("div",{"data-slot":"chip",className:y(kr({variant:t,size:n,className:e})),ref:s,...o}));Qt.displayName="Chip";const Or=V.cva("relative inline-flex items-center justify-center rounded-full",{variants:{size:{default:"w-12 h-12",sm:"w-8 h-8",lg:"w-16 h-16",xl:"w-20 h-20"},variant:{default:"bg-background",transparent:"bg-transparent"}},defaultVariants:{size:"default",variant:"default"}}),Jt=a.forwardRef(({className:e,size:t,variant:n,children:r,spinning:o=!0,...s},i)=>a.createElement("div",{ref:i,className:y(Or({size:t,variant:n}),e),...s},a.createElement("div",{className:y("absolute inset-0 rounded-full","bg-gradient-to-r from-transparent via-primary to-transparent","animate-spin",{"animate-spin":o,"animate-none":!o}),style:{background:o?"conic-gradient(from 0deg, transparent 0deg, var(--primary) 180deg, transparent 360deg)":"conic-gradient(from 0deg, var(--primary) 0deg, var(--primary) 360deg)",padding:"1px",borderRadius:"9999px"}},a.createElement("div",{className:y("w-full h-full rounded-full",n==="transparent"?"bg-transparent":"bg-background")})),a.createElement("div",{className:"relative z-10 flex items-center justify-center"},r)));Jt.displayName="IconAnimation";const Pr=V.cva("inline-flex items-center gap-2 font-medium",{variants:{variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground"},textSize:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl"}},defaultVariants:{variant:"default",textSize:"sm"}}),Pn={xs:"w-3 h-3",sm:"w-4 h-4",base:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},ne=a.forwardRef(({className:e,variant:t,textSize:n,icon:r,children:o,iconPosition:s="left",iconSize:i="sm",iconClassName:l,...c},u)=>{const f=()=>{var d;return typeof r=="string"?a.createElement("img",{src:r,alt:"",className:y(Pn[i],"object-contain",l)}):a.createElement("span",{className:y("shrink-0",l)},a.isValidElement(r)?a.cloneElement(r,{className:y(Pn[i],(d=r.props)==null?void 0:d.className)}):r)};return a.createElement("div",{ref:u,className:y(Pr({variant:t,textSize:n}),s==="right"&&"flex-row-reverse",e),...c},f(),a.createElement("span",null,o))});ne.displayName="LabelWithIcon";const Dr=V.cva("flex w-full",{variants:{variant:{default:"justify-between border border-border shadow-sm bg-background",transparent:"justify-between border border-border shadow-sm bg-transparent",menuBar:"relative h-9 gap-2 rounded-full border border-border bg-background font-medium shadow-sm"}},defaultVariants:{variant:"default"}}),Lr=V.cva("flex items-center justify-center whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"text-sm text-muted-foreground hover:text-foreground",active:"text-sm text-primary bg-muted",menuBarDefault:"relative z-[1] w-full text-sm text-foreground rounded-full px-3 py-1.5 hover:text-primary",menuBarActive:"relative z-[1] w-full text-sm text-primary rounded-full px-3 py-1.5"}},defaultVariants:{variant:"default"}}),pt=a.forwardRef(({className:e,variant:t,activeValue:n,children:r,...o},s)=>{const i=a.useRef(null),l=a.useRef(null),c=a.useCallback(()=>{if(t!=="menuBar"||!i.current||!l.current)return;const u=i.current.querySelector('[data-active="true"]');u&&(l.current.style.width=`${u.offsetWidth}px`,l.current.style.left=`${u.offsetLeft}px`)},[t]);return a.useEffect(()=>{if(t!=="menuBar")return;c();const u=new ResizeObserver(c);return i.current&&u.observe(i.current),()=>{u.disconnect()}},[n,c,t]),a.createElement("nav",{ref:s||i,className:y(Dr({variant:t,className:e})),...o},t==="menuBar"&&a.createElement("div",{ref:l,className:"absolute bottom-0 h-full origin-left rounded-full bg-secondary transition-all duration-300"}),r)});pt.displayName="NavigationBar";const ht=a.forwardRef(({className:e,variant:t,active:n,value:r,...o},s)=>{const l=t==="menuBarDefault"||t==="menuBarActive"?n?"menuBarActive":"menuBarDefault":n?"active":t||"default",c=l==="menuBarDefault"||l==="menuBarActive";return a.createElement("button",{ref:s,"data-active":n,"data-value":r,className:y(Lr({variant:l,className:e}),!c&&"px-4 py-2 rounded-md"),...o})});ht.displayName="NavigationItem";const us=V.cva("space-y-1",{variants:{align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{align:"center"}});V.cva("font-bold",{variants:{color:{primary:"text-foreground",secondary:"text-muted-foreground",accent:"text-primary",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600"}},defaultVariants:{color:"primary"}});const ds=V.cva("font-medium text-muted-foreground",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),rt=a.forwardRef(({title:e,value:t,color:n="primary",titleSize:r="default",align:o="center",iconUrl:s,subtitle:i,className:l,...c},u)=>a.createElement(q,{ref:u,variant:"item",rounded:"infoCard",className:y(us({align:o}),l),...c},a.createElement("div",{className:"flex gap-2"},s&&a.createElement("img",{src:s,alt:`${e}-icon`,className:"w-5 h-5 rounded-full"}),a.createElement("p",{className:ds({size:r})},e)),a.createElement("p",{className:y("text-foreground")},t),i&&a.createElement("p",{className:"text-xs text-muted-foreground/70"},i)));rt.displayName="InfoCard";function fs({value:e,className:t}){const{title:n,titleIcon:r,url:o,topCards:s,bottomCards:i,onTitleClick:l}=e,c=a.createElement("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center"},a.createElement("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})));return a.createElement(q,{variant:"container",className:y("space-y-4",t)},a.createElement("div",{className:"h-full overflow-y-auto"},a.createElement("div",{className:"space-y-4"},(n||r)&&a.createElement("div",{className:"flex items-center"},a.createElement("div",{className:"flex items-center justify-between gap-3 pl-0 pr-3 py-0 cursor-pointer border border-border bg-card rounded-full hover:bg-secondary",onClick:l},a.createElement(ne,{icon:r||c,textSize:"sm",iconSize:"sm"},n),a.createElement(D.ChevronDownIcon,{className:"w-4 h-4"})),o&&a.createElement(nt,{variant:"transparentWhite",size:"icon",className:"ml-auto"},a.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},a.createElement(D.ExternalLinkIcon,null)))),a.createElement("div",{className:"grid grid-cols-3 gap-3"},s.map((u,f)=>a.createElement(rt,{key:f,title:u.title,value:u.value,color:u.color||"primary",iconUrl:u.iconUrl,titleSize:"sm",align:"left"}))),a.createElement("div",{className:"space-y-2"},i.map((u,f)=>a.createElement(rt,{key:f,iconUrl:u.iconUrl,title:u.title,value:u.value,titleSize:"sm",align:"left",className:"w-full"}))))))}function ms({items:e,itemKey:t,columns:n,defaultComparator:r,hasScrollableContainer:o,render:s,className:i}){const[l,c]=x.useState(r||null),[u,f]=x.useState("desc"),d=m=>{l===m?f(u==="asc"?"desc":"asc"):(c(m),f("desc"))},p=[...e].sort((m,g)=>{if(!l)return 0;const h=n.find(N=>N.name===l);if(!(h!=null&&h.comparator))return 0;const v=h.comparator.value(m),b=h.comparator.value(g),w=h.comparator.cmp(v,b);return u==="asc"?w:-w});return x.createElement("div",{className:y("w-full overflow-auto",o&&"max-h-[600px] overflow-y-auto",i)},x.createElement("table",{className:"managed-table w-full"},x.createElement("thead",null,x.createElement("tr",null,n.map(m=>x.createElement("th",{key:m.name,className:y("px-3 py-1 text-left text-xs font-normal text-muted-foreground h-6",m.comparator&&"cursor-pointer select-none"),onClick:()=>m.comparator&&d(m.name)},x.createElement("span",{className:"flex items-center gap-1"},m.name,m.comparator&&l===m.name&&x.createElement("span",{className:"text-xs"},u==="asc"?"↑":"↓")))))),x.createElement("tbody",null,p.map(m=>x.createElement("tr",{key:t(m),className:"text-base font-medium"},s(m))))))}function ps({children:e,className:t,...n}){return x.createElement("td",{className:y("p-2 align-middle text-foreground",t),...n},e)}function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function hs(e,t){const n=a.createContext(t),r=s=>{const{children:i,...l}=s,c=a.useMemo(()=>l,Object.values(l));return A.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=a.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function gt(e,t=[]){let n=[];function r(s,i){const l=a.createContext(i),c=n.length;n=[...n,i];const u=d=>{var b;const{scope:p,children:m,...g}=d,h=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,v=a.useMemo(()=>g,Object.values(g));return A.jsx(h.Provider,{value:v,children:m})};u.displayName=s+"Provider";function f(d,p){var h;const m=((h=p==null?void 0:p[e])==null?void 0:h[c])||l,g=a.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>a.createContext(i));return function(l){const c=(l==null?void 0:l[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,gs(o,...t)]}function gs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var X=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},vs=a[" useInsertionEffect ".trim().toString()]||X;function Ir({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=xs({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=a.useCallback(f=>{var d;if(l){const p=bs(f)?f(e):f;p!==e&&((d=i.current)==null||d.call(i,p))}else s(f)},[l,e,s,i]);return[c,u]}function xs({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),s=a.useRef(t);return vs(()=>{s.current=t},[t]),a.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function bs(e){return typeof e=="function"}function Dn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ys(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Dn(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Dn(e[o],null)}}}}function oe(...e){return a.useCallback(ys(...e),e)}const ws=["top","right","bottom","left"],fe=Math.min,H=Math.max,at=Math.round,Ue=Math.floor,te=e=>({x:e,y:e}),Es={left:"right",right:"left",bottom:"top",top:"bottom"},Ss={start:"end",end:"start"};function Wt(e,t,n){return H(e,fe(t,n))}function ie(e,t){return typeof e=="function"?e(t):e}function le(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function en(e){return e==="x"?"y":"x"}function tn(e){return e==="y"?"height":"width"}const Ns=new Set(["top","bottom"]);function ee(e){return Ns.has(le(e))?"y":"x"}function nn(e){return en(ee(e))}function Cs(e,t,n){n===void 0&&(n=!1);const r=_e(e),o=nn(e),s=tn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ot(i)),[i,ot(i)]}function As(e){const t=ot(e);return[Ut(e),t,Ut(t)]}function Ut(e){return e.replace(/start|end/g,t=>Ss[t])}const Ln=["left","right"],In=["right","left"],Rs=["top","bottom"],_s=["bottom","top"];function Ts(e,t,n){switch(e){case"top":case"bottom":return n?t?In:Ln:t?Ln:In;case"left":case"right":return t?Rs:_s;default:return[]}}function ks(e,t,n,r){const o=_e(e);let s=Ts(le(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ut)))),s}function ot(e){return e.replace(/left|right|bottom|top/g,t=>Es[t])}function Os(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mr(e){return typeof e!="number"?Os(e):{top:e,right:e,bottom:e,left:e}}function st(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Mn(e,t,n){let{reference:r,floating:o}=e;const s=ee(t),i=nn(t),l=tn(i),c=le(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(_e(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1);break}return m}const Ps=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Mn(u,r,c),p=r,m={},g=0;for(let h=0;h<l.length;h++){const{name:v,fn:b}=l[h],{x:w,y:N,data:E,reset:C}=await b({x:f,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=w??f,d=N??d,m={...m,[v]:{...m[v],...E}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=Mn(u,p,c)),h=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:m}};async function De(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=ie(t,e),g=Mr(m),v=l[p?d==="floating"?"reference":"floating":d],b=st(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),w=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),E=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},C=st(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:N,strategy:c}):w);return{top:(b.top-C.top+g.top)/E.y,bottom:(C.bottom-b.bottom+g.bottom)/E.y,left:(b.left-C.left+g.left)/E.x,right:(C.right-b.right+g.right)/E.x}}const Ds=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=ie(e,t)||{};if(u==null)return{};const d=Mr(f),p={x:n,y:r},m=nn(o),g=tn(m),h=await i.getDimensions(u),v=m==="y",b=v?"top":"left",w=v?"bottom":"right",N=v?"clientHeight":"clientWidth",E=s.reference[g]+s.reference[m]-p[m]-s.floating[g],C=p[m]-s.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=R?R[N]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=l.floating[N]||s.floating[g]);const T=E/2-C/2,P=S/2-h[g]/2-1,k=fe(d[b],P),$=fe(d[w],P),W=k,L=S-h[g]-$,O=S/2-h[g]/2+T,z=Wt(W,O,L),I=!c.arrow&&_e(o)!=null&&O!==z&&s.reference[g]/2-(O<W?k:$)-h[g]/2<0,M=I?O<W?O-W:O-L:0;return{[m]:p[m]+M,data:{[m]:z,centerOffset:O-z-M,...I&&{alignmentOffset:M}},reset:I}}}),Ls=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...v}=ie(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=le(o),w=ee(l),N=le(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(N||!h?[ot(l)]:As(l)),R=g!=="none";!p&&R&&C.push(...ks(l,h,g,E));const S=[l,...C],T=await De(t,v),P=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&P.push(T[b]),d){const O=Cs(o,i,E);P.push(T[O[0]],T[O[1]])}if(k=[...k,{placement:o,overflows:P}],!P.every(O=>O<=0)){var $,W;const O=((($=s.flip)==null?void 0:$.index)||0)+1,z=S[O];if(z&&(!(d==="alignment"?w!==ee(z):!1)||k.every(_=>ee(_.placement)===w?_.overflows[0]>0:!0)))return{data:{index:O,overflows:k},reset:{placement:z}};let I=(W=k.filter(M=>M.overflows[0]<=0).sort((M,_)=>M.overflows[1]-_.overflows[1])[0])==null?void 0:W.placement;if(!I)switch(m){case"bestFit":{var L;const M=(L=k.filter(_=>{if(R){const j=ee(_.placement);return j===w||j==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(j=>j>0).reduce((j,Q)=>j+Q,0)]).sort((_,j)=>_[1]-j[1])[0])==null?void 0:L[0];M&&(I=M);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Fn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jn(e){return ws.some(t=>e[t]>=0)}const Is=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ie(e,t);switch(r){case"referenceHidden":{const s=await De(t,{...o,elementContext:"reference"}),i=Fn(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:jn(i)}}}case"escaped":{const s=await De(t,{...o,altBoundary:!0}),i=Fn(s,n.floating);return{data:{escapedOffsets:i,escaped:jn(i)}}}default:return{}}}}},Fr=new Set(["left","top"]);async function Ms(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=le(n),l=_e(n),c=ee(n)==="y",u=Fr.has(i)?-1:1,f=s&&c?-1:1,d=ie(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const Fs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await Ms(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},js=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...c}=ie(e,t),u={x:n,y:r},f=await De(t,c),d=ee(le(o)),p=en(d);let m=u[p],g=u[d];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=m+f[v],N=m-f[b];m=Wt(w,m,N)}if(i){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=g+f[v],N=g-f[b];g=Wt(w,g,N)}const h=l.fn({...t,[p]:m,[d]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:s,[d]:i}}}}}},Bs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ie(e,t),f={x:n,y:r},d=ee(o),p=en(d);let m=f[p],g=f[d];const h=ie(l,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const N=p==="y"?"height":"width",E=s.reference[p]-s.floating[N]+v.mainAxis,C=s.reference[p]+s.reference[N]-v.mainAxis;m<E?m=E:m>C&&(m=C)}if(u){var b,w;const N=p==="y"?"width":"height",E=Fr.has(le(o)),C=s.reference[d]-s.floating[N]+(E&&((b=i.offset)==null?void 0:b[d])||0)+(E?0:v.crossAxis),R=s.reference[d]+s.reference[N]+(E?0:((w=i.offset)==null?void 0:w[d])||0)-(E?v.crossAxis:0);g<C?g=C:g>R&&(g=R)}return{[p]:m,[d]:g}}}},$s=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=ie(e,t),f=await De(t,u),d=le(o),p=_e(o),m=ee(o)==="y",{width:g,height:h}=s.floating;let v,b;d==="top"||d==="bottom"?(v=d,b=p===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=d,v=p==="end"?"top":"bottom");const w=h-f.top-f.bottom,N=g-f.left-f.right,E=fe(h-f[v],w),C=fe(g-f[b],N),R=!t.middlewareData.shift;let S=E,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=w),R&&!p){const k=H(f.left,0),$=H(f.right,0),W=H(f.top,0),L=H(f.bottom,0);m?T=g-2*(k!==0||$!==0?k+$:H(f.left,f.right)):S=h-2*(W!==0||L!==0?W+L:H(f.top,f.bottom))}await c({...t,availableWidth:T,availableHeight:S});const P=await i.getDimensions(l.floating);return g!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function vt(){return typeof window<"u"}function Te(e){return jr(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function se(e){var t;return(t=(jr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jr(e){return vt()?e instanceof Node||e instanceof G(e).Node:!1}function K(e){return vt()?e instanceof Element||e instanceof G(e).Element:!1}function re(e){return vt()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function Bn(e){return!vt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const Ws=new Set(["inline","contents"]);function Ie(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ws.has(o)}const Us=new Set(["table","td","th"]);function Vs(e){return Us.has(Te(e))}const zs=[":popover-open",":modal"];function xt(e){return zs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hs=["transform","translate","scale","rotate","perspective"],Gs=["transform","translate","scale","rotate","perspective","filter"],qs=["paint","layout","strict","content"];function rn(e){const t=an(),n=K(e)?Y(e):e;return Hs.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Gs.some(r=>(n.willChange||"").includes(r))||qs.some(r=>(n.contain||"").includes(r))}function Xs(e){let t=me(e);for(;re(t)&&!Re(t);){if(rn(t))return t;if(xt(t))return null;t=me(t)}return null}function an(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ks=new Set(["html","body","#document"]);function Re(e){return Ks.has(Te(e))}function Y(e){return G(e).getComputedStyle(e)}function bt(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function me(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bn(e)&&e.host||se(e);return Bn(t)?t.host:t}function Br(e){const t=me(e);return Re(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Ie(t)?t:Br(t)}function Le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Br(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=G(o);if(s){const l=Vt(i);return t.concat(i,i.visualViewport||[],Ie(o)?o:[],l&&n?Le(l):[])}return t.concat(o,Le(o,[],n))}function Vt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $r(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=re(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=at(n)!==s||at(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function on(e){return K(e)?e:e.contextElement}function Ce(e){const t=on(e);if(!re(t))return te(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=$r(t);let i=(s?at(n.width):n.width)/r,l=(s?at(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ys=te(0);function Wr(e){const t=G(e);return!an()||!t.visualViewport?Ys:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function ve(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=on(e);let i=te(1);t&&(r?K(r)&&(i=Ce(r)):i=Ce(e));const l=Zs(s,n,r)?Wr(s):te(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const p=G(s),m=r&&K(r)?G(r):r;let g=p,h=Vt(g);for(;h&&r&&m!==g;){const v=Ce(h),b=h.getBoundingClientRect(),w=Y(h),N=b.left+(h.clientLeft+parseFloat(w.paddingLeft))*v.x,E=b.top+(h.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,d*=v.y,c+=N,u+=E,g=G(h),h=Vt(g)}}return st({width:f,height:d,x:c,y:u})}function yt(e,t){const n=bt(e).scrollLeft;return t?t.left+n:ve(se(e)).left+n}function Ur(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-yt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Qs(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=se(r),l=t?xt(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=te(1);const f=te(0),d=re(r);if((d||!d&&!s)&&((Te(r)!=="body"||Ie(i))&&(c=bt(r)),re(r))){const m=ve(r);u=Ce(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=i&&!d&&!s?Ur(i,c):te(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function Js(e){return Array.from(e.getClientRects())}function ei(e){const t=se(e),n=bt(e),r=e.ownerDocument.body,o=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+yt(e);const l=-n.scrollTop;return Y(r).direction==="rtl"&&(i+=H(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}const $n=25;function ti(e,t){const n=G(e),r=se(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const f=an();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=yt(r);if(u<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-m);g<=$n&&(s-=g)}else u<=$n&&(s+=u);return{width:s,height:i,x:l,y:c}}const ni=new Set(["absolute","fixed"]);function ri(e,t){const n=ve(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=re(e)?Ce(e):te(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function Wn(e,t,n){let r;if(t==="viewport")r=ti(e,n);else if(t==="document")r=ei(se(e));else if(K(t))r=ri(t,n);else{const o=Wr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return st(r)}function Vr(e,t){const n=me(e);return n===t||!K(n)||Re(n)?!1:Y(n).position==="fixed"||Vr(n,t)}function ai(e,t){const n=t.get(e);if(n)return n;let r=Le(e,[],!1).filter(l=>K(l)&&Te(l)!=="body"),o=null;const s=Y(e).position==="fixed";let i=s?me(e):e;for(;K(i)&&!Re(i);){const l=Y(i),c=rn(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&ni.has(o.position)||Ie(i)&&!c&&Vr(e,i))?r=r.filter(f=>f!==i):o=l,i=me(i)}return t.set(e,r),r}function oi(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?xt(t)?[]:ai(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,f)=>{const d=Wn(t,f,o);return u.top=H(d.top,u.top),u.right=fe(d.right,u.right),u.bottom=fe(d.bottom,u.bottom),u.left=H(d.left,u.left),u},Wn(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function si(e){const{width:t,height:n}=$r(e);return{width:t,height:n}}function ii(e,t,n){const r=re(t),o=se(t),s=n==="fixed",i=ve(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=te(0);function u(){c.x=yt(o)}if(r||!r&&!s)if((Te(t)!=="body"||Ie(o))&&(l=bt(t)),r){const m=ve(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?Ur(o,l):te(0),d=i.left+l.scrollLeft-c.x-f.x,p=i.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:i.width,height:i.height}}function At(e){return Y(e).position==="static"}function Un(e,t){if(!re(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return se(e)===n&&(n=n.ownerDocument.body),n}function zr(e,t){const n=G(e);if(xt(e))return n;if(!re(e)){let o=me(e);for(;o&&!Re(o);){if(K(o)&&!At(o))return o;o=me(o)}return n}let r=Un(e,t);for(;r&&Vs(r)&&At(r);)r=Un(r,t);return r&&Re(r)&&At(r)&&!rn(r)?n:r||Xs(e)||n}const li=async function(e){const t=this.getOffsetParent||zr,n=this.getDimensions,r=await n(e.floating);return{reference:ii(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ci(e){return Y(e).direction==="rtl"}const ui={convertOffsetParentRelativeRectToViewportRelativeRect:Qs,getDocumentElement:se,getClippingRect:oi,getOffsetParent:zr,getElementRects:li,getClientRects:Js,getDimensions:si,getScale:Ce,isElement:K,isRTL:ci};function Hr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function di(e,t){let n=null,r;const o=se(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=u;if(l||t(),!p||!m)return;const g=Ue(d),h=Ue(o.clientWidth-(f+p)),v=Ue(o.clientHeight-(d+m)),b=Ue(f),N={rootMargin:-g+"px "+-h+"px "+-v+"px "+-b+"px",threshold:H(0,fe(1,c))||1};let E=!0;function C(R){const S=R[0].intersectionRatio;if(S!==c){if(!E)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Hr(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(C,{...N,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,N)}n.observe(e)}return i(!0),s}function fi(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=on(e),f=o||s?[...u?Le(u):[],...Le(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=u&&l?di(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var N;(N=m)==null||N.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let g,h=c?ve(e):null;c&&v();function v(){const b=ve(e);h&&!Hr(h,b)&&n(),h=b,g=requestAnimationFrame(v)}return n(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d==null||d(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const mi=Fs,pi=js,hi=Ls,gi=$s,vi=Is,Vn=Ds,xi=Bs,bi=(e,t,n)=>{const r=new Map,o={platform:ui,...n},s={...o.platform,_c:r};return Ps(e,t,{...o,platform:s})};var yi=typeof document<"u",wi=function(){},Qe=yi?x.useLayoutEffect:wi;function it(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!it(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!it(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zn(e,t){const n=Gr(e);return Math.round(t*n)/n}function Rt(e){const t=a.useRef(e);return Qe(()=>{t.current=e}),t}function Ei(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=a.useState(r);it(p,r)||m(r);const[g,h]=a.useState(null),[v,b]=a.useState(null),w=a.useCallback(_=>{_!==R.current&&(R.current=_,h(_))},[]),N=a.useCallback(_=>{_!==S.current&&(S.current=_,b(_))},[]),E=s||g,C=i||v,R=a.useRef(null),S=a.useRef(null),T=a.useRef(f),P=c!=null,k=Rt(c),$=Rt(o),W=Rt(u),L=a.useCallback(()=>{if(!R.current||!S.current)return;const _={placement:t,strategy:n,middleware:p};$.current&&(_.platform=$.current),bi(R.current,S.current,_).then(j=>{const Q={...j,isPositioned:W.current!==!1};O.current&&!it(T.current,Q)&&(T.current=Q,xr.flushSync(()=>{d(Q)}))})},[p,t,n,$,W]);Qe(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[u]);const O=a.useRef(!1);Qe(()=>(O.current=!0,()=>{O.current=!1}),[]),Qe(()=>{if(E&&(R.current=E),C&&(S.current=C),E&&C){if(k.current)return k.current(E,C,L);L()}},[E,C,L,k,P]);const z=a.useMemo(()=>({reference:R,floating:S,setReference:w,setFloating:N}),[w,N]),I=a.useMemo(()=>({reference:E,floating:C}),[E,C]),M=a.useMemo(()=>{const _={position:n,left:0,top:0};if(!I.floating)return _;const j=zn(I.floating,f.x),Q=zn(I.floating,f.y);return l?{..._,transform:"translate("+j+"px, "+Q+"px)",...Gr(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:Q}},[n,l,I.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:L,refs:z,elements:I,floatingStyles:M}),[f,L,z,I,M])}const Si=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Vn({element:r.current,padding:o}).fn(n):{}:r?Vn({element:r,padding:o}).fn(n):{}}}},Ni=(e,t)=>({...mi(e),options:[e,t]}),Ci=(e,t)=>({...pi(e),options:[e,t]}),Ai=(e,t)=>({...xi(e),options:[e,t]}),Ri=(e,t)=>({...hi(e),options:[e,t]}),_i=(e,t)=>({...gi(e),options:[e,t]}),Ti=(e,t)=>({...vi(e),options:[e,t]}),ki=(e,t)=>({...Si(e),options:[e,t]});var Oi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=Oi.reduce((e,t)=>{const n=mt.createSlot(`Primitive.${t}`),r=a.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Pi(e,t){e&&xr.flushSync(()=>e.dispatchEvent(t))}var Di="Arrow",qr=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return A.jsx(B.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:A.jsx("polygon",{points:"0,0 30,0 15,10"})})});qr.displayName=Di;var Li=qr;function xe(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ii(e){const[t,n]=a.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var sn="Popper",[Xr,Kr]=gt(sn),[Mi,Yr]=Xr(sn),Zr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return A.jsx(Mi,{scope:t,anchor:r,onAnchorChange:o,children:n})};Zr.displayName=sn;var Qr="PopperAnchor",Jr=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Yr(Qr,n),i=a.useRef(null),l=oe(t,i),c=a.useRef(null);return a.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:A.jsx(B.div,{...o,ref:l})});Jr.displayName=Qr;var ln="PopperContent",[Fi,ji]=Xr(ln),ea=a.forwardRef((e,t)=>{var Nn,Cn,An,Rn,_n,Tn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...h}=e,v=Yr(ln,n),[b,w]=a.useState(null),N=oe(t,Oe=>w(Oe)),[E,C]=a.useState(null),R=Ii(E),S=(R==null?void 0:R.width)??0,T=(R==null?void 0:R.height)??0,P=r+(s!=="center"?"-"+s:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],W=$.length>0,L={padding:k,boundary:$.filter($i),altBoundary:W},{refs:O,floatingStyles:z,placement:I,isPositioned:M,middlewareData:_}=Ei({strategy:"fixed",placement:P,whileElementsMounted:(...Oe)=>fi(...Oe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[Ni({mainAxis:o+T,alignmentAxis:i}),c&&Ci({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Ai():void 0,...L}),c&&Ri({...L}),_i({...L,apply:({elements:Oe,rects:kn,availableWidth:Ro,availableHeight:_o})=>{const{width:To,height:ko}=kn.reference,We=Oe.floating.style;We.setProperty("--radix-popper-available-width",`${Ro}px`),We.setProperty("--radix-popper-available-height",`${_o}px`),We.setProperty("--radix-popper-anchor-width",`${To}px`),We.setProperty("--radix-popper-anchor-height",`${ko}px`)}}),E&&ki({element:E,padding:l}),Wi({arrowWidth:S,arrowHeight:T}),p&&Ti({strategy:"referenceHidden",...L})]}),[j,Q]=ra(I),$e=xe(g);X(()=>{M&&($e==null||$e())},[M,$e]);const Eo=(Nn=_.arrow)==null?void 0:Nn.x,So=(Cn=_.arrow)==null?void 0:Cn.y,No=((An=_.arrow)==null?void 0:An.centerOffset)!==0,[Co,Ao]=a.useState();return X(()=>{b&&Ao(window.getComputedStyle(b).zIndex)},[b]),A.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:M?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Co,"--radix-popper-transform-origin":[(Rn=_.transformOrigin)==null?void 0:Rn.x,(_n=_.transformOrigin)==null?void 0:_n.y].join(" "),...((Tn=_.hide)==null?void 0:Tn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:A.jsx(Fi,{scope:n,placedSide:j,onArrowChange:C,arrowX:Eo,arrowY:So,shouldHideArrow:No,children:A.jsx(B.div,{"data-side":j,"data-align":Q,...h,ref:N,style:{...h.style,animation:M?void 0:"none"}})})})});ea.displayName=ln;var ta="PopperArrow",Bi={top:"bottom",right:"left",bottom:"top",left:"right"},na=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ji(ta,r),i=Bi[s.placedSide];return A.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:A.jsx(Li,{...o,ref:n,style:{...o.style,display:"block"}})})});na.displayName=ta;function $i(e){return e!==null}var Wi=e=>({name:"transformOrigin",options:e,fn(t){var v,b,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=ra(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((b=o.arrow)==null?void 0:b.x)??0)+l/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let g="",h="";return u==="bottom"?(g=i?d:`${p}px`,h=`${-c}px`):u==="top"?(g=i?d:`${p}px`,h=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,h=i?d:`${m}px`):u==="left"&&(g=`${r.floating.width+c}px`,h=i?d:`${m}px`),{data:{x:g,y:h}}}});function ra(e){const[t,n="center"]=e.split("-");return[t,n]}var Ui=Zr,Vi=Jr,zi=ea,Hi=na,Gi="Portal",cn=a.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,s]=a.useState(!1);X(()=>s(!0),[]);const i=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?gr.createPortal(A.jsx(B.div,{...r,ref:t}),i):null});cn.displayName=Gi;function qi(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var ke=e=>{const{present:t,children:n}=e,r=Xi(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=oe(r.ref,Ki(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};ke.displayName="Presence";function Xi(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),s=a.useRef("none"),i=e?"mounted":"unmounted",[l,c]=qi(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=Ve(r.current);s.current=l==="mounted"?u:"none"},[l]),X(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,m=Ve(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),X(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const h=Ve(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(s.current=Ve(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:a.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ve(e){return(e==null?void 0:e.animationName)||"none"}function Ki(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yi(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Zi="DismissableLayer",zt="dismissableLayer.update",Qi="dismissableLayer.pointerDownOutside",Ji="dismissableLayer.focusOutside",Hn,aa=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),un=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=a.useContext(aa),[f,d]=a.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=a.useState({}),g=oe(t,S=>d(S)),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(v),w=f?h.indexOf(f):-1,N=u.layersWithOutsidePointerEventsDisabled.size>0,E=w>=b,C=nl(S=>{const T=S.target,P=[...u.branches].some(k=>k.contains(T));!E||P||(o==null||o(S),i==null||i(S),S.defaultPrevented||l==null||l())},p),R=rl(S=>{const T=S.target;[...u.branches].some(k=>k.contains(T))||(s==null||s(S),i==null||i(S),S.defaultPrevented||l==null||l())},p);return Yi(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},p),a.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Hn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Gn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Hn)}},[f,p,n,u]),a.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Gn())},[f,u]),a.useEffect(()=>{const S=()=>m({});return document.addEventListener(zt,S),()=>document.removeEventListener(zt,S)},[]),A.jsx(B.div,{...c,ref:g,style:{pointerEvents:N?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,R.onFocusCapture),onBlurCapture:F(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});un.displayName=Zi;var el="DismissableLayerBranch",tl=a.forwardRef((e,t)=>{const n=a.useContext(aa),r=a.useRef(null),o=oe(t,r);return a.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),A.jsx(B.div,{...e,ref:o})});tl.displayName=el;function nl(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){oa(Qi,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rl(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!r.current&&oa(Ji,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gn(){const e=new CustomEvent(zt);document.dispatchEvent(e)}function oa(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Pi(o,s):o.dispatchEvent(s)}var _t,wt="HoverCard",[sa,Tu]=gt(wt,[Kr]),Et=Kr(),[al,St]=sa(wt),ia=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:i=700,closeDelay:l=300}=e,c=Et(t),u=a.useRef(0),f=a.useRef(0),d=a.useRef(!1),p=a.useRef(!1),[m,g]=Ir({prop:r,defaultProp:o??!1,onChange:s,caller:wt}),h=a.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=a.useCallback(()=>{clearTimeout(u.current),!d.current&&!p.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),b=a.useCallback(()=>g(!1),[g]);return a.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),A.jsx(al,{scope:t,open:m,onOpenChange:g,onOpen:h,onClose:v,onDismiss:b,hasSelectionRef:d,isPointerDownOnContentRef:p,children:A.jsx(Ui,{...c,children:n})})};ia.displayName=wt;var la="HoverCardTrigger",ca=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=St(la,n),s=Et(n);return A.jsx(Vi,{asChild:!0,...s,children:A.jsx(B.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:F(e.onPointerEnter,ct(o.onOpen)),onPointerLeave:F(e.onPointerLeave,ct(o.onClose)),onFocus:F(e.onFocus,o.onOpen),onBlur:F(e.onBlur,o.onClose),onTouchStart:F(e.onTouchStart,i=>i.preventDefault())})})});ca.displayName=la;var dn="HoverCardPortal",[ol,sl]=sa(dn,{forceMount:void 0}),ua=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,s=St(dn,t);return A.jsx(ol,{scope:t,forceMount:n,children:A.jsx(ke,{present:n||s.open,children:A.jsx(cn,{asChild:!0,container:o,children:r})})})};ua.displayName=dn;var lt="HoverCardContent",da=a.forwardRef((e,t)=>{const n=sl(lt,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,s=St(lt,e.__scopeHoverCard);return A.jsx(ke,{present:r||s.open,children:A.jsx(il,{"data-state":s.open?"open":"closed",...o,onPointerEnter:F(e.onPointerEnter,ct(s.onOpen)),onPointerLeave:F(e.onPointerLeave,ct(s.onClose)),ref:t})})});da.displayName=lt;var il=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,...l}=e,c=St(lt,n),u=Et(n),f=a.useRef(null),d=oe(t,f),[p,m]=a.useState(!1);return a.useEffect(()=>{if(p){const g=document.body;return _t=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=_t,g.style.webkitUserSelect=_t}}},[p]),a.useEffect(()=>{if(f.current){const g=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var v;((v=document.getSelection())==null?void 0:v.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),a.useEffect(()=>{f.current&&ul(f.current).forEach(h=>h.setAttribute("tabindex","-1"))}),A.jsx(un,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:F(s,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:A.jsx(zi,{...u,...l,onPointerDown:F(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...l.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),ll="HoverCardArrow",cl=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Et(n);return A.jsx(Hi,{...o,...r,ref:t})});cl.displayName=ll;function ct(e){return t=>t.pointerType==="touch"?void 0:e()}function ul(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var dl=ia,fl=ca,ml=ua,qn=da;const Je=V.cva("text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) shadow-md outline-hidden transition-all",{variants:{variant:{container:"relative bg-background drop-shadow-lg",simple:"bg-muted",item:"bg-muted drop-shadow-lg"},gradientBorder:{none:"",white:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",green:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-[#73F36C]/60 before:via-transparent before:to-[#73F36C]/20 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",auto:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude] dark:before:from-white/40 dark:before:to-white/10 light:before:from-black/20 light:before:to-black/5"},padding:{none:"p-0",sm:"py-3.5 px-3.5",default:"py-4.5 px-4.5",md:"py-6.5 px-6",lg:"py-8.5 px-8"},rounded:{default:"rounded-turtle",infoCard:"rounded-info-card",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"container",padding:"default",rounded:"default",gradientBorder:"none"}});function fa({...e}){return a.createElement(dl,{"data-slot":"hover-card",...e})}function ma({...e}){return a.createElement(fl,{"data-slot":"hover-card-trigger",...e})}function pa({className:e,align:t="center",sideOffset:n=4,variant:r,padding:o,rounded:s,gradientBorder:i,...l}){const c=i??(r==="container"?"white":"none"),u=c!=="none",f=Je({gradientBorder:c}),d=y(Je({variant:r,padding:o,rounded:s,gradientBorder:"none",className:e})),p=Je({rounded:s});return a.createElement(ml,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0,"data-slot":"hover-card-portal"},u?a.createElement(qn,{"data-slot":"hover-card-content-wrapper",align:t,sideOffset:n,className:y(f,p,"p-[1px]"),...l},a.createElement("div",{"data-slot":"hover-card-content-inner",className:d})):a.createElement(qn,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:d,...l}))}var pl=a[" useId ".trim().toString()]||(()=>{}),hl=0;function Tt(e){const[t,n]=a.useState(pl());return X(()=>{n(r=>r??String(hl++))},[e]),e||(t?`radix-${t}`:"")}var kt="focusScope.autoFocusOnMount",Ot="focusScope.autoFocusOnUnmount",Xn={bubbles:!1,cancelable:!0},gl="FocusScope",ha=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=a.useState(null),u=xe(o),f=xe(s),d=a.useRef(null),p=oe(t,h=>c(h)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let h=function(N){if(m.paused||!l)return;const E=N.target;l.contains(E)?d.current=E:ce(d.current,{select:!0})},v=function(N){if(m.paused||!l)return;const E=N.relatedTarget;E!==null&&(l.contains(E)||ce(d.current,{select:!0}))},b=function(N){if(document.activeElement===document.body)for(const C of N)C.removedNodes.length>0&&ce(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),w.disconnect()}}},[r,l,m.paused]),a.useEffect(()=>{if(l){Yn.add(m);const h=document.activeElement;if(!l.contains(h)){const b=new CustomEvent(kt,Xn);l.addEventListener(kt,u),l.dispatchEvent(b),b.defaultPrevented||(vl(El(ga(l)),{select:!0}),document.activeElement===h&&ce(l))}return()=>{l.removeEventListener(kt,u),setTimeout(()=>{const b=new CustomEvent(Ot,Xn);l.addEventListener(Ot,f),l.dispatchEvent(b),b.defaultPrevented||ce(h??document.body,{select:!0}),l.removeEventListener(Ot,f),Yn.remove(m)},0)}}},[l,u,f,m]);const g=a.useCallback(h=>{if(!n&&!r||m.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(v&&b){const w=h.currentTarget,[N,E]=xl(w);N&&E?!h.shiftKey&&b===E?(h.preventDefault(),n&&ce(N,{select:!0})):h.shiftKey&&b===N&&(h.preventDefault(),n&&ce(E,{select:!0})):b===w&&h.preventDefault()}},[n,r,m.paused]);return A.jsx(B.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});ha.displayName=gl;function vl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ce(r,{select:t}),document.activeElement!==n)return}function xl(e){const t=ga(e),n=Kn(t,e),r=Kn(t.reverse(),e);return[n,r]}function ga(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!bl(n,{upTo:t}))return n}function bl(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yl(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yl(e)&&t&&e.select()}}var Yn=wl();function wl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zn(e,t),e.unshift(t)},remove(t){var n;e=Zn(e,t),(n=e[0])==null||n.resume()}}}function Zn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function El(e){return e.filter(t=>t.tagName!=="A")}var Pt=0;function Sl(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qn()),document.body.insertAdjacentElement("beforeend",e[1]??Qn()),Pt++,()=>{Pt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Pt--}},[])}function Qn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var J=function(){return J=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},J.apply(this,arguments)};function va(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Nl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var et="right-scroll-bar-position",tt="width-before-scroll-bar",Cl="with-scroll-bars-hidden",Al="--removed-body-scroll-bar-size";function Dt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rl(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var _l=typeof window<"u"?a.useLayoutEffect:a.useEffect,Jn=new WeakMap;function Tl(e,t){var n=Rl(null,function(r){return e.forEach(function(o){return Dt(o,r)})});return _l(function(){var r=Jn.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||Dt(l,null)}),s.forEach(function(l){o.has(l)||Dt(l,i)})}Jn.set(n,e)},[e]),n}function kl(e){return e}function Ol(e,t){t===void 0&&(t=kl);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Pl(e){e===void 0&&(e={});var t=Ol(null);return t.options=J({async:!0,ssr:!1},e),t}var xa=function(e){var t=e.sideCar,n=va(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,J({},n))};xa.isSideCarExport=!0;function Dl(e,t){return e.useMedium(t),xa}var ba=Pl(),Lt=function(){},Nt=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Lt,onWheelCapture:Lt,onTouchMoveCapture:Lt}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,h=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,N=e.gapMode,E=va(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=Tl([n,t]),S=J(J({},E),o);return a.createElement(a.Fragment,null,f&&a.createElement(C,{sideCar:ba,removeScrollBar:u,shards:d,noRelative:m,noIsolation:g,inert:h,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:N}),i?a.cloneElement(a.Children.only(l),J(J({},S),{ref:R})):a.createElement(w,J({},S,{className:c,ref:R}),l))});Nt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nt.classNames={fullWidth:tt,zeroRight:et};var Ll=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Il(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ll();return t&&e.setAttribute("nonce",t),e}function Ml(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Il())&&(Ml(t,n),Fl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bl=function(){var e=jl();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ya=function(){var e=Bl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},$l={left:0,top:0,right:0,gap:0},It=function(e){return parseInt(e||"",10)||0},Wl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[It(n),It(r),It(o)]},Ul=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $l;var t=Wl(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vl=ya(),Ae="data-scroll-locked",zl=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),E=require("react"),ws=require("react-dom");function _f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=_f(E),Cs=_f(ws);var Jb=(e,t,n,r,o,s,i,l)=>{let c=document.documentElement,u=["light","dark"];function f(h){(Array.isArray(e)?e:[e]).forEach(v=>{let g=v==="class",b=g&&s?o.map(x=>s[x]||x):o;g?(c.classList.remove(...b),c.classList.add(s&&s[h]?s[h]:h)):c.setAttribute(v,h)}),d(h)}function d(h){l&&u.includes(h)&&(c.style.colorScheme=h)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let h=localStorage.getItem(t)||n,v=i&&h==="system"?m():h;f(v)}catch{}},ey=p.createContext(void 0),ty={setTheme:e=>{},themes:[]},ny=()=>{var e;return(e=p.useContext(ey))!=null?e:ty};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:l,nonce:c,scriptProps:u})=>{let f=JSON.stringify([n,t,s,e,l,i,r,o]).slice(1,-1);return p.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Jb.toString()})(${f})`}})});function ry(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const oy=e=>{switch(e){case"success":return ay;case"info":return cy;case"warning":return ly;case"error":return uy;default:return null}},sy=Array(12).fill(0),iy=({visible:e,className:t})=>E.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},E.createElement("div",{className:"sonner-spinner"},sy.map((n,r)=>E.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ay=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ly=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cy=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uy=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},E.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dy=E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},E.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),E.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fy=()=>{const[e,t]=E.useState(document.hidden);return E.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ea=1;class py{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ea++,i=this.toasts.find(c=>c.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:l,title:r}):c):this.addToast({title:r,...o,dismissible:l,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,i;const l=o.then(async u=>{if(i=["resolve",u],E.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(hy(u)&&!u.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,v=typeof d=="object"&&!E.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...v})}else if(u instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,m=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!E.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...v})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(u):n.success,m=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!E.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:m,...v})}}).catch(async u=>{if(i=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof f=="object"&&!E.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,f)=>l.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||ea++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ze=new py,my=(e,t)=>{const n=t?.id||ea++;return ze.addToast({title:e,...t,id:n}),n},hy=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gy=my,vy=()=>ze.toasts,xy=()=>ze.getActiveToasts();Object.assign(gy,{success:ze.success,info:ze.info,warning:ze.warning,error:ze.error,custom:ze.custom,message:ze.message,promise:ze.promise,dismiss:ze.dismiss,loading:ze.loading},{getHistory:vy,getToasts:xy});ry("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function yo(e){return e.label!==void 0}const by=3,yy="24px",wy="16px",cu=4e3,Cy=356,Sy=14,Ry=45,jy=200;function ht(...e){return e.filter(Boolean).join(" ")}function Ey(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Ty=e=>{var t,n,r,o,s,i,l,c,u;const{invert:f,toast:d,unstyled:m,interacting:h,setHeights:v,visibleToasts:g,heights:b,index:x,toasts:y,expanded:w,removeToast:C,defaultRichColors:R,closeButton:P,style:T,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:z="",duration:q,position:Y,gap:G,expandByDefault:Z,classNames:$,icons:V,closeButtonAriaLabel:_="Close toast"}=e,[O,te]=E.useState(null),[fe,k]=E.useState(null),[A,F]=E.useState(!1),[B,X]=E.useState(!1),[N,U]=E.useState(!1),[ne,ie]=E.useState(!1),[ce,ae]=E.useState(!1),[ge,Pe]=E.useState(0),[J,ue]=E.useState(0),me=E.useRef(d.duration||q||cu),Ge=E.useRef(null),Ue=E.useRef(null),li=x===0,kn=x+1<=g,Ne=d.type,Dt=d.dismissible!==!1,ci=d.className||"",ui=d.descriptionClassName||"",yr=E.useMemo(()=>b.findIndex(le=>le.toastId===d.id)||0,[b,d.id]),wr=E.useMemo(()=>{var le;return(le=d.closeButton)!=null?le:P},[d.closeButton,P]),L=E.useMemo(()=>d.duration||q||cu,[d.duration,q]),Q=E.useRef(0),pe=E.useRef(0),Re=E.useRef(0),he=E.useRef(null),[ln,di]=Y.split("-"),vo=E.useMemo(()=>b.reduce((le,ke,Oe)=>Oe>=yr?le:le+ke.height,0),[b,yr]),su=fy(),Xb=d.invert||f,fi=Ne==="loading";pe.current=E.useMemo(()=>yr*G+vo,[yr,vo]),E.useEffect(()=>{me.current=L},[L]),E.useEffect(()=>{F(!0)},[]),E.useEffect(()=>{const le=Ue.current;if(le){const ke=le.getBoundingClientRect().height;return ue(ke),v(Oe=>[{toastId:d.id,height:ke,position:d.position},...Oe]),()=>v(Oe=>Oe.filter(We=>We.toastId!==d.id))}},[v,d.id]),E.useLayoutEffect(()=>{if(!A)return;const le=Ue.current,ke=le.style.height;le.style.height="auto";const Oe=le.getBoundingClientRect().height;le.style.height=ke,ue(Oe),v(We=>We.find(De=>De.toastId===d.id)?We.map(De=>De.toastId===d.id?{...De,height:Oe}:De):[{toastId:d.id,height:Oe,position:d.position},...We])},[A,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const Lt=E.useCallback(()=>{X(!0),Pe(pe.current),v(le=>le.filter(ke=>ke.toastId!==d.id)),setTimeout(()=>{C(d)},jy)},[d,C,v,pe]);E.useEffect(()=>{if(d.promise&&Ne==="loading"||d.duration===1/0||d.type==="loading")return;let le;return w||h||su?(()=>{if(Re.current<Q.current){const We=new Date().getTime()-Q.current;me.current=me.current-We}Re.current=new Date().getTime()})():(()=>{me.current!==1/0&&(Q.current=new Date().getTime(),le=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Lt()},me.current))})(),()=>clearTimeout(le)},[w,h,d,Ne,su,Lt]),E.useEffect(()=>{d.delete&&(Lt(),d.onDismiss==null||d.onDismiss.call(d,d))},[Lt,d.delete]);function Zb(){var le;if(V?.loading){var ke;return E.createElement("div",{className:ht($?.loader,d==null||(ke=d.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":Ne==="loading"},V.loading)}return E.createElement(iy,{className:ht($?.loader,d==null||(le=d.classNames)==null?void 0:le.loader),visible:Ne==="loading"})}const Qb=d.icon||V?.[Ne]||oy(Ne);var iu,au;return E.createElement("li",{tabIndex:0,ref:Ue,className:ht(D,ci,$?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,$?.default,$?.[Ne],d==null||(n=d.classNames)==null?void 0:n[Ne]),"data-sonner-toast":"","data-rich-colors":(iu=d.richColors)!=null?iu:R,"data-styled":!(d.jsx||d.unstyled||m),"data-mounted":A,"data-promise":!!d.promise,"data-swiped":ce,"data-removed":B,"data-visible":kn,"data-y-position":ln,"data-x-position":di,"data-index":x,"data-front":li,"data-swiping":N,"data-dismissible":Dt,"data-type":Ne,"data-invert":Xb,"data-swipe-out":ne,"data-swipe-direction":fe,"data-expanded":!!(w||Z&&A),"data-testid":d.testId,style:{"--index":x,"--toasts-before":x,"--z-index":y.length-x,"--offset":`${B?ge:pe.current}px`,"--initial-height":Z?"auto":`${J}px`,...T,...d.style},onDragEnd:()=>{U(!1),te(null),he.current=null},onPointerDown:le=>{le.button!==2&&(fi||!Dt||(Ge.current=new Date,Pe(pe.current),le.target.setPointerCapture(le.pointerId),le.target.tagName!=="BUTTON"&&(U(!0),he.current={x:le.clientX,y:le.clientY})))},onPointerUp:()=>{var le,ke,Oe;if(ne||!Dt)return;he.current=null;const We=Number(((le=Ue.current)==null?void 0:le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xo=Number(((ke=Ue.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),De=new Date().getTime()-((Oe=Ge.current)==null?void 0:Oe.getTime()),Xe=O==="x"?We:xo,bo=Math.abs(Xe)/De;if(Math.abs(Xe)>=Ry||bo>.11){Pe(pe.current),d.onDismiss==null||d.onDismiss.call(d,d),k(O==="x"?We>0?"right":"left":xo>0?"down":"up"),Lt(),ie(!0);return}else{var st,it;(st=Ue.current)==null||st.style.setProperty("--swipe-amount-x","0px"),(it=Ue.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ae(!1),U(!1),te(null)},onPointerMove:le=>{var ke,Oe,We;if(!he.current||!Dt||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;const De=le.clientY-he.current.y,Xe=le.clientX-he.current.x;var bo;const st=(bo=e.swipeDirections)!=null?bo:Ey(Y);!O&&(Math.abs(Xe)>1||Math.abs(De)>1)&&te(Math.abs(Xe)>Math.abs(De)?"x":"y");let it={x:0,y:0};const lu=cn=>1/(1.5+Math.abs(cn)/20);if(O==="y"){if(st.includes("top")||st.includes("bottom"))if(st.includes("top")&&De<0||st.includes("bottom")&&De>0)it.y=De;else{const cn=De*lu(De);it.y=Math.abs(cn)<Math.abs(De)?cn:De}}else if(O==="x"&&(st.includes("left")||st.includes("right")))if(st.includes("left")&&Xe<0||st.includes("right")&&Xe>0)it.x=Xe;else{const cn=Xe*lu(Xe);it.x=Math.abs(cn)<Math.abs(Xe)?cn:Xe}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ae(!0),(Oe=Ue.current)==null||Oe.style.setProperty("--swipe-amount-x",`${it.x}px`),(We=Ue.current)==null||We.style.setProperty("--swipe-amount-y",`${it.y}px`)}},wr&&!d.jsx&&Ne!=="loading"?E.createElement("button",{"aria-label":_,"data-disabled":fi,"data-close-button":!0,onClick:fi||!Dt?()=>{}:()=>{Lt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:ht($?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(au=V?.close)!=null?au:dy):null,(Ne||d.icon||d.promise)&&d.icon!==null&&(V?.[Ne]!==null||d.icon)?E.createElement("div",{"data-icon":"",className:ht($?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Zb():null,d.type!=="loading"?Qb:null):null,E.createElement("div",{"data-content":"",className:ht($?.content,d==null||(s=d.classNames)==null?void 0:s.content)},E.createElement("div",{"data-title":"",className:ht($?.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?E.createElement("div",{"data-description":"",className:ht(z,ui,$?.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),E.isValidElement(d.cancel)?d.cancel:d.cancel&&yo(d.cancel)?E.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||j,onClick:le=>{yo(d.cancel)&&Dt&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,le),Lt())},className:ht($?.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,E.isValidElement(d.action)?d.action:d.action&&yo(d.action)?E.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||M,onClick:le=>{yo(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,le),!le.defaultPrevented&&Lt())},className:ht($?.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function uu(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Py(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",l=s?wy:yy;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=l:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}const _y=E.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:f,mobileOffset:d,theme:m="light",richColors:h,duration:v,style:g,visibleToasts:b=by,toastOptions:x,dir:y=uu(),gap:w=Sy,icons:C,containerAriaLabel:R="Notifications"}=t,[P,T]=E.useState([]),j=E.useMemo(()=>r?P.filter(A=>A.toasterId===r):P.filter(A=>!A.toasterId),[P,r]),M=E.useMemo(()=>Array.from(new Set([s].concat(j.filter(A=>A.position).map(A=>A.position)))),[j,s]),[D,z]=E.useState([]),[q,Y]=E.useState(!1),[G,Z]=E.useState(!1),[$,V]=E.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=E.useRef(null),O=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),te=E.useRef(null),fe=E.useRef(!1),k=E.useCallback(A=>{T(F=>{var B;return(B=F.find(X=>X.id===A.id))!=null&&B.delete||ze.dismiss(A.id),F.filter(({id:X})=>X!==A.id)})},[]);return E.useEffect(()=>ze.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{T(F=>F.map(B=>B.id===A.id?{...B,delete:!0}:B))});return}setTimeout(()=>{ws.flushSync(()=>{T(F=>{const B=F.findIndex(X=>X.id===A.id);return B!==-1?[...F.slice(0,B),{...F[B],...A},...F.slice(B+1)]:[A,...F]})})})}),[P]),E.useEffect(()=>{if(m!=="system"){V(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:F})=>{V(F?"dark":"light")})}catch{A.addListener(({matches:B})=>{try{V(B?"dark":"light")}catch(X){console.error(X)}})}},[m]),E.useEffect(()=>{P.length<=1&&Y(!1)},[P]),E.useEffect(()=>{const A=F=>{var B;if(i.every(U=>F[U]||F.code===U)){var N;Y(!0),(N=_.current)==null||N.focus()}F.code==="Escape"&&(document.activeElement===_.current||(B=_.current)!=null&&B.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[i]),E.useEffect(()=>{if(_.current)return()=>{te.current&&(te.current.focus({preventScroll:!0}),te.current=null,fe.current=!1)}},[_.current]),E.createElement("section",{ref:n,"aria-label":`${R} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((A,F)=>{var B;const[X,N]=A.split("-");return j.length?E.createElement("ol",{key:A,dir:y==="auto"?uu():y,tabIndex:-1,ref:_,className:u,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":X,"data-x-position":N,style:{"--front-toast-height":`${((B=D[0])==null?void 0:B.height)||0}px`,"--width":`${Cy}px`,"--gap":`${w}px`,...g,...Py(f,d)},onBlur:U=>{fe.current&&!U.currentTarget.contains(U.relatedTarget)&&(fe.current=!1,te.current&&(te.current.focus({preventScroll:!0}),te.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||fe.current||(fe.current=!0,te.current=U.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{G||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},j.filter(U=>!U.position&&F===0||U.position===A).map((U,ne)=>{var ie,ce;return E.createElement(Ty,{key:U.id,icons:C,index:ne,toast:U,defaultRichColors:h,duration:(ie=x?.duration)!=null?ie:v,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:o,visibleToasts:b,closeButton:(ce=x?.closeButton)!=null?ce:c,interacting:G,position:A,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:k,toasts:j.filter(ae=>ae.position==U.position),heights:D.filter(ae=>ae.position==U.position),setHeights:z,expandByDefault:l,gap:w,expanded:q,swipeDirections:t.swipeDirections})})):null}))}),My=({...e})=>{const{theme:t="system"}=ny();return a.jsx(_y,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function du(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1;const r=e.map(o=>{const s=du(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():du(e[o],null)}}}}function ee(...e){return p.useCallback(yt(...e),e)}function Ay(e,t){const n=p.createContext(t),r=s=>{const{children:i,...l}=s,c=p.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=p.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Me(e,t=[]){let n=[];function r(s,i){const l=p.createContext(i),c=n.length;n=[...n,i];const u=d=>{const{scope:m,children:h,...v}=d,g=m?.[e]?.[c]||l,b=p.useMemo(()=>v,Object.values(v));return a.jsx(g.Provider,{value:b,children:h})};u.displayName=s+"Provider";function f(d,m){const h=m?.[e]?.[c]||l,v=p.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(i=>p.createContext(i));return function(l){const c=l?.[e]||s;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,Ny(o,...t)]}function Ny(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var be=globalThis?.document?p.useLayoutEffect:()=>{},ky=p[" useInsertionEffect ".trim().toString()]||be;function Ie({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Iy({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const u=p.useCallback(f=>{if(l){const d=Dy(f)?f(e):f;d!==e&&i.current?.(d)}else s(f)},[l,e,s,i]);return[c,u]}function Iy({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return ky(()=>{s.current=t},[t]),p.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Dy(e){return typeof e=="function"}function Kr(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Ss(e){const[t,n]=p.useState(void 0);return be(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;n({width:i,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function Gt(e){const t=Ly(e),n=p.forwardRef((r,o)=>{const{children:s,...i}=r,l=p.Children.toArray(s),c=l.find(Oy);if(c){const u=c.props.children,f=l.map(d=>d===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:d);return a.jsx(t,{...i,ref:o,children:p.isValidElement(u)?p.cloneElement(u,void 0,f):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Tn=Gt("Slot");function Ly(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const i=$y(o),l=Fy(s,o.props);return o.type!==p.Fragment&&(l.ref=r?yt(r,i):i),p.cloneElement(o,l)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mf=Symbol("radix.slottable");function Af(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mf,t}function Oy(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mf}function Fy(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{const c=s(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function $y(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Vy.reduce((e,t)=>{const n=Gt(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:i,...l}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xo(e,t){e&&Cs.flushSync(()=>e.dispatchEvent(t))}var Rs="Switch",[By]=Me(Rs),[zy,Hy]=By(Rs),Nf=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[m,h]=p.useState(null),v=ee(t,w=>h(w)),g=p.useRef(!1),b=m?f||!!m.closest("form"):!0,[x,y]=Ie({prop:o,defaultProp:s??!1,onChange:u,caller:Rs});return a.jsxs(zy,{scope:n,checked:x,disabled:l,children:[a.jsx(H.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":Lf(x),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:v,onClick:I(e.onClick,w=>{y(C=>!C),b&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),b&&a.jsx(Df,{control:m,bubbles:!g.current,name:r,value:c,checked:x,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Nf.displayName=Rs;var kf="SwitchThumb",If=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Hy(kf,n);return a.jsx(H.span,{"data-state":Lf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});If.displayName=kf;var Gy="SwitchBubbleInput",Df=p.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=p.useRef(null),l=ee(i,s),c=Kr(n),u=Ss(t);return p.useEffect(()=>{const f=i.current;if(!f)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const v=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(v)}},[c,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Df.displayName=Gy;function Lf(e){return e?"checked":"unchecked"}var Uy=Nf,Wy=If;function Of(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Of(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ff(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Of(e))&&(r&&(r+=" "),r+=t);return r}const cl="-",Ky=e=>{const t=Yy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const l=i.split(cl);return l[0]===""&&l.length!==1&&l.shift(),$f(l,t)||qy(i)},getConflictingClassGroupIds:(i,l)=>{const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}}},$f=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$f(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(cl);return t.validators.find(({validator:i})=>i(s))?.classGroupId},fu=/^\[(.+)\]$/,qy=e=>{if(fu.test(e)){const t=fu.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Yy=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)ta(n[o],r,o,t);return r},ta=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:pu(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xy(o)){ta(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{ta(i,pu(t,s),n,r)})})},pu=(e,t)=>{let n=e;return t.split(cl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Xy=e=>e.isThemeGetter,Zy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},na="!",ra=":",Qy=ra.length,Jy=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,l=0,c=0,u;for(let v=0;v<o.length;v++){let g=o[v];if(i===0&&l===0){if(g===ra){s.push(o.slice(c,v)),c=v+Qy;continue}if(g==="/"){u=v;continue}}g==="["?i++:g==="]"?i--:g==="("?l++:g===")"&&l--}const f=s.length===0?o:o.substring(c),d=e1(f),m=d!==f,h=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:h}};if(t){const o=t+ra,s=r;r=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},e1=e=>e.endsWith(na)?e.substring(0,e.length-1):e.startsWith(na)?e.substring(1):e,t1=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},n1=e=>({cache:Zy(e.cacheSize),parseClassName:Jy(e),sortModifiers:t1(e),...Ky(e)}),r1=/\s+/,o1=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],l=e.trim().split(r1);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:m,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}=n(f);if(d){c=f+(c.length>0?" "+c:c);continue}let b=!!g,x=r(b?v.substring(0,g):v);if(!x){if(!b){c=f+(c.length>0?" "+c:c);continue}if(x=r(v),!x){c=f+(c.length>0?" "+c:c);continue}b=!1}const y=s(m).join(":"),w=h?y+na:y,C=w+x;if(i.includes(C))continue;i.push(C);const R=o(x,b);for(let P=0;P<R.length;++P){const T=R[P];i.push(w+T)}c=f+(c.length>0?" "+c:c)}return c};function s1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Vf(t))&&(r&&(r+=" "),r+=n);return r}const Vf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Vf(e[r]))&&(n&&(n+=" "),n+=t);return n};function i1(e,...t){let n,r,o,s=i;function i(c){const u=t.reduce((f,d)=>d(f),e());return n=n1(u),r=n.cache.get,o=n.cache.set,s=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=o1(c,n);return o(c,f),f}return function(){return s(s1.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Bf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,a1=/^\d+\/\d+$/,l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>a1.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>!!e&&Number.isInteger(Number(e)),pi=e=>e.endsWith("%")&&de(e.slice(0,-1)),Et=e=>l1.test(e),p1=()=>!0,m1=e=>c1.test(e)&&!u1.test(e),Hf=()=>!1,h1=e=>d1.test(e),g1=e=>f1.test(e),v1=e=>!W(e)&&!K(e),x1=e=>sr(e,Wf,Hf),W=e=>Bf.test(e),un=e=>sr(e,Kf,m1),mi=e=>sr(e,S1,de),mu=e=>sr(e,Gf,Hf),b1=e=>sr(e,Uf,g1),wo=e=>sr(e,qf,h1),K=e=>zf.test(e),Cr=e=>ir(e,Kf),y1=e=>ir(e,R1),hu=e=>ir(e,Gf),w1=e=>ir(e,Wf),C1=e=>ir(e,Uf),Co=e=>ir(e,qf,!0),sr=(e,t,n)=>{const r=Bf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ir=(e,t,n=!1)=>{const r=zf.exec(e);return r?r[1]?t(r[1]):n:!1},Gf=e=>e==="position"||e==="percentage",Uf=e=>e==="image"||e==="url",Wf=e=>e==="length"||e==="size"||e==="bg-size",Kf=e=>e==="length",S1=e=>e==="number",R1=e=>e==="family-name",qf=e=>e==="shadow",j1=()=>{const e=_e("color"),t=_e("font"),n=_e("text"),r=_e("font-weight"),o=_e("tracking"),s=_e("leading"),i=_e("breakpoint"),l=_e("container"),c=_e("spacing"),u=_e("radius"),f=_e("shadow"),d=_e("inset-shadow"),m=_e("text-shadow"),h=_e("drop-shadow"),v=_e("blur"),g=_e("perspective"),b=_e("aspect"),x=_e("ease"),y=_e("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...C(),K,W],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[K,W,c],M=()=>[In,"full","auto",...j()],D=()=>[Ot,"none","subgrid",K,W],z=()=>["auto",{span:["full",Ot,K,W]},Ot,K,W],q=()=>[Ot,"auto",K,W],Y=()=>["auto","min","max","fr",K,W],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...j()],V=()=>[In,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],_=()=>[e,K,W],O=()=>[...C(),hu,mu,{position:[K,W]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",w1,x1,{size:[K,W]}],k=()=>[pi,Cr,un],A=()=>["","none","full",u,K,W],F=()=>["",de,Cr,un],B=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>[de,pi,hu,mu],U=()=>["","none",v,K,W],ne=()=>["none",de,K,W],ie=()=>["none",de,K,W],ce=()=>[de,K,W],ae=()=>[In,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Et],breakpoint:[Et],color:[p1],container:[Et],"drop-shadow":[Et],ease:["in","out","in-out"],font:[v1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Et],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Et],shadow:[Et],spacing:["px",de],text:[Et],"text-shadow":[Et],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",In,W,K,b]}],container:["container"],columns:[{columns:[de,W,K,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ot,"auto",K,W]}],basis:[{basis:[In,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,In,"auto","initial","none",W]}],grow:[{grow:["",de,K,W]}],shrink:[{shrink:["",de,K,W]}],order:[{order:[Ot,"first","last","none",K,W]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[l,"screen",...V()]}],"min-w":[{"min-w":[l,"screen","none",...V()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,Cr,un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,K,mi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pi,W]}],"font-family":[{font:[y1,W,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,K,W]}],"line-clamp":[{"line-clamp":[de,"none",K,mi]}],leading:[{leading:[s,...j()]}],"list-image":[{"list-image":["none",K,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",K,un]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[de,"auto",K,W]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,W]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ot,K,W],radial:["",K,W],conic:[Ot,K,W]},C1,b1]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:k()}],"gradient-via-pos":[{via:k()}],"gradient-to-pos":[{to:k()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,K,W]}],"outline-w":[{outline:["",de,Cr,un]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",f,Co,wo]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",d,Co,wo]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[de,un]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",m,Co,wo]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[de,K,W]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":N()}],"mask-image-linear-to-pos":[{"mask-linear-to":N()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":N()}],"mask-image-t-to-pos":[{"mask-t-to":N()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":N()}],"mask-image-r-to-pos":[{"mask-r-to":N()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":N()}],"mask-image-b-to-pos":[{"mask-b-to":N()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":N()}],"mask-image-l-to-pos":[{"mask-l-to":N()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":N()}],"mask-image-x-to-pos":[{"mask-x-to":N()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":N()}],"mask-image-y-to-pos":[{"mask-y-to":N()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[K,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":N()}],"mask-image-radial-to-pos":[{"mask-radial-to":N()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":N()}],"mask-image-conic-to-pos":[{"mask-conic-to":N()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,W]}],filter:[{filter:["","none",K,W]}],blur:[{blur:U()}],brightness:[{brightness:[de,K,W]}],contrast:[{contrast:[de,K,W]}],"drop-shadow":[{"drop-shadow":["","none",h,Co,wo]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",de,K,W]}],"hue-rotate":[{"hue-rotate":[de,K,W]}],invert:[{invert:["",de,K,W]}],saturate:[{saturate:[de,K,W]}],sepia:[{sepia:["",de,K,W]}],"backdrop-filter":[{"backdrop-filter":["","none",K,W]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[de,K,W]}],"backdrop-contrast":[{"backdrop-contrast":[de,K,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,K,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,K,W]}],"backdrop-invert":[{"backdrop-invert":["",de,K,W]}],"backdrop-opacity":[{"backdrop-opacity":[de,K,W]}],"backdrop-saturate":[{"backdrop-saturate":[de,K,W]}],"backdrop-sepia":[{"backdrop-sepia":["",de,K,W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",K,W]}],ease:[{ease:["linear","initial",x,K,W]}],delay:[{delay:[de,K,W]}],animate:[{animate:["none",y,K,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,K,W]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[K,W,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,W]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,W]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[de,Cr,un,mi]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},E1=i1(j1);function S(...e){return E1(Ff(e))}function T1({className:e,...t}){return a.jsx(Uy,{"data-slot":"switch",className:S("peer group data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 border-border inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(Wy,{"data-slot":"switch-thumb",className:S("bg-muted-foreground dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function ar(e){const t=e+"CollectionProvider",[n,r]=Me(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:b,children:x}=g,y=E.useRef(null),w=E.useRef(new Map).current;return a.jsx(o,{scope:b,itemMap:w,collectionRef:y,children:x})};i.displayName=t;const l=e+"CollectionSlot",c=Gt(l),u=E.forwardRef((g,b)=>{const{scope:x,children:y}=g,w=s(l,x),C=ee(b,w.collectionRef);return a.jsx(c,{ref:C,children:y})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",m=Gt(f),h=E.forwardRef((g,b)=>{const{scope:x,children:y,...w}=g,C=E.useRef(null),R=ee(b,C),P=s(f,x);return E.useEffect(()=>(P.itemMap.set(C,{ref:C,...w}),()=>void P.itemMap.delete(C))),a.jsx(m,{[d]:"",ref:R,children:y})});h.displayName=f;function v(g){const b=s(e+"CollectionConsumer",g);return E.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((P,T)=>w.indexOf(P.ref.current)-w.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},v,r]}var P1=p[" useId ".trim().toString()]||(()=>{}),_1=0;function Se(e){const[t,n]=p.useState(P1());return be(()=>{n(r=>r??String(_1++))},[e]),e||(t?`radix-${t}`:"")}function ve(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}var M1=p.createContext(void 0);function Pn(e){const t=p.useContext(M1);return e||t||"ltr"}var hi="rovingFocusGroup.onEntryFocus",A1={bubbles:!1,cancelable:!0},qr="RovingFocusGroup",[oa,Yf,N1]=ar(qr),[k1,js]=Me(qr,[N1]),[I1,D1]=k1(qr),Xf=p.forwardRef((e,t)=>a.jsx(oa.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(oa.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(L1,{...e,ref:t})})}));Xf.displayName=qr;var L1=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,m=p.useRef(null),h=ee(t,m),v=Pn(s),[g,b]=Ie({prop:i,defaultProp:l??null,onChange:c,caller:qr}),[x,y]=p.useState(!1),w=ve(u),C=Yf(n),R=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(hi,w),()=>j.removeEventListener(hi,w)},[w]),a.jsx(I1,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:p.useCallback(j=>b(j),[b]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>T(j=>j-1),[]),children:a.jsx(H.div,{tabIndex:x||P===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{R.current=!0}),onFocus:I(e.onFocus,j=>{const M=!R.current;if(j.target===j.currentTarget&&M&&!x){const D=new CustomEvent(hi,A1);if(j.currentTarget.dispatchEvent(D),!D.defaultPrevented){const z=C().filter($=>$.focusable),q=z.find($=>$.active),Y=z.find($=>$.id===g),Z=[q,Y,...z].filter(Boolean).map($=>$.ref.current);Jf(Z,f)}}R.current=!1}),onBlur:I(e.onBlur,()=>y(!1))})})}),Zf="RovingFocusGroupItem",Qf=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...l}=e,c=Se(),u=s||c,f=D1(Zf,n),d=f.currentTabStopId===u,m=Yf(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:g}=f;return p.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),a.jsx(oa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:a.jsx(H.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:I(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=$1(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=m().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(b.currentTarget);w=f.loop?V1(w,C+1):w.slice(C+1)}setTimeout(()=>Jf(w))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:g!=null}):i})})});Qf.displayName=Zf;var O1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function F1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $1(e,t,n){const r=F1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return O1[r]}function Jf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function V1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ep=Xf,tp=Qf,np="Toggle",ul=p.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[i,l]=Ie({prop:n,onChange:o,defaultProp:r??!1,caller:np});return a.jsx(H.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:I(e.onClick,()=>{e.disabled||l(!i)})})});ul.displayName=np;var B1=ul,en="ToggleGroup",[rp]=Me(en,[js]),op=js(),dl=E.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return a.jsx(z1,{...o,ref:t})}if(n==="multiple"){const o=r;return a.jsx(H1,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${en}\``)});dl.displayName=en;var[sp,ip]=rp(en),z1=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,l]=Ie({prop:n,defaultProp:r??"",onChange:o,caller:en});return a.jsx(sp,{scope:e.__scopeToggleGroup,type:"single",value:E.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:E.useCallback(()=>l(""),[l]),children:a.jsx(ap,{...s,ref:t})})}),H1=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,l]=Ie({prop:n,defaultProp:r??[],onChange:o,caller:en}),c=E.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=E.useCallback(f=>l((d=[])=>d.filter(m=>m!==f)),[l]);return a.jsx(sp,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:a.jsx(ap,{...s,ref:t})})});dl.displayName=en;var[G1,U1]=rp(en),ap=E.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:i,loop:l=!0,...c}=e,u=op(n),f=Pn(i),d={role:"group",dir:f,...c};return a.jsx(G1,{scope:n,rovingFocus:o,disabled:r,children:o?a.jsx(ep,{asChild:!0,...u,orientation:s,dir:f,loop:l,children:a.jsx(H.div,{...d,ref:t})}):a.jsx(H.div,{...d,ref:t})})}),Zo="ToggleGroupItem",lp=E.forwardRef((e,t)=>{const n=ip(Zo,e.__scopeToggleGroup),r=U1(Zo,e.__scopeToggleGroup),o=op(e.__scopeToggleGroup),s=n.value.includes(e.value),i=r.disabled||e.disabled,l={...e,pressed:s,disabled:i},c=E.useRef(null);return r.rovingFocus?a.jsx(tp,{asChild:!0,...o,focusable:!i,active:s,ref:c,children:a.jsx(gu,{...l,ref:t})}):a.jsx(gu,{...l,ref:t})});lp.displayName=Zo;var gu=E.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=ip(Zo,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return a.jsx(ul,{...l,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(r):s.onItemDeactivate(r)}})}),W1=dl,K1=lp;const vu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xu=Ff,Ee=(e,t)=>n=>{var r;if(t?.variants==null)return xu(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const m=vu(f)||vu(d);return o[u][m]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,m]=f;return m===void 0||(u[d]=m),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:m,...h}=f;return Object.entries(h).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...l}[g]):{...s,...l}[g]===b})?[...u,d,m]:u},[]);return xu(e,i,c,n?.class,n?.className)},fl=Ee("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function q1({className:e,variant:t,size:n,...r}){return a.jsx(B1,{"data-slot":"toggle",className:S(fl({variant:t,size:n,className:e})),...r})}const cp=p.createContext({size:"default",variant:"default"});function Y1({className:e,variant:t,size:n,children:r,...o}){return a.jsx(W1,{"data-slot":"toggle-group","data-variant":t,"data-size":n,className:S("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",e),...o,children:a.jsx(cp.Provider,{value:{variant:t,size:n},children:r})})}function X1({className:e,children:t,variant:n,size:r,...o}){const s=p.useContext(cp);return a.jsx(K1,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,className:S(fl({variant:s.variant||n,size:s.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}const up=Ee("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{xs:"h-6 px-2 py-1 text-xs",default:"h-8 px-4 py-1",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-6 py-2"}},defaultVariants:{variant:"default",size:"default"}}),pl=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>a.jsx("div",{"data-slot":"chip",className:S(up({variant:t,size:n,className:e})),ref:s,...o}));pl.displayName="Chip";const dp=Ee("relative inline-flex items-center justify-center rounded-full",{variants:{size:{default:"w-12 h-12",sm:"w-8 h-8",lg:"w-16 h-16",xl:"w-20 h-20"},variant:{default:"bg-background",transparent:"bg-transparent"}},defaultVariants:{size:"default",variant:"default"}}),ml=p.forwardRef(({className:e,size:t,variant:n,children:r,spinning:o=!0,...s},i)=>a.jsxs("div",{ref:i,className:S(dp({size:t,variant:n}),e),...s,children:[a.jsx("div",{className:S("absolute inset-0 rounded-full","bg-gradient-to-r from-transparent via-primary to-transparent","animate-spin",{"animate-spin":o,"animate-none":!o}),style:{background:o?"conic-gradient(from 0deg, transparent 0deg, var(--primary) 180deg, transparent 360deg)":"conic-gradient(from 0deg, var(--primary) 0deg, var(--primary) 360deg)",padding:"1px",borderRadius:"9999px"},children:a.jsx("div",{className:S("w-full h-full rounded-full",n==="transparent"?"bg-transparent":"bg-background")})}),a.jsx("div",{className:"relative z-10 flex items-center justify-center",children:r})]}));ml.displayName="IconAnimation";const fp=Ee("inline-flex items-center gap-2 font-medium",{variants:{variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground"},textSize:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl"}},defaultVariants:{variant:"default",textSize:"sm"}}),bu={xs:"w-3 h-3",sm:"w-4 h-4",base:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},nt=p.forwardRef(({className:e,variant:t,textSize:n,icon:r,children:o,iconPosition:s="left",iconSize:i="sm",iconClassName:l,...c},u)=>{const f=()=>typeof r=="string"?a.jsx("img",{src:r,alt:"",className:S(bu[i],"rounded-full object-contain",l)}):a.jsx("span",{className:S("shrink-0",l),children:p.isValidElement(r)?p.cloneElement(r,{className:S(bu[i],r.props?.className)}):r});return a.jsxs("div",{ref:u,className:S(fp({variant:t,textSize:n}),s==="right"&&"flex-row-reverse",e),...c,children:[f(),a.jsx("span",{children:o})]})});nt.displayName="LabelWithIcon";const pp=Ee("flex w-full",{variants:{variant:{default:"justify-between border border-border shadow-sm bg-background",transparent:"justify-between border border-border shadow-sm bg-transparent",menuBar:"relative h-9 gap-2 rounded-full border border-border bg-background font-medium shadow-sm"}},defaultVariants:{variant:"default"}}),mp=Ee("flex items-center justify-center whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"text-sm text-muted-foreground hover:text-foreground",active:"text-sm text-primary bg-muted",menuBarDefault:"relative z-[1] w-full text-sm text-foreground rounded-full px-3 py-1.5 hover:text-primary",menuBarActive:"relative z-[1] w-full text-sm text-primary rounded-full px-3 py-1.5"}},defaultVariants:{variant:"default"}}),hl=p.forwardRef(({className:e,variant:t,activeValue:n,children:r,...o},s)=>{const i=p.useRef(null),l=p.useRef(null),c=p.useCallback(()=>{if(t!=="menuBar"||!i.current||!l.current)return;const u=i.current.querySelector('[data-active="true"]');u&&(l.current.style.width=`${u.offsetWidth}px`,l.current.style.left=`${u.offsetLeft}px`)},[t]);return p.useEffect(()=>{if(t!=="menuBar")return;c();const u=new ResizeObserver(c);return i.current&&u.observe(i.current),()=>{u.disconnect()}},[n,c,t]),a.jsxs("nav",{ref:s||i,className:S(pp({variant:t,className:e})),...o,children:[t==="menuBar"&&a.jsx("div",{ref:l,className:"absolute bottom-0 h-full origin-left rounded-full bg-secondary transition-all duration-300"}),r]})});hl.displayName="NavigationBar";const gl=p.forwardRef(({className:e,variant:t,active:n,value:r,...o},s)=>{const l=t==="menuBarDefault"||t==="menuBarActive"?n?"menuBarActive":"menuBarDefault":n?"active":t||"default",c=l==="menuBarDefault"||l==="menuBarActive";return a.jsx("button",{ref:s,"data-active":n,"data-value":r,className:S(mp({variant:l,className:e}),!c&&"px-4 py-2 rounded-md"),...o})});gl.displayName="NavigationItem";const hp=Ee("transition-all",{variants:{variant:{default:"bg-background",border:"bg-background border-border border",shadow:"bg-muted shadow-[0px_4px_4px_0px] shadow-black/20"},gradient:{none:"",primary:"border-gradient-primary",white:"border-gradient-white"},rounded:{default:"rounded-lg",infoCard:"rounded-info-card",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default",gradient:"none"}});function dt({className:e,variant:t,rounded:n,gradient:r,...o}){return a.jsx("div",{"data-slot":"card",className:hp({variant:t,gradient:r,rounded:n,className:e}),...o})}function Z1({className:e,...t}){return a.jsx("div",{"data-slot":"card-header",className:S("flex gap-2 p-5",e),...t})}function Q1({className:e,children:t,...n}){return a.jsx("h3",{"data-slot":"card-title",className:S("text-base leading-none font-semibold tracking-tight",e),...n,children:t})}function J1({className:e,...t}){return a.jsx("p",{"data-slot":"card-description",className:S("text-muted-foreground text-[10px]",e),...t})}function gp({className:e,...t}){return a.jsx("div",{"data-slot":"card-content",className:S("p-5 pt-0",e),...t})}function ew({className:e,...t}){return a.jsx("div",{"data-slot":"card-footer",className:S("flex items-center p-5 pt-0",e),...t})}const tw=Ee("space-y-1",{variants:{align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{align:"center"}}),nw=Ee("font-medium text-muted-foreground",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),Qo=p.forwardRef(({title:e,value:t,color:n="primary",titleSize:r="default",align:o="center",iconUrl:s,subtitle:i,className:l,...c},u)=>a.jsxs(dt,{ref:u,variant:"shadow",rounded:"infoCard",className:S(tw({align:o}),l),...c,children:[a.jsxs("div",{className:"flex gap-2",children:[s&&a.jsx("img",{src:s,alt:`${e}-icon`,className:"w-5 h-5 rounded-full"}),a.jsx("p",{className:nw({size:r}),children:e})]}),a.jsx("p",{className:S("text-foreground"),children:t}),i&&a.jsx("p",{className:"text-xs text-muted-foreground/70",children:i})]}));Qo.displayName="InfoCard";const Zn=({className:e})=>a.jsxs("svg",{viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[a.jsxs("g",{"clip-path":"url(#clip0_134_41)",children:[a.jsx("g",{filter:"url(#filter0_d_134_41)",children:a.jsx("path",{d:"M46.0792 51.8986C49.2934 51.8986 51.899 49.293 51.899 46.0788C51.899 42.8646 49.2934 40.259 46.0792 40.259C42.865 40.259 40.2594 42.8646 40.2594 46.0788C40.2594 49.293 42.865 51.8986 46.0792 51.8986Z",fill:"currentColor"})}),a.jsx("g",{opacity:"0.6",filter:"url(#filter1_d_134_41)",children:a.jsx("path",{d:"M46.0789 54.6578C50.8169 54.6578 54.6578 50.8169 54.6578 46.0789C54.6578 41.3409 50.8169 37.5 46.0789 37.5C41.3409 37.5 37.5 41.3409 37.5 46.0789C37.5 50.8169 41.3409 54.6578 46.0789 54.6578Z",stroke:"currentColor"})})]}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_d_134_41",x:"0.259361",y:"0.258961",width:"91.6397",height:"91.6397",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"20"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.45098 0 0 0 0 0.952941 0 0 0 0 0.423529 0 0 0 1 0"}),a.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_134_41"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_134_41",result:"shape"})]}),a.jsxs("filter",{id:"filter1_d_134_41",x:"27",y:"31",width:"38.1579",height:"38.1579",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{dy:"4"}),a.jsx("feGaussianBlur",{stdDeviation:"5"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.45098 0 0 0 0 0.952941 0 0 0 0 0.423529 0 0 0 1 0"}),a.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_134_41"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_134_41",result:"shape"})]}),a.jsx("clipPath",{id:"clip0_134_41",children:a.jsx("rect",{width:"92",height:"92",fill:"white"})})]})]}),Yr=Ee(["cursor-pointer border border-transparent","inline-flex items-center justify-center gap-2 text-xs font-medium whitespace-nowrap transition-all","group-disabled:opacity-80 disabled:pointer-events-none","shrink-0 rounded-full outline-none"],{variants:{variant:{default:"bg-neutral-alpha-10 hover:bg-background text-foreground disabled:text-muted-foreground active:bg-background/90",green:"bg-neutral-alpha-10 hover:bg-background text-primary disabled:text-muted-foreground active:bg-background/90",menu:"bg-background hover:text-primary justify-between disabled:grayscale-100",ghost:"bg-background text-secondary-foreground hover:text-foreground disabled:text-muted-foreground",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3",lg:"h-10 px-6",icon:"size-9",none:""},border:{plain:"hover:border-border active:border-primary border",bordered:"hover:border-foreground/30 active:border-primary border-border border",interactive:"hover:border-gradient-white active:border-gradient-accent","gradient-white":"border-gradient-white","gradient-primary":"border-gradient-accent",none:""},withIcon:{true:"[&_svg]:bg-neutral-alpha-10 [&_svg]:stroke-primary bg-neutral-alpha-2 justify-between gap-3 p-1 [&_svg]:pointer-events-none [&_svg]:aspect-square [&_svg]:shrink-0 [&_svg]:rounded-full [&_svg]:p-2 [&_svg:not([class*='size-'])]:size-7",false:"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default",border:"interactive",withIcon:!1},compoundVariants:[{withIcon:!0,variant:"none",border:"none",size:"none"}]});function Ut({className:e,variant:t,size:n,border:r,withIcon:o,isActive:s=!1,asChild:i=!1,children:l,...c}){const u=i?Tn:"button";return a.jsxs(u,{"data-slot":"button",...c,className:Yr({variant:t,size:n,border:r,withIcon:o,className:S(s?"border-gradient-accent":"",e)}),children:[l,s&&a.jsx("div",{className:"relative size-[18px] shrink-0",children:a.jsx(Zn,{className:"text-primary absolute top-[-15px] left-[-15px] size-12"})})]})}/**
|
|
2
|
+
* @license lucide-react v0.523.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const rw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ow=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),yu=e=>{const t=ow(e);return t.charAt(0).toUpperCase()+t.slice(1)},vp=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),sw=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
|
+
* @license lucide-react v0.523.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var iw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.523.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const aw=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...l},c)=>E.createElement("svg",{ref:c,...iw,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vp("lucide",o),...!s&&!sw(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,f])=>E.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
|
|
17
|
+
* @license lucide-react v0.523.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Ae=(e,t)=>{const n=E.forwardRef(({className:r,...o},s)=>E.createElement(aw,{ref:s,iconNode:t,className:vp(`lucide-${rw(yu(e))}`,`lucide-${e}`,r),...o}));return n.displayName=yu(e),n};/**
|
|
22
|
+
* @license lucide-react v0.523.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const lw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vn=Ae("check",lw);/**
|
|
27
|
+
* @license lucide-react v0.523.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const cw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wt=Ae("chevron-down",cw);/**
|
|
32
|
+
* @license lucide-react v0.523.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const uw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xp=Ae("chevron-right",uw);/**
|
|
37
|
+
* @license lucide-react v0.523.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const dw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],fw=Ae("chevron-up",dw);/**
|
|
42
|
+
* @license lucide-react v0.523.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const pw=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],mw=Ae("chevrons-right",pw);/**
|
|
47
|
+
* @license lucide-react v0.523.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const hw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gw=Ae("circle",hw);/**
|
|
52
|
+
* @license lucide-react v0.523.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const vw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xw=Ae("external-link",vw);/**
|
|
57
|
+
* @license lucide-react v0.523.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const bw=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],yw=Ae("gift",bw);/**
|
|
62
|
+
* @license lucide-react v0.523.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const ww=[["path",{d:"M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17",key:"geh8rc"}],["path",{d:"m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",key:"1fto5m"}],["path",{d:"m2 16 6 6",key:"1pfhp9"}],["circle",{cx:"16",cy:"9",r:"2.9",key:"1n0dlu"}],["circle",{cx:"6",cy:"5",r:"3",key:"151irh"}]],Cw=Ae("hand-coins",ww);/**
|
|
67
|
+
* @license lucide-react v0.523.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Sw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Rw=Ae("info",Sw);/**
|
|
72
|
+
* @license lucide-react v0.523.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const jw=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],Ew=Ae("message-square-text",jw);/**
|
|
77
|
+
* @license lucide-react v0.523.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Tw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Pw=Ae("panel-left",Tw);/**
|
|
82
|
+
* @license lucide-react v0.523.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const _w=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],Mw=Ae("pen-line",_w);/**
|
|
87
|
+
* @license lucide-react v0.523.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Aw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],bp=Ae("search",Aw);/**
|
|
92
|
+
* @license lucide-react v0.523.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Nw=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],yp=Ae("sparkles",Nw);/**
|
|
97
|
+
* @license lucide-react v0.523.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const kw=[["path",{d:"M7 20h10",key:"e6iznv"}],["path",{d:"M10 20c5.5-2.5.8-6.4 3-10",key:"161w41"}],["path",{d:"M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z",key:"9gtqwd"}],["path",{d:"M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z",key:"bkxnd2"}]],Iw=Ae("sprout",kw);/**
|
|
102
|
+
* @license lucide-react v0.523.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Dw=[["path",{d:"m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z",key:"1lbbv7"}],["path",{d:"M4.82 7.9 8 10",key:"m9wose"}],["path",{d:"M15.18 7.9 12 10",key:"p8dp2u"}],["path",{d:"M16.93 10H20a2 2 0 0 1 0 4H2",key:"12nsm7"}]],Lw=Ae("turtle",Dw);/**
|
|
107
|
+
* @license lucide-react v0.523.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Ow=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],wp=Ae("wand-sparkles",Ow);/**
|
|
112
|
+
* @license lucide-react v0.523.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Fw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xn=Ae("x",Fw);function $w({value:e,className:t}){const{title:n,titleIcon:r,url:o,topCards:s,bottomCards:i,onTitleClick:l}=e,c=a.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})});return a.jsx(dt,{variant:"border",className:S("space-y-4",t),children:a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsxs("div",{className:"space-y-4",children:[(n||r)&&a.jsxs("div",{className:"flex items-center",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3 pl-0 pr-3 py-0 cursor-pointer border border-border bg-card rounded-full hover:bg-secondary",onClick:l,children:[a.jsx(nt,{icon:r||c,textSize:"sm",iconSize:"sm",children:n}),a.jsx(wt,{className:"w-4 h-4"})]}),o&&a.jsx(Ut,{size:"icon",className:"ml-auto",children:a.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:a.jsx(xw,{})})})]}),a.jsx("div",{className:"grid grid-cols-3 gap-3",children:s.map((u,f)=>a.jsx(Qo,{title:u.title,value:u.value,color:u.color||"primary",iconUrl:u.iconUrl,titleSize:"sm",align:"left"},f))}),a.jsx("div",{className:"space-y-2",children:i.map((u,f)=>a.jsx(Qo,{iconUrl:u.iconUrl,title:u.title,value:u.value,titleSize:"sm",align:"left",className:"w-full"},f))})]})})})}function Vw({items:e,itemKey:t,columns:n,defaultComparator:r,hasScrollableContainer:o,render:s,className:i}){const[l,c]=E.useState(r||null),[u,f]=E.useState("desc"),d=h=>{l===h?f(u==="asc"?"desc":"asc"):(c(h),f("desc"))},m=[...e].sort((h,v)=>{if(!l)return 0;const g=n.find(w=>w.name===l);if(!g?.comparator)return 0;const b=g.comparator.value(h),x=g.comparator.value(v),y=g.comparator.cmp(b,x);return u==="asc"?y:-y});return a.jsx("div",{className:S("w-full overflow-auto",o&&"max-h-[600px] overflow-y-auto",i),children:a.jsxs("table",{className:"managed-table w-full",children:[a.jsx("thead",{children:a.jsx("tr",{children:n.map(h=>a.jsx("th",{className:S("text-muted-foreground h-6 px-3 py-1 text-left text-xs font-normal",h.comparator&&"cursor-pointer select-none"),onClick:()=>h.comparator&&d(h.name),children:a.jsxs("span",{className:"flex items-center gap-1",children:[h.name,h.comparator&&l===h.name&&a.jsx("span",{className:"text-xs",children:u==="asc"?"↑":"↓"})]})},h.name))})}),a.jsx("tbody",{children:m.map(h=>a.jsx("tr",{className:"text-base font-medium",children:s(h)},t(h)))})]})})}function Bw({children:e,className:t,...n}){return a.jsx("td",{className:S("text-foreground p-2 align-middle",t),...n,children:e})}const zw=["top","right","bottom","left"],Wt=Math.min,Ke=Math.max,Jo=Math.round,So=Math.floor,xt=e=>({x:e,y:e}),Hw={left:"right",right:"left",bottom:"top",top:"bottom"},Gw={start:"end",end:"start"};function sa(e,t,n){return Ke(e,Wt(t,n))}function Pt(e,t){return typeof e=="function"?e(t):e}function _t(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function vl(e){return e==="x"?"y":"x"}function xl(e){return e==="y"?"height":"width"}const Uw=new Set(["top","bottom"]);function vt(e){return Uw.has(_t(e))?"y":"x"}function bl(e){return vl(vt(e))}function Ww(e,t,n){n===void 0&&(n=!1);const r=lr(e),o=bl(e),s=xl(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=es(i)),[i,es(i)]}function Kw(e){const t=es(e);return[ia(e),t,ia(t)]}function ia(e){return e.replace(/start|end/g,t=>Gw[t])}const wu=["left","right"],Cu=["right","left"],qw=["top","bottom"],Yw=["bottom","top"];function Xw(e,t,n){switch(e){case"top":case"bottom":return n?t?Cu:wu:t?wu:Cu;case"left":case"right":return t?qw:Yw;default:return[]}}function Zw(e,t,n,r){const o=lr(e);let s=Xw(_t(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(ia)))),s}function es(e){return e.replace(/left|right|bottom|top/g,t=>Hw[t])}function Qw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cp(e){return typeof e!="number"?Qw(e):{top:e,right:e,bottom:e,left:e}}function ts(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Su(e,t,n){let{reference:r,floating:o}=e;const s=vt(t),i=bl(t),l=xl(i),c=_t(t),u=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[l]/2-o[l]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lr(t)){case"start":h[i]-=m*(n&&u?-1:1);break;case"end":h[i]+=m*(n&&u?-1:1);break}return h}const Jw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Su(u,r,c),m=r,h={},v=0;for(let g=0;g<l.length;g++){const{name:b,fn:x}=l[g],{x:y,y:w,data:C,reset:R}=await x({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=y??f,d=w??d,h={...h,[b]:{...h[b],...C}},R&&v<=50&&(v++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:d}=Su(u,m,c)),g=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:h}};async function Ir(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=Pt(t,e),v=Cp(h),b=l[m?d==="floating"?"reference":"floating":d],x=ts(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},R=ts(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(x.top-R.top+v.top)/C.y,bottom:(R.bottom-x.bottom+v.bottom)/C.y,left:(x.left-R.left+v.left)/C.x,right:(R.right-x.right+v.right)/C.x}}const eC=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=Pt(e,t)||{};if(u==null)return{};const d=Cp(f),m={x:n,y:r},h=bl(o),v=xl(h),g=await i.getDimensions(u),b=h==="y",x=b?"top":"left",y=b?"bottom":"right",w=b?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[h]-m[h]-s.floating[v],R=m[h]-s.reference[h],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=P?P[w]:0;(!T||!await(i.isElement==null?void 0:i.isElement(P)))&&(T=l.floating[w]||s.floating[v]);const j=C/2-R/2,M=T/2-g[v]/2-1,D=Wt(d[x],M),z=Wt(d[y],M),q=D,Y=T-g[v]-z,G=T/2-g[v]/2+j,Z=sa(q,G,Y),$=!c.arrow&&lr(o)!=null&&G!==Z&&s.reference[v]/2-(G<q?D:z)-g[v]/2<0,V=$?G<q?G-q:G-Y:0;return{[h]:m[h]+V,data:{[h]:Z,centerOffset:G-Z-V,...$&&{alignmentOffset:V}},reset:$}}}),tC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...b}=Pt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=_t(o),y=vt(l),w=_t(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!g?[es(l)]:Kw(l)),P=v!=="none";!m&&P&&R.push(...Zw(l,g,v,C));const T=[l,...R],j=await Ir(t,b),M=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&M.push(j[x]),d){const G=Ww(o,i,C);M.push(j[G[0]],j[G[1]])}if(D=[...D,{placement:o,overflows:M}],!M.every(G=>G<=0)){var z,q;const G=(((z=s.flip)==null?void 0:z.index)||0)+1,Z=T[G];if(Z&&(!(d==="alignment"?y!==vt(Z):!1)||D.every(_=>vt(_.placement)===y?_.overflows[0]>0:!0)))return{data:{index:G,overflows:D},reset:{placement:Z}};let $=(q=D.filter(V=>V.overflows[0]<=0).sort((V,_)=>V.overflows[1]-_.overflows[1])[0])==null?void 0:q.placement;if(!$)switch(h){case"bestFit":{var Y;const V=(Y=D.filter(_=>{if(P){const O=vt(_.placement);return O===y||O==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(O=>O>0).reduce((O,te)=>O+te,0)]).sort((_,O)=>_[1]-O[1])[0])==null?void 0:Y[0];V&&($=V);break}case"initialPlacement":$=l;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Ru(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ju(e){return zw.some(t=>e[t]>=0)}const nC=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Pt(e,t);switch(r){case"referenceHidden":{const s=await Ir(t,{...o,elementContext:"reference"}),i=Ru(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ju(i)}}}case"escaped":{const s=await Ir(t,{...o,altBoundary:!0}),i=Ru(s,n.floating);return{data:{escapedOffsets:i,escaped:ju(i)}}}default:return{}}}}},Sp=new Set(["left","top"]);async function rC(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=_t(n),l=lr(n),c=vt(n)==="y",u=Sp.has(i)?-1:1,f=s&&c?-1:1,d=Pt(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof v=="number"&&(h=l==="end"?v*-1:v),c?{x:h*f,y:m*u}:{x:m*u,y:h*f}}const oC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:l}=t,c=await rC(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},sC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x,y}=b;return{x,y}}},...c}=Pt(e,t),u={x:n,y:r},f=await Ir(t,c),d=vt(_t(o)),m=vl(d);let h=u[m],v=u[d];if(s){const b=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=h+f[b],w=h-f[x];h=sa(y,h,w)}if(i){const b=d==="y"?"top":"left",x=d==="y"?"bottom":"right",y=v+f[b],w=v-f[x];v=sa(y,v,w)}const g=l.fn({...t,[m]:h,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:s,[d]:i}}}}}},iC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Pt(e,t),f={x:n,y:r},d=vt(o),m=vl(d);let h=f[m],v=f[d];const g=Pt(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=m==="y"?"height":"width",C=s.reference[m]-s.floating[w]+b.mainAxis,R=s.reference[m]+s.reference[w]-b.mainAxis;h<C?h=C:h>R&&(h=R)}if(u){var x,y;const w=m==="y"?"width":"height",C=Sp.has(_t(o)),R=s.reference[d]-s.floating[w]+(C&&((x=i.offset)==null?void 0:x[d])||0)+(C?0:b.crossAxis),P=s.reference[d]+s.reference[w]+(C?0:((y=i.offset)==null?void 0:y[d])||0)-(C?b.crossAxis:0);v<R?v=R:v>P&&(v=P)}return{[m]:h,[d]:v}}}},aC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=Pt(e,t),f=await Ir(t,u),d=_t(o),m=lr(o),h=vt(o)==="y",{width:v,height:g}=s.floating;let b,x;d==="top"||d==="bottom"?(b=d,x=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(x=d,b=m==="end"?"top":"bottom");const y=g-f.top-f.bottom,w=v-f.left-f.right,C=Wt(g-f[b],y),R=Wt(v-f[x],w),P=!t.middlewareData.shift;let T=C,j=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),P&&!m){const D=Ke(f.left,0),z=Ke(f.right,0),q=Ke(f.top,0),Y=Ke(f.bottom,0);h?j=v-2*(D!==0||z!==0?D+z:Ke(f.left,f.right)):T=g-2*(q!==0||Y!==0?q+Y:Ke(f.top,f.bottom))}await c({...t,availableWidth:j,availableHeight:T});const M=await i.getDimensions(l.floating);return v!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Es(){return typeof window<"u"}function cr(e){return Rp(e)?(e.nodeName||"").toLowerCase():"#document"}function qe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(Rp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rp(e){return Es()?e instanceof Node||e instanceof qe(e).Node:!1}function ft(e){return Es()?e instanceof Element||e instanceof qe(e).Element:!1}function Ct(e){return Es()?e instanceof HTMLElement||e instanceof qe(e).HTMLElement:!1}function Eu(e){return!Es()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qe(e).ShadowRoot}const lC=new Set(["inline","contents"]);function Xr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lC.has(o)}const cC=new Set(["table","td","th"]);function uC(e){return cC.has(cr(e))}const dC=[":popover-open",":modal"];function Ts(e){return dC.some(t=>{try{return e.matches(t)}catch{return!1}})}const fC=["transform","translate","scale","rotate","perspective"],pC=["transform","translate","scale","rotate","perspective","filter"],mC=["paint","layout","strict","content"];function yl(e){const t=wl(),n=ft(e)?pt(e):e;return fC.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pC.some(r=>(n.willChange||"").includes(r))||mC.some(r=>(n.contain||"").includes(r))}function hC(e){let t=Kt(e);for(;Ct(t)&&!Qn(t);){if(yl(t))return t;if(Ts(t))return null;t=Kt(t)}return null}function wl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gC=new Set(["html","body","#document"]);function Qn(e){return gC.has(cr(e))}function pt(e){return qe(e).getComputedStyle(e)}function Ps(e){return ft(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if(cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eu(e)&&e.host||St(e);return Eu(t)?t.host:t}function jp(e){const t=Kt(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ct(t)&&Xr(t)?t:jp(t)}function Dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=jp(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=qe(o);if(s){const l=aa(i);return t.concat(i,i.visualViewport||[],Xr(o)?o:[],l&&n?Dr(l):[])}return t.concat(o,Dr(o,[],n))}function aa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ep(e){const t=pt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ct(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Jo(n)!==s||Jo(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Cl(e){return ft(e)?e:e.contextElement}function Kn(e){const t=Cl(e);if(!Ct(t))return xt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ep(t);let i=(s?Jo(n.width):n.width)/r,l=(s?Jo(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const vC=xt(0);function Tp(e){const t=qe(e);return!wl()||!t.visualViewport?vC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qe(e)?!1:t}function wn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Cl(e);let i=xt(1);t&&(r?ft(r)&&(i=Kn(r)):i=Kn(e));const l=xC(s,n,r)?Tp(s):xt(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const m=qe(s),h=r&&ft(r)?qe(r):r;let v=m,g=aa(v);for(;g&&r&&h!==v;){const b=Kn(g),x=g.getBoundingClientRect(),y=pt(g),w=x.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,C=x.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,u*=b.y,f*=b.x,d*=b.y,c+=w,u+=C,v=qe(g),g=aa(v)}}return ts({width:f,height:d,x:c,y:u})}function _s(e,t){const n=Ps(e).scrollLeft;return t?t.left+n:wn(St(e)).left+n}function Pp(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_s(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function bC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=St(r),l=t?Ts(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=xt(1);const f=xt(0),d=Ct(r);if((d||!d&&!s)&&((cr(r)!=="body"||Xr(i))&&(c=Ps(r)),Ct(r))){const h=wn(r);u=Kn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const m=i&&!d&&!s?Pp(i,c):xt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function yC(e){return Array.from(e.getClientRects())}function wC(e){const t=St(e),n=Ps(e),r=e.ownerDocument.body,o=Ke(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ke(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+_s(e);const l=-n.scrollTop;return pt(r).direction==="rtl"&&(i+=Ke(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:l}}const Tu=25;function CC(e,t){const n=qe(e),r=St(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;const f=wl();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=_s(r);if(u<=0){const f=r.ownerDocument,d=f.body,m=getComputedStyle(d),h=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-h);v<=Tu&&(s-=v)}else u<=Tu&&(s+=u);return{width:s,height:i,x:l,y:c}}const SC=new Set(["absolute","fixed"]);function RC(e,t){const n=wn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Ct(e)?Kn(e):xt(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=o*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function Pu(e,t,n){let r;if(t==="viewport")r=CC(e,n);else if(t==="document")r=wC(St(e));else if(ft(t))r=RC(t,n);else{const o=Tp(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ts(r)}function _p(e,t){const n=Kt(e);return n===t||!ft(n)||Qn(n)?!1:pt(n).position==="fixed"||_p(n,t)}function jC(e,t){const n=t.get(e);if(n)return n;let r=Dr(e,[],!1).filter(l=>ft(l)&&cr(l)!=="body"),o=null;const s=pt(e).position==="fixed";let i=s?Kt(e):e;for(;ft(i)&&!Qn(i);){const l=pt(i),c=yl(i);!c&&l.position==="fixed"&&(o=null),(s?!c&&!o:!c&&l.position==="static"&&!!o&&SC.has(o.position)||Xr(i)&&!c&&_p(e,i))?r=r.filter(f=>f!==i):o=l,i=Kt(i)}return t.set(e,r),r}function EC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Ts(t)?[]:jC(t,this._c):[].concat(n),r],l=i[0],c=i.reduce((u,f)=>{const d=Pu(t,f,o);return u.top=Ke(d.top,u.top),u.right=Wt(d.right,u.right),u.bottom=Wt(d.bottom,u.bottom),u.left=Ke(d.left,u.left),u},Pu(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function TC(e){const{width:t,height:n}=Ep(e);return{width:t,height:n}}function PC(e,t,n){const r=Ct(t),o=St(t),s=n==="fixed",i=wn(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=xt(0);function u(){c.x=_s(o)}if(r||!r&&!s)if((cr(t)!=="body"||Xr(o))&&(l=Ps(t)),r){const h=wn(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!r&&o&&u();const f=o&&!r&&!s?Pp(o,l):xt(0),d=i.left+l.scrollLeft-c.x-f.x,m=i.top+l.scrollTop-c.y-f.y;return{x:d,y:m,width:i.width,height:i.height}}function gi(e){return pt(e).position==="static"}function _u(e,t){if(!Ct(e)||pt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return St(e)===n&&(n=n.ownerDocument.body),n}function Mp(e,t){const n=qe(e);if(Ts(e))return n;if(!Ct(e)){let o=Kt(e);for(;o&&!Qn(o);){if(ft(o)&&!gi(o))return o;o=Kt(o)}return n}let r=_u(e,t);for(;r&&uC(r)&&gi(r);)r=_u(r,t);return r&&Qn(r)&&gi(r)&&!yl(r)?n:r||hC(e)||n}const _C=async function(e){const t=this.getOffsetParent||Mp,n=this.getDimensions,r=await n(e.floating);return{reference:PC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MC(e){return pt(e).direction==="rtl"}const AC={convertOffsetParentRelativeRectToViewportRelativeRect:bC,getDocumentElement:St,getClippingRect:EC,getOffsetParent:Mp,getElementRects:_C,getClientRects:yC,getDimensions:TC,getScale:Kn,isElement:ft,isRTL:MC};function Ap(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NC(e,t){let n=null,r;const o=St(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:m,height:h}=u;if(l||t(),!m||!h)return;const v=So(d),g=So(o.clientWidth-(f+m)),b=So(o.clientHeight-(d+h)),x=So(f),w={rootMargin:-v+"px "+-g+"px "+-b+"px "+-x+"px",threshold:Ke(0,Wt(1,c))||1};let C=!0;function R(P){const T=P[0].intersectionRatio;if(T!==c){if(!C)return i();T?i(!1,T):r=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ap(u,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,w)}n.observe(e)}return i(!0),s}function kC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Cl(e),f=o||s?[...u?Dr(u):[],...Dr(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=u&&l?NC(u,n):null;let m=-1,h=null;i&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let v,g=c?wn(e):null;c&&b();function b(){const x=wn(e);g&&!Ap(g,x)&&n(),g=x,v=requestAnimationFrame(b)}return n(),()=>{var x;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d?.(),(x=h)==null||x.disconnect(),h=null,c&&cancelAnimationFrame(v)}}const IC=oC,DC=sC,LC=tC,OC=aC,FC=nC,Mu=eC,$C=iC,VC=(e,t,n)=>{const r=new Map,o={platform:AC,...n},s={...o.platform,_c:r};return Jw(e,t,{...o,platform:s})};var BC=typeof document<"u",zC=function(){},Vo=BC?E.useLayoutEffect:zC;function ns(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ns(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!ns(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Np(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Au(e,t){const n=Np(e);return Math.round(t*n)/n}function vi(e){const t=p.useRef(e);return Vo(()=>{t.current=e}),t}function HC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=p.useState(r);ns(m,r)||h(r);const[v,g]=p.useState(null),[b,x]=p.useState(null),y=p.useCallback(_=>{_!==P.current&&(P.current=_,g(_))},[]),w=p.useCallback(_=>{_!==T.current&&(T.current=_,x(_))},[]),C=s||v,R=i||b,P=p.useRef(null),T=p.useRef(null),j=p.useRef(f),M=c!=null,D=vi(c),z=vi(o),q=vi(u),Y=p.useCallback(()=>{if(!P.current||!T.current)return;const _={placement:t,strategy:n,middleware:m};z.current&&(_.platform=z.current),VC(P.current,T.current,_).then(O=>{const te={...O,isPositioned:q.current!==!1};G.current&&!ns(j.current,te)&&(j.current=te,Cs.flushSync(()=>{d(te)}))})},[m,t,n,z,q]);Vo(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[u]);const G=p.useRef(!1);Vo(()=>(G.current=!0,()=>{G.current=!1}),[]),Vo(()=>{if(C&&(P.current=C),R&&(T.current=R),C&&R){if(D.current)return D.current(C,R,Y);Y()}},[C,R,Y,D,M]);const Z=p.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:w}),[y,w]),$=p.useMemo(()=>({reference:C,floating:R}),[C,R]),V=p.useMemo(()=>{const _={position:n,left:0,top:0};if(!$.floating)return _;const O=Au($.floating,f.x),te=Au($.floating,f.y);return l?{..._,transform:"translate("+O+"px, "+te+"px)",...Np($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:te}},[n,l,$.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:Y,refs:Z,elements:$,floatingStyles:V}),[f,Y,Z,$,V])}const GC=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Mu({element:r.current,padding:o}).fn(n):{}:r?Mu({element:r,padding:o}).fn(n):{}}}},UC=(e,t)=>({...IC(e),options:[e,t]}),WC=(e,t)=>({...DC(e),options:[e,t]}),KC=(e,t)=>({...$C(e),options:[e,t]}),qC=(e,t)=>({...LC(e),options:[e,t]}),YC=(e,t)=>({...OC(e),options:[e,t]}),XC=(e,t)=>({...FC(e),options:[e,t]}),ZC=(e,t)=>({...GC(e),options:[e,t]});var QC="Arrow",kp=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(H.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});kp.displayName=QC;var JC=kp,Sl="Popper",[Ip,Rt]=Me(Sl),[eS,Dp]=Ip(Sl),Lp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return a.jsx(eS,{scope:t,anchor:r,onAnchorChange:o,children:n})};Lp.displayName=Sl;var Op="PopperAnchor",Fp=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Dp(Op,n),i=p.useRef(null),l=ee(t,i),c=p.useRef(null);return p.useEffect(()=>{const u=c.current;c.current=r?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:a.jsx(H.div,{...o,ref:l})});Fp.displayName=Op;var Rl="PopperContent",[tS,nS]=Ip(Rl),$p=p.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,b=Dp(Rl,n),[x,y]=p.useState(null),w=ee(t,N=>y(N)),[C,R]=p.useState(null),P=Ss(C),T=P?.width??0,j=P?.height??0,M=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},z=Array.isArray(u)?u:[u],q=z.length>0,Y={padding:D,boundary:z.filter(oS),altBoundary:q},{refs:G,floatingStyles:Z,placement:$,isPositioned:V,middlewareData:_}=HC({strategy:"fixed",placement:M,whileElementsMounted:(...N)=>kC(...N,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[UC({mainAxis:o+j,alignmentAxis:i}),c&&WC({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?KC():void 0,...Y}),c&&qC({...Y}),YC({...Y,apply:({elements:N,rects:U,availableWidth:ne,availableHeight:ie})=>{const{width:ce,height:ae}=U.reference,ge=N.floating.style;ge.setProperty("--radix-popper-available-width",`${ne}px`),ge.setProperty("--radix-popper-available-height",`${ie}px`),ge.setProperty("--radix-popper-anchor-width",`${ce}px`),ge.setProperty("--radix-popper-anchor-height",`${ae}px`)}}),C&&ZC({element:C,padding:l}),sS({arrowWidth:T,arrowHeight:j}),m&&XC({strategy:"referenceHidden",...Y})]}),[O,te]=zp($),fe=ve(v);be(()=>{V&&fe?.()},[V,fe]);const k=_.arrow?.x,A=_.arrow?.y,F=_.arrow?.centerOffset!==0,[B,X]=p.useState();return be(()=>{x&&X(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:V?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(tS,{scope:n,placedSide:O,onArrowChange:R,arrowX:k,arrowY:A,shouldHideArrow:F,children:a.jsx(H.div,{"data-side":O,"data-align":te,...g,ref:w,style:{...g.style,animation:V?void 0:"none"}})})})});$p.displayName=Rl;var Vp="PopperArrow",rS={top:"bottom",right:"left",bottom:"top",left:"right"},Bp=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=nS(Vp,r),i=rS[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(JC,{...o,ref:n,style:{...o.style,display:"block"}})})});Bp.displayName=Vp;function oS(e){return e!==null}var sS=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=zp(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(o.arrow?.x??0)+l/2,h=(o.arrow?.y??0)+c/2;let v="",g="";return u==="bottom"?(v=i?d:`${m}px`,g=`${-c}px`):u==="top"?(v=i?d:`${m}px`,g=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=i?d:`${h}px`):u==="left"&&(v=`${r.floating.width+c}px`,g=i?d:`${h}px`),{data:{x:v,y:g}}}});function zp(e){const[t,n="center"]=e.split("-");return[t,n]}var ur=Lp,dr=Fp,Zr=$p,Qr=Bp,iS="Portal",_n=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=p.useState(!1);be(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?ws.createPortal(a.jsx(H.div,{...r,ref:t}),i):null});_n.displayName=iS;function aS(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var ye=e=>{const{present:t,children:n}=e,r=lS(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=ee(r.ref,cS(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};ye.displayName="Presence";function lS(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),i=e?"mounted":"unmounted",[l,c]=aS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Ro(r.current);s.current=l==="mounted"?u:"none"},[l]),be(()=>{const u=r.current,f=o.current;if(f!==e){const m=s.current,h=Ro(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),be(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=h=>{const g=Ro(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=h=>{h.target===t&&(s.current=Ro(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ro(e){return e?.animationName||"none"}function cS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uS(e,t=globalThis?.document){const n=ve(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var dS="DismissableLayer",la="dismissableLayer.update",fS="dismissableLayer.pointerDownOutside",pS="dismissableLayer.focusOutside",Nu,Hp=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tn=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=p.useContext(Hp),[f,d]=p.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=p.useState({}),v=ee(t,T=>d(T)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),y=f?g.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,R=gS(T=>{const j=T.target,M=[...u.branches].some(D=>D.contains(j));!C||M||(o?.(T),i?.(T),T.defaultPrevented||l?.())},m),P=vS(T=>{const j=T.target;[...u.branches].some(D=>D.contains(j))||(s?.(T),i?.(T),T.defaultPrevented||l?.())},m);return uS(T=>{y===u.layers.size-1&&(r?.(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),p.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nu=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ku(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Nu)}},[f,m,n,u]),p.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ku())},[f,u]),p.useEffect(()=>{const T=()=>h({});return document.addEventListener(la,T),()=>document.removeEventListener(la,T)},[]),a.jsx(H.div,{...c,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,R.onPointerDownCapture)})});tn.displayName=dS;var mS="DismissableLayerBranch",hS=p.forwardRef((e,t)=>{const n=p.useContext(Hp),r=p.useRef(null),o=ee(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(H.div,{...e,ref:o})});hS.displayName=mS;function gS(e,t=globalThis?.document){const n=ve(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){Gp(fS,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vS(e,t=globalThis?.document){const n=ve(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&Gp(pS,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ku(){const e=new CustomEvent(la);document.dispatchEvent(e)}function Gp(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Xo(o,s):o.dispatchEvent(s)}var xi,Ms="HoverCard",[Up]=Me(Ms,[Rt]),As=Rt(),[xS,Ns]=Up(Ms),Wp=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:i=700,closeDelay:l=300}=e,c=As(t),u=p.useRef(0),f=p.useRef(0),d=p.useRef(!1),m=p.useRef(!1),[h,v]=Ie({prop:r,defaultProp:o??!1,onChange:s,caller:Ms}),g=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>v(!0),i)},[i,v]),b=p.useCallback(()=>{clearTimeout(u.current),!d.current&&!m.current&&(f.current=window.setTimeout(()=>v(!1),l))},[l,v]),x=p.useCallback(()=>v(!1),[v]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),a.jsx(xS,{scope:t,open:h,onOpenChange:v,onOpen:g,onClose:b,onDismiss:x,hasSelectionRef:d,isPointerDownOnContentRef:m,children:a.jsx(ur,{...c,children:n})})};Wp.displayName=Ms;var Kp="HoverCardTrigger",qp=p.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Ns(Kp,n),s=As(n);return a.jsx(dr,{asChild:!0,...s,children:a.jsx(H.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:I(e.onPointerEnter,os(o.onOpen)),onPointerLeave:I(e.onPointerLeave,os(o.onClose)),onFocus:I(e.onFocus,o.onOpen),onBlur:I(e.onBlur,o.onClose),onTouchStart:I(e.onTouchStart,i=>i.preventDefault())})})});qp.displayName=Kp;var jl="HoverCardPortal",[bS,yS]=Up(jl,{forceMount:void 0}),Yp=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,s=Ns(jl,t);return a.jsx(bS,{scope:t,forceMount:n,children:a.jsx(ye,{present:n||s.open,children:a.jsx(_n,{asChild:!0,container:o,children:r})})})};Yp.displayName=jl;var rs="HoverCardContent",Xp=p.forwardRef((e,t)=>{const n=yS(rs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,s=Ns(rs,e.__scopeHoverCard);return a.jsx(ye,{present:r||s.open,children:a.jsx(wS,{"data-state":s.open?"open":"closed",...o,onPointerEnter:I(e.onPointerEnter,os(s.onOpen)),onPointerLeave:I(e.onPointerLeave,os(s.onClose)),ref:t})})});Xp.displayName=rs;var wS=p.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,...l}=e,c=Ns(rs,n),u=As(n),f=p.useRef(null),d=ee(t,f),[m,h]=p.useState(!1);return p.useEffect(()=>{if(m){const v=document.body;return xi=v.style.userSelect||v.style.webkitUserSelect,v.style.userSelect="none",v.style.webkitUserSelect="none",()=>{v.style.userSelect=xi,v.style.webkitUserSelect=xi}}},[m]),p.useEffect(()=>{if(f.current){const v=()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",v),()=>{document.removeEventListener("pointerup",v),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),p.useEffect(()=>{f.current&&RS(f.current).forEach(g=>g.setAttribute("tabindex","-1"))}),a.jsx(tn,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:I(s,v=>{v.preventDefault()}),onDismiss:c.onDismiss,children:a.jsx(Zr,{...u,...l,onPointerDown:I(l.onPointerDown,v=>{v.currentTarget.contains(v.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:d,style:{...l.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),CS="HoverCardArrow",SS=p.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=As(n);return a.jsx(Qr,{...o,...r,ref:t})});SS.displayName=CS;function os(e){return t=>t.pointerType==="touch"?void 0:e()}function RS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var jS=Wp,ES=qp,TS=Yp,Iu=Xp;const Bo=Ee("text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) shadow-md outline-hidden transition-all",{variants:{variant:{container:"bg-background relative drop-shadow-lg",simple:"bg-muted",item:"bg-muted drop-shadow-lg"},gradientBorder:{none:"",white:"relative before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:[mask-composite:exclude] before:p-px before:content-[''] before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]",green:"relative before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-gradient-to-br before:from-[#73F36C]/60 before:via-transparent before:to-[#73F36C]/20 before:[mask-composite:exclude] before:p-px before:content-[''] before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]",auto:"light:before:from-black/20 light:before:to-black/5 relative before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:[mask-composite:exclude] before:p-px before:content-[''] before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] dark:before:from-white/40 dark:before:to-white/10"},padding:{none:"p-0",sm:"px-3.5 py-3.5",default:"px-4.5 py-4.5",md:"px-6 py-6.5",lg:"px-8 py-8.5"},rounded:{default:"rounded-lg",infoCard:"rounded-info-card",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"container",padding:"default",rounded:"default",gradientBorder:"none"}});function Zp({...e}){return a.jsx(jS,{"data-slot":"hover-card",...e})}function Qp({...e}){return a.jsx(ES,{"data-slot":"hover-card-trigger",...e})}function Jp({className:e,align:t="center",sideOffset:n=4,variant:r,padding:o,rounded:s,gradientBorder:i,...l}){const c=i??(r==="container"?"white":"none"),u=c!=="none",f=Bo({gradientBorder:c}),d=S(Bo({variant:r,padding:o,rounded:s,gradientBorder:"none",className:e})),m=Bo({rounded:s});return a.jsx(TS,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0,"data-slot":"hover-card-portal",children:u?a.jsx(Iu,{"data-slot":"hover-card-content-wrapper",align:t,sideOffset:n,className:S(f,m,"p-[1px]"),...l,children:a.jsx("div",{"data-slot":"hover-card-content-inner",className:d})}):a.jsx(Iu,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:d,...l})})}var jo={exports:{}},bi={};/**
|
|
117
|
+
* @license React
|
|
118
|
+
* use-sync-external-store-shim.production.js
|
|
119
|
+
*
|
|
120
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the MIT license found in the
|
|
123
|
+
* LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/var Du;function PS(){if(Du)return bi;Du=1;var e=E;function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function l(d,m){var h=m(),v=r({inst:{value:h,getSnapshot:m}}),g=v[0].inst,b=v[1];return s(function(){g.value=h,g.getSnapshot=m,c(g)&&b({inst:g})},[d,h,m]),o(function(){return c(g)&&b({inst:g}),d(function(){c(g)&&b({inst:g})})},[d]),i(h),h}function c(d){var m=d.getSnapshot;d=d.value;try{var h=m();return!n(d,h)}catch{return!0}}function u(d,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return bi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,bi}var yi={};/**
|
|
125
|
+
* @license React
|
|
126
|
+
* use-sync-external-store-shim.development.js
|
|
127
|
+
*
|
|
128
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the MIT license found in the
|
|
131
|
+
* LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/var Lu;function _S(){return Lu||(Lu=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}function t(h,v){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=v();if(!d){var b=v();s(g,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=i({inst:{value:g,getSnapshot:v}});var x=b[0].inst,y=b[1];return c(function(){x.value=g,x.getSnapshot=v,n(x)&&y({inst:x})},[h,g,v]),l(function(){return n(x)&&y({inst:x}),h(function(){n(x)&&y({inst:x})})},[h]),u(g),g}function n(h){var v=h.getSnapshot;h=h.value;try{var g=v();return!s(h,g)}catch{return!0}}function r(h,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=E,s=typeof Object.is=="function"?Object.is:e,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,d=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;yi.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),yi}var Ou;function MS(){return Ou||(Ou=1,process.env.NODE_ENV==="production"?jo.exports=PS():jo.exports=_S()),jo.exports}var AS=MS();function NS(){return AS.useSyncExternalStore(kS,()=>!0,()=>!1)}function kS(){return()=>{}}var El="Avatar",[IS]=Me(El),[DS,em]=IS(El),tm=p.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=p.useState("idle");return a.jsx(DS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:a.jsx(H.span,{...r,ref:t})})});tm.displayName=El;var nm="AvatarImage",rm=p.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=em(nm,n),l=LS(r,s),c=ve(u=>{o(u),i.onImageLoadingStatusChange(u)});return be(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?a.jsx(H.img,{...s,ref:t,src:r}):null});rm.displayName=nm;var om="AvatarFallback",sm=p.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=em(om,n),[i,l]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),i&&s.imageLoadingStatus!=="loaded"?a.jsx(H.span,{...o,ref:t}):null});sm.displayName=om;function Fu(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function LS(e,{referrerPolicy:t,crossOrigin:n}){const r=NS(),o=p.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,l]=p.useState(()=>Fu(s,e));return be(()=>{l(Fu(s,e))},[s,e]),be(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,n,t]),i}var OS=tm,FS=rm,$S=sm;function ss({className:e,size:t="md",...n}){return a.jsx(OS,{"data-slot":"avatar",className:S("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...n})}function Tl({className:e,...t}){return a.jsx(FS,{"data-slot":"avatar-image",className:S("aspect-square size-full",e),...t})}function is({className:e,...t}){return a.jsx($S,{"data-slot":"avatar-fallback",className:S("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function VS({src:e,alt:t,fallback:n,...r}){return a.jsxs(ss,{...r,children:[a.jsx(Tl,{src:e,alt:t}),a.jsx(is,{children:n})]})}var im=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),BS="VisuallyHidden",am=p.forwardRef((e,t)=>a.jsx(H.span,{...e,ref:t,style:{...im,...e.style}}));am.displayName=BS;var lm=am,[ks]=Me("Tooltip",[Rt]),Is=Rt(),cm="TooltipProvider",zS=700,ca="tooltip.open",[HS,Pl]=ks(cm),um=e=>{const{__scopeTooltip:t,delayDuration:n=zS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(HS,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:s})};um.displayName=cm;var Lr="Tooltip",[GS,Jr]=ks(Lr),dm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=Pl(Lr,e.__scopeTooltip),u=Is(t),[f,d]=p.useState(null),m=Se(),h=p.useRef(0),v=i??c.disableHoverableContent,g=l??c.delayDuration,b=p.useRef(!1),[x,y]=Ie({prop:r,defaultProp:o??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(ca))):c.onClose(),s?.(T)},caller:Lr}),w=p.useMemo(()=>x?b.current?"delayed-open":"instant-open":"closed",[x]),C=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,y(!0)},[y]),R=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),P=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,y(!0),h.current=0},g)},[g,y]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),a.jsx(ur,{...u,children:a.jsx(GS,{scope:t,contentId:m,open:x,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{c.isOpenDelayedRef.current?P():C()},[c.isOpenDelayedRef,P,C]),onTriggerLeave:p.useCallback(()=>{v?R():(window.clearTimeout(h.current),h.current=0)},[R,v]),onOpen:C,onClose:R,disableHoverableContent:v,children:n})})};dm.displayName=Lr;var ua="TooltipTrigger",fm=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Jr(ua,n),s=Pl(ua,n),i=Is(n),l=p.useRef(null),c=ee(t,l,o.onTriggerChange),u=p.useRef(!1),f=p.useRef(!1),d=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),a.jsx(dr,{asChild:!0,...i,children:a.jsx(H.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:I(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});fm.displayName=ua;var _l="TooltipPortal",[US,WS]=ks(_l,{forceMount:void 0}),pm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Jr(_l,t);return a.jsx(US,{scope:t,forceMount:n,children:a.jsx(ye,{present:n||s.open,children:a.jsx(_n,{asChild:!0,container:o,children:r})})})};pm.displayName=_l;var Jn="TooltipContent",mm=p.forwardRef((e,t)=>{const n=WS(Jn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Jr(Jn,e.__scopeTooltip);return a.jsx(ye,{present:r||i.open,children:i.disableHoverableContent?a.jsx(hm,{side:o,...s,ref:t}):a.jsx(KS,{side:o,...s,ref:t})})}),KS=p.forwardRef((e,t)=>{const n=Jr(Jn,e.__scopeTooltip),r=Pl(Jn,e.__scopeTooltip),o=p.useRef(null),s=ee(t,o),[i,l]=p.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=p.useCallback(()=>{l(null),d(!1)},[d]),h=p.useCallback((v,g)=>{const b=v.currentTarget,x={x:v.clientX,y:v.clientY},y=QS(x,b.getBoundingClientRect()),w=JS(x,y),C=e2(g.getBoundingClientRect()),R=n2([...w,...C]);l(R),d(!0)},[d]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(c&&f){const v=b=>h(b,f),g=b=>h(b,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[c,f,h,m]),p.useEffect(()=>{if(i){const v=g=>{const b=g.target,x={x:g.clientX,y:g.clientY},y=c?.contains(b)||f?.contains(b),w=!t2(x,i);y?m():w&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,i,u,m]),a.jsx(hm,{...e,ref:s})}),[qS,YS]=ks(Lr,{isInside:!1}),XS=Af("TooltipContent"),hm=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=Jr(Jn,n),u=Is(n),{onClose:f}=c;return p.useEffect(()=>(document.addEventListener(ca,f),()=>document.removeEventListener(ca,f)),[f]),p.useEffect(()=>{if(c.trigger){const d=m=>{m.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),a.jsx(tn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:a.jsxs(Zr,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(XS,{children:r}),a.jsx(qS,{scope:n,isInside:!0,children:a.jsx(lm,{id:c.contentId,role:"tooltip",children:o||r})})]})})});mm.displayName=Jn;var gm="TooltipArrow",ZS=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Is(n);return YS(gm,n).isInside?null:a.jsx(Qr,{...o,...r,ref:t})});ZS.displayName=gm;function QS(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function JS(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function e2(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function t2(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,f=l.y,d=c.x,m=c.y;f>r!=m>r&&n<(d-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function n2(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),r2(t)}function r2(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var o2=um,s2=dm,i2=fm,a2=pm,l2=mm;function Ds({delayDuration:e=0,...t}){return a.jsx(o2,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Ml({...e}){return a.jsx(Ds,{children:a.jsx(s2,{"data-slot":"tooltip",...e})})}function Al({...e}){return a.jsx(i2,{"data-slot":"tooltip-trigger",...e})}function Nl({className:e,sideOffset:t=2,gradient:n,children:r,container:o=document.querySelector(".turtle-widget-root")??document.body,...s}){return a.jsx(a2,{container:o,children:a.jsx(l2,{"data-slot":"tooltip-content",sideOffset:t,className:S("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-neutral-alpha-10 border-border z-50 origin-(--radix-tooltip-content-transform-origin) rounded-lg border p-2 backdrop-blur-lg transition-all",n==="primary"&&"border-gradient-primary",n==="white"&&"border-gradient-white",e),...s,children:r})})}const Eo={xs:"w-3 h-3 text-[8px]",sm:"w-4 h-4 text-[10px]",md:"w-5 h-5 text-xs",lg:"w-6 h-6 text-sm"},Cn=p.forwardRef(({className:e,items:t,label:n,size:r="sm",maxVisible:o=6,showTooltip:s=!1,...i},l)=>{const[c,u]=p.useState(new Set);if(!t||t.length===0)return null;const f=E.useMemo(()=>t.map((w,C)=>typeof w=="string"?{icon:w,name:"",id:`item-${C}`}:{...w,id:w.id||`item-${C}`}).filter((w,C,R)=>C===R.findIndex(P=>P.icon===w.icon)),[t]),d=f.slice(0,o),m=f.length-o,h=f.slice(o),v=x=>{u(y=>new Set(y).add(x))},g=(x,y)=>a.jsxs(ss,{className:S(Eo[r],"border border-background transition-all hover:z-10 hover:scale-110",!c.has(x.icon)&&"animate-pulse"),children:[a.jsx(Tl,{src:x.icon,alt:x.name||"Icon",onLoad:()=>v(x.icon)}),a.jsx(is,{className:S("font-medium",Eo[r].split(" ").pop()),children:x.name?x.name.slice(0,2).toUpperCase():"?"})]},x.id||y),b=(x,y)=>!s||!y?x:a.jsxs(Ml,{children:[a.jsx(Al,{asChild:!0,children:x}),a.jsx(Nl,{side:"top",className:"text-xs",children:y})]});return a.jsx(Ds,{children:a.jsxs("div",{ref:l,className:S("flex items-center gap-1",e),role:"list","aria-label":n||"Icon list",...i,children:[n&&a.jsxs("span",{className:"text-xs text-muted-foreground mr-1",children:[n,":"]}),a.jsxs("div",{className:"flex -space-x-1",children:[d.map((x,y)=>a.jsx("div",{role:"listitem",children:b(g(x,y),x.name)},x.id||y)),m>0&&a.jsx("div",{role:"listitem",children:b(a.jsx(ss,{className:S(Eo[r],"border border-background bg-muted hover:bg-muted/80 transition-all"),"aria-label":`${m} more items`,children:a.jsxs(is,{className:S("font-semibold",Eo[r].split(" ").pop()),children:["+",m]})}),h.map(x=>x.name).filter(Boolean).join(", ")||`${m} more items`)})]})]})})});Cn.displayName="IconList";const vm=E.createContext({});function c2(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const kl=typeof window<"u",u2=kl?E.useLayoutEffect:E.useEffect,Il=E.createContext(null);function Dl(e,t){e.indexOf(t)===-1&&e.push(t)}function Ll(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Mt=(e,t,n)=>n>t?t:n<e?e:n;function da(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let fr=()=>{},At=()=>{};process.env.NODE_ENV!=="production"&&(fr=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(da(t,n))},At=(e,t,n)=>{if(!e)throw new Error(da(t,n))});const Nt={},xm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function bm(e){return typeof e=="object"&&e!==null}const ym=e=>/^0[^.\s]+$/u.test(e);function Ol(e){let t;return()=>(t===void 0&&(t=e()),t)}const et=e=>e,d2=(e,t)=>n=>t(e(n)),eo=(...e)=>e.reduce(d2),Or=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Fl{constructor(){this.subscriptions=[]}add(t){return Dl(this.subscriptions,t),()=>Ll(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ct=e=>e*1e3,Je=e=>e/1e3;function wm(e,t){return t?e*(1e3/t):0}const $u=new Set;function $l(e,t,n){e||$u.has(t)||(console.warn(da(t,n)),$u.add(t))}const Cm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,f2=1e-7,p2=12;function m2(e,t,n,r,o){let s,i,l=0;do i=t+(n-t)/2,s=Cm(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>f2&&++l<p2);return i}function to(e,t,n,r){if(e===t&&n===r)return et;const o=s=>m2(s,0,1,e,n);return s=>s===0||s===1?s:Cm(o(s),t,r)}const Sm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rm=e=>t=>1-e(1-t),jm=to(.33,1.53,.69,.99),Vl=Rm(jm),Em=Sm(Vl),Tm=e=>(e*=2)<1?.5*Vl(e):.5*(2-Math.pow(2,-10*(e-1))),Bl=e=>1-Math.sin(Math.acos(e)),Pm=Rm(Bl),_m=Sm(Bl),h2=to(.42,0,1,1),g2=to(0,0,.58,1),Mm=to(.42,0,.58,1),v2=e=>Array.isArray(e)&&typeof e[0]!="number",Am=e=>Array.isArray(e)&&typeof e[0]=="number",Vu={linear:et,easeIn:h2,easeInOut:Mm,easeOut:g2,circIn:Bl,circInOut:_m,circOut:Pm,backIn:Vl,backInOut:Em,backOut:jm,anticipate:Tm},x2=e=>typeof e=="string",Bu=e=>{if(Am(e)){At(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return to(t,n,r,o)}else if(x2(e))return At(Vu[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Vu[e];return e},To=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function b2(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(f){i.has(f)&&(u.schedule(f),e()),f(l)}const u={schedule:(f,d=!1,m=!1)=>{const v=m&&o?n:r;return d&&i.add(f),v.has(f)||v.add(f),f},cancel:f=>{r.delete(f),i.delete(f)},process:f=>{if(l=f,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,s&&(s=!1,u.process(f))}};return u}const y2=40;function Nm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=To.reduce((w,C)=>(w[C]=b2(s),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:f,update:d,preRender:m,render:h,postRender:v}=i,g=()=>{const w=Nt.useManualTiming?o.timestamp:performance.now();n=!1,Nt.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,y2),1)),o.timestamp=w,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),m.process(o),h.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(g))},b=()=>{n=!0,r=!0,o.isProcessing||e(g)};return{schedule:To.reduce((w,C)=>{const R=i[C];return w[C]=(P,T=!1,j=!1)=>(n||b(),R.schedule(P,T,j)),w},{}),cancel:w=>{for(let C=0;C<To.length;C++)i[To[C]].cancel(w)},state:o,steps:i}}const{schedule:xe,cancel:qt,state:Le,steps:wi}=Nm(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let zo;function w2(){zo=void 0}const He={now:()=>(zo===void 0&&He.set(Le.isProcessing||Nt.useManualTiming?Le.timestamp:performance.now()),zo),set:e=>{zo=e,queueMicrotask(w2)}},km=e=>t=>typeof t=="string"&&t.startsWith(e),zl=km("--"),C2=km("var(--"),Hl=e=>C2(e)?S2.test(e.split("/*")[0].trim()):!1,S2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Fr={...pr,transform:e=>Mt(0,1,e)},Po={...pr,default:1},_r=e=>Math.round(e*1e5)/1e5,Gl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function R2(e){return e==null}const j2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ul=(e,t)=>n=>!!(typeof n=="string"&&j2.test(n)&&n.startsWith(e)||t&&!R2(n)&&Object.prototype.hasOwnProperty.call(n,t)),Im=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,l]=r.match(Gl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},E2=e=>Mt(0,255,e),Ci={...pr,transform:e=>Math.round(E2(e))},hn={test:Ul("rgb","red"),parse:Im("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ci.transform(e)+", "+Ci.transform(t)+", "+Ci.transform(n)+", "+_r(Fr.transform(r))+")"};function T2(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const fa={test:Ul("#"),parse:T2,transform:hn.transform},no=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ft=no("deg"),bt=no("%"),re=no("px"),P2=no("vh"),_2=no("vw"),zu={...bt,parse:e=>bt.parse(e)/100,transform:e=>bt.transform(e*100)},Vn={test:Ul("hsl","hue"),parse:Im("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bt.transform(_r(t))+", "+bt.transform(_r(n))+", "+_r(Fr.transform(r))+")"},Te={test:e=>hn.test(e)||fa.test(e)||Vn.test(e),parse:e=>hn.test(e)?hn.parse(e):Vn.test(e)?Vn.parse(e):fa.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?hn.transform(e):Vn.transform(e),getAnimatableNone:e=>{const t=Te.parse(e);return t.alpha=0,Te.transform(t)}},M2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function A2(e){return isNaN(e)&&typeof e=="string"&&(e.match(Gl)?.length||0)+(e.match(M2)?.length||0)>0}const Dm="number",Lm="color",N2="var",k2="var(",Hu="${}",I2=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $r(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const l=t.replace(I2,c=>(Te.test(c)?(r.color.push(s),o.push(Lm),n.push(Te.parse(c))):c.startsWith(k2)?(r.var.push(s),o.push(N2),n.push(c)):(r.number.push(s),o.push(Dm),n.push(parseFloat(c))),++s,Hu)).split(Hu);return{values:n,split:l,indexes:r,types:o}}function Om(e){return $r(e).values}function Fm(e){const{split:t,types:n}=$r(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const l=n[i];l===Dm?s+=_r(o[i]):l===Lm?s+=Te.transform(o[i]):s+=o[i]}return s}}const D2=e=>typeof e=="number"?0:Te.test(e)?Te.getAnimatableNone(e):e;function L2(e){const t=Om(e);return Fm(e)(t.map(D2))}const Yt={test:A2,parse:Om,createTransformer:Fm,getAnimatableNone:L2};function Si(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function O2({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=Si(c,l,e+1/3),s=Si(c,l,e),i=Si(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function as(e,t){return n=>n>0?t:e}const Ce=(e,t,n)=>e+(t-e)*n,Ri=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},F2=[fa,hn,Vn],$2=e=>F2.find(t=>t.test(e));function Gu(e){const t=$2(e);if(fr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Vn&&(n=O2(n)),n}const Uu=(e,t)=>{const n=Gu(e),r=Gu(t);if(!n||!r)return as(e,t);const o={...n};return s=>(o.red=Ri(n.red,r.red,s),o.green=Ri(n.green,r.green,s),o.blue=Ri(n.blue,r.blue,s),o.alpha=Ce(n.alpha,r.alpha,s),hn.transform(o))},pa=new Set(["none","hidden"]);function V2(e,t){return pa.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function B2(e,t){return n=>Ce(e,t,n)}function Wl(e){return typeof e=="number"?B2:typeof e=="string"?Hl(e)?as:Te.test(e)?Uu:G2:Array.isArray(e)?$m:typeof e=="object"?Te.test(e)?Uu:z2:as}function $m(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Wl(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function z2(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Wl(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function H2(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],l=e.values[i]??0;n[o]=l,r[s]++}return n}const G2=(e,t)=>{const n=Yt.createTransformer(t),r=$r(e),o=$r(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?pa.has(e)&&!o.values.length||pa.has(t)&&!r.values.length?V2(e,t):eo($m(H2(r,o),o.values),n):(fr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),as(e,t))};function Vm(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ce(e,t,n):Wl(e)(e,t)}const U2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>xe.update(t,n),stop:()=>qt(t),now:()=>Le.isProcessing?Le.timestamp:He.now()}},Bm=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ls=2e4;function Kl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ls;)t+=n,r=e.next(t);return t>=ls?1/0:t}function W2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Kl(r),ls);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:Je(o)}}const K2=5;function zm(e,t,n){const r=Math.max(t-K2,0);return wm(n-e(r),t-r)}const we={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ji=.001;function q2({duration:e=we.duration,bounce:t=we.bounce,velocity:n=we.velocity,mass:r=we.mass}){let o,s;fr(e<=ct(we.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Mt(we.minDamping,we.maxDamping,i),e=Mt(we.minDuration,we.maxDuration,Je(e)),i<1?(o=u=>{const f=u*i,d=f*e,m=f-n,h=ma(u,i),v=Math.exp(-d);return ji-m/h*v},s=u=>{const d=u*i*e,m=d*n+n,h=Math.pow(i,2)*Math.pow(u,2)*e,v=Math.exp(-d),g=ma(Math.pow(u,2),i);return(-o(u)+ji>0?-1:1)*((m-h)*v)/g}):(o=u=>{const f=Math.exp(-u*e),d=(u-n)*e+1;return-ji+f*d},s=u=>{const f=Math.exp(-u*e),d=(n-u)*(e*e);return f*d});const l=5/e,c=X2(o,s,l);if(e=ct(e),isNaN(c))return{stiffness:we.stiffness,damping:we.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const Y2=12;function X2(e,t,n){let r=n;for(let o=1;o<Y2;o++)r=r-e(r)/t(r);return r}function ma(e,t){return e*Math.sqrt(1-t*t)}const Z2=["duration","bounce"],Q2=["stiffness","damping","mass"];function Wu(e,t){return t.some(n=>e[n]!==void 0)}function J2(e){let t={velocity:we.velocity,stiffness:we.stiffness,damping:we.damping,mass:we.mass,isResolvedFromDuration:!1,...e};if(!Wu(e,Q2)&&Wu(e,Z2))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Mt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:we.mass,stiffness:o,damping:s}}else{const n=q2(e);t={...t,...n,mass:we.mass},t.isResolvedFromDuration=!0}return t}function cs(e=we.visualDuration,t=we.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:f,duration:d,velocity:m,isResolvedFromDuration:h}=J2({...n,velocity:-Je(n.velocity||0)}),v=m||0,g=u/(2*Math.sqrt(c*f)),b=i-s,x=Je(Math.sqrt(c/f)),y=Math.abs(b)<5;r||(r=y?we.restSpeed.granular:we.restSpeed.default),o||(o=y?we.restDelta.granular:we.restDelta.default);let w;if(g<1){const R=ma(x,g);w=P=>{const T=Math.exp(-g*x*P);return i-T*((v+g*x*b)/R*Math.sin(R*P)+b*Math.cos(R*P))}}else if(g===1)w=R=>i-Math.exp(-x*R)*(b+(v+x*b)*R);else{const R=x*Math.sqrt(g*g-1);w=P=>{const T=Math.exp(-g*x*P),j=Math.min(R*P,300);return i-T*((v+g*x*b)*Math.sinh(j)+R*b*Math.cosh(j))/R}}const C={calculatedDuration:h&&d||null,next:R=>{const P=w(R);if(h)l.done=R>=d;else{let T=R===0?v:0;g<1&&(T=R===0?ct(v):zm(w,R,P));const j=Math.abs(T)<=r,M=Math.abs(i-P)<=o;l.done=j&&M}return l.value=l.done?i:P,l},toString:()=>{const R=Math.min(Kl(C),ls),P=Bm(T=>C.next(R*T).value,R,30);return R+"ms "+P},toTransition:()=>{}};return C}cs.applyToOptions=e=>{const t=W2(e,100,cs);return e.ease=t.ease,e.duration=ct(t.duration),e.type="keyframes",e};function ha({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:l,max:c,restDelta:u=.5,restSpeed:f}){const d=e[0],m={done:!1,value:d},h=j=>l!==void 0&&j<l||c!==void 0&&j>c,v=j=>l===void 0?c:c===void 0||Math.abs(l-j)<Math.abs(c-j)?l:c;let g=n*t;const b=d+g,x=i===void 0?b:i(b);x!==b&&(g=x-d);const y=j=>-g*Math.exp(-j/r),w=j=>x+y(j),C=j=>{const M=y(j),D=w(j);m.done=Math.abs(M)<=u,m.value=m.done?x:D};let R,P;const T=j=>{h(m.value)&&(R=j,P=cs({keyframes:[m.value,v(m.value)],velocity:zm(w,j,m.value),damping:o,stiffness:s,restDelta:u,restSpeed:f}))};return T(0),{calculatedDuration:null,next:j=>{let M=!1;return!P&&R===void 0&&(M=!0,C(j),T(j)),R!==void 0&&j>=R?P.next(j-R):(!M&&C(j),m)}}}function e5(e,t,n){const r=[],o=n||Nt.mix||Vm,s=e.length-1;for(let i=0;i<s;i++){let l=o(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||et:t;l=eo(c,l)}r.push(l)}return r}function t5(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(At(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=e5(t,r,o),c=l.length,u=f=>{if(i&&f<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(f<e[d+1]);d++);const m=Or(e[d],e[d+1],f);return l[d](m)};return n?f=>u(Mt(e[0],e[s-1],f)):u}function n5(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Or(0,t,r);e.push(Ce(n,1,o))}}function r5(e){const t=[0];return n5(t,e.length-1),t}function o5(e,t){return e.map(n=>n*t)}function s5(e,t){return e.map(()=>t||Mm).splice(0,e.length-1)}function Bn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=v2(r)?r.map(Bu):Bu(r),s={done:!1,value:t[0]},i=o5(n&&n.length===t.length?n:r5(t),e),l=t5(i,t,{ease:Array.isArray(o)?o:s5(t,o)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const i5=e=>e!==null;function ql(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(i5),l=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const a5={decay:ha,inertia:ha,tween:Bn,keyframes:Bn,spring:cs};function Hm(e){typeof e.type=="string"&&(e.type=a5[e.type])}class Yl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const l5=e=>e/100;class Xl extends Yl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==He.now()&&this.tick(He.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Hm(t);const{type:n=Bn,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:l}=t;const c=n||Bn;process.env.NODE_ENV!=="production"&&c!==Bn&&At(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Bn&&typeof l[0]!="number"&&(this.mixKeyframes=eo(l5,Vm(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Kl(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:f,repeat:d,repeatType:m,repeatDelay:h,type:v,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>o;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,C=r;if(d){const j=Math.min(this.currentTime,o)/l;let M=Math.floor(j),D=j%1;!D&&j>=1&&(D=1),D===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(m==="reverse"?(D=1-D,h&&(D-=h/l)):m==="mirror"&&(C=i)),w=Mt(0,1,D)*l}const R=y?{done:!1,value:f[0]}:C.next(w);s&&(R.value=s(R.value));let{done:P}=R;!y&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return T&&v!==ha&&(R.value=ql(f,this.options,b,this.speed)),g&&g(R.value),T&&this.finish(),R}then(t,n){return this.finished.then(t,n)}get duration(){return Je(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Je(t)}get time(){return Je(this.currentTime)}set time(t){t=ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(He.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Je(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=U2,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(He.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function c5(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gn=e=>e*180/Math.PI,ga=e=>{const t=gn(Math.atan2(e[1],e[0]));return va(t)},u5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ga,rotateZ:ga,skewX:e=>gn(Math.atan(e[1])),skewY:e=>gn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},va=e=>(e=e%360,e<0&&(e+=360),e),Ku=ga,qu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),d5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qu,scaleY:Yu,scale:e=>(qu(e)+Yu(e))/2,rotateX:e=>va(gn(Math.atan2(e[6],e[5]))),rotateY:e=>va(gn(Math.atan2(-e[2],e[0]))),rotateZ:Ku,rotate:Ku,skewX:e=>gn(Math.atan(e[4])),skewY:e=>gn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xa(e){return e.includes("scale")?1:0}function ba(e,t){if(!e||e==="none")return xa(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=d5,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=u5,o=l}if(!o)return xa(t);const s=r[t],i=o[1].split(",").map(p5);return typeof s=="function"?s(i):i[s]}const f5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ba(n,t)};function p5(e){return parseFloat(e.trim())}const mr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=new Set(mr),Xu=e=>e===pr||e===re,m5=new Set(["x","y","z"]),h5=mr.filter(e=>!m5.has(e));function g5(e){const t=[];return h5.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ba(t,"x"),y:(e,{transform:t})=>ba(t,"y")};bn.translateX=bn.x;bn.translateY=bn.y;const yn=new Set;let ya=!1,wa=!1,Ca=!1;function Gm(){if(wa){const e=Array.from(yn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=g5(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{r.getValue(s)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wa=!1,ya=!1,yn.forEach(e=>e.complete(Ca)),yn.clear()}function Um(){yn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wa=!0)})}function v5(){Ca=!0,Um(),Gm(),Ca=!1}class Zl{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(yn.add(this),ya||(ya=!0,xe.read(Um),xe.resolveKeyframes(Gm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}c5(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yn.delete(this)}cancel(){this.state==="scheduled"&&(yn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const x5=e=>e.startsWith("--");function b5(e,t,n){x5(t)?e.style.setProperty(t,n):e.style[t]=n}const y5=Ol(()=>window.ScrollTimeline!==void 0),w5={};function C5(e,t){const n=Ol(e);return()=>w5[t]??n()}const Wm=C5(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Er=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Er([0,.65,.55,1]),circOut:Er([.55,0,1,.45]),backIn:Er([.31,.01,.66,-.59]),backOut:Er([.33,1.53,.69,.99])};function Km(e,t){if(e)return typeof e=="function"?Wm()?Bm(e,t):"ease-out":Am(e)?Er(e):Array.isArray(e)?e.map(n=>Km(n,t)||Zu.easeOut):Zu[e]}function S5(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:l="easeOut",times:c}={},u=void 0){const f={[t]:n};c&&(f.offset=c);const d=Km(l,o);Array.isArray(d)&&(f.easing=d);const m={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(f,m)}function qm(e){return typeof e=="function"&&"applyToOptions"in e}function R5({type:e,...t}){return qm(e)&&Wm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class j5 extends Yl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,At(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=R5(t);this.animation=S5(n,r,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const f=ql(o,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(f):b5(n,r,f),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Je(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Je(t)}get time(){return Je(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ct(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&y5()?(this.animation.timeline=t,et):n(this)}}const Ym={anticipate:Tm,backInOut:Em,circInOut:_m};function E5(e){return e in Ym}function T5(e){typeof e.ease=="string"&&E5(e.ease)&&(e.ease=Ym[e.ease])}const Qu=10;class P5 extends j5{constructor(t){T5(t),Hm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Xl({...i,autoplay:!1}),c=ct(this.finishedTime??this.time);n.setWithVelocity(l.sample(c-Qu).value,l.sample(c).value,Qu),l.stop()}}const Ju=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function _5(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function M5(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Ju(o,t),l=Ju(s,t);return fr(i===l,`You are trying to animate ${t} from "${o}" to "${s}". "${i?s:o}" is not an animatable value.`,"value-not-animatable"),!i||!l?!1:_5(e)||(n==="spring"||qm(n))&&r}function Sa(e){e.duration=0,e.type="keyframes"}const A5=new Set(["opacity","clipPath","filter","transform"]),N5=Ol(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function k5(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return N5()&&n&&A5.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const I5=40;class D5 extends Yl{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:l,name:c,motionValue:u,element:f,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=He.now();const m={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:c,motionValue:u,element:f,...d},h=f?.KeyframeResolver||Zl;this.keyframeResolver=new h(l,(v,g,b)=>this.onKeyframesResolved(v,g,m,!b),c,u,f),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:i,velocity:l,delay:c,isHandoff:u,onUpdate:f}=r;this.resolvedAt=He.now(),M5(t,s,i,l)||((Nt.instantAnimations||!c)&&f?.(ql(t,r,n)),t[0]=t[t.length-1],Sa(r),r.repeat=0);const m={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>I5?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&k5(m)?new P5({...m,element:m.motionValue.owner.current}):new Xl(m);h.finished.then(()=>this.notifyFinished()).catch(et),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),v5()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const L5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function O5(e){const t=L5.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const F5=4;function Xm(e,t,n=1){At(n<=F5,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=O5(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return xm(i)?parseFloat(i):i}return Hl(o)?Xm(o,t,n+1):o}function Ql(e,t){return e?.[t]??e?.default??e}const Zm=new Set(["width","height","top","left","right","bottom",...mr]),$5={test:e=>e==="auto",parse:e=>e},Qm=e=>t=>t.test(e),Jm=[pr,re,bt,Ft,_2,P2,$5],ed=e=>Jm.find(Qm(e));function V5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ym(e):!0}const B5=new Set(["brightness","contrast","saturate","opacity"]);function z5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gl)||[];if(!r)return e;const o=n.replace(r,"");let s=B5.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const H5=/\b([a-z-]*)\(.*?\)/gu,Ra={...Yt,getAnimatableNone:e=>{const t=e.match(H5);return t?t.map(z5).join(" "):e}},td={...pr,transform:Math.round},G5={rotate:Ft,rotateX:Ft,rotateY:Ft,rotateZ:Ft,scale:Po,scaleX:Po,scaleY:Po,scaleZ:Po,skew:Ft,skewX:Ft,skewY:Ft,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:Fr,originX:zu,originY:zu,originZ:re},Jl={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...G5,zIndex:td,fillOpacity:Fr,strokeOpacity:Fr,numOctaves:td},U5={...Jl,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Ra,WebkitFilter:Ra},eh=e=>U5[e];function th(e,t){let n=eh(e);return n!==Ra&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const W5=new Set(["auto","none","0"]);function K5(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!W5.has(s)&&$r(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=th(n,o)}class q5 extends Zl{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Hl(u))){const f=Xm(u,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Zm.has(r)||t.length!==2)return;const[o,s]=t,i=ed(o),l=ed(s);if(i!==l)if(Xu(i)&&Xu(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else bn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||V5(t[o]))&&r.push(o);r.length&&K5(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=bn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Y5(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const nh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function X5(e){return bm(e)&&"offsetHeight"in e}const nd=30,Z5=e=>!isNaN(parseFloat(e));class Q5{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=He.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=He.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Z5(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$l(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fl);const r=this.events[t].add(n);return t==="change"?()=>{r(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=He.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>nd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,nd);return wm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function er(e,t){return new Q5(e,t)}const{schedule:ec}=Nm(queueMicrotask,!1),at={x:!1,y:!1};function rh(){return at.x||at.y}function J5(e){return e==="x"||e==="y"?at[e]?null:(at[e]=!0,()=>{at[e]=!1}):at.x||at.y?null:(at.x=at.y=!0,()=>{at.x=at.y=!1})}function oh(e,t){const n=Y5(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function rd(e){return!(e.pointerType==="touch"||rh())}function eR(e,t,n={}){const[r,o,s]=oh(e,n),i=l=>{if(!rd(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const f=d=>{rd(d)&&(u(d),c.removeEventListener("pointerleave",f))};c.addEventListener("pointerleave",f,o)};return r.forEach(l=>{l.addEventListener("pointerenter",i,o)}),s}const sh=(e,t)=>t?e===t?!0:sh(e,t.parentElement):!1,tc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nR(e){return tR.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function od(e){return t=>{t.key==="Enter"&&e(t)}}function Ei(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const rR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=od(()=>{if(Ho.has(n))return;Ei(n,"down");const o=od(()=>{Ei(n,"up")}),s=()=>Ei(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function sd(e){return tc(e)&&!rh()}function oR(e,t,n={}){const[r,o,s]=oh(e,n),i=l=>{const c=l.currentTarget;if(!sd(l))return;Ho.add(c);const u=t(c,l),f=(h,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",m),Ho.has(c)&&Ho.delete(c),sd(h)&&typeof u=="function"&&u(h,{success:v})},d=h=>{f(h,c===window||c===document||n.useGlobalTarget||sh(c,h.target))},m=h=>{f(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",m,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",i,o),X5(l)&&(l.addEventListener("focus",u=>rR(u,o)),!nR(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function ih(e){return bm(e)&&"ownerSVGElement"in e}function sR(e){return ih(e)&&e.tagName==="svg"}const $e=e=>!!(e&&e.getVelocity),iR=[...Jm,Te,Yt],aR=e=>iR.find(Qm(e)),ah=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function lR(e=!0){const t=E.useContext(Il);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=E.useId();E.useEffect(()=>{if(e)return o(s)},[e]);const i=E.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const lh=E.createContext({strict:!1}),id={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tr={};for(const e in id)tr[e]={isEnabled:t=>id[e].some(n=>!!t[n])};function cR(e){for(const t in e)tr[t]={...tr[t],...e[t]}}const uR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uR.has(e)}let ch=e=>!us(e);function dR(e){typeof e=="function"&&(ch=t=>t.startsWith("on")?!us(t):e(t))}try{dR(require("@emotion/is-prop-valid").default)}catch{}function fR(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(ch(o)||n===!0&&us(o)||!t&&!us(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Ls=E.createContext({});function Os(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vr(e){return typeof e=="string"||Array.isArray(e)}const nc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rc=["initial",...nc];function Fs(e){return Os(e.animate)||rc.some(t=>Vr(e[t]))}function uh(e){return!!(Fs(e)||e.variants)}function pR(e,t){if(Fs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vr(n)?n:void 0,animate:Vr(r)?r:void 0}}return e.inherit!==!1?t:{}}function mR(e){const{initial:t,animate:n}=pR(e,E.useContext(Ls));return E.useMemo(()=>({initial:t,animate:n}),[ad(t),ad(n)])}function ad(e){return Array.isArray(e)?e.join(" "):e}const Br={};function hR(e){for(const t in e)Br[t]=e[t],zl(t)&&(Br[t].isCSSVariable=!0)}function dh(e,{layout:t,layoutId:n}){return hr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Br[e]||e==="opacity")}const gR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vR=mr.length;function xR(e,t,n){let r="",o=!0;for(let s=0;s<vR;s++){const i=mr[s],l=e[i];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(i.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=nh(l,Jl[i]);if(!c){o=!1;const f=gR[i]||i;r+=`${f}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function oc(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,l=!1;for(const c in t){const u=t[c];if(hr.has(c)){i=!0;continue}else if(zl(c)){o[c]=u;continue}else{const f=nh(u,Jl[c]);c.startsWith("origin")?(l=!0,s[c]=f):r[c]=f}}if(t.transform||(i||n?r.transform=xR(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=s;r.transformOrigin=`${c} ${u} ${f}`}}const sc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fh(e,t,n){for(const r in t)!$e(t[r])&&!dh(r,n)&&(e[r]=t[r])}function bR({transformTemplate:e},t){return E.useMemo(()=>{const n=sc();return oc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yR(e,t){const n=e.style||{},r={};return fh(r,n,e),Object.assign(r,bR(e,t)),r}function wR(e,t){const n={},r=yR(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const CR={offset:"stroke-dashoffset",array:"stroke-dasharray"},SR={offset:"strokeDashoffset",array:"strokeDasharray"};function RR(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?CR:SR;e[s.offset]=re.transform(-r);const i=re.transform(t),l=re.transform(n);e[s.array]=`${i} ${l}`}function ph(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...l},c,u,f){if(oc(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:m}=e;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=f?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&RR(d,o,s,i,!1)}const mh=()=>({...sc(),attrs:{}}),hh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function jR(e,t,n,r){const o=E.useMemo(()=>{const s=mh();return ph(s,t,hh(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};fh(s,e.style,e),o.style={...s,...o.style}}return o}const ER=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ic(e){return typeof e!="string"||e.includes("-")?!1:!!(ER.indexOf(e)>-1||/[A-Z]/u.test(e))}function TR(e,t,n,{latestValues:r},o,s=!1){const l=(ic(e)?jR:wR)(t,r,o,e),c=fR(t,typeof e=="string",s),u=e!==E.Fragment?{...c,...l,ref:n}:{},{children:f}=t,d=E.useMemo(()=>$e(f)?f.get():f,[f]);return E.createElement(e,{...u,children:d})}function ld(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ac(e,t,n,r){if(typeof t=="function"){const[o,s]=ld(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ld(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Go(e){return $e(e)?e.get():e}function PR({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:_R(n,r,o,e),renderState:t()}}function _R(e,t,n,r){const o={},s=r(e,{});for(const m in s)o[m]=Go(s[m]);let{initial:i,animate:l}=e;const c=Fs(e),u=uh(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),l===void 0&&(l=t.animate));let f=n?n.initial===!1:!1;f=f||i===!1;const d=f?l:i;if(d&&typeof d!="boolean"&&!Os(d)){const m=Array.isArray(d)?d:[d];for(let h=0;h<m.length;h++){const v=ac(e,m[h]);if(v){const{transitionEnd:g,transition:b,...x}=v;for(const y in x){let w=x[y];if(Array.isArray(w)){const C=f?w.length-1:0;w=w[C]}w!==null&&(o[y]=w)}for(const y in g)o[y]=g[y]}}}return o}const gh=e=>(t,n)=>{const r=E.useContext(Ls),o=E.useContext(Il),s=()=>PR(e,t,r,o);return n?s():c2(s)};function lc(e,t,n){const{style:r}=e,o={};for(const s in r)($e(r[s])||t.style&&$e(t.style[s])||dh(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const MR=gh({scrapeMotionValuesFromProps:lc,createRenderState:sc});function vh(e,t,n){const r=lc(e,t,n);for(const o in e)if($e(e[o])||$e(t[o])){const s=mr.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const AR=gh({scrapeMotionValuesFromProps:vh,createRenderState:mh}),NR=Symbol.for("motionComponentSymbol");function zn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kR(e,t,n){return E.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):zn(n)&&(n.current=r))},[t])}const cc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),IR="framerAppearId",xh="data-"+cc(IR),bh=E.createContext({});function DR(e,t,n,r,o){const{visualElement:s}=E.useContext(Ls),i=E.useContext(lh),l=E.useContext(Il),c=E.useContext(ah).reducedMotion,u=E.useRef(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const f=u.current,d=E.useContext(bh);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&LR(u.current,n,o,d);const m=E.useRef(!1);E.useInsertionEffect(()=>{f&&m.current&&f.update(n,l)});const h=n[xh],v=E.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return u2(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),E.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),v.current=!1),f.enteringChildren=void 0)}),f}function LR(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yh(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||l&&zn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:c,layoutRoot:u})}function yh(e){if(e)return e.options.allowProjection!==!1?e.projection:yh(e.parent)}function Ti(e,{forwardMotionProps:t=!1}={},n,r){n&&cR(n);const o=ic(e)?AR:MR;function s(l,c){let u;const f={...E.useContext(ah),...l,layoutId:OR(l)},{isStatic:d}=f,m=mR(l),h=o(l,d);if(!d&&kl){FR(f,n);const v=$R(f);u=v.MeasureLayout,m.visualElement=DR(e,h,f,r,v.ProjectionNode)}return a.jsxs(Ls.Provider,{value:m,children:[u&&m.visualElement?a.jsx(u,{visualElement:m.visualElement,...f}):null,TR(e,l,kR(h,m.visualElement,c),h,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=E.forwardRef(s);return i[NR]=e,i}function OR({layoutId:e}){const t=E.useContext(vm).id;return t&&e!==void 0?t+"-"+e:e}function FR(e,t){const n=E.useContext(lh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?fr(!1,r,"lazy-strict-mode"):At(!1,r,"lazy-strict-mode")}}function $R(e){const{drag:t,layout:n}=tr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function VR(e,t){if(typeof Proxy>"u")return Ti;const n=new Map,r=(s,i)=>Ti(s,i,e,t),o=(s,i)=>(process.env.NODE_ENV!=="production"&&$l(!1,"motion() is deprecated. Use motion.create() instead."),r(s,i));return new Proxy(o,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,Ti(i,void 0,e,t)),n.get(i))})}function wh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zR(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Pi(e){return e===void 0||e===1}function ja({scale:e,scaleX:t,scaleY:n}){return!Pi(e)||!Pi(t)||!Pi(n)}function pn(e){return ja(e)||Ch(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ch(e){return cd(e.x)||cd(e.y)}function cd(e){return e&&e!=="0%"}function ds(e,t,n){const r=e-n,o=t*r;return n+o}function ud(e,t,n,r,o){return o!==void 0&&(e=ds(e,o,r)),ds(e,n,r)+t}function Ea(e,t=0,n=1,r,o){e.min=ud(e.min,t,n,r,o),e.max=ud(e.max,t,n,r,o)}function Sh(e,{x:t,y:n}){Ea(e.x,t.translate,t.scale,t.originPoint),Ea(e.y,n.translate,n.scale,n.originPoint)}const dd=.999999999999,fd=1.0000000000001;function HR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let l=0;l<o;l++){s=n[l],i=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Gn(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Sh(e,i)),r&&pn(s.latestValues)&&Gn(e,s.latestValues))}t.x<fd&&t.x>dd&&(t.x=1),t.y<fd&&t.y>dd&&(t.y=1)}function Hn(e,t){e.min=e.min+t,e.max=e.max+t}function pd(e,t,n,r,o=.5){const s=Ce(e.min,e.max,o);Ea(e,t,n,s,r)}function Gn(e,t){pd(e.x,t.x,t.scaleX,t.scale,t.originX),pd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rh(e,t){return wh(zR(e.getBoundingClientRect(),t))}function GR(e,t,n){const r=Rh(e,n),{scroll:o}=t;return o&&(Hn(r.x,o.offset.x),Hn(r.y,o.offset.y)),r}const md=()=>({translate:0,scale:1,origin:0,originPoint:0}),Un=()=>({x:md(),y:md()}),hd=()=>({min:0,max:0}),je=()=>({x:hd(),y:hd()}),Ta={current:null},jh={current:!1};function UR(){if(jh.current=!0,!!kl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ta.current=e.matches;e.addEventListener("change",t),t()}else Ta.current=!1}const WR=new WeakMap;function KR(e,t,n){for(const r in t){const o=t[r],s=n[r];if($e(o))e.addValue(r,o);else if($e(s))e.addValue(r,er(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,er(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const gd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class qR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=He.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,xe.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Fs(n),this.isVariantNode=uh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in d){const h=d[m];c[m]!==void 0&&$e(h)&&h.set(c[m])}}mount(t){this.current=t,WR.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),jh.current||UR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ta.current,process.env.NODE_ENV!=="production"&&$l(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=hr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in tr){const n=tr[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<gd.length;r++){const o=gd[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=KR(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=er(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(xm(r)||ym(r))?r=parseFloat(r):!aR(r)&&Yt.test(n)&&(r=th(t,n)),this.setBaseTarget(t,$e(r)?r.get():r)),$e(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ac(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!$e(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ec.render(this.render)}}class Eh extends qR{constructor(){super(...arguments),this.KeyframeResolver=q5}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$e(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Th(e,{style:t,vars:n},r,o){const s=e.style;let i;for(i in t)s[i]=t[i];o?.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function YR(e){return window.getComputedStyle(e)}class XR extends Eh{constructor(){super(...arguments),this.type="html",this.renderInstance=Th}readValueFromInstance(t,n){if(hr.has(n))return this.projection?.isProjecting?xa(n):f5(t,n);{const r=YR(t),o=(zl(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rh(t,n)}build(t,n,r){oc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return lc(t,n,r)}}const Ph=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function ZR(e,t,n,r){Th(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ph.has(o)?o:cc(o),t.attrs[o])}class QR extends Eh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hr.has(n)){const r=eh(n);return r&&r.default||0}return n=Ph.has(n)?n:cc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vh(t,n,r)}build(t,n,r){ph(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){ZR(t,n,r,o)}mount(t){this.isSVGTag=hh(t.tagName),super.mount(t)}}const JR=(e,t)=>ic(e)?new QR(t):new XR(t,{allowProjection:e!==E.Fragment});function qn(e,t,n){const r=e.getProps();return ac(r,t,n!==void 0?n:r.custom,e)}const Pa=e=>Array.isArray(e);function ej(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,er(n))}function tj(e){return Pa(e)?e[e.length-1]||0:e}function nj(e,t){const n=qn(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const l=tj(s[i]);ej(e,i,l)}}function rj(e){return!!($e(e)&&e.add)}function _a(e,t){const n=e.getValue("willChange");if(rj(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _h(e){return e.props[xh]}const oj=e=>e!==null;function sj(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(oj),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const ij={type:"spring",stiffness:500,damping:25,restSpeed:10},aj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lj={type:"keyframes",duration:.8},cj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uj=(e,{keyframes:t})=>t.length>2?lj:hr.has(e)?e.startsWith("scale")?aj(t[1]):ij:cj;function dj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:l,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const uc=(e,t,n,r={},o,s)=>i=>{const l=Ql(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ct(c);const f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{i(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:o};dj(l)||Object.assign(f,uj(e,f)),f.duration&&(f.duration=ct(f.duration)),f.repeatDelay&&(f.repeatDelay=ct(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(Sa(f),f.delay===0&&(d=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(d=!0,Sa(f),f.delay=0),f.allowFlatten=!l.type&&!l.ease,d&&!s&&t.get()!==void 0){const m=sj(f.keyframes,l);if(m!==void 0){xe.update(()=>{f.onUpdate(m),f.onComplete()});return}}return l.isSync?new Xl(f):new D5(f)};function fj({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mh(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,e.latestValues[f]??null),m=l[f];if(m===void 0||u&&fj(u,f))continue;const h={delay:n,...Ql(s||{},f)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===v&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=_h(e);if(x){const y=window.MotionHandoffAnimation(x,f,xe);y!==null&&(h.startTime=y,g=!0)}}_a(e,f),d.start(uc(f,d,m,e.shouldReduceMotion&&Zm.has(f)?{type:!1}:h,e,g));const b=d.animation;b&&c.push(b)}return i&&Promise.all(c).then(()=>{xe.update(()=>{i&&nj(e,i)})}),c}function Ah(e,t,n,r=0,o=1){const s=Array.from(e).sort((u,f)=>u.sortNodePosition(f)).indexOf(t),i=e.size,l=(i-1)*r;return typeof n=="function"?n(s,i):o===1?s*r:l-s*r}function Ma(e,t,n={}){const r=qn(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Mh(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=o;return pj(e,t,c,u,f,d,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[s,i]:[i,s];return c().then(()=>u())}else return Promise.all([s(),i(n.delay)])}function pj(e,t,n=0,r=0,o=0,s=1,i){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Ma(c,t,{...i,delay:n+(typeof r=="function"?0:r)+Ah(e.variantChildren,c,r,o,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function mj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ma(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ma(e,t,n);else{const o=typeof t=="function"?qn(e,t,n.custom):t;r=Promise.all(Mh(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Nh(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hj=rc.length;function kh(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?kh(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hj;n++){const r=rc[n],o=e.props[r];(Vr(o)||o===!1)&&(t[r]=o)}return t}const gj=[...nc].reverse(),vj=nc.length;function xj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>mj(e,n,r)))}function bj(e){let t=xj(e),n=vd(),r=!0;const o=c=>(u,f)=>{const d=qn(e,f,c==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:m,transitionEnd:h,...v}=d;u={...u,...v,...h}}return u};function s(c){t=c(e)}function i(c){const{props:u}=e,f=kh(e.parent)||{},d=[],m=new Set;let h={},v=1/0;for(let b=0;b<vj;b++){const x=gj[b],y=n[x],w=u[x]!==void 0?u[x]:f[x],C=Vr(w),R=x===c?y.isActive:null;R===!1&&(v=b);let P=w===f[x]&&w!==u[x]&&C;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),y.protectedKeys={...h},!y.isActive&&R===null||!w&&!y.prevProp||Os(w)||typeof w=="boolean")continue;const T=yj(y.prevProp,w);let j=T||x===c&&y.isActive&&!P&&C||b>v&&C,M=!1;const D=Array.isArray(w)?w:[w];let z=D.reduce(o(x),{});R===!1&&(z={});const{prevResolvedValues:q={}}=y,Y={...q,...z},G=V=>{j=!0,m.has(V)&&(M=!0,m.delete(V)),y.needsAnimating[V]=!0;const _=e.getValue(V);_&&(_.liveStyle=!1)};for(const V in Y){const _=z[V],O=q[V];if(h.hasOwnProperty(V))continue;let te=!1;Pa(_)&&Pa(O)?te=!Nh(_,O):te=_!==O,te?_!=null?G(V):m.add(V):_!==void 0&&m.has(V)?G(V):y.protectedKeys[V]=!0}y.prevProp=w,y.prevResolvedValues=z,y.isActive&&(h={...h,...z}),r&&e.blockInitialAnimation&&(j=!1);const Z=P&&T;j&&(!Z||M)&&d.push(...D.map(V=>{const _={type:x};if(typeof V=="string"&&r&&!Z&&e.manuallyAnimateOnMount&&e.parent){const{parent:O}=e,te=qn(O,V);if(O.enteringChildren&&te){const{delayChildren:fe}=te.transition||{};_.delay=Ah(O.enteringChildren,e,fe)}}return{animation:V,options:_}}))}if(m.size){const b={};if(typeof u.initial!="boolean"){const x=qn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}m.forEach(x=>{const y=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),b[x]=y??null}),d.push({animation:b})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(c,u)),n[c].isActive=u;const f=i(c);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:i,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=vd()}}}function yj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nh(t,e):!1}function dn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vd(){return{animate:dn(!0),whileInView:dn(),whileHover:dn(),whileTap:dn(),whileDrag:dn(),whileFocus:dn(),exit:dn()}}class nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class wj extends nn{constructor(t){super(t),t.animationState||(t.animationState=bj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Os(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Cj=0;class Sj extends nn{constructor(){super(...arguments),this.id=Cj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Rj={animation:{Feature:wj},exit:{Feature:Sj}};function zr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ro(e){return{point:{x:e.pageX,y:e.pageY}}}const jj=e=>t=>tc(t)&&e(t,ro(t));function Mr(e,t,n,r){return zr(e,t,jj(n),r)}const Ih=1e-4,Ej=1-Ih,Tj=1+Ih,Dh=.01,Pj=0-Dh,_j=0+Dh;function Be(e){return e.max-e.min}function Mj(e,t,n){return Math.abs(e-t)<=n}function xd(e,t,n,r=.5){e.origin=r,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=Be(n)/Be(t),e.translate=Ce(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ej&&e.scale<=Tj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Pj&&e.translate<=_j||isNaN(e.translate))&&(e.translate=0)}function Ar(e,t,n,r){xd(e.x,t.x,n.x,r?r.originX:void 0),xd(e.y,t.y,n.y,r?r.originY:void 0)}function bd(e,t,n){e.min=n.min+t.min,e.max=e.min+Be(t)}function Aj(e,t,n){bd(e.x,t.x,n.x),bd(e.y,t.y,n.y)}function yd(e,t,n){e.min=t.min-n.min,e.max=e.min+Be(t)}function Nr(e,t,n){yd(e.x,t.x,n.x),yd(e.y,t.y,n.y)}function Qe(e){return[e("x"),e("y")]}const Lh=({current:e})=>e?e.ownerDocument.defaultView:null,wd=(e,t)=>Math.abs(e-t);function Nj(e,t){const n=wd(e.x,t.x),r=wd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Oh{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Mi(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,v=Nj(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!v)return;const{point:g}=m,{timestamp:b}=Le;this.history.push({...g,timestamp:b});const{onStart:x,onMove:y}=this.handlers;h||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,h)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=_i(h,this.transformPagePoint),xe.update(this.updatePoint,!0)},this.handlePointerUp=(m,h)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Mi(m.type==="pointercancel"?this.lastMoveEventInfo:_i(h,this.transformPagePoint),this.history);this.startEvent&&v&&v(m,x),g&&g(m,x)},!tc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=o||window;const l=ro(t),c=_i(l,this.transformPagePoint),{point:u}=c,{timestamp:f}=Le;this.history=[{...u,timestamp:f}];const{onSessionStart:d}=n;d&&d(t,Mi(c,this.history)),this.removeListeners=eo(Mr(this.contextWindow,"pointermove",this.handlePointerMove),Mr(this.contextWindow,"pointerup",this.handlePointerUp),Mr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function _i(e,t){return t?{point:t(e.point)}:e}function Cd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mi({point:e},t){return{point:e,delta:Cd(e,Fh(t)),offset:Cd(e,kj(t)),velocity:Ij(t,.1)}}function kj(e){return e[0]}function Fh(e){return e[e.length-1]}function Ij(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Fh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ct(t)));)n--;if(!r)return{x:0,y:0};const s=Je(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Dj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ce(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ce(n,e,r.max):Math.min(e,n)),e}function Sd(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Lj(e,{top:t,left:n,bottom:r,right:o}){return{x:Sd(e.x,n,o),y:Sd(e.y,t,r)}}function Rd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Oj(e,t){return{x:Rd(e.x,t.x),y:Rd(e.y,t.y)}}function Fj(e,t){let n=.5;const r=Be(e),o=Be(t);return o>r?n=Or(t.min,t.max-r,e.min):r>o&&(n=Or(e.min,e.max-o,t.min)),Mt(0,1,n)}function $j(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Aa=.35;function Vj(e=Aa){return e===!1?e=0:e===!0&&(e=Aa),{x:jd(e,"left","right"),y:jd(e,"top","bottom")}}function jd(e,t,n){return{min:Ed(e,t),max:Ed(e,n)}}function Ed(e,t){return typeof e=="number"?e:e[t]||0}const Bj=new WeakMap;class zj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ro(d).point)},i=(d,m)=>{const{drag:h,dragPropagation:v,onDragStart:g}=this.getProps();if(h&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J5(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qe(x=>{let y=this.getAxisMotionValue(x).get()||0;if(bt.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[x];C&&(y=Be(C)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&xe.postRender(()=>g(d,m)),_a(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m;const{dragPropagation:h,dragDirectionLock:v,onDirectionLock:g,onDrag:b}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=m;if(v&&this.currentDirection===null){this.currentDirection=Hj(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),b&&b(d,m)},c=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m,this.stop(d,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Qe(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:f}=this.getProps();this.panSession=new Oh(t,{onSessionStart:s,onStart:i,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:r,contextWindow:Lh(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:i}=o;this.startAnimation(i);const{onDragEnd:l}=this.getProps();l&&xe.postRender(()=>l(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!_o(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Dj(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&zn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Lj(r.layoutBox,t):this.constraints=!1,this.elastic=Vj(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Qe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=$j(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zn(t))return!1;const r=t.current;At(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=GR(r,o.root,this.visualElement.getTransformPagePoint());let i=Oj(o.layout.layoutBox,s);if(n){const l=n(BR(i));this.hasMutatedConstraints=!!l,l&&(i=wh(l))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Qe(f=>{if(!_o(f,n,this.currentDirection))return;let d=c&&c[f]||{};i&&(d={min:0,max:0});const m=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:r?t[f]:0,bounceStiffness:m,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(f,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _a(this.visualElement,t),r.start(uc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qe(n=>{const{drag:r}=this.getProps();if(!_o(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:l}=o.layout.layoutBox[n];s.set(t[n]-Ce(i,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qe(i=>{const l=this.getAxisMotionValue(i);if(l&&this.constraints!==!1){const c=l.get();o[i]=Fj({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qe(i=>{if(!_o(i,t,null))return;const l=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];l.set(Ce(c,u,o[i]))})}addListeners(){if(!this.visualElement.current)return;Bj.set(this.visualElement,this);const t=this.visualElement.current,n=Mr(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();zn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),xe.read(r);const i=zr(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Qe(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=c[f].translate,d.set(d.get()+c[f].translate))}),this.visualElement.render())}));return()=>{i(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Aa,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:l}}}function _o(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Hj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Gj extends nn{constructor(t){super(t),this.removeGroupControls=et,this.removeListeners=et,this.controls=new zj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Td=e=>(t,n)=>{e&&xe.postRender(()=>e(t,n))};class Uj extends nn{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(t){this.session=new Oh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Td(t),onStart:Td(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&xe.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Mr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Uo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Sr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=Pd(e,t.target.x),r=Pd(e,t.target.y);return`${n}% ${r}%`}},Wj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Yt.parse(e);if(o.length>5)return r;const s=Yt.createTransformer(e),i=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+i]/=l,o[1+i]/=c;const u=Ce(l,c,.5);return typeof o[2+i]=="number"&&(o[2+i]/=u),typeof o[3+i]=="number"&&(o[3+i]/=u),s(o)}};let Ai=!1;class Kj extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;hR(qj),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),Ai&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Uo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,Ai=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||xe.postRender(()=>{const l=i.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ec.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;Ai=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $h(e){const[t,n]=lR(),r=E.useContext(vm);return a.jsx(Kj,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(bh),isPresent:t,safeToRemove:n})}const qj={borderRadius:{...Sr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sr,borderTopRightRadius:Sr,borderBottomLeftRadius:Sr,borderBottomRightRadius:Sr,boxShadow:Wj};function Yj(e,t,n){const r=$e(e)?e:er(e);return r.start(uc("",r,t,n)),r.animation}const Xj=(e,t)=>e.depth-t.depth;class Zj{constructor(){this.children=[],this.isDirty=!1}add(t){Dl(this.children,t),this.isDirty=!0}remove(t){Ll(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xj),this.isDirty=!1,this.children.forEach(t)}}function Qj(e,t){const n=He.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(qt(r),e(s-t))};return xe.setup(r,!0),()=>qt(r)}const Vh=["TopLeft","TopRight","BottomLeft","BottomRight"],Jj=Vh.length,_d=e=>typeof e=="string"?parseFloat(e):e,Md=e=>typeof e=="number"||re.test(e);function eE(e,t,n,r,o,s){o?(e.opacity=Ce(0,n.opacity??1,tE(r)),e.opacityExit=Ce(t.opacity??1,0,nE(r))):s&&(e.opacity=Ce(t.opacity??1,n.opacity??1,r));for(let i=0;i<Jj;i++){const l=`border${Vh[i]}Radius`;let c=Ad(t,l),u=Ad(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Md(c)===Md(u)?(e[l]=Math.max(Ce(_d(c),_d(u),r),0),(bt.test(u)||bt.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Ce(t.rotate||0,n.rotate||0,r))}function Ad(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tE=Bh(0,.5,Pm),nE=Bh(.5,.95,et);function Bh(e,t,n){return r=>r<e?0:r>t?1:n(Or(e,t,r))}function Nd(e,t){e.min=t.min,e.max=t.max}function Ze(e,t){Nd(e.x,t.x),Nd(e.y,t.y)}function kd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Id(e,t,n,r,o){return e-=t,e=ds(e,1/n,r),o!==void 0&&(e=ds(e,1/o,r)),e}function rE(e,t=0,n=1,r=.5,o,s=e,i=e){if(bt.test(t)&&(t=parseFloat(t),t=Ce(i.min,i.max,t/100)-i.min),typeof t!="number")return;let l=Ce(s.min,s.max,r);e===s&&(l-=t),e.min=Id(e.min,t,n,l,o),e.max=Id(e.max,t,n,l,o)}function Dd(e,t,[n,r,o],s,i){rE(e,t[n],t[r],t[o],t.scale,s,i)}const oE=["x","scaleX","originX"],sE=["y","scaleY","originY"];function Ld(e,t,n,r){Dd(e.x,t,oE,n?n.x:void 0,r?r.x:void 0),Dd(e.y,t,sE,n?n.y:void 0,r?r.y:void 0)}function Od(e){return e.translate===0&&e.scale===1}function zh(e){return Od(e.x)&&Od(e.y)}function Fd(e,t){return e.min===t.min&&e.max===t.max}function iE(e,t){return Fd(e.x,t.x)&&Fd(e.y,t.y)}function $d(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hh(e,t){return $d(e.x,t.x)&&$d(e.y,t.y)}function Vd(e){return Be(e.x)/Be(e.y)}function Bd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class aE{constructor(){this.members=[]}add(t){Dl(this.members,t),t.scheduleRender()}remove(t){if(Ll(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function lE(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=n?.z||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:m,skewX:h,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),m&&(r+=`rotateY(${m}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Ni=["","X","Y","Z"],cE=1e3;let uE=0;function ki(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Gh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_h(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xe,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Gh(r)}function Uh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},l=t?.()){this.id=uE++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(pE),this.nodes.forEach(vE),this.nodes.forEach(xE),this.nodes.forEach(mE)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Zj)}addEventListener(i,l){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Fl),this.eventHandlers.get(i).add(l)}notifyListeners(i,...l){const c=this.eventHandlers.get(i);c&&c.notify(...l)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=ih(i)&&!sR(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let f,d=0;const m=()=>this.root.updateBlockedByResize=!1;xe.read(()=>{d=window.innerWidth}),e(i,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,f&&f(),f=Qj(m,250),Uo.hasAnimatedSinceResize&&(Uo.hasAnimatedSinceResize=!1,this.nodes.forEach(Gd)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeLayoutChanged:m,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||SE,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=u.getProps(),x=!this.targetLayout||!Hh(this.targetLayout,h),y=!d&&m;if(this.options.layoutRoot||this.resumeFrom||y||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Ql(v,"layout"),onPlay:g,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(f,y)}else d||Gd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bE),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Gh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zd);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hd);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gE),this.nodes.forEach(dE),this.nodes.forEach(fE)):this.nodes.forEach(Hd),this.clearAllSnapshots();const l=He.now();Le.delta=Mt(0,1e3/60,l-Le.timestamp),Le.timestamp=l,Le.isProcessing=!0,wi.update.process(Le),wi.preRender.process(Le),wi.render.process(Le),Le.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ec.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hE),this.sharedNodes.forEach(yE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Be(this.snapshot.measuredBox.x)&&!Be(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!zh(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;i&&this.instance&&(l||pn(this.latestValues)||f)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return i&&(c=this.removeTransform(c)),RE(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return je();const l=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(jE))){const{scroll:u}=this.root;u&&(Hn(l.x,u.offset.x),Hn(l.y,u.offset.y))}return l}removeElementScroll(i){const l=je();if(Ze(l,i),this.scroll?.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:d}=u;u!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&Ze(l,i),Hn(l.x,f.offset.x),Hn(l.y,f.offset.y))}return l}applyTransform(i,l=!1){const c=je();Ze(c,i);for(let u=0;u<this.path.length;u++){const f=this.path[u];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Gn(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),pn(f.latestValues)&&Gn(c,f.latestValues)}return pn(this.latestValues)&&Gn(c,this.latestValues),c}removeTransform(i){const l=je();Ze(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!pn(u.latestValues))continue;ja(u.latestValues)&&u.updateSnapshot();const f=je(),d=u.measurePageBox();Ze(f,d),Ld(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return pn(this.latestValues)&&Ld(l,this.latestValues),l}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Le.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=Le.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),Nr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Ze(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Aj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ze(this.target,this.layout.layoutBox),Sh(this.target,this.targetDelta)):Ze(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),Nr(this.relativeTargetOrigin,this.target,m.target),Ze(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ja(this.parent.latestValues)||Ch(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const i=this.getLead(),l=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Le.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Ze(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,m=this.treeScale.y;HR(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=je());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kd(this.prevProjectionDelta.x,this.projectionDelta.x),kd(this.prevProjectionDelta.y,this.projectionDelta.y)),Ar(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==m||!Bd(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Un(),this.projectionDelta=Un(),this.projectionDeltaWithTransform=Un()}setAnimationOrigin(i,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},d=Un();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=je(),h=c?c.source:void 0,v=this.layout?this.layout.source:void 0,g=h!==v,b=this.getStack(),x=!b||b.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(CE));this.animationProgress=0;let w;this.mixTargetDelta=C=>{const R=C/1e3;Ud(d.x,i.x,R),Ud(d.y,i.y,R),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wE(this.relativeTarget,this.relativeTargetOrigin,m,R),w&&iE(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=je()),Ze(w,this.relativeTarget)),g&&(this.animationValues=f,eE(f,u,this.latestValues,R,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xe.update(()=>{Uo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=er(0)),this.currentAnimation=Yj(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),i.onUpdate&&i.onUpdate(l)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=i;if(!(!l||!c||!u)){if(this!==i&&this.layout&&u&&Wh(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||je();const d=Be(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+d;const m=Be(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+m}Ze(l,c),Gn(l,f),Ar(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(i,l){this.sharedNodes.has(i)||this.sharedNodes.set(i,new aE),this.sharedNodes.get(i).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){const{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let l=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&ki("z",i,u,this.animationValues);for(let f=0;f<Ni.length;f++)ki(`rotate${Ni[f]}`,i,u,this.animationValues),ki(`skew${Ni[f]}`,i,u,this.animationValues);i.render();for(const f in u)i.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);i.scheduleRender()}applyProjectionStyles(i,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Go(l?.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Go(l?.pointerEvents)||""),this.hasProjected&&!pn(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const f=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=lE(this.projectionDeltaWithTransform,this.treeScale,f);c&&(d=c(f,d)),i.transform=d;const{x:m,y:h}=this.projectionDelta;i.transformOrigin=`${m.origin*100}% ${h.origin*100}% 0`,u.animationValues?i.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:i.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in Br){if(f[v]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:x}=Br[v],y=d==="none"?f[v]:g(f[v],u);if(b){const w=b.length;for(let C=0;C<w;C++)i[b[C]]=y}else x?this.options.visualElement.renderState.vars[v]=y:i[v]=y}this.options.layoutId&&(i.pointerEvents=u===this?Go(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(zd),this.root.sharedNodes.clear()}}}function dE(e){e.updateLayout()}function fE(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Qe(f=>{const d=s?t.measuredBox[f]:t.layoutBox[f],m=Be(d);d.min=n[f].min,d.max=d.min+m}):Wh(o,t.layoutBox,n)&&Qe(f=>{const d=s?t.measuredBox[f]:t.layoutBox[f],m=Be(n[f]);d.max=d.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const i=Un();Ar(i,n,t.layoutBox);const l=Un();s?Ar(l,e.applyTransform(r,!0),t.measuredBox):Ar(l,n,t.layoutBox);const c=!zh(i);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:m}=f;if(d&&m){const h=je();Nr(h,t.layoutBox,d.layoutBox);const v=je();Nr(v,n,m.layoutBox),Hh(h,v)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:i,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function pE(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hE(e){e.clearSnapshot()}function zd(e){e.clearMeasurements()}function Hd(e){e.isLayoutDirty=!1}function gE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vE(e){e.resolveTargetDelta()}function xE(e){e.calcProjection()}function bE(e){e.resetSkewAndRotation()}function yE(e){e.removeLeadSnapshot()}function Ud(e,t,n){e.translate=Ce(t.translate,0,n),e.scale=Ce(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Wd(e,t,n,r){e.min=Ce(t.min,n.min,r),e.max=Ce(t.max,n.max,r)}function wE(e,t,n,r){Wd(e.x,t.x,n.x,r),Wd(e.y,t.y,n.y,r)}function CE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const SE={duration:.45,ease:[.4,0,.1,1]},Kd=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qd=Kd("applewebkit/")&&!Kd("chrome/")?Math.round:et;function Yd(e){e.min=qd(e.min),e.max=qd(e.max)}function RE(e){Yd(e.x),Yd(e.y)}function Wh(e,t,n){return e==="position"||e==="preserve-aspect"&&!Mj(Vd(t),Vd(n),.2)}function jE(e){return e!==e.root&&e.scroll?.wasRoot}const EE=Uh({attachResizeListener:(e,t)=>zr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ii={current:void 0},Kh=Uh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ii.current){const e=new EE({});e.mount(window),e.setOptions({layoutScroll:!0}),Ii.current=e}return Ii.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),TE={pan:{Feature:Uj},drag:{Feature:Gj,ProjectionNode:Kh,MeasureLayout:$h}};function Xd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&xe.postRender(()=>s(t,ro(t)))}class PE extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=eR(t,(n,r)=>(Xd(this.node,r,"Start"),o=>Xd(this.node,o,"End"))))}unmount(){}}class _E extends nn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=eo(zr(this.node.current,"focus",()=>this.onFocus()),zr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Zd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&xe.postRender(()=>s(t,ro(t)))}class ME extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=oR(t,(n,r)=>(Zd(this.node,r,"Start"),(o,{success:s})=>Zd(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Na=new WeakMap,Di=new WeakMap,AE=e=>{const t=Na.get(e.target);t&&t(e)},NE=e=>{e.forEach(AE)};function kE({root:e,...t}){const n=e||document;Di.has(n)||Di.set(n,{});const r=Di.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(NE,{root:e,...t})),r[o]}function IE(e,t,n){const r=kE(t);return Na.set(e,n),r.observe(e),()=>{Na.delete(e),r.unobserve(e)}}const DE={some:0,all:1};class LE extends nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:DE[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),m=u?f:d;m&&m(c)};return IE(this.node.current,i,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(OE(t,n))&&this.startObserver()}unmount(){}}function OE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const FE={inView:{Feature:LE},tap:{Feature:ME},focus:{Feature:_E},hover:{Feature:PE}},$E={layout:{ProjectionNode:Kh,MeasureLayout:$h}},VE={...Rj,...FE,...TE,...$E},ka=VR(VE,JR);function BE({children:e,className:t,containerClassName:n,accentColor:r="#73F36C",backgroundColor:o="#141514"}){return a.jsx("div",{className:S("block h-screen w-full",t),children:a.jsxs("div",{className:"relative h-full w-full",style:{backgroundColor:o},children:[a.jsx("div",{className:S("relative z-10 flex items-center justify-center h-full",n),children:e}),a.jsxs("div",{className:"absolute inset-0 size-full overflow-hidden",children:[["left-full sm:left-1/2 top-[-50px] md:top-[-100px] h-[200px] w-[450px] md:w-[1000px] rotate-180 md:rotate-0 translate-x-[-75%] sm:translate-x-[-90%]","right-[-150px] top-[-300px] md:top-[-250px] size-[400px]","bottom-[-280px] md:bottom-[-450px] lg:bottom-[-350px] right-[-220px] md:right-[-400px] size-[400px] md:size-[600px]","bottom-[-300px] left-[-240px] md:left-1/2 h-[400px] w-[400px] rotate-180 md:rotate-0 md:-translate-x-full md:w-[800px]","right-[70px] md:left-[-190px] lg:left-[-150px] bottom-[-200px] md:top-1/2 h-[400px] w-[600px] sm:w-[750px] md:w-[300px] md:-translate-y-full z-[-1] md:z-0"].map((s,i)=>a.jsx("div",{className:`absolute ${s}`,style:{background:`radial-gradient(circle, ${r}80 0%, transparent 70%)`,borderRadius:"50%",filter:"blur(40px)"}},i)),a.jsx(zE,{accentColor:r}),a.jsx("div",{className:"absolute inset-0",children:Array.from({length:15}).map((s,i)=>a.jsx(HE,{accentColor:r},i))})]})]})})}function zE({accentColor:e}){return a.jsxs("div",{className:"absolute inset-0 grid-lines opacity-20",children:[Array.from({length:10}).map((t,n)=>a.jsx(ka.div,{className:"absolute h-px w-full",style:{top:`${(n+1)*10}%`,backgroundColor:`${e}60`},initial:{scaleX:0},animate:{scaleX:1,opacity:[.1,.3,.1]},transition:{duration:3,repeat:1/0,repeatType:"reverse",delay:n*.2}},`h-${n}`)),Array.from({length:10}).map((t,n)=>a.jsx(ka.div,{className:"absolute w-px h-full",style:{left:`${(n+1)*10}%`,backgroundColor:`${e}60`},initial:{scaleY:0},animate:{scaleY:1,opacity:[.1,.3,.1]},transition:{duration:3,repeat:1/0,repeatType:"reverse",delay:n*.2}},`v-${n}`))]})}function HE({accentColor:e}){const[t,n]=E.useState(!1),[r,o]=E.useState({size:4,startX:50,startY:50,duration:15,xMovements:[0,0,0],yMovements:[0,0,0]});return E.useEffect(()=>{n(!0),o({size:Math.random()*6+2,startX:Math.random()*100,startY:Math.random()*100,duration:Math.random()*15+10,xMovements:[Math.random()*100-50,Math.random()*100-50,Math.random()*100-50],yMovements:[Math.random()*100-50,Math.random()*100-50,Math.random()*100-50]})},[]),t?a.jsx(ka.div,{className:"absolute rounded-full",style:{width:r.size,height:r.size,left:`${r.startX}%`,top:`${r.startY}%`,backgroundColor:`${e}B3`,boxShadow:`0 0 10px 2px ${e}99`},animate:{x:r.xMovements,y:r.yMovements,opacity:[.2,.8,.2],scale:[1,1.2,1]},transition:{duration:r.duration,repeat:1/0,repeatType:"reverse"}}):null}var GE="Separator",Qd="horizontal",UE=["horizontal","vertical"],qh=p.forwardRef((e,t)=>{const{decorative:n,orientation:r=Qd,...o}=e,s=WE(r)?r:Qd,l=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return a.jsx(H.div,{"data-orientation":s,...l,...o,ref:t})});qh.displayName=GE;function WE(e){return UE.includes(e)}var KE=qh;function kt({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return a.jsx(KE,{"data-slot":"separator",decorative:n,orientation:t,className:S("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function Hr(e,[t,n]){return Math.min(n,Math.max(t,e))}var Li=0;function $s(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jd()),document.body.insertAdjacentElement("beforeend",e[1]??Jd()),Li++,()=>{Li===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Li--}},[])}function Jd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oi="focusScope.autoFocusOnMount",Fi="focusScope.autoFocusOnUnmount",ef={bubbles:!1,cancelable:!0},qE="FocusScope",oo=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,c]=p.useState(null),u=ve(o),f=ve(s),d=p.useRef(null),m=ee(t,g=>c(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(w){if(h.paused||!l)return;const C=w.target;l.contains(C)?d.current=C:$t(d.current,{select:!0})},b=function(w){if(h.paused||!l)return;const C=w.relatedTarget;C!==null&&(l.contains(C)||$t(d.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&$t(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const y=new MutationObserver(x);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),y.disconnect()}}},[r,l,h.paused]),p.useEffect(()=>{if(l){nf.add(h);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(Oi,ef);l.addEventListener(Oi,u),l.dispatchEvent(x),x.defaultPrevented||(YE(eT(Yh(l)),{select:!0}),document.activeElement===g&&$t(l))}return()=>{l.removeEventListener(Oi,u),setTimeout(()=>{const x=new CustomEvent(Fi,ef);l.addEventListener(Fi,f),l.dispatchEvent(x),x.defaultPrevented||$t(g??document.body,{select:!0}),l.removeEventListener(Fi,f),nf.remove(h)},0)}}},[l,u,f,h]);const v=p.useCallback(g=>{if(!n&&!r||h.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(b&&x){const y=g.currentTarget,[w,C]=XE(y);w&&C?!g.shiftKey&&x===C?(g.preventDefault(),n&&$t(w,{select:!0})):g.shiftKey&&x===w&&(g.preventDefault(),n&&$t(C,{select:!0})):x===y&&g.preventDefault()}},[n,r,h.paused]);return a.jsx(H.div,{tabIndex:-1,...i,ref:m,onKeyDown:v})});oo.displayName=qE;function YE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($t(r,{select:t}),document.activeElement!==n)return}function XE(e){const t=Yh(e),n=tf(t,e),r=tf(t.reverse(),e);return[n,r]}function Yh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tf(e,t){for(const n of e)if(!ZE(n,{upTo:t}))return n}function ZE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function QE(e){return e instanceof HTMLInputElement&&"select"in e}function $t(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&QE(e)&&t&&e.select()}}var nf=JE();function JE(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rf(e,t),e.unshift(t)},remove(t){e=rf(e,t),e[0]?.resume()}}}function rf(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function eT(e){return e.filter(t=>t.tagName!=="A")}var tT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Dn=new WeakMap,Mo=new WeakMap,Ao={},$i=0,Xh=function(e){return e&&(e.host||Xh(e.parentNode))},nT=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Xh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},rT=function(e,t,n,r){var o=nT(t,Array.isArray(e)?e:[e]);Ao[n]||(Ao[n]=new WeakMap);var s=Ao[n],i=[],l=new Set,c=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(l.has(m))f(m);else try{var h=m.getAttribute(r),v=h!==null&&h!=="false",g=(Dn.get(m)||0)+1,b=(s.get(m)||0)+1;Dn.set(m,g),s.set(m,b),i.push(m),g===1&&v&&Mo.set(m,!0),b===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(t),l.clear(),$i++,function(){i.forEach(function(d){var m=Dn.get(d)-1,h=s.get(d)-1;Dn.set(d,m),s.set(d,h),m||(Mo.has(d)||d.removeAttribute(r),Mo.delete(d)),h||d.removeAttribute(n)}),$i--,$i||(Dn=new WeakMap,Dn=new WeakMap,Mo=new WeakMap,Ao={})}},Vs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=tT(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),rT(r,o,n,"aria-hidden")):function(){return null}},gt=function(){return gt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},gt.apply(this,arguments)};function Zh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function oT(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Wo="right-scroll-bar-position",Ko="width-before-scroll-bar",sT="with-scroll-bars-hidden",iT="--removed-body-scroll-bar-size";function Vi(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function aT(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var lT=typeof window<"u"?p.useLayoutEffect:p.useEffect,of=new WeakMap;function cT(e,t){var n=aT(null,function(r){return e.forEach(function(o){return Vi(o,r)})});return lT(function(){var r=of.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||Vi(l,null)}),s.forEach(function(l){o.has(l)||Vi(l,i)})}of.set(n,e)},[e]),n}function uT(e){return e}function dT(e,t){t===void 0&&(t=uT);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var c=function(){var f=i;i=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function fT(e){e===void 0&&(e={});var t=dT(null);return t.options=gt({async:!0,ssr:!1},e),t}var Qh=function(e){var t=e.sideCar,n=Zh(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,gt({},n))};Qh.isSideCarExport=!0;function pT(e,t){return e.useMedium(t),Qh}var Jh=fT(),Bi=function(){},Bs=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Bi,onWheelCapture:Bi,onTouchMoveCapture:Bi}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,h=e.noRelative,v=e.noIsolation,g=e.inert,b=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,w=e.gapMode,C=Zh(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,P=cT([n,t]),T=gt(gt({},C),o);return p.createElement(p.Fragment,null,f&&p.createElement(R,{sideCar:Jh,removeScrollBar:u,shards:d,noRelative:h,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:w}),i?p.cloneElement(p.Children.only(l),gt(gt({},T),{ref:P})):p.createElement(y,gt({},T,{className:c,ref:P}),l))});Bs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bs.classNames={fullWidth:Ko,zeroRight:Wo};var mT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mT();return t&&e.setAttribute("nonce",t),e}function gT(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vT(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xT=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hT())&&(gT(t,n),vT(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bT=function(){var e=xT();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eg=function(){var e=bT(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yT={left:0,top:0,right:0,gap:0},zi=function(e){return parseInt(e||"",10)||0},wT=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[zi(n),zi(r),zi(o)]},CT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yT;var t=wT(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ST=eg(),Yn="data-scroll-locked",RT=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
133
|
+
.`.concat(sT,` {
|
|
3
134
|
overflow: hidden `).concat(r,`;
|
|
4
135
|
padding-right: `).concat(l,"px ").concat(r,`;
|
|
5
136
|
}
|
|
6
|
-
body[`).concat(
|
|
137
|
+
body[`).concat(Yn,`] {
|
|
7
138
|
overflow: hidden `).concat(r,`;
|
|
8
139
|
overscroll-behavior: contain;
|
|
9
140
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -16,47 +147,58 @@
|
|
|
16
147
|
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
148
|
}
|
|
18
149
|
|
|
19
|
-
.`).concat(
|
|
150
|
+
.`).concat(Wo,` {
|
|
20
151
|
right: `).concat(l,"px ").concat(r,`;
|
|
21
152
|
}
|
|
22
153
|
|
|
23
|
-
.`).concat(
|
|
154
|
+
.`).concat(Ko,` {
|
|
24
155
|
margin-right: `).concat(l,"px ").concat(r,`;
|
|
25
156
|
}
|
|
26
157
|
|
|
27
|
-
.`).concat(
|
|
158
|
+
.`).concat(Wo," .").concat(Wo,` {
|
|
28
159
|
right: 0 `).concat(r,`;
|
|
29
160
|
}
|
|
30
161
|
|
|
31
|
-
.`).concat(
|
|
162
|
+
.`).concat(Ko," .").concat(Ko,` {
|
|
32
163
|
margin-right: 0 `).concat(r,`;
|
|
33
164
|
}
|
|
34
165
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
166
|
+
body[`).concat(Yn,`] {
|
|
167
|
+
`).concat(iT,": ").concat(l,`px;
|
|
37
168
|
}
|
|
38
|
-
`)},
|
|
169
|
+
`)},sf=function(){var e=parseInt(document.body.getAttribute(Yn)||"0",10);return isFinite(e)?e:0},jT=function(){p.useEffect(function(){return document.body.setAttribute(Yn,(sf()+1).toString()),function(){var e=sf()-1;e<=0?document.body.removeAttribute(Yn):document.body.setAttribute(Yn,e.toString())}},[])},ET=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;jT();var s=p.useMemo(function(){return CT(o)},[o]);return p.createElement(ST,{styles:RT(s,!t,o,n?"":"!important")})},Ia=!1;if(typeof window<"u")try{var No=Object.defineProperty({},"passive",{get:function(){return Ia=!0,!0}});window.addEventListener("test",No,No),window.removeEventListener("test",No,No)}catch{Ia=!1}var Ln=Ia?{passive:!1}:!1,TT=function(e){return e.tagName==="TEXTAREA"},tg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!TT(e)&&n[t]==="visible")},PT=function(e){return tg(e,"overflowY")},_T=function(e){return tg(e,"overflowX")},af=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ng(e,r);if(o){var s=rg(e,r),i=s[1],l=s[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},MT=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},AT=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ng=function(e,t){return e==="v"?PT(t):_T(t)},rg=function(e,t){return e==="v"?MT(t):AT(t)},NT=function(e,t){return e==="h"&&t==="rtl"?-1:1},kT=function(e,t,n,r,o){var s=NT(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,c=t.contains(l),u=!1,f=i>0,d=0,m=0;do{if(!l)break;var h=rg(e,l),v=h[0],g=h[1],b=h[2],x=g-b-s*v;(v||x)&&ng(e,l)&&(d+=x,m+=v);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(d)<1||!f&&Math.abs(m)<1)&&(u=!0),u},ko=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lf=function(e){return[e.deltaX,e.deltaY]},cf=function(e){return e&&"current"in e?e.current:e},IT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},DT=function(e){return`
|
|
39
170
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
171
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},nc=0,Ee=[];function rc(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(nc++)[0],s=a.useState(ya)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Nl([e.lockRef.current],(e.shards||[]).map(rr),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var b=He(h),w=n.current,N="deltaX"in h?h.deltaX:w[0]-b[0],E="deltaY"in h?h.deltaY:w[1]-b[1],C,R=h.target,S=Math.abs(N)>Math.abs(E)?"h":"v";if("touches"in h&&S==="h"&&R.type==="range")return!1;var T=tr(S,R);if(!T)return!0;if(T?C=S:(C=S==="v"?"h":"v",T=tr(S,R)),!T)return!1;if(!r.current&&"changedTouches"in h&&(N||E)&&(r.current=C),!C)return!0;var P=r.current||C;return Jl(P,v,h,P==="h"?N:E)},[]),c=a.useCallback(function(h){var v=h;if(!(!Ee.length||Ee[Ee.length-1]!==s)){var b="deltaY"in v?nr(v):He(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&ec(C.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var N=(i.current.shards||[]).map(rr).filter(Boolean).filter(function(C){return C.contains(v.target)}),E=N.length>0?l(v,N[0]):!i.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),u=a.useCallback(function(h,v,b,w){var N={name:h,delta:v,target:b,should:w,shadowParent:ac(b)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(E){return E!==N})},1)},[]),f=a.useCallback(function(h){n.current=He(h),r.current=void 0},[]),d=a.useCallback(function(h){u(h.type,nr(h),h.target,l(h,e.lockRef.current))},[]),p=a.useCallback(function(h){u(h.type,He(h),h.target,l(h,e.lockRef.current))},[]);a.useEffect(function(){return Ee.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,we),document.addEventListener("touchmove",c,we),document.addEventListener("touchstart",f,we),function(){Ee=Ee.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,we),document.removeEventListener("touchmove",c,we),document.removeEventListener("touchstart",f,we)}},[]);var m=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:tc(o)}):null,m?a.createElement(Gl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ac(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oc=Dl(ba,rc);var Na=a.forwardRef(function(e,t){return a.createElement(Nt,J({},e,{ref:t,sideCar:oc}))});Na.classNames=Nt.classNames;var sc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Se=new WeakMap,Ge=new WeakMap,qe={},Mt=0,Ca=function(e){return e&&(e.host||Ca(e.parentNode))},ic=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ca(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},lc=function(e,t,n,r){var o=ic(t,Array.isArray(e)?e:[e]);qe[n]||(qe[n]=new WeakMap);var s=qe[n],i=[],l=new Set,c=new Set(o),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",h=(Se.get(p)||0)+1,v=(s.get(p)||0)+1;Se.set(p,h),s.set(p,v),i.push(p),h===1&&g&&Ge.set(p,!0),v===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),l.clear(),Mt++,function(){i.forEach(function(d){var p=Se.get(d)-1,m=s.get(d)-1;Se.set(d,p),s.set(d,m),p||(Ge.has(d)||d.removeAttribute(r),Ge.delete(d)),m||d.removeAttribute(n)}),Mt--,Mt||(Se=new WeakMap,Se=new WeakMap,Ge=new WeakMap,qe={})}},cc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=sc(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),lc(r,o,n,"aria-hidden")):function(){return null}},Ct="Dialog",[Aa,ku]=gt(Ct),[uc,Z]=Aa(Ct),Ra=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=a.useRef(null),c=a.useRef(null),[u,f]=Ir({prop:r,defaultProp:o??!1,onChange:s,caller:Ct});return A.jsx(uc,{scope:t,triggerRef:l,contentRef:c,contentId:Tt(),titleId:Tt(),descriptionId:Tt(),open:u,onOpenChange:f,onOpenToggle:a.useCallback(()=>f(d=>!d),[f]),modal:i,children:n})};Ra.displayName=Ct;var _a="DialogTrigger",Ta=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Z(_a,n),s=oe(t,o.triggerRef);return A.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pn(o.open),...r,ref:s,onClick:F(e.onClick,o.onOpenToggle)})});Ta.displayName=_a;var fn="DialogPortal",[dc,ka]=Aa(fn,{forceMount:void 0}),Oa=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Z(fn,t);return A.jsx(dc,{scope:t,forceMount:n,children:a.Children.map(r,i=>A.jsx(ke,{present:n||s.open,children:A.jsx(cn,{asChild:!0,container:o,children:i})}))})};Oa.displayName=fn;var ut="DialogOverlay",Pa=a.forwardRef((e,t)=>{const n=ka(ut,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Z(ut,e.__scopeDialog);return s.modal?A.jsx(ke,{present:r||s.open,children:A.jsx(mc,{...o,ref:t})}):null});Pa.displayName=ut;var fc=mt.createSlot("DialogOverlay.RemoveScroll"),mc=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Z(ut,n);return A.jsx(Na,{as:fc,allowPinchZoom:!0,shards:[o.contentRef],children:A.jsx(B.div,{"data-state":pn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),be="DialogContent",Da=a.forwardRef((e,t)=>{const n=ka(be,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Z(be,e.__scopeDialog);return A.jsx(ke,{present:r||s.open,children:s.modal?A.jsx(pc,{...o,ref:t}):A.jsx(hc,{...o,ref:t})})});Da.displayName=be;var pc=a.forwardRef((e,t)=>{const n=Z(be,e.__scopeDialog),r=a.useRef(null),o=oe(t,n.contentRef,r);return a.useEffect(()=>{const s=r.current;if(s)return cc(s)},[]),A.jsx(La,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:F(e.onFocusOutside,s=>s.preventDefault())})}),hc=a.forwardRef((e,t)=>{const n=Z(be,e.__scopeDialog),r=a.useRef(!1),o=a.useRef(!1);return A.jsx(La,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),La=a.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=Z(be,n),c=a.useRef(null),u=oe(t,c);return Sl(),A.jsxs(A.Fragment,{children:[A.jsx(ha,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:A.jsx(un,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pn(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),A.jsxs(A.Fragment,{children:[A.jsx(gc,{titleId:l.titleId}),A.jsx(xc,{contentRef:c,descriptionId:l.descriptionId})]})]})}),mn="DialogTitle",Ia=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Z(mn,n);return A.jsx(B.h2,{id:o.titleId,...r,ref:t})});Ia.displayName=mn;var Ma="DialogDescription",Fa=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Z(Ma,n);return A.jsx(B.p,{id:o.descriptionId,...r,ref:t})});Fa.displayName=Ma;var ja="DialogClose",Ba=a.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Z(ja,n);return A.jsx(B.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>o.onOpenChange(!1))})});Ba.displayName=ja;function pn(e){return e?"open":"closed"}var $a="DialogTitleWarning",[Ou,Wa]=hs($a,{contentName:be,titleName:mn,docsSlug:"dialog"}),gc=({titleId:e})=>{const t=Wa($a),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
172
|
+
`)},LT=0,On=[];function OT(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(LT++)[0],s=p.useState(eg)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=oT([e.lockRef.current],(e.shards||[]).map(cf),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var x=ko(g),y=n.current,w="deltaX"in g?g.deltaX:y[0]-x[0],C="deltaY"in g?g.deltaY:y[1]-x[1],R,P=g.target,T=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in g&&T==="h"&&P.type==="range")return!1;var j=af(T,P);if(!j)return!0;if(j?R=T:(R=T==="v"?"h":"v",j=af(T,P)),!j)return!1;if(!r.current&&"changedTouches"in g&&(w||C)&&(r.current=R),!R)return!0;var M=r.current||R;return kT(M,b,g,M==="h"?w:C)},[]),c=p.useCallback(function(g){var b=g;if(!(!On.length||On[On.length-1]!==s)){var x="deltaY"in b?lf(b):ko(b),y=t.current.filter(function(R){return R.name===b.type&&(R.target===b.target||b.target===R.shadowParent)&&IT(R.delta,x)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var w=(i.current.shards||[]).map(cf).filter(Boolean).filter(function(R){return R.contains(b.target)}),C=w.length>0?l(b,w[0]):!i.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(g,b,x,y){var w={name:g,delta:b,target:x,should:y,shadowParent:FT(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=p.useCallback(function(g){n.current=ko(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,lf(g),g.target,l(g,e.lockRef.current))},[]),m=p.useCallback(function(g){u(g.type,ko(g),g.target,l(g,e.lockRef.current))},[]);p.useEffect(function(){return On.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Ln),document.addEventListener("touchmove",c,Ln),document.addEventListener("touchstart",f,Ln),function(){On=On.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,Ln),document.removeEventListener("touchmove",c,Ln),document.removeEventListener("touchstart",f,Ln)}},[]);var h=e.removeScrollBar,v=e.inert;return p.createElement(p.Fragment,null,v?p.createElement(s,{styles:DT(o)}):null,h?p.createElement(ET,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function FT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $T=pT(Jh,OT);var so=p.forwardRef(function(e,t){return p.createElement(Bs,gt({},e,{ref:t,sideCar:$T}))});so.classNames=Bs.classNames;var VT=[" ","Enter","ArrowUp","ArrowDown"],BT=[" ","Enter"],Sn="Select",[zs,Hs,zT]=ar(Sn),[gr]=Me(Sn,[zT,Rt]),Gs=Rt(),[HT,rn]=gr(Sn),[GT,UT]=gr(Sn),og=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:m,required:h,form:v}=e,g=Gs(t),[b,x]=p.useState(null),[y,w]=p.useState(null),[C,R]=p.useState(!1),P=Pn(u),[T,j]=Ie({prop:r,defaultProp:o??!1,onChange:s,caller:Sn}),[M,D]=Ie({prop:i,defaultProp:l,onChange:c,caller:Sn}),z=p.useRef(null),q=b?v||!!b.closest("form"):!0,[Y,G]=p.useState(new Set),Z=Array.from(Y).map($=>$.props.value).join(";");return a.jsx(ur,{...g,children:a.jsxs(HT,{required:h,scope:t,trigger:b,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:R,contentId:Se(),value:M,onValueChange:D,open:T,onOpenChange:j,dir:P,triggerPointerDownPosRef:z,disabled:m,children:[a.jsx(zs.Provider,{scope:t,children:a.jsx(GT,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback($=>{G(V=>new Set(V).add($))},[]),onNativeOptionRemove:p.useCallback($=>{G(V=>{const _=new Set(V);return _.delete($),_})},[]),children:n})}),q?a.jsxs(_g,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:d,value:M,onChange:$=>D($.target.value),disabled:m,form:v,children:[M===void 0?a.jsx("option",{value:""}):null,Array.from(Y)]},Z):null]})})};og.displayName=Sn;var sg="SelectTrigger",ig=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Gs(n),i=rn(sg,n),l=i.disabled||r,c=ee(t,i.onTriggerChange),u=Hs(n),f=p.useRef("touch"),[d,m,h]=Ag(g=>{const b=u().filter(w=>!w.disabled),x=b.find(w=>w.value===i.value),y=Ng(b,g,x);y!==void 0&&i.onValueChange(y.value)}),v=g=>{l||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return a.jsx(dr,{asChild:!0,...s,children:a.jsx(H.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Mg(i.value)?"":void 0,...o,ref:c,onClick:I(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:I(o.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:I(o.onKeyDown,g=>{const b=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(b&&g.key===" ")&&VT.includes(g.key)&&(v(),g.preventDefault())})})})});ig.displayName=sg;var ag="SelectValue",lg=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...l}=e,c=rn(ag,n),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=ee(t,c.onValueNodeChange);return be(()=>{u(f)},[u,f]),a.jsx(H.span,{...l,ref:d,style:{pointerEvents:"none"},children:Mg(c.value)?a.jsx(a.Fragment,{children:i}):s})});lg.displayName=ag;var WT="SelectIcon",cg=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(H.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});cg.displayName=WT;var KT="SelectPortal",ug=e=>a.jsx(_n,{asChild:!0,...e});ug.displayName=KT;var Rn="SelectContent",dg=p.forwardRef((e,t)=>{const n=rn(Rn,e.__scopeSelect),[r,o]=p.useState();if(be(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Cs.createPortal(a.jsx(fg,{scope:e.__scopeSelect,children:a.jsx(zs.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(pg,{...e,ref:t})});dg.displayName=Rn;var lt=10,[fg,on]=gr(Rn),qT="SelectContentImpl",YT=Gt("SelectContent.RemoveScroll"),pg=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b,...x}=e,y=rn(Rn,n),[w,C]=p.useState(null),[R,P]=p.useState(null),T=ee(t,N=>C(N)),[j,M]=p.useState(null),[D,z]=p.useState(null),q=Hs(n),[Y,G]=p.useState(!1),Z=p.useRef(!1);p.useEffect(()=>{if(w)return Vs(w)},[w]),$s();const $=p.useCallback(N=>{const[U,...ne]=q().map(ae=>ae.ref.current),[ie]=ne.slice(-1),ce=document.activeElement;for(const ae of N)if(ae===ce||(ae?.scrollIntoView({block:"nearest"}),ae===U&&R&&(R.scrollTop=0),ae===ie&&R&&(R.scrollTop=R.scrollHeight),ae?.focus(),document.activeElement!==ce))return},[q,R]),V=p.useCallback(()=>$([j,w]),[$,j,w]);p.useEffect(()=>{Y&&V()},[Y,V]);const{onOpenChange:_,triggerPointerDownPosRef:O}=y;p.useEffect(()=>{if(w){let N={x:0,y:0};const U=ie=>{N={x:Math.abs(Math.round(ie.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(ie.pageY)-(O.current?.y??0))}},ne=ie=>{N.x<=10&&N.y<=10?ie.preventDefault():w.contains(ie.target)||_(!1),document.removeEventListener("pointermove",U),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ne,{capture:!0})}}},[w,_,O]),p.useEffect(()=>{const N=()=>_(!1);return window.addEventListener("blur",N),window.addEventListener("resize",N),()=>{window.removeEventListener("blur",N),window.removeEventListener("resize",N)}},[_]);const[te,fe]=Ag(N=>{const U=q().filter(ce=>!ce.disabled),ne=U.find(ce=>ce.ref.current===document.activeElement),ie=Ng(U,N,ne);ie&&setTimeout(()=>ie.ref.current.focus())}),k=p.useCallback((N,U,ne)=>{const ie=!Z.current&&!ne;(y.value!==void 0&&y.value===U||ie)&&(M(N),ie&&(Z.current=!0))},[y.value]),A=p.useCallback(()=>w?.focus(),[w]),F=p.useCallback((N,U,ne)=>{const ie=!Z.current&&!ne;(y.value!==void 0&&y.value===U||ie)&&z(N)},[y.value]),B=r==="popper"?Da:mg,X=B===Da?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:b}:{};return a.jsx(fg,{scope:n,content:w,viewport:R,onViewportChange:P,itemRefCallback:k,selectedItem:j,onItemLeave:A,itemTextRefCallback:F,focusSelectedItem:V,selectedItemText:D,position:r,isPositioned:Y,searchRef:te,children:a.jsx(so,{as:YT,allowPinchZoom:!0,children:a.jsx(oo,{asChild:!0,trapped:y.open,onMountAutoFocus:N=>{N.preventDefault()},onUnmountAutoFocus:I(o,N=>{y.trigger?.focus({preventScroll:!0}),N.preventDefault()}),children:a.jsx(tn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:N=>N.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:a.jsx(B,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:N=>N.preventDefault(),...x,...X,onPlaced:()=>G(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:I(x.onKeyDown,N=>{const U=N.ctrlKey||N.altKey||N.metaKey;if(N.key==="Tab"&&N.preventDefault(),!U&&N.key.length===1&&fe(N.key),["ArrowUp","ArrowDown","Home","End"].includes(N.key)){let ie=q().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(N.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(N.key)){const ce=N.target,ae=ie.indexOf(ce);ie=ie.slice(ae+1)}setTimeout(()=>$(ie)),N.preventDefault()}})})})})})})});pg.displayName=qT;var XT="SelectItemAlignedPosition",mg=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=rn(Rn,n),i=on(Rn,n),[l,c]=p.useState(null),[u,f]=p.useState(null),d=ee(t,T=>f(T)),m=Hs(n),h=p.useRef(!1),v=p.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:x,focusSelectedItem:y}=i,w=p.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&g&&b&&x){const T=s.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),D=x.getBoundingClientRect();if(s.dir!=="rtl"){const ce=D.left-j.left,ae=M.left-ce,ge=T.left-ae,Pe=T.width+ge,J=Math.max(Pe,j.width),ue=window.innerWidth-lt,me=Hr(ae,[lt,Math.max(lt,ue-J)]);l.style.minWidth=Pe+"px",l.style.left=me+"px"}else{const ce=j.right-D.right,ae=window.innerWidth-M.right-ce,ge=window.innerWidth-T.right-ae,Pe=T.width+ge,J=Math.max(Pe,j.width),ue=window.innerWidth-lt,me=Hr(ae,[lt,Math.max(lt,ue-J)]);l.style.minWidth=Pe+"px",l.style.right=me+"px"}const z=m(),q=window.innerHeight-lt*2,Y=g.scrollHeight,G=window.getComputedStyle(u),Z=parseInt(G.borderTopWidth,10),$=parseInt(G.paddingTop,10),V=parseInt(G.borderBottomWidth,10),_=parseInt(G.paddingBottom,10),O=Z+$+Y+_+V,te=Math.min(b.offsetHeight*5,O),fe=window.getComputedStyle(g),k=parseInt(fe.paddingTop,10),A=parseInt(fe.paddingBottom,10),F=T.top+T.height/2-lt,B=q-F,X=b.offsetHeight/2,N=b.offsetTop+X,U=Z+$+N,ne=O-U;if(U<=F){const ce=z.length>0&&b===z[z.length-1].ref.current;l.style.bottom="0px";const ae=u.clientHeight-g.offsetTop-g.offsetHeight,ge=Math.max(B,X+(ce?A:0)+ae+V),Pe=U+ge;l.style.height=Pe+"px"}else{const ce=z.length>0&&b===z[0].ref.current;l.style.top="0px";const ge=Math.max(F,Z+g.offsetTop+(ce?k:0)+X)+ne;l.style.height=ge+"px",g.scrollTop=U-F+g.offsetTop}l.style.margin=`${lt}px 0`,l.style.minHeight=te+"px",l.style.maxHeight=q+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,l,u,g,b,x,s.dir,r]);be(()=>w(),[w]);const[C,R]=p.useState();be(()=>{u&&R(window.getComputedStyle(u).zIndex)},[u]);const P=p.useCallback(T=>{T&&v.current===!0&&(w(),y?.(),v.current=!1)},[w,y]);return a.jsx(QT,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:a.jsx(H.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});mg.displayName=XT;var ZT="SelectPopperPosition",Da=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=lt,...s}=e,i=Gs(n);return a.jsx(Zr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Da.displayName=ZT;var[QT,dc]=gr(Rn,{}),La="SelectViewport",hg=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=on(La,n),i=dc(La,n),l=ee(t,s.onViewportChange),c=p.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(zs.Slot,{scope:n,children:a.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:I(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=i;if(m?.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const v=window.innerHeight-lt*2,g=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),x=Math.max(g,b);if(x<v){const y=x+h,w=Math.min(v,y),C=y-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});hg.displayName=La;var gg="SelectGroup",[JT,eP]=gr(gg),vg=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Se();return a.jsx(JT,{scope:n,id:o,children:a.jsx(H.div,{role:"group","aria-labelledby":o,...r,ref:t})})});vg.displayName=gg;var xg="SelectLabel",bg=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eP(xg,n);return a.jsx(H.div,{id:o.id,...r,ref:t})});bg.displayName=xg;var fs="SelectItem",[tP,yg]=gr(fs),wg=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,l=rn(fs,n),c=on(fs,n),u=l.value===r,[f,d]=p.useState(s??""),[m,h]=p.useState(!1),v=ee(t,y=>c.itemRefCallback?.(y,r,o)),g=Se(),b=p.useRef("touch"),x=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(tP,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:p.useCallback(y=>{d(w=>w||(y?.textContent??"").trim())},[]),children:a.jsx(zs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:a.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:v,onFocus:I(i.onFocus,()=>h(!0)),onBlur:I(i.onBlur,()=>h(!1)),onClick:I(i.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:I(i.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:I(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:I(i.onPointerMove,y=>{b.current=y.pointerType,o?c.onItemLeave?.():b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:I(i.onKeyDown,y=>{c.searchRef?.current!==""&&y.key===" "||(BT.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});wg.displayName=fs;var Tr="SelectItemText",Cg=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=rn(Tr,n),l=on(Tr,n),c=yg(Tr,n),u=UT(Tr,n),[f,d]=p.useState(null),m=ee(t,x=>d(x),c.onItemTextChange,x=>l.itemTextRefCallback?.(x,c.value,c.disabled)),h=f?.textContent,v=p.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=u;return be(()=>(g(v),()=>b(v)),[g,b,v]),a.jsxs(a.Fragment,{children:[a.jsx(H.span,{id:c.textId,...s,ref:m}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Cs.createPortal(s.children,i.valueNode):null]})});Cg.displayName=Tr;var Sg="SelectItemIndicator",Rg=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yg(Sg,n).isSelected?a.jsx(H.span,{"aria-hidden":!0,...r,ref:t}):null});Rg.displayName=Sg;var Oa="SelectScrollUpButton",jg=p.forwardRef((e,t)=>{const n=on(Oa,e.__scopeSelect),r=dc(Oa,e.__scopeSelect),[o,s]=p.useState(!1),i=ee(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Tg,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});jg.displayName=Oa;var Fa="SelectScrollDownButton",Eg=p.forwardRef((e,t)=>{const n=on(Fa,e.__scopeSelect),r=dc(Fa,e.__scopeSelect),[o,s]=p.useState(!1),i=ee(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?a.jsx(Tg,{...e,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});Eg.displayName=Fa;var Tg=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=on("SelectScrollButton",n),i=p.useRef(null),l=Hs(n),c=p.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),be(()=>{l().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),a.jsx(H.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:I(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:I(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:I(o.onPointerLeave,()=>{c()})})}),nP="SelectSeparator",Pg=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(H.div,{"aria-hidden":!0,...r,ref:t})});Pg.displayName=nP;var $a="SelectArrow",rP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Gs(n),s=rn($a,n),i=on($a,n);return s.open&&i.position==="popper"?a.jsx(Qr,{...o,...r,ref:t}):null});rP.displayName=$a;var oP="SelectBubbleInput",_g=p.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=p.useRef(null),s=ee(r,o),i=Kr(t);return p.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[i,t]),a.jsx(H.select,{...n,style:{...im,...n.style},ref:s,defaultValue:t})});_g.displayName=oP;function Mg(e){return e===""||e===void 0}function Ag(e){const t=ve(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(i=>{const l=n.current+i;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ng(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=sP(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function sP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iP=og,aP=ig,lP=lg,cP=cg,uP=ug,dP=dg,fP=hg,pP=vg,mP=bg,hP=wg,gP=Cg,vP=Rg,xP=jg,bP=Eg,yP=Pg;const kg=({className:e})=>a.jsxs("svg",{className:e,viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{filter:"url(#filter0_di_10359_4283)",children:[a.jsx("rect",{x:"7.5",y:"8",width:"72.4228",height:"72.4228",rx:"36.2114",fill:"url(#paint0_linear_10359_4283)","fill-opacity":"0.6","shape-rendering":"crispEdges"}),a.jsx("rect",{x:"8.19637",y:"8.69637",width:"71.03",height:"71.03",rx:"35.515",stroke:"url(#paint1_linear_10359_4283)","stroke-width":"1.39275","shape-rendering":"crispEdges"}),a.jsx("path",{d:"M34.6871 29.2702C37.3282 27.8148 40.3611 26.987 43.5867 26.987C47.0527 26.987 50.2964 27.9428 53.0703 29.6061C52.9841 24.5814 48.8993 20.5347 43.8728 20.5347C38.9589 20.5347 34.9449 24.4022 34.6871 29.2702Z",fill:"#73F36C"}),a.jsx("path",{d:"M61.9247 48.1844C62.0439 47.3321 62.1056 46.4612 62.1056 45.5758C62.1056 39.9145 59.5843 34.8444 55.6074 31.4349C55.7426 31.3415 55.8855 31.2593 56.0359 31.1891C58.6171 29.9842 62.4476 32.759 64.5915 37.3868C66.7355 42.0145 66.381 46.7428 63.7998 47.9476C63.2258 48.2156 62.59 48.2867 61.9247 48.1844Z",fill:"#73F36C"}),a.jsx("path",{d:"M49.4152 63.2252C54.8437 61.4199 59.1587 57.1616 61.0565 51.7588C61.7421 53.8589 61.416 56.9595 59.9999 60.0162C57.8559 64.6439 54.0254 67.4187 51.4442 66.2138C50.391 65.7222 49.7085 64.6439 49.4152 63.2252Z",fill:"#73F36C"}),a.jsx("path",{d:"M26.2523 52.1315C28.2428 57.4318 32.5769 61.5788 37.9865 63.2995C37.6841 64.6775 37.0078 65.7236 35.9751 66.2056C33.3939 67.4105 29.5634 64.6357 27.4194 60.008C26.0866 57.1311 25.7193 54.2154 26.2523 52.1315Z",fill:"#73F36C"}),a.jsx("path",{d:"M31.6668 31.349C27.6317 34.7589 25.0678 39.8668 25.0678 45.5758C25.0678 46.4742 25.1313 47.3578 25.254 48.2222C24.6761 48.2748 24.124 48.1913 23.6196 47.9559C21.0384 46.751 20.6839 42.0228 22.8279 37.395C24.9718 32.7673 28.8023 29.9925 31.3835 31.1974C31.4812 31.243 31.5756 31.2936 31.6668 31.349Z",fill:"#73F36C"}),a.jsx("path",{d:"M39.6853 53.4068C40.058 52.892 40.6537 52.5874 41.2876 52.5875L46.1925 52.5876C46.8264 52.5876 47.422 52.8921 47.7947 53.4068L50.8539 57.6315C51.519 58.55 51.2894 59.8539 50.2825 60.3714C46.4401 62.3463 42.3705 62.6008 37.393 60.3329C36.3127 59.8407 36.0176 58.4719 36.7152 57.5086L39.6853 53.4068Z",fill:"#73F36C"}),a.jsx("path",{d:"M49.985 51.6751C49.6093 51.1588 49.5038 50.4927 49.7016 49.8849L51.238 45.1637C51.4349 44.5586 51.9085 44.0848 52.5119 43.8891L57.4894 42.2746C58.5908 41.9173 59.7728 42.5815 59.8858 43.7378C59.9368 44.2608 59.963 44.7911 59.963 45.3275C59.9631 48.3548 59.963 49.6928 57.7854 53.45C57.2304 54.4078 56.5793 55.3026 55.8462 56.123C55.0748 56.9861 53.7331 56.8254 53.0517 55.8891L49.985 51.6751Z",fill:"#73F36C"}),a.jsx("path",{d:"M56.6678 39.8485C57.7673 39.4878 58.3347 38.2546 57.7523 37.2515C57.3454 36.5507 56.8884 35.8831 56.3861 35.2539C56.3092 35.1576 56.2419 35.0548 56.1752 34.9513C55.2007 33.4387 51.6044 30.8455 49.9469 30.3589C49.8438 30.3286 49.7411 30.2975 49.6412 30.2581C48.859 29.9496 48.0473 29.7006 47.2116 29.5166C46.0799 29.2673 45.085 30.1927 45.0849 31.3557L45.0845 36.6302C45.0845 37.2649 45.3863 37.8615 45.8969 38.2359L49.9259 41.1903C50.4403 41.5675 51.1041 41.6734 51.7097 41.4748L56.6678 39.8485Z",fill:"#73F36C"}),a.jsx("path",{d:"M31.6337 56.1229C30.9006 55.3026 30.2494 54.4077 29.6943 53.4499C28.1573 50.9571 27.5167 48.1968 27.5167 45.3272C27.5167 44.7909 27.5429 44.2606 27.594 43.7377C27.707 42.5814 28.8891 41.9173 29.9905 42.2745L34.9679 43.889C35.5713 44.0847 36.0449 44.5585 36.2418 45.1636L37.7781 49.885C37.9759 50.4928 37.8704 51.1589 37.4947 51.6751L34.4283 55.889C33.7469 56.8253 32.4051 56.9861 31.6337 56.1229Z",fill:"#73F36C"}),a.jsx("path",{d:"M35.7706 41.4748C36.3761 41.6734 37.0399 41.5675 37.5543 41.1903L41.5832 38.2361C42.0937 37.8617 42.3956 37.2651 42.3955 36.6304L42.3951 31.356C42.395 30.1929 41.4003 29.2762 40.2725 29.5431C39.39 29.7519 38.5318 30.026 37.6893 30.3181C34.9542 31.2662 32.4593 33.5809 31.2103 35.1101C30.6621 35.7811 30.1659 36.497 29.7278 37.2515C29.1454 38.2546 29.7128 39.4877 30.8122 39.8483L35.7706 41.4748Z",fill:"#73F36C"}),a.jsx("path",{d:"M42.0281 49.8882C41.1669 49.8882 40.4043 49.3297 40.1417 48.5064L39.0647 45.1309C38.8054 44.3183 39.0916 43.4302 39.7759 42.9239L42.5646 40.861C43.2634 40.344 44.2161 40.344 44.9149 40.861L47.7035 42.9239C48.3879 43.4302 48.6741 44.3183 48.4148 45.1309L47.3378 48.5064C47.0751 49.3297 46.3126 49.8882 45.4514 49.8882H42.0281Z",fill:"#73F36C"})]}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_di_10359_4283",x:"0.257725",y:"0.757725",width:"86.9074",height:"86.9074",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"3.62114"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.45098 0 0 0 0 0.952941 0 0 0 0 0.423529 0 0 0 0.34 0"}),a.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_10359_4283"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_10359_4283",result:"shape"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"3"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.45098 0 0 0 0 0.952941 0 0 0 0 0.423529 0 0 0 1 0"}),a.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect2_innerShadow_10359_4283"})]}),a.jsxs("linearGradient",{id:"paint0_linear_10359_4283",x1:"7.5",y1:"44.2114",x2:"79.9228",y2:"44.2114",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"#121312"}),a.jsx("stop",{offset:"1","stop-color":"#73F36C","stop-opacity":"0"})]}),a.jsxs("linearGradient",{id:"paint1_linear_10359_4283",x1:"12.5736",y1:"7.99998",x2:"47.0785",y2:"87.4357",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"white","stop-opacity":"0.4"}),a.jsx("stop",{offset:"0.405687","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"0.574372","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"1","stop-color":"white","stop-opacity":"0.1"})]})]})]}),Ig=({className:e})=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"14",viewBox:"0 0 13 14",fill:"none",className:e,children:[a.jsx("path",{d:"M3.65174 10.4506L3.05176 9.85059L9.05161 3.85073L9.6516 4.45072L3.65174 10.4506Z",fill:"currentColor"}),a.jsx("path",{d:"M9.68168 4.66626L3.31787 4.66626V3.81775L9.68168 3.81775V4.66626Z",fill:"currentColor"}),a.jsx("path",{d:"M9.68249 10.1821H8.83398L8.83398 3.81832H9.68249L9.68249 10.1821Z",fill:"currentColor"})]}),Dg=({className:e})=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",className:e,children:[a.jsxs("g",{filter:"url(#filter0_i_11400_35620)",children:[a.jsx("rect",{x:"0.635742",width:"24",height:"24",rx:"12",fill:"url(#paint0_linear_11400_35620)","fill-opacity":"0.6"}),a.jsx("rect",{x:"0.924196",y:"0.288454",width:"23.4231",height:"23.4231",rx:"11.7115",stroke:"url(#paint1_linear_11400_35620)","stroke-width":"0.576907"}),a.jsx("path",{d:"M18.3927 15.5487L13.8966 6.55226C13.7253 6.21349 13.3781 6 12.999 6C12.6198 6 12.2726 6.21349 12.1013 6.55226L7.60521 15.5487C7.44943 15.8599 7.46596 16.2292 7.64879 16.5249C7.83212 16.8211 8.15521 17.0005 8.50285 17H17.4952C17.8428 17.0005 18.1659 16.8211 18.3493 16.5249C18.5321 16.2292 18.5485 15.8599 18.3927 15.5487ZM17.6674 16.102C17.6298 16.1611 17.5652 16.1972 17.4951 16.1982H8.50271C8.43259 16.1972 8.36797 16.1611 8.33039 16.102C8.29783 16.0418 8.29783 15.9697 8.33039 15.9095L12.8186 6.9091C12.8541 6.84245 12.9232 6.80085 12.9989 6.80085C13.0745 6.80085 13.1436 6.84245 13.1792 6.9091L17.6753 15.9095C17.7059 15.9707 17.7029 16.0433 17.6674 16.102ZM13.3997 14.5945C13.3997 14.7569 13.302 14.9027 13.1522 14.9649C13.0024 15.027 12.8301 14.9924 12.7154 14.8782C12.6012 14.7634 12.5666 14.591 12.6288 14.4412C12.6909 14.2913 12.8366 14.1936 12.9989 14.1936C13.1051 14.1936 13.2073 14.2357 13.2824 14.3109C13.3576 14.3861 13.3997 14.4883 13.3997 14.5945ZM13.3997 10.1845V12.9909C13.3997 13.2124 13.2203 13.3918 12.9989 13.3918C12.7775 13.3918 12.5982 13.2124 12.5982 12.9909V10.1845C12.5982 9.963 12.7775 9.7836 12.9989 9.7836C13.2203 9.7836 13.3997 9.963 13.3997 10.1845Z",fill:"#F7931A"})]}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_i_11400_35620",x:"0.635742",y:"0",width:"24",height:"24",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"1.24267"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.968627 0 0 0 0 0.576471 0 0 0 0 0.101961 0 0 0 0.8 0"}),a.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_11400_35620"})]}),a.jsxs("linearGradient",{id:"paint0_linear_11400_35620",x1:"0.635742",y1:"12",x2:"24.6357",y2:"12",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"#121312"}),a.jsx("stop",{offset:"1","stop-color":"#F7931A","stop-opacity":"0"})]}),a.jsxs("linearGradient",{id:"paint1_linear_11400_35620",x1:"2.31706",y1:"-5.32127e-06",x2:"13.7516",y2:"26.324",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"white","stop-opacity":"0.4"}),a.jsx("stop",{offset:"0.405687","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"0.574372","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"1","stop-color":"white","stop-opacity":"0.1"})]})]})]}),Lg=({className:e})=>a.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[a.jsx("g",{"clip-path":"url(#clip0_223_2)",children:a.jsxs("g",{filter:"url(#filter0_i_223_2)",children:[a.jsx("path",{d:"M24.6357 12C24.6357 5.37258 19.2632 0 12.6357 0C6.00832 0 0.635742 5.37258 0.635742 12C0.635742 18.6274 6.00832 24 12.6357 24C19.2632 24 24.6357 18.6274 24.6357 12Z",fill:"url(#paint0_linear_223_2)","fill-opacity":"0.6"}),a.jsx("path",{d:"M12.6358 0.288454H12.6357C6.16761 0.288454 0.924196 5.53187 0.924196 12V12.0001C0.924196 18.4681 6.16761 23.7116 12.6357 23.7116H12.6358C19.1039 23.7116 24.3473 18.4681 24.3473 12.0001V12C24.3473 5.53187 19.1039 0.288454 12.6358 0.288454Z",stroke:"url(#paint1_linear_223_2)","stroke-width":"0.576907"}),a.jsx("path",{d:"M7.93685 14.9376C7.12435 15.6201 6.85352 17.6459 6.85352 17.6459C6.85352 17.6459 8.87935 17.3751 9.56185 16.5626C9.94643 16.1076 9.94102 15.4088 9.5131 14.9863C9.30256 14.7853 9.02522 14.6692 8.7343 14.6602C8.44339 14.6512 8.15941 14.75 7.93685 14.9376Z",stroke:"#73F36C","stroke-width":"0.846154","stroke-linecap":"round","stroke-linejoin":"round"}),a.jsx("path",{d:"M11.999 14.1248L10.374 12.4998C10.6623 11.752 11.0252 11.0352 11.4574 10.3602C12.0885 9.35109 12.9673 8.52021 14.0102 7.94661C15.0531 7.37301 16.2255 7.07576 17.4157 7.08314C17.4157 8.55648 16.9932 11.1456 14.1657 13.0415C13.4815 13.4741 12.7556 13.837 11.999 14.1248Z",stroke:"#73F36C","stroke-width":"0.846154","stroke-linecap":"round","stroke-linejoin":"round"}),a.jsx("path",{d:"M10.3739 12.4999H7.66553C7.66553 12.4999 7.96344 10.8587 8.74886 10.3332C9.62636 9.74824 11.4572 10.3332 11.4572 10.3332",stroke:"#73F36C","stroke-width":"0.846154","stroke-linecap":"round","stroke-linejoin":"round"}),a.jsx("path",{d:"M11.999 14.1248V16.8332C11.999 16.8332 13.6403 16.5353 14.1657 15.7498C14.7507 14.8723 14.1657 13.0415 14.1657 13.0415",stroke:"#73F36C","stroke-width":"0.846154","stroke-linecap":"round","stroke-linejoin":"round"})]})}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_i_223_2",x:"0.635742",y:"0",width:"24",height:"24",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"1.24267"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.45098 0 0 0 0 0.952941 0 0 0 0 0.423529 0 0 0 1 0"}),a.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_223_2"})]}),a.jsxs("linearGradient",{id:"paint0_linear_223_2",x1:"0.635742",y1:"12",x2:"24.6357",y2:"12",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"#121312"}),a.jsx("stop",{offset:"1","stop-color":"#73F36C","stop-opacity":"0"})]}),a.jsxs("linearGradient",{id:"paint1_linear_223_2",x1:"2.31706",y1:"-5.57125e-06",x2:"13.7516",y2:"26.324",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"white","stop-opacity":"0.4"}),a.jsx("stop",{offset:"0.405687","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"0.574372","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"1","stop-color":"white","stop-opacity":"0.1"})]}),a.jsx("clipPath",{id:"clip0_223_2",children:a.jsx("rect",{width:"25",height:"24",fill:"white"})})]})]}),Og=({className:e})=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",className:e,children:[a.jsxs("g",{filter:"url(#filter0_i_11400_35580)",children:[a.jsx("rect",{x:"0.135742",width:"24",height:"24",rx:"12",fill:"url(#paint0_linear_11400_35580)","fill-opacity":"0.6"}),a.jsx("rect",{x:"0.424196",y:"0.288454",width:"23.4231",height:"23.4231",rx:"11.7115",stroke:"url(#paint1_linear_11400_35580)","stroke-width":"0.576907"}),a.jsx("path",{d:"M19.0287 14.9918C18.8952 14.9752 17.1068 14.709 16.5278 12.4321C16.4566 12.15 16.1725 11.9799 15.8933 12.0518C15.701 12.1016 15.5607 12.2537 15.5155 12.4355C14.9132 14.7941 13.0125 14.9918 13.007 14.9925C12.7203 15.0264 12.5149 15.2898 12.5485 15.5795C12.5779 15.8305 12.7764 16.0193 13.0146 16.0435C13.148 16.0601 14.9371 16.3263 15.5162 18.6032C15.5873 18.8853 15.8714 19.0554 16.1506 18.9835C16.343 18.9337 16.4833 18.7816 16.5284 18.5998C17.13 16.2406 19.0314 16.0435 19.0369 16.0428C19.3236 16.0089 19.529 15.7455 19.4954 15.4558C19.466 15.2048 19.2675 15.016 19.0287 14.9918ZM16.022 13.9775C16.4456 14.7297 16.9945 15.211 17.5003 15.518C16.9945 15.8243 16.4456 16.3056 16.022 17.0585C15.5983 16.3056 15.0494 15.8243 14.5436 15.518C15.0494 15.2117 15.5983 14.7304 16.022 13.9775ZM14.2904 8.61183C14.1247 8.59178 11.0989 8.18106 10.1359 4.39678C10.0647 4.11467 9.78065 3.94457 9.5014 4.01648C9.3084 4.06626 9.16877 4.21838 9.1236 4.40023C8.1346 8.2827 4.97185 8.61183 4.96295 8.61252C4.67618 8.64571 4.47016 8.90777 4.50233 9.19749C4.53108 9.44986 4.73025 9.63932 4.97048 9.66352C5.13612 9.68357 8.16197 10.0943 9.12497 13.8786C9.19615 14.1607 9.48019 14.3308 9.75943 14.2589C9.95176 14.2091 10.0921 14.057 10.1372 13.8744C11.1262 9.99196 14.289 9.66283 14.2979 9.66214C14.5847 9.62895 14.7907 9.36689 14.7585 9.07717C14.7298 8.82549 14.5306 8.63603 14.2904 8.61183ZM9.63076 6.0922C10.4076 7.7655 11.5862 8.66162 12.5485 9.13802C11.5855 9.61374 10.4076 10.5105 9.63076 12.1838C8.85393 10.5105 7.67603 9.61374 6.71304 9.13802C7.67603 8.66162 8.85393 7.7655 9.63076 6.0922Z",fill:"#AAF1D5"})]}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_i_11400_35580",x:"0.135742",y:"0",width:"24",height:"24",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"1.24267"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.666667 0 0 0 0 0.945098 0 0 0 0 0.835294 0 0 0 1 0"}),a.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_11400_35580"})]}),a.jsxs("linearGradient",{id:"paint0_linear_11400_35580",x1:"0.135742",y1:"12",x2:"24.1357",y2:"12",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"#121312"}),a.jsx("stop",{offset:"1","stop-color":"#AAF1D5","stop-opacity":"0"})]}),a.jsxs("linearGradient",{id:"paint1_linear_11400_35580",x1:"1.81706",y1:"-5.32127e-06",x2:"13.2516",y2:"26.324",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"white","stop-opacity":"0.4"}),a.jsx("stop",{offset:"0.405687","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"0.574372","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"1","stop-color":"white","stop-opacity":"0.1"})]})]})]}),Fg=({className:e})=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",className:e,children:[a.jsxs("g",{filter:"url(#filter0_i_11400_35599)",children:[a.jsx("rect",{x:"0.135742",width:"24",height:"24",rx:"12",fill:"url(#paint0_linear_11400_35599)","fill-opacity":"0.6"}),a.jsx("rect",{x:"0.424196",y:"0.288454",width:"23.4231",height:"23.4231",rx:"11.7115",stroke:"url(#paint1_linear_11400_35599)","stroke-width":"0.576907"}),a.jsx("path",{d:"M17.8164 12C17.8164 11.9282 17.8144 11.8565 17.8109 11.7881C17.8075 11.6637 17.7973 11.5359 17.7809 11.3998L19.5001 9.846L19.4666 9.74073C19.349 9.37842 19.2007 9.01817 19.0223 8.66953L18.9717 8.57177L16.6618 8.68935C16.4834 8.46514 16.2838 8.2539 16.0685 8.05907L16.0111 8.00643C15.9393 7.94354 15.873 7.88749 15.8101 7.8369L15.929 5.52706L15.8313 5.47647C15.4833 5.29806 15.1224 5.14766 14.7601 5.03213L14.6541 5L13.1017 6.71856C12.7202 6.67481 12.3053 6.6714 11.8992 6.72061L10.3461 5L10.2408 5.0335C9.87851 5.15108 9.51825 5.29941 9.16961 5.47785L9.07186 5.52843L9.18944 7.84177C8.8743 8.09061 8.58924 8.37567 8.3404 8.69081L6.02706 8.57323L5.97648 8.67098C5.79806 9.01894 5.64767 9.37988 5.53213 9.74218L5.5 9.84609L7.21857 11.3985C7.19601 11.5947 7.1837 11.7978 7.1837 12.0008C7.1837 12.2072 7.19601 12.4082 7.2172 12.603L5.5 14.1541L5.5335 14.2594C5.65108 14.6217 5.79941 14.982 5.97784 15.3306L6.02843 15.4284L8.33827 15.3094C8.39227 15.3778 8.45038 15.4441 8.5078 15.5104L8.56044 15.5678C8.75458 15.7831 8.96445 15.9807 9.19072 16.1612L9.07314 18.471L9.1709 18.5216C9.51885 18.7 9.87979 18.8504 10.2421 18.9659L10.3474 18.9994L11.9012 17.2809C12.0379 17.2966 12.1671 17.3055 12.2881 17.3109C12.5643 17.3246 12.8445 17.313 13.1036 17.2829L14.654 19.0001L14.7593 18.9666C15.1216 18.849 15.4819 18.7007 15.8305 18.5223L15.9283 18.4717L15.8107 16.1597C15.877 16.1071 15.9331 16.0599 15.9857 16.0128C16.1744 15.8501 16.3535 15.673 16.5127 15.4857C16.5599 15.4317 16.6091 15.3736 16.6618 15.3087L18.9737 15.4263L19.0243 15.3285C19.2027 14.9805 19.3531 14.6196 19.4686 14.2573L19.5021 14.152L17.7836 12.5996C17.8041 12.4075 17.8164 12.2065 17.8164 12ZM19.1084 14.2572C19.0141 14.5334 18.8999 14.8068 18.7687 15.0748L16.4991 14.9592L16.4451 15.031C16.3856 15.1096 16.3227 15.1869 16.2564 15.2621C16.106 15.4391 15.9399 15.6032 15.7615 15.757C15.6876 15.8219 15.6111 15.8848 15.5325 15.9443L15.4607 15.9983L15.5762 18.2679C15.3083 18.3991 15.0334 18.5147 14.7586 18.6076L13.2342 16.9205L13.1447 16.9328C12.8801 16.9697 12.6005 16.9855 12.2997 16.9697C12.1617 16.9643 12.0113 16.952 11.8533 16.9328L11.7658 16.9226L10.2414 18.6076C9.96526 18.5133 9.69182 18.3991 9.42384 18.2679L9.53937 16.0018L9.46964 15.9478C9.21603 15.7516 8.9795 15.5294 8.76623 15.2861L8.72248 15.2369C8.66506 15.1706 8.609 15.1022 8.55431 15.0304L8.50031 14.9607L6.23212 15.0762C6.10087 14.8083 5.98533 14.5355 5.89237 14.2586L7.57949 12.7342L7.56718 12.6447C7.53915 12.4396 7.52548 12.2229 7.52548 11.9987C7.52548 11.7888 7.53915 11.5803 7.56581 11.3793C7.56581 11.3759 7.56787 11.3725 7.56581 11.3725L7.59042 11.2727L5.89305 9.73937C5.98739 9.4632 6.10155 9.18976 6.2328 8.92178L8.50431 9.03731L8.55832 8.96553C8.81877 8.62237 9.12502 8.31612 9.47023 8.05362L9.54201 7.99962L9.42648 5.7281C9.69444 5.59685 9.9672 5.48132 10.2441 5.38835L11.709 7.01053L11.7664 7.08914L11.8909 7.06111C12.3058 7.00711 12.7536 7.01053 13.1494 7.06453L13.2389 7.07684L14.7633 5.38972C15.0395 5.48406 15.3129 5.59822 15.5809 5.72947L15.4661 7.86973L15.4606 7.99893L15.5303 8.05294C15.5987 8.10557 15.6636 8.15821 15.7279 8.21427L15.7853 8.2669C16.0287 8.47881 16.2509 8.71671 16.447 8.97032L16.501 9.04005L18.7671 8.92452C18.8984 9.19248 19.0139 9.46524 19.1069 9.74211L17.4218 11.2665L17.4321 11.354C17.4512 11.5113 17.4656 11.6623 17.469 11.8038C17.4724 11.8688 17.4744 11.9351 17.4744 12.0014C17.4744 12.2236 17.4608 12.4409 17.4327 12.6474L17.4204 12.7369L19.1084 14.2572Z",fill:"#FF0608","fill-opacity":"0.8"}),a.jsx("path",{d:"M12.5007 8.69019C10.6754 8.69019 9.19141 10.1743 9.19141 11.9995C9.19141 13.8246 10.6755 15.3087 12.5007 15.3087C14.3259 15.3087 15.81 13.8246 15.81 11.9995C15.81 10.1743 14.3259 8.69019 12.5007 8.69019ZM12.5007 14.9691C10.8628 14.9691 9.53108 13.6374 9.53108 11.9995C9.53108 10.3615 10.8627 9.02986 12.5007 9.02986C14.1386 9.02986 15.4703 10.3615 15.4703 11.9995C15.4703 13.6374 14.1386 14.9691 12.5007 14.9691Z",fill:"#FF0608","fill-opacity":"0.8"}),a.jsx("path",{d:"M12.6759 13.4678C12.6759 13.5823 12.6119 13.6851 12.5138 13.7289C12.4157 13.7728 12.3028 13.7484 12.2277 13.6678C12.1529 13.5869 12.1302 13.4653 12.1709 13.3597C12.2116 13.254 12.3071 13.1851 12.4134 13.1851C12.4829 13.1851 12.5499 13.2148 12.5991 13.2678C12.6483 13.3208 12.6759 13.3929 12.6759 13.4678ZM12.6759 10.3581V12.337C12.6759 12.4932 12.5584 12.6197 12.4134 12.6197C12.2683 12.6197 12.1509 12.4932 12.1509 12.337V10.3581C12.1509 10.2019 12.2683 10.0754 12.4134 10.0754C12.5584 10.0754 12.6759 10.2019 12.6759 10.3581Z",fill:"#FF0608","fill-opacity":"0.8"})]}),a.jsxs("defs",{children:[a.jsxs("filter",{id:"filter0_i_11400_35599",x:"0.135742",y:"0",width:"24",height:"24",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[a.jsx("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),a.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),a.jsx("feOffset",{}),a.jsx("feGaussianBlur",{stdDeviation:"1.24267"}),a.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),a.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 0.0235294 0 0 0 0 0.0313726 0 0 0 0.8 0"}),a.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_11400_35599"})]}),a.jsxs("linearGradient",{id:"paint0_linear_11400_35599",x1:"0.135742",y1:"12",x2:"24.1357",y2:"12",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"#121312"}),a.jsx("stop",{offset:"1","stop-color":"#FF0608","stop-opacity":"0"})]}),a.jsxs("linearGradient",{id:"paint1_linear_11400_35599",x1:"1.81706",y1:"-5.32127e-06",x2:"13.2516",y2:"26.324",gradientUnits:"userSpaceOnUse",children:[a.jsx("stop",{"stop-color":"white","stop-opacity":"0.4"}),a.jsx("stop",{offset:"0.405687","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"0.574372","stop-color":"white","stop-opacity":"0.01"}),a.jsx("stop",{offset:"1","stop-color":"white","stop-opacity":"0.1"})]})]})]});function $g({className:e,...t}){return a.jsx("div",{className:S("relative z-10",e),children:a.jsx(iP,{"data-slot":"select",...t})})}function wP({...e}){return a.jsx(pP,{"data-slot":"select-group",...e})}function CP({...e}){return a.jsx(lP,{"data-slot":"select-value",...e})}function Vg({className:e,size:t="default",children:n,...r}){return a.jsxs(aP,{"data-slot":"select-trigger","data-size":t,className:S("bg-muted border-border data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-full border py-3 pr-3 pl-4 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,a.jsx(cP,{asChild:!0,children:a.jsx(wt,{className:"size-4 opacity-50"})})]})}function Bg({className:e,children:t,position:n="popper",sideOffset:r=-22,...o}){return a.jsx(uP,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0,children:a.jsxs(dP,{"data-slot":"select-content",className:S("bg-background text-muted-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-b-turtle border-border relative max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-t-none border p-3 !pt-6 shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1","w-[var(--radix-select-trigger-width)]",e),position:n,sideOffset:r,...o,children:[a.jsx(Hg,{}),a.jsx(fP,{className:S(n==="popper"&&"min-h-[calc(var(--radix-select-trigger-height)*2)] scroll-my-1"),children:t}),a.jsx(Gg,{})]})})}function SP({className:e,...t}){return a.jsx(mP,{"data-slot":"select-label",className:S("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function zg({className:e,children:t,...n}){return a.jsxs(hP,{"data-slot":"select-item",className:S("focus:bg-neutral-alpha-2 focus:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative my-1 flex cursor-default items-center gap-2 rounded-full py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","data-[state=checked]:bg-neutral-alpha-2 data-[state=checked]:border-border data-[state=checked]:border",e),...n,children:[a.jsx("span",{className:"absolute right-2 flex size-6 items-center justify-center",children:a.jsx(vP,{children:a.jsx(Zn,{className:"text-primary size-12"})})}),a.jsx(gP,{children:t})]})}function RP({className:e,...t}){return a.jsx(yP,{"data-slot":"select-separator",className:S("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function Hg({className:e,...t}){return a.jsx(xP,{"data-slot":"select-scroll-up-button",className:S("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(fw,{className:"size-4"})})}function Gg({className:e,...t}){return a.jsx(bP,{"data-slot":"select-scroll-down-button",className:S("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(wt,{className:"size-4"})})}var Us="Dialog",[Ug,Wg]=Me(Us),[jP,mt]=Ug(Us),Kg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=p.useRef(null),c=p.useRef(null),[u,f]=Ie({prop:r,defaultProp:o??!1,onChange:s,caller:Us});return a.jsx(jP,{scope:t,triggerRef:l,contentRef:c,contentId:Se(),titleId:Se(),descriptionId:Se(),open:u,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(d=>!d),[f]),modal:i,children:n})};Kg.displayName=Us;var qg="DialogTrigger",Yg=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(qg,n),s=ee(t,o.triggerRef);return a.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":mc(o.open),...r,ref:s,onClick:I(e.onClick,o.onOpenToggle)})});Yg.displayName=qg;var fc="DialogPortal",[EP,Xg]=Ug(fc,{forceMount:void 0}),Zg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=mt(fc,t);return a.jsx(EP,{scope:t,forceMount:n,children:p.Children.map(r,i=>a.jsx(ye,{present:n||s.open,children:a.jsx(_n,{asChild:!0,container:o,children:i})}))})};Zg.displayName=fc;var ps="DialogOverlay",Qg=p.forwardRef((e,t)=>{const n=Xg(ps,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=mt(ps,e.__scopeDialog);return s.modal?a.jsx(ye,{present:r||s.open,children:a.jsx(PP,{...o,ref:t})}):null});Qg.displayName=ps;var TP=Gt("DialogOverlay.RemoveScroll"),PP=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(ps,n);return a.jsx(so,{as:TP,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(H.div,{"data-state":mc(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jn="DialogContent",Jg=p.forwardRef((e,t)=>{const n=Xg(jn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=mt(jn,e.__scopeDialog);return a.jsx(ye,{present:r||s.open,children:s.modal?a.jsx(_P,{...o,ref:t}):a.jsx(MP,{...o,ref:t})})});Jg.displayName=jn;var _P=p.forwardRef((e,t)=>{const n=mt(jn,e.__scopeDialog),r=p.useRef(null),o=ee(t,n.contentRef,r);return p.useEffect(()=>{const s=r.current;if(s)return Vs(s)},[]),a.jsx(ev,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault())})}),MP=p.forwardRef((e,t)=>{const n=mt(jn,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return a.jsx(ev,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ev=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=mt(jn,n),c=p.useRef(null),u=ee(t,c);return $s(),a.jsxs(a.Fragment,{children:[a.jsx(oo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(tn,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":mc(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(NP,{titleId:l.titleId}),a.jsx(IP,{contentRef:c,descriptionId:l.descriptionId})]})]})}),pc="DialogTitle",tv=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(pc,n);return a.jsx(H.h2,{id:o.titleId,...r,ref:t})});tv.displayName=pc;var nv="DialogDescription",rv=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(nv,n);return a.jsx(H.p,{id:o.descriptionId,...r,ref:t})});rv.displayName=nv;var ov="DialogClose",sv=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=mt(ov,n);return a.jsx(H.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});sv.displayName=ov;function mc(e){return e?"open":"closed"}var iv="DialogTitleWarning",[AP,av]=Ay(iv,{contentName:jn,titleName:pc,docsSlug:"dialog"}),NP=({titleId:e})=>{const t=av(iv),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
173
|
|
|
43
174
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
175
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},vc="DialogDescriptionWarning",xc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wa(vc).contentName}}.`;return a.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},bc=Ra,yc=Ta,wc=Oa,Ec=Pa,Sc=Da,Nc=Ia,Cc=Fa,Ua=Ba;function Ac({...e}){return a.createElement(bc,{"data-slot":"dialog",...e})}function Rc({...e}){return a.createElement(yc,{"data-slot":"dialog-trigger",...e})}function Va({...e}){return a.createElement(wc,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0,"data-slot":"dialog-portal",...e})}function _c({...e}){return a.createElement(Ua,{"data-slot":"dialog-close",...e})}function za({className:e,...t}){return a.createElement(Ec,{"data-slot":"dialog-overlay",className:y("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Tc({className:e,children:t,showCloseButton:n=!0,...r}){return a.createElement(Va,{"data-slot":"dialog-portal"},a.createElement(za,null),a.createElement(Sc,{"data-slot":"dialog-content",className:y("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r},t,n&&a.createElement(Ua,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},a.createElement(D.XIcon,null),a.createElement("span",{className:"sr-only"},"Close"))))}function kc({className:e,...t}){return a.createElement("div",{"data-slot":"dialog-header",className:y("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Oc({className:e,...t}){return a.createElement("div",{"data-slot":"dialog-footer",className:y("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Pc({className:e,...t}){return a.createElement(Nc,{"data-slot":"dialog-title",className:y("text-lg leading-none font-semibold",e),...t})}function Dc({className:e,...t}){return a.createElement(Cc,{"data-slot":"dialog-description",className:y("text-muted-foreground text-sm",e),...t})}var Gt={exports:{}},Ft={};/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* This source code is licensed under the MIT license found in the
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*/var or;function Ic(){return or||(or=1,process.env.NODE_ENV!=="production"&&function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){f||o.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=g();if(!d){var v=g();s(h,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}v=i({inst:{value:h,getSnapshot:g}});var b=v[0].inst,w=v[1];return c(function(){b.value=h,b.getSnapshot=g,n(b)&&w({inst:b})},[m,h,g]),l(function(){return n(b)&&w({inst:b}),m(function(){n(b)&&w({inst:b})})},[m]),u(h),h}function n(m){var g=m.getSnapshot;m=m.value;try{var h=g();return!s(m,h)}catch{return!0}}function r(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=x,s=typeof Object.is=="function"?Object.is:e,i=o.useState,l=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;jt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),jt}process.env.NODE_ENV==="production"?Gt.exports=Lc():Gt.exports=Ic();var Mc=Gt.exports;function Fc(){return Mc.useSyncExternalStore(jc,()=>!0,()=>!1)}function jc(){return()=>{}}var hn="Avatar",[Bc,Pu]=gt(hn),[$c,Ha]=Bc(hn),Ga=a.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=a.useState("idle");return A.jsx($c,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:A.jsx(B.span,{...r,ref:t})})});Ga.displayName=hn;var qa="AvatarImage",Xa=a.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=Ha(qa,n),l=Wc(r,s),c=xe(u=>{o(u),i.onImageLoadingStatusChange(u)});return X(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?A.jsx(B.img,{...s,ref:t,src:r}):null});Xa.displayName=qa;var Ka="AvatarFallback",Ya=a.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=Ha(Ka,n),[i,l]=a.useState(r===void 0);return a.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),i&&s.imageLoadingStatus!=="loaded"?A.jsx(B.span,{...o,ref:t}):null});Ya.displayName=Ka;function sr(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Wc(e,{referrerPolicy:t,crossOrigin:n}){const r=Fc(),o=a.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,l]=a.useState(()=>sr(s,e));return X(()=>{l(sr(s,e))},[s,e]),X(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,n,t]),i}var Uc=Ga,Vc=Xa,zc=Ya;function Za({className:e,size:t="md",...n}){return a.createElement(Uc,{"data-slot":"avatar",className:y("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...n})}function Qa({className:e,...t}){return a.createElement(Vc,{"data-slot":"avatar-image",className:y("aspect-square size-full",e),...t})}function Ja({className:e,...t}){return a.createElement(zc,{"data-slot":"avatar-fallback",className:y("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const eo=V.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"text-muted-foreground bg-muted border-muted"}},defaultVariants:{variant:"default"}});function gn({className:e,variant:t,asChild:n=!1,...r}){const o=n?mt.Slot:"span";return a.createElement(o,{"data-slot":"badge",className:y(eo({variant:t}),e),...r})}const Hc={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},ye=a.forwardRef(({className:e,items:t,label:n,size:r="sm",...o},s)=>{if(!t||t.length===0)return null;const i=t.map(l=>typeof l=="string"?{icon:l,name:""}:l);return a.createElement("div",{ref:s,className:y("flex items-center gap-1",e),...o},n&&a.createElement("span",{className:"text-xs text-muted-foreground"},n,":"),a.createElement("div",{className:"flex -space-x-1"},i.map((l,c)=>a.createElement(Za,{key:c,className:y(Hc[r],"border border-background")},a.createElement(Qa,{src:l.icon,alt:l.name}),a.createElement(Ja,{className:"text-xs"},l.name?l.name.charAt(0).toUpperCase():"?")))))});ye.displayName="IconList";const to=a.forwardRef(({className:e,title:t,description:n,txHash:r,explorerUrl:o,estimatedTime:s,amount:i,token:l,protocol:c,steps:u=[],variant:f="default",completed:d=!1,cancelled:p=!1,onViewDetails:m,onClose:g,showActions:h=!0,...v},b)=>{const w=p?"Transaction Cancelled":d?"Transaction Completed":"Processing Transaction",N=p?"Transaction was cancelled by user":d?"Your transaction has been successfully processed!":"Please wait while your transaction is being processed...",E=({size:S="w-4 h-4"})=>a.createElement("svg",{className:S,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})),C=()=>a.createElement("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})),R=S=>S.length<=12?S:`${S.slice(0,6)}...${S.slice(-6)}`;return a.createElement(q,{ref:b,className:y("p-4 text-center space-y-3",f==="compact"&&"p-3 space-y-2",e),...v},a.createElement("div",{className:"flex justify-center"},a.createElement(Jt,{spinning:!d&&!p,size:f==="compact"?"sm":"default"},p?a.createElement(D.XIcon,{className:y(f==="compact"?"w-5 h-5":"w-6 h-6","text-destructive")}):d?a.createElement(D.CheckIcon,{className:y(f==="compact"?"w-5 h-5":"w-6 h-6","text-primary")}):a.createElement(D.TurtleIcon,{className:y(f==="compact"?"w-5 h-5":"w-6 h-6","text-primary")}))),a.createElement("div",{className:"space-y-1"},a.createElement("h3",{className:y("font-medium text-foreground",f==="compact"?"text-xs":"text-sm")},t||w),a.createElement("p",{className:y("text-muted-foreground","text-xs")},n||N)),d&&!p&&(i||l||c)&&a.createElement("div",{className:"p-2 bg-muted/50 rounded-lg space-y-1"},i&&l&&a.createElement("div",{className:"text-xs font-medium"},i," ",l),c&&a.createElement("div",{className:"text-xs text-muted-foreground"},"via ",c)),r&&!p&&a.createElement("div",{className:"space-y-1"},a.createElement("div",{className:"text-xs text-muted-foreground"},"Transaction Hash"),o?a.createElement("a",{href:`${o}/tx/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-xs text-primary hover:text-primary/80 transition-colors"},R(r),a.createElement(E,null)):a.createElement("div",{className:"text-xs font-mono text-foreground"},R(r))),!d&&!p&&s&&a.createElement("div",{className:"text-xs text-muted-foreground"},"Estimated time: ",s),!d&&!p&&u.length>0&&a.createElement("div",{className:"space-y-2 pt-2 border-t border-border"},a.createElement("div",{className:"text-xs font-medium text-muted-foreground text-left"},"Progress"),a.createElement("div",{className:"space-y-2"},u.map((S,T)=>a.createElement("div",{key:T,className:"flex items-center gap-3 text-left"},a.createElement("div",{className:y("flex items-center justify-center w-5 h-5 rounded-full border-2 flex-shrink-0",S.completed&&"bg-primary border-primary text-primary-foreground",S.current&&!S.completed&&"border-primary text-primary animate-pulse",!S.completed&&!S.current&&"border-muted-foreground/30 text-muted-foreground")},S.completed?a.createElement(C,null):S.current?a.createElement("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}):a.createElement("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30"})),a.createElement("div",{className:"flex-1 flex items-center justify-between"},a.createElement("span",{className:y("text-xs",S.completed&&"text-foreground",S.current&&!S.completed&&"text-foreground font-medium",!S.completed&&!S.current&&"text-muted-foreground")},S.label),S.txHash&&o&&a.createElement("a",{href:`${o}/tx/${S.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors ml-2",title:`View transaction: ${S.txHash}`},a.createElement("span",{className:"font-mono"},S.txHash.slice(0,6),"...",S.txHash.slice(-4)),a.createElement(E,{size:"w-3 h-3"}))))))),(d||p)&&h&&(m||g)&&a.createElement("div",{className:y("flex gap-2 pt-2",f==="compact"?"flex-col":"flex-row justify-center")},!p&&m&&a.createElement(nt,{variant:"transparentWhite",size:f==="compact"?"sm":"default",onClick:m},"View Details"),g&&a.createElement(nt,{variant:"default",size:f==="compact"?"sm":"default",onClick:g},p?"Try Again":"Done")))});to.displayName="TxStatus";const no=({tokens:e,value:t,onValueChange:n,placeholder:r="Select token",disabled:o,className:s,variant:i="bordered",size:l="default",showBalance:c=!0})=>{const u=t||(e.length>0?e[0].address:void 0),f=e.find(d=>d.address===u);return x.useEffect(()=>{!t&&e.length>0&&n&&n(e[0].address)},[t,e,n]),a.createElement(wr,{value:u,onValueChange:n,disabled:o},a.createElement(Er,{variant:i,size:l,className:y("w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-md font-medium","focus:ring-2 focus:ring-primary/20 focus:outline-none",l==="xs"&&"min-w-[80px] gap-2",l==="sm"&&"min-w-[75px] gap-1.5",l==="default"&&"min-w-[80px] gap-1.5",s)},f?a.createElement("div",{className:y("flex items-center",l==="xs"&&"gap-2",l==="sm"&&"gap-1.5",l==="default"&&"gap-1.5")},a.createElement("span",{className:y("flex items-center justify-center",l==="xs"&&"w-3.5 h-3",l==="sm"&&"w-4 h-3.5",l==="default"&&"w-5 h-4")},f.icon),a.createElement("span",{className:y("font-medium",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm")},f.symbol)):a.createElement("span",{className:y("text-muted-foreground",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm")},r)),a.createElement(Sr,{className:"border border-muted gap-2"},e.map(d=>a.createElement(Nr,{key:d.address,value:d.address,className:"cursor-pointer py-2"},a.createElement("div",{className:"flex flex-col gap-2"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement("span",{className:y("flex items-center justify-center",l==="xs"&&"w-3.5 h-3.5",l==="sm"&&"w-4 h-4",l==="default"&&"w-5 h-4")},d.icon),a.createElement("span",{className:y("font-medium",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm")},d.symbol)),c&&a.createElement("span",{className:"text-white/80 text-xs"},"≈ ",d.balance))))))},ro=a.forwardRef(({className:e,value:t="",tokens:n,selectedToken:r,usdValue:o,balance:s,placeholder:i="0",disabled:l=!1,hideTokenSelector:c=!1,isWalletConnected:u=!0,onChange:f,onMaxClick:d,onTokenChange:p,...m},g)=>{const h=n.find(b=>b.address===r),v=b=>{const w=b.target.value;/^\d*\.?\d*$/.test(w)&&(f==null||f(w))};return u?a.createElement(q,{variant:"item",ref:g,padding:"md",className:y("space-y-3",l&&"opacity-50",e),...m},a.createElement("div",{className:"flex items-center gap-6"},a.createElement("div",{className:"flex-1"},a.createElement(Kt,{variant:"nofocus",value:t,onChange:v,placeholder:i,disabled:l,className:"text-4xl font-[400] border-none bg-transparent p-0 h-auto focus:ring-0"})),!c&&a.createElement(no,{tokens:n,value:r,onValueChange:p,disabled:l,placeholder:"Select token",size:"sm",variant:"default",className:"rounded-full"})),a.createElement("div",{className:"flex items-center justify-between text-sm text-muted-foreground"},a.createElement("div",null,o&&a.createElement("span",null,"≈ ",o)),a.createElement("div",{className:"flex items-center gap-2"},s&&a.createElement("span",{className:"text-sm"},"Balance: ",s," ",(h==null?void 0:h.symbol)||""),d&&a.createElement(Qt,{variant:"default",size:"xs",onClick:d,className:y("cursor-pointer hover:bg-primary hover:text-primary-foreground transition-colors text-xs px-2 py-0.5 h-5",l&&"cursor-not-allowed opacity-50")},"MAX")))):a.createElement(q,{ref:g,className:y("flex items-center justify-center py-8",e),...m},a.createElement("div",{className:"text-center"},a.createElement("p",{className:"text-sm text-muted-foreground"},"Connect your wallet to continue")))});ro.displayName="SwapInput";const ao=a.forwardRef(({className:e,details:t,...n},r)=>{const{deposit:o,receive:s,equivalentInUsd:i,slippage:l,setSlippage:c}=t;return a.createElement("div",{className:"transition-all animate-in fade-in-0 duration-300 px-2 py-4 space-y-2"},a.createElement("div",{className:"flex items-center justify-between text-sm"},a.createElement("span",{className:"text-foreground text-sm font-semibold"},"Amount Out"),a.createElement("span",{className:"font-medium"},s)),l!==void 0&&c&&a.createElement(oo,{className:"text-sm",value:l,onChange:c}),a.createElement("div",{className:"flex items-center gap-2"},a.createElement("span",{className:"text-sm font-medium"},o," = ",s),a.createElement("span",{className:"text-xs text-muted-foreground"},"(≈ $",i,")")))});ao.displayName="SwapDetails";const Gc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAARCAMAAAAc0/kUAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VHQRUAAAAMnRSTlMA+/gFbmv8t7pvYzBsPwnh7syrgDsbEcZF5aCGZjjYz7+nmnl0WVNLI+evjGCyIfIlkBMlEnEAAAI9SURBVDjLdZWJcuowDEXlmCxk30khCQHCvlb//3FPMnmdkrinM0UjrjddywCAhBkKnCDwUr3zFkYhDCRo4Hav198rko7h0cDY+kHmCsWgC+DNifOHpV4/y/T5JRBljIaYYGDD205z1q1AqjO7FBtepNfnC03eErjnkUfUEnlq27CmpRJgJKQUdwFqOXsW6jAKHnnFrp7PRvi7xqQZjQdw0cQDmPCLUrsetwfXrWvT9GdzBcnNPncx6s1PfLfDBTBrfIAOGw1WBEhHdlW9crTIHwezoigljLngESZkmAHxsnBtOx/Ytu2kpzMtkg3bT0HSX0bRl2cgY8RRu3DS7XVn7o+B9yrL+FmCHEEnyLlaNQrUkFS87ZwEG546BGJB0fKIgr6YcG/QhgknPIeDmVOeON+puUlwQ0FFoqAwKHXbImGJX2J1h3ZznJPmAx67AamqoSXohirBQ1C0ghBUE3r3OBbjhuMzO+jBCK7CjacIUHT2BGfpCVR+D1VKKFrSZytlWby84OD2q23qJO35aQ0XPpIwdiQ84+ltvwk6uO8sVii/OZQRvykwISyKK1v1DROCocMWmLqaLinZ7jUocr7ENTSqOave9H1/9u4Q6o+6dt3DBvffuHB985NZi1eQwGZqyVs0WPHTgxfo6X/8R1tbXotaKiDITEvzDnUNuUkKOdgnMK4SXuqof7cSOqZunrgE4o8XNZvjf8X7Ev+8zHr9ytTnbWAi/W9AwG/KHRRDTVUHNmu9vrroF/G5Fv8A6Myb3BGIV6EAAAAASUVORK5CYII=",qc=({value:e,className:t})=>{const{steps:n}=e,r=x.useMemo(()=>n.length>2,[n]),o=i=>a.createElement("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center"},a.createElement("span",{className:"text-xs font-bold text-primary"},i.charAt(0))),s=i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();return n.length===0?null:a.createElement("div",{className:"px-3 pb-3"},a.createElement("div",{className:"text-sm font-medium"},"Swap Route"),a.createElement("div",{className:"mb-1 flex items-center gap-1 text-[10px]"},a.createElement("span",{className:"opacity-50 text-sm"},"Powered by"),a.createElement("img",{src:Gc,className:"w-10",alt:"Enso"})),a.createElement(br,{className:"rounded-md whitespace-nowrap mt-2"},a.createElement("div",{className:"grid grid-flow-col auto-cols-fr items-center gap-2 py-2 w-full"},n.map((i,l)=>a.createElement(a.Fragment,{key:`${i.in.symbol}-${i.type}-${l}`},a.createElement(q,{variant:"item",className:"gap-3 flex flex-col justify-center items-center"},a.createElement("div",{className:"text-sm text-foreground font-medium"},s(i.type)),a.createElement("div",{className:"flex flex-row items-center gap-2"},a.createElement(ne,{icon:i.in.icon||o(i.in.symbol),textSize:"xs",iconSize:"xs"},!r&&a.createElement("span",{className:"gap-2"},i.in.symbol),i.type==="approve"&&a.createElement("span",{className:"gap-2"}," ",i.amount)),i.type!=="approve"&&a.createElement(a.Fragment,null,a.createElement(D.ChevronsRight,{className:"w-3 h-3 text-primary flex-shrink-0"}),a.createElement(ne,{icon:i.out.icon||o(i.out.symbol),textSize:"xs",iconSize:"xs"},!r&&a.createElement("span",{className:"gap-2"},i.in.symbol))))))))))},ir={MIN:.1,MAX:100},Xc=/^\d*\.?\d*$/,Kc=10,Yc="w-10",Zc=e=>Xc.test(e),Qc=(e,t,n)=>!isNaN(e)&&e>=t&&e<=n,Xe=e=>e.toString();function oo({value:e,onChange:t,className:n,label:r="Max Slippage",minValue:o=ir.MIN,maxValue:s=ir.MAX}){const[i,l]=x.useState(!1),[c,u]=x.useState(Xe(e));x.useEffect(()=>{i||u(Xe(e))},[e,i]);const f=x.useCallback(()=>{l(!0),u(Xe(e))},[e]),d=x.useCallback(()=>{u(Xe(e)),l(!1)},[e]),p=x.useCallback(()=>{const v=parseFloat(c);Qc(v,o,s)?(t(v),l(!1)):d()},[c,o,s,t,d]),m=x.useCallback(v=>{const b=v.target.value;if(!Zc(b))return;if(b===""||b==="."){u(b);return}const w=parseFloat(b);!isNaN(w)&&w>s||u(b)},[s]),g=x.useCallback(v=>{switch(v.key){case"Enter":v.preventDefault(),p();break;case"Escape":v.preventDefault(),d();break}},[p,d]),h=x.useCallback(()=>{p()},[p]);return a.createElement("div",{className:y("flex items-center justify-between",n)},a.createElement("span",{className:"text-xs font-medium text-muted-foreground",id:"slippage-label"},r),a.createElement("div",{className:"flex items-center gap-1"},i?a.createElement("input",{type:"text",value:c,onChange:m,onKeyDown:g,onBlur:h,className:y(Yc,"text-xs text-right bg-transparent border-none outline-none","text-foreground focus:ring-0 focus:outline-none"),"aria-labelledby":"slippage-label","aria-describedby":"slippage-range",autoFocus:!0,autoComplete:"off",spellCheck:!1}):a.createElement("span",{className:"text-xs font-medium text-foreground","aria-live":"polite"},e,"%"),a.createElement("button",{onClick:f,className:y("p-1 hover:bg-muted rounded transition-colors","text-muted-foreground hover:text-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-label":`Edit slippage value. Current value: ${e}%`,type:"button"},a.createElement(D.Edit3,{size:Kc}))),a.createElement("span",{id:"slippage-range",className:"sr-only"},"Enter a value between ",o,"% and ",s,"%"))}const Jc=({tabs:e,defaultValue:t,value:n,onValueChange:r,layout:o,className:s})=>{var p,m;const[i,l]=x.useState(t||n||((p=e.find(g=>!g.disabled))==null?void 0:p.value)||((m=e[0])==null?void 0:m.value)),c=n??i,u=g=>{n===void 0&&l(g),r==null||r(g)},f=x.useMemo(()=>{var g;return(g=e.find(h=>h.value===c))==null?void 0:g.content},[c,e]),d=x.useMemo(()=>o?o(f):x.createElement("div",{className:"flex-1 min-h-0 overflow-hidden"},f),[f,o]);return x.createElement("div",{className:y("flex flex-col",s)},x.createElement(pt,{variant:"menuBar",activeValue:c,className:"mb-2"},e.map(g=>x.createElement(ht,{key:g.value,value:g.value,active:g.value===c,onClick:()=>!g.disabled&&u(g.value),disabled:g.disabled,variant:"menuBarDefault"},g.label))),d)},so=({searchTerm:e,setSearchTerm:t,placeholder:n,debounceDelay:r=300})=>{const[o,s]=x.useState(e);return x.useEffect(()=>{s(e)},[e]),x.useEffect(()=>{const i=setTimeout(()=>{t(o)},r);return()=>clearTimeout(i)},[o,t,r]),x.createElement("div",{className:"relative"},x.createElement("input",{type:"text",placeholder:n,value:o,onChange:i=>s(i.target.value),className:"w-full h-9 pr-12 pl-3 py-1.5 border border-border rounded-full bg-background text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all"}),x.createElement("div",{className:"absolute right-1 top-1/2 transform -translate-y-1/2 h-8 w-8 bg-muted rounded-full flex items-center justify-center pointer-events-none"},x.createElement(D.SearchIcon,{className:"h-4 w-4 text-primary"})))},io=(e,t="")=>e?a.createElement("img",{src:e,alt:t,className:"w-4 h-4 rounded-full"}):a.createElement("div",{className:"w-4 h-4 rounded-full bg-muted flex items-center justify-center text-xs"},t.charAt(0)),lo=({icon:e,text:t,onClick:n,className:r,variant:o="bordered",size:s="default",placeholder:i="Select",showIcon:l=!0})=>{const c=t||e;return a.createElement("div",{onClick:n,className:y("inline-flex items-center justify-between w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-full font-medium cursor-pointer","focus:ring-2 focus:ring-primary/20 focus:outline-none transition-colors",o==="bordered"&&"border border-input",s==="xs"&&"min-w-[80px] gap-2 px-2.5 py-1 h-7",s==="sm"&&"min-w-[75px] gap-1.5 px-3 py-1.5 h-8",s==="default"&&"min-w-[80px] gap-1.5 px-3 py-2 h-10",r),role:"button",tabIndex:0},c?a.createElement("div",{className:y("flex items-center",s==="xs"&&"gap-2",s==="sm"&&"gap-1.5",s==="default"&&"gap-1.5")},l&&e&&a.createElement("span",{className:y("flex items-center justify-center",s==="xs"&&"w-3.5 h-3",s==="sm"&&"w-4 h-3.5",s==="default"&&"w-5 h-4")},e),a.createElement("span",{className:y("font-medium",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm")},t)):a.createElement("span",{className:y("text-muted-foreground",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm")},i))},vn=({groups:e,renderItem:t,filterFn:n,getItemKey:r,className:o,groupClassName:s,itemClassName:i,showGroupHeaders:l=!0,emptyState:c=x.createElement("div",{className:"text-center text-muted-foreground py-8"},"No items found")})=>{const u=x.useMemo(()=>e.map(d=>({...d,items:n?d.items.filter(n):d.items})).filter(d=>d.items.length>0),[e,n]);return u.some(d=>d.items.length>0)?x.createElement("div",{className:y("space-y-4",o)},u.map(d=>x.createElement("div",{key:d.id,className:y("space-y-2",s)},l&&d.title&&x.createElement(ne,{icon:d.icon,textSize:"sm",iconSize:"base"},d.title),x.createElement("div",{className:"space-y-1"},d.items.map((p,m)=>x.createElement("div",{key:r?r(p):`${d.id}-${m}`,className:y("rounded-md transition-colors",i)},t(p))))))):x.createElement("div",{className:o},c)},co=({icon:e,symbol:t,name:n,balance:r,balanceUSD:o,onClick:s,className:i})=>x.createElement("div",{onClick:s,className:y("flex items-center justify-between p-3 cursor-pointer rounded-md transition-colors","hover:bg-muted",i)},x.createElement("div",{className:"flex items-center gap-3"},x.createElement("span",{className:"text-2xl"},e),x.createElement("div",null,x.createElement("div",{className:"font-medium"},t),x.createElement("div",{className:"text-sm text-muted-foreground"},n))),x.createElement("div",{className:"text-right"},x.createElement("div",{className:"font-medium"},r),x.createElement("div",{className:"text-sm text-muted-foreground"},"(",o,")"))),xn=({filters:e,activeFilters:t,onFiltersChange:n,variant:r="badge",multipleFilters:o=!0,showSearch:s=!0,searchValue:i="",onSearchChange:l,searchPlaceholder:c="Search tokens...",searchDebounceDelay:u=300})=>{const f=x.useCallback(d=>{if(r==="badge"&&o){const p=t.includes(d)?t.filter(m=>m!==d):[...t,d];n(p)}else{const p=t.includes(d)&&t.length===1?[]:[d];n(p)}},[t,n,r,o]);return x.createElement("div",{className:"space-y-3"},s&&l&&x.createElement(so,{searchTerm:i,setSearchTerm:l,placeholder:c,debounceDelay:u}),e.length>0&&x.createElement(x.Fragment,null,r==="badge"?x.createElement("div",{className:"flex flex-wrap gap-2 px-2"},e.map(d=>x.createElement(gn,{key:d.id,variant:t.includes(d.id)?"default":"outline",className:"cursor-pointer rounded-full bg-muted",onClick:()=>f(d.id)},d.icon&&x.createElement("span",{className:"mr-1"},d.icon),d.label))):x.createElement(pt,{activeValue:t[0]||"",variant:"menuBar",className:"w-full"},e.map(d=>x.createElement(ht,{key:d.id,value:d.id,active:t.includes(d.id),onClick:()=>f(d.id),variant:"menuBarDefault"},d.icon&&x.createElement("span",{className:"mr-1"},d.icon),d.label)))))};function eu({assets:e,searchQuery:t,activeFilterIds:n,filters:r}){return x.useMemo(()=>{let o=e;if(t){const s=t.toLowerCase();o=o.filter(i=>{var l;return i.symbol.toLowerCase().includes(s)||i.name.toLowerCase().includes(s)||((l=i.address)==null?void 0:l.toLowerCase().includes(s))})}if(n.length>0){const s=r.filter(i=>n.includes(i.id)).map(i=>i.filterFn);o=o.filter(i=>s.every(l=>l(i)))}return o},[e,t,n,r])}function tu({assets:e,groupByChain:t}){return x.useMemo(()=>{const n=[...e].sort((s,i)=>{const l=parseFloat(s.balanceUSD.replace(/[$,]/g,"")||"0");return parseFloat(i.balanceUSD.replace(/[$,]/g,"")||"0")-l});if(!t)return[{id:"all-assets",items:n}];const r=n.reduce((s,i)=>(s[i.chainId]||(s[i.chainId]={id:i.chainId,title:i.chainName,icon:i.chainIcon,items:[]}),s[i.chainId].items.push(i),s),{}),o=Object.values(r);return o.sort((s,i)=>{const l=s.items.length>0?parseFloat(s.items[0].balanceUSD.replace(/[$,]/g,"")||"0"):0,c=i.items.length>0?parseFloat(i.items[0].balanceUSD.replace(/[$,]/g,"")||"0"):0;if(l===c){const u=s.items.filter(d=>parseFloat(d.balance)>0).length;return i.items.filter(d=>parseFloat(d.balance)>0).length-u}return c-l}),o},[e,t])}const nu=[{id:"all",label:"All",filterFn:e=>parseFloat(e.balance)>0},{id:"stablecoins",label:"Stables",filterFn:e=>["USDC","USDT","DAI","USD"].includes(e.symbol.toUpperCase())||["USDC","USDT","DAI","USD"].includes(e.name.toUpperCase())},{id:"eth",label:"ETH",filterFn:e=>["ETH"].includes(e.symbol.toUpperCase())||["ETH"].includes(e.name.toUpperCase())},{id:"btc",label:"BTC",filterFn:e=>["BTC"].includes(e.symbol.toUpperCase())||["BTC"].includes(e.name.toUpperCase())}],ru=({assets:e,onAssetClick:t,groupByChain:n=!0,showChainIcon:r=!1,filters:o=nu,filterVariant:s="badge",multipleFilters:i=!1,showSearch:l=!0,searchPlaceholder:c="Search tokens...",searchDebounceDelay:u=300,className:f,itemClassName:d,emptyState:p})=>{const[m,g]=x.useState(""),[h,v]=x.useState([]),b=eu({assets:e,searchQuery:m,activeFilterIds:h,filters:o}),w=tu({assets:b,groupByChain:n}),N=E=>x.createElement(co,{icon:r&&E.chainIcon?x.createElement("div",{className:"relative"},E.icon,x.createElement("div",{className:"absolute -bottom-1 -right-1 w-4 h-4 rounded-full bg-background flex items-center justify-center border border-border"},E.chainIcon)):E.icon,symbol:E.symbol,name:E.name,balance:E.balance,balanceUSD:E.balanceUSD,onClick:()=>t==null?void 0:t(E),className:d});return x.createElement("div",{className:f},x.createElement("div",{className:"mb-4"},x.createElement(xn,{filters:o.map(({filterFn:E,...C})=>C),activeFilters:h,onFiltersChange:v,variant:s,multipleFilters:i,showSearch:l,searchValue:m,onSearchChange:g,searchPlaceholder:c,searchDebounceDelay:u})),x.createElement(vn,{groups:w,renderItem:N,getItemKey:E=>E.id,showGroupHeaders:n,emptyState:p||x.createElement("div",{className:"text-center py-8 text-muted-foreground"},m||h.length>0?"No assets match your filters":"No assets available")}))},Me=a.forwardRef(({className:e,onSelect:t,selected:n=!1,children:r,...o},s)=>a.createElement(q,{ref:s,variant:"container",padding:"sm",className:y("cursor-pointer transition-all duration-200 hover:shadow-md w-full",n&&"ring-2 ring-primary ring-offset-2",e),onClick:t,...o},a.createElement("div",{className:"flex flex-col gap-2"},r)));Me.displayName="WidgetItem";const Fe=a.forwardRef(({className:e,children:t,...n},r)=>a.createElement("div",{ref:r,className:y("flex items-start justify-between gap-4",e),...n},t));Fe.displayName="WidgetItemTop";const je=a.forwardRef(({className:e,children:t,...n},r)=>a.createElement("div",{ref:r,className:y("flex items-end justify-between gap-4",e),...n},t));je.displayName="WidgetItemBottom";const pe=a.forwardRef(({className:e,children:t,...n},r)=>a.createElement("div",{ref:r,className:y("flex flex-col min-w-0 flex-1 items-start justify-start gap-1",e),...n},t));pe.displayName="WidgetItemLeft";const he=a.forwardRef(({className:e,children:t,...n},r)=>a.createElement("div",{ref:r,className:y("flex flex-col gap-1 justify-between items-end",e),...n},t));he.displayName="WidgetItemRight";const Be=a.forwardRef(({className:e,stats:t,separator:n=" | ",...r},o)=>{const s=t.filter(i=>i.value);return s.length===0?null:a.createElement("div",{ref:o,className:y("flex gap-2 text-xs text-muted-foreground",e),...r},s.map((i,l)=>a.createElement(a.Fragment,{key:i.label},l>0&&a.createElement("span",null,n),a.createElement("span",{className:"flex items-center justify-center gap-1"},a.createElement("span",null,i.label,": "),i.icon?a.createElement("span",{className:"flex gap-1"},i.icon," ",i.value):a.createElement("span",null,i.value)))))});Be.displayName="WidgetItemStats";const bn=a.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,tvl:l,apr:c,incentives:u,chain:f,turtleBoost:d}=e,p=a.createElement("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center"},a.createElement("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"}))),m=a.useMemo(()=>d?[{label:"TVL",value:l||""},{label:"Turtle Boost",value:d,icon:a.createElement(D.SparklesIcon,{size:12})}]:[{label:"TVL",value:l||""}],[]);return a.createElement(Me,{ref:o,onSelect:t,selected:n,...r},a.createElement(Fe,null,a.createElement(pe,null,a.createElement(ne,{icon:s||p,textSize:"base",iconSize:"lg"},i)),a.createElement(he,null,c&&a.createElement("span",{className:"text-md font-semibold text-foreground"},c))),a.createElement(je,null,a.createElement(pe,null,a.createElement(Be,{stats:m})),a.createElement(he,null,a.createElement("div",{className:"flex flex-col gap-1 items-end"},u&&a.createElement(ye,{items:u,label:"Rewards",size:"sm"}),f&&a.createElement(ye,{items:[f],label:"Available on",size:"sm"})))))});bn.displayName="OpportunityItem";const uo=a.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,tvl:l,participants:c,aprRange:u,rewards:f,chains:d}=e,p=a.createElement("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center"},a.createElement("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}))),m=[{label:"TVL",value:l},{label:"Participants",value:c||""}];return a.createElement(Me,{ref:o,onSelect:t,selected:n,...r},a.createElement(Fe,null,a.createElement(pe,null,a.createElement(ne,{icon:s||p,textSize:"base",iconSize:"lg"},i)),a.createElement(he,null,a.createElement("span",{className:"text-md font-semibold text-foreground"},u||"N/A"))),a.createElement(je,null,a.createElement(pe,null,a.createElement(Be,{stats:m})),a.createElement(he,{className:"flex flex-col gap-1 items-end"},d&&a.createElement(ye,{items:d,label:"Available on",size:"sm"}),f&&a.createElement(ye,{items:f,label:"Rewards",size:"sm"}))))});uo.displayName="CampaignItem";const fo=a.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,chains:l,tvl:c,turtleBoost:u,category:f}=e,d=a.createElement("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center"},a.createElement("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor"},a.createElement("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"}))),p=a.useMemo(()=>[{label:"TVL",value:c},{label:"Turtle Boost",value:u,icon:a.createElement(D.SparklesIcon,{size:12})}],[c,u]);return a.createElement(Me,{ref:o,onSelect:t,selected:n,...r},a.createElement(Fe,null,a.createElement(pe,null,a.createElement(ne,{icon:s||d,textSize:"base",iconSize:"lg"},i)),a.createElement(he,null,a.createElement("span",{className:"text-md font-semibold text-foreground"},u))),a.createElement(je,null,a.createElement(pe,null,a.createElement(Be,{stats:p})),a.createElement(he,null,l&&a.createElement(ye,{items:l,label:"Available on",size:"sm"}))))});fo.displayName="DealItem";const de=(e,t,n)=>{const r=document.createElement(e),[o,s]=Array.isArray(t)?[void 0,t]:[t,n];return o&&Object.assign(r,o),s==null||s.forEach(i=>r.appendChild(i)),r},au=(e,t)=>{var n;return t==="left"?e.offsetLeft:(((n=e.offsetParent instanceof HTMLElement?e.offsetParent:null)==null?void 0:n.offsetWidth)??0)-e.offsetWidth-e.offsetLeft},ou=e=>e.offsetWidth>0&&e.offsetHeight>0,su=(e,t)=>{!customElements.get(e)&&customElements.define(e,t)};function iu(e,t,{reverse:n=!1}={}){const r=e.length;for(let o=n?r-1:0;n?o>=0:o<r;n?o--:o++)t(e[o],o)}function lu(e,t,n,r){const o=t.formatToParts(e);n&&o.unshift({type:"prefix",value:n}),r&&o.push({type:"suffix",value:r});const s=[],i=[],l=[],c=[],u={},f=h=>`${h}:${u[h]=(u[h]??-1)+1}`;let d="",p=!1,m=!1;for(const h of o){d+=h.value;const v=h.type==="minusSign"||h.type==="plusSign"?"sign":h.type;v==="integer"?(p=!0,i.push(...h.value.split("").map(b=>({type:v,value:parseInt(b)})))):v==="group"?i.push({type:v,value:h.value}):v==="decimal"?(m=!0,l.push({type:v,value:h.value,key:f(v)})):v==="fraction"?l.push(...h.value.split("").map(b=>({type:v,value:parseInt(b),key:f(v),pos:-1-u[v]}))):(p||m?c:s).push({type:v,value:h.value,key:f(v)})}const g=[];for(let h=i.length-1;h>=0;h--){const v=i[h];g.unshift(v.type==="integer"?{...v,key:f(v.type),pos:u[v.type]}:{...v,key:f(v.type)})}return{pre:s,integer:g,fraction:l,post:c,valueAsString:d,value:typeof e=="string"?parseFloat(e):e}}const cu=String.raw,uu=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),du=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),lr=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,dt="--_number-flow-d-opacity",yn="--_number-flow-d-width",ft="--_number-flow-dx",wn="--_number-flow-d",fu=(()=>{try{return CSS.registerProperty({name:dt,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:ft,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:yn,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:wn,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),mu="var(--number-flow-char-height, 1em)",ue="var(--number-flow-mask-height, 0.25em)",cr=`calc(${ue} / 2)`,qt="var(--number-flow-mask-width, 0.5em)",ge=`calc(${qt} / var(--scale-x))`,Ke="#000 0, transparent 71%",ur=cu`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${mu} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${yn}) / var(--width));transform:translateX(var(${ft})) scaleX(var(--scale-x));margin:0 calc(-1 * ${qt});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${ge},#000 calc(100% - ${ge}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${ue},#000 calc(100% - ${ue}),transparent 100% ),radial-gradient(at bottom right,${Ke}),radial-gradient(at bottom left,${Ke}),radial-gradient(at top left,${Ke}),radial-gradient(at top right,${Ke});-webkit-mask-size:100% calc(100% - ${ue} * 2),calc(100% - ${ge} * 2) 100%,${ge} ${ue},${ge} ${ue},${ge} ${ue},${ge} ${ue};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${cr} ${qt};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${ft})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${wn})}.digit__num,.number .section::after{padding:${cr} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${dt}))}`,pu=HTMLElement,hu=du&&uu&&fu;let Ye;class mo extends pu{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...n}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,n)}get animated(){return this._animated}set animated(t){var n;this.animated!==t&&(this._animated=t,(n=this.shadowRoot)==null||n.getAnimations().forEach(r=>r.finish()))}set data(t){var n;if(t==null)return;const{pre:r,integer:o,fraction:s,post:i,value:l}=t;if(this.created){const c=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(c.value,l):this.trend,this.computedAnimated=hu&&this._animated&&(!this.respectMotionPreference||!(lr!=null&&lr.matches))&&ou(this),(n=this.plugins)==null||n.forEach(u=>{var f;return(f=u.onUpdate)==null?void 0:f.call(u,t,c,this)}),this.batched||this.willUpdate(),this._pre.update(r),this._num.update({integer:o,fraction:s}),this._post.update(i),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}if(typeof CSSStyleSheet<"u"&&this.shadowRoot.adoptedStyleSheets)Ye||(Ye=new CSSStyleSheet,Ye.replaceSync(ur)),this.shadowRoot.adoptedStyleSheets=[Ye];else{const c=document.createElement("style");c.textContent=ur,this.shadowRoot.appendChild(c)}this._pre=new fr(this,r,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new gu(this,o,s),this.shadowRoot.appendChild(this._num.el),this._post=new fr(this,i,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(n=>n.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}}mo.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(e,t)=>Math.sign(t-e),respectMotionPreference:!0,plugins:void 0,digits:void 0};class gu{constructor(t,n,r,{className:o,...s}={}){this.flow=t,this._integer=new dr(t,n,{justify:"right",part:"integer"}),this._fraction=new dr(t,r,{justify:"left",part:"fraction"}),this._inner=de("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=de("span",{...s,part:"number",className:`number ${o??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:n}){this._integer.update(t),this._fraction.update(n)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const n=this._prevLeft-t.left,r=this.el.offsetWidth,o=this._prevWidth-r;this.el.style.setProperty("--width",String(r)),this.el.animate({[ft]:[`${n}px`,"0px"],[yn]:[o,0]},{...this.flow.transformTiming,composite:"accumulate"})}}class po{constructor(t,n,{justify:r,className:o,...s},i){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=r;const l=n.map(c=>this.addChar(c).el);this.el=de("span",{...s,className:`section section--justify-${r} ${o??""}`},i?i(l):l)}addChar(t,{startDigitsAtZero:n=!1,...r}={}){const o=t.type==="integer"||t.type==="fraction"?new go(this,t.type,n?0:t.value,t.pos,{...r,onRemove:this.onCharRemove(t.key)}):new vu(this,t.type,t.value,{...r,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,o),o}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(n=>{n.el.style.top=`${n.el.offsetTop}px`,n.el.style[this.justify]=`${au(n.el,this.justify)}px`}),t.forEach(n=>{n.el.setAttribute("inert",""),n.present=!1})}addNewAndUpdateExisting(t){const n=new Map,r=new Map,o=this.justify==="left",s=o?"prepend":"append";if(iu(t,i=>{let l;this.children.has(i.key)?(l=this.children.get(i.key),r.set(i,l),this.unpop(l),l.present=!0):(l=this.addChar(i,{startDigitsAtZero:!0,animateIn:!0}),n.set(i,l)),this.el[s](l.el)},{reverse:o}),this.flow.computedAnimated){const i=this.el.getBoundingClientRect();n.forEach(l=>{l.willUpdate(i)})}n.forEach((i,l)=>{i.update(l.value)}),r.forEach((i,l)=>{i.update(l.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(n=>n.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(o=>o.didUpdate(t));const n=t[this.justify],r=this._prevOffset-n;r&&this.children.size&&this.el.animate({transform:[`translateX(${r}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}class dr extends po{update(t){const n=new Map;this.children.forEach((r,o)=>{t.find(s=>s.key===o)||n.set(o,r),this.unpop(r)}),this.addNewAndUpdateExisting(t),n.forEach(r=>{r instanceof go&&r.update(0)}),this.pop(n)}}class fr extends po{update(t){const n=new Map;this.children.forEach((r,o)=>{t.find(s=>s.key===o)||n.set(o,r)}),this.pop(n),this.addNewAndUpdateExisting(t)}}class Xt{constructor(t,n,{onRemove:r,animateIn:o=!1}={}){this.flow=t,this.el=n,this._present=!0,this._remove=()=>{var s;this.el.remove(),(s=this._onRemove)==null||s.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&o&&this.el.animate({[dt]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=r}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[dt]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class ho extends Xt{constructor(t,n,r,o){super(t.flow,r,o),this.section=t,this.value=n,this.el=r}}class go extends ho{constructor(t,n,r,o,s){var i,l;const c=(((l=(i=t.flow.digits)==null?void 0:i[o])==null?void 0:l.max)??9)+1,u=Array.from({length:c}).map((d,p)=>{const m=de("span",{className:"digit__num"},[document.createTextNode(String(p))]);return p!==r&&m.setAttribute("inert",""),m.style.setProperty("--n",String(p)),m}),f=de("span",{part:`digit ${n}-digit`,className:"digit"},u);f.style.setProperty("--current",String(r)),f.style.setProperty("--length",String(c)),super(t,r,f,s),this.pos=o,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=u,this.length=c}willUpdate(t){const n=this.el.getBoundingClientRect();this._prevValue=this.value;const r=n[this.section.justify]-t[this.section.justify],o=n.width/2;this._prevCenter=this.section.justify==="left"?r+o:r-o}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((n,r)=>r===t?n.removeAttribute("inert"):n.setAttribute("inert","")),this.value=t}didUpdate(t){const n=this.el.getBoundingClientRect(),r=n[this.section.justify]-t[this.section.justify],o=n.width/2,s=this.section.justify==="left"?r+o:r-o,i=this._prevCenter-s;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const l=this.getDelta();l&&(this.el.classList.add("is-spinning"),this.el.animate({[wn]:[-l,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const o of this.flow.plugins){const s=(t=o.getDelta)==null?void 0:t.call(o,this.value,this._prevValue,this);if(s!=null)return s}const n=this.value-this._prevValue,r=this.flow.computedTrend||Math.sign(n);return r<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:r>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:n}}class vu extends ho{constructor(t,n,r,o){const s=de("span",{className:"symbol__value",textContent:r});super(t,r,de("span",{part:`symbol ${n}`,className:"symbol"},[s]),o),this.type=n,this._children=new Map,this._onChildRemove=i=>()=>{this._children.delete(i)},this._children.set(r,new Xt(this.flow,s,{onRemove:this._onChildRemove(r)}))}willUpdate(t){if(this.type==="decimal")return;const n=this.el.getBoundingClientRect();this._prevOffset=n[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const n=this._children.get(this.value);n&&(n.present=!1);const r=this._children.get(t);if(r)r.present=!0;else{const o=de("span",{className:"symbol__value",textContent:t});this.el.appendChild(o),this._children.set(t,new Xt(this.flow,o,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const n=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],r=this._prevOffset-n;r&&this.el.animate({transform:[`translateX(${r}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}var hr;const xu=parseInt((hr=a.version.match(/^(\d+)\./))==null?void 0:hr[1]),En=xu>=19,bu=["data","digits"];class Sn extends mo{attributeChangedCallback(t,n,r){this[t]=JSON.parse(r)}}Sn.observedAttributes=En?[]:bu;su("number-flow-react",Sn);const Bt={},mr=En?e=>e:JSON.stringify;function pr(e){const{transformTiming:t,spinTiming:n,opacityTiming:r,animated:o,respectMotionPreference:s,trend:i,plugins:l,...c}=e;return[{transformTiming:t,spinTiming:n,opacityTiming:r,animated:o,respectMotionPreference:s,trend:i,plugins:l},c]}class yu extends a.Component{updateProperties(t){if(!this.el)return;this.el.batched=!this.props.isolate;const[n]=pr(this.props);Object.entries(n).forEach(([r,o])=>{this.el[r]=o??Sn.defaultProps[r]}),t!=null&&t.onAnimationsStart&&this.el.removeEventListener("animationsstart",t.onAnimationsStart),this.props.onAnimationsStart&&this.el.addEventListener("animationsstart",this.props.onAnimationsStart),t!=null&&t.onAnimationsFinish&&this.el.removeEventListener("animationsfinish",t.onAnimationsFinish),this.props.onAnimationsFinish&&this.el.addEventListener("animationsfinish",this.props.onAnimationsFinish)}componentDidMount(){this.updateProperties(),En&&this.el&&(this.el.digits=this.props.digits,this.el.data=this.props.data)}getSnapshotBeforeUpdate(t){var n;if(this.updateProperties(t),t.data!==this.props.data){if(this.props.group)return this.props.group.willUpdate(),()=>{var r;return(r=this.props.group)==null?void 0:r.didUpdate()};if(!this.props.isolate)return(n=this.el)==null||n.willUpdate(),()=>{var r;return(r=this.el)==null?void 0:r.didUpdate()}}return null}componentDidUpdate(t,n,r){r==null||r()}handleRef(t){this.props.innerRef&&(this.props.innerRef.current=t),this.el=t}render(){const[t,{innerRef:n,className:r,data:o,willChange:s,isolate:i,group:l,digits:c,onAnimationsStart:u,onAnimationsFinish:f,...d}]=pr(this.props);return a.createElement("number-flow-react",{ref:this.handleRef,"data-will-change":s?"":void 0,class:r,...d,dangerouslySetInnerHTML:{__html:""},suppressHydrationWarning:!0,digits:mr(c),data:mr(o)})}constructor(t){super(t),this.handleRef=this.handleRef.bind(this)}}const wu=a.forwardRef(function({value:t,locales:n,format:r,prefix:o,suffix:s,...i},l){a.useImperativeHandle(l,()=>c.current,[]);const c=a.useRef(),u=a.useContext(Eu);u==null||u.useRegister(c);const f=a.useMemo(()=>n?JSON.stringify(n):"",[n]),d=a.useMemo(()=>r?JSON.stringify(r):"",[r]),p=a.useMemo(()=>{var g;const m=Bt[g=`${f}:${d}`]??(Bt[g]=new Intl.NumberFormat(n,r));return lu(t,m,o,s)},[t,f,d,o,s]);return a.createElement(yu,{...i,group:u,data:p,innerRef:c})}),Eu=a.createContext(void 0),vo=({apr:e,aprBreakdown:t})=>x.createElement(fa,null,x.createElement(ma,{asChild:!0},x.createElement("span",{className:"text-2xl text-accent font-semibold inline-flex items-center gap-1"},x.createElement(wu,{value:e,format:{style:"percent",maximumFractionDigits:2}}),x.createElement(D.InfoIcon,{size:16,className:"text-muted-foreground font-bold"}))),x.createElement(pa,null,x.createElement("div",{className:"flex flex-col gap-2"},t.map(n=>x.createElement("div",{key:n.name,className:"flex justify-between"},x.createElement("span",{className:"text-sm text-muted-foreground"},n.name),x.createElement("span",{className:"text-sm text-accent font-semibold"},n.apr))),x.createElement(Yt,null),x.createElement("div",{className:"flex justify-between"},x.createElement("span",{className:"text-sm text-accent"},"Net Reward Rate"),x.createElement("span",{className:"text-sm text-accent font-semibold"},e)),x.createElement("p",{className:"text-sm text-muted-foreground text-center"},"All reward amounts displayed in this app are the amounts after fees, please note that the reward rate is not guaranteed and may change over time. The APR is the annualized return on investment for the opportunity.")))),xo=({value:e})=>{const{depositAmount:t,apr:n,symbol:r,price:o}=e,s=x.useMemo(()=>{const i=t*n/12,l=i*o,c=t*n,u=c*o;return{monthlyReward:i.toFixed(4),monthlyRewardUsd:l.toFixed(2),yearlyReward:c.toFixed(4),yearlyRewardUsd:u.toFixed(2)}},[t,n,r,o]);return x.createElement("div",{className:"space-y-1"},x.createElement("div",{className:"flex justify-between"},x.createElement("span",{className:"text-sm text-muted-foreground"},"Monthly"),x.createElement("span",{className:"text-sm text-muted-foreground font-semibold"},s.monthlyReward," ",r," ($",s.monthlyRewardUsd,")")),x.createElement("div",{className:"flex justify-between"},x.createElement("span",{className:"text-sm text-muted-foreground"},"Yearly"),x.createElement("span",{className:"text-sm text-muted-foreground font-semibold"},s.yearlyReward," ",r," ($",s.yearlyRewardUsd,")")))},bo=({type:e})=>x.createElement(gn,{variant:"muted",className:"gap-2"},x.createElement(D.HandCoinsIcon,{size:16})," ",e),yo=()=>{const e=[{icon:x.createElement(D.MessageSquareTextIcon,{size:16}),description:"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Porro expedita amet hic beatae similique vero recusandae necessitatibus"},{icon:x.createElement(D.SproutIcon,{size:16}),description:"Lend your USDT with Morpho and earn USDT rewards"},{icon:x.createElement(D.GiftIcon,{size:16}),description:"Rewards are automatically distributed every block and accrue to your position"}];return x.createElement("div",{className:"flex flex-col gap-3 w-full"},e.map(t=>x.createElement("div",{key:t.description,className:"flex gap-3"},x.createElement("div",{className:"text-muted-foreground flex-shrink-0 w-4 h-4 flex items-center justify-center"},t.icon),x.createElement("p",{className:"text-xs text-muted-foreground flex-1"},t.description))))},wo=({iconUrl:e,name:t,onClick:n})=>x.createElement(q,{variant:"container",padding:"xs",rounded:"full",onClick:n,className:"flex items-center justify-between gap-3 cursor-pointer "},x.createElement(ne,{icon:e,textSize:"sm",iconSize:"base"},t),x.createElement(D.ChevronDownIcon,{className:"w-4 h-4 text-muted-foreground"})),Su=a.forwardRef(({className:e,value:t,onOpportunityClick:n,hideDisclaimer:r,opportunitySelector:o,...s},i)=>a.createElement("div",{className:"space-y-2"},a.createElement(q,{variant:"item",ref:i,padding:"md",className:y("space-y-3",e),...s},a.createElement("div",{className:"flex justify-between"},a.createElement(vo,{apr:t.totalApr,aprBreakdown:t.aprBreakdown}),o==="new"&&a.createElement(wo,{iconUrl:t.icon,name:t.vaultSymbol,onClick:n}),o==="old"&&a.createElement(lo,{icon:io(t.icon,t.vaultSymbol),text:t.vaultSymbol,onClick:n,size:"xs"})),a.createElement(xo,{value:t.depositDetails})),!r&&a.createElement(q,{ref:i,padding:"md",gradientBorder:"auto",className:y("space-y-3",e),...s},a.createElement("div",{className:"flex flex-col justify-between items-center gap-3"},a.createElement("div",{className:"flex justify-between w-full p-1"},a.createElement(bo,{type:t.type}),a.createElement("span",{className:"text-sm text-foreground font-semibold"},"TVL: ",t.tvlUsd)),a.createElement(Yt,null),a.createElement(yo,null)))));function Nu({opportunities:e,searchQuery:t,activeFilterIds:n,filters:r}){return x.useMemo(()=>{let o=e;if(t){const s=t.toLowerCase();o=o.filter(i=>{var l,c;return i.name.toLowerCase().includes(s)||((l=i.protocol)==null?void 0:l.toLowerCase().includes(s))||((c=i.chain)==null?void 0:c.toLowerCase().includes(s))})}if(n.length>0){const s=r.filter(i=>n.includes(i.id)).map(i=>i.filterFn);o=o.filter(i=>s.every(l=>l(i)))}return o},[e,t,n,r])}function Cu({opportunities:e,groupBy:t}){return x.useMemo(()=>{const n=[...e].sort((s,i)=>{var u,f;const l=parseFloat(((u=s.apr)==null?void 0:u.replace("%",""))||"0");return parseFloat(((f=i.apr)==null?void 0:f.replace("%",""))||"0")-l});if(t==="none")return[{id:"all-opportunities",items:n}];const r=n.reduce((s,i)=>{var f,d,p;let l,c,u;switch(t){case"partner":l=((f=i.partner)==null?void 0:f.name)||"other",c=((d=i.partner)==null?void 0:d.name)||"Other",u=(p=i.partner)==null?void 0:p.icon;break;case"chain":l=i.chain.name||"other",c=i.chain.name||"Other",u=i.chain.icon;break;default:l="all",c="All"}return s[l]||(s[l]={id:l,title:c,icon:u,items:[]}),s[l].items.push(i),s},{}),o=Object.values(r);return o.sort((s,i)=>{var u,f;const l=s.items.length>0?parseFloat(((u=s.items[0].apr)==null?void 0:u.replace("%",""))||"0"):0;return(i.items.length>0?parseFloat(((f=i.items[0].apr)==null?void 0:f.replace("%",""))||"0"):0)-l}),o},[e,t])}const Au=[{id:"all",label:"All",filterFn:e=>!0},{id:"stablecoins",label:"Stables",filterFn:e=>e.name.includes("USD")},{id:"eth",label:"ETH",filterFn:e=>e.name.includes("ETH")},{id:"btc",label:"BTC",filterFn:e=>e.name.includes("BTC")}],Ru=({opportunities:e,onOpportunityClick:t,groupBy:n="none",filters:r=Au,filterVariant:o="badge",multipleFilters:s=!0,showSearch:i=!0,searchPlaceholder:l="Search opportunities...",searchDebounceDelay:c=300,className:u,itemClassName:f,emptyState:d})=>{const[p,m]=x.useState(""),[g,h]=x.useState([]),v=Nu({opportunities:e,searchQuery:p,activeFilterIds:g,filters:r}),b=Cu({opportunities:v,groupBy:n}),w=N=>x.createElement(bn,{value:N,onSelect:()=>t==null?void 0:t(N),className:f});return x.createElement("div",{className:u},x.createElement("div",{className:"mb-4"},x.createElement(xn,{filters:r.map(({filterFn:N,...E})=>E),activeFilters:g,onFiltersChange:h,variant:o,multipleFilters:s,showSearch:i,searchValue:p,onSearchChange:m,searchPlaceholder:l,searchDebounceDelay:c})),x.createElement(vn,{groups:b,renderItem:w,getItemKey:N=>N.name,showGroupHeaders:n!=="none",emptyState:d||x.createElement("div",{className:"text-center py-8 text-muted-foreground"},p||g.length>0?"No opportunities match your filters":"No opportunities available")}))},_u={colors:{neonGreen:"oklch(0.86 0.16 142.5)",darkGreen:"oklch(0.24 0.16 142.5)",ninjaBlack:"oklch(0.1 0.005 120)",wiseWhite:"oklch(0.98 0 0)",wiseGray:"oklch(0.17 0.003 120)",mintCream:"oklch(0.95 0.046 109)",turtleYellow:"oklch(0.97 0.21 98.2)",turtleRed:"oklch(0.6 0.28 29)",whiteTransparent:"oklch(0.98 0 0 / 0.02)",light:{background:"oklch(1 0 0)",foreground:"oklch(0.141 0.005 285.823)",card:"oklch(1 0 0)",cardForeground:"oklch(0.141 0.005 285.823)",popover:"oklch(1 0 0)",popoverForeground:"oklch(0.141 0.005 285.823)",primary:"oklch(0.21 0.006 285.885)",primaryForeground:"oklch(0.985 0 0)",secondary:"oklch(0.967 0.001 286.375)",secondaryForeground:"oklch(0.21 0.006 285.885)",muted:"oklch(0.967 0.001 286.375)",mutedForeground:"oklch(0.552 0.016 285.938)",accent:"oklch(0.967 0.001 286.375)",accentForeground:"oklch(0.21 0.006 285.885)",destructive:"oklch(0.577 0.245 27.325)",border:"oklch(0.92 0.004 286.32)",input:"oklch(0.92 0.004 286.32)",ring:"oklch(0.705 0.015 286.067)"},dark:{background:"oklch(0.141 0.005 285.823)",foreground:"oklch(0.985 0 0)",card:"oklch(0.21 0.006 285.885)",cardForeground:"oklch(0.985 0 0)",popover:"oklch(0.21 0.006 285.885)",popoverForeground:"oklch(0.985 0 0)",primary:"oklch(0.92 0.004 286.32)",primaryForeground:"oklch(0.21 0.006 285.885)",secondary:"oklch(0.274 0.006 286.033)",secondaryForeground:"oklch(0.985 0 0)",muted:"oklch(0.274 0.006 286.033)",mutedForeground:"oklch(0.705 0.015 286.067)",accent:"oklch(0.274 0.006 286.033)",accentForeground:"oklch(0.985 0 0)",destructive:"oklch(0.704 0.191 22.216)",border:"oklch(1 0 0 / 10%)",input:"oklch(1 0 0 / 15%)",ring:"oklch(0.552 0.016 285.938)"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"3rem","4xl":"4rem"},radius:{none:"0",sm:"calc(0.625rem - 4px)",md:"calc(0.625rem - 2px)",lg:"0.625rem",xl:"calc(0.625rem + 4px)",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}]},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadow:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}};exports.AssetFilters=xn;exports.AssetList=ru;exports.AssetRow=co;exports.Avatar=Za;exports.AvatarFallback=Ja;exports.AvatarImage=Qa;exports.Badge=gn;exports.BaseSelector=lo;exports.Button=nt;exports.CampaignItem=uo;exports.Card=q;exports.CardContent=ls;exports.CardDescription=is;exports.CardFooter=cs;exports.CardHeader=os;exports.CardTitle=ss;exports.Chip=Qt;exports.DealItem=fo;exports.Dialog=Ac;exports.DialogClose=_c;exports.DialogContent=Tc;exports.DialogDescription=Dc;exports.DialogFooter=Oc;exports.DialogHeader=kc;exports.DialogOverlay=za;exports.DialogPortal=Va;exports.DialogTitle=Pc;exports.DialogTrigger=Rc;exports.HoverCard=fa;exports.HoverCardContent=pa;exports.HoverCardTrigger=ma;exports.IconAnimation=Jt;exports.IconList=ye;exports.InfoCard=rt;exports.Input=Kt;exports.Label=Go;exports.LabelWithIcon=ne;exports.ManagedTable=ms;exports.NavigationBar=pt;exports.NavigationItem=ht;exports.OpportunityApr=vo;exports.OpportunityDetailsV1=fs;exports.OpportunityDisclaimer=yo;exports.OpportunityItem=bn;exports.OpportunityList=Ru;exports.OpportunityRateEstimator=xo;exports.OpportunitySection=Su;exports.OpportunitySelector=wo;exports.OpportunityType=bo;exports.RouteDetails=qc;exports.ScrollArea=br;exports.ScrollBar=yr;exports.SearchBar=so;exports.Select=wr;exports.SelectContent=Sr;exports.SelectGroup=qo;exports.SelectItem=Nr;exports.SelectLabel=Ko;exports.SelectScrollDownButton=Ar;exports.SelectScrollUpButton=Cr;exports.SelectSeparator=Yo;exports.SelectTrigger=Er;exports.SelectValue=Xo;exports.Separator=Yt;exports.SlippageSelector=oo;exports.SwapDetails=ao;exports.SwapInput=ro;exports.Switch=Qo;exports.TableCell=ps;exports.Tabs=Jc;exports.Toaster=Zo;exports.Toggle=Jo;exports.ToggleGroup=es;exports.ToggleGroupItem=ts;exports.TokenSelector=no;exports.Tooltip=ns;exports.TooltipContent=as;exports.TooltipProvider=_r;exports.TooltipTrigger=rs;exports.TxStatus=to;exports.WidgetItem=Me;exports.WidgetItemBottom=je;exports.WidgetItemLeft=pe;exports.WidgetItemRight=he;exports.WidgetItemStats=Be;exports.WidgetItemTop=Fe;exports.WidgetListItems=vn;exports.badgeVariants=eo;exports.buttonVariants=Tr;exports.cardVariants=Ze;exports.chipVariants=kr;exports.cn=y;exports.hoverCardContentVariants=Je;exports.iconAnimationVariants=Or;exports.iconUrlToImg=io;exports.inputVariants=$t;exports.labelWithIconVariants=Pr;exports.navigationBarVariants=Dr;exports.navigationItemVariants=Lr;exports.toggleVariants=Zt;exports.tokens=_u;
|
|
176
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},kP="DialogDescriptionWarning",IP=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${av(kP).contentName}}.`;return p.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ws=Kg,lv=Yg,Ks=Zg,qs=Qg,Ys=Jg,hc=tv,gc=rv,io=sv;function cv({...e}){return a.jsx(Ws,{"data-slot":"dialog",...e})}function DP({...e}){return a.jsx(lv,{"data-slot":"dialog-trigger",...e})}function uv({...e}){return a.jsx(Ks,{"data-slot":"dialog-portal",...e})}function LP({...e}){return a.jsx(io,{"data-slot":"dialog-close",...e})}function dv({className:e,...t}){return a.jsx(qs,{"data-slot":"dialog-overlay",className:S("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function fv({className:e,children:t,showCloseButton:n=!0,...r}){return a.jsxs(uv,{"data-slot":"dialog-portal",children:[a.jsx(dv,{className:"backdrop-blur-sm"}),a.jsxs(Ys,{"data-slot":"dialog-content",className:S("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-gradient-soft fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&a.jsxs(io,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(xn,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pv({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-header",className:S("flex flex-col gap-2 text-center sm:text-left",e),...t})}function OP({className:e,...t}){return a.jsx("div",{"data-slot":"dialog-footer",className:S("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function mv({className:e,...t}){return a.jsx(hc,{"data-slot":"dialog-title",className:S("text-lg leading-none font-semibold",e),...t})}function hv({className:e,...t}){return a.jsx(gc,{"data-slot":"dialog-description",className:S("text-muted-foreground text-sm",e),...t})}const gv=Ee("bg-neutral-alpha-5 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-2 overflow-hidden rounded-full whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",warning:"[a&]:hover:bg-secondary/90 text-amber-600",destructive:"text-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"text-primary [a&]:hover:bg-primary/90",muted:"text-muted-foreground"},size:{sm:"px-2.5 py-0.5 text-[10px]",default:"px-3.5 py-1 text-xs",lg:"px-5 py-2 text-sm"}},defaultVariants:{variant:"default",size:"default"}});function Gr({className:e,variant:t,size:n,asChild:r=!1,...o}){const s=r?Tn:"span";return a.jsx(s,{"data-slot":"badge",className:S(gv({variant:t,size:n}),e),...o})}function vv({className:e,...t}){return a.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a.jsx("table",{"data-slot":"table",className:S("w-full caption-bottom text-sm","border-separate border-spacing-y-2",e),...t})})}function xv({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:S(e),...t})}function bv({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:S("",e),...t})}function FP({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:S("border-t font-medium [&>tr]:last:border-b-0",e),...t})}function qo({className:e,...t}){return a.jsx("tr",{"data-slot":"table-row",className:S('hover:[&>[data-slot="table-cell"]]:bg-neutral-alpha-5 data-[state=selected]:bg-neutral-alpha-10 transition-colors',e),...t})}function yv({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:S("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","text-xs",e),...t})}function Va({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:S("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]","first:rounded-l-full first:pl-4 last:rounded-r-full last:pr-4 bg-neutral-alpha-2",e),...t})}function $P({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:S("text-muted-foreground mt-4 text-sm",e),...t})}var Xs="Checkbox",[VP]=Me(Xs),[BP,vc]=VP(Xs);function zP(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[m,h]=Ie({prop:n,defaultProp:o??!1,onChange:c,caller:Xs}),[v,g]=p.useState(null),[b,x]=p.useState(null),y=p.useRef(!1),w=v?!!i||!!v.closest("form"):!0,C={checked:m,disabled:s,setChecked:h,control:v,setControl:g,name:l,form:i,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:zt(o)?!1:o,isFormControl:w,bubbleInput:b,setBubbleInput:x};return a.jsx(BP,{scope:t,...C,children:HP(d)?d(C):r})}var wv="CheckboxTrigger",Cv=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:m,isFormControl:h,bubbleInput:v}=vc(wv,e),g=ee(o,f),b=p.useRef(c);return p.useEffect(()=>{const x=s?.form;if(x){const y=()=>d(b.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,d]),a.jsx(H.button,{type:"button",role:"checkbox","aria-checked":zt(c)?"mixed":c,"aria-required":u,"data-state":Pv(c),"data-disabled":l?"":void 0,disabled:l,value:i,...r,ref:g,onKeyDown:I(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:I(n,x=>{d(y=>zt(y)?!0:!y),v&&h&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})})});Cv.displayName=wv;var Sv=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return a.jsx(zP,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:l,required:i,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:m})=>a.jsxs(a.Fragment,{children:[a.jsx(Cv,{...d,ref:t,__scopeCheckbox:n}),m&&a.jsx(Tv,{__scopeCheckbox:n})]})})});Sv.displayName=Xs;var Rv="CheckboxIndicator",jv=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=vc(Rv,n);return a.jsx(ye,{present:r||zt(s.checked)||s.checked===!0,children:a.jsx(H.span,{"data-state":Pv(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});jv.displayName=Rv;var Ev="CheckboxBubbleInput",Tv=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:m,setBubbleInput:h}=vc(Ev,e),v=ee(n,h),g=Kr(s),b=Ss(r);p.useEffect(()=>{const y=m;if(!y)return;const w=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(w,"checked").set,P=!o.current;if(g!==s&&R){const T=new Event("click",{bubbles:P});y.indeterminate=zt(s),R.call(y,zt(s)?!1:s),y.dispatchEvent(T)}},[m,g,s,o]);const x=p.useRef(zt(s)?!1:s);return a.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:l,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Tv.displayName=Ev;function HP(e){return typeof e=="function"}function zt(e){return e==="indeterminate"}function Pv(e){return zt(e)?"indeterminate":e?"checked":"unchecked"}function GP({className:e,...t}){return a.jsx(Sv,{"data-slot":"checkbox",className:S("peer border-border dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-full border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(jv,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:a.jsx(vn,{className:"size-3.5"})})})}var Ba=["Enter"," "],UP=["ArrowDown","PageUp","Home"],_v=["ArrowUp","PageDown","End"],WP=[...UP,..._v],KP={ltr:[...Ba,"ArrowRight"],rtl:[...Ba,"ArrowLeft"]},qP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ao="Menu",[Ur,YP,XP]=ar(ao),[Mn,Mv]=Me(ao,[XP,Rt,js]),lo=Rt(),Av=js(),[Nv,sn]=Mn(ao),[ZP,co]=Mn(ao),kv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,l=lo(t),[c,u]=p.useState(null),f=p.useRef(!1),d=ve(s),m=Pn(o);return p.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),a.jsx(ur,{...l,children:a.jsx(Nv,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:a.jsx(ZP,{scope:t,onClose:p.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:i,children:r})})})};kv.displayName=ao;var QP="MenuAnchor",xc=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=lo(n);return a.jsx(dr,{...o,...r,ref:t})});xc.displayName=QP;var bc="MenuPortal",[JP,Iv]=Mn(bc,{forceMount:void 0}),Dv=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=sn(bc,t);return a.jsx(JP,{scope:t,forceMount:n,children:a.jsx(ye,{present:n||s.open,children:a.jsx(_n,{asChild:!0,container:o,children:r})})})};Dv.displayName=bc;var tt="MenuContent",[e_,yc]=Mn(tt),Lv=p.forwardRef((e,t)=>{const n=Iv(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=sn(tt,e.__scopeMenu),i=co(tt,e.__scopeMenu);return a.jsx(Ur.Provider,{scope:e.__scopeMenu,children:a.jsx(ye,{present:r||s.open,children:a.jsx(Ur.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(t_,{...o,ref:t}):a.jsx(n_,{...o,ref:t})})})})}),t_=p.forwardRef((e,t)=>{const n=sn(tt,e.__scopeMenu),r=p.useRef(null),o=ee(t,r);return p.useEffect(()=>{const s=r.current;if(s)return Vs(s)},[]),a.jsx(wc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),n_=p.forwardRef((e,t)=>{const n=sn(tt,e.__scopeMenu);return a.jsx(wc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),r_=Gt("MenuContent.ScrollLock"),wc=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...g}=e,b=sn(tt,n),x=co(tt,n),y=lo(n),w=Av(n),C=YP(n),[R,P]=p.useState(null),T=p.useRef(null),j=ee(t,T,b.onContentChange),M=p.useRef(0),D=p.useRef(""),z=p.useRef(0),q=p.useRef(null),Y=p.useRef("right"),G=p.useRef(0),Z=v?so:p.Fragment,$=v?{as:r_,allowPinchZoom:!0}:void 0,V=O=>{const te=D.current+O,fe=C().filter(N=>!N.disabled),k=document.activeElement,A=fe.find(N=>N.ref.current===k)?.textValue,F=fe.map(N=>N.textValue),B=h_(F,te,A),X=fe.find(N=>N.textValue===B)?.ref.current;(function N(U){D.current=U,window.clearTimeout(M.current),U!==""&&(M.current=window.setTimeout(()=>N(""),1e3))})(te),X&&setTimeout(()=>X.focus())};p.useEffect(()=>()=>window.clearTimeout(M.current),[]),$s();const _=p.useCallback(O=>Y.current===q.current?.side&&v_(O,q.current?.area),[]);return a.jsx(e_,{scope:n,searchRef:D,onItemEnter:p.useCallback(O=>{_(O)&&O.preventDefault()},[_]),onItemLeave:p.useCallback(O=>{_(O)||(T.current?.focus(),P(null))},[_]),onTriggerLeave:p.useCallback(O=>{_(O)&&O.preventDefault()},[_]),pointerGraceTimerRef:z,onPointerGraceIntentChange:p.useCallback(O=>{q.current=O},[]),children:a.jsx(Z,{...$,children:a.jsx(oo,{asChild:!0,trapped:o,onMountAutoFocus:I(s,O=>{O.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(tn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:h,children:a.jsx(ep,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:I(c,O=>{x.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Zr,{role:"menu","aria-orientation":"vertical","data-state":Jv(b.open),"data-radix-menu-content":"",dir:x.dir,...y,...g,ref:j,style:{outline:"none",...g.style},onKeyDown:I(g.onKeyDown,O=>{const fe=O.target.closest("[data-radix-menu-content]")===O.currentTarget,k=O.ctrlKey||O.altKey||O.metaKey,A=O.key.length===1;fe&&(O.key==="Tab"&&O.preventDefault(),!k&&A&&V(O.key));const F=T.current;if(O.target!==F||!WP.includes(O.key))return;O.preventDefault();const X=C().filter(N=>!N.disabled).map(N=>N.ref.current);_v.includes(O.key)&&X.reverse(),p_(X)}),onBlur:I(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(M.current),D.current="")}),onPointerMove:I(e.onPointerMove,Wr(O=>{const te=O.target,fe=G.current!==O.clientX;if(O.currentTarget.contains(te)&&fe){const k=O.clientX>G.current?"right":"left";Y.current=k,G.current=O.clientX}}))})})})})})})});Lv.displayName=tt;var o_="MenuGroup",Cc=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(H.div,{role:"group",...r,ref:t})});Cc.displayName=o_;var s_="MenuLabel",Ov=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(H.div,{...r,ref:t})});Ov.displayName=s_;var ms="MenuItem",uf="menu.itemSelect",Zs=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=p.useRef(null),i=co(ms,e.__scopeMenu),l=yc(ms,e.__scopeMenu),c=ee(t,s),u=p.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(uf,{bubbles:!0,cancelable:!0});d.addEventListener(uf,h=>r?.(h),{once:!0}),Xo(d,m),m.defaultPrevented?u.current=!1:i.onClose()}};return a.jsx(Fv,{...o,ref:c,disabled:n,onClick:I(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:I(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,d=>{const m=l.searchRef.current!=="";n||m&&d.key===" "||Ba.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Zs.displayName=ms;var Fv=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=yc(ms,n),l=Av(n),c=p.useRef(null),u=ee(t,c),[f,d]=p.useState(!1),[m,h]=p.useState("");return p.useEffect(()=>{const v=c.current;v&&h((v.textContent??"").trim())},[s.children]),a.jsx(Ur.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:a.jsx(tp,{asChild:!0,...l,focusable:!r,children:a.jsx(H.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:I(e.onPointerMove,Wr(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,Wr(v=>i.onItemLeave(v))),onFocus:I(e.onFocus,()=>d(!0)),onBlur:I(e.onBlur,()=>d(!1))})})})}),i_="MenuCheckboxItem",$v=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(Gv,{scope:e.__scopeMenu,checked:n,children:a.jsx(Zs,{role:"menuitemcheckbox","aria-checked":hs(n)?"mixed":n,...o,ref:t,"data-state":jc(n),onSelect:I(o.onSelect,()=>r?.(hs(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$v.displayName=i_;var Vv="MenuRadioGroup",[a_,l_]=Mn(Vv,{value:void 0,onValueChange:()=>{}}),Bv=p.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=ve(r);return a.jsx(a_,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(Cc,{...o,ref:t})})});Bv.displayName=Vv;var zv="MenuRadioItem",Hv=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=l_(zv,e.__scopeMenu),s=n===o.value;return a.jsx(Gv,{scope:e.__scopeMenu,checked:s,children:a.jsx(Zs,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":jc(s),onSelect:I(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Hv.displayName=zv;var Sc="MenuItemIndicator",[Gv,c_]=Mn(Sc,{checked:!1}),Uv=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=c_(Sc,n);return a.jsx(ye,{present:r||hs(s.checked)||s.checked===!0,children:a.jsx(H.span,{...o,ref:t,"data-state":jc(s.checked)})})});Uv.displayName=Sc;var u_="MenuSeparator",Wv=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Wv.displayName=u_;var d_="MenuArrow",Kv=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=lo(n);return a.jsx(Qr,{...o,...r,ref:t})});Kv.displayName=d_;var Rc="MenuSub",[f_,qv]=Mn(Rc),Yv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=sn(Rc,t),i=lo(t),[l,c]=p.useState(null),[u,f]=p.useState(null),d=ve(o);return p.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),a.jsx(ur,{...i,children:a.jsx(Nv,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:f,children:a.jsx(f_,{scope:t,contentId:Se(),triggerId:Se(),trigger:l,onTriggerChange:c,children:n})})})};Yv.displayName=Rc;var Pr="MenuSubTrigger",Xv=p.forwardRef((e,t)=>{const n=sn(Pr,e.__scopeMenu),r=co(Pr,e.__scopeMenu),o=qv(Pr,e.__scopeMenu),s=yc(Pr,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>f,[f]),p.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),a.jsx(xc,{asChild:!0,...u,children:a.jsx(Fv,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Jv(n.open),...e,ref:yt(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,Wr(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:I(e.onPointerLeave,Wr(d=>{f();const m=n.content?.getBoundingClientRect();if(m){const h=n.content?.dataset.side,v=h==="right",g=v?-5:5,b=m[v?"left":"right"],x=m[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:b,y:m.top},{x,y:m.top},{x,y:m.bottom},{x:b,y:m.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,d=>{const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||KP[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});Xv.displayName=Pr;var Zv="MenuSubContent",Qv=p.forwardRef((e,t)=>{const n=Iv(tt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=sn(tt,e.__scopeMenu),i=co(tt,e.__scopeMenu),l=qv(Zv,e.__scopeMenu),c=p.useRef(null),u=ee(t,c);return a.jsx(Ur.Provider,{scope:e.__scopeMenu,children:a.jsx(ye,{present:r||s.open,children:a.jsx(Ur.Slot,{scope:e.__scopeMenu,children:a.jsx(wc,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&c.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),m=qP[i.dir].includes(f.key);d&&m&&(s.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Qv.displayName=Zv;function Jv(e){return e?"open":"closed"}function hs(e){return e==="indeterminate"}function jc(e){return hs(e)?"indeterminate":e?"checked":"unchecked"}function p_(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function m_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function h_(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=m_(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function g_(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,f=l.y,d=c.x,m=c.y;f>r!=m>r&&n<(d-u)*(r-f)/(m-f)+u&&(o=!o)}return o}function v_(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return g_(n,t)}function Wr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var x_=kv,b_=xc,y_=Dv,w_=Lv,C_=Cc,S_=Ov,R_=Zs,j_=$v,E_=Bv,T_=Hv,P_=Uv,__=Wv,M_=Kv,A_=Yv,N_=Xv,k_=Qv,Qs="DropdownMenu",[I_]=Me(Qs,[Mv]),Ve=Mv(),[D_,ex]=I_(Qs),tx=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:l=!0}=e,c=Ve(t),u=p.useRef(null),[f,d]=Ie({prop:o,defaultProp:s??!1,onChange:i,caller:Qs});return a.jsx(D_,{scope:t,triggerId:Se(),triggerRef:u,contentId:Se(),open:f,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(m=>!m),[d]),modal:l,children:a.jsx(x_,{...c,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};tx.displayName=Qs;var nx="DropdownMenuTrigger",rx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=ex(nx,n),i=Ve(n);return a.jsx(b_,{asChild:!0,...i,children:a.jsx(H.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:yt(t,s.triggerRef),onPointerDown:I(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:I(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});rx.displayName=nx;var L_="DropdownMenuPortal",ox=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ve(t);return a.jsx(y_,{...r,...n})};ox.displayName=L_;var sx="DropdownMenuContent",ix=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ex(sx,n),s=Ve(n),i=p.useRef(!1);return a.jsx(w_,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,l=>{i.current||o.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:I(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ix.displayName=sx;var O_="DropdownMenuGroup",ax=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(C_,{...o,...r,ref:t})});ax.displayName=O_;var F_="DropdownMenuLabel",lx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(S_,{...o,...r,ref:t})});lx.displayName=F_;var $_="DropdownMenuItem",cx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(R_,{...o,...r,ref:t})});cx.displayName=$_;var V_="DropdownMenuCheckboxItem",ux=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(j_,{...o,...r,ref:t})});ux.displayName=V_;var B_="DropdownMenuRadioGroup",dx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(E_,{...o,...r,ref:t})});dx.displayName=B_;var z_="DropdownMenuRadioItem",fx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(T_,{...o,...r,ref:t})});fx.displayName=z_;var H_="DropdownMenuItemIndicator",px=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(P_,{...o,...r,ref:t})});px.displayName=H_;var G_="DropdownMenuSeparator",mx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(__,{...o,...r,ref:t})});mx.displayName=G_;var U_="DropdownMenuArrow",W_=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(M_,{...o,...r,ref:t})});W_.displayName=U_;var K_=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=Ve(t),[l,c]=Ie({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return a.jsx(A_,{...i,open:l,onOpenChange:c,children:n})},q_="DropdownMenuSubTrigger",hx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(N_,{...o,...r,ref:t})});hx.displayName=q_;var Y_="DropdownMenuSubContent",gx=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ve(n);return a.jsx(k_,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gx.displayName=Y_;var X_=tx,Z_=rx,vx=ox,Q_=ix,J_=ax,e4=lx,t4=cx,n4=ux,r4=dx,o4=fx,xx=px,s4=mx,i4=K_,a4=hx,l4=gx;function c4({className:e,...t}){return a.jsx("div",{className:S("relative z-10",e),children:a.jsx(X_,{"data-slot":"dropdown-menu",...t})})}function u4({...e}){return a.jsx(vx,{"data-slot":"dropdown-menu-portal",...e,container:document.querySelectorAll(".turtle-widget-root")[0]??void 0})}function d4({className:e,children:t,src:n,...r}){return a.jsxs(Z_,{"data-slot":"dropdown-menu-trigger",className:S("border-border bg-background flex max-h-10 min-w-[8rem] items-center rounded-full border outline-none",e),...r,children:[n?a.jsx("img",{src:n,alt:"",className:"aspect-square h-full max-h-[38px] rounded-full"}):void 0,a.jsx("div",{className:S("grow py-2 pr-2.5",n?"pl-2.5":"pl-4"),children:t}),a.jsx(wt,{className:"mr-2.5 size-4"})]})}function f4({className:e,sideOffset:t=4,...n}){return a.jsx(vx,{container:document.querySelectorAll(".turtle-widget-root")[0]??void 0,children:a.jsx(Q_,{"data-slot":"dropdown-menu-content",sideOffset:t,className:S("bg-background text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",e),...n})})}function p4({...e}){return a.jsx(J_,{"data-slot":"dropdown-menu-group",...e})}function m4({className:e,inset:t,variant:n="default",...r}){return a.jsx(t4,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:S("focus:bg-secondary focus:text-secondary-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function h4({className:e,children:t,checked:n,...r}){return a.jsxs(n4,{"data-slot":"dropdown-menu-checkbox-item",className:S("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(xx,{children:a.jsx(vn,{className:"size-4"})})}),t]})}function g4({...e}){return a.jsx(r4,{"data-slot":"dropdown-menu-radio-group",...e})}function v4({className:e,children:t,...n}){return a.jsxs(o4,{"data-slot":"dropdown-menu-radio-item",className:S("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[a.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:a.jsx(xx,{children:a.jsx(gw,{className:"size-2 fill-current"})})}),t]})}function x4({className:e,inset:t,...n}){return a.jsx(e4,{"data-slot":"dropdown-menu-label","data-inset":t,className:S("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function b4({className:e,...t}){return a.jsx(s4,{"data-slot":"dropdown-menu-separator",className:S("bg-border -mx-1 my-1 h-px",e),...t})}function y4({className:e,...t}){return a.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:S("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function w4({...e}){return a.jsx(i4,{"data-slot":"dropdown-menu-sub",...e})}function C4({className:e,inset:t,children:n,...r}){return a.jsxs(a4,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:S("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,a.jsx(xp,{className:"ml-auto size-4"})]})}function S4({className:e,...t}){return a.jsx(l4,{"data-slot":"dropdown-menu-sub-content",className:S("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}const R4=Ee("relative flex rounded-full font-normal",{variants:{variant:{default:"gap-1.5",segment:"border-border bg-neutral-alpha-2 gap-2.5 border",pill:"border-border bg-neutral-alpha-2 gap-2.5 border p-0.5"},size:{default:"h-9",sm:"h-7",xs:"h-6"}},defaultVariants:{variant:"default",size:"default"}}),j4=Ee("transition-all duration-300",{variants:{variant:{default:"absolute",segment:"bg-neutral-alpha-5 absolute inset-0 origin-center rounded-full",pill:"bg-neutral-alpha-5 absolute inset-0.5 origin-center rounded-full"}},defaultVariants:{variant:"default"}}),E4=Ee("text-muted-foreground relative z-10 flex w-full items-center justify-center rounded-full whitespace-nowrap transition-all sm:grow-0",{variants:{variant:{default:"border-border bg-neutral-alpha-2 data-[active=true]:bg-neutral-alpha-10 data-[active=true]:text-foreground border",segment:"data-[active=true]:text-primary",pill:"data-[active=true]:text-foreground"},size:{default:"px-4 py-2 text-sm",sm:"px-3 py-1.5 text-xs",xs:"px-3 py-1 text-[10px]"},cursorPointer:{true:"cursor-pointer",false:""}},defaultVariants:{variant:"default",size:"default"}});function bx({value:e,onChange:t,items:n,variant:r,size:o,cursorPointer:s=!1,className:i}){const l=d=>{t(d)},c=E.useRef(null),u=E.useRef(null),f=E.useCallback(()=>{if(!c.current||!u.current)return;const d=c.current.querySelector('[data-active="true"]');d&&(u.current.style.width=`${d.offsetWidth}px`,u.current.style.left=`${d.offsetLeft}px`)},[n]);return E.useEffect(()=>{f();const d=new ResizeObserver(f);return c.current&&d.observe(c.current),()=>{d.disconnect()}},[e,f]),a.jsx(a.Fragment,{children:a.jsxs("div",{ref:c,className:S(R4({variant:r,size:o}),i),children:[a.jsx("div",{ref:u,className:j4({variant:r})}),n.map(d=>a.jsx("button",{type:"button","data-active":e===d.value,className:E4({variant:r,size:o,cursorPointer:s}),onClick:()=>l(d.value),children:d.label},d.value))]})})}const za=Ee(["placeholder:text-muted-foreground flex w-full px-4 py-2.5 text-base md:text-sm","data-invalid:ring-destructive/80 data-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","caret-primary shadow transition-[color,box-shadow]"],{variants:{variant:{default:"bg-neutral-alpha-2 focus-visible:border-ring focus-visible:ring-ring/50 rounded-lg border border-none outline-none focus-visible:ring-2",bordered:"bg-neutral-alpha-2 border-border focus:border-primary focus:ring-primary/20 caret-primary rounded-lg border focus:ring-2",nofocus:"rounded-none border-none bg-transparent focus:border-none focus:ring-0 focus:outline-none"}},defaultVariants:{variant:"default"}}),vr=p.forwardRef(({className:e,variant:t,type:n,prompt:r,...o},s)=>r?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-primary shrink-0 text-sm font-medium",children:r}),a.jsx("input",{type:n,"data-slot":"input",className:S(za({variant:t,className:e})),ref:s,...o})]}):a.jsx("input",{type:n,"data-slot":"control",className:S(za({variant:t,className:e})),ref:s,...o}));vr.displayName="Input";function yx({className:e,...t}){return a.jsx("textarea",{"data-slot":"control",className:S("bg-neutral-alpha-2 placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full rounded-lg border border-none px-4 py-2.5 text-base md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 transition-[color,box-shadow] outline-none focus-visible:ring-2","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","disabled:cursor-not-allowed disabled:opacity-50","caret-primary shadow",e),...t})}function T4({className:e,...t}){return a.jsx("div",{"data-slot":"input-group",role:"group",className:S("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const P4=Ee("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function _4({className:e,align:t="inline-start",...n}){return a.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:S(P4({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const M4=Ee("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function A4({className:e,type:t="button",variant:n="default",size:r="xs",...o}){return a.jsx(Ut,{type:t,"data-size":r,variant:n,className:S(M4({size:r}),e),...o})}function N4({className:e,...t}){return a.jsx("span",{className:S("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function k4({className:e,...t}){return a.jsx(vr,{"data-slot":"input-group-control",className:S("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function I4({className:e,...t}){return a.jsx(yx,{"data-slot":"input-group-control",className:S("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}var An="NavigationMenu",[Ec,wx,D4]=ar(An),[Ha,L4,O4]=ar(An),[Tc]=Me(An,[D4,O4]),[F4,rt]=Tc(An),[$4,V4]=Tc(An),Cx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:s,delayDuration:i=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:u,...f}=e,[d,m]=p.useState(null),h=ee(t,M=>m(M)),v=Pn(u),g=p.useRef(0),b=p.useRef(0),x=p.useRef(0),[y,w]=p.useState(!0),[C,R]=Ie({prop:r,onChange:M=>{const D=M!=="",z=l>0;D?(window.clearTimeout(x.current),z&&w(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>w(!0),l)),o?.(M)},defaultProp:s??"",caller:An}),P=p.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>R(""),150)},[R]),T=p.useCallback(M=>{window.clearTimeout(b.current),R(M)},[R]),j=p.useCallback(M=>{C===M?window.clearTimeout(b.current):g.current=window.setTimeout(()=>{window.clearTimeout(b.current),R(M)},i)},[C,R,i]);return p.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(b.current),window.clearTimeout(x.current)},[]),a.jsx(Sx,{scope:n,isRootMenu:!0,value:C,dir:v,orientation:c,rootNavigationMenu:d,onTriggerEnter:M=>{window.clearTimeout(g.current),y?j(M):T(M)},onTriggerLeave:()=>{window.clearTimeout(g.current),P()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:P,onItemSelect:M=>{R(D=>D===M?"":M)},onItemDismiss:()=>R(""),children:a.jsx(H.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:h})})});Cx.displayName=An;var Ga="NavigationMenuSub",B4=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",...l}=e,c=rt(Ga,n),[u,f]=Ie({prop:r,onChange:o,defaultProp:s??"",caller:Ga});return a.jsx(Sx,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:i,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:d=>f(d),onItemSelect:d=>f(d),onItemDismiss:()=>f(""),children:a.jsx(H.div,{"data-orientation":i,...l,ref:t})})});B4.displayName=Ga;var Sx=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:s,children:i,value:l,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:d,onContentEnter:m,onContentLeave:h}=e,[v,g]=p.useState(null),[b,x]=p.useState(new Map),[y,w]=p.useState(null);return a.jsx(F4,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:Kr(l),baseId:Se(),dir:o,orientation:s,viewport:v,onViewportChange:g,indicatorTrack:y,onIndicatorTrackChange:w,onTriggerEnter:ve(f),onTriggerLeave:ve(d),onContentEnter:ve(m),onContentLeave:ve(h),onItemSelect:ve(c),onItemDismiss:ve(u),onViewportContentChange:p.useCallback((C,R)=>{x(P=>(P.set(C,R),new Map(P)))},[]),onViewportContentRemove:p.useCallback(C=>{x(R=>R.has(C)?(R.delete(C),new Map(R)):R)},[]),children:a.jsx(Ec.Provider,{scope:t,children:a.jsx($4,{scope:t,items:b,children:i})})})},Rx="NavigationMenuList",jx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=rt(Rx,n),s=a.jsx(H.ul,{"data-orientation":o.orientation,...r,ref:t});return a.jsx(H.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:a.jsx(Ec.Slot,{scope:n,children:o.isRootMenu?a.jsx(Dx,{asChild:!0,children:s}):s})})});jx.displayName=Rx;var Ex="NavigationMenuItem",[z4,Tx]=Tc(Ex),Px=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,s=Se(),i=r||s||"LEGACY_REACT_AUTO_VALUE",l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),f=p.useRef(()=>{}),d=p.useRef(!1),m=p.useCallback((v="start")=>{if(l.current){f.current();const g=Wa(l.current);g.length&&Mc(v==="start"?g:g.reverse())}},[]),h=p.useCallback(()=>{if(l.current){const v=Wa(l.current);v.length&&(f.current=Y4(v))}},[]);return a.jsx(z4,{scope:n,value:i,triggerRef:c,contentRef:l,focusProxyRef:u,wasEscapeCloseRef:d,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:h,onContentFocusOutside:h,children:a.jsx(H.li,{...o,ref:t})})});Px.displayName=Ex;var Ua="NavigationMenuTrigger",_x=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,s=rt(Ua,e.__scopeNavigationMenu),i=Tx(Ua,e.__scopeNavigationMenu),l=p.useRef(null),c=ee(l,i.triggerRef,t),u=Ox(s.baseId,i.value),f=Fx(s.baseId,i.value),d=p.useRef(!1),m=p.useRef(!1),h=i.value===s.value;return a.jsxs(a.Fragment,{children:[a.jsx(Ec.ItemSlot,{scope:n,value:i.value,children:a.jsx(Lx,{asChild:!0,children:a.jsx(H.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":Ac(h),"aria-expanded":h,"aria-controls":f,...o,ref:c,onPointerEnter:I(e.onPointerEnter,()=>{m.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:I(e.onPointerMove,gs(()=>{r||m.current||i.wasEscapeCloseRef.current||d.current||(s.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:I(e.onPointerLeave,gs(()=>{r||(s.onTriggerLeave(),d.current=!1)})),onClick:I(e.onClick,()=>{s.onItemSelect(i.value),m.current=h}),onKeyDown:I(e.onKeyDown,v=>{const b={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];h&&v.key===b&&(i.onEntryKeyDown(),v.preventDefault())})})})}),h&&a.jsxs(a.Fragment,{children:[a.jsx(lm,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:v=>{const g=i.contentRef.current,b=v.relatedTarget,x=b===l.current,y=g?.contains(b);(x||!y)&&i.onFocusProxyEnter(x?"start":"end")}}),s.viewport&&a.jsx("span",{"aria-owns":f})]})]})});_x.displayName=Ua;var H4="NavigationMenuLink",df="navigationMenu.linkSelect",Mx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...s}=e;return a.jsx(Lx,{asChild:!0,children:a.jsx(H.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...s,ref:t,onClick:I(e.onClick,i=>{const l=i.target,c=new CustomEvent(df,{bubbles:!0,cancelable:!0});if(l.addEventListener(df,u=>o?.(u),{once:!0}),Xo(l,c),!c.defaultPrevented&&!i.metaKey){const u=new CustomEvent(Yo,{bubbles:!0,cancelable:!0});Xo(l,u)}},{checkForDefaultPrevented:!1})})})});Mx.displayName=H4;var Pc="NavigationMenuIndicator",Ax=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=rt(Pc,e.__scopeNavigationMenu),s=!!o.value;return o.indicatorTrack?ws.createPortal(a.jsx(ye,{present:n||s,children:a.jsx(G4,{...r,ref:t})}),o.indicatorTrack):null});Ax.displayName=Pc;var G4=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=rt(Pc,n),s=wx(n),[i,l]=p.useState(null),[c,u]=p.useState(null),f=o.orientation==="horizontal",d=!!o.value;p.useEffect(()=>{const v=s().find(g=>g.value===o.value)?.ref.current;v&&l(v)},[s,o.value]);const m=()=>{i&&u({size:f?i.offsetWidth:i.offsetHeight,offset:f?i.offsetLeft:i.offsetTop})};return Ka(i,m),Ka(o.indicatorTrack,m),c?a.jsx(H.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),nr="NavigationMenuContent",Nx=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=rt(nr,e.__scopeNavigationMenu),s=Tx(nr,e.__scopeNavigationMenu),i=ee(s.contentRef,t),l=s.value===o.value,c={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...r};return o.viewport?a.jsx(U4,{forceMount:n,...c,ref:i}):a.jsx(ye,{present:n||l,children:a.jsx(kx,{"data-state":Ac(l),...c,ref:i,onPointerEnter:I(e.onPointerEnter,o.onContentEnter),onPointerLeave:I(e.onPointerLeave,gs(o.onContentLeave)),style:{pointerEvents:!l&&o.isRootMenu?"none":void 0,...c.style}})})});Nx.displayName=nr;var U4=p.forwardRef((e,t)=>{const n=rt(nr,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return be(()=>{r(e.value,{ref:t,...e})},[e,t,r]),be(()=>()=>o(e.value),[e.value,o]),null}),Yo="navigationMenu.rootContentDismiss",kx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:s,wasEscapeCloseRef:i,onRootContentClose:l,onContentFocusOutside:c,...u}=e,f=rt(nr,n),d=p.useRef(null),m=ee(d,t),h=Ox(f.baseId,r),v=Fx(f.baseId,r),g=wx(n),b=p.useRef(null),{onItemDismiss:x}=f;p.useEffect(()=>{const w=d.current;if(f.isRootMenu&&w){const C=()=>{x(),l(),w.contains(document.activeElement)&&o.current?.focus()};return w.addEventListener(Yo,C),()=>w.removeEventListener(Yo,C)}},[f.isRootMenu,e.value,o,x,l]);const y=p.useMemo(()=>{const C=g().map(D=>D.value);f.dir==="rtl"&&C.reverse();const R=C.indexOf(f.value),P=C.indexOf(f.previousValue),T=r===f.value,j=P===C.indexOf(r);if(!T&&!j)return b.current;const M=(()=>{if(R!==P){if(T&&P!==-1)return R>P?"from-end":"from-start";if(j&&R!==-1)return R>P?"to-start":"to-end"}return null})();return b.current=M,M},[f.previousValue,f.value,f.dir,g,r]);return a.jsx(Dx,{asChild:!0,children:a.jsx(tn,{id:v,"aria-labelledby":h,"data-motion":y,"data-orientation":f.orientation,...u,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{const w=new Event(Yo,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(w)},onFocusOutside:I(e.onFocusOutside,w=>{c();const C=w.target;f.rootNavigationMenu?.contains(C)&&w.preventDefault()}),onPointerDownOutside:I(e.onPointerDownOutside,w=>{const C=w.target,R=g().some(T=>T.ref.current?.contains(C)),P=f.isRootMenu&&f.viewport?.contains(C);(R||P||!f.isRootMenu)&&w.preventDefault()}),onKeyDown:I(e.onKeyDown,w=>{const C=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!C){const P=Wa(w.currentTarget),T=document.activeElement,j=P.findIndex(z=>z===T),D=w.shiftKey?P.slice(0,j).reverse():P.slice(j+1,P.length);Mc(D)?w.preventDefault():s.current?.focus()}}),onEscapeKeyDown:I(e.onEscapeKeyDown,w=>{i.current=!0})})})}),_c="NavigationMenuViewport",Ix=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=!!rt(_c,e.__scopeNavigationMenu).value;return a.jsx(ye,{present:n||s,children:a.jsx(W4,{...r,ref:t})})});Ix.displayName=_c;var W4=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,s=rt(_c,n),i=ee(t,s.onViewportChange),l=V4(nr,e.__scopeNavigationMenu),[c,u]=p.useState(null),[f,d]=p.useState(null),m=c?c?.width+"px":void 0,h=c?c?.height+"px":void 0,v=!!s.value,g=v?s.value:s.previousValue;return Ka(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),a.jsx(H.div,{"data-state":Ac(v),"data-orientation":s.orientation,...o,ref:i,style:{pointerEvents:!v&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":h,...o.style},onPointerEnter:I(e.onPointerEnter,s.onContentEnter),onPointerLeave:I(e.onPointerLeave,gs(s.onContentLeave)),children:Array.from(l.items).map(([x,{ref:y,forceMount:w,...C}])=>{const R=g===x;return a.jsx(ye,{present:w||R,children:a.jsx(kx,{...C,ref:yt(y,P=>{R&&P&&d(P)})})},x)})})}),K4="FocusGroup",Dx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=rt(K4,n);return a.jsx(Ha.Provider,{scope:n,children:a.jsx(Ha.Slot,{scope:n,children:a.jsx(H.div,{dir:o.dir,...r,ref:t})})})}),ff=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],q4="FocusGroupItem",Lx=p.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=L4(n),s=rt(q4,n);return a.jsx(Ha.ItemSlot,{scope:n,children:a.jsx(H.button,{...r,ref:t,onKeyDown:I(e.onKeyDown,i=>{if(["Home","End",...ff].includes(i.key)){let c=o().map(d=>d.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&c.reverse(),ff.includes(i.key)){const d=c.indexOf(i.currentTarget);c=c.slice(d+1)}setTimeout(()=>Mc(c)),i.preventDefault()}})})})});function Wa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Y4(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Ka(e,t){const n=ve(t);be(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function Ac(e){return e?"open":"closed"}function Ox(e,t){return`${e}-trigger-${t}`}function Fx(e,t){return`${e}-content-${t}`}function gs(e){return t=>t.pointerType==="mouse"?e(t):void 0}var X4=Cx,Z4=jx,Q4=Px,J4=_x,eM=Mx,tM=Ax,nM=Nx,rM=Ix;function oM({className:e,children:t,viewport:n=!0,...r}){return a.jsxs(X4,{"data-slot":"navigation-menu","data-viewport":n,className:S("group/navigation-menu relative flex w-full flex-1 items-center justify-between","border-border bg-background h-[70px] gap-2.5 rounded-full border px-5",e),...r,children:[t,n&&a.jsx(Vx,{})]})}function sM({className:e,...t}){return a.jsx(Z4,{"data-slot":"navigation-menu-list",className:S("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function iM({className:e,...t}){return a.jsx(Q4,{"data-slot":"navigation-menu-item",className:S("relative",e),...t})}const $x=Ee("group bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50");function aM({className:e,children:t,...n}){return a.jsxs(J4,{"data-slot":"navigation-menu-trigger",className:S($x(),"group",e),...n,children:[t," ",a.jsx(wt,{className:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})}function lM({className:e,...t}){return a.jsx(nM,{"data-slot":"navigation-menu-content",className:S("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...t})}function Vx({className:e,...t}){return a.jsx("div",{className:S("absolute top-full left-0 isolate z-50 flex justify-center"),children:a.jsx(rM,{"data-slot":"navigation-menu-viewport",className:S("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function cM({children:e,className:t,...n}){return a.jsx(eM,{"data-slot":"navigation-menu-link",className:S("group","data-[active=true]:from-primary data-[active=true]:via-primary/20 data-[active=true]:to-primary/30 data-[active=true]:bg-gradient-to-b","hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 rounded-full transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1"),children:a.jsxs("div",{className:S(Yr({variant:"menu",size:"default",className:S("w-full",t)})),children:[e,a.jsx("div",{className:"relative hidden size-[18px] shrink-0 group-data-[active=true]:block",children:a.jsx(Zn,{className:"text-primary absolute top-[-15px] left-[-15px] size-12"})})]})})}function uM({className:e,...t}){return a.jsx(tM,{"data-slot":"navigation-menu-indicator",className:S("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:a.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}var Bx=["PageUp","PageDown"],zx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Hx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xr="Slider",[qa,dM,fM]=ar(xr),[Gx]=Me(xr,[fM]),[pM,Js]=Gx(xr),Ux=p.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:d=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:v,...g}=e,b=p.useRef(new Set),x=p.useRef(0),w=i==="horizontal"?mM:hM,[C=[],R]=Ie({prop:f,defaultProp:u,onChange:z=>{[...b.current][x.current]?.focus(),d(z)}}),P=p.useRef(C);function T(z){const q=yM(C,z);D(z,q)}function j(z){D(z,x.current)}function M(){const z=P.current[x.current];C[x.current]!==z&&m(C)}function D(z,q,{commit:Y}={commit:!1}){const G=RM(s),Z=jM(Math.round((z-r)/s)*s+r,G),$=Hr(Z,[r,o]);R((V=[])=>{const _=xM(V,$,q);if(SM(_,c*s)){x.current=_.indexOf($);const O=String(_)!==String(V);return O&&Y&&m(_),O?_:V}else return V})}return a.jsx(pM,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:x,thumbs:b.current,values:C,orientation:i,form:v,children:a.jsx(qa.Provider,{scope:e.__scopeSlider,children:a.jsx(qa.Slot,{scope:e.__scopeSlider,children:a.jsx(w,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:t,onPointerDown:I(g.onPointerDown,()=>{l||(P.current=C)}),min:r,max:o,inverted:h,onSlideStart:l?void 0:T,onSlideMove:l?void 0:j,onSlideEnd:l?void 0:M,onHomeKeyDown:()=>!l&&D(r,0,{commit:!0}),onEndKeyDown:()=>!l&&D(o,C.length-1,{commit:!0}),onStepKeyDown:({event:z,direction:q})=>{if(!l){const Z=Bx.includes(z.key)||z.shiftKey&&zx.includes(z.key)?10:1,$=x.current,V=C[$],_=s*Z*q;D(V+_,$,{commit:!0})}}})})})})});Ux.displayName=xr;var[Wx,Kx]=Gx(xr,{startEdge:"left",endEdge:"right",size:"width",direction:1}),mM=p.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...f}=e,[d,m]=p.useState(null),h=ee(t,w=>m(w)),v=p.useRef(void 0),g=Pn(o),b=g==="ltr",x=b&&!s||!b&&s;function y(w){const C=v.current||d.getBoundingClientRect(),R=[0,C.width],T=Nc(R,x?[n,r]:[r,n]);return v.current=C,T(w-C.left)}return a.jsx(Wx,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:a.jsx(qx,{dir:g,"data-orientation":"horizontal",...f,ref:h,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const C=y(w.clientX);i?.(C)},onSlideMove:w=>{const C=y(w.clientX);l?.(C)},onSlideEnd:()=>{v.current=void 0,c?.()},onStepKeyDown:w=>{const R=Hx[x?"from-left":"from-right"].includes(w.key);u?.({event:w,direction:R?-1:1})}})})}),hM=p.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:l,onStepKeyDown:c,...u}=e,f=p.useRef(null),d=ee(t,f),m=p.useRef(void 0),h=!o;function v(g){const b=m.current||f.current.getBoundingClientRect(),x=[0,b.height],w=Nc(x,h?[r,n]:[n,r]);return m.current=b,w(g-b.top)}return a.jsx(Wx,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:a.jsx(qx,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const b=v(g.clientY);s?.(b)},onSlideMove:g=>{const b=v(g.clientY);i?.(b)},onSlideEnd:()=>{m.current=void 0,l?.()},onStepKeyDown:g=>{const x=Hx[h?"from-bottom":"from-top"].includes(g.key);c?.({event:g,direction:x?-1:1})}})})}),qx=p.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:c,...u}=e,f=Js(xr,n);return a.jsx(H.span,{...u,ref:t,onKeyDown:I(e.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(l(d),d.preventDefault()):Bx.concat(zx).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:I(e.onPointerDown,d=>{const m=d.target;m.setPointerCapture(d.pointerId),d.preventDefault(),f.thumbs.has(m)?m.focus():r(d)}),onPointerMove:I(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:I(e.onPointerUp,d=>{const m=d.target;m.hasPointerCapture(d.pointerId)&&(m.releasePointerCapture(d.pointerId),s(d))})})}),Yx="SliderTrack",Xx=p.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Js(Yx,n);return a.jsx(H.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Xx.displayName=Yx;var Ya="SliderRange",Zx=p.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Js(Ya,n),s=Kx(Ya,n),i=p.useRef(null),l=ee(t,i),c=o.values.length,u=o.values.map(m=>e0(m,o.min,o.max)),f=c>1?Math.min(...u):0,d=100-Math.max(...u);return a.jsx(H.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[s.startEdge]:f+"%",[s.endEdge]:d+"%"}})});Zx.displayName=Ya;var Xa="SliderThumb",Qx=p.forwardRef((e,t)=>{const n=dM(e.__scopeSlider),[r,o]=p.useState(null),s=ee(t,l=>o(l)),i=p.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return a.jsx(gM,{...e,ref:s,index:i})}),gM=p.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=Js(Xa,n),l=Kx(Xa,n),[c,u]=p.useState(null),f=ee(t,y=>u(y)),d=c?i.form||!!c.closest("form"):!0,m=Ss(c),h=i.values[r],v=h===void 0?0:e0(h,i.min,i.max),g=bM(r,i.values.length),b=m?.[l.size],x=b?wM(b,v,l.direction):0;return p.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),a.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${v}% + ${x}px)`},children:[a.jsx(qa.ItemSlot,{scope:e.__scopeSlider,children:a.jsx(H.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":i.min,"aria-valuenow":h,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:f,style:h===void 0?{display:"none"}:e.style,onFocus:I(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&a.jsx(Jx,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:h},r)]})});Qx.displayName=Xa;var vM="RadioBubbleInput",Jx=p.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=p.useRef(null),s=ee(o,r),i=Kr(t);return p.useEffect(()=>{const l=o.current;if(!l)return;const c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const d=new Event("input",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[i,t]),a.jsx(H.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Jx.displayName=vM;function xM(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function e0(e,t,n){const s=100/(n-t)*(e-t);return Hr(s,[0,100])}function bM(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function yM(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function wM(e,t,n){const r=e/2,s=Nc([0,50],[0,r]);return(r-s(t)*n)*n}function CM(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function SM(e,t){if(t>0){const n=CM(e);return Math.min(...n)>=t}return!0}function Nc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function RM(e){return(String(e).split(".")[1]||"").length}function jM(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var EM=Ux,TM=Xx,PM=Zx,_M=Qx;function MM({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...s}){const i=p.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return a.jsxs(EM,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:S("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...s,children:[a.jsx(TM,{"data-slot":"slider-track",className:S("bg-secondary relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:a.jsx(PM,{"data-slot":"slider-range",className:S("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:i.length},(l,c)=>a.jsx(_M,{"data-slot":"slider-thumb",className:"border-border bg-foreground ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}var t0="AlertDialog",[AM]=Me(t0,[Wg]),It=Wg(),n0=e=>{const{__scopeAlertDialog:t,...n}=e,r=It(t);return a.jsx(Ws,{...r,...n,modal:!0})};n0.displayName=t0;var NM="AlertDialogTrigger",r0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=It(n);return a.jsx(lv,{...o,...r,ref:t})});r0.displayName=NM;var kM="AlertDialogPortal",o0=e=>{const{__scopeAlertDialog:t,...n}=e,r=It(t);return a.jsx(Ks,{...r,...n})};o0.displayName=kM;var IM="AlertDialogOverlay",s0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=It(n);return a.jsx(qs,{...o,...r,ref:t})});s0.displayName=IM;var Xn="AlertDialogContent",[DM,LM]=AM(Xn),OM=Af("AlertDialogContent"),i0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=It(n),i=p.useRef(null),l=ee(t,i),c=p.useRef(null);return a.jsx(AP,{contentName:Xn,titleName:a0,docsSlug:"alert-dialog",children:a.jsx(DM,{scope:n,cancelRef:c,children:a.jsxs(Ys,{role:"alertdialog",...s,...o,ref:l,onOpenAutoFocus:I(o.onOpenAutoFocus,u=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(OM,{children:r}),a.jsx($M,{contentRef:i})]})})})});i0.displayName=Xn;var a0="AlertDialogTitle",l0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=It(n);return a.jsx(hc,{...o,...r,ref:t})});l0.displayName=a0;var c0="AlertDialogDescription",u0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=It(n);return a.jsx(gc,{...o,...r,ref:t})});u0.displayName=c0;var FM="AlertDialogAction",d0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=It(n);return a.jsx(io,{...o,...r,ref:t})});d0.displayName=FM;var f0="AlertDialogCancel",p0=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=LM(f0,n),s=It(n),i=ee(t,o);return a.jsx(io,{...s,...r,ref:i})});p0.displayName=f0;var $M=({contentRef:e})=>{const t=`\`${Xn}\` requires a description for the component to be accessible for screen reader users.
|
|
177
|
+
|
|
178
|
+
You can add a description to the \`${Xn}\` by passing a \`${c0}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
179
|
+
|
|
180
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Xn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
181
|
+
|
|
182
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},VM=n0,BM=r0,zM=o0,HM=s0,GM=i0,UM=d0,WM=p0,KM=l0,qM=u0;function YM({...e}){return a.jsx(VM,{"data-slot":"alert-dialog",...e})}function XM({...e}){return a.jsx(BM,{"data-slot":"alert-dialog-trigger",...e})}function m0({...e}){return a.jsx(zM,{"data-slot":"alert-dialog-portal",...e,container:document.querySelectorAll(".turtle-widget-root")[0]??void 0})}function h0({className:e,...t}){return a.jsx(HM,{"data-slot":"alert-dialog-overlay",className:S("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function ZM({className:e,...t}){return a.jsxs(m0,{children:[a.jsx(h0,{}),a.jsx(GM,{"data-slot":"alert-dialog-content",className:S("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-10 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function QM({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-header",className:S("flex flex-col gap-2 text-center sm:text-left",e),...t})}function JM({className:e,...t}){return a.jsx("div",{"data-slot":"alert-dialog-footer",className:S("flex flex-col-reverse gap-2 sm:flex-row sm:justify-evenly",e),...t})}function eA({className:e,...t}){return a.jsx(KM,{"data-slot":"alert-dialog-title",className:S("text-lg font-semibold",e),...t})}function tA({className:e,...t}){return a.jsx(qM,{"data-slot":"alert-dialog-description",className:S("text-muted-foreground text-sm",e),...t})}function nA({className:e,...t}){return a.jsx(UM,{className:S(Yr({variant:"green"}),e),...t})}function rA({className:e,...t}){return a.jsx(WM,{className:S(Yr({variant:"default"}),e),...t})}function oA({children:e,className:t}){return a.jsx("h1",{className:S("scroll-m-20 text-4xl font-semibold tracking-tight text-balance",t),children:e})}function sA({children:e,className:t}){return a.jsx("h2",{className:S("scroll-m-20 text-3xl font-normal tracking-tight first:mt-0",t),children:e})}function g0({children:e,className:t}){return a.jsx("h3",{className:S("scroll-m-20 text-xl font-normal tracking-tight",t),children:e})}function iA({children:e,className:t}){return a.jsx("h4",{className:S("scroll-m-20 text-lg font-light tracking-tight",t),children:e})}function aA({children:e,className:t}){return a.jsx("h5",{className:S("scroll-m-20 font-light tracking-tight",t),children:e})}function v0({children:e,className:t}){return a.jsx("h6",{className:S("text-muted-foreground scroll-m-20 text-sm font-light tracking-tight",t),children:e})}var lA="Label",x0=p.forwardRef((e,t)=>a.jsx(H.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));x0.displayName=lA;var cA=x0;function b0({className:e,...t}){return a.jsx(cA,{"data-slot":"label",className:S("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function uA({className:e,...t}){return a.jsx("fieldset",{"data-slot":"field-set",className:S("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...t})}function dA({className:e,variant:t="legend",...n}){return a.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:S("mb-3 font-medium","data-[variant=legend]:text-base","data-[variant=label]:text-sm",e),...n})}function fA({className:e,...t}){return a.jsx("div",{"data-slot":"field-group",className:S("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",e),...t})}const pA=Ee("group/field data-[invalid=true]:text-destructive flex w-full gap-3",{variants:{orientation:{vertical:["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function mA({className:e,orientation:t="vertical",...n}){return a.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:S(pA({orientation:t}),e),...n})}function hA({className:e,...t}){return a.jsx("div",{"data-slot":"field-content",className:S("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",e),...t})}function gA({className:e,...t}){return a.jsx(b0,{"data-slot":"field-label",className:S("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",e),...t})}function vA({className:e,...t}){return a.jsx("div",{"data-slot":"field-label",className:S("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function xA({className:e,...t}){return a.jsx("p",{"data-slot":"field-description",className:S("text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",e),...t})}function bA({children:e,className:t,...n}){return a.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:S("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",t),...n,children:[a.jsx(kt,{className:"absolute inset-0 top-1/2"}),e&&a.jsx("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:e})]})}function yA({className:e,children:t,errors:n,...r}){const o=E.useMemo(()=>t||(n?n?.length===1&&n[0]?.message?n[0].message:a.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:n.map((s,i)=>s?.message&&a.jsx("li",{children:s.message},i))}):null),[t,n]);return o?a.jsx("div",{role:"alert","data-slot":"field-error",className:S("text-destructive text-sm font-normal",e),...r,children:o}):null}var ei="Popover",[y0]=Me(ei,[Rt]),uo=Rt(),[wA,an]=y0(ei),w0=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,l=uo(t),c=p.useRef(null),[u,f]=p.useState(!1),[d,m]=Ie({prop:r,defaultProp:o??!1,onChange:s,caller:ei});return a.jsx(ur,{...l,children:a.jsx(wA,{scope:t,contentId:Se(),triggerRef:c,open:d,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>f(!0),[]),onCustomAnchorRemove:p.useCallback(()=>f(!1),[]),modal:i,children:n})})};w0.displayName=ei;var C0="PopoverAnchor",S0=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=an(C0,n),s=uo(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return p.useEffect(()=>(i(),()=>l()),[i,l]),a.jsx(dr,{...s,...r,ref:t})});S0.displayName=C0;var R0="PopoverTrigger",j0=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=an(R0,n),s=uo(n),i=ee(t,o.triggerRef),l=a.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M0(o.open),...r,ref:i,onClick:I(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:a.jsx(dr,{asChild:!0,...s,children:l})});j0.displayName=R0;var kc="PopoverPortal",[CA,SA]=y0(kc,{forceMount:void 0}),E0=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=an(kc,t);return a.jsx(CA,{scope:t,forceMount:n,children:a.jsx(ye,{present:n||s.open,children:a.jsx(_n,{asChild:!0,container:o,children:r})})})};E0.displayName=kc;var rr="PopoverContent",T0=p.forwardRef((e,t)=>{const n=SA(rr,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=an(rr,e.__scopePopover);return a.jsx(ye,{present:r||s.open,children:s.modal?a.jsx(jA,{...o,ref:t}):a.jsx(EA,{...o,ref:t})})});T0.displayName=rr;var RA=Gt("PopoverContent.RemoveScroll"),jA=p.forwardRef((e,t)=>{const n=an(rr,e.__scopePopover),r=p.useRef(null),o=ee(t,r),s=p.useRef(!1);return p.useEffect(()=>{const i=r.current;if(i)return Vs(i)},[]),a.jsx(so,{as:RA,allowPinchZoom:!0,children:a.jsx(P0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),EA=p.forwardRef((e,t)=>{const n=an(rr,e.__scopePopover),r=p.useRef(!1),o=p.useRef(!1);return a.jsx(P0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),P0=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,m=an(rr,n),h=uo(n);return $s(),a.jsx(oo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(tn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:a.jsx(Zr,{"data-state":M0(m.open),role:"dialog",id:m.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),_0="PopoverClose",TA=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=an(_0,n);return a.jsx(H.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});TA.displayName=_0;var PA="PopoverArrow",_A=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=uo(n);return a.jsx(Qr,{...o,...r,ref:t})});_A.displayName=PA;function M0(e){return e?"open":"closed"}var MA=w0,AA=S0,NA=j0,kA=E0,IA=T0;function Ic({...e}){return a.jsx(MA,{"data-slot":"popover",...e})}function Dc({...e}){return a.jsx(NA,{"data-slot":"popover-trigger",...e})}function Lc({className:e,align:t="center",sideOffset:n=4,...r}){return a.jsx(kA,{children:a.jsx(IA,{"data-slot":"popover-content",align:t,sideOffset:n,className:S("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function DA({...e}){return a.jsx(AA,{"data-slot":"popover-anchor",...e})}var pf=1,LA=.9,OA=.8,FA=.17,Hi=.1,Gi=.999,$A=.9999,VA=.99,BA=/[\\\/_+.#"@\[\(\{&]/,zA=/[\\\/_+.#"@\[\(\{&]/g,HA=/[\s-]/,A0=/[\s-]/g;function Za(e,t,n,r,o,s,i){if(s===t.length)return o===e.length?pf:VA;var l=`${o},${s}`;if(i[l]!==void 0)return i[l];for(var c=r.charAt(s),u=n.indexOf(c,o),f=0,d,m,h,v;u>=0;)d=Za(e,t,n,r,u+1,s+1,i),d>f&&(u===o?d*=pf:BA.test(e.charAt(u-1))?(d*=OA,h=e.slice(o,u-1).match(zA),h&&o>0&&(d*=Math.pow(Gi,h.length))):HA.test(e.charAt(u-1))?(d*=LA,v=e.slice(o,u-1).match(A0),v&&o>0&&(d*=Math.pow(Gi,v.length))):(d*=FA,o>0&&(d*=Math.pow(Gi,u-o))),e.charAt(u)!==t.charAt(s)&&(d*=$A)),(d<Hi&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(m=Za(e,t,n,r,u+1,s+2,i),m*Hi>d&&(d=m*Hi)),d>f&&(f=d),u=n.indexOf(c,u+1);return i[l]=f,f}function mf(e){return e.toLowerCase().replace(A0," ")}function GA(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Za(e,t,mf(e),mf(t),0,0,{})}var Rr='[cmdk-group=""]',Ui='[cmdk-group-items=""]',UA='[cmdk-group-heading=""]',N0='[cmdk-item=""]',hf=`${N0}:not([aria-disabled="true"])`,Qa="cmdk-item-select",Fn="data-value",WA=(e,t,n)=>GA(e,t,n),k0=p.createContext(void 0),fo=()=>p.useContext(k0),I0=p.createContext(void 0),Oc=()=>p.useContext(I0),D0=p.createContext(void 0),L0=p.forwardRef((e,t)=>{let n=$n(()=>{var k,A;return{search:"",value:(A=(k=e.value)!=null?k:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=$n(()=>new Set),o=$n(()=>new Map),s=$n(()=>new Map),i=$n(()=>new Set),l=O0(e),{label:c,children:u,value:f,onValueChange:d,filter:m,shouldFilter:h,loop:v,disablePointerSelection:g=!1,vimBindings:b=!0,...x}=e,y=Se(),w=Se(),C=Se(),R=p.useRef(null),P=rN();En(()=>{if(f!==void 0){let k=f.trim();n.current.value=k,T.emit()}},[f]),En(()=>{P(6,Y)},[]);let T=p.useMemo(()=>({subscribe:k=>(i.current.add(k),()=>i.current.delete(k)),snapshot:()=>n.current,setState:(k,A,F)=>{var B,X,N,U;if(!Object.is(n.current[k],A)){if(n.current[k]=A,k==="search")q(),D(),P(1,z);else if(k==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(C);ne?ne.focus():(B=document.getElementById(y))==null||B.focus()}if(P(7,()=>{var ne;n.current.selectedItemId=(ne=G())==null?void 0:ne.id,T.emit()}),F||P(5,Y),((X=l.current)==null?void 0:X.value)!==void 0){let ne=A??"";(U=(N=l.current).onValueChange)==null||U.call(N,ne);return}}T.emit()}},emit:()=>{i.current.forEach(k=>k())}}),[]),j=p.useMemo(()=>({value:(k,A,F)=>{var B;A!==((B=s.current.get(k))==null?void 0:B.value)&&(s.current.set(k,{value:A,keywords:F}),n.current.filtered.items.set(k,M(A,F)),P(2,()=>{D(),T.emit()}))},item:(k,A)=>(r.current.add(k),A&&(o.current.has(A)?o.current.get(A).add(k):o.current.set(A,new Set([k]))),P(3,()=>{q(),D(),n.current.value||z(),T.emit()}),()=>{s.current.delete(k),r.current.delete(k),n.current.filtered.items.delete(k);let F=G();P(4,()=>{q(),F?.getAttribute("id")===k&&z(),T.emit()})}),group:k=>(o.current.has(k)||o.current.set(k,new Set),()=>{s.current.delete(k),o.current.delete(k)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:C,labelId:w,listInnerRef:R}),[]);function M(k,A){var F,B;let X=(B=(F=l.current)==null?void 0:F.filter)!=null?B:WA;return k?X(k,n.current.search,A):0}function D(){if(!n.current.search||l.current.shouldFilter===!1)return;let k=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(B=>{let X=o.current.get(B),N=0;X.forEach(U=>{let ne=k.get(U);N=Math.max(ne,N)}),A.push([B,N])});let F=R.current;Z().sort((B,X)=>{var N,U;let ne=B.getAttribute("id"),ie=X.getAttribute("id");return((N=k.get(ie))!=null?N:0)-((U=k.get(ne))!=null?U:0)}).forEach(B=>{let X=B.closest(Ui);X?X.appendChild(B.parentElement===X?B:B.closest(`${Ui} > *`)):F.appendChild(B.parentElement===F?B:B.closest(`${Ui} > *`))}),A.sort((B,X)=>X[1]-B[1]).forEach(B=>{var X;let N=(X=R.current)==null?void 0:X.querySelector(`${Rr}[${Fn}="${encodeURIComponent(B[0])}"]`);N?.parentElement.appendChild(N)})}function z(){let k=Z().find(F=>F.getAttribute("aria-disabled")!=="true"),A=k?.getAttribute(Fn);T.setState("value",A||void 0)}function q(){var k,A,F,B;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let N of r.current){let U=(A=(k=s.current.get(N))==null?void 0:k.value)!=null?A:"",ne=(B=(F=s.current.get(N))==null?void 0:F.keywords)!=null?B:[],ie=M(U,ne);n.current.filtered.items.set(N,ie),ie>0&&X++}for(let[N,U]of o.current)for(let ne of U)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(N);break}n.current.filtered.count=X}function Y(){var k,A,F;let B=G();B&&(((k=B.parentElement)==null?void 0:k.firstChild)===B&&((F=(A=B.closest(Rr))==null?void 0:A.querySelector(UA))==null||F.scrollIntoView({block:"nearest"})),B.scrollIntoView({block:"nearest"}))}function G(){var k;return(k=R.current)==null?void 0:k.querySelector(`${N0}[aria-selected="true"]`)}function Z(){var k;return Array.from(((k=R.current)==null?void 0:k.querySelectorAll(hf))||[])}function $(k){let A=Z()[k];A&&T.setState("value",A.getAttribute(Fn))}function V(k){var A;let F=G(),B=Z(),X=B.findIndex(U=>U===F),N=B[X+k];(A=l.current)!=null&&A.loop&&(N=X+k<0?B[B.length-1]:X+k===B.length?B[0]:B[X+k]),N&&T.setState("value",N.getAttribute(Fn))}function _(k){let A=G(),F=A?.closest(Rr),B;for(;F&&!B;)F=k>0?tN(F,Rr):nN(F,Rr),B=F?.querySelector(hf);B?T.setState("value",B.getAttribute(Fn)):V(k)}let O=()=>$(Z().length-1),te=k=>{k.preventDefault(),k.metaKey?O():k.altKey?_(1):V(1)},fe=k=>{k.preventDefault(),k.metaKey?$(0):k.altKey?_(-1):V(-1)};return p.createElement(H.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:k=>{var A;(A=x.onKeyDown)==null||A.call(x,k);let F=k.nativeEvent.isComposing||k.keyCode===229;if(!(k.defaultPrevented||F))switch(k.key){case"n":case"j":{b&&k.ctrlKey&&te(k);break}case"ArrowDown":{te(k);break}case"p":case"k":{b&&k.ctrlKey&&fe(k);break}case"ArrowUp":{fe(k);break}case"Home":{k.preventDefault(),$(0);break}case"End":{k.preventDefault(),O();break}case"Enter":{k.preventDefault();let B=G();if(B){let X=new Event(Qa);B.dispatchEvent(X)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:sN},c),ti(e,k=>p.createElement(I0.Provider,{value:T},p.createElement(k0.Provider,{value:j},k))))}),KA=p.forwardRef((e,t)=>{var n,r;let o=Se(),s=p.useRef(null),i=p.useContext(D0),l=fo(),c=O0(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i?.forceMount;En(()=>{if(!u)return l.item(o,i?.id)},[u]);let f=F0(o,s,[e.value,e.children,s],e.keywords),d=Oc(),m=Xt(P=>P.value&&P.value===f.current),h=Xt(P=>u||l.filter()===!1?!0:P.search?P.filtered.items.get(o)>0:!0);p.useEffect(()=>{let P=s.current;if(!(!P||e.disabled))return P.addEventListener(Qa,v),()=>P.removeEventListener(Qa,v)},[h,e.onSelect,e.disabled]);function v(){var P,T;g(),(T=(P=c.current).onSelect)==null||T.call(P,f.current)}function g(){d.setState("value",f.current,!0)}if(!h)return null;let{disabled:b,value:x,onSelect:y,forceMount:w,keywords:C,...R}=e;return p.createElement(H.div,{ref:yt(s,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||l.getDisablePointerSelection()?void 0:g,onClick:b?void 0:v},e.children)}),qA=p.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,i=Se(),l=p.useRef(null),c=p.useRef(null),u=Se(),f=fo(),d=Xt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);En(()=>f.group(i),[]),F0(i,l,[e.value,e.heading,c]);let m=p.useMemo(()=>({id:i,forceMount:o}),[o]);return p.createElement(H.div,{ref:yt(l,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&p.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),ti(e,h=>p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},p.createElement(D0.Provider,{value:m},h))))}),YA=p.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=p.useRef(null),s=Xt(i=>!i.search);return!n&&!s?null:p.createElement(H.div,{ref:yt(o,t),...r,"cmdk-separator":"",role:"separator"})}),XA=p.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=Oc(),i=Xt(u=>u.search),l=Xt(u=>u.selectedItemId),c=fo();return p.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),p.createElement(H.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||s.setState("search",u.target.value),n?.(u.target.value)}})}),ZA=p.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=p.useRef(null),i=p.useRef(null),l=Xt(u=>u.selectedItemId),c=fo();return p.useEffect(()=>{if(i.current&&s.current){let u=i.current,f=s.current,d,m=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return m.observe(u),()=>{cancelAnimationFrame(d),m.unobserve(u)}}},[]),p.createElement(H.div,{ref:yt(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},ti(e,u=>p.createElement("div",{ref:yt(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),QA=p.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...l}=e;return p.createElement(Ws,{open:n,onOpenChange:r},p.createElement(Ks,{container:i},p.createElement(qs,{"cmdk-overlay":"",className:o}),p.createElement(Ys,{"aria-label":e.label,"cmdk-dialog":"",className:s},p.createElement(L0,{ref:t,...l}))))}),JA=p.forwardRef((e,t)=>Xt(n=>n.filtered.count===0)?p.createElement(H.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),eN=p.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return p.createElement(H.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ti(e,i=>p.createElement("div",{"aria-hidden":!0},i)))}),Nn=Object.assign(L0,{List:ZA,Item:KA,Input:XA,Group:qA,Separator:YA,Dialog:QA,Empty:JA,Loading:eN});function tN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function nN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function O0(e){let t=p.useRef(e);return En(()=>{t.current=e}),t}var En=typeof window>"u"?p.useEffect:p.useLayoutEffect;function $n(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function Xt(e){let t=Oc(),n=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,n,n)}function F0(e,t,n,r=[]){let o=p.useRef(),s=fo();return En(()=>{var i;let l=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());s.value(e,l,c),(i=t.current)==null||i.setAttribute(Fn,l),o.current=l}),o}var rN=()=>{let[e,t]=p.useState(),n=$n(()=>new Map);return En(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function oN(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ti({asChild:e,children:t},n){return e&&p.isValidElement(t)?p.cloneElement(oN(t),{ref:t.ref},n(t.props.children)):n(t)}var sN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function ni({className:e,...t}){return a.jsx(Nn,{"data-slot":"command",className:S("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function iN({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...s}){return a.jsxs(cv,{...s,children:[a.jsxs(pv,{className:"sr-only",children:[a.jsx(mv,{children:e}),a.jsx(hv,{children:t})]}),a.jsx(fv,{className:S("overflow-hidden p-0",r),showCloseButton:o,children:a.jsx(ni,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function Fc({className:e,...t}){return a.jsxs("div",{"data-slot":"command-input-wrapper",className:"border-border flex h-9 items-center gap-2 border-b px-3",children:[a.jsx(bp,{className:"size-4 shrink-0 opacity-50"}),a.jsx(Nn.Input,{"data-slot":"command-input",className:S("placeholder:text-muted-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function $c({className:e,...t}){return a.jsx(Nn.List,{"data-slot":"command-list",className:S("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Vc({...e}){return a.jsx(Nn.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Wn({className:e,...t}){return a.jsx(Nn.Group,{"data-slot":"command-group",className:S("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function $0({className:e,...t}){return a.jsx(Nn.Separator,{"data-slot":"command-separator",className:S("bg-border -mx-1 h-px",e),...t})}function mn({className:e,...t}){return a.jsx(Nn.Item,{"data-slot":"command-item",className:S("data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function aN({className:e,...t}){return a.jsx("span",{"data-slot":"command-shortcut",className:S("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const V0=p.forwardRef(({options:e,onValueChange:t,defaultValue:n=[],placeholder:r="Select options",animation:o=0,maxCount:s=3,modalPopover:i=!1,asChild:l=!1,className:c,hideSelectAll:u=!1,searchable:f=!0,emptyIndicator:d,autoSize:m=!1,singleLine:h=!1,popoverClassName:v,disabled:g=!1,responsive:b,minWidth:x,maxWidth:y,deduplicateOptions:w=!1,resetOnDefaultValueChange:C=!0,closeOnSelect:R=!1,...P},T)=>{const[j,M]=p.useState(n),[D,z]=p.useState(!1),[q,Y]=p.useState(!1),[G,Z]=p.useState(""),[$,V]=p.useState(""),[_,O]=p.useState(""),te=p.useRef(j.length),fe=p.useRef(D),k=p.useRef(G),A=p.useCallback((L,Q="polite")=>{Q==="assertive"?(O(L),setTimeout(()=>O(""),100)):(V(L),setTimeout(()=>V(""),100))},[]),F=p.useId(),B=`${F}-listbox`,X=`${F}-description`,N=`${F}-count`,U=p.useRef(n),ne=p.useCallback(L=>L.length>0&&"heading"in L[0],[]),ie=p.useCallback((L,Q)=>{if(L.length!==Q.length)return!1;const pe=[...L].sort(),Re=[...Q].sort();return pe.every((he,ln)=>he===Re[ln])},[]),ce=p.useCallback(()=>{M(n),z(!1),Z(""),t(n)},[n,t]),ae=p.useRef(null);p.useImperativeHandle(T,()=>({reset:ce,getSelectedValues:()=>j,setSelectedValues:L=>{M(L),t(L)},clear:()=>{M([]),t([])},focus:()=>{if(ae.current){ae.current.focus();const L=ae.current.style.outline,Q=ae.current.style.outlineOffset;ae.current.style.outline="2px solid hsl(var(--ring))",ae.current.style.outlineOffset="2px",setTimeout(()=>{ae.current&&(ae.current.style.outline=L,ae.current.style.outlineOffset=Q)},1e3)}}}),[ce,j,t]);const[ge,Pe]=p.useState("desktop");p.useEffect(()=>{if(typeof window>"u")return;const L=()=>{const Q=window.innerWidth;Q<640?Pe("mobile"):Q<1024?Pe("tablet"):Pe("desktop")};return L(),window.addEventListener("resize",L),()=>{typeof window<"u"&&window.removeEventListener("resize",L)}},[]);const ue=(()=>{if(!b)return{maxCount:s,hideIcons:!1,compactMode:!1};if(b===!0){const pe={mobile:{maxCount:2,hideIcons:!1,compactMode:!0},tablet:{maxCount:4,hideIcons:!1,compactMode:!1},desktop:{maxCount:6,hideIcons:!1,compactMode:!1}}[ge];return{maxCount:pe?.maxCount??s,hideIcons:pe?.hideIcons??!1,compactMode:pe?.compactMode??!1}}const L=b[ge];return{maxCount:L?.maxCount??s,hideIcons:L?.hideIcons??!1,compactMode:L?.compactMode??!1}})(),me=p.useCallback(()=>{if(e.length===0)return[];let L;ne(e)?L=e.flatMap(he=>he.options):L=e;const Q=new Set,pe=[],Re=[];return L.forEach(he=>{Q.has(he.value)?(pe.push(he.value),w||Re.push(he)):(Q.add(he.value),Re.push(he))}),process.env.NODE_ENV==="development"&&pe.length>0&&console.warn(`MultiSelect: Duplicate option values ${w?"automatically removed":"detected"}: ${pe.join(", ")}. ${w?"Duplicates have been removed automatically.":"This may cause unexpected behavior. Consider setting 'deduplicateOptions={true}' or ensure all option values are unique."}`),w?Re:L},[e,w,ne]),Ge=p.useCallback(L=>{const Q=me().find(pe=>pe.value===L);return!Q&&process.env.NODE_ENV==="development"&&console.warn(`MultiSelect: Option with value "${L}" not found in options list`),Q},[me]),Ue=p.useMemo(()=>!f||!G?e:e.length===0?[]:ne(e)?e.map(L=>({...L,options:L.options.filter(Q=>Q.label.toLowerCase().includes(G.toLowerCase())||Q.value.toLowerCase().includes(G.toLowerCase()))})).filter(L=>L.options.length>0):e.filter(L=>L.label.toLowerCase().includes(G.toLowerCase())||L.value.toLowerCase().includes(G.toLowerCase())),[e,G,f,ne]),li=L=>{if(L.key==="Enter")z(!0);else if(L.key==="Backspace"&&!L.currentTarget.value){const Q=[...j];Q.pop(),M(Q),t(Q)}},kn=L=>{if(g||Ge(L)?.disabled)return;const pe=j.includes(L)?j.filter(Re=>Re!==L):[...j,L];M(pe),t(pe),R&&z(!1)},Ne=()=>{g||(M([]),t([]))},Dt=()=>{g||z(L=>!L)},ci=()=>{if(g)return;const L=j.slice(0,ue.maxCount);M(L),t(L)},ui=()=>{if(g)return;const L=me().filter(Q=>!Q.disabled);if(j.length===L.length)Ne();else{const Q=L.map(pe=>pe.value);M(Q),t(Q)}R&&z(!1)};p.useEffect(()=>{if(!C)return;const L=U.current;ie(L,n)||(ie(j,n)||M(n),U.current=[...n])},[n,j,ie,C]);const wr={minWidth:x||(ge==="mobile"?"0px":"200px"),maxWidth:y||"100%",width:m?"auto":"100%"};return p.useEffect(()=>{D||Z("")},[D]),p.useEffect(()=>{const L=j.length,Q=me(),pe=Q.filter(Re=>!Re.disabled).length;if(L!==te.current){const Re=L-te.current;if(Re>0){const ln=j.slice(-Re).map(di=>Q.find(vo=>vo.value===di)?.label).filter(Boolean);ln.length===1?A(`${ln[0]} selected. ${L} of ${pe} options selected.`):A(`${ln.length} options selected. ${L} of ${pe} total selected.`)}else Re<0&&A(`Option removed. ${L} of ${pe} options selected.`);te.current=L}if(D!==fe.current&&(A(D?`Dropdown opened. ${pe} options available. Use arrow keys to navigate.`:"Dropdown closed."),fe.current=D),G!==k.current&&G!==void 0){if(G&&D){const Re=Q.filter(he=>he.label.toLowerCase().includes(G.toLowerCase())||he.value.toLowerCase().includes(G.toLowerCase())).length;A(`${Re} option${Re===1?"":"s"} found for "${G}"`)}k.current=G}},[j,D,G,A,me]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"sr-only",children:[a.jsx("div",{"aria-live":"polite","aria-atomic":"true",role:"status",children:$}),a.jsx("div",{"aria-live":"assertive","aria-atomic":"true",role:"alert",children:_})]}),a.jsxs(Ic,{open:D,onOpenChange:z,modal:i,children:[a.jsx("div",{id:X,className:"sr-only",children:"Multi-select dropdown. Use arrow keys to navigate, Enter to select, and Escape to close."}),a.jsx("div",{id:N,className:"sr-only","aria-live":"polite",children:j.length===0?"No options selected":`${j.length} option${j.length===1?"":"s"} selected: ${j.map(L=>Ge(L)?.label).filter(Boolean).join(", ")}`}),a.jsx(Dc,{asChild:!0,children:a.jsx(Ut,{ref:ae,...P,onClick:Dt,disabled:g,role:"combobox","aria-expanded":D,"aria-haspopup":"listbox","aria-controls":D?B:void 0,"aria-describedby":`${X} ${N}`,"aria-label":`Multi-select: ${j.length} of ${me().length} options selected. ${r}`,border:"plain",className:S("flex h-10 items-center justify-between p-1 [&_svg]:pointer-events-auto","!bg-neutral-alpha-2 text-base !font-normal shadow md:text-sm",m?"w-auto":"w-full",ue.compactMode&&"h-8 text-sm",ge==="mobile"&&"h-12 text-base",g&&"cursor-not-allowed opacity-50",c),style:{...wr,maxWidth:`min(${wr.maxWidth}, 100%)`},children:j.length>0?a.jsxs("div",{className:"flex w-full items-center justify-between",children:[a.jsxs("div",{className:S("flex items-center gap-1",h?"multiselect-singleline-scroll overflow-x-auto":"flex-wrap",ue.compactMode&&"gap-0.5"),style:h?{paddingBottom:"4px"}:{},children:[j.slice(0,ue.maxCount).map(L=>{const Q=Ge(L),pe=Q?.icon;if(!Q)return null;const Re={animationDuration:`${o}s`};return a.jsxs(Gr,{className:S("!pr-1.5 pl-3.5",ue.compactMode&&"px-1.5 py-0.5 text-xs",ge==="mobile"&&"max-w-[120px] truncate",h&&"flex-shrink-0 whitespace-nowrap","[&>svg]:pointer-events-auto"),style:Re,children:[pe&&!ue.hideIcons&&a.jsx(pe,{className:S("mr-2 size-3.5",ue.compactMode&&"mr-1 h-3 w-3")}),a.jsx("span",{className:S(ge==="mobile"&&"truncate"),children:Q.label}),a.jsx("div",{role:"button",tabIndex:0,onClick:he=>{he.stopPropagation(),kn(L)},onKeyDown:he=>{(he.key==="Enter"||he.key===" ")&&(he.preventDefault(),he.stopPropagation(),kn(L))},"aria-label":`Remove ${Q.label} from selection`,className:"text-muted-foreground hover:text-foreground size-4 cursor-pointer rounded-sm p-0.5 hover:bg-white/20 focus:ring-1 focus:ring-white/50 focus:outline-none",children:a.jsx(xn,{className:"size-3"})})]},L)}).filter(Boolean),j.length>ue.maxCount&&a.jsxs(Gr,{className:S("!pr-1.5 pl-3.5",ue.compactMode&&"px-1.5 py-0.5 text-xs",h&&"flex-shrink-0 whitespace-nowrap","[&>svg]:pointer-events-auto"),children:[`+ ${j.length-ue.maxCount} more`,a.jsx("div",{role:"button",tabIndex:0,onClick:L=>{L.stopPropagation(),ci()},className:"text-muted-foreground hover:text-foreground size-4 cursor-pointer rounded-sm p-0.5 hover:bg-white/20 focus:ring-1 focus:ring-white/50 focus:outline-none",children:a.jsx(xn,{className:"size-3"})})]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{role:"button",tabIndex:0,onClick:L=>{L.stopPropagation(),Ne()},onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),L.stopPropagation(),Ne())},"aria-label":`Clear all ${j.length} selected options`,className:"text-muted-foreground hover:text-foreground focus:ring-ring mx-2 flex size-3.5 cursor-pointer items-center justify-center rounded-sm focus:ring-2 focus:ring-offset-1 focus:outline-none",children:a.jsx(xn,{className:"size-3.5"})}),a.jsx(kt,{orientation:"vertical",className:"flex h-full min-h-6"}),a.jsx(wt,{className:"text-muted-foreground mx-2 h-4 cursor-pointer","aria-hidden":"true"})]})]}):a.jsxs("div",{className:"mx-auto flex w-full items-center justify-between",children:[a.jsx("span",{className:"text-muted-foreground text-sm",children:r}),a.jsx(wt,{className:"text-muted-foreground mx-2 h-4 cursor-pointer"})]})})}),a.jsx(Lc,{id:B,role:"listbox","aria-multiselectable":"true","aria-label":"Available options",className:S("w-auto p-0",ge==="mobile"&&"w-[85vw] max-w-[280px]",ge==="tablet"&&"w-[70vw] max-w-md",ge==="desktop"&&"min-w-[300px]",v),style:{maxWidth:`min(${wr.maxWidth}, 85vw)`,maxHeight:ge==="mobile"?"70vh":"60vh",touchAction:"manipulation"},align:"start",onEscapeKeyDown:()=>z(!1),children:a.jsxs(ni,{children:[f&&a.jsx(Fc,{placeholder:"Search options...",onKeyDown:li,value:G,onValueChange:Z,"aria-label":"Search through available options","aria-describedby":`${F}-search-help`}),f&&a.jsx("div",{id:`${F}-search-help`,className:"sr-only",children:"Type to filter options. Use arrow keys to navigate results."}),a.jsxs($c,{className:S("multiselect-scrollbar max-h-[40vh] overflow-y-auto",ge==="mobile"&&"max-h-[50vh]","overscroll-behavior-y-contain"),children:[a.jsx(Vc,{children:d||"No results found."})," ",!u&&!G&&a.jsx(Wn,{children:a.jsxs(mn,{onSelect:ui,role:"option","aria-selected":j.length===me().filter(L=>!L.disabled).length,"aria-label":`Select all ${me().length} options`,className:"cursor-pointer",children:[a.jsx("div",{className:S("border-border mr-2 flex size-3.5 items-center justify-center rounded-xs border",j.length===me().filter(L=>!L.disabled).length?"bg-primary":"opacity-50 [&_svg]:invisible"),"aria-hidden":"true",children:a.jsx(vn,{className:"text-primary-foreground size-3.5"})}),a.jsxs("span",{children:["(Select All",me().length>20?` - ${me().length} options`:"",")"]})]},"all")}),ne(Ue)?Ue.map(L=>a.jsx(Wn,{heading:L.heading,children:L.options.map(Q=>{const pe=j.includes(Q.value);return a.jsxs(mn,{onSelect:()=>kn(Q.value),role:"option","aria-selected":pe,"aria-disabled":Q.disabled,"aria-label":`${Q.label}${pe?", selected":", not selected"}${Q.disabled?", disabled":""}`,className:S("cursor-pointer",Q.disabled&&"cursor-not-allowed opacity-50"),disabled:Q.disabled,children:[a.jsx("div",{className:S("border-border mr-2 flex size-3.5 items-center justify-center rounded-xs border",pe?"bg-primary":"opacity-50 [&_svg]:invisible"),"aria-hidden":"true",children:a.jsx(vn,{className:"text-primary-foreground size-3.5"})}),Q.icon&&a.jsx(Q.icon,{className:"text-muted-foreground mr-2 size-3.5","aria-hidden":"true"}),a.jsx("span",{children:Q.label})]},Q.value)})},L.heading)):a.jsx(Wn,{children:Ue.map(L=>{const Q=j.includes(L.value);return a.jsxs(mn,{onSelect:()=>kn(L.value),role:"option","aria-selected":Q,"aria-disabled":L.disabled,"aria-label":`${L.label}${Q?", selected":", not selected"}${L.disabled?", disabled":""}`,className:S("cursor-pointer",L.disabled&&"cursor-not-allowed opacity-50"),disabled:L.disabled,children:[a.jsx("div",{className:S("border-border mr-2 flex size-3.5 items-center justify-center rounded-xs border",Q?"bg-primary":"opacity-50 [&_svg]:invisible"),"aria-hidden":"true",children:a.jsx(vn,{className:"text-primary-foreground size-3.5"})}),L.icon&&a.jsx(L.icon,{className:"text-muted-foreground mr-2 size-3.5","aria-hidden":"true"}),a.jsx("span",{children:L.label})]},L.value)})}),a.jsx($0,{}),a.jsx(Wn,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[j.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(mn,{onSelect:Ne,className:"flex-1 cursor-pointer justify-center",children:"Clear"}),a.jsx(kt,{orientation:"vertical",className:"mx-1 flex h-full min-h-6"})]}),a.jsx(mn,{onSelect:()=>z(!1),className:"max-w-full flex-1 cursor-pointer justify-center",children:"Close"})]})})]})]})}),o>0&&j.length>0&&a.jsx(wp,{className:S("text-foreground bg-background my-2 h-3 w-3 cursor-pointer",q?"":"text-muted-foreground"),onClick:()=>Y(!q)})]})]})});V0.displayName="MultiSelect";const B0=p.forwardRef(({options:e,onValueChange:t,defaultValue:n="",placeholder:r="Select option",animation:o=0,modalPopover:s=!1,className:i,searchable:l=!0,emptyIndicator:c,autoSize:u=!1,popoverClassName:f,disabled:d=!1,responsive:m,minWidth:h,maxWidth:v,closeOnSelect:g=!1,...b},x)=>{const[y,w]=p.useState(n),[C,R]=p.useState(!1),[P,T]=p.useState(!1),[j,M]=p.useState(""),[D,z]=p.useState(""),[q,Y]=p.useState(""),G=p.useRef(C),Z=p.useRef(j),$=J=>{d||ne(J)?.disabled||(w(J),t(J),g&&R(!1))},V=p.useCallback((J,ue="polite")=>{ue==="assertive"?(Y(J),setTimeout(()=>Y(""),100)):(z(J),setTimeout(()=>z(""),100))},[]),_=p.useId(),O=`${_}-listbox`,te=`${_}-description`,fe=`${_}-count`,k=p.useCallback(()=>{w(n),R(!1),M(""),t(n)},[n,t]),A=p.useRef(null);p.useImperativeHandle(x,()=>({reset:k,clear:()=>{w(""),t("")},focus:()=>{if(A.current){A.current.focus();const J=A.current.style.outline,ue=A.current.style.outlineOffset;A.current.style.outline="2px solid hsl(var(--ring))",A.current.style.outlineOffset="2px",setTimeout(()=>{A.current&&(A.current.style.outline=J,A.current.style.outlineOffset=ue)},1e3)}}}),[k,y,t]);const[F,B]=p.useState("desktop");p.useEffect(()=>{if(typeof window>"u")return;const J=()=>{const ue=window.innerWidth;ue<640?B("mobile"):ue<1024?B("tablet"):B("desktop")};return J(),window.addEventListener("resize",J),()=>{typeof window<"u"&&window.removeEventListener("resize",J)}},[]);const N=(()=>{if(!m)return{hideIcons:!1,compactMode:!1};if(m===!0){const me={mobile:{hideIcons:!1,compactMode:!0},tablet:{hideIcons:!1,compactMode:!1},desktop:{hideIcons:!1,compactMode:!1}}[F];return{hideIcons:me?.hideIcons??!1,compactMode:me?.compactMode??!1}}const J=m[F];return{hideIcons:J?.hideIcons??!1,compactMode:J?.compactMode??!1}})(),U=p.useCallback(()=>{if(e.length===0)return[];const J=e,ue=new Set,me=[];return J.forEach(Ge=>{ue.has(Ge.value)?me.push(Ge.value):ue.add(Ge.value)}),J},[e]),ne=p.useCallback(J=>{const ue=U().find(me=>me.value===J);return!ue&&process.env.NODE_ENV==="development"&&console.warn(`Combobox: Option with value "${J}" not found in options list`),ue},[U]),ie=p.useMemo(()=>!l||!j?e:e.length===0?[]:e.filter(J=>J.label.toLowerCase().includes(j.toLowerCase())||J.value.toLowerCase().includes(j.toLowerCase())),[e,j,l]),ce=()=>{d||(w(""),t(""))},ae=()=>{d||R(J=>!J)},Pe={minWidth:h||(F==="mobile"?"0px":"200px"),maxWidth:v||"100%",width:u?"auto":"100%"};return p.useEffect(()=>{C||M("")},[C]),p.useEffect(()=>{const J=U(),ue=J.filter(me=>!me.disabled).length;if(C!==G.current&&(V(C?`Dropdown opened. ${ue} options available. Use arrow keys to navigate.`:"Dropdown closed."),G.current=C),j!==Z.current&&j!==void 0){if(j&&C){const me=J.filter(Ge=>Ge.label.toLowerCase().includes(j.toLowerCase())||Ge.value.toLowerCase().includes(j.toLowerCase())).length;V(`${me} option${me===1?"":"s"} found for "${j}"`)}Z.current=j}},[y,C,j,V,U]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"sr-only",children:[a.jsx("div",{"aria-live":"polite","aria-atomic":"true",role:"status",children:D}),a.jsx("div",{"aria-live":"assertive","aria-atomic":"true",role:"alert",children:q})]}),a.jsxs(Ic,{open:C,onOpenChange:R,modal:s,children:[a.jsx("div",{id:te,className:"sr-only",children:"Multi-select dropdown. Use arrow keys to navigate, Enter to select, and Escape to close."}),a.jsx(Dc,{asChild:!0,children:a.jsx(Ut,{ref:A,...b,onClick:ae,disabled:d,role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-controls":C?O:void 0,"aria-describedby":`${te} ${fe}`,border:"plain",className:S("flex h-10 items-center justify-between p-1 [&_svg]:pointer-events-auto","!bg-neutral-alpha-2 text-base !font-normal shadow md:text-sm",u?"w-auto":"w-full",N.compactMode&&"h-8 text-sm",F==="mobile"&&"h-12 text-base",d&&"cursor-not-allowed opacity-50",i),style:{...Pe,maxWidth:`min(${Pe.maxWidth}, 100%)`},children:y?a.jsxs("div",{className:"mx-auto flex w-full items-center justify-between",children:[a.jsx("span",{className:"text-foreground text-sm",children:e.find(J=>J.value===y)?.label}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{role:"button",tabIndex:0,onClick:J=>{J.stopPropagation(),ce()},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.stopPropagation(),ce())},className:"text-muted-foreground hover:text-foreground focus:ring-ring mx-2 flex size-3.5 cursor-pointer items-center justify-center rounded-sm focus:ring-2 focus:ring-offset-1 focus:outline-none",children:a.jsx(xn,{className:"size-3.5"})}),a.jsx(kt,{orientation:"vertical",className:"flex h-full min-h-6"}),a.jsx(wt,{className:"text-muted-foreground mx-2 h-4 cursor-pointer","aria-hidden":"true"})]})]}):a.jsxs("div",{className:"mx-auto flex w-full items-center justify-between",children:[a.jsx("span",{className:"text-muted-foreground text-sm",children:r}),a.jsx(wt,{className:"text-muted-foreground mx-2 h-4 cursor-pointer"})]})})}),a.jsx(Lc,{id:O,role:"listbox","aria-multiselectable":"true","aria-label":"Available options",className:S("w-auto p-0",F==="mobile"&&"w-[85vw] max-w-[280px]",F==="tablet"&&"w-[70vw] max-w-md",F==="desktop"&&"min-w-[300px]",f),style:{maxWidth:`min(${Pe.maxWidth}, 85vw)`,maxHeight:F==="mobile"?"70vh":"60vh",touchAction:"manipulation"},align:"start",onEscapeKeyDown:()=>R(!1),children:a.jsxs(ni,{children:[l&&a.jsx(Fc,{placeholder:"Search options...",value:j,onValueChange:M,"aria-label":"Search through available options","aria-describedby":`${_}-search-help`}),l&&a.jsx("div",{id:`${_}-search-help`,className:"sr-only",children:"Type to filter options. Use arrow keys to navigate results."}),a.jsxs($c,{className:S("multiselect-scrollbar max-h-[40vh] overflow-y-auto",F==="mobile"&&"max-h-[50vh]","overscroll-behavior-y-contain"),children:[a.jsx(Vc,{children:c||"No results found."})," ",a.jsx(Wn,{children:ie.map(J=>{const ue=y===J.value;return a.jsxs(mn,{onSelect:()=>$(J.value),role:"option","aria-selected":ue,"aria-disabled":J.disabled,"aria-label":`${J.label}${ue?", selected":", not selected"}${J.disabled?", disabled":""}`,className:S("cursor-pointer",J.disabled&&"cursor-not-allowed opacity-50"),disabled:J.disabled,children:[J.icon&&a.jsx(J.icon,{className:"text-muted-foreground mr-2 size-3.5","aria-hidden":"true"}),a.jsx("span",{className:"grow",children:J.label}),ue?a.jsx(vn,{className:"text-muted-foreground size-3.5"}):null]},J.value)})})]})]})}),o>0&&y&&a.jsx(wp,{className:S("text-foreground bg-background my-2 h-3 w-3 cursor-pointer",P?"":"text-muted-foreground"),onClick:()=>T(!P)})]})]})});B0.displayName="Combobox";function lN(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Bc="ScrollArea",[z0]=Me(Bc),[cN,ot]=z0(Bc),H0=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[l,c]=p.useState(null),[u,f]=p.useState(null),[d,m]=p.useState(null),[h,v]=p.useState(null),[g,b]=p.useState(null),[x,y]=p.useState(0),[w,C]=p.useState(0),[R,P]=p.useState(!1),[T,j]=p.useState(!1),M=ee(t,z=>c(z)),D=Pn(o);return a.jsx(cN,{scope:n,type:r,dir:D,scrollHideDelay:s,scrollArea:l,viewport:u,onViewportChange:f,content:d,onContentChange:m,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:g,onScrollbarYChange:b,scrollbarYEnabled:T,onScrollbarYEnabledChange:j,onCornerWidthChange:y,onCornerHeightChange:C,children:a.jsx(H.div,{dir:D,...i,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});H0.displayName=Bc;var G0="ScrollAreaViewport",U0=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=ot(G0,n),l=p.useRef(null),c=ee(t,l,i.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),a.jsx(H.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});U0.displayName=G0;var jt="ScrollAreaScrollbar",W0=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ot(jt,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return p.useEffect(()=>(l?s(!0):i(!0),()=>{l?s(!1):i(!1)}),[l,s,i]),o.type==="hover"?a.jsx(uN,{...r,ref:t,forceMount:n}):o.type==="scroll"?a.jsx(dN,{...r,ref:t,forceMount:n}):o.type==="auto"?a.jsx(K0,{...r,ref:t,forceMount:n}):o.type==="always"?a.jsx(zc,{...r,ref:t}):null});W0.displayName=jt;var uN=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ot(jt,e.__scopeScrollArea),[s,i]=p.useState(!1);return p.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},f=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),a.jsx(ye,{present:n||s,children:a.jsx(K0,{"data-state":s?"visible":"hidden",...r,ref:t})})}),dN=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ot(jt,e.__scopeScrollArea),s=e.orientation==="horizontal",i=oi(()=>c("SCROLL_END"),100),[l,c]=lN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),p.useEffect(()=>{const u=o.viewport,f=s?"scrollLeft":"scrollTop";if(u){let d=u[f];const m=()=>{const h=u[f];d!==h&&(c("SCROLL"),i()),d=h};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[o.viewport,s,c,i]),a.jsx(ye,{present:n||l!=="hidden",children:a.jsx(zc,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:I(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:I(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),K0=p.forwardRef((e,t)=>{const n=ot(jt,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=p.useState(!1),l=e.orientation==="horizontal",c=oi(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;i(l?u:f)}},10);return or(n.viewport,c),or(n.content,c),a.jsx(ye,{present:r||s,children:a.jsx(zc,{"data-state":s?"visible":"hidden",...o,ref:t})})}),zc=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=ot(jt,e.__scopeScrollArea),s=p.useRef(null),i=p.useRef(0),[l,c]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Q0(l.viewport,l.content),f={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:m=>i.current=m};function d(m,h){return vN(m,i.current,l,h)}return n==="horizontal"?a.jsx(fN,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,h=gf(m,l,o.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=d(m,o.dir))}}):n==="vertical"?a.jsx(pN,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,h=gf(m,l);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=d(m))}}):null}),fN=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=ot(jt,e.__scopeScrollArea),[i,l]=p.useState(),c=p.useRef(null),u=ee(t,c,s.onScrollbarXChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(Y0,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ri(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(s.viewport){const m=s.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),eb(m,d)&&f.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:xs(i.paddingLeft),paddingEnd:xs(i.paddingRight)}})}})}),pN=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=ot(jt,e.__scopeScrollArea),[i,l]=p.useState(),c=p.useRef(null),u=ee(t,c,s.onScrollbarYChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(Y0,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ri(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(s.viewport){const m=s.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),eb(m,d)&&f.preventDefault()}},onResize:()=>{c.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:xs(i.paddingTop),paddingEnd:xs(i.paddingBottom)}})}})}),[mN,q0]=z0(jt),Y0=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:d,...m}=e,h=ot(jt,n),[v,g]=p.useState(null),b=ee(t,M=>g(M)),x=p.useRef(null),y=p.useRef(""),w=h.viewport,C=r.content-r.viewport,R=ve(f),P=ve(c),T=oi(d,10);function j(M){if(x.current){const D=M.clientX-x.current.left,z=M.clientY-x.current.top;u({x:D,y:z})}}return p.useEffect(()=>{const M=D=>{const z=D.target;v?.contains(z)&&R(D,C)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[w,v,C,R]),p.useEffect(P,[r,P]),or(v,T),or(h.content,T),a.jsx(mN,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:ve(s),onThumbPointerUp:ve(i),onThumbPositionChange:P,onThumbPointerDown:ve(l),children:a.jsx(H.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:I(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),x.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),j(M))}),onPointerMove:I(e.onPointerMove,j),onPointerUp:I(e.onPointerUp,M=>{const D=M.target;D.hasPointerCapture(M.pointerId)&&D.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),x.current=null})})})}),vs="ScrollAreaThumb",X0=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=q0(vs,e.__scopeScrollArea);return a.jsx(ye,{present:n||o.hasThumb,children:a.jsx(hN,{ref:t,...r})})}),hN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=ot(vs,n),i=q0(vs,n),{onThumbPositionChange:l}=i,c=ee(t,d=>i.onThumbChange(d)),u=p.useRef(void 0),f=oi(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=s.viewport;if(d){const m=()=>{if(f(),!u.current){const h=xN(d,l);u.current=h,l()}};return l(),d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[s.viewport,f,l]),a.jsx(H.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:I(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),v=d.clientX-h.left,g=d.clientY-h.top;i.onThumbPointerDown({x:v,y:g})}),onPointerUp:I(e.onPointerUp,i.onThumbPointerUp)})});X0.displayName=vs;var Hc="ScrollAreaCorner",Z0=p.forwardRef((e,t)=>{const n=ot(Hc,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(gN,{...e,ref:t}):null});Z0.displayName=Hc;var gN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=ot(Hc,n),[s,i]=p.useState(0),[l,c]=p.useState(0),u=!!(s&&l);return or(o.scrollbarX,()=>{const f=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(f),c(f)}),or(o.scrollbarY,()=>{const f=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(f),i(f)}),u?a.jsx(H.div,{...r,ref:t,style:{width:s,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xs(e){return e?parseInt(e,10):0}function Q0(e,t){const n=e/t;return isNaN(n)?0:n}function ri(e){const t=Q0(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function vN(e,t,n,r="ltr"){const o=ri(n),s=o/2,i=t||s,l=o-i,c=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return J0([c,u],d)(e)}function gf(e,t,n="ltr"){const r=ri(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,l=s-r,c=n==="ltr"?[0,i]:[i*-1,0],u=Hr(e,c);return J0([0,i],[0,l])(u)}function J0(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eb(e,t){return e>0&&e<t}var xN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,l=n.top!==s.top;(i||l)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function oi(e,t){const n=ve(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function or(e,t){const n=ve(t);be(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var bN=H0,yN=U0,wN=Z0;function si({className:e,children:t,...n}){return a.jsxs(bN,{"data-slot":"scroll-area",className:S("relative overflow-hidden",e),...n,children:[a.jsx(yN,{"data-slot":"scroll-area-viewport",className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(tb,{}),a.jsx(wN,{})]})}function tb({className:e,orientation:t="vertical",...n}){return a.jsx(W0,{"data-slot":"scroll-area-scrollbar",orientation:t,className:S("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:a.jsx(X0,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function CN({...e}){return a.jsx(Ws,{"data-slot":"sheet",...e})}function SN({...e}){return a.jsx(Ks,{"data-slot":"sheet-portal",...e})}function RN({className:e,...t}){return a.jsx(qs,{"data-slot":"sheet-overlay",className:S("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function jN({className:e,children:t,side:n="right",...r}){return a.jsxs(SN,{children:[a.jsx(RN,{}),a.jsxs(Ys,{"data-slot":"sheet-content",className:S("border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,a.jsxs(io,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[a.jsx(xn,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function EN({className:e,...t}){return a.jsx("div",{"data-slot":"sheet-header",className:S("flex flex-col gap-1.5 p-4",e),...t})}function TN({className:e,...t}){return a.jsx(hc,{"data-slot":"sheet-title",className:S("text-foreground font-semibold",e),...t})}function PN({className:e,...t}){return a.jsx(gc,{"data-slot":"sheet-description",className:S("text-muted-foreground text-sm",e),...t})}function vf({className:e,...t}){return a.jsx("div",{"data-slot":"skeleton",className:S("bg-accent animate-pulse rounded-md",e),...t})}const _N=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!0);return E.useEffect(()=>{const o=()=>{const l=window.matchMedia("(max-width: 768px)"),c=navigator.userAgent.toLowerCase(),f=["android","webos","iphone","ipad","ipod","blackberry","windows phone","mobile"].some(m=>c.includes(m)),d=l.matches||f&&window.innerWidth<=768;t(d),r(!1)};o();const s=window.matchMedia("(max-width: 768px)"),i=()=>o();return s.addEventListener?s.addEventListener("change",i):s.addListener(i),window.addEventListener("resize",o),()=>{s.removeEventListener?s.removeEventListener("change",i):s.removeListener(i),window.removeEventListener("resize",o)}},[]),{isMobile:e,isLoading:n}},MN="sidebar_state",AN=3600*24*7,NN="16rem",kN="18rem",IN="3rem",DN="b",nb=p.createContext(null);function br(){const e=p.useContext(nb);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function rb({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:s,...i}){const{isMobile:l}=_N(),[c,u]=p.useState(!1),[f,d]=p.useState(e),m=t??f,h=p.useCallback(x=>{const y=typeof x=="function"?x(m):x;n?n(y):d(y),document.cookie=`${MN}=${y}; path=/; max-age=${AN}`},[n,m]),v=p.useCallback(()=>l?u(x=>!x):h(x=>!x),[l,h,u]);p.useEffect(()=>{const x=y=>{y.key===DN&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),v())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[v]);const g=m?"expanded":"collapsed",b=p.useMemo(()=>({state:g,open:m,setOpen:h,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:v}),[g,m,h,l,c,u,v]);return a.jsx(nb.Provider,{value:b,children:a.jsx(Ds,{delayDuration:0,children:a.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":NN,"--sidebar-width-icon":IN,...o},className:S("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...i,children:s})})})}function ob({side:e="left",variant:t="floating",collapsible:n="offcanvas",className:r,children:o,...s}){const{isMobile:i,state:l,openMobile:c,setOpenMobile:u}=br();return n==="none"?a.jsx("div",{"data-slot":"sidebar",className:S("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...s,children:o}):i?a.jsx(CN,{open:c,onOpenChange:u,...s,children:a.jsxs(jN,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":kN},side:e,children:[a.jsxs(EN,{className:"sr-only",children:[a.jsx(TN,{children:"Sidebar"}),a.jsx(PN,{children:"Displays the mobile sidebar."})]}),a.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):a.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[a.jsx("div",{"data-slot":"sidebar-gap",className:S("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-12")}),a.jsx("div",{"data-slot":"sidebar-container",className:S("border-border fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-12 group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...s,children:a.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-[0_0_40px_0_rgba(0,0,0,0.5)]",children:o})})]})}function sb({className:e,onClick:t,...n}){const{toggleSidebar:r}=br();return a.jsxs(Ut,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"default",border:"plain",size:"icon",className:S("size-7",e),onClick:o=>{t?.(o),r()},...n,children:[a.jsx(Pw,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function LN({className:e,...t}){const{toggleSidebar:n}=br();return a.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:S("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function ON({className:e,...t}){return a.jsx("main",{"data-slot":"sidebar-inset",className:S("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function FN({className:e,...t}){return a.jsx(vr,{"data-slot":"sidebar-input","data-sidebar":"input",className:S("bg-background h-8 w-full shadow-none",e),...t})}function ib({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:S("flex flex-col gap-2 px-4 pt-8",e),...t})}function ab({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:S("flex flex-col gap-2 px-4 pb-8",e),...t})}function $N({className:e,...t}){return a.jsx(kt,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:S("bg-sidebar-border mx-2 w-auto",e),...t})}function lb({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:S("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Ja({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:S("relative flex w-full min-w-0 flex-col p-4",e),...t})}function VN({className:e,asChild:t=!1,...n}){const r=t?Tn:"div";return a.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:S("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function BN({className:e,asChild:t=!1,...n}){const r=t?Tn:"button";return a.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:S("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function cb({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:S("w-full text-sm",e),...t})}function ub({className:e,...t}){return a.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:S("flex w-full min-w-0 flex-col gap-1",e),...t})}function el({className:e,...t}){return a.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:S("group/menu-item relative",e),...t})}const db=Ee("peer/menu-button ring-sidebar-ring data-[active=true]:border-gradient-accent data-[active=true]:text-primary data-[active=true]:shadow-primary data-[active=true]:hover:text-primary flex w-full items-center rounded-lg border border-transparent px-3 py-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium data-[active=true]:hover:bg-transparent [&>span]:pl-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-neutral-alpha-2 hover:text-foreground text-muted-foreground active:text-primary active:bg-neutral-alpha-5",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-10 text-xs",sm:"h-8 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function tl({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:s,...i}){const l=e?Tn:"button",{isMobile:c,state:u}=br(),f=a.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:S(db({variant:n,size:r}),"group/menu-button",s),...i});return o?(typeof o=="string"&&(o={children:o}),a.jsxs(Ml,{children:[a.jsx(Al,{asChild:!0,children:f}),a.jsx(Nl,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):f}function zN({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?Tn:"button";return a.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:S("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...r})}function HN({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:S("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function GN({className:e,showIcon:t=!1,...n}){const r=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:S("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&a.jsx(vf,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a.jsx(vf,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function fb({className:e,...t}){return a.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:S("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function pb({className:e,...t}){return a.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:S("group/menu-sub-item relative",e),...t})}function mb({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="sm",className:o,...s}){const i=e?Tn:"a";return a.jsx(i,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:S(db({variant:n,size:r}),"group/menu-sub-button",o),...s})}var ii="Collapsible",[UN]=Me(ii),[WN,Gc]=UN(ii),hb=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...l}=e,[c,u]=Ie({prop:r,defaultProp:o??!1,onChange:i,caller:ii});return a.jsx(WN,{scope:n,disabled:s,contentId:Se(),open:c,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),children:a.jsx(H.div,{"data-state":Wc(c),"data-disabled":s?"":void 0,...l,ref:t})})});hb.displayName=ii;var gb="CollapsibleTrigger",vb=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Gc(gb,n);return a.jsx(H.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Wc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:I(e.onClick,o.onOpenToggle)})});vb.displayName=gb;var Uc="CollapsibleContent",xb=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Gc(Uc,e.__scopeCollapsible);return a.jsx(ye,{present:n||o.open,children:({present:s})=>a.jsx(KN,{...r,ref:t,present:s})})});xb.displayName=Uc;var KN=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=Gc(Uc,n),[l,c]=p.useState(r),u=p.useRef(null),f=ee(t,u),d=p.useRef(0),m=d.current,h=p.useRef(0),v=h.current,g=i.open||l,b=p.useRef(g),x=p.useRef(void 0);return p.useEffect(()=>{const y=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(y)},[]),be(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();d.current=w.height,h.current=w.width,b.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),c(r)}},[i.open,r]),a.jsx(H.div,{"data-state":Wc(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&o})});function Wc(e){return e?"open":"closed"}var qN=hb;function bb({...e}){return a.jsx(qN,{"data-slot":"collapsible",...e})}function yb({...e}){return a.jsx(vb,{"data-slot":"collapsible-trigger",...e})}function wb({...e}){return a.jsx(xb,{"data-slot":"collapsible-content",...e})}function YN({type:e="beta",text:t,link:n,className:r}){const o=e==="beta"?"text-[#AAF1D5]":e==="warning"?"text-[#F7931A]":e==="issue"?"text-[#FF0608]":"text-[#73F36C]",s=e==="beta"?"bg-[linear-gradient(90deg,rgba(18,19,18,0.6)_0%,rgba(170,241,213,0.2)_50%,rgba(18,19,18,0.6)_100%)]":e==="warning"?"bg-[linear-gradient(90deg,rgba(18,19,18,0.6)_0%,rgba(247,147,26,0.2)_50%,rgba(18,19,18,0.6)_100%)]":e==="issue"?"bg-[linear-gradient(90deg,rgba(18,19,18,0.6)_0%,rgba(255,6,8,0.2)_50%,rgba(18,19,18,0.6)_100%)]":"bg-[linear-gradient(90deg,rgba(18,19,18,0.6)_0%,rgba(115,243,108,0.2)_50%,rgba(18,19,18,0.6)_100%)]",i=e==="beta"?"Beta":e==="warning"?"Warning":e==="issue"?"Critical Issue":"Update",l=e==="beta"?Og:e==="warning"?Dg:e==="issue"?Fg:Lg;return a.jsxs("div",{className:S("border-border flex h-[70px] items-center justify-center gap-2.5 rounded-full border py-2.5 pr-5 pl-2.5 shadow-[0_4px_20px_0_rgba(0,0,0,0.3)] md:h-[50px]",s,r),children:[a.jsxs("div",{className:S("bg-neutral-alpha-5 flex h-[30px] items-center gap-1.5 rounded-full py-1 pr-2.5 pl-1.5 text-xs",o),children:[a.jsx(l,{className:"size-6"}),i]}),a.jsxs("div",{className:"text-[10px] md:text-xs",children:[t," ",n&&a.jsxs("div",{className:S("inline-flex items-center",o),children:[a.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"here"}),a.jsx(Ig,{})]})]})]})}const Cb=p.forwardRef(({className:e,title:t,description:n,txHash:r,explorerUrl:o,estimatedTime:s,amount:i,token:l,protocol:c,steps:u=[],variant:f="default",completed:d=!1,cancelled:m=!1,onViewDetails:h,onClose:v,showActions:g=!0,...b},x)=>{const y=m?"Transaction Cancelled":d?"Transaction Completed":"Processing Transaction",w=m?"Transaction was cancelled by user":d?"Your transaction has been successfully processed!":"Please wait while your transaction is being processed...",C=({size:T="w-4 h-4"})=>a.jsx("svg",{className:T,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),R=()=>a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),P=T=>T.length<=12?T:`${T.slice(0,6)}...${T.slice(-6)}`;return a.jsxs(dt,{ref:x,className:S("p-4 text-center space-y-3",f==="compact"&&"p-3 space-y-2",e),...b,children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(ml,{spinning:!d&&!m,size:f==="compact"?"sm":"default",children:m?a.jsx(xn,{className:S(f==="compact"?"w-5 h-5":"w-6 h-6","text-destructive")}):d?a.jsx(vn,{className:S(f==="compact"?"w-5 h-5":"w-6 h-6","text-primary")}):a.jsx(Lw,{className:S(f==="compact"?"w-5 h-5":"w-6 h-6","text-primary")})})}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:S("font-medium text-foreground",f==="compact"?"text-xs":"text-sm"),children:t||y}),a.jsx("p",{className:S("text-muted-foreground","text-xs"),children:n||w})]}),d&&!m&&(i||l||c)&&a.jsxs("div",{className:"p-2 bg-muted/50 rounded-lg space-y-1",children:[i&&l&&a.jsxs("div",{className:"text-xs font-medium",children:[i," ",l]}),c&&a.jsxs("div",{className:"text-xs text-muted-foreground",children:["via ",c]})]}),r&&!m&&a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"text-xs text-muted-foreground",children:"Transaction Hash"}),o?a.jsxs("a",{href:`${o}/tx/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-xs text-primary hover:text-primary/80 transition-colors",children:[P(r),a.jsx(C,{})]}):a.jsx("div",{className:"text-xs font-mono text-foreground",children:P(r)})]}),!d&&!m&&s&&a.jsxs("div",{className:"text-xs text-muted-foreground",children:["Estimated time: ",s]}),!d&&!m&&u.length>0&&a.jsxs("div",{className:"space-y-2 pt-2 border-t border-border",children:[a.jsx("div",{className:"text-xs font-medium text-muted-foreground text-left",children:"Progress"}),a.jsx("div",{className:"space-y-2",children:u.map((T,j)=>a.jsxs("div",{className:"flex items-center gap-3 text-left",children:[a.jsx("div",{className:S("flex items-center justify-center w-5 h-5 rounded-full border-2 flex-shrink-0",T.completed&&"bg-primary border-primary text-primary-foreground",T.current&&!T.completed&&"border-primary text-primary animate-pulse",!T.completed&&!T.current&&"border-muted-foreground/30 text-muted-foreground"),children:T.completed?a.jsx(R,{}):T.current?a.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}):a.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30"})}),a.jsxs("div",{className:"flex-1 flex items-center justify-between",children:[a.jsx("span",{className:S("text-xs",T.completed&&"text-foreground",T.current&&!T.completed&&"text-foreground font-medium",!T.completed&&!T.current&&"text-muted-foreground"),children:T.label}),T.txHash&&o&&a.jsxs("a",{href:`${o}/tx/${T.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors ml-2",title:`View transaction: ${T.txHash}`,children:[a.jsxs("span",{className:"font-mono",children:[T.txHash.slice(0,6),"...",T.txHash.slice(-4)]}),a.jsx(C,{size:"w-3 h-3"})]})]})]},j))})]}),(d||m)&&g&&(h||v)&&a.jsxs("div",{className:S("flex gap-2 pt-2",f==="compact"?"flex-col":"flex-row justify-center"),children:[!m&&h&&a.jsx(Ut,{size:f==="compact"?"sm":"default",onClick:h,children:"View Details"}),v&&a.jsx(Ut,{variant:"default",size:f==="compact"?"sm":"default",onClick:v,children:m?"Try Again":"Done"})]})]})});Cb.displayName="TxStatus";const Sb=({tokens:e,value:t,onValueChange:n,placeholder:r="Select token",disabled:o,className:s,variant:i="bordered",size:l="default",showBalance:c=!0})=>{const u=t||(e.length>0?e[0].address:void 0),f=e.find(d=>d.address===u);return E.useEffect(()=>{!t&&e.length>0&&n&&n(e[0].address)},[t,e,n]),a.jsxs($g,{value:u,onValueChange:n,disabled:o,children:[a.jsx(Vg,{className:S("w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-md font-medium","focus:ring-2 focus:ring-primary/20 focus:outline-none",l==="xs"&&"min-w-[80px] gap-2",l==="sm"&&"min-w-[75px] gap-1.5",l==="default"&&"min-w-[80px] gap-1.5",s),children:f?a.jsxs("div",{className:S("flex items-center",l==="xs"&&"gap-2",l==="sm"&&"gap-1.5",l==="default"&&"gap-1.5"),children:[a.jsx("span",{className:S("flex items-center justify-center",l==="xs"&&"w-3.5 h-3",l==="sm"&&"w-4 h-3.5",l==="default"&&"w-5 h-4"),children:f.icon}),a.jsx("span",{className:S("font-medium",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm"),children:f.symbol})]}):a.jsx("span",{className:S("text-muted-foreground",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm"),children:r})}),a.jsx(Bg,{className:"border border-muted gap-2",children:e.map(d=>a.jsx(zg,{value:d.address,className:"cursor-pointer py-2",children:a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:S("flex items-center justify-center",l==="xs"&&"w-3.5 h-3.5",l==="sm"&&"w-4 h-4",l==="default"&&"w-5 h-4"),children:d.icon}),a.jsx("span",{className:S("font-medium",l==="xs"&&"text-xs",l==="sm"&&"text-sm",l==="default"&&"text-sm"),children:d.symbol})]}),c&&a.jsxs("span",{className:"text-white/80 text-xs",children:["≈ ",d.balance]})]})},d.address))})]})},Kc=(e,t="")=>e?a.jsx("img",{src:e,alt:t,className:"h-4 w-4 rounded-full"}):a.jsx("div",{className:"bg-muted flex h-4 w-4 items-center justify-center rounded-full text-xs",children:t.charAt(0)}),qc=({icon:e,text:t,onClick:n,className:r,variant:o="bordered",size:s="default",placeholder:i="Select",showIcon:l=!0})=>{const c=t||e;return a.jsx("div",{onClick:n,className:S("bg-muted hover:bg-secondary inline-flex w-auto min-w-[80px] cursor-pointer items-center justify-between rounded-full font-medium","focus:ring-primary/20 transition-colors focus:ring-2 focus:outline-none",o==="bordered"&&"border-border border",s==="xs"&&"h-7 min-w-[80px] gap-2 px-2.5 py-1",s==="sm"&&"h-8 min-w-[75px] gap-1.5 px-3 py-1.5",s==="default"&&"h-10 min-w-[80px] gap-1.5 px-3 py-2",r),role:"button",tabIndex:0,children:c?a.jsxs("div",{className:S("flex items-center",s==="xs"&&"gap-2",s==="sm"&&"gap-1.5",s==="default"&&"gap-1.5"),children:[l&&e&&a.jsx("span",{className:S("flex items-center justify-center",s==="xs"&&"h-3 w-3.5",s==="sm"&&"h-3.5 w-4",s==="default"&&"h-4 w-5"),children:e}),a.jsx("span",{className:S("font-medium",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm"),children:t})]}):a.jsx("span",{className:S("text-muted-foreground",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm"),children:i})})},Rb=p.forwardRef(({className:e,value:t="",tokens:n,selectedToken:r,usdValue:o,balance:s,placeholder:i="0",disabled:l=!1,hideTokenSelector:c=!1,isWalletConnected:u=!0,onChange:f,onMaxClick:d,onTokenChange:m,useCustomTokenSelector:h=!1,selectedTokenData:v,onCustomTokenSelectorClick:g,...b},x)=>{const y=h?v:n.find(C=>C.address===r),w=C=>{const R=C.target.value;/^\d*\.?\d*$/.test(R)&&f?.(R)};return u?a.jsxs(dt,{variant:"shadow",ref:x,className:S("space-y-3",l&&"opacity-50",e),...b,children:[a.jsxs("div",{className:"flex items-center gap-6",children:[a.jsx("div",{className:"flex-1",children:a.jsx(vr,{variant:"nofocus",value:t,onChange:w,placeholder:i,disabled:l,className:"h-auto border-none bg-transparent p-0 text-4xl font-[400] focus:ring-0"})}),!c&&(h?a.jsx(qc,{icon:y?.icon?typeof y.icon=="string"?Kc(y.icon,y.symbol):y.icon:void 0,text:y?.symbol||"",onClick:g,placeholder:"Select token",size:"sm",variant:"bordered",className:S("rounded-full",l&&"cursor-not-allowed opacity-50"),showIcon:!0}):a.jsx(Sb,{tokens:n,value:r,onValueChange:m,disabled:l,placeholder:"Select token",size:"sm",variant:"default",className:"rounded-full"}))]}),a.jsxs("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[a.jsx("div",{children:o?a.jsxs("span",{children:["≈ ",o]}):t?a.jsx("span",{className:"text-destructive/50",children:"Insufficient balance"}):null}),a.jsxs("div",{className:"flex items-center gap-2",children:[s&&a.jsxs("span",{className:"text-sm",children:["Balance: ",s," ",y?.symbol||""]}),d&&a.jsx(pl,{variant:"default",size:"xs",onClick:d,className:S("hover:bg-primary hover:text-primary-foreground h-5 cursor-pointer px-2 py-0.5 text-xs transition-colors",l&&"cursor-not-allowed opacity-50"),children:"MAX"})]})]})]}):a.jsx(dt,{ref:x,className:S("flex items-center justify-center py-8",e),...b,children:a.jsx("div",{className:"text-center",children:a.jsx("p",{className:"text-muted-foreground text-sm",children:"Connect your wallet to continue"})})})});Rb.displayName="SwapInput";const jb=p.forwardRef(({className:e,details:t,...n},r)=>{const{deposit:o,receive:s,equivalentInUsd:i,slippage:l,setSlippage:c}=t;return a.jsxs("div",{className:"animate-in fade-in-0 space-y-2 px-2 py-4 transition-all duration-300",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-foreground text-sm font-semibold",children:"Amount Out"}),a.jsx("span",{className:"font-medium",children:s})]}),l!==void 0&&c&&a.jsx(Eb,{className:"text-sm",value:l,onChange:c}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-sm font-medium",children:[o," = ",s]}),a.jsxs("span",{className:"text-muted-foreground text-xs",children:["(≈ $",i,")"]})]})]})});jb.displayName="SwapDetails";const XN="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAARCAMAAAAc0/kUAAAAmVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VHQRUAAAAMnRSTlMA+/gFbmv8t7pvYzBsPwnh7syrgDsbEcZF5aCGZjjYz7+nmnl0WVNLI+evjGCyIfIlkBMlEnEAAAI9SURBVDjLdZWJcuowDEXlmCxk30khCQHCvlb//3FPMnmdkrinM0UjrjddywCAhBkKnCDwUr3zFkYhDCRo4Hav198rko7h0cDY+kHmCsWgC+DNifOHpV4/y/T5JRBljIaYYGDD205z1q1AqjO7FBtepNfnC03eErjnkUfUEnlq27CmpRJgJKQUdwFqOXsW6jAKHnnFrp7PRvi7xqQZjQdw0cQDmPCLUrsetwfXrWvT9GdzBcnNPncx6s1PfLfDBTBrfIAOGw1WBEhHdlW9crTIHwezoigljLngESZkmAHxsnBtOx/Ytu2kpzMtkg3bT0HSX0bRl2cgY8RRu3DS7XVn7o+B9yrL+FmCHEEnyLlaNQrUkFS87ZwEG546BGJB0fKIgr6YcG/QhgknPIeDmVOeON+puUlwQ0FFoqAwKHXbImGJX2J1h3ZznJPmAx67AamqoSXohirBQ1C0ghBUE3r3OBbjhuMzO+jBCK7CjacIUHT2BGfpCVR+D1VKKFrSZytlWby84OD2q23qJO35aQ0XPpIwdiQ84+ltvwk6uO8sVii/OZQRvykwISyKK1v1DROCocMWmLqaLinZ7jUocr7ENTSqOave9H1/9u4Q6o+6dt3DBvffuHB985NZi1eQwGZqyVs0WPHTgxfo6X/8R1tbXotaKiDITEvzDnUNuUkKOdgnMK4SXuqof7cSOqZunrgE4o8XNZvjf8X7Ev+8zHr9ytTnbWAi/W9AwG/KHRRDTVUHNmu9vrroF/G5Fv8A6Myb3BGIV6EAAAAASUVORK5CYII=",ZN=({value:e,className:t})=>{const{steps:n}=e,r=E.useMemo(()=>n.length>2,[n]),o=i=>a.jsx("div",{className:"bg-primary/20 flex size-3 items-center justify-center rounded-full",children:a.jsx("span",{className:"text-primary text-xs font-bold",children:i.charAt(0)})}),s=i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();return n.length===0?null:a.jsxs("div",{className:"px-3 pb-3",children:[a.jsx("div",{className:"text-sm font-medium",children:"Swap Route"}),a.jsxs("div",{className:"mb-1 flex items-center gap-1 text-[10px]",children:[a.jsx("span",{className:"text-sm opacity-50",children:"Powered by"}),a.jsx("img",{src:XN,className:"w-10",alt:"Enso"})]}),a.jsx(si,{className:"mt-2 rounded-md whitespace-nowrap",children:a.jsx("div",{className:"grid w-full auto-cols-fr grid-flow-col items-center gap-2 py-2",children:n.map((i,l)=>a.jsx(p.Fragment,{children:a.jsx(dt,{variant:"border",children:a.jsxs(gp,{className:"space-y-2 pt-4",children:[a.jsx("div",{className:"text-secondary-foreground text-sm",children:s(i.type)}),a.jsxs("div",{className:"flex flex-row items-center gap-2",children:[a.jsxs(nt,{icon:i.in.icon||o(i.in.symbol),textSize:"xs",iconSize:"xs",children:[!r&&a.jsx("span",{className:"hidden gap-2 sm:block",children:i.in.symbol}),i.type==="approve"&&a.jsxs("span",{className:"gap-2",children:[" ",i.amount]})]}),i.type!=="approve"&&a.jsxs(a.Fragment,{children:[a.jsx(mw,{className:"text-primary size-4 shrink-0"}),a.jsx(nt,{icon:i.out.icon||o(i.out.symbol),textSize:"xs",iconSize:"xs",children:!r&&a.jsx("span",{className:"hidden gap-2 sm:block",children:i.in.symbol})})]})]})]})})},`${i.in.symbol}-${i.type}-${l}`))})})]})},xf={MIN:.1,MAX:100},QN=/^\d*\.?\d*$/,JN=10,e3="w-10",t3=e=>QN.test(e),n3=(e,t,n)=>!isNaN(e)&&e>=t&&e<=n,Io=e=>e.toString();function Eb({value:e,onChange:t,className:n,label:r="Max Slippage",minValue:o=xf.MIN,maxValue:s=xf.MAX}){const[i,l]=E.useState(!1),[c,u]=E.useState(Io(e));E.useEffect(()=>{i||u(Io(e))},[e,i]);const f=E.useCallback(()=>{l(!0),u(Io(e))},[e]),d=E.useCallback(()=>{u(Io(e)),l(!1)},[e]),m=E.useCallback(()=>{const b=parseFloat(c);n3(b,o,s)?(t(b),l(!1)):d()},[c,o,s,t,d]),h=E.useCallback(b=>{const x=b.target.value;if(!t3(x))return;if(x===""||x==="."){u(x);return}const y=parseFloat(x);!isNaN(y)&&y>s||u(x)},[s]),v=E.useCallback(b=>{switch(b.key){case"Enter":b.preventDefault(),m();break;case"Escape":b.preventDefault(),d();break}},[m,d]),g=E.useCallback(()=>{m()},[m]);return a.jsxs("div",{className:S("flex items-center justify-between",n),children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground",id:"slippage-label",children:r}),a.jsxs("div",{className:"flex items-center gap-1",children:[i?a.jsx("input",{type:"text",value:c,onChange:h,onKeyDown:v,onBlur:g,className:S(e3,"text-xs text-right bg-transparent border-none outline-none","text-foreground focus:ring-0 focus:outline-none"),"aria-labelledby":"slippage-label","aria-describedby":"slippage-range",autoFocus:!0,autoComplete:"off",spellCheck:!1}):a.jsxs("span",{className:"text-xs font-medium text-foreground","aria-live":"polite",children:[e,"%"]}),a.jsx("button",{onClick:f,className:S("p-1 hover:bg-muted rounded transition-colors","text-muted-foreground hover:text-foreground","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-label":`Edit slippage value. Current value: ${e}%`,type:"button",children:a.jsx(Mw,{size:JN})})]}),a.jsxs("span",{id:"slippage-range",className:"sr-only",children:["Enter a value between ",o,"% and ",s,"%"]})]})}const r3=({tabs:e,defaultValue:t,value:n,onValueChange:r,layout:o,className:s})=>{const[i,l]=E.useState(t||n||e.find(m=>!m.disabled)?.value||e[0]?.value),c=n??i,u=m=>{n===void 0&&l(m),r?.(m)},f=E.useMemo(()=>e.find(m=>m.value===c)?.content,[c,e]),d=E.useMemo(()=>o?o(f):a.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:f}),[f,o]);return a.jsxs("div",{className:S("flex flex-col",s),children:[a.jsx(hl,{variant:"menuBar",activeValue:c,className:"mb-2",children:e.map(m=>a.jsx(gl,{value:m.value,active:m.value===c,onClick:()=>!m.disabled&&u(m.value),disabled:m.disabled,variant:"menuBarDefault",children:m.label},m.value))}),d]})},Yc=({groups:e,renderItem:t,filterFn:n,getItemKey:r,className:o,groupClassName:s,itemClassName:i,showGroupHeaders:l=!0,emptyState:c=a.jsx("div",{className:"text-muted-foreground py-8 text-center",children:"No items found"})})=>{const u=E.useMemo(()=>e.map(d=>({...d,items:n?d.items.filter(n):d.items})).filter(d=>d.items.length>0),[e,n]);return u.some(d=>d.items.length>0)?a.jsx("div",{className:S("mb-5 space-y-5 px-2.5",o),children:u.map(d=>a.jsxs("div",{className:S("space-y-2",s),children:[l&&d.title&&a.jsx(nt,{icon:d.icon,textSize:"sm",iconSize:"base",children:d.title}),a.jsx("div",{className:"space-y-1",children:d.items.map((m,h)=>a.jsx("div",{className:S("rounded-lg transition-colors",i),children:t(m)},r?r(m):`${d.id}-${h}`))})]},d.id))}):a.jsx("div",{className:o,children:c})},Tb=({icon:e,symbol:t,name:n,balance:r,balanceUSD:o,onClick:s,className:i})=>a.jsxs("div",{onClick:s,className:S("flex cursor-pointer items-center justify-between rounded-lg px-3.5 py-2.5 transition-colors","hover:bg-secondary",i),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-xl",children:e}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium",children:t}),a.jsx("div",{className:"text-muted-foreground text-xs",children:n})]})]}),a.jsxs("div",{className:"text-right",children:[a.jsx("div",{className:"text-sm font-medium",children:r}),a.jsxs("div",{className:"text-muted-foreground text-xs",children:["(",o,")"]})]})]});/**
|
|
183
|
+
* table-core
|
|
184
|
+
*
|
|
185
|
+
* Copyright (c) TanStack
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the MIT license found in the
|
|
188
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
189
|
+
*
|
|
190
|
+
* @license MIT
|
|
191
|
+
*/function Bt(e,t){return typeof e=="function"?e(t):e}function Ye(e,t){return n=>{t.setState(r=>({...r,[e]:Bt(n,r[e])}))}}function ai(e){return e instanceof Function}function o3(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function s3(e,t){const n=[],r=o=>{o.forEach(s=>{n.push(s);const i=t(s);i!=null&&i.length&&r(i)})};return r(e),n}function oe(e,t,n){let r=[],o;return s=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(s);if(!(l.length!==r.length||l.some((f,d)=>r[d]!==f)))return o;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...l),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,m=d/16,h=(v,g)=>{for(v=String(v);v.length<g;)v=" "+v;return v};console.info(`%c⏱ ${h(d,5)} /${h(f,5)} ms`,`
|
|
192
|
+
font-size: .6rem;
|
|
193
|
+
font-weight: bold;
|
|
194
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n?.key)}return o}}function se(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function i3(e,t,n,r){const o=()=>{var i;return(i=s.getValue())!=null?i:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:oe(()=>[e,n,t,s],(i,l,c,u)=>({table:i,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),se(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(s,n,t,e)},{}),s}function a3(e,t,n,r){var o,s;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let u=(o=(s=l.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:c&&(c.includes(".")?f=m=>{let h=m;for(const g of c.split(".")){var v;h=(v=h)==null?void 0:v[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${c}" returned undefined.`)}return h}:f=m=>m[l.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(u)}`,accessorFn:f,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:oe(()=>[!0],()=>{var m;return[d,...(m=d.columns)==null?void 0:m.flatMap(h=>h.getFlatColumns())]},se(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:oe(()=>[e._getOrderColumnsFn()],m=>{var h;if((h=d.columns)!=null&&h.length){let v=d.columns.flatMap(g=>g.getLeafColumns());return m(v)}return[d]},se(e.options,"debugColumns","column.getLeafColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(d,e);return d}const Fe="debugHeaders";function bf(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(s),i},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(s,e)}),s}const l3={createTable:e=>{e.getHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var s,i;const l=(s=r?.map(d=>n.find(m=>m.id===d)).filter(Boolean))!=null?s:[],c=(i=o?.map(d=>n.find(m=>m.id===d)).filter(Boolean))!=null?i:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Do(t,[...l,...u,...c],e)},se(e.options,Fe,"getHeaderGroups")),e.getCenterHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),Do(t,n,e,"center")),se(e.options,Fe,"getCenterHeaderGroups")),e.getLeftHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const s=(o=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return Do(t,s,e,"left")},se(e.options,Fe,"getLeftHeaderGroups")),e.getRightHeaderGroups=oe(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const s=(o=r?.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return Do(t,s,e,"right")},se(e.options,Fe,"getRightHeaderGroups")),e.getFooterGroups=oe(()=>[e.getHeaderGroups()],t=>[...t].reverse(),se(e.options,Fe,"getFooterGroups")),e.getLeftFooterGroups=oe(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),se(e.options,Fe,"getLeftFooterGroups")),e.getCenterFooterGroups=oe(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),se(e.options,Fe,"getCenterFooterGroups")),e.getRightFooterGroups=oe(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),se(e.options,Fe,"getRightFooterGroups")),e.getFlatHeaders=oe(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,Fe,"getFlatHeaders")),e.getLeftFlatHeaders=oe(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,Fe,"getLeftFlatHeaders")),e.getCenterFlatHeaders=oe(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,Fe,"getCenterFlatHeaders")),e.getRightFlatHeaders=oe(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),se(e.options,Fe,"getRightFlatHeaders")),e.getCenterLeafHeaders=oe(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),se(e.options,Fe,"getCenterLeafHeaders")),e.getLeftLeafHeaders=oe(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),se(e.options,Fe,"getLeftLeafHeaders")),e.getRightLeafHeaders=oe(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),se(e.options,Fe,"getRightLeafHeaders")),e.getLeafHeaders=oe(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,s,i,l,c,u;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(f=>f.getLeafHeaders()).flat()},se(e.options,Fe,"getLeafHeaders"))}};function Do(e,t,n,r){var o,s;let i=0;const l=function(m,h){h===void 0&&(h=1),i=Math.max(i,h),m.filter(v=>v.getIsVisible()).forEach(v=>{var g;(g=v.columns)!=null&&g.length&&l(v.columns,h+1)},0)};l(e);let c=[];const u=(m,h)=>{const v={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];m.forEach(b=>{const x=[...g].reverse()[0],y=b.column.depth===v.depth;let w,C=!1;if(y&&b.column.parent?w=b.column.parent:(w=b.column,C=!0),x&&x?.column===w)x.subHeaders.push(b);else{const R=bf(n,w,{id:[r,h,w.id,b?.id].filter(Boolean).join("_"),isPlaceholder:C,placeholderId:C?`${g.filter(P=>P.column===w).length}`:void 0,depth:h,index:g.length});R.subHeaders.push(b),g.push(R)}v.headers.push(b),b.headerGroup=v}),c.push(v),h>0&&u(g,h-1)},f=t.map((m,h)=>bf(n,m,{depth:i,index:h}));u(f,i-1),c.reverse();const d=m=>m.filter(v=>v.column.getIsVisible()).map(v=>{let g=0,b=0,x=[0];v.subHeaders&&v.subHeaders.length?(x=[],d(v.subHeaders).forEach(w=>{let{colSpan:C,rowSpan:R}=w;g+=C,x.push(R)})):g=1;const y=Math.min(...x);return b=b+y,v.colSpan=g,v.rowSpan=b,{colSpan:g,rowSpan:b}});return d((o=(s=c[0])==null?void 0:s.headers)!=null?o:[]),c}const c3=(e,t,n,r,o,s,i)=>{let l={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>s3(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const f=u.getParentRow();if(!f)break;c.push(f),u=f}return c.reverse()},getAllCells:oe(()=>[e.getAllLeafColumns()],c=>c.map(u=>i3(e,l,u,u.id)),se(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:oe(()=>[l.getAllCells()],c=>c.reduce((u,f)=>(u[f.column.id]=f,u),{}),se(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},u3={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Pb=(e,t,n)=>{var r,o;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};Pb.autoRemove=e=>ut(e);const _b=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};_b.autoRemove=e=>ut(e);const Mb=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Mb.autoRemove=e=>ut(e);const Ab=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ab.autoRemove=e=>ut(e);const Nb=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Nb.autoRemove=e=>ut(e)||!(e!=null&&e.length);const kb=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});kb.autoRemove=e=>ut(e)||!(e!=null&&e.length);const Ib=(e,t,n)=>e.getValue(t)===n;Ib.autoRemove=e=>ut(e);const Db=(e,t,n)=>e.getValue(t)==n;Db.autoRemove=e=>ut(e);const Xc=(e,t,n)=>{let[r,o]=n;const s=e.getValue(t);return s>=r&&s<=o};Xc.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(s>i){const l=s;s=i,i=l}return[s,i]};Xc.autoRemove=e=>ut(e)||ut(e[0])&&ut(e[1]);const Tt={includesString:Pb,includesStringSensitive:_b,equalsString:Mb,arrIncludes:Ab,arrIncludesAll:Nb,arrIncludesSome:kb,equals:Ib,weakEquals:Db,inNumberRange:Xc};function ut(e){return e==null||e===""}const d3={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ye("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Tt.includesString:typeof r=="number"?Tt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Tt.equals:Array.isArray(r)?Tt.arrIncludes:Tt.weakEquals},e.getFilterFn=()=>{var n,r;return ai(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Tt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),s=r?.find(f=>f.id===e.id),i=Bt(n,s?s.value:void 0);if(yf(o,i,e)){var l;return(l=r?.filter(f=>f.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(s){var u;return(u=r?.map(f=>f.id===e.id?c:f))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var s;return(s=Bt(t,o))==null?void 0:s.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(yf(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function yf(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const f3=(e,t,n)=>n.reduce((r,o)=>{const s=o.getValue(e);return r+(typeof s=="number"?s:0)},0),p3=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},m3=(e,t,n)=>{let r;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},h3=(e,t,n)=>{let r,o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},g3=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},v3=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!o3(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,i)=>s-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},x3=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),b3=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,y3=(e,t)=>t.length,Wi={sum:f3,min:p3,max:m3,extent:h3,mean:g3,median:v3,unique:x3,uniqueCount:b3,count:y3},w3={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ye("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return Wi.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Wi.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ai(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Wi[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function C3(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(i=>i.id===s)).filter(Boolean),...r]}const S3={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ye("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=oe(n=>[kr(t,n)],n=>n.findIndex(r=>r.id===e.id),se(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=kr(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=kr(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=oe(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const i=[...t],l=[...o];for(;l.length&&i.length;){const c=i.shift(),u=l.findIndex(f=>f.id===c);u>-1&&s.push(l.splice(u,1)[0])}s=[...s,...l]}return C3(s,n,r)},se(e.options,"debugTable","_getOrderColumnsFn"))}},Ki=()=>({left:[],right:[]}),R3={getInitialState:e=>({columnPinning:Ki(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ye("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,i;if(n==="right"){var l,c;return{left:((l=o?.left)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((c=o?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,f;return{left:[...((u=o?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((f=o?.right)!=null?f:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=o?.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=o?.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,s,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=t.getState().columnPinning,s=n.some(l=>r?.includes(l)),i=n.some(l=>o?.includes(l));return s?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(i=>!s.includes(i.column.id))},se(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),se(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=oe(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),se(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Ki():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Ki())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),se(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),se(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=oe(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(s=>!o.includes(s.id))},se(e.options,"debugColumns","getCenterLeafColumns"))}};function j3(e){return e||(typeof document<"u"?document:null)}const Lo={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},qi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),E3={getDefaultColumnDef:()=>Lo,getInitialState:e=>({columnSizing:{},columnSizingInfo:qi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ye("columnSizing",e),onColumnSizingInfoChange:Ye("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Lo.minSize,(r=s??e.columnDef.size)!=null?r:Lo.size),(o=e.columnDef.maxSize)!=null?o:Lo.maxSize)},e.getStart=oe(n=>[n,kr(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),se(t.options,"debugColumns","getStart")),e.getAfter=oe(n=>[n,kr(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),se(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),Yi(s)&&s.touches&&s.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],c=Yi(s)?Math.round(s.touches[0].clientX):s.clientX,u={},f=(x,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(w=>{var C,R;const P=t.options.columnResizeDirection==="rtl"?-1:1,T=(y-((C=w?.startOffset)!=null?C:0))*P,j=Math.max(T/((R=w?.startSize)!=null?R:0),-.999999);return w.columnSizingStart.forEach(M=>{let[D,z]=M;u[D]=Math.round(Math.max(z+z*j,0)*100)/100}),{...w,deltaOffset:T,deltaPercentage:j}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(w=>({...w,...u})))},d=x=>f("move",x),m=x=>{f("end",x),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=j3(n),v={moveHandler:x=>d(x.clientX),upHandler:x=>{h?.removeEventListener("mousemove",v.moveHandler),h?.removeEventListener("mouseup",v.upHandler),m(x.clientX)}},g={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),d(x.touches[0].clientX),!1),upHandler:x=>{var y;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),m((y=x.touches[0])==null?void 0:y.clientX)}},b=T3()?{passive:!1}:!1;Yi(s)?(h?.addEventListener("touchmove",g.moveHandler,b),h?.addEventListener("touchend",g.upHandler,b)):(h?.addEventListener("mousemove",v.moveHandler,b),h?.addEventListener("mouseup",v.upHandler,b)),t.setColumnSizingInfo(x=>({...x,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?qi():(n=e.initialState.columnSizingInfo)!=null?n:qi())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Oo=null;function T3(){if(typeof Oo=="boolean")return Oo;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Oo=e,Oo}function Yi(e){return e.type==="touchstart"}const P3={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ye("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=oe(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),se(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=oe(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],se(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>oe(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),se(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function kr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const _3={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},M3={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ye("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Tt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ai(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Tt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},A3={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ye("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,s;e.setExpanded(r?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const i=s.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const s=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(o=n)!=null?o:!s,!s&&n)return{...i,[e.id]:!0};if(s&&!n){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},nl=0,rl=10,Xi=()=>({pageIndex:nl,pageSize:rl}),N3={getInitialState:e=>({...e,pagination:{...Xi(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ye("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=s=>Bt(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Xi():(o=e.initialState.pagination)!=null?o:Xi())},e.setPageIndex=r=>{e.setPagination(o=>{let s=Bt(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...o,pageIndex:s}})},e.resetPageIndex=r=>{var o,s;e.setPageIndex(r?nl:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:nl)},e.resetPageSize=r=>{var o,s;e.setPageSize(r?rl:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:rl)},e.setPageSize=r=>{e.setPagination(o=>{const s=Math.max(1,Bt(r,o.pageSize)),i=o.pageSize*o.pageIndex,l=Math.floor(i/s);return{...o,pageIndex:l,pageSize:s}})},e.setPageCount=r=>e.setPagination(o=>{var s;let i=Bt(r,(s=e.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=oe(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,i)=>i)),o},se(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Zi=()=>({top:[],bottom:[]}),k3={getInitialState:e=>({rowPinning:Zi(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ye("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],i=o?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...i,e.id,...s]);t.setRowPinning(c=>{var u,f;if(n==="bottom"){var d,m;return{top:((d=c?.top)!=null?d:[]).filter(g=>!(l!=null&&l.has(g))),bottom:[...((m=c?.bottom)!=null?m:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)]}}if(n==="top"){var h,v;return{top:[...((h=c?.top)!=null?h:[]).filter(g=>!(l!=null&&l.has(g))),...Array.from(l)],bottom:((v=c?.bottom)!=null?v:[]).filter(g=>!(l!=null&&l.has(g)))}}return{top:((u=c?.top)!=null?u:[]).filter(g=>!(l!=null&&l.has(g))),bottom:((f=c?.bottom)!=null?f:[]).filter(g=>!(l!=null&&l.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,s=n.some(l=>r?.includes(l)),i=n.some(l=>o?.includes(l));return s?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=s?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Zi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Zi())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),se(e.options,"debugRows","getTopRows")),e.getBottomRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),se(e.options,"debugRows","getBottomRows")),e.getCenterRows=oe(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(s=>!o.has(s.id))},se(e.options,"debugRows","getCenterRows"))}},I3={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ye("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{ol(o,s.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Qi(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Qi(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=oe(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Qi(e,n):{rows:[],flatRows:[],rowsById:{}},se(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(s=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const l={...s};return ol(l,e.id,n,(i=r?.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Zc(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return sl(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return sl(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},ol=(e,t,n,r,o)=>{var s;const i=o.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>ol(e,l.id,n,r,o))};function Qi(e,t){const n=e.getState().rowSelection,r=[],o={},s=function(i,l){return i.map(c=>{var u;const f=Zc(c,n);if(f&&(r.push(c),o[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),f)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:o}}function Zc(e,t){var n;return(n=t[e.id])!=null?n:!1}function sl(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return e.subRows.forEach(i=>{if(!(s&&!o)&&(i.getCanSelect()&&(Zc(i,t)?s=!0:o=!1),i.subRows&&i.subRows.length)){const l=sl(i,t);l==="all"?s=!0:(l==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const il=/([0-9]+)/gm,D3=(e,t,n)=>Lb(Zt(e.getValue(n)).toLowerCase(),Zt(t.getValue(n)).toLowerCase()),L3=(e,t,n)=>Lb(Zt(e.getValue(n)),Zt(t.getValue(n))),O3=(e,t,n)=>Qc(Zt(e.getValue(n)).toLowerCase(),Zt(t.getValue(n)).toLowerCase()),F3=(e,t,n)=>Qc(Zt(e.getValue(n)),Zt(t.getValue(n))),$3=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},V3=(e,t,n)=>Qc(e.getValue(n),t.getValue(n));function Qc(e,t){return e===t?0:e>t?1:-1}function Zt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Lb(e,t){const n=e.split(il).filter(Boolean),r=t.split(il).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),i=parseInt(o,10),l=parseInt(s,10),c=[i,l].sort();if(isNaN(c[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const jr={alphanumeric:D3,alphanumericCaseSensitive:L3,text:O3,textCaseSensitive:F3,datetime:$3,basic:V3},B3={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ye("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return jr.datetime;if(typeof s=="string"&&(r=!0,s.split(il).length>1))return jr.alphanumeric}return r?jr.text:jr.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ai(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:jr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i?.find(h=>h.id===e.id),c=i?.findIndex(h=>h.id===e.id);let u=[],f,d=s?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?f="toggle":f="add":i!=null&&i.length&&c!==i.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(s||o||(f="remove")),f==="add"){var m;u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else f==="toggle"?u=i.map(h=>h.id===e.id?{...h,desc:d}:h):f==="remove"?u=i.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const s=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},z3=[l3,P3,S3,R3,u3,d3,_3,M3,B3,w3,A3,N3,k3,I3,E3];function H3(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...z3,...(t=e._features)!=null?t:[]];let o={_features:r};const s=o._features.reduce((m,h)=>Object.assign(m,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),i=m=>o.options.mergeOptions?o.options.mergeOptions(s,m):{...s,...m};let c={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(m=>{var h;c=(h=m.getInitialState==null?void 0:m.getInitialState(c))!=null?h:c});const u=[];let f=!1;const d={_features:r,options:{...s,...e},initialState:c,_queue:m=>{u.push(m),f||(f=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();f=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:m=>{const h=Bt(m,o.options);o.options=i(h)},getState:()=>o.options.state,setState:m=>{o.options.onStateChange==null||o.options.onStateChange(m)},_getRowId:(m,h,v)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(m,h,v))!=null?g:`${v?[v.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(m,h)=>{let v=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[m];if(!v&&(v=o.getCoreRowModel().rowsById[m],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${m}`):new Error;return v},_getDefaultColumnDef:oe(()=>[o.options.defaultColumn],m=>{var h;return m=(h=m)!=null?h:{},{header:v=>{const g=v.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:v=>{var g,b;return(g=(b=v.renderValue())==null||b.toString==null?void 0:b.toString())!=null?g:null},...o._features.reduce((v,g)=>Object.assign(v,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...m}},se(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:oe(()=>[o._getColumnDefs()],m=>{const h=function(v,g,b){return b===void 0&&(b=0),v.map(x=>{const y=a3(o,x,b,g),w=x;return y.columns=w.columns?h(w.columns,y,b+1):[],y})};return h(m)},se(e,"debugColumns","getAllColumns")),getAllFlatColumns:oe(()=>[o.getAllColumns()],m=>m.flatMap(h=>h.getFlatColumns()),se(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:oe(()=>[o.getAllFlatColumns()],m=>m.reduce((h,v)=>(h[v.id]=v,h),{}),se(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:oe(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(m,h)=>{let v=m.flatMap(g=>g.getLeafColumns());return h(v)},se(e,"debugColumns","getAllLeafColumns")),getColumn:m=>{const h=o._getAllFlatColumnsById()[m];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${m}' does not exist.`),h}};Object.assign(o,d);for(let m=0;m<o._features.length;m++){const h=o._features[m];h==null||h.createTable==null||h.createTable(o)}return o}function G3(){return e=>oe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,i){s===void 0&&(s=0);const l=[];for(let u=0;u<o.length;u++){const f=c3(e,e._getRowId(o[u],u,i),o[u],u,s,void 0,i?.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var c;f.originalSubRows=e.options.getSubRows(o[u],u),(c=f.originalSubRows)!=null&&c.length&&(f.subRows=r(f.originalSubRows,s+1,f))}}return l};return n.rows=r(t),n},se(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function U3(){return e=>oe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],s=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),i={};s.forEach(c=>{const u=e.getColumn(c.id);u&&(i[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(f=>({...f}));return u.sort((f,d)=>{for(let h=0;h<s.length;h+=1){var m;const v=s[h],g=i[v.id],b=g.sortUndefined,x=(m=v?.desc)!=null?m:!1;let y=0;if(b){const w=f.getValue(v.id),C=d.getValue(v.id),R=w===void 0,P=C===void 0;if(R||P){if(b==="first")return R?-1:1;if(b==="last")return R?1:-1;y=R&&P?0:R?b:-b}}if(y===0&&(y=g.sortingFn(f,d,v.id)),y!==0)return x&&(y*=-1),g.invertSorting&&(y*=-1),y}return f.index-d.index}),u.forEach(f=>{var d;o.push(f),(d=f.subRows)!=null&&d.length&&(f.subRows=l(f.subRows))}),u};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},se(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
195
|
+
* react-table
|
|
196
|
+
*
|
|
197
|
+
* Copyright (c) TanStack
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the MIT license found in the
|
|
200
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
201
|
+
*
|
|
202
|
+
* @license MIT
|
|
203
|
+
*/function wf(e,t){return e?W3(e)?p.createElement(e,t):e:null}function W3(e){return K3(e)||typeof e=="function"||q3(e)}function K3(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function q3(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Y3(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:H3(t)})),[r,o]=p.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}function X3({columns:e,data:t,initialSorting:n=[]}){const[r,o]=E.useState(n),[s,i]=E.useState({}),l=Y3({data:t,columns:e,getCoreRowModel:G3(),onSortingChange:o,getSortedRowModel:U3(),onRowSelectionChange:i,state:{sorting:r,rowSelection:s}});return a.jsxs(vv,{children:[a.jsx(xv,{children:l.getHeaderGroups().map(c=>a.jsx(qo,{children:c.headers.map(u=>a.jsx(yv,{children:u.isPlaceholder?null:wf(u.column.columnDef.header,u.getContext())},u.id))},c.id))}),a.jsx(bv,{children:l.getRowModel().rows?.length?l.getRowModel().rows.map(c=>a.jsx(qo,{"data-state":c.getIsSelected()&&"selected",children:c.getVisibleCells().map(u=>a.jsx(Va,{children:wf(u.column.columnDef.cell,u.getContext())},u.id))},c.id)):a.jsx(qo,{children:a.jsx(Va,{colSpan:e.length,className:"text-muted-foreground h-24 text-center",children:"No results."})})})]})}const Ob=({value:e,onChange:t,debounce:n=300,...r})=>{const[o,s]=p.useState(e),i=l=>s(l.target.value);return p.useEffect(()=>{s(e)},[e]),p.useEffect(()=>{const l=setTimeout(()=>{t(o)},n);return()=>clearTimeout(l)},[o]),a.jsxs("div",{className:"border-border relative rounded-full border",children:[a.jsx(vr,{value:o,onChange:i,className:"-my-px h-9 max-w-sm md:max-w-md",...r}),a.jsx("button",{type:"button",className:"bg-border border-border absolute inset-y-0 right-0 flex aspect-square h-full items-center justify-center rounded rounded-full",children:a.jsx(bp,{className:"text-primary size-3"})})]})};function Z3({children:e,sidebarSlot:t,sidebarFooter:n,topSlot:r,items:o,linkComponent:s}){return a.jsxs(rb,{children:[a.jsx(Fb,{items:o,sidebarFooter:n,sidebarSlot:t,linkComponent:s}),a.jsx($b,{topSlot:r,children:e})]})}function Fb({items:e,sidebarSlot:t,sidebarFooter:n,linkComponent:r="a"}){return a.jsxs(ob,{children:[a.jsx(ib,{children:a.jsxs("div",{className:"border-gradient-white border-opacity-20 relative h-[72px] w-full rounded-full shadow",children:[a.jsx(kg,{className:"absolute -top-2 -left-2 aspect-square h-[86px]"}),a.jsxs("div",{className:"text-primary mt-2 -space-y-1.5 pl-20",children:[a.jsx("div",{className:"text-3xl leading-tight font-bold",children:"Turtle"}),a.jsx("div",{className:"pl-1 text-sm font-medium",children:"Partner Portal"})]})]})}),a.jsxs(lb,{children:[a.jsx(Ja,{children:a.jsx(cb,{children:a.jsx(ub,{children:e.map(o=>o?.children?.length?a.jsx(bb,{className:"group/collapsible",children:a.jsxs(el,{children:[a.jsx(yb,{asChild:!0,children:a.jsxs(tl,{children:[o.icon&&a.jsx(o.icon,{}),a.jsx("span",{className:"grow",children:o.title}),a.jsx(xp,{className:"transition-all group-data-[state=open]/collapsible:rotate-90"})]})}),a.jsx(wb,{children:a.jsx(fb,{children:o.children.map(s=>a.jsx(pb,{children:a.jsx(mb,{asChild:!0,isActive:s.isActive,children:a.jsxs(r,{href:s.url,children:[s.icon&&a.jsx(s.icon,{}),a.jsx("span",{className:"grow",children:s.title}),a.jsx("div",{className:"relative size-[18px] shrink-0 group-data-[active=false]/menu-sub-button:hidden",children:a.jsx(Zn,{className:"text-primary absolute top-[-15px] left-[-15px] size-12"})})]})})},s.title))})})]})}):a.jsx(el,{children:a.jsx(tl,{asChild:!0,isActive:o.isActive,children:a.jsxs(r,{href:o.url,children:[o.icon&&a.jsx(o.icon,{}),a.jsx("span",{className:"grow",children:o.title}),a.jsx("div",{className:"relative size-[18px] shrink-0 group-data-[active=false]/menu-button:hidden",children:a.jsx(Zn,{className:"text-primary absolute top-[-15px] left-[-15px] size-12"})})]})})},o.title))})})}),a.jsx("span",{className:"grow"}),a.jsx(Ja,{children:t})]}),a.jsx(ab,{children:n})]})}function $b({children:e,topSlot:t}){const{state:n,isMobile:r}=br();return a.jsxs("div",{className:S("fixed inset-0 flex h-svh flex-col items-stretch gap-1 py-2 pr-2",n==="collapsed"||r?"pl-2":"left-64"),children:[a.jsxs("div",{className:"flex gap-1",children:[a.jsx(sb,{className:"bg-background border-border !rounded-sm"}),t]}),a.jsx("main",{className:S("bg-background border-border max-h-[96svh] grow overflow-y-auto rounded-lg border p-6"),children:e})]})}function Q3({icon:e,title:t,description:n,action:r}){return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{children:e}),a.jsxs("div",{className:"grow",children:[a.jsx(g0,{children:t}),a.jsx(v0,{children:n})]}),r]})}const Jc=({filters:e,activeFilters:t,onFiltersChange:n,variant:r="badge",multipleFilters:o=!0,showSearch:s=!0,searchValue:i="",onSearchChange:l,searchPlaceholder:c="Search tokens...",searchDebounceDelay:u=300})=>{const f=E.useCallback(d=>{if(r==="badge"&&o){const m=t.includes(d)?t.filter(h=>h!==d):[...t,d];n(m)}else{const m=t.includes(d)&&t.length===1?[]:[d];n(m)}},[t,n,r,o]);return a.jsxs("div",{className:"space-y-3",children:[s&&l&&a.jsx(Ob,{value:i,onChange:l,placeholder:c,debounce:u}),e.length>0&&a.jsx(a.Fragment,{children:r==="badge"?a.jsx("div",{className:"flex flex-wrap gap-2 px-2",children:e.map(d=>a.jsxs(Gr,{variant:t.includes(d.id)?"default":"muted",className:"bg-muted cursor-pointer rounded-full",onClick:()=>f(d.id),children:[d.icon&&a.jsx("span",{className:"mr-1",children:d.icon}),d.label]},d.id))}):a.jsx(bx,{variant:"segment",className:"w-full",value:t[0],onChange:d=>f(d),items:e.map(d=>({value:d.id,label:d.label}))})})]})};function J3({assets:e,searchQuery:t,activeFilterIds:n,filters:r}){return E.useMemo(()=>{let o=e;if(t){const s=t.toLowerCase();o=o.filter(i=>i.symbol.toLowerCase().includes(s)||i.name.toLowerCase().includes(s)||i.address?.toLowerCase().includes(s))}if(n.length>0){const s=r.filter(i=>n.includes(i.id)).map(i=>i.filterFn);o=o.filter(i=>s.every(l=>l(i)))}return o},[e,t,n,r])}const ek={1:"https://storage.googleapis.com/turtle-assets/tokens/eth.png",747474:"https://storage.googleapis.com/turtle-assets/partners/polygon/katana.svg"};function tk({assets:e,groupByChain:t}){return E.useMemo(()=>{const n=[...e].sort((s,i)=>{const l=parseFloat(s.balanceUSD.replace(/[$,]/g,"")||"0");return parseFloat(i.balanceUSD.replace(/[$,]/g,"")||"0")-l});if(!t)return[{id:"all-assets",items:n}];const r=n.reduce((s,i)=>(s[i.chainId]||(s[i.chainId]={id:i.chainId,title:i.chainName,icon:ek[Number(i.chainId)],items:[]}),s[i.chainId].items.push(i),s),{});console.log("chainGroups",r);const o=Object.values(r);return o.sort((s,i)=>{const l=s.items.length>0?parseFloat(s.items[0].balanceUSD.replace(/[$,]/g,"")||"0"):0,c=i.items.length>0?parseFloat(i.items[0].balanceUSD.replace(/[$,]/g,"")||"0"):0;if(l===c){const u=s.items.filter(d=>parseFloat(d.balance)>0).length;return i.items.filter(d=>parseFloat(d.balance)>0).length-u}return c-l}),o},[e,t])}const nk=[{id:"all",label:"All",filterFn:e=>parseFloat(e.balance)>0},{id:"stablecoins",label:"Stables",filterFn:e=>["USDC","USDT","DAI","USD"].includes(e.symbol.toUpperCase())||["USDC","USDT","DAI","USD"].includes(e.name.toUpperCase())},{id:"eth",label:"ETH",filterFn:e=>["ETH"].includes(e.symbol.toUpperCase())||["ETH"].includes(e.name.toUpperCase())},{id:"btc",label:"BTC",filterFn:e=>["BTC"].includes(e.symbol.toUpperCase())||["BTC"].includes(e.name.toUpperCase())}],rk=({assets:e,onAssetClick:t,groupByChain:n=!0,showChainIcon:r=!1,filters:o=nk,filterVariant:s="badge",multipleFilters:i=!1,showSearch:l=!0,searchPlaceholder:c="Search tokens...",searchDebounceDelay:u=300,className:f,itemClassName:d,emptyState:m})=>{const[h,v]=E.useState(""),[g,b]=E.useState(["all"]),x=J3({assets:e,searchQuery:h,activeFilterIds:g,filters:o}),y=tk({assets:x,groupByChain:n}),w=C=>a.jsx(Tb,{icon:r&&C.chainIcon?a.jsxs("div",{className:"relative",children:[C.icon,a.jsx("div",{className:"bg-background border-border absolute -right-1 -bottom-1 flex h-4 w-4 items-center justify-center rounded-full border",children:C.chainIcon})]}):C.icon,symbol:C.symbol,name:C.name,balance:C.balance,balanceUSD:C.balanceUSD,onClick:()=>t?.(C),className:d});return a.jsxs("div",{className:S("flex h-full flex-col",f),children:[a.jsx("div",{className:"mb-4 flex-shrink-0",children:a.jsx(Jc,{filters:o.map(({filterFn:C,...R})=>R),activeFilters:g,onFiltersChange:b,variant:s,multipleFilters:i,showSearch:l,searchValue:h,onSearchChange:v,searchPlaceholder:c,searchDebounceDelay:u})}),a.jsx(si,{className:"flex-1",children:a.jsx(Yc,{groups:y,renderItem:w,getItemKey:C=>C.id,showGroupHeaders:n,emptyState:m||a.jsx("div",{className:"text-muted-foreground py-8 text-center",children:h||g.length>0?"No assets match your filters":"No assets available"})})})]})},po=p.forwardRef(({className:e,onSelect:t,selected:n=!1,children:r,...o},s)=>a.jsx(dt,{ref:s,variant:"border",gradient:"white",className:S("bg-background w-full cursor-pointer p-4 transition-all duration-200 hover:shadow-md",n&&"ring-primary ring-2 ring-offset-2",e),onClick:t,...o,children:a.jsx("div",{className:"flex flex-col gap-2",children:r})}));po.displayName="WidgetItem";const mo=p.forwardRef(({className:e,children:t,...n},r)=>a.jsx("div",{ref:r,className:S("flex items-start justify-between gap-4",e),...n,children:t}));mo.displayName="WidgetItemTop";const ho=p.forwardRef(({className:e,children:t,...n},r)=>a.jsx("div",{ref:r,className:S("flex items-end justify-between gap-4",e),...n,children:t}));ho.displayName="WidgetItemBottom";const Qt=p.forwardRef(({className:e,children:t,...n},r)=>a.jsx("div",{ref:r,className:S("flex min-w-0 flex-1 flex-col items-start justify-start gap-1",e),...n,children:t}));Qt.displayName="WidgetItemLeft";const Jt=p.forwardRef(({className:e,children:t,...n},r)=>a.jsx("div",{ref:r,className:S("flex flex-col items-end justify-between gap-1",e),...n,children:t}));Jt.displayName="WidgetItemRight";const go=p.forwardRef(({className:e,stats:t,separator:n=" | ",...r},o)=>{const s=t.filter(i=>i.value);return s.length===0?null:a.jsx("div",{ref:o,className:S("flex gap-2 text-xs text-muted-foreground",e),...r,children:s.map((i,l)=>a.jsxs(p.Fragment,{children:[l>0&&a.jsx("span",{children:n}),a.jsxs("span",{className:"flex items-center justify-center gap-1",children:[a.jsxs("span",{children:[i.label,": "]}),i.icon?a.jsxs("span",{className:"flex gap-1",children:[i.icon," ",i.value]}):a.jsx("span",{children:i.value})]})]},i.label))})});go.displayName="WidgetItemStats";const eu=p.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,tvl:l,apr:c,incentives:u,chain:f,turtleBoost:d}=e,m=a.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})}),h=p.useMemo(()=>d?[{label:"TVL",value:l||""},{label:"Turtle Boost",value:d,icon:a.jsx(yp,{size:12})}]:[{label:"TVL",value:l||""}],[]);return a.jsxs(po,{ref:o,onSelect:t,selected:n,...r,children:[a.jsxs(mo,{children:[a.jsx(Qt,{children:a.jsx(nt,{icon:s||m,textSize:"base",iconSize:"lg",children:i})}),a.jsx(Jt,{children:c&&a.jsx("span",{className:"text-md font-semibold text-foreground",children:c})})]}),a.jsxs(ho,{children:[a.jsxs(Qt,{children:[f&&a.jsx(Cn,{items:[f],label:"Chains",size:"sm"}),a.jsx(go,{stats:h})]}),a.jsx(Jt,{children:a.jsx("div",{className:"flex flex-col gap-1 items-end",children:u&&a.jsx(Cn,{items:u,label:"Rewards",size:"sm"})})})]})]})});eu.displayName="OpportunityItem";const Vb=p.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,tvl:l,participants:c,aprRange:u,rewards:f,chains:d}=e,m=a.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"})})}),h=[{label:"TVL",value:l},{label:"Participants",value:c||""}];return a.jsxs(po,{ref:o,onSelect:t,selected:n,...r,children:[a.jsxs(mo,{children:[a.jsx(Qt,{children:a.jsx(nt,{icon:s||m,textSize:"base",iconSize:"lg",children:i})}),a.jsx(Jt,{children:a.jsx("span",{className:"text-md font-semibold text-foreground",children:u||"N/A"})})]}),a.jsxs(ho,{children:[a.jsxs(Qt,{children:[d&&a.jsx(Cn,{items:d,label:"Chains",size:"sm"}),a.jsx(go,{stats:h})]}),a.jsx(Jt,{className:"flex flex-col gap-1 items-end",children:f&&a.jsx(Cn,{items:f,label:"Rewards",size:"sm"})})]})]})});Vb.displayName="CampaignItem";const Bb=p.forwardRef(({value:e,onSelect:t,selected:n=!1,...r},o)=>{const{icon:s,name:i,chains:l,tvl:c,turtleBoost:u,category:f}=e,d=a.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})})}),m=p.useMemo(()=>[{label:"TVL",value:c},{label:"Turtle Boost",value:u,icon:a.jsx(yp,{size:12})}],[c,u]);return a.jsxs(po,{ref:o,onSelect:t,selected:n,...r,children:[a.jsxs(mo,{children:[a.jsx(Qt,{children:a.jsx(nt,{icon:s||d,textSize:"base",iconSize:"lg",children:i})}),a.jsx(Jt,{children:a.jsx("span",{className:"text-md font-semibold text-foreground",children:u})})]}),a.jsxs(ho,{children:[a.jsx(Qt,{children:a.jsx(go,{stats:m})}),a.jsx(Jt,{children:l&&a.jsx(Cn,{items:l,label:"Available on",size:"sm"})})]})]})});Bb.displayName="DealItem";const Ht=(e,t,n)=>{const r=document.createElement(e),[o,s]=Array.isArray(t)?[void 0,t]:[t,n];return o&&Object.assign(r,o),s?.forEach(i=>r.appendChild(i)),r},ok=(e,t)=>{var n;return t==="left"?e.offsetLeft:(((n=e.offsetParent instanceof HTMLElement?e.offsetParent:null)==null?void 0:n.offsetWidth)??0)-e.offsetWidth-e.offsetLeft},sk=e=>e.offsetWidth>0&&e.offsetHeight>0,ik=(e,t)=>{!customElements.get(e)&&customElements.define(e,t)};function ak(e,t,{reverse:n=!1}={}){const r=e.length;for(let o=n?r-1:0;n?o>=0:o<r;n?o--:o++)t(e[o],o)}function lk(e,t,n,r){const o=t.formatToParts(e);n&&o.unshift({type:"prefix",value:n}),r&&o.push({type:"suffix",value:r});const s=[],i=[],l=[],c=[],u={},f=g=>`${g}:${u[g]=(u[g]??-1)+1}`;let d="",m=!1,h=!1;for(const g of o){d+=g.value;const b=g.type==="minusSign"||g.type==="plusSign"?"sign":g.type;b==="integer"?(m=!0,i.push(...g.value.split("").map(x=>({type:b,value:parseInt(x)})))):b==="group"?i.push({type:b,value:g.value}):b==="decimal"?(h=!0,l.push({type:b,value:g.value,key:f(b)})):b==="fraction"?l.push(...g.value.split("").map(x=>({type:b,value:parseInt(x),key:f(b),pos:-1-u[b]}))):(m||h?c:s).push({type:b,value:g.value,key:f(b)})}const v=[];for(let g=i.length-1;g>=0;g--){const b=i[g];v.unshift(b.type==="integer"?{...b,key:f(b.type),pos:u[b.type]}:{...b,key:f(b.type)})}return{pre:s,integer:v,fraction:l,post:c,valueAsString:d,value:typeof e=="string"?parseFloat(e):e}}const ck=String.raw,uk=(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),dk=typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),Cf=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,bs="--_number-flow-d-opacity",tu="--_number-flow-d-width",ys="--_number-flow-dx",nu="--_number-flow-d",fk=(()=>{try{return CSS.registerProperty({name:bs,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:ys,syntax:"<length>",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:tu,syntax:"<number>",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:nu,syntax:"<number>",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),pk="var(--number-flow-char-height, 1em)",Vt="var(--number-flow-mask-height, 0.25em)",Sf=`calc(${Vt} / 2)`,al="var(--number-flow-mask-width, 0.5em)",fn=`calc(${al} / var(--scale-x))`,Fo="#000 0, transparent 71%",Rf=ck`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${pk} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${tu}) / var(--width));transform:translateX(var(${ys})) scaleX(var(--scale-x));margin:0 calc(-1 * ${al});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${fn},#000 calc(100% - ${fn}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${Vt},#000 calc(100% - ${Vt}),transparent 100% ),radial-gradient(at bottom right,${Fo}),radial-gradient(at bottom left,${Fo}),radial-gradient(at top left,${Fo}),radial-gradient(at top right,${Fo});-webkit-mask-size:100% calc(100% - ${Vt} * 2),calc(100% - ${fn} * 2) 100%,${fn} ${Vt},${fn} ${Vt},${fn} ${Vt},${fn} ${Vt};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${Sf} ${al};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${ys})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${nu})}.digit__num,.number .section::after{padding:${Sf} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${bs}))}`,mk=HTMLElement,hk=dk&&uk&&fk;let $o;class zb extends mk{constructor(){super(),this.created=!1,this.batched=!1;const{animated:t,...n}=this.constructor.defaultProps;this._animated=this.computedAnimated=t,Object.assign(this,n)}get animated(){return this._animated}set animated(t){var n;this.animated!==t&&(this._animated=t,(n=this.shadowRoot)==null||n.getAnimations().forEach(r=>r.finish()))}set data(t){var n;if(t==null)return;const{pre:r,integer:o,fraction:s,post:i,value:l}=t;if(this.created){const c=this._data;this._data=t,this.computedTrend=typeof this.trend=="function"?this.trend(c.value,l):this.trend,this.computedAnimated=hk&&this._animated&&(!this.respectMotionPreference||!(Cf!=null&&Cf.matches))&&sk(this),(n=this.plugins)==null||n.forEach(u=>{var f;return(f=u.onUpdate)==null?void 0:f.call(u,t,c,this)}),this.batched||this.willUpdate(),this._pre.update(r),this._num.update({integer:o,fraction:s}),this._post.update(i),this.batched||this.didUpdate()}else{this._data=t,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}if(typeof CSSStyleSheet<"u"&&this.shadowRoot.adoptedStyleSheets)$o||($o=new CSSStyleSheet,$o.replaceSync(Rf)),this.shadowRoot.adoptedStyleSheets=[$o];else{const c=document.createElement("style");c.textContent=Rf,this.shadowRoot.appendChild(c)}this._pre=new Ef(this,r,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new gk(this,o,s),this.shadowRoot.appendChild(this._num.el),this._post=new Ef(this,i,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=t.valueAsString}catch{}}willUpdate(){this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate()}didUpdate(){if(!this.computedAnimated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();const t=new AbortController;Promise.all(this.shadowRoot.getAnimations().map(n=>n.finished)).then(()=>{t.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=t}}zb.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(e,t)=>Math.sign(t-e),respectMotionPreference:!0,plugins:void 0,digits:void 0};class gk{constructor(t,n,r,{className:o,...s}={}){this.flow=t,this._integer=new jf(t,n,{justify:"right",part:"integer"}),this._fraction=new jf(t,r,{justify:"left",part:"fraction"}),this._inner=Ht("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=Ht("span",{...s,part:"number",className:`number ${o??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:t,fraction:n}){this._integer.update(t),this._fraction.update(n)}didUpdate(){const t=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();const n=this._prevLeft-t.left,r=this.el.offsetWidth,o=this._prevWidth-r;this.el.style.setProperty("--width",String(r)),this.el.animate({[ys]:[`${n}px`,"0px"],[tu]:[o,0]},{...this.flow.transformTiming,composite:"accumulate"})}}class Hb{constructor(t,n,{justify:r,className:o,...s},i){this.flow=t,this.children=new Map,this.onCharRemove=c=>()=>{this.children.delete(c)},this.justify=r;const l=n.map(c=>this.addChar(c).el);this.el=Ht("span",{...s,className:`section section--justify-${r} ${o??""}`},i?i(l):l)}addChar(t,{startDigitsAtZero:n=!1,...r}={}){const o=t.type==="integer"||t.type==="fraction"?new Ub(this,t.type,n?0:t.value,t.pos,{...r,onRemove:this.onCharRemove(t.key)}):new vk(this,t.type,t.value,{...r,onRemove:this.onCharRemove(t.key)});return this.children.set(t.key,o),o}unpop(t){t.el.removeAttribute("inert"),t.el.style.top="",t.el.style[this.justify]=""}pop(t){t.forEach(n=>{n.el.style.top=`${n.el.offsetTop}px`,n.el.style[this.justify]=`${ok(n.el,this.justify)}px`}),t.forEach(n=>{n.el.setAttribute("inert",""),n.present=!1})}addNewAndUpdateExisting(t){const n=new Map,r=new Map,o=this.justify==="left",s=o?"prepend":"append";if(ak(t,i=>{let l;this.children.has(i.key)?(l=this.children.get(i.key),r.set(i,l),this.unpop(l),l.present=!0):(l=this.addChar(i,{startDigitsAtZero:!0,animateIn:!0}),n.set(i,l)),this.el[s](l.el)},{reverse:o}),this.flow.computedAnimated){const i=this.el.getBoundingClientRect();n.forEach(l=>{l.willUpdate(i)})}n.forEach((i,l)=>{i.update(l.value)}),r.forEach((i,l)=>{i.update(l.value)})}willUpdate(){const t=this.el.getBoundingClientRect();this._prevOffset=t[this.justify],this.children.forEach(n=>n.willUpdate(t))}didUpdate(){const t=this.el.getBoundingClientRect();this.children.forEach(o=>o.didUpdate(t));const n=t[this.justify],r=this._prevOffset-n;r&&this.children.size&&this.el.animate({transform:[`translateX(${r}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}class jf extends Hb{update(t){const n=new Map;this.children.forEach((r,o)=>{t.find(s=>s.key===o)||n.set(o,r),this.unpop(r)}),this.addNewAndUpdateExisting(t),n.forEach(r=>{r instanceof Ub&&r.update(0)}),this.pop(n)}}class Ef extends Hb{update(t){const n=new Map;this.children.forEach((r,o)=>{t.find(s=>s.key===o)||n.set(o,r)}),this.pop(n),this.addNewAndUpdateExisting(t)}}class ll{constructor(t,n,{onRemove:r,animateIn:o=!1}={}){this.flow=t,this.el=n,this._present=!0,this._remove=()=>{var s;this.el.remove(),(s=this._onRemove)==null||s.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&o&&this.el.animate({[bs]:[-.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=r}get present(){return this._present}set present(t){if(this._present!==t){if(this._present=t,t?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){t||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",t?"0":"-.999"),this.el.animate({[bs]:t?[-.9999,0]:[.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),t?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class Gb extends ll{constructor(t,n,r,o){super(t.flow,r,o),this.section=t,this.value=n,this.el=r}}class Ub extends Gb{constructor(t,n,r,o,s){var i,l;const c=(((l=(i=t.flow.digits)==null?void 0:i[o])==null?void 0:l.max)??9)+1,u=Array.from({length:c}).map((d,m)=>{const h=Ht("span",{className:"digit__num"},[document.createTextNode(String(m))]);return m!==r&&h.setAttribute("inert",""),h.style.setProperty("--n",String(m)),h}),f=Ht("span",{part:`digit ${n}-digit`,className:"digit"},u);f.style.setProperty("--current",String(r)),f.style.setProperty("--length",String(c)),super(t,r,f,s),this.pos=o,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=u,this.length=c}willUpdate(t){const n=this.el.getBoundingClientRect();this._prevValue=this.value;const r=n[this.section.justify]-t[this.section.justify],o=n.width/2;this._prevCenter=this.section.justify==="left"?r+o:r-o}update(t){this.el.style.setProperty("--current",String(t)),this._numbers.forEach((n,r)=>r===t?n.removeAttribute("inert"):n.setAttribute("inert","")),this.value=t}didUpdate(t){const n=this.el.getBoundingClientRect(),r=n[this.section.justify]-t[this.section.justify],o=n.width/2,s=this.section.justify==="left"?r+o:r-o,i=this._prevCenter-s;i&&this.el.animate({transform:[`translateX(${i}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});const l=this.getDelta();l&&(this.el.classList.add("is-spinning"),this.el.animate({[nu]:[-l,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var t;if(this.flow.plugins)for(const o of this.flow.plugins){const s=(t=o.getDelta)==null?void 0:t.call(o,this.value,this._prevValue,this);if(s!=null)return s}const n=this.value-this._prevValue,r=this.flow.computedTrend||Math.sign(n);return r<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:r>0&&this.value<this._prevValue?this.length-this._prevValue+this.value:n}}class vk extends Gb{constructor(t,n,r,o){const s=Ht("span",{className:"symbol__value",textContent:r});super(t,r,Ht("span",{part:`symbol ${n}`,className:"symbol"},[s]),o),this.type=n,this._children=new Map,this._onChildRemove=i=>()=>{this._children.delete(i)},this._children.set(r,new ll(this.flow,s,{onRemove:this._onChildRemove(r)}))}willUpdate(t){if(this.type==="decimal")return;const n=this.el.getBoundingClientRect();this._prevOffset=n[this.section.justify]-t[this.section.justify]}update(t){if(this.value!==t){const n=this._children.get(this.value);n&&(n.present=!1);const r=this._children.get(t);if(r)r.present=!0;else{const o=Ht("span",{className:"symbol__value",textContent:t});this.el.appendChild(o),this._children.set(t,new ll(this.flow,o,{animateIn:!0,onRemove:this._onChildRemove(t)}))}}this.value=t}didUpdate(t){if(this.type==="decimal")return;const n=this.el.getBoundingClientRect()[this.section.justify]-t[this.section.justify],r=this._prevOffset-n;r&&this.el.animate({transform:[`translateX(${r}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}const xk=parseInt(p.version.match(/^(\d+)\./)?.[1]),ru=xk>=19,bk=["data","digits"];class ou extends zb{attributeChangedCallback(t,n,r){this[t]=JSON.parse(r)}}ou.observedAttributes=ru?[]:bk;ik("number-flow-react",ou);const yk={},Tf=ru?e=>e:JSON.stringify;function Pf(e){const{transformTiming:t,spinTiming:n,opacityTiming:r,animated:o,respectMotionPreference:s,trend:i,plugins:l,...c}=e;return[{transformTiming:t,spinTiming:n,opacityTiming:r,animated:o,respectMotionPreference:s,trend:i,plugins:l},c]}class wk extends p.Component{updateProperties(t){if(!this.el)return;this.el.batched=!this.props.isolate;const[n]=Pf(this.props);Object.entries(n).forEach(([r,o])=>{this.el[r]=o??ou.defaultProps[r]}),t?.onAnimationsStart&&this.el.removeEventListener("animationsstart",t.onAnimationsStart),this.props.onAnimationsStart&&this.el.addEventListener("animationsstart",this.props.onAnimationsStart),t?.onAnimationsFinish&&this.el.removeEventListener("animationsfinish",t.onAnimationsFinish),this.props.onAnimationsFinish&&this.el.addEventListener("animationsfinish",this.props.onAnimationsFinish)}componentDidMount(){this.updateProperties(),ru&&this.el&&(this.el.digits=this.props.digits,this.el.data=this.props.data)}getSnapshotBeforeUpdate(t){if(this.updateProperties(t),t.data!==this.props.data){if(this.props.group)return this.props.group.willUpdate(),()=>this.props.group?.didUpdate();if(!this.props.isolate)return this.el?.willUpdate(),()=>this.el?.didUpdate()}return null}componentDidUpdate(t,n,r){r?.()}handleRef(t){this.props.innerRef&&(this.props.innerRef.current=t),this.el=t}render(){const[t,{innerRef:n,className:r,data:o,willChange:s,isolate:i,group:l,digits:c,onAnimationsStart:u,onAnimationsFinish:f,...d}]=Pf(this.props);return p.createElement("number-flow-react",{ref:this.handleRef,"data-will-change":s?"":void 0,class:r,...d,dangerouslySetInnerHTML:{__html:""},suppressHydrationWarning:!0,digits:Tf(c),data:Tf(o)})}constructor(t){super(t),this.handleRef=this.handleRef.bind(this)}}const Ji=p.forwardRef(function({value:t,locales:n,format:r,prefix:o,suffix:s,...i},l){p.useImperativeHandle(l,()=>c.current,[]);const c=p.useRef(),u=p.useContext(Ck);u?.useRegister(c);const f=p.useMemo(()=>n?JSON.stringify(n):"",[n]),d=p.useMemo(()=>r?JSON.stringify(r):"",[r]),m=p.useMemo(()=>{const h=yk[`${f}:${d}`]??=new Intl.NumberFormat(n,r);return lk(t,h,o,s)},[t,f,d,o,s]);return p.createElement(wk,{...i,group:u,data:m,innerRef:c})}),Ck=p.createContext(void 0),Wb=({apr:e,aprBreakdown:t,showBoostedRewards:n=!1,showBoostedRewardsDescription:r=!1})=>{const o=t.filter(s=>s.boost);return a.jsxs(Zp,{children:[a.jsx(Qp,{asChild:!0,children:a.jsxs("span",{className:"text-accent inline-flex items-center gap-1 text-2xl font-semibold",children:[a.jsx(Ji,{value:e,format:{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}}),a.jsx(Rw,{size:16,className:"text-muted-foreground cursor-pointer font-bold"})]})}),a.jsxs(Jp,{children:[a.jsx("h3",{className:"text-accent text-sm",children:"Rewards"}),a.jsxs("div",{className:"flex flex-col gap-2",children:[t.filter(s=>!s.boost).map(s=>a.jsxs("div",{className:"flex justify-between",children:[a.jsx(nt,{textSize:"xs",icon:s.iconUrl,iconSize:"sm",className:"text-muted-foreground",children:s.name}),a.jsx("span",{className:"text-accent text-sm font-semibold",children:a.jsx(Ji,{value:parseFloat(s.apr)/100,format:{style:"percent",minimumFractionDigits:2,maximumFractionDigits:3}})})]},s.name)),a.jsx(kt,{}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-accent text-sm",children:"Net Reward Rate"}),a.jsx("span",{className:"text-accent text-sm font-semibold",children:a.jsx(Ji,{value:e,format:{style:"percent",minimumFractionDigits:3,maximumFractionDigits:3}})})]}),n&&o.length>0&&a.jsxs(a.Fragment,{children:[a.jsx(kt,{}),a.jsx("h3",{className:"text-accent text-sm",children:"Boosted Rewards"}),a.jsx("div",{className:"flex justify-between",children:a.jsx("span",{className:"text-accent text-sm font-semibold",children:o.map(s=>a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx(nt,{textSize:"xs",icon:s.iconUrl,iconSize:"sm",className:"text-muted-foreground",children:s.description}),r&&s.description&&a.jsx("span",{className:"text-muted-foreground text-xs",children:s.description})]},s.name))})})]})]})]})]})},Sk=({value:e})=>{const{depositAmount:t,apr:n,symbol:r,price:o}=e,s=E.useMemo(()=>{const i=t*n/12,l=i*o,c=t*n,u=c*o;return{monthlyReward:i.toFixed(4),monthlyRewardUsd:l.toFixed(2),yearlyReward:c.toFixed(4),yearlyRewardUsd:u.toFixed(2)}},[t,n,r,o]);return E.useEffect(()=>{},[t,n,r,o]),a.jsxs("div",{className:"space-y-1",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-sm text-muted-foreground",children:"Monthly"}),a.jsxs("span",{className:"text-sm text-muted-foreground font-semibold",children:[s.monthlyReward," ",r," ($",s.monthlyRewardUsd,")"]})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-sm text-muted-foreground",children:"Yearly"}),a.jsxs("span",{className:"text-sm text-muted-foreground font-semibold",children:[s.yearlyReward," ",r," ($",s.yearlyRewardUsd,")"]})]})]})},Kb=({type:e})=>a.jsxs(Gr,{variant:"muted",className:"gap-2",children:[a.jsx(Cw,{size:16})," ",e]}),qb=()=>{const e=[{icon:a.jsx(Ew,{size:16}),description:"Lorem ipsum dolor sit, amet consectetur adipisicing elit. Porro expedita amet hic beatae similique vero recusandae necessitatibus"},{icon:a.jsx(Iw,{size:16}),description:"Lend your USDT with Morpho and earn USDT rewards"},{icon:a.jsx(yw,{size:16}),description:"Rewards are automatically distributed every block and accrue to your position"}];return a.jsx("div",{className:"flex flex-col gap-3 w-full",children:e.map(t=>a.jsxs("div",{className:"flex gap-3",children:[a.jsx("div",{className:"text-muted-foreground flex-shrink-0 w-4 h-4 flex items-center justify-center",children:t.icon}),a.jsx("p",{className:"text-xs text-muted-foreground flex-1",children:t.description})]},t.description))})},Yb=({iconUrl:e,name:t,onClick:n})=>a.jsxs(dt,{variant:"border",rounded:"full",onClick:n,className:"flex items-center justify-between gap-3 cursor-pointer",children:[a.jsx(nt,{icon:e,textSize:"sm",iconSize:"base",children:t}),a.jsx(wt,{className:"w-4 h-4 text-muted-foreground"})]}),Rk=p.forwardRef(({className:e,value:t,onOpportunityClick:n,hideDisclaimer:r,opportunitySelector:o,...s},i)=>a.jsxs("div",{className:"space-y-2",children:[a.jsx(dt,{variant:"shadow",ref:i,className:S("space-y-3",e),...s,children:a.jsxs("div",{className:"flex justify-between",children:[a.jsx(Wb,{apr:parseFloat(t.totalApr)/100,aprBreakdown:t.aprBreakdown,showBoostedRewardsDescription:!1,showBoostedRewards:!0}),o==="new"&&a.jsx(Yb,{iconUrl:t.icon,name:t.name,onClick:n}),o==="old"&&a.jsx(qc,{icon:Kc(t.icon,t.vaultSymbol),text:t.name,onClick:n,size:"sm"})]})}),!r&&a.jsx(dt,{ref:i,variant:"border",gradient:"white",className:S("space-y-3",e),...s,children:a.jsxs("div",{className:"flex flex-col items-center justify-between gap-3",children:[a.jsxs("div",{className:"flex w-full justify-between p-1",children:[a.jsx(Kb,{type:t.type}),a.jsxs("span",{className:"text-foreground text-sm font-semibold",children:["TVL: ",t.tvlUsd]})]}),a.jsx(kt,{}),a.jsx(qb,{})]})})]}));function jk({opportunities:e,searchQuery:t,activeFilterIds:n,filters:r}){return E.useMemo(()=>{let o=e;if(t){const s=t.toLowerCase();o=o.filter(i=>i.name.toLowerCase().includes(s)||i.partner?.name.toLowerCase().includes(s)||i.chain.name.toLowerCase().includes(s))}if(n.length>0){const s=r.filter(i=>n.includes(i.id)).map(i=>i.filterFn);o=o.filter(i=>s.every(l=>l(i)))}return o},[e,t,n,r])}function Ek({opportunities:e,groupBy:t}){return E.useMemo(()=>{const n=[...e].sort((s,i)=>{const l=parseFloat(s.apr?.replace("%","")||"0");return parseFloat(i.apr?.replace("%","")||"0")-l});if(t==="none")return[{id:"all-opportunities",items:n}];const r=n.reduce((s,i)=>{let l,c,u;switch(t){case"partner":l=i.partner?.name||"other",c=i.partner?.name||"Other",u=i.partner?.icon;break;case"chain":l=i.chain.name||"other",c=i.chain.name||"Other",u=i.chain.icon;break;default:l="all",c="All"}return s[l]||(s[l]={id:l,title:c,icon:u,items:[]}),s[l].items.push(i),s},{}),o=Object.values(r);return o.sort((s,i)=>{const l=s.items.length>0?parseFloat(s.items[0].apr?.replace("%","")||"0"):0;return(i.items.length>0?parseFloat(i.items[0].apr?.replace("%","")||"0"):0)-l}),o},[e,t])}const Tk=[{id:"all",label:"All",filterFn:e=>!0},{id:"stablecoins",label:"Stables",filterFn:e=>e.name.includes("USD")},{id:"eth",label:"ETH",filterFn:e=>e.name.includes("ETH")},{id:"btc",label:"BTC",filterFn:e=>e.name.includes("BTC")}],Pk=({opportunities:e,onOpportunityClick:t,groupBy:n="none",filters:r=Tk,filterVariant:o="badge",multipleFilters:s=!0,showSearch:i=!0,searchPlaceholder:l="Search opportunities...",searchDebounceDelay:c=300,className:u,itemClassName:f,emptyState:d})=>{const[m,h]=E.useState(""),[v,g]=E.useState([]),b=jk({opportunities:e,searchQuery:m,activeFilterIds:v,filters:r}),x=Ek({opportunities:b,groupBy:n}),y=w=>a.jsx(eu,{value:w,onSelect:()=>t?.(w),className:f});return a.jsxs("div",{className:S("flex flex-col h-full",u),children:[a.jsx("div",{className:"mb-4 flex-shrink-0",children:a.jsx(Jc,{filters:r.map(({filterFn:w,...C})=>C),activeFilters:v,onFiltersChange:g,variant:o,multipleFilters:s,showSearch:i,searchValue:m,onSearchChange:h,searchPlaceholder:l,searchDebounceDelay:c})}),a.jsx(si,{className:"flex-1",children:a.jsx(Yc,{groups:x,renderItem:y,getItemKey:w=>w.name,showGroupHeaders:n!=="none",emptyState:d||a.jsx("div",{className:"text-center py-8 text-muted-foreground",children:m||v.length>0?"No opportunities match your filters":"No opportunities available"})})})]})},_k={colors:{neonGreen:"oklch(0.86 0.16 142.5)",darkGreen:"oklch(0.24 0.16 142.5)",ninjaBlack:"oklch(0.1 0.005 120)",wiseWhite:"oklch(0.98 0 0)",wiseGray:"oklch(0.17 0.003 120)",mintCream:"oklch(0.95 0.046 109)",turtleYellow:"oklch(0.97 0.21 98.2)",turtleRed:"oklch(0.6 0.28 29)",whiteTransparent:"oklch(0.98 0 0 / 0.02)",light:{background:"oklch(1 0 0)",foreground:"oklch(0.141 0.005 285.823)",card:"oklch(1 0 0)",cardForeground:"oklch(0.141 0.005 285.823)",popover:"oklch(1 0 0)",popoverForeground:"oklch(0.141 0.005 285.823)",primary:"oklch(0.21 0.006 285.885)",primaryForeground:"oklch(0.985 0 0)",secondary:"oklch(0.967 0.001 286.375)",secondaryForeground:"oklch(0.21 0.006 285.885)",muted:"oklch(0.967 0.001 286.375)",mutedForeground:"oklch(0.552 0.016 285.938)",accent:"oklch(0.967 0.001 286.375)",accentForeground:"oklch(0.21 0.006 285.885)",destructive:"oklch(0.577 0.245 27.325)",border:"oklch(0.92 0.004 286.32)",input:"oklch(0.92 0.004 286.32)",ring:"oklch(0.705 0.015 286.067)"},dark:{background:"oklch(0.141 0.005 285.823)",foreground:"oklch(0.985 0 0)",card:"oklch(0.21 0.006 285.885)",cardForeground:"oklch(0.985 0 0)",popover:"oklch(0.21 0.006 285.885)",popoverForeground:"oklch(0.985 0 0)",primary:"oklch(0.92 0.004 286.32)",primaryForeground:"oklch(0.21 0.006 285.885)",secondary:"oklch(0.274 0.006 286.033)",secondaryForeground:"oklch(0.985 0 0)",muted:"oklch(0.274 0.006 286.033)",mutedForeground:"oklch(0.705 0.015 286.067)",accent:"oklch(0.274 0.006 286.033)",accentForeground:"oklch(0.985 0 0)",destructive:"oklch(0.704 0.191 22.216)",border:"oklch(1 0 0 / 10%)",input:"oklch(1 0 0 / 15%)",ring:"oklch(0.552 0.016 285.938)"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"3rem","4xl":"4rem"},radius:{none:"0",sm:"calc(0.625rem - 4px)",md:"calc(0.625rem - 2px)",lg:"0.625rem",xl:"calc(0.625rem + 4px)",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}]},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadow:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}};exports.AlertDialog=YM;exports.AlertDialogAction=nA;exports.AlertDialogCancel=rA;exports.AlertDialogContent=ZM;exports.AlertDialogDescription=tA;exports.AlertDialogFooter=JM;exports.AlertDialogHeader=QM;exports.AlertDialogOverlay=h0;exports.AlertDialogPortal=m0;exports.AlertDialogTitle=eA;exports.AlertDialogTrigger=XM;exports.AnimatedBackground=BE;exports.ArrowIcon=Ig;exports.AssetFilters=Jc;exports.AssetList=rk;exports.AssetRow=Tb;exports.Avatar=ss;exports.AvatarFallback=is;exports.AvatarImage=Tl;exports.Badge=Gr;exports.Banner=YN;exports.BaseSelector=qc;exports.BetaIcon=Og;exports.Button=Ut;exports.CampaignItem=Vb;exports.Card=dt;exports.CardContent=gp;exports.CardDescription=J1;exports.CardFooter=ew;exports.CardHeader=Z1;exports.CardTitle=Q1;exports.Checkbox=GP;exports.Chip=pl;exports.Collapsible=bb;exports.CollapsibleContent=wb;exports.CollapsibleTrigger=yb;exports.Combobox=B0;exports.Command=ni;exports.CommandDialog=iN;exports.CommandEmpty=Vc;exports.CommandGroup=Wn;exports.CommandInput=Fc;exports.CommandItem=mn;exports.CommandList=$c;exports.CommandSeparator=$0;exports.CommandShortcut=aN;exports.DataTable=X3;exports.DealItem=Bb;exports.Dialog=cv;exports.DialogClose=LP;exports.DialogContent=fv;exports.DialogDescription=hv;exports.DialogFooter=OP;exports.DialogHeader=pv;exports.DialogOverlay=dv;exports.DialogPortal=uv;exports.DialogTitle=mv;exports.DialogTrigger=DP;exports.DotIcon=Zn;exports.DropdownMenu=c4;exports.DropdownMenuCheckboxItem=h4;exports.DropdownMenuContent=f4;exports.DropdownMenuGroup=p4;exports.DropdownMenuItem=m4;exports.DropdownMenuLabel=x4;exports.DropdownMenuPortal=u4;exports.DropdownMenuRadioGroup=g4;exports.DropdownMenuRadioItem=v4;exports.DropdownMenuSeparator=b4;exports.DropdownMenuShortcut=y4;exports.DropdownMenuSub=w4;exports.DropdownMenuSubContent=S4;exports.DropdownMenuSubTrigger=C4;exports.DropdownMenuTrigger=d4;exports.Field=mA;exports.FieldContent=hA;exports.FieldDescription=xA;exports.FieldError=yA;exports.FieldGroup=fA;exports.FieldLabel=gA;exports.FieldLegend=dA;exports.FieldSeparator=bA;exports.FieldSet=uA;exports.FieldTitle=vA;exports.HeadingH1=oA;exports.HeadingH2=sA;exports.HeadingH3=g0;exports.HeadingH4=iA;exports.HeadingH5=aA;exports.HeadingH6=v0;exports.HoverCard=Zp;exports.HoverCardContent=Jp;exports.HoverCardTrigger=Qp;exports.IconAnimation=ml;exports.IconList=Cn;exports.InfoCard=Qo;exports.Input=vr;exports.InputGroup=T4;exports.InputGroupAddon=_4;exports.InputGroupButton=A4;exports.InputGroupInput=k4;exports.InputGroupText=N4;exports.InputGroupTextarea=I4;exports.IssueIcon=Fg;exports.Label=b0;exports.LabelWithIcon=nt;exports.ManagedTable=Vw;exports.MultiSelect=V0;exports.NavigationBar=hl;exports.NavigationItem=gl;exports.NavigationMenu=oM;exports.NavigationMenuContent=lM;exports.NavigationMenuIndicator=uM;exports.NavigationMenuItem=iM;exports.NavigationMenuLink=cM;exports.NavigationMenuList=sM;exports.NavigationMenuTrigger=aM;exports.NavigationMenuViewport=Vx;exports.OpportunityApr=Wb;exports.OpportunityDetailsV1=$w;exports.OpportunityDisclaimer=qb;exports.OpportunityItem=eu;exports.OpportunityList=Pk;exports.OpportunityRateEstimator=Sk;exports.OpportunitySection=Rk;exports.OpportunitySelector=Yb;exports.OpportunityType=Kb;exports.PageHeading=Q3;exports.Popover=Ic;exports.PopoverAnchor=DA;exports.PopoverContent=Lc;exports.PopoverTrigger=Dc;exports.RouteDetails=ZN;exports.ScrollArea=si;exports.ScrollBar=tb;exports.SearchBar=Ob;exports.SegmentControl=bx;exports.Select=$g;exports.SelectContent=Bg;exports.SelectGroup=wP;exports.SelectItem=zg;exports.SelectLabel=SP;exports.SelectScrollDownButton=Gg;exports.SelectScrollUpButton=Hg;exports.SelectSeparator=RP;exports.SelectTrigger=Vg;exports.SelectValue=CP;exports.Separator=kt;exports.ShadTableCell=Va;exports.Sidebar=ob;exports.SidebarContent=lb;exports.SidebarFooter=ab;exports.SidebarGroup=Ja;exports.SidebarGroupAction=BN;exports.SidebarGroupContent=cb;exports.SidebarGroupLabel=VN;exports.SidebarHeader=ib;exports.SidebarInput=FN;exports.SidebarInset=ON;exports.SidebarMenu=ub;exports.SidebarMenuAction=zN;exports.SidebarMenuBadge=HN;exports.SidebarMenuButton=tl;exports.SidebarMenuItem=el;exports.SidebarMenuSkeleton=GN;exports.SidebarMenuSub=fb;exports.SidebarMenuSubButton=mb;exports.SidebarMenuSubItem=pb;exports.SidebarProvider=rb;exports.SidebarRail=LN;exports.SidebarSeparator=$N;exports.SidebarTrigger=sb;exports.Slider=MM;exports.SlippageSelector=Eb;exports.SwapDetails=jb;exports.SwapInput=Rb;exports.Switch=T1;exports.Table=vv;exports.TableBody=bv;exports.TableCaption=$P;exports.TableCell=Bw;exports.TableFooter=FP;exports.TableHead=yv;exports.TableHeader=xv;exports.TableRow=qo;exports.Tabs=r3;exports.Textarea=yx;exports.Toaster=My;exports.Toggle=q1;exports.ToggleGroup=Y1;exports.ToggleGroupItem=X1;exports.TokenSelector=Sb;exports.Tooltip=Ml;exports.TooltipContent=Nl;exports.TooltipProvider=Ds;exports.TooltipTrigger=Al;exports.TurtleAvatar=VS;exports.TurtleContainer=$b;exports.TurtleIcon=kg;exports.TurtleSidebar=Fb;exports.TurtleSidebarLayout=Z3;exports.TxStatus=Cb;exports.UpdateIcon=Lg;exports.WarningIcon=Dg;exports.WidgetItem=po;exports.WidgetItemBottom=ho;exports.WidgetItemLeft=Qt;exports.WidgetItemRight=Jt;exports.WidgetItemStats=go;exports.WidgetItemTop=mo;exports.WidgetListItems=Yc;exports.badgeVariants=gv;exports.buttonVariants=Yr;exports.cardVariants=hp;exports.chipVariants=up;exports.cn=S;exports.hoverCardContentVariants=Bo;exports.iconAnimationVariants=dp;exports.iconUrlToImg=Kc;exports.inputVariants=za;exports.labelWithIconVariants=fp;exports.navigationBarVariants=pp;exports.navigationItemVariants=mp;exports.navigationMenuTriggerStyle=$x;exports.toggleVariants=fl;exports.tokens=_k;exports.useSidebar=br;
|
|
62
204
|
//# sourceMappingURL=index.cjs.map
|