@tapflowio/relay 0.25.0 → 0.26.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.
Files changed (144) hide show
  1. package/dist/RelayServer.d.ts +15 -3
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +45 -15
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/api/auth.d.ts +2 -1
  6. package/dist/api/auth.d.ts.map +1 -1
  7. package/dist/api/auth.js +28 -8
  8. package/dist/api/auth.js.map +1 -1
  9. package/dist/api/invitations.d.ts +3 -1
  10. package/dist/api/invitations.d.ts.map +1 -1
  11. package/dist/api/invitations.js +16 -20
  12. package/dist/api/invitations.js.map +1 -1
  13. package/dist/api/passwordReset.d.ts +14 -2
  14. package/dist/api/passwordReset.d.ts.map +1 -1
  15. package/dist/api/passwordReset.js +45 -10
  16. package/dist/api/passwordReset.js.map +1 -1
  17. package/dist/api/team.d.ts +3 -2
  18. package/dist/api/team.d.ts.map +1 -1
  19. package/dist/api/team.js +11 -5
  20. package/dist/api/team.js.map +1 -1
  21. package/dist/api/tokens.d.ts +2 -1
  22. package/dist/api/tokens.d.ts.map +1 -1
  23. package/dist/api/tokens.js +8 -2
  24. package/dist/api/tokens.js.map +1 -1
  25. package/dist/lib/adminAccount.d.ts +0 -5
  26. package/dist/lib/adminAccount.d.ts.map +1 -1
  27. package/dist/lib/adminAccount.js +6 -7
  28. package/dist/lib/adminAccount.js.map +1 -1
  29. package/dist/lib/connectionAuth.d.ts +35 -5
  30. package/dist/lib/connectionAuth.d.ts.map +1 -1
  31. package/dist/lib/connectionAuth.js +19 -3
  32. package/dist/lib/connectionAuth.js.map +1 -1
  33. package/dist/lib/email.d.ts +16 -0
  34. package/dist/lib/email.d.ts.map +1 -0
  35. package/dist/lib/email.js +18 -0
  36. package/dist/lib/email.js.map +1 -0
  37. package/dist/middleware/auth.d.ts +20 -1
  38. package/dist/middleware/auth.d.ts.map +1 -1
  39. package/dist/middleware/auth.js +33 -6
  40. package/dist/middleware/auth.js.map +1 -1
  41. package/dist/migrations/014_normalize_emails.sql +16 -0
  42. package/package.json +3 -3
  43. package/public/assets/{AppCenter-D_1rFI40.js → AppCenter-DZCsC2wa.js} +1 -1
  44. package/public/assets/AppCenter-DZCsC2wa.js.br +0 -0
  45. package/public/assets/AppCenter-DZCsC2wa.js.gz +0 -0
  46. package/public/assets/{Default-DF_X2_3I.js → Default-xD9Fmd5X.js} +1 -1
  47. package/public/assets/Default-xD9Fmd5X.js.br +0 -0
  48. package/public/assets/Default-xD9Fmd5X.js.gz +0 -0
  49. package/public/assets/Invite-29Erwv8j.js +1 -0
  50. package/public/assets/Invite-29Erwv8j.js.br +0 -0
  51. package/public/assets/Invite-29Erwv8j.js.gz +0 -0
  52. package/public/assets/{MacResources--1Enisxs.js → MacResources-B0DQ9ISE.js} +1 -1
  53. package/public/assets/MacResources-B0DQ9ISE.js.br +0 -0
  54. package/public/assets/MacResources-B0DQ9ISE.js.gz +0 -0
  55. package/public/assets/QASession-D-n6PXuD.js +150 -0
  56. package/public/assets/QASession-D-n6PXuD.js.br +0 -0
  57. package/public/assets/QASession-D-n6PXuD.js.gz +0 -0
  58. package/public/assets/{ResetPassword-B9miyXTP.js → ResetPassword-BnPIwTYH.js} +1 -1
  59. package/public/assets/ResetPassword-BnPIwTYH.js.br +0 -0
  60. package/public/assets/ResetPassword-BnPIwTYH.js.gz +0 -0
  61. package/public/assets/{Setup-CywZCqHU.js → Setup-DmUGFblg.js} +1 -1
  62. package/public/assets/Setup-DmUGFblg.js.br +0 -0
  63. package/public/assets/Setup-DmUGFblg.js.gz +0 -0
  64. package/public/assets/Team-BpvRgFfZ.js +6 -0
  65. package/public/assets/Team-BpvRgFfZ.js.br +0 -0
  66. package/public/assets/Team-BpvRgFfZ.js.gz +0 -0
  67. package/public/assets/Tokens-x6BtCcL7.js +1 -0
  68. package/public/assets/Tokens-x6BtCcL7.js.br +0 -0
  69. package/public/assets/Tokens-x6BtCcL7.js.gz +0 -0
  70. package/public/assets/{alert-dialog-CuPdBkxF.js → alert-dialog-C8wDimW-.js} +1 -1
  71. package/public/assets/alert-dialog-C8wDimW-.js.br +0 -0
  72. package/public/assets/alert-dialog-C8wDimW-.js.gz +0 -0
  73. package/public/assets/{badge-CSVsKOK_.js → badge-CWVbeuH3.js} +1 -1
  74. package/public/assets/badge-CWVbeuH3.js.br +0 -0
  75. package/public/assets/badge-CWVbeuH3.js.gz +0 -0
  76. package/public/assets/{build-format-l9BrlbZl.js → build-format-fzt-JrUX.js} +1 -1
  77. package/public/assets/build-format-fzt-JrUX.js.br +0 -0
  78. package/public/assets/build-format-fzt-JrUX.js.gz +0 -0
  79. package/public/assets/{dialog-B6jt7-2f.js → dialog-DQkbaw8h.js} +2 -2
  80. package/public/assets/dialog-DQkbaw8h.js.br +0 -0
  81. package/public/assets/dialog-DQkbaw8h.js.gz +0 -0
  82. package/public/assets/{index-Cm17I31a.js → index-C1Fo8g_c.js} +32 -32
  83. package/public/assets/index-C1Fo8g_c.js.br +0 -0
  84. package/public/assets/index-C1Fo8g_c.js.gz +0 -0
  85. package/public/assets/index-C2F1AgwB.css +1 -0
  86. package/public/assets/index-C2F1AgwB.css.br +0 -0
  87. package/public/assets/{index-D_P99bPX.css.gz → index-C2F1AgwB.css.gz} +0 -0
  88. package/public/assets/{list-view-Bp6pvsde.js → list-view-DxI397-H.js} +1 -1
  89. package/public/assets/list-view-DxI397-H.js.br +0 -0
  90. package/public/assets/list-view-DxI397-H.js.gz +0 -0
  91. package/public/assets/{pencil-g-WiK1F2.js → pencil-BJcOp3oN.js} +1 -1
  92. package/public/assets/pencil-BJcOp3oN.js.br +0 -0
  93. package/public/assets/pencil-BJcOp3oN.js.gz +0 -0
  94. package/public/assets/{resource-health-BbeyA8an.js → resource-health-Cq3gqqVd.js} +1 -1
  95. package/public/assets/resource-health-Cq3gqqVd.js.br +0 -0
  96. package/public/assets/resource-health-Cq3gqqVd.js.gz +0 -0
  97. package/public/assets/{trash-DHPg15P4.js → trash-DhBxh6H7.js} +1 -1
  98. package/public/assets/trash-DhBxh6H7.js.br +0 -0
  99. package/public/assets/trash-DhBxh6H7.js.gz +0 -0
  100. package/public/index.html +2 -2
  101. package/public/index.html.br +0 -0
  102. package/public/index.html.gz +0 -0
  103. package/public/assets/AppCenter-D_1rFI40.js.br +0 -0
  104. package/public/assets/AppCenter-D_1rFI40.js.gz +0 -0
  105. package/public/assets/Default-DF_X2_3I.js.br +0 -0
  106. package/public/assets/Default-DF_X2_3I.js.gz +0 -0
  107. package/public/assets/Invite-DETTWdYp.js +0 -1
  108. package/public/assets/Invite-DETTWdYp.js.br +0 -0
  109. package/public/assets/Invite-DETTWdYp.js.gz +0 -0
  110. package/public/assets/MacResources--1Enisxs.js.br +0 -0
  111. package/public/assets/MacResources--1Enisxs.js.gz +0 -0
  112. package/public/assets/QASession-BjoD9Toj.js +0 -150
  113. package/public/assets/QASession-BjoD9Toj.js.br +0 -0
  114. package/public/assets/QASession-BjoD9Toj.js.gz +0 -0
  115. package/public/assets/ResetPassword-B9miyXTP.js.br +0 -0
  116. package/public/assets/ResetPassword-B9miyXTP.js.gz +0 -0
  117. package/public/assets/Setup-CywZCqHU.js.br +0 -0
  118. package/public/assets/Setup-CywZCqHU.js.gz +0 -0
  119. package/public/assets/Team-CxdX_9mY.js +0 -6
  120. package/public/assets/Team-CxdX_9mY.js.br +0 -0
  121. package/public/assets/Team-CxdX_9mY.js.gz +0 -0
  122. package/public/assets/Tokens-BQnnawvG.js +0 -1
  123. package/public/assets/Tokens-BQnnawvG.js.br +0 -0
  124. package/public/assets/Tokens-BQnnawvG.js.gz +0 -0
  125. package/public/assets/alert-dialog-CuPdBkxF.js.br +0 -0
  126. package/public/assets/alert-dialog-CuPdBkxF.js.gz +0 -0
  127. package/public/assets/badge-CSVsKOK_.js.br +0 -0
  128. package/public/assets/badge-CSVsKOK_.js.gz +0 -0
  129. package/public/assets/build-format-l9BrlbZl.js.br +0 -0
  130. package/public/assets/build-format-l9BrlbZl.js.gz +0 -0
  131. package/public/assets/dialog-B6jt7-2f.js.br +0 -0
  132. package/public/assets/dialog-B6jt7-2f.js.gz +0 -0
  133. package/public/assets/index-Cm17I31a.js.br +0 -0
  134. package/public/assets/index-Cm17I31a.js.gz +0 -0
  135. package/public/assets/index-D_P99bPX.css +0 -1
  136. package/public/assets/index-D_P99bPX.css.br +0 -0
  137. package/public/assets/list-view-Bp6pvsde.js.br +0 -0
  138. package/public/assets/list-view-Bp6pvsde.js.gz +0 -0
  139. package/public/assets/pencil-g-WiK1F2.js.br +0 -0
  140. package/public/assets/pencil-g-WiK1F2.js.gz +0 -0
  141. package/public/assets/resource-health-BbeyA8an.js.br +0 -0
  142. package/public/assets/resource-health-BbeyA8an.js.gz +0 -0
  143. package/public/assets/trash-DHPg15P4.js.br +0 -0
  144. package/public/assets/trash-DHPg15P4.js.gz +0 -0
@@ -0,0 +1,6 @@
1
+ import{k as a,j as e,f as he}from"./vendor-react-BlPSzrEe.js";import{a2 as xe,aJ as pe,aI as je,aF as ve,aw as fe,B as k,L as _,I as Z,F as O,h as ge,C as be,c as ye,d as ke,a as we,av as x,ap as I,au as w,aq as Q,N as ee,ah as Ce}from"./index-C1Fo8g_c.js";import{D as V,a as q,d as M,e as B,b as Se,f as De,S as H,i as U,j as z,g as J,h as p}from"./dialog-DQkbaw8h.js";import{A as Te,c as Ne,f as Ae,g as Re,d as Ie,e as Ee,b as $e,a as Fe}from"./alert-dialog-C8wDimW-.js";import{l as Le,T as Pe,d as _e,e as K,c as S,a as Oe,L as Qe,b as D}from"./list-view-DxI397-H.js";import{j as G,l as W}from"./publicLink-D6zKS_wu.js";import{u as Ve}from"./useFocusAfterSwap-BY3N9f9v.js";import"./vendor-router-B_lVHrKl.js";/**
2
+ * @license lucide-react v1.47.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const se={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};se.node;const qe=xe(se),Me=I({email:w().email("Enter a valid email"),role:w().min(1,"Pick a role")}),Be=I({token:w(),emailSent:ee(),inviteUrl:w().nullable()}),He=I({token:w(),emailSent:ee(),resetUrl:w().nullable()});function X(j){return(navigator.clipboard?navigator.clipboard.writeText(j):Promise.reject(new Error("no clipboard"))).then(()=>!0,()=>!1)}function Y(j){const s=he.c(15),{link:l,copied:g,noun:d}=j,m=a.useId(),t=a.useRef(null);let u;s[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{var T;(T=t.current)==null||T.focus()},s[0]=u):u=s[0];let v;s[1]!==l?(v=[l],s[1]=l,s[2]=v):v=s[2],a.useEffect(u,v);let r;s[3]!==g||s[4]!==d?(r=g?`${d[0].toUpperCase()}${d.slice(1)} copied to clipboard:`:`Copy this ${d}:`,s[3]=g,s[4]=d,s[5]=r):r=s[5];let o;s[6]!==m||s[7]!==r?(o=e.jsx("p",{id:m,className:"text-sm text-muted-foreground",children:r}),s[6]=m,s[7]=r,s[8]=o):o=s[8];let h;s[9]!==m||s[10]!==l?(h=e.jsx(Z,{ref:t,readOnly:!0,value:l,"aria-labelledby":m,onFocus:Ue,className:"font-mono text-xs"}),s[9]=m,s[10]=l,s[11]=h):h=s[11];let f;return s[12]!==o||s[13]!==h?(f=e.jsxs(e.Fragment,{children:[o,h]}),s[12]=o,s[13]=h,s[14]=f):f=s[14],f}function Ue(j){return j.currentTarget.select()}function es(){var L,P;const j=pe(),s=je({queryKey:Q.teamMembers,queryFn:Ce}),l=s.data??[],g=Le(s),d=a.useRef(null),m=Ve(g,d),[t,u]=a.useState(null),v=a.useRef(null),[r,o]=a.useState(""),[h,f]=a.useState(!1),[T,N]=a.useState(""),[ie,ne]=a.useState(!1),[A,R]=a.useState(null),{register:te,handleSubmit:ae,control:le,reset:re,setError:oe,formState:{errors:b,isSubmitting:E}}=ve({resolver:fe(Me),defaultValues:{email:"",role:"QA"}}),$=()=>{j.invalidateQueries({queryKey:Q.teamMembers})};async function ce(i){N("");try{const n=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i.email,role:i.role})});if(n.status===409){oe("email",{message:"Already a member. Change their role in the list instead."},{shouldFocus:!0});return}if(!n.ok)throw new Error(`Server error: ${n.status}`);const c=Be.parse(await n.json()),C=c.inviteUrl??G((await W()).linkBase,`/invite?token=${c.token}`),y=await X(C);o(C),f(y),N(`${c.emailSent?`Invite email sent to ${i.email}.`:"Email could not be sent."} ${y?"Invite link copied to clipboard.":"Copy the invite link."}`),c.emailSent?x.success(`Invite email sent to ${i.email}`):y?x.warning("Invite link copied — email could not be sent. Check your SMTP settings."):x.warning("Email could not be sent. Copy the invite link from the dialog, and check your SMTP settings.")}catch{x.error("Failed to create invite link"),N("Failed to create invite link.")}}function F(i){ne(i),i||(o(""),f(!1),N(""),re())}async function de(i,n){await fetch(`/api/v1/team/members/${i}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:n})}),$()}async function me(i){try{const n=await fetch(`/api/v1/team/members/${i.id}/send-reset`,{method:"POST",credentials:"include"});if(!n.ok)throw new Error(`Server error: ${n.status}`);const c=He.parse(await n.json()),C=c.resetUrl??G((await W()).linkBase,`/reset-password?token=${c.token}`),y=await X(C);u({email:i.email,link:C,copied:y,emailSent:c.emailSent}),c.emailSent?x.success(`Reset email sent to ${i.email}`):y?x.warning("Reset link copied — email could not be sent. Send the link to the member yourself."):x.warning("Email could not be sent. Copy the reset link from the dialog and send it to the member.")}catch{x.error("Failed to create reset link")}}async function ue(i){await fetch(`/api/v1/team/members/${i}`,{method:"DELETE",credentials:"include"}),R(null),$()}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx(Te,{open:A!==null,onOpenChange:i=>{i||R(null)},children:e.jsxs(Ne,{children:[e.jsxs(Ae,{children:[e.jsx(Re,{children:"Remove this member?"}),e.jsx(Ie,{children:"This member will lose access to the team immediately."})]}),e.jsxs(Ee,{children:[e.jsx($e,{children:"Cancel"}),e.jsx(Fe,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>A!==null&&ue(A),children:"Remove"})]})]})}),e.jsx(V,{open:t!==null,onOpenChange:i=>{i||u(null)},children:e.jsxs(q,{className:"sm:max-w-md",onCloseAutoFocus:i=>{var n;i.preventDefault(),(n=v.current)==null||n.focus()},children:[e.jsxs(M,{children:[e.jsx(B,{children:"Password reset link"}),e.jsxs(Se,{children:[t!=null&&t.emailSent?`Reset email sent to ${t.email}.`:`Email could not be sent to ${(t==null?void 0:t.email)??""}.`," ","The link works once, for 2 hours. Making a new one turns this one off. Completing the reset signs the member out everywhere and revokes their personal access tokens, so agents using those tokens disconnect until new ones are issued."]})]}),t&&e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx(Y,{link:t.link,copied:t.copied,noun:"reset link"}),e.jsx(k,{onClick:()=>u(null),children:"Done"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),e.jsxs(V,{open:ie,onOpenChange:F,children:[e.jsx(De,{asChild:!0,children:e.jsxs(k,{ref:d,size:"sm",children:[e.jsx(qe,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),e.jsxs(q,{className:"sm:max-w-md",children:[e.jsx(M,{children:e.jsx(B,{children:"Invite team member"})}),e.jsx("p",{role:"status",className:"sr-only",children:T}),r?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx(Y,{link:r,copied:h,noun:"invite link"}),e.jsx(k,{onClick:()=>F(!1),children:"Done"})]}):e.jsxs("form",{onSubmit:ae(ce),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(_,{htmlFor:"invite-email",children:"Email"}),e.jsx(Z,{id:"invite-email",type:"email","aria-required":"true","aria-invalid":!!b.email,"aria-describedby":b.email?"email-error":void 0,...te("email")}),e.jsx(O,{id:"email-error",message:(L=b.email)==null?void 0:L.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(_,{htmlFor:"invite-role",children:"Role"}),e.jsx(ge,{name:"role",control:le,render:({field:i})=>e.jsxs(H,{value:i.value,onValueChange:i.onChange,children:[e.jsx(U,{id:"invite-role","aria-invalid":!!b.role,"aria-describedby":b.role?"role-error":void 0,children:e.jsx(z,{})}),e.jsxs(J,{children:[e.jsx(p,{value:"Admin",children:"Admin"}),e.jsx(p,{value:"Developer",children:"Developer"}),e.jsx(p,{value:"QA",children:"QA"}),e.jsx(p,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(O,{id:"role-error",message:(P=b.role)==null?void 0:P.message})]}),e.jsx(k,{type:"submit",disabled:E,children:E?"Creating link…":"Generate invite link"})]})]})]})]}),e.jsxs(be,{children:[e.jsx(ye,{children:e.jsxs(ke,{children:["Members",s.data?` (${l.length})`:""]})}),e.jsx(we,{className:"px-4 pt-0 pb-2",children:e.jsxs(Pe,{children:[e.jsx(_e,{children:e.jsxs(K,{children:[e.jsx(S,{children:"Nickname"}),e.jsx(S,{children:"Email"}),e.jsx(S,{children:"Role"}),e.jsx(S,{children:"Joined"}),e.jsx(S,{className:"w-10"})]})}),e.jsxs(Oe,{...m,children:[e.jsx(Qe,{view:g,colSpan:5,noun:"team members",emptyText:"No members yet.",onRetry:()=>{s.refetch()}}),l.map(i=>e.jsxs(K,{className:"hover:bg-transparent",children:[e.jsx(D,{className:"font-medium",children:i.display_name||"—"}),e.jsx(D,{className:"text-muted-foreground text-sm",children:i.email}),e.jsx(D,{children:e.jsxs(H,{value:i.role,onValueChange:n=>de(i.id,n),children:[e.jsx(U,{className:"h-7 w-28",children:e.jsx(z,{})}),e.jsxs(J,{children:[e.jsx(p,{value:"Admin",children:"Admin"}),e.jsx(p,{value:"Developer",children:"Developer"}),e.jsx(p,{value:"QA",children:"QA"}),e.jsx(p,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(D,{className:"text-muted-foreground text-sm",children:new Date(i.joined_at).toLocaleDateString()}),e.jsx(D,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{variant:"secondary",size:"nav",onClick:n=>{v.current=n.currentTarget,me(i)},children:"Reset pwd"}),e.jsx(k,{variant:"destructive",size:"nav",onClick:()=>R(i.id),children:"Remove"})]})})]},i.id))]})]})})]})]})}export{es as TeamSettings};
@@ -0,0 +1 @@
1
+ import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{aJ as le,ay as ce,aI as de,aF as xe,aw as ue,aL as me,B as u,I as j,av as n,L as y,F as Q,h as pe,C as he,c as je,d as ye,b as ge,a as fe,ap as ve,au as z,_ as ke,aq as K,ai as be}from"./index-C1Fo8g_c.js";import{B as w}from"./badge-CWVbeuH3.js";import{A as we,c as Ne,f as Ce,g as Te,d as De,e as Se,b as Ae}from"./alert-dialog-C8wDimW-.js";import{D as Ie,f as Fe,a as Re,d as Ee,e as Be,S as $,i as J,j as M,g as G,h as m}from"./dialog-DQkbaw8h.js";import{l as Le,T as Pe,d as qe,e as U,c as p,a as Oe,L as _e,b as h}from"./list-view-DxI397-H.js";import{l as He}from"./publicLink-D6zKS_wu.js";import{u as Ve}from"./useFocusAfterSwap-BY3N9f9v.js";import{P as We,T as Qe}from"./trash-DhBxh6H7.js";import"./vendor-router-B_lVHrKl.js";const X=["7","30","60","90"],ze=ve({name:z().min(1,"Give the token a name"),expiry:ke([...X,"custom","never"]),expiresDays:z()}).superRefine((t,g)=>{if(t.expiry!=="custom")return;const i=Number(t.expiresDays);(!Number.isInteger(i)||i<1||i>365)&&g.addIssue({code:"custom",path:["expiresDays"],message:"Must be between 1 and 365"})});function Ke(t){if(t.expiry!=="never")return Number(t.expiry==="custom"?t.expiresDays:t.expiry)}function as(){var H,V,W;const t=le(),g=((H=ce().user)==null?void 0:H.role)==="Admin",i=de({queryKey:K.tokens,queryFn:be}),Y=i.data??[],N=Le(i),C=a.useRef(null),Z=Ve(N,C),[ee,se]=a.useState(!1),[o,T]=a.useState(""),[x,D]=a.useState("api"),[S,A]=a.useState(""),[f,v]=a.useState(null),I=a.useId(),F=a.useId(),k=a.useRef(null),[ae,l]=a.useState(""),R=a.useId(),{register:E,control:B,handleSubmit:te,reset:re,formState:{errors:c,isSubmitting:L}}=xe({resolver:ue(ze),defaultValues:{name:"",expiry:"30",expiresDays:"30"}}),P=me({control:B,name:"expiry"}),q=()=>{t.invalidateQueries({queryKey:K.tokens})};a.useEffect(()=>{var s;o&&((s=k.current)==null||s.focus())},[o]);async function ne(s){l("");try{const r=Ke(s),b=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,...r!==void 0?{expires_in_days:r}:{},...x==="agent"?{scope:"agent"}:{}})});if(!b.ok){const d=await b.json().catch(()=>null);n.error((d==null?void 0:d.error)??"Failed to create token"),l((d==null?void 0:d.error)??"Failed to create token");return}const oe=await b.json();x==="agent"&&A((await He()).agentWsBase),n.success("Token created"),T(oe.token),q()}catch{n.error("Network error"),l("Network error")}}function O(s){se(s),s||(T(""),D("api"),A(""),l(""),re())}async function ie(s){try{return(await fetch(`/api/v1/tokens/${s}`,{method:"DELETE",credentials:"include"})).ok?(n.success("Token revoked"),q(),!0):(n.error("Failed to revoke token"),!1)}catch{return n.error("Network error"),!1}}function _(s){return s.expires_at&&new Date(s.expires_at)<new Date}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),e.jsxs(Ie,{open:ee,onOpenChange:O,children:[e.jsx(Fe,{asChild:!0,children:e.jsxs(u,{ref:C,size:"sm",children:[e.jsx(We,{className:"mr-2 h-4 w-4"}),"New token"]})}),e.jsxs(Re,{className:"sm:max-w-md",children:[e.jsx(Ee,{children:e.jsx(Be,{children:"Create token"})}),e.jsx("p",{role:"status",className:"sr-only",children:ae}),o?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:I,className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),e.jsx(j,{ref:k,readOnly:!0,value:o,"aria-labelledby":I,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),x==="agent"&&S&&e.jsxs(e.Fragment,{children:[e.jsx("p",{id:F,className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),e.jsx(j,{readOnly:!0,value:`tapflow agent start --relay ${S} --token ${o}`,"aria-labelledby":F,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"})]}),e.jsx(u,{onClick:()=>{l(""),(navigator.clipboard?navigator.clipboard.writeText(o):Promise.reject(new Error("no clipboard"))).then(()=>{n.success("Token copied to clipboard"),O(!1)}).catch(()=>{var s;n.error("Failed to copy — copy manually"),l("Could not copy the token. Select it and copy it by hand."),(s=k.current)==null||s.focus()})},children:"Copy & close"})]}):e.jsxs("form",{onSubmit:te(ne),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-name",children:"Name"}),e.jsx(j,{id:"token-name",placeholder:"e.g. ci-deploy","aria-required":"true","aria-invalid":!!c.name,"aria-describedby":c.name?"name-error":void 0,...E("name")}),e.jsx(Q,{id:"name-error",message:(V=c.name)==null?void 0:V.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-expiry",children:"Expiration"}),e.jsx(pe,{control:B,name:"expiry",render:({field:s})=>e.jsxs($,{value:s.value,onValueChange:r=>s.onChange(r),children:[e.jsx(J,{id:"token-expiry",ref:s.ref,onBlur:s.onBlur,"aria-describedby":s.value==="never"?R:void 0,children:e.jsx(M,{})}),e.jsxs(G,{children:[X.map(r=>e.jsxs(m,{value:r,children:[r," days"]},r)),e.jsx(m,{value:"custom",children:"Custom…"}),e.jsx(m,{value:"never",children:"No expiration"})]})]})}),P==="never"&&e.jsx("p",{id:R,className:"text-sm text-amber-700 dark:text-amber-300",children:"A token without an expiry stays valid until you revoke it. For CI, 90 days or less is recommended."})]}),P==="custom"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"expires",children:"Expires in (days)"}),e.jsx(j,{id:"expires",type:"number","aria-required":"true","aria-invalid":!!c.expiresDays,"aria-describedby":c.expiresDays?"expiresDays-error":void 0,...E("expiresDays")}),e.jsx(Q,{id:"expiresDays-error",message:(W=c.expiresDays)==null?void 0:W.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(y,{htmlFor:"token-type",children:"Type"}),e.jsxs($,{value:x,onValueChange:s=>D(s),children:[e.jsx(J,{id:"token-type",children:e.jsx(M,{})}),e.jsxs(G,{children:[e.jsx(m,{value:"api",children:"API — CI uploads & API access"}),g&&e.jsx(m,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",e.jsx(w,{variant:"secondary",children:x==="agent"?"agent":"view, builds:write"})]}),e.jsx(u,{type:"submit",disabled:L,children:L?"Creating…":"Create token"})]})]})]})]}),e.jsxs(he,{children:[e.jsxs(je,{children:[e.jsx(ye,{children:"Active tokens"}),e.jsxs(ge,{children:["Use these tokens with ",e.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),e.jsx(fe,{className:"px-4 pt-0 pb-2",children:e.jsxs(Pe,{children:[e.jsx(qe,{children:e.jsxs(U,{children:[e.jsx(p,{children:"Name"}),e.jsx(p,{children:"Scope"}),e.jsx(p,{children:"Last used"}),e.jsx(p,{children:"Expires"}),e.jsx(p,{className:"w-10"})]})}),e.jsxs(Oe,{...Z,children:[e.jsx(_e,{view:N,colSpan:5,noun:"tokens",emptyText:"No tokens yet.",onRetry:()=>{i.refetch()}}),Y.map(s=>e.jsxs(U,{className:"hover:bg-transparent",children:[e.jsx(h,{className:"font-medium",children:s.name}),e.jsx(h,{children:e.jsx(w,{variant:"secondary",children:s.scope})}),e.jsx(h,{className:"text-muted-foreground text-sm",children:s.last_used_at?new Date(s.last_used_at).toLocaleDateString():"Never"}),e.jsx(h,{children:s.expires_at?e.jsx("span",{className:_(s)?"text-destructive text-sm":"text-muted-foreground text-sm",children:_(s)?"Expired":new Date(s.expires_at).toLocaleDateString()}):e.jsx(w,{variant:"outline",children:"No expiration"})}),e.jsx(h,{children:e.jsx(u,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>v(s.id),children:e.jsx(Qe,{className:"h-4 w-4"})})})]},s.id))]})]})})]}),e.jsx(we,{open:f!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(Ne,{children:[e.jsxs(Ce,{children:[e.jsx(Te,{children:"Revoke token?"}),e.jsx(De,{children:"Any active API calls using this token will immediately fail."})]}),e.jsxs(Se,{children:[e.jsx(Ae,{children:"Cancel"}),e.jsx(u,{variant:"destructive",onClick:async()=>{if(f===null)return;await ie(f)&&v(null)},children:"Revoke"})]})]})})]})}export{as as TokenSettings};
@@ -1 +1 @@
1
- import{k as n,j as i,f as d}from"./vendor-react-BlPSzrEe.js";import{m as O,aB as u,j as S,Y as T,n as b,k as E,i as v,a1 as x,a0 as h,D as k,o as z,l as F,W as f,O as N}from"./index-Cm17I31a.js";var H=Object.defineProperty,c=(s,t)=>H(s,"name",{value:t,configurable:!0}),M="AlertDialog",[B,fe]=h(M,[x]),p=x(),I=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(k,{...a,...e,modal:!0})},"AlertDialog"),L=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(z,{...o,...l,ref:e})},"AlertDialogTrigger")),V=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(O,{...a,...e})},"AlertDialogPortal"),W=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogOverlay")),Y="AlertDialogContent",[q,G]=B(Y),J=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(q,{scope:a,cancelRef:m,children:i.jsx(S,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),K=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),Q=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),U=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(v,{...o,...l,ref:e})},"AlertDialogAction")),X="AlertDialogCancel",Z=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=G(X,a),r=p(a),g=u(e,o);return i.jsx(v,{...r,...l,ref:g})},"AlertDialogCancel")),ee=I,te=L,ae=V,_=W,y=J,j=U,R=Z,C=K,w=Q;const De=ee,me=te,le=ae,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const oe=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(le,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});oe.displayName=y.displayName;const se=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};se.displayName="AlertDialogHeader";const re=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};re.displayName="AlertDialogFooter";const ie=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ie.displayName=C.displayName;const ne=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ne.displayName=w.displayName;const ce=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ce.displayName=j.displayName;const pe=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});pe.displayName=R.displayName;export{De as A,ce as a,pe as b,oe as c,ne as d,re as e,se as f,ie as g,me as h};
1
+ import{k as n,j as i,f as d}from"./vendor-react-BlPSzrEe.js";import{m as O,aB as u,j as S,Y as T,n as b,k as E,i as v,a1 as x,a0 as h,D as k,o as z,l as F,W as f,O as N}from"./index-C1Fo8g_c.js";var H=Object.defineProperty,c=(s,t)=>H(s,"name",{value:t,configurable:!0}),M="AlertDialog",[B,fe]=h(M,[x]),p=x(),I=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(k,{...a,...e,modal:!0})},"AlertDialog"),L=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(z,{...o,...l,ref:e})},"AlertDialogTrigger")),V=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(O,{...a,...e})},"AlertDialogPortal"),W=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogOverlay")),Y="AlertDialogContent",[q,G]=B(Y),J=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(q,{scope:a,cancelRef:m,children:i.jsx(S,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),K=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),Q=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),U=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(v,{...o,...l,ref:e})},"AlertDialogAction")),X="AlertDialogCancel",Z=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=G(X,a),r=p(a),g=u(e,o);return i.jsx(v,{...r,...l,ref:g})},"AlertDialogCancel")),ee=I,te=L,ae=V,_=W,y=J,j=U,R=Z,C=K,w=Q;const De=ee,me=te,le=ae,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const oe=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(le,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});oe.displayName=y.displayName;const se=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};se.displayName="AlertDialogHeader";const re=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};re.displayName="AlertDialogFooter";const ie=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ie.displayName=C.displayName;const ne=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ne.displayName=w.displayName;const ce=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ce.displayName=j.displayName;const pe=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});pe.displayName=R.displayName;export{De as A,ce as a,pe as b,oe as c,ne as d,re as e,se as f,ie as g,me as h};
@@ -1 +1 @@
1
- import{f as i,j as b}from"./vendor-react-BlPSzrEe.js";import{W as l,a6 as g}from"./index-Cm17I31a.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
1
+ import{f as i,j as b}from"./vendor-react-BlPSzrEe.js";import{W as l,a6 as g}from"./index-C1Fo8g_c.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
@@ -1,4 +1,4 @@
1
- import{a2 as m,I as g}from"./index-Cm17I31a.js";import{f as y,j as f}from"./vendor-react-BlPSzrEe.js";/**
1
+ import{a2 as m,I as g}from"./index-C1Fo8g_c.js";import{f as y,j as f}from"./vendor-react-BlPSzrEe.js";/**
2
2
  * @license lucide-react v1.47.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{a2 as Me,aB as U,A as lt,v as L,Y as j,P as at,aH as Z,u as ct,aA as Ce,aG as Oe,a3 as ke,$ as it,al as dt,aE as ut,R as pt,q as ft,p as mt,a0 as ht,a5 as gt,g as St,V as xt,aD as vt,aC as _e,x as wt,W as M,e as yt,D as Ct,o as bt,m as It,j as Ae,n as Le,l as Be,i as Tt,X as Pt,k as Ve}from"./index-Cm17I31a.js";/**
1
+ import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{a2 as Me,aB as U,A as lt,v as L,Y as j,P as at,aH as Z,u as ct,aA as Ce,aG as Oe,a3 as ke,$ as it,al as dt,aE as ut,R as pt,q as ft,p as mt,a0 as ht,a5 as gt,g as St,V as xt,aD as vt,aC as _e,x as wt,W as M,e as yt,D as Ct,o as bt,m as It,j as Ae,n as Le,k as Be,l as Ve,i as Tt,X as Pt}from"./index-C1Fo8g_c.js";/**
2
2
  * @license lucide-react v1.47.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,4 +8,4 @@ import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{a2 a
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Fe={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};Fe.node;const _t=Me(Fe);var Nt=Object.defineProperty,Rt=(l,o)=>Nt(l,"name",{value:o,configurable:!0});function we(l,[o,e]){return Math.min(e,Math.max(o,l))}Rt(we,"clamp");var Et=Object.defineProperty,jt=(l,o)=>Et(l,"name",{value:o,configurable:!0});function Ue(l){const o=d.useRef({value:l,previous:l});return d.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}jt(Ue,"usePrevious");var Dt=Object.defineProperty,x=(l,o)=>Dt(l,"name",{value:o,configurable:!0}),Mt=[" ","Enter","ArrowUp","ArrowDown"],Ot=[" ","Enter"],de="Select",[he,ge,kt]=it(de),[re,bo]=ht(de,[kt,ke]),be=ke(),[At,J]=re(de),[Lt,Bt]=re(de);function We(l){const{__scopeSelect:o,children:e,open:t,defaultOpen:s,onOpenChange:n,value:r,defaultValue:a,onValueChange:c,dir:i,name:m,autoComplete:v,disabled:w,required:y,form:C,internal_do_not_use_render:I}=l,p=be(o),[g,T]=d.useState(null),[h,f]=d.useState(null),[R,E]=d.useState(!1),Q=vt(i),[A,V]=_e({prop:t,defaultProp:s??!1,onChange:n,caller:de}),[ee,G]=_e({prop:r,defaultProp:a,onChange:c,caller:de}),W=d.useRef(null),K=d.useRef(ee);d.useEffect(()=>{const D=C?g==null?void 0:g.ownerDocument.getElementById(C):g==null?void 0:g.form;if(D instanceof HTMLFormElement){const F=x(()=>G(K.current),"reset");return D.addEventListener("reset",F),()=>D.removeEventListener("reset",F)}},[C,g,G]);const te=g?!!C||!!g.closest("form"):!0,[z,H]=d.useState(new Set),Y=Oe(),q=Array.from(z).map(D=>D.props.value).join(";"),X=d.useCallback(D=>{H(F=>new Set(F).add(D))},[]),$=d.useCallback(D=>{H(F=>{const ce=new Set(F);return ce.delete(D),ce})},[]),ae={required:y,trigger:g,onTriggerChange:T,valueNode:h,onValueNodeChange:f,valueNodeHasChildren:R,onValueNodeHasChildrenChange:E,contentId:Y,value:ee,onValueChange:G,open:A,onOpenChange:V,dir:Q,triggerPointerDownPosRef:W,disabled:w,name:m,autoComplete:v,form:C,nativeOptions:z,nativeSelectKey:q,isFormControl:te};return u.jsx(wt,{...p,children:u.jsx(At,{scope:o,...ae,children:u.jsx(he.Provider,{scope:o,children:u.jsx(Lt,{scope:o,onNativeOptionAdd:X,onNativeOptionRemove:$,children:tt(I)?I(ae):e})})})})}x(We,"SelectProvider");var Vt=x(l=>{const{__scopeSelect:o,children:e,...t}=l;return u.jsx(We,{__scopeSelect:o,...t,internal_do_not_use_render:({isFormControl:s})=>u.jsxs(u.Fragment,{children:[e,s?u.jsx(co,{__scopeSelect:o}):null]})})},"Select"),Ht="SelectTrigger",Ke=d.forwardRef(x(function(o,e){const{__scopeSelect:t,disabled:s=!1,...n}=o,r=be(t),a=J(Ht,t),c=a.disabled||s,i=U(e,a.onTriggerChange),m=ge(t),v=d.useRef("touch"),[w,y,C]=Te(p=>{const g=m().filter(f=>!f.disabled),T=g.find(f=>f.value===a.value),h=Pe(g,p,T);h!==void 0&&a.onValueChange(h.value)}),I=x(p=>{c||(a.onOpenChange(!0),C()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})},"handleOpen");return u.jsx(lt,{asChild:!0,...r,children:u.jsx(L.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pe(a.value)?"":void 0,...n,ref:i,onClick:j(n.onClick,p=>{p.currentTarget.focus(),v.current!=="mouse"&&I(p)}),onPointerDown:j(n.onPointerDown,p=>{v.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(I(p),p.preventDefault())}),onKeyDown:j(n.onKeyDown,p=>{const g=w.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&Mt.includes(p.key)&&(I(),p.preventDefault())})})})},"SelectTrigger")),$t="SelectValue",Ft=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,children:r,placeholder:a="",...c}=o,i=J($t,t),{onValueNodeHasChildrenChange:m}=i,v=r!==void 0,w=U(e,i.onValueNodeChange);Z(()=>{m(v)},[m,v]);const y=pe(i.value);return u.jsx(L.span,{...c,asChild:y?!1:c.asChild,ref:w,style:{pointerEvents:"none"},children:u.jsx(d.Fragment,{children:y?a:r},y?"placeholder":"value")})},"SelectValue")),Ut=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,...n}=o;return u.jsx(L.span,{"aria-hidden":!0,...n,ref:e,children:s||"▼"})},"SelectIcon")),Wt="SelectPortal",[Kt,zt]=re(Wt,{forceMount:void 0}),Gt=x(l=>{const{__scopeSelect:o,forceMount:e,...t}=l;return u.jsx(Kt,{scope:l.__scopeSelect,forceMount:e,children:u.jsx(at,{asChild:!0,...t})})},"SelectPortal"),se="SelectContent",ze=d.forwardRef(x(function(o,e){const t=zt(se,o.__scopeSelect),{forceMount:s=t.forceMount,...n}=o,r=J(se,o.__scopeSelect),[a,c]=d.useState();return Z(()=>{c(new DocumentFragment)},[]),u.jsx(ct,{present:s||r.open,children:({present:i})=>i?u.jsx(Xt,{...n,ref:e}):u.jsx(Yt,{...n,fragment:a})})},"SelectContent")),Yt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,fragment:n}=o;return n?De.createPortal(u.jsx(Ge,{scope:t,children:u.jsx(he.Slot,{scope:t,children:u.jsx("div",{ref:e,children:s})})}),n):null},"SelectContentFragment")),B=10,[Ge,le]=re(se),qt=gt("SelectContent.RemoveScroll"),Xt=d.forwardRef(x(function(o,e){const{__scopeSelect:t}=o,{position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:r,onPointerDownOutside:a,side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g,...T}=o,h=J(se,t),[f,R]=d.useState(null),[E,Q]=d.useState(null),A=U(e,R),[V,ee]=d.useState(null),[G,W]=d.useState(null),K=ge(t),[te,z]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(f)return dt(f)},[f]),ut();const Y=d.useCallback(S=>{const[N,...O]=K().map(P=>P.ref.current),[_]=O.slice(-1),b=document.activeElement;for(const P of S)if(P===b||(P==null||P.scrollIntoView({block:"nearest"}),P===N&&E&&(E.scrollTop=0),P===_&&E&&(E.scrollTop=E.scrollHeight),P==null||P.focus(),document.activeElement!==b))return},[K,E]),q=d.useCallback(()=>Y([V,f]),[Y,V,f]);d.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:X,triggerPointerDownPosRef:$}=h;d.useEffect(()=>{if(f){let S={x:0,y:0};const N=x(_=>{var b,P;S={x:Math.abs(Math.round(_.pageX)-(((b=$.current)==null?void 0:b.x)??0)),y:Math.abs(Math.round(_.pageY)-(((P=$.current)==null?void 0:P.y)??0))}},"handlePointerMove"),O=x(_=>{S.x<=10&&S.y<=10?_.preventDefault():_.composedPath().includes(f)||X(!1),document.removeEventListener("pointermove",N),$.current=null},"handlePointerUp");return $.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[f,X,$]),d.useEffect(()=>{const S=x(()=>X(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[X]);const[ae,D]=Te(S=>{const N=K().filter(b=>!b.disabled),O=N.find(b=>b.ref.current===document.activeElement),_=Pe(N,S,O);_&&setTimeout(()=>{var b;return(b=_.ref.current)==null?void 0:b.focus()})}),F=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&(ee(S),_&&(H.current=!0))},[h.value]),ce=d.useCallback(()=>f==null?void 0:f.focus(),[f]),ie=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&W(S)},[h.value]),fe=s==="popper"?Ne:Zt,ue=fe===Ne?{side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g}:{};return u.jsx(Ge,{scope:t,content:f,viewport:E,onViewportChange:Q,itemRefCallback:F,selectedItem:V,onItemLeave:ce,itemTextRefCallback:ie,focusSelectedItem:q,selectedItemText:G,position:s,isPositioned:te,searchRef:ae,children:u.jsx(pt,{as:qt,allowPinchZoom:!0,children:u.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:j(n,S=>{var N;(N=h.trigger)==null||N.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:S=>S.preventDefault(),...T,...ue,onPlaced:()=>z(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:j(T.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&D(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let _=K().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(S.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const b=S.target,P=_.indexOf(b);_=_.slice(P+1)}setTimeout(()=>Y(_)),S.preventDefault()}})})})})})})},"SelectContentImpl")),Zt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onPlaced:s,...n}=o,r=J(se,t),a=le(se,t),[c,i]=d.useState(null),[m,v]=d.useState(null),w=U(e,v),y=ge(t),C=d.useRef(!1),I=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:T,focusSelectedItem:h}=a,f=d.useCallback(()=>{if(r.trigger&&r.valueNode&&c&&m&&p&&g&&T){const A=r.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),ee=r.valueNode.getBoundingClientRect(),G=T.getBoundingClientRect();if(r.dir!=="rtl"){const b=G.left-V.left,P=ee.left-b,oe=A.left-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.left=ve+"px"}else{const b=V.right-G.right,P=window.innerWidth-ee.right-b,oe=window.innerWidth-A.right-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.right=ve+"px"}const W=y(),K=window.innerHeight-B*2,te=p.scrollHeight,z=window.getComputedStyle(m),H=parseInt(z.borderTopWidth,10),Y=parseInt(z.paddingTop,10),q=parseInt(z.borderBottomWidth,10),X=parseInt(z.paddingBottom,10),$=H+Y+te+X+q,ae=Math.min(g.offsetHeight*5,$),D=window.getComputedStyle(p),F=parseInt(D.paddingTop,10),ce=parseInt(D.paddingBottom,10),ie=A.top+A.height/2-B,fe=K-ie,ue=g.offsetHeight/2,S=g.offsetTop+ue,N=H+Y+S,O=$-N;if(N<=ie){const b=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const P=m.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(fe,ue+(b?ce:0)+P+q),ne=N+oe;c.style.height=ne+"px"}else{const b=W.length>0&&g===W[0].ref.current;c.style.top="0px";const oe=Math.max(ie,H+p.offsetTop+(b?F:0)+ue)+O;c.style.height=oe+"px",p.scrollTop=N-ie+p.offsetTop}c.style.margin=`${B}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[y,r.trigger,r.valueNode,c,m,p,g,T,r.dir,s]);Z(()=>f(),[f]);const[R,E]=d.useState();Z(()=>{m&&E(window.getComputedStyle(m).zIndex)},[m]);const Q=d.useCallback(A=>{A&&I.current===!0&&(f(),h==null||h(),I.current=!1)},[f,h]);return u.jsx(Jt,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:Q,children:u.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(L.div,{...n,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Ne=d.forwardRef(x(function(o,e){const{__scopeSelect:t,align:s="start",collisionPadding:n=B,...r}=o,a=be(t);return u.jsx(St,{...a,...r,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...r.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Jt,Ie]=re(se,{}),Re="SelectViewport",Qt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,nonce:s,...n}=o,r=le(Re,t),a=Ie(Re,t),c=U(e,r.onViewportChange),i=d.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(he.Slot,{scope:t,children:u.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:j(n.onScroll,m=>{const v=m.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&w){const C=Math.abs(i.current-v.scrollTop);if(C>0){const I=window.innerHeight-B*2,p=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),T=Math.max(p,g);if(T<I){const h=T+C,f=Math.min(I,h),R=h-f;w.style.height=f+"px",w.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,w.style.justifyContent="flex-end")}}}i.current=v.scrollTop})})})]})},"SelectViewport")),eo="SelectGroup",[Io,to]=re(eo),oo="SelectLabel",Ye=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o,n=to(oo,t);return u.jsx(L.div,{id:n.id,...s,ref:e})},"SelectLabel")),ye="SelectItem",[no,qe]=re(ye),Xe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,value:s,disabled:n=!1,textValue:r,...a}=o,c=J(ye,t),i=le(ye,t),m=c.value===s,[v,w]=d.useState(r??""),[y,C]=d.useState(!1),I=Ce(f=>{var R;return(R=i.itemRefCallback)==null?void 0:R.call(i,f,s,n)}),p=U(e,I),g=Oe(),T=d.useRef("touch"),h=x(()=>{n||(c.onValueChange(s),c.onOpenChange(!1))},"handleSelect");return u.jsx(no,{scope:t,value:s,disabled:n,textId:g,isSelected:m,onItemTextChange:d.useCallback(f=>{w(R=>R||((f==null?void 0:f.textContent)??"").trim())},[]),children:u.jsx(he.ItemSlot,{scope:t,value:s,disabled:n,textValue:v,children:u.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...a,ref:p,onFocus:j(a.onFocus,()=>C(!0)),onBlur:j(a.onBlur,()=>C(!1)),onClick:j(a.onClick,()=>{T.current!=="mouse"&&h()}),onPointerUp:j(a.onPointerUp,()=>{T.current==="mouse"&&h()}),onPointerDown:j(a.onPointerDown,f=>{T.current=f.pointerType}),onPointerMove:j(a.onPointerMove,f=>{var R;T.current=f.pointerType,n?(R=i.onItemLeave)==null||R.call(i):T.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(a.onPointerLeave,f=>{var R;f.currentTarget===document.activeElement&&((R=i.onItemLeave)==null||R.call(i))}),onKeyDown:j(a.onKeyDown,f=>{var E;n||f.target!==f.currentTarget||((E=i.searchRef)==null?void 0:E.current)!==""&&f.key===" "||(Ot.includes(f.key)&&h(),f.key===" "&&f.preventDefault())})})})})},"SelectItem")),me="SelectItemText",so=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,...r}=o,a=J(me,t),c=le(me,t),i=qe(me,t),m=Bt(me,t),[v,w]=d.useState(null),y=Ce(h=>{var f;return(f=c.itemTextRefCallback)==null?void 0:f.call(c,h,i.value,i.disabled)}),C=U(e,w,i.onItemTextChange,y),I=v==null?void 0:v.textContent,p=d.useMemo(()=>u.jsx("option",{value:i.value,disabled:i.disabled,children:I},i.value),[i.disabled,i.value,I]),{onNativeOptionAdd:g,onNativeOptionRemove:T}=m;return Z(()=>(g(p),()=>T(p)),[g,T,p]),u.jsxs(u.Fragment,{children:[u.jsx(L.span,{id:i.textId,...r,ref:C}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!pe(a.value)?De.createPortal(r.children,a.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",lo=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return qe(ro,t).isSelected?u.jsx(L.span,{"aria-hidden":!0,...s,ref:e}):null},"SelectItemIndicator")),Ee="SelectScrollUpButton",Ze=d.forwardRef(x(function(o,e){const t=le(Ee,o.__scopeSelect),s=Ie(Ee,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollTop>0;r(m)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null},"SelectScrollUpButton")),je="SelectScrollDownButton",Je=d.forwardRef(x(function(o,e){const t=le(je,o.__scopeSelect),s=Ie(je,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollHeight-i.clientHeight,v=Math.ceil(i.scrollTop)<m;r(v)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null},"SelectScrollDownButton")),Qe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onAutoScroll:s,...n}=o,r=le("SelectScrollButton",t),a=d.useRef(null),c=ge(t),i=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),Z(()=>{var v;const m=c().find(w=>w.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),u.jsx(L.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:j(n.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:j(n.onPointerMove,()=>{var m;(m=r.onItemLeave)==null||m.call(r),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:j(n.onPointerLeave,()=>{i()})})},"SelectScrollButtonImpl")),et=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return u.jsx(L.div,{"aria-hidden":!0,...s,ref:e})},"SelectSeparator")),ao="SelectBubbleInput",co=d.forwardRef(x(function({__scopeSelect:o,...e},t){const s=J(ao,o),{value:n,onValueChange:r,required:a,disabled:c,name:i,autoComplete:m,form:v}=s,{nativeOptions:w,nativeSelectKey:y}=s,C=d.useRef(null),I=U(t,C),p=n??"",g=Ue(p),T=Array.from(w).some(h=>(h.props.value??"")==="");return d.useEffect(()=>{const h=C.current;if(!h)return;const f=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(f,"value").set;if(g!==p&&E){const Q=new Event("change",{bubbles:!0});E.call(h,p),h.dispatchEvent(Q)}},[g,p]),u.jsxs(L.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:i,autoComplete:m,disabled:c,form:v,onChange:h=>r(h.target.value),...e,style:{...xt,...e.style},ref:I,defaultValue:p,children:[pe(n)&&!T?u.jsx("option",{value:""}):null,Array.from(w)]},y)},"SelectBubbleInput"));function tt(l){return typeof l=="function"}x(tt,"isFunction");function pe(l){return l===""||l===void 0}x(pe,"shouldShowPlaceholder");function Te(l){const o=Ce(l),e=d.useRef(""),t=d.useRef(0),s=d.useCallback(r=>{const a=e.current+r;o(a),x((function c(i){e.current=i,window.clearTimeout(t.current),i!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(a)},[o]),n=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,s,n]}x(Te,"useTypeaheadSearch");function Pe(l,o,e){const s=o.length>1&&Array.from(o).every(i=>i===o[0])?o[0]:o,n=e?l.indexOf(e):-1;let r=ot(l,Math.max(n,0));s.length===1&&(r=r.filter(i=>i!==e));const c=r.find(i=>i.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==e?c:void 0}x(Pe,"findNextItem");function ot(l,o){return l.map((e,t)=>l[(o+t)%l.length])}x(ot,"wrapArray");const To=Vt,Po=Ft,io=d.forwardRef((l,o)=>{const e=k.c(12);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(Ut,{asChild:!0,children:u.jsx($e,{className:"h-4 w-4 opacity-50"})}),e[6]=a):a=e[6];let c;return e[7]!==t||e[8]!==n||e[9]!==o||e[10]!==r?(c=u.jsxs(Ke,{ref:o,className:r,...n,children:[t,a]}),e[7]=t,e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],c});io.displayName=Ke.displayName;const nt=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(_t,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Ze,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});nt.displayName=Ze.displayName;const st=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx($e,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Je,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});st.displayName=Je.displayName;const uo=d.forwardRef((l,o)=>{const e=k.c(21);let t,s,n,r;e[0]!==l?({className:s,children:t,position:r,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n,e[4]=r):(t=e[1],s=e[2],n=e[3],r=e[4]);const a=r===void 0?"popper":r,c=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let i;e[5]!==s||e[6]!==c?(i=M("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",c,s),e[5]=s,e[6]=c,e[7]=i):i=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=u.jsx(nt,{}),e[8]=m):m=e[8];const v=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]";let w;e[9]!==v?(w=M("p-1",v),e[9]=v,e[10]=w):w=e[10];let y;e[11]!==t||e[12]!==w?(y=u.jsx(Qt,{className:w,children:t}),e[11]=t,e[12]=w,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=u.jsx(st,{}),e[14]=C):C=e[14];let I;return e[15]!==a||e[16]!==n||e[17]!==o||e[18]!==i||e[19]!==y?(I=u.jsx(Gt,{children:u.jsxs(ze,{ref:o,className:i,position:a,...n,children:[m,y,C]})}),e[15]=a,e[16]=n,e[17]=o,e[18]=i,e[19]=y,e[20]=I):I=e[20],I});uo.displayName=ze.displayName;const po=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ye,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});po.displayName=Ye.displayName;const fo=d.forwardRef((l,o)=>{const e=k.c(14);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(lo,{children:u.jsx(yt,{className:"h-4 w-4"})})}),e[6]=a):a=e[6];let c;e[7]!==t?(c=u.jsx(so,{children:t}),e[7]=t,e[8]=c):c=e[8];let i;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==c?(i=u.jsxs(Xe,{ref:o,className:r,...n,children:[a,c]}),e[9]=n,e[10]=o,e[11]=r,e[12]=c,e[13]=i):i=e[13],i});fo.displayName=Xe.displayName;const mo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(et,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});mo.displayName=et.displayName;const _o=Ct,No=bt,ho=It,rt=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Be,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});rt.displayName=Be.displayName;const go=d.forwardRef((l,o)=>{const e=k.c(13);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(rt,{}),e[4]=r):r=e[4];let a;e[5]!==s?(a=M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsxs(Tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(Pt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=c):c=e[7];let i;return e[8]!==t||e[9]!==n||e[10]!==o||e[11]!==a?(i=u.jsxs(ho,{children:[r,u.jsxs(Ae,{ref:o,className:a,...n,children:[t,c]})]}),e[8]=t,e[9]=n,e[10]=o,e[11]=a,e[12]=i):i=e[12],i});go.displayName=Ae.displayName;const So=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col space-y-1.5 text-center sm:text-left",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};So.displayName="DialogHeader";const xo=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};xo.displayName="DialogFooter";const vo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-lg font-semibold leading-none tracking-tight",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Le,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});vo.displayName=Le.displayName;const wo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-sm text-muted-foreground",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ve,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});wo.displayName=Ve.displayName;export{$e as C,_o as D,To as S,go as a,wo as b,xo as c,So as d,vo as e,No as f,uo as g,fo as h,io as i,Po as j,we as k};
11
+ */const Fe={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};Fe.node;const _t=Me(Fe);var Nt=Object.defineProperty,Rt=(l,o)=>Nt(l,"name",{value:o,configurable:!0});function we(l,[o,e]){return Math.min(e,Math.max(o,l))}Rt(we,"clamp");var Et=Object.defineProperty,jt=(l,o)=>Et(l,"name",{value:o,configurable:!0});function Ue(l){const o=d.useRef({value:l,previous:l});return d.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}jt(Ue,"usePrevious");var Dt=Object.defineProperty,x=(l,o)=>Dt(l,"name",{value:o,configurable:!0}),Mt=[" ","Enter","ArrowUp","ArrowDown"],Ot=[" ","Enter"],de="Select",[he,ge,kt]=it(de),[re,bo]=ht(de,[kt,ke]),be=ke(),[At,J]=re(de),[Lt,Bt]=re(de);function We(l){const{__scopeSelect:o,children:e,open:t,defaultOpen:s,onOpenChange:n,value:r,defaultValue:a,onValueChange:c,dir:i,name:m,autoComplete:v,disabled:w,required:y,form:C,internal_do_not_use_render:I}=l,p=be(o),[g,T]=d.useState(null),[h,f]=d.useState(null),[R,E]=d.useState(!1),Q=vt(i),[A,V]=_e({prop:t,defaultProp:s??!1,onChange:n,caller:de}),[ee,G]=_e({prop:r,defaultProp:a,onChange:c,caller:de}),W=d.useRef(null),K=d.useRef(ee);d.useEffect(()=>{const D=C?g==null?void 0:g.ownerDocument.getElementById(C):g==null?void 0:g.form;if(D instanceof HTMLFormElement){const F=x(()=>G(K.current),"reset");return D.addEventListener("reset",F),()=>D.removeEventListener("reset",F)}},[C,g,G]);const te=g?!!C||!!g.closest("form"):!0,[z,H]=d.useState(new Set),Y=Oe(),q=Array.from(z).map(D=>D.props.value).join(";"),X=d.useCallback(D=>{H(F=>new Set(F).add(D))},[]),$=d.useCallback(D=>{H(F=>{const ce=new Set(F);return ce.delete(D),ce})},[]),ae={required:y,trigger:g,onTriggerChange:T,valueNode:h,onValueNodeChange:f,valueNodeHasChildren:R,onValueNodeHasChildrenChange:E,contentId:Y,value:ee,onValueChange:G,open:A,onOpenChange:V,dir:Q,triggerPointerDownPosRef:W,disabled:w,name:m,autoComplete:v,form:C,nativeOptions:z,nativeSelectKey:q,isFormControl:te};return u.jsx(wt,{...p,children:u.jsx(At,{scope:o,...ae,children:u.jsx(he.Provider,{scope:o,children:u.jsx(Lt,{scope:o,onNativeOptionAdd:X,onNativeOptionRemove:$,children:tt(I)?I(ae):e})})})})}x(We,"SelectProvider");var Vt=x(l=>{const{__scopeSelect:o,children:e,...t}=l;return u.jsx(We,{__scopeSelect:o,...t,internal_do_not_use_render:({isFormControl:s})=>u.jsxs(u.Fragment,{children:[e,s?u.jsx(co,{__scopeSelect:o}):null]})})},"Select"),Ht="SelectTrigger",Ke=d.forwardRef(x(function(o,e){const{__scopeSelect:t,disabled:s=!1,...n}=o,r=be(t),a=J(Ht,t),c=a.disabled||s,i=U(e,a.onTriggerChange),m=ge(t),v=d.useRef("touch"),[w,y,C]=Te(p=>{const g=m().filter(f=>!f.disabled),T=g.find(f=>f.value===a.value),h=Pe(g,p,T);h!==void 0&&a.onValueChange(h.value)}),I=x(p=>{c||(a.onOpenChange(!0),C()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})},"handleOpen");return u.jsx(lt,{asChild:!0,...r,children:u.jsx(L.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pe(a.value)?"":void 0,...n,ref:i,onClick:j(n.onClick,p=>{p.currentTarget.focus(),v.current!=="mouse"&&I(p)}),onPointerDown:j(n.onPointerDown,p=>{v.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(I(p),p.preventDefault())}),onKeyDown:j(n.onKeyDown,p=>{const g=w.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&Mt.includes(p.key)&&(I(),p.preventDefault())})})})},"SelectTrigger")),$t="SelectValue",Ft=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,children:r,placeholder:a="",...c}=o,i=J($t,t),{onValueNodeHasChildrenChange:m}=i,v=r!==void 0,w=U(e,i.onValueNodeChange);Z(()=>{m(v)},[m,v]);const y=pe(i.value);return u.jsx(L.span,{...c,asChild:y?!1:c.asChild,ref:w,style:{pointerEvents:"none"},children:u.jsx(d.Fragment,{children:y?a:r},y?"placeholder":"value")})},"SelectValue")),Ut=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,...n}=o;return u.jsx(L.span,{"aria-hidden":!0,...n,ref:e,children:s||"▼"})},"SelectIcon")),Wt="SelectPortal",[Kt,zt]=re(Wt,{forceMount:void 0}),Gt=x(l=>{const{__scopeSelect:o,forceMount:e,...t}=l;return u.jsx(Kt,{scope:l.__scopeSelect,forceMount:e,children:u.jsx(at,{asChild:!0,...t})})},"SelectPortal"),se="SelectContent",ze=d.forwardRef(x(function(o,e){const t=zt(se,o.__scopeSelect),{forceMount:s=t.forceMount,...n}=o,r=J(se,o.__scopeSelect),[a,c]=d.useState();return Z(()=>{c(new DocumentFragment)},[]),u.jsx(ct,{present:s||r.open,children:({present:i})=>i?u.jsx(Xt,{...n,ref:e}):u.jsx(Yt,{...n,fragment:a})})},"SelectContent")),Yt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,fragment:n}=o;return n?De.createPortal(u.jsx(Ge,{scope:t,children:u.jsx(he.Slot,{scope:t,children:u.jsx("div",{ref:e,children:s})})}),n):null},"SelectContentFragment")),B=10,[Ge,le]=re(se),qt=gt("SelectContent.RemoveScroll"),Xt=d.forwardRef(x(function(o,e){const{__scopeSelect:t}=o,{position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:r,onPointerDownOutside:a,side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g,...T}=o,h=J(se,t),[f,R]=d.useState(null),[E,Q]=d.useState(null),A=U(e,R),[V,ee]=d.useState(null),[G,W]=d.useState(null),K=ge(t),[te,z]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(f)return dt(f)},[f]),ut();const Y=d.useCallback(S=>{const[N,...O]=K().map(P=>P.ref.current),[_]=O.slice(-1),b=document.activeElement;for(const P of S)if(P===b||(P==null||P.scrollIntoView({block:"nearest"}),P===N&&E&&(E.scrollTop=0),P===_&&E&&(E.scrollTop=E.scrollHeight),P==null||P.focus(),document.activeElement!==b))return},[K,E]),q=d.useCallback(()=>Y([V,f]),[Y,V,f]);d.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:X,triggerPointerDownPosRef:$}=h;d.useEffect(()=>{if(f){let S={x:0,y:0};const N=x(_=>{var b,P;S={x:Math.abs(Math.round(_.pageX)-(((b=$.current)==null?void 0:b.x)??0)),y:Math.abs(Math.round(_.pageY)-(((P=$.current)==null?void 0:P.y)??0))}},"handlePointerMove"),O=x(_=>{S.x<=10&&S.y<=10?_.preventDefault():_.composedPath().includes(f)||X(!1),document.removeEventListener("pointermove",N),$.current=null},"handlePointerUp");return $.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[f,X,$]),d.useEffect(()=>{const S=x(()=>X(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[X]);const[ae,D]=Te(S=>{const N=K().filter(b=>!b.disabled),O=N.find(b=>b.ref.current===document.activeElement),_=Pe(N,S,O);_&&setTimeout(()=>{var b;return(b=_.ref.current)==null?void 0:b.focus()})}),F=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&(ee(S),_&&(H.current=!0))},[h.value]),ce=d.useCallback(()=>f==null?void 0:f.focus(),[f]),ie=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&W(S)},[h.value]),fe=s==="popper"?Ne:Zt,ue=fe===Ne?{side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g}:{};return u.jsx(Ge,{scope:t,content:f,viewport:E,onViewportChange:Q,itemRefCallback:F,selectedItem:V,onItemLeave:ce,itemTextRefCallback:ie,focusSelectedItem:q,selectedItemText:G,position:s,isPositioned:te,searchRef:ae,children:u.jsx(pt,{as:qt,allowPinchZoom:!0,children:u.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:j(n,S=>{var N;(N=h.trigger)==null||N.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:S=>S.preventDefault(),...T,...ue,onPlaced:()=>z(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:j(T.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&D(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let _=K().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(S.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const b=S.target,P=_.indexOf(b);_=_.slice(P+1)}setTimeout(()=>Y(_)),S.preventDefault()}})})})})})})},"SelectContentImpl")),Zt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onPlaced:s,...n}=o,r=J(se,t),a=le(se,t),[c,i]=d.useState(null),[m,v]=d.useState(null),w=U(e,v),y=ge(t),C=d.useRef(!1),I=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:T,focusSelectedItem:h}=a,f=d.useCallback(()=>{if(r.trigger&&r.valueNode&&c&&m&&p&&g&&T){const A=r.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),ee=r.valueNode.getBoundingClientRect(),G=T.getBoundingClientRect();if(r.dir!=="rtl"){const b=G.left-V.left,P=ee.left-b,oe=A.left-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.left=ve+"px"}else{const b=V.right-G.right,P=window.innerWidth-ee.right-b,oe=window.innerWidth-A.right-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.right=ve+"px"}const W=y(),K=window.innerHeight-B*2,te=p.scrollHeight,z=window.getComputedStyle(m),H=parseInt(z.borderTopWidth,10),Y=parseInt(z.paddingTop,10),q=parseInt(z.borderBottomWidth,10),X=parseInt(z.paddingBottom,10),$=H+Y+te+X+q,ae=Math.min(g.offsetHeight*5,$),D=window.getComputedStyle(p),F=parseInt(D.paddingTop,10),ce=parseInt(D.paddingBottom,10),ie=A.top+A.height/2-B,fe=K-ie,ue=g.offsetHeight/2,S=g.offsetTop+ue,N=H+Y+S,O=$-N;if(N<=ie){const b=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const P=m.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(fe,ue+(b?ce:0)+P+q),ne=N+oe;c.style.height=ne+"px"}else{const b=W.length>0&&g===W[0].ref.current;c.style.top="0px";const oe=Math.max(ie,H+p.offsetTop+(b?F:0)+ue)+O;c.style.height=oe+"px",p.scrollTop=N-ie+p.offsetTop}c.style.margin=`${B}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[y,r.trigger,r.valueNode,c,m,p,g,T,r.dir,s]);Z(()=>f(),[f]);const[R,E]=d.useState();Z(()=>{m&&E(window.getComputedStyle(m).zIndex)},[m]);const Q=d.useCallback(A=>{A&&I.current===!0&&(f(),h==null||h(),I.current=!1)},[f,h]);return u.jsx(Jt,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:Q,children:u.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(L.div,{...n,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Ne=d.forwardRef(x(function(o,e){const{__scopeSelect:t,align:s="start",collisionPadding:n=B,...r}=o,a=be(t);return u.jsx(St,{...a,...r,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...r.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Jt,Ie]=re(se,{}),Re="SelectViewport",Qt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,nonce:s,...n}=o,r=le(Re,t),a=Ie(Re,t),c=U(e,r.onViewportChange),i=d.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(he.Slot,{scope:t,children:u.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:j(n.onScroll,m=>{const v=m.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&w){const C=Math.abs(i.current-v.scrollTop);if(C>0){const I=window.innerHeight-B*2,p=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),T=Math.max(p,g);if(T<I){const h=T+C,f=Math.min(I,h),R=h-f;w.style.height=f+"px",w.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,w.style.justifyContent="flex-end")}}}i.current=v.scrollTop})})})]})},"SelectViewport")),eo="SelectGroup",[Io,to]=re(eo),oo="SelectLabel",Ye=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o,n=to(oo,t);return u.jsx(L.div,{id:n.id,...s,ref:e})},"SelectLabel")),ye="SelectItem",[no,qe]=re(ye),Xe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,value:s,disabled:n=!1,textValue:r,...a}=o,c=J(ye,t),i=le(ye,t),m=c.value===s,[v,w]=d.useState(r??""),[y,C]=d.useState(!1),I=Ce(f=>{var R;return(R=i.itemRefCallback)==null?void 0:R.call(i,f,s,n)}),p=U(e,I),g=Oe(),T=d.useRef("touch"),h=x(()=>{n||(c.onValueChange(s),c.onOpenChange(!1))},"handleSelect");return u.jsx(no,{scope:t,value:s,disabled:n,textId:g,isSelected:m,onItemTextChange:d.useCallback(f=>{w(R=>R||((f==null?void 0:f.textContent)??"").trim())},[]),children:u.jsx(he.ItemSlot,{scope:t,value:s,disabled:n,textValue:v,children:u.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...a,ref:p,onFocus:j(a.onFocus,()=>C(!0)),onBlur:j(a.onBlur,()=>C(!1)),onClick:j(a.onClick,()=>{T.current!=="mouse"&&h()}),onPointerUp:j(a.onPointerUp,()=>{T.current==="mouse"&&h()}),onPointerDown:j(a.onPointerDown,f=>{T.current=f.pointerType}),onPointerMove:j(a.onPointerMove,f=>{var R;T.current=f.pointerType,n?(R=i.onItemLeave)==null||R.call(i):T.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(a.onPointerLeave,f=>{var R;f.currentTarget===document.activeElement&&((R=i.onItemLeave)==null||R.call(i))}),onKeyDown:j(a.onKeyDown,f=>{var E;n||f.target!==f.currentTarget||((E=i.searchRef)==null?void 0:E.current)!==""&&f.key===" "||(Ot.includes(f.key)&&h(),f.key===" "&&f.preventDefault())})})})})},"SelectItem")),me="SelectItemText",so=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,...r}=o,a=J(me,t),c=le(me,t),i=qe(me,t),m=Bt(me,t),[v,w]=d.useState(null),y=Ce(h=>{var f;return(f=c.itemTextRefCallback)==null?void 0:f.call(c,h,i.value,i.disabled)}),C=U(e,w,i.onItemTextChange,y),I=v==null?void 0:v.textContent,p=d.useMemo(()=>u.jsx("option",{value:i.value,disabled:i.disabled,children:I},i.value),[i.disabled,i.value,I]),{onNativeOptionAdd:g,onNativeOptionRemove:T}=m;return Z(()=>(g(p),()=>T(p)),[g,T,p]),u.jsxs(u.Fragment,{children:[u.jsx(L.span,{id:i.textId,...r,ref:C}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!pe(a.value)?De.createPortal(r.children,a.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",lo=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return qe(ro,t).isSelected?u.jsx(L.span,{"aria-hidden":!0,...s,ref:e}):null},"SelectItemIndicator")),Ee="SelectScrollUpButton",Ze=d.forwardRef(x(function(o,e){const t=le(Ee,o.__scopeSelect),s=Ie(Ee,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollTop>0;r(m)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null},"SelectScrollUpButton")),je="SelectScrollDownButton",Je=d.forwardRef(x(function(o,e){const t=le(je,o.__scopeSelect),s=Ie(je,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollHeight-i.clientHeight,v=Math.ceil(i.scrollTop)<m;r(v)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null},"SelectScrollDownButton")),Qe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onAutoScroll:s,...n}=o,r=le("SelectScrollButton",t),a=d.useRef(null),c=ge(t),i=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),Z(()=>{var v;const m=c().find(w=>w.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),u.jsx(L.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:j(n.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:j(n.onPointerMove,()=>{var m;(m=r.onItemLeave)==null||m.call(r),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:j(n.onPointerLeave,()=>{i()})})},"SelectScrollButtonImpl")),et=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return u.jsx(L.div,{"aria-hidden":!0,...s,ref:e})},"SelectSeparator")),ao="SelectBubbleInput",co=d.forwardRef(x(function({__scopeSelect:o,...e},t){const s=J(ao,o),{value:n,onValueChange:r,required:a,disabled:c,name:i,autoComplete:m,form:v}=s,{nativeOptions:w,nativeSelectKey:y}=s,C=d.useRef(null),I=U(t,C),p=n??"",g=Ue(p),T=Array.from(w).some(h=>(h.props.value??"")==="");return d.useEffect(()=>{const h=C.current;if(!h)return;const f=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(f,"value").set;if(g!==p&&E){const Q=new Event("change",{bubbles:!0});E.call(h,p),h.dispatchEvent(Q)}},[g,p]),u.jsxs(L.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:i,autoComplete:m,disabled:c,form:v,onChange:h=>r(h.target.value),...e,style:{...xt,...e.style},ref:I,defaultValue:p,children:[pe(n)&&!T?u.jsx("option",{value:""}):null,Array.from(w)]},y)},"SelectBubbleInput"));function tt(l){return typeof l=="function"}x(tt,"isFunction");function pe(l){return l===""||l===void 0}x(pe,"shouldShowPlaceholder");function Te(l){const o=Ce(l),e=d.useRef(""),t=d.useRef(0),s=d.useCallback(r=>{const a=e.current+r;o(a),x((function c(i){e.current=i,window.clearTimeout(t.current),i!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(a)},[o]),n=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,s,n]}x(Te,"useTypeaheadSearch");function Pe(l,o,e){const s=o.length>1&&Array.from(o).every(i=>i===o[0])?o[0]:o,n=e?l.indexOf(e):-1;let r=ot(l,Math.max(n,0));s.length===1&&(r=r.filter(i=>i!==e));const c=r.find(i=>i.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==e?c:void 0}x(Pe,"findNextItem");function ot(l,o){return l.map((e,t)=>l[(o+t)%l.length])}x(ot,"wrapArray");const To=Vt,Po=Ft,io=d.forwardRef((l,o)=>{const e=k.c(12);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(Ut,{asChild:!0,children:u.jsx($e,{className:"h-4 w-4 opacity-50"})}),e[6]=a):a=e[6];let c;return e[7]!==t||e[8]!==n||e[9]!==o||e[10]!==r?(c=u.jsxs(Ke,{ref:o,className:r,...n,children:[t,a]}),e[7]=t,e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],c});io.displayName=Ke.displayName;const nt=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(_t,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Ze,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});nt.displayName=Ze.displayName;const st=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx($e,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Je,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});st.displayName=Je.displayName;const uo=d.forwardRef((l,o)=>{const e=k.c(21);let t,s,n,r;e[0]!==l?({className:s,children:t,position:r,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n,e[4]=r):(t=e[1],s=e[2],n=e[3],r=e[4]);const a=r===void 0?"popper":r,c=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let i;e[5]!==s||e[6]!==c?(i=M("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",c,s),e[5]=s,e[6]=c,e[7]=i):i=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=u.jsx(nt,{}),e[8]=m):m=e[8];const v=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]";let w;e[9]!==v?(w=M("p-1",v),e[9]=v,e[10]=w):w=e[10];let y;e[11]!==t||e[12]!==w?(y=u.jsx(Qt,{className:w,children:t}),e[11]=t,e[12]=w,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=u.jsx(st,{}),e[14]=C):C=e[14];let I;return e[15]!==a||e[16]!==n||e[17]!==o||e[18]!==i||e[19]!==y?(I=u.jsx(Gt,{children:u.jsxs(ze,{ref:o,className:i,position:a,...n,children:[m,y,C]})}),e[15]=a,e[16]=n,e[17]=o,e[18]=i,e[19]=y,e[20]=I):I=e[20],I});uo.displayName=ze.displayName;const po=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ye,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});po.displayName=Ye.displayName;const fo=d.forwardRef((l,o)=>{const e=k.c(14);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=M("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(lo,{children:u.jsx(yt,{className:"h-4 w-4"})})}),e[6]=a):a=e[6];let c;e[7]!==t?(c=u.jsx(so,{children:t}),e[7]=t,e[8]=c):c=e[8];let i;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==c?(i=u.jsxs(Xe,{ref:o,className:r,...n,children:[a,c]}),e[9]=n,e[10]=o,e[11]=r,e[12]=c,e[13]=i):i=e[13],i});fo.displayName=Xe.displayName;const mo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(et,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});mo.displayName=et.displayName;const _o=Ct,No=bt,ho=It,rt=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ve,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});rt.displayName=Ve.displayName;const go=d.forwardRef((l,o)=>{const e=k.c(13);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(rt,{}),e[4]=r):r=e[4];let a;e[5]!==s?(a=M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsxs(Tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(Pt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=c):c=e[7];let i;return e[8]!==t||e[9]!==n||e[10]!==o||e[11]!==a?(i=u.jsxs(ho,{children:[r,u.jsxs(Ae,{ref:o,className:a,...n,children:[t,c]})]}),e[8]=t,e[9]=n,e[10]=o,e[11]=a,e[12]=i):i=e[12],i});go.displayName=Ae.displayName;const So=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col space-y-1.5 text-center sm:text-left",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};So.displayName="DialogHeader";const xo=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};xo.displayName="DialogFooter";const vo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-lg font-semibold leading-none tracking-tight",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Le,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});vo.displayName=Le.displayName;const wo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-sm text-muted-foreground",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Be,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});wo.displayName=Be.displayName;export{$e as C,_o as D,To as S,go as a,wo as b,xo as c,So as d,vo as e,No as f,uo as g,fo as h,io as i,Po as j,we as k};