@lunora/studio 1.0.0-alpha.5 → 1.0.0-alpha.51

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 (198) hide show
  1. package/LICENSE.md +6 -0
  2. package/__assets__/package-og.svg +1 -1
  3. package/dist/index.d.ts +45 -23
  4. package/dist/index.js +31 -31
  5. package/dist/mount.d.ts +1 -1
  6. package/dist/mount.js +3 -2
  7. package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
  8. package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +29 -41
  9. package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +16 -11
  10. package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +55 -32
  11. package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +15 -32
  12. package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +153 -208
  13. package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
  14. package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +108 -69
  15. package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +46 -58
  16. package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +45 -139
  17. package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
  18. package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +44 -51
  19. package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
  20. package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +17 -16
  21. package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +47 -31
  22. package/dist/packem_chunks/SettingsPanel.js +391 -0
  23. package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +179 -401
  24. package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +13 -94
  25. package/dist/packem_chunks/agents-panel.js +326 -0
  26. package/dist/packem_chunks/analytics-panel.js +261 -0
  27. package/dist/packem_chunks/auth-config-panel.js +365 -0
  28. package/dist/packem_chunks/auth-sessions-panel.js +175 -0
  29. package/dist/packem_chunks/containers-panel.js +261 -0
  30. package/dist/packem_chunks/dashboards-panel.js +781 -0
  31. package/dist/packem_chunks/fanout-panel.js +482 -0
  32. package/dist/packem_chunks/flags-panel.js +176 -0
  33. package/dist/packem_chunks/issues-panel.js +188 -0
  34. package/dist/packem_chunks/kv-browser.js +1896 -0
  35. package/dist/packem_chunks/log-drains-panel.js +273 -0
  36. package/dist/packem_chunks/organizations-panel.js +3178 -0
  37. package/dist/packem_chunks/payments-panel.js +186 -0
  38. package/dist/packem_chunks/permissions-panel.js +805 -0
  39. package/dist/packem_chunks/queues-panel.js +1075 -0
  40. package/dist/packem_chunks/rls-panel.js +315 -0
  41. package/dist/packem_chunks/schedule-panel.js +831 -0
  42. package/dist/packem_chunks/sparkline.js +79 -0
  43. package/dist/packem_chunks/storage-rules-panel.js +140 -0
  44. package/dist/packem_chunks/subscriptions-panel.js +238 -0
  45. package/dist/packem_chunks/users-panel.js +1731 -0
  46. package/dist/packem_chunks/vector-browser.js +281 -0
  47. package/dist/packem_chunks/workflows-panel.js +562 -0
  48. package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-DNeyYtUN.js} +8 -0
  49. package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-_aEZxAMX.js} +2 -2
  50. package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-Dd8pcswz.js} +2 -1
  51. package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-BXV4eKf5.js} +1 -1
  52. package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-C8hejnub.js} +201 -250
  53. package/dist/packem_shared/{DataFilters-FNquMaiu.js → DataFilters-B1Q7mrt7.js} +6 -2
  54. package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-f5Ll2AQK.js} +43 -68
  55. package/dist/packem_shared/HomePanel-Ye8PaqQL.js +14 -0
  56. package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-CWaf0ZtX.js} +2 -1
  57. package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-dHMgnJbx.js} +163 -60
  58. package/dist/packem_shared/{ShardInput-gx_DZXXn.js → ShardInput-CZnpHILL.js} +1 -1
  59. package/dist/packem_shared/Studio-BNGjxLVo.js +16 -0
  60. package/dist/packem_shared/{StudioApp-D4azxYBu.js → StudioApp-K9dn1Q9d.js} +75 -24
  61. package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-Cx21PS_T.js} +6 -6
  62. package/dist/packem_shared/alert-CdAET2K_.js +68 -0
  63. package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-CGdOmLTm.d.ts} +1 -1
  64. package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-DSwcWIRy.js} +5 -4
  65. package/dist/packem_shared/browser-storage-L4gOP5gJ.js +105 -0
  66. package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
  67. package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-C9I16KWr.js} +1 -1
  68. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
  69. package/dist/packem_shared/error-alert-vIPQoN3Y.js +114 -0
  70. package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-B_fZH4iQ.js} +133 -164
  71. package/dist/packem_shared/home-panel-D62G8108.js +1889 -0
  72. package/dist/packem_shared/internal-zwBoOv24.js +122 -0
  73. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
  74. package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DUULLuOi.js} +8 -61
  75. package/dist/packem_shared/result-chart-DZradBAS.js +119 -0
  76. package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
  77. package/dist/packem_shared/select-UkNYCT3s.js +273 -0
  78. package/dist/packem_shared/shard-history-AxiJ1WPP.js +16 -0
  79. package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
  80. package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-BnA1kC9X.js} +1 -1
  81. package/dist/packem_shared/studio-Cd21fp4v.js +4090 -0
  82. package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
  83. package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-huX4VmgI.js} +19 -9
  84. package/dist/packem_shared/use-admin-query-BGJ010yZ.js +106 -0
  85. package/dist/packem_shared/use-async-submit-DGCtuDyz.js +91 -0
  86. package/dist/standalone/chunk-22C6COGE.js +13 -0
  87. package/dist/standalone/chunk-2K47A3P6.js +1 -0
  88. package/dist/standalone/chunk-2MLA6WFH.js +1 -0
  89. package/dist/standalone/chunk-2NGUNNGW.js +1 -0
  90. package/dist/standalone/chunk-2ZL6MXBC.js +4 -0
  91. package/dist/standalone/chunk-3GXGLNKW.js +1 -0
  92. package/dist/standalone/chunk-3OA7PECS.js +6 -0
  93. package/dist/standalone/chunk-4PC7IXNY.js +1 -0
  94. package/dist/standalone/chunk-4QA5TWYJ.js +1 -0
  95. package/dist/standalone/chunk-4QHKBC77.js +1 -0
  96. package/dist/standalone/chunk-5OIBXYZM.js +1 -0
  97. package/dist/standalone/chunk-6TYT447C.js +1 -0
  98. package/dist/standalone/chunk-7SN6J4DZ.js +1 -0
  99. package/dist/standalone/chunk-7TJJXVSE.js +1 -0
  100. package/dist/standalone/chunk-A3ZJACVT.js +4 -0
  101. package/dist/standalone/chunk-AHILM3ZP.js +1 -0
  102. package/dist/standalone/chunk-AITOCPML.js +1 -0
  103. package/dist/standalone/chunk-AJ2B326V.js +1 -0
  104. package/dist/standalone/chunk-APSSZB6Z.js +1 -0
  105. package/dist/standalone/chunk-AVONJCNY.js +4 -0
  106. package/dist/standalone/chunk-BE24FXAK.js +1 -0
  107. package/dist/standalone/chunk-BJGBHGK3.js +1 -0
  108. package/dist/standalone/chunk-CKSHCYGC.js +2 -0
  109. package/dist/standalone/chunk-CP2EQVLU.js +1 -0
  110. package/dist/standalone/chunk-DTPFXYHG.js +1 -0
  111. package/dist/standalone/chunk-DWDILV2E.js +1 -0
  112. package/dist/standalone/chunk-E3FVNRH7.js +1 -0
  113. package/dist/standalone/chunk-EEWKIQUE.js +1 -0
  114. package/dist/standalone/chunk-EOE5NDMK.js +1 -0
  115. package/dist/standalone/chunk-FJV4UNYY.js +1 -0
  116. package/dist/standalone/chunk-FWTZYHX4.js +1 -0
  117. package/dist/standalone/chunk-G465LTLD.js +1 -0
  118. package/dist/standalone/chunk-G6URLCRC.js +3 -0
  119. package/dist/standalone/chunk-G7ZBM54M.js +1 -0
  120. package/dist/standalone/chunk-GTM65MVX.js +1 -0
  121. package/dist/standalone/chunk-HV7G6DFP.js +5 -0
  122. package/dist/standalone/chunk-IMZKGRPW.js +1 -0
  123. package/dist/standalone/chunk-ITQKVEP7.js +19 -0
  124. package/dist/standalone/chunk-IZN4TYMN.js +1 -0
  125. package/dist/standalone/chunk-J6J54MBP.js +1 -0
  126. package/dist/standalone/chunk-JM7XBQVK.js +1 -0
  127. package/dist/standalone/chunk-JPILGFXT.js +1 -0
  128. package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
  129. package/dist/standalone/chunk-KDZJ5A3R.js +1 -0
  130. package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
  131. package/dist/standalone/chunk-KGQGNJJ2.js +1 -0
  132. package/dist/standalone/chunk-KJJ3WM6H.js +4 -0
  133. package/dist/standalone/chunk-KKJZL75J.js +1 -0
  134. package/dist/standalone/chunk-KZ6INM5M.js +1 -0
  135. package/dist/standalone/chunk-L2YBC2BV.js +11 -0
  136. package/dist/standalone/chunk-L7SK4ZZD.js +1 -0
  137. package/dist/standalone/chunk-LAK5VSPI.js +1 -0
  138. package/dist/standalone/chunk-LDEVBRDZ.js +1 -0
  139. package/dist/standalone/chunk-LUP4YTBS.js +1 -0
  140. package/dist/standalone/chunk-LVH4KLXS.js +13 -0
  141. package/dist/standalone/chunk-MDTNVR3G.js +1 -0
  142. package/dist/standalone/chunk-N4NG7HGI.js +1 -0
  143. package/dist/standalone/chunk-O3NAGRTR.js +1 -0
  144. package/dist/standalone/chunk-ONSKQCYN.js +3 -0
  145. package/dist/standalone/chunk-OQE56NBE.js +1 -0
  146. package/dist/standalone/chunk-OSPEOESV.js +8 -0
  147. package/dist/standalone/chunk-Q7PYLDZU.js +1 -0
  148. package/dist/standalone/chunk-Q7TKOAGT.js +1 -0
  149. package/dist/standalone/chunk-QAFAJBAW.js +1 -0
  150. package/dist/standalone/chunk-RRCPZMC2.js +22 -0
  151. package/dist/standalone/chunk-RXVQJ4DO.js +1 -0
  152. package/dist/standalone/chunk-S5NTGHCG.js +1 -0
  153. package/dist/standalone/chunk-SDQE2IUJ.js +1 -0
  154. package/dist/standalone/chunk-SEU5V7I6.js +1 -0
  155. package/dist/standalone/chunk-SHERR7ZP.js +1 -0
  156. package/dist/standalone/chunk-T3UCZ5PJ.js +1 -0
  157. package/dist/standalone/chunk-TAD43CG5.js +1 -0
  158. package/dist/standalone/chunk-TAQM5WML.js +1 -0
  159. package/dist/standalone/chunk-TO6D2PJC.js +6 -0
  160. package/dist/standalone/chunk-TQ36RWOP.js +1 -0
  161. package/dist/standalone/chunk-TSLR3ZU2.js +1 -0
  162. package/dist/standalone/chunk-UK64ZSUW.js +1 -0
  163. package/dist/standalone/chunk-UX53GWGU.js +1 -0
  164. package/dist/standalone/chunk-V43BLH4J.js +1 -0
  165. package/dist/standalone/chunk-VC5RNEHU.js +1 -0
  166. package/dist/standalone/chunk-VL23Y44O.js +4 -0
  167. package/dist/standalone/chunk-VLIRTNLA.js +4 -0
  168. package/dist/standalone/chunk-VLXV72QE.js +1 -0
  169. package/dist/standalone/chunk-VN2PDOMK.js +1 -0
  170. package/dist/standalone/chunk-VZFJI6XE.js +1 -0
  171. package/dist/standalone/chunk-W6JKUZKD.js +1 -0
  172. package/dist/standalone/chunk-WI7GWFEG.js +1 -0
  173. package/dist/standalone/chunk-WJ6OBCUM.js +1 -0
  174. package/dist/standalone/chunk-WUFVFVHJ.js +1 -0
  175. package/dist/standalone/chunk-WVTPZ6CM.js +1 -0
  176. package/dist/standalone/chunk-X4QFAAZ5.js +76 -0
  177. package/dist/standalone/chunk-XNJNSCLM.js +1 -0
  178. package/dist/standalone/chunk-XOANGJJP.js +1 -0
  179. package/dist/standalone/chunk-YA6POZJD.js +1 -0
  180. package/dist/standalone/chunk-ZECNJ4FG.js +1 -0
  181. package/dist/standalone/chunk-ZETIKSQJ.js +1 -0
  182. package/dist/standalone/chunk-ZHVTQ37P.js +1 -0
  183. package/dist/standalone/chunk-ZIGWVHCS.js +1 -0
  184. package/dist/standalone/chunk-ZPP2KOR4.js +1 -0
  185. package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
  186. package/dist/standalone/chunk-ZZMGCPXE.js +2 -0
  187. package/dist/standalone/studio.js +104 -246
  188. package/dist/styles.css +2 -2
  189. package/package.json +17 -15
  190. package/dist/packem_shared/HomePanel-Cw16stjq.js +0 -1273
  191. package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
  192. package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
  193. package/dist/packem_shared/Studio-BmSGSIuY.js +0 -33
  194. package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
  195. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  196. package/dist/packem_shared/studio-H9fuQgSj.js +0 -10303
  197. package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
  198. package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
@@ -0,0 +1,3 @@
1
+ import{a as Wn}from"./chunk-ZPUO7FNI.js";import{a as ao,b as io,c as lo,d as _n,e as us}from"./chunk-WVTPZ6CM.js";import{$ as kn,A as Jt,C as Rn,D as j,E as Sn,F as Nn,I as Xt,L as gt,M as Yo,N as eo,P as Jo,Q as En,R as Tn,S as Xo,T as to,U as oo,V as so,W as ro,X as es,Y as no,_ as wn,aa as ts,b as cn,ba as os,ea as ss,fa as st,ga as Mn,ha as co,i as mn,ia as On,j as gn,ja as ue,k as hn,ka as rs,l as Xs,m as Zo,ma as ns,na as as,o as qo,oa as is,p as vn,pa as ls,q as Go,qa as cs,ra as ds,s as xn,sa as In,ta as Dn,u as bn,ua as ps,v as yn,va as An,w as Pn,x as Ko,y as Qo,z as Cn}from"./chunk-SHERR7ZP.js";import{f as sn}from"./chunk-ZIGWVHCS.js";import{a as zn}from"./chunk-7TJJXVSE.js";import{a as Zr,b as qr,d as Gr,e as ft,f as zo,g as Kr,h as Qr,i as Yr,j as Jr,k as Xr}from"./chunk-WI7GWFEG.js";import{b as uo}from"./chunk-RXVQJ4DO.js";import{a as ct,e as tr}from"./chunk-SEU5V7I6.js";import{a as fs}from"./chunk-KZ6INM5M.js";import{c as Vn,h as Bn,k as er}from"./chunk-4QHKBC77.js";import{B as dn,C as pn,I as He,J as un,K as Yt,O as A,P as Y,R as fn,e as be,p as Po,q as ln}from"./chunk-VL23Y44O.js";import{a as Wr}from"./chunk-HV7G6DFP.js";import{b as ht,c as po}from"./chunk-UK64ZSUW.js";import{a as mt,c as nn,h as Wo,i as an}from"./chunk-O3NAGRTR.js";import{a as Js,b as yo}from"./chunk-ZPP2KOR4.js";import{a as lt,i as Rt,j as F}from"./chunk-CKSHCYGC.js";import{a as St}from"./chunk-G7ZBM54M.js";import{f as Ys}from"./chunk-L2YBC2BV.js";import{a as rn}from"./chunk-ZHVTQ37P.js";import{a as xe}from"./chunk-3OA7PECS.js";import{a as Ln}from"./chunk-TAD43CG5.js";import{a as en,b as tn,c as on,d as ae,f as Fn,g as Hn,l as $e,m as $n,n as jn,o as Un}from"./chunk-ITQKVEP7.js";import{b as Qs}from"./chunk-22C6COGE.js";import{a,d as Ks,e as S,f as O,g as Uo,h as bo,j as z}from"./chunk-RRCPZMC2.js";var B=S(Uo(),1);var ut=S(O(),1),Z=S(O(),1);var i=S(bo(),1);var Zn=S(O(),1),vt=S(bo(),1);var Pi={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Ci={overflow:"auto",whiteSpace:"pre-wrap"},ms=class extends Zn.Component{static{a(this,"ErrorBoundary")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=a(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:s,retryLabel:r}=this.props,{error:n}=this.state;if(n===null)return(0,vt.jsxDEV)(vt.Fragment,{children:e},void 0,!1);let l=o??(s===void 0?"Something went wrong":`${s} failed`);return(0,vt.jsxDEV)("div",{"data-testid":"dash-error-boundary",role:"alert",style:Pi,children:[(0,vt.jsxDEV)("strong",{children:l},void 0,!1),(0,vt.jsxDEV)("pre",{"data-testid":"dash-error-message",style:Ci,children:n.message},void 0,!1),(0,vt.jsxDEV)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:r??"Try again"},void 0,!1)]},void 0,!0)}};var Pt={};Ks(Pt,{Arrow:()=>cr,Backdrop:()=>dr,Close:()=>fr,Description:()=>ur,Handle:()=>Ro,Popup:()=>lr,Portal:()=>rr,Positioner:()=>nr,Root:()=>Kn,Title:()=>pr,Trigger:()=>or,Viewport:()=>mr,createHandle:()=>ca});var dt=S(O(),1);var gs=S(O(),1);var hs=gs.createContext(void 0);hs.displayName="PopoverRootContext";function oe(t){let e=gs.useContext(hs);if(e===void 0&&!t)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e}a(oe,"usePopoverRootContext");var xt=S(O(),1),qn=S(Wr(),1);function Ri(){return{...ao(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}a(Ri,"createInitialState");var Si={...lo,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),openMethod:j(t=>t.openMethod),openChangeReason:j(t=>t.openChangeReason),modal:j(t=>t.modal),focusManagerModal:j(t=>t.focusManagerModal),stickIfOpen:j(t=>t.stickIfOpen),titleElementId:j(t=>t.titleElementId),descriptionElementId:j(t=>t.descriptionElementId),openOnHover:j(t=>t.openOnHover),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},fo=class t extends Xt{static{a(this,"PopoverStore")}constructor(e,o,s=!1){let r={...Ri(),...e},n=new no;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=io(n,o,s),super(r,{popupRef:xt.createRef(),backdropRef:xt.createRef(),internalBackdropRef:xt.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:xt.createRef(),beforeContentFocusGuardRef:xt.createRef(),stickIfOpenTimeout:new dn,triggerElements:n},Si)}setOpen=a((e,o)=>{let s=o.reason===A.triggerHover,r=o.reason===A.triggerPress&&o.event.detail===0,n=!e&&(o.reason===A.escapeKey||o.reason==null),l=En(o),d=this.select("activeTriggerId");if(!e&&o.reason===A.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=a(()=>{let c={open:e,openChangeReason:o.reason};Jo(c,e,o.trigger,l()),this.update(c)},"changeState");s?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),qn.flushSync(p)):p(),r||n?this.set("instantType",r?"click":"dismiss"):o.reason===A.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:s,internalStore:r}=eo(e,(n,l)=>new t(o,n,l));return xt.useEffect(()=>r?.disposeEffect(),[r]),s}disposeEffect=a(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Nt=S(xe(),1);function Gn({props:t}){let{children:e,open:o,defaultOpen:s=!1,onOpenChange:r,onOpenChangeComplete:n,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=fo.useStore(d?.store,{modal:l,open:s,openProp:o,activeTriggerId:c,triggerIdProp:p});Xo(u,o,s,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let g=u.useState("open"),m=u.useState("mounted"),h=u.useState("payload"),f=xn()!=null;u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",n),es(u,g),oo(u);let{forceUnmount:v}=so(g,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:f}),dt.useEffect(()=>{g||u.context.stickIfOpenTimeout.clear()},[u,g]);let x=dt.useCallback(()=>{u.setOpen(!1,Y(A.imperativeAction))},[u]);dt.useImperativeHandle(t.actionsRef,()=>({unmount:v,close:x}),[v,x]);let b=g||m,P=dt.useMemo(()=>({store:u}),[u]);return(0,Nt.jsxs)(hs.Provider,{value:P,children:[b&&(0,Nt.jsx)(Ni,{store:u,modal:l}),typeof e=="function"?e({payload:h}):e]})}a(Gn,"PopoverRootComponent");function Kn(t){return oe(!0)?(0,Nt.jsx)(Gn,{props:t}):(0,Nt.jsx)(Pn,{children:(0,Nt.jsx)(Gn,{props:t})})}a(Kn,"PopoverRoot");function Ni({store:t,modal:e}){let o=t.useState("floatingRootContext"),s=Jt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=s.reference??Rt,n=s.trigger??Rt,l=dt.useMemo(()=>lt(gt,s.floating),[s.floating]);return ro(t,{activeTriggerProps:r,inactiveTriggerProps:n,popupProps:l}),null}a(Ni,"PopoverInteractions");var bt=S(O(),1);var Et=S(xe(),1);var or=bt.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:g=300,closeDelay:m=0,id:h,...f}=e,v=oe(!0),x=p?.store??v?.store;if(!x)throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");let b=be(h),P=x.useState("isTriggerActive",b),C=x.useState("floatingRootContext"),N=x.useState("isOpenedByTrigger",b),R=x.useState("triggerPopupId",b),E=bt.useRef(null),{registerTrigger:T,isMountedByThisTrigger:k}=to(b,E,x,{payload:c,disabled:l,openOnHover:u,closeDelay:m}),w=x.useState("openChangeReason"),M=x.useState("stickIfOpen"),V=x.useState("openMethod"),W=x.useState("focusManagerModal"),D=os(C,{enabled:!l&&C!=null&&u&&(V!=="touch"||w!==A.triggerPress),mouseOnly:!0,move:!1,handleClose:ss(),restMs:g,delay:{close:m},triggerElementRef:E,isActiveTrigger:P,isClosing:a(()=>x.select("transitionStatus")==="ending","isClosing")}),H=Qo(C,{enabled:C!=null,stickIfOpen:M}),$=rs(()=>x.select("open"),ee=>{x.set("openMethod",ee)}),G=x.useState("triggerProps",k),{getButtonProps:K,buttonRef:I}=ht({disabled:l,native:d}),_={open(ee){return ee&&w===A.triggerPress?On.open(ee):co.open(ee)}},{preFocusGuardRef:U,handlePreFocusGuardFocus:te,handleFocusTargetFocus:se}=_n(x,E),J=F("button",e,{state:{disabled:l,open:N},ref:[I,o,T,E],props:[H.reference,D,G,$,{[Zo]:"",id:b,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":R},f,K],stateAttributesMapping:_});return k&&!W?(0,Et.jsxs)(bt.Fragment,{children:[(0,Et.jsx)(Xs,{ref:U,onFocus:te}),(0,Et.jsx)(bt.Fragment,{children:J},b),(0,Et.jsx)(Xs,{ref:x.context.triggerFocusTargetRef,onFocus:se})]}):(0,Et.jsx)(bt.Fragment,{children:J},b)},"PopoverTrigger"));or.displayName="PopoverTrigger";var Yn=S(O(),1);var vs=S(O(),1);var xs=vs.createContext(void 0);xs.displayName="PopoverPortalContext";function Qn(){let t=vs.useContext(xs);if(t===void 0)throw new Error("Base UI: <Popover.Portal> is missing.");return t}a(Qn,"usePopoverPortalContext");var sr=S(xe(),1);var rr=Yn.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=oe();return n.useState("mounted")||s?(0,sr.jsx)(xs.Provider,{value:s,children:(0,sr.jsx)(Go,{ref:o,...r})}):null},"PopoverPortal"));rr.displayName="PopoverPortal";var go=S(O(),1);var bs=S(O(),1);var ys=bs.createContext(void 0);ys.displayName="PopoverPositionerContext";function mo(){let t=bs.useContext(ys);if(!t)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return t}a(mo,"usePopoverPositionerContext");var Co=S(xe(),1);var nr=go.forwardRef(a(function(e,o){let{render:s,className:r,style:n,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:f=5,sticky:v=!1,disableAnchorTracking:x=!1,collisionAvoidance:b=qo,...P}=e,{store:C}=oe(),N=Qn(),R=bn(),E=C.useState("floatingRootContext"),T=C.useState("mounted"),k=C.useState("open"),w=C.useState("openChangeReason"),M=C.useState("activeTriggerElement"),V=C.useState("modal"),W=C.useState("openMethod"),D=C.useState("positionerElement"),H=C.useState("instantType"),$=C.useState("transitionStatus"),G=C.useState("hasViewport"),K=go.useRef(null),I=un(D,!1,!1),_=is({anchor:l,floatingRootContext:E,positionMethod:d,mounted:T,side:p,sideOffset:u,align:c,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,disableAnchorTracking:x,keepMounted:N,nodeId:R,collisionAvoidance:b,adaptiveOrigin:G?as:void 0}),U=E.useState("domReferenceElement");mt(()=>{let J=U,ee=K.current;if(J&&(K.current=J),ee&&J&&J!==ee){C.set("instantType",void 0);let ie=new AbortController;return I(()=>{C.set("instantType","trigger-change")},ie.signal),()=>{ie.abort()}}},[U,I,C]),Dn(k&&V===!0&&w!==A.triggerHover,W==="touch",D,M);let te=go.useCallback(J=>{C.set("positionerElement",J)},[C]),se={open:k,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:H},re=ds(e,se,{styles:_.positionerStyles,transitionStatus:$,props:P,refs:[o,te],hidden:!T,inert:!k});return(0,Co.jsxs)(ys.Provider,{value:_,children:[T&&V===!0&&w!==A.triggerHover&&(0,Co.jsx)(ls,{ref:C.context.internalBackdropRef,inert:ns(!k),cutout:M}),(0,Co.jsx)(yn,{id:R,children:re})]})},"PopoverPositioner"));nr.displayName="PopoverPositioner";var Ps=S(O(),1);var yt=S(O(),1);var Jn=S(xe(),1);var ar=yt.createContext(void 0);ar.displayName="ClosePartContext";function Xn(){let[t,e]=yt.useState(0),o=nn(()=>(e(r=>r+1),()=>{e(r=>Math.max(0,r-1))}));return{context:yt.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}a(Xn,"useClosePartCount");function ea(t){let{value:e,children:o}=t;return(0,Jn.jsx)(ar.Provider,{value:e,children:o})}a(ea,"ClosePartProvider");function ta(){let t=yt.useContext(ar);mt(()=>t?.register(),[t])}a(ta,"useClosePartRegistration");var ir=S(xe(),1);var Ei={...ue,...He},lr=Ps.forwardRef(a(function(e,o){let{render:s,className:r,style:n,initialFocus:l,finalFocus:d,...p}=e,{store:c}=oe(),u=mo(),g=An(!0)!=null,{context:m,hasClosePart:h}=Xn(),f=c.useState("open"),v=c.useState("openMethod"),x=c.useState("instantType"),b=c.useState("transitionStatus"),P=c.useState("popupProps"),C=c.useState("titleElementId"),N=c.useState("descriptionElementId"),R=c.useState("modal"),E=c.useState("mounted"),T=c.useState("openChangeReason"),k=c.useState("activeTriggerElement"),w=c.useState("floatingRootContext"),M=w.useState("floatingId"),V=c.useState("disabled"),W=c.useState("openOnHover"),D=c.useState("closeDelay"),H=p.id??M;Yt({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}}),ts(w,{enabled:W&&!V,closeDelay:D});let $=l===void 0?Yo(c.context.popupRef):l,G=R!==!1&&h;c.useSyncedValue("focusManagerModal",G);let K=Ps.useCallback(U=>{c.set("popupElement",U)},[c]),I={open:f,side:u.side,align:u.align,instant:x,transitionStatus:b},_=F("div",e,{state:I,ref:[o,c.context.popupRef,K],props:[P,{id:H,role:"dialog",...gt,"aria-labelledby":C,"aria-describedby":N,onKeyDown(U){g&&ps.has(U.key)&&U.stopPropagation()}},cs(b),p],stateAttributesMapping:Ei});return(0,ir.jsx)(Ko,{context:w,openInteractionType:v,modal:G,disabled:!E||T===A.triggerHover,initialFocus:$,returnFocus:d,restoreFocus:"popup",previousFocusableElement:an(k)?k:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,ir.jsx)(ea,{value:m,children:_})})},"PopoverPopup"));lr.displayName="PopoverPopup";var oa=S(O(),1);var cr=oa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),{arrowRef:c,side:u,align:g,arrowUncentered:m,arrowStyles:h}=mo();return F("div",e,{state:{open:p,side:u,align:g,uncentered:m},ref:[o,c],props:[{style:h,"aria-hidden":!0},l],stateAttributesMapping:ue})},"PopoverArrow"));cr.displayName="PopoverArrow";var sa=S(O(),1);var Ti={...ue,...He},dr=sa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),g=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:g===A.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Ti})},"PopoverBackdrop"));dr.displayName="PopoverBackdrop";var ra=S(O(),1);var pr=ra.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=be(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));pr.displayName="PopoverTitle";var na=S(O(),1);var ur=na.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=be(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));ur.displayName="PopoverDescription";var aa=S(O(),1);var fr=aa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=ht({disabled:l,focusableWhenDisabled:!1,native:d}),{store:g}=oe();return ta(),F("button",e,{ref:[o,c],props:[{onClick(h){g.setOpen(!1,Y(A.closePress,h.nativeEvent))}},p,u]})},"PopoverClose"));fr.displayName="PopoverClose";var la=S(O(),1);var ia=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var wi={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},mr=la.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,{store:p}=oe(),{side:c}=mo(),u=p.useState("instantType"),{children:g,state:m}=us({store:p,side:c,cssVars:ia,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:wi})},"PopoverViewport"));mr.displayName="PopoverViewport";var Ro=class{static{a(this,"PopoverHandle")}constructor(){this.store=new fo}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ca(){return new Ro}a(ca,"createPopoverHandle");var fe={};Ks(fe,{Backdrop:()=>gr,Close:()=>hr,Description:()=>vr,Handle:()=>wo,Popup:()=>xr,Portal:()=>br,Root:()=>Ra,Title:()=>Cr,Trigger:()=>Rr,Viewport:()=>Pr,createHandle:()=>Ea});var da=S(O(),1);var So=S(O(),1);var No=So.createContext(!1);No.displayName="IsDrawerContext";var Cs=So.createContext(void 0);Cs.displayName="DialogRootContext";function ce(t){let e=So.useContext(Cs);if(t===!1&&e===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return e}a(ce,"useDialogRootContext");var ki={...ue,...He},gr=da.forwardRef(a(function(e,o){let{render:s,className:r,style:n,forceRender:l=!1,...d}=e,{store:p}=ce(),c=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),m=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:m},ref:[p.context.backdropRef,o],stateAttributesMapping:ki,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));gr.displayName="DialogBackdrop";var pa=S(O(),1);var hr=pa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=ce(),u=c.useState("open"),{getButtonProps:g,buttonRef:m}=ht({disabled:l,native:d}),h={disabled:l};function f(v){u&&c.setOpen(!1,Y(A.closePress,v.nativeEvent))}return a(f,"handleClick"),F("button",e,{state:h,ref:[o,m],props:[{onClick:f},p,g]})},"DialogClose"));hr.displayName="DialogClose";var ua=S(O(),1);var vr=ua.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=ce(),c=be(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));vr.displayName="DialogDescription";var ga=S(O(),1);var fa=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var ma=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Rs=S(O(),1);var Ss=Rs.createContext(void 0);Ss.displayName="DialogPortalContext";function Ns(){let t=Rs.useContext(Ss);if(t===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return t}a(Ns,"useDialogPortalContext");var ha=S(xe(),1);var Mi={...ue,...He,nestedDialogOpen(t){return t?{[ma.nestedDialogOpen]:""}:null}},xr=ga.forwardRef(a(function(e,o){let{render:s,className:r,style:n,finalFocus:l,initialFocus:d,...p}=e,{store:c}=ce(),u=c.useState("descriptionElementId"),g=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),h=c.useState("popupProps"),f=c.useState("modal"),v=c.useState("mounted"),x=c.useState("nested"),b=c.useState("nestedOpenDialogCount"),P=c.useState("open"),C=c.useState("openMethod"),N=c.useState("titleElementId"),R=c.useState("transitionStatus"),E=c.useState("role"),T=m.useState("floatingId"),k=p.id??T;Ns(),Yt({open:P,ref:c.context.popupRef,onComplete(){P&&c.context.onOpenChangeComplete?.(!0)}});let w=d===void 0?Yo(c.context.popupRef):d,M=b>0,V=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:P,nested:x,transitionStatus:R,nestedDialogOpen:M},props:[h,{id:k,"aria-labelledby":N??void 0,"aria-describedby":u??void 0,role:E,...gt,hidden:!v,onKeyDown(H){ps.has(H.key)&&H.stopPropagation()},style:{[fa.nestedDialogs]:b}},p],ref:[o,c.context.popupRef,V],stateAttributesMapping:Mi});return(0,ha.jsx)(Ko,{context:m,openInteractionType:C,disabled:!v,closeOnFocusOut:!g,initialFocus:w,returnFocus:l,modal:f!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));xr.displayName="DialogPopup";var va=S(O(),1);var Eo=S(xe(),1);var br=va.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=ce(),l=n.useState("mounted"),d=n.useState("modal"),p=n.useState("open");return l||s?(0,Eo.jsx)(Ss.Provider,{value:s,children:(0,Eo.jsxs)(Go,{ref:o,...r,children:[l&&d===!0&&(0,Eo.jsx)(ls,{ref:n.context.internalBackdropRef,inert:ns(!p)}),e.children]})}):null},"DialogPortal"));br.displayName="DialogPortal";var Ca=S(O(),1);var ya=S(O(),1);var pt=S(O(),1);function xa(t){let{store:e,actionsRef:o}=t,s=e.useState("open");es(e,s),oo(e);let{forceUnmount:r}=so(s,e),n=pt.useCallback(()=>{e.setOpen(!1,Y(A.imperativeAction))},[e]);pt.useImperativeHandle(o,()=>({unmount:r,close:n}),[r,n])}a(xa,"useDialogRoot");function ba({store:t,parentContext:e,isDrawer:o}){let s=t.useState("open"),r=t.useState("disablePointerDismissal"),n=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=pt.useState(0),[u,g]=pt.useState(0),m=p===0,h=Jt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!t.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;let P=ln(b);return m&&!r?n&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===P||t.context.backdropRef.current===P||Po(P,l)&&!P?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});In(s&&n===!0,l),t.useContextCallback("onNestedDialogOpen",(b,P)=>{c(b),g(P)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),g(0)}),pt.useEffect(()=>(e?.onNestedDialogOpen&&s&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!s&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&s&&e.onNestedDialogClose()}),[o,s,p,u,e]);let f=h.reference??Rt,v=h.trigger??Rt,x=h.floating??Rt;return ro(t,{activeTriggerProps:f,inactiveTriggerProps:v,popupProps:x,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}a(ba,"DialogInteractions");var Es=S(O(),1);var Oi={...lo,modal:j(t=>t.modal),nested:j(t=>t.nested),nestedOpenDialogCount:j(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:j(t=>t.nestedOpenDrawerCount),disablePointerDismissal:j(t=>t.disablePointerDismissal),openMethod:j(t=>t.openMethod),descriptionElementId:j(t=>t.descriptionElementId),titleElementId:j(t=>t.titleElementId),viewportElement:j(t=>t.viewportElement),role:j(t=>t.role)},ho=class t extends Xt{static{a(this,"DialogStore")}constructor(e,o,s=!1){let r=new no,n=_i(e);n.floatingRootContext=io(r,o,s),super(n,{popupRef:Es.createRef(),backdropRef:Es.createRef(),internalBackdropRef:Es.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Oi)}setOpen=a((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let s={open:e};Jo(s,e,o.trigger),this.update(s)},"setOpen");static useStore(e,o){return eo(e,(r,n)=>new t(o,r,n),!0).store}};function _i(t={}){return{...ao(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}a(_i,"createInitialState");var To=S(xe(),1);function Pa(t,e="dialog"){let{children:o,open:s,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:g,defaultTriggerId:m=null}=t,h=e==="drawer",f=e==="alert-dialog",v=f?!0:p,x=f||d,b=f?"alertdialog":"dialog",P=ce(!0),N={modal:v,disablePointerDismissal:x,nested:!!P,role:b},R=ho.useStore(u?.store,{open:r,openProp:s,activeTriggerId:m,triggerIdProp:g,...N});Rn(()=>{let V=s===void 0&&R.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;f?R.update(V?{...N,...V}:N):V&&R.update(V)}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",g),R.useSyncedValues(N),R.useContextCallback("onOpenChange",n),R.useContextCallback("onOpenChangeComplete",l);let E=R.useState("open"),T=R.useState("mounted"),k=R.useState("payload");xa({store:R,actionsRef:c});let w=E||T,M=ya.useMemo(()=>({store:R}),[R]);return(0,To.jsx)(No.Provider,{value:!1,children:(0,To.jsxs)(Cs.Provider,{value:M,children:[w&&(0,To.jsx)(ba,{store:R,parentContext:P?.store.context,isDrawer:h}),typeof o=="function"?o({payload:k}):o]})})}a(Pa,"useRenderDialogRoot");function Ra(t){let e=Ca.useContext(No)?"drawer":"dialog";return Pa(t,e)}a(Ra,"DialogRoot");var Sa=S(O(),1);var yr=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Ii={...ue,...He,nested(t){return t?{[yr.nested]:""}:null},nestedDialogOpen(t){return t?{[yr.nestedDialogOpen]:""}:null}},Pr=Sa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=Ns(),{store:c}=ce(),u=c.useState("open"),g=c.useState("nested"),m=c.useState("transitionStatus"),h=c.useState("nestedOpenDialogCount"),f=c.useState("mounted"),v=c.useStateSetter("viewportElement"),x=h>0;return F("div",e,{enabled:p||f,state:{open:u,nested:g,transitionStatus:m,nestedDialogOpen:x},ref:[o,v],stateAttributesMapping:Ii,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));Pr.displayName="DialogViewport";var Na=S(O(),1);var Cr=Na.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=ce(),c=be(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));Cr.displayName="DialogTitle";var Ts=S(O(),1);var Rr=Ts.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...g}=e,m=ce(!0),h=u?.store??m?.store;if(!h)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let f=be(p),v=h.useState("floatingRootContext"),x=h.useState("isOpenedByTrigger",f),b=h.useState("triggerPopupId",f),P=Ts.useRef(null),{registerTrigger:C,isMountedByThisTrigger:N}=to(f,P,h,{payload:c}),{getButtonProps:R,buttonRef:E}=ht({disabled:l,native:d}),T=Qo(v,{enabled:v!=null}),k=rs(()=>h.select("open"),V=>{h.set("openMethod",V)}),w={disabled:l,open:x},M=h.useState("triggerProps",N);return F("button",e,{state:w,ref:[E,o,C,P],props:[T.reference,M,k,{[Zo]:"",id:f,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":b},g,R],stateAttributesMapping:co})},"DialogTrigger"));Rr.displayName="DialogTrigger";var wo=class{static{a(this,"DialogHandle")}constructor(e){this.store=e??new ho}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;e&&!o&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${e}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(A.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Ea(){return new wo}a(Ea,"createDialogHandle");var nt={};Ks(nt,{Arrow:()=>Or,Handle:()=>ko,Popup:()=>Mr,Portal:()=>wr,Positioner:()=>kr,Provider:()=>Dr,Root:()=>Sr,Trigger:()=>Nr,Viewport:()=>Ar,createHandle:()=>$a});var rt=S(O(),1);var ws=S(O(),1);var ks=ws.createContext(void 0);ks.displayName="TooltipRootContext";function je(t){let e=ws.useContext(ks);if(e===void 0&&!t)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return e}a(je,"useTooltipRootContext");var Ta=S(O(),1);var Di={...lo,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),isInstantPhase:j(t=>t.isInstantPhase),trackCursorAxis:j(t=>t.trackCursorAxis),disableHoverablePopup:j(t=>t.disableHoverablePopup),lastOpenChangeReason:j(t=>t.openChangeReason),closeOnClick:j(t=>t.closeOnClick),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},vo=class t extends Xt{static{a(this,"TooltipStore")}constructor(e,o,s=!1){let r=new no,n={...Ai(),...e};n.floatingRootContext=io(r,o,s),super(n,{popupRef:Ta.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Di)}setOpen=a((e,o)=>{Tn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(A.triggerPress,e))}static useStore(e,o){return eo(e,(r,n)=>new t(o,r,n)).store}};function Ai(){return{...ao(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}a(Ai,"createInitialState");var Ms=S(xe(),1);var Sr=Sn(a(function(e){let{disabled:o=!1,defaultOpen:s=!1,open:r,disableHoverablePopup:n=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:g,defaultTriggerId:m=null,children:h}=e,f=vo.useStore(u?.store,{open:s,openProp:r,activeTriggerId:m,triggerIdProp:g});Xo(f,r,s,m),f.useControlledProp("openProp",r),f.useControlledProp("triggerIdProp",g),f.useContextCallback("onOpenChange",p),f.useContextCallback("onOpenChangeComplete",c);let v=f.useState("open"),x=!o&&v,b=f.useState("activeTriggerId"),P=f.useState("mounted"),C=f.useState("payload");f.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:n}),f.useSyncedValue("disabled",o),oo(f,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:N,transitionStatus:R}=so(x,f),E=f.useState("isInstantPhase"),T=f.useState("instantType"),k=f.useState("lastOpenChangeReason"),w=rt.useRef(null);mt(()=>{v&&o&&f.setOpen(!1,Y(A.disabled))},[v,o,f]),mt(()=>{R==="ending"&&k===A.none||R!=="ending"&&E?(T!=="delay"&&(w.current=T),f.set("instantType","delay")):w.current!==null&&(f.set("instantType",w.current),w.current=null)},[R,E,k,T,f]),mt(()=>{x&&b==null&&f.set("payload",void 0)},[f,b,x]);let M=rt.useCallback(()=>{f.setOpen(!1,Y(A.imperativeAction))},[f]);rt.useImperativeHandle(d,()=>({unmount:N,close:M}),[N,M]);let V=x||P||!o&&l!=="none";return(0,Ms.jsxs)(ks.Provider,{value:f,children:[V&&(0,Ms.jsx)(Vi,{store:f,disabled:o,trackCursorAxis:l}),typeof h=="function"?h({payload:C}):h]})},"TooltipRoot"));Sr.displayName="TooltipRoot";function Vi({store:t,disabled:e,trackCursorAxis:o}){let s=t.useState("floatingRootContext"),r=Jt(s,{enabled:!e,referencePress:a(()=>t.select("closeOnClick"),"referencePress")}),n=Cn(s,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=rt.useMemo(()=>lt(n.reference,r.reference),[n.reference,r.reference]),d=rt.useMemo(()=>lt(n.trigger,r.trigger),[n.trigger,r.trigger]),p=rt.useMemo(()=>lt(gt,n.floating,r.floating),[n.floating,r.floating]);return ro(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}a(Vi,"TooltipInteractions");var Is=S(O(),1);var Os=S(O(),1);var _s=Os.createContext(void 0);_s.displayName="TooltipProviderContext";function wa(){return Os.useContext(_s)}a(wa,"useTooltipProviderContext");var ka=(function(t){return t[t.popupOpen=Mn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Oa="data-base-ui-tooltip-trigger";function Ma(t){if("composedPath"in t){let o=t.composedPath();for(let s=0;s<o.length;s+=1){let r=o[s];if(Wo(r))return r}}let e=t.target;return Wo(e)?e:null}a(Ma,"getTargetElement");function Bi(t){let e=t;for(;e;){if(e.hasAttribute(Oa))return e;let o=e.parentElement;if(o){e=o;continue}let s=e.getRootNode();e="host"in s&&Wo(s.host)?s.host:null}return null}a(Bi,"closestEnabledTooltipTrigger");var Nr=Nn(a(function(e,o){let{render:s,className:r,style:n,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:g,id:m,...h}=e,f=je(!0),v=l?.store??f;if(!v)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let x=be(m),b=v.useState("isTriggerActive",x),P=v.useState("isOpenedByTrigger",x),C=v.useState("floatingRootContext"),N=Is.useRef(null),R=c??600,E=g??0,{registerTrigger:T,isMountedByThisTrigger:k}=to(x,N,v,{payload:d,closeOnClick:u,closeDelay:E}),w=wa(),{delayRef:M,isInstantPhase:V,hasProvider:W}=gn(C,{open:P}),D=kn(C);v.useSyncedValue("isInstantPhase",V);let H=v.useState("disabled"),$=p??H,G=hn($),K=v.useState("trackCursorAxis"),I=v.useState("disableHoverablePopup"),_=Is.useRef(!1),U=pn(),te=Is.useRef(void 0);function se(){let L=w?.delay,Q=typeof M.current=="object"?M.current.open:void 0,X=R;return W&&(Q!==0?X=c??L??R:X=0),X}a(se,"getOpenDelay");function re(L){let Q=N.current;if(!Q||!L)return!1;let X=Bi(L);return X!==null&&X!==Q&&Po(Q,X)}a(re,"isEnabledNestedTriggerTarget");function J(L){let Q=re(L);return _.current=Q,Q&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,U.clear()),Q}a(J,"detectNestedTriggerHover");let ee=os(C,{enabled:!$,mouseOnly:!0,move:!1,handleClose:!I&&K!=="both"?ss():null,restMs:se,delay(){let L=typeof M.current=="object"?M.current.close:void 0,Q=E;return g==null&&W&&(Q=L),{close:Q}},triggerElementRef:N,isActiveTrigger:b,isClosing:a(()=>v.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!_.current}}),ie=wn(C,{enabled:!$}).reference,Le=a(L=>{let Q=_.current,X=Ma(L),pe=J(X),le=N.current,Pe=le&&X&&Po(le,X);if(pe&&v.select("open")&&v.select("lastOpenChangeReason")===A.triggerHover){v.setOpen(!1,Y(A.triggerHover,L));return}if(Q&&!pe&&Pe&&!G.current&&!v.select("open")&&le&&cn(te.current)){let ne=a(()=>{!_.current&&!G.current&&!v.select("open")&&v.setOpen(!0,Y(A.triggerHover,L,le))},"open"),Ce=se();Ce===0?(U.clear(),ne()):U.start(Ce,ne)}},"handleNestedTriggerHover"),me=v.useState("triggerProps",k);return F("button",e,{state:{open:P},ref:[o,T,N],props:[ee,ie,k||K!=="none"?me:void 0,{onMouseOver(L){Le(L.nativeEvent)},onFocus(L){re(Ma(L.nativeEvent))&&L.preventBaseUIHandler()},onMouseLeave(){_.current=!1,U.clear(),te.current=void 0},onPointerEnter(L){te.current=L.pointerType},onPointerDown(L){te.current=L.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},onClick(L){u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},id:x,[ka.triggerDisabled]:$?"":void 0,[Oa]:$?void 0:""},h],stateAttributesMapping:co})},"TooltipTrigger"));Nr.displayName="TooltipTrigger";var Aa=S(O(),1);var Ds=S(O(),1);var As=Ds.createContext(void 0);As.displayName="TooltipPortalContext";function _a(){let t=Ds.useContext(As);if(t===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return t}a(_a,"useTooltipPortalContext");var Vs=S(O(),1),Ia=S(Wr(),1);var Da=S(xe(),1);var Er=Vs.forwardRef(a(function(e,o){let{children:s,container:r,className:n,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=vn({container:r,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,Da.jsxs)(Vs.Fragment,{children:[u,c&&Ia.createPortal(s,c)]})},"FloatingPortalLite"));Er.displayName="FloatingPortalLite";var Tr=S(xe(),1);var wr=Aa.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e;return je().useState("mounted")||s?(0,Tr.jsx)(As.Provider,{value:s,children:(0,Tr.jsx)(Er,{ref:o,...r})}):null},"TooltipPortal"));wr.displayName="TooltipPortal";var Fs=S(O(),1);var Bs=S(O(),1);var Ls=Bs.createContext(void 0);Ls.displayName="TooltipPositionerContext";function xo(){let t=Bs.useContext(Ls);if(t===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return t}a(xo,"useTooltipPositionerContext");var Va=S(xe(),1);var kr=Fs.forwardRef(a(function(e,o){let{render:s,className:r,anchor:n,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:f=!1,disableAnchorTracking:v=!1,collisionAvoidance:x=qo,style:b,...P}=e,C=je(),N=_a(),R=C.useState("open"),E=C.useState("mounted"),T=C.useState("trackCursorAxis"),k=C.useState("disableHoverablePopup"),w=C.useState("floatingRootContext"),M=C.useState("instantType"),V=C.useState("transitionStatus"),W=C.useState("hasViewport"),D=is({anchor:n,positionMethod:l,floatingRootContext:w,mounted:E,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:m,sticky:f,arrowPadding:h,disableAnchorTracking:v,keepMounted:N,collisionAvoidance:x,adaptiveOrigin:W?as:void 0}),H=Fs.useMemo(()=>({open:R,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:T!=="none"?"tracking-cursor":M}),[R,D.side,D.align,D.anchorHidden,T,M]),$=ds(e,H,{styles:D.positionerStyles,transitionStatus:V,props:P,refs:[o,C.useStateSetter("positionerElement")],hidden:!E,inert:!R||T==="both"||k});return(0,Va.jsx)(Ls.Provider,{value:D,children:$})},"TooltipPositioner"));kr.displayName="TooltipPositioner";var Ba=S(O(),1);var Li={...ue,...He},Mr=Ba.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{side:p,align:c}=xo(),u=d.useState("open"),g=d.useState("instantType"),m=d.useState("transitionStatus"),h=d.useState("popupProps"),f=d.useState("floatingRootContext"),v=d.useState("disabled"),x=d.useState("closeDelay");Yt({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),ts(f,{enabled:!v,closeDelay:x});let b=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:g,transitionStatus:m},ref:[o,d.context.popupRef,b],props:[h,cs(m),l],stateAttributesMapping:Li})},"TooltipPopup"));Mr.displayName="TooltipPopup";var La=S(O(),1);var Or=La.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{arrowRef:p,side:c,align:u,arrowUncentered:g,arrowStyles:m}=xo(),h=d.useState("open"),f=d.useState("instantType");return F("div",e,{state:{open:h,side:c,align:u,uncentered:g,instant:f},ref:[o,p],props:[{style:m,"aria-hidden":!0},l],stateAttributesMapping:ue})},"TooltipArrow"));Or.displayName="TooltipArrow";var _r=S(O(),1);var Ir=S(xe(),1);var Dr=a(function(e){let{delay:o,closeDelay:s,timeout:r=400}=e,n=_r.useMemo(()=>({delay:o,closeDelay:s}),[o,s]),l=_r.useMemo(()=>({open:o,close:s}),[o,s]);return(0,Ir.jsx)(_s.Provider,{value:n,children:(0,Ir.jsx)(mn,{delay:l,timeoutMs:r,children:e.children})})},"TooltipProvider");Dr.displayName="TooltipProvider";var Ha=S(O(),1);var Fa=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Fi={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},Ar=Ha.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=je(),c=xo(),u=p.useState("instantType"),{children:g,state:m}=us({store:p,side:c.side,cssVars:Fa,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:Fi})},"TooltipViewport"));Ar.displayName="TooltipViewport";var ko=class{static{a(this,"TooltipHandle")}constructor(){this.store=new vo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function $a(){return new ko}a($a,"createTooltipHandle");var ye=S(Uo(),1);var Ue=S(O(),1);var y=S(bo(),1);var Hi=Fn(St.studioFeatures),Za={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},$i=a(t=>{if(t===null||typeof t!="object")return Za;let e=t,o=a(s=>typeof e[s]=="boolean"?e[s]:!0,"flag");return{analytics:o("analytics"),auth:o("auth"),containers:o("containers"),flags:o("flags"),kv:o("kv"),mail:o("mail"),payments:o("payments"),queues:o("queues"),scheduler:o("scheduler"),storage:o("storage"),vectors:o("vectors"),workflows:o("workflows")}},"coerceFeatures"),Lr=a(()=>{let t=(0,ye.c)(3),e=Ys(),[o,s]=(0,Ue.useState)(Za),r,n;return t[0]!==e?(r=a(()=>{$e((async()=>{try{s($i(await e.query(Hi,{},Hn(""))))}catch{}})())},"t0"),n=[e],t[0]=e,t[1]=r,t[2]=n):(r=t[1],n=t[2]),(0,Ue.useEffect)(r,n),o},"useStudioFeatures"),ji=a(()=>{let t=(0,ye.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight$1"),Ui=a(t=>{let e=(0,ye.c)(24),{group:o}=t,s=ae(),r=ft(),n;e[0]!==o.tab||e[1]!==r?(n=a(()=>{$e(r({to:`/${o.tab}`}))},"t1"),e[0]=o.tab,e[1]=r,e[2]=n):n=e[2];let l=n,d=o.bindings.length,p;e[3]!==o.label?(p=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:o.label},void 0,!1),e[3]=o.label,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,y.jsxDEV)(ji,{},void 0,!1),e[5]=c):c=e[5];let u;e[6]!==p?(u=(0,y.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,c]},void 0,!0),e[6]=p,e[7]=u):u=e[7];let g;e[8]!==d||e[9]!==s?(g=d===1?s("1 binding"):s("{count} bindings",{count:d}),e[8]=d,e[9]=s,e[10]=g):g=e[10];let m;e[11]!==g?(m=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:g},void 0,!1),e[11]=g,e[12]=m):m=e[12];let h;e[13]!==d||e[14]!==o.bindings?(h=d>0&&(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-1.5",children:o.bindings.map(Zi)},void 0,!1),e[13]=d,e[14]=o.bindings,e[15]=h):h=e[15];let f;e[16]!==u||e[17]!==m||e[18]!==h?(f=(0,y.jsxDEV)(tr,{className:"flex flex-col gap-2 py-4",children:[u,m,h]},void 0,!0),e[16]=u,e[17]=m,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==o.testId||e[21]!==l||e[22]!==f?(v=(0,y.jsxDEV)(ct,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":o.testId,onClick:l,children:f},void 0,!1),e[20]=o.testId,e[21]=l,e[22]=f,e[23]=v):v=e[23],v},"BindingCard"),ja=["kv","files","vectors"],zi=a((t,e)=>[...t.filter(o=>o.tab!==e.tab),e].toSorted((o,s)=>ja.indexOf(o.tab)-ja.indexOf(s.tab)),"upsertCard"),Wi=a(()=>{let t=(0,ye.c)(19),e=Ys(),o=Lr(),s=ae(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[n,l]=(0,Ue.useState)(r),d,p;if(t[1]!==e||t[2]!==o.kv||t[3]!==o.storage||t[4]!==o.vectors||t[5]!==s?(d=a(()=>{let f={cancelled:!1},v=[{enabled:o.kv,label:s("KV Namespaces"),load:a(async()=>(await e.listKvNamespaces()).map(qi),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:o.storage,label:s("R2 Buckets"),load:a(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:o.vectors,label:s("Vectorize Indexes"),load:a(async()=>(await e.listVectorIndexes()).map(Gi),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let x of v)x.enabled&&$e((async()=>{try{let b=await x.load();if(!f.cancelled){let P={bindings:b,label:x.label,tab:x.tab,testId:x.testId};l(C=>zi(C,P))}}catch{}})());return()=>{f.cancelled=!0}},"t1"),p=[e,o.kv,o.storage,o.vectors,s],t[1]=e,t[2]=o.kv,t[3]=o.storage,t[4]=o.vectors,t[5]=s,t[6]=d,t[7]=p):(d=t[6],p=t[7]),(0,Ue.useEffect)(d,p),n.length===0)return null;let c;t[8]!==s?(c=s("Bindings"),t[8]=s,t[9]=c):c=t[9];let u;t[10]!==c?(u=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:c},void 0,!1),t[10]=c,t[11]=u):u=t[11];let g;t[12]!==n?(g=n.map(Ki),t[12]=n,t[13]=g):g=t[13];let m;t[14]!==g?(m=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:g},void 0,!1),t[14]=g,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==m?(h=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[u,m]},void 0,!0),t[16]=u,t[17]=m,t[18]=h):h=t[18],h},"BindingsOverview");function Zi(t){return(0,y.jsxDEV)(yo,{variant:"secondary",children:t},t,!1)}a(Zi,"_temp$1");function qi(t){return t.binding}a(qi,"_temp2$1");function Gi(t){return t.name}a(Gi,"_temp3$1");function Ki(t){return(0,y.jsxDEV)(Ui,{group:t},t.tab,!1)}a(Ki,"_temp4");var Qi=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation \u2014 writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action \u2014 writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],Yi=a(t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),"buildMcpConfig"),Ji=a(t=>{let e=Qi.map(o=>`- ${o.name} \u2014 ${o.summary}`).join(`
2
+ `);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
3
+ `)},"buildAgentPrompt"),Xi=1500,el=a(()=>{let t=(0,ye.c)(35),e=ae(),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=$n(),t[0]=o):o=t[0];let s=o,[r,n]=(0,Ue.useState)(null),l,d;t[1]!==r?(l=a(()=>{if(r===null)return;let M=globalThis.setTimeout(()=>{n(null)},Xi);return()=>{globalThis.clearTimeout(M)}},"t1"),d=[r],t[1]=r,t[2]=l,t[3]=d):(l=t[2],d=t[3]),(0,Ue.useEffect)(l,d);let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=a((M,V)=>{jn(V)&&n(M)},"t3"),t[4]=p):p=t[4];let c=p,u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=a(()=>{c("config",Yi(s))},"t4"),t[5]=u):u=t[5];let g=u,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{c("prompt",Ji(s))},"t5"),t[6]=m):m=t[6];let h=m,f;t[7]!==e?(f=e("Connect an AI agent"),t[7]=e,t[8]=f):f=t[8];let v;t[9]!==f?(v=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:f},void 0,!1),t[9]=f,t[10]=v):v=t[10];let x;t[11]!==e?(x=e("Drive this deployment from an AI agent over the Model Context Protocol \u2014 it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=x):x=t[12];let b;t[13]!==x?(b=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:x},void 0,!1),t[13]=x,t[14]=b):b=t[14];let P;t[15]!==v||t[16]!==b?(P=(0,y.jsxDEV)("div",{className:"flex flex-col gap-1.5 p-4",children:[v,b]},void 0,!0),t[15]=v,t[16]=b,t[17]=P):P=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"},void 0,!1),t[18]=C):C=t[18];let N;t[19]!==r||t[20]!==e?(N=e(r==="config"?"Copied":"Copy MCP config"),t[19]=r,t[20]=e,t[21]=N):N=t[21];let R;t[22]!==N?(R=(0,y.jsxDEV)(po,{"data-testid":"home-connect-agent-copy-config",onClick:g,size:"xs",variant:"outline",children:N},void 0,!1),t[22]=N,t[23]=R):R=t[23];let E;t[24]!==r||t[25]!==e?(E=e(r==="prompt"?"Copied":"Copy agent prompt"),t[24]=r,t[25]=e,t[26]=E):E=t[26];let T;t[27]!==E?(T=(0,y.jsxDEV)(po,{"data-testid":"home-connect-agent-copy-prompt",onClick:h,size:"xs",variant:"outline",children:E},void 0,!1),t[27]=E,t[28]=T):T=t[28];let k;t[29]!==R||t[30]!==T?(k=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[C,(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:[R,T]},void 0,!0)]},void 0,!0),t[29]=R,t[30]=T,t[31]=k):k=t[31];let w;return t[32]!==P||t[33]!==k?(w=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[P,k]},void 0,!0),t[32]=P,t[33]=k,t[34]=w):w=t[34],w},"ConnectAgentCard"),tl=(0,Ue.lazy)(()=>import("./chunk-IZN4TYMN.js").then(t=>({default:t.Sparkline}))),Br=a(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"formatMs"),ol=a((t,e)=>{let o=Math.max(0,Math.round((e-t)/1e3));if(o<60)return`${String(o)}s ago`;let s=Math.round(o/60);if(s<60)return`${String(s)}m ago`;let r=Math.round(s/60);return r<24?`${String(r)}h ago`:`${String(Math.round(r/24))}d ago`},"relativeTime"),Ua=a((t,e)=>{if(t===void 0||t.length===0)return[];let o=new Map;for(let s of t)o.set(s.bucketMs,(o.get(s.bucketMs)??0)+s[e]);return[...o.entries()].toSorted(([s],[r])=>s-r).map(([,s])=>s)},"bucketSeries"),za=a((t,e=!0)=>{if(t.length<4)return null;let o=Math.floor(t.length/2),s=t.slice(0,o).reduce((l,d)=>l+d,0),r=t.slice(o).reduce((l,d)=>l+d,0);if(s===0)return null;let n=(r-s)/s*100;return{positive:e?n>=0:n<=0,text:`${n>=0?"+":""}${n.toFixed(1)}%`}},"seriesDelta"),Hs=a(t=>{let e=(0,ye.c)(24),{delta:o,footer:s,label:r,trend:n,unit:l,value:d}=t,p=ae(),c;e[0]!==r?(c=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[0]=r,e[1]=c):c=e[1];let u;e[2]!==d?(u=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[2]=d,e[3]=u):u=e[3];let g;e[4]!==l?(g=l!==void 0&&(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l},void 0,!1),e[4]=l,e[5]=g):g=e[5];let m;e[6]!==u||e[7]!==g?(m=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[u,g]},void 0,!0),e[6]=u,e[7]=g,e[8]=m):m=e[8];let h;e[9]!==n?(h=n!==void 0&&(0,y.jsxDEV)(Ue.Suspense,{fallback:(0,y.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28"},void 0,!1),children:(0,y.jsxDEV)(tl,{data:n},void 0,!1)},void 0,!1),e[9]=n,e[10]=h):h=e[10];let f;e[11]!==m||e[12]!==h?(f=(0,y.jsxDEV)("div",{className:"flex items-center justify-between gap-3",children:[m,h]},void 0,!0),e[11]=m,e[12]=h,e[13]=f):f=e[13];let v;e[14]!==c||e[15]!==f?(v=(0,y.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[c,f]},void 0,!0),e[14]=c,e[15]=f,e[16]=v):v=e[16];let x;e[17]!==o||e[18]!==s||e[19]!==p?(x=o==null?s!=null&&(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s},void 0,!1):(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,y.jsxDEV)("span",{className:z("font-semibold",o.positive?"text-success":"text-destructive"),children:o.text},void 0,!1)," ",(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:p("vs. prev.")},void 0,!1)]},void 0,!0),e[17]=o,e[18]=s,e[19]=p,e[20]=x):x=e[20];let b;return e[21]!==v||e[22]!==x?(b=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[v,x]},void 0,!0),e[21]=v,e[22]=x,e[23]=b):b=e[23],b},"StatCard"),sl=a(()=>{let t=(0,ye.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight"),Vr=a(t=>{let e=(0,ye.c)(7),{command:o,label:s}=t,r;e[0]!==s?(r=(0,y.jsxDEV)("div",{className:"p-4",children:(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:s},void 0,!1)},void 0,!1),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==o?(n=(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground",children:o},void 0,!1)},void 0,!1),e[2]=o,e[3]=n):n=e[3];let l;return e[4]!==r||e[5]!==n?(l=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[r,n]},void 0,!0),e[4]=r,e[5]=n,e[6]=l):l=e[6],l},"ConnectCard"),Wa=a(t=>{let e=(0,ye.c)(18),{count:o,onView:s,testId:r,title:n}=t,l=ae(),d;e[0]!==n?(d=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==o||e[3]!==l?(p=o===null?(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l("No data yet")},void 0,!1):(0,y.jsxDEV)(yo,{variant:o>0?"destructive":"success",children:o>0?o:l("All clear")},void 0,!1),e[2]=o,e[3]=l,e[4]=p):p=e[4];let c;e[5]!==d||e[6]!==p?(c=(0,y.jsxDEV)("div",{className:"flex items-start justify-between gap-2 p-4",children:[d,p]},void 0,!0),e[5]=d,e[6]=p,e[7]=c):c=e[7];let u;e[8]!==l?(u=l("View"),e[8]=l,e[9]=u):u=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,y.jsxDEV)(sl,{},void 0,!1),e[10]=g):g=e[10];let m;e[11]!==s||e[12]!==u?(m=(0,y.jsxDEV)("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[u,g]},void 0,!0),e[11]=s,e[12]=u,e[13]=m):m=e[13];let h;return e[14]!==c||e[15]!==m||e[16]!==r?(h=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0","data-testid":r,children:[c,m]},void 0,!0),e[14]=c,e[15]=m,e[16]=r,e[17]=h):h=e[17],h},"AdvisorCard"),rl=a(t=>{let e=(0,ye.c)(7),{functions:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=[...o].toSorted(ll).slice(0,5),l;e[3]!==s?(l=s("Top functions"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[d,n.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")},void 0,!1):(0,y.jsxDEV)("div",{className:"divide-y divide-border",children:[(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[(0,y.jsxDEV)("span",{children:s("Function")},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end",children:s("Calls")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end",children:s("Avg")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-8 text-end",children:s("Err")},void 0,!1)]},void 0,!0),n.map(cl)]},void 0,!0)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"TopFunctionsCard"),nl=a(t=>{let e=(0,ye.c)(26),{subs:o}=t,s=ae(),r;e[0]!==s?(r=s("Live connections"),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==r?(n=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[2]=r,e[3]=n):n=e[3];let l=o?.totalConnections??0,d;e[4]!==l?(d=l.toLocaleString(),e[4]=l,e[5]=d):d=e[5];let p;e[6]!==d?(p=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[6]=d,e[7]=p):p=e[7];let c;e[8]!==s?(c=s("sockets"),e[8]=s,e[9]=c):c=e[9];let u;e[10]!==c?(u=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[10]=c,e[11]=u):u=e[11];let g;e[12]!==p||e[13]!==u?(g=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[p,u]},void 0,!0),e[12]=p,e[13]=u,e[14]=g):g=e[14];let m=o?.totalSubscriptions??0,h;e[15]!==m?(h=m.toLocaleString(),e[15]=m,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("active subscriptions"),e[17]=s,e[18]=f):f=e[18];let v;e[19]!==h||e[20]!==f?(v=(0,y.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",f]},void 0,!0),e[19]=h,e[20]=f,e[21]=v):v=e[21];let x;return e[22]!==v||e[23]!==n||e[24]!==g?(x=(0,y.jsxDEV)(ct,{"data-testid":"home-live-connections",children:(0,y.jsxDEV)(tr,{className:"flex flex-col gap-2.5 py-4",children:[n,g,v]},void 0,!0)},void 0,!1),e[22]=v,e[23]=n,e[24]=g,e[25]=x):x=e[25],x},"LiveConnectionsCard"),al=a(t=>{let e=(0,ye.c)(7),{entries:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=Date.now(),l;e[3]!==s?(l=s("Recent activity"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[d,o.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")},void 0,!1):(0,y.jsxDEV)("ul",{className:"divide-y divide-border",children:o.slice(0,5).map(p=>(0,y.jsxDEV)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsxDEV)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"},void 0,!1),(0,y.jsxDEV)("span",{className:"truncate text-foreground",children:[p.op,p.table!==void 0&&(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:[" \xB7 ",p.table,p.id===void 0?"":`#${p.id}`]},void 0,!0)]},void 0,!0)]},void 0,!0),(0,y.jsxDEV)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:ol(p.ts,n)},void 0,!1)]},p.seq,!0))},void 0,!1)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"RecentActivityCard"),il=a(t=>{let e=t.reduce((o,s)=>o+s.calls,0);return e===0?null:t.reduce((o,s)=>o+s.totalDurationMs,0)/e},"averageLatencyMs"),qa=a(t=>{let e=(0,ye.c)(151),{initialShardKey:o}=t,s=ae(),r=ft(),n=o??"",l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let d;e[1]!==n?(d={shardKey:n},e[1]=n,e[2]=d):d=e[2];let p=uo(St.getMetrics,l,d),c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={},e[3]=c):c=e[3];let u;e[4]!==n?(u={shardKey:n},e[4]=n,e[5]=u):u=e[5];let g=uo(St.getFunctionStats,c,u),m,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},h={shardKey:""},e[6]=m,e[7]=h):(m=e[6],h=e[7]);let f=uo(St.getSecurityAudit,m,h),v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={},e[8]=v):v=e[8];let x;e[9]!==n?(x={shardKey:n},e[9]=n,e[10]=x):x=e[10];let b=uo(St.listSubscriptions,v,x),P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P={},e[11]=P):P=e[11];let C;e[12]!==n?(C={shardKey:n},e[12]=n,e[13]=C):C=e[13];let N=uo(St.getAuditLog,P,C),R=p.data??null,E,T,k,w,M,V,W,D,H,$,G,K,I,_,U,te,se,re;if(e[14]!==N.data||e[15]!==f.data||e[16]!==R||e[17]!==p.data||e[18]!==r||e[19]!==g.data||e[20]!==b.data||e[21]!==s){w=Array.isArray(g.data?.functions)?g.data.functions:[],W=b.data??null;let Ze;e[40]!==N.data?(Ze=Array.isArray(N.data?.entries)?N.data.entries:[],e[40]=N.data,e[41]=Ze):Ze=e[41],T=Ze,M=p.data===void 0||g.data===void 0?null:zn(R,w).length,V=Array.isArray(f.data?.findings)?f.data.findings.length:null;let qe;e[42]!==r?(qe=a(()=>{$e(r({to:"/security"}))},"t212"),e[42]=r,e[43]=qe):qe=e[43],re=qe;let Ge;e[44]!==r?(Ge=a(()=>{$e(r({to:"/insights"}))},"t222"),e[44]=r,e[45]=Ge):Ge=e[45],se=Ge;let Ke=Ua(R?.history,"calls"),Qe=Ua(R?.history,"errors"),at=il(w),Ye=Math.max(0,...w.map(dl)),ge=R?.cache,Je;e[46]!==ge?(Je=ge!=null&&ge.hits+ge.misses>0?Math.round(ge.hits/(ge.hits+ge.misses)*100):null,e[46]=ge,e[47]=Je):Je=e[47],k=Je,U="flex flex-col gap-6",te="lunora-home",G="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",K="home-health";let Xe=za(Ke),De;e[48]!==s?(De=s("Requests"),e[48]=s,e[49]=De):De=e[49];let et=R?.requests??0,Ae;e[50]!==et?(Ae=et.toLocaleString(),e[50]=et,e[51]=Ae):Ae=e[51],e[52]!==Ke||e[53]!==Xe||e[54]!==De||e[55]!==Ae?(I=(0,y.jsxDEV)(Hs,{delta:Xe,label:De,trend:Ke,value:Ae},void 0,!1),e[52]=Ke,e[53]=Xe,e[54]=De,e[55]=Ae,e[56]=I):I=e[56];let tt=za(Qe,!1),Ve;e[57]!==s?(Ve=s("Errors"),e[57]=s,e[58]=Ve):Ve=e[58];let ot=R?.errors??0,Be;e[59]!==ot?(Be=ot.toLocaleString(),e[59]=ot,e[60]=Be):Be=e[60],e[61]!==Qe||e[62]!==tt||e[63]!==Ve||e[64]!==Be?(_=(0,y.jsxDEV)(Hs,{delta:tt,label:Ve,trend:Qe,value:Be},void 0,!1),e[61]=Qe,e[62]=tt,e[63]=Ve,e[64]=Be,e[65]=_):_=e[65],E=Hs,e[66]!==Ye||e[67]!==s?(D=Ye>0?`${s("max")} ${Br(Ye)}`:void 0,e[66]=Ye,e[67]=s,e[68]=D):D=e[68],e[69]!==s?(H=s("Avg latency"),e[69]=s,e[70]=H):H=e[70],$=at===null?"\u2014":Br(at),e[14]=N.data,e[15]=f.data,e[16]=R,e[17]=p.data,e[18]=r,e[19]=g.data,e[20]=b.data,e[21]=s,e[22]=E,e[23]=T,e[24]=k,e[25]=w,e[26]=M,e[27]=V,e[28]=W,e[29]=D,e[30]=H,e[31]=$,e[32]=G,e[33]=K,e[34]=I,e[35]=_,e[36]=U,e[37]=te,e[38]=se,e[39]=re}else E=e[22],T=e[23],k=e[24],w=e[25],M=e[26],V=e[27],W=e[28],D=e[29],H=e[30],$=e[31],G=e[32],K=e[33],I=e[34],_=e[35],U=e[36],te=e[37],se=e[38],re=e[39];let J;e[71]!==E||e[72]!==D||e[73]!==H||e[74]!==$?(J=(0,y.jsxDEV)(E,{footer:D,label:H,value:$},void 0,!1),e[71]=E,e[72]=D,e[73]=H,e[74]=$,e[75]=J):J=e[75];let ee;e[76]!==k||e[77]!==s?(ee=k===null?void 0:`${String(k)}% ${s("cache hit")}`,e[76]=k,e[77]=s,e[78]=ee):ee=e[78];let ie;e[79]!==s?(ie=s("Database size"),e[79]=s,e[80]=ie):ie=e[80];let Le=R?.databaseSize??null,me;e[81]!==Le?(me=Un(Le),e[81]=Le,e[82]=me):me=e[82];let he;e[83]!==ee||e[84]!==ie||e[85]!==me?(he=(0,y.jsxDEV)(Hs,{footer:ee,label:ie,value:me},void 0,!1),e[83]=ee,e[84]=ie,e[85]=me,e[86]=he):he=e[86];let ve;e[87]!==G||e[88]!==K||e[89]!==I||e[90]!==_||e[91]!==J||e[92]!==he?(ve=(0,y.jsxDEV)("div",{className:G,"data-testid":K,children:[I,_,J,he]},void 0,!0),e[87]=G,e[88]=K,e[89]=I,e[90]=_,e[91]=J,e[92]=he,e[93]=ve):ve=e[93];let Fe;e[94]===Symbol.for("react.memo_cache_sentinel")?(Fe=(0,y.jsxDEV)(Wi,{},void 0,!1),e[94]=Fe):Fe=e[94];let L;e[95]!==w?(L=(0,y.jsxDEV)("div",{className:"lg:col-span-2",children:(0,y.jsxDEV)(rl,{functions:w},void 0,!1)},void 0,!1),e[95]=w,e[96]=L):L=e[96];let Q;e[97]!==W?(Q=(0,y.jsxDEV)(nl,{subs:W},void 0,!1),e[97]=W,e[98]=Q):Q=e[98];let X;e[99]!==T?(X=(0,y.jsxDEV)(al,{entries:T},void 0,!1),e[99]=T,e[100]=X):X=e[100];let pe;e[101]!==Q||e[102]!==X?(pe=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3",children:[Q,X]},void 0,!0),e[101]=Q,e[102]=X,e[103]=pe):pe=e[103];let le;e[104]!==L||e[105]!==pe?(le=(0,y.jsxDEV)("div",{className:"grid gap-3 lg:grid-cols-3",children:[L,pe]},void 0,!0),e[104]=L,e[105]=pe,e[106]=le):le=e[106];let Pe;e[107]!==s?(Pe=s("Advisors"),e[107]=s,e[108]=Pe):Pe=e[108];let ne;e[109]!==Pe?(ne=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Pe},void 0,!1),e[109]=Pe,e[110]=ne):ne=e[110];let Ce;e[111]!==M||e[112]!==V||e[113]!==s||e[114]!==se||e[115]!==re?(Ce=V===0&&M===0?(0,y.jsxDEV)(Ln,{description:s("No security or performance issues detected."),icon:(0,y.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,y.jsxDEV)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"},void 0,!1),(0,y.jsxDEV)("path",{d:"m9 12 2 2 4-4"},void 0,!1)]},void 0,!0),testId:"home-advisors-clear",title:s("No issues found")},void 0,!1):(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,y.jsxDEV)(Wa,{count:V,onView:re,testId:"home-security",title:s("Security findings")},void 0,!1),(0,y.jsxDEV)(Wa,{count:M,onView:se,testId:"home-performance",title:s("Performance issues")},void 0,!1)]},void 0,!0),e[111]=M,e[112]=V,e[113]=s,e[114]=se,e[115]=re,e[116]=Ce):Ce=e[116];let Re;e[117]!==ne||e[118]!==Ce?(Re=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[ne,Ce]},void 0,!0),e[117]=ne,e[118]=Ce,e[119]=Re):Re=e[119];let Se;e[120]!==s?(Se=s("Get connected"),e[120]=s,e[121]=Se):Se=e[121];let Ne;e[122]!==Se?(Ne=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Se},void 0,!1),e[122]=Se,e[123]=Ne):Ne=e[123];let Ee;e[124]!==s?(Ee=s("Client SDK"),e[124]=s,e[125]=Ee):Ee=e[125];let Te;e[126]!==Ee?(Te=(0,y.jsxDEV)(Vr,{command:"npm i @lunora/client",label:Ee},void 0,!1),e[126]=Ee,e[127]=Te):Te=e[127];let we;e[128]!==s?(we=s("React"),e[128]=s,e[129]=we):we=e[129];let ke;e[130]!==we?(ke=(0,y.jsxDEV)(Vr,{command:"npm i @lunora/react",label:we},void 0,!1),e[130]=we,e[131]=ke):ke=e[131];let Me;e[132]!==s?(Me=s("CLI"),e[132]=s,e[133]=Me):Me=e[133];let Oe;e[134]!==Me?(Oe=(0,y.jsxDEV)(Vr,{command:"lunora dev",label:Me},void 0,!1),e[134]=Me,e[135]=Oe):Oe=e[135];let _e;e[136]!==Te||e[137]!==ke||e[138]!==Oe?(_e=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-3",children:[Te,ke,Oe]},void 0,!0),e[136]=Te,e[137]=ke,e[138]=Oe,e[139]=_e):_e=e[139];let ze;e[140]===Symbol.for("react.memo_cache_sentinel")?(ze=(0,y.jsxDEV)(el,{},void 0,!1),e[140]=ze):ze=e[140];let Ie;e[141]!==Ne||e[142]!==_e?(Ie=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[Ne,_e,ze]},void 0,!0),e[141]=Ne,e[142]=_e,e[143]=Ie):Ie=e[143];let We;return e[144]!==U||e[145]!==te||e[146]!==ve||e[147]!==le||e[148]!==Re||e[149]!==Ie?(We=(0,y.jsxDEV)("div",{className:U,"data-testid":te,children:[ve,Fe,le,Re,Ie]},void 0,!0),e[144]=U,e[145]=te,e[146]=ve,e[147]=le,e[148]=Re,e[149]=Ie,e[150]=We):We=e[150],We},"HomePanel");function ll(t,e){return e.calls-t.calls}a(ll,"_temp");function cl(t){return(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Br(t.calls>0?t.totalDurationMs/t.calls:0)},void 0,!1),(0,y.jsxDEV)("span",{className:z("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors},void 0,!1)]},t.path,!0)}a(cl,"_temp2");function dl(t){return t.maxDurationMs}a(dl,"_temp3");var Ga=S(Uo(),1);var Ka=S(bo(),1);var pl=a((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?tn:en(e,o),"resolveInstance"),Qa=a(t=>{let e=(0,Ga.c)(7),{catalogs:o,children:s,i18n:r,locale:n}=t,l;e[0]!==o||e[1]!==r||e[2]!==n?(l=pl(r,n,o),e[0]=o,e[1]=r,e[2]=n,e[3]=l):l=e[3];let d=l,p;return e[4]!==s||e[5]!==d?(p=(0,Ka.jsxDEV)(on,{value:d,children:s},void 0,!1),e[4]=s,e[5]=d,e[6]=p):p=e[6],p},"StudioI18nProvider");var Hr=S(Uo(),1);var Ct=S(O(),1);var de=S(bo(),1);var Fr="lunora:command-palette",Ya=a(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Fr))},"openCommandPalette"),ul=a(t=>{let e=(0,Hr.c)(18),{active:o,index:s,item:r,onActivate:n,onSelect:l}=t,d;e[0]!==r||e[1]!==l?(d=a(()=>{l(r)},"t1"),e[0]=r,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==s||e[4]!==n?(c=a(()=>{n(s)},"t2"),e[3]=s,e[4]=n,e[5]=c):c=e[5];let u=c,g=o?"bg-accent text-accent-foreground":"text-foreground",m;e[6]!==g?(m=z("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",g),e[6]=g,e[7]=m):m=e[7];let h;e[8]!==r.label?(h=(0,de.jsxDEV)("span",{children:r.label},void 0,!1),e[8]=r.label,e[9]=h):h=e[9];let f;e[10]!==r.group?(f=(0,de.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:r.group},void 0,!1),e[10]=r.group,e[11]=f):f=e[11];let v;return e[12]!==p||e[13]!==u||e[14]!==m||e[15]!==h||e[16]!==f?(v=(0,de.jsxDEV)("li",{children:(0,de.jsxDEV)("button",{className:m,onClick:p,onMouseEnter:u,type:"button",children:[h,f]},void 0,!0)},void 0,!1),e[12]=p,e[13]=u,e[14]=m,e[15]=h,e[16]=f,e[17]=v):v=e[17],v},"CommandRow"),Ja=a(t=>{let e=(0,Hr.c)(39),{items:o}=t,s=ae(),r=ft(),[n,l]=(0,Ct.useState)(!1),[d,p]=(0,Ct.useState)(""),[c,u]=(0,Ct.useState)(0),g=(0,Ct.useRef)(null),m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{let I=a(U=>{(U.metaKey||U.ctrlKey)&&U.key.toLowerCase()==="k"&&(U.preventDefault(),l(!0))},"onKeyDown"),_=a(()=>{l(!0)},"onOpen");return globalThis.addEventListener("keydown",I),globalThis.addEventListener(Fr,_),()=>{globalThis.removeEventListener("keydown",I),globalThis.removeEventListener(Fr,_)}},"t1"),h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),(0,Ct.useEffect)(m,h);let f;if(e[2]!==o||e[3]!==d){e:{let I=d.trim().toLowerCase();if(I===""){f=o;break e}f=o.filter(_=>_.label.toLowerCase().includes(I)||_.group.toLowerCase().includes(I))}e[2]=o,e[3]=d,e[4]=f}else f=e[4];let v=f,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a(I=>{l(I),I||(p(""),u(0))},"t4"),e[5]=x):x=e[5];let b=x,P;e[6]!==r?(P=a(I=>{b(!1),$e(r({to:I.to}))},"t5"),e[6]=r,e[7]=P):P=e[7];let C=P,N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=a(I=>{p(I.target.value),u(0)},"t6"),e[8]=N):N=e[8];let R=N,E;e[9]!==c||e[10]!==v||e[11]!==C?(E=a(I=>{e:switch(I.key){case"ArrowDown":{I.preventDefault(),u(_=>v.length===0?0:(_+1)%v.length);break e}case"ArrowUp":{I.preventDefault(),u(_=>v.length===0?0:(_-1+v.length)%v.length);break e}case"Enter":{I.preventDefault();let _=v[c];_!==void 0&&C(_);break e}}},"t7"),e[9]=c,e[10]=v,e[11]=C,e[12]=E):E=e[12];let T=E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,de.jsxDEV)(fe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"},void 0,!1),e[13]=k):k=e[13];let w;e[14]!==s?(w=s("Command palette"),e[14]=s,e[15]=w):w=e[15];let M;e[16]!==w?(M=(0,de.jsxDEV)(fe.Title,{className:"sr-only",children:w},void 0,!1),e[16]=w,e[17]=M):M=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=(0,de.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,de.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,de.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),e[18]=V):V=e[18];let W;e[19]!==s?(W=s("Search\u2026"),e[19]=s,e[20]=W):W=e[20];let D;e[21]!==T||e[22]!==d||e[23]!==W?(D=(0,de.jsxDEV)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[V,(0,de.jsxDEV)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:R,onKeyDown:T,placeholder:W,ref:g,type:"text",value:d},void 0,!1)]},void 0,!0),e[21]=T,e[22]=d,e[23]=W,e[24]=D):D=e[24];let H;e[25]!==c||e[26]!==v||e[27]!==C||e[28]!==s?(H=v.length===0?(0,de.jsxDEV)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s("No results.")},void 0,!1):v.map((I,_)=>(0,de.jsxDEV)(ul,{active:_===c,index:_,item:I,onActivate:u,onSelect:C},I.to,!1)),e[25]=c,e[26]=v,e[27]=C,e[28]=s,e[29]=H):H=e[29];let $;e[30]!==H?($=(0,de.jsxDEV)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:H},void 0,!1),e[30]=H,e[31]=$):$=e[31];let G;e[32]!==M||e[33]!==D||e[34]!==$?(G=(0,de.jsxDEV)(fe.Portal,{children:[k,(0,de.jsxDEV)(fe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:g,children:[M,D,$]},void 0,!0)]},void 0,!0),e[32]=M,e[33]=D,e[34]=$,e[35]=G):G=e[35];let K;return e[36]!==n||e[37]!==G?(K=(0,de.jsxDEV)(fe.Root,{onOpenChange:b,open:n,children:G},void 0,!1),e[36]=n,e[37]=G,e[38]=K):K=e[38],K},"CommandPalette");var ri="(prefers-color-scheme: dark)",ni=a(()=>{try{return globalThis.localStorage}catch{return}},"store"),fl=a(t=>t==="system"||t==="light"||t==="dark","isPreference"),ai=a(()=>globalThis.matchMedia,"matchMedia"),ii="lunora-studio-theme",$r=["system","light","dark"],ml=a((t="system")=>{try{let e=ni()?.getItem(ii);return fl(e)?e:t}catch{return t}},"loadThemePreference"),Xa=a(t=>{let e=ni();if(e!==void 0)try{e.setItem(ii,t)}catch{}},"saveThemePreference"),gl=a(()=>{try{return ai()?.(ri).matches?"dark":"light"}catch{return"light"}},"getSystemTheme"),hl=a((t,e)=>t==="system"?e:t,"resolveTheme"),vl=a(t=>{let e;try{e=ai()?.(ri)}catch{e=void 0}if(e===void 0)return()=>{};let o=a(s=>{t(s.matches?"dark":"light")},"handler");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"subscribeSystemTheme"),zr=(0,Z.createContext)(null),xl=a(({children:t,defaultTheme:e="system"})=>{let[o,s]=(0,Z.useState)(()=>ml(e)),[r,n]=(0,Z.useState)(()=>gl());(0,Z.useEffect)(()=>vl(n),[]);let l=a(c=>{Xa(c),s(c)},"setTheme"),p={cycleTheme:a(()=>{s(c=>{let u=$r[($r.indexOf(c)+1)%$r.length]??c;return Xa(u),u})},"cycleTheme"),resolvedTheme:hl(o,r),setTheme:l,systemTheme:r,theme:o};return(0,i.jsxDEV)(zr,{value:p,children:t},void 0,!1)},"ThemeProvider"),bl=a(t=>{let e=(0,B.c)(3),{children:o}=t,s=(0,Z.use)(zr),r;return e[0]!==o||e[1]!==s?(r=s===null?(0,i.jsxDEV)(xl,{children:o},void 0,!1):o,e[0]=o,e[1]=s,e[2]=r):r=e[2],r},"EnsureThemeProvider"),yl=a(()=>{let t=(0,Z.use)(zr);if(t===null)throw new Qs("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"useTheme");function _0({delay:t=0,...e}){return(0,i.jsxDEV)(nt.Provider,{"data-slot":"tooltip-provider",delay:t,...e},void 0,!1)}a(_0,"TooltipProvider");function Pl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Root,{"data-slot":"tooltip",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Pl,"Tooltip");function Cl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Trigger,{"data-slot":"tooltip-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Cl,"TooltipTrigger");function Rl({className:t,side:e="top",sideOffset:o=4,align:s="center",alignOffset:r=0,children:n,...l}){return(0,i.jsxDEV)(nt.Portal,{children:(0,i.jsxDEV)(nt.Positioner,{align:s,alignOffset:r,side:e,sideOffset:o,className:"isolate z-50",children:(0,i.jsxDEV)(nt.Popup,{"data-slot":"tooltip-content",className:z("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[n,(0,i.jsxDEV)(nt.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)}a(Rl,"TooltipContent");var Sl=a(t=>{let e=(0,B.c)(5),{className:o}=t,s;e[0]!==o?(s=z("h-full w-full text-foreground",o),e[0]=o,e[1]=s):s=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsxDEV)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"},void 0,!1),e[2]=r):r=e[2];let n;return e[3]!==s?(n=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:s,fill:"currentColor",viewBox:"0 0 543 446",children:r},void 0,!1),e[3]=s,e[4]=n):n=e[4],n},"BrandMark"),li="lunora.studio.rulesBannerDismissed",Nl=a(()=>{try{return globalThis.localStorage.getItem(li)==="1"}catch{return!1}},"readBannerDismissed"),El=a(()=>{try{globalThis.localStorage.setItem(li,"1")}catch{}},"writeBannerDismissed"),Tl=a(()=>{let t=(0,B.c)(18),e=ae(),[o,s]=(0,Z.useState)(wl),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a(()=>{s(!0),El()},"t0"),t[0]=r):r=t[0];let n=r;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),t[1]=l):l=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"},void 0,!1),t[4]=p):p=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=(0,i.jsxDEV)("span",{children:[d," ",p," ",c]},void 0,!0),t[7]=d,t[8]=c,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M18 6 6 18M6 6l12 12"},void 0,!1)},void 0,!1),t[12]=m):m=t[12];let h;t[13]!==g?(h=(0,i.jsxDEV)("button",{"aria-label":g,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:n,type:"button",children:m},void 0,!1),t[13]=g,t[14]=h):h=t[14];let f;return t[15]!==u||t[16]!==h?(f=(0,i.jsxDEV)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,h]},void 0,!0),t[15]=u,t[16]=h,t[17]=f):f=t[17],f},"RulesBanner");function wl(){return Nl()}a(wl,"_temp$1");var kl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"},void 0,!1),(0,i.jsxDEV)("path",{d:"M8 21h8M12 17v4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"MonitorIcon"),Ml=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"12",cy:"12",r:"4"},void 0,!1),(0,i.jsxDEV)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"SunIcon"),Ol=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"MoonIcon"),_l=[{Icon:kl,value:"system"},{Icon:Ml,value:"light"},{Icon:Ol,value:"dark"}],Il=a(()=>{let t=(0,B.c)(19),{theme:e,setTheme:o}=yl(),s=ae(),r;t[0]!==s?(r=s("Dark theme"),t[0]=s,t[1]=r):r=t[1];let n;t[2]!==s?(n=s("Light theme"),t[2]=s,t[3]=n):n=t[3];let l;t[4]!==s?(l=s("System theme"),t[4]=s,t[5]=l):l=t[5];let d;t[6]!==r||t[7]!==n||t[8]!==l?(d={dark:r,light:n,system:l},t[6]=r,t[7]=n,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==s?(c=s("Theme"),t[10]=s,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=_l.map(m=>{let{Icon:h,value:f}=m,v=e===f;return(0,i.jsxDEV)("button",{"aria-checked":v,"aria-label":p[f],className:z("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:a(()=>{o(f)},"onClick"),role:"radio",title:p[f],type:"button",children:[v&&(0,i.jsxDEV)(sn.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}},void 0,!1),(0,i.jsxDEV)("span",{className:"relative",children:(0,i.jsxDEV)(h,{},void 0,!1)},void 0,!1)]},f,!0)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==c||t[17]!==u?(g=(0,i.jsxDEV)("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u},void 0,!1),t[16]=c,t[17]=u,t[18]=g):g=t[18],g},"ThemeToggle");function ci(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Pt.Root,{"data-slot":"popover",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ci,"Popover");function di(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Pt.Trigger,{"data-slot":"popover-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(di,"PopoverTrigger");function pi({align:t="end",alignOffset:e=0,className:o,keepMounted:s=!1,side:r="bottom",sideOffset:n=6,...l}){return(0,i.jsxDEV)(Pt.Portal,{keepMounted:s,children:(0,i.jsxDEV)(Pt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:(0,i.jsxDEV)(Pt.Popup,{className:z("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l},void 0,!1)},void 0,!1)},void 0,!1)}a(pi,"PopoverContent");var jr=768;function Dl(){let t=(0,B.c)(2),[e,o]=(0,Z.useState)(void 0),s,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a(()=>{let n=globalThis.matchMedia(`(max-width: ${jr-1}px)`),l=a(()=>{o(globalThis.innerWidth<jr)},"onChange");return n.addEventListener("change",l),o(globalThis.innerWidth<jr),()=>{n.removeEventListener("change",l)}},"t0"),r=[],t[0]=s,t[1]=r):(s=t[0],r=t[1]),(0,Z.useEffect)(s,r),!!e}a(Dl,"useIsMobile");function Al(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Root,{"data-slot":"sheet",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Al,"Sheet");function Vl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Portal,{"data-slot":"sheet-portal",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Vl,"SheetPortal");function Bl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Backdrop,{"data-slot":"sheet-overlay",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Bl,"SheetOverlay");function Ll({className:t,children:e,side:o="right",showCloseButton:s=!0,...r}){return(0,i.jsxDEV)(Vl,{children:[(0,i.jsxDEV)(Bl,{},void 0,!1),(0,i.jsxDEV)(fe.Popup,{"data-slot":"sheet-content","data-side":o,className:z("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[e,s&&(0,i.jsxDEV)(fe.Close,{"data-slot":"sheet-close",render:(0,i.jsxDEV)(po,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"},void 0,!1),children:[(0,i.jsxDEV)(er,{icon:Vn,strokeWidth:2},void 0,!1),(0,i.jsxDEV)("span",{className:"sr-only",children:"Close"},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)}a(Ll,"SheetContent");function Fl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sheet-header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Fl,"SheetHeader");function Hl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-sm font-medium text-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Title,{"data-slot":"sheet-title",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Hl,"SheetTitle");function $l(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Description,{"data-slot":"sheet-description",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a($l,"SheetDescription");var jl="sidebar_state",Ul=3600*24*7,zl="16rem",Wl="18rem",Zl="3rem",ql="b",ui=ut.createContext(null);function $s(){let t=ut.useContext(ui);if(!t)throw new Qs("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}a($s,"useSidebar");function Gl({defaultOpen:t=!0,open:e,onOpenChange:o,className:s,style:r,children:n,...l}){let d=Dl(),[p,c]=ut.useState(!1),[u,g]=ut.useState(t),m=e??u,h=a(b=>{let P=typeof b=="function"?b(m):b;o?o(P):g(P),document.cookie=`${jl}=${P}; path=/; max-age=${Ul}`},"setOpen"),f=a(()=>d?c(b=>!b):h(b=>!b),"toggleSidebar");ut.useEffect(()=>{let b=a(P=>{P.key===ql&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),f())},"handleKeyDown");return globalThis.addEventListener("keydown",b),()=>globalThis.removeEventListener("keydown",b)},[f]);let x={state:m?"expanded":"collapsed",open:m,setOpen:h,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:f};return(0,i.jsxDEV)(ui.Provider,{value:x,children:(0,i.jsxDEV)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zl,"--sidebar-width-icon":Zl,...r},className:z("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...l,children:n},void 0,!1)},void 0,!1)}a(Gl,"SidebarProvider");function Kl({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:s,children:r,dir:n,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=$s();return o==="none"?(0,i.jsxDEV)("div",{"data-slot":"sidebar",className:z("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:r},void 0,!1):d?(0,i.jsxDEV)(Al,{open:c,onOpenChange:u,...l,children:(0,i.jsxDEV)(Ll,{dir:n,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Wl},side:t,children:[(0,i.jsxDEV)(Fl,{className:"sr-only",children:[(0,i.jsxDEV)(Hl,{children:"Sidebar"},void 0,!1),(0,i.jsxDEV)($l,{children:"Displays the mobile sidebar."},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("div",{className:"flex h-full w-full flex-col",children:r},void 0,!1)]},void 0,!0)},void 0,!1):(0,i.jsxDEV)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,i.jsxDEV)("div",{"data-slot":"sidebar-gap",className:z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1),(0,i.jsxDEV)("div",{"data-slot":"sidebar-container","data-side":t,className:z("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",s),...l,children:(0,i.jsxDEV)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r},void 0,!1)},void 0,!1)]},void 0,!0)}a(Kl,"Sidebar");function Ql(t){let e=(0,B.c)(15),o,s,r;e[0]!==t?({className:o,onClick:s,...r}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);let{toggleSidebar:n}=$s(),l;e[4]!==o?(l=z(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==s||e[7]!==n?(d=a(g=>{s?.(g),n()},"t2"),e[6]=s,e[7]=n,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)(er,{icon:Bn,strokeWidth:2,className:"rtl:rotate-180"},void 0,!1),c=(0,i.jsxDEV)("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==r||e[12]!==l||e[13]!==d?(u=(0,i.jsxDEV)(po,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...r,children:[p,c]},void 0,!0),e[11]=r,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}a(Ql,"SidebarTrigger");function Yl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("main",{"data-slot":"sidebar-inset",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Yl,"SidebarInset");function Jl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Jl,"SidebarHeader");function Xl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Xl,"SidebarFooter");function ec(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(ec,"SidebarContent");function tc(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(tc,"SidebarGroup");function oc(t){let e=(0,B.c)(10),o,s,r,n;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,n=Js,s="div",r=lt({className:z("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=s,e[3]=r,e[4]=n}else o=e[1],s=e[2],r=e[3],n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==s||e[8]!==r?(d={defaultTagName:s,props:r,render:o,state:l},e[6]=o,e[7]=s,e[8]=r,e[9]=d):d=e[9],n(d)}a(oc,"SidebarGroupLabel");function sc(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("w-full text-xs",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(sc,"SidebarGroupContent");function ei(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(ei,"SidebarMenu");function ti(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("group/menu-item relative",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(ti,"SidebarMenuItem");var rc=rn("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function fi({render:t,isActive:e=!1,variant:o="default",size:s="default",tooltip:r,className:n,...l}){let{isMobile:d,state:p}=$s(),c=Js({defaultTagName:"button",props:lt({className:z(rc({variant:o,size:s}),n)},l),render:r?(0,i.jsxDEV)(Cl,{render:t},void 0,!1):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:e}});return r?(typeof r=="string"&&(r={children:r}),(0,i.jsxDEV)(Pl,{children:[c,(0,i.jsxDEV)(Rl,{side:"right",align:"center",hidden:p!=="collapsed"||d,...r},void 0,!1)]},void 0,!0)):c}a(fi,"SidebarMenuButton");var q=a((t,e)=>(0,Z.lazy)(()=>t().then(o=>({default:o[e]}))),"lazyNamed"),nc=q(()=>import("./chunk-TAQM5WML.js"),"InsightsPanel"),ac=(0,Z.lazy)(()=>import("./chunk-TSLR3ZU2.js")),ic=(0,Z.lazy)(()=>import("./chunk-KGQGNJJ2.js")),lc=q(()=>import("./chunk-BE24FXAK.js"),"AgentsPanel"),cc=q(()=>import("./chunk-W6JKUZKD.js"),"AnalyticsPanel"),dc=(0,Z.lazy)(()=>import("./chunk-LVH4KLXS.js")),pc=q(()=>import("./chunk-IMZKGRPW.js"),"AuthConfigPanel"),uc=q(()=>import("./chunk-VZFJI6XE.js"),"AuthSessionsPanel"),fc=q(()=>import("./chunk-AJ2B326V.js"),"OrganizationsPanel"),mc=q(()=>import("./chunk-T3UCZ5PJ.js"),"UsersPanel"),gc=q(()=>import("./chunk-KDZJ5A3R.js"),"ContainersPanel"),hc=q(()=>import("./chunk-2ZL6MXBC.js"),"TableEditor"),vc=q(()=>import("./chunk-ONSKQCYN.js"),"ExportImportPanel"),xc=q(()=>import("./chunk-6TYT447C.js"),"MigrationsPanel"),bc=q(()=>import("./chunk-N4NG7HGI.js"),"PitrPanel"),yc=q(()=>import("./chunk-WJ6OBCUM.js"),"FlagsPanel"),Pc=q(()=>import("./chunk-G465LTLD.js"),"FunctionRunner"),Cc=q(()=>import("./chunk-ZETIKSQJ.js"),"FunctionStatsPanel"),Rc=q(()=>import("./chunk-ZECNJ4FG.js"),"IssuesPanel"),Sc=q(()=>import("./chunk-UX53GWGU.js"),"AuditPanel"),Nc=q(()=>import("./chunk-A3ZJACVT.js"),"LogDrainsPanel"),Ec=(0,Z.lazy)(()=>import("./chunk-VC5RNEHU.js").then(t=>({default:t.LogsPanel}))),Tc=q(()=>import("./chunk-ZZMGCPXE.js"),"MailPanel"),wc=q(()=>import("./chunk-KKJZL75J.js"),"SchedulePanel"),kc=(0,Z.lazy)(()=>import("./chunk-E3FVNRH7.js")),Mc=q(()=>import("./chunk-OQE56NBE.js"),"KvBrowser"),Oc=q(()=>import("./chunk-Q7TKOAGT.js"),"PaymentsPanel"),_c=q(()=>import("./chunk-FJV4UNYY.js"),"PermissionsPanel"),Ic=(0,Z.lazy)(()=>import("./chunk-XOANGJJP.js")),Dc=(0,Z.lazy)(()=>import("./chunk-Q7PYLDZU.js")),Ac=(0,Z.lazy)(()=>import("./chunk-4QA5TWYJ.js")),Vc=q(()=>import("./chunk-DTPFXYHG.js"),"HealthPanel"),Bc=q(()=>import("./chunk-LDEVBRDZ.js"),"MetricsPanel"),Lc=q(()=>import("./chunk-OSPEOESV.js"),"SchemaViewer"),Fc=q(()=>import("./chunk-VN2PDOMK.js"),"SettingsPanel"),Hc=q(()=>import("./chunk-AVONJCNY.js"),"SqlEditorPanel"),$c=q(()=>import("./chunk-VLIRTNLA.js"),"FileBrowser"),jc=q(()=>import("./chunk-FWTZYHX4.js"),"StorageRulesPanel"),Uc=q(()=>import("./chunk-YA6POZJD.js"),"VectorBrowser"),zc=(0,Z.lazy)(()=>import("./chunk-CP2EQVLU.js")),mi=(0,Z.createContext)(null),Wc={analytics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),api:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"},void 0,!1),audit:(0,i.jsxDEV)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"},void 0,!1),authConfig:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),agents:(0,i.jsxDEV)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"},void 0,!1),authSessions:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),containers:(0,i.jsxDEV)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"},void 0,!1),dashboards:(0,i.jsxDEV)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"},void 0,!1),drains:(0,i.jsxDEV)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"},void 0,!1),data:(0,i.jsxDEV)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"},void 0,!1),export:(0,i.jsxDEV)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"},void 0,!1),fanout:(0,i.jsxDEV)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"},void 0,!1),files:(0,i.jsxDEV)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"},void 0,!1),flags:(0,i.jsxDEV)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"},void 0,!1),functions:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"},void 0,!1),health:(0,i.jsxDEV)("path",{d:"M3 12h4l2 6 4-14 2 8h6"},void 0,!1),home:(0,i.jsxDEV)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"},void 0,!1),insights:(0,i.jsxDEV)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"},void 0,!1),issues:(0,i.jsxDEV)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"},void 0,!1),kv:(0,i.jsxDEV)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"},void 0,!1),logs:(0,i.jsxDEV)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"},void 0,!1),mail:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"},void 0,!1),payments:(0,i.jsxDEV)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"},void 0,!1),metrics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),migrations:(0,i.jsxDEV)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"},void 0,!1),organizations:(0,i.jsxDEV)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"},void 0,!1),permissions:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"},void 0,!1),pitr:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"},void 0,!1),queues:(0,i.jsxDEV)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"},void 0,!1),realtime:(0,i.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1),rls:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"},void 0,!1),schedule:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),schema:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"},void 0,!1),sql:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"},void 0,!1),storageRules:(0,i.jsxDEV)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"},void 0,!1),security:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"},void 0,!1),settings:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),users:(0,i.jsxDEV)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"},void 0,!1),vectors:(0,i.jsxDEV)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"},void 0,!1),workflows:(0,i.jsxDEV)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"},void 0,!1)},oi=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","audit","realtime","fanout","containers","metrics","analytics","health"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","payments","flags"]},{key:"settings",tabs:["settings"]}],Zc={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},si=a((t,e)=>{let o=Zc[t];return o===void 0||e[o]},"isTabVisible"),Ur=a(t=>{let e=(0,B.c)(2),{tab:o}=t,s=Wc[o],r;return e[0]!==s?(r=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s},void 0,!1),e[0]=s,e[1]=r):r=e[1],r},"TabIcon"),qc=a(t=>t,"exhaustiveRouteTabs"),gi=qc(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","security","rls","permissions","insights","issues","logs","realtime","fanout","mail","payments","audit","schedule","drains","flags","settings"]),Gc=new Set(["api","data","sql"]),Kc=a(t=>{let e=t.split("/").findLast(Boolean)??"";return gi.includes(e)?e:"home"},"tabFromPathname"),Qc=a(t=>{let e=(0,B.c)(19),{chrome:o,connected:s}=t,r=ae(),n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let l;e[2]!==n?(l=(0,i.jsxDEV)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n},void 0,!1),e[2]=n,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,i.jsxDEV)(fn,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token},void 0,!1),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==s||e[8]!==r?(p=s&&(0,i.jsxDEV)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),r("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]},void 0,!0),e[7]=s,e[8]=r,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==s||e[12]!==r?(c=s&&(0,i.jsxDEV)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:r("Clear")},void 0,!1),e[10]=o.clearToken,e[11]=s,e[12]=r,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,i.jsxDEV)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]},void 0,!0),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ConnectPopoverContent"),Yc=a(t=>{let e=(0,B.c)(25),{current:o,group:s,groupLabel:r,selectTab:n,tabDescription:l,tabLabel:d}=t,p=s.tabs.includes(o)?"page":void 0,c=r[s.key],u=s.tabs[0],g;e[0]!==u?(g=(0,i.jsxDEV)(Ur,{tab:u},void 0,!1),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==c||e[4]!==g?(m=(0,i.jsxDEV)(di,{"aria-current":p,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g},void 0,!1),e[2]=p,e[3]=c,e[4]=g,e[5]=m):m=e[5];let h=r[s.key],f;e[6]!==h?(f=(0,i.jsxDEV)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h},void 0,!1),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==o||e[9]!==s.tabs||e[10]!==n||e[11]!==l||e[12]!==d){let P;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==d?(P=a(C=>(0,i.jsxDEV)("button",{"aria-current":o===C?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":C,"data-testid":`dash-tab-${C}`,onClick:n,title:l[C],type:"button",children:[(0,i.jsxDEV)(Ur,{tab:C},void 0,!1),(0,i.jsxDEV)("span",{children:d[C]},void 0,!1)]},C,!0),"t92"),e[14]=o,e[15]=n,e[16]=l,e[17]=d,e[18]=P):P=e[18],v=s.tabs.map(P),e[8]=o,e[9]=s.tabs,e[10]=n,e[11]=l,e[12]=d,e[13]=v}else v=e[13];let x;e[19]!==f||e[20]!==v?(x=(0,i.jsxDEV)(pi,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]},void 0,!0),e[19]=f,e[20]=v,e[21]=x):x=e[21];let b;return e[22]!==m||e[23]!==x?(b=(0,i.jsxDEV)(ci,{children:[m,x]},void 0,!0),e[22]=m,e[23]=x,e[24]=b):b=e[24],b},"CollapsedGroupNav"),Jc=a(t=>{let e=(0,B.c)(45),{chrome:o,collapsed:s,connected:r}=t,n=ae();if(o===null){let C;e[0]!==n?(C=n("Admin"),e[0]=n,e[1]=C):C=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=(0,i.jsxDEV)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"},void 0,!1),e[2]=N):N=e[2];let R;e[3]!==n?(R=n("Admin"),e[3]=n,e[4]=R):R=e[4];let E;e[5]!==R?(E=(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:R},void 0,!1),e[5]=R,e[6]=E):E=e[6];let T;e[7]!==n?(T=n("Studio"),e[7]=n,e[8]=T):T=e[8];let k;e[9]!==T?(k=(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:T},void 0,!1),e[9]=T,e[10]=k):k=e[10];let w;e[11]!==E||e[12]!==k?(w=(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[E,k]},void 0,!0),e[11]=E,e[12]=k,e[13]=w):w=e[13];let M;return e[14]!==C||e[15]!==w?(M=(0,i.jsxDEV)(fi,{className:"data-active:bg-transparent",size:"lg",tooltip:C,children:[N,w]},void 0,!0),e[14]=C,e[15]=w,e[16]=M):M=e[16],M}let l=s?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=z("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==r||e[20]!==n?(p=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=p):p=e[21];let c=r?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=z("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let g;e[24]!==u?(g=(0,i.jsxDEV)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,i.jsxDEV)("span",{"aria-hidden":"true",className:u},void 0,!1)]},void 0,!0),e[24]=u,e[25]=g):g=e[25];let m;e[26]!==s||e[27]!==r||e[28]!==n?(m=!s&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:n("Admin")},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1)]},void 0,!0),e[26]=s,e[27]=r,e[28]=n,e[29]=m):m=e[29];let h;e[30]!==d||e[31]!==p||e[32]!==g||e[33]!==m?(h=(0,i.jsxDEV)(di,{className:d,"data-testid":"dash-app-connect",title:p,children:[g,m]},void 0,!0),e[30]=d,e[31]=p,e[32]=g,e[33]=m,e[34]=h):h=e[34];let f=s?"end":"start",v=s?"right":"top",x;e[35]!==o||e[36]!==r?(x=(0,i.jsxDEV)(Qc,{chrome:o,connected:r},void 0,!1),e[35]=o,e[36]=r,e[37]=x):x=e[37];let b;e[38]!==v||e[39]!==x||e[40]!==f?(b=(0,i.jsxDEV)(pi,{align:f,keepMounted:!0,side:v,children:x},void 0,!1),e[38]=v,e[39]=x,e[40]=f,e[41]=b):b=e[41];let P;return e[42]!==b||e[43]!==h?(P=(0,i.jsxDEV)(ci,{children:[h,b]},void 0,!0),e[42]=b,e[43]=h,e[44]=P):P=e[44],P},"SidebarFooterProfile"),Xc=a(t=>{let e=(0,B.c)(28),{chrome:o,connected:s,current:r,groupLabel:n,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ae(),{state:g}=$s(),m=g==="collapsed",h=m&&"justify-center px-0",f;e[0]!==h?(f=z("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsxDEV)(Sl,{className:"size-9 shrink-0 text-foreground"},void 0,!1),e[2]=v):v=e[2];let x;e[3]!==m||e[4]!==s||e[5]!==u?(x=!m&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(yo,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(s?"Live":"Local")},void 0,!1)]},void 0,!0),e[3]=m,e[4]=s,e[5]=u,e[6]=x):x=e[6];let b;e[7]!==f||e[8]!==x?(b=(0,i.jsxDEV)(Jl,{children:(0,i.jsxDEV)("div",{className:f,children:[v,x]},void 0,!0)},void 0,!1),e[7]=f,e[8]=x,e[9]=b):b=e[9];let P;e[10]!==m||e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(P=m?l.map(E=>(0,i.jsxDEV)(Yc,{current:r,group:E,groupLabel:n,selectTab:d,tabDescription:p,tabLabel:c},E.key,!1)):l.map(E=>(0,i.jsxDEV)(tc,{children:[(0,i.jsxDEV)(oc,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[E.key]},void 0,!1),(0,i.jsxDEV)(sc,{children:(0,i.jsxDEV)(ei,{children:E.tabs.map(T=>(0,i.jsxDEV)(ti,{children:(0,i.jsxDEV)(fi,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":T,"data-testid":`dash-tab-${T}`,isActive:r===T,onClick:d,title:p[T],tooltip:p[T],children:[(0,i.jsxDEV)(Ur,{tab:T},void 0,!1),(0,i.jsxDEV)("span",{children:c[T]},void 0,!1)]},void 0,!0)},T,!1))},void 0,!1)},void 0,!1)]},E.key,!0)),e[10]=m,e[11]=r,e[12]=n,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=P):P=e[17];let C;e[18]!==P?(C=(0,i.jsxDEV)(ec,{children:P},void 0,!1),e[18]=P,e[19]=C):C=e[19];let N;e[20]!==o||e[21]!==m||e[22]!==s?(N=(0,i.jsxDEV)(Xl,{children:(0,i.jsxDEV)(ei,{children:(0,i.jsxDEV)(ti,{children:(0,i.jsxDEV)(Jc,{chrome:o,collapsed:m,connected:s},void 0,!1)},void 0,!1)},void 0,!1)},void 0,!1),e[20]=o,e[21]=m,e[22]=s,e[23]=N):N=e[23];let R;return e[24]!==b||e[25]!==C||e[26]!==N?(R=(0,i.jsxDEV)(Kl,{collapsible:"icon",variant:"inset",children:[b,C,N]},void 0,!0),e[24]=b,e[25]=C,e[26]=N,e[27]=R):R=e[27],R},"StudioSidebar"),hi=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,i.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,i.jsxDEV)(fs,{className:"h-8 w-40"},void 0,!1),(0,i.jsxDEV)(fs,{className:"h-8 w-24"},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(fs,{className:"h-72 w-full"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"RoutePending"),ed=a(()=>{let t=(0,B.c)(306),e=ae(),o=ft(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:nd},t[0]=s):s=t[0];let r=Xr(s),n,l;t[1]!==r?(n=Kc(r),l=Gc.has(n),t[1]=r,t[2]=n,t[3]=l):(n=t[2],l=t[3]);let d=l,p=Lr(),c;t[4]!==p?(c=a(it=>({...it,tabs:it.tabs.filter(jo=>si(jo,p))}),"t2"),t[4]=p,t[5]=c):c=t[5];let u=oi.map(c).filter(ad),g,m;t[6]!==n||t[7]!==p||t[8]!==o?(g=a(()=>{si(n,p)||$e(o({replace:!0,to:"/home"}))},"t3"),m=[n,p,o],t[6]=n,t[7]=p,t[8]=o,t[9]=g,t[10]=m):(g=t[9],m=t[10]),(0,Z.useEffect)(g,m);let h;t[11]!==e?(h=e("Agents"),t[11]=e,t[12]=h):h=t[12];let f;t[13]!==e?(f=e("Analytics"),t[13]=e,t[14]=f):f=t[14];let v;t[15]!==e?(v=e("API"),t[15]=e,t[16]=v):v=t[16];let x;t[17]!==e?(x=e("Audit"),t[17]=e,t[18]=x):x=t[18];let b;t[19]!==e?(b=e("Configuration"),t[19]=e,t[20]=b):b=t[20];let P;t[21]!==e?(P=e("Sessions"),t[21]=e,t[22]=P):P=t[22];let C;t[23]!==e?(C=e("Containers"),t[23]=e,t[24]=C):C=t[24];let N;t[25]!==e?(N=e("Dashboards"),t[25]=e,t[26]=N):N=t[26];let R;t[27]!==e?(R=e("Data"),t[27]=e,t[28]=R):R=t[28];let E;t[29]!==e?(E=e("Log drains"),t[29]=e,t[30]=E):E=t[30];let T;t[31]!==e?(T=e("Export / Import"),t[31]=e,t[32]=T):T=t[32];let k;t[33]!==e?(k=e("Fan-out"),t[33]=e,t[34]=k):k=t[34];let w;t[35]!==e?(w=e("Files"),t[35]=e,t[36]=w):w=t[36];let M;t[37]!==e?(M=e("Flags"),t[37]=e,t[38]=M):M=t[38];let V;t[39]!==e?(V=e("Functions"),t[39]=e,t[40]=V):V=t[40];let W;t[41]!==e?(W=e("Health"),t[41]=e,t[42]=W):W=t[42];let D;t[43]!==e?(D=e("Home"),t[43]=e,t[44]=D):D=t[44];let H;t[45]!==e?(H=e("Performance"),t[45]=e,t[46]=H):H=t[46];let $;t[47]!==e?($=e("Issues"),t[47]=e,t[48]=$):$=t[48];let G;t[49]!==e?(G=e("KV"),t[49]=e,t[50]=G):G=t[50];let K;t[51]!==e?(K=e("Logs"),t[51]=e,t[52]=K):K=t[52];let I;t[53]!==e?(I=e("Metrics"),t[53]=e,t[54]=I):I=t[54];let _;t[55]!==e?(_=e("Migrations"),t[55]=e,t[56]=_):_=t[56];let U;t[57]!==e?(U=e("Organizations"),t[57]=e,t[58]=U):U=t[58];let te;t[59]!==e?(te=e("Time Travel"),t[59]=e,t[60]=te):te=t[60];let se;t[61]!==e?(se=e("Mail"),t[61]=e,t[62]=se):se=t[62];let re;t[63]!==e?(re=e("Payments"),t[63]=e,t[64]=re):re=t[64];let J;t[65]!==e?(J=e("Permissions"),t[65]=e,t[66]=J):J=t[66];let ee;t[67]!==e?(ee=e("Queues"),t[67]=e,t[68]=ee):ee=t[68];let ie;t[69]!==e?(ie=e("Realtime"),t[69]=e,t[70]=ie):ie=t[70];let Le;t[71]!==e?(Le=e("RLS Policies"),t[71]=e,t[72]=Le):Le=t[72];let me;t[73]!==e?(me=e("Scheduled"),t[73]=e,t[74]=me):me=t[74];let he;t[75]!==e?(he=e("Schema"),t[75]=e,t[76]=he):he=t[76];let ve;t[77]!==e?(ve=e("Security"),t[77]=e,t[78]=ve):ve=t[78];let Fe;t[79]!==e?(Fe=e("Settings"),t[79]=e,t[80]=Fe):Fe=t[80];let L;t[81]!==e?(L=e("SQL editor"),t[81]=e,t[82]=L):L=t[82];let Q;t[83]!==e?(Q=e("Access Rules"),t[83]=e,t[84]=Q):Q=t[84];let X;t[85]!==e?(X=e("Users"),t[85]=e,t[86]=X):X=t[86];let pe;t[87]!==e?(pe=e("Vectors"),t[87]=e,t[88]=pe):pe=t[88];let le;t[89]!==e?(le=e("Workflows"),t[89]=e,t[90]=le):le=t[90];let Pe;t[91]!==P||t[92]!==C||t[93]!==N||t[94]!==R||t[95]!==E||t[96]!==T||t[97]!==k||t[98]!==w||t[99]!==M||t[100]!==V||t[101]!==W||t[102]!==D||t[103]!==H||t[104]!==$||t[105]!==G||t[106]!==K||t[107]!==I||t[108]!==_||t[109]!==U||t[110]!==te||t[111]!==se||t[112]!==re||t[113]!==J||t[114]!==ee||t[115]!==ie||t[116]!==Le||t[117]!==me||t[118]!==he||t[119]!==ve||t[120]!==Fe||t[121]!==L||t[122]!==Q||t[123]!==X||t[124]!==pe||t[125]!==le||t[126]!==h||t[127]!==f||t[128]!==v||t[129]!==x||t[130]!==b?(Pe={agents:h,analytics:f,api:v,audit:x,authConfig:b,authSessions:P,containers:C,dashboards:N,data:R,drains:E,export:T,fanout:k,files:w,flags:M,functions:V,health:W,home:D,insights:H,issues:$,kv:G,logs:K,metrics:I,migrations:_,organizations:U,pitr:te,mail:se,payments:re,permissions:J,queues:ee,realtime:ie,rls:Le,schedule:me,schema:he,security:ve,settings:Fe,sql:L,storageRules:Q,users:X,vectors:pe,workflows:le},t[91]=P,t[92]=C,t[93]=N,t[94]=R,t[95]=E,t[96]=T,t[97]=k,t[98]=w,t[99]=M,t[100]=V,t[101]=W,t[102]=D,t[103]=H,t[104]=$,t[105]=G,t[106]=K,t[107]=I,t[108]=_,t[109]=U,t[110]=te,t[111]=se,t[112]=re,t[113]=J,t[114]=ee,t[115]=ie,t[116]=Le,t[117]=me,t[118]=he,t[119]=ve,t[120]=Fe,t[121]=L,t[122]=Q,t[123]=X,t[124]=pe,t[125]=le,t[126]=h,t[127]=f,t[128]=v,t[129]=x,t[130]=b,t[131]=Pe):Pe=t[131];let ne=Pe,Ce={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")},Re;t[132]!==e?(Re=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[132]=e,t[133]=Re):Re=t[133];let Se;t[134]!==e?(Se=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[134]=e,t[135]=Se):Se=t[135];let Ne;t[136]!==e?(Ne=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[136]=e,t[137]=Ne):Ne=t[137];let Ee;t[138]!==e?(Ee=e("A durable log of admin state-changing operations."),t[138]=e,t[139]=Ee):Ee=t[139];let Te;t[140]!==e?(Te=e("Enabled plugins and session config (read-only)."),t[140]=e,t[141]=Te):Te=t[141];let we;t[142]!==e?(we=e("Browse and revoke active sessions across all users."),t[142]=e,t[143]=we):we=t[143];let ke;t[144]!==e?(ke=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[144]=e,t[145]=ke):ke=t[145];let Me;t[146]!==e?(Me=e("Chart widgets backed by saved read-only SQL queries."),t[146]=e,t[147]=Me):Me=t[147];let Oe;t[148]!==e?(Oe=e("Browse and edit rows across your shard and global tables."),t[148]=e,t[149]=Oe):Oe=t[149];let _e;t[150]!==e?(_e=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[150]=e,t[151]=_e):_e=t[151];let ze;t[152]!==e?(ze=e("Export a shard to NDJSON, or import rows from it."),t[152]=e,t[153]=ze):ze=t[153];let Ie;t[154]!==e?(Ie=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[154]=e,t[155]=Ie):Ie=t[155];let We;t[156]!==e?(We=e("Browse objects in your R2 storage buckets."),t[156]=e,t[157]=We):We=t[157];let Ze;t[158]!==e?(Ze=e("Inspect feature flags and their live evaluation under a targeting context."),t[158]=e,t[159]=Ze):Ze=t[159];let qe;t[160]!==e?(qe=e("Run registered queries, mutations, and actions."),t[160]=e,t[161]=qe):qe=t[161];let Ge;t[162]!==e?(Ge=e("At-a-glance connection, error, and shard signals."),t[162]=e,t[163]=Ge):Ge=t[163];let Ke;t[164]!==e?(Ke=e("Connection, health, and advisor summary for your deployment."),t[164]=e,t[165]=Ke):Ke=t[165];let Qe;t[166]!==e?(Qe=e("Surface slow functions, error spikes, and cache problems."),t[166]=e,t[167]=Qe):Qe=t[167];let at;t[168]!==e?(at=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[168]=e,t[169]=at):at=t[169];let Ye;t[170]!==e?(Ye=e("A live stream of recent function logs."),t[170]=e,t[171]=Ye):Ye=t[171];let ge;t[172]!==e?(ge=e("Per-shard health and aggregate metrics."),t[172]=e,t[173]=ge):ge=t[173];let Je;t[174]!==e?(Je=e("Review migration status and run them."),t[174]=e,t[175]=Je):Je=t[175];let Xe;t[176]!==e?(Xe=e("Browse and manage organizations, members, and invitations."),t[176]=e,t[177]=Xe):Xe=t[177];let De;t[178]!==e?(De=e("Restore a shard to a point in the last 30 days."),t[178]=e,t[179]=De):De=t[179];let et;t[180]!==e?(et=e("Email your app sent, captured in dev."),t[180]=e,t[181]=et):et=t[181];let Ae;t[182]!==e?(Ae=e("Synced customers, subscriptions, and webhook events."),t[182]=e,t[183]=Ae):Ae=t[183];let tt;t[184]!==e?(tt=e("Inspect access policies per table, and probe a function as any identity."),t[184]=e,t[185]=tt):tt=t[185];let Ve;t[186]!==e?(Ve=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[186]=e,t[187]=Ve):Ve=t[187];let ot;t[188]!==e?(ot=e("Active WebSocket subscriptions on this shard."),t[188]=e,t[189]=ot):ot=t[189];let Be;t[190]!==e?(Be=e("Inspect row-level-security policies and roles, per table."),t[190]=e,t[191]=Be):Be=t[191];let Tt;t[192]!==e?(Tt=e("Inspect and cancel scheduled jobs."),t[192]=e,t[193]=Tt):Tt=t[193];let wt;t[194]!==e?(wt=e("Inspect each table and its columns."),t[194]=e,t[195]=wt):wt=t[195];let kt;t[196]!==e?(kt=e("Review admin gates, credentials, and log redaction."),t[196]=e,t[197]=kt):kt=t[197];let Mt;t[198]!==e?(Mt=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[198]=e,t[199]=Mt):Mt=t[199];let Ot;t[200]!==e?(Ot=e("Run read-only SQL against a shard."),t[200]=e,t[201]=Ot):Ot=t[201];let _t;t[202]!==e?(_t=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[202]=e,t[203]=_t):_t=t[203];let It;t[204]!==e?(It=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[204]=e,t[205]=It):It=t[205];let Dt;t[206]!==e?(Dt=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[206]=e,t[207]=Dt):Dt=t[207];let At;t[208]!==e?(At=e("Browse Vectorize indexes and run similarity searches."),t[208]=e,t[209]=At):At=t[209];let Vt;t[210]!==e?(Vt=e("Inspect declared Cloudflare Workflows and their bindings."),t[210]=e,t[211]=Vt):Vt=t[211];let Mo;t[212]!==Re||t[213]!==Se||t[214]!==Ne||t[215]!==Ee||t[216]!==Te||t[217]!==we||t[218]!==ke||t[219]!==Me||t[220]!==Oe||t[221]!==_e||t[222]!==ze||t[223]!==Ie||t[224]!==We||t[225]!==Ze||t[226]!==qe||t[227]!==Ge||t[228]!==Ke||t[229]!==Qe||t[230]!==at||t[231]!==Ye||t[232]!==ge||t[233]!==Je||t[234]!==Xe||t[235]!==De||t[236]!==et||t[237]!==Ae||t[238]!==tt||t[239]!==Ve||t[240]!==ot||t[241]!==Be||t[242]!==Tt||t[243]!==wt||t[244]!==kt||t[245]!==Mt||t[246]!==Ot||t[247]!==_t||t[248]!==It||t[249]!==Dt||t[250]!==At||t[251]!==Vt?(Mo={agents:Re,analytics:Se,api:Ne,audit:Ee,authConfig:Te,authSessions:we,containers:ke,dashboards:Me,data:Oe,drains:_e,export:ze,fanout:Ie,files:We,flags:Ze,functions:qe,health:Ge,home:Ke,insights:Qe,issues:at,logs:Ye,metrics:ge,migrations:Je,organizations:Xe,pitr:De,mail:et,payments:Ae,permissions:tt,queues:Ve,realtime:ot,rls:Be,schedule:Tt,schema:wt,security:kt,settings:Mt,sql:Ot,kv:_t,storageRules:It,users:Dt,vectors:At,workflows:Vt},t[212]=Re,t[213]=Se,t[214]=Ne,t[215]=Ee,t[216]=Te,t[217]=we,t[218]=ke,t[219]=Me,t[220]=Oe,t[221]=_e,t[222]=ze,t[223]=Ie,t[224]=We,t[225]=Ze,t[226]=qe,t[227]=Ge,t[228]=Ke,t[229]=Qe,t[230]=at,t[231]=Ye,t[232]=ge,t[233]=Je,t[234]=Xe,t[235]=De,t[236]=et,t[237]=Ae,t[238]=tt,t[239]=Ve,t[240]=ot,t[241]=Be,t[242]=Tt,t[243]=wt,t[244]=kt,t[245]=Mt,t[246]=Ot,t[247]=_t,t[248]=It,t[249]=Dt,t[250]=At,t[251]=Vt,t[252]=Mo):Mo=t[252];let vi=Mo,Oo;t[253]!==o?(Oo=a(it=>{$e(o({to:`/${it.currentTarget.dataset.tab??""}`}))},"t87"),t[253]=o,t[254]=Oo):Oo=t[254];let xi=Oo,_o,Io;t[255]!==n||t[256]!==ne?(_o=a(()=>{typeof document<"u"&&(document.title=`${ne[n]} \xB7 lunora`)},"t88"),Io=[n,ne],t[255]=n,t[256]=ne,t[257]=_o,t[258]=Io):(_o=t[257],Io=t[258]),(0,Z.useEffect)(_o,Io);let bi=u.find(it=>it.tabs.includes(n))??oi[0],js=u.flatMap(it=>it.tabs.map(jo=>({group:Ce[it.key],label:ne[jo],to:`/${jo}`}))),Bt=(0,Z.use)(mi),yi=Bt!==null&&Bt.token!=="",Do;t[259]!==js?(Do=(0,i.jsxDEV)(Ja,{items:js},void 0,!1),t[259]=js,t[260]=Do):Do=t[260];let Ao;t[261]===Symbol.for("react.memo_cache_sentinel")?(Ao=(0,i.jsxDEV)(Ql,{className:"-ms-1"},void 0,!1),t[261]=Ao):Ao=t[261];let Lt;t[262]!==e?(Lt=e("Breadcrumb"),t[262]=e,t[263]=Lt):Lt=t[263];let Us=Ce[bi.key],Ft;t[264]!==Us?(Ft=(0,i.jsxDEV)("span",{className:"text-muted-foreground",children:Us},void 0,!1),t[264]=Us,t[265]=Ft):Ft=t[265];let Vo;t[266]===Symbol.for("react.memo_cache_sentinel")?(Vo=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[266]=Vo):Vo=t[266];let zs=ne[n],Ht;t[267]!==zs?(Ht=(0,i.jsxDEV)("span",{className:"font-medium text-foreground",children:zs},void 0,!1),t[267]=zs,t[268]=Ht):Ht=t[268];let $t;t[269]!==Lt||t[270]!==Ft||t[271]!==Ht?($t=(0,i.jsxDEV)("nav",{"aria-label":Lt,className:"flex items-center gap-1.5 text-[13px]",children:[Ft,Vo,Ht]},void 0,!0),t[269]=Lt,t[270]=Ft,t[271]=Ht,t[272]=$t):$t=t[272];let Bo;t[273]===Symbol.for("react.memo_cache_sentinel")?(Bo=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,i.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),t[273]=Bo):Bo=t[273];let jt;t[274]!==e?(jt=e("Search\u2026"),t[274]=e,t[275]=jt):jt=t[275];let Lo;t[276]===Symbol.for("react.memo_cache_sentinel")?(Lo=(0,i.jsxDEV)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"},void 0,!1),t[276]=Lo):Lo=t[276];let Ut;t[277]!==jt?(Ut=(0,i.jsxDEV)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:Ya,type:"button",children:[Bo,jt,Lo]},void 0,!0),t[277]=jt,t[278]=Ut):Ut=t[278];let Fo;t[279]===Symbol.for("react.memo_cache_sentinel")?(Fo=(0,i.jsxDEV)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,i.jsxDEV)(Il,{},void 0,!1)},void 0,!1),t[279]=Fo):Fo=t[279];let zt;t[280]!==Ut||t[281]!==$t?(zt=(0,i.jsxDEV)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[Ao,$t,Ut,Fo]},void 0,!0),t[280]=Ut,t[281]=$t,t[282]=zt):zt=t[282];let Wt;t[283]!==Bt?.rulesInstalled?(Wt=Bt?.rulesInstalled===!1&&(0,i.jsxDEV)(Tl,{},void 0,!1),t[283]=Bt?.rulesInstalled,t[284]=Wt):Wt=t[284];let Ws=`dash-tab-${n}`,Zs=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",qs=ne[n],Zt;t[285]!==e||t[286]!==qs?(Zt=e("{title} failed",{title:qs}),t[285]=e,t[286]=qs,t[287]=Zt):Zt=t[287];let Gs=ne[n],qt;t[288]!==e?(qt=e("Try again"),t[288]=e,t[289]=qt):qt=t[289];let Ho;t[290]===Symbol.for("react.memo_cache_sentinel")?(Ho=(0,i.jsxDEV)(Z.Suspense,{fallback:(0,i.jsxDEV)(hi,{},void 0,!1),children:(0,i.jsxDEV)(Qr,{},void 0,!1)},void 0,!1),t[290]=Ho):Ho=t[290];let Gt;t[291]!==n||t[292]!==Zt||t[293]!==Gs||t[294]!==qt?(Gt=(0,i.jsxDEV)(ms,{fallbackTitle:Zt,label:Gs,retryLabel:qt,children:Ho},n,!1),t[291]=n,t[292]=Zt,t[293]=Gs,t[294]=qt,t[295]=Gt):Gt=t[295];let Kt;t[296]!==Zs||t[297]!==Gt?(Kt=(0,i.jsxDEV)("div",{className:Zs,children:Gt},void 0,!1),t[296]=Zs,t[297]=Gt,t[298]=Kt):Kt=t[298];let Qt;t[299]!==Ws||t[300]!==Kt?(Qt=(0,i.jsxDEV)("div",{"aria-labelledby":Ws,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:Kt},void 0,!1),t[299]=Ws,t[300]=Kt,t[301]=Qt):Qt=t[301];let $o;return t[302]!==zt||t[303]!==Wt||t[304]!==Qt?($o=(0,i.jsxDEV)(Yl,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[zt,Wt,Qt]},void 0,!0),t[302]=zt,t[303]=Wt,t[304]=Qt,t[305]=$o):$o=t[305],(0,i.jsxDEV)(Gl,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[Do,(0,i.jsxDEV)(Xc,{chrome:Bt,connected:yi,current:n,groupLabel:Ce,groups:u,selectTab:xi,tabDescription:vi,tabLabel:ne},void 0,!1),$o]},void 0,!0)},"StudioLayout"),td=a(t=>{let e=(0,B.c)(5),{initialShardKey:o,schemaEditable:s}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];let n=Gr(r),{table:l}=n,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==s?(p=(0,i.jsxDEV)(Lc,{initialShardKey:o,initialTable:d,schemaEditable:s},void 0,!1),e[1]=o,e[2]=d,e[3]=s,e[4]=p):p=e[4],p},"SchemaRoutePanel"),od=a(()=>{let t=(0,B.c)(3),e=ft(),o,s;return t[0]!==e?(o=a(()=>{$e(e({replace:!0,to:"/home"}))},"t0"),s=[e],t[0]=e,t[1]=o,t[2]=s):(o=t[1],s=t[2]),(0,Z.useEffect)(o,s),null},"NotFoundRedirect"),sd=a(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let g=Kr({component:ed}),m={agents:(0,i.jsxDEV)(lc,{initialShardKey:s},void 0,!1),analytics:(0,i.jsxDEV)(cc,{},void 0,!1),api:(0,i.jsxDEV)(dc,{functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n},void 0,!1),audit:(0,i.jsxDEV)(Sc,{initialShardKey:s},void 0,!1),authConfig:(0,i.jsxDEV)(pc,{},void 0,!1),authSessions:(0,i.jsxDEV)(uc,{},void 0,!1),containers:(0,i.jsxDEV)(gc,{},void 0,!1),dashboards:(0,i.jsxDEV)(Dc,{initialShardKey:s},void 0,!1),data:(0,i.jsxDEV)(hc,{editable:e,initialShardKey:s},void 0,!1),drains:(0,i.jsxDEV)(Nc,{},void 0,!1),export:(0,i.jsxDEV)(vc,{initialShardKey:s},void 0,!1),fanout:(0,i.jsxDEV)(Ac,{initialShardKey:s},void 0,!1),files:(0,i.jsxDEV)($c,{},void 0,!1),kv:(0,i.jsxDEV)(Mc,{},void 0,!1),flags:(0,i.jsxDEV)(yc,{initialShardKey:s},void 0,!1),functions:(0,i.jsxDEV)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxDEV)(Cc,{functions:o,initialShardKey:s},void 0,!1),(0,i.jsxDEV)(Pc,{functions:o,runAsIdentity:l},void 0,!1)]},void 0,!0),health:(0,i.jsxDEV)(Vc,{initialShardKey:s},void 0,!1),home:(0,i.jsxDEV)(qa,{initialShardKey:s},void 0,!1),insights:(0,i.jsxDEV)(nc,{initialShardKey:s},void 0,!1),issues:(0,i.jsxDEV)(Rc,{initialShardKey:s},void 0,!1),logs:(0,i.jsxDEV)(Ec,{initialShardKey:s},void 0,!1),metrics:(0,i.jsxDEV)(Bc,{initialShardKey:s},void 0,!1),migrations:(0,i.jsxDEV)(xc,{initialShardKey:s},void 0,!1),organizations:(0,i.jsxDEV)(fc,{},void 0,!1),permissions:(0,i.jsxDEV)(_c,{functions:o,runAsIdentity:l,schemaEditable:d},void 0,!1),pitr:(0,i.jsxDEV)(bc,{initialShardKey:s},void 0,!1),mail:(0,i.jsxDEV)(Tc,{},void 0,!1),payments:(0,i.jsxDEV)(Oc,{},void 0,!1),queues:(0,i.jsxDEV)(Ic,{},void 0,!1),realtime:(0,i.jsxDEV)(kc,{initialShardKey:s},void 0,!1),rls:(0,i.jsxDEV)(ac,{},void 0,!1),schedule:(0,i.jsxDEV)(wc,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u},void 0,!1),schema:(0,i.jsxDEV)(td,{initialShardKey:s,schemaEditable:d},void 0,!1),security:(0,i.jsxDEV)(ic,{},void 0,!1),settings:(0,i.jsxDEV)(Fc,{initialShardKey:s},void 0,!1),sql:(0,i.jsxDEV)(Hc,{initialShardKey:s},void 0,!1),storageRules:(0,i.jsxDEV)(jc,{},void 0,!1),users:(0,i.jsxDEV)(mc,{},void 0,!1),vectors:(0,i.jsxDEV)(Uc,{},void 0,!1),workflows:(0,i.jsxDEV)(zc,{},void 0,!1)},h=zo({component:a(()=>m.home,"component"),getParentRoute:a(()=>g,"getParentRoute"),path:"/"}),f=gi.map(b=>b==="data"?zo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`,validateSearch:Wn}):zo({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`})),v=g.addChildren([h,...f]),x="window"in globalThis?Zr():qr({initialEntries:["/home"]});return Yr({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:od,defaultPendingComponent:hi,defaultPendingMinMs:0,defaultPendingMs:0,history:x,routeTree:v})},"buildRouter"),rd=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}=t,f;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==g||e[8]!==m||e[9]!==h||e[10]!==u?(f=sd({basePath:o,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}),e[0]=o,e[1]=r,e[2]=n,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=g,e[8]=m,e[9]=h,e[10]=u,e[11]=f):f=e[11];let v=f,x=s??null,b;e[12]!==v?(b=(0,i.jsxDEV)(Jr,{router:v},void 0,!1),e[12]=v,e[13]=b):b=e[13];let P;return e[14]!==x||e[15]!==b?(P=(0,i.jsxDEV)(mi,{value:x,children:b},void 0,!1),e[14]=x,e[15]=b,e[16]=P):P=e[16],P},"StudioShell"),I0=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,schemaEditable:m,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t,x;e[0]!==o||e[1]!==s||e[2]!==r||e[3]!==n||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==g||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==m?(x=(0,i.jsxDEV)(bl,{children:(0,i.jsxDEV)(rd,{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:m},void 0,!1)},void 0,!1),e[0]=o,e[1]=s,e[2]=r,e[3]=n,e[4]=d,e[5]=c,e[6]=u,e[7]=g,e[8]=h,e[9]=f,e[10]=v,e[11]=m,e[12]=x):x=e[12];let b=x;if(l===void 0&&p===void 0)return b;let P;return e[13]!==l||e[14]!==p||e[15]!==b?(P=(0,i.jsxDEV)(Qa,{i18n:l,locale:p,children:b},void 0,!1),e[13]=l,e[14]=p,e[15]=b,e[16]=P):P=e[16],P},"Studio");function nd(t){return t.location.pathname}a(nd,"_temp");function ad(t){return t.tabs.length>0}a(ad,"_temp2");export{ms as a,Qa as b,xl as c,yl as d,_0 as e,Sl as f,Al as g,Ll as h,Fl as i,Hl as j,I0 as k};
@@ -0,0 +1 @@
1
+ var _={clearCapturedMail:"__lunora_admin__:clearCapturedMail",clearQueueMessages:"__lunora_admin__:clearQueueMessages",clearTable:"__lunora_admin__:clearTable",createWorkflowInstance:"__lunora_admin__:createWorkflowInstance",deleteRows:"__lunora_admin__:deleteRows",describeTable:"__lunora_admin__:describeTable",describeTables:"__lunora_admin__:describeTables",exportShard:"__lunora_admin__:exportShard",facetColumn:"__lunora_admin__:facetColumn",getAdvisories:"__lunora_admin__:getAdvisories",getAuditLog:"__lunora_admin__:getAuditLog",getAuthMetrics:"__lunora_admin__:getAuthMetrics",getCapturedMail:"__lunora_admin__:getCapturedMail",getFanoutMetrics:"__lunora_admin__:getFanoutMetrics",getFunctionStats:"__lunora_admin__:getFunctionStats",getIssues:"__lunora_admin__:getIssues",listFlags:"__lunora_admin__:listFlags",listQueues:"__lunora_admin__:listQueues",listSubscriptions:"__lunora_admin__:listSubscriptions",listTableIndexes:"__lunora_admin__:listTableIndexes",listWorkflows:"__lunora_admin__:listWorkflows",getLogs:"__lunora_admin__:getLogs",getMetrics:"__lunora_admin__:getMetrics",getPitrBookmark:"__lunora_admin__:getPitrBookmark",getQueueMessages:"__lunora_admin__:getQueueMessages",getRequestLog:"__lunora_admin__:getRequestLog",getSecurityAudit:"__lunora_admin__:getSecurityAudit",getSettings:"__lunora_admin__:getSettings",getWorkflowInstanceStatus:"__lunora_admin__:getWorkflowInstanceStatus",importShard:"__lunora_admin__:importShard",listTables:"__lunora_admin__:listTables",maskPolicies:"__lunora_admin__:maskPolicies",migrationStatus:"__lunora_admin__:migrationStatus",pitrRestore:"__lunora_admin__:pitrRestore",readTablePage:"__lunora_admin__:readTablePage",replayQueueMessage:"__lunora_admin__:replayQueueMessage",rlsPolicies:"__lunora_admin__:rlsPolicies",runAs:"__lunora_admin__:runAs",runMigration:"__lunora_admin__:runMigration",runSql:"__lunora_admin__:runSql",sendQueueMessage:"__lunora_admin__:sendQueueMessage",sendTestMail:"__lunora_admin__:sendTestMail",storageOrphans:"__lunora_admin__:storageOrphans",storageReferences:"__lunora_admin__:storageReferences",storageRules:"__lunora_admin__:storageRules",studioFeatures:"__lunora_admin__:studioFeatures",writeRow:"__lunora_admin__:writeRow"};export{_ as a};
@@ -0,0 +1 @@
1
+ import{a as i,e as n,f,g as b,h as p,j as d}from"./chunk-RRCPZMC2.js";var c=n(b(),1),m=n(f(),1);var r=n(p(),1);function h(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("w-full caption-bottom text-xs",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:(0,r.jsxDEV)("table",{"data-slot":"table",className:a,...l},void 0,!1)},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(h,"Table");function x(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("bg-muted/50 [&_tr]:border-b",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("thead",{"data-slot":"table-header",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(x,"TableHeader");function N(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("tbody",{"data-slot":"table-body",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(N,"TableBody");function v(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("tr",{"data-slot":"table-row",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(v,"TableRow");function w(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("h-9 border-e border-border px-3 text-start align-middle font-mono text-[11px] font-medium tracking-wide whitespace-nowrap text-muted-foreground uppercase last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("th",{"data-slot":"table-head",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(w,"TableHead");function g(o){let e=(0,c.c)(8),t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=d("border-e border-border px-3 py-1.5 align-middle whitespace-nowrap last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=(0,r.jsxDEV)("td",{"data-slot":"table-cell",className:a,...l},void 0,!1),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}i(g,"TableCell");export{h as a,x as b,N as c,v as d,w as e,g as f};
@@ -0,0 +1,5 @@
1
+ import{a as s,c as m,f as S}from"./chunk-RRCPZMC2.js";var O=m(o=>{"use strict";(function(){function c(){}s(c,"noop");function y(t){return""+t}s(y,"testStringCoercion");function _(t,e,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{y(a);var l=!1}catch{l=!0}return l&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object"),y(a)),{$$typeof:E,key:a==null?null:""+a,children:t,containerInfo:e,implementation:r}}s(_,"createPortal$1");function d(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}s(d,"getCrossOriginStringAs");function i(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":'something with type "'+typeof t+'"'}s(i,"getValueDescriptorExpectingObjectForWarning");function u(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":typeof t=="string"?JSON.stringify(t):typeof t=="number"?"`"+t+"`":'something with type "'+typeof t+'"'}s(u,"getValueDescriptorExpectingEnumForWarning");function p(){var t=f.H;return t===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
3
+ 2. You might be breaking the Rules of Hooks
4
+ 3. You might have more than one copy of React in the same app
5
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),t}s(p,"resolveDispatcher"),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var v=S(),n={d:{f:c,r:s(function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},"r"),D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},E=Symbol.for("react.portal"),f=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,o.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error("Target container is not a DOM element.");return _(t,e,null,r)},o.flushSync=function(t){var e=f.T,r=n.p;try{if(f.T=null,n.p=2,t)return t()}finally{f.T=e,n.p=r,n.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},o.preconnect=function(t,e){typeof t=="string"&&t?e!=null&&typeof e!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",u(e)):e!=null&&typeof e.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",i(e.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t)),typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,n.d.C(t,e))},o.prefetchDNS=function(t){if(typeof t!="string"||!t)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t));else if(1<arguments.length){var e=arguments[1];typeof e=="object"&&e.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(e)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",u(e))}typeof t=="string"&&n.d.D(t)},o.preinit=function(t,e){if(typeof t=="string"&&t?e==null||typeof e!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",u(e)):e.as!=="style"&&e.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',u(e.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",i(t)),typeof t=="string"&&e&&typeof e.as=="string"){var r=e.as,a=d(r,e.crossOrigin),l=typeof e.integrity=="string"?e.integrity:void 0,g=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;r==="style"?n.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:a,integrity:l,fetchPriority:g}):r==="script"&&n.d.X(t,{crossOrigin:a,integrity:l,fetchPriority:g,nonce:typeof e.nonce=="string"?e.nonce:void 0})}},o.preinitModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":e&&"as"in e&&e.as!=="script"&&(r+=" The `as` option encountered was "+u(e.as)+"."),r?console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",r):(r=e&&typeof e.as=="string"?e.as:"script",r)==="script"||(r=u(r),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',r,t)),typeof t=="string"&&(typeof e=="object"&&e!==null?(e.as==null||e.as==="script")&&(r=d(e.as,e.crossOrigin),n.d.M(t,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})):e==null&&n.d.M(t))},o.preload=function(t,e){var r="";if(typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e==null||typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":typeof e.as=="string"&&e.as||(r+=" The `as` option encountered was "+i(e.as)+"."),r&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',r),typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){r=e.as;var a=d(r,e.crossOrigin);n.d.L(t,r,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}},o.preloadModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+i(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+i(e)+".":e&&"as"in e&&typeof e.as!="string"&&(r+=" The `as` option encountered was "+i(e.as)+"."),r&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',r),typeof t=="string"&&(e?(r=d(e.as,e.crossOrigin),n.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0})):n.d.m(t))},o.requestFormReset=function(t){n.d.r(t)},o.unstable_batchedUpdates=function(t,e){return t(e)},o.useFormState=function(t,e,r){return p().useFormState(t,e,r)},o.useFormStatus=function(){return p().useHostTransitionStatus()},o.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var b=m((R,h)=>{"use strict";h.exports=O()});export{b as a};
@@ -0,0 +1 @@
1
+ import{a as A}from"./chunk-RXVQJ4DO.js";import{a as y,e as I}from"./chunk-SEU5V7I6.js";import{b as m}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{f as k}from"./chunk-L2YBC2BV.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{d as C}from"./chunk-ITQKVEP7.js";import"./chunk-22C6COGE.js";import{a as u,e as w,g as S,h as P}from"./chunk-RRCPZMC2.js";var N=w(S(),1);var a=w(P(),1);var z=[{key:"accounts",label:"Accounts"},{key:"admin",label:"Admin"},{key:"organization",label:"Organizations"},{key:"passkey",label:"Passkeys"},{key:"twoFactor",label:"Two-factor"}],b=u(e=>{if(e===void 0)return"\u2014";let l=[[86400,"d"],[3600,"h"],[60,"m"]];for(let[t,o]of l)if(e>=t&&e%t===0)return`${String(e/t)}${o}`;return`${String(e)}s`},"formatDuration"),h=u(e=>{let l=(0,N.c)(8),{children:t,heading:o,testId:r}=e,i;l[0]!==o?(i=(0,a.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o},void 0,!1)},void 0,!1),l[0]=o,l[1]=i):i=l[1];let s;l[2]!==t?(s=(0,a.jsxDEV)(I,{className:"p-3",children:t},void 0,!1),l[2]=t,l[3]=s):s=l[3];let c;return l[4]!==i||l[5]!==s||l[6]!==r?(c=(0,a.jsxDEV)(y,{className:"gap-0 py-0","data-testid":r,children:[i,s]},void 0,!0),l[4]=i,l[5]=s,l[6]=r,l[7]=c):c=l[7],c},"ConfigCard"),d=u(e=>{let l=(0,N.c)(7),{label:t,value:o}=e,r;l[0]!==t?(r=(0,a.jsxDEV)("span",{className:"text-sm",children:t},void 0,!1),l[0]=t,l[1]=r):r=l[1];let i;l[2]!==o?(i=(0,a.jsxDEV)("span",{className:"text-sm text-muted-foreground tabular-nums",children:o},void 0,!1),l[2]=o,l[3]=i):i=l[3];let s;return l[4]!==r||l[5]!==i?(s=(0,a.jsxDEV)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",children:[r,i]},void 0,!0),l[4]=r,l[5]=i,l[6]=s):s=l[6],s},"KeyValue"),O=u(()=>{let e=(0,N.c)(20),l=k(),t=C(),o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=["lunora-auth-config"],e[0]=o):o=e[0];let r;e[1]!==l?(r=u(()=>l.getAuthConfig(),"t1"),e[1]=l,e[2]=r):r=e[2];let{data:i,error:s}=A(o,r),c;e[3]!==t?(c=u(n=>(0,a.jsxDEV)(m,{variant:n?"success":"outline",children:t(n?"Enabled":"Disabled")},void 0,!1),"t2"),e[3]=t,e[4]=c):c=e[4];let f=c,g;e[5]!==s?(g=s!==null&&(0,a.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"auth-config-error",role:"alert",children:s},void 0,!1),e[5]=s,e[6]=g):g=e[6];let p;e[7]!==i||e[8]!==s||e[9]!==t?(p=s===null&&i===void 0&&(0,a.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"auth-config-loading",children:t("Loading auth configuration\u2026")},void 0,!1),e[7]=i,e[8]=s,e[9]=t,e[10]=p):p=e[10];let v;e[11]!==i||e[12]!==s||e[13]!==f||e[14]!==t?(v=s===null&&i!==void 0&&(0,a.jsxDEV)(a.Fragment,{children:[(0,a.jsxDEV)(h,{heading:t("Enabled capabilities"),testId:"auth-config-capabilities",children:(0,a.jsxDEV)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:z.map(n=>{let $=i.capabilities[n.key];return(0,a.jsxDEV)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-cap-${n.key}`,children:[(0,a.jsxDEV)("span",{className:"text-sm",children:t(n.label)},void 0,!1),f($)]},n.key,!0)})},void 0,!1)},void 0,!1),(0,a.jsxDEV)(h,{heading:t("Plugins"),testId:"auth-config-plugins",children:i.plugins.length===0?(0,a.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:t("No plugins enabled.")},void 0,!1):(0,a.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:i.plugins.map(L)},void 0,!1)},void 0,!1),(0,a.jsxDEV)(h,{heading:t("Sign-in methods"),testId:"auth-config-signin",children:(0,a.jsxDEV)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxDEV)(d,{label:t("Email & password"),value:f(i.emailAndPassword)},void 0,!1),(0,a.jsxDEV)(d,{label:t("Social providers"),value:i.socialProviders.length===0?t("None"):(0,a.jsxDEV)("span",{className:"flex flex-wrap justify-end gap-1",children:i.socialProviders.map(j)},void 0,!1)},void 0,!1)]},void 0,!0)},void 0,!1),i.organization.enabled&&(0,a.jsxDEV)(h,{heading:t("Organizations"),testId:"auth-config-org",children:(0,a.jsxDEV)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxDEV)(d,{label:t("Teams"),value:f(i.organization.teams)},void 0,!1),(0,a.jsxDEV)(d,{label:t("Custom roles"),value:f(i.organization.roles)},void 0,!1)]},void 0,!0)},void 0,!1),(0,a.jsxDEV)(h,{heading:t("Session policy"),testId:"auth-config-session",children:(0,a.jsxDEV)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxDEV)(d,{label:t("Expires in"),value:b(i.session.expiresIn)},void 0,!1),(0,a.jsxDEV)(d,{label:t("Refresh after"),value:b(i.session.updateAge)},void 0,!1),(0,a.jsxDEV)(d,{label:t("Fresh window"),value:b(i.session.freshAge)},void 0,!1),(0,a.jsxDEV)(d,{label:t("Cookie cache"),value:f(i.session.cookieCache===!0)},void 0,!1)]},void 0,!0)},void 0,!1),(0,a.jsxDEV)(h,{heading:t("Rate limit"),testId:"auth-config-ratelimit",children:(0,a.jsxDEV)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxDEV)(d,{label:t("Status"),value:f(i.rateLimit.enabled)},void 0,!1),i.rateLimit.enabled&&(0,a.jsxDEV)(a.Fragment,{children:[(0,a.jsxDEV)(d,{label:t("Max requests"),value:i.rateLimit.max??"\u2014"},void 0,!1),(0,a.jsxDEV)(d,{label:t("Window"),value:b(i.rateLimit.window)},void 0,!1)]},void 0,!0)]},void 0,!0)},void 0,!1),i.userFields.length>0&&(0,a.jsxDEV)(h,{heading:t("Plugin user fields"),testId:"auth-config-user-fields",children:(0,a.jsxDEV)("ul",{className:"flex flex-col gap-2",children:i.userFields.map(n=>(0,a.jsxDEV)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-user-field-${n.name}`,children:[(0,a.jsxDEV)("span",{className:"flex flex-col",children:[(0,a.jsxDEV)("span",{className:"font-mono text-xs",children:n.name},void 0,!1),n.plugin!==void 0&&(0,a.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:n.plugin},void 0,!1)]},void 0,!0),(0,a.jsxDEV)("span",{className:"flex items-center gap-1",children:[(0,a.jsxDEV)(m,{variant:"outline",children:n.type},void 0,!1),n.required&&(0,a.jsxDEV)(m,{variant:"secondary",children:t("required")},void 0,!1),n.unique&&(0,a.jsxDEV)(m,{variant:"secondary",children:t("unique")},void 0,!1)]},void 0,!0)]},n.name,!0))},void 0,!1)},void 0,!1),(0,a.jsxDEV)(y,{className:"gap-0 py-0",children:(0,a.jsxDEV)("p",{className:"px-4 py-3 text-xs text-muted-foreground","data-testid":"auth-config-note",children:t("OAuth providers, email templates, and rate limits are configured at deploy time in the better-auth setup and aren't editable here. See the Mail tab for email output.")},void 0,!1)},void 0,!1)]},void 0,!0),e[11]=i,e[12]=s,e[13]=f,e[14]=t,e[15]=v):v=e[15];let x;return e[16]!==g||e[17]!==p||e[18]!==v?(x=(0,a.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"auth-config",children:[g,p,v]},void 0,!0),e[16]=g,e[17]=p,e[18]=v,e[19]=x):x=e[19],x},"AuthConfigPanel");function L(e){return(0,a.jsxDEV)(m,{"data-testid":`auth-config-plugin-${e}`,variant:"outline",children:e},e,!1)}u(L,"_temp");function j(e){return(0,a.jsxDEV)(m,{"data-testid":`auth-config-provider-${e}`,variant:"outline",children:e},e,!1)}u(j,"_temp2");export{O as AuthConfigPanel};
@@ -0,0 +1,19 @@
1
+ import{a,c as te,e as de,f as Pe}from"./chunk-RRCPZMC2.js";var pe=te((he,W)=>{(function(e,r){typeof define=="function"&&define.amd?define([],r):typeof W=="object"&&W.exports?W.exports=r():e.moo=r()})(he,function(){"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function s(n){return n&&r.call(n)==="[object RegExp]"}a(s,"isRegExp");function i(n){return n&&typeof n=="object"&&!s(n)&&!Array.isArray(n)}a(i,"isObject");function l(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,function(o){return o==="-"?"\\x2d":"\\"+o})}a(l,"reEscape");function c(n){var o=new RegExp("|"+n);return o.exec("").length-1}a(c,"reGroups");function h(n){return"("+n+")"}a(h,"reCapture");function v(n){if(!n.length)return"(?!)";var o=n.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}a(v,"reUnion");function S(n){if(typeof n=="string")return"(?:"+l(n)+")";if(s(n)){if(n.ignoreCase)throw new Error("RegExp /i flag not allowed");if(n.global)throw new Error("RegExp /g flag is implied");if(n.sticky)throw new Error("RegExp /y flag is implied");if(n.multiline)throw new Error("RegExp /m flag is implied");return n.source}else throw new Error("Not a pattern: "+n)}a(S,"regexpOrLiteral");function b(n,o){return n.length>o?n:Array(o-n.length+1).join(" ")+n}a(b,"pad");function M(n,o){for(var u=n.length,f=0;;){var g=n.lastIndexOf(`
2
+ `,u-1);if(g===-1||(f++,u=g,f===o)||u===0)break}var d=f<o?0:u+1;return n.substring(d).split(`
3
+ `)}a(M,"lastNLines");function K(n){for(var o=Object.getOwnPropertyNames(n),u=[],f=0;f<o.length;f++){var g=o[f],d=n[g],m=[].concat(d);if(g==="include"){for(var w=0;w<m.length;w++)u.push({include:m[w]});continue}var y=[];m.forEach(function(p){i(p)?(y.length&&u.push($(g,y)),u.push($(g,p)),y=[]):y.push(p)}),y.length&&u.push($(g,y))}return u}a(K,"objectToRules");function O(n){for(var o=[],u=0;u<n.length;u++){var f=n[u];if(f.include){for(var g=[].concat(f.include),d=0;d<g.length;d++)o.push({include:g[d]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push($(f.type,f))}return o}a(O,"arrayToRules");function $(n,o){if(i(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:n,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)e.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&n!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+n+"')");var g=u.match;return u.match=Array.isArray(g)?g:g?[g]:[],u.match.sort(function(d,m){return s(d)&&s(m)?0:s(m)?-1:s(d)?1:m.length-d.length}),u}a($,"ruleOptions");function C(n){return Array.isArray(n)?O(n):K(n)}a(C,"toRules");var N=$("error",{lineBreaks:!0,shouldThrow:!0});function F(n,o){for(var u=null,f=Object.create(null),g=!0,d=null,m=[],w=[],y=0;y<n.length;y++)n[y].fallback&&(g=!1);for(var y=0;y<n.length;y++){var p=n[y];if(p.include)throw new Error("Inheritance is not allowed in stateless lexers");if(p.error||p.fallback){if(u)throw!p.fallback==!u.fallback?new Error("Multiple "+(p.fallback?"fallback":"error")+" rules not allowed (for token '"+p.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+p.defaultType+"')");u=p}var _=p.match.slice();if(g)for(;_.length&&typeof _[0]=="string"&&_[0].length===1;){var D=_.shift();f[D.charCodeAt(0)]=p}if(p.pop||p.push||p.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+p.defaultType+"')");if(p.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+p.defaultType+"')")}if(_.length!==0){g=!1,m.push(p);for(var q=0;q<_.length;q++){var P=_[q];if(s(P)){if(d===null)d=P.unicode;else if(d!==P.unicode&&p.fallback===!1)throw new Error("If one rule is /u then all must be")}}var I=v(_.map(S)),T=new RegExp(I);if(T.test(""))throw new Error("RegExp matches empty string: "+T);var U=c(I);if(U>0)throw new Error("RegExp has capture groups: "+T+`
4
+ Use (?: \u2026 ) instead`);if(!p.lineBreaks&&T.test(`
5
+ `))throw new Error("Rule should declare lineBreaks: "+T);w.push(h(I))}}var R=u&&u.fallback,L=t&&!R?"ym":"gm",H=t||R?"":"|";d===!0&&(L+="u");var qe=new RegExp(v(w)+H,L);return{regexp:qe,groups:m,fast:f,error:u||N}}a(F,"compileRules");function X(n){var o=F(C(n));return new k({start:o},"start")}a(X,"compile");function fe(n,o,u){var f=n&&(n.push||n.next);if(f&&!u[f])throw new Error("Missing state '"+f+"' (in token '"+n.defaultType+"' of state '"+o+"')");if(n&&n.pop&&+n.pop!=1)throw new Error("pop must be 1 (in token '"+n.defaultType+"' of state '"+o+"')")}a(fe,"checkStateGroup");function $e(n,o){var u=n.$all?C(n.$all):[];delete n.$all;var f=Object.getOwnPropertyNames(n);o||(o=f[0]);for(var g=Object.create(null),d=0;d<f.length;d++){var m=f[d];g[m]=C(n[m]).concat(u)}for(var d=0;d<f.length;d++)for(var m=f[d],w=g[m],y=Object.create(null),p=0;p<w.length;p++){var _=w[p];if(_.include){var D=[p,1];if(_.include!==m&&!y[_.include]){y[_.include]=!0;var q=g[_.include];if(!q)throw new Error("Cannot include nonexistent state '"+_.include+"' (in state '"+m+"')");for(var P=0;P<q.length;P++){var I=q[P];w.indexOf(I)===-1&&D.push(I)}}w.splice.apply(w,D),p--}}for(var T=Object.create(null),d=0;d<f.length;d++){var m=f[d];T[m]=F(g[m],!0)}for(var d=0;d<f.length;d++){for(var U=f[d],R=T[U],L=R.groups,p=0;p<L.length;p++)fe(L[p],U,T);for(var H=Object.getOwnPropertyNames(R.fast),p=0;p<H.length;p++)fe(R.fast[H[p]],U,T)}return new k(T,o)}a($e,"compileStates");function Be(n){for(var o=typeof Map<"u",u=o?new Map:Object.create(null),f=Object.getOwnPropertyNames(n),g=0;g<f.length;g++){var d=f[g],m=n[d],w=Array.isArray(m)?m:[m];w.forEach(function(y){if(typeof y!="string")throw new Error("keyword must be string (in keyword '"+d+"')");o?u.set(y,d):u[y]=d})}return function(y){return o?u.get(y):u[y]}}a(Be,"keywordTransform");var k=a(function(n,o){this.startState=o,this.states=n,this.buffer="",this.stack=[],this.reset()},"Lexer");k.prototype.reset=function(n,o){return this.buffer=n||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},k.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},k.prototype.setState=function(n){if(!(!n||this.state===n)){this.state=n;var o=this.states[n];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},k.prototype.popState=function(){this.setState(this.stack.pop())},k.prototype.pushState=function(n){this.stack.push(this.state),this.setState(n)};var Ce=t?function(n,o){return n.exec(o)}:function(n,o){var u=n.exec(o);return u[0].length===0?null:u};k.prototype._getGroup=function(n){for(var o=this.groups.length,u=0;u<o;u++)if(n[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function De(){return this.value}if(a(De,"tokenToString"),k.prototype.next=function(){var n=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,n);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(n!==u.length){var m=this.fast[u.charCodeAt(n)];if(m)return this._token(m,u.charAt(n),n);var f=this.re;f.lastIndex=n;var g=Ce(f,u),d=this.error;if(g==null)return this._token(d,u.slice(n,u.length),n);var m=this._getGroup(g),w=g[0];return d.fallback&&g.index!==n?(this.queuedGroup=m,this.queuedText=w,this._token(d,u.slice(n,g.index),n)):this._token(m,w,n)}},k.prototype._token=function(n,o,u){var f=0;if(n.lineBreaks){var g=/\n/g,d=1;if(o===`
6
+ `)f=1;else for(;g.exec(o);)f++,d=g.lastIndex}var m={type:typeof n.type=="function"&&n.type(o)||n.defaultType,value:typeof n.value=="function"?n.value(o):o,text:o,toString:De,offset:u,lineBreaks:f,line:this.line,col:this.col},w=o.length;if(this.index+=w,this.line+=f,f!==0?this.col=w-d+1:this.col+=w,n.shouldThrow){var y=new Error(this.formatError(m,"invalid syntax"));throw y}return n.pop?this.popState():n.push?this.pushState(n.push):n.next&&this.setState(n.next),m},typeof Symbol<"u"&&Symbol.iterator){var ee=a(function(n){this.lexer=n},"LexerIterator");ee.prototype.next=function(){var n=this.lexer.next();return{value:n,done:!n}},ee.prototype[Symbol.iterator]=function(){return this},k.prototype[Symbol.iterator]=function(){return new ee(this)}}return k.prototype.formatError=function(n,o){if(n==null)var u=this.buffer.slice(this.index),n={text:u,offset:this.index,lineBreaks:u.indexOf(`
7
+ `)===-1?0:1,line:this.line,col:this.col};var f=2,g=Math.max(n.line-f,1),d=n.line+f,m=String(d).length,w=M(this.buffer,this.line-n.line+f+1).slice(0,5),y=[];y.push(o+" at line "+n.line+" col "+n.col+":"),y.push("");for(var p=0;p<w.length;p++){var _=w[p],D=g+p;y.push(b(String(D),m)+" "+_),D===n.line&&y.push(b("",m+n.col+1)+"^")}return y.join(`
8
+ `)},k.prototype.clone=function(){return new k(this.states,this.state)},k.prototype.has=function(n){return!0},{compile:X,states:$e,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:Be}})});var ge=te(A=>{"use strict";var Ne=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.lexer=A.states=void 0;var Fe=Ne(pe());A.states={body:{doubleapos:{match:"''",value:a(()=>"'","value")},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:a(e=>e.slice(1,-1).replace(/''/g,"'"),"value")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:a(e=>e.substring(1).trim(),"value")},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:a(e=>e.split(",")[1].trim(),"value")},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:a(e=>e.split(",")[1].trim(),"value")},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:a(e=>e.substring(1).trim(),"value")},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:a(e=>e.split(":")[1].trim(),"value")},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:a(e=>e.substring(0,e.indexOf("{")).trim(),"value")},end:{match:/\s*\}/u,pop:1}}};A.lexer=Fe.default.states(A.states)});var ve=te(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ParseError=void 0;z.parse=Ue;var ye=ge(),j=a(e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),"getContext"),re=a(e=>e==="plural"||e==="select"||e==="selectordinal","isSelectType");function Ie(e,r){let t="",s="";for(let l of r){let c=l.ctx.text;switch(s+=c,l.type){case"content":t+=l.value;break;case"argument":case"function":case"octothorpe":t+=c;break;default:throw new x(e,`Unsupported part in strict mode function arg style: ${c}`)}}return[{type:"content",value:t.trim(),ctx:Object.assign({},r[0].ctx,{text:s})}]}a(Ie,"strictArgStyleParam");var Re=["number","date","time","spellout","ordinal","duration"],me=["zero","one","two","few","many","other"],x=class extends Error{static{a(this,"ParseError")}constructor(r,t){super(ye.lexer.formatError(r,t))}};z.ParseError=x;var ne=class{static{a(this,"Parser")}constructor(r,t){var s,i,l,c;this.lexer=ye.lexer.reset(r),this.cardinalKeys=(s=t?.cardinal)!==null&&s!==void 0?s:me,this.ordinalKeys=(i=t?.ordinal)!==null&&i!==void 0?i:me,this.strict=(l=t?.strict)!==null&&l!==void 0?l:!1,this.strictPluralKeys=(c=t?.strictPluralKeys)!==null&&c!==void 0?c:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(r,t,s){if(s[0]==="="){if(t==="select")throw new x(r,`The case ${s} is not valid with select`)}else if(t!=="select"){let i=t==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(s)){let l=`The ${t} case ${s} is not valid in this locale`;throw new x(r,l)}}}parseSelect({value:r},t,s,i){let l={type:i,arg:r,cases:[],ctx:s};i==="plural"||i==="selectordinal"?t=!0:this.strict&&(t=!1);for(let c of this.lexer)switch(c.type){case"offset":if(i==="select")throw new x(c,"Unexpected plural offset for select");if(l.cases.length>0)throw new x(c,"Plural offset must be set before cases");l.pluralOffset=Number(c.value),s.text+=c.text,s.lineBreaks+=c.lineBreaks;break;case"case":{this.checkSelectKey(c,i,c.value),l.cases.push({key:c.value,tokens:this.parseBody(t),ctx:j(c)});break}case"end":return l;default:throw new x(c,`Unexpected lexer token: ${c.type}`)}throw new x(null,"Unexpected message end")}parseArgToken(r,t){let s=j(r),i=this.lexer.next();if(!i)throw new x(null,"Unexpected message end");if(s.text+=i.text,s.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!Re.includes(i.value)){let l=`Invalid strict mode function arg type: ${i.value}`;throw new x(r,l)}switch(i.type){case"end":return{type:"argument",arg:r.value,ctx:s};case"func-simple":{let l=this.lexer.next();if(!l)throw new x(null,"Unexpected message end");if(l.type!=="end")throw new x(l,`Unexpected lexer token: ${l.type}`);if(s.text+=l.text,re(i.value.toLowerCase()))throw new x(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:r.value,key:i.value,ctx:s}}case"func-args":{if(re(i.value.toLowerCase())){let c=`Invalid type identifier: ${i.value}`;throw new x(i,c)}let l=this.parseBody(this.strict?!1:t);return this.strict&&l.length>0&&(l=Ie(r,l)),{type:"function",arg:r.value,key:i.value,param:l,ctx:s}}case"select":if(re(i.value))return this.parseSelect(r,t,s,i.value);throw new x(i,`Unexpected select type ${i.value}`);default:throw new x(i,`Unexpected lexer token: ${i.type}`)}}parseBody(r,t){let s=[],i=null;for(let l of this.lexer)if(l.type==="argument")i&&(i=null),s.push(this.parseArgToken(l,r));else if(l.type==="octothorpe"&&r)i&&(i=null),s.push({type:"octothorpe",ctx:j(l)});else{if(l.type==="end"&&!t)return s;{let c=l.value;if(!r&&l.type==="quoted"&&c[0]==="#"){if(c.includes("{")){let h=`Unsupported escape pattern: ${c}`;throw new x(l,h)}c=l.text}i?(i.value+=c,i.ctx.text+=l.text,i.ctx.lineBreaks+=l.lineBreaks):(i={type:"content",value:c,ctx:j(l)},s.push(i))}}if(t)return s;throw new x(null,"Unexpected message end")}};function Ue(e,r={}){return new ne(e,r).parse()}a(Ue,"parse")});var _e=de(ve(),1);var E=class extends Error{static{a(this,"DateFormatError")}constructor(r,t,s){super(r),this.token=t,this.type=s||"error"}},we=a(e=>e<4?"short":e===4?"long":"narrow","alpha"),G=a(e=>e%2===0?"2-digit":"numeric","numeric");function Le(e,r){switch(e.char){case"y":return{year:G(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return r(`${e.desc} is not supported; falling back to year:numeric`,E.WARNING),{year:"numeric"}}}a(Le,"yearOptions");function ze(e,r){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:r(`${e.desc} is not supported with width ${e.width}`);return}}a(ze,"monthStyle");function Ge(e,r){let{char:t,desc:s,width:i}=e;if(t==="d")return G(i);r(`${s} is not supported`)}a(Ge,"dayStyle");function Ke(e,r){let{char:t,desc:s,width:i}=e;if((t==="c"||t==="e")&&i<3){let l=`Numeric value is not supported for ${s}; falling back to weekday:short`;r(l,E.WARNING)}return we(i)}a(Ke,"weekdayStyle");function He(e){let r=G(e.width),t;switch(e.char){case"h":t="h12";break;case"H":t="h23";break;case"k":t="h24";break;case"K":t="h11";break}return t?{hour:r,hourCycle:t}:{hour:r}}a(He,"hourOptions");function We(e,r){let{char:t,desc:s,width:i}=e;switch(t){case"v":case"z":return i===4?"long":"short";case"V":if(i===4)return"long";r(`${s} is not supported with width ${i}`);return;case"X":r(`${s} is not supported`);return}return"short"}a(We,"timeZoneNameStyle");function je(e,r){switch(e.field){case"era":return{era:we(e.width)};case"year":return Le(e,r);case"month":return{month:ze(e,r)};case"day":return{day:Ge(e,r)};case"weekday":return{weekday:Ke(e,r)};case"period":return;case"hour":return He(e);case"min":return{minute:G(e.width)};case"sec":return{second:G(e.width)};case"tz":return{timeZoneName:We(e,r)};case"quarter":case"week":case"sec-frac":case"ms":r(`${e.desc} is not supported`)}}a(je,"compileOptions");function se(e,r,t=s=>{throw s}){let s={timeZone:r},i=[];for(let l of e){let{error:c,field:h,str:v}=l;if(c){let b=new E(c.message,l);b.stack=c.stack,t(b)}if(v){let b=`Ignoring string part: ${v}`;t(new E(b,l,E.WARNING))}h&&(i.indexOf(h)===-1?i.push(h):t(new E(`Duplicate ${h} token`,l)));let S=je(l,(b,M)=>t(new E(b,l,M)));S&&Object.assign(s,S)}return s}a(se,"getDateFormatOptions");var Ze={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},xe=a(e=>e>="A"&&e<="Z"||e>="a"&&e<="z","isLetter");function Je(e,r){let t=e[r],s=1;for(;e[++r]===t;)++s;let i=Ze[t];if(!i){let l=`The letter ${t} is not a valid field identifier`;return{char:t,error:new Error(l),width:s}}return{char:t,field:i.field,desc:i.desc,width:s}}a(Je,"readFieldToken");function Ye(e,r){let t=e[++r],s=2;if(t==="'")return{char:"'",str:t,width:s};for(;;){let i=e[++r];if(++s,i===void 0){let l=`Unterminated quoted literal in pattern: ${t||e}`;return{char:"'",error:new Error(l),str:t,width:s}}else if(i==="'"){if(e[++r]!=="'")return{char:"'",str:t,width:s};++s}t+=i}}a(Ye,"readQuotedToken");function Qe(e,r){let t=e[r];if(!t)return null;if(xe(t))return Je(e,r);if(t==="'")return Ye(e,r);let s=t,i=1;for(;;){let l=e[++r];if(!l||xe(l)||l==="'")return{char:t,str:s,width:i};s+=l,i+=1}}a(Qe,"readToken");function Z(e){let r=[],t=0;for(;;){let s=Qe(e,t);if(!s)return r;r.push(s),t+=s.width}}a(Z,"parseDateTokens");function ke(e,r){return e.filter(t=>t.type!=="content").length?e.map(t=>{if(t.type==="content")return r(t.value);if(t.type==="octothorpe")return"#";if(t.type==="argument")return[t.arg];if(t.type==="function"){let l=t?.param?.[0];if(t.key==="date"&&l){let c=Ve(l.value.trim(),h=>{throw new Error(`Unable to compile date expression: ${h.message}`)});return[t.arg,t.key,c]}return l?[t.arg,t.key,l.value.trim()]:[t.arg,t.key]}let s=t.pluralOffset,i={};return t.cases.forEach(({key:l,tokens:c})=>{let h=l[0]==="="?l.slice(1):l;i[h]=ke(c,r)}),[t.arg,t.type,{offset:s,...i}]}):e.map(t=>r(t.value))}a(ke,"processTokens");function Ve(e,r){if(/^::/.test(e)){let t=Z(e.substring(2));return se(t,void 0,r)}return e}a(Ve,"compileDateExpression");function Xe(e,r=t=>t){return ke((0,_e.parse)(e),r)}a(Xe,"compileMessageOrThrow");function J(e,r=t=>t){try{return Xe(e,r)}catch(t){return console.error(`${t.message}
9
+
10
+ Message: ${e}`),[e]}}a(J,"compileMessage");var B=a(e=>typeof e=="string","isString"),et=a(e=>typeof e=="function","isFunction"),be=new Map,Te="en";function le(e){return[...Array.isArray(e)?e:[e],Te]}a(le,"normalizeLocales");function ce(e,r,t){let s=le(e);t||(t="default");let i;if(typeof t=="string")switch(i={day:"numeric",month:"short",year:"numeric"},t){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=t;return Y(()=>Q("date",s,t),()=>new Intl.DateTimeFormat(s,i)).format(B(r)?new Date(r):r)}a(ce,"date");function tt(e,r,t){let s;if(t||(t="default"),typeof t=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},t){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=t;return ce(e,r,s)}a(tt,"time");function ie(e,r,t){let s=le(e);return Y(()=>Q("number",s,t),()=>new Intl.NumberFormat(s,t)).format(r)}a(ie,"number");function Se(e,r,t,{offset:s=0,...i}){let l=le(e),c=r?Y(()=>Q("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):Y(()=>Q("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return i[t]??i[c.select(t-s)]??i.other}a(Se,"plural");function Y(e,r){let t=e(),s=be.get(t);return s||(s=r(),be.set(t,s)),s}a(Y,"getMemoized");function Q(e,r,t){let s=r.join("-");return`${e}-${s}-${JSON.stringify(t)}`}a(Q,"cacheKey");var Ee=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe=a(e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(r,t,s)=>{if(t){let i=parseInt(t,16);return String.fromCharCode(i)}else{let i=parseInt(s,16);return String.fromCharCode(i)}}),"decodeEscapeSequences"),Ae="%__lingui_octothorpe__%",rt=a((e,r,t={})=>{let s=r||e,i=a(c=>typeof c=="object"?c:t[c],"style"),l=a((c,h)=>{let v=Object.keys(t).length?i("number"):void 0,S=ie(s,c,v);return h.replace(new RegExp(Ae,"g"),S)},"replaceOctothorpe");return{plural:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!1,c,h);return l(c-v,S)},"plural"),selectordinal:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!0,c,h);return l(c-v,S)},"selectordinal"),select:nt,number:a((c,h)=>ie(s,c,i(h)||{style:h}),"number"),date:a((c,h)=>ce(s,c,i(h)||h),"date"),time:a((c,h)=>tt(s,c,i(h)||h),"time")}},"getDefaultFormats"),nt=a((e,r)=>r[e]??r.other,"selectFormatter");function st(e,r,t){return(s={},i)=>{let l=rt(r,t,i),c=a((v,S=!1)=>Array.isArray(v)?v.reduce((b,M)=>{if(M==="#"&&S)return b+Ae;if(B(M))return b+M;let[K,O,$]=M,C={};O==="plural"||O==="selectordinal"||O==="select"?Object.entries($).forEach(([F,X])=>{C[F]=c(X,O==="plural"||O==="selectordinal")}):C=$;let N;if(O){let F=l[O];N=F(s[K],C)}else N=s[K];return N==null?b:b+N},""):v,"formatMessage"),h=c(e);return B(h)&&Ee.test(h)?Oe(h):B(h)?h:h?String(h):""}}a(st,"interpolate");var ae=class{static{a(this,"EventEmitter")}_events={};on(r,t){return this._events[r]??=new Set,this._events[r].add(t),()=>this.removeListener(r,t)}removeListener(r,t){let s=this._events[r];s?.delete(t),s?.size===0&&delete this._events[r]}emit(r,...t){let s=this._events[r];if(s)for(let i of[...s])i.apply(this,t)}},oe=class extends ae{static{a(this,"I18n")}_locale="";_locales;_messages={};_missing;_messageCompiler;constructor(r){super(),this.setMessagesCompiler(J),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),(typeof r.locale=="string"||r.locales)&&this.activate(r.locale??Te,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(r){return this._messageCompiler=r,this}_load(r,t){let s=this._messages[r];s?Object.assign(s,t):this._messages[r]=t}load(r,t){typeof r=="string"&&typeof t=="object"?this._load(r,t):Object.entries(r).forEach(([s,i])=>this._load(s,i)),this.emit("change")}loadAndActivate({locale:r,locales:t,messages:s}){this._locale=r,this._locales=t||void 0,this._messages[this._locale]=s,this.emit("change")}activate(r,t){this._messages[r]||console.warn(`Messages for locale "${r}" not loaded.`),this._locale=r,this._locales=t,this.emit("change")}_(r,t,s){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=s?.message;r||(r=""),B(r)||(t=r.values||t,i=r.message,r=r.id);let l=this.messages[r],c=l===void 0,h=this._missing;if(h&&c)return et(h)?h(this._locale,r):h;c&&this.emit("missing",{id:r,locale:this._locale});let v=l||i||r;return B(v)&&(this._messageCompiler?v=this._messageCompiler(v):console.warn(`Uncompiled message detected! Message:
11
+
12
+ > ${v}
13
+
14
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
15
+ ICU features such as interpolation and plurals will not work properly for that message.
16
+
17
+ Please compile your catalog first.
18
+ `)),B(v)&&Ee.test(v)?Oe(v):B(v)?v:st(v,this._locale,this._locales)(t,s?.formats)}t=this._.bind(this);date(r,t){return ce(this._locales||this._locale,r,t)}number(r,t){return ie(this._locales||this._locale,r,t)}};function ue(e={}){return new oe(e)}a(ue,"setupI18n");var Pt=ue();var V=de(Pe(),1);var it={},Me="en",at={en:it},ot=a((e=Me,r=at)=>{let t=ue();t.setMessagesCompiler(J);for(let[s,i]of Object.entries(r))t.load(s,i);return t.activate(r[e]===void 0?Me:e),t},"createStudioI18n"),lt=ot(),ct=(0,V.createContext)(lt),Ut=a(()=>{let e=(0,V.use)(ct);return(r,t)=>e._(r,t)},"useT");var Gt=a((e,r,t,s,i)=>{switch(r){case"action":return e.action(t,s,i);case"mutation":return e.mutation(t,s,i);default:return e.query(t,s,i)}},"dispatchByKind"),Kt=a(e=>({__lunoraRef:e}),"adminRef"),Ht=a(e=>{let r=e.trim();return r===""?{}:{shardKey:r}},"callOptions"),Wt=a(e=>e instanceof Error?e.message:String(e),"errorMessage"),jt=a(e=>{if(e===null||typeof e!="object"||!("hint"in e))return;let{hint:r}=e;return typeof r=="string"?r:Array.isArray(r)?r.filter(t=>typeof t=="string").join(`
19
+ `):void 0},"errorHint"),Zt=a(e=>{if(e===null||typeof e!="object"||!("docsUrl"in e))return;let r=e.docsUrl;if(typeof r=="string")try{let{protocol:t}=new URL(r);return t==="http:"||t==="https:"?r:void 0}catch{return}},"errorDocumentationUrl"),Jt=a(e=>{if(e==null)return"";switch(typeof e){case"bigint":case"boolean":case"number":return e.toString();case"string":return e;case"symbol":return e.toString();default:return JSON.stringify(e)}},"formatCell"),ut=a((e,r)=>{e.catch(t=>{})},"fireAndForget"),Yt=a(e=>{if(e!==void 0&&e!=="")return e;let r=globalThis.location;return r?.origin!==void 0&&r.origin!==""?r.origin:"http://localhost:5173"},"resolveOrigin"),Qt=a(e=>{let r="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return r===void 0?!1:(ut(r.writeText(e)),!0)},"copyToClipboard"),Vt=a(e=>{if(e==null)return"\u2014";if(e<1024)return`${e.toString()} B`;let r=["KB","MB","GB","TB"],t=e/1024,s=0;for(;t>=1024&&s<r.length-1;)t/=1024,s+=1;return`${t.toFixed(1)} ${r[s]??"TB"}`},"formatBytes"),Xt=a((e,r="")=>{if(e==null||e==="")return r;let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString()},"formatTimestamp");export{ot as a,lt as b,ct as c,Ut as d,Gt as e,Kt as f,Ht as g,Wt as h,jt as i,Zt as j,Jt as k,ut as l,Yt as m,Qt as n,Vt as o,Xt as p};
@@ -0,0 +1 @@
1
+ import{a as d,b as u}from"./chunk-X4QFAAZ5.js";import"./chunk-BJGBHGK3.js";import"./chunk-ZIGWVHCS.js";import"./chunk-KEGAWN6Y.js";import"./chunk-HV7G6DFP.js";import"./chunk-3OA7PECS.js";import"./chunk-22C6COGE.js";import{a as c,e as m,g as p,h as v}from"./chunk-RRCPZMC2.js";var h=m(p(),1);var o=m(v(),1);var y={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},g=c(n=>{let e=(0,h.c)(6),{data:i}=n,a,r;if(e[0]!==i){r=Symbol.for("react.early_return_sentinel");e:{let f=i.slice(-16);if(f.length<3){r=null;break e}a=f.map(_)}e[0]=i,e[1]=a,e[2]=r}else a=e[1],r=e[2];if(r!==Symbol.for("react.early_return_sentinel"))return r;let s=a,t;e[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsxDEV)(u,{dataKey:"value"},void 0,!1),e[3]=t):t=e[3];let l;return e[4]!==s?(l=(0,o.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28",children:(0,o.jsxDEV)(d,{animationType:"none",barCategoryGap:1,className:"h-8 w-full",config:y,data:s,children:t},void 0,!1)},void 0,!1),e[4]=s,e[5]=l):l=e[5],l},"Sparkline");function _(n,e){return{index:e,value:n}}c(_,"_temp");export{g as Sparkline};
@@ -0,0 +1 @@
1
+ import{a as l,e as m,f as v,g as E}from"./chunk-RRCPZMC2.js";var R=m(E(),1),e=m(v(),1);var g=5e3,p=l((r,o,f)=>{let t=(0,R.c)(6),s=f===void 0?g:f,i=(0,e.useRef)(r),c;t[0]!==r?(c=l(()=>{i.current=r},"t1"),t[0]=r,t[1]=c):c=t[1],(0,e.useEffect)(c);let n,u;t[2]!==o||t[3]!==s?(n=l(()=>{if(!o)return;let a=setInterval(()=>{globalThis.document?.hidden!==!0&&i.current()},s);return()=>{clearInterval(a)}},"t2"),u=[o,s],t[2]=o,t[3]=s,t[4]=n,t[5]=u):(n=t[4],u=t[5]),(0,e.useEffect)(n,u)},"useAutoRefresh");export{p as a};
@@ -0,0 +1 @@
1
+ import{d as N,k as x}from"./chunk-ITQKVEP7.js";import{a as m,e as w,g as y,h as C}from"./chunk-RRCPZMC2.js";var v=w(y(),1);var o=w(C(),1);var T=m(b=>{let e=(0,v.c)(8),{value:l}=b;if(l==null){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.jsxDEV)("span",{className:"text-muted-foreground/50 italic",children:"NULL"},void 0,!1),e[0]=a):a=e[0],a}let t;e[1]!==l?(t=x(l),e[1]=l,e[2]=t):t=e[2];let r;e[3]!==l?(r=x(l),e[3]=l,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=(0,o.jsxDEV)("span",{title:t,children:r},void 0,!1),e[5]=t,e[6]=r,e[7]=s):s=e[7],s},"CellValue"),G=m(b=>{let e=(0,v.c)(22),{columns:l,rows:t}=b,r=N(),s;e[0]!==r?(s=r("Field"),e[0]=r,e[1]=s):s=e[1];let a;e[2]!==s?(a=(0,o.jsxDEV)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:s},void 0,!1),e[2]=s,e[3]=a):a=e[3];let i;if(e[4]!==t||e[5]!==r){let d;e[7]!==r?(d=m((u,h)=>(0,o.jsxDEV)("th",{className:"border-b border-border px-3 py-1.5 text-start font-mono text-[11px] tracking-wide uppercase tabular-nums text-muted-foreground",children:r("Row {n}",{n:h+1})},h,!1),"t42"),e[7]=r,e[8]=d):d=e[8],i=t.map(d),e[4]=t,e[5]=r,e[6]=i}else i=e[6];let n;e[9]!==a||e[10]!==i?(n=(0,o.jsxDEV)("thead",{className:"sticky top-0 z-10 bg-muted",children:(0,o.jsxDEV)("tr",{children:[a,i]},void 0,!0)},void 0,!1),e[9]=a,e[10]=i,e[11]=n):n=e[11];let f;if(e[12]!==l||e[13]!==t){let d;e[15]!==t?(d=m(u=>(0,o.jsxDEV)("tr",{className:"hover:bg-muted/40",children:[(0,o.jsxDEV)("th",{className:"border-b border-e border-border px-3 py-1.5 text-start font-mono font-medium whitespace-nowrap",scope:"row",children:u},void 0,!1),t.map((h,g)=>(0,o.jsxDEV)("td",{className:"max-w-md truncate border-b border-border px-3 py-1.5 font-mono",children:(0,o.jsxDEV)(T,{value:h[u]},void 0,!1)},g,!1))]},u,!0),"t62"),e[15]=t,e[16]=d):d=e[16],f=l.map(d),e[12]=l,e[13]=t,e[14]=f}else f=e[14];let c;e[17]!==f?(c=(0,o.jsxDEV)("tbody",{children:f},void 0,!1),e[17]=f,e[18]=c):c=e[18];let p;return e[19]!==n||e[20]!==c?(p=(0,o.jsxDEV)("div",{className:"min-h-0 flex-1 overflow-auto","data-testid":"db-transposed",children:(0,o.jsxDEV)("table",{className:"border-collapse text-xs",children:[n,c]},void 0,!0)},void 0,!1),e[19]=n,e[20]=c,e[21]=p):p=e[21],p},"TransposedTable"),L=m(({children:b,layout:e="card",testId:l})=>(0,o.jsxDEV)("div",{className:e==="fill"?"flex min-h-0 flex-1 flex-col overflow-hidden border-t border-border":"overflow-x-auto border border-border bg-card","data-testid":l,children:b},void 0,!1),"GridContainer");export{T as a,G as b,L as c};
@@ -0,0 +1 @@
1
+ import{a as g,b as S}from"./chunk-X4QFAAZ5.js";import{a as i,e as m,g as v,h as C,j as d}from"./chunk-RRCPZMC2.js";var w=i(e=>{let t=0,n=0,o=0,r=0,s=0,l=0,c=0;for(let{metrics:a}of e){if(a===null){s+=1;continue}r+=1,t+=a.requests,n+=a.errors,o+=a.databaseSize??0,a.cache!==null&&(l+=a.cache.hits,c+=a.cache.hits+a.cache.misses)}return{failed:s,hitRate:c===0?null:l/c,reachable:r,totalDatabaseSize:o,totalErrors:n,totalRequests:t}},"aggregateMetrics"),E=i((e,t)=>{let n=new Set,o=[];for(let r of["",e.trim(),...t])n.has(r)||(n.add(r),o.push(r));return o},"shardsToAggregate"),x=i((e,t)=>{if(e.length===0)return 0;if(e.sort((o,r)=>o-r),t<=0)return e[0]??0;if(t>=100)return e.at(-1)??0;let n=Math.ceil(t/100*e.length)-1;return e[n]??0},"percentile"),N=i(e=>{let n=e.functions;if(!n||n.length===0)return{p90:0,p95:0};let o=1e3,r=[];for(let s of n){if(s.calls<=0)continue;let l=s.totalDurationMs/s.calls,c=Math.min(s.calls,o);for(let a=0;a<c;a+=1)r.push(l)}return r.length===0?{p90:0,p95:0}:{p90:x([...r],90),p95:x([...r],95)}},"computeLatencyPercentiles");var _=i(e=>e.map(t=>({...t,avgDurationMs:t.execCount>0?t.totalDurationMs/t.execCount:0})),"enrichQueryStats");var b=m(v(),1);var p=m(C(),1);var D={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},P=i(e=>{let t=(0,b.c)(12),{ariaLabel:n,className:o,series:r,testId:s}=e;if(r.length<2)return null;let l;t[0]!==r?(l=r.slice(-40).map(M),t[0]=r,t[1]=l):l=t[1];let c=l,a;t[2]!==o?(a=d("h-6 w-[120px]",o),t[2]=o,t[3]=a):a=t[3];let u;t[4]===Symbol.for("react.memo_cache_sentinel")?(u=(0,p.jsxDEV)(S,{dataKey:"value"},void 0,!1),t[4]=u):u=t[4];let f;t[5]!==c?(f=(0,p.jsxDEV)(g,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:D,data:c,children:u},void 0,!1),t[5]=c,t[6]=f):f=t[6];let h;return t[7]!==n||t[8]!==a||t[9]!==f||t[10]!==s?(h=(0,p.jsxDEV)("div",{"aria-label":n,className:a,"data-testid":s,role:"img",children:f},void 0,!1),t[7]=n,t[8]=a,t[9]=f,t[10]=s,t[11]=h):h=t[11],h},"Sparkline");function M(e,t){return{index:t,value:e}}i(M,"_temp");export{w as a,E as b,N as c,_ as d,P as e};
@@ -0,0 +1 @@
1
+ import{a as i,e as r,f as c,g as m,h as f,j as n}from"./chunk-RRCPZMC2.js";var p=r(m(),1),b=r(c(),1);var d=r(f(),1);function x(s){let e=(0,p.c)(8),t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=n("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=(0,d.jsxDEV)("label",{"data-slot":"label",className:l,...a},void 0,!1),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}i(x,"Label");export{x as a};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-AITOCPML.js";import{b as _}from"./chunk-RXVQJ4DO.js";import{a as O,b as $,c as k,d as T,e as r,f as o}from"./chunk-GTM65MVX.js";import{a as A,e as I}from"./chunk-SEU5V7I6.js";import{b}from"./chunk-ZPP2KOR4.js";import"./chunk-CKSHCYGC.js";import{a as L}from"./chunk-G7ZBM54M.js";import"./chunk-L2YBC2BV.js";import"./chunk-ZHVTQ37P.js";import"./chunk-3OA7PECS.js";import{a as S}from"./chunk-TAD43CG5.js";import{d as E}from"./chunk-ITQKVEP7.js";import"./chunk-22C6COGE.js";import{a as x,e as C,f as M,g as P,h as V}from"./chunk-RRCPZMC2.js";var B=C(P(),1),K=C(M(),1);var t=C(V(),1);var R="container:",F={error:"error",sleep:"sleeping",start:"running",stop:"stopped"},H=x(e=>{let n=e.indexOf(":");if(n===-1)return{event:e.trim()};let s=e.slice(n+1).trim(),a=e.slice(0,n).trim();return s===""?{event:a}:{detail:s,event:a}},"parseContainerMessage"),W=x(e=>{let n=new Map;for(let s of e){let a=s.functionPath??"";if(!a.startsWith(R))continue;let i=a.slice(R.length);if(i==="")continue;let l=JSON.stringify([i,s.instance??""]),d=n.get(l);if(d!==void 0&&d.timestamp>=s.timestamp)continue;let{detail:N,event:c}=H(s.message);n.set(l,{detail:N,event:c,exitCode:s.exitCode,instance:s.instance,level:s.level,name:i,state:F[c]??"unknown",timestamp:s.timestamp})}return[...n.values()].toSorted((s,a)=>s.name.localeCompare(a.name)||(s.instance??"").localeCompare(a.instance??""))},"foldContainerInstances"),j={error:"destructive",running:"success",sleeping:"info",stopped:"outline",unknown:"secondary"},G=x(e=>{let{entries:n}=e??{};return Array.isArray(n)?n:[]},"entriesOf"),ee=x(()=>{let e=(0,B.c)(23),n=E(),s,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={},a={live:!0,shardKey:""},e[0]=s,e[1]=a):(s=e[0],a=e[1]);let{data:i,error:l,liveError:d}=_(L.getLogs,s,a),N=i!==void 0,c;e[2]!==i?(c=W(G(i)),e[2]=i,e[3]=c):c=e[3];let g=c,m;e[4]!==l?(m=l!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"containers-error",role:"alert",children:l},void 0,!1),e[4]=l,e[5]=m):m=e[5];let f;e[6]!==n?(f=n("Cloudflare Containers are observed from their lifecycle log stream. This shows the current state per instance \u2014 ports and health checks aren't carried in that stream."),e[6]=n,e[7]=f):f=e[7];let u;e[8]!==f?(u=(0,t.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:f},void 0,!1),e[8]=f,e[9]=u):u=e[9];let p;e[10]!==d?(p=(0,t.jsxDEV)(D,{message:d,prefix:"containers"},void 0,!1),e[10]=d,e[11]=p):p=e[11];let v;e[12]!==u||e[13]!==p?(v=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[u,p]},void 0,!0),e[12]=u,e[13]=p,e[14]=v):v=e[14];let h;e[15]!==N||e[16]!==g||e[17]!==n?(h=N&&g.length===0?(0,t.jsxDEV)(S,{description:n("No container lifecycle activity yet. Instances declared with defineContainer show up here once they start, sleep, stop, or error."),testId:"containers-empty",title:n("No container activity")},void 0,!1):(0,t.jsxDEV)(A,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(I,{className:"px-0",children:(0,t.jsxDEV)(O,{"data-testid":"containers-table",children:[(0,t.jsxDEV)($,{children:(0,t.jsxDEV)(T,{children:[(0,t.jsxDEV)(r,{children:n("Container")},void 0,!1),(0,t.jsxDEV)(r,{children:n("Instance")},void 0,!1),(0,t.jsxDEV)(r,{children:n("State")},void 0,!1),(0,t.jsxDEV)(r,{children:n("Last event")},void 0,!1),(0,t.jsxDEV)(r,{children:n("Detail")},void 0,!1),(0,t.jsxDEV)(r,{children:n("Exit")},void 0,!1),(0,t.jsxDEV)(r,{children:n("When")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(k,{children:g.map(J)},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1),e[15]=N,e[16]=g,e[17]=n,e[18]=h):h=e[18];let y;return e[19]!==m||e[20]!==v||e[21]!==h?(y=(0,t.jsxDEV)("div",{className:"flex flex-col gap-6","data-testid":"lunora-containers-panel",children:[m,v,h]},void 0,!0),e[19]=m,e[20]=v,e[21]=h,e[22]=y):y=e[22],y},"ContainersPanel");function J(e){return(0,t.jsxDEV)(T,{"data-testid":`containers-row-${e.name}${e.instance===void 0?"":`-${e.instance}`}`,children:[(0,t.jsxDEV)(o,{className:"font-mono text-xs",children:e.name},void 0,!1),(0,t.jsxDEV)(o,{className:"max-w-40 truncate font-mono text-xs text-muted-foreground",title:e.instance,children:e.instance??"\u2014"},void 0,!1),(0,t.jsxDEV)(o,{children:(0,t.jsxDEV)(b,{variant:j[e.state],children:e.state},void 0,!1)},void 0,!1),(0,t.jsxDEV)(o,{className:"font-mono text-xs text-muted-foreground",children:e.event},void 0,!1),(0,t.jsxDEV)(o,{className:"max-w-64 truncate text-xs text-muted-foreground",title:e.detail,children:e.detail??"\u2014"},void 0,!1),(0,t.jsxDEV)(o,{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.exitCode??"\u2014"},void 0,!1),(0,t.jsxDEV)(o,{className:"text-xs tabular-nums text-muted-foreground",children:new Date(e.timestamp).toLocaleString()},void 0,!1)]},`${e.name}/${e.instance??""}`,!0)}x(J,"_temp");export{ee as ContainersPanel};