@lunora/studio 1.0.0-alpha.263 → 1.0.0-alpha.265

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 (142) hide show
  1. package/dist/standalone/{chunk-NYKWTNZX.js → chunk-253UHWDX.js} +1 -1
  2. package/dist/standalone/{chunk-72GVG7ZA.js → chunk-2I4NHEKA.js} +1 -1
  3. package/dist/standalone/{chunk-N6NMLJ6R.js → chunk-2IKDEUCX.js} +1 -1
  4. package/dist/standalone/{chunk-4ALGJHGT.js → chunk-2LDBVPWQ.js} +1 -1
  5. package/dist/standalone/{chunk-GFQSMB25.js → chunk-2WSX2ZR2.js} +1 -1
  6. package/dist/standalone/{chunk-YY67675G.js → chunk-2ZIRRUR5.js} +1 -1
  7. package/dist/standalone/{chunk-OTH4FYM7.js → chunk-36BHFCJZ.js} +1 -1
  8. package/dist/standalone/{chunk-C6P2S732.js → chunk-36OOBZSU.js} +1 -1
  9. package/dist/standalone/{chunk-IMOHEGMV.js → chunk-37WYCOQ2.js} +1 -1
  10. package/dist/standalone/{chunk-FK4GW22X.js → chunk-3HP2TTN5.js} +1 -1
  11. package/dist/standalone/{chunk-VVQ64OES.js → chunk-3K3K3PW3.js} +1 -1
  12. package/dist/standalone/{chunk-IS6LVJ6L.js → chunk-3YXASVTP.js} +1 -1
  13. package/dist/standalone/{chunk-JOGSIIY2.js → chunk-46NRRTO2.js} +1 -1
  14. package/dist/standalone/{chunk-LCRAEP3B.js → chunk-4WD4XGC3.js} +1 -1
  15. package/dist/standalone/{chunk-XC734N2Q.js → chunk-4ZDBUYGM.js} +1 -1
  16. package/dist/standalone/{chunk-35DM4JJG.js → chunk-55UGUCQ6.js} +1 -1
  17. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  18. package/dist/standalone/{chunk-G3CZ2FAC.js → chunk-5EALT2C5.js} +1 -1
  19. package/dist/standalone/{chunk-PFIUSVS6.js → chunk-5NOZE2BB.js} +1 -1
  20. package/dist/standalone/{chunk-H6LZ3QM4.js → chunk-5QR2SQIS.js} +1 -1
  21. package/dist/standalone/{chunk-236GHAHX.js → chunk-65BYZFEA.js} +1 -1
  22. package/dist/standalone/{chunk-H44HW3WV.js → chunk-6HLARDYO.js} +1 -1
  23. package/dist/standalone/chunk-6QTAHSDD.js +1 -0
  24. package/dist/standalone/{chunk-OJE7SI3H.js → chunk-7CX2KBPN.js} +1 -1
  25. package/dist/standalone/{chunk-55754F6H.js → chunk-7G4Z6Q7X.js} +1 -1
  26. package/dist/standalone/{chunk-HVAGAMHZ.js → chunk-7IF35UKO.js} +1 -1
  27. package/dist/standalone/{chunk-BRIYEPXI.js → chunk-7RKB5KS7.js} +1 -1
  28. package/dist/standalone/{chunk-V34AI5VV.js → chunk-7TOFQCI2.js} +1 -1
  29. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  30. package/dist/standalone/{chunk-QSIQCK3O.js → chunk-A4BIP777.js} +1 -1
  31. package/dist/standalone/{chunk-VNGJA3DB.js → chunk-AG4AQVJT.js} +1 -1
  32. package/dist/standalone/{chunk-AAVLPU5Q.js → chunk-AUAECCXB.js} +1 -1
  33. package/dist/standalone/{chunk-5JDWLCSH.js → chunk-AUGKHAMQ.js} +1 -1
  34. package/dist/standalone/{chunk-RKOBPURU.js → chunk-B6THVJOE.js} +3 -3
  35. package/dist/standalone/{chunk-225VJ77I.js → chunk-BOMPSVRC.js} +1 -1
  36. package/dist/standalone/{chunk-M23RGNY6.js → chunk-C4CN3KU7.js} +1 -1
  37. package/dist/standalone/{chunk-ILVYBIS4.js → chunk-C55EORND.js} +1 -1
  38. package/dist/standalone/{chunk-4S4HJOW4.js → chunk-CASWKFSS.js} +1 -1
  39. package/dist/standalone/{chunk-6DAD3RFX.js → chunk-CCDX5RYT.js} +1 -1
  40. package/dist/standalone/{chunk-NCFRIHLB.js → chunk-CGQMJYCW.js} +1 -1
  41. package/dist/standalone/{chunk-3M5DIK2H.js → chunk-CHFWRN5A.js} +1 -1
  42. package/dist/standalone/{chunk-TIYUHTB3.js → chunk-CIO364ZD.js} +1 -1
  43. package/dist/standalone/{chunk-O3EVDJD5.js → chunk-CVXNHIQW.js} +1 -1
  44. package/dist/standalone/{chunk-ZOBBA5XA.js → chunk-CZLVSMOP.js} +1 -1
  45. package/dist/standalone/{chunk-HEDS6FOP.js → chunk-E2BLE4AI.js} +1 -1
  46. package/dist/standalone/{chunk-6QA34EWC.js → chunk-E4PXACVL.js} +1 -1
  47. package/dist/standalone/{chunk-HPFN7S7N.js → chunk-ECY2JC5F.js} +1 -1
  48. package/dist/standalone/{chunk-LPT6MHEY.js → chunk-EQ642P2K.js} +1 -1
  49. package/dist/standalone/{chunk-36SHCQOV.js → chunk-EWCDT3C4.js} +1 -1
  50. package/dist/standalone/chunk-FCPQOUUQ.js +5 -0
  51. package/dist/standalone/{chunk-5WHNC53N.js → chunk-FE2NK2KO.js} +1 -1
  52. package/dist/standalone/{chunk-FZ7UOWAB.js → chunk-FFVKIOKZ.js} +1 -1
  53. package/dist/standalone/{chunk-EA2JKR5D.js → chunk-FPI7AMQJ.js} +1 -1
  54. package/dist/standalone/{chunk-K7AJEMKE.js → chunk-FUYEZFBP.js} +1 -1
  55. package/dist/standalone/{chunk-SRCY6GJN.js → chunk-GBS7KH2J.js} +1 -1
  56. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  57. package/dist/standalone/{chunk-DTOAMMQF.js → chunk-GZI4QESE.js} +1 -1
  58. package/dist/standalone/{chunk-NKZCEQJ7.js → chunk-H2QIHAXY.js} +1 -1
  59. package/dist/standalone/{chunk-HEAQVSNS.js → chunk-HCTJKP5J.js} +1 -1
  60. package/dist/standalone/{chunk-ZD2UXTLR.js → chunk-HECPC2VY.js} +1 -1
  61. package/dist/standalone/{chunk-PTZD7RUZ.js → chunk-HJHSQPHW.js} +11 -11
  62. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  63. package/dist/standalone/{chunk-KGF3ZXRT.js → chunk-IE4X3UYS.js} +1 -1
  64. package/dist/standalone/{chunk-QKEJLVC5.js → chunk-IWZ7GVQO.js} +1 -1
  65. package/dist/standalone/{chunk-NSWDULEE.js → chunk-JI22NSXG.js} +1 -1
  66. package/dist/standalone/{chunk-H6WXBORU.js → chunk-JNRKX2W3.js} +1 -1
  67. package/dist/standalone/{chunk-66UGPQVC.js → chunk-JQXA2OYK.js} +1 -1
  68. package/dist/standalone/{chunk-OCUJO2PM.js → chunk-JZGTSH2C.js} +1 -1
  69. package/dist/standalone/{chunk-YOB2X3FZ.js → chunk-K2MZTOIJ.js} +1 -1
  70. package/dist/standalone/{chunk-IAL3CXYI.js → chunk-KKPGRVBG.js} +1 -1
  71. package/dist/standalone/{chunk-3HLT7EQR.js → chunk-KZHKRFFX.js} +1 -1
  72. package/dist/standalone/{chunk-HCGXKDHF.js → chunk-LLNH4AP2.js} +1 -1
  73. package/dist/standalone/{chunk-ZFXRRVWV.js → chunk-LWM7Y3CL.js} +1 -1
  74. package/dist/standalone/{chunk-7IV6BZTQ.js → chunk-MFF6SM5S.js} +2 -2
  75. package/dist/standalone/{chunk-N2U3OE4N.js → chunk-MQ5RY4I7.js} +1 -1
  76. package/dist/standalone/{chunk-TDXV3OT5.js → chunk-MVWZMWPD.js} +1 -1
  77. package/dist/standalone/{chunk-WOY4G5ON.js → chunk-NAN5F2XU.js} +1 -1
  78. package/dist/standalone/{chunk-ULIQFBZU.js → chunk-NCPW7WHO.js} +1 -1
  79. package/dist/standalone/{chunk-T6JDEFHN.js → chunk-NDTQTKDX.js} +1 -1
  80. package/dist/standalone/{chunk-NESDGS7F.js → chunk-NQZALRU3.js} +1 -1
  81. package/dist/standalone/{chunk-4JLGLPWV.js → chunk-NRP22GKC.js} +1 -1
  82. package/dist/standalone/{chunk-IFJOYAEZ.js → chunk-NXQW5E6W.js} +1 -1
  83. package/dist/standalone/{chunk-IGNYTJPT.js → chunk-NZT7EQC7.js} +1 -1
  84. package/dist/standalone/{chunk-XXVOKVXV.js → chunk-OPM7ESDV.js} +1 -1
  85. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  86. package/dist/standalone/{chunk-MRAMNVDG.js → chunk-OSGXNEFA.js} +1 -1
  87. package/dist/standalone/{chunk-GX2YM7MB.js → chunk-OYCUPD3Q.js} +1 -1
  88. package/dist/standalone/{chunk-Z3S3I4CF.js → chunk-P6VUSJG2.js} +1 -1
  89. package/dist/standalone/{chunk-RDL5WK55.js → chunk-PCBRDDD7.js} +1 -1
  90. package/dist/standalone/{chunk-44NITJRA.js → chunk-PH33W25H.js} +1 -1
  91. package/dist/standalone/{chunk-U7E33WOM.js → chunk-PIMTWCRD.js} +1 -1
  92. package/dist/standalone/{chunk-FEWMAPNI.js → chunk-Q6ED4KUL.js} +1 -1
  93. package/dist/standalone/{chunk-CSUROWL2.js → chunk-Q6IT6ZD7.js} +1 -1
  94. package/dist/standalone/{chunk-FSRSK4LY.js → chunk-QAQDMS6R.js} +1 -1
  95. package/dist/standalone/{chunk-XZMOZFE6.js → chunk-QJLHH3ET.js} +1 -1
  96. package/dist/standalone/{chunk-IRQNBAYI.js → chunk-QNG76J7U.js} +1 -1
  97. package/dist/standalone/{chunk-S3CRZLGS.js → chunk-R6U22RSY.js} +1 -1
  98. package/dist/standalone/{chunk-OKG3HWSJ.js → chunk-RGMVGZV4.js} +1 -1
  99. package/dist/standalone/{chunk-FKVZRPV5.js → chunk-RWVIV3U7.js} +1 -1
  100. package/dist/standalone/{chunk-STF7K7PL.js → chunk-RZF2RURD.js} +1 -1
  101. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  102. package/dist/standalone/{chunk-5WJXVZMZ.js → chunk-SA2OGF3F.js} +1 -1
  103. package/dist/standalone/{chunk-Y6CXU7T4.js → chunk-SJQERRSZ.js} +1 -1
  104. package/dist/standalone/{chunk-DMNR5ITO.js → chunk-SS4FGGY5.js} +1 -1
  105. package/dist/standalone/{chunk-Z5O2NQAV.js → chunk-SV764LKQ.js} +1 -1
  106. package/dist/standalone/{chunk-I7H22G4D.js → chunk-TDQLMXKM.js} +1 -1
  107. package/dist/standalone/{chunk-3Q2P62UR.js → chunk-UC7MNI2F.js} +1 -1
  108. package/dist/standalone/{chunk-5KQPYU7I.js → chunk-URMNAUYR.js} +1 -1
  109. package/dist/standalone/{chunk-EIISOYGA.js → chunk-UUMEGH4P.js} +1 -1
  110. package/dist/standalone/{chunk-EXOWNDCL.js → chunk-UYLU2CFX.js} +1 -1
  111. package/dist/standalone/{chunk-4GTO7FL5.js → chunk-VESGIGMQ.js} +1 -1
  112. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  113. package/dist/standalone/{chunk-VUPEFCIO.js → chunk-WLCZLWDF.js} +1 -1
  114. package/dist/standalone/{chunk-RPQL45FL.js → chunk-WMN5PZZX.js} +1 -1
  115. package/dist/standalone/{chunk-EGVOSH7K.js → chunk-WNZLTRKF.js} +1 -1
  116. package/dist/standalone/{chunk-22BBGCHO.js → chunk-X2N24K56.js} +1 -1
  117. package/dist/standalone/{chunk-RJQMO2EF.js → chunk-XE7KY2IJ.js} +1 -1
  118. package/dist/standalone/{chunk-Q4CAKBWN.js → chunk-XGCIDUJF.js} +1 -1
  119. package/dist/standalone/{chunk-NFS7FTAR.js → chunk-XHRKNCCI.js} +1 -1
  120. package/dist/standalone/{chunk-NT2ZOFRF.js → chunk-XMUOATX2.js} +1 -1
  121. package/dist/standalone/{chunk-YDLEJGBK.js → chunk-XTQQIXJ4.js} +1 -1
  122. package/dist/standalone/{chunk-NZSVJLGE.js → chunk-XWLNR5FB.js} +1 -1
  123. package/dist/standalone/{chunk-MU3P2FI7.js → chunk-Y3AYVFTK.js} +1 -1
  124. package/dist/standalone/{chunk-NYFJOVIA.js → chunk-Y5NTSEWR.js} +1 -1
  125. package/dist/standalone/{chunk-LIOUCOP2.js → chunk-YVR4SEPU.js} +1 -1
  126. package/dist/standalone/{chunk-UXXDN6Z3.js → chunk-Z22BDS6N.js} +1 -1
  127. package/dist/standalone/{chunk-FUHBEF6J.js → chunk-ZHAVJQY7.js} +1 -1
  128. package/dist/standalone/{chunk-HZQ627G2.js → chunk-ZKIWGBN4.js} +1 -1
  129. package/dist/standalone/{chunk-OGUKYRFM.js → chunk-ZKJS6EBE.js} +1 -1
  130. package/dist/standalone/{chunk-YLPFIPVU.js → chunk-ZWXQKMYE.js} +1 -1
  131. package/dist/standalone/studio.js +9 -9
  132. package/package.json +13 -13
  133. package/dist/standalone/chunk-4L4WTGN5.js +0 -1
  134. package/dist/standalone/chunk-6D6Z2KXU.js +0 -1
  135. package/dist/standalone/chunk-B2HYHTIX.js +0 -1
  136. package/dist/standalone/chunk-CMA4PTV7.js +0 -1
  137. package/dist/standalone/chunk-EVTM6Q43.js +0 -1
  138. package/dist/standalone/chunk-IPBXA3JQ.js +0 -5
  139. package/dist/standalone/chunk-MXLAOCAN.js +0 -1
  140. package/dist/standalone/chunk-V3VJAA4D.js +0 -1
  141. package/dist/standalone/chunk-YKXDMIHQ.js +0 -1
  142. /package/dist/standalone/{chunk-AWHXPIXU.js → chunk-NGVP66OH.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as fe}from"./chunk-HPFN7S7N.js";import"./chunk-4JLGLPWV.js";import{a as ie}from"./chunk-MU3P2FI7.js";import{a as pe}from"./chunk-66UGPQVC.js";import"./chunk-3Q2P62UR.js";import{i as de}from"./chunk-6QA34EWC.js";import"./chunk-TDXV3OT5.js";import"./chunk-4L4WTGN5.js";import{a as b}from"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import{b as ne}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as he}from"./chunk-YLPFIPVU.js";import"./chunk-ULIQFBZU.js";import"./chunk-XC734N2Q.js";import"./chunk-35DM4JJG.js";import{a as B}from"./chunk-4ZEL6BYL.js";import{c as ue}from"./chunk-ZD2UXTLR.js";import{f as le}from"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import{a as ce}from"./chunk-FKVZRPV5.js";import{d as oe,f as Z,g as ee,h as te,p as ae,s as me,t as re}from"./chunk-PTZD7RUZ.js";import{a as i,d as Y,e as ge,f as ve,g as Ne,i as se}from"./chunk-YKXDMIHQ.js";var t=Y(Ne(),1);var be=Y(ve(),1);var N=Y(ge(),1);function ye({className:a,orientation:e="horizontal",...s}){return(0,t.jsx)(ie,{"data-slot":"separator",orientation:e,className:se("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...s})}i(ye,"ge");var we=/https?:\/\/[^\s"'<>)]+/i,xe=i(a=>a===void 0?void 0:we.exec(a)?.[0],"re"),y=i(a=>a===void 0?"":Array.isArray(a)?a.join(", "):a,"N"),Ce=/<a\s(?:[^>]*?\s)?href\s*=\s*["'](https?:\/\/[^"'\s]+)["']/iu,ke=/&(?:amp|#0*38|#x0*26);/giu,Se=i(a=>a===void 0?void 0:((a.html===void 0?void 0:Ce.exec(a.html)?.[1])??xe(a.text)??xe(a.html))?.replaceAll(ke,"&"),"ye"),Te=i((a,e)=>{let s=e.trim().toLowerCase();return s===""?a:a.filter(o=>`${o.subject} ${y(o.to)} ${y(o.cc)}`.toLowerCase().includes(s))},"Ce"),Le=i((a,e)=>{if(a.length!==0)return a.find(s=>s.id===e)??a[0]},"Se"),je=Z(B.clearCapturedMail),Me=Z(B.sendTestMail),_e=i(a=>{let e=(0,be.c)(38),{limit:s}=a,o=le(),p;e[0]!==s?(p={limit:s},e[0]=s,e[1]=p):p=e[1];let{data:q,error:w,errorSource:C,isLoading:g,refetch:n}=ue(B.getCapturedMail,p),[k,f]=(0,N.useState)(null),[P,S]=(0,N.useState)(null),[v,l]=(0,N.useState)("html"),[c,D]=(0,N.useState)(""),x=q?.entries??[],r=w??k,u=w===null?k:C,T;e[2]!==o||e[3]!==n?(T=i(async()=>{f(null);try{await o.query(je,{},ee("")),S(null),n()}catch(m){f(te(m))}},"T"),e[2]=o,e[3]=n,e[4]=T):T=e[4];let Q=T,L;e[5]!==o||e[6]!==n?(L=i(async()=>{f(null);try{await o.query(Me,{},ee("")),n()}catch(m){f(te(m))}},"k"),e[5]=o,e[6]=n,e[7]=L):L=e[7];let R=L,j;e[8]!==n?(j=i(()=>{n()},"A"),e[8]=n,e[9]=j):j=e[9],pe(j,!0);let M;e[10]!==Q?(M=i(()=>{ae(Q())},"E"),e[10]=Q,e[11]=M):M=e[11];let U=M,_;e[12]!==R?(_=i(()=>{ae(R())},"L"),e[12]=R,e[13]=_):_=e[13];let W=_,z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=i(m=>{D(m.currentTarget.value)},"_"),e[14]=z):z=e[14];let G=z,$;e[15]===Symbol.for("react.memo_cache_sentinel")?($=i(m=>{let{id:h}=m.currentTarget.dataset;h!==void 0&&S(h)},"M"),e[15]=$):$=e[15];let J=$,A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=i(m=>{let h=m.currentTarget.dataset.tab;(h==="headers"||h==="html"||h==="text")&&l(h)},"I"),e[16]=A):A=e[16];let K=A,O=Te(x,c),F=Le(O,P),d=Se(F),E;e[17]!==d?(E=i(()=>{d!==void 0&&me(d)},"z"),e[17]=d,e[18]=E):E=e[18];let V=E,H;e[19]!==d?(H=i(()=>{d!==void 0&&"window"in globalThis&&globalThis.window.open(d,"_blank","noopener")},"F"),e[19]=d,e[20]=H):H=e[20];let X=H,I;return e[21]!==x||e[22]!==r||e[23]!==u||e[24]!==c||e[25]!==g||e[26]!==d||e[27]!==U||e[28]!==V||e[29]!==G||e[30]!==X||e[31]!==J||e[32]!==K||e[33]!==W||e[34]!==F||e[35]!==v||e[36]!==O?(I={entries:x,error:r,errorSource:u,filter:c,isLoading:g,link:d,onClear:U,onCopyLink:V,onFilterChange:G,onOpenLink:X,onSelectMessage:J,onSelectTab:K,onSendTest:W,selected:F,tab:v,visible:O},e[21]=x,e[22]=r,e[23]=u,e[24]=c,e[25]=g,e[26]=d,e[27]=U,e[28]=V,e[29]=G,e[30]=X,e[31]=J,e[32]=K,e[33]=W,e[34]=F,e[35]=v,e[36]=O,e[37]=I):I=e[37],I},"Ae"),ze=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; font-src data:">`,$e=i(a=>`${ze}${a}`,"Le"),Ke=i(({limit:a=100})=>{let e=oe(),{entries:s,error:o,errorSource:p,filter:q,isLoading:w,link:C,onClear:g,onCopyLink:n,onFilterChange:k,onOpenLink:f,onSelectMessage:P,onSelectTab:S,onSendTest:v,selected:l,tab:c,visible:D}=_e({limit:a}),x=i(r=>e(r==="html"?"HTML":r==="text"?"Plain text":"Headers"),"x");return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"mail-panel",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(b,{"data-testid":"mail-send-test",onClick:v,size:"sm",type:"button",variant:"outline",children:e("Send test")}),(0,t.jsx)(b,{"data-testid":"mail-clear",disabled:s.length===0,onClick:g,size:"sm",type:"button",variant:"outline",children:e("Clear inbox")}),s.length>0&&(0,t.jsx)(ne,{className:"ml-auto","data-testid":"mail-count",variant:"secondary",children:e("{count} messages",{count:s.length})})]}),o!==null&&(0,t.jsx)(he,{error:p,testId:"mail-error"}),o===null&&!w&&s.length===0&&(0,t.jsx)(ce,{description:e("Email your app sends in dev is captured here \u2014 nothing is delivered."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M4 5h16v14H4z"}),(0,t.jsx)("path",{d:"m4 6 8 6 8-6"})]}),testId:"mail-empty",title:e("No captured email.")}),s.length>0&&(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-[minmax(0,22rem)_1fr]","data-testid":"mail-reader",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(de,{"aria-label":e("Search messages"),"data-testid":"mail-search",onChange:k,placeholder:e("Filter messages"),type:"search",value:q}),(0,t.jsx)(fe,{className:"max-h-[32rem] rounded-xl border border-border bg-card shadow-xs","data-testid":"mail-list",children:(0,t.jsx)("ul",{className:"divide-y",children:D.map(r=>{let u=r.id===l?.id;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{className:`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left text-sm hover:bg-muted/60 ${u?"bg-muted":""}`,"data-active":u,"data-id":r.id,"data-testid":"mail-list-item",onClick:P,type:"button",children:[(0,t.jsx)("span",{className:"w-full truncate font-medium",children:r.subject||e("(no subject)")}),(0,t.jsx)("span",{className:"w-full truncate text-xs text-muted-foreground",children:y(r.to)}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:re(r.capturedAt,"\u2014")})]})},r.id)})})})]}),l!==void 0&&(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-4 shadow-xs","data-testid":"mail-detail",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"truncate text-base font-semibold","data-testid":"mail-subject",children:l.subject||e("(no subject)")}),(0,t.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs text-muted-foreground",children:[(0,t.jsx)("dt",{children:e("From")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:l.from??"\u2014"}),(0,t.jsx)("dt",{children:e("To")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.to)}),l.cc!==void 0&&l.cc.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{children:e("Cc")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.cc)})]}),(0,t.jsx)("dt",{children:e("Sent")}),(0,t.jsx)("dd",{className:"tabular-nums",children:re(l.capturedAt,"\u2014")})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2","data-testid":"mail-actions",children:[(0,t.jsx)(b,{"data-testid":"mail-copy-link",disabled:C===void 0,onClick:n,size:"sm",type:"button",variant:"outline",children:e("Copy link")}),(0,t.jsx)(b,{"data-testid":"mail-open-link",disabled:C===void 0,onClick:f,size:"sm",type:"button",variant:"outline",children:e("Open in new tab")})]}),(0,t.jsx)(ye,{}),(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"mail-tabs",role:"tablist",children:["html","text","headers"].map(r=>(0,t.jsx)(b,{"aria-selected":c===r,"data-tab":r,"data-testid":`mail-tab-${r}`,onClick:S,role:"tab",size:"sm",type:"button",variant:c===r?"secondary":"ghost",children:x(r)},r))}),(0,t.jsxs)("div",{className:"min-h-[12rem]",children:[c==="html"&&(l.html===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No HTML body.")}):(0,t.jsx)("iframe",{className:"h-[24rem] w-full rounded-md border bg-white","data-testid":"mail-preview-html",sandbox:"",srcDoc:$e(l.html),title:e("Email preview")})),c==="text"&&(l.text===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No text body.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-text",children:l.text})),c==="headers"&&(l.headers===void 0||Object.keys(l.headers).length===0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No headers.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-headers",children:Object.entries(l.headers).map(([r,u])=>`${r}: ${u}`).join(`
1
+ import{a as fe}from"./chunk-ECY2JC5F.js";import"./chunk-NRP22GKC.js";import{a as ie}from"./chunk-Y3AYVFTK.js";import{a as pe}from"./chunk-JQXA2OYK.js";import"./chunk-UC7MNI2F.js";import{i as de}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as b}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as ne}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as he}from"./chunk-ZWXQKMYE.js";import"./chunk-NCPW7WHO.js";import"./chunk-4ZDBUYGM.js";import"./chunk-55UGUCQ6.js";import{a as B}from"./chunk-4ZEL6BYL.js";import{c as ue}from"./chunk-HECPC2VY.js";import{f as le}from"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import{a as ce}from"./chunk-RWVIV3U7.js";import{d as oe,f as Z,g as ee,h as te,p as ae,s as me,t as re}from"./chunk-HJHSQPHW.js";import{a as i,d as Y,e as ge,f as ve,g as Ne,i as se}from"./chunk-I26MS5PJ.js";var t=Y(Ne(),1);var be=Y(ve(),1);var N=Y(ge(),1);function ye({className:a,orientation:e="horizontal",...s}){return(0,t.jsx)(ie,{"data-slot":"separator",orientation:e,className:se("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...s})}i(ye,"ge");var we=/https?:\/\/[^\s"'<>)]+/i,xe=i(a=>a===void 0?void 0:we.exec(a)?.[0],"re"),y=i(a=>a===void 0?"":Array.isArray(a)?a.join(", "):a,"N"),Ce=/<a\s(?:[^>]*?\s)?href\s*=\s*["'](https?:\/\/[^"'\s]+)["']/iu,ke=/&(?:amp|#0*38|#x0*26);/giu,Se=i(a=>a===void 0?void 0:((a.html===void 0?void 0:Ce.exec(a.html)?.[1])??xe(a.text)??xe(a.html))?.replaceAll(ke,"&"),"ye"),Te=i((a,e)=>{let s=e.trim().toLowerCase();return s===""?a:a.filter(o=>`${o.subject} ${y(o.to)} ${y(o.cc)}`.toLowerCase().includes(s))},"Ce"),Le=i((a,e)=>{if(a.length!==0)return a.find(s=>s.id===e)??a[0]},"Se"),je=Z(B.clearCapturedMail),Me=Z(B.sendTestMail),_e=i(a=>{let e=(0,be.c)(38),{limit:s}=a,o=le(),p;e[0]!==s?(p={limit:s},e[0]=s,e[1]=p):p=e[1];let{data:q,error:w,errorSource:C,isLoading:g,refetch:n}=ue(B.getCapturedMail,p),[k,f]=(0,N.useState)(null),[P,S]=(0,N.useState)(null),[v,l]=(0,N.useState)("html"),[c,D]=(0,N.useState)(""),x=q?.entries??[],r=w??k,u=w===null?k:C,T;e[2]!==o||e[3]!==n?(T=i(async()=>{f(null);try{await o.query(je,{},ee("")),S(null),n()}catch(m){f(te(m))}},"T"),e[2]=o,e[3]=n,e[4]=T):T=e[4];let Q=T,L;e[5]!==o||e[6]!==n?(L=i(async()=>{f(null);try{await o.query(Me,{},ee("")),n()}catch(m){f(te(m))}},"k"),e[5]=o,e[6]=n,e[7]=L):L=e[7];let R=L,j;e[8]!==n?(j=i(()=>{n()},"A"),e[8]=n,e[9]=j):j=e[9],pe(j,!0);let M;e[10]!==Q?(M=i(()=>{ae(Q())},"E"),e[10]=Q,e[11]=M):M=e[11];let U=M,_;e[12]!==R?(_=i(()=>{ae(R())},"L"),e[12]=R,e[13]=_):_=e[13];let W=_,z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=i(m=>{D(m.currentTarget.value)},"_"),e[14]=z):z=e[14];let G=z,$;e[15]===Symbol.for("react.memo_cache_sentinel")?($=i(m=>{let{id:h}=m.currentTarget.dataset;h!==void 0&&S(h)},"M"),e[15]=$):$=e[15];let J=$,A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=i(m=>{let h=m.currentTarget.dataset.tab;(h==="headers"||h==="html"||h==="text")&&l(h)},"I"),e[16]=A):A=e[16];let K=A,O=Te(x,c),F=Le(O,P),d=Se(F),E;e[17]!==d?(E=i(()=>{d!==void 0&&me(d)},"z"),e[17]=d,e[18]=E):E=e[18];let V=E,H;e[19]!==d?(H=i(()=>{d!==void 0&&"window"in globalThis&&globalThis.window.open(d,"_blank","noopener")},"F"),e[19]=d,e[20]=H):H=e[20];let X=H,I;return e[21]!==x||e[22]!==r||e[23]!==u||e[24]!==c||e[25]!==g||e[26]!==d||e[27]!==U||e[28]!==V||e[29]!==G||e[30]!==X||e[31]!==J||e[32]!==K||e[33]!==W||e[34]!==F||e[35]!==v||e[36]!==O?(I={entries:x,error:r,errorSource:u,filter:c,isLoading:g,link:d,onClear:U,onCopyLink:V,onFilterChange:G,onOpenLink:X,onSelectMessage:J,onSelectTab:K,onSendTest:W,selected:F,tab:v,visible:O},e[21]=x,e[22]=r,e[23]=u,e[24]=c,e[25]=g,e[26]=d,e[27]=U,e[28]=V,e[29]=G,e[30]=X,e[31]=J,e[32]=K,e[33]=W,e[34]=F,e[35]=v,e[36]=O,e[37]=I):I=e[37],I},"Ae"),ze=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; font-src data:">`,$e=i(a=>`${ze}${a}`,"Le"),Ke=i(({limit:a=100})=>{let e=oe(),{entries:s,error:o,errorSource:p,filter:q,isLoading:w,link:C,onClear:g,onCopyLink:n,onFilterChange:k,onOpenLink:f,onSelectMessage:P,onSelectTab:S,onSendTest:v,selected:l,tab:c,visible:D}=_e({limit:a}),x=i(r=>e(r==="html"?"HTML":r==="text"?"Plain text":"Headers"),"x");return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"mail-panel",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(b,{"data-testid":"mail-send-test",onClick:v,size:"sm",type:"button",variant:"outline",children:e("Send test")}),(0,t.jsx)(b,{"data-testid":"mail-clear",disabled:s.length===0,onClick:g,size:"sm",type:"button",variant:"outline",children:e("Clear inbox")}),s.length>0&&(0,t.jsx)(ne,{className:"ml-auto","data-testid":"mail-count",variant:"secondary",children:e("{count} messages",{count:s.length})})]}),o!==null&&(0,t.jsx)(he,{error:p,testId:"mail-error"}),o===null&&!w&&s.length===0&&(0,t.jsx)(ce,{description:e("Email your app sends in dev is captured here \u2014 nothing is delivered."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M4 5h16v14H4z"}),(0,t.jsx)("path",{d:"m4 6 8 6 8-6"})]}),testId:"mail-empty",title:e("No captured email.")}),s.length>0&&(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-[minmax(0,22rem)_1fr]","data-testid":"mail-reader",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(de,{"aria-label":e("Search messages"),"data-testid":"mail-search",onChange:k,placeholder:e("Filter messages"),type:"search",value:q}),(0,t.jsx)(fe,{className:"max-h-[32rem] rounded-xl border border-border bg-card shadow-xs","data-testid":"mail-list",children:(0,t.jsx)("ul",{className:"divide-y",children:D.map(r=>{let u=r.id===l?.id;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{className:`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left text-sm hover:bg-muted/60 ${u?"bg-muted":""}`,"data-active":u,"data-id":r.id,"data-testid":"mail-list-item",onClick:P,type:"button",children:[(0,t.jsx)("span",{className:"w-full truncate font-medium",children:r.subject||e("(no subject)")}),(0,t.jsx)("span",{className:"w-full truncate text-xs text-muted-foreground",children:y(r.to)}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:re(r.capturedAt,"\u2014")})]})},r.id)})})})]}),l!==void 0&&(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-4 shadow-xs","data-testid":"mail-detail",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"truncate text-base font-semibold","data-testid":"mail-subject",children:l.subject||e("(no subject)")}),(0,t.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs text-muted-foreground",children:[(0,t.jsx)("dt",{children:e("From")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:l.from??"\u2014"}),(0,t.jsx)("dt",{children:e("To")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.to)}),l.cc!==void 0&&l.cc.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{children:e("Cc")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.cc)})]}),(0,t.jsx)("dt",{children:e("Sent")}),(0,t.jsx)("dd",{className:"tabular-nums",children:re(l.capturedAt,"\u2014")})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2","data-testid":"mail-actions",children:[(0,t.jsx)(b,{"data-testid":"mail-copy-link",disabled:C===void 0,onClick:n,size:"sm",type:"button",variant:"outline",children:e("Copy link")}),(0,t.jsx)(b,{"data-testid":"mail-open-link",disabled:C===void 0,onClick:f,size:"sm",type:"button",variant:"outline",children:e("Open in new tab")})]}),(0,t.jsx)(ye,{}),(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"mail-tabs",role:"tablist",children:["html","text","headers"].map(r=>(0,t.jsx)(b,{"aria-selected":c===r,"data-tab":r,"data-testid":`mail-tab-${r}`,onClick:S,role:"tab",size:"sm",type:"button",variant:c===r?"secondary":"ghost",children:x(r)},r))}),(0,t.jsxs)("div",{className:"min-h-[12rem]",children:[c==="html"&&(l.html===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No HTML body.")}):(0,t.jsx)("iframe",{className:"h-[24rem] w-full rounded-md border bg-white","data-testid":"mail-preview-html",sandbox:"",srcDoc:$e(l.html),title:e("Email preview")})),c==="text"&&(l.text===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No text body.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-text",children:l.text})),c==="headers"&&(l.headers===void 0||Object.keys(l.headers).length===0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No headers.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-headers",children:Object.entries(l.headers).map(([r,u])=>`${r}: ${u}`).join(`
2
2
  `)}))]})]})]})]})},"Qe");export{Ke as MailPanel};
@@ -1 +1 @@
1
- import{j as o}from"./chunk-225VJ77I.js";import{a as r,d as i,e as p}from"./chunk-YKXDMIHQ.js";var a=i(p(),1);var R=a.forwardRef(r(function(e,n){let{className:l,render:m,orientation:t="horizontal",style:f,...s}=e;return o("div",e,{state:{orientation:t},ref:n,props:[{role:"separator","aria-orientation":t},s]})},"SeparatorComponent"));export{R as a};
1
+ import{j as o}from"./chunk-BOMPSVRC.js";import{a as r,d as i,e as p}from"./chunk-I26MS5PJ.js";var a=i(p(),1);var R=a.forwardRef(r(function(e,n){let{className:l,render:m,orientation:t="horizontal",style:f,...s}=e;return o("div",e,{state:{orientation:t},ref:n,props:[{role:"separator","aria-orientation":t},s]})},"SeparatorComponent"));export{R as a};
@@ -1 +1 @@
1
- import{b as k,c as V}from"./chunk-YOB2X3FZ.js";import{a as Q}from"./chunk-EA2JKR5D.js";import{a as x}from"./chunk-IMOHEGMV.js";import{a as H}from"./chunk-LIOUCOP2.js";import{b as G}from"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{i as _}from"./chunk-6QA34EWC.js";import"./chunk-TDXV3OT5.js";import"./chunk-4L4WTGN5.js";import{a as h}from"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import{b as w}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as U}from"./chunk-4ZEL6BYL.js";import{f as D}from"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import{d as K,e as z,f as B,h as P,m as q,p as E,t as M}from"./chunk-PTZD7RUZ.js";import{a as s,d as J,e as le,g as ce}from"./chunk-YKXDMIHQ.js";var i=J(le(),1);var e=J(ce(),1);var ue=s(r=>r.kind==="id"?r.table===void 0?"id":`id<${r.table}>`:r.kind==="array"?r.element===void 0?"array":`${r.element}[]`:r.kind,"le"),me=s(r=>r===void 0||r.length===0?"()":`(${r.map(o=>`${o.name}${o.optional?"?":""}: ${ue(o)}`).join(", ")})`,"ce"),fe=s(r=>{switch(r){case"array":return[];case"bigint":return k(0n);case"boolean":return!1;case"bytes":return k(new ArrayBuffer(0));case"number":return 0;case"object":case"record":return{};default:return""}},"ue"),pe=s(r=>{let o={};for(let a of r??[])a.optional||(o[a.name]=fe(a.kind));return JSON.stringify(o,void 0,2)},"me"),he=B(U.runAs),xe=10,ge=s(r=>r===void 0?"undefined":JSON.stringify(r,q,2),"pe"),Re=s(({functions:r,runAsIdentity:o=!1}={})=>{let a=K(),u=D(),[W,X]=(0,i.useState)(null),[I,Y]=(0,i.useState)(null),g=r??W??[],[S,F]=(0,i.useState)(""),[m,b]=(0,i.useState)("{}"),[c,$]=(0,i.useState)(""),[f,Z]=(0,i.useState)(""),[v,p]=(0,i.useState)("idle"),[ee,y]=(0,i.useState)(void 0),[C,N]=(0,i.useState)(null),[A,te]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(r!==void 0)return;let t=!1;return u.listFunctions().then(d=>(t||X(d),d)).catch(d=>{t||Y(P(d))}),()=>{t=!0}},[u,r]);let R=S===""?g[0]?.path??"":S,n=g.find(t=>t.path===R),re=s(async()=>{if(!n)return;let t;try{t=m.trim()===""?{}:V(JSON.parse(m))}catch(l){p("error"),y(void 0),N(a("Invalid JSON args: {message}",{message:l.message}));return}let d={__lunoraRef:n.path},L=c.trim()===""?{}:{shardKey:c.trim()},O=o?f.trim():"",T=s(l=>{te(j=>[{argsText:m,at:Date.now(),id:(j[0]?.id??0)+1,kind:n.kind,path:n.path,shardKey:c,status:l},...j].slice(0,xe))},"$");p("running"),N(null);try{let l=O===""?await z(u,n.kind,d,t,L):await u.query(he,{args:t,functionPath:n.path,userId:O},L);G(c),y(l),p("success"),T("success")}catch(l){y(void 0),N(l.message),p("error"),T("error")}},"M"),ae=s(t=>{F(t.path),b(t.argsText),$(t.shardKey)},"P"),se=s(t=>{F(t.target.value)},"z"),ne=s(t=>{b(t.target.value)},"W"),ie=s(t=>{Z(t.target.value)},"q"),oe=s(()=>{E(re())},"H"),de=s(()=>{b(pe(n?.args))},"V");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[I!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:I}),(0,e.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsx)(x,{htmlFor:"function-select",children:a("Function")}),(0,e.jsx)("select",{"aria-label":a("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:se,value:R,children:g.map(t=>(0,e.jsxs)("option",{value:t.path,children:[t.path," (",t.kind,")"]},t.path))}),n!==void 0&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"mr-1.5 font-medium",children:a("Signature")}),(0,e.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:me(n.args)})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)(x,{htmlFor:"args-input",children:a("Arguments")}),(0,e.jsx)(h,{"data-testid":"prefill-button",disabled:n===void 0,onClick:de,size:"xs",type:"button",variant:"ghost",children:a("Prefill")})]}),(0,e.jsx)(Q,{"aria-label":a("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ne,value:m})]}),(0,e.jsx)(H,{onChange:$,testId:"shard-input",value:c}),o&&(0,e.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,e.jsx)(x,{htmlFor:"run-as-input",children:a("Run as identity (userId)")}),(0,e.jsx)(_,{"aria-label":a("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:ie,placeholder:a("Leave empty to run as admin"),value:f}),(0,e.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(h,{"data-testid":"run-button",disabled:v==="running"||n===void 0,onClick:oe,type:"button",children:a("Run")}),n!==void 0&&(0,e.jsx)(w,{variant:"outline",children:n.kind}),o&&f.trim()!==""&&(0,e.jsx)(w,{"data-testid":"run-as-badge",variant:"secondary",children:a("as {userId}",{userId:f.trim()})})]})]}),v==="error"&&C!==null&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:C}),v==="success"&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:ge(ee)}),A.length>0&&(0,e.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:A.map((t,d)=>(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,e.jsx)("span",{className:t.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${d.toString()}`,children:t.status==="success"?"\u2713":"\u2717"})," ",(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t.path," (",t.kind,")"]})," ",(0,e.jsx)("time",{className:"text-xs text-muted-foreground",children:M(t.at)})," ",(0,e.jsx)(h,{className:"ml-auto","data-testid":`fn-history-load-${d.toString()}`,onClick:s(()=>{ae(t)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Load")})]},t.id))})]})},"$e");export{Re as FunctionRunner};
1
+ import{b as k,c as V}from"./chunk-K2MZTOIJ.js";import{a as Q}from"./chunk-FPI7AMQJ.js";import{a as x}from"./chunk-37WYCOQ2.js";import{a as H}from"./chunk-YVR4SEPU.js";import{b as G}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import{i as _}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as h}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as w}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as U}from"./chunk-4ZEL6BYL.js";import{f as D}from"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import{d as K,e as z,f as B,h as P,m as q,p as E,t as M}from"./chunk-HJHSQPHW.js";import{a as s,d as J,e as le,g as ce}from"./chunk-I26MS5PJ.js";var i=J(le(),1);var e=J(ce(),1);var ue=s(r=>r.kind==="id"?r.table===void 0?"id":`id<${r.table}>`:r.kind==="array"?r.element===void 0?"array":`${r.element}[]`:r.kind,"le"),me=s(r=>r===void 0||r.length===0?"()":`(${r.map(o=>`${o.name}${o.optional?"?":""}: ${ue(o)}`).join(", ")})`,"ce"),fe=s(r=>{switch(r){case"array":return[];case"bigint":return k(0n);case"boolean":return!1;case"bytes":return k(new ArrayBuffer(0));case"number":return 0;case"object":case"record":return{};default:return""}},"ue"),pe=s(r=>{let o={};for(let a of r??[])a.optional||(o[a.name]=fe(a.kind));return JSON.stringify(o,void 0,2)},"me"),he=B(U.runAs),xe=10,ge=s(r=>r===void 0?"undefined":JSON.stringify(r,q,2),"pe"),Re=s(({functions:r,runAsIdentity:o=!1}={})=>{let a=K(),u=D(),[W,X]=(0,i.useState)(null),[I,Y]=(0,i.useState)(null),g=r??W??[],[S,F]=(0,i.useState)(""),[m,b]=(0,i.useState)("{}"),[c,$]=(0,i.useState)(""),[f,Z]=(0,i.useState)(""),[v,p]=(0,i.useState)("idle"),[ee,y]=(0,i.useState)(void 0),[C,N]=(0,i.useState)(null),[A,te]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(r!==void 0)return;let t=!1;return u.listFunctions().then(d=>(t||X(d),d)).catch(d=>{t||Y(P(d))}),()=>{t=!0}},[u,r]);let R=S===""?g[0]?.path??"":S,n=g.find(t=>t.path===R),re=s(async()=>{if(!n)return;let t;try{t=m.trim()===""?{}:V(JSON.parse(m))}catch(l){p("error"),y(void 0),N(a("Invalid JSON args: {message}",{message:l.message}));return}let d={__lunoraRef:n.path},L=c.trim()===""?{}:{shardKey:c.trim()},O=o?f.trim():"",T=s(l=>{te(j=>[{argsText:m,at:Date.now(),id:(j[0]?.id??0)+1,kind:n.kind,path:n.path,shardKey:c,status:l},...j].slice(0,xe))},"$");p("running"),N(null);try{let l=O===""?await z(u,n.kind,d,t,L):await u.query(he,{args:t,functionPath:n.path,userId:O},L);G(c),y(l),p("success"),T("success")}catch(l){y(void 0),N(l.message),p("error"),T("error")}},"M"),ae=s(t=>{F(t.path),b(t.argsText),$(t.shardKey)},"P"),se=s(t=>{F(t.target.value)},"z"),ne=s(t=>{b(t.target.value)},"W"),ie=s(t=>{Z(t.target.value)},"q"),oe=s(()=>{E(re())},"H"),de=s(()=>{b(pe(n?.args))},"V");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-function-runner",children:[I!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"function-discover-error",role:"alert",children:I}),(0,e.jsxs)("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-4",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsx)(x,{htmlFor:"function-select",children:a("Function")}),(0,e.jsx)("select",{"aria-label":a("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"function-select",id:"function-select",onChange:se,value:R,children:g.map(t=>(0,e.jsxs)("option",{value:t.path,children:[t.path," (",t.kind,")"]},t.path))}),n!==void 0&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,e.jsx)("span",{className:"mr-1.5 font-medium",children:a("Signature")}),(0,e.jsx)("code",{className:"font-mono","data-testid":"function-signature",children:me(n.args)})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)(x,{htmlFor:"args-input",children:a("Arguments")}),(0,e.jsx)(h,{"data-testid":"prefill-button",disabled:n===void 0,onClick:de,size:"xs",type:"button",variant:"ghost",children:a("Prefill")})]}),(0,e.jsx)(Q,{"aria-label":a("Arguments"),className:"font-mono text-xs","data-testid":"args-input",id:"args-input",onChange:ne,value:m})]}),(0,e.jsx)(H,{onChange:$,testId:"shard-input",value:c}),o&&(0,e.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"run-as-field",children:[(0,e.jsx)(x,{htmlFor:"run-as-input",children:a("Run as identity (userId)")}),(0,e.jsx)(_,{"aria-label":a("Run as identity (userId)"),className:"font-mono text-xs","data-testid":"run-as-input",id:"run-as-input",onChange:ie,placeholder:a("Leave empty to run as admin"),value:f}),(0,e.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a("Dev only: runs the function as this user so you can test auth and RLS. Forged over the admin gate.")})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(h,{"data-testid":"run-button",disabled:v==="running"||n===void 0,onClick:oe,type:"button",children:a("Run")}),n!==void 0&&(0,e.jsx)(w,{variant:"outline",children:n.kind}),o&&f.trim()!==""&&(0,e.jsx)(w,{"data-testid":"run-as-badge",variant:"secondary",children:a("as {userId}",{userId:f.trim()})})]})]}),v==="error"&&C!==null&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"error",role:"alert",children:C}),v==="success"&&(0,e.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"result",children:ge(ee)}),A.length>0&&(0,e.jsx)("ul",{className:"flex flex-col overflow-hidden rounded-xl border border-border","data-testid":"fn-history",children:A.map((t,d)=>(0,e.jsxs)("li",{className:"flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-sm last:border-b-0","data-testid":"fn-history-row",children:[(0,e.jsx)("span",{className:t.status==="success"?"text-success":"text-destructive","data-testid":`fn-history-status-${d.toString()}`,children:t.status==="success"?"\u2713":"\u2717"})," ",(0,e.jsxs)("span",{className:"font-mono text-xs",children:[t.path," (",t.kind,")"]})," ",(0,e.jsx)("time",{className:"text-xs text-muted-foreground",children:M(t.at)})," ",(0,e.jsx)(h,{className:"ml-auto","data-testid":`fn-history-load-${d.toString()}`,onClick:s(()=>{ae(t)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Load")})]},t.id))})]})},"$e");export{Re as FunctionRunner};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-OGUKYRFM.js";import{i as j}from"./chunk-6QA34EWC.js";import{d as b}from"./chunk-PTZD7RUZ.js";import{a as m,d as S,e as w,f as $,g as A}from"./chunk-YKXDMIHQ.js";var y=S($(),1),h=S(w(),1);var a=S(A(),1);var z=m(i=>{let t=(0,y.c)(21),{id:f,onChange:g,testId:e,value:v}=i,s=b(),u=(0,h.useId)(),[d]=(0,h.useState)(F),c;t[0]!==g?(c=m(C=>{g(C.target.value)},"d"),t[0]=g,t[1]=c):c=t[1];let I=c,o;t[2]!==s?(o=s("Shard key"),t[2]=s,t[3]=o):o=t[3];let x=d.length>0?u:void 0,r;t[4]!==s?(r=s("shard key (optional)"),t[4]=s,t[5]=r):r=t[5];let l;t[6]!==f||t[7]!==I||t[8]!==o||t[9]!==x||t[10]!==r||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(j,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:f,list:x,onChange:I,placeholder:r,value:v}),t[6]=f,t[7]=I,t[8]=o,t[9]=x,t[10]=r,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function F(){return k()}m(F,"$");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{z as a};
1
+ import{a as k}from"./chunk-ZKJS6EBE.js";import{i as j}from"./chunk-E4PXACVL.js";import{d as b}from"./chunk-HJHSQPHW.js";import{a as m,d as S,e as w,f as $,g as A}from"./chunk-I26MS5PJ.js";var y=S($(),1),h=S(w(),1);var a=S(A(),1);var z=m(i=>{let t=(0,y.c)(21),{id:f,onChange:g,testId:e,value:v}=i,s=b(),u=(0,h.useId)(),[d]=(0,h.useState)(F),c;t[0]!==g?(c=m(C=>{g(C.target.value)},"d"),t[0]=g,t[1]=c):c=t[1];let I=c,o;t[2]!==s?(o=s("Shard key"),t[2]=s,t[3]=o):o=t[3];let x=d.length>0?u:void 0,r;t[4]!==s?(r=s("shard key (optional)"),t[4]=s,t[5]=r):r=t[5];let l;t[6]!==f||t[7]!==I||t[8]!==o||t[9]!==x||t[10]!==r||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(j,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:f,list:x,onChange:I,placeholder:r,value:v}),t[6]=f,t[7]=I,t[8]=o,t[9]=x,t[10]=r,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function F(){return k()}m(F,"$");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{z as a};
@@ -1 +1 @@
1
- import{d as P}from"./chunk-PTZD7RUZ.js";import{a as x,d as k,f as w,g as z}from"./chunk-YKXDMIHQ.js";var $=k(w(),1);var n=k(z(),1);var S=[25,50,100,250],j=x(b=>{let e=(0,$.c)(18),{onChange:p,options:m,prefix:o,value:f}=b,t=P(),u;e[0]!==p?(u=x(v=>{p(Number.parseInt(v.target.value,10))},"c"),e[0]=p,e[1]=u):u=e[1];let a=u,g=`${o}-page-size`,i;e[2]!==t?(i=t("Rows per page"),e[2]=t,e[3]=i):i=e[3];let s;e[4]!==i?(s=(0,n.jsx)("span",{children:i}),e[4]=i,e[5]=s):s=e[5];let c=`${o}-page-size`,l=`${o}-page-size`,r;e[6]!==m?(r=m.map(T),e[6]=m,e[7]=r):r=e[7];let d;e[8]!==a||e[9]!==c||e[10]!==l||e[11]!==r||e[12]!==f?(d=(0,n.jsx)("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":c,id:l,onChange:a,value:f,children:r}),e[8]=a,e[9]=c,e[10]=l,e[11]=r,e[12]=f,e[13]=d):d=e[13];let h;return e[14]!==g||e[15]!==s||e[16]!==d?(h=(0,n.jsxs)("label",{className:"flex items-center gap-1.5",htmlFor:g,children:[s,d]}),e[14]=g,e[15]=s,e[16]=d,e[17]=h):h=e[17],h},"C"),E=x(b=>{let e=(0,$.c)(25),{onJump:p,page:m,pages:o,prefix:f}=b,t=P(),u;e[0]!==p||e[1]!==o?(u=x(y=>{let C=Number.parseInt(y,10);Number.isNaN(C)||p(Math.min(Math.max(1,C),Math.max(1,o)))},"c"),e[0]=p,e[1]=o,e[2]=u):u=e[2];let a=u,g;e[3]!==a?(g=x(y=>{y.key==="Enter"&&a(y.currentTarget.value)},"b"),e[3]=a,e[4]=g):g=e[4];let i=g,s;e[5]!==a?(s=x(y=>{a(y.currentTarget.value)},"o"),e[5]=a,e[6]=s):s=e[6];let c=s,l;e[7]!==t?(l=t("Page"),e[7]=t,e[8]=l):l=e[8];let r;e[9]!==t?(r=t("Page"),e[9]=t,e[10]=r):r=e[10];let d=`${f}-page-jump`,h=Math.max(1,o),v;e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==r||e[15]!==d||e[16]!==h?(v=(0,n.jsx)("input",{"aria-label":r,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":d,defaultValue:m,max:h,min:1,onBlur:c,onKeyDown:i,type:"number"},m),e[11]=c,e[12]=i,e[13]=m,e[14]=r,e[15]=d,e[16]=h,e[17]=v):v=e[17];let N;e[18]!==o||e[19]!==t?(N=t("of {pages}",{pages:o}),e[18]=o,e[19]=t,e[20]=N):N=e[20];let M;return e[21]!==l||e[22]!==v||e[23]!==N?(M=(0,n.jsxs)("span",{className:"flex items-center gap-1.5 tabular-nums",children:[l,v,N]}),e[21]=l,e[22]=v,e[23]=N,e[24]=M):M=e[24],M},"j"),I=x(({hasNext:b,hasPrevious:e,onJumpToPage:p,onNext:m,onPageSizeChange:o,onPrevious:f,pageSize:t,pageSizeOptions:u=S,prefix:a,rangeEnd:g,rangeStart:i,total:s})=>{let c=P(),l="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",r=t!==void 0&&t>0?Math.max(1,Math.ceil(s/t)):1,d=t!==void 0&&t>0?Math.floor(Math.max(0,i-1)/t)+1:1;return(0,n.jsxs)("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[t!==void 0&&o!==void 0&&(0,n.jsx)(j,{onChange:o,options:u,prefix:a,value:t}),(0,n.jsx)("span",{className:"tabular-nums","data-testid":`${a}-page-info`,children:c("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:g,rangeStart:i,total:s})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{className:l,"data-testid":`${a}-prev`,disabled:!e,onClick:f,type:"button",children:c("Previous")}),t!==void 0&&p!==void 0&&(0,n.jsx)(E,{onJump:p,page:d,pages:r,prefix:a}),(0,n.jsx)("button",{className:l,"data-testid":`${a}-next`,disabled:!b,onClick:m,type:"button",children:c("Next")})]})]})},"_");function T(b){return(0,n.jsx)("option",{value:b,children:b},b)}x(T,"E");export{I as a};
1
+ import{d as P}from"./chunk-HJHSQPHW.js";import{a as x,d as k,f as w,g as z}from"./chunk-I26MS5PJ.js";var $=k(w(),1);var n=k(z(),1);var S=[25,50,100,250],j=x(b=>{let e=(0,$.c)(18),{onChange:p,options:m,prefix:o,value:f}=b,t=P(),u;e[0]!==p?(u=x(v=>{p(Number.parseInt(v.target.value,10))},"c"),e[0]=p,e[1]=u):u=e[1];let a=u,g=`${o}-page-size`,i;e[2]!==t?(i=t("Rows per page"),e[2]=t,e[3]=i):i=e[3];let s;e[4]!==i?(s=(0,n.jsx)("span",{children:i}),e[4]=i,e[5]=s):s=e[5];let c=`${o}-page-size`,l=`${o}-page-size`,r;e[6]!==m?(r=m.map(T),e[6]=m,e[7]=r):r=e[7];let d;e[8]!==a||e[9]!==c||e[10]!==l||e[11]!==r||e[12]!==f?(d=(0,n.jsx)("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":c,id:l,onChange:a,value:f,children:r}),e[8]=a,e[9]=c,e[10]=l,e[11]=r,e[12]=f,e[13]=d):d=e[13];let h;return e[14]!==g||e[15]!==s||e[16]!==d?(h=(0,n.jsxs)("label",{className:"flex items-center gap-1.5",htmlFor:g,children:[s,d]}),e[14]=g,e[15]=s,e[16]=d,e[17]=h):h=e[17],h},"C"),E=x(b=>{let e=(0,$.c)(25),{onJump:p,page:m,pages:o,prefix:f}=b,t=P(),u;e[0]!==p||e[1]!==o?(u=x(y=>{let C=Number.parseInt(y,10);Number.isNaN(C)||p(Math.min(Math.max(1,C),Math.max(1,o)))},"c"),e[0]=p,e[1]=o,e[2]=u):u=e[2];let a=u,g;e[3]!==a?(g=x(y=>{y.key==="Enter"&&a(y.currentTarget.value)},"b"),e[3]=a,e[4]=g):g=e[4];let i=g,s;e[5]!==a?(s=x(y=>{a(y.currentTarget.value)},"o"),e[5]=a,e[6]=s):s=e[6];let c=s,l;e[7]!==t?(l=t("Page"),e[7]=t,e[8]=l):l=e[8];let r;e[9]!==t?(r=t("Page"),e[9]=t,e[10]=r):r=e[10];let d=`${f}-page-jump`,h=Math.max(1,o),v;e[11]!==c||e[12]!==i||e[13]!==m||e[14]!==r||e[15]!==d||e[16]!==h?(v=(0,n.jsx)("input",{"aria-label":r,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":d,defaultValue:m,max:h,min:1,onBlur:c,onKeyDown:i,type:"number"},m),e[11]=c,e[12]=i,e[13]=m,e[14]=r,e[15]=d,e[16]=h,e[17]=v):v=e[17];let N;e[18]!==o||e[19]!==t?(N=t("of {pages}",{pages:o}),e[18]=o,e[19]=t,e[20]=N):N=e[20];let M;return e[21]!==l||e[22]!==v||e[23]!==N?(M=(0,n.jsxs)("span",{className:"flex items-center gap-1.5 tabular-nums",children:[l,v,N]}),e[21]=l,e[22]=v,e[23]=N,e[24]=M):M=e[24],M},"j"),I=x(({hasNext:b,hasPrevious:e,onJumpToPage:p,onNext:m,onPageSizeChange:o,onPrevious:f,pageSize:t,pageSizeOptions:u=S,prefix:a,rangeEnd:g,rangeStart:i,total:s})=>{let c=P(),l="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",r=t!==void 0&&t>0?Math.max(1,Math.ceil(s/t)):1,d=t!==void 0&&t>0?Math.floor(Math.max(0,i-1)/t)+1:1;return(0,n.jsxs)("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[t!==void 0&&o!==void 0&&(0,n.jsx)(j,{onChange:o,options:u,prefix:a,value:t}),(0,n.jsx)("span",{className:"tabular-nums","data-testid":`${a}-page-info`,children:c("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:g,rangeStart:i,total:s})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("button",{className:l,"data-testid":`${a}-prev`,disabled:!e,onClick:f,type:"button",children:c("Previous")}),t!==void 0&&p!==void 0&&(0,n.jsx)(E,{onJump:p,page:d,pages:r,prefix:a}),(0,n.jsx)("button",{className:l,"data-testid":`${a}-next`,disabled:!b,onClick:m,type:"button",children:c("Next")})]})]})},"_");function T(b){return(0,n.jsx)("option",{value:b,children:b},b)}x(T,"E");export{I as a};
@@ -1 +1 @@
1
- import{b as g}from"./chunk-VUPEFCIO.js";import"./chunk-YLPFIPVU.js";import"./chunk-ULIQFBZU.js";import"./chunk-XC734N2Q.js";import"./chunk-35DM4JJG.js";import{a as f}from"./chunk-4ZEL6BYL.js";import{c as m}from"./chunk-ZD2UXTLR.js";import"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import"./chunk-HEAQVSNS.js";import"./chunk-N6NMLJ6R.js";import{d as p}from"./chunk-PTZD7RUZ.js";import{a as r,d as h,f as S,g as A}from"./chunk-YKXDMIHQ.js";var R=h(S(),1);var k=h(A(),1);var _=r((e,s)=>({"admin-token-weak":e("Weak admin token"),"auth-secret-weak":e("Weak auth secret"),"cookies-insecure":e("Session cookies are not Secure"),"cors-wildcard-credentials":e("Wildcard CORS with credentials"),"csrf-disabled":e("CSRF/origin guard is off"),"dev-args-unredacted":e("Request log keeps un-redacted args"),"security-headers-disabled":e("Security headers are off"),"ws-gate-open":e("User subscriptions are ungated")})[s.kind],"k"),w=r(e=>Array.isArray(e.findings)?e.findings:[],"g"),b=r(e=>({"admin-token-weak":"LUNORA_ADMIN_TOKEN","auth-secret-weak":"AUTH_SECRET","cookies-insecure":"BETTER_AUTH_URL","cors-wildcard-credentials":"LUNORA_ALLOWED_ORIGINS","csrf-disabled":"LUNORA_SECURITY_CSRF","dev-args-unredacted":"request log","security-headers-disabled":"LUNORA_SECURITY_HEADERS","ws-gate-open":"LUNORA_WS_BEARER"})[e.kind],"S"),E=r((e,s)=>({"admin-token-weak":e("Your admin token is {length} characters \u2014 use at least {min} for a brute-force-resistant secret.",{length:s.detail?.length,min:s.detail?.min}),"auth-secret-weak":e("Your auth secret is {length} characters \u2014 use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.",{length:s.detail?.length,min:s.detail?.min}),"cookies-insecure":e("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),"cors-wildcard-credentials":e("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed \u2014 browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),"csrf-disabled":e("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),"dev-args-unredacted":e("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),"security-headers-disabled":e("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),"ws-gate-open":e("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: anyone who can reach the worker can open a socket and run ordinary user subscriptions. Admin subscriptions are unaffected \u2014 they need the admin token. Set it if subscribers should present a shared credential.")})[s.kind],"A"),O=r(()=>{let e=(0,R.c)(8),s=p(),i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];let{data:a,error:d,errorSource:c}=m(f.getSecurityAudit,i),n;if(e[1]!==a||e[2]!==s){let u=a===void 0?null:w(a);n=u===null?null:u.map(t=>({description:E(s,t),entity:b(t),issueType:_(s,t),key:t.kind,level:t.level})),e[1]=a,e[2]=s,e[3]=n}else n=e[3];let l=n,o;return e[4]!==d||e[5]!==c||e[6]!==l?(o=(0,k.jsx)(g,{error:d,errorSource:c,rows:l,testId:"lunora-security-advisor"}),e[4]=d,e[5]=c,e[6]=l,e[7]=o):o=e[7],o},"T");export{O as default};
1
+ import{b as g}from"./chunk-WLCZLWDF.js";import"./chunk-ZWXQKMYE.js";import"./chunk-NCPW7WHO.js";import"./chunk-4ZDBUYGM.js";import"./chunk-55UGUCQ6.js";import{a as f}from"./chunk-4ZEL6BYL.js";import{c as m}from"./chunk-HECPC2VY.js";import"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import"./chunk-HCTJKP5J.js";import"./chunk-2IKDEUCX.js";import{d as p}from"./chunk-HJHSQPHW.js";import{a as r,d as h,f as S,g as A}from"./chunk-I26MS5PJ.js";var R=h(S(),1);var k=h(A(),1);var _=r((e,s)=>({"admin-token-weak":e("Weak admin token"),"auth-secret-weak":e("Weak auth secret"),"cookies-insecure":e("Session cookies are not Secure"),"cors-wildcard-credentials":e("Wildcard CORS with credentials"),"csrf-disabled":e("CSRF/origin guard is off"),"dev-args-unredacted":e("Request log keeps un-redacted args"),"security-headers-disabled":e("Security headers are off"),"ws-gate-open":e("User subscriptions are ungated")})[s.kind],"k"),w=r(e=>Array.isArray(e.findings)?e.findings:[],"g"),b=r(e=>({"admin-token-weak":"LUNORA_ADMIN_TOKEN","auth-secret-weak":"AUTH_SECRET","cookies-insecure":"BETTER_AUTH_URL","cors-wildcard-credentials":"LUNORA_ALLOWED_ORIGINS","csrf-disabled":"LUNORA_SECURITY_CSRF","dev-args-unredacted":"request log","security-headers-disabled":"LUNORA_SECURITY_HEADERS","ws-gate-open":"LUNORA_WS_BEARER"})[e.kind],"S"),E=r((e,s)=>({"admin-token-weak":e("Your admin token is {length} characters \u2014 use at least {min} for a brute-force-resistant secret.",{length:s.detail?.length,min:s.detail?.min}),"auth-secret-weak":e("Your auth secret is {length} characters \u2014 use at least {min} (e.g. `openssl rand -hex 32`) to sign sessions safely.",{length:s.detail?.length,min:s.detail?.min}),"cookies-insecure":e("BETTER_AUTH_URL is a plaintext http:// origin, so session cookies cannot be Secure and ride in cleartext. Serve auth over https:// in production."),"cors-wildcard-credentials":e("LUNORA_ALLOWED_ORIGINS includes a wildcard while credentials are allowed \u2014 browsers reject this and it defeats the allowlist. Name explicit origins instead of *."),"csrf-disabled":e("LUNORA_SECURITY_CSRF is off, so cross-origin state-changing cookie requests are not blocked. Re-enable it in production to keep mutations un-forgeable."),"dev-args-unredacted":e("This worker reports a development environment, so the request log stores raw args and identity. Confirm it isn't a mislabeled production deploy."),"security-headers-disabled":e("LUNORA_SECURITY_HEADERS is off, so HSTS, CSP, nosniff, and frame-options are not applied. Re-enable the baseline headers in production."),"ws-gate-open":e("LUNORA_WS_BEARER is unset, so the WebSocket upgrade gate is open: anyone who can reach the worker can open a socket and run ordinary user subscriptions. Admin subscriptions are unaffected \u2014 they need the admin token. Set it if subscribers should present a shared credential.")})[s.kind],"A"),O=r(()=>{let e=(0,R.c)(8),s=p(),i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];let{data:a,error:d,errorSource:c}=m(f.getSecurityAudit,i),n;if(e[1]!==a||e[2]!==s){let u=a===void 0?null:w(a);n=u===null?null:u.map(t=>({description:E(s,t),entity:b(t),issueType:_(s,t),key:t.kind,level:t.level})),e[1]=a,e[2]=s,e[3]=n}else n=e[3];let l=n,o;return e[4]!==d||e[5]!==c||e[6]!==l?(o=(0,k.jsx)(g,{error:d,errorSource:c,rows:l,testId:"lunora-security-advisor"}),e[4]=d,e[5]=c,e[6]=l,e[7]=o):o=e[7],o},"T");export{O as default};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-LCRAEP3B.js";import"./chunk-UXXDN6Z3.js";import{a as F}from"./chunk-66UGPQVC.js";import{a as I}from"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import"./chunk-225VJ77I.js";import{b as $}from"./chunk-ZD2UXTLR.js";import{f as S}from"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import{a as B}from"./chunk-FKVZRPV5.js";import{a as L,b as O,c as E,d as k,e as n,f as l}from"./chunk-HEAQVSNS.js";import{a as j,e as z}from"./chunk-N6NMLJ6R.js";import{d as C,p as R,t as T}from"./chunk-PTZD7RUZ.js";import{a as f,d as y,e as D,f as G,g as J}from"./chunk-YKXDMIHQ.js";var P=y(G(),1);var Q=y(D(),1);var s=y(J(),1);var w=200,se=f(()=>{let e=(0,P.c)(28),d=S(),a=C(),[i,q]=(0,Q.useState)(0),p;e[0]!==i?(p=["lunora-auth-sessions",w,i],e[0]=i,e[1]=p):p=e[1];let x;e[2]!==d||e[3]!==i?(x=f(()=>d.listAuthSessions({limit:w,offset:i}),"p"),e[2]=d,e[3]=i,e[4]=x):x=e[4];let r=$(p,x),{error:g}=r,t=r.data?.rows??null,N;e[5]!==r?(N=f(()=>{r.refetch()},"b"),e[5]=r,e[6]=N):N=e[6],F(N,!0);let v;e[7]!==d||e[8]!==r?(v=f(o=>{R((async()=>{await d.revokeAuthSession({sessionId:o}),r.refetch()})())},"g"),e[7]=d,e[8]=r,e[9]=v):v=e[9];let b=v,c;e[10]!==g?(c=g!==null&&(0,s.jsx)("p",{className:"text-sm text-destructive","data-testid":"auth-sessions-error",role:"alert",children:g}),e[10]=g,e[11]=c):c=e[11];let m;e[12]!==t||e[13]!==a?(m=t!==null&&t.length===0&&(0,s.jsx)(B,{testId:"auth-sessions-empty",title:a("No active sessions.")}),e[12]=t,e[13]=a,e[14]=m):m=e[14];let h;e[15]!==b||e[16]!==t||e[17]!==a?(h=t!==null&&t.length>0&&(0,s.jsx)(j,{className:"overflow-hidden py-0",children:(0,s.jsx)(z,{className:"px-0",children:(0,s.jsxs)(L,{"data-testid":"auth-sessions-table",children:[(0,s.jsx)(O,{children:(0,s.jsxs)(k,{children:[(0,s.jsx)(n,{children:a("user")}),(0,s.jsx)(n,{children:a("expires")}),(0,s.jsx)(n,{children:a("ip")}),(0,s.jsx)(n,{children:a("user agent")}),(0,s.jsx)(n,{children:a("impersonated by")}),(0,s.jsx)(n,{"aria-label":a("Actions")})]})}),(0,s.jsx)(E,{children:t.map(o=>(0,s.jsxs)(k,{"data-testid":`auth-session-${o.id}`,children:[(0,s.jsx)(l,{className:"font-mono text-xs",children:o.userId}),(0,s.jsx)(l,{className:"text-muted-foreground tabular-nums",children:T(o.expiresAt)}),(0,s.jsx)(l,{children:o.ipAddress??""}),(0,s.jsx)(l,{className:"max-w-40 truncate",children:o.userAgent??""}),(0,s.jsx)(l,{className:"font-mono text-xs",children:o.impersonatedBy??""}),(0,s.jsx)(l,{children:(0,s.jsx)(I,{"data-testid":`auth-session-revoke-${o.id}`,onClick:f(()=>{b(o.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Revoke")})})]},o.id))})]})})}),e[15]=b,e[16]=t,e[17]=a,e[18]=h):h=e[18];let u;e[19]!==i||e[20]!==t||e[21]!==r.data?.total?(u=t!==null&&(0,s.jsx)(H,{count:t.length,offset:i,onOffsetChange:q,pageSize:w,prefix:"auth-sessions",total:r.data?.total}),e[19]=i,e[20]=t,e[21]=r.data?.total,e[22]=u):u=e[22];let A;return e[23]!==c||e[24]!==m||e[25]!==h||e[26]!==u?(A=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-sessions",children:[c,m,h,u]}),e[23]=c,e[24]=m,e[25]=h,e[26]=u,e[27]=A):A=e[27],A},"ee");export{se as default};
1
+ import{a as H}from"./chunk-4WD4XGC3.js";import"./chunk-Z22BDS6N.js";import{a as F}from"./chunk-JQXA2OYK.js";import{a as I}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import"./chunk-BOMPSVRC.js";import{b as $}from"./chunk-HECPC2VY.js";import{f as S}from"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import{a as B}from"./chunk-RWVIV3U7.js";import{a as L,b as O,c as E,d as k,e as n,f as l}from"./chunk-HCTJKP5J.js";import{a as j,e as z}from"./chunk-2IKDEUCX.js";import{d as C,p as R,t as T}from"./chunk-HJHSQPHW.js";import{a as f,d as y,e as D,f as G,g as J}from"./chunk-I26MS5PJ.js";var P=y(G(),1);var Q=y(D(),1);var s=y(J(),1);var w=200,se=f(()=>{let e=(0,P.c)(28),d=S(),a=C(),[i,q]=(0,Q.useState)(0),p;e[0]!==i?(p=["lunora-auth-sessions",w,i],e[0]=i,e[1]=p):p=e[1];let x;e[2]!==d||e[3]!==i?(x=f(()=>d.listAuthSessions({limit:w,offset:i}),"p"),e[2]=d,e[3]=i,e[4]=x):x=e[4];let r=$(p,x),{error:g}=r,t=r.data?.rows??null,N;e[5]!==r?(N=f(()=>{r.refetch()},"b"),e[5]=r,e[6]=N):N=e[6],F(N,!0);let v;e[7]!==d||e[8]!==r?(v=f(o=>{R((async()=>{await d.revokeAuthSession({sessionId:o}),r.refetch()})())},"g"),e[7]=d,e[8]=r,e[9]=v):v=e[9];let b=v,c;e[10]!==g?(c=g!==null&&(0,s.jsx)("p",{className:"text-sm text-destructive","data-testid":"auth-sessions-error",role:"alert",children:g}),e[10]=g,e[11]=c):c=e[11];let m;e[12]!==t||e[13]!==a?(m=t!==null&&t.length===0&&(0,s.jsx)(B,{testId:"auth-sessions-empty",title:a("No active sessions.")}),e[12]=t,e[13]=a,e[14]=m):m=e[14];let h;e[15]!==b||e[16]!==t||e[17]!==a?(h=t!==null&&t.length>0&&(0,s.jsx)(j,{className:"overflow-hidden py-0",children:(0,s.jsx)(z,{className:"px-0",children:(0,s.jsxs)(L,{"data-testid":"auth-sessions-table",children:[(0,s.jsx)(O,{children:(0,s.jsxs)(k,{children:[(0,s.jsx)(n,{children:a("user")}),(0,s.jsx)(n,{children:a("expires")}),(0,s.jsx)(n,{children:a("ip")}),(0,s.jsx)(n,{children:a("user agent")}),(0,s.jsx)(n,{children:a("impersonated by")}),(0,s.jsx)(n,{"aria-label":a("Actions")})]})}),(0,s.jsx)(E,{children:t.map(o=>(0,s.jsxs)(k,{"data-testid":`auth-session-${o.id}`,children:[(0,s.jsx)(l,{className:"font-mono text-xs",children:o.userId}),(0,s.jsx)(l,{className:"text-muted-foreground tabular-nums",children:T(o.expiresAt)}),(0,s.jsx)(l,{children:o.ipAddress??""}),(0,s.jsx)(l,{className:"max-w-40 truncate",children:o.userAgent??""}),(0,s.jsx)(l,{className:"font-mono text-xs",children:o.impersonatedBy??""}),(0,s.jsx)(l,{children:(0,s.jsx)(I,{"data-testid":`auth-session-revoke-${o.id}`,onClick:f(()=>{b(o.id)},"onClick"),size:"xs",type:"button",variant:"ghost",children:a("Revoke")})})]},o.id))})]})})}),e[15]=b,e[16]=t,e[17]=a,e[18]=h):h=e[18];let u;e[19]!==i||e[20]!==t||e[21]!==r.data?.total?(u=t!==null&&(0,s.jsx)(H,{count:t.length,offset:i,onOffsetChange:q,pageSize:w,prefix:"auth-sessions",total:r.data?.total}),e[19]=i,e[20]=t,e[21]=r.data?.total,e[22]=u):u=e[22];let A;return e[23]!==c||e[24]!==m||e[25]!==h||e[26]!==u?(A=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-sessions",children:[c,m,h,u]}),e[23]=c,e[24]=m,e[25]=h,e[26]=u,e[27]=A):A=e[27],A},"ee");export{se as default};
@@ -1 +1 @@
1
- import{b as o,c as i}from"./chunk-OKG3HWSJ.js";import{a as t}from"./chunk-YKXDMIHQ.js";var a="lunora-studio-recent-shards",c=10,n=t(()=>o(a,"session").filter(s=>typeof s=="string"),"o"),u=t(s=>{let r=s.trim();if(r==="")return n();let e=[r,...n().filter(l=>l!==r)].slice(0,c);return i(a,e,"session"),e},"l");export{n as a,u as b};
1
+ import{b as o,c as i}from"./chunk-RGMVGZV4.js";import{a as t}from"./chunk-I26MS5PJ.js";var a="lunora-studio-recent-shards",c=10,n=t(()=>o(a,"session").filter(s=>typeof s=="string"),"o"),u=t(s=>{let r=s.trim();if(r==="")return n();let e=[r,...n().filter(l=>l!==r)].slice(0,c);return i(a,e,"session"),e},"l");export{n as a,u as b};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-ULIQFBZU.js";import{a as S}from"./chunk-XC734N2Q.js";import{b as q}from"./chunk-35DM4JJG.js";import{b as I}from"./chunk-RDL5WK55.js";import{d as A,h as E,j as H,k as O}from"./chunk-PTZD7RUZ.js";import{a as j,d as C,f as U,g as _}from"./chunk-YKXDMIHQ.js";var V=C(U(),1);var i=C(_(),1);var L=j(G=>{let e=(0,V.c)(38),{className:w,error:t,testId:N}=G,g=A(),r=q(),l,s,n,a,c,m,o,d;if(e[0]!==w||e[1]!==t||e[2]!==r||e[3]!==N){let y=H(t),b;e[12]!==t?(b=O(t),e[12]=t,e[13]=b):b=e[13],s=b;let x;e[14]!==t?(x=S(t),e[14]=t,e[15]=x):x=e[15];let k=x,v;e[16]!==r||e[17]!==k?(v=j(()=>{r?.openConsole({errorsOnly:!0,seq:k})},"x"),e[16]=r,e[17]=k,e[18]=v):v=e[18],n=v,l=T,a=w,c=N,m="destructive";let u;e[19]!==t?(u=E(t),e[19]=t,e[20]=u):u=e[20],e[21]!==u?(o=(0,i.jsx)("p",{className:"font-medium",children:u}),e[21]=u,e[22]=o):o=e[22],d=y===void 0?null:(0,i.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:I(y)}),e[0]=w,e[1]=t,e[2]=r,e[3]=N,e[4]=l,e[5]=s,e[6]=n,e[7]=a,e[8]=c,e[9]=m,e[10]=o,e[11]=d}else l=e[4],s=e[5],n=e[6],a=e[7],c=e[8],m=e[9],o=e[10],d=e[11];let p;e[23]!==s?(p=s===void 0?null:(0,i.jsx)("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:s,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=s,e[24]=p):p=e[24];let f;e[25]!==r||e[26]!==n||e[27]!==g?(f=r===void 0?null:(0,i.jsx)("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:n,type:"button",children:g("Show in console")}),e[25]=r,e[26]=n,e[27]=g,e[28]=f):f=e[28];let h;return e[29]!==l||e[30]!==a||e[31]!==c||e[32]!==m||e[33]!==o||e[34]!==d||e[35]!==p||e[36]!==f?(h=(0,i.jsxs)(l,{className:a,testId:c,variant:m,children:[o,d,p,f]}),e[29]=l,e[30]=a,e[31]=c,e[32]=m,e[33]=o,e[34]=d,e[35]=p,e[36]=f,e[37]=h):h=e[37],h},"G");export{L as a};
1
+ import{a as T}from"./chunk-NCPW7WHO.js";import{a as S}from"./chunk-4ZDBUYGM.js";import{b as q}from"./chunk-55UGUCQ6.js";import{b as I}from"./chunk-PCBRDDD7.js";import{d as A,h as E,j as H,k as O}from"./chunk-HJHSQPHW.js";import{a as j,d as C,f as U,g as _}from"./chunk-I26MS5PJ.js";var V=C(U(),1);var i=C(_(),1);var L=j(G=>{let e=(0,V.c)(38),{className:w,error:t,testId:N}=G,g=A(),r=q(),l,s,n,a,c,m,o,d;if(e[0]!==w||e[1]!==t||e[2]!==r||e[3]!==N){let y=H(t),b;e[12]!==t?(b=O(t),e[12]=t,e[13]=b):b=e[13],s=b;let x;e[14]!==t?(x=S(t),e[14]=t,e[15]=x):x=e[15];let k=x,v;e[16]!==r||e[17]!==k?(v=j(()=>{r?.openConsole({errorsOnly:!0,seq:k})},"x"),e[16]=r,e[17]=k,e[18]=v):v=e[18],n=v,l=T,a=w,c=N,m="destructive";let u;e[19]!==t?(u=E(t),e[19]=t,e[20]=u):u=e[20],e[21]!==u?(o=(0,i.jsx)("p",{className:"font-medium",children:u}),e[21]=u,e[22]=o):o=e[22],d=y===void 0?null:(0,i.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:I(y)}),e[0]=w,e[1]=t,e[2]=r,e[3]=N,e[4]=l,e[5]=s,e[6]=n,e[7]=a,e[8]=c,e[9]=m,e[10]=o,e[11]=d}else l=e[4],s=e[5],n=e[6],a=e[7],c=e[8],m=e[9],o=e[10],d=e[11];let p;e[23]!==s?(p=s===void 0?null:(0,i.jsx)("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:s,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=s,e[24]=p):p=e[24];let f;e[25]!==r||e[26]!==n||e[27]!==g?(f=r===void 0?null:(0,i.jsx)("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:n,type:"button",children:g("Show in console")}),e[25]=r,e[26]=n,e[27]=g,e[28]=f):f=e[28];let h;return e[29]!==l||e[30]!==a||e[31]!==c||e[32]!==m||e[33]!==o||e[34]!==d||e[35]!==p||e[36]!==f?(h=(0,i.jsxs)(l,{className:a,testId:c,variant:m,children:[o,d,p,f]}),e[29]=l,e[30]=a,e[31]=c,e[32]=m,e[33]=o,e[34]=d,e[35]=p,e[36]=f,e[37]=h):h=e[37],h},"G");export{L as a};