graview 0.1.62 → 0.1.64

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 (202) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/index.js.map +1 -1
  4. package/dist/preview/chunk.2D7K2IJQ.js +4 -0
  5. package/dist/preview/{chunk.UFDJXQQQ.js → chunk.2DH42I7L.js} +6 -6
  6. package/dist/preview/chunk.2E62YCMZ.js +1 -0
  7. package/dist/preview/{chunk.GX4G4BX3.js → chunk.2G5WLG3Z.js} +1 -1
  8. package/dist/preview/chunk.2HV5FF6O.js +1 -0
  9. package/dist/preview/{chunk.LGRLVJGS.js → chunk.2JDAUKSN.js} +3 -3
  10. package/dist/preview/{chunk.ZN3PUM2I.js → chunk.2JEN2RCB.js} +1 -1
  11. package/dist/preview/{chunk.66P5IDTH.js → chunk.2TCOLAL2.js} +1 -1
  12. package/dist/preview/{chunk.OWOOKLIU.js → chunk.2V7QTIAV.js} +1 -1
  13. package/dist/preview/{chunk.IQ3PRWGO.js → chunk.2VIS2NAT.js} +2 -2
  14. package/dist/preview/{chunk.UQQKDBIH.js → chunk.2VYGDY5Z.js} +1 -1
  15. package/dist/preview/{chunk.WEOVK2T4.js → chunk.37I45R6V.js} +1 -1
  16. package/dist/preview/chunk.3FKKH2XU.js +74 -0
  17. package/dist/preview/chunk.3J7XLJP2.js +1 -0
  18. package/dist/preview/chunk.3OEODIHB.js +1 -0
  19. package/dist/preview/{chunk.WPXPVD33.js → chunk.3RD4JHVG.js} +1 -1
  20. package/dist/preview/{chunk.CHHYIMB7.js → chunk.3RUV4HE4.js} +1 -1
  21. package/dist/preview/chunk.3SAESG6X.js +1 -0
  22. package/dist/preview/{chunk.4HEFUOLV.js → chunk.47N2G7A5.js} +1 -1
  23. package/dist/preview/{chunk.A3ZC2JBO.js → chunk.4DZOAB4D.js} +1 -1
  24. package/dist/preview/chunk.4HTB6TX2.js +1 -0
  25. package/dist/preview/chunk.4Q5PCMGZ.js +18 -0
  26. package/dist/preview/{chunk.DPEIT3TW.js → chunk.4U45EY5M.js} +1 -1
  27. package/dist/preview/{chunk.2B6P4GPS.js → chunk.4VRX7FCO.js} +1 -1
  28. package/dist/preview/{chunk.JT3MFPRD.js → chunk.4XCYZRZ3.js} +1 -1
  29. package/dist/preview/chunk.52MBXPEK.js +1 -0
  30. package/dist/preview/chunk.5AD2QHWH.js +3 -0
  31. package/dist/preview/{chunk.MDEX6ZVE.js → chunk.5B7NG6WH.js} +1 -1
  32. package/dist/preview/chunk.5HJ2GTKZ.js +1 -0
  33. package/dist/preview/chunk.5IEZF433.js +2 -0
  34. package/dist/preview/{chunk.QGU5QTR6.js → chunk.5PPCK7QT.js} +1 -1
  35. package/dist/preview/chunk.6NRWLCIZ.js +5 -0
  36. package/dist/preview/chunk.75JQCTR6.js +1 -0
  37. package/dist/preview/{chunk.KMV6PJFL.js → chunk.77JI5T4F.js} +1 -1
  38. package/dist/preview/chunk.77MLXWZV.js +35 -0
  39. package/dist/preview/chunk.7AOEZJRM.js +1 -0
  40. package/dist/preview/{chunk.QIPASE42.js → chunk.7CLKGKSF.js} +1 -1
  41. package/dist/preview/{chunk.BZMQDEIY.js → chunk.7SRSE5IS.js} +1 -1
  42. package/dist/preview/{chunk.2GEJNG2U.js → chunk.7VAHHEDX.js} +1 -1
  43. package/dist/preview/{chunk.VJBBVLGZ.js → chunk.7ZG77OI3.js} +1 -1
  44. package/dist/preview/chunk.7ZHH7WBN.js +1 -0
  45. package/dist/preview/chunk.AJEK3I5X.js +6 -0
  46. package/dist/preview/chunk.APRWUIE3.js +1 -0
  47. package/dist/preview/{chunk.QHY5NVYH.js → chunk.APUQIELA.js} +1 -1
  48. package/dist/preview/{chunk.Y4FZKUOK.js → chunk.ATHLE33D.js} +1 -1
  49. package/dist/preview/chunk.B2YTHEX5.js +1 -0
  50. package/dist/preview/{chunk.ELOFPE25.js → chunk.B6JR7EQO.js} +1 -1
  51. package/dist/preview/{chunk.5ODHHH35.js → chunk.BN42H3C6.js} +1 -1
  52. package/dist/preview/{chunk.DD2NKFDX.js → chunk.BVIJXL4J.js} +1 -1
  53. package/dist/preview/{chunk.5HGD6OWL.js → chunk.CC7P435K.js} +2 -2
  54. package/dist/preview/{chunk.IQMD7DG3.js → chunk.CJHYGRWV.js} +1 -1
  55. package/dist/preview/chunk.CM65MCHA.js +1 -0
  56. package/dist/preview/{chunk.MYNMBOLD.js → chunk.D2XLECMP.js} +1 -1
  57. package/dist/preview/chunk.DJIF7IAQ.js +2 -0
  58. package/dist/preview/{chunk.G4ULQK64.js → chunk.DLWFULWE.js} +1 -1
  59. package/dist/preview/{chunk.QDWSU47A.js → chunk.DMENNIHT.js} +1 -1
  60. package/dist/preview/{chunk.L3WTKQQL.js → chunk.DN7UCBOA.js} +1 -1
  61. package/dist/preview/{chunk.22BZU7ME.js → chunk.DQAMVVE6.js} +1 -1
  62. package/dist/preview/chunk.DUP2CGVH.js +1 -0
  63. package/dist/preview/{chunk.TM4EPUNO.js → chunk.DYRULRFX.js} +1 -1
  64. package/dist/preview/{chunk.AFNSAQEQ.js → chunk.E4TXLT25.js} +1 -1
  65. package/dist/preview/{chunk.DDUCIUVW.js → chunk.F6BNFLQM.js} +1 -1
  66. package/dist/preview/chunk.FN34P4IS.js +1 -0
  67. package/dist/preview/{chunk.AJSUHPBE.js → chunk.FUPYIOXZ.js} +1 -1
  68. package/dist/preview/{chunk.7KVUUEZA.js → chunk.FXRYMT3U.js} +1 -1
  69. package/dist/preview/{chunk.DEAP3H2L.js → chunk.G5BVZLCM.js} +1 -1
  70. package/dist/preview/{chunk.Y2YYH3JN.js → chunk.G7YLK4PX.js} +1 -1
  71. package/dist/preview/chunk.GF62K25C.js +1 -0
  72. package/dist/preview/chunk.GFQPO3NC.js +1 -0
  73. package/dist/preview/{chunk.5STU3KYG.js → chunk.GH5UBSQI.js} +1 -1
  74. package/dist/preview/chunk.GHHKRFPD.js +1 -0
  75. package/dist/preview/{chunk.THVC2BEC.js → chunk.GP5DAA4P.js} +1 -1
  76. package/dist/preview/{chunk.VN23AGIY.js → chunk.HPG6CNKM.js} +1 -1
  77. package/dist/preview/chunk.HSJEOM3W.js +1 -0
  78. package/dist/preview/{chunk.H5S7OL2U.js → chunk.HZPRMHSL.js} +1 -1
  79. package/dist/preview/chunk.IQGSEAQ2.js +5 -0
  80. package/dist/preview/{chunk.PCDUV3WP.js → chunk.ITBG37WJ.js} +1 -1
  81. package/dist/preview/{chunk.SVPKUWZU.js → chunk.JHUCKEJS.js} +1 -1
  82. package/dist/preview/{chunk.H7N7WN4U.js → chunk.JOM6MFVE.js} +1 -1
  83. package/dist/preview/{chunk.DNVWSWL2.js → chunk.JS2UZYGB.js} +1 -1
  84. package/dist/preview/{chunk.7XLS6XTY.js → chunk.K2PXP5H6.js} +1 -1
  85. package/dist/preview/{chunk.6AKW7TXM.js → chunk.K54ISAXN.js} +1 -1
  86. package/dist/preview/{chunk.3FON2Y72.js → chunk.K5YFUMRS.js} +1 -1
  87. package/dist/preview/chunk.KHXRJLLU.js +50 -0
  88. package/dist/preview/chunk.KMIFSPGQ.js +1 -0
  89. package/dist/preview/chunk.L4V5VLSM.js +1 -0
  90. package/dist/preview/{chunk.T6WHGKWR.js → chunk.LDMBJC3B.js} +1 -1
  91. package/dist/preview/{chunk.PLTH2LW5.js → chunk.LTOQ22ZJ.js} +1 -1
  92. package/dist/preview/{chunk.UVA7AALY.js → chunk.M5VHUIDB.js} +1 -1
  93. package/dist/preview/chunk.N643PVQA.js +1 -0
  94. package/dist/preview/{chunk.FULEUL34.js → chunk.NGRL3QOI.js} +1 -1
  95. package/dist/preview/{chunk.OFWNMTGB.js → chunk.NRPBTV6O.js} +2 -2
  96. package/dist/preview/{chunk.N6EJXXQK.js → chunk.O7HHNQK4.js} +2 -2
  97. package/dist/preview/{chunk.5YAOKOGV.js → chunk.OW3M4OBN.js} +1 -1
  98. package/dist/preview/{chunk.2N4Z5K5S.js → chunk.OXFDB5BB.js} +1 -1
  99. package/dist/preview/{chunk.4TX6VCBT.js → chunk.P4TAX3HE.js} +1 -1
  100. package/dist/preview/{chunk.RYRQ66JN.js → chunk.P6FNJR6E.js} +1 -1
  101. package/dist/preview/chunk.PR74PGLC.js +1 -0
  102. package/dist/preview/{chunk.F7YXLYLX.js → chunk.PVDDSBRG.js} +1 -1
  103. package/dist/preview/{chunk.OUDATENL.js → chunk.QROPDEJF.js} +1 -1
  104. package/dist/preview/{chunk.I77ZGIFE.js → chunk.QRT6BZR6.js} +1 -1
  105. package/dist/preview/{chunk.OWT3VVOT.js → chunk.R5MLRKAO.js} +2 -2
  106. package/dist/preview/chunk.RDA35HZB.js +2 -0
  107. package/dist/preview/{chunk.ROZTJ6IY.js → chunk.REXU6ARY.js} +1 -1
  108. package/dist/preview/chunk.S6QZBWCJ.js +1 -0
  109. package/dist/preview/{chunk.MAKODQO3.js → chunk.S7SHWDPR.js} +1 -1
  110. package/dist/preview/{chunk.SWMDFXUX.js → chunk.SADHOSRC.js} +1 -1
  111. package/dist/preview/chunk.SJHUC4TL.js +1 -0
  112. package/dist/preview/chunk.SL5FXE3R.js +1 -0
  113. package/dist/preview/{chunk.X6KYRBL6.js → chunk.T4JP6BGP.js} +1 -1
  114. package/dist/preview/{chunk.TIALD6SC.js → chunk.T4TRJDBF.js} +1 -1
  115. package/dist/preview/{chunk.M4AYA2PL.js → chunk.TA2JTUNX.js} +1 -1
  116. package/dist/preview/{chunk.EVBCEEQ4.js → chunk.TMHVYI5R.js} +1 -1
  117. package/dist/preview/chunk.TOLW64EO.js +1 -0
  118. package/dist/preview/chunk.TP3PZRHE.js +1 -0
  119. package/dist/preview/{chunk.PZQNR4KZ.js → chunk.TQ2G4AM4.js} +1 -1
  120. package/dist/preview/{chunk.5J3O2FVG.js → chunk.TUR2DA2M.js} +1 -1
  121. package/dist/preview/{chunk.B23WZQXQ.js → chunk.TYIBLD2D.js} +1 -1
  122. package/dist/preview/{chunk.DC35FJAB.js → chunk.UD2GGG7L.js} +1 -1
  123. package/dist/preview/chunk.UDU545CL.js +1 -0
  124. package/dist/preview/{chunk.RPDH32XV.js → chunk.UDYFGYJP.js} +1 -1
  125. package/dist/preview/{chunk.SEHRPTNA.js → chunk.UJNLT3L6.js} +1 -1
  126. package/dist/preview/chunk.UN2IAA5R.js +1 -0
  127. package/dist/preview/chunk.VLX7YWVH.js +25 -0
  128. package/dist/preview/{chunk.T3UQ7ZQK.js → chunk.VT4YBFZL.js} +1 -1
  129. package/dist/preview/{chunk.ELTV44HU.js → chunk.VZAF3452.js} +2 -2
  130. package/dist/preview/{chunk.O2BHPYA4.js → chunk.WFCE7NLK.js} +2 -2
  131. package/dist/preview/{chunk.CY3ELWCM.js → chunk.WHX47OJM.js} +1 -1
  132. package/dist/preview/{chunk.NUWDMH47.js → chunk.WMARJ5E3.js} +1 -1
  133. package/dist/preview/chunk.WPQP54FM.js +1 -0
  134. package/dist/preview/{chunk.6JO5HQDR.js → chunk.WX23K7ZU.js} +1 -1
  135. package/dist/preview/{chunk.W4BKYSZX.js → chunk.X36BYTEG.js} +1 -1
  136. package/dist/preview/{chunk.AQRB7LDA.js → chunk.XCLW4GP7.js} +1 -1
  137. package/dist/preview/{chunk.DDO3GLEJ.js → chunk.XEG7ZDRG.js} +1 -1
  138. package/dist/preview/{chunk.ILIIBSGA.js → chunk.XIVELWAM.js} +1 -1
  139. package/dist/preview/{chunk.75GVFX7L.js → chunk.XJWKIXPV.js} +1 -1
  140. package/dist/preview/{chunk.O75HWF3F.js → chunk.XQ5RTPEF.js} +1 -1
  141. package/dist/preview/{chunk.NOGGSLVG.js → chunk.YEXFVDRA.js} +1 -1
  142. package/dist/preview/{chunk.UXMPFPFH.js → chunk.YIZPW7IK.js} +2 -2
  143. package/dist/preview/chunk.YLOGIJOH.js +1 -0
  144. package/dist/preview/chunk.YMXWS4XN.js +3 -0
  145. package/dist/preview/{chunk.Z2TDZSMN.js → chunk.YSBTE3PX.js} +1 -1
  146. package/dist/preview/{chunk.RD2X25XB.js → chunk.Z26T5E76.js} +1 -1
  147. package/dist/preview/{chunk.A3OL2BI2.js → chunk.Z4XGEV34.js} +1 -1
  148. package/dist/preview/chunk.ZA5TDCBC.js +1 -0
  149. package/dist/preview/chunk.ZNDVJGTY.js +1 -0
  150. package/dist/preview/chunk.ZQGLPP7A.js +1 -0
  151. package/dist/preview/index.html +53 -52
  152. package/dist/preview/page.js +2 -2
  153. package/dist/preview/splash.js +7 -6
  154. package/package.json +6 -6
  155. package/dist/preview/chunk.2AT3GRXM.js +0 -1
  156. package/dist/preview/chunk.4HRYB7HF.js +0 -1
  157. package/dist/preview/chunk.5MZYCELA.js +0 -6
  158. package/dist/preview/chunk.7M4HNKDR.js +0 -1
  159. package/dist/preview/chunk.7OBIBPYH.js +0 -1
  160. package/dist/preview/chunk.7V56P2A7.js +0 -1
  161. package/dist/preview/chunk.7YOAW7ED.js +0 -1
  162. package/dist/preview/chunk.ACTXR2MI.js +0 -3
  163. package/dist/preview/chunk.AI34V6WV.js +0 -74
  164. package/dist/preview/chunk.BLUKSGI4.js +0 -1
  165. package/dist/preview/chunk.CAKFNKN5.js +0 -1
  166. package/dist/preview/chunk.CGALLZ54.js +0 -1
  167. package/dist/preview/chunk.DHJ3FQTR.js +0 -1
  168. package/dist/preview/chunk.DZZL5IDD.js +0 -5
  169. package/dist/preview/chunk.H24OC6OE.js +0 -1
  170. package/dist/preview/chunk.H73ZPYUX.js +0 -1
  171. package/dist/preview/chunk.HANJZ6FA.js +0 -1
  172. package/dist/preview/chunk.HIMQ65QT.js +0 -1
  173. package/dist/preview/chunk.IQPILSV3.js +0 -18
  174. package/dist/preview/chunk.IYBEXENQ.js +0 -1
  175. package/dist/preview/chunk.J7Q2WAF4.js +0 -28
  176. package/dist/preview/chunk.JYFZCJ4N.js +0 -2
  177. package/dist/preview/chunk.KDXU5DT3.js +0 -1
  178. package/dist/preview/chunk.KL7E4YHJ.js +0 -1
  179. package/dist/preview/chunk.LAYQ5PFS.js +0 -1
  180. package/dist/preview/chunk.LTZUF5VG.js +0 -1
  181. package/dist/preview/chunk.M7RESZB6.js +0 -25
  182. package/dist/preview/chunk.MGALQLRW.js +0 -1
  183. package/dist/preview/chunk.NAD7ZXYP.js +0 -1
  184. package/dist/preview/chunk.NHTGAP3G.js +0 -3
  185. package/dist/preview/chunk.NUYA4BWI.js +0 -1
  186. package/dist/preview/chunk.OKZT2QBM.js +0 -2
  187. package/dist/preview/chunk.OUPURRDE.js +0 -1
  188. package/dist/preview/chunk.PD2DECOP.js +0 -1
  189. package/dist/preview/chunk.PKWQKFPE.js +0 -2
  190. package/dist/preview/chunk.RMR24LFJ.js +0 -4
  191. package/dist/preview/chunk.RRKI24WY.js +0 -1
  192. package/dist/preview/chunk.SGCW2XRC.js +0 -1
  193. package/dist/preview/chunk.SS7234R6.js +0 -1
  194. package/dist/preview/chunk.TKUNRFDE.js +0 -1
  195. package/dist/preview/chunk.U6ZRJKVM.js +0 -1
  196. package/dist/preview/chunk.UKQUUPKE.js +0 -1
  197. package/dist/preview/chunk.VACKSKGJ.js +0 -1
  198. package/dist/preview/chunk.VC3V7HLL.js +0 -1
  199. package/dist/preview/chunk.VIH5AX7S.js +0 -5
  200. package/dist/preview/chunk.WKI5INH7.js +0 -1
  201. package/dist/preview/chunk.Y4S7CDRB.js +0 -1
  202. package/dist/preview/chunk.YP2QSPXU.js +0 -50
@@ -1,5 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{q as B}from"./chunk.AI34V6WV.js";import{G as R,Ia as T,J as C,T as a,ba as L}from"./chunk.M7RESZB6.js";import{a as P}from"./chunk.SDO3U72B.js";import{be as b,id as w,oe as A}from"./chunk.DZZL5IDD.js";import{b as i}from"./chunk.AJZBJBMO.js";var I=i(a(),1),D=B.part(e=>(0,I.jsx)(e.ActivityRail,{calls:[]}),{quiet:!0});var x=i(a(),1),O=e=>e.tabIndex>=0&&!e.disabled&&e.getClientRects().length>0;function F(e){if(!e)return!1;if(O(e))return e.focus({preventScroll:!1}),!0;let r=[...e.querySelectorAll("a[href], button, input, select, textarea, [tabindex]")].find(O);return r?(r.focus(),!0):(e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus(),!0)}var E=`.graview-skips{display:contents}
2
- .graview-skip{position:absolute;width:0;height:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
3
- .graview-skip:focus{width:auto;height:auto;overflow:visible;clip-path:none;padding:6px 12px;border-radius:8px;border:1px solid var(--graview-accent);background:var(--graview-float,var(--graview-panel));color:var(--graview-ink);font:inherit;font-size:.875rem;font-weight:600;box-shadow:var(--graview-lift-high);outline:2px solid var(--graview-accent);outline-offset:1px}
4
- .graview-skips[data-place=bar] .graview-skip:focus{position:fixed;left:8px;top:6px;z-index:${w("toast")}}
5
- .graview-skips[data-place=here] .graview-skip:focus{position:static;justify-self:start}`;function M({to:e,place:r="bar"}){return e.length===0?null:(0,x.jsxs)("span",{className:"graview-skips","data-place":r,children:[(0,x.jsx)("style",{children:E}),e.map(o=>(0,x.jsx)("button",{type:"button",className:"graview-skip","data-graview-skip":o.testid,"data-testid":`skip-${o.testid}`,...o.opens?{"data-graview-skip-opens":""}:{},onClick:o.go,children:o.label},o.testid))]})}var d=i(R(),1),h=i(a(),1),N=T(P(()=>(__graviewPreload(import.meta.url,["./chunk.Y4FZKUOK.js","./chunk.TIALD6SC.js","./chunk.QHY5NVYH.js","./chunk.U6ZRJKVM.js","./chunk.PLTH2LW5.js","./chunk.66P5IDTH.js","./chunk.AJSUHPBE.js","./chunk.KDXU5DT3.js","./chunk.W4BKYSZX.js","./chunk.7XLS6XTY.js","./chunk.U5P23GO7.js","./chunk.5STU3KYG.js","./chunk.GZHZLJBF.js","./chunk.UKQUUPKE.js","./chunk.OJGHDWI6.js","./chunk.DDUCIUVW.js","./chunk.NUYA4BWI.js","./chunk.OKZT2QBM.js","./chunk.ACTXR2MI.js","./chunk.AI34V6WV.js","./chunk.G4ULQK64.js","./chunk.M7RESZB6.js","./chunk.SDO3U72B.js","./chunk.DZZL5IDD.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RRKI24WY.js")))),j=N.part((e,r)=>{let o=e.RecordInteractions;return(0,h.jsx)(o,{...r})},{quiet:!0});function V(e,r,o){let t=e.target;return(t.on==="record"||t.on==="field"?t.id===r:t.on==="selection"?t.ids.includes(r):t.on==="act"?t.id===r:!1)||e.offered.some(n=>n.id===`record:${r}`||n.id.startsWith(`fill:${r}:`))||(e.batches??[]).some(n=>o(n).includes(r))}function _({id:e,style:r,headingStyle:o,className:t}){let{ai:f,aiDesk:n,store:y}=L(),{entries:u}=C(n),l=f.off===!0;(0,d.useEffect)(()=>{l||n.load()},[n,l]);let S=y.log.length,m=(0,d.useMemo)(()=>{let k=g=>y.log.all().flatMap(v=>v.batch===g?v.writes:[]);return u.filter(g=>V(g,e,k))},[u,e,y,S]);return l||m.length===0?null:(0,h.jsx)(d.Suspense,{fallback:null,children:(0,h.jsx)(j,{entries:m,...r?{style:r}:{},...o?{headingStyle:o}:{},...t?{className:t}:{}})})}var c=i(R(),1);var p=i(a(),1),G={textDecorationLine:"underline",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em"};function H({children:e,mark:r="\u2192"}){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{style:G,children:e}),(0,p.jsx)("span",{"aria-hidden":"true",children:r})]})}var s=i(a(),1);function Co({context:e,stop:r,title:o,label:t,style:f,className:n,children:y,...u}){let l=b(e.views?.arrangement?.()),S=y??(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(H,{mark:"\u2197",children:["In ",l==="Scene"?"the scene":l.replace(/^The /,"the ")]})}),m=t?{"aria-label":t}:{};if(e.overview){let k=e.overview;return(0,s.jsx)("a",{href:r,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},onClick:g=>{g.preventDefault(),k(r)},children:S})}return e.embedded?null:(0,s.jsx)("a",{href:`${e.sceneHref??"/"}${r}`,...u,...m,...o?{title:o}:{},style:f,...n?{className:n}:{},children:S})}function Lo(){return(0,s.jsx)("a",{href:"#fresh","data-testid":"start-fresh",title:"Forget every edit made in this browser and return to the example",onClick:e=>{e.preventDefault(),window.location.assign(A(window.location.href))},style:{color:"inherit",display:"inline-flex",alignItems:"center",minHeight:24,minWidth:24},children:"Start fresh"})}function To(e){let r=(0,c.useRef)(0),o=(0,c.useCallback)(t=>e.subscribe(()=>{r.current+=1,t()}),[e]);return(0,c.useSyncExternalStore)(o,()=>r.current,()=>0)}function Io(e){return e===void 0?{}:e==="sm"||e==="md"?{"data-size":e}:{style:{"--graview-control-height":typeof e=="number"?`${e}px`:e}}}var Oo=(e,r)=>r?`${e} ${r}`:e;export{D as a,F as b,M as c,_ as d,H as e,Co as f,Lo as g,To as h,Io as i,Oo as j};
@@ -1 +0,0 @@
1
- import{b as yn,c as hn,d as ae,e as kn,f as te,h as je,i as De,n as bn,r as se,t as wn}from"./chunk.NHTGAP3G.js";import{B as be,Ba as xe,C as ue,Ea as Qe,F as _e,H as He,Ha as Xe,Hb as _,Ja as en,K as Ue,Kc as pn,L as We,Mb as sn,Na as Re,Nb as dn,Oa as Se,Pb as cn,Ua as nn,Ub as ln,Wc as un,Xa as tn,Xc as mn,Yc as ze,Zb as fn,Zc as gn,_c as Ee,b as Fe,c as Ne,d as Ce,e as K,g as ye,ga as Oe,h as V,ha as Je,hb as rn,i as Ie,j as Ke,k as he,kb as on,l as Ve,m as Ze,o as qe,p as fe,pb as Ae,q as ve,qa as Ye,qb as an,v as Be,x as pe,z as ke}from"./chunk.DZZL5IDD.js";var vn=new WeakMap;function On(e,d){vn.set(e,d)}function In(e){return vn.get(e)}function xn(e){if(typeof e=="string")return{form:"string",light:e};if(typeof e!="object"||e===null)return;let d=e,n=h=>typeof d[h]=="string"?d[h]:void 0,t=n("light")??n("src");if(t===void 0)return;let[a,p,A]=[n("dark"),n("alt"),n("darkFallback")];return{form:n("light")!==void 0?"light":"src",light:t,...a!==void 0?{dark:a}:{},...p!==void 0?{alt:p}:{},...A!==void 0?{darkFallback:A}:{}}}function Wn(e,d){let n=e.brand??{},t=n.ground,a=n.accent?Ee(n.accent,t):void 0;t&&gn(a?.ok?a.schemes:ze(t),n.accent)&&(d.push(De("brand","brand.ground","words would not read on that page background, so the app keeps Graview's","pick a lighter ground for the light scheme, a darker one for the dark")),t=void 0,a=n.accent?Ee(n.accent):void 0),a&&!a.ok&&d.push(De("brand","brand.accent",`that accent cannot make a readable brand, so the app keeps Graview's colors: ${a.why}`,"pick a color further from orange-red, or a darker one"));let p=xn(n.logo),A=n.name??e.name,h=n.typography?Object.fromEntries(Object.entries(n.typography).filter(([,w])=>typeof w=="string"&&mn(w)===null).map(([w,L])=>[w,un(L)])):void 0;return{name:A,schemes:a?.ok?a.schemes:t?ze(t):pn,...n.currency?{currency:n.currency}:{},...n.locale?{locale:n.locale}:{},...n.timeZone?{timeZone:n.timeZone}:{},...p?{logo:p.dark||p.darkFallback==="invert"?{light:p.light,...p.dark?{dark:p.dark}:{darkFallback:"invert"}}:p.light,logoAlt:p.alt??A}:{},...n.favicon?{favicon:n.favicon}:{},...e.description?{subtitle:e.description}:{},...n.subtitle===!1?{subtitleDrawn:!1}:{},...h?{typography:h}:{},...n.shape?{shape:n.shape}:{},...n.accents?{accents:n.accents}:{},...n.scheme?{scheme:n.scheme}:{},...n.views&&(n.views.css||n.views.motion)?{views:{...n.views.css?{css:n.views.css}:{},...n.views.motion?{motion:n.views.motion}:{}}}:{}}}function Rn(e){let{currency:d,locale:n,timeZone:t}=e.brand??{};return{...d?{currency:d}:{},...n?{locale:n}:{},...t?{timeZone:t}:{}}}var Ln=Symbol.for("@graview/core:typed-field"),Sn=(e,d)=>(/^(phone|place|duration)$/.test(d)&&(ue(e)[Ln]=d),e),An=/^(?=(?:\D*\d){3})\+?[\d ()./-]+(?: *(?:ext\.?|x|#) *\d+)?$/i;function zn(e){let d=V().check(K(300),ke(t=>Xe(t,e)!==void 0,`a record of ${e.kinds.join(" or ")} in ${e.address}, as "<kind>:<id>"`)),n=e.cardinality==="one"?d:fe(d).check(K(200));return en(e.description?n.check(be(e.description)):n,e)}var Pn=[{where:"settings[]",was:"honoured",now:"honored",since:"0.1.16"},{where:"pages",was:"overview",now:"scene",since:"0.1.17"}],Z=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function En(e,d=Pn){if(!Z(e))return{document:e,respelled:[]};let n=[],t=e;for(let a of d)t=$e(t,a.where.split("."),a,"",n);return{document:t,respelled:n}}function $e(e,d,n,t,a){if(d.length===0){if(!Z(e)||!Object.hasOwn(e,n.was))return e;a.push(`${t}${n.was}`);let{[n.was]:J,...j}=e;return Object.hasOwn(e,n.now)?j:{...j,[n.now]:J}}if(!Z(e))return e;let[p,...A]=d,h=p.endsWith("[]"),w=h?p.slice(0,-2):p,L=e[w],re=L;if(!h)re=$e(L,A,n,`${t}${w}.`,a);else if(Array.isArray(L)){let J=L.map((j,oe)=>$e(j,A,n,`${t}${w}.${oe}.`,a));re=J.some((j,oe)=>j!==L[oe])?J:L}return re===L?e:{...e,[w]:re}}var jn="graview-compiled@1";function Gn(e,d){return e.find(([n,t])=>n!==W&&"ref"in t&&(t.ref==="*"||t.ref.includes(d)))?.[0]}var W="id",me=e=>typeof e=="string"&&/^\$[A-Za-z][A-Za-z0-9]*$/.test(e)?e.slice(1):void 0;function Dn(e){let d=Object.entries(e.fields),n=t=>["name","title","label"].find(a=>t.some(([p])=>p===a))??t[0]?.[0];return n(d.filter(([,t])=>t.required&&(t.type==="string"||t.type==="text")))??n(d.filter(([,t])=>t.type==="string"))}function $n(e,d,n){let t;switch(e.type){case"string":case"place":t=V().check(K(500));break;case"phone":t=V().check(K(40),ye(An,"a phone number"));break;case"text":t=V().check(K(2e4)),e.format&&(ue(t)[Symbol.for("@graview/core:markdown")]=1);break;case"number":case"integer":case"duration":{let p=e.min??(e.type==="duration"?0:void 0),A=[...e.type==="number"?[]:[Ve()],...p===void 0?[]:[Ne(p)],...e.max===void 0?[]:[Fe(e.max)],...e.step===void 0?[]:[Ce(e.step)]];t=A.length>0?he().check(...A):he();break}case"boolean":t=Ze();break;case"date":t=V().check(ye(He,"a date like 2026-10-02, or a month (2016-05) or a year (2006) alone"));break;case"datetime":t=V().check(ke(Ue,"a date and time like 2026-10-02T14:30:00Z"));break;case"enum":t=Be(e.options),e.multiple&&(t=fe(t).check(K(e.options.length)));break;case"list":t=fe(e.of==="number"?he():e.of==="date"?V().check(ye(_e)):e.of==="image"||e.of==="video"||e.of==="file"?xe(e.of):V().check(K(500))).check(K(200));break;case"image":case"video":case"file":t=xe(e.type);break;case"app-link":t=Qe();break;case"url":t=Ke();break;case"email":t=Ie();break}let a=e.type==="number"||e.type==="integer";return Sn(t,a&&e.format==="duration"?"duration":e.type),e.collaborative!==void 0&&(e.type==="text"||e.type==="string")&&(ue(t)[Symbol.for("@graview/core:collaborative")]=e.collaborative?1:0),e.description&&(t=t.check(be(e.description))),a&&(e.format==="money"||e.format==="percent"||!e.format&&e.unit)&&ln(t,{...n,...e.format?{format:e.format}:{},...e.unit?{unit:e.unit}:{}}),d?pe(t):t}var ge=e=>{throw new _(`there is no record "${e}"`,"invalid")},Mn=(e,d)=>"field"in e?$n(e.field,e.optional,d):"ref"in e?fn(e.ref):pe(qe()),Fn=new WeakMap;var Le=(e,d)=>Z(d)&&Object.keys(e??{}).length===Object.keys(d).length&&Object.keys(e??{}).every(n=>Object.hasOwn(d,n));function vt(e,d={}){let n=Z(e)?e.format:void 0;if(n!==jn)return{ok:!1,findings:[je("compiled-format","format",n===void 0?"this is not a compiled Graview app":`this compiled app is ${JSON.stringify(n)}, and this build reads ${jn}`,"compile the document instead")]};let t=e,a=En(t.document).document,p=a===t.document?t:{...t,document:a},A=Z(a)&&typeof a.name=="string"&&Z(a.kinds)&&Le(a.kinds,p.kinds)&&Le(a.acts,p.acts)&&Le(a.rules,p.rules)&&Array.isArray(p.edges)&&Array.isArray(p.findings),h={ok:!1,findings:[je("compiled-shape","","this compiled app's parts do not match its document","compile the document instead")]};if(!A)return h;try{return Nn(p,d)}catch{return h}}function Nn(e,d={}){let{document:n}=e,t=n.brand?.timeZone,a=d.today??(()=>We(t)),p={...n.brand?.locale?{locale:n.brand.locale}:{},...t?{timeZone:t}:{}},A=new Map(e.edges.map(([k,i])=>[k,i])),h=new Map;for(let[k,i]of Object.entries(n.kinds)){let R=e.kinds[k]?.computed,v=Se(i.edges);h.set(k,{fields:new Set([...Object.keys(i.fields),...v.keys()]),edges:new Map(Object.entries(Re(i.edges)).map(([T,$])=>[T,$.cardinality??"many"])),...R?{computed:new Map(R)}:{},...v.size>0?{linked:v}:{}})}e.facts&&h.set(hn,{computed:new Map(e.facts)});let w=Rn(n),L=new Map,re=Object.entries(n.kinds).map(([k,i])=>{let R={};for(let[r,o]of Object.entries(i.fields))R[r]=$n(o,!o.required,w),o.repeats&&(R[nn(r)]=pe(tn()));for(let[r,o]of Se(i.edges))R[r]=pe(zn(o));let{label:v,describe:T,durations:$}=e.kinds[k]??{},P=Object.entries(i.computed??{}).map(([r,o])=>[r,typeof o=="string"?{expr:o}:o]),Y=Object.hasOwn(i.fields,"label")&&!i.fields.label.label&&!/\{\s*label\b/.test(i.label??`{${Dn(i)??""}}`),Q=Object.fromEntries([...Y?[["label","Label"]]:[],...Object.entries(i.fields).filter(([,r])=>r.label).map(([r,o])=>[r,o.label]),...P.filter(([,r])=>r.label).map(([r,o])=>[r,o.label])]),H=Object.keys(Q).length>0,E=Object.entries(i.fields).filter(([,r])=>r.type==="enum"&&(r.optionLabels&&Object.keys(r.optionLabels).length>0||r.multiple)),l=r=>o=>typeof o=="string"&&r.optionLabels&&Object.hasOwn(r.optionLabels,o)?r.optionLabels[o]:Oe(String(o)),G=Object.fromEntries(E.map(([r,o])=>[r,o.multiple?S=>Array.isArray(S)?S.map(l(o)).join(", "):l(o)(S):l(o)])),F=E.length>0,N=Object.fromEntries(Object.entries(i.fields).filter(([,r])=>r.default!==void 0).map(([r,o])=>[r,o.default]));L.set(k,N);let q=Object.fromEntries(Object.entries(Re(i.edges)).map(([r,{renamedFrom:o,...S}])=>[r,S])),C=Object.entries(i.fields).flatMap(([r,o])=>o.aliases?[[r,o.aliases]]:[]),D=r=>i[r]?{[r]:i[r]}:{};return Je(k,{fields:ve(R),edges:q,...D("plural"),...D("noun"),...D("aliases"),...C.length>0?{fieldAliases:Object.fromEntries(C)}:{},...D("description"),...v?{label:r=>se(v,{node:r,kinds:h,today:a(),money:w})||r.id}:{},...T?{describe:r=>se(T,{node:r,kinds:h,today:a(),money:w})}:{},...D("lifecycle"),...D("figure"),...D("fieldRoles"),...D("people"),archives:i.archives,...i.tidying?{tidying:i.tidying}:{},...P.length>0?{computed:Object.fromEntries(P.map(([r,o])=>[r,Cn(o,$?.includes(r)??!1,w)??i.computed[r]]))}:{},...H||F||i.glance||i.page?{display:{...H?{labels:Q}:{},...F?{format:G}:{},...i.glance?{glance:[...i.glance]}:{},...i.page?{page:i.page}:{}}}:{},...Object.keys(N).length>0?{defaults:N}:{},...e.kinds[k]?.keptInStep?{keptInStep:e.kinds[k].keptInStep}:{}})}),J=rn(re,n.computed);function j(k){return J.tryDefinition(k.kind)?.label?.(k)??k.id}let oe=k=>({id:"",kind:k,...L.get(k)}),Te=[];for(let[k,i]of Object.entries(n.acts??{})){let R=e.acts[k],{title:v,effects:T,guard:$,refusal:P,destructive:Y,idempotent:Q,creates:H,connects:E,severs:l,writes:G,writesOther:F,sets:N}=R,q={};for(let c of T)"through"in c&&(q[c.through]=[...new Set([...q[c.through]??[],...Object.keys(c.set)])]);let C=new Map(R.args),D={};for(let[c,x]of C)D[c]=Mn(x,w);let r=[i.on??[]].flat(),o=new Map(R.exprs),S=T.find(c=>"create"in c),U=(c,x,f,b=null)=>{if(Z(c)&&"expr"in c)return te(o.get(c.expr),{graph:f,subject:b,kinds:h,bindings:x,today:a(),...p});let y=me(c);return y===void 0?typeof c=="string"&&c.startsWith("$$")?c.slice(1):c:y==="now"?new Date().toISOString():y==="today"?a():x[y]},de=(c,x)=>{if(!S)return"";let f=n.kinds[S.create].fields,b=oe(S.create),y=[];for(let[O,ce]of Object.entries(S.set??{})){try{b[O]=U(ce,c,x)??b[O]}catch{}let ie=me(ce);ie&&c[ie]!==void 0&&y.push(O)}let I=j(b).trim(),X=y.filter(O=>b[O]!==!1&&f[O].type!=="text"&&!(/[^]{41}/.test(b[O])||/ .*[.!?]$/.test(b[O])&&!/[ .][A-Z]\w{0,3}\.$/.test(b[O]))&&j({...b,[O]:void 0}).trim()===I).map(O=>b[O]===!0?f[O].label??Oe(O):bn(b[O],f[O].format,a(),[],w));return I&&X.length>0?`${I} (${X.join(", ")})`:I};Te.push(cn(k,{input:ve(D),title:v,...i.description?{description:i.description}:{},...i.fromTheOtherEnd?{fromTheOtherEnd:i.fromTheOtherEnd}:{},...C.has(W)?{subject:{kinds:r.length>0?r:"*",arg:W}}:{},...Y?{destructive:!0}:{},...Q?{idempotent:!0}:{},...H.length>0?{creates:H}:{},...E.length>0?{connects:E}:{},...l.length>0?{severs:l}:{},writes:G,...Object.keys(F).length>0?{writesOther:F}:{},...Object.keys(q).length>0?{writesLinked:q}:{},...Object.keys(N).length>0?{sets:N}:{},...$?{allowedOn:(c,x)=>{let f=c.getNode(x);if(!f||r.length>0&&!r.includes(f.kind))return!1;try{return te($,{graph:c,subject:f,kinds:h,bindings:{},today:a(),...p})===!0}catch{return!1}}}:{},describe:(c,x)=>{let f=typeof c[W]=="string"?x.getNode(c[W]):void 0,b=f?j(f):de(c,x);return b?`${v}: ${b}`:v},apply(c,x){let f=c.graph,b=typeof x[W]=="string"?x[W]:void 0,y=b?f.getNode(b):void 0;if(b&&!y&&ge(b),y&&r.length>0&&!r.includes(y.kind))throw new _(`"${v}" acts on ${r.join(" or ")}, not on ${Ye(y.kind)}`,"invalid");let I={};for(let[s,u]of Object.entries(x))u!==void 0&&(I[s]=u);if($&&y){let s;try{s=te($,{graph:f,subject:y,kinds:h,bindings:I,today:a(),...p})}catch(u){throw u instanceof ae?new _(`"${v}" could not be judged: ${u.sentence}`):u}if(s!==!0)throw new _(P?se(P,{node:y,kinds:h,graph:f,bindings:I,today:a(),money:w}):`"${v}" is not allowed for ${j(y)} right now`)}let X=new Map,O=s=>f.has(s)||[...X.values()].includes(s),ce=new Set,ie=s=>{let u=on(s);ce.has(u)||(ce.add(u),c.removeEdge(s))},ee=(s,u)=>{let m=me(s);if(m==="subject")return b;if(m==="me"){let g=c.me;if(g&&n.kinds[f.getNode(g)?.kind]?.people)return g;throw new _(`"${v}" is done as you, and you have no record here`)}if(X.has(m))return X.get(m);try{return U(s,I,f,u??y??null)}catch(g){throw g instanceof ae?new _(`"${v}" could not work out a value: ${g.sentence}`):g}};for(let s of T)if("create"in s){let u=n.kinds[s.create],m=oe(s.create);for(let[B,ne]of Object.entries(s.set??{})){let Me=ee(ne,void 0);Me!==void 0&&(m[B]=Me)}let g=Dn(u),z=String((g&&m[g])??s.create),le=dn(z,s.create,m,(B,ne)=>sn(n.policy?.sees,B,ne)),M=c.freshId(le?s.create:z,s.create,m);c.addNode({...m,id:M}),s.as&&X.set(s.as,M)}else if("connect"in s||"sever"in s){let u="connect"in s?s.connect:s.sever,m=String(ee(s.from,void 0)??""),g=String(ee(s.to,void 0)??"");if(O(m)||ge(m),O(g)||ge(g),"connect"in s){if(A.get(u)?.cardinality==="one")for(let z of f.out(m,u))z.id!==g&&ie({kind:u,from:m,to:z.id});f.out(m,u).some(z=>z.id===g)||c.addEdge({kind:u,from:m,to:g})}else ie({kind:u,from:m,to:g})}else if("through"in s){if(!y)throw new _(`"${v}" carries a change to linked records, and has no record to start from`,"invalid");let m=A.get(s.through)?.from.includes(y.kind)??!0?f.out(y.id,s.through):f.in(y.id,s.through);for(let g of m){let z={};for(let[le,M]of Object.entries(s.set)){let B;if(me(M)==="to")B=g.id;else if(Z(M)&&"expr"in M)try{B=te(o.get(M.expr),{graph:f,subject:y,kinds:h,bindings:{...I,to:g},today:a(),...p})}catch(ne){throw ne instanceof ae?new _(`"${v}" could not work out a value for ${j(g)}: ${ne.sentence}`):ne}else B=ee(M,void 0);B!==void 0&&(z[le]=B)}Object.keys(z).length>0&&c.patchNode(g.id,z)}}else if("set"in s){let u=String(ee(s.target??"$subject",void 0)??""),m=f.getNode(u);!m&&!O(u)&&ge(u);let g={};for(let[z,le]of Object.entries(s.set)){let M=ee(le,m);M!==void 0&&(g[z]=M)}Object.keys(g).length>0&&c.patchNode(u,g)}else if("remove"in s){let u=String(ee(s.remove,void 0)??"");f.has(u)||ge(u),c.removeNode(u)}else if("replace"in s&&y){let u=x.to;for(let m of s.replace){let g=A.get(m)?.from.includes(y.kind)??!0;for(let z of g?f.out(y.id,m):f.in(y.id,m))m===s.keep&&z.id===u||ie(g?{kind:m,from:y.id,to:z.id}:{kind:m,from:z.id,to:y.id})}}}}))}let Pe=[];for(let[k,i]of Object.entries(n.rules??{})){let{title:R,require:v,when:T,says:$,covers:P}=e.rules[k],Y=i.repairs??[],Q=(E,l,G=a(),F)=>{let N=[],q={graph:E,subject:l,kinds:h,today:G,...p,...F?{linked:F}:{},onUnread:o=>N.push(o)},C,D=[];try{if(T&&te(T,q)!==!0)return[];if(P&&l?(D=wn(E,l,P),C=D.length===0):C=te(v,q)===!0,!C&&N.length>0)throw new ae(`it reads ${yn(N[0])}`,0)}catch(o){throw o instanceof kn?new an(o.sentence):o instanceof ae?new Error(o.sentence):o}if(C)return[];let r=Y.flatMap(o=>{let S=n.acts?.[o.act],U={},de=l&&S?.on&&S.fromTheOtherEnd&&![S.on].flat().includes(l.kind)?Gn(e.acts[o.act].args,l.kind):void 0;de?U[de]=l.id:l&&(S?.on||/^(edit|remove|archive|unarchive|merge|skip|detach|split)-/.test(o.act))&&(U[W]=l.id);for(let[f,b]of Object.entries(o.args??{}))U[f]=me(b)==="subject"?l?.id:b;let x=(S?e.acts[o.act].args:[]).filter(([f,b])=>b.required&&U[f]===void 0).map(([f])=>f);return[{mutation:o.act,label:o.label??(de?S.fromTheOtherEnd:S?.title)??o.act.replace(/-/g," "),args:U,...x.length>0?{missing:x}:{}}]});return P&&l?D.map(o=>({invariant:k,subjectId:l.id,label:R,message:$?se($,{node:l,kinds:h,graph:E,today:G,money:w,bindings:{[l.kind]:l,[o.kind]:o}}):`${j(l)}: ${R} \u2014 ${j(o)}`,nodeIds:[l.id,o.id],repairs:r})):[{invariant:k,...l?{subjectId:l.id}:{},label:R,message:$?se($,{node:l,kinds:h,graph:E,today:G,money:w}):l?`${j(l)}: ${R}`:R,nodeIds:l?[l.id]:[],repairs:r}]},H={label:R,shape:{over:i.over,require:v,...P?{covers:P}:{},when:T,says:$,declared:n.kinds,money:w,kinds:h,today:a},judgment:{...i.require?{require:i.require}:{},...i.covers?{covers:i.covers}:{},...i.when?{when:i.when}:{},...i.says?{says:i.says}:{}},...i.description?{description:i.description}:{},...Y.length>0?{repairs:Y.map(E=>E.act)}:{}};Pe.push(i.over==="graph"?Ae(k,{scope:"graph",...H,evaluate:({graph:E,today:l,context:G})=>Q(E,null,l,G?.linked)}):Ae(k,{scope:{kind:i.over},...H,evaluate:({graph:E,subject:l,today:G,context:F})=>Q(E,l,G,F?.linked)}))}let Ge=n.policy&&{...n.policy,...n.roles?{roles:n.roles}:{}},we={name:n.name,schema:J,mutations:Te,invariants:Pe,...Ge?{policy:Ge}:{},...e.brand?{brand:e.brand}:{},...n.modules?{modules:n.modules}:{},...n.lenses?{lenses:n.lenses}:{},...n.pages?{pages:n.pages}:{},...n.settings?{settings:n.settings}:{},...n.connections?{connections:n.connections}:{},...n.forms?{forms:n.forms}:{},...n.publishing?{publishing:n.publishing}:{},...n.tidying?{tidying:n.tidying}:{},...n.purpose?{purpose:n.purpose}:{},...e.viewSpecs?{viewSpecs:e.viewSpecs}:{},...e.home?{home:e.home}:{},version:n.version??1};return On(we,n),Fn.set(we,e),{ok:!0,app:we,document:n,findings:e.findings,sights:n.policy?.sees,kinds:h}}function Cn(e,d,n){let t=d||e.format==="duration",a=e.format==="money"||e.format==="percent"||!e.format&&e.unit!==void 0;if(!(!t&&!a))return{...e,...t?{as:"duration"}:{},...a?{amount:{...n,...e.format?{format:e.format}:{},...e.unit?{unit:e.unit}:{}}}:{}}}export{En as a,In as b,Wn as c,jn as d,W as e,me as f,Dn as g,vt as h,Nn as i};
@@ -1 +0,0 @@
1
- import{a as b,b as c,c as d,d as e,e as f}from"./chunk.CGALLZ54.js";import"./chunk.WKI5INH7.js";import"./chunk.QIPASE42.js";import"./chunk.OWT3VVOT.js";import"./chunk.NHTGAP3G.js";import{Hb as a}from"./chunk.DZZL5IDD.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
@@ -1,50 +0,0 @@
1
- import{a as Lt,b as Le,c as Dt,g as kt,h as ne,i as Ft,j as Tt}from"./chunk.VIH5AX7S.js";import{m as Ct}from"./chunk.VC3V7HLL.js";import{g as vt}from"./chunk.TIALD6SC.js";import{a as pt}from"./chunk.UQQKDBIH.js";import{d as gt}from"./chunk.OKZT2QBM.js";import{d as yt}from"./chunk.ACTXR2MI.js";import{E as xt,F as Pt,g as mt,r as Rt,s as wt,v as St,w as bt,x as Et}from"./chunk.AI34V6WV.js";import{c as Nr}from"./chunk.G4ULQK64.js";import{G as M,O as ft,T as ee,ca as ht}from"./chunk.M7RESZB6.js";import{Ld as it,Md as lt,Nd as st,Rc as nt,bb as at,be as ut,ce as ct,de as dt,ga as Ce,hd as ot,na as de}from"./chunk.DZZL5IDD.js";import{b as D}from"./chunk.AJZBJBMO.js";function Mr(e,t){return it(e,t).slice(1)}function fe(e,t){return e.kinds.find(r=>Mr(e,r)===t)}function Fn(e,t,r){return lt(e,t,r)}function Tn(e,t){return st(e,t)}var _=D(M(),1),g=D(M(),1),x=D(M(),1),Ve=D(M(),1),hr=D(M(),1),S=D(M(),1),tn=D(M(),1),rn=D(M(),1),an=D(M(),1),v=D(M(),1),Pr=D(M(),1);var Ae=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ut=/^[\\/]{2}/;function Or(e,t){return t+e.replace(/\\/g,"/")}var Nt="popstate";function ge(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function jt(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===0?"default":void 0,typeof h=="string"?void 0:h.mask));let o=s(r??n.length-1),i="POP",l=null;function s(h){return Math.min(Math.max(h,0),n.length-1)}function u(){return n[o]}function c(h,y=null,p,f){let R=ve(n?u().pathname:"/",h,y,p,f);return O(R.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),R}function d(h){return typeof h=="string"?h:W(h)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?V(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){i="PUSH";let p=ge(h)?h:c(h,y);o+=1,n.splice(o,n.length,p),a&&l&&l({action:i,location:p,delta:1})},replace(h,y){i="REPLACE";let p=ge(h)?h:c(h,y);n[o]=p,a&&l&&l({action:i,location:p,delta:0})},go(h){i="POP";let y=s(o+h),p=n[y];o=y,l&&l({action:i,location:p,delta:h})},listen(h){return l=h,()=>{l=null}}}}function zt(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ve("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:W(n)}return _r(t,r,null,e)}function L(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function O(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ar(){return Math.random().toString(36).substring(2,10)}function Mt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ve(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||a||Ar(),mask:n}}function W({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function _r(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let f=c(),R=f==null?null:f-u;u=f,s&&s({action:l,location:p.location,delta:R})}function m(f,R){l="PUSH";let w=ge(f)?f:ve(p.location,f,R);r&&r(w,f),u=c()+1;let b=Mt(w,u),P=p.createHref(w.mask||w);try{i.pushState(b,"",P)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;n.location.assign(P)}o&&s&&s({action:l,location:p.location,delta:1})}function h(f,R){l="REPLACE";let w=ge(f)?f:ve(p.location,f,R);r&&r(w,f),u=c();let b=Mt(w,u),P=p.createHref(w.mask||w);i.replaceState(b,"",P),o&&s&&s({action:l,location:p.location,delta:0})}function y(f){return $r(n,f)}let p={get action(){return l},get location(){return e(n,i)},listen(f){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Nt,d),s=f,()=>{n.removeEventListener(Nt,d),s=null}},createHref(f){return t(n,f)},createURL:y,encodeLocation(f){let R=y(f);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:m,replace:h,go(f){return i.go(f)}};return p}function $r(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),L(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:W(t);return n=n.replace(/ $/,"%20"),!r&&Ut.test(n)&&(n=a+n),new URL(n,a)}var Ir;Ir=new WeakMap;function _e(e,t,r="/"){return Hr(e,t,r,!1)}function Hr(e,t,r,a,n){let o=typeof t=="string"?V(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??jr(e),s=null,u=qr(i);for(let c=0;s==null&&c<l.length;++c)s=Qr(l[c],u,a);return s}function Ur(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function jr(e){let t=Bt(e);return zr(t),t}function Bt(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;L(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=H([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(L(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Bt(i.children,t,m,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Gr(d,i.index),routesMeta:m.map((h,y)=>{let[p,f]=Vt(h.relativePath,h.caseSensitive,y===m.length-1);return{...h,matcher:p,compiledParams:f}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Wt(i.path))o(i,l,!0,s)}),t}function Wt(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Wt(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function zr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Xr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Br=/^:[\w-]+$/,Wr=3,Yr=2,Vr=1,Jr=10,Kr=-2,Ot=e=>e==="*";function Gr(e,t){let r=e.split("/"),a=r.length;return r.some(Ot)&&(a+=Kr),t&&(a+=Yr),r.filter(n=>!Ot(n)).reduce((n,o)=>n+(Br.test(o)?Wr:o===""?Vr:Jr),a)}function Xr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Qr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},m=s.matcher&&s.compiledParams?Yt(d,c,s.matcher,s.compiledParams):ie(d,c),h=s.route;if(!m&&u&&r&&!a[a.length-1].route.index&&(m=ie({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!m)return null;Object.assign(n,m.params),i.push({params:n,pathname:H([o,m.pathname]),pathnameBase:ea(H([o,m.pathnameBase])),route:h}),m.pathnameBase!=="/"&&(o=H([o,m.pathnameBase]))}return i}function ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Vt(e.path,e.caseSensitive,e.end);return Yt(e,t,r,a)}function Yt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=te(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},m)=>{if(c==="*"){let y=l[m]||"";i=te(o.slice(0,o.length-y.length),1)}let h=l[m];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Vt(e,t=!1,r=!0){O(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function qr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return O(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Jt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?V(e):e,o;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?o=At(r.substring(1),"/"):o=At(r,t)):o=t,{pathname:o,search:ta(a),hash:ra(n)}}function At(e,t){let r=te(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function De(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Zr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function $e(e){let t=Zr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Se(e,t,r,a=!1){let n;typeof e=="string"?n=V(e):(n={...e},L(!n.pathname||!n.pathname.includes("?"),De("?","pathname","search",n)),L(!n.pathname||!n.pathname.includes("#"),De("#","pathname","hash",n)),L(!n.search||!n.search.includes("#"),De("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;n.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=Jt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Kt=e=>e.replace(/[\\/]{2,}/g,"/"),H=e=>Kt(e.join("/"));function te(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var ea=e=>te(e).replace(/^\/*/,"/"),ta=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ra=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Gt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Xt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function aa(e){let t=e.map(r=>r.route.path).filter(Boolean);return H(t)||"/"}var Qt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qt(e,t){let r=e;if(typeof r!="string"||!Ae.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Qt)try{let o=new URL(window.location.href),i=Ut.test(r)?new URL(Or(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{O(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var Mn=Symbol("Uninstrumented");var On=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _t=new URL("http://localhost");function Ie(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),_t)}catch{return _t}}function ke(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function na(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function He(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!ke(n,r),l=!ke(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!na(e,n)||!ke(n,o)))throw new Error("External navigation is not allowed")}var Zt=["POST","PUT","PATCH","DELETE"],An=new Set(Zt),oa=["GET",...Zt],_n=new Set(oa);var $n=Symbol("ResetLoaderData"),ia,la,sa,ua;ia=new WeakMap;la=new WeakMap;sa=new WeakMap;ua=new WeakMap;var ca=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function da(e){try{return ca.includes(new URL(e).protocol)}catch{return!1}}var G=_.createContext(null);G.displayName="DataRouter";var re=_.createContext(null);re.displayName="DataRouterState";var er=_.createContext(!1);function fa(){return _.useContext(er)}var Ue=_.createContext({isTransitioning:!1});Ue.displayName="ViewTransition";var tr=_.createContext(new Map);tr.displayName="Fetchers";var ha=_.createContext(null);ha.displayName="Await";var N=_.createContext(null);N.displayName="Navigation";var X=_.createContext(null);X.displayName="Location";var I=_.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName="Route";var je=_.createContext(null);je.displayName="RouteError";var Ne=!0,rr="REACT_ROUTER_ERROR",ma="REDIRECT",pa="ROUTE_ERROR_RESPONSE";function ya(e){if(e.startsWith(`${rr}:${ma}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ga(e){if(e.startsWith(`${rr}:${pa}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gt(t.status,t.statusText,t.data)}catch{}}function be(e,{relative:t}={}){L(Q(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(N),{hash:n,pathname:o,search:i}=ae(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:H([r,o])),a.createHref({pathname:l,search:i,hash:n})}function Q(){return g.useContext(X)!=null}function T(){return L(Q(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(X).location}function va(){return g.useContext(X).navigationType}var ar="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){g.useContext(N).static||g.useLayoutEffect(e)}function q(){let{isDataRoute:e}=g.useContext(I);return e?ka():Ra()}function Ra(){L(Q(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(G),{basename:t,navigator:r}=g.useContext(N),{matches:a}=g.useContext(I),{pathname:n}=T(),o=JSON.stringify($e(a)),i=g.useRef(!1);return nr(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(O(i.current,ar),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=Se(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:H([t,c.pathname])),He(typeof s=="string"?s:W(s),r.createHref(c),Ie(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var In=g.createContext(null);function wa(){let{matches:e}=g.useContext(I);return e[e.length-1]?.params??{}}function ae(e,{relative:t}={}){let{matches:r}=g.useContext(I),{pathname:a}=T(),n=JSON.stringify($e(r));return g.useMemo(()=>Se(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function or(e,t){return ir(e,t)}function ir(e,t,r){L(Q(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(N),{matches:n}=g.useContext(I),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(Ne){let f=u&&u.path||"";cr(l,!u||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
-
3
- Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let c=T(),d;if(t){let f=typeof t=="string"?V(t):t;L(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=c;let m=d.pathname||"/",h=m;if(s!=="/"){let f=s.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(f.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(f=>Object.assign(f,{route:r.manifest[f.route.id]||f.route})):_e(e,{pathname:h});Ne&&(O(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),O(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let p=Pa(y&&y.map(f=>Object.assign({},f,{params:Object.assign({},i,f.params),pathname:H([s,a.encodeLocation?a.encodeLocation(f.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:H([s,a.encodeLocation?a.encodeLocation(f.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:f.pathnameBase])})),n,r);return t&&p?g.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},p):p}function Sa(){let e=ur(),t=Xt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return Ne&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var ba=g.createElement(Sa,null),lr=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ga(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement(I.Provider,{value:this.props.routeContext},g.createElement(je.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(Ea,{error:e},t):t}};lr.contextType=er;var Fe=new WeakMap;function Ea({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(N);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ya(t.digest);if(n){let o=Fe.get(t);if(o)throw o;let i=qt(n.location,r),l=i.absoluteURL||i.to;if(He(n.location,l,Ie(a),"allow-explicit"),da(l))throw new Error("Invalid redirect location");if(Qt&&!Fe.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Fe.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function xa({routeContext:e,match:t,children:r}){let a=g.useContext(G);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(I.Provider,{value:e},r)}function Pa(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);L(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:m,errors:h}=a,y=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:aa(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,m)=>{let h,y=!1,p=null,f=null;a&&(h=o&&d.route.id?o[d.route.id]:void 0,p=d.route.errorElement||ba,i&&(l<0&&m===0?(cr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,f=null):l===m&&(y=!0,f=d.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,m+1)),w=()=>{let b;return h?b=p:y?b=f:d.route.Component?b=g.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=c,g.createElement(xa,{match:d,routeContext:{outlet:c,matches:R,isDataRoute:a!=null},children:b})};return a&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?g.createElement(lr,{location:a.location,revalidation:a.revalidation,component:p,error:h,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:u}):w()},null)}function ze(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ca(e){let t=g.useContext(G);return L(t,ze(e)),t}function Be(e){let t=g.useContext(re);return L(t,ze(e)),t}function La(e){let t=g.useContext(I);return L(t,ze(e)),t}function We(e){let t=La(e),r=t.matches[t.matches.length-1];return L(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Da(){return We("useRouteId")}function sr(){let e=Be("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function Ye(){let{matches:e,loaderData:t}=Be("useMatches");return g.useMemo(()=>e.map(r=>Ur(r,t)),[e,t])}function ur(){let e=g.useContext(je),t=Be("useRouteError"),r=We("useRouteError");return e!==void 0?e:t.errors?.[r]}function ka(){let{router:e}=Ca("useNavigate"),t=We("useNavigate"),r=g.useRef(!1);return nr(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{O(r.current,ar),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var $t={};function cr(e,t,r){!t&&!$t[e]&&($t[e]=!0,O(!1,r))}var Fa="useOptimistic",Hn=x[Fa];var Un=x.memo(Ta);function Ta({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return ir(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function Na({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=x.useRef();o.current==null&&(o.current=jt({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=x.useState({action:i.action,location:i.location}),u=x.useCallback(c=>{n===!1?s(c):x.startTransition(()=>s(c))},[n]);return x.useLayoutEffect(()=>i.listen(u),[i,u]),x.createElement(Ee,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Ma({to:e,replace:t,state:r,relative:a}){L(Q(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=x.useContext(N);O(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=x.useContext(I),{pathname:l}=T(),s=q(),u=Se(e,$e(i),l,a==="path");He(typeof e=="string"?e:W(e),o.createHref(u),Ie(o),"reject");let c=JSON.stringify(u);return x.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function dr(e){L(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ee({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){L(!Q(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=V(r));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:h="default",mask:y}=r,p=x.useMemo(()=>{let f=U(u,l);return f==null?null:{location:{pathname:f,search:c,hash:d,state:m,key:h,mask:y},navigationType:a}},[l,u,c,d,m,h,a,y]);return O(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:x.createElement(N.Provider,{value:s},x.createElement(X.Provider,{children:t,value:p}))}function Oa({children:e,location:t}){return or(Re(e),t)}function Re(e,t=[]){let r=[];return x.Children.forEach(e,(a,n)=>{if(!x.isValidElement(a))return;let o=[...t,n];if(a.type===x.Fragment){r.push.apply(r,Re(a.props.children,o));return}L(a.type===dr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),L(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=Re(a.props.children,o)),r.push(i)}),r}var pe="get",ye="application/x-www-form-urlencoded";function xe(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Aa(e){return xe(e)&&e.tagName.toLowerCase()==="button"}function _a(e){return xe(e)&&e.tagName.toLowerCase()==="form"}function $a(e){return xe(e)&&e.tagName.toLowerCase()==="input"}function Ia(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ha(e,t){return e.button===0&&(!t||t==="_self")&&!Ia(e)}function we(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Ua(e,t){let r=we(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var he=null;function ja(){if(he===null)try{new FormData(document.createElement("form"),0),he=!1}catch{he=!0}return he}var za=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Te(e){return e!=null&&!za.has(e)?(O(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ye}"`),null):e}function Ba(e,t){let r,a,n,o,i;if(_a(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||pe,n=Te(e.getAttribute("enctype"))||ye,o=new FormData(e)}else if(Aa(e)||$a(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||pe,n=Te(e.getAttribute("formenctype"))||Te(l.getAttribute("enctype"))||ye,o=new FormData(l,e),!ja()){let{name:u,type:c,value:d}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,d)}}else{if(xe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=pe,a=null,n=ye,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var jn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wa={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ya=/[&><\u2028\u2029]/g;function It(e){return e.replace(Ya,t=>Wa[t])}function Je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Va=Symbol("SingleFetchRedirect");function fr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${te(t)}/_root.${a}`:n.pathname=`${te(n.pathname)}.${a}`,n}async function Ja(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ka(e){return e!=null&&typeof e.page=="string"}function Ga(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Xa(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Ja(o,r);return i.links?i.links():[]}return[]}));return en(a.flat(1).filter(Ga).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Ht(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Qa(e,t,{includeHydrateFallback:r}={}){return qa(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function qa(e){return[...new Set(e)]}function Za(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function en(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ka(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Za(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Ke(){let e=S.useContext(G);return Je(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function nn(){let e=S.useContext(re);return Je(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var le=S.createContext(void 0);le.displayName="FrameworkContext";function Pe(){let e=S.useContext(le);return Je(e,"You must render this element inside a <HydratedRouter> element"),e}function on(e,t){let r=S.useContext(le),[a,n]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,m=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let p=R=>{R.forEach(w=>{i(w.isIntersecting)})},f=new IntersectionObserver(p,{threshold:.5});return m.current&&f.observe(m.current),()=>{f.disconnect()}}},[e]),S.useEffect(()=>{if(a){let p=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(p)}}},[a]);let h=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:oe(l,h),onBlur:oe(s,y),onMouseEnter:oe(u,h),onMouseLeave:oe(c,y),onTouchStart:oe(d,h)}]:[!1,m,{}]}function oe(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function mr({page:e,...t}){let r=fa(),{nonce:a}=Pe(),{router:n}=Ke(),o=S.useMemo(()=>_e(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?S.createElement(sn,{page:e,matches:o,...t}):S.createElement(un,{page:e,matches:o,...t})):null}function ln(e){let{manifest:t,routeModules:r}=Pe(),[a,n]=S.useState([]);return S.useEffect(()=>{let o=!1;return Xa(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function sn({page:e,matches:t,...r}){let a=T(),{future:n}=Pe(),{basename:o}=Ke(),i=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=fr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return S.createElement(S.Fragment,null,i.map(l=>S.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function un({page:e,matches:t,...r}){let a=T(),{future:n,manifest:o,routeModules:i}=Pe(),{basename:l}=Ke(),{loaderData:s,matches:u}=nn(),c=S.useMemo(()=>Ht(e,t,u,o,a,"data"),[e,t,u,o,a]),d=S.useMemo(()=>Ht(e,t,u,o,a,"assets"),[e,t,u,o,a]),m=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,f=!1;if(t.forEach(w=>{let b=o.routes[w.route.id];!b||!b.hasLoader||(!c.some(P=>P.route.id===w.route.id)&&w.route.id in s&&i[w.route.id]?.shouldRevalidate||b.hasClientLoader?f=!0:p.add(w.route.id))}),p.size===0)return[];let R=fr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return f&&p.size>0&&R.searchParams.set("_routes",t.filter(w=>p.has(w.route.id)).map(w=>w.route.id).join(",")),[R.pathname+R.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),h=S.useMemo(()=>Qa(d,o),[d,o]),y=ln(d);return S.createElement(S.Fragment,null,m.map(p=>S.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),h.map(p=>S.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),y.map(({key:p,link:f})=>S.createElement("link",{key:p,nonce:r.nonce,...f,crossOrigin:f.crossOrigin??r.crossOrigin})))}function cn(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var dn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dn&&(window.__reactRouterVersion="7.18.3")}catch{}function fn({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=zt({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(Ee,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function pr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(Ee,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}pr.displayName="unstable_HistoryRouter";var se=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...y},p){let{basename:f,navigator:R,useTransitions:w}=v.useContext(N),b=typeof c=="string"&&Ae.test(c),P=qt(c,f);c=P.to;let E=be(c,{relative:n}),F=T(),k=null;if(l){let Y=Se(l,[],F.mask?F.mask.pathname:"/",!0);f!=="/"&&(Y.pathname=Y.pathname==="/"?f:H([f,Y.pathname])),k=R.createHref(Y)}let[$,K,B]=on(a,y),ue=wr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:m,defaultShouldRevalidate:h,useTransitions:w});function Z(Y){t&&t(Y),Y.defaultPrevented||ue(Y)}let ce=!(P.isExternal||o),rt=v.createElement("a",{...y,...B,href:(ce?k:void 0)||P.absoluteURL||E,onClick:ce?Z:t,ref:cn(p,K),target:u,"data-discover":!b&&r==="render"?"true":void 0});return $&&!b?v.createElement(v.Fragment,null,rt,v.createElement(mr,{page:E})):rt});se.displayName="Link";var yr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=ae(i,{relative:u.relative}),m=T(),h=v.useContext(re),{navigator:y,basename:p}=v.useContext(N),f=h!=null&&xr(d)&&l===!0,R=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,w=m.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(w=w.toLowerCase(),b=b?b.toLowerCase():null,R=R.toLowerCase()),b&&p&&(b=U(b,p)||b);let P=R!=="/"&&R.endsWith("/")?R.length-1:R.length,E=w===R||!n&&w.startsWith(R)&&w.charAt(P)==="/",F=b!=null&&(b===R||!n&&b.startsWith(R)&&b.charAt(R.length)==="/"),k={isActive:E,isPending:F,isTransitioning:f},$=E?t:void 0,K;typeof a=="function"?K=a(k):K=[a,E?"active":null,F?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let B=typeof o=="function"?o(k):o;return v.createElement(se,{...u,"aria-current":$,className:K,ref:c,style:B,to:i,viewTransition:l},typeof s=="function"?s(k):s)});yr.displayName="NavLink";var gr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=pe,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m,...h},y)=>{let{useTransitions:p}=v.useContext(N),f=Sr(),R=br(l,{relative:u}),w=i.toLowerCase()==="get"?"get":"post",b=typeof l=="string"&&Ae.test(l);return v.createElement("form",{ref:y,method:w,action:R,onSubmit:a?s:E=>{if(s&&s(E),E.defaultPrevented)return;E.preventDefault();let F=E.nativeEvent.submitter,k=F?.getAttribute("formmethod")||i,$=()=>f(F||E.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:m});p&&r!==!1?v.startTransition(()=>$()):$()},...h,"data-discover":!b&&e==="render"?"true":void 0})});gr.displayName="Form";function vr({getKey:e,storageKey:t,...r}){let a=v.useContext(le),{basename:n}=v.useContext(N),o=T(),i=Ye();Er({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Oe(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${It(JSON.stringify(t||Me))}, ${It(JSON.stringify(l))})`}})}vr.displayName="ScrollRestoration";function Rr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ge(e){let t=v.useContext(G);return L(t,Rr(e)),t}function hn(e){let t=v.useContext(re);return L(t,Rr(e)),t}function wr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=q(),d=T(),m=ae(e,{relative:i});return v.useCallback(h=>{if(Ha(h,t)){h.preventDefault();let y=r!==void 0?r:W(d)===W(m),p=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>p()):p()}},[d,c,m,r,a,n,t,e,o,i,l,s,u])}function Xe(e){O(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(we(e)),r=v.useRef(!1),a=T(),n=v.useMemo(()=>Ua(a.search,r.current?null:t.current),[a.search]),o=q(),i=v.useCallback((l,s)=>{let u=we(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var mn=0,pn=()=>`__${String(++mn)}__`;function Sr(){let{router:e}=Ge("useSubmit"),{basename:t}=v.useContext(N),r=Da(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Ba(o,t);if(i.navigate===!1){let m=i.fetcherKey||pn();await a(m,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function br(e,{relative:t}={}){let{basename:r}=v.useContext(N),a=v.useContext(I);L(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...ae(e||".",{relative:t})},i=T();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:H([r,o.pathname])),W(o)}var Me="react-router-scroll-positions",me={};function Oe(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Er({getKey:e,storageKey:t}={}){let{router:r}=Ge("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=hn("useScrollRestoration"),{basename:o}=v.useContext(N),i=T(),l=Ye(),s=sr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),yn(v.useCallback(()=>{if(s.state==="idle"){let u=Oe(i,l,o,e);me[u]=window.scrollY}try{sessionStorage.setItem(t||Me,JSON.stringify(me))}catch(u){O(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Me);u&&(me=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(me,()=>window.scrollY,e?(c,d)=>Oe(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{O(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function yn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function xr(e,{relative:t}={}){let r=v.useContext(Ue);L(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ge("useViewTransitionState"),n=ae(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ie(n.pathname,i)!=null||ie(n.pathname,o)!=null}var Qe=D(M(),1),Cr=D(Nr(),1);var j=D(ee(),1);function Lr({context:e,own:t}){ne(e.store);let r=ht(),a=ft()?.live??e.store;ne(a);let n=vt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Qe.Suspense,{fallback:null,children:(0,j.jsx)(Ct,{})}),(0,j.jsx)(Qe.Suspense,{fallback:null,children:(0,j.jsx)(Lt,{})})]});return t?(0,Cr.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var A=D(M(),1);var J=D(M(),1),gn=(0,J.createContext)(null);function ii(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function Dr(e){let t=(0,J.useContext)(gn);(0,J.useLayoutEffect)(()=>t?.place(e),[t,e])}function li(e,t){return(0,J.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var kr=D(M(),1),z=D(ee(),1),qe="var(--graview-text-small)",Ze="var(--graview-text-body)",mi="var(--graview-font-display, var(--graview-font-body, system-ui))",et={maxWidth:760,margin:"0 auto",padding:"40px var(--graview-page-gutter, 20px) max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},tt=1160,pi={...et,maxWidth:tt},Fr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},yi={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},gi={margin:0,fontSize:qe,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},vi={margin:0,fontSize:Ze,color:"var(--graview-ink-muted)",maxWidth:"60ch"},Tr={color:"var(--graview-ink-muted)",fontSize:qe},Ri={borderTop:"1px solid var(--graview-edge)",paddingTop:24},vn={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",columnGap:"0.3em",minHeight:24},wi={...vn,textDecoration:"none"},Si={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},bi=`.graview-list{container-type:inline-size}
4
- .graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
5
- .graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
6
- .graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
7
- .graview-row-title::after{content:"";position:absolute;inset:0}
8
- .graview-row-title:focus-visible{outline:0}
9
- .graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
10
- .graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
11
- .graview-row:active .graview-row-title{color:var(--graview-accent)}
12
- .graview-row :is(a,button):not(.graview-row-title){position:relative}
13
- .graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
14
- .graview-row>[data-testid=search-why]{grid-column:1/-1}
15
- .graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
16
- .graview-chip{display:inline-block;padding:0 .5em;border-radius:var(--graview-radius-sm);background:color-mix(in srgb,var(--graview-ink) 7%,transparent);color:var(--graview-ink);font-weight:500;line-height:1.6;white-space:nowrap}
17
- .graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
18
- .graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
19
- .graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
20
- .graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
21
- .graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
22
- @container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${ot.raised};background:var(--graview-ground)}}`,Ei={font:"inherit",fontSize:qe,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function xi({kind:e,brand:t,size:r=10,schema:a}){return(0,z.jsx)(pt,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function Pi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??Ce(n));return a.length>0?a.join(" and "):Ce(t.edgeKind)}function Ci(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?at(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function Li(e,t,r){return Rn(e,t,r).map(a=>a.text).join(" \xB7 ")}function Rn(e,t,r,a=()=>!1){return gt(e,t,{limit:3,said:[r],glance:!0}).map(n=>n.long?{text:yt(n.stored,{markdown:n.markdown,most:100})}:a(n.key)?{text:n.alone,choice:n.key}:{text:n.alone})}function Di({runs:e}){return(0,z.jsx)(z.Fragment,{children:e.map((t,r)=>{let a=r===0?"":t.choice===void 0&&e[r-1].choice===void 0?" \xB7 ":" ";return(0,z.jsx)(kr.Fragment,{children:t.choice!==void 0?(0,z.jsxs)(z.Fragment,{children:[a,(0,z.jsx)("span",{className:"graview-chip","data-graview-field":t.choice,children:t.text})]}):`${a}${t.text}`},r)})})}var ki=(e,t)=>de(e.schema,t),wn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},Sn=e=>dt(wn(e.store,e.principal),e.views?.arrangement?.()?.order),Fi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return Sn(e).filter(r=>!t.has(r))},Ti=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(ee(),1);function Bi({context:e,children:t}){let{store:r,brand:a}=e;return ne(r),mt(e.embedded?void 0:nt(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:Ze,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(En,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...Tr},children:(0,C.jsx)("div",{style:{maxWidth:tt,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(kt,{})]})})}):null]})}var bn=(0,A.createContext)(null);function En({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=T(),i=q(),l=be("/").replace(/\/$/,""),s=(0,A.useContext)(bn),u=s?.places===!1?[]:Rt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,m=t.violations(n),h=m.length,y=xt(m,"All rules hold"),p=o.pathname.split("/").filter(Boolean),f=p.length===2&&fe(t.schema,p[0])!==void 0&&t.graph.getNode(decodeURIComponent(p[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(bt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:ut(c),current:!1,go:()=>window.location.assign(a)},pages:{label:ct(c),current:!0,go:()=>{}}},places:u,current:wt(u,d),reach:{href:R=>`${l}${R}`,go:R=>i(R.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(Ln,{context:e})},skips:(0,C.jsx)(Dt,{to:[{label:"Skip to the content",testid:"content",go:()=>{let R=document.querySelector("[data-graview-skip-target]");Le(R?.querySelector('[data-graview-choose-box][tabindex="0"]')??R??document.querySelector("main"))}},...f?[{label:"Skip to what can be done",testid:"acts",go:()=>void Le(document.querySelector("main [data-affordance]:not([disabled]):not([tabindex='-1'])")??document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(se,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...St,padding:h===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:h===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(Pt,{tone:h===0?"var(--graview-good)":"var(--graview-warn)"}),h>0?(0,C.jsx)("span",{"aria-hidden":"true",children:h}):null]}),s?null:(0,C.jsx)(Lr,{context:e}),e.views?(0,C.jsx)(Et,{...e.signature?{signature:!0}:{}}):null]})})})}function Wi({context:e,style:t,bleedTop:r,children:a,...n}){let o=e.embedded||e.framed?"section":"main";return(0,C.jsxs)(o,{style:{...et,...t},"data-graview-page-main":"",...r?{"data-graview-bleed-top":""}:{},...n,children:[r?(0,C.jsx)("style",{children:xn}):null,a]})}var xn="@media (max-width:680px){[data-graview-bleed-top]:not(:has([data-graview-bleed]>[data-worker-view-fallback])){padding-top:0 !important}}";function Yi({when:e,children:t}){return e?(0,C.jsxs)("div",{"data-graview-bleed":"",style:{display:"grid",minWidth:0},children:[(0,C.jsx)("style",{children:Pn}),t]}):(0,C.jsx)(C.Fragment,{children:t})}var Pn="@media (max-width:680px){[data-graview-bleed]:not(:has(>[data-worker-view-fallback])){margin-inline:min(0px,calc(env(safe-area-inset-left,0px) - var(--graview-page-gutter,20px))) min(0px,calc(env(safe-area-inset-right,0px) - var(--graview-page-gutter,20px)))}}",Cn={position:"absolute",width:1,height:1,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"};function Vi({context:e,unseen:t,children:r,...a}){let n=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(n,{style:t?Cn:Fr,"data-graview-page-title":"",...a,children:r})}function Ln({context:e,narrowsLists:t=!0,className:r,size:a}){Dr("find");let n=T(),o=q(),[i,l]=Xe(),s=n.pathname.split("/").filter(Boolean),u=t&&s.length===1&&fe(e.store.schema,s[0])!==void 0,c=n.pathname==="/search",d=u||c?i.get("q")??"":"",m=u?`Narrow ${de(e.store.schema,fe(e.store.schema,s[0])).toLowerCase()}\u2026`:"",[h,y]=(0,A.useState)(!0);(0,A.useLayoutEffect)(()=>{let P=R.current;if(!P||!m||typeof ResizeObserver>"u")return;let E=()=>{let k=getComputedStyle(P),$=document.createElement("canvas").getContext("2d");$&&($.font=`${k.fontWeight} ${k.fontSize} ${k.fontFamily}`,y($.measureText(m).width<=P.clientWidth-parseFloat(k.paddingLeft)-parseFloat(k.paddingRight)))};E();let F=new ResizeObserver(E);return F.observe(P),()=>F.disconnect()},[m]);let[p,f]=(0,A.useState)(d),R=(0,A.useRef)(null);(0,A.useEffect)(()=>{let P=E=>{if(E.defaultPrevented||E.altKey)return;let F=!E.shiftKey&&(E.metaKey||E.ctrlKey)&&E.key.toLowerCase()==="k",k=document.activeElement,$=k instanceof HTMLInputElement||k instanceof HTMLTextAreaElement||k instanceof HTMLSelectElement||k instanceof HTMLElement&&k.isContentEditable,K=E.key==="/"&&!E.metaKey&&!E.ctrlKey&&!$;if(!F&&!K)return;let B=R.current,ue=B?.closest("[data-graview-embed]"),Z=E.target,ce=Z===document.body||Z===document.documentElement;!B||!(ce||!ue||Z instanceof Node&&ue.contains(Z))||(E.preventDefault(),B.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{B.focus(),B.select()}))};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[]);let w=(0,A.useRef)(new Set([d]));(0,A.useEffect)(()=>{w.current.has(d)||(w.current=new Set([d]),f(d))},[d]);let b=P=>{if(f(P),w.current.add(P),u){let F=new URLSearchParams(i);P.trim()?F.set("q",P):F.delete("q"),l(F,{replace:!0});return}let E=P.trim()?`/search?${new URLSearchParams({q:P}).toString()}`:"/search";o(E,{replace:c})};return(0,C.jsxs)("form",{role:"search","aria-label":u?"Narrow this list":"Find anything",className:Tt("graview-find",r),...Ft(a),onSubmit:P=>{P.preventDefault(),u&&p.trim()&&o(`/search?${new URLSearchParams({q:p}).toString()}`)},children:[(0,C.jsx)("input",{ref:R,type:"search","data-testid":"nav-find",value:p,onChange:P=>b(P.target.value),placeholder:u?h?m:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":u?"Narrow this list":"Find anything",className:"graview-find-box"}),(0,C.jsx)("style",{children:Dn})]})}var Dn=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
23
- :where(.graview-find[data-size=md]){--graview-control-height:36px}
24
- :where(.graview-find-box){box-sizing:border-box;width:100%;min-width:0;height:var(--graview-control-height,30px);padding:0 var(--graview-bar-find-end,10px) 0 10px;font:inherit;font-size:.875rem;color:var(--graview-ink);background:var(--graview-ground);border:1px solid var(--graview-edge);border-radius:8px}`;export{Mr as a,fe as b,Fn as c,Tn as d,qe as e,mi as f,pi as g,yi as h,gi as i,vi as j,Tr as k,Ri as l,vn as m,wi as n,Si as o,bi as p,Ei as q,xi as r,Pi as s,Ci as t,Li as u,Rn as v,Di as w,ki as x,wn as y,Sn as z,Fi as A,Ti as B,Lr as C,be as D,T as E,va as F,q as G,wa as H,Na as I,Ma as J,dr as K,Oa as L,fn as M,se as N,Xe as O,gn as P,ii as Q,li as R,Bi as S,bn as T,Wi as U,Yi as V,Vi as W,Ln as X};
25
- /*! Bundled license information:
26
-
27
- react-router/dist/development/chunk-BV7QT456.mjs:
28
- (**
29
- * react-router v7.18.3
30
- *
31
- * Copyright (c) Remix Software Inc.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE.md file in the root directory of this source tree.
35
- *
36
- * @license MIT
37
- *)
38
-
39
- react-router/dist/development/index.mjs:
40
- (**
41
- * react-router v7.18.3
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- *)
50
- */