@isardsat/editorial-admin 6.17.0 → 6.18.1
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/build/client/assets/{FilePicker-CWStVsYG.js → FilePicker-CRgpF9yp.js} +1 -1
- package/build/client/assets/{Loading-KDdZ7rZ6.js → Loading-MKgXMPvl.js} +1 -1
- package/build/client/assets/{URLInput-DPFPjYVw.js → URLInput-CPrLDhlu.js} +1 -1
- package/build/client/assets/{alert-dialog-DXxxyAZU.js → alert-dialog-CN-uuUVp.js} +3 -3
- package/build/client/assets/authSlice-BI_rlf3v.js +1 -0
- package/build/client/assets/{badge-BXKNQLyH.js → badge-gLcN3Bjg.js} +1 -1
- package/build/client/assets/{clear-button-D97QPP2k.js → clear-button-D05R9Y5Y.js} +1 -1
- package/build/client/assets/{dashboard-B5ARQunb.js → dashboard-CcD0GUvM.js} +1 -1
- package/build/client/assets/dashboard._collection-sb0M--Ej.js +1 -0
- package/build/client/assets/dashboard._collection._document-BJglB3FV.js +1 -0
- package/build/client/assets/dashboard._collection.new-CLZpPLZh.js +1 -0
- package/build/client/assets/dashboard._layout-SK_O_dvW.js +1 -0
- package/build/client/assets/{dashboard.files-BCs_NOSO.js → dashboard.files-BK6IOREO.js} +1 -1
- package/build/client/assets/date-picker-Dgbvfw_1.js +1 -0
- package/build/client/assets/datetime-picker-De7vM6e7.js +1 -0
- package/build/client/assets/{files--wep8C46.js → files-Cdeyho5X.js} +1 -1
- package/build/client/assets/home-DChaVk_H.js +1 -0
- package/build/client/assets/{index-DeGbcDeY.js → index-B0u0hYGX.js} +1 -1
- package/build/client/assets/{index-BXTftypW.js → index-B2dzkZu5.js} +1 -1
- package/build/client/assets/{index-CnP7cIBh.js → index-B3bJjaCJ.js} +1 -1
- package/build/client/assets/{index-CGQzLeML.js → index-BhARCKRr.js} +1 -1
- package/build/client/assets/{index-B81oBFuU.js → index-CHzEoQKp.js} +1 -1
- package/build/client/assets/{index-BXchIULt.js → index-CtLWaleL.js} +1 -1
- package/build/client/assets/{index-DM_dKEtx.js → index-cCny74f5.js} +1 -1
- package/build/client/assets/{index--RiyjxGD.js → index-pxU98Is7.js} +1 -1
- package/build/client/assets/{input-CgsbKbWd.js → input-Bk91TMQj.js} +1 -1
- package/build/client/assets/{itemForm-BgEug_tW.js → itemForm-qGKIiDrR.js} +2 -2
- package/build/client/assets/manifest-7b204cc1.js +1 -0
- package/build/client/assets/{markdownEditor-DFIezOAZ.js → markdownEditor-DkA1HBSZ.js} +2 -2
- package/build/client/assets/root-CLpfMQQt.js +1 -0
- package/build/client/assets/utils-CCKKso3e.js +18 -0
- package/build/client/assets/{zod-C5Je466-.js → zod-BFfp0fV9.js} +1 -1
- package/build/client/index.html +2 -2
- package/package.json +2 -2
- package/build/client/assets/authSlice-B_ro2Re6.js +0 -18
- package/build/client/assets/dashboard._collection-D89qkxNO.js +0 -1
- package/build/client/assets/dashboard._collection._document-D8FH-Bjl.js +0 -1
- package/build/client/assets/dashboard._collection.new-BxoyGe3t.js +0 -1
- package/build/client/assets/dashboard._layout-BfTFHfSp.js +0 -1
- package/build/client/assets/date-picker-CQaLiplt.js +0 -1
- package/build/client/assets/datetime-picker-Z1eKvvd5.js +0 -1
- package/build/client/assets/home-CtOlNeIW.js +0 -1
- package/build/client/assets/manifest-8f406a94.js +0 -1
- package/build/client/assets/root-CStiRuXh.js +0 -1
- package/build/client/assets/tslib.es6-De9GV7Vy.js +0 -1
- package/build/client/assets/utils-DUhXiBbj.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,a as r,x as N,y as X,v as he,z as xe,R as fe,w as be,O as me}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as ge,c as P,d as je}from"./authSlice-BI_rlf3v.js";import{b as l,d as z,h as ve,j as we,k as Ne,l as ye,u as Ce}from"./utils-CCKKso3e.js";import{t as M}from"./index-CZSVchcX.js";import{R as Z,C as Y,a as J,T as ee,D as te,P as ae,O as se,u as Se}from"./index-cCny74f5.js";import{X as ie,C as $}from"./x-BVtfHpQX.js";import{B as k,u as ke,c as _e,P as E,a as Me,b as Oe,d as Pe}from"./index-BhARCKRr.js";import{c as y}from"./createLucideIcon-BvSqmaUO.js";import{S as R,c as ze,u as Ee}from"./index-CtLWaleL.js";import{P as Re}from"./index-CHzEoQKp.js";import{P as Ae,R as De,T as Ie,a as Te,C as Le,A as $e}from"./index-B3bJjaCJ.js";import{A as Be,a as Ge}from"./arrow-up-C0I0e1Jt.js";import{L as He}from"./loader-circle-BDUbeTTe.js";import{U as Fe}from"./upload-DhJ5wU_H.js";import{E as Ve}from"./external-link-ERgO2SVI.js";import{L as Ke}from"./Loading-MKgXMPvl.js";import{C as Ue}from"./chevron-right-BFlMu-RJ.js";import"./index-DLIEpuwL.js";import"./index-B2dzkZu5.js";const qe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],We=y("blocks",qe);const Qe=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Xe=y("files",Qe);const Ze=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ye=y("grid-3x3",Ze);const Je=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],et=y("heart",Je);const tt=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],at=y("log-out",tt);const st=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],it=y("panel-left",st);const nt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ot=y("square",nt);function rt({...t}){return e.jsx(Z,{"data-slot":"dialog",...t})}function lt({...t}){return e.jsx(ae,{"data-slot":"dialog-portal",...t})}function dt({className:t,...a}){return e.jsx(se,{"data-slot":"dialog-overlay",className:l("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",t),...a})}function ct({className:t,children:a,...i}){return e.jsxs(lt,{"data-slot":"dialog-portal",children:[e.jsx(dt,{}),e.jsxs(Y,{"data-slot":"dialog-content",className:l("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",t),...i,children:[a,e.jsxs(J,{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:[e.jsx(ie,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 text-center sm:text-left",t),...a})}function pt({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ht({className:t,...a}){return e.jsx(ee,{"data-slot":"dialog-title",className:l("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-description",className:l("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=r.forwardRef(function({title:a="GitHub",color:i="currentColor",size:s=24,...n},o){return i==="default"&&(i=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:i,viewBox:"0 0 24 24",ref:o,...n,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),mt="#85EA2D",B=r.forwardRef(function({title:a="Swagger",color:i="currentColor",size:s=24,...n},o){return i==="default"&&(i=mt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:i,viewBox:"0 0 24 24",ref:o,...n,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function gt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:i=>a(i),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(ht,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(B,{size:14}),"Documentation"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc/ui",children:[e.jsx(B,{size:14}),"Swagger API UI"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(pt,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(et,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var jt="Separator",G="horizontal",vt=["horizontal","vertical"],ne=r.forwardRef((t,a)=>{const{decorative:i,orientation:s=G,...n}=t,o=wt(s)?s:G,c=i?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return e.jsx(Re.div,{"data-orientation":o,...c,...n,ref:a})});ne.displayName=jt;function wt(t){return vt.includes(t)}var Nt=ne;function oe({className:t,orientation:a="horizontal",decorative:i=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:i,orientation:a,className:l("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function yt({...t}){return e.jsx(Z,{"data-slot":"sheet",...t})}function Ct({...t}){return e.jsx(ae,{"data-slot":"sheet-portal",...t})}function St({className:t,...a}){return e.jsx(se,{"data-slot":"sheet-overlay",className:l("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",t),...a})}function kt({className:t,children:a,side:i="right",...s}){return e.jsxs(Ct,{children:[e.jsx(St,{}),e.jsxs(Y,{"data-slot":"sheet-content",className:l("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",i==="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",i==="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",i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(J,{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:[e.jsx(ie,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function _t({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:l("flex flex-col gap-1.5 p-4",t),...a})}function Mt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-title",className:l("text-foreground font-semibold",t),...a})}function Ot({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-description",className:l("text-muted-foreground text-sm",t),...a})}function re({delayDuration:t=0,...a}){return e.jsx(Ae,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function Pt({...t}){return e.jsx(re,{children:e.jsx(De,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Ie,{"data-slot":"tooltip-trigger",...t})}function Et({className:t,sideOffset:a=0,children:i,...s}){return e.jsx(Te,{children:e.jsxs(Le,{"data-slot":"tooltip-content",sideOffset:a,className:l("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",t),...s,children:[i,e.jsx($e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const O=768;function Rt(){const[t,a]=r.useState(void 0);return r.useEffect(()=>{const i=window.matchMedia(`(max-width: ${O-1}px)`),s=()=>{a(window.innerWidth<O)};return i.addEventListener("change",s),a(window.innerWidth<O),()=>i.removeEventListener("change",s)},[]),!!t}const At="sidebar_state",Dt=3600*24*7,It="16rem",Tt="18rem",Lt="3rem",$t="b",le=r.createContext(null);function A(){const t=r.useContext(le);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Bt({defaultOpen:t=!0,open:a,onOpenChange:i,className:s,style:n,children:o,...d}){const c=Rt(),[f,u]=r.useState(!1),[m,C]=r.useState(t),b=a??m,j=r.useCallback(x=>{const p=typeof x=="function"?x(b):x;i?i(p):C(p),document.cookie=`${At}=${p}; path=/; max-age=${Dt}`},[i,b]),h=r.useCallback(()=>c?u(x=>!x):j(x=>!x),[c,j,u]);r.useEffect(()=>{const x=p=>{p.key===$t&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),h())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[h]);const v=b?"expanded":"collapsed",S=r.useMemo(()=>({state:v,open:b,setOpen:j,isMobile:c,openMobile:f,setOpenMobile:u,toggleSidebar:h}),[v,b,j,c,f,u,h]);return e.jsx(le.Provider,{value:S,children:e.jsx(re,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":It,"--sidebar-width-icon":Lt,...n},className:l("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...d,children:o})})})}function Gt({side:t="left",variant:a="sidebar",collapsible:i="offcanvas",className:s,children:n,...o}){const{isMobile:d,state:c,openMobile:f,setOpenMobile:u}=A();return i==="none"?e.jsx("div",{"data-slot":"sidebar",className:l("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...o,children:n}):d?e.jsx(yt,{open:f,onOpenChange:u,...o,children:e.jsxs(kt,{"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":Tt},side:t,children:[e.jsxs(_t,{className:"sr-only",children:[e.jsx(Mt,{children:"Sidebar"}),e.jsx(Ot,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:n})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":c==="collapsed"?i:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:l("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:l("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="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)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:e.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-sm",children:n})})]})}function Ht({className:t,onClick:a,...i}){const{toggleSidebar:s}=A();return e.jsxs(k,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l("size-7",t),onClick:n=>{a?.(n),s()},...i,children:[e.jsx(it,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Ft({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l("flex flex-col gap-2 p-2",t),...a})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx(oe,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:l("bg-sidebar-border mx-2 w-auto",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l("relative flex w-full min-w-0 flex-col p-2",t),...a})}function F({className:t,asChild:a=!1,...i}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:l("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",t),...i})}function V({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l("w-full text-sm",t),...a})}function K({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l("group/menu-item relative",t),...a})}const qt=ze("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function g({asChild:t=!1,isActive:a=!1,variant:i="default",size:s="default",tooltip:n,className:o,...d}){const c=t?R:"button",{isMobile:f,state:u}=A(),m=e.jsx(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:l(qt({variant:i,size:s}),o),...d});return n?(typeof n=="string"&&(n={children:n}),e.jsxs(Pt,{children:[e.jsx(zt,{asChild:!0,children:m}),e.jsx(Et,{side:"right",align:"center",hidden:u!=="collapsed"||f,...n})]})):m}function Wt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:l("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",t),...a})}function Qt({asChild:t=!1,size:a="md",isActive:i=!1,className:s,...n}){const o=t?R:"a";return e.jsx(o,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":i,className:l("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...n})}function U({singleton:t}){const{data:a}=z(),{data:i}=ve();if(!a)return null;const s=r.useMemo(()=>Object.entries(a).filter(([,n])=>t?n.singleton:!n.singleton).toSorted(([n],[o])=>n.localeCompare(o)),[a,t]);return e.jsx(e.Fragment,{children:s.map(([n,o])=>e.jsx(Wt,{children:e.jsx(X,{to:t?`/admin/dashboard/${n}/default`:`/admin/dashboard/${n}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:({isActive:d})=>e.jsx(Qt,{isActive:d,asChild:!0,children:e.jsxs("div",{children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap",children:o.displayName}),!t&&i?.[n]&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1 min-w-[25px] text-right",children:Object.keys(i[n]).length})]})})})},o.displayName))})}var _="Collapsible",[Xt]=_e(_),[Zt,D]=Xt(_),de=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,open:s,defaultOpen:n,disabled:o,onOpenChange:d,...c}=t,[f,u]=ke({prop:s,defaultProp:n??!1,onChange:d,caller:_});return e.jsx(Zt,{scope:i,disabled:o,contentId:Se(),open:f,onOpenToggle:r.useCallback(()=>u(m=>!m),[u]),children:e.jsx(E.div,{"data-state":T(f),"data-disabled":o?"":void 0,...c,ref:a})})});de.displayName=_;var ce="CollapsibleTrigger",ue=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,...s}=t,n=D(ce,i);return e.jsx(E.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":T(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...s,ref:a,onClick:Me(t.onClick,n.onOpenToggle)})});ue.displayName=ce;var I="CollapsibleContent",pe=r.forwardRef((t,a)=>{const{forceMount:i,...s}=t,n=D(I,t.__scopeCollapsible);return e.jsx(Oe,{present:i||n.open,children:({present:o})=>e.jsx(Yt,{...s,ref:a,present:o})})});pe.displayName=I;var Yt=r.forwardRef((t,a)=>{const{__scopeCollapsible:i,present:s,children:n,...o}=t,d=D(I,i),[c,f]=r.useState(s),u=r.useRef(null),m=Ee(a,u),C=r.useRef(0),b=C.current,j=r.useRef(0),h=j.current,v=d.open||c,S=r.useRef(v),x=r.useRef(void 0);return r.useEffect(()=>{const p=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(p)},[]),Pe(()=>{const p=u.current;if(p){x.current=x.current||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const L=p.getBoundingClientRect();C.current=L.height,j.current=L.width,S.current||(p.style.transitionDuration=x.current.transitionDuration,p.style.animationName=x.current.animationName),f(s)}},[d.open,s]),e.jsx(E.div,{"data-state":T(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!v,...o,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:v&&n})});function T(t){return t?"open":"closed"}var Jt=de;function q({...t}){return e.jsx(Jt,{"data-slot":"collapsible",...t})}function W({...t}){return e.jsx(ue,{"data-slot":"collapsible-trigger",...t})}function Q({...t}){return e.jsx(pe,{"data-slot":"collapsible-content",...t})}function ea(){const t=ge(),[a,i]=r.useState(!1),[s]=we(),[n]=Ne(),[o]=ye(),[d,c]=r.useState(!1),{data:f}=Ce(),{data:u}=z(),m=r.useMemo(()=>u&&!!Object.values(u).find(h=>!h.singleton),[u]),C=r.useMemo(()=>u&&!!Object.values(u).find(h=>h.singleton),[u]),b=P(h=>h.auth.user),j=async h=>{c(!0);try{await s({author:h}).unwrap()?M.success("Content published successfully."):M.error("Publishing failed.")}catch(v){M.error("Publishing failed."),console.error(v)}finally{c(!1)}};return e.jsxs(Gt,{className:"z-50",children:[e.jsx(gt,{isOpen:a,setOpen:i}),e.jsx(Ft,{className:"h-14 justify-center",children:e.jsx(H,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:f?.name})})}),e.jsx(Ut,{children:e.jsxs(H,{children:[e.jsx(F,{children:"Content"}),e.jsx(V,{children:e.jsxs(K,{children:[e.jsx(q,{className:"group/collapsible",disabled:!m,children:e.jsxs(w,{children:[e.jsx(W,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(Ye,{}),e.jsx("span",{children:"Collections"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Q,{children:e.jsx(U,{})})]})}),e.jsx(q,{className:"group/collapsible",disabled:!C,children:e.jsxs(w,{children:[e.jsx(W,{asChild:!0,children:e.jsxs(g,{className:"group",children:[e.jsx(ot,{}),e.jsx("span",{children:"Singles"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(Q,{children:e.jsx(U,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Xe,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(g,{disabled:!0,children:[e.jsx(We,{}),e.jsx("span",{children:"Components"})]})})]})})]})}),e.jsxs(Vt,{children:[e.jsx(F,{children:"Actions"}),e.jsx(V,{children:e.jsxs(K,{children:[b?.role==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>n(),children:[e.jsx(Be,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>o({author:b.email}),children:[e.jsx(Ge,{}),e.jsx("span",{children:"Push to repo"})]})})]}),b&&e.jsx(w,{children:e.jsxs(g,{className:"cursor-pointer",onClick:()=>{j(b.email)},children:[d?e.jsx(He,{className:"animate-spin"}):e.jsx(Fe,{}),e.jsx("span",{children:"Publish"})]})})]})}),e.jsx(Kt,{}),e.jsx(g,{asChild:!0,children:e.jsxs(N,{to:f?.previewUrl,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(g,{className:"cursor-pointer",onClick:()=>i(!0),children:"About"}),e.jsxs(g,{className:"cursor-pointer",onClick:()=>t(je()),children:[e.jsx(at,{}),"Log out"]}),e.jsxs("div",{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:"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",children:["Editorial v","6.18.1"]})]})]})}function ta({children:t}){const a=he(),i=P(n=>n.auth.user),s=P(n=>n.auth.isLoading);return r.useEffect(()=>{!s&&!i&&a("/admin")},[s,a,i]),s||!i?e.jsx(Ke,{}):t}function aa(){const{pathname:t}=xe(),{data:a}=z(),i=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:i.map((s,n,o)=>e.jsxs(fe.Fragment,{children:[o.length>1&&n>=1&&e.jsx(Ue,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsxs("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:[n<o.length-1&&a[s]&&a[s].singleton&&(a[s]?a[s].displayName:s),n<o.length-1&&a[s]&&!a[s].singleton&&e.jsx(X,{to:`/admin/dashboard/${s}`,className:({isActive:d,isPending:c})=>c?"pending":d?"active":"",children:a[s]?a[s].displayName:s}),n===o.length-1&&(a[s]?a[s].displayName:s)]},s)]},n))}):null}const Na=be(function(){return e.jsx(ta,{children:e.jsxs(Bt,{className:"flex h-full",children:[e.jsx(ea,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ht,{}),e.jsx(oe,{orientation:"vertical",className:"h-4"}),e.jsx(aa,{})]})}),e.jsx(me,{})]})]})})});export{Na as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as r,p as o}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{F as i}from"./files
|
|
1
|
+
import{w as r,p as o}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{F as i}from"./files-Cdeyho5X.js";import"./utils-CCKKso3e.js";import"./index-CZSVchcX.js";import"./index-DLIEpuwL.js";import"./badge-gLcN3Bjg.js";import"./index-CtLWaleL.js";import"./upload-DhJ5wU_H.js";import"./createLucideIcon-BvSqmaUO.js";import"./trash-UKLAaALv.js";import"./x-BVtfHpQX.js";import"./check-DF0ucE8d.js";const h=r(function(){return o.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:o.jsx("div",{className:"flex flex-col flex-1 gap-8",children:o.jsx(i,{})})})});export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as r}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as l}from"./index-BhARCKRr.js";import{P as n,a as p,f as c,C as f,b as u,c as x}from"./clear-button-D05R9Y5Y.js";import{b as d}from"./utils-CCKKso3e.js";import{C as j}from"./calendar-Frbsxn98.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-B0u0hYGX.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./index-CHzEoQKp.js";function S({id:e,date:t,onDateChange:o,placeholder:s="Pick a date",disabled:i=!1,className:a,allowClear:m=!1}){return r.jsxs(n,{children:[r.jsx(p,{asChild:!0,children:r.jsx(l,{variant:"outline",className:d("w-full justify-start text-left font-normal relative",!t&&"text-muted-foreground",a),disabled:i,children:r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"mr-2 h-4 w-4"}),t?c(t,"PPP"):r.jsx("span",{children:s}),r.jsx(f,{onClear:()=>{o?.(void 0)},visible:m&&!!t})]})})}),r.jsx(u,{className:"w-auto p-0",children:r.jsx(x,{id:e,mode:"single",selected:t,onSelect:o,initialFocus:!0})})]})}export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,p as s}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{B as C}from"./index-BhARCKRr.js";import{f as c,P as N,a as H,C as S,b as g,c as k}from"./clear-button-D05R9Y5Y.js";import{I as B}from"./input-Bk91TMQj.js";import{b as E}from"./utils-CCKKso3e.js";import{C as w}from"./calendar-Frbsxn98.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./createLucideIcon-BvSqmaUO.js";import"./chevron-right-BFlMu-RJ.js";import"./x-BVtfHpQX.js";import"./index-B0u0hYGX.js";import"./index-cCny74f5.js";import"./index-B2dzkZu5.js";import"./index-CHzEoQKp.js";function Q({id:d,date:t,onDateTimeChange:r,placeholder:x="Pick a date and time",disabled:u=!1,className:j,allowClear:v=!1}){const[e,i]=a.useState(t),[m,p]=a.useState(t?c(t,"HH:mm"):"12:00");a.useEffect(()=>{i(t),t&&p(c(t,"HH:mm"))},[t]);const h=a.useCallback(o=>{const l=o.target.value;if(p(l),!e)return;const[n,b]=l.split(":").map(Number),f=new Date(e);f.setHours(n,b,0,0),r?.(f)},[e,r]),P=a.useCallback(o=>{if(!o){i(void 0),r?.(void 0);return}const[l,n]=m.split(":").map(Number);o.setHours(l,n,0,0),i(o),r?.(o)},[m,r]);return s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(N,{children:[s.jsx(H,{asChild:!0,children:s.jsx(C,{variant:"outline",className:E("flex-1 justify-start text-left font-normal relative",!e&&"text-muted-foreground",j),disabled:u,children:s.jsxs(s.Fragment,{children:[s.jsx(w,{className:"mr-2 h-4 w-4"}),e?c(e,"PPP"):s.jsx("span",{children:x}),s.jsx(S,{onClear:()=>{i(void 0),r?.(void 0)},visible:v&&!!t})]})})}),s.jsx(g,{className:"w-auto p-0",children:s.jsx(k,{id:d,mode:"single",selected:e,onSelect:P,initialFocus:!0})})]}),s.jsx(B,{type:"time",value:m,onChange:h,disabled:u||!e,className:"w-32"})]})}export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,p as e,x as q}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{v as Z,w as B,x as G,y as K,u as Q,p as E,a as W,z as O}from"./utils-DUhXiBbj.js";import{t as n}from"./index-CZSVchcX.js";import{B as X}from"./badge-BXKNQLyH.js";import{U as T}from"./upload-DhJ5wU_H.js";import{c as v}from"./createLucideIcon-BvSqmaUO.js";import{F as J,T as Y}from"./trash-UKLAaALv.js";import{C as A,X as U}from"./x-BVtfHpQX.js";import{C as H}from"./check-DF0ucE8d.js";const ee=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],te=v("copy",ee);const se=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ae=v("file-text",se);const re=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],le=v("file",re);const oe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ie=v("folder-open",oe);const ne=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],R=v("folder-plus",ne);const ce=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_=v("folder",ce),de=["txt","md","html","pdf"],pe=["svg","webp","png","jpeg","jpg"],me=[{Icon:J,test:t=>pe.some(l=>t.name.endsWith(l))},{Icon:ae,test:t=>de.some(l=>t.name.endsWith(l))}],ue={Icon:le};function I(t){return!(!t.trim()||t==="."||t===".."||t.includes("/")||t.includes("\\"))}function fe({visible:t,onConfirm:l,onCancel:h,disabled:d}){const[c,m]=f.useState("");return f.useEffect(()=>{t&&m("")},[t]),t?e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2 border-b",onClick:i=>i.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:c,onChange:i=>m(i.target.value),onKeyDown:i=>{i.key==="Enter"&&l(c),i.key==="Escape"&&h()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm",disabled:d})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:"--"})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:()=>l(c),disabled:d||!c.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:h,disabled:d,children:e.jsx(U,{size:16})})]})]}):null}const V=({node:t,level:l=0,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w})=>{const[x,z]=f.useState(!1),[k,F]=f.useState(""),{data:P}=Q(),L=me.find(s=>s.test(t))??ue,o=t.type==="directory",M=o||d?"div":q,a=i?.kind==="directory"&&o&&i.path===t.relativePath,r=b===t.relativePath;f.useEffect(()=>{a&&F("")},[a]);const u=()=>{o&&z(!x)},$=s=>{const j=s.target.files;j&&m&&m(t.relativePath,j)},S=()=>{y(t.relativePath,k)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(M,{to:`/${t.relativePath}`,target:"_blank",className:E("flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",r&&"bg-red-50 hover:bg-red-50"),style:{paddingLeft:`calc(0.5rem + ${l*20}px)`},onClick:o?u:d?()=>d(t.isLarge?`${P?.largeFilesUrl}/${t.relativePath}`:t.relativePath):void 0,children:[o?e.jsx(A,{size:16,className:W("transition-transform",{"rotate-180":x})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[o?x?e.jsx(ie,{size:16,className:"text-yellow-500"}):e.jsx(_,{size:16,className:"text-yellow-500"}):e.jsx(L.Icon,{size:16,className:" text-gray-500"}),e.jsxs("span",{className:"flex gap-2 items-center text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:[!o&&t.isLarge&&e.jsx(X,{variant:"outline",children:"Large"}),t.name]})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:o?"--":O(t.size)})}),!c&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-50",children:[o&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"file",multiple:!0,onChange:$,className:"hidden",id:`dir-upload-${t.relativePath}-${l}`}),e.jsxs("label",{htmlFor:`dir-upload-${t.relativePath}-${l}`,className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>s.stopPropagation(),children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files to this folder"})]}),e.jsxs("button",{className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),z(!0),N(t.relativePath)},title:"Create Folder",children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder in this directory"})]})]}),e.jsxs("button",{className:E("hover:text-yellow-500 p-1 hover:bg-muted rounded-sm cursor-pointer",o&&"hidden"),onClick:async s=>{s.preventDefault(),s.stopPropagation();try{await navigator.clipboard.writeText(t.path),n.success("File URL copied to clipboard",{duration:2e3})}catch(j){console.error("Copy failed:",j),n.error("Failed to copy to clipboard",{duration:2e3})}},title:"Copy file URL",children:[e.jsx(te,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),r?e.jsxs("div",{className:"flex items-center gap-1",onClick:s=>s.stopPropagation(),children:[e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 text-red-600 cursor-pointer",title:"Confirm delete",onClick:s=>{s.preventDefault(),s.stopPropagation(),D(t.relativePath)},disabled:w,children:[e.jsx(H,{size:16}),e.jsx("span",{className:"sr-only",children:"Confirm delete"})]}),e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 cursor-pointer",title:"Cancel",onClick:s=>{s.preventDefault(),s.stopPropagation(),C()},disabled:w,children:[e.jsx(U,{size:16}),e.jsx("span",{className:"sr-only",children:"Cancel delete"})]})]}):e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),g(t.relativePath)},title:`Delete this ${o?"folder":"file"}`,children:[e.jsx(Y,{size:16}),e.jsxs("span",{className:"sr-only",children:["Delete this ",o?"folder":"file"]})]})]})]}),o&&x&&e.jsxs("div",{children:[!c&&a&&e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2",style:{paddingLeft:`calc(0.5rem + ${(l+1)*20}px)`},onClick:s=>s.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:k,onChange:s=>F(s.target.value),onKeyDown:s=>{s.key==="Enter"&&S(),s.key==="Escape"&&p()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm"}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:S,disabled:!k.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:p,children:e.jsx(U,{size:16})})]}),t.children?.map((s,j)=>e.jsx(V,{node:s,level:l+1,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w},`${s.name}-${j}`))]})]})};function we({disableActions:t,onChange:l}){const{data:h}=Z(),[d,c]=B(),[m]=G(),[i,N]=K(),[y,p]=f.useState(null),[b,g]=f.useState(null),C=async({files:a,path:r})=>{try{await m({files:a,path:r}).unwrap(),n.success("Files uploaded",{duration:2e3})}catch(u){console.error("Upload failed:",u),n.error("Upload failed",{duration:2e3})}},D=async a=>{const r=a.target.files;r&&await C({files:r})},w=async(a,r)=>{await C({files:r,path:a})},x=()=>p(null),z=async a=>{const r=a.trim();if(!I(r)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:r,path:""}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch(u){console.error("Create folder failed:",u),n.error("Create folder failed",{duration:2e3})}},k=async(a,r)=>{const u=r.trim();if(!I(u)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:u,path:a}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch($){console.error("Create folder failed:",$),n.error("Create folder failed",{duration:2e3})}},F=async a=>{try{await d(a).unwrap(),n.success("Moved to deleted",{duration:2e3})}catch(r){console.error("Delete failed:",r),n.error("Delete failed",{duration:2e3})}},P=a=>{g(a)},L=()=>{g(null)},o=async a=>{await F(a),g(null)},M=f.useMemo(()=>h?.toSorted((a,r)=>a.type==="directory"&&r.type!=="directory"?-1:a.type!=="directory"&&r.type==="directory"?1:a.name.localeCompare(r.name)).map(a=>e.jsx(V,{node:a,onDelete:F,onChange:l,disableActions:t,onUpload:w,createTarget:y,onStartCreateInDirectory:r=>p({kind:"directory",path:r}),onConfirmCreateInDirectory:k,onCancelCreate:x,deleteTarget:b,onStartDelete:P,onCancelDelete:L,onConfirmDelete:o,isDeleting:c.isLoading},a.name)),[h,t,l,y,b,c.isLoading]);return e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),!t&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"file",multiple:!0,onChange:D,className:"hidden",id:"file-upload"}),e.jsxs("label",{htmlFor:"file-upload",className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Upload File",children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files"})]}),e.jsxs("button",{onClick:()=>p({kind:"root"}),className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Create Folder",disabled:N.isLoading,children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder"})]})]})]}),!t&&e.jsx(fe,{visible:y?.kind==="root",disabled:N.isLoading,onConfirm:z,onCancel:x}),M]})}export{we as F,le as a};
|
|
1
|
+
import{a as f,p as e,x as q}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{D as Z,E as G,F as B,G as K,u as Q,x as S,b as W,H as O}from"./utils-CCKKso3e.js";import{t as n}from"./index-CZSVchcX.js";import{B as X}from"./badge-gLcN3Bjg.js";import{U as T}from"./upload-DhJ5wU_H.js";import{c as v}from"./createLucideIcon-BvSqmaUO.js";import{F as J,T as Y}from"./trash-UKLAaALv.js";import{C as A,X as U}from"./x-BVtfHpQX.js";import{C as H}from"./check-DF0ucE8d.js";const ee=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],te=v("copy",ee);const se=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ae=v("file-text",se);const re=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],le=v("file",re);const oe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ie=v("folder-open",oe);const ne=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],R=v("folder-plus",ne);const ce=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_=v("folder",ce),de=["txt","md","html","pdf"],pe=["svg","webp","png","jpeg","jpg"],me=[{Icon:J,test:t=>pe.some(l=>t.name.endsWith(l))},{Icon:ae,test:t=>de.some(l=>t.name.endsWith(l))}],ue={Icon:le};function I(t){return!(!t.trim()||t==="."||t===".."||t.includes("/")||t.includes("\\"))}function fe({visible:t,onConfirm:l,onCancel:h,disabled:d}){const[c,m]=f.useState("");return f.useEffect(()=>{t&&m("")},[t]),t?e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2 border-b",onClick:i=>i.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:c,onChange:i=>m(i.target.value),onKeyDown:i=>{i.key==="Enter"&&l(c),i.key==="Escape"&&h()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm",disabled:d})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:"--"})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:()=>l(c),disabled:d||!c.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:h,disabled:d,children:e.jsx(U,{size:16})})]})]}):null}const V=({node:t,level:l=0,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w})=>{const[x,z]=f.useState(!1),[k,F]=f.useState(""),{data:P}=Q(),L=me.find(s=>s.test(t))??ue,o=t.type==="directory",M=o||d?"div":q,a=i?.kind==="directory"&&o&&i.path===t.relativePath,r=b===t.relativePath;f.useEffect(()=>{a&&F("")},[a]);const u=()=>{o&&z(!x)},$=s=>{const j=s.target.files;j&&m&&m(t.relativePath,j)},E=()=>{y(t.relativePath,k)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(M,{to:`/${t.relativePath}`,target:"_blank",className:S("flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",r&&"bg-red-50 hover:bg-red-50"),style:{paddingLeft:`calc(0.5rem + ${l*20}px)`},onClick:o?u:d?()=>d(t.isLarge?`${P?.largeFilesUrl}/${t.relativePath}`:t.relativePath):void 0,children:[o?e.jsx(A,{size:16,className:W("transition-transform",{"rotate-180":x})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[o?x?e.jsx(ie,{size:16,className:"text-yellow-500"}):e.jsx(_,{size:16,className:"text-yellow-500"}):e.jsx(L.Icon,{size:16,className:" text-gray-500"}),e.jsxs("span",{className:"flex gap-2 items-center text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:[!o&&t.isLarge&&e.jsx(X,{variant:"outline",children:"Large"}),t.name]})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:o?"--":O(t.size)})}),!c&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-50",children:[o&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"file",multiple:!0,onChange:$,className:"hidden",id:`dir-upload-${t.relativePath}-${l}`}),e.jsxs("label",{htmlFor:`dir-upload-${t.relativePath}-${l}`,className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>s.stopPropagation(),children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files to this folder"})]}),e.jsxs("button",{className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),z(!0),N(t.relativePath)},title:"Create Folder",children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder in this directory"})]})]}),e.jsxs("button",{className:S("hover:text-yellow-500 p-1 hover:bg-muted rounded-sm cursor-pointer",o&&"hidden"),onClick:async s=>{s.preventDefault(),s.stopPropagation();try{await navigator.clipboard.writeText(t.path),n.success("File URL copied to clipboard",{duration:2e3})}catch(j){console.error("Copy failed:",j),n.error("Failed to copy to clipboard",{duration:2e3})}},title:"Copy file URL",children:[e.jsx(te,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),r?e.jsxs("div",{className:"flex items-center gap-1",onClick:s=>s.stopPropagation(),children:[e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 text-red-600 cursor-pointer",title:"Confirm delete",onClick:s=>{s.preventDefault(),s.stopPropagation(),D(t.relativePath)},disabled:w,children:[e.jsx(H,{size:16}),e.jsx("span",{className:"sr-only",children:"Confirm delete"})]}),e.jsxs("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50 cursor-pointer",title:"Cancel",onClick:s=>{s.preventDefault(),s.stopPropagation(),C()},disabled:w,children:[e.jsx(U,{size:16}),e.jsx("span",{className:"sr-only",children:"Cancel delete"})]})]}):e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm cursor-pointer",onClick:s=>{s.preventDefault(),s.stopPropagation(),g(t.relativePath)},title:`Delete this ${o?"folder":"file"}`,children:[e.jsx(Y,{size:16}),e.jsxs("span",{className:"sr-only",children:["Delete this ",o?"folder":"file"]})]})]})]}),o&&x&&e.jsxs("div",{children:[!c&&a&&e.jsxs("div",{className:"flex items-center gap-2 h-10 p-2",style:{paddingLeft:`calc(0.5rem + ${(l+1)*20}px)`},onClick:s=>s.stopPropagation(),children:[e.jsx("div",{className:"w-4"}),e.jsx(_,{size:16,className:"text-yellow-500"}),e.jsx("input",{autoFocus:!0,value:k,onChange:s=>F(s.target.value),onKeyDown:s=>{s.key==="Enter"&&E(),s.key==="Escape"&&p()},placeholder:"New folder name",className:"h-8 flex-1 rounded-md border px-2 text-sm"}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm disabled:opacity-50",title:"Create",onClick:E,disabled:!k.trim(),children:e.jsx(H,{size:16})}),e.jsx("button",{className:"p-1 hover:bg-muted rounded-sm",title:"Cancel",onClick:p,children:e.jsx(U,{size:16})})]}),t.children?.map((s,j)=>e.jsx(V,{node:s,level:l+1,onDelete:h,onChange:d,disableActions:c,onUpload:m,createTarget:i,onStartCreateInDirectory:N,onConfirmCreateInDirectory:y,onCancelCreate:p,deleteTarget:b,onStartDelete:g,onCancelDelete:C,onConfirmDelete:D,isDeleting:w},`${s.name}-${j}`))]})]})};function we({disableActions:t,onChange:l}){const{data:h}=Z(),[d,c]=G(),[m]=B(),[i,N]=K(),[y,p]=f.useState(null),[b,g]=f.useState(null),C=async({files:a,path:r})=>{try{await m({files:a,path:r}).unwrap(),n.success("Files uploaded",{duration:2e3})}catch(u){console.error("Upload failed:",u),n.error("Upload failed",{duration:2e3})}},D=async a=>{const r=a.target.files;r&&await C({files:r})},w=async(a,r)=>{await C({files:r,path:a})},x=()=>p(null),z=async a=>{const r=a.trim();if(!I(r)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:r,path:""}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch(u){console.error("Create folder failed:",u),n.error("Create folder failed",{duration:2e3})}},k=async(a,r)=>{const u=r.trim();if(!I(u)){n.error("Invalid folder name",{duration:2e3});return}try{await i({name:u,path:a}).unwrap(),n.success("Folder created",{duration:2e3}),p(null)}catch($){console.error("Create folder failed:",$),n.error("Create folder failed",{duration:2e3})}},F=async a=>{try{await d(a).unwrap(),n.success("Moved to deleted",{duration:2e3})}catch(r){console.error("Delete failed:",r),n.error("Delete failed",{duration:2e3})}},P=a=>{g(a)},L=()=>{g(null)},o=async a=>{await F(a),g(null)},M=f.useMemo(()=>h?.toSorted((a,r)=>a.type==="directory"&&r.type!=="directory"?-1:a.type!=="directory"&&r.type==="directory"?1:a.name.localeCompare(r.name)).map(a=>e.jsx(V,{node:a,onDelete:F,onChange:l,disableActions:t,onUpload:w,createTarget:y,onStartCreateInDirectory:r=>p({kind:"directory",path:r}),onConfirmCreateInDirectory:k,onCancelCreate:x,deleteTarget:b,onStartDelete:P,onCancelDelete:L,onConfirmDelete:o,isDeleting:c.isLoading},a.name)),[h,t,l,y,b,c.isLoading]);return e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),!t&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"file",multiple:!0,onChange:D,className:"hidden",id:"file-upload"}),e.jsxs("label",{htmlFor:"file-upload",className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Upload File",children:[e.jsx(T,{size:16}),e.jsx("span",{className:"sr-only",children:"Upload files"})]}),e.jsxs("button",{onClick:()=>p({kind:"root"}),className:"hover:text-blue-500 p-1 hover:bg-muted rounded-sm cursor-pointer",title:"Create Folder",disabled:N.isLoading,children:[e.jsx(R,{size:16}),e.jsx("span",{className:"sr-only",children:"Create folder"})]})]})]}),!t&&e.jsx(fe,{visible:y?.kind==="root",disabled:N.isLoading,onConfirm:z,onCancel:x}),M]})}export{we as F,le as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,p as e,w as j,v as g}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{S as b,L as N}from"./Loading-MKgXMPvl.js";import{B as w}from"./index-BhARCKRr.js";import{u as F,a as L,F as v,b as t,c as n,d,e as i,f as m,C as y}from"./zod-BFfp0fV9.js";import{I as x}from"./input-Bk91TMQj.js";import{u as C,c,l as S}from"./authSlice-BI_rlf3v.js";import{o as E,s as p,b as k}from"./schemas-CPJfa6mm.js";import"./utils-CCKKso3e.js";import"./loader-circle-BDUbeTTe.js";import"./createLucideIcon-BvSqmaUO.js";import"./index-CtLWaleL.js";import"./index-DLIEpuwL.js";import"./index-CHzEoQKp.js";import"./check-DF0ucE8d.js";const P=E({email:p().nonempty("Please enter your email").email(),password:p().nonempty("Please enter your password"),remember:k()});function A(){"use no memo";const o=C(),r=c(s=>s.auth.isLoading),a=F({resolver:L(P),disabled:r,defaultValues:{email:"",password:"",remember:!1}}),l=u.useCallback(({email:s,password:h,remember:f})=>{o(S({email:s,password:h,remember:f}))},[o]);return e.jsx("div",{className:"flex flex-col",children:e.jsx(v,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(l),className:"space-y-4",children:[e.jsx(t,{control:a.control,name:"email",rules:{required:!0},render:({field:s})=>e.jsxs(n,{children:[e.jsx(d,{className:"flex gap-1 items-baseline",children:"Email"}),e.jsx(i,{children:e.jsx(x,{placeholder:"callasmaria@example.com",...s,autoComplete:"email"})}),e.jsx(m,{})]})}),e.jsx(t,{name:"password",control:a.control,rules:{required:!0},render:({field:s})=>e.jsxs(n,{children:[e.jsx(d,{className:"flex gap-1 items-baseline",children:"Password"}),e.jsx(i,{children:e.jsx(x,{type:"password",...s,autoComplete:"current-password"})}),e.jsx(m,{})]})}),e.jsx(t,{name:"remember",control:a.control,render:({field:s})=>e.jsxs(n,{children:[e.jsx(i,{children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(y,{id:"remember",checked:s.value,onCheckedChange:s.onChange}),e.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),e.jsx(m,{})]})}),e.jsx(w,{type:"submit",disabled:!a.formState.isValid||r,className:"w-full",children:r?e.jsx(b,{className:"absolute"}):"Login"})]})})})}const Q=j(function(){const r=g(),a=c(s=>s.auth.user),l=c(s=>s.auth.isLoading);return u.useEffect(()=>{a&&r("/admin/dashboard")},[r,a]),l||a?e.jsx(N,{message:"Logging in..."}):e.jsx("div",{className:"flex w-full h-full",children:e.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),e.jsx(A,{})]})})});export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as G,c as H,P as A,a as P,b as O,e as K}from"./index-
|
|
1
|
+
import{a as c,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{u as G,c as H,P as A,a as P,b as O,e as K}from"./index-BhARCKRr.js";import{u as _}from"./index-CtLWaleL.js";import{u as $,b as U,h as V,e as W,d as Z,F as q,f as z}from"./index-cCny74f5.js";import{c as E,R as B,A as w,a as J,C as Q}from"./index-B2dzkZu5.js";var x="Popover",[b]=H(x,[E]),g=E(),[X,u]=b(x),j=e=>{const{__scopePopover:n,children:t,open:s,defaultOpen:o,onOpenChange:r,modal:a=!1}=e,i=g(n),f=c.useRef(null),[v,h]=c.useState(!1),[C,l]=G({prop:s,defaultProp:o??!1,onChange:r,caller:x});return p.jsx(B,{...i,children:p.jsx(X,{scope:n,contentId:$(),triggerRef:f,open:C,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(m=>!m),[l]),hasCustomAnchor:v,onCustomAnchorAdd:c.useCallback(()=>h(!0),[]),onCustomAnchorRemove:c.useCallback(()=>h(!1),[]),modal:a,children:t})})};j.displayName=x;var F="PopoverAnchor",N=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(F,t),r=g(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return c.useEffect(()=>(a(),()=>i()),[a,i]),p.jsx(w,{...r,...s,ref:n})});N.displayName=F;var S="PopoverTrigger",y=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(S,t),r=g(t),a=_(n,o.triggerRef),i=p.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L(o.open),...s,ref:a,onClick:P(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(w,{asChild:!0,...r,children:i})});y.displayName=S;var R="PopoverPortal",[Y,ee]=b(R,{forceMount:void 0}),D=e=>{const{__scopePopover:n,forceMount:t,children:s,container:o}=e,r=u(R,n);return p.jsx(Y,{scope:n,forceMount:t,children:p.jsx(O,{present:t||r.open,children:p.jsx(U,{asChild:!0,container:o,children:s})})})};D.displayName=R;var d="PopoverContent",M=c.forwardRef((e,n)=>{const t=ee(d,e.__scopePopover),{forceMount:s=t.forceMount,...o}=e,r=u(d,e.__scopePopover);return p.jsx(O,{present:s||r.open,children:r.modal?p.jsx(re,{...o,ref:n}):p.jsx(te,{...o,ref:n})})});M.displayName=d;var oe=K("PopoverContent.RemoveScroll"),re=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(null),o=_(n,s),r=c.useRef(!1);return c.useEffect(()=>{const a=s.current;if(a)return V(a)},[]),p.jsx(W,{as:oe,allowPinchZoom:!0,children:p.jsx(T,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{a.preventDefault(),r.current||t.triggerRef.current?.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,v=i.button===2||f;r.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),te=c.forwardRef((e,n)=>{const t=u(d,e.__scopePopover),s=c.useRef(!1),o=c.useRef(!1);return p.jsx(T,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(s.current||t.triggerRef.current?.focus(),r.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(s.current=!0,r.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=r.target;t.triggerRef.current?.contains(a)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&o.current&&r.preventDefault()}})}),T=c.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onInteractOutside:h,...C}=e,l=u(d,t),m=g(t);return Z(),p.jsx(q,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:o,onUnmountAutoFocus:r,children:p.jsx(z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:v,onDismiss:()=>l.onOpenChange(!1),children:p.jsx(Q,{"data-state":L(l.open),role:"dialog",id:l.contentId,...m,...C,ref:n,style:{...C.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)"}})})})}),k="PopoverClose",ne=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=u(k,t);return p.jsx(A.button,{type:"button",...s,ref:n,onClick:P(e.onClick,()=>o.onOpenChange(!1))})});ne.displayName=k;var se="PopoverArrow",I=c.forwardRef((e,n)=>{const{__scopePopover:t,...s}=e,o=g(t);return p.jsx(J,{...o,...s,ref:n})});I.displayName=se;function L(e){return e?"open":"closed"}var le=j,de=N,fe=y,ve=D,Pe=M,ge=I;export{de as A,Pe as C,ve as P,le as R,fe as T,ge as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,p as z}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{a as Re}from"./index-DLIEpuwL.js";import{P as pt,c as Se,d as $t}from"./index-CGQzLeML.js";import{u as Yt}from"./index-BXchIULt.js";import{c as Ce}from"./index-DM_dKEtx.js";import{u as Pe}from"./index-B81oBFuU.js";const Oe=["top","right","bottom","left"],Z=Math.min,H=Math.max,at=Math.round,ct=Math.floor,I=t=>({x:t,y:t}),Ee={left:"right",right:"left",bottom:"top",top:"bottom"},Le={start:"end",end:"start"};function vt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}const De=new Set(["top","bottom"]);function j(t){return De.has(U(t))?"y":"x"}function Ct(t){return Rt(j(t))}function Me(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=Ct(t),i=St(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ft(s)),[s,ft(s)]}function Te(t){const e=ft(t);return[bt(t),e,bt(e)]}function bt(t){return t.replace(/start|end/g,e=>Le[e])}const Nt=["left","right"],kt=["right","left"],$e=["top","bottom"],Ne=["bottom","top"];function ke(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Nt:e?Nt:kt;case"left":case"right":return e?$e:Ne;default:return[]}}function Fe(t,e,n,o){const r=tt(t);let i=ke(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(bt)))),i}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Ee[e])}function He(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?He(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:r}=t;const i=j(e),s=Ct(e),c=St(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=m*(n&&a?-1:1);break;case"end":d[s]+=m*(n&&a?-1:1);break}return d}const We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=Ft(a,o,l),m=o,d={},p=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:b,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=b??u,d={...d,[w]:{...d[w],...y}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),{x:f,y:u}=Ft(a,m,l)),h=-1)}return{x:f,y:u,placement:m,strategy:r,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:d=0}=q(e,t),p=Xt(d),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),y=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},v=ut(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-v.top+p.top)/y.y,bottom:(v.bottom-g.bottom+p.bottom)/y.y,left:(g.left-v.left+p.left)/y.x,right:(v.right-g.right+p.right)/y.x}}const _e=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Xt(f),m={x:n,y:o},d=Ct(r),p=St(d),h=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[d]-m[d]-i.floating[p],v=m[d]-i.reference[d],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let S=C?C[b]:0;(!S||!await(s.isElement==null?void 0:s.isElement(C)))&&(S=c.floating[b]||i.floating[p]);const M=y/2-v/2,k=S/2-h[p]/2-1,D=Z(u[g],k),$=Z(u[x],k),N=D,O=S-h[p]-$,P=S/2-h[p]/2+M,F=vt(N,P,O),E=!l.arrow&&tt(r)!=null&&P!==F&&i.reference[p]/2-(P<N?D:$)-h[p]/2<0,L=E?P<N?P-N:P-O:0;return{[d]:m[d]+L,data:{[d]:F,centerOffset:P-F-L,...E&&{alignmentOffset:L}},reset:E}}}),Be=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=j(c),b=U(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(b||!h?[ft(c)]:Te(c)),C=p!=="none";!m&&C&&v.push(...Fe(c,h,p,y));const S=[c,...v],M=await ot(e,w),k=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&k.push(M[g]),u){const P=Me(r,s,y);k.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:k}],!k.every(P=>P<=0)){var $,N;const P=((($=i.flip)==null?void 0:$.index)||0)+1,F=S[P];if(F&&(!(u==="alignment"?x!==j(F):!1)||D.every(A=>j(A.placement)===x?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:F}};let E=(N=D.filter(L=>L.overflows[0]<=0).sort((L,A)=>L.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!E)switch(d){case"bestFit":{var O;const L=(O=D.filter(A=>{if(C){const T=j(A.placement);return T===x||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:O[0];L&&(E=L);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function Ht(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Oe.some(e=>t[e]>=0)}const Ve=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=q(t,e);switch(o){case"referenceHidden":{const i=await ot(e,{...r,elementContext:"reference"}),s=Ht(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{const i=await ot(e,{...r,altBoundary:!0}),s=Ht(i,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}},qt=new Set(["left","top"]);async function je(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=j(n)==="y",a=qt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:m*a}:{x:m*a,y:d*f}}const ze=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await je(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ie=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=q(t,e),a={x:n,y:o},f=await ot(e,l),u=j(U(r)),m=Rt(u);let d=a[m],p=a[u];if(i){const w=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=d+f[w],b=d-f[g];d=vt(x,d,b)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=p+f[w],b=p-f[g];p=vt(x,p,b)}const h=c.fn({...e,[m]:d,[u]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:i,[u]:s}}}}}},Ye=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=j(r),m=Rt(u);let d=f[m],p=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=m==="y"?"height":"width",y=i.reference[m]-i.floating[b]+w.mainAxis,v=i.reference[m]+i.reference[b]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const b=m==="y"?"width":"height",y=qt.has(U(r)),v=i.reference[u]-i.floating[b]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),C=i.reference[u]+i.reference[b]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);p<v?p=v:p>C&&(p=C)}return{[m]:d,[u]:p}}}},Xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await ot(e,a),u=U(r),m=tt(r),d=j(r)==="y",{width:p,height:h}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");const x=h-f.top-f.bottom,b=p-f.left-f.right,y=Z(h-f[w],x),v=Z(p-f[g],b),C=!e.middlewareData.shift;let S=y,M=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(S=x),C&&!m){const D=H(f.left,0),$=H(f.right,0),N=H(f.top,0),O=H(f.bottom,0);d?M=p-2*(D!==0||$!==0?D+$:H(f.left,f.right)):S=h-2*(N!==0||O!==0?N+O:H(f.top,f.bottom))}await l({...e,availableWidth:M,availableHeight:S});const k=await s.getDimensions(c.floating);return p!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function et(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return mt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return mt()?t instanceof Element||t instanceof W(t).Element:!1}function Y(t){return mt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function _t(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const qe=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!qe.has(r)}const Ue=new Set(["table","td","th"]);function Ze(t){return Ue.has(et(t))}const Ke=[":popover-open",":modal"];function ht(t){return Ke.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ge=["transform","translate","scale","rotate","perspective"],Je=["transform","translate","scale","rotate","perspective","filter"],Qe=["paint","layout","strict","content"];function Pt(t){const e=Ot(),n=_(t)?B(t):t;return Ge.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Je.some(o=>(n.willChange||"").includes(o))||Qe.some(o=>(n.contain||"").includes(o))}function tn(t){let e=K(t);for(;Y(e)&&!Q(e);){if(Pt(e))return e;if(ht(e))return null;e=K(e)}return null}function Ot(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const en=new Set(["html","body","#document"]);function Q(t){return en.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function gt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||X(t);return _t(e)?e.host:e}function Zt(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&it(e)?e:Zt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Zt(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=At(s);return e.concat(s,s.visualViewport||[],it(r)?r:[],c&&n?rt(c):[])}return e.concat(r,rt(r,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kt(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Y(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=at(n)!==i||at(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!Y(e))return I(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Kt(e);let s=(i?at(n.width):n.width)/o,c=(i?at(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const nn=I(0);function Gt(t){const e=W(t);return!Ot()||!e.visualViewport?nn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function on(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=I(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=on(i,n,o)?Gt(i):I(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const m=W(i),d=o&&_(o)?W(o):o;let p=m,h=At(p);for(;h&&o&&d!==p;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=b,a+=y,p=W(h),h=At(p)}}return ut({width:f,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(X(t)).left+n}function Jt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function rn(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=X(o),c=e?ht(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=I(1);const f=I(0),u=Y(o);if((u||!u&&!i)&&((et(o)!=="body"||it(s))&&(l=gt(o)),Y(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const m=s&&!u&&!i?Jt(s,l):I(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+m.x,y:n.y*a.y-l.scrollTop*a.y+f.y+m.y}}function sn(t){return Array.from(t.getClientRects())}function cn(t){const e=X(t),n=gt(t),o=t.ownerDocument.body,r=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+wt(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Bt=25;function ln(t,e){const n=W(t),o=X(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const f=Ot();(!f||f&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=wt(o);if(a<=0){const f=o.ownerDocument,u=f.body,m=getComputedStyle(u),d=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-u.clientWidth-d);p<=Bt&&(i-=p)}else a<=Bt&&(i+=a);return{width:i,height:s,x:c,y:l}}const an=new Set(["absolute","fixed"]);function fn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Y(t)?J(t):I(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Vt(t,e,n){let o;if(e==="viewport")o=ln(t,n);else if(e==="document")o=cn(X(t));else if(_(e))o=fn(e,n);else{const r=Gt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function Qt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||Qt(n,e)}function un(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=B(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),l=Pt(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&an.has(r.position)||it(s)&&!l&&Qt(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function dn(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?ht(e)?[]:un(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Vt(e,f,r);return a.top=H(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Vt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pn(t){const{width:e,height:n}=Kt(t);return{width:e,height:n}}function mn(t,e,n){const o=Y(e),r=X(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=I(0);function a(){l.x=wt(r)}if(o||!o&&!i)if((et(e)!=="body"||it(r))&&(c=gt(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?Jt(r,c):I(0),u=s.left+c.scrollLeft-l.x-f.x,m=s.top+c.scrollTop-l.y-f.y;return{x:u,y:m,width:s.width,height:s.height}}function xt(t){return B(t).position==="static"}function jt(t,e){if(!Y(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function te(t,e){const n=W(t);if(ht(t))return n;if(!Y(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!xt(r))return r;r=K(r)}return n}let o=jt(t,e);for(;o&&Ze(o)&&xt(o);)o=jt(o,e);return o&&Q(o)&&xt(o)&&!Pt(o)?n:o||tn(t)||n}const hn=async function(t){const e=this.getOffsetParent||te,n=this.getDimensions,o=await n(t.floating);return{reference:mn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gn(t){return B(t).direction==="rtl"}const wn={convertOffsetParentRelativeRectToViewportRelativeRect:rn,getDocumentElement:X,getClippingRect:dn,getOffsetParent:te,getElementRects:hn,getClientRects:sn,getDimensions:pn,getScale:J,isElement:_,isRTL:gn};function ee(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xn(t,e){let n=null,o;const r=X(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:m,height:d}=a;if(c||e(),!m||!d)return;const p=ct(u),h=ct(r.clientWidth-(f+m)),w=ct(r.clientHeight-(u+d)),g=ct(f),b={rootMargin:-p+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,l))||1};let y=!0;function v(C){const S=C[0].intersectionRatio;if(S!==l){if(!y)return s();S?s(!1,S):o=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!ee(a,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(t)}return s(!0),i}function yn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?rt(a):[],...rt(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?xn(a,n):null;let m=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,h=l?G(t):null;l&&w();function w(){const g=G(t);h&&!ee(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const vn=ze,bn=Ie,An=Be,Rn=Xe,Sn=Ve,zt=_e,Cn=Ye,Pn=(t,e,n)=>{const o=new Map,r={platform:wn,...n},i={...r.platform,_c:o};return We(t,e,{...r,platform:i})};var On=typeof document<"u",En=function(){},lt=On?R.useLayoutEffect:En;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!dt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ne(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function It(t,e){const n=ne(t);return Math.round(e*n)/n}function yt(t){const e=R.useRef(t);return lt(()=>{e.current=t}),e}function Ln(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,d]=R.useState(o);dt(m,o)||d(o);const[p,h]=R.useState(null),[w,g]=R.useState(null),x=R.useCallback(A=>{A!==C.current&&(C.current=A,h(A))},[]),b=R.useCallback(A=>{A!==S.current&&(S.current=A,g(A))},[]),y=i||p,v=s||w,C=R.useRef(null),S=R.useRef(null),M=R.useRef(f),k=l!=null,D=yt(l),$=yt(r),N=yt(a),O=R.useCallback(()=>{if(!C.current||!S.current)return;const A={placement:e,strategy:n,middleware:m};$.current&&(A.platform=$.current),Pn(C.current,S.current,A).then(T=>{const V={...T,isPositioned:N.current!==!1};P.current&&!dt(M.current,V)&&(M.current=V,Re.flushSync(()=>{u(V)}))})},[m,e,n,$,N]);lt(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[a]);const P=R.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(y&&(C.current=y),v&&(S.current=v),y&&v){if(D.current)return D.current(y,v,O);O()}},[y,v,O,D,k]);const F=R.useMemo(()=>({reference:C,floating:S,setReference:x,setFloating:b}),[x,b]),E=R.useMemo(()=>({reference:y,floating:v}),[y,v]),L=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!E.floating)return A;const T=It(E.floating,f.x),V=It(E.floating,f.y);return c?{...A,transform:"translate("+T+"px, "+V+"px)",...ne(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:V}},[n,c,E.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:O,refs:F,elements:E,floatingStyles:L}),[f,O,F,E,L])}const Dn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?zt({element:o.current,padding:r}).fn(n):{}:o?zt({element:o,padding:r}).fn(n):{}}}},Mn=(t,e)=>({...vn(t),options:[t,e]}),Tn=(t,e)=>({...bn(t),options:[t,e]}),$n=(t,e)=>({...Cn(t),options:[t,e]}),Nn=(t,e)=>({...An(t),options:[t,e]}),kn=(t,e)=>({...Rn(t),options:[t,e]}),Fn=(t,e)=>({...Sn(t),options:[t,e]}),Hn=(t,e)=>({...Dn(t),options:[t,e]});var Wn="Arrow",oe=R.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return z.jsx(pt.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:z.jsx("polygon",{points:"0,0 30,0 15,10"})})});oe.displayName=Wn;var _n=oe,Lt="Popper",[re,to]=Se(Lt),[Bn,ie]=re(Lt),se=t=>{const{__scopePopper:e,children:n}=t,[o,r]=R.useState(null);return z.jsx(Bn,{scope:e,anchor:o,onAnchorChange:r,children:n})};se.displayName=Lt;var ce="PopperAnchor",le=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=ie(ce,n),s=R.useRef(null),c=Yt(e,s),l=R.useRef(null);return R.useEffect(()=>{const a=l.current;l.current=o?.current||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:z.jsx(pt.div,{...r,ref:c})});le.displayName=ce;var Dt="PopperContent",[Vn,jn]=re(Dt),ae=R.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:d="optimized",onPlaced:p,...h}=t,w=ie(Dt,n),[g,x]=R.useState(null),b=Yt(e,nt=>x(nt)),[y,v]=R.useState(null),C=Pe(y),S=C?.width??0,M=C?.height??0,k=o+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],N=$.length>0,O={padding:D,boundary:$.filter(In),altBoundary:N},{refs:P,floatingStyles:F,placement:E,isPositioned:L,middlewareData:A}=Ln({strategy:"fixed",placement:k,whileElementsMounted:(...nt)=>yn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Mn({mainAxis:r+M,alignmentAxis:s}),l&&Tn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?$n():void 0,...O}),l&&Nn({...O}),kn({...O,apply:({elements:nt,rects:Tt,availableWidth:ye,availableHeight:ve})=>{const{width:be,height:Ae}=Tt.reference,st=nt.floating.style;st.setProperty("--radix-popper-available-width",`${ye}px`),st.setProperty("--radix-popper-available-height",`${ve}px`),st.setProperty("--radix-popper-anchor-width",`${be}px`),st.setProperty("--radix-popper-anchor-height",`${Ae}px`)}}),y&&Hn({element:y,padding:c}),Yn({arrowWidth:S,arrowHeight:M}),m&&Fn({strategy:"referenceHidden",...O})]}),[T,V]=de(E),Mt=Ce(p);$t(()=>{L&&Mt?.()},[L,Mt]);const me=A.arrow?.x,he=A.arrow?.y,ge=A.arrow?.centerOffset!==0,[we,xe]=R.useState();return $t(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),z.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:L?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:z.jsx(Vn,{scope:n,placedSide:T,onArrowChange:v,arrowX:me,arrowY:he,shouldHideArrow:ge,children:z.jsx(pt.div,{"data-side":T,"data-align":V,...h,ref:b,style:{...h.style,animation:L?void 0:"none"}})})})});ae.displayName=Dt;var fe="PopperArrow",zn={top:"bottom",right:"left",bottom:"top",left:"right"},ue=R.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=jn(fe,o),s=zn[i.placedSide];return z.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:z.jsx(_n,{...r,ref:n,style:{...r.style,display:"block"}})})});ue.displayName=fe;function In(t){return t!==null}var Yn=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=de(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(r.arrow?.x??0)+c/2,d=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=s?u:`${m}px`,h=`${-l}px`):a==="top"?(p=s?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=s?u:`${d}px`),{data:{x:p,y:h}}}});function de(t){const[e,n="center"]=t.split("-");return[e,n]}var eo=se,no=le,oo=ae,ro=ue,Xn=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"}),qn="VisuallyHidden",pe=R.forwardRef((t,e)=>z.jsx(pt.span,{...t,ref:e,style:{...Xn,...t.style}}));pe.displayName=qn;var io=pe;export{no as A,oo as C,eo as R,Xn as V,ro as a,io as b,to as c};
|
|
1
|
+
import{a as R,p as z}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{a as Re}from"./index-DLIEpuwL.js";import{P as pt,c as Se,d as $t}from"./index-BhARCKRr.js";import{u as Yt}from"./index-CtLWaleL.js";import{c as Ce}from"./index-cCny74f5.js";import{u as Pe}from"./index-CHzEoQKp.js";const Oe=["top","right","bottom","left"],Z=Math.min,H=Math.max,at=Math.round,ct=Math.floor,I=t=>({x:t,y:t}),Ee={left:"right",right:"left",bottom:"top",top:"bottom"},Le={start:"end",end:"start"};function vt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}const De=new Set(["top","bottom"]);function j(t){return De.has(U(t))?"y":"x"}function Ct(t){return Rt(j(t))}function Me(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=Ct(t),i=St(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ft(s)),[s,ft(s)]}function Te(t){const e=ft(t);return[bt(t),e,bt(e)]}function bt(t){return t.replace(/start|end/g,e=>Le[e])}const Nt=["left","right"],kt=["right","left"],$e=["top","bottom"],Ne=["bottom","top"];function ke(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Nt:e?Nt:kt;case"left":case"right":return e?$e:Ne;default:return[]}}function Fe(t,e,n,o){const r=tt(t);let i=ke(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(bt)))),i}function ft(t){return t.replace(/left|right|bottom|top/g,e=>Ee[e])}function He(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?He(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:r}=t;const i=j(e),s=Ct(e),c=St(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=m*(n&&a?-1:1);break;case"end":d[s]+=m*(n&&a?-1:1);break}return d}const We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=Ft(a,o,l),m=o,d={},p=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:b,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=b??u,d={...d,[w]:{...d[w],...y}},v&&p<=50&&(p++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),{x:f,y:u}=Ft(a,m,l)),h=-1)}return{x:f,y:u,placement:m,strategy:r,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:d=0}=q(e,t),p=Xt(d),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),y=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},v=ut(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-v.top+p.top)/y.y,bottom:(v.bottom-g.bottom+p.bottom)/y.y,left:(g.left-v.left+p.left)/y.x,right:(v.right-g.right+p.right)/y.x}}const _e=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Xt(f),m={x:n,y:o},d=Ct(r),p=St(d),h=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",y=i.reference[p]+i.reference[d]-m[d]-i.floating[p],v=m[d]-i.reference[d],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let S=C?C[b]:0;(!S||!await(s.isElement==null?void 0:s.isElement(C)))&&(S=c.floating[b]||i.floating[p]);const M=y/2-v/2,k=S/2-h[p]/2-1,D=Z(u[g],k),$=Z(u[x],k),N=D,O=S-h[p]-$,P=S/2-h[p]/2+M,F=vt(N,P,O),E=!l.arrow&&tt(r)!=null&&P!==F&&i.reference[p]/2-(P<N?D:$)-h[p]/2<0,L=E?P<N?P-N:P-O:0;return{[d]:m[d]+L,data:{[d]:F,centerOffset:P-F-L,...E&&{alignmentOffset:L}},reset:E}}}),Be=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=j(c),b=U(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(b||!h?[ft(c)]:Te(c)),C=p!=="none";!m&&C&&v.push(...Fe(c,h,p,y));const S=[c,...v],M=await ot(e,w),k=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&k.push(M[g]),u){const P=Me(r,s,y);k.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:k}],!k.every(P=>P<=0)){var $,N;const P=((($=i.flip)==null?void 0:$.index)||0)+1,F=S[P];if(F&&(!(u==="alignment"?x!==j(F):!1)||D.every(A=>j(A.placement)===x?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:F}};let E=(N=D.filter(L=>L.overflows[0]<=0).sort((L,A)=>L.overflows[1]-A.overflows[1])[0])==null?void 0:N.placement;if(!E)switch(d){case"bestFit":{var O;const L=(O=D.filter(A=>{if(C){const T=j(A.placement);return T===x||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:O[0];L&&(E=L);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function Ht(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Oe.some(e=>t[e]>=0)}const Ve=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=q(t,e);switch(o){case"referenceHidden":{const i=await ot(e,{...r,elementContext:"reference"}),s=Ht(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{const i=await ot(e,{...r,altBoundary:!0}),s=Ht(i,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}},qt=new Set(["left","top"]);async function je(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=j(n)==="y",a=qt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:m*a}:{x:m*a,y:d*f}}const ze=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await je(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ie=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=q(t,e),a={x:n,y:o},f=await ot(e,l),u=j(U(r)),m=Rt(u);let d=a[m],p=a[u];if(i){const w=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=d+f[w],b=d-f[g];d=vt(x,d,b)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=p+f[w],b=p-f[g];p=vt(x,p,b)}const h=c.fn({...e,[m]:d,[u]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:i,[u]:s}}}}}},Ye=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=j(r),m=Rt(u);let d=f[m],p=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const b=m==="y"?"height":"width",y=i.reference[m]-i.floating[b]+w.mainAxis,v=i.reference[m]+i.reference[b]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const b=m==="y"?"width":"height",y=qt.has(U(r)),v=i.reference[u]-i.floating[b]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),C=i.reference[u]+i.reference[b]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);p<v?p=v:p>C&&(p=C)}return{[m]:d,[u]:p}}}},Xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await ot(e,a),u=U(r),m=tt(r),d=j(r)==="y",{width:p,height:h}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=m==="end"?"top":"bottom");const x=h-f.top-f.bottom,b=p-f.left-f.right,y=Z(h-f[w],x),v=Z(p-f[g],b),C=!e.middlewareData.shift;let S=y,M=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(S=x),C&&!m){const D=H(f.left,0),$=H(f.right,0),N=H(f.top,0),O=H(f.bottom,0);d?M=p-2*(D!==0||$!==0?D+$:H(f.left,f.right)):S=h-2*(N!==0||O!==0?N+O:H(f.top,f.bottom))}await l({...e,availableWidth:M,availableHeight:S});const k=await s.getDimensions(c.floating);return p!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function et(t){return Ut(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Ut(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ut(t){return mt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return mt()?t instanceof Element||t instanceof W(t).Element:!1}function Y(t){return mt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function _t(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const qe=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!qe.has(r)}const Ue=new Set(["table","td","th"]);function Ze(t){return Ue.has(et(t))}const Ke=[":popover-open",":modal"];function ht(t){return Ke.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ge=["transform","translate","scale","rotate","perspective"],Je=["transform","translate","scale","rotate","perspective","filter"],Qe=["paint","layout","strict","content"];function Pt(t){const e=Ot(),n=_(t)?B(t):t;return Ge.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Je.some(o=>(n.willChange||"").includes(o))||Qe.some(o=>(n.contain||"").includes(o))}function tn(t){let e=K(t);for(;Y(e)&&!Q(e);){if(Pt(e))return e;if(ht(e))return null;e=K(e)}return null}function Ot(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const en=new Set(["html","body","#document"]);function Q(t){return en.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function gt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||X(t);return _t(e)?e.host:e}function Zt(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&it(e)?e:Zt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Zt(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=At(s);return e.concat(s,s.visualViewport||[],it(r)?r:[],c&&n?rt(c):[])}return e.concat(r,rt(r,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Kt(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Y(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=at(n)!==i||at(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!Y(e))return I(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Kt(e);let s=(i?at(n.width):n.width)/o,c=(i?at(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const nn=I(0);function Gt(t){const e=W(t);return!Ot()||!e.visualViewport?nn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function on(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=I(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=on(i,n,o)?Gt(i):I(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const m=W(i),d=o&&_(o)?W(o):o;let p=m,h=At(p);for(;h&&o&&d!==p;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=b,a+=y,p=W(h),h=At(p)}}return ut({width:f,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(X(t)).left+n}function Jt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function rn(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=X(o),c=e?ht(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=I(1);const f=I(0),u=Y(o);if((u||!u&&!i)&&((et(o)!=="body"||it(s))&&(l=gt(o)),Y(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const m=s&&!u&&!i?Jt(s,l):I(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+m.x,y:n.y*a.y-l.scrollTop*a.y+f.y+m.y}}function sn(t){return Array.from(t.getClientRects())}function cn(t){const e=X(t),n=gt(t),o=t.ownerDocument.body,r=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+wt(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Bt=25;function ln(t,e){const n=W(t),o=X(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const f=Ot();(!f||f&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=wt(o);if(a<=0){const f=o.ownerDocument,u=f.body,m=getComputedStyle(u),d=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-u.clientWidth-d);p<=Bt&&(i-=p)}else a<=Bt&&(i+=a);return{width:i,height:s,x:c,y:l}}const an=new Set(["absolute","fixed"]);function fn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Y(t)?J(t):I(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Vt(t,e,n){let o;if(e==="viewport")o=ln(t,n);else if(e==="document")o=cn(X(t));else if(_(e))o=fn(e,n);else{const r=Gt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function Qt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||Qt(n,e)}function un(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=B(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),l=Pt(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&an.has(r.position)||it(s)&&!l&&Qt(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function dn(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?ht(e)?[]:un(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Vt(e,f,r);return a.top=H(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Vt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pn(t){const{width:e,height:n}=Kt(t);return{width:e,height:n}}function mn(t,e,n){const o=Y(e),r=X(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=I(0);function a(){l.x=wt(r)}if(o||!o&&!i)if((et(e)!=="body"||it(r))&&(c=gt(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?Jt(r,c):I(0),u=s.left+c.scrollLeft-l.x-f.x,m=s.top+c.scrollTop-l.y-f.y;return{x:u,y:m,width:s.width,height:s.height}}function xt(t){return B(t).position==="static"}function jt(t,e){if(!Y(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function te(t,e){const n=W(t);if(ht(t))return n;if(!Y(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!xt(r))return r;r=K(r)}return n}let o=jt(t,e);for(;o&&Ze(o)&&xt(o);)o=jt(o,e);return o&&Q(o)&&xt(o)&&!Pt(o)?n:o||tn(t)||n}const hn=async function(t){const e=this.getOffsetParent||te,n=this.getDimensions,o=await n(t.floating);return{reference:mn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gn(t){return B(t).direction==="rtl"}const wn={convertOffsetParentRelativeRectToViewportRelativeRect:rn,getDocumentElement:X,getClippingRect:dn,getOffsetParent:te,getElementRects:hn,getClientRects:sn,getDimensions:pn,getScale:J,isElement:_,isRTL:gn};function ee(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xn(t,e){let n=null,o;const r=X(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:m,height:d}=a;if(c||e(),!m||!d)return;const p=ct(u),h=ct(r.clientWidth-(f+m)),w=ct(r.clientHeight-(u+d)),g=ct(f),b={rootMargin:-p+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,l))||1};let y=!0;function v(C){const S=C[0].intersectionRatio;if(S!==l){if(!y)return s();S?s(!1,S):o=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!ee(a,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(t)}return s(!0),i}function yn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?rt(a):[],...rt(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?xn(a,n):null;let m=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,h=l?G(t):null;l&&w();function w(){const g=G(t);h&&!ee(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const vn=ze,bn=Ie,An=Be,Rn=Xe,Sn=Ve,zt=_e,Cn=Ye,Pn=(t,e,n)=>{const o=new Map,r={platform:wn,...n},i={...r.platform,_c:o};return We(t,e,{...r,platform:i})};var On=typeof document<"u",En=function(){},lt=On?R.useLayoutEffect:En;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!dt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ne(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function It(t,e){const n=ne(t);return Math.round(e*n)/n}function yt(t){const e=R.useRef(t);return lt(()=>{e.current=t}),e}function Ln(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=R.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,d]=R.useState(o);dt(m,o)||d(o);const[p,h]=R.useState(null),[w,g]=R.useState(null),x=R.useCallback(A=>{A!==C.current&&(C.current=A,h(A))},[]),b=R.useCallback(A=>{A!==S.current&&(S.current=A,g(A))},[]),y=i||p,v=s||w,C=R.useRef(null),S=R.useRef(null),M=R.useRef(f),k=l!=null,D=yt(l),$=yt(r),N=yt(a),O=R.useCallback(()=>{if(!C.current||!S.current)return;const A={placement:e,strategy:n,middleware:m};$.current&&(A.platform=$.current),Pn(C.current,S.current,A).then(T=>{const V={...T,isPositioned:N.current!==!1};P.current&&!dt(M.current,V)&&(M.current=V,Re.flushSync(()=>{u(V)}))})},[m,e,n,$,N]);lt(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[a]);const P=R.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(y&&(C.current=y),v&&(S.current=v),y&&v){if(D.current)return D.current(y,v,O);O()}},[y,v,O,D,k]);const F=R.useMemo(()=>({reference:C,floating:S,setReference:x,setFloating:b}),[x,b]),E=R.useMemo(()=>({reference:y,floating:v}),[y,v]),L=R.useMemo(()=>{const A={position:n,left:0,top:0};if(!E.floating)return A;const T=It(E.floating,f.x),V=It(E.floating,f.y);return c?{...A,transform:"translate("+T+"px, "+V+"px)",...ne(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:V}},[n,c,E.floating,f.x,f.y]);return R.useMemo(()=>({...f,update:O,refs:F,elements:E,floatingStyles:L}),[f,O,F,E,L])}const Dn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?zt({element:o.current,padding:r}).fn(n):{}:o?zt({element:o,padding:r}).fn(n):{}}}},Mn=(t,e)=>({...vn(t),options:[t,e]}),Tn=(t,e)=>({...bn(t),options:[t,e]}),$n=(t,e)=>({...Cn(t),options:[t,e]}),Nn=(t,e)=>({...An(t),options:[t,e]}),kn=(t,e)=>({...Rn(t),options:[t,e]}),Fn=(t,e)=>({...Sn(t),options:[t,e]}),Hn=(t,e)=>({...Dn(t),options:[t,e]});var Wn="Arrow",oe=R.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return z.jsx(pt.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:z.jsx("polygon",{points:"0,0 30,0 15,10"})})});oe.displayName=Wn;var _n=oe,Lt="Popper",[re,to]=Se(Lt),[Bn,ie]=re(Lt),se=t=>{const{__scopePopper:e,children:n}=t,[o,r]=R.useState(null);return z.jsx(Bn,{scope:e,anchor:o,onAnchorChange:r,children:n})};se.displayName=Lt;var ce="PopperAnchor",le=R.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=ie(ce,n),s=R.useRef(null),c=Yt(e,s),l=R.useRef(null);return R.useEffect(()=>{const a=l.current;l.current=o?.current||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:z.jsx(pt.div,{...r,ref:c})});le.displayName=ce;var Dt="PopperContent",[Vn,jn]=re(Dt),ae=R.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:d="optimized",onPlaced:p,...h}=t,w=ie(Dt,n),[g,x]=R.useState(null),b=Yt(e,nt=>x(nt)),[y,v]=R.useState(null),C=Pe(y),S=C?.width??0,M=C?.height??0,k=o+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],N=$.length>0,O={padding:D,boundary:$.filter(In),altBoundary:N},{refs:P,floatingStyles:F,placement:E,isPositioned:L,middlewareData:A}=Ln({strategy:"fixed",placement:k,whileElementsMounted:(...nt)=>yn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Mn({mainAxis:r+M,alignmentAxis:s}),l&&Tn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?$n():void 0,...O}),l&&Nn({...O}),kn({...O,apply:({elements:nt,rects:Tt,availableWidth:ye,availableHeight:ve})=>{const{width:be,height:Ae}=Tt.reference,st=nt.floating.style;st.setProperty("--radix-popper-available-width",`${ye}px`),st.setProperty("--radix-popper-available-height",`${ve}px`),st.setProperty("--radix-popper-anchor-width",`${be}px`),st.setProperty("--radix-popper-anchor-height",`${Ae}px`)}}),y&&Hn({element:y,padding:c}),Yn({arrowWidth:S,arrowHeight:M}),m&&Fn({strategy:"referenceHidden",...O})]}),[T,V]=de(E),Mt=Ce(p);$t(()=>{L&&Mt?.()},[L,Mt]);const me=A.arrow?.x,he=A.arrow?.y,ge=A.arrow?.centerOffset!==0,[we,xe]=R.useState();return $t(()=>{g&&xe(window.getComputedStyle(g).zIndex)},[g]),z.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:L?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:we,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:z.jsx(Vn,{scope:n,placedSide:T,onArrowChange:v,arrowX:me,arrowY:he,shouldHideArrow:ge,children:z.jsx(pt.div,{"data-side":T,"data-align":V,...h,ref:b,style:{...h.style,animation:L?void 0:"none"}})})})});ae.displayName=Dt;var fe="PopperArrow",zn={top:"bottom",right:"left",bottom:"top",left:"right"},ue=R.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=jn(fe,o),s=zn[i.placedSide];return z.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:z.jsx(_n,{...r,ref:n,style:{...r.style,display:"block"}})})});ue.displayName=fe;function In(t){return t!==null}var Yn=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=de(n),u={start:"0%",center:"50%",end:"100%"}[f],m=(r.arrow?.x??0)+c/2,d=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=s?u:`${m}px`,h=`${-l}px`):a==="top"?(p=s?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=s?u:`${d}px`),{data:{x:p,y:h}}}});function de(t){const[e,n="center"]=t.split("-");return[e,n]}var eo=se,no=le,oo=ae,ro=ue,Xn=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"}),qn="VisuallyHidden",pe=R.forwardRef((t,e)=>z.jsx(pt.span,{...t,ref:e,style:{...Xn,...t.style}}));pe.displayName=qn;var io=pe;export{no as A,oo as C,eo as R,Xn as V,ro as a,io as b,to as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as W,u as $,P as z,a as m,b as H,f as J}from"./index-
|
|
1
|
+
import{a as s,p}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{c as W,u as $,P as z,a as m,b as H,f as J}from"./index-BhARCKRr.js";import{u as N}from"./index-CtLWaleL.js";import{u as Q,b as Z,f as ee}from"./index-cCny74f5.js";import{c as S,R as te,A as oe,a as re,C as ne,b as se}from"./index-B2dzkZu5.js";var[O]=W("Tooltip",[S]),A=S(),G="TooltipProvider",ae=700,D="tooltip.open",[ie,j]=O(G),F=t=>{const{__scopeTooltip:o,delayDuration:e=ae,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:c}=t,i=s.useRef(!0),v=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{const d=a.current;return()=>window.clearTimeout(d)},[]),p.jsx(ie,{scope:o,isOpenDelayedRef:i,delayDuration:e,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(d=>{v.current=d},[]),disableHoverableContent:n,children:c})};F.displayName=G;var R="Tooltip",[ce,_]=O(R),B=t=>{const{__scopeTooltip:o,children:e,open:r,defaultOpen:n,onOpenChange:c,disableHoverableContent:i,delayDuration:v}=t,a=j(R,t.__scopeTooltip),d=A(o),[l,f]=s.useState(null),h=Q(),u=s.useRef(0),x=i??a.disableHoverableContent,C=v??a.delayDuration,T=s.useRef(!1),[g,y]=$({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(D))):a.onClose(),c?.(I)},caller:R}),w=s.useMemo(()=>g?T.current?"delayed-open":"instant-open":"closed",[g]),P=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,T.current=!1,y(!0)},[y]),E=s.useCallback(()=>{window.clearTimeout(u.current),u.current=0,y(!1)},[y]),M=s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{T.current=!0,y(!0),u.current=0},C)},[C,y]);return s.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),p.jsx(te,{...d,children:p.jsx(ce,{scope:o,contentId:h,open:g,stateAttribute:w,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?M():P()},[a.isOpenDelayedRef,M,P]),onTriggerLeave:s.useCallback(()=>{x?E():(window.clearTimeout(u.current),u.current=0)},[E,x]),onOpen:P,onClose:E,disableHoverableContent:x,children:e})})};B.displayName=R;var L="TooltipTrigger",U=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=_(L,e),c=j(L,e),i=A(e),v=s.useRef(null),a=N(o,v,n.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(oe,{asChild:!0,...i,children:p.jsx(z.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:m(t.onPointerMove,h=>{h.pointerType!=="touch"&&!l.current&&!c.isPointerInTransitRef.current&&(n.onTriggerEnter(),l.current=!0)}),onPointerLeave:m(t.onPointerLeave,()=>{n.onTriggerLeave(),l.current=!1}),onPointerDown:m(t.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:m(t.onFocus,()=>{d.current||n.onOpen()}),onBlur:m(t.onBlur,n.onClose),onClick:m(t.onClick,n.onClose)})})});U.displayName=L;var k="TooltipPortal",[le,ue]=O(k,{forceMount:void 0}),V=t=>{const{__scopeTooltip:o,forceMount:e,children:r,container:n}=t,c=_(k,o);return p.jsx(le,{scope:o,forceMount:e,children:p.jsx(H,{present:e||c.open,children:p.jsx(Z,{asChild:!0,container:n,children:r})})})};V.displayName=k;var b="TooltipContent",Y=s.forwardRef((t,o)=>{const e=ue(b,t.__scopeTooltip),{forceMount:r=e.forceMount,side:n="top",...c}=t,i=_(b,t.__scopeTooltip);return p.jsx(H,{present:r||i.open,children:i.disableHoverableContent?p.jsx(q,{side:n,...c,ref:o}):p.jsx(pe,{side:n,...c,ref:o})})}),pe=s.forwardRef((t,o)=>{const e=_(b,t.__scopeTooltip),r=j(b,t.__scopeTooltip),n=s.useRef(null),c=N(o,n),[i,v]=s.useState(null),{trigger:a,onClose:d}=e,l=n.current,{onPointerInTransitChange:f}=r,h=s.useCallback(()=>{v(null),f(!1)},[f]),u=s.useCallback((x,C)=>{const T=x.currentTarget,g={x:x.clientX,y:x.clientY},y=he(g,T.getBoundingClientRect()),w=xe(g,y),P=Te(C.getBoundingClientRect()),E=ye([...w,...P]);v(E),f(!0)},[f]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&l){const x=T=>u(T,l),C=T=>u(T,a);return a.addEventListener("pointerleave",x),l.addEventListener("pointerleave",C),()=>{a.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",C)}}},[a,l,u,h]),s.useEffect(()=>{if(i){const x=C=>{const T=C.target,g={x:C.clientX,y:C.clientY},y=a?.contains(T)||l?.contains(T),w=!Ce(g,i);y?h():w&&(h(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[a,l,i,d,h]),p.jsx(q,{...t,ref:c})}),[de,fe]=O(R,{isInside:!1}),ve=J("TooltipContent"),q=s.forwardRef((t,o)=>{const{__scopeTooltip:e,children:r,"aria-label":n,onEscapeKeyDown:c,onPointerDownOutside:i,...v}=t,a=_(b,e),d=A(e),{onClose:l}=a;return s.useEffect(()=>(document.addEventListener(D,l),()=>document.removeEventListener(D,l)),[l]),s.useEffect(()=>{if(a.trigger){const f=h=>{h.target?.contains(a.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[a.trigger,l]),p.jsx(ee,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:p.jsxs(ne,{"data-state":a.stateAttribute,...d,...v,ref:o,style:{...v.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:[p.jsx(ve,{children:r}),p.jsx(de,{scope:e,isInside:!0,children:p.jsx(se,{id:a.contentId,role:"tooltip",children:n||r})})]})})});Y.displayName=b;var X="TooltipArrow",K=s.forwardRef((t,o)=>{const{__scopeTooltip:e,...r}=t,n=A(e);return fe(X,e).isInside?null:p.jsx(re,{...n,...r,ref:o})});K.displayName=X;function he(t,o){const e=Math.abs(o.top-t.y),r=Math.abs(o.bottom-t.y),n=Math.abs(o.right-t.x),c=Math.abs(o.left-t.x);switch(Math.min(e,r,n,c)){case c:return"left";case n:return"right";case e:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function xe(t,o,e=5){const r=[];switch(o){case"top":r.push({x:t.x-e,y:t.y+e},{x:t.x+e,y:t.y+e});break;case"bottom":r.push({x:t.x-e,y:t.y-e},{x:t.x+e,y:t.y-e});break;case"left":r.push({x:t.x+e,y:t.y-e},{x:t.x+e,y:t.y+e});break;case"right":r.push({x:t.x-e,y:t.y-e},{x:t.x-e,y:t.y+e});break}return r}function Te(t){const{top:o,right:e,bottom:r,left:n}=t;return[{x:n,y:o},{x:e,y:o},{x:e,y:r},{x:n,y:r}]}function Ce(t,o){const{x:e,y:r}=t;let n=!1;for(let c=0,i=o.length-1;c<o.length;i=c++){const v=o[c],a=o[i],d=v.x,l=v.y,f=a.x,h=a.y;l>r!=h>r&&e<(f-d)*(r-l)/(h-l)+d&&(n=!n)}return n}function ye(t){const o=t.slice();return o.sort((e,r)=>e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0),ge(o)}function ge(t){if(t.length<=1)return t.slice();const o=[];for(let r=0;r<t.length;r++){const n=t[r];for(;o.length>=2;){const c=o[o.length-1],i=o[o.length-2];if((c.x-i.x)*(n.y-i.y)>=(c.y-i.y)*(n.x-i.x))o.pop();else break}o.push(n)}o.pop();const e=[];for(let r=t.length-1;r>=0;r--){const n=t[r];for(;e.length>=2;){const c=e[e.length-1],i=e[e.length-2];if((c.x-i.x)*(n.y-i.y)>=(c.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}return e.pop(),o.length===1&&e.length===1&&o[0].x===e[0].x&&o[0].y===e[0].y?o:o.concat(e)}var Re=F,_e=B,Oe=U,Ae=V,De=Y,Le=K;export{Le as A,De as C,Re as P,_e as R,Oe as T,Ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as v,a as s,B as N}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{S as E,c as C,u as w,b as P}from"./index-
|
|
1
|
+
import{p as v,a as s,B as N}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{S as E,c as C,u as w,b as P}from"./index-CtLWaleL.js";import{b as R}from"./utils-CCKKso3e.js";import{a as A}from"./index-DLIEpuwL.js";const O=C("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md 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 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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function G({className:t,variant:e,size:n,asChild:o=!1,...r}){const i=o?E:"button";return v.jsx(i,{"data-slot":"button",className:R(O({variant:e,size:n,className:t})),...r})}function J(t,e){const n=s.createContext(e),o=i=>{const{children:a,...c}=i,u=s.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:u,children:a})};o.displayName=t+"Provider";function r(i){const a=s.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[o,r]}function K(t,e=[]){let n=[];function o(i,a){const c=s.createContext(a),u=n.length;n=[...n,a];const l=d=>{const{scope:p,children:m,...g}=d,b=p?.[t]?.[u]||c,x=s.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:x,children:m})};l.displayName=i+"Provider";function f(d,p){const m=p?.[t]?.[u]||c,g=s.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,f]}const r=()=>{const i=n.map(a=>s.createContext(a));return function(c){const u=c?.[t]||i;return s.useMemo(()=>({[`__scope${t}`]:{...c,[t]:u}}),[c,u])}};return r.scopeName=t,[o,M(r,...e)]}function M(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const o=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((c,{useScope:u,scopeName:l})=>{const d=u(i)[`__scope${l}`];return{...c,...d}},{});return s.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Q(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t?.(r),n===!1||!r.defaultPrevented)return e?.(r)}}var y=globalThis?.document?s.useLayoutEffect:()=>{},_=N[" useInsertionEffect ".trim().toString()]||y;function X({prop:t,defaultProp:e,onChange:n=()=>{},caller:o}){const[r,i,a]=I({defaultProp:e,onChange:n}),c=t!==void 0,u=c?t:r;{const f=s.useRef(t!==void 0);s.useEffect(()=>{const d=f.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"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=c},[c,o])}const l=s.useCallback(f=>{if(c){const d=T(f)?f(t):f;d!==t&&a.current?.(d)}else i(f)},[c,t,i,a]);return[u,l]}function I({defaultProp:t,onChange:e}){const[n,o]=s.useState(t),r=s.useRef(n),i=s.useRef(e);return _(()=>{i.current=e},[e]),s.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}function T(t){return typeof t=="function"}function j(t,e){return s.useReducer((n,o)=>e[n][o]??n,t)}var $=t=>{const{present:e,children:n}=t,o=k(e),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),i=w(o.ref,D(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:i}):null};$.displayName="Presence";function k(t){const[e,n]=s.useState(),o=s.useRef(null),r=s.useRef(t),i=s.useRef("none"),a=t?"mounted":"unmounted",[c,u]=j(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=h(o.current);i.current=c==="mounted"?l:"none"},[c]),y(()=>{const l=o.current,f=r.current;if(f!==t){const p=i.current,m=h(l);t?u("MOUNT"):m==="none"||l?.display==="none"?u("UNMOUNT"):u(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,u]),y(()=>{if(e){let l;const f=e.ownerDocument.defaultView??window,d=m=>{const b=h(o.current).includes(CSS.escape(m.animationName));if(m.target===e&&b&&(u("ANIMATION_END"),!r.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",l=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},p=m=>{m.target===e&&(i.current=h(o.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{f.clearTimeout(l),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function h(t){return t?.animationName||"none"}function D(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function U(t){const e=W(t),n=s.forwardRef((o,r)=>{const{children:i,...a}=o,c=s.Children.toArray(i),u=c.find(L);if(u){const l=u.props.children,f=c.map(d=>d===u?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:d);return v.jsx(e,{...a,ref:r,children:s.isValidElement(l)?s.cloneElement(l,void 0,f):null})}return v.jsx(e,{...a,ref:r,children:i})});return n.displayName=`${t}.Slot`,n}function W(t){const e=s.forwardRef((n,o)=>{const{children:r,...i}=n;if(s.isValidElement(r)){const a=V(r),c=F(i,r.props);return r.type!==s.Fragment&&(c.ref=o?P(o,a):a),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var S=Symbol("radix.slottable");function Y(t){const e=({children:n})=>v.jsx(v.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=S,e}function L(t){return s.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===S}function F(t,e){const n={...e};for(const o in e){const r=t[o],i=e[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{const u=i(...c);return r(...c),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...t,...n}}function V(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var B=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=B.reduce((t,e)=>{const n=U(`Primitive.${e}`),o=s.forwardRef((r,i)=>{const{asChild:a,...c}=r,u=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function te(t,e){t&&A.flushSync(()=>t.dispatchEvent(e))}export{G as B,ee as P,Q as a,$ as b,K as c,y as d,U as e,Y as f,O as g,te as h,J as i,X as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,p as c}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{d as p}from"./index-
|
|
1
|
+
import{a as d,p as c}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{d as p}from"./index-BhARCKRr.js";import"./index-DLIEpuwL.js";import{a as b}from"./index-CtLWaleL.js";function m(r){const[i,t]=d.useState(void 0);return p(()=>{if(r){t({width:r.offsetWidth,height:r.offsetHeight});const e=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const n=o[0];let s,a;if("borderBoxSize"in n){const f=n.borderBoxSize,u=Array.isArray(f)?f[0]:f;s=u.inlineSize,a=u.blockSize}else s=r.offsetWidth,a=r.offsetHeight;t({width:s,height:a})});return e.observe(r,{box:"border-box"}),()=>e.unobserve(r)}else t(void 0)},[r]),i}var v=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],x=v.reduce((r,i)=>{const t=b(`Primitive.${i}`),e=d.forwardRef((o,n)=>{const{asChild:s,...a}=o,f=s?t:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(f,{...a,ref:n})});return e.displayName=`Primitive.${i}`,{...r,[i]:e}},{});export{x as P,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,B as
|
|
1
|
+
import{a as s,B as x,p as C}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{x as g}from"./utils-CCKKso3e.js";function S(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function R(...n){return e=>{let t=!1;const l=n.map(r=>{const o=S(r,e);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;r<l.length;r++){const o=l[r];typeof o=="function"?o():S(n[r],null)}}}}function L(...n){return s.useCallback(R(...n),n)}var j=Symbol.for("react.lazy"),p=x[" use ".trim().toString()];function N(n){return typeof n=="object"&&n!==null&&"then"in n}function V(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===j&&"_payload"in n&&N(n._payload)}function O(n){const e=P(n),t=s.forwardRef((l,r)=>{let{children:o,...u}=l;V(o)&&typeof p=="function"&&(o=p(o._payload));const a=s.Children.toArray(o),d=a.find($);if(d){const i=d.props.children,c=a.map(f=>f===d?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:f);return C.jsx(e,{...u,ref:r,children:s.isValidElement(i)?s.cloneElement(i,void 0,c):null})}return C.jsx(e,{...u,ref:r,children:o})});return t.displayName=`${n}.Slot`,t}var w=O("Slot");function P(n){const e=s.forwardRef((t,l)=>{let{children:r,...o}=t;if(V(r)&&typeof p=="function"&&(r=p(r._payload)),s.isValidElement(r)){const u=W(r),a=T(o,r.props);return r.type!==s.Fragment&&(a.ref=l?R(l,u):u),s.cloneElement(r,a)}return s.Children.count(r)>1?s.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var A=Symbol("radix.slottable");function $(n){return s.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===A}function T(n,e){const t={...e};for(const l in e){const r=n[l],o=e[l];/^on[A-Z]/.test(l)?r&&o?t[l]=(...a)=>{const d=o(...a);return r(...a),d}:r&&(t[l]=r):l==="style"?t[l]={...r,...o}:l==="className"&&(t[l]=[r,o].filter(Boolean).join(" "))}return{...n,...t}}function W(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}const E=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,b=g,B=(n,e)=>t=>{var l;if(e?.variants==null)return b(n,t?.class,t?.className);const{variants:r,defaultVariants:o}=e,u=Object.keys(r).map(i=>{const c=t?.[i],f=o?.[i];if(c===null)return null;const y=E(c)||E(f);return r[i][y]}),a=t&&Object.entries(t).reduce((i,c)=>{let[f,y]=c;return y===void 0||(i[f]=y),i},{}),d=e==null||(l=e.compoundVariants)===null||l===void 0?void 0:l.reduce((i,c)=>{let{class:f,className:y,..._}=c;return Object.entries(_).every(h=>{let[v,m]=h;return Array.isArray(m)?m.includes({...o,...a}[v]):{...o,...a}[v]===m})?[...i,f,y]:i},[]);return b(n,u,d,t?.class,t?.className)};export{w as S,O as a,R as b,B as c,L as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a,B as nt,p as g}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{d as De,P as O,a as N,h as rt,u as ot,c as at,b as se,e as it,i as st}from"./index-CGQzLeML.js";import{u as W}from"./index-BXchIULt.js";import{R as ct}from"./index-DLIEpuwL.js";import{_ as T,a as Re,b as ut}from"./tslib.es6-De9GV7Vy.js";var lt=nt[" useId ".trim().toString()]||(()=>{}),dt=0;function q(e){const[t,n]=a.useState(lt());return De(()=>{n(r=>r??String(dt++))},[e]),e||(t?`radix-${t}`:"")}function j(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function ft(e,t=globalThis?.document){const n=j(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 vt="DismissableLayer",ae="dismissableLayer.update",ht="dismissableLayer.pointerDownOutside",mt="dismissableLayer.focusOutside",fe,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oe=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(Pe),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=W(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=Et(p=>{const A=p.target,L=[...l.branches].some(B=>B.contains(A));!S||L||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),R=yt(p=>{const A=p.target;[...l.branches].some(B=>B.contains(A))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return ft(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(fe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),ve(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=fe)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),ve())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(ae,p),()=>document.removeEventListener(ae,p)},[]),g.jsx(O.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,R.onFocusCapture),onBlurCapture:N(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,w.onPointerDownCapture)})});Oe.displayName=vt;var gt="DismissableLayerBranch",pt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=W(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(O.div,{...e,ref:o})});pt.displayName=gt;function Et(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){xe(ht,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&xe(mt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ve(){const e=new CustomEvent(ae);document.dispatchEvent(e)}function xe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rt(o,i):o.dispatchEvent(i)}var Q="focusScope.autoFocusOnMount",J="focusScope.autoFocusOnUnmount",he={bubbles:!1,cancelable:!0},bt="FocusScope",Te=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=j(o),d=j(i),v=a.useRef(null),h=W(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){ge.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(Q,he);s.addEventListener(Q,l),s.dispatchEvent(m),m.defaultPrevented||(Ct(Pt(Ne(s)),{select:!0}),document.activeElement===c&&x(s))}return()=>{s.removeEventListener(Q,l),setTimeout(()=>{const m=new CustomEvent(J,he);s.addEventListener(J,d),s.dispatchEvent(m),m.defaultPrevented||x(c??document.body,{select:!0}),s.removeEventListener(J,d),ge.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=St(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&x(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&x(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(O.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Te.displayName=bt;function Ct(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function St(e){const t=Ne(e),n=me(t,e),r=me(t.reverse(),e);return[n,r]}function Ne(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 me(e,t){for(const n of e)if(!wt(n,{upTo:t}))return n}function wt(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 Dt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Dt(e)&&t&&e.select()}}var ge=Rt();function Rt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pe(e,t),e.unshift(t)},remove(t){e=pe(e,t),e[0]?.resume()}}}function pe(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pt(e){return e.filter(t=>t.tagName!=="A")}var Ot="Portal",Ae=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);De(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?ct.createPortal(g.jsx(O.div,{...r,ref:t}),u):null});Ae.displayName=Ot;var ee=0;function xt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ee()),document.body.insertAdjacentElement("beforeend",e[1]??Ee()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function Ee(){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 Y="right-scroll-bar-position",X="width-before-scroll-bar",Tt="with-scroll-bars-hidden",Nt="--removed-body-scroll-bar-size";function te(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function At(e,t){var n=a.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 It=typeof window<"u"?a.useLayoutEffect:a.useEffect,ye=new WeakMap;function Lt(e,t){var n=At(null,function(r){return e.forEach(function(o){return te(o,r)})});return It(function(){var r=ye.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||te(s,null)}),i.forEach(function(s){o.has(s)||te(s,u)})}ye.set(n,e)},[e]),n}function Mt(e){return e}function Ft(e,t){t===void 0&&(t=Mt);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(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function kt(e){e===void 0&&(e={});var t=Ft(null);return t.options=T({async:!0,ssr:!1},e),t}var Ie=function(e){var t=e.sideCar,n=Re(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,T({},n))};Ie.isSideCarExport=!0;function _t(e,t){return e.useMedium(t),Ie}var Le=kt(),ne=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:ne,onWheelCapture:ne,onTouchMoveCapture:ne}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=Re(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,R=Lt([n,t]),p=T(T({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Le,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),T(T({},p),{ref:R})):a.createElement(b,T({},p,{className:E,ref:R}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:X,zeroRight:Y};var Wt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wt();return t&&e.setAttribute("nonce",t),e}function jt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ut(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bt())&&(jt(t,n),Ut(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ht=function(){var e=Kt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Me=function(){var e=Ht(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gt={left:0,top:0,right:0,gap:0},re=function(e){return parseInt(e||"",10)||0},Vt=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[re(n),re(r),re(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gt;var t=Vt(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])}},Xt=Me(),_="data-scroll-locked",$t=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{a,B as nt,p as g}from"./chunk-EPOLDU6W-CiSVlmCe.js";import{d as De,P as O,a as N,h as rt,u as ot,c as at,b as se,e as it,i as st}from"./index-BhARCKRr.js";import{u as W}from"./index-CtLWaleL.js";import{R as ct}from"./index-DLIEpuwL.js";import{_ as T,B as Re,C as ut}from"./utils-CCKKso3e.js";var lt=nt[" useId ".trim().toString()]||(()=>{}),dt=0;function q(e){const[t,n]=a.useState(lt());return De(()=>{n(r=>r??String(dt++))},[e]),e||(t?`radix-${t}`:"")}function j(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>t.current?.(...n),[])}function ft(e,t=globalThis?.document){const n=j(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 vt="DismissableLayer",ae="dismissableLayer.update",ht="dismissableLayer.pointerDownOutside",mt="dismissableLayer.focusOutside",fe,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oe=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:u,onDismiss:s,...E}=e,l=a.useContext(Pe),[d,v]=a.useState(null),h=d?.ownerDocument??globalThis?.document,[,y]=a.useState({}),D=W(t,p=>v(p)),c=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=c.indexOf(f),b=d?c.indexOf(d):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=m,w=Et(p=>{const A=p.target,L=[...l.branches].some(B=>B.contains(A));!S||L||(o?.(p),u?.(p),p.defaultPrevented||s?.())},h),R=yt(p=>{const A=p.target;[...l.branches].some(B=>B.contains(A))||(i?.(p),u?.(p),p.defaultPrevented||s?.())},h);return ft(p=>{b===l.layers.size-1&&(r?.(p),!p.defaultPrevented&&s&&(p.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(fe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),ve(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=fe)}},[d,h,n,l]),a.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),ve())},[d,l]),a.useEffect(()=>{const p=()=>y({});return document.addEventListener(ae,p),()=>document.removeEventListener(ae,p)},[]),g.jsx(O.div,{...E,ref:D,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,R.onFocusCapture),onBlurCapture:N(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,w.onPointerDownCapture)})});Oe.displayName=vt;var gt="DismissableLayerBranch",pt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=W(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(O.div,{...e,ref:o})});pt.displayName=gt;function Et(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let E=function(){xe(ht,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=E,t.addEventListener("click",o.current,{once:!0})):E()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){const n=j(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&xe(mt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ve(){const e=new CustomEvent(ae);document.dispatchEvent(e)}function xe(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rt(o,i):o.dispatchEvent(i)}var Q="focusScope.autoFocusOnMount",J="focusScope.autoFocusOnUnmount",he={bubbles:!1,cancelable:!0},bt="FocusScope",Te=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...u}=e,[s,E]=a.useState(null),l=j(o),d=j(i),v=a.useRef(null),h=W(t,c=>E(c)),y=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let c=function(C){if(y.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},f=function(C){if(y.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},m=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",f);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",f),b.disconnect()}}},[r,s,y.paused]),a.useEffect(()=>{if(s){ge.add(y);const c=document.activeElement;if(!s.contains(c)){const m=new CustomEvent(Q,he);s.addEventListener(Q,l),s.dispatchEvent(m),m.defaultPrevented||(Ct(Pt(Ne(s)),{select:!0}),document.activeElement===c&&x(s))}return()=>{s.removeEventListener(Q,l),setTimeout(()=>{const m=new CustomEvent(J,he);s.addEventListener(J,d),s.dispatchEvent(m),m.defaultPrevented||x(c??document.body,{select:!0}),s.removeEventListener(J,d),ge.remove(y)},0)}}},[s,l,d,y]);const D=a.useCallback(c=>{if(!n&&!r||y.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=document.activeElement;if(f&&m){const b=c.currentTarget,[C,S]=St(b);C&&S?!c.shiftKey&&m===S?(c.preventDefault(),n&&x(C,{select:!0})):c.shiftKey&&m===C&&(c.preventDefault(),n&&x(S,{select:!0})):m===b&&c.preventDefault()}},[n,r,y.paused]);return g.jsx(O.div,{tabIndex:-1,...u,ref:h,onKeyDown:D})});Te.displayName=bt;function Ct(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function St(e){const t=Ne(e),n=me(t,e),r=me(t.reverse(),e);return[n,r]}function Ne(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 me(e,t){for(const n of e)if(!wt(n,{upTo:t}))return n}function wt(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 Dt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Dt(e)&&t&&e.select()}}var ge=Rt();function Rt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=pe(e,t),e.unshift(t)},remove(t){e=pe(e,t),e[0]?.resume()}}}function pe(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pt(e){return e.filter(t=>t.tagName!=="A")}var Ot="Portal",Ae=a.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=a.useState(!1);De(()=>i(!0),[]);const u=n||o&&globalThis?.document?.body;return u?ct.createPortal(g.jsx(O.div,{...r,ref:t}),u):null});Ae.displayName=Ot;var ee=0;function xt(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ee()),document.body.insertAdjacentElement("beforeend",e[1]??Ee()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function Ee(){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 Y="right-scroll-bar-position",X="width-before-scroll-bar",Tt="with-scroll-bars-hidden",Nt="--removed-body-scroll-bar-size";function te(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function At(e,t){var n=a.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 It=typeof window<"u"?a.useLayoutEffect:a.useEffect,ye=new WeakMap;function Lt(e,t){var n=At(null,function(r){return e.forEach(function(o){return te(o,r)})});return It(function(){var r=ye.get(n);if(r){var o=new Set(r),i=new Set(e),u=n.current;o.forEach(function(s){i.has(s)||te(s,null)}),i.forEach(function(s){o.has(s)||te(s,u)})}ye.set(n,e)},[e]),n}function Mt(e){return e}function Ft(e,t){t===void 0&&(t=Mt);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(i){var u=t(i,r);return n.push(u),function(){n=n.filter(function(s){return s!==u})}},assignSyncMedium:function(i){for(r=!0;n.length;){var u=n;n=[],u.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var u=[];if(n.length){var s=n;n=[],s.forEach(i),u=n}var E=function(){var d=u;u=[],d.forEach(i)},l=function(){return Promise.resolve().then(E)};l(),n={push:function(d){u.push(d),l()},filter:function(d){return u=u.filter(d),n}}}};return o}function kt(e){e===void 0&&(e={});var t=Ft(null);return t.options=T({async:!0,ssr:!1},e),t}var Ie=function(e){var t=e.sideCar,n=Re(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,T({},n))};Ie.isSideCarExport=!0;function _t(e,t){return e.useMedium(t),Ie}var Le=kt(),ne=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:ne,onWheelCapture:ne,onTouchMoveCapture:ne}),o=r[0],i=r[1],u=e.forwardProps,s=e.children,E=e.className,l=e.removeScrollBar,d=e.enabled,v=e.shards,h=e.sideCar,y=e.noRelative,D=e.noIsolation,c=e.inert,f=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,C=e.gapMode,S=Re(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,R=Lt([n,t]),p=T(T({},S),o);return a.createElement(a.Fragment,null,d&&a.createElement(w,{sideCar:Le,removeScrollBar:l,shards:v,noRelative:y,noIsolation:D,inert:c,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:C}),u?a.cloneElement(a.Children.only(s),T(T({},p),{ref:R})):a.createElement(b,T({},p,{className:E,ref:R}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:X,zeroRight:Y};var Wt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wt();return t&&e.setAttribute("nonce",t),e}function jt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ut(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bt())&&(jt(t,n),Ut(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ht=function(){var e=Kt();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Me=function(){var e=Ht(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gt={left:0,top:0,right:0,gap:0},re=function(e){return parseInt(e||"",10)||0},Vt=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[re(n),re(r),re(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gt;var t=Vt(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])}},Xt=Me(),_="data-scroll-locked",$t=function(e,t,n,r){var o=e.left,i=e.top,u=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Tt,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(r,`;
|