@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
@@ -0,0 +1,2 @@
1
+ import{b as fr}from"./chunk-SJQERRSZ.js";import{a,d as F,e as V,g as Z}from"./chunk-I26MS5PJ.js";var Oo=F(V(),1),te=Oo.createContext(null);var No=F(V(),1);function M(t){let e=No.useContext(te);return e||void 0,e}a(M,"useRouter");var Ie=F(V(),1),Nt=Ie.createContext(void 0),Fo=Ie.createContext(void 0);function tt(t){return t[t.length-1]}a(tt,"last");function pt(t,e){return typeof t=="function"?t(e):t}a(pt,"functionalUpdate");var oe=Object.prototype.hasOwnProperty;function Ft(t){for(let e in t)if(oe.call(t,e))return!0;return!1}a(Ft,"hasKeys");var Tt=a(()=>Object.create(null),"createNull"),mt=a((t,e)=>Q(t,e,!0),"nullReplaceEqualDeep");function Q(t,e,o,n=0){if(!1)return e;if(t===e)return t;if(n++>500)return e;let r=Array.isArray(t)&&Array.isArray(e);if(!r&&!(ee(t)&&ee(e)))return e;let i=Object.keys(t),s=i.length,c=Object.keys(e),l=c.length;if(r?s!==t.length||l!==e.length||s&&tt(i)!==`${s-1}`||l&&tt(c)!==`${l-1}`:s!==Object.getOwnPropertyNames(t).length||l!==Object.getOwnPropertyNames(e).length||Object.getOwnPropertySymbols(e).length)return e;let u=0,f,d,h;if(r){for(;u<l&&(h=u,d=t[h],f=e[h],f=d===f?d:typeof d=="object"?Q(d,f,o,n):f,f===d);u++);if(u===l&&s===l)return t}else{let m=s===l,g=!0;for(;u<l;u++){h=c[u],d=t[h];let S=e[h];f=d===S?d:typeof d=="object"?Q(d,S,o,n):S,m&&=f===d&&(i[u]===h||oe.call(t,h)),g&&=Object.is(f,S),i[u]=f}if(m)return Object.getOwnPropertySymbols(t).length?e:t;if(g)return e}let p=r?c.fill(0):o?Tt():{};for(let m=0;m<l;m++)h=r?m:c[m],r?(d=t[h],m>u&&(f=e[h],f=d===f?d:typeof d=="object"?Q(d,f,o,n):f),p[h]=m<u?d:f):p[h]=i[m];return p}a(Q,"replaceEqualDeep");function ee(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}a(ee,"isPlainObject");function J(t,e,o,n){if(t===e)return!0;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++){let s=t[r],c=e[r];if(s!==c&&!J(s,c,o,n))return!1}return!0}if(ee(t)&&ee(e)){if(o){for(let i in e)if((n||e[i]!==void 0)&&!J(t[i],e[i],o,n))return!1;return!0}let r=0;if(n)r=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&r++;for(let i in e)if((n||e[i]!==void 0)&&(r--===0||!J(t[i],e[i],o,n)))return!1;return r===0}return!1}a(J,"deepEqual");var dr=/[\x00-\x1f\x7f"<>`{}]/g;function hr(t){return t.replace(dr,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}a(hr,"sanitizePathSegment");function To(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return hr(e)}a(To,"decodeSegment");var Oe=["http:","https:","mailto:","tel:"];function st(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}a(st,"getUrlScheme");var Ne=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Mt(t,e){if(!t)return!1;if(Ne.test(t))return!0;let o=st(t);return o?!e.has(o):!1}a(Mt,"isDangerousProtocol");function xt(t){if(!t)return t;let e=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){let o=/%25|%5C/gi,n=0,r;for(e="";(r=o.exec(t))!==null;)e+=To(t.slice(n,r.index))+r[0],n=o.lastIndex;e+=To(n?t.slice(n):t)}return e}a(xt,"decodePath");function Mo(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}a(Mo,"encodePathLikeUrl");function Do(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}a(Do,"arraysEqual");function ut(){throw new Error("Invariant failed")}a(ut,"invariant");function it(t){return t.replace(/\/{2,}/g,"/")}a(it,"cleanPath");function ne(t){return t==="/"?t:t.replace(/^\/+/,"")}a(ne,"trimPathLeft");function U(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/+$/,""):t}a(U,"trimPathRight");function Dt(t){return U(ne(t))}a(Dt,"trimPath");function re(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}a(re,"removeTrailingSlash");function se(t,e,o="never",n){if(e.includes("//")&&(e=it(e)),e.startsWith("/"))return e.length===1||o==="preserve"?e:o==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;let r=e===".",i;if(n){i=r?t:t+"\0"+e;let u=n.get(i);if(u)return u}let s;if(r)s=t.split("/");else{for(t.includes("//")&&(t=it(t)),s=t.split("/");s.length>1&&tt(s)==="";)s.pop();let u=e.split("/");for(let f=0,d=u.length;f<d;f++){let h=u[f];h===""?f?f===d-1&&s.push(h):s=[h]:h===".."?s.length>1?s.pop():s=[""]:h==="."||s.push(h)}}s.length>1&&(tt(s)===""?o==="never"&&s.pop():o==="always"&&s.push(""));let c=s.join("/"),l=(r?it(c):c)||"/";return i&&n&&n.set(i,l),l}a(se,"resolvePath");function Ao(t){let e=new Map(t.map(n=>[encodeURIComponent(n),n])),o=new RegExp([...e.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return n=>n.replace(o,r=>e.get(r)??r)}a(Ao,"compileDecodeCharMap");function pr(t){return t==null||t===""}a(pr,"isMissingSplat");function mr(t,e,o){if(typeof e!="string")return""+(e??void 0);let n=t==="_splat";if(n&&(!e||/^[a-zA-Z0-9\-._~!/]*$/.test(e)))return e;let r=encodeURIComponent(e);return n&&(r=r.replaceAll("%2F","/")),o?o(r):r}a(mr,"encodeParam");function ie(t,e,o,n,r){let i=t.endsWith("/")?"/":"",s="";for(let c of e){if(typeof c=="string"){s+=c;continue}let[l,u,f,d]=c,h=l===2,p=h&&d!==void 0?d+i:d,m=o[u];if(!(l===3&&m==null)){if(r&&(r[u]=m,h&&(r["*"]=m)),h&&pr(m)){if(f==="/"&&!p)continue;m=""}s+=f+mr(u,m,n)+(p||"")}}return s+i||"/"}a(ie,"interpolatePath");function q(t){return t?.isNotFound===!0}a(q,"isNotFound");function gr(){try{return sessionStorage}catch{return}}a(gr,"getSafeSessionStorage");var yr="tsr-scroll-restoration-v1_3",Vo=gr();function vr(){try{return JSON.parse(Vo?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}a(vr,"createScrollRestorationCache");var bt=vr(),$o="data-scroll-restoration-id",Sr=a(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Rr(t){let e=t.getAttribute($o);if(e)return`[${$o}="${e}"]`;let o="",n=t,r;for(;r=n.parentNode;){let i=1,s=n;for(;s=s.previousElementSibling;)i++;let c=`${n.localName}:nth-child(${i})`;o=o?`${c} > ${o}`:c,n=r}return o}a(Rr,"getScrollRestorationSelector");var ae=!1,ce="window";function Fe(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}a(Fe,"getElement");function Bo(t){let e=new Set;for(let o of t){if(o===ce)continue;let n=Fe(o);n&&e.add(n)}return e}a(Bo,"getScrollToTopElements");function Ho(t,e){let o=e??t.options.scrollRestoration,n=t._scroll;if(o&&(n.e=!0),!1)return;let r=t.options.getScrollRestorationKey||Sr,i=new Set,s=a(c=>{let l=bt[c]||={};for(let u of i)u===document?l[ce]={scrollX,scrollY}:u.isConnected&&(l[Rr(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})},"snapshotCurrentScrollTargets");o&&!n.s&&(n.s=!0,ae=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ae||i.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&s(r(c.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",s(r(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Vo?.setItem(yr,JSON.stringify(bt))}catch{}}),addEventListener("pageshow",c=>{c.persisted&&(history.scrollRestoration="manual")})),!n.r&&(n.r=!0,t.subscribe("onRendered",c=>{let l=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,f=n.n,d=n.h,h;if(i.clear(),n.n=!0,n.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let p=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(n.e&&m&&m!==p){let g=bt[m];if(g){let S=bt[p];for(let y in g){if(y===ce){if(f)continue}else{let R=Fe(y);if(!R||f&&u&&(h??=Bo(u),h.has(R)))continue}S||(S=bt[p]={}),S[y]??=g[y]}}}ae=!0;try{let g=c.toLocation.hash,S=c.toLocation.state.__hashScrollIntoViewOptions??!0,y=!1;if(f){!g&&u&&(h??=Bo(u));let R=g&&S&&d,b=n.e?bt[p]:void 0;if(b)for(let x in b){let{scrollX:P,scrollY:_}=b[x];if(x===ce){if(R)continue;scrollTo({top:_,left:P,behavior:l}),y=!0}else{let v=Fe(x);v&&(v.scrollLeft=P,v.scrollTop=_,h?.delete(v))}}if(!g){let x={top:0,left:0,behavior:l};if(y||scrollTo(x),h)for(let P of h)P.scrollTo(x)}}!y&&g&&S&&document.getElementById(g)?.scrollIntoView(S)}finally{ae=!1}}))}a(Ho,"setupScrollRestoration");function zo(t,e=String){let o;for(let n in t){let r=t[n];r!==void 0&&(o||=new URLSearchParams).set(n,e(r))}return o?o.toString():""}a(zo,"encode");function Te(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}a(Te,"toValue");function Uo(t){let e=new URLSearchParams(t),o=Object.create(null);for(let[n,r]of e.entries()){let i=o[n];i==null?o[n]=Te(r):Array.isArray(i)?i.push(Te(r)):o[n]=[i,Te(r)]}return o}a(Uo,"decode");var Wo=/^(?:\s|["[{\d-]|fa|nu|tr)/,jo=_r(JSON.parse),Ko=wr(JSON.stringify,JSON.parse);function _r(t){let e=t===JSON.parse;return o=>{o[0]==="?"&&(o=o.substring(1));let n=Uo(o);for(let r in n){let i=n[r];if(typeof i=="string"){if(e&&!Wo.test(i))continue;try{n[r]=t(i)}catch{}}}return n}}a(_r,"parseSearchWith");function wr(t,e){let o=e===JSON.parse;function n(r){if(r&&typeof r=="object")try{return t(r)}catch{}else if(e&&typeof r=="string"){if(o&&!Wo.test(r))return r;try{return e(r),t(r)}catch{}}return r}return a(n,"stringifyValue"),r=>{let i=zo(r,n);return i?`?${i}`:""}}a(wr,"stringifySearchWith");var Y="__root__";function qo(t){t.statusCode=t.statusCode||t.code||307;let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}a(qo,"redirect");function le(t){return t instanceof Response&&!!t.options}a(le,"isRedirect");function Ct(t){let e=new Map,o,n;return{get(r){let i=e.get(r);if(i)return i.visited=!0,i.value},set(r,i){let s=e.get(r);if(s){s.value=i;return}if(e.size>=t){let l=o?.next().value;for(;!l||l.visited;)l?l.visited=!1:o=e.values(),l=o.next().value;l===n&&(o=void 0),e.delete(l.key)}let c={key:r,value:i,visited:!1};n=c,e.set(r,c)},clear(){e.clear(),o=void 0,n=void 0}}}a(Ct,"createSieveCache");var ft=4,Jo=5;function xr(t){let e=t.names;if(e)return e;let o=[];for(let n of t)typeof n!="string"&&o.push(n[1]);return t.names=o}a(xr,"getParamNames");function br(t,e,o){let n=t.substring(e,o);if(n.charCodeAt(0)===36)return n.length===1?[2,"_splat","",void 0]:[1,n.substring(1),"",""];let r=n.indexOf("{");if(r>=0){let i=n.indexOf("}",r),s=n.charCodeAt(r+1)===45,c=r+(s?3:2);if(i>=0&&n.charCodeAt(c-1)===36&&(!s||c<i)){let l=n.substring(c,i);return[s?3:l?1:2,l||"_splat",n.substring(0,r),t.substring(e+i+1,l?o:t.length)]}}return n}a(br,"parseSegment");function Pt(t,e,o,n,r,i){let s=o,c=e.fullPath??e.from,l=e.options,u=c.length,f=c.endsWith("/")?u-1:u,d=l?.caseSensitive??t,h=l?.params?.parse??l?.parseParams,p,m=i?o-1:0;if(!n||c.includes("$")){p=i?.slice()??[];let y=tt(p);y&&typeof y!="string"&&y[0]===2&&(p[p.length-1]=[y[0],y[1],y[2],y[3]===void 0?void 0:y[3]+c.substring(o-(c[o-2]==="/"?2:1),f)],m=u)}for(;s<u;){let y=s,R=c.indexOf("/",y),b=R===-1?u:R,x=br(c,y,b);s=b+1;let P;if(typeof x=="string"){if(!n)continue;let _=x,v;d?v=n.static??=new Map:(_=x.toLowerCase(),v=n.staticInsensitive??=new Map);let w=v.get(_);if(w)P=w;else{let E=gt(n);P=E,v.set(_,E)}}else{let _=x[0],v=x[2],w=x[3]??"";if(_===2&&(b=u,s=b+1),p&&m<b&&(m<y-1&&p.push(c.substring(m,y-1)),x[2]="/"+v,_===2&&x[3]!==void 0&&f<u&&(x[3]=w.slice(0,-1)),p.push(x),m=b),!n)continue;let E=d&&!!(v||w);d||(v=v.toLowerCase(),w=w.toLowerCase());let L=_===1?n.dynamic??=[]:_===3?n.optional??=[]:n.wildcard??=[],k=_!==2&&!h&&L.find(C=>!C.parse&&C.caseSensitive===E&&C.prefix===v&&C.suffix===w);if(k)P=k;else{let C=gt(n,_,E,v,w);P=C,L.push(C),L.length===2&&r?.push(L)}}n=P}p&&m<f&&p.push(c.substring(m,f));let g=p?.slice();if(!n)return g;if(h&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let y=gt(n,Jo);(n.pathless??=[]).push(y),n=y}let S=(e.path||!e.children)&&!e.isRoot;if(S&&f<u){let y=gt(n,ft);n.index=y,n=y}return n.parse=h??null,n.priority=l?.params?.priority??0,n.route||(n.data=g,S&&(n.route=e)),[n,s,g]}a(Pt,"parseSegments");function Yo(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}a(Yo,"sortDynamic");function gt(t,e=0,o,n,r){return{kind:e,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:o,prefix:n,suffix:r}}a(gt,"createSegmentNode");function Xo(t,e){let o=gt(),n=[];function r(i,s,c,l){let[u,f,d]=Pt(!1,i,s,c,n,l);if(i.children)for(let h of i.children)r(h,f,u,d)}a(r,"visit");for(let i of t)r(i,1,o);for(let i of n)i.sort(Yo);e.masksTree=o,e.flatCache=Ct(1e3)}a(Xo,"processRouteMasks");function Zo(t,e){t||="/";let o=e.flatCache.get(t);if(o!==void 0)return o;let n=Me(t,e.masksTree);return e.flatCache.set(t,n),n}a(Zo,"findFlatMatch");function Qo(t,e,o,n,r){t||="/",n||="/";let i=e?`case\0${t}`:t,s=r.singleCache.get(i);return s||(s=gt(),Pt(e,{from:t},1,s),r.singleCache.set(i,s)),Me(n,s,o)}a(Qo,"findSingleMatch");function tn(t,e,o=!1){let n=o?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";let i;try{i=Me(t,e.segmentTree,o)}catch(s){if(s instanceof URIError)i=null;else throw s}return i&&(i.branch=De(i.route)),e.matchCache.set(n,i),i}a(tn,"findRouteMatch");function en(t,e=!1){let o=gt(),n=[],r={},i={},s=0;function c(l,u,f,d){if(l.init(s),l.id in r&&ut(),r[l.id]=l,s!==0&&l.path){let g=U(l.fullPath);(!i[g]||l.fullPath.endsWith("/"))&&(i[g]=l)}s++;let[h,p,m]=Pt(e,l,u,f,n,d);if(l._interpolation=m,l.children)for(let g of l.children)c(g,p,h,m)}a(c,"visit"),c(t,1,o);for(let l of n)l.sort(Yo);return{processedTree:{segmentTree:o,singleCache:Ct(1e3),matchCache:Ct(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}a(en,"processRouteTree");function Me(t,e,o=!1){let n=t.split("/"),r=Pr(t,n,e,o);if(!r)return null;let[i]=on(t,n,r);return{route:r.node.route,rawParams:i}}a(Me,"findMatch");function on(t,e,o){let n=Cr(o.node),r=o.node.data&&xr(o.node.data),i=Object.create(null),s=o.extract?.part??0,c=o.extract?.node??0,l=o.extract?.path??0,u=o.extract?.param??0;for(;c<n.length;s++,c++,l++){let f=n[c];if(f.kind===ft)break;if(f.kind===Jo){s--,l--;continue}let d=e[s],h=l;if(d&&(l+=d.length),f.kind===1||f.kind===3){let p=r[u++];if(f.kind===3&&o.skipped&1<<c){s--,l=h-1;continue}let m=f.suffix||f.prefix?d.substring(f.prefix.length,d.length-f.suffix.length):d;(m||f.kind===1)&&(i[p]=decodeURIComponent(m))}else if(f.kind===2){let p=f,m=t.substring(h+p.prefix.length,t.length-p.suffix.length),g=decodeURIComponent(m);i["*"]=g,i._splat=g;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:s,node:c,path:l,param:u}]}a(on,"extractParams");function De(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}a(De,"buildRouteBranch");function Cr(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}a(Cr,"buildBranch");function Pr(t,e,o,n){if(t==="/"&&o.index)return{node:o.index,skipped:0};let r=!tt(e),i=r&&t!=="/",s=e.length-(r?1:0),c=[{node:o,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let f=c.pop(),{node:d,index:h,skipped:p,statics:m,dynamics:g,optionals:S}=f,{extract:y,rawParams:R}=f;if(d.kind===2&&d.route&&!fe(u,f))continue;if(d.parse){if(!Go(t,e,f))continue;R=f.rawParams,y=f.extract}n&&d.route&&d.kind!==ft&&fe(l,f)&&(l=f);let b=h===s;if(b&&(d.route&&(!i||d.kind===ft||d.kind===2)&&fe(u,f)&&(u=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let x=b?void 0:e[h],P;if(b&&d.index){let _={node:d.index,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R},v=!0;if(d.index.parse&&(Go(t,e,_)||(v=!1)),v){if(!g&&!S&&!p&&Er(m,s))return _;fe(u,_)&&(u=_)}}if(d.wildcard)for(let _=d.wildcard.length-1;_>=0;_--){let v=d.wildcard[_],{prefix:w,suffix:E}=v;if(!(w&&(b||!(v.caseSensitive?x:P??=x.toLowerCase()).startsWith(w)))){if(E){if(b)continue;let L=e.slice(h).join("/"),k=L.slice(-E.length);if((v.caseSensitive?k:k.toLowerCase())!==E||L.length-E.length<w.length)continue}c.push({node:v,index:s,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(d.optional){let _=p|1<<d.depth+1;for(let v=d.optional.length-1;v>=0;v--){let w=d.optional[v];c.push({node:w,index:h,skipped:_,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b)for(let v=d.optional.length-1;v>=0;v--){let w=d.optional[v],{prefix:E,suffix:L}=w;if(E||L){let k=w.caseSensitive?x:P??=x.toLowerCase();if(E&&!k.startsWith(E)||L&&k.indexOf(L,k.length-L.length)<E.length)continue}c.push({node:w,index:h+1,skipped:p,statics:m,dynamics:g,optionals:S+ue(s,h),extract:y,rawParams:R})}}if(!b&&d.dynamic&&x)for(let _=d.dynamic.length-1;_>=0;_--){let v=d.dynamic[_],{prefix:w,suffix:E}=v;if(w||E){let L=v.caseSensitive?x:P??=x.toLowerCase();if(w&&!L.startsWith(w)||E&&L.indexOf(E,L.length-E.length)<w.length)continue}c.push({node:v,index:h+1,skipped:p,statics:m,dynamics:g+ue(s,h),optionals:S,extract:y,rawParams:R})}if(!b&&d.staticInsensitive){let _=d.staticInsensitive.get(P??=x.toLowerCase());_&&c.push({node:_,index:h+1,skipped:p,statics:m+ue(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(!b&&d.static){let _=d.static.get(x);_&&c.push({node:_,index:h+1,skipped:p,statics:m+ue(s,h),dynamics:g,optionals:S,extract:y,rawParams:R})}if(d.pathless)for(let _=d.pathless.length-1;_>=0;_--){let v=d.pathless[_];c.push({node:v,index:h,skipped:p,statics:m,dynamics:g,optionals:S,extract:y,rawParams:R})}}if(u)return u;if(n&&l){let f=l.index;for(let h=0;h<l.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return l.rawParams??=Object.create(null),l.rawParams["**"]=decodeURIComponent(d),l}return null}a(Pr,"getNodeMatch");function ue(t,e){return 2**(t-e-1)}a(ue,"segmentScore");function Er(t,e){return t===2**(e-1)-1}a(Er,"isPerfectStaticMatch");function Go(t,e,o){let n,r;try{[n,r]=on(t,e,o)}catch{return null}if(o.rawParams=n,o.extract=r,!o.node.parse)return!0;try{if(o.node.parse(n)===!1)return null}catch{}return!0}a(Go,"validateParseParams");function fe(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===ft)>(t.node.kind===ft)||e.node.kind===ft==(t.node.kind===ft)&&e.node.depth>t.node.depth))):!0}a(fe,"isFrameMoreSpecific");function nn(t,e,o){let n=Dt(t),r=`/${n}`,i=e?r:r.toLowerCase(),s=`${i}/`,c={input:a(({url:l})=>{let u=e?l.pathname:l.pathname.toLowerCase();return u===i?l.pathname="/":u.startsWith(s)&&(l.pathname=l.pathname.slice(r.length)),l},"input"),output:a(({url:l})=>(l.pathname=it(`/${n}${l.pathname}`),l),"output")};return o?{input:a(({url:l})=>de(o,c.input({url:l})),"input"),output:a(({url:l})=>c.output({url:Ae(o,l)}),"output")}:c}a(nn,"rewriteBasepath");function de(t,e){let o=t?.input?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(de,"executeRewriteInput");function Ae(t,e){let o=t?.output?.({url:e});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return e}a(Ae,"executeRewriteOutput");function $e(t){let e=t;return{get(){return e},set(o){e=pt(o,e)}}}a($e,"createNonReactiveMutableStore");function Be(t){return{get(){return t()}}}a(Be,"createNonReactiveReadonlyStore");function rn(t,e){let{createMutableStore:o,createReadonlyStore:n,batch:r}=e,i=new Map,s=o("idle"),c=o(t),l=o(void 0),u=o([]),f=n(()=>u.get().map(g=>i.get(g).get())),d=n(()=>({status:s.get(),isLoading:s.get()==="pending",matches:f.get(),location:c.get(),resolvedLocation:l.get()}));function h(g){let S=i.get(g);return S||(S=o(void 0),i.set(g,S)),S}a(h,"getMatchStore");let p={status:s,location:c,resolvedLocation:l,ids:u,matches:f,byRoute:i,__store:d,getMatchStore:h,setMatches:m};function m(g){let S=u.get(),y=g.map(R=>R.routeId);r(()=>{Do(S,y)||u.set(y);for(let R of S)y.includes(R)||i.get(R).set(()=>{});for(let R of g){let b=h(R.routeId);b.get()!==R&&b.set(R)}})}return a(m,"setMatches"),p}a(rn,"createRouterStores");var dt="__TSR_index",sn="popstate",an="beforeunload",Lr=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function At(t){let e=Lr.exec(t);return e?"/"+t.slice(e[0].length):t}a(At,"normalizeProtocolRelative");function He(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,e=>`
2
+ \r`.includes(e)?"":encodeURIComponent(e))),At(t)}a(He,"normalizeHref");function ze(t){let e=t.getLocation(),o=new Set,n=a(s=>{e=t.getLocation(),o.forEach(c=>c({location:e,action:s}))},"notify"),r=a(s=>{t.notifyOnIndexChange??!0?n(s):e=t.getLocation()},"handleIndexChange"),i=a(async({task:s,navigateOpts:c,...l})=>{if(c?.ignoreBlocker??!1){s();return}let u=t.getBlockers?.()??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(let d of u){let h=Et(l.path,l.state);if(await d.blockerFn({currentLocation:e,nextLocation:h,action:l.type})){t.onBlocked?.();return}}s()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:a(s=>(o.add(s),()=>{o.delete(s)}),"subscribe"),push:a((s,c,l)=>{let u=e.state[dt];c=Ve(u+1,c),i({task:a(()=>{t.pushState(s,c),n({type:"PUSH"})},"task"),navigateOpts:l,type:"PUSH",path:s,state:c})},"push"),replace:a((s,c,l)=>{let u=e.state[dt];c=Ve(u,c),i({task:a(()=>{t.replaceState(s,c),n({type:"REPLACE"})},"task"),navigateOpts:l,type:"REPLACE",path:s,state:c})},"replace"),go:a((s,c)=>{i({task:a(()=>{t.go(s,c?.ignoreBlocker??!1),r({type:"GO",index:s})},"task"),navigateOpts:c,type:"GO"})},"go"),back:a(s=>{i({task:a(()=>{t.back(s?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:s,type:"BACK"})},"back"),forward:a(s=>{i({task:a(()=>{t.forward(s?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:s,type:"FORWARD"})},"forward"),canGoBack:a(()=>e.state[dt]!==0,"canGoBack"),createHref:a(s=>t.createHref(s),"createHref"),block:a(s=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,s]),()=>{let l=t.getBlockers?.()??[];t.setBlockers?.(l.filter(u=>u!==s))}},"block"),flush:a(()=>t.flush?.(),"flush"),destroy:a(()=>t.destroy?.(),"destroy"),notify:n,_getBlockers:a(()=>t.getBlockers?.()??[],"_getBlockers")}}a(ze,"createHistory");function Ve(t,e){let o=We();return{...e,key:o,__TSR_key:o,[dt]:t}}a(Ve,"assignKeyAndIndex");function Ue(t){let e=t?.window??(typeof document<"u"?window:void 0),o=e.history.pushState,n=e.history.replaceState,r=[],i=a(()=>r,"_getBlockers"),s=a(v=>r=v,"_setBlockers"),c=a(v=>He(t?.createHref?t.createHref(v):v),"createHref"),l=t?.parseLocation??(()=>Et(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let v=We();e.history.replaceState({[dt]:0,key:v,__TSR_key:v},"")}let u=l(),f,d=!1,h=!1,p=!1,m=!1,g=a(()=>u,"getLocation"),S,y=a(()=>{S&&(_._ignoreSubscribers=!0,(S[2]?e.history.pushState:e.history.replaceState)(S[1],"",S[0]),_._ignoreSubscribers=!1,S=void 0,f=void 0)},"flush"),R=a((v,w,E)=>{let L=t?.createHref?c(w):void 0,k=!!S;k||(f=u),u=Et(w,E),S=[L??u.href,E,S?.[2]||v],k||queueMicrotask(()=>y())},"queueHistoryAction"),b=a(v=>{u=l(),_.notify({type:v})},"onPushPop"),x=a(async()=>{if(m=!1,h){h=!1;return}let v=l(),w=v.state[dt]-u.state[dt],E=w===1,L=w===-1,k=!E&&!L||d;d=!1;let C=k?"GO":L?"BACK":"FORWARD",O=k?{type:"GO",index:w}:{type:L?"BACK":"FORWARD"};if(p)p=!1;else{let N=i();if(typeof document<"u"&&N.length){for(let T of N)if(await T.blockerFn({currentLocation:u,nextLocation:v,action:C})){h=!0,e.history.go(-w),_.notify(O);return}}}u=l(),_.notify(O)},"onPushPopEvent"),P=a(v=>{if(m){m=!1;return}let w=!1,E=i();if(typeof document<"u"&&E.length)for(let L of E){let k=L.enableBeforeUnload??!0;if(k===!0){w=!0;break}if(typeof k=="function"&&k()===!0){w=!0;break}}if(w)return v.preventDefault(),v.returnValue=""},"onBeforeUnload"),_=ze({getLocation:g,getLength:a(()=>e.history.length,"getLength"),pushState:a((v,w)=>R(!0,v,w),"pushState"),replaceState:a((v,w)=>R(!1,v,w),"replaceState"),back:a(v=>(v&&(p=!0,m=!0),e.history.back()),"back"),forward:a(v=>{v&&(p=!0,m=!0),e.history.forward()},"forward"),go:a((v,w)=>{d=!0,w&&(p=!0,m=!0),e.history.go(v)},"go"),createHref:a(v=>c(v),"createHref"),flush:y,destroy:a(()=>{e.history.pushState=o,e.history.replaceState=n,e.removeEventListener(an,P,{capture:!0}),e.removeEventListener(sn,x)},"destroy"),onBlocked:a(()=>{f&&u!==f&&(u=f)},"onBlocked"),getBlockers:i,setBlockers:s,notifyOnIndexChange:!1});return _._ignoreNextBeforeUnload=v=>{m=!1;try{v=new URL(v,e.document.baseURI).href,m=/^https?:/.test(v)&&(!v.includes("#")||v.split("#")[0]!==e.location.href.split("#")[0])}catch{}},e.addEventListener(an,P,{capture:!0}),e.addEventListener(sn,x),e.history.pushState=function(...v){let w=o.apply(e.history,v);return _._ignoreSubscribers||b("PUSH"),w},e.history.replaceState=function(...v){let w=n.apply(e.history,v);return _._ignoreSubscribers||b("REPLACE"),w},_}a(Ue,"createBrowserHistory");function kr(t={initialEntries:["/"]}){let e=t.initialEntries,o=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,n=e.map((l,u)=>Ve(u,void 0)),r=a(()=>Et(e[o],n[o]),"getLocation"),i=[];return ze({getLocation:r,getLength:a(()=>e.length,"getLength"),pushState:a((l,u)=>{o=o<e.length-1?o+1:e.length,n[o]=u,e[o]=l,o<e.length-1&&(e.length=o+1,n.length=o+1)},"pushState"),replaceState:a((l,u)=>{n[o]=u,e[o]=l},"replaceState"),back:a(()=>{o=Math.max(o-1,0)},"back"),forward:a(()=>{o=Math.min(o+1,e.length-1)},"forward"),go:a(l=>{o=Math.min(Math.max(o+l,0),e.length-1)},"go"),createHref:He,getBlockers:a(()=>i,"_getBlockers"),setBlockers:a(l=>i=l,"_setBlockers")})}a(kr,"createMemoryHistory");function Et(t,e){let o=He(t),n=o.indexOf("#"),r=o.indexOf("?");if(!e){let i=We();e={[dt]:0,key:i,__TSR_key:i}}return{href:o,pathname:o.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:o.length),hash:n>-1?o.substring(n):"",search:r>-1?o.slice(r,n===-1?void 0:n):"",state:e}}a(Et,"parseHref");function We(){return(Math.random()+1).toString(36).substring(7)}a(We,"createRandomKey");function je(t,e){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==e||!!t.username||!!t.password}a(je,"isExternalUrl");function Ke(t){return t.pathname+t.search+t.hash}a(Ke,"getUrlPath");function cn(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}a(cn,"routeNeedsLoad");function yt(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}a(yt,"getLocationChangeInfo");function ln({key:t,__TSR_key:e,__TSR_index:o,__hashScrollIntoViewOptions:n,...r}){return r}a(ln,"_getUserHistoryState");function dn(t){return t.findIndex(e=>e.status==="error"||e.status==="notFound"||e._notFound)+1}a(dn,"lifecycleEnd");function hn(t,e,o,n,r,i){n&&(e=e.slice(0,n)),r&&(o=o.slice(0,r));for(let s of e){if(i&&t._tx!==i)return;o.some(c=>c.routeId===s.routeId)||t.routesById[s.routeId].options.onLeave?.(s)}for(let s of o){if(i&&t._tx!==i)return;t.routesById[s.routeId].options[e.some(c=>c.routeId===s.routeId)?"onStay":"onEnter"]?.(s)}}a(hn,"runRouteLifecycle");var Je=class{static{a(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async o=>(o(),!1),this.update=o=>{let n=this.options;this.options={...n,...o},this.isServer=this.options.isServer??!1??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ue()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");let r=this.options.basepath??"/",i=this.options.rewrite,s=this.basepath!==r||n?.rewrite!==i||n?.caseSensitive!==this.options.caseSensitive;if(s&&(this.basepath=r,this.rewrite=r!=="/"&&Dt(r)?nn(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||!1){this.routeTree=this.options.routeTree;let c;c=this.buildRouteTree(),!1,this.setRoutes(c)}if(this.stores)s&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let c=this.getStoreConfig(this);this.batch=c.batch,this.stores=rn(this.latestLocation,c),Ho(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let o=en(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Xo(this.options.routeMasks,o.processedTree),{...o,resolvePathCache:Ct(1e3)}},this.subscribe=(o,n)=>{let r={eventType:o,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=o=>{for(let n of this.subscribers)if(n.eventType===o.type)try{n.fn(o)}catch(r){console.error(r)}},this.parseLocation=(o,n)=>{let r=a(({pathname:l,search:u,hash:f,href:d},h)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){let S=this.options.parseSearch(u),y=this.options.stringifySearch(S);return{href:l+y+f,publicHref:l+y+f,pathname:xt(l),external:!1,searchStr:y,search:mt(n?.search,S),hash:xt(f.slice(1)),state:Q(n?.state,h)}}let p=de(this.rewrite,new URL(d,this.origin)),m=this.options.parseSearch(p.search),g=this.options.stringifySearch(m);return p.search=g,{href:p.href.replace(p.origin,""),publicHref:d,pathname:xt(At(p.pathname)),external:!!this.rewrite&&je(p,this.origin),searchStr:g,search:mt(n?.search,m),hash:xt(p.hash.slice(1)),state:Q(n?.state,h)}},"parse"),i=r(o,o.state),{__tempLocation:s,__tempKey:c}=i.state;if(s&&(!c||c===this.tempLocationKey)){let l=r(s,{...s.state,__tempLocation:void 0,key:i.state.key,__TSR_key:i.state.__TSR_key});return l.maskedLocation=i,l}return i},this.matchRoutes=(o,n,r)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:n},r):this.matchRoutesInternal(o,n),this.getMatchedRoutes=o=>{let n=Object.create(null),r=tn(U(o),this.processedTree,!0);return r&&Object.assign(n,r.rawParams),[r?.branch||[this.routesById.__root__],n,r?.route]},this.buildLocation=o=>{if(!!1){let s=this.staticLocations.get(o);if(s)return s}let n=!1,r=a((s={})=>{if(s.href){let N=Et(s.href,{});s={...s,to:de(this.rewrite,new URL(N.pathname,this.origin)).pathname,search:this.options.parseSearch(N.search),hash:N.hash.slice(1)}}let c=s._fromLocation||this._pendingLocation||this.latestLocation,l,u=a(()=>(n=!0,c),"current"),f=a(()=>(n=!0,l??=this.matchRoutesLightweight(c)),"currentMatch"),d=s.to?`${s.to}`:".",h=se(d[0]==="/"?"":s.unsafeRelative==="path"?u().pathname:s.from??f()[1],d,this.options.trailingSlash,this.resolvePathCache),p=this.routesByPath[U(h)],m=h.includes("$"),g;if(p)g=p._branch??=De(p);else if(m)g=[];else{let[N,T,A]=this.getMatchedRoutes(h);g=N,this.options.notFoundRoute&&(!A||A.path!=="/"&&T["**"])&&(g=[...g,this.options.notFoundRoute])}let S=m?p?._interpolation??Pt(!1,{fullPath:h},0):void 0,y;for(let N of g){let T=N.options.params?.stringify??N.options.stringifyParams;if(T){let A=f()[3];if(y??=qe(s.params,A),!Ft(y))break;y===A&&(y=Object.assign(Tt(),y));try{Object.assign(y,T(y))}catch{}}}y??=qe(s.params,Ir(s.params,S)?f()[3]:Ge);let R=o.leaveParams?h:At(xt(S?ie(h,S,y,this.pathParamsDecoder):h)),b=Or(g,o._includeValidateSearch),x=a(()=>{let N=f()[2];if(o._includeValidateSearch&&this.options.search?.strict){let T={};g.forEach(A=>{if(A.options.validateSearch)try{Object.assign(T,he(A.options.validateSearch,{...T,...N}))}catch{}}),N=T}return N},"fromSearch"),P=b.length?Nr(b,x(),s):s.search===!0?x():typeof s.search=="function"?s.search(x()):s.search||Ge,_=this.options.stringifySearch(P),v=s.hash===!0?u().hash:typeof s.hash=="function"?s.hash(u().hash):s.hash||void 0,w=v?`#${v}`:"",E=s.state?s.state===!0?u().state:typeof s.state=="function"?s.state(u().state):s.state:Ge,L=`${R}${_}${w}`,k,C,O=!1;if(this.rewrite){let N=new URL(L,this.origin),T=N.origin,A=Ae(this.rewrite,N);k=Ke(N),je(A,T)?(C=A.href,O=!0):C=At(Ke(A))}else k=Mo(L),C=k;return{publicHref:C,href:k,pathname:R,search:P,searchStr:_,state:E,hash:v??"",external:O,unmaskOnReload:s.unmaskOnReload}},"build"),i=r(o);if(o.mask)i.maskedLocation=r({from:o.from,...o.mask});else if(this.options.routeMasks){let s=Zo(i.pathname,this.processedTree);if(s){let c=Object.assign(Tt(),s.rawParams),{from:l,params:u,...f}=s.route,d=qe(u,c);i.maskedLocation=r({from:o.from,...f,params:d})}}return!!1&&!n&&o._fromLocation&&!i.maskedLocation&&this.staticLocations.set(o,i),i},this.commitLocation=async({viewTransition:o,ignoreBlocker:n,...r})=>{if(!1)return;let i=r.maskedLocation??r;if(i.external&&!!1)return un(this,i.publicHref,{replace:r.replace,ignoreBlocker:n});let s,c=U(this.latestLocation.href)===U(r.href)&&J(ln(r.state),ln(this.latestLocation.state)),l=this._commitPromise,u,f=new Promise(d=>{u=d});if(f.resolve=()=>{u(),l?.resolve()},this._commitPromise=f,c)this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=r;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state={...p.state,__hashScrollIntoViewOptions:h??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=o,s=r.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.n=r.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:o,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:s,...c}={})=>{if(!1)return Promise.resolve();let l=this.buildLocation({...c,_includeValidateSearch:!0});this._pendingLocation=l;let u=this.commitLocation({...l,viewTransition:i,replace:o,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:s});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:o,reloadDocument:n,href:r,publicHref:i,...s})=>{if(!1)return;let c=r?st(r):void 0;if(c||n){if(o!==void 0||!r){let u=this.buildLocation({to:o,...s}),f=u.maskedLocation??u;r??=f.publicHref,i??=f.publicHref}return un(this,!c&&i?i:r,s)}return this.buildAndCommitLocation({...s,href:r,to:o,_isNavigate:!0})},this.load=async o=>{if(!1)return(void 0)(this,o);this.updateLatestLocation(),o?.action&&(this._scroll.h=o.action.type==="PUSH"||o.action.type==="REPLACE"),await mn(this,o)},this.startViewTransition=o=>{let n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&!!1&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let i=this.latestLocation,s=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(yt(i,s)):n.types;if(c===!1)return o();r={update:o,types:c}}else r=o;return document.startViewTransition(r).updateCallbackDone}return o()},this.invalidate=o=>{let n=this._committed,r=o?.filter,i=this._preloads,s=new Set,c=a(f=>{(!r||r(f))&&s.add(f.id)},"consider");n.forEach(c),this._cache.forEach(c),i?.forEach(f=>f.forEach(c)),this._tx?.[3].forEach(c);let l=[];for(let[f,d]of i??[])d.some(h=>s.has(h.id))&&(i.delete(f),l.push(f));let u=a(f=>{if(s.has(f.id)){let d=this.routesById[f.routeId],h={...f,invalid:!0,...(o?.forcePending||f.status==="error"||f.status==="notFound")&&cn(d)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,h}return f},"invalidate");this._committed=n.map(u);for(let[f,d]of this._cache)s.has(f)&&(d.invalid=!0,o?.forcePending&&(d.status="pending"));for(let f of s){let d=this._flights?.get(f);this._flights?.delete(f),d&&!d[2]&&l.push(d[1])}for(let f of l)f.abort();return this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.resolveRedirect=o=>{let n=o.options,r=o.headers.get("Location")||n.href;if(!r){let s=this.buildLocation(n);r=(s.maskedLocation??s).publicHref||"/"}let i;if(Ne.test(r)||(i=st(r))&&!this.protocolAllowlist.has(i))throw new Error("Redirect blocked: unsafe protocol");if(i==="http:"||i==="https:"){let s=new URL(r);s.pathname.startsWith("//")?r=s.href:je(s,this.origin)||(r=Ke(s),i=void 0)}return i&&(n.reloadDocument=!0),n.href=r,o.headers.set("Location",r),o},this.clearCache=o=>{let n=this._cache,r=this._preloads,i=o?.filter,s=[],c=[];for(let[u,f]of n)(!i||i(f))&&(c.push(u),s.push(f));let l=[];for(let[u,f]of r??[])(!i||f.some(i))&&(l.push(u),s.push(...f));for(let u of c)n.delete(u);for(let u of l)r.delete(u);for(let u of s){let f=u._flight;u._flight=void 0,f&&!--f[2]&&(this._flights?.get(u.id)===f&&this._flights.delete(u.id),l.push(f[1]))}for(let u of l)u.abort()},this.loadRouteChunk=vt,this.preloadRoute=o=>gn(this,o),this.matchRoute=(o,n)=>{let r={...o,to:o.to?se(o.from||"",o.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(r),s=this.stores.status.get()==="pending";if(n?.pending&&!s)return!1;let c=n?.pending??!s?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=Qo(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,c.pathname,this.processedTree);return!l||o.params&&!J(l.rawParams,o.params,!0)?!1:n?.includeSearch??!0?J(c.search,i.search,!0)?l.rawParams:!1:l.rawParams},this.getStoreConfig=e,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Ao(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ko,parseSearch:t.parseSearch??jo,protocolAllowlist:t.protocolAllowlist??Oe}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let e=this.options.notFoundRoute;e&&(e.init(99999999999),this.routesById[e.id]!==e&&(e._interpolation=Pt(!1,e,0)),this.routesById[e.id]=e)}matchRoutesInternal(t,e){let[o,n,r]=this.getMatchedRoutes(t.pathname),i=o,s=!1;(r?r.path!=="/"&&n["**"]:U(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:s=!0);let c=s?Fr(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,f=a((h,p)=>{let m=u[p];return m?.routeId===h.id?m:h===this.options.notFoundRoute?u.find(g=>g.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<i.length;h++){let p=i[h],m=l[h-1],g,S,y;{let O=m?.search??t.search,N=m?._strictSearch??void 0;try{let T=he(p.options.validateSearch,{...O})??void 0;g={...O,...T},S={...N,...T}}catch(T){let A=T;if(T instanceof $t||(A=new $t(T.message,{cause:T})),e?.throwOnError)throw A;g=O,S={},y=A}}let R="",b="";try{R=p.options.loaderDeps?.({search:g})??"",b=R&&JSON.stringify(R)||""}catch(O){if(e?.throwOnError)throw O;y??=O}let x=Tt(),P=p._interpolation?ie(p.fullPath,p._interpolation,n,this.pathParamsDecoder,x):p.fullPath,_=p.id+P+b,v=f(p,h),w=this._cache.get(_)??(v?.id===_?v:void 0);d=w?._strictParams??Object.assign(x,d);let E;if(!w)try{fn(p,d)}catch(O){if(q(O)||le(O)?E=O:E=new pn(O.message,{cause:O}),e?.throwOnError)throw E}let L=v?"stay":"enter",k;if(w)k={...w,cause:L,search:v?mt(v.search,g):mt(w.search,g),_strictSearch:S,searchError:y};else{let O=cn(p)?"pending":"success";k={id:_,ssr:p.options.ssr,index:h,routeId:p.id,params:v?.params??d,_strictParams:d,pathname:P,updatedAt:Date.now(),search:v?mt(v.search,g):g,_strictSearch:S,searchError:y,status:O,isFetching:!1,error:void 0,paramsError:E,context:{},abortController:e?._controller??new AbortController,cause:L,loaderDeps:v?Q(v.loaderDeps,R):R,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}let C=c===p.id;k._notFound&&!C&&(k.error=void 0),k._notFound=C,l[h]=k}for(let h=0;h<l.length;h++){let p=l[h];p.params=p.cause==="stay"?mt(p.params,d):d,e?._controller&&(p.context={})}return l}matchRoutesLightweight(t){let e=tt(this.stores.ids.get()),o=e?this.stores.byRoute.get(e).get():void 0,n=o?.id,r=this.lightweightCache.get(t);if(r&&r[0]===n)return r[1];let[i,s]=this.getMatchedRoutes(t.pathname),c=tt(i),l={...t.search};for(let h of i)try{Object.assign(l,he(h.options.validateSearch,l))}catch{}let u=o&&o.routeId===c.id&&o.pathname===t.pathname,f;if(u)f=o.params;else{let h=s;for(let p of i)try{fn(p,h)}catch{}f=h}let d=[i,c.fullPath,l,f];return this.lightweightCache.set(t,[n,d]),d}};async function un(t,e,{replace:o,ignoreBlocker:n}){if(!Mt(e,t.protocolAllowlist)){if(!n){let r=t.history._getBlockers();for(let i of r)if(i?.blockerFn&&await i.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:o?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(e),o?window.location.replace(e):window.location.href=e}}a(un,"documentNavigation");var $t=class extends Error{static{a(this,"SearchParamError")}},pn=class extends Error{static{a(this,"PathParamError")}};function he(t,e){if(t==null)return{};if("~standard"in t){let o=t["~standard"].validate(e);if(o instanceof Promise)throw new $t("Async validation not supported");if(o.issues)throw new $t(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}a(he,"validateSearch");function qe(t,e){if(t===void 0||t===!0)return e;let o=Object.create(null);return t===!1||t===null?o:typeof t=="function"?(Object.assign(o,e),Object.assign(o,t(o))):Object.assign(o,e,t)}a(qe,"resolveNextParams");function Ir(t,e){return typeof t=="function"?!0:!e||t===!1||t===null?!1:t===void 0||t===!0||e.some(o=>typeof o!="string"&&!oe.call(t,o[1]))}a(Ir,"needsInheritedParams");var Ge=Object.freeze({});function Or(t,e){let o=[];for(let n=0;n<t.length;n++){let r=t[n].options;if("search"in r)r.search?.middlewares&&o.push(...r.search.middlewares);else if(r.preSearchFilters||r.postSearchFilters){let s=a(({search:c,next:l})=>{let u=l(r.preSearchFilters?r.preSearchFilters.reduce((f,d)=>d(f),c):c);return r.postSearchFilters?r.postSearchFilters.reduce((f,d)=>d(f),u):u},"legacyMiddleware");o.push(s)}let i=r.validateSearch;if(e&&i){let s=a(({search:c,next:l,meta:u})=>{let f=l(c);try{let d=he(i,f);if(u&&d)for(let h in d)h in f||(u.defaulted||=new Map).set(h,d[h]);return{...f,...d}}catch{}return f},"validate");o.push(s)}}return o}a(Or,"getSearchMiddlewares");function Nr(t,e,o){let n=a((r,i,s)=>{if(r>=t.length){if(!o.search)return{};if(o.search===!0)return i;let l=pt(o.search,i);return s&&(s.explicit=l),l}let c=a((l,u)=>{if(u){let f=s||{};return{search:n(r+1,l,f),meta:f}}return n(r+1,l,s)},"next");return t[r]({search:i,next:c,meta:s})},"applyNext");return n(0,e)}a(Nr,"applySearchMiddleware");function Fr(t,e){if(t!=="root"){let o;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.options.notFoundComponent)return r.id;o||=r.children&&r.id}if(o)return o}return Y}a(Fr,"findGlobalNotFoundRouteId");function fn(t,e){let o=t.options.params?.parse??t.options.parseParams;o&&Object.assign(e,o(e))}a(fn,"extractStrictParams");function Ye(t,e){return t.options[e]?.preload?.()}a(Ye,"preloadComponent");function Tr(t,e){let o=Ye(t,"component"),n=Ye(t,"pendingComponent");return e&&(n?n=n.then(e):e()),o&&n?Promise.all([o,n]).then(()=>{}):o??n}a(Tr,"loadComponents");function vt(t,e,o){let n=a(()=>e===!1?void 0:e?Ye(t,e):Tr(t,o),"afterLazy"),r=t._lazy;if(r)return r===!0?n():r.then(n);if(!t.lazyFn)return n();let i=t.lazyFn().then(s=>{{let{id:c,...l}=s.options;Object.assign(t.options,l),t._lazy=!0}},s=>{throw t._lazy=void 0,s});return t._lazy=i,i.then(n)}a(vt,"loadRouteChunk");function Qe(t){let e=t.findIndex(o=>o.status!=="success"||o._notFound)+1;return e&&e<t.length?t.slice(0,e):t}a(Qe,"_getRenderedMatches");var nt=0,ct=1,me=2,W=3,ht=[4];function Ht(t){return typeof t[0]=="number"}a(Ht,"isControl");function Rt(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((o,n)=>{let r=a(()=>n(e),"abort");e.addEventListener("abort",r,{once:!0}),Promise.resolve(t).then(o,n).then(()=>e.removeEventListener("abort",r))})}a(Rt,"waitFor");function _t(t,e){return t.routesById[e.routeId]}a(_t,"getRoute");function zt(t,e,o){return le(t)?[W,t]:q(t)?(t.routeId||=o,[me,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[ct,t]):[nt,t]}a(zt,"normalize");function to(t,e){let o=zt(e,!0,t.id);if(o[0]!==ct)return o;try{t.options.onError?.(o[1])}catch(n){o=zt(n,!0,t.id)}return o}a(to,"normalizeError");function Vt(t,e,o,n,r){return r[0].signal.aborted?ht:no(t,e,o,to(o,n),r)}a(Vt,"normalizeLaneError");async function Mr(t,e,o,n,r,i){let[s,c]=e,l=o[0].signal,u=!!o[3];for(let f=o[6]??0;f<n;f++){let d=c[f],h=_t(t,d);d.abortController=o[0];let p=c[f-1]?.context??t.options.context??{},m={params:d.params,location:s,navigate:a(R=>t.navigate({...R,_fromLocation:s}),"navigate"),buildLocation:t.buildLocation,cause:u?"preload":d.cause,abortController:o[0],preload:u,matches:c,routeId:h.id};try{let R=d._ctx||=h.options.context?h.options.context({...m,deps:d.loaderDeps,context:p})||{}:void 0;d.context={...p,...R}}catch(R){return at(t,d),[f,Vt(t,e,h,R,o)]}if(l.aborted)return[f,ht];let g=d.paramsError??d.searchError;if(g!==void 0)return at(t,d),[f,Vt(t,e,h,g,o)];let S=h.options.beforeLoad;if(!S)continue;let y=d.status;f>=i&&(d.status="pending",o[7]?.());try{Ut(t,d,"beforeLoad",o[0]);let R=S({...m,search:d.search,context:d.context,...t.options.additionalContext}),b=await(typeof R?.then=="function"?Rt(R,l):R);if(l.aborted)return[f,ht];let x=no(t,e,h,zt(b,!1,h.id),o);if(x[0]!==nt)return at(t,d),[f,x];d.context={...d.context,...b}}catch(R){return at(t,d),[f,Vt(t,e,h,R,o)]}finally{d.status=y,Ut(t,d,!1,o[0])}}r()}a(Mr,"contextualize");function eo(t,e,o){if(!(!o||--o[2])){if(t._flights?.get(e.id)===o){let n=t._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(e)&&n[3].some(r=>r.id===e.id)&&n[3].some(r=>r.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return o[1]}}a(eo,"releaseOwnedFlight");function at(t,e){let o=e._flight;e._flight=void 0,eo(t,e,o)?.abort()}a(at,"releaseFlight");function j(t,e,o,n){let r=[];for(let i of e)if(!o?.includes(i)){let s=i._flight;if(i._flight=void 0,n&&s?.[2]===1&&t._flights?.get(i.id)===s&&o?.some(c=>c.id===i.id))s[2]=0;else{let c=eo(t,i,s);c&&r.push(c)}}for(let i of r)i.abort()}a(j,"transferMatchResources");function oo(t){for(let e of t){let o=e._flight;o&&o[2]++}}a(oo,"acquireMatchResources");function Ut(t,e,o,n){if(e.isFetching=o,n&&t._tx?.[0]!==n)return;let r=t.stores.byRoute.get(e.routeId),i=r?.get();i?.id===e.id&&r.set({...i,isFetching:o})}a(Ut,"setFetching");function wn(t,e,o,n,r,i,s){let c=e[0];return{params:o.params,location:c,navigate:a(l=>t.navigate({...l,_fromLocation:c}),"navigate"),cause:s?"preload":o.cause,abortController:r,preload:s,deps:o.loaderDeps,parentMatchPromise:i,context:o.context,route:n,...t.options.additionalContext}}a(wn,"getLoaderContext");async function yn(t,e,o,n,r,i,s){let c=s[0],l=c.signal;if(l.aborted)return ht;if(!r)return[nt,void 0];let u=o._flight;Ut(t,o,"loader",c);try{if(!u){let f=new AbortController;u=[Promise.resolve().then(()=>r(wn(t,e,o,n,f,i,!!s[3]))).then(d=>zt(d,!1,n.id),d=>zt(d,!0,n.id)).then(d=>(d[0]!==nt&&t._flights?.get(o.id)===u&&(t._flights.delete(o.id),u[2]||f.abort()),d[0]===ct&&u[2]?to(n,d[1]):d)),f,1],(t._flights??=new Map).set(o.id,u)}return o._flight=u,o.abortController=u[1],no(t,e,n,await Rt(u[0],l),s)}catch(f){if(f!==l||!l.aborted)throw f;return at(t,o),ht}finally{Ut(t,o,!1,c)}}a(yn,"loadResource");function vn(t,e,o){e[0]!==W&&(t.status="success",t.error=void 0,e[0]===nt?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=o):t.invalid=!0)}a(vn,"settleInto");function Dr(t,e,o){let n=t._cache.get(e.id);if(n!==o||t._committed.some(i=>i.id===e.id&&i._flight===e._flight))return;let r={...e,_notFound:void 0,context:{}};r._flight&&r._flight[2]++,t._cache.set(e.id,r),n&&at(t,n)}a(Dr,"cacheLoaderMatch");function Sn(t,e){return e[0]===ct||e[0]===me?{...t,status:e[0]===ct?"error":"notFound",error:e[1],_flight:void 0}:t}a(Sn,"getParentSnapshot");function Ar(t,e,o,n,r,i,s){let c=e[1][o],l=_t(t,c),u=!!i[3],f=t._cache.get(c.id),d,h=!1,p;try{if(c.status==="success"&&(d=l.options.shouldReload,typeof d=="function"&&(d=d(wn(t,e,c,l,i[0],r,u))),i[0].signal.aborted&&(p=ht)),!p)if(c.status!=="success")h=!0;else{let C=u||c.preload?l.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:l.options.staleTime??t.options.defaultStaleTime??0;h=!!(c.invalid||d||d===void 0&&Date.now()-c.updatedAt>=C&&(i[5]||c.cause==="enter"||i[2].some(O=>O.routeId===c.routeId&&O.id!==c.id)))}}catch(C){c.invalid=!0,at(t,c),p=Vt(t,e,l,C,i)}let m=l.options.loader,g=typeof m=="function",S=g?m:m?.handler,y=!u||l.options.preload!==!1,R=y&&m?t._flights?.get(c.id):void 0;R===c._flight||p?R=void 0:R&&!h&&!u&&d===void 0?h=!0:h||(R=void 0);let b=!!(m&&h&&c.status==="success"&&!u&&!i[4]&&((g?void 0:m.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),x=h&&y,P=x&&!b&&(c.status!=="success"||!!m),_=o>=s?i[7]:void 0,v=l.lazyFn&&l._lazy!==!0?_:void 0;if(x&&!m&&(c.invalid=!1,c.updatedAt=Date.now()),R&&R[2]++,P){let C=c._flight;c._flight=R,eo(t,c,C)?.abort(),o>=s&&(c.status="pending"),_?.()}x||(c.isFetching=!1);let w=!p&&P?yn(t,e,c,l,S,r,i).then(C=>(vn(c,C,u),C[0]===nt&&(m&&!i[0].signal.aborted&&Dr(t,c,f),o>=s&&(c.status="pending")),C)):Promise.resolve(p??[nt,c.loaderData]),E=(async()=>{try{let O=vt(l,void 0,v);O&&await Rt(O,i[0].signal)}catch(O){if(!e[1].some((N,T)=>T<=o&&(N.status==="error"||N.status==="notFound"||N._notFound)))return[o,Vt(t,e,l,O,i)]}let C=await w;P&&C[0]===nt&&c.status==="pending"&&!i[0].signal.aborted&&(c.status="success",_?.())})();if(n.push([o,w,E]),!b)return w.then(C=>Sn(c,C));let L={...c,status:"pending",preload:!1,_flight:R};c.invalid=!1,c.isFetching="loader";let k=yn(t,e,L,l,S,r,i).then(C=>(c.isFetching=!1,vn(L,C,!1),C));return(e[2]??=[]).push([o,k,E,L]),k.then(C=>Sn(L,C))}a(Ar,"createLoaderTask");async function Xe(t,e,o,n,r=0){let i=o?.[1][1],s=i?.routeId?e.findIndex(c=>c.routeId===i.routeId):o?.[0]??e.length-1;s<0&&(s=0);for(let c=s;c>=0;c--){let l=_t(t,e[c]);try{let u=vt(l,!1);u&&await Rt(u,n)}catch(u){if(u===n&&n.aborted)throw u}if(l.options.notFoundComponent)return c}return i?.routeId?s:r}a(Xe,"getNotFoundBoundary");function St(t,e){e[2]&&(j(t,e[2].map(o=>o[3])),e[2]=void 0)}a(St,"discardBackground");async function Rn(t,e,o,n){let r;try{await Promise.all(t.map(i=>i[1].then(async s=>{let c=i[0];if(!(n&&c>=await n)){if(s[0]>=W)throw[c,s];!r&&s[0]!==nt&&(r=[c,s],await Promise.all((o??[]).map(l=>{if(!(l[0]<=c))return l[1].then(u=>{if(u[0]===W)throw[l[0],u]})})))}})))}catch(i){return i}return e??r}a(Rn,"settleTasks");function no(t,e,o,n,r,i){for(;n[0]===W;){let s=n[1],c=s.options;try{if((c.href||s.headers.has("Location"))&&(t.resolveRedirect(s),c.reloadDocument)||(c.reloadDocument?r[3]:r[1]>=20))return n;let l=t.buildLocation({...c,_fromLocation:e[0],_includeValidateSearch:!0}),u=l.maskedLocation??l;if(u.external){let f=s.clone();return f.options={...c},f.headers.set("Location",u.publicHref),t.resolveRedirect(f),r[3]?[W,f]:[W,f,u]}return[W,s,l]}catch(l){n=i?[ct,l]:to(o,l),i=!0}}return n}a(no,"materializeRedirect");async function xn(t,e,o,n,r,i){let s=e[1],c=await r,l=!1,u=s.findIndex(p=>p._notFound),f=a(p=>p[1][0]===me?Xe(t,s,p,n.signal):p[0],"boundaryOf"),d=u<0?s.length:u;if((c?.[1][0]??0)>=W)d=0;else if(c){d=c[2]??=await f(c);for(let p of o){if(p[0]>=d)break;let m=await p[1];if(m[0]!==nt&&m[0]<W&&!("loaderData"in s[p[0]])){c=[p[0],m],d=c[2]=await f(c);break}}}for(let p of o){if(p[0]>=d)break;let m=await p[2];if(m){c=m;break}}if((c?.[1][0]??0)>=W){let p=c[1];if(p[0]!==W||p[1].options.reloadDocument||p[2])return St(t,e),p;l=!0,c=[0,[ct,new Error("Too many redirects")]]}let h=c?c[2]??await f(c):u;if(h>=0){let p=c?.[1],m=p?.[0],g=s[h],S=p?.[1],y=a(()=>{p&&(g._notFound=void 0,m===ct?g.status="error":(S.routeId=g.routeId,g.routeId===t.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=S,g.isFetching=!1)},"install");y(),p||i?.();let R=_t(t,g);try{await Rt(p?Promise.resolve().then(()=>vt(R,m===ct?"errorComponent":"notFoundComponent")):Promise.all([vt(R),vt(R,"notFoundComponent")]),n.signal)}catch(b){if(b===n.signal&&n.signal.aborted)return St(t,e),ht}p?l&&(n.abort(),await Promise.all([...o.map(b=>b[1]),...o.map(b=>b[2]),...(e[2]??[]).map(b=>b[1])]),St(t,e),j(t,s),y()):g.status="success"}return e}a(xn,"reduceLane");async function bn(t,e,o,n=0,r=e[1].length){let i=e[1];for(let s=n;s<r;s++){let c=i[s],l=_t(t,c).options;if(l.head||l.scripts)try{let u={ssr:t.options.ssr,matches:i,match:c,params:c.params,loaderData:c.loaderData},[f,d]=await Rt(Promise.all([l.head?.(u),l.scripts?.(u)]),o);c.meta=f?.meta,c.links=f?.links,c.headScripts=f?.scripts,c.styles=f?.styles,c.scripts=d}catch(u){if(u===o&&o.aborted)break;console.error(u)}if(c.status!=="success"||c._notFound)break}return e}a(bn,"projectLane");async function Cn(t,e,o,n){let r=[e,o],i=n[0].signal,s;try{let c=t.stores.matches.get(),l=o.findIndex(y=>y._notFound);if(t.options.notFoundMode!=="root"&&l>=0){let y=await Xe(t,o,void 0,i,l);o[l]._notFound=void 0,o[y]._notFound=!0,l=y}let u=l<0?o.length:l+1,f=0;for(;f<u&&f!==l;){let y=o[f],R=n[2][f],b=c[f];if(R?.id!==y.id||R.status!=="success"||y.preload||b?.id!==y.id||b.status!=="success"||(f++,R._notFound||b._notFound))break}let d=[],h=n[6]??0,p=h?Promise.resolve(o[h-1]):void 0,m=a(()=>{for(let y=h;y<u&&!i.aborted;y++)p=Ar(t,r,y,d,p,n,f)},"planSuccessfulLane"),g=await Mr(t,r,n,u,m,f);if(g){if(n[4]=!0,u=g[0],g[1][0]===me){let y=await Xe(t,o,g,i);g[2]=y,u=Math.min(u,y+1)}else g[1][0]>=W&&(u=0);m()}if(!i.aborted&&!n[3]){let y=[];for(let[R,b]of t._flights??[])b[2]||(t._flights.delete(R),y.push(b[1]));for(let R of y)R.abort()}let S=xn(t,r,d,n[0],Rn(d,g,r[2]),n[7]);r[2]?.length&&(r[3]=Rn(r[2],void 0,void 0,S.then(y=>Ht(y)?0:Qe(o).length,()=>0))),s=await S}catch(c){if(St(t,r),c===i&&i.aborted)return ht;throw c}return Ht(s)?s:bn(t,s,i,n[6]===o.length?n[6]:0)}a(Cn,"executeClientLane");function Ze(t,e){if(t._tx!==e)return;let o=e[3],n=t.stores.matches.get(),r=t._pending;for(let i=0;i<o.length;i++){let s=o[i],c=s.status==="success"&&!s._notFound,l=n[i]?.id===s.id&&n[i]?.status==="pending";if(c&&!l)continue;let u=_t(t,s),f=c||s.invalid?0:u.options.pendingMs??t.options.defaultPendingMs,d=u.options.pendingComponent??t.options.defaultPendingComponent;if(!d||typeof f!="number"||f===1/0){r&&(r[0]=e,r[2]=0,r[4]=!0);return}let h=u.options.pendingMinMs??t.options.defaultPendingMinMs??0,p=!1;if(r?.[1]===s.id?(p=r[0]!==e,r[0]=e):(clearTimeout(r?.[3]),t._pending=r=void 0),r||(t._pending=r=[e,s.id,l?Date.now()+h:e[4]+f,void 0,l||void 0,d]),r[4]&&!p&&r[5]===d)return;if(r[5]=d,!r[4]){clearTimeout(r[3]);let S=r[2]-Date.now();if(S>0){r[3]=setTimeout(()=>Ze(t,e),S);return}r[2]=0}let m=o.map(S=>({...S,_flight:void 0}));m[i].status="pending";let g=r[4]=t.startTransition(()=>t.stores.setMatches(m),m).then(S=>(S&&t._pending===r&&r[4]===g&&!r[2]&&(r[2]=Date.now()+h),S));return}}a(Ze,"offerPending");function Bt(t,e){let o=t._pending;(t._tx===e||!t._tx?.[3].some(n=>n.id===o?.[1]))&&(clearTimeout(o?.[3]),t._pending=void 0)}a(Bt,"finishPending");async function _n(t,e){let o=t._pending;if(!o)return;clearTimeout(o[3]);let n=o[2]-Date.now();if(!o[4]||n<=0||!Qe(e[3]).some(i=>i.id===o[1]))return;let r;try{await Rt(new Promise(i=>{r=setTimeout(i,n)}),e[0].signal)}catch{}clearTimeout(r)}a(_n,"awaitPendingMinimum");function Pn(t,e){t._committed=e,t.stores.setMatches(e)}a(Pn,"publishMatches");function $r(t,e,o,n){let r=t._committed,i=t._lifecycleEnd,s=t._cache;for(let f of o)f.preload=!1,n&&(f._assetEnd=void 0);let c=Qe(o).length,l=new Map;{let f=Date.now(),d=new Set;for(let h=0;h<o.length;h++){let p=o[h];(h<c||p.status==="success")&&d.add(p.id)}for(let h of[...r,...s.values()]){if(h.status!=="success"||d.has(h.id))continue;let p=_t(t,h);!p.options.loader||f-h.updatedAt>=(h.preload?p.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:p.options.gcTime??t.options.defaultGcTime??3e5)||l.set(h.id,s.get(h.id)===h?h:{...h,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=l;let u=t._lifecycleEnd=dn(o);Pn(t,o),j(t,[...s.values(),...r].filter(f=>f._flight&&l.get(f.id)!==f),o),hn(t,r,o,i,u,e)}a($r,"commitMatches");async function pe(t,e){let o=t._tx;for(;o&&o!==e;)e=o,await o[5],o=t._tx}a(pe,"awaitCurrent");function En(t,e,o){let n=o[1].options,r=o[2];if(!r)return t.navigate({...n,replace:!0,ignoreBlocker:!0});if(n.reloadDocument)return t.navigate({href:(r.maskedLocation??r).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});r._redirects=e[1]+1,t._pendingLocation=r;let i=t.commitLocation({...r,viewTransition:n.viewTransition,replace:!0,resetScroll:n.resetScroll,hashScrollIntoView:n.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===r&&(t._pendingLocation=void 0)}),i}a(En,"followRedirect");async function Br(t,e,o,n,r){let i=o.map(l=>({...l}));oo(i);for(let l of n)at(t,i[l[0]]),i[l[0]]=l[3];let s=[e[2],i],c;try{c=await xn(t,s,n,e[0],r)}catch(l){throw j(t,i),l}if(Ht(c)){j(t,i),c[0]===W&&t._tx===e&&t._committed===o&&await En(t,e,c);return}if(await bn(t,c,e[0].signal),t._tx!==e||t._committed!==o){j(t,i);return}for(let l of i){let u=t._cache.get(l.id);u?._flight&&u._flight===l._flight&&(t._cache.delete(l.id),at(t,u))}Pn(t,i),j(t,o,i)}a(Br,"runBackground");async function Vr(t,e,o,n,r,i){let s=await Cn(t,e[2],e[3],[e[0],e[1],t._committed,void 0,r,o,i,n]);if(Ht(s)){let d=s[0]===W&&t._tx===e;if((!d||s[1].options.reloadDocument)&&Bt(t,e),j(t,e[3]),e[3]=[],!d)return;if(t._tx!==e){Bt(t,e);return}await En(t,e,s);return}let c=s[1];if(t._tx===e&&await _n(t,e),t._tx!==e){Bt(t,e),j(t,c),St(t,s);return}let l=e[2],u=yt(l,t.stores.resolvedLocation.get()),f=s[2];await t.startViewTransition(async()=>{if(t._tx===e&&await _n(t,e),t._tx!==e){Bt(t,e),j(t,c),St(t,s);return}let d=a(()=>{Bt(t,e),$r(t,e,c,i),t._tx===e&&(t.emit({type:"onLoad",...u}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...u}))},"commit"),h=await t.startTransition(d,c);if(t._tx!==e){St(t,s);return}f?.length&&Br(t,e,c,f,s[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(l),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...u}),h&&t._tx===e&&t.emit({type:"onRendered",...u})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}a(Vr,"runClientTransaction");async function mn(t,e){let o=!1,n=t._tx,r=t.stores.resolvedLocation.get(),i=r??t.stores.location.get(),s=t.latestLocation,c=t._pendingLocation,l=c?.href===s.href?c._redirects??0:0,u=t._handoff,f=o?void 0:u?.[0](),d=new AbortController,h=t._preflight;if(t._preflight=d,!o&&!f&&u?.[1](),h?.abort(),!d.signal.aborted){let P=yt(s,r);t.emit({type:"onBeforeNavigate",...P}),d.signal.aborted||t.emit({type:"onBeforeLoad",...P})}if(d.signal.aborted){await pe(t,n);return}let p=i.href===s.href,m=d,g=t.matchRoutes(s,{_controller:d});oo(g);let S=f?u[1](g):void 0;if(S?m=f:f?.abort(),d.signal.aborted){j(t,g),await pe(t,n);return}t._preflight=void 0;let y,R=a(()=>Vr(t,x,p,()=>Ze(t,x),e?.sync,S),"run"),b=e?.sync?new Promise(P=>y=P):Promise.resolve().then(R),x=[m,l,s,g,Date.now(),b.then(()=>pe(t,x))];if(t._tx=x,n){for(let P of t.stores.matches.get()){if(t._tx!==x)break;P.isFetching&&Ut(t,P,!1)}n[0].abort(),j(t,n[3],x[3],!0)}if(t._tx!==x){j(t,x[3]),x[3]=[],y?.(),await pe(t,x);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(s)}),(S||!t._committed.length&&g[0]?.status!=="success"&&!g.some(P=>P._notFound))&&Ze(t,x),y?.(R()),await x[5]}a(mn,"loadClientRoute");async function gn(t,e){let o=t.buildLocation(e);for(let n=0;;n++){let r=t._committed,i=new AbortController,s,c,l;try{try{s=t.matchRoutes(o,{_controller:i}),oo(s),c=(t._preloads??=new Map).set(i,s),l=await Cn(t,o,s,[i,n,r,!0])}finally{c&&(c=c.delete(i),j(t,s)),i.abort()}if(!Ht(l))return l[1];if(!c||l.length<3)return;o=l[2]}catch(u){q(u)||console.error(u);return}}}a(gn,"preloadClientRoute");var ro="Error preloading route! \u261D\uFE0F";var ge=class{static{a(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let o=this.options,n=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Y:this.parentRoute||ut();let r=n?Y:o?.path;r&&r!=="/"&&(r=ne(r));let i=o?.id||r,s=n?Y:it((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(i??""));r==="__root__"&&(r="/");let c=s==="__root__"?"/":r===void 0?this.parentRoute.fullPath:it(this.parentRoute.fullPath+"/"+r);this._path=r,this._id=s,this._fullPath=c,this._to=U(c)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>qo({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var so=class extends ge{static{a(this,"BaseRootRoute")}constructor(t){super(t)}};var _e=F(V(),1);function Ln({update:t,notify:e,unwatched:o}){return{link:n,unlink:r,propagate:i,checkDirty:s,shallowPropagate:c};function n(u,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===u)return;let p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===u){p.version=d,f.depsTail=p;return}let m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===f)return;let g=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),h!==void 0?h.nextDep=g:f.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function r(u,f=u.sub){let d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&o(d),p}function i(u){let f=u.nextSub,d;t:do{let h=u.sub,p=h.flags;if(p&60?p&12?p&4?!(p&48)&&l(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&e(h),p&1){let m=h.subs;if(m!==void 0){let g=(u=m).nextSub;g!==void 0&&(d={value:f,prev:d},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function s(u,f){let d,h=0,p=!1;t:do{let m=u.dep,g=m.flags;if(f.flags&16)p=!0;else if((g&17)===17){if(t(m)){let S=m.subs;S.nextSub!==void 0&&c(S),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,f=m,++h;continue}if(!p){let S=u.nextDep;if(S!==void 0){u=S;continue}}for(;h--;){let S=f.subs,y=S.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=S,p){if(t(f)){y&&c(S),f=u.sub;continue}p=!1}else f.flags&=-33;f=u.sub;let R=u.nextDep;if(R!==void 0){u=R;continue t}}return p}while(!0)}function c(u){do{let f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}a(Ln,"createReactiveSystem");function On(t,e,o){let n=typeof t=="object",r=n?t:void 0;return{next:(n?t.next:t)?.bind(r),error:(n?t.error:e)?.bind(r),complete:(n?t.complete:o)?.bind(r)}}a(On,"toObserver");var io=[],ve=0,{link:kn,unlink:Ur,propagate:Wr,checkDirty:Nn,shallowPropagate:In}=Ln({update(t){return t._update()},notify(t){io[ao++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,Se(t))}}),ye=0,ao=0,et,co=0;function lo(t){try{++co,t()}finally{--co||uo()}}a(lo,"batch");function Se(t){let e=t.depsTail,o=e!==void 0?e.nextDep:t.deps;for(;o!==void 0;)o=Ur(o,t)}a(Se,"purgeDeps");function uo(){if(!(co>0)){for(;ye<ao;){let t=io[ye];io[ye++]=void 0,t.notify()}ye=0,ao=0}}a(uo,"flush");function Re(t,e){let o=typeof t=="function",n=t,r={_snapshot:o?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?0:1,get(){return et!==void 0&&kn(r,et,ve),r._snapshot},subscribe(i){let s=On(i),c={current:!1},l=jr(()=>{r.get(),c.current?(et=void 0,s.next?.(r._snapshot)):c.current=!0});return{unsubscribe:a(()=>{l.stop()},"unsubscribe")}},_update(i){let s=et,c=e?.compare??Object.is;if(o)et=r,++ve,r.depsTail=void 0;else if(i===void 0)return!1;o&&(r.flags=5);try{let l=r._snapshot,u=typeof i=="function"?i(l):i===void 0&&o?n(l):i;return l===void 0||!c(l,u)?(r._snapshot=u,!0):!1}finally{et=s,o&&(r.flags&=-5),Se(r)}}};return o?(r.flags=17,r.get=function(){let i=r.flags;if(i&16||i&32&&Nn(r.deps,r)){if(r._update()){let s=r.subs;s!==void 0&&In(s)}}else i&32&&(r.flags=i&-33);return et!==void 0&&kn(r,et,ve),r._snapshot}):r.set=function(i){if(r._update(i)){let s=r.subs;s!==void 0&&(Wr(s),In(s),uo())}},r}a(Re,"createAtom");function jr(t){let e=a(()=>{let n=et;et=o,++ve,o.depsTail=void 0,o.flags=6;try{return t()}finally{et=n,o.flags&=-5,Se(o)}},"run"),o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let n=this.flags;n&16||n&32&&Nn(this.deps,this)?e():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Se(this)}};return e(),o}a(jr,"effect");function Kr(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(let[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();let o=Fn(t);if(o.length!==Fn(e).length)return!1;for(let n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n])||!Object.is(t[o[n]],e[o[n]]))return!1;return!0}a(Kr,"shallow");function Fn(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}a(Fn,"getOwnKeys");var fo=F(V(),1),Tn=F(fr(),1);function qr(t,e){return t===e}a(qr,"defaultCompare");function H(t,e=n=>n,o){let n=o?.compare??qr,r=(0,fo.useCallback)(s=>{let{unsubscribe:c}=t.subscribe(s);return c},[t]),i=(0,fo.useCallback)(()=>t.get(),[t]);return(0,Tn.useSyncExternalStoreWithSelector)(r,i,i,e,n)}a(H,"useSelector");var Mn={};function ho(t,e){let o=_e.useRef();return n=>{let r=t?.select?t.select(n):n;return t?.structuralSharing??e.options.defaultStructuralSharing?o.current=Q(o.current,r):r}}a(ho,"useStructuralSharing");function G(t){let e=M(),o=_e.useContext(t.from?Fo:Nt),n=t.from??o,r=e.stores.getMatchStore(n);if(!1){let c=r.get();if(!c){(t.shouldThrow??!0)&&ut();return}return t.select?t.select(c):c}let i=ho(t,e),s=H(r,c=>c?i(c):Mn);if(s!==Mn)return s;(t.shouldThrow??!0)&&ut()}a(G,"useMatch");function we(t){return G({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.search):e.search,"select")})}a(we,"useSearch");var Wt=F(V(),1);var xe=Wt.useLayoutEffect;var po=F(V(),1);function be(t){let e=M();return po.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}a(be,"useNavigate");var Lt=F(V(),1),rt=F(Z(),1);var wt=class extends Lt.Component{static{a(this,"CatchBoundary")}constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,e){let o=t.getResetKey();return e.error&&e.resetKey!==o?{resetKey:o,error:0}:{resetKey:o}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?Lt.createElement(this.props.errorComponent??mo,{error:t[0],reset:this.reset}):this.props.children}};function mo({error:t}){let[e,o]=Lt.useState(!1);return(0,rt.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,rt.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,rt.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:a(()=>o(n=>!n),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,rt.jsx)("div",{style:{height:".25rem"}}),e?(0,rt.jsx)("div",{children:(0,rt.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?(0,rt.jsx)("code",{children:t.message}):null})}):null]})}a(mo,"ErrorComponent");var go=F(V(),1),An=F(Z(),1);var Dn=a(()=>!0,"getSnapshot"),Gr=a(()=>!1,"getServerSnapshot");function $n({children:t,fallback:e=null}){return(0,An.jsx)(go.default.Fragment,{children:yo()?t:e})}a($n,"ClientOnly");function yo(t=!0){return go.default.useSyncExternalStore(Jr,Dn,t?Gr:Dn)}a(yo,"useHydrated");function Jr(){return()=>{}}a(Jr,"subscribe");function vo(t){return G({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}a(vo,"useLoaderData");function So(t){let{select:e,...o}=t;return G({...o,select:a(n=>e?e(n.loaderDeps):n.loaderDeps,"select")})}a(So,"useLoaderDeps");function Ro(t){return G({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a(e=>{let o=t.strict===!1?e.params:e._strictParams;return t.select?t.select(o):o},"select")})}a(Ro,"useParams");function _o(t){return G({...t,select:a(e=>t.select?t.select(e.context):e.context,"select")})}a(_o,"useRouteContext");var B=F(V(),1);var Yr=F(Z(),1);function Xr(...t){let e=B.useRef(t),o=e.current;return t.forEach((n,r)=>{J(o[r],n,!1,!0)||(o[r]=n)}),e.current}a(Xr,"useStableValues");function Ce(t,e){t.preloadRoute(e).catch(o=>{console.warn(o),console.warn(ro)})}a(Ce,"preloadLink");var Zr={compare:a((t,e)=>t[0]===e[0]&&t[1]===e[1],"compare")};function Bn(t,e){let o=typeof t=="string"&&st(t);if(o)return e.has(o)?t:null}a(Bn,"resolveExternalLink");function Vn(t,e,o,n,r){let i=re(t.pathname,n),s=re(e.pathname,n);return(o?.exact?i!==s:!(i.startsWith(s)&&(i.length===s.length||i[s.length]==="/")))||(o?.includeSearch??!0)&&!J(t.search,e.search,!o?.exact,o?.explicitUndefined)?!1:o?.includeHash?r&&t.hash===e.hash:!0}a(Vn,"resolveIsActive");function Qr(t,e,o){let n=M();if(!1)return os(n,t,e,o);let r=B.useRef(null),i=B.useCallback($=>{if(r.current=$,typeof e=="function")return e($);e&&(e.current=$)},[e]),{activeOptions:s,to:c,preload:l,preloadDelay:u,hashScrollIntoView:f,replace:d,startTransition:h,resetScroll:p,viewTransition:m,ignoreBlocker:g,disabled:S,target:y,onClick:R,onBlur:b,onFocus:x,onMouseEnter:P,onMouseLeave:_,onTouchStart:v}=t,w=yo(!!s?.includeHash),[E,L,k]=Xr(t.search,t.params,s),[C,O]=B.useMemo(()=>[t,{...t}],[n,t.from,t._fromLocation,t.hash,t.to,E,L,t.state,t.mask,t.unsafeRelative]),N=B.useMemo(()=>{let $=Bn(c,n.protocolAllowlist);if($!==void 0){let Qt=[$??void 0];return()=>Qt}let z,Zt;return Qt=>{C._fromLocation||(O._fromLocation=Qt);let Io=n.buildLocation(O),Ot=Wn(Io,n,S);return(!z||z[0]!==Ot)&&(z=[Ot,!(S||Ot&&!st(Ot))&&void 0],Zt=[Ot,!0]),z[1]!==void 0&&Vn(Qt,Io,k,n.basepath,w)?Zt:z}},[k,S,w,C,O,n,c]),[T,A]=H(n.stores.location,N,Zr),Gt=A===void 0&&T,Jt=S||T===void 0,Yt=B.useRef(!1),lt=t.reloadDocument||Gt||Jt?!1:l??n.options.defaultPreload,ke=u??n.options.defaultPreloadDelay??0,Xt=B.useCallback($=>{let z=$?.isIntersecting;if(!(z??lt==="intent")){z===!1&&wo(r);return}if(!ke){Ce(n,C);return}jt.has(r)||jt.set(r,setTimeout(()=>{jt.delete(r),Ce(n,C)},ke))},[n,C,r,lt,ke]);B.useEffect(()=>{if(!lt)return;lt==="render"&&!Yt.current&&(Yt.current=!0,Ce(n,C));let $=!0,z;return lt==="viewport"&&r.current&&typeof IntersectionObserver=="function"&&(z=new IntersectionObserver(Zt=>{$&&Xt(Zt.pop())},{rootMargin:"100px"}),z.observe(r.current)),()=>{$=!1,z?.disconnect(),wo(r)}},[n,C,lt,Xt,r]);let ot=zn(t,o);if(ot.ref=e?i:r,Gt)return ot.href=Gt,ot;let lr=a($=>{let z=y??$.currentTarget.getAttribute("target");!Jt&&!($.metaKey||$.altKey||$.ctrlKey||$.shiftKey)&&!$.defaultPrevented&&(!z||z==="_self")&&$.button===0&&($.preventDefault(),n.navigate({...C,replace:d,resetScroll:p,hashScrollIntoView:f,startTransition:h,viewTransition:m,ignoreBlocker:g}))},"handleClick"),ur=a(()=>{lt==="intent"&&Ce(n,C)},"handleTouchStart"),ko=a(()=>{lt==="intent"&&wo(r)},"handleLeave");return ot.onClick=kt(R,lr),ot.onBlur=kt(b,ko),ot.onFocus=kt(x,Xt),ot.onMouseEnter=kt(P,Xt),ot.onMouseLeave=kt(_,ko),ot.onTouchStart=kt(v,ur),Un(ot,t,A,T,Jt,o)}a(Qr,"useLinkProps");var ts={},es={className:"active"},Hn=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function zn(t,e){let o={};for(let n in t)Hn.has(n)||n==="type"&&e!==void 0||n==="disabled"&&e==="a"||(o[n]=t[n]);return o}a(zn,"collectElementProps");function Un(t,e,o,n,r,i){let{activeProps:s,inactiveProps:c,className:l,style:u,target:f}=e,d=pt(o?s:c,{})??(o?es:ts);Object.assign(t,d),t.href=n,i!=="a"&&(t.disabled=r),t.target=f;let h=d.style;(u||h)&&(t.style=u&&h?{...u,...h}:u||h);let p=d.className;return(l||p)&&(t.className=l?p?`${l} ${p}`:l:p),r&&(t.role="link",t["aria-disabled"]=!0),o&&(t["data-status"]="active",t["aria-current"]="page"),t}a(Un,"applyLinkState");function os(t,e,o,n){let{to:r,disabled:i,activeOptions:s}=e,c=Bn(r,t.protocolAllowlist),l=c===void 0?t.buildLocation(e):void 0,u=l?Wn(l,t,i):c??void 0,f=i||!u,d=c??(u&&st(u)?u:void 0),h=zn(e,n);return h.ref=o,d?(h.href=d,h):Un(h,e,!!l&&!(!i&&!u)&&Vn(t.stores.location.get(),l,s,t.basepath,!1),u,f,n)}a(os,"getServerLinkProps");var jt=new WeakMap,wo=a(t=>{clearTimeout(jt.get(t)),jt.delete(t)},"cancelPreload"),kt=a((t,e)=>t?o=>o.defaultPrevented||(t(o),o.defaultPrevented||e(o)):e,"composeHandlers");function Wn(t,e,o){if(o)return;let n=t.maskedLocation??t,r=n.external?n.publicHref:e.history.createHref(n.publicHref)||"/";if(!((n.external||r!==n.publicHref)&&Mt(r,e.protocolAllowlist)))return r}a(Wn,"getHrefOption");var xo=B.memo(B.forwardRef((t,e)=>{let o=t._asChild||"a",n=Qr(t,e,o),r=typeof t.children=="function"?t.children({isActive:n["data-status"]==="active"}):t.children;return B.createElement(o,n,r)}),ns);function ns(t,e){let o=0;for(let n in e)if(o++,t[n]!==e[n]&&(!Hn.has(n)||!J(t[n],e[n],!1,!0)))return!1;for(let n in t)o--;return o===0}a(ns,"areLinkPropsEqual");var bo=F(V(),1),Co=F(Z(),1);var jn=class extends ge{static{a(this,"Route")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>_o({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ro({...e,from:this.id}),this.useLoaderDeps=e=>So({...e,from:this.id}),this.useLoaderData=e=>vo({...e,from:this.id}),this.useNavigate=()=>be({from:this.fullPath}),this.Link=bo.default.forwardRef((e,o)=>(0,Co.jsx)(xo,{ref:o,from:this.fullPath,...e}))}};function rs(t){return new jn(t)}a(rs,"createRoute");var Kn=class extends so{static{a(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>_o({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ro({...e,from:this.id}),this.useLoaderDeps=e=>So({...e,from:this.id}),this.useLoaderData=e=>vo({...e,from:this.id}),this.useNavigate=()=>be({from:this.fullPath}),this.Link=bo.default.forwardRef((e,o)=>(0,Co.jsx)(xo,{ref:o,from:this.fullPath,...e}))}};function ss(t){return new Kn(t)}a(ss,"createRootRoute");var gc=F(V(),1);var Pe=F(Z(),1);function qn(t){let e=M();if(!1){let n=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,Pe.jsx)(wt,{getResetKey:a(()=>n,"getResetKey"),onCatch:a((r,i)=>{if(q(r))t.onCatch?.(r,i);else throw r},"onCatch"),errorComponent:a(({error:r})=>{if(q(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let o=`not-found-${H(e.stores.location,n=>n.pathname)}-${H(e.stores.status)}`;return(0,Pe.jsx)(wt,{getResetKey:a(()=>o,"getResetKey"),onCatch:a((n,r)=>{if(q(n))t.onCatch?.(n,r);else throw n},"onCatch"),errorComponent:a(({error:n})=>{if(q(n))return t.fallback?.(n);throw n},"errorComponent"),children:t.children})}a(qn,"CatchNotFound");function Gn(){return(0,Pe.jsx)("p",{children:"Not Found"})}a(Gn,"DefaultGlobalNotFound");var Jn=F(Z(),1);function Yn({children:t}){let e=M();return null}a(Yn,"ScriptOnce");var bc=F(V(),1),Ee=F(Z(),1);function Po(t,e,o){return e.options.notFoundComponent?(0,Ee.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,Ee.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,Ee.jsx)(Gn,{})}a(Po,"renderRouteNotFound");var Zn=F(Z(),1);function Xn(t){return null}a(Xn,"getScrollRestorationScriptForRouter");function Qn(){let t=Xn(M());return t?(0,Zn.jsx)(Yn,{children:t}):null}a(Qn,"ScrollRestoration");var K=F(V(),1);var D=F(Z(),1);function Kt(t,e){let o=e?.options.pendingComponent??t.options.defaultPendingComponent;return o?(0,D.jsx)(o,{}):null}a(Kt,"renderPending");var is=a((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),er=a((t,e,o)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||o===!1||o==="data-only"||!t.ssr,"canWrapInSuspense"),Le=K.memo(a(function({routeId:e}){let o=M();return(0,D.jsx)(tr,{router:o,match:H(o.stores.getMatchStore(e))})},"MatchImpl"));function tr({router:t,match:e}){let o=t.routesById[e.routeId],n=Kt(t,o),r=o.options.errorComponent??t.options.defaultErrorComponent,i=o.options.onCatch??t.options.defaultOnCatch,s=o.isRoot?o.options.notFoundComponent??t.options.notFoundRoute?.options.component:o.options.notFoundComponent,c=e.ssr===!1||e.ssr==="data-only",l=er(t,o,e.ssr)&&(o.options.wrapInSuspense??n??(o.options.errorComponent?.preload||c)),u=(0,D.jsx)(as,{match:e});c&&(u=(0,D.jsx)($n,{fallback:n,children:u})),s&&(u=(0,D.jsx)(qn,{fallback:a(h=>{if(h.routeId??=e.routeId,h.routeId!==e.routeId)throw h;return K.createElement(s,h)},"fallback"),children:u})),r&&(u=(0,D.jsx)(wt,{getResetKey:a(()=>e,"getResetKey"),errorComponent:r,onCatch:a((h,p)=>{if(q(h))throw h.routeId??=e.routeId,h;i?.(h,p)},"onCatch"),children:u})),l&&(u=(0,D.jsx)(K.Suspense,{fallback:n,children:u}));let f=null,d=o.isRoot?o.options.shellComponent:void 0;return(0,D.jsx)(Nt.Provider,{value:e.routeId,children:d?(0,D.jsxs)(d,{children:[u,f]}):(0,D.jsxs)(D.Fragment,{children:[u,f]})})}a(tr,"MatchView");var as=K.memo(a(function({match:e}){let o=M(),n=e.routeId,r=o.routesById[n],i=K.useMemo(()=>{let c=(r.options.remountDeps??o.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return c?JSON.stringify(c):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,o.options.defaultRemountDeps]),s=K.useMemo(()=>{let c=r.options.component??o.options.defaultComponent;return c?(0,D.jsx)(c,{},i):(0,D.jsx)(or,{})},[i,r.options.component,o.options.defaultComponent]);if(e.status==="pending"){if(o.ssr&&!er(o,r,e.ssr))return s;if(o._tx)throw o._tx[5];return Kt(o,r)}if(e.status==="notFound")return Po(o,r,e.error);if(e.status==="error"){if(!1)return(0,D.jsx)((r.options.errorComponent??o.options.defaultErrorComponent)||mo,{error:e.error,reset:void 0,info:{componentStack:""}});throw e.error}return s},"MatchInnerImpl")),or=K.memo(a(function(){let e=M(),o=K.useContext(Nt),n,r,i;if(!1){let c=e.stores.matches.get(),l=c.findIndex(f=>f.routeId===o),u=c[l];n=!!u._notFound,r=u.error,i=c[l+1]?.routeId}else{let c=e.stores.getMatchStore(o);[n,r]=H(c,l=>[!!l._notFound,l.error],{compare:is}),i=H(e.stores.ids,l=>l[l.indexOf(o)+1])}if(n)return Po(e,e.routesById[o],r);if(!i)return null;let s=(0,D.jsx)(Le,{routeId:i});return o===Y?(0,D.jsx)(K.Suspense,{fallback:Kt(e),children:s}):s},"OutletImpl"));var Eo=F(V(),1);function Lo(t,e){let o=t[1];t.length=0,o?.(e)}a(Lo,"settleOwner");function nr({t}){let e=M(),o=e._rendered??=[],n=void 0;return e.startTransition=(r,i)=>new Promise(s=>{Lo(o,!1),o.push(i,s),t(e),Eo.startTransition(r)}),xe(()=>{let r=e.history.subscribe(e.load);if(n?.current)return r;n&&(n.current=!0),e.updateLatestLocation();let i=e.latestLocation,s=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(U(i.publicHref)!==U(s.publicHref))return e.commitLocation({...s,replace:!0,ignoreBlocker:!0}),r;let c=e.stores.resolvedLocation.get();return c?.href===i.href&&c.state.__TSR_key===i.state.__TSR_key?o.push(e.stores.matches.get(),l=>{l&&e.emit({type:"onRendered",...yt(c,c)})}):e._tx||e.load({sync:!0}).catch(console.error),r},[e,e.history]),null}a(nr,"Transitioner");var It=F(V(),1);var X=F(Z(),1);function sr(){let t=M(),e=t.routesById[Y],o=Kt(t,e),n=(0,X.jsxs)(X.Fragment,{children:[!!1&&(0,X.jsx)(nr,{t:It.useState()[1]}),t.ssr?(0,X.jsx)(rr,{}):(0,X.jsx)(It.Suspense,{fallback:o,children:(0,X.jsx)(rr,{})})]});return t.options.InnerWrap?(0,X.jsx)(t.options.InnerWrap,{children:n}):n}a(sr,"Matches");function rr(){let t=M(),e=t._rendered,o=H(t.stores.matches,s=>e[0]??s),n=o[0],r=n?.routeId;xe(()=>{e[0]===o&&Lo(e,!0)},[e,o]);let i=r?(0,X.jsx)(Le,{routeId:r}):null;return t.options.disableGlobalCatchBoundary?i:(0,X.jsx)(wt,{getResetKey:a(()=>n,"getResetKey"),onCatch:void 0,children:i})}a(rr,"MatchesInner");var ir=a(t=>({createMutableStore:Re,createReadonlyStore:Re,batch:lo}),"getStoreFactory");var cs=a(t=>new ar(t),"createRouter"),ar=class extends Je{static{a(this,"Router")}constructor(t){super(t,ir)}};var yl=F(V(),1),qt=F(Z(),1);function cr({router:t,children:e,...o}){Ft(o)&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});let n=(0,qt.jsx)(te.Provider,{value:t,children:e});return t.options.Wrap?(0,qt.jsx)(t.options.Wrap,{children:n}):n}a(cr,"RouterContextProvider");function ls({router:t,...e}){return(0,qt.jsx)(cr,{router:t,...e,children:(0,qt.jsx)(sr,{})})}a(ls,"RouterProvider");function us(t){let e=M({warn:t?.router===void 0}),o=t?.router||e;if(!1){let n=o.stores.__store.get();return t?.select?t.select(n):n}return H(o.stores.__store,ho(t,o))}a(us,"useRouterState");export{Ue as a,kr as b,M as c,lo as d,Re as e,Kr as f,H as g,we as h,be as i,rs as j,ss as k,or as l,cs as m,ls as n,us as o};
@@ -1 +1 @@
1
- import{h as u,p as f}from"./chunk-PTZD7RUZ.js";import{a as s,d as l,e as h,f as S}from"./chunk-YKXDMIHQ.js";var i=l(S(),1),c=l(h(),1);var g=s(()=>{let t=(0,i.c)(4),[a,n]=(0,c.useState)(!1),[e,m]=(0,c.useState)(null),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s(p=>{f((async()=>{n(!0),m(null);try{await p()}catch(b){m(u(b))}n(!1)})())},"e"),t[0]=r):r=t[0];let y=r,o;return t[1]!==a||t[2]!==e?(o={busy:a,error:e,run:y},t[1]=a,t[2]=e,t[3]=o):o=t[3],o},"g");export{g as a};
1
+ import{h as u,p as f}from"./chunk-HJHSQPHW.js";import{a as s,d as l,e as h,f as S}from"./chunk-I26MS5PJ.js";var i=l(S(),1),c=l(h(),1);var g=s(()=>{let t=(0,i.c)(4),[a,n]=(0,c.useState)(!1),[e,m]=(0,c.useState)(null),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s(p=>{f((async()=>{n(!0),m(null);try{await p()}catch(b){m(u(b))}n(!1)})())},"e"),t[0]=r):r=t[0];let y=r,o;return t[1]!==a||t[2]!==e?(o={busy:a,error:e,run:y},t[1]=a,t[2]=e,t[3]=o):o=t[3],o},"g");export{g as a};
@@ -1 +1 @@
1
- import{G as ve,H as Ce,c as Z,d as fe,f as he,fa as Pe,g as ge,ga as G,h as ye,ha as Re,i as Se,ia as we,ja as be,ka as Ee,ta as xe}from"./chunk-IFJOYAEZ.js";import{b as Y}from"./chunk-3Q2P62UR.js";import{F as U,H as j,M as V,N,e as de}from"./chunk-TDXV3OT5.js";import{a as Ye}from"./chunk-Y6CXU7T4.js";import{a as ue}from"./chunk-4L4WTGN5.js";import{a as v,c as E,e as le,i as pe,r as me,w as W}from"./chunk-AAVLPU5Q.js";import{c as ce,g as w,i as D}from"./chunk-225VJ77I.js";import{a as n,d as R,e as B,g as je}from"./chunk-YKXDMIHQ.js";var Te=class{static{n(this,"BasePopupHandle")}attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,r=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let s=this.attachedStores.length-1;s>=0&&!r;s-=1)r=this.attachedStores[s].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(ce(99,this.componentName,t,this.componentName));o.setOpen(!0,N(V.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,N(V.imperativeAction))}};var ee=R(B(),1),Oe=R(Ye(),1);function rt(e){let t=ee.useCallback(r=>e===void 0?w:e.subscribeStore(r),[e]),o=ee.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Oe.useSyncExternalStore)(t,o,()=>e?.serverStore)}n(rt,"usePopupHandleStore");var Ae=R(B(),1),te=R(ue(),1);function lt(e,t){let o=Ae.useRef(null);function r(i){te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))}),ye(o.current)?.focus()}n(r,"handlePreFocusGuardFocus");function s(i){let u=e.select("positionerElement");if(u&&Se(i,u))e.context.beforeContentFocusGuardRef.current?.focus();else{te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))});let a=ge(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&de(u,a);){let l=a;if(a=he(a),a===l)break}a?.focus()}}return n(s,"handleFocusTargetFocus"),{preFocusGuardRef:o,handlePreFocusGuardFocus:r,handleFocusTargetFocus:s}}n(lt,"useTriggerFocusGuards");var c=R(B(),1),Le=R(ue(),1);var F=R(B(),1);function oe(e){let t=me(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,s=pe(e),i=s?e.offsetWidth:o,u=s?e.offsetHeight:r;return(Z(o)!==i||Z(r)!==u)&&(o=i,r=u),{width:o,height:r}}n(oe,"getCssDimensions");var H="--popup-width",_="--popup-height";function Ne(e){let{popupElement:t,positionerElement:o,content:r,mounted:s,onMeasureLayout:i,onMeasureLayoutComplete:u,side:a,direction:l}=e,g=j(t,!0),C=U(),p=F.useRef(null),d=F.useRef(!0),m=F.useRef(w),y=E(i),h=E(u),b=F.useMemo(()=>Ge(a,l),[a,l]);v(()=>{if(!s){m.current=w,d.current=!0,p.current=null;return}if(!t||!o)return;m.current=Ve(t,b),ne(t,"auto");let I=q(t,"position","static"),x=q(t,"transform","none"),S=q(t,"scale","1"),T=Ve(o,{[Re]:"max-content",[we]:"max-content"});function X(){I(),x(),T()}n(X,"restoreMeasurementOverrides");function L(){X(),S()}if(n(L,"restoreMeasurementOverridesIncludingScale"),y?.(),d.current||p.current===null){K(o,"max-content");let A=oe(t);return p.current=A,K(o,A),L(),h?.(null,A),d.current=!1,()=>{m.current(),m.current=w}}K(o,"max-content");let O=p.current,P=oe(t);p.current=P,ne(t,O),L(),h?.(O,P),K(o,P);let $=new AbortController;return C.request(()=>{ne(t,P),g(()=>{t.style.setProperty(H,"auto"),t.style.setProperty(_,"auto")},$.signal)}),()=>{$.abort(),C.cancel(),m.current(),m.current=w}},[r,t,o,g,C,s,y,h,b])}n(Ne,"usePopupAutoResize");function Ge(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?D:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}n(Ge,"getPopupAnchoringStyles");function q(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}n(q,"overrideElementStyle");function Ve(e,t){let o=[];for(let[r,s]of Object.entries(t))o.push(q(e,r,s));return o.length?()=>{o.forEach(r=>r())}:w}n(Ve,"applyElementStyles");function ne(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(H,o),e.style.setProperty(_,r)}n(ne,"setPopupCssSize");function K(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(be,o),e.style.setProperty(Ee,r)}n(K,"setPositionerCssSize");var Fe={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:s},platform:i,strategy:u,placement:a}=e,l=le(s),g=l.getComputedStyle(s);if(!(g.transitionDuration!=="0s"&&g.transitionDuration!==""))return{x:t,y:o,data:G};let p=await i.getOffsetParent?.(s),d={width:0,height:0};if(u==="fixed"&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(p===l){let x=W(s);d={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await i.isElement?.(p)&&(d=await i.getDimensions(p));let m=fe(a),y=t,h=o;m==="left"&&(y=d.width-(t+r.width)),m==="top"&&(h=d.height-(o+r.height));let b=m==="left"?"right":G.sideX,I=m==="top"?"bottom":G.sideY;return{x:y,y:h,data:{sideX:b,sideY:I}}}};var Me="data-activation-direction";var M=R(je(),1);var Yt={activationDirection:n(e=>e?{[Me]:e}:null,"activationDirection")};function Gt(e){let{store:t,side:o,children:r}=e,s=Y(),i=t.useState("activeTriggerElement"),u=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),g=t.useState("mounted"),C=t.useState("popupElement"),p=t.useState("positionerElement"),d=xe(a?i:null),m=Je(u,l),y=c.useRef(null),[h,b]=c.useState(null),[I,x]=c.useState(null),S=c.useRef(null),T=c.useRef(null),X=j(S,!0),L=U(),O=c.useRef(null),[P,$]=c.useState(null),[A,J]=c.useState(!1);v(()=>(t.set("adaptiveOrigin",Fe),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let ke=E(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),Be=E(f=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),f&&$(f)}),ie=E(()=>{O.current?.abort();let f=new AbortController;O.current=f,X(()=>{b(null),$(null),y.current=null},f.signal)}),z=c.useRef(null);v(()=>{(!a||!g)&&(z.current=null)},[a,g]),v(()=>{if(i&&d&&i!==d&&z.current!==i&&y.current){b(y.current),J(!0);let f=Xe(d,i);x(f),z.current=i}},[i,d]),v(()=>{h!=null&&(O.current?.abort(),J(!0),L.request(()=>{Le.flushSync(()=>{J(!1)}),ie()}))},[m,h,ie,L]),v(()=>{let f=S.current;if(!f)return;let ae=W(f).createElement("div");for(let Ue of Array.from(f.childNodes))ae.appendChild(Ue.cloneNode(!0));y.current=ae});let se=h!=null,Q;se?Q=(0,M.jsxs)(c.Fragment,{children:[(0,M.jsx)("div",{"data-previous":!0,inert:Pe(!0),ref:T,style:{...P?{[H]:`${P.width}px`,[_]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":A?void 0:""},"previous"),(0,M.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":A?"":void 0,children:r},m)]}):Q=(0,M.jsx)("div",{"data-current":!0,ref:S,children:r},m),v(()=>{let f=T.current;!f||!h||f.replaceChildren(...Array.from(h.childNodes))},[h]),Ne({popupElement:C,positionerElement:p,mounted:g,content:l,onMeasureLayout:ke,onMeasureLayoutComplete:Be,side:o,direction:s});let We={activationDirection:qe(I),transitioning:se};return{children:Q,state:We}}n(Gt,"usePopupViewport");function qe(e){if(e)return`${Ie(e.horizontal,5,"right","left")} ${Ie(e.vertical,5,"down","up")}`}n(qe,"getActivationDirection");function Ie(e,t,o,r){return e>t?o:e<-t?r:""}n(Ie,"getValueWithTolerance");function Xe(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-s.x,vertical:i.y-s.y}}n(Xe,"calculateRelativePosition");function Je(e,t){let[o,r]=c.useState(0),s=c.useRef(e),i=c.useRef(t),u=c.useRef(!1);return v(()=>{let a=s.current,l=i.current,g=e!==a,C=t!==l;g?(r(p=>p+1),u.current=!C):u.current&&C&&(r(p=>p+1),u.current=!1),s.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}n(Je,"usePopupContentKey");function zt(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ce({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:D,inactiveTriggerProps:D,popupProps:D}}n(zt,"createInitialPopupStoreState");var k=n(e=>e.triggerIdProp??e.activeTriggerId,"activeTriggerIdSelector"),re=n(e=>e.openProp??e.open,"openSelector"),$e=n(e=>(e.popupElement?.id??e.floatingId)||void 0,"popupIdSelector");function He(e,t){return t!==void 0&&re(e)&&k(e)===t}n(He,"triggerOwnsOpenPopup");function ze(e,t){return He(e,t)?!0:t!==void 0&&re(e)&&k(e)==null&&e.triggerCount===1}n(ze,"triggerOwnsOpenPopupOrIsOnlyTrigger");var Qt={open:re,mounted:n(e=>e.mounted,"mounted"),transitionStatus:n(e=>e.transitionStatus,"transitionStatus"),floatingRootContext:n(e=>e.floatingRootContext,"floatingRootContext"),triggerCount:n(e=>e.triggerCount,"triggerCount"),preventUnmountingOnClose:n(e=>e.preventUnmountingOnClose,"preventUnmountingOnClose"),payload:n(e=>e.payload,"payload"),activeTriggerId:k,activeTriggerElement:n(e=>e.mounted?e.activeTriggerElement:null,"activeTriggerElement"),popupId:$e,isTriggerActive:n((e,t)=>t!==void 0&&k(e)===t,"isTriggerActive"),isOpenedByTrigger:n((e,t)=>He(e,t),"isOpenedByTrigger"),isMountedByTrigger:n((e,t)=>t!==void 0&&k(e)===t&&e.mounted,"isMountedByTrigger"),triggerProps:n((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,"triggerProps"),triggerPopupId:n((e,t)=>ze(e,t)?$e(e):void 0,"triggerPopupId"),popupProps:n(e=>e.popupProps,"popupProps"),popupElement:n(e=>e.popupElement,"popupElement"),positionerElement:n(e=>e.positionerElement,"positionerElement")};var _e=class extends ve{static{n(this,"NullStore")}setState(t){}update(t){}set(t,o){}notifyAll(){}};export{Te as a,zt as b,Qt as c,rt as d,_e as e,lt as f,Yt as g,Gt as h};
1
+ import{G as ve,H as Ce,c as Z,d as fe,f as he,fa as Pe,g as ge,ga as G,h as ye,ha as Re,i as Se,ia as we,ja as be,ka as Ee,ta as xe}from"./chunk-NXQW5E6W.js";import{b as Y}from"./chunk-UC7MNI2F.js";import{F as U,H as j,M as V,N,e as de}from"./chunk-MVWZMWPD.js";import{a as Ye}from"./chunk-SJQERRSZ.js";import{a as ue}from"./chunk-7Y3SY37W.js";import{a as v,c as E,e as le,i as pe,r as me,w as W}from"./chunk-AUAECCXB.js";import{c as ce,g as w,i as D}from"./chunk-BOMPSVRC.js";import{a as n,d as R,e as B,g as je}from"./chunk-I26MS5PJ.js";var Te=class{static{n(this,"BasePopupHandle")}attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,r=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let s=this.attachedStores.length-1;s>=0&&!r;s-=1)r=this.attachedStores[s].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(ce(99,this.componentName,t,this.componentName));o.setOpen(!0,N(V.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,N(V.imperativeAction))}};var ee=R(B(),1),Oe=R(Ye(),1);function rt(e){let t=ee.useCallback(r=>e===void 0?w:e.subscribeStore(r),[e]),o=ee.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Oe.useSyncExternalStore)(t,o,()=>e?.serverStore)}n(rt,"usePopupHandleStore");var Ae=R(B(),1),te=R(ue(),1);function lt(e,t){let o=Ae.useRef(null);function r(i){te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))}),ye(o.current)?.focus()}n(r,"handlePreFocusGuardFocus");function s(i){let u=e.select("positionerElement");if(u&&Se(i,u))e.context.beforeContentFocusGuardRef.current?.focus();else{te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))});let a=ge(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&de(u,a);){let l=a;if(a=he(a),a===l)break}a?.focus()}}return n(s,"handleFocusTargetFocus"),{preFocusGuardRef:o,handlePreFocusGuardFocus:r,handleFocusTargetFocus:s}}n(lt,"useTriggerFocusGuards");var c=R(B(),1),Le=R(ue(),1);var F=R(B(),1);function oe(e){let t=me(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,s=pe(e),i=s?e.offsetWidth:o,u=s?e.offsetHeight:r;return(Z(o)!==i||Z(r)!==u)&&(o=i,r=u),{width:o,height:r}}n(oe,"getCssDimensions");var H="--popup-width",_="--popup-height";function Ne(e){let{popupElement:t,positionerElement:o,content:r,mounted:s,onMeasureLayout:i,onMeasureLayoutComplete:u,side:a,direction:l}=e,g=j(t,!0),C=U(),p=F.useRef(null),d=F.useRef(!0),m=F.useRef(w),y=E(i),h=E(u),b=F.useMemo(()=>Ge(a,l),[a,l]);v(()=>{if(!s){m.current=w,d.current=!0,p.current=null;return}if(!t||!o)return;m.current=Ve(t,b),ne(t,"auto");let I=q(t,"position","static"),x=q(t,"transform","none"),S=q(t,"scale","1"),T=Ve(o,{[Re]:"max-content",[we]:"max-content"});function X(){I(),x(),T()}n(X,"restoreMeasurementOverrides");function L(){X(),S()}if(n(L,"restoreMeasurementOverridesIncludingScale"),y?.(),d.current||p.current===null){K(o,"max-content");let A=oe(t);return p.current=A,K(o,A),L(),h?.(null,A),d.current=!1,()=>{m.current(),m.current=w}}K(o,"max-content");let O=p.current,P=oe(t);p.current=P,ne(t,O),L(),h?.(O,P),K(o,P);let $=new AbortController;return C.request(()=>{ne(t,P),g(()=>{t.style.setProperty(H,"auto"),t.style.setProperty(_,"auto")},$.signal)}),()=>{$.abort(),C.cancel(),m.current(),m.current=w}},[r,t,o,g,C,s,y,h,b])}n(Ne,"usePopupAutoResize");function Ge(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?D:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}n(Ge,"getPopupAnchoringStyles");function q(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}n(q,"overrideElementStyle");function Ve(e,t){let o=[];for(let[r,s]of Object.entries(t))o.push(q(e,r,s));return o.length?()=>{o.forEach(r=>r())}:w}n(Ve,"applyElementStyles");function ne(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(H,o),e.style.setProperty(_,r)}n(ne,"setPopupCssSize");function K(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(be,o),e.style.setProperty(Ee,r)}n(K,"setPositionerCssSize");var Fe={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:s},platform:i,strategy:u,placement:a}=e,l=le(s),g=l.getComputedStyle(s);if(!(g.transitionDuration!=="0s"&&g.transitionDuration!==""))return{x:t,y:o,data:G};let p=await i.getOffsetParent?.(s),d={width:0,height:0};if(u==="fixed"&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(p===l){let x=W(s);d={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await i.isElement?.(p)&&(d=await i.getDimensions(p));let m=fe(a),y=t,h=o;m==="left"&&(y=d.width-(t+r.width)),m==="top"&&(h=d.height-(o+r.height));let b=m==="left"?"right":G.sideX,I=m==="top"?"bottom":G.sideY;return{x:y,y:h,data:{sideX:b,sideY:I}}}};var Me="data-activation-direction";var M=R(je(),1);var Yt={activationDirection:n(e=>e?{[Me]:e}:null,"activationDirection")};function Gt(e){let{store:t,side:o,children:r}=e,s=Y(),i=t.useState("activeTriggerElement"),u=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),g=t.useState("mounted"),C=t.useState("popupElement"),p=t.useState("positionerElement"),d=xe(a?i:null),m=Je(u,l),y=c.useRef(null),[h,b]=c.useState(null),[I,x]=c.useState(null),S=c.useRef(null),T=c.useRef(null),X=j(S,!0),L=U(),O=c.useRef(null),[P,$]=c.useState(null),[A,J]=c.useState(!1);v(()=>(t.set("adaptiveOrigin",Fe),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let ke=E(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),Be=E(f=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),f&&$(f)}),ie=E(()=>{O.current?.abort();let f=new AbortController;O.current=f,X(()=>{b(null),$(null),y.current=null},f.signal)}),z=c.useRef(null);v(()=>{(!a||!g)&&(z.current=null)},[a,g]),v(()=>{if(i&&d&&i!==d&&z.current!==i&&y.current){b(y.current),J(!0);let f=Xe(d,i);x(f),z.current=i}},[i,d]),v(()=>{h!=null&&(O.current?.abort(),J(!0),L.request(()=>{Le.flushSync(()=>{J(!1)}),ie()}))},[m,h,ie,L]),v(()=>{let f=S.current;if(!f)return;let ae=W(f).createElement("div");for(let Ue of Array.from(f.childNodes))ae.appendChild(Ue.cloneNode(!0));y.current=ae});let se=h!=null,Q;se?Q=(0,M.jsxs)(c.Fragment,{children:[(0,M.jsx)("div",{"data-previous":!0,inert:Pe(!0),ref:T,style:{...P?{[H]:`${P.width}px`,[_]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":A?void 0:""},"previous"),(0,M.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":A?"":void 0,children:r},m)]}):Q=(0,M.jsx)("div",{"data-current":!0,ref:S,children:r},m),v(()=>{let f=T.current;!f||!h||f.replaceChildren(...Array.from(h.childNodes))},[h]),Ne({popupElement:C,positionerElement:p,mounted:g,content:l,onMeasureLayout:ke,onMeasureLayoutComplete:Be,side:o,direction:s});let We={activationDirection:qe(I),transitioning:se};return{children:Q,state:We}}n(Gt,"usePopupViewport");function qe(e){if(e)return`${Ie(e.horizontal,5,"right","left")} ${Ie(e.vertical,5,"down","up")}`}n(qe,"getActivationDirection");function Ie(e,t,o,r){return e>t?o:e<-t?r:""}n(Ie,"getValueWithTolerance");function Xe(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-s.x,vertical:i.y-s.y}}n(Xe,"calculateRelativePosition");function Je(e,t){let[o,r]=c.useState(0),s=c.useRef(e),i=c.useRef(t),u=c.useRef(!1);return v(()=>{let a=s.current,l=i.current,g=e!==a,C=t!==l;g?(r(p=>p+1),u.current=!C):u.current&&C&&(r(p=>p+1),u.current=!1),s.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}n(Je,"usePopupContentKey");function zt(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ce({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:D,inactiveTriggerProps:D,popupProps:D}}n(zt,"createInitialPopupStoreState");var k=n(e=>e.triggerIdProp??e.activeTriggerId,"activeTriggerIdSelector"),re=n(e=>e.openProp??e.open,"openSelector"),$e=n(e=>(e.popupElement?.id??e.floatingId)||void 0,"popupIdSelector");function He(e,t){return t!==void 0&&re(e)&&k(e)===t}n(He,"triggerOwnsOpenPopup");function ze(e,t){return He(e,t)?!0:t!==void 0&&re(e)&&k(e)==null&&e.triggerCount===1}n(ze,"triggerOwnsOpenPopupOrIsOnlyTrigger");var Qt={open:re,mounted:n(e=>e.mounted,"mounted"),transitionStatus:n(e=>e.transitionStatus,"transitionStatus"),floatingRootContext:n(e=>e.floatingRootContext,"floatingRootContext"),triggerCount:n(e=>e.triggerCount,"triggerCount"),preventUnmountingOnClose:n(e=>e.preventUnmountingOnClose,"preventUnmountingOnClose"),payload:n(e=>e.payload,"payload"),activeTriggerId:k,activeTriggerElement:n(e=>e.mounted?e.activeTriggerElement:null,"activeTriggerElement"),popupId:$e,isTriggerActive:n((e,t)=>t!==void 0&&k(e)===t,"isTriggerActive"),isOpenedByTrigger:n((e,t)=>He(e,t),"isOpenedByTrigger"),isMountedByTrigger:n((e,t)=>t!==void 0&&k(e)===t&&e.mounted,"isMountedByTrigger"),triggerProps:n((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,"triggerProps"),triggerPopupId:n((e,t)=>ze(e,t)?$e(e):void 0,"triggerPopupId"),popupProps:n(e=>e.popupProps,"popupProps"),popupElement:n(e=>e.popupElement,"popupElement"),positionerElement:n(e=>e.positionerElement,"positionerElement")};var _e=class extends ve{static{n(this,"NullStore")}setState(t){}update(t){}set(t,o){}notifyAll(){}};export{Te as a,zt as b,Qt as c,rt as d,_e as e,lt as f,Yt as g,Gt as h};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-Z5O2NQAV.js";import{b as C}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import"./chunk-35DM4JJG.js";import{a as L}from"./chunk-4ZEL6BYL.js";import{c as $}from"./chunk-ZD2UXTLR.js";import"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import{a as I}from"./chunk-FKVZRPV5.js";import{a as T,b as k,c as A,d as g,e as c,f as l}from"./chunk-HEAQVSNS.js";import{a as b,e as S}from"./chunk-N6NMLJ6R.js";import{d as w}from"./chunk-PTZD7RUZ.js";import{a as f,d as y,f as _,g as j}from"./chunk-YKXDMIHQ.js";var O=y(_(),1);var t=y(j(),1);var E="container:",M={error:"error",sleep:"sleeping",start:"running",stop:"stopped"},B=f(e=>{let n=e.indexOf(":");if(n===-1)return{event:e.trim()};let r=e.slice(n+1).trim(),a=e.slice(0,n).trim();return r===""?{event:a}:{detail:r,event:a}},"B"),P=f(e=>{let n=new Map;for(let r of e){let a=r.functionPath??"";if(!a.startsWith(E))continue;let i=a.slice(E.length);if(i==="")continue;let s=JSON.stringify([i,r.instance??""]),o=n.get(s);if(o!==void 0&&o.timestamp>=r.timestamp)continue;let{detail:p,event:d}=B(r.message);n.set(s,{detail:p,event:d,exitCode:r.exitCode,instance:r.instance,level:r.level,name:i,state:M[d]??"unknown",timestamp:r.timestamp})}return[...n.values()].toSorted((r,a)=>r.name.localeCompare(a.name)||(r.instance??"").localeCompare(a.instance??""))},"D"),W={error:"destructive",running:"success",sleeping:"info",stopped:"outline",unknown:"secondary"},q=f(e=>{let{entries:n}=e??{};return Array.isArray(n)?n:[]},"P"),V=f(()=>{let e=(0,O.c)(19),n=w(),r,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={},a={live:!0,shardKey:""},e[0]=r,e[1]=a):(r=e[0],a=e[1]);let{data:i,error:s,liveError:o}=$(L.getLogs,r,a),p=i!==void 0,d;if(e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==p||e[6]!==n){let N=P(q(i)),x;e[8]!==s?(x=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"containers-error",role:"alert",children:s}),e[8]=s,e[9]=x):x=e[9];let m;e[10]!==n?(m=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[10]=n,e[11]=m):m=e[11];let u;e[12]!==m?(u=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[12]=m,e[13]=u):u=e[13];let h;e[14]!==o?(h=(0,t.jsx)(D,{message:o,prefix:"containers"}),e[14]=o,e[15]=h):h=e[15];let v;e[16]!==u||e[17]!==h?(v=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,h]}),e[16]=u,e[17]=h,e[18]=v):v=e[18],d=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-containers-panel",children:[x,v,p&&N.length===0?(0,t.jsx)(I,{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")}):(0,t.jsx)(b,{className:"overflow-hidden py-0",children:(0,t.jsx)(S,{className:"px-0",children:(0,t.jsxs)(T,{"data-testid":"containers-table",children:[(0,t.jsx)(k,{children:(0,t.jsxs)(g,{children:[(0,t.jsx)(c,{children:n("Container")}),(0,t.jsx)(c,{children:n("Instance")}),(0,t.jsx)(c,{children:n("State")}),(0,t.jsx)(c,{children:n("Last event")}),(0,t.jsx)(c,{children:n("Detail")}),(0,t.jsx)(c,{children:n("Exit")}),(0,t.jsx)(c,{children:n("When")})]})}),(0,t.jsx)(A,{children:N.map(F)})]})})})]}),e[2]=i,e[3]=s,e[4]=o,e[5]=p,e[6]=n,e[7]=d}else d=e[7];return d},"q");function F(e){return(0,t.jsxs)(g,{"data-testid":`containers-row-${e.name}${e.instance===void 0?"":`-${e.instance}`}`,children:[(0,t.jsx)(l,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(l,{className:"max-w-40 truncate font-mono text-xs text-muted-foreground",title:e.instance,children:e.instance??"\u2014"}),(0,t.jsx)(l,{children:(0,t.jsx)(C,{variant:W[e.state],children:e.state})}),(0,t.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:e.event}),(0,t.jsx)(l,{className:"max-w-64 truncate text-xs text-muted-foreground",title:e.detail,children:e.detail??"\u2014"}),(0,t.jsx)(l,{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.exitCode??"\u2014"}),(0,t.jsx)(l,{className:"text-xs tabular-nums text-muted-foreground",children:new Date(e.timestamp).toLocaleString()})]},`${e.name}/${e.instance??""}`)}f(F,"j");export{V as default};
1
+ import{a as D}from"./chunk-SV764LKQ.js";import{b as C}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import"./chunk-55UGUCQ6.js";import{a as L}from"./chunk-4ZEL6BYL.js";import{c as $}from"./chunk-HECPC2VY.js";import"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import{a as I}from"./chunk-RWVIV3U7.js";import{a as T,b as k,c as A,d as g,e as c,f as l}from"./chunk-HCTJKP5J.js";import{a as b,e as S}from"./chunk-2IKDEUCX.js";import{d as w}from"./chunk-HJHSQPHW.js";import{a as f,d as y,f as _,g as j}from"./chunk-I26MS5PJ.js";var O=y(_(),1);var t=y(j(),1);var E="container:",M={error:"error",sleep:"sleeping",start:"running",stop:"stopped"},B=f(e=>{let n=e.indexOf(":");if(n===-1)return{event:e.trim()};let r=e.slice(n+1).trim(),a=e.slice(0,n).trim();return r===""?{event:a}:{detail:r,event:a}},"B"),P=f(e=>{let n=new Map;for(let r of e){let a=r.functionPath??"";if(!a.startsWith(E))continue;let i=a.slice(E.length);if(i==="")continue;let s=JSON.stringify([i,r.instance??""]),o=n.get(s);if(o!==void 0&&o.timestamp>=r.timestamp)continue;let{detail:p,event:d}=B(r.message);n.set(s,{detail:p,event:d,exitCode:r.exitCode,instance:r.instance,level:r.level,name:i,state:M[d]??"unknown",timestamp:r.timestamp})}return[...n.values()].toSorted((r,a)=>r.name.localeCompare(a.name)||(r.instance??"").localeCompare(a.instance??""))},"D"),W={error:"destructive",running:"success",sleeping:"info",stopped:"outline",unknown:"secondary"},q=f(e=>{let{entries:n}=e??{};return Array.isArray(n)?n:[]},"P"),V=f(()=>{let e=(0,O.c)(19),n=w(),r,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={},a={live:!0,shardKey:""},e[0]=r,e[1]=a):(r=e[0],a=e[1]);let{data:i,error:s,liveError:o}=$(L.getLogs,r,a),p=i!==void 0,d;if(e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==p||e[6]!==n){let N=P(q(i)),x;e[8]!==s?(x=s!==null&&(0,t.jsx)("p",{className:"text-sm text-destructive","data-testid":"containers-error",role:"alert",children:s}),e[8]=s,e[9]=x):x=e[9];let m;e[10]!==n?(m=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[10]=n,e[11]=m):m=e[11];let u;e[12]!==m?(u=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),e[12]=m,e[13]=u):u=e[13];let h;e[14]!==o?(h=(0,t.jsx)(D,{message:o,prefix:"containers"}),e[14]=o,e[15]=h):h=e[15];let v;e[16]!==u||e[17]!==h?(v=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,h]}),e[16]=u,e[17]=h,e[18]=v):v=e[18],d=(0,t.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-containers-panel",children:[x,v,p&&N.length===0?(0,t.jsx)(I,{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")}):(0,t.jsx)(b,{className:"overflow-hidden py-0",children:(0,t.jsx)(S,{className:"px-0",children:(0,t.jsxs)(T,{"data-testid":"containers-table",children:[(0,t.jsx)(k,{children:(0,t.jsxs)(g,{children:[(0,t.jsx)(c,{children:n("Container")}),(0,t.jsx)(c,{children:n("Instance")}),(0,t.jsx)(c,{children:n("State")}),(0,t.jsx)(c,{children:n("Last event")}),(0,t.jsx)(c,{children:n("Detail")}),(0,t.jsx)(c,{children:n("Exit")}),(0,t.jsx)(c,{children:n("When")})]})}),(0,t.jsx)(A,{children:N.map(F)})]})})})]}),e[2]=i,e[3]=s,e[4]=o,e[5]=p,e[6]=n,e[7]=d}else d=e[7];return d},"q");function F(e){return(0,t.jsxs)(g,{"data-testid":`containers-row-${e.name}${e.instance===void 0?"":`-${e.instance}`}`,children:[(0,t.jsx)(l,{className:"font-mono text-xs",children:e.name}),(0,t.jsx)(l,{className:"max-w-40 truncate font-mono text-xs text-muted-foreground",title:e.instance,children:e.instance??"\u2014"}),(0,t.jsx)(l,{children:(0,t.jsx)(C,{variant:W[e.state],children:e.state})}),(0,t.jsx)(l,{className:"font-mono text-xs text-muted-foreground",children:e.event}),(0,t.jsx)(l,{className:"max-w-64 truncate text-xs text-muted-foreground",title:e.detail,children:e.detail??"\u2014"}),(0,t.jsx)(l,{className:"font-mono text-xs tabular-nums text-muted-foreground",children:e.exitCode??"\u2014"}),(0,t.jsx)(l,{className:"text-xs tabular-nums text-muted-foreground",children:new Date(e.timestamp).toLocaleString()})]},`${e.name}/${e.instance??""}`)}f(F,"j");export{V as default};
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-YKXDMIHQ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",E=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},RUN_KIND_FORBIDDEN:{status:500,title:"Function kind may not be composed from a query"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},MIGRATION_DRIFT:{hint:["An applied SQL migration is never re-run, so the runner stopped before applying anything.","","- **Its text changed after it ran:** revert the edit and put the change in a new migration. If the edit is inert (a comment, whitespace, line endings), record the new hash with the `UPDATE` the message prints.","- **Tracking rows predate versions and match no migration:** set each row's `version` with the `UPDATE` the message prints, so the runner can tell what already ran."],status:409,title:"Migration drift"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},SHARD_TIMEOUT:{status:504,title:"Shard timeout"},SHARD_HTTP_ERROR:{status:502,title:"Shard HTTP error"},SUBSCRIPTION_PERSIST_FAILED:{status:500,title:"Subscription persist failed"},TOO_MANY_SUBSCRIPTIONS:{status:429,title:"Too many subscriptions"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},IDENTITY_MISMATCH:{hint:["A write queued offline was replayed on a session that now belongs to someone else (a sign-out, or another user's sign-in, while it waited), so the worker refused it rather than commit it as them.","","`@lunora/client` re-resolves the session on this refusal and settles the write itself. If every replay is refused while the same user stays signed in, your worker's `resolveIdentity` returns a different `userId` than better-auth's `user.id`, or the RPC request carries no session cookie."],status:409,title:"Session changed since the write was queued"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},JURISDICTION_MOVE:{hint:["The schema declares `.jurisdiction(...)` and the project has DO-backed auth (`.auth({ namespace })`). Pinning the auth object to the jurisdiction resolves it to a new, empty one: every user, account and session stays in the unpinned object until copied across. Voice sessions are pinned without an acknowledgement: they store nothing, and their transcripts are rows in the already-pinned shards.","",'Acknowledge with `.jurisdiction("eu", { pinAuth: true })` and deploy, then copy the auth tables across with the `__lunora_admin__:copyAuthToJurisdiction` admin op and, once the counts check out, purge the unpinned copy with `__lunora_admin__:purgeUnpinnedAuth` (see [Pinning auth and voice](/docs/concepts/data-residency#pinning-auth-and-voice)). For D1-mode auth the acknowledgement changes nothing.'],status:422,title:"Unacknowledged jurisdiction move"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` in the `EmailGateConfig` you hand `assertEmailAllowed` / `classifyEmail` / `emailGateMiddleware` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_QUERY_ERROR:{status:502,title:"Analytics SQL query error"},BROWSER_RUN_ERROR:{status:502,title:"Browser Run API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},CONFIG_INVALID:{internal:!0,status:500,title:"Payment configuration invalid"},CURRENCY_MISMATCH:{status:400,title:"Currency mismatch"},PROVIDER_ERROR:{status:502,title:"Payment provider error"},WEBHOOK_EVENT_ID_MISSING:{status:400,title:"Webhook event id missing"},WEBHOOK_SIGNATURE_INVALID:{status:400,title:"Webhook signature invalid"},WEBHOOK_TIMESTAMP_INVALID:{status:400,title:"Webhook timestamp outside tolerance"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_MIGRATOR_UNSUPPORTED:{hint:["better-auth migrates only through its Kysely adapter, so `ensureMigrated` / `compileMigrationsSql` need the raw D1 binding as `database` \u2014 a custom adapter (`lunoraD1Adapter`, `lunoraAuthAdapter`, `lunoraDoAdapter`) cannot be migrated through, and neither can an absent `database`.","","Build a SECOND, migration-only instance over the raw binding \u2014 `createAuth({ ...options, database: env.DB })` \u2014 and hand that one to `ensureMigrated`. Keep the adapter on the instance that serves requests: the adapter exists to dodge a dev-runner hang in `$context`, which the migration instance never resolves.","","To compile the SQL off-platform (`compileMigrationsSql`), diff against an empty local database \u2014 `new DatabaseSync(':memory:')` from `node:sqlite` \u2014 rather than passing no `database` at all."],status:500,title:"Auth migrator cannot drive the configured database"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},AUTH_CIMD_FETCH_NOT_PUBLIC:{hint:'Add "global_fetch_strictly_public" to "compatibility_flags" in wrangler.jsonc, so CIMD metadata fetches cannot reach private addresses. `lunora doctor` reports it as `cimd-fetch-not-strictly-public`.',status:500,title:"CIMD transport needs the global_fetch_strictly_public flag"},AUTH_MCP_RESOURCE_AMBIGUOUS:{hint:'Use `mcp` from "@lunora/auth/plugins" (not `@better-auth/mcp`) and pass the plugin object as is: it records its `resource`, which the worker needs to serve the protected-resource metadata when the provider names several resources.',status:500,title:"MCP resource cannot be told apart from the provider's other resources"},AUTH_MCP_RESOURCE_INVALID:{hint:"Pass `resource` to `requireMcpAuth` (and `mcp()`) as the absolute URL of the MCP route, e.g. `https://app.example.com/mcp`: issued tokens are audience-bound to it.",status:500,title:"MCP resource missing or not an absolute URL"},MCP_STEP_UP_MISCONFIGURED:{hint:"Give `createAuthedMcpFetchHandler`'s `stepUp` a non-empty `scope` (such as `lunora:write`) and a `challenge` (`createInsufficientScopeError` from `@lunora/auth/plugins`), or leave `stepUp` out.",status:500,title:"MCP step-up misconfigured"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_SHARD_FAILED:{hint:["One or more shards failed to export, so the snapshot would have been short. Nothing is written when this fires \u2014 a partial export must never be mistaken for a complete one.","","The message names each failed shard key and its error. Re-run the export once those shards are reachable; a shard that fails repeatedly is usually over the per-request memory budget, which `backupTables` narrows."],status:502,title:"Export failed on one or more shards"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},ID_COLLISION:{hint:["The imported row carries an `_id` that is already held by a DIFFERENT table in this shard. Ids are per-table, so inserting it would leave two tables claiming one id and make a later lookup resolve to whichever one it reached first.","","This is reported per row rather than aborting the import: the remaining rows still apply. Re-mint the id on the source side, or import that table into a shard that does not already hold it."],status:409,title:"Document id already belongs to another table"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},RAG_DIMENSION_MISMATCH:{hint:["A stored vector and the query embedding have different widths, so they cannot be compared.","","This is what changing a RAG index's `embeddingModel` (or a provider's `dimensions` option) without reindexing looks like. Either put the previous model back, or reindex the namespace under the new one \u2014 bump `embeddingModelVersion` so the index rebuilds instead of mixing widths."],status:409,title:"Embedding dimension mismatch"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},AUTH_MOVE_NOT_CONFIGURED:{hint:"The copy needs DO-backed auth (`.auth({ namespace })`) pinned with `.jurisdiction(\u2026, { pinAuth: true })`, and the auth object's `internalSecret` set.",status:400,title:"Auth jurisdiction move not configured"},AUTH_MOVE_TARGET_NOT_EMPTY:{hint:"The pinned auth object holds users the copy did not write (someone signed up there), so copying into it would merge two user bases. Pass `force: true` to copy anyway: a copied row that collides with one of the pinned object's rows is left out and counted under `conflicts`.",status:409,title:"Pinned auth object is not empty"},AUTH_MOVE_CONFLICT:{hint:"A copied row has the same key or unique value (such as an email) as a row the pinned auth object holds on its own, or the pinned object changed a row the source changed too. Nothing from that page was written. Pass `force: true` to keep the pinned object's rows and count the collisions under `conflicts`.",status:409,title:"Auth copy conflict"},AUTH_MOVE_SOURCE_CHANGED:{hint:"The un-pinned auth object changed after the copy read it (an update, a delete, or a new row), for example during a gradual rollout or a rollback. Run the copy again: it reconciles the changed tables. Then purge.",status:409,title:"Un-pinned auth object changed since the copy"},AUTH_MOVE_SOURCE_PURGED:{hint:"The un-pinned auth object was already purged. Its tables may exist again (a rollback served requests there), but they hold only rows written since, so the copy refuses rather than read them as deletions and remove the pinned object's users. Nothing is left to copy.",status:409,title:"Un-pinned auth object already purged"},AUTH_MOVE_INCOMPLETE:{hint:"Run `__lunora_admin__:copyAuthToJurisdiction` until it answers `done: true`, check the per-table counts, then purge.",status:409,title:"Auth copy not finished"},AUTH_MOVE_FAILED:{hint:"The message names the step, the table and the class of the SQLite error; the auth object's log has the full error. The copy resumes where it stopped once the cause is fixed.",status:500,title:"Auth jurisdiction move failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},DISPATCH_UNAUTHENTICATED:{hint:"The scheduler could not authenticate to the worker. Check that `LUNORA_SCHEDULER_SECRET` matches on both sides, or that `LUNORA_ADMIN_TOKEN` is set and current.",status:403,title:"Dispatch caller not authenticated"},DISPATCH_IN_PROGRESS:{hint:"A dispatch with this idempotency id is still running on the shard. Retry it; once the first attempt settles the same id is served from the replay cache.",status:409,title:"Dispatch already in progress"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},INVALID_SCHEDULE_ID:{status:400,title:"Invalid schedule id"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SEARCH_INDEX_BUILDING:{status:503,title:"Search index is still building"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_MEMORY_TABLE:{status:400,title:"Shape over a memory table is unsupported"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},WIRE_DECODE_FAILED:{status:502,title:"Could not decode a server frame"},WIRE_ENCODE_FAILED:{status:500,title:"Could not encode a return value"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_TIMELINE_FORKED:{status:409,title:"CDC timeline forked"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_ID_IN_USE:{status:409,title:"Stream id already in use"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},TOKEN_EXPIRED:{hint:["The caller's credential verified but its expiry has passed. The worker refuses an HTTP call with this code before it runs; a shard drops a socket with close code `4001` and the same code.","","It is a refusal of the credential, not of the call: `@lunora/client` holds a queued write, fires `onTokenExpired`, and re-sends it after `setAuthToken`. The held write survives the refresh only if you pass the same `subject` (the user id) with the new token, `setAuthToken(freshToken, user.id)`; without one a refresh reads as a user switch and the write is rejected `OFFLINE_IDENTITY_CHANGED`. Under a cookie session there is no token to replace: renew the cookie and the write is re-sent on a backoff. The worker can only tell expired from anonymous if your `resolveIdentity` returns the identity with its past `exp` (or `expiresAtMs`), or throws a `LunoraError` with this code. Returning `null` runs the call anonymous."],status:401,title:"Authentication token expired"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},TOO_MANY_WHISPER_TOPICS:{hint:"Reuse a stable set of whisper topic names, or reconnect \u2014 the per-socket verdict memo is in-memory, so a new connection starts empty. Leaving a topic does not free its entry.",status:429,title:"Too many whisper topics"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"},LOCAL_DEPENDENCY_MISSING:{hint:["The command Lunora tried to run is not on your PATH, so nothing ran.","","Install it (or put it on PATH) and retry \u2014 `wrangler` ships as a dependency of a Lunora app, so `pnpm install` usually fixes that one; `git` and `docker` are installed separately."],status:500,title:"Required local tool not found"}},c=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
1
+ import{a}from"./chunk-I26MS5PJ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",E=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},RUN_KIND_FORBIDDEN:{status:500,title:"Function kind may not be composed from a query"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},MIGRATION_DRIFT:{hint:["An applied SQL migration is never re-run, so the runner stopped before applying anything.","","- **Its text changed after it ran:** revert the edit and put the change in a new migration. If the edit is inert (a comment, whitespace, line endings), record the new hash with the `UPDATE` the message prints.","- **Tracking rows predate versions and match no migration:** set each row's `version` with the `UPDATE` the message prints, so the runner can tell what already ran."],status:409,title:"Migration drift"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},SHARD_TIMEOUT:{status:504,title:"Shard timeout"},SHARD_HTTP_ERROR:{status:502,title:"Shard HTTP error"},SUBSCRIPTION_PERSIST_FAILED:{status:500,title:"Subscription persist failed"},TOO_MANY_SUBSCRIPTIONS:{status:429,title:"Too many subscriptions"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},IDENTITY_MISMATCH:{hint:["A write queued offline was replayed on a session that now belongs to someone else (a sign-out, or another user's sign-in, while it waited), so the worker refused it rather than commit it as them.","","`@lunora/client` re-resolves the session on this refusal and settles the write itself. If every replay is refused while the same user stays signed in, your worker's `resolveIdentity` returns a different `userId` than better-auth's `user.id`, or the RPC request carries no session cookie."],status:409,title:"Session changed since the write was queued"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},JURISDICTION_MOVE:{hint:["The schema declares `.jurisdiction(...)` and the project has DO-backed auth (`.auth({ namespace })`). Pinning the auth object to the jurisdiction resolves it to a new, empty one: every user, account and session stays in the unpinned object until copied across. Voice sessions are pinned without an acknowledgement: they store nothing, and their transcripts are rows in the already-pinned shards.","",'Acknowledge with `.jurisdiction("eu", { pinAuth: true })` and deploy, then copy the auth tables across with the `__lunora_admin__:copyAuthToJurisdiction` admin op and, once the counts check out, purge the unpinned copy with `__lunora_admin__:purgeUnpinnedAuth` (see [Pinning auth and voice](/docs/concepts/data-residency#pinning-auth-and-voice)). For D1-mode auth the acknowledgement changes nothing.'],status:422,title:"Unacknowledged jurisdiction move"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` in the `EmailGateConfig` you hand `assertEmailAllowed` / `classifyEmail` / `emailGateMiddleware` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_QUERY_ERROR:{status:502,title:"Analytics SQL query error"},BROWSER_RUN_ERROR:{status:502,title:"Browser Run API error"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},CONFIG_INVALID:{internal:!0,status:500,title:"Payment configuration invalid"},CURRENCY_MISMATCH:{status:400,title:"Currency mismatch"},PROVIDER_ERROR:{status:502,title:"Payment provider error"},WEBHOOK_EVENT_ID_MISSING:{status:400,title:"Webhook event id missing"},WEBHOOK_SIGNATURE_INVALID:{status:400,title:"Webhook signature invalid"},WEBHOOK_TIMESTAMP_INVALID:{status:400,title:"Webhook timestamp outside tolerance"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_MIGRATOR_UNSUPPORTED:{hint:["better-auth migrates only through its Kysely adapter, so `ensureMigrated` / `compileMigrationsSql` need the raw D1 binding as `database` \u2014 a custom adapter (`lunoraD1Adapter`, `lunoraAuthAdapter`, `lunoraDoAdapter`) cannot be migrated through, and neither can an absent `database`.","","Build a SECOND, migration-only instance over the raw binding \u2014 `createAuth({ ...options, database: env.DB })` \u2014 and hand that one to `ensureMigrated`. Keep the adapter on the instance that serves requests: the adapter exists to dodge a dev-runner hang in `$context`, which the migration instance never resolves.","","To compile the SQL off-platform (`compileMigrationsSql`), diff against an empty local database \u2014 `new DatabaseSync(':memory:')` from `node:sqlite` \u2014 rather than passing no `database` at all."],status:500,title:"Auth migrator cannot drive the configured database"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},AUTH_CIMD_FETCH_NOT_PUBLIC:{hint:'Add "global_fetch_strictly_public" to "compatibility_flags" in wrangler.jsonc, so CIMD metadata fetches cannot reach private addresses. `lunora doctor` reports it as `cimd-fetch-not-strictly-public`.',status:500,title:"CIMD transport needs the global_fetch_strictly_public flag"},AUTH_MCP_RESOURCE_AMBIGUOUS:{hint:'Use `mcp` from "@lunora/auth/plugins" (not `@better-auth/mcp`) and pass the plugin object as is: it records its `resource`, which the worker needs to serve the protected-resource metadata when the provider names several resources.',status:500,title:"MCP resource cannot be told apart from the provider's other resources"},AUTH_MCP_RESOURCE_INVALID:{hint:"Pass `resource` to `requireMcpAuth` (and `mcp()`) as the absolute URL of the MCP route, e.g. `https://app.example.com/mcp`: issued tokens are audience-bound to it.",status:500,title:"MCP resource missing or not an absolute URL"},MCP_STEP_UP_MISCONFIGURED:{hint:"Give `createAuthedMcpFetchHandler`'s `stepUp` a non-empty `scope` (such as `lunora:write`) and a `challenge` (`createInsufficientScopeError` from `@lunora/auth/plugins`), or leave `stepUp` out.",status:500,title:"MCP step-up misconfigured"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_SHARD_FAILED:{hint:["One or more shards failed to export, so the snapshot would have been short. Nothing is written when this fires \u2014 a partial export must never be mistaken for a complete one.","","The message names each failed shard key and its error. Re-run the export once those shards are reachable; a shard that fails repeatedly is usually over the per-request memory budget, which `backupTables` narrows."],status:502,title:"Export failed on one or more shards"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},ID_COLLISION:{hint:["The imported row carries an `_id` that is already held by a DIFFERENT table in this shard. Ids are per-table, so inserting it would leave two tables claiming one id and make a later lookup resolve to whichever one it reached first.","","This is reported per row rather than aborting the import: the remaining rows still apply. Re-mint the id on the source side, or import that table into a shard that does not already hold it."],status:409,title:"Document id already belongs to another table"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},RAG_DIMENSION_MISMATCH:{hint:["A stored vector and the query embedding have different widths, so they cannot be compared.","","This is what changing a RAG index's `embeddingModel` (or a provider's `dimensions` option) without reindexing looks like. Either put the previous model back, or reindex the namespace under the new one \u2014 bump `embeddingModelVersion` so the index rebuilds instead of mixing widths."],status:409,title:"Embedding dimension mismatch"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},AUTH_MOVE_NOT_CONFIGURED:{hint:"The copy needs DO-backed auth (`.auth({ namespace })`) pinned with `.jurisdiction(\u2026, { pinAuth: true })`, and the auth object's `internalSecret` set.",status:400,title:"Auth jurisdiction move not configured"},AUTH_MOVE_TARGET_NOT_EMPTY:{hint:"The pinned auth object holds users the copy did not write (someone signed up there), so copying into it would merge two user bases. Pass `force: true` to copy anyway: a copied row that collides with one of the pinned object's rows is left out and counted under `conflicts`.",status:409,title:"Pinned auth object is not empty"},AUTH_MOVE_CONFLICT:{hint:"A copied row has the same key or unique value (such as an email) as a row the pinned auth object holds on its own, or the pinned object changed a row the source changed too. Nothing from that page was written. Pass `force: true` to keep the pinned object's rows and count the collisions under `conflicts`.",status:409,title:"Auth copy conflict"},AUTH_MOVE_SOURCE_CHANGED:{hint:"The un-pinned auth object changed after the copy read it (an update, a delete, or a new row), for example during a gradual rollout or a rollback. Run the copy again: it reconciles the changed tables. Then purge.",status:409,title:"Un-pinned auth object changed since the copy"},AUTH_MOVE_SOURCE_PURGED:{hint:"The un-pinned auth object was already purged. Its tables may exist again (a rollback served requests there), but they hold only rows written since, so the copy refuses rather than read them as deletions and remove the pinned object's users. Nothing is left to copy.",status:409,title:"Un-pinned auth object already purged"},AUTH_MOVE_INCOMPLETE:{hint:"Run `__lunora_admin__:copyAuthToJurisdiction` until it answers `done: true`, check the per-table counts, then purge.",status:409,title:"Auth copy not finished"},AUTH_MOVE_FAILED:{hint:"The message names the step, the table and the class of the SQLite error; the auth object's log has the full error. The copy resumes where it stopped once the cause is fixed.",status:500,title:"Auth jurisdiction move failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},DISPATCH_UNAUTHENTICATED:{hint:"The scheduler could not authenticate to the worker. Check that `LUNORA_SCHEDULER_SECRET` matches on both sides, or that `LUNORA_ADMIN_TOKEN` is set and current.",status:403,title:"Dispatch caller not authenticated"},DISPATCH_IN_PROGRESS:{hint:"A dispatch with this idempotency id is still running on the shard. Retry it; once the first attempt settles the same id is served from the replay cache.",status:409,title:"Dispatch already in progress"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},INVALID_SCHEDULE_ID:{status:400,title:"Invalid schedule id"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SEARCH_INDEX_BUILDING:{status:503,title:"Search index is still building"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_MEMORY_TABLE:{status:400,title:"Shape over a memory table is unsupported"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},WIRE_DECODE_FAILED:{status:502,title:"Could not decode a server frame"},WIRE_ENCODE_FAILED:{status:500,title:"Could not encode a return value"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_TIMELINE_FORKED:{status:409,title:"CDC timeline forked"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_ID_IN_USE:{status:409,title:"Stream id already in use"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},TOKEN_EXPIRED:{hint:["The caller's credential verified but its expiry has passed. The worker refuses an HTTP call with this code before it runs; a shard drops a socket with close code `4001` and the same code.","","It is a refusal of the credential, not of the call: `@lunora/client` holds a queued write, fires `onTokenExpired`, and re-sends it after `setAuthToken`. The held write survives the refresh only if you pass the same `subject` (the user id) with the new token, `setAuthToken(freshToken, user.id)`; without one a refresh reads as a user switch and the write is rejected `OFFLINE_IDENTITY_CHANGED`. Under a cookie session there is no token to replace: renew the cookie and the write is re-sent on a backoff. The worker can only tell expired from anonymous if your `resolveIdentity` returns the identity with its past `exp` (or `expiresAtMs`), or throws a `LunoraError` with this code. Returning `null` runs the call anonymous."],status:401,title:"Authentication token expired"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},TOO_MANY_WHISPER_TOPICS:{hint:"Reuse a stable set of whisper topic names, or reconnect \u2014 the per-socket verdict memo is in-memory, so a new connection starts empty. Leaving a topic does not free its entry.",status:429,title:"Too many whisper topics"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"},LOCAL_DEPENDENCY_MISSING:{hint:["The command Lunora tried to run is not on your PATH, so nothing ran.","","Install it (or put it on PATH) and retry \u2014 `wrangler` ships as a dependency of a Lunora app, so `pnpm install` usually fixes that one; `git` and `docker` are installed separately."],status:500,title:"Required local tool not found"}},c=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
2
2
  `),header:"Row too large for the storage engine",id:"lunora-row-too-big",test:a(e=>E.test(e),"test")},{body:["Lunora codegen couldn't find a schema to generate from.","","Create `lunora/schema.ts` exporting a `defineSchema(...)` call:","","```ts",'import { defineSchema, defineTable, v } from "@lunora/server";',"","export default defineSchema({"," messages: defineTable({ body: v.string() }),","});","```","","Or run `lunora init` to scaffold Lunora (a sample `lunora/schema.ts` included) into your app."].join(`
3
3
  `),header:"No Lunora schema found",id:"lunora-schema-missing",test:a(e=>e.includes("defineSchema() not found")||e.includes("schema.ts not found at"),"test")},{body:["`defineSchema(...)` must be called with an **inline object literal** mapping table names to `defineTable(...)`:","","```ts","export default defineSchema({"," todos: defineTable({ title: v.string(), done: v.boolean() }),","});","```","","Codegen reads the schema statically, so it can't follow a variable or a spread \u2014 pass the object literal directly."].join(`
4
4
  `),header:"`defineSchema()` needs an inline object literal",id:"lunora-schema-not-object-literal",test:a(e=>e.includes("defineSchema() expects an object literal"),"test")},{body:["This table name collides with a built-in `ctx.db` member, so the generated client can't expose it.","","Rename the table to anything that isn't a `ctx.db` member (the error names the one it hit) \u2014 e.g. `userAccounts` instead of `insert`, or `pageViews` instead of `count`."].join(`
@@ -1 +1 @@
1
- import{i as R}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 S}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as q}from"./chunk-YLPFIPVU.js";import"./chunk-ULIQFBZU.js";import"./chunk-XC734N2Q.js";import"./chunk-35DM4JJG.js";import{a as U}from"./chunk-4ZEL6BYL.js";import{c as O}from"./chunk-ZD2UXTLR.js";import"./chunk-EGVOSH7K.js";import"./chunk-FSRSK4LY.js";import"./chunk-RDL5WK55.js";import{a as D}from"./chunk-FKVZRPV5.js";import{a as G,b as J,c as K,d as F,e as s,f as o}from"./chunk-HEAQVSNS.js";import{a as V,e as W}from"./chunk-N6NMLJ6R.js";import{d as P,t as H}from"./chunk-PTZD7RUZ.js";import{a as n,d as j,e as re,f as ae,g as ie}from"./chunk-YKXDMIHQ.js";var X=j(ae(),1),M=j(re(),1);var t=j(ie(),1);var ne=n(e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary","te"),Q=n(e=>e.endpoint??e.id,"M"),ve=n(()=>{let e=(0,X.c)(38),r=P(),[i,Y]=(0,M.useState)("all"),[l,Z]=(0,M.useState)(""),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];let{data:I,error:d,errorSource:x,isLoading:_,refetch:v}=O(U.listPushSubscriptions,g),N;if(e[1]!==I?.subscriptions||e[2]!==d||e[3]!==x||e[4]!==_||e[5]!==i||e[6]!==v||e[7]!==l||e[8]!==r){let L=I?.subscriptions??[],T=l.trim().toLowerCase(),A=L.filter(a=>i!=="all"&&a.kind!==i?!1:T===""?!0:`${Q(a)} ${a.userId??""}`.toLowerCase().includes(T)),b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n(a=>{Z(a.target.value)},"w"),e[10]=b):b=e[10];let ee=b,w;e[11]!==v?(w=n(()=>{v()},"y"),e[11]=v,e[12]=w):w=e[12];let E=w,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=["all","web-push","fcm"],e[13]=k):k=e[13];let te=k,c;e[14]!==i||e[15]!==r?(c=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:te.map(a=>(0,t.jsx)(B,{"aria-selected":i===a,"data-testid":`nt-kind-${a}`,onClick:n(()=>{Y(a)},"onClick"),role:"tab",size:"sm",type:"button",variant:i===a?"secondary":"ghost",children:a==="all"?r("All"):a},a))}),e[14]=i,e[15]=r,e[16]=c):c=e[16];let m;e[17]!==r?(m=r("Filter devices"),e[17]=r,e[18]=m):m=e[18];let h;e[19]!==r?(h=r("filter endpoint, user"),e[19]=r,e[20]=h):h=e[20];let u;e[21]!==l||e[22]!==m||e[23]!==h?(u=(0,t.jsx)(R,{"aria-label":m,className:"h-8 w-56","data-testid":"nt-search",onChange:ee,placeholder:h,value:l}),e[21]=l,e[22]=m,e[23]=h,e[24]=u):u=e[24];let f;e[25]!==r?(f=r("Refresh"),e[25]=r,e[26]=f):f=e[26];let p;e[27]!==E||e[28]!==f?(p=(0,t.jsx)(B,{className:"ml-auto","data-testid":"nt-refresh",onClick:E,size:"sm",type:"button",variant:"outline",children:f}),e[27]=E,e[28]=f,e[29]=p):p=e[29];let $=L.length>0&&(0,t.jsx)(S,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:L.length})}),y;e[30]!==p||e[31]!==$||e[32]!==c||e[33]!==u?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u,p,$]}),e[30]=p,e[31]=$,e[32]=c,e[33]=u,e[34]=y):y=e[34];let C;e[35]!==d||e[36]!==x?(C=d!==null&&(0,t.jsx)(q,{error:x,testId:"nt-error"}),e[35]=d,e[36]=x,e[37]=C):C=e[37],N=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[y,C,d===null&&!_&&A.length===0&&(0,t.jsx)(D,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:(0,t.jsx)("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:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),A.length>0&&(0,t.jsx)(V,{className:"overflow-hidden py-0",children:(0,t.jsx)(W,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"nt-table",children:[(0,t.jsx)(J,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(s,{children:r("kind")}),(0,t.jsx)(s,{children:r("endpoint")}),(0,t.jsx)(s,{children:r("user")}),(0,t.jsx)(s,{children:r("last seen")}),(0,t.jsx)(s,{children:r("status")}),(0,t.jsx)(s,{children:r("error")})]})}),(0,t.jsx)(K,{children:A.map(a=>{let z=Q(a);return(0,t.jsxs)(F,{"data-testid":"nt-row",children:[(0,t.jsx)(o,{children:(0,t.jsx)(S,{variant:"outline",children:a.kind})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs",title:z,children:z}),(0,t.jsx)(o,{className:"max-w-[16ch] truncate font-mono text-xs",children:a.userId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsx)(o,{className:"text-muted-foreground tabular-nums",children:H(a.lastSeenAt,"\u2014")}),(0,t.jsx)(o,{children:(0,t.jsx)(S,{"data-testid":`nt-status-${a.id}`,variant:ne(a.lastStatus),children:a.lastStatus??r("n/a")})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:a.lastError??void 0,children:a.lastError??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},a.id)})})]})})})]}),e[1]=I?.subscriptions,e[2]=d,e[3]=x,e[4]=_,e[5]=i,e[6]=v,e[7]=l,e[8]=r,e[9]=N}else N=e[9];return N},"ge");export{ve as default};
1
+ import{i as R}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 S}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as q}from"./chunk-ZWXQKMYE.js";import"./chunk-NCPW7WHO.js";import"./chunk-4ZDBUYGM.js";import"./chunk-55UGUCQ6.js";import{a as U}from"./chunk-4ZEL6BYL.js";import{c as O}from"./chunk-HECPC2VY.js";import"./chunk-WNZLTRKF.js";import"./chunk-QAQDMS6R.js";import"./chunk-PCBRDDD7.js";import{a as D}from"./chunk-RWVIV3U7.js";import{a as G,b as J,c as K,d as F,e as s,f as o}from"./chunk-HCTJKP5J.js";import{a as V,e as W}from"./chunk-2IKDEUCX.js";import{d as P,t as H}from"./chunk-HJHSQPHW.js";import{a as n,d as j,e as re,f as ae,g as ie}from"./chunk-I26MS5PJ.js";var X=j(ae(),1),M=j(re(),1);var t=j(ie(),1);var ne=n(e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary","te"),Q=n(e=>e.endpoint??e.id,"M"),ve=n(()=>{let e=(0,X.c)(38),r=P(),[i,Y]=(0,M.useState)("all"),[l,Z]=(0,M.useState)(""),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];let{data:I,error:d,errorSource:x,isLoading:_,refetch:v}=O(U.listPushSubscriptions,g),N;if(e[1]!==I?.subscriptions||e[2]!==d||e[3]!==x||e[4]!==_||e[5]!==i||e[6]!==v||e[7]!==l||e[8]!==r){let L=I?.subscriptions??[],T=l.trim().toLowerCase(),A=L.filter(a=>i!=="all"&&a.kind!==i?!1:T===""?!0:`${Q(a)} ${a.userId??""}`.toLowerCase().includes(T)),b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n(a=>{Z(a.target.value)},"w"),e[10]=b):b=e[10];let ee=b,w;e[11]!==v?(w=n(()=>{v()},"y"),e[11]=v,e[12]=w):w=e[12];let E=w,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=["all","web-push","fcm"],e[13]=k):k=e[13];let te=k,c;e[14]!==i||e[15]!==r?(c=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:te.map(a=>(0,t.jsx)(B,{"aria-selected":i===a,"data-testid":`nt-kind-${a}`,onClick:n(()=>{Y(a)},"onClick"),role:"tab",size:"sm",type:"button",variant:i===a?"secondary":"ghost",children:a==="all"?r("All"):a},a))}),e[14]=i,e[15]=r,e[16]=c):c=e[16];let m;e[17]!==r?(m=r("Filter devices"),e[17]=r,e[18]=m):m=e[18];let h;e[19]!==r?(h=r("filter endpoint, user"),e[19]=r,e[20]=h):h=e[20];let u;e[21]!==l||e[22]!==m||e[23]!==h?(u=(0,t.jsx)(R,{"aria-label":m,className:"h-8 w-56","data-testid":"nt-search",onChange:ee,placeholder:h,value:l}),e[21]=l,e[22]=m,e[23]=h,e[24]=u):u=e[24];let f;e[25]!==r?(f=r("Refresh"),e[25]=r,e[26]=f):f=e[26];let p;e[27]!==E||e[28]!==f?(p=(0,t.jsx)(B,{className:"ml-auto","data-testid":"nt-refresh",onClick:E,size:"sm",type:"button",variant:"outline",children:f}),e[27]=E,e[28]=f,e[29]=p):p=e[29];let $=L.length>0&&(0,t.jsx)(S,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:L.length})}),y;e[30]!==p||e[31]!==$||e[32]!==c||e[33]!==u?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u,p,$]}),e[30]=p,e[31]=$,e[32]=c,e[33]=u,e[34]=y):y=e[34];let C;e[35]!==d||e[36]!==x?(C=d!==null&&(0,t.jsx)(q,{error:x,testId:"nt-error"}),e[35]=d,e[36]=x,e[37]=C):C=e[37],N=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[y,C,d===null&&!_&&A.length===0&&(0,t.jsx)(D,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:(0,t.jsx)("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:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),A.length>0&&(0,t.jsx)(V,{className:"overflow-hidden py-0",children:(0,t.jsx)(W,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"nt-table",children:[(0,t.jsx)(J,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(s,{children:r("kind")}),(0,t.jsx)(s,{children:r("endpoint")}),(0,t.jsx)(s,{children:r("user")}),(0,t.jsx)(s,{children:r("last seen")}),(0,t.jsx)(s,{children:r("status")}),(0,t.jsx)(s,{children:r("error")})]})}),(0,t.jsx)(K,{children:A.map(a=>{let z=Q(a);return(0,t.jsxs)(F,{"data-testid":"nt-row",children:[(0,t.jsx)(o,{children:(0,t.jsx)(S,{variant:"outline",children:a.kind})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs",title:z,children:z}),(0,t.jsx)(o,{className:"max-w-[16ch] truncate font-mono text-xs",children:a.userId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsx)(o,{className:"text-muted-foreground tabular-nums",children:H(a.lastSeenAt,"\u2014")}),(0,t.jsx)(o,{children:(0,t.jsx)(S,{"data-testid":`nt-status-${a.id}`,variant:ne(a.lastStatus),children:a.lastStatus??r("n/a")})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:a.lastError??void 0,children:a.lastError??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},a.id)})})]})})})]}),e[1]=I?.subscriptions,e[2]=d,e[3]=x,e[4]=_,e[5]=i,e[6]=v,e[7]=l,e[8]=r,e[9]=N}else N=e[9];return N},"ge");export{ve as default};
@@ -1 +1 @@
1
- import{a as N}from"./chunk-FKVZRPV5.js";import{a as q,b as A,c as M,d as w,e as C,f as E}from"./chunk-HEAQVSNS.js";import{a as v}from"./chunk-N6NMLJ6R.js";import{d as g,h as j,o as L,p as S}from"./chunk-PTZD7RUZ.js";import{a as u,d as x,e as H,f as I,g as R}from"./chunk-YKXDMIHQ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(v,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(A,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(M,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:L(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:j(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return S(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(N,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
1
+ import{a as N}from"./chunk-RWVIV3U7.js";import{a as q,b as A,c as M,d as w,e as C,f as E}from"./chunk-HCTJKP5J.js";import{a as v}from"./chunk-2IKDEUCX.js";import{d as g,h as j,o as L,p as S}from"./chunk-HJHSQPHW.js";import{a as u,d as x,e as H,f as I,g as R}from"./chunk-I26MS5PJ.js";var Q=x(I(),1),d=x(H(),1);var a=x(R(),1);var T={volume:"Request volume per function",latency:"Latency p50 / p95 per function",hotShards:"Hot shards"},O=Object.keys(T),P={error:null,loading:!0,rows:null},$=u(s=>Object.keys(s[0]??{}),"B"),U=u(s=>{let e=(0,Q.c)(22),{state:y,title:o}=s,l=g(),{error:t,loading:r,rows:n}=y,c;if(e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==o){let b=n===null?[]:$(n),i;e[6]!==l||e[7]!==o?(i=l(o),e[6]=l,e[7]=o,e[8]=i):i=e[8];let p;e[9]!==i?(p=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i})}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==r||e[12]!==l?(m=r&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:l("Loading\u2026")}),e[11]=r,e[12]=l,e[13]=m):m=e[13];let h;e[14]!==t||e[15]!==r?(h=!r&&t!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:t}),e[14]=t,e[15]=r,e[16]=h):h=e[16];let f;e[17]!==t||e[18]!==r||e[19]!==n||e[20]!==l?(f=!r&&t===null&&n!==null&&n.length===0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:l("No data points yet.")}),e[17]=t,e[18]=r,e[19]=n,e[20]=l,e[21]=f):f=e[21],c=(0,a.jsxs)(v,{className:"gap-0 py-0","data-testid":`analytics-panel-${o}`,children:[p,m,h,f,!r&&t===null&&n!==null&&n.length>0&&(0,a.jsxs)(q,{children:[(0,a.jsx)(A,{children:(0,a.jsx)(w,{children:b.map(W)})}),(0,a.jsx)(M,{children:n.map((V,B)=>(0,a.jsx)(w,{children:b.map(k=>(0,a.jsx)(E,{className:"font-mono text-xs",children:L(V[k])},k))},B))})]})]}),e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c}else c=e[5];return c},"V"),G=u(({runQuery:s}={})=>{let e=g(),[y,o]=(0,d.useState)({}),l=(0,d.useCallback)(async t=>{if(s!==void 0)for(let r of O){if(t.cancelled)return;o(n=>({...n,[r]:P}));try{let{rows:n}=await s(r);t.cancelled||o(c=>({...c,[r]:{error:null,loading:!1,rows:n}}))}catch(n){t.cancelled||o(c=>({...c,[r]:{error:j(n),loading:!1,rows:null}}))}}},[s]);return(0,d.useEffect)(()=>{let t={cancelled:!1};return S(l(t)),()=>{t.cancelled=!0}},[l]),s===void 0?(0,a.jsx)(N,{description:e("Analytics usage panels read through your worker, never from the browser. Pass studio.analyticsSqlQuery, a runner that calls an admin-only action running functionUsageQuery(panel) through ctx.analyticsSql, to enable these panels."),icon:(0,a.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"})}),testId:"analytics-not-configured",title:e("Analytics usage panels are not wired up.")}):(0,a.jsx)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:O.map(t=>(0,a.jsx)(U,{state:y[t]??P,title:T[t]},t))})},"X");function W(s){return(0,a.jsx)(C,{children:s},s)}u(W,"$");export{G as AnalyticsPanel};
@@ -1 +1 @@
1
- import{a as i,j as a}from"./chunk-225VJ77I.js";import{a as o}from"./chunk-FSRSK4LY.js";import{a as r,i as n}from"./chunk-YKXDMIHQ.js";function s(e){return a(e.defaultTagName??"div",e,e)}r(s,"useRender");var g=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function x({className:e,variant:t="default",render:d,...u}){return s({defaultTagName:"span",props:i({className:n(g({variant:t}),e)},u),render:d,state:{slot:"badge",variant:t}})}r(x,"f");export{s as a,x as b};
1
+ import{a as i,j as a}from"./chunk-BOMPSVRC.js";import{a as o}from"./chunk-QAQDMS6R.js";import{a as r,i as n}from"./chunk-I26MS5PJ.js";function s(e){return a(e.defaultTagName??"div",e,e)}r(s,"useRender");var g=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive font-mono text-[11px] tracking-wide uppercase focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",success:"bg-success/10 text-success font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-success/15 dark:bg-success/15",warning:"bg-warning/10 text-warning font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-warning/15 dark:bg-warning/15",info:"bg-info/10 text-info font-mono text-[11px] tracking-wide uppercase [a]:hover:bg-info/15 dark:bg-info/15"}},defaultVariants:{variant:"default"}});function x({className:e,variant:t="default",render:d,...u}){return s({defaultTagName:"span",props:i({className:n(g({variant:t}),e)},u),render:d,state:{slot:"badge",variant:t}})}r(x,"f");export{s as a,x as b};
@@ -1 +1 @@
1
- import{a as d,d as n,f as c,g as p}from"./chunk-YKXDMIHQ.js";var b=n(c(),1),s=n(p(),1);var y={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},g={borderRadius:"50%",display:"inline-block",height:7,width:7},h=d((l,e,t,a)=>({badgeStyle:{...y,borderColor:l,color:l},color:l,dotStyle:{...g,backgroundColor:l},hint:a,label:e,title:t}),"i"),S={global:h("var(--royal-amethyst)","Global \xB7 D1","Global table \u2014 a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, \u2026) live here too."),shard:h("var(--sky-sapphire)","Shard-local","Shard-local table \u2014 per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time \u2014 change the shard key to inspect another.")},m=d(l=>{let e=(0,b.c)(9),{tier:t}=l,a=S[t],i=`storage-tier-${t}`,r;e[0]!==a.dotStyle?(r=(0,s.jsx)("span",{"aria-hidden":"true",style:a.dotStyle}),e[0]=a.dotStyle,e[1]=r):r=e[1];let o;return e[2]!==a.badgeStyle||e[3]!==a.label||e[4]!==a.title||e[5]!==i||e[6]!==r||e[7]!==t?(o=(0,s.jsxs)("span",{"data-testid":i,"data-tier":t,style:a.badgeStyle,title:a.title,children:[r,a.label]}),e[2]=a.badgeStyle,e[3]=a.label,e[4]=a.title,e[5]=i,e[6]=r,e[7]=t,e[8]=o):o=e[8],o},"y");export{S as a,m as b};
1
+ import{a as d,d as n,f as c,g as p}from"./chunk-I26MS5PJ.js";var b=n(c(),1),s=n(p(),1);var y={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},g={borderRadius:"50%",display:"inline-block",height:7,width:7},h=d((l,e,t,a)=>({badgeStyle:{...y,borderColor:l,color:l},color:l,dotStyle:{...g,backgroundColor:l},hint:a,label:e,title:t}),"i"),S={global:h("var(--royal-amethyst)","Global \xB7 D1","Global table \u2014 a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, \u2026) live here too."),shard:h("var(--sky-sapphire)","Shard-local","Shard-local table \u2014 per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time \u2014 change the shard key to inspect another.")},m=d(l=>{let e=(0,b.c)(9),{tier:t}=l,a=S[t],i=`storage-tier-${t}`,r;e[0]!==a.dotStyle?(r=(0,s.jsx)("span",{"aria-hidden":"true",style:a.dotStyle}),e[0]=a.dotStyle,e[1]=r):r=e[1];let o;return e[2]!==a.badgeStyle||e[3]!==a.label||e[4]!==a.title||e[5]!==i||e[6]!==r||e[7]!==t?(o=(0,s.jsxs)("span",{"data-testid":i,"data-tier":t,style:a.badgeStyle,title:a.title,children:[r,a.label]}),e[2]=a.badgeStyle,e[3]=a.label,e[4]=a.title,e[5]=i,e[6]=r,e[7]=t,e[8]=o):o=e[8],o},"y");export{S as a,m as b};
@@ -1 +1 @@
1
- import{a as r,h as y}from"./chunk-YKXDMIHQ.js";var V=r(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),N=y,j=r((e,l)=>n=>{var s;if(l?.variants==null)return N(e,n?.class,n?.className);let{variants:v,defaultVariants:d}=l,f=Object.keys(v).map(t=>{let a=n?.[t],u=d?.[t];if(a===null)return null;let i=V(a)||V(u);return v[t][i]}),c=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),C=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((t,a)=>{let{class:u,className:i,...x}=a;return Object.entries(x).every(O=>{let[m,o]=O;return Array.isArray(o)?o.includes({...d,...c}[m]):{...d,...c}[m]===o})?[...t,u,i]:t},[]);return N(e,f,C,n?.class,n?.className)},"cva");export{j as a};
1
+ import{a as r,h as y}from"./chunk-I26MS5PJ.js";var V=r(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),N=y,j=r((e,l)=>n=>{var s;if(l?.variants==null)return N(e,n?.class,n?.className);let{variants:v,defaultVariants:d}=l,f=Object.keys(v).map(t=>{let a=n?.[t],u=d?.[t];if(a===null)return null;let i=V(a)||V(u);return v[t][i]}),c=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),C=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((t,a)=>{let{class:u,className:i,...x}=a;return Object.entries(x).every(O=>{let[m,o]=O;return Array.isArray(o)?o.includes({...d,...c}[m]):{...d,...c}[m]===o})?[...t,u,i]:t},[]);return N(e,f,C,n?.class,n?.className)},"cva");export{j as a};
@@ -1 +1 @@
1
- import{a as n,d as v,f as N,g as z,i as k}from"./chunk-YKXDMIHQ.js";var y=v(N(),1);var u=v(z(),1);var C={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},I={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},A=n(j=>{let e=(0,y.c)(18),{className:i,children:c,label:b,onClose:r,panelTestId:f,testId:g,variant:h}=j,o;e[0]!==r?(o=n(s=>{s.target===s.currentTarget&&r()},"r"),e[0]=r,e[1]=o):o=e[1];let m=o,t;e[2]!==r?(t=n(s=>{s.key==="Escape"&&r()},"a"),e[2]=r,e[3]=t):t=e[3];let p=t,x=C[h],w=I[h],l;e[4]!==i||e[5]!==w?(l=k(w,i),e[4]=i,e[5]=w,e[6]=l):l=e[6];let a;e[7]!==c||e[8]!==b||e[9]!==f||e[10]!==l?(a=(0,u.jsx)("div",{"aria-label":b,className:l,"data-testid":f,role:"dialog",children:c}),e[7]=c,e[8]=b,e[9]=f,e[10]=l,e[11]=a):a=e[11];let d;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==a||e[16]!==g?(d=(0,u.jsx)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:a}),e[12]=m,e[13]=p,e[14]=x,e[15]=a,e[16]=g,e[17]=d):d=e[17],d},"_");export{A as a};
1
+ import{a as n,d as v,f as N,g as z,i as k}from"./chunk-I26MS5PJ.js";var y=v(N(),1);var u=v(z(),1);var C={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},I={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},A=n(j=>{let e=(0,y.c)(18),{className:i,children:c,label:b,onClose:r,panelTestId:f,testId:g,variant:h}=j,o;e[0]!==r?(o=n(s=>{s.target===s.currentTarget&&r()},"r"),e[0]=r,e[1]=o):o=e[1];let m=o,t;e[2]!==r?(t=n(s=>{s.key==="Escape"&&r()},"a"),e[2]=r,e[3]=t):t=e[3];let p=t,x=C[h],w=I[h],l;e[4]!==i||e[5]!==w?(l=k(w,i),e[4]=i,e[5]=w,e[6]=l):l=e[6];let a;e[7]!==c||e[8]!==b||e[9]!==f||e[10]!==l?(a=(0,u.jsx)("div",{"aria-label":b,className:l,"data-testid":f,role:"dialog",children:c}),e[7]=c,e[8]=b,e[9]=f,e[10]=l,e[11]=a):a=e[11];let d;return e[12]!==m||e[13]!==p||e[14]!==x||e[15]!==a||e[16]!==g?(d=(0,u.jsx)("div",{className:x,"data-testid":g,onClick:m,onKeyDown:p,role:"presentation",children:a}),e[12]=m,e[13]=p,e[14]=x,e[15]=a,e[16]=g,e[17]=d):d=e[17],d},"_");export{A as a};