graview 0.1.65 → 0.1.67

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 (265) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/index.js.map +1 -1
  3. package/dist/preview/{chunk.3IZEZPJB.js → chunk.25QFDTCU.js} +1 -1
  4. package/dist/preview/{chunk.SOMRYDDH.js → chunk.264PB572.js} +1 -1
  5. package/dist/preview/chunk.2FHIINXG.js +2 -0
  6. package/dist/preview/chunk.2VUX54XH.js +1 -0
  7. package/dist/preview/chunk.32SHA3EY.js +1 -0
  8. package/dist/preview/{chunk.ZDUTEM3Z.js → chunk.35KMZHB7.js} +1 -1
  9. package/dist/preview/{chunk.74B6KQF4.js → chunk.37RFCHSS.js} +1 -1
  10. package/dist/preview/chunk.3ENPWZBG.js +1 -0
  11. package/dist/preview/chunk.3GNT5MKP.js +50 -0
  12. package/dist/preview/chunk.3NSV3WKM.js +22 -0
  13. package/dist/preview/chunk.3ZODN6BW.js +1 -0
  14. package/dist/preview/{chunk.7VQ3C7F4.js → chunk.47XEJZ3O.js} +1 -1
  15. package/dist/preview/{chunk.KIQXTQDU.js → chunk.4EMKCKDB.js} +1 -1
  16. package/dist/preview/{chunk.LKK5YF2H.js → chunk.4UUJHLHR.js} +1 -1
  17. package/dist/preview/{chunk.L6FGKJ5H.js → chunk.4W57E7AX.js} +1 -1
  18. package/dist/preview/chunk.55G4IPOO.js +1 -0
  19. package/dist/preview/chunk.5AKZROMR.js +1 -0
  20. package/dist/preview/chunk.5J6DVR7S.js +1 -0
  21. package/dist/preview/chunk.5R744JGZ.js +19 -0
  22. package/dist/preview/{chunk.64FCAUAJ.js → chunk.6KJGRM7A.js} +1 -1
  23. package/dist/preview/{chunk.INTJD5WG.js → chunk.6N4PE3U5.js} +1 -1
  24. package/dist/preview/{chunk.44ZHHPPJ.js → chunk.6NG76MDA.js} +2 -2
  25. package/dist/preview/chunk.6SJEZWH3.js +1 -0
  26. package/dist/preview/chunk.6UQFV53C.js +1 -0
  27. package/dist/preview/chunk.6W6XMLSF.js +1 -0
  28. package/dist/preview/chunk.77C556NM.js +1 -0
  29. package/dist/preview/{chunk.7E4CSXBT.js → chunk.7ARRVNUR.js} +1 -1
  30. package/dist/preview/chunk.7BJRHPE3.js +23 -0
  31. package/dist/preview/{chunk.TY74U3EI.js → chunk.7S6ZRMW4.js} +1 -1
  32. package/dist/preview/{chunk.F5VEHAP2.js → chunk.7UHPHEH5.js} +1 -1
  33. package/dist/preview/chunk.7WHQWLL6.js +1 -0
  34. package/dist/preview/{chunk.NSO6RUKW.js → chunk.A4EZAGG7.js} +1 -1
  35. package/dist/preview/chunk.A5PSEU3W.js +25 -0
  36. package/dist/preview/{chunk.2TZSLREX.js → chunk.A7GVTE5Y.js} +2 -2
  37. package/dist/preview/chunk.AJMVRFYX.js +5 -0
  38. package/dist/preview/chunk.AKJS2NUM.js +1 -0
  39. package/dist/preview/chunk.ARWO4WOV.js +1 -0
  40. package/dist/preview/chunk.B5SJMCTT.js +7 -0
  41. package/dist/preview/{chunk.2QQ37RCZ.js → chunk.B7KZBT27.js} +1 -1
  42. package/dist/preview/chunk.BDNQMKDG.js +35 -0
  43. package/dist/preview/chunk.BKYZSV2Y.js +2 -0
  44. package/dist/preview/chunk.CEQQIW7Z.js +1 -0
  45. package/dist/preview/chunk.CKDCTFLU.js +1 -0
  46. package/dist/preview/chunk.CTUJZ3IV.js +1 -0
  47. package/dist/preview/chunk.CY7FFKEZ.js +1 -0
  48. package/dist/preview/chunk.D4WJ7OM5.js +1 -0
  49. package/dist/preview/{chunk.AB4RZSYW.js → chunk.D7NWMXSX.js} +16 -16
  50. package/dist/preview/chunk.DEKRFTRN.js +4 -0
  51. package/dist/preview/{chunk.6YDC6IDA.js → chunk.DKEIEH2D.js} +1 -1
  52. package/dist/preview/{chunk.S2DOVJRL.js → chunk.DWM7AR5Y.js} +1 -1
  53. package/dist/preview/{chunk.FHHVW2WB.js → chunk.DZMIYEHQ.js} +1 -1
  54. package/dist/preview/chunk.E5PYNAYT.js +21 -0
  55. package/dist/preview/chunk.EBKH3ILT.js +1 -0
  56. package/dist/preview/chunk.EFVSZKB5.js +1 -0
  57. package/dist/preview/chunk.EG7OOJH5.js +1 -0
  58. package/dist/preview/chunk.EGPCVMDU.js +1 -0
  59. package/dist/preview/{chunk.C437FVD7.js → chunk.EJ2EZL2G.js} +1 -1
  60. package/dist/preview/{chunk.IR4OW67N.js → chunk.EP6Q32WT.js} +1 -1
  61. package/dist/preview/{chunk.G3Q5IMM3.js → chunk.F464JKHZ.js} +1 -1
  62. package/dist/preview/{chunk.IFBGYFS4.js → chunk.FLJXYESX.js} +1 -1
  63. package/dist/preview/chunk.FOUBDGL3.js +1 -0
  64. package/dist/preview/chunk.FPHRAO3R.js +1 -0
  65. package/dist/preview/chunk.FRQSLWP4.js +1 -0
  66. package/dist/preview/chunk.FVQKSN33.js +1 -0
  67. package/dist/preview/{chunk.CGQ6KXVK.js → chunk.G3GFDVO2.js} +1 -1
  68. package/dist/preview/{chunk.4O3C2LJF.js → chunk.G5GVT6JY.js} +1 -1
  69. package/dist/preview/chunk.GFLH7RCI.js +1 -0
  70. package/dist/preview/chunk.GG47EIKO.js +1 -0
  71. package/dist/preview/chunk.GMLONS5L.js +1 -0
  72. package/dist/preview/{chunk.RFVOXX3P.js → chunk.GRFD42WM.js} +1 -1
  73. package/dist/preview/{chunk.2PK335JQ.js → chunk.GVT4UUQA.js} +1 -1
  74. package/dist/preview/{chunk.5M34BJIQ.js → chunk.H3EGBDW2.js} +1 -1
  75. package/dist/preview/chunk.H6KIEDZN.js +1 -0
  76. package/dist/preview/chunk.HAOB6O72.js +1 -0
  77. package/dist/preview/chunk.HB5NWHFP.js +3 -0
  78. package/dist/preview/{chunk.GPCKOYSF.js → chunk.HJUZMOW2.js} +1 -1
  79. package/dist/preview/chunk.HN4ZJ4B4.js +1 -0
  80. package/dist/preview/chunk.HVBKI5ZO.js +1 -0
  81. package/dist/preview/chunk.I3SDKMQS.js +1 -0
  82. package/dist/preview/chunk.IAEGJDF3.js +1 -0
  83. package/dist/preview/{chunk.CS72MISN.js → chunk.IDALEKIW.js} +1 -1
  84. package/dist/preview/chunk.ILJDLBPJ.js +1 -0
  85. package/dist/preview/chunk.J2OPIS3H.js +111 -0
  86. package/dist/preview/chunk.J5OLYVZ4.js +1 -0
  87. package/dist/preview/{chunk.3KUYB5ZT.js → chunk.J6HF7IRQ.js} +1 -1
  88. package/dist/preview/chunk.JEC5FDKX.js +1 -0
  89. package/dist/preview/chunk.JKFVNQY7.js +1 -0
  90. package/dist/preview/chunk.JO2X52D4.js +1 -0
  91. package/dist/preview/{chunk.LVD3V77M.js → chunk.JQ2WNKDW.js} +1 -1
  92. package/dist/preview/{chunk.NBVPWLRY.js → chunk.JQ63N4MZ.js} +1 -1
  93. package/dist/preview/{chunk.7Q43N5JS.js → chunk.JU6UFWS3.js} +1 -1
  94. package/dist/preview/chunk.JVB5KDSG.js +1 -0
  95. package/dist/preview/chunk.KFT7JIEH.js +1 -0
  96. package/dist/preview/chunk.KGMSSXZL.js +1 -0
  97. package/dist/preview/chunk.KX5ZBHMA.js +2 -0
  98. package/dist/preview/{chunk.XTTESA7X.js → chunk.LP2ZMAT2.js} +1 -1
  99. package/dist/preview/{chunk.IMKD6QQG.js → chunk.LRNFE3UK.js} +1 -1
  100. package/dist/preview/{chunk.BUQKRXI6.js → chunk.LVOTLGJB.js} +1 -1
  101. package/dist/preview/chunk.LYEGRY77.js +3 -0
  102. package/dist/preview/{chunk.B3WVCSW5.js → chunk.M5FP4Y4Q.js} +1 -1
  103. package/dist/preview/{chunk.MH46V556.js → chunk.M7KXQGQL.js} +1 -1
  104. package/dist/preview/{chunk.LY5CY7GE.js → chunk.MAKCZ6B6.js} +1 -1
  105. package/dist/preview/{chunk.5THLLSS4.js → chunk.MJY4SLWA.js} +1 -1
  106. package/dist/preview/{chunk.J6KNEI5R.js → chunk.MSAYU25L.js} +1 -1
  107. package/dist/preview/chunk.MUSMNKE4.js +1 -0
  108. package/dist/preview/chunk.MW7R5G3C.js +1 -0
  109. package/dist/preview/chunk.N4ZKZ4GM.js +6 -0
  110. package/dist/preview/chunk.NAXOXBOF.js +1 -0
  111. package/dist/preview/{chunk.LGRQDILY.js → chunk.NKLPL7QD.js} +1 -1
  112. package/dist/preview/chunk.NKYWIGC7.js +3 -0
  113. package/dist/preview/{chunk.35E75QJ7.js → chunk.NRURQGXV.js} +1 -1
  114. package/dist/preview/chunk.NSOPYIT4.js +1 -0
  115. package/dist/preview/chunk.NXZL5CA2.js +1 -0
  116. package/dist/preview/chunk.NYLKG25K.js +4 -0
  117. package/dist/preview/{chunk.BU5PVRX7.js → chunk.O2OL6RQQ.js} +1 -1
  118. package/dist/preview/chunk.O5VFKVZS.js +1 -0
  119. package/dist/preview/chunk.OCXY5DCD.js +6 -0
  120. package/dist/preview/chunk.OHAO6KKH.js +1 -0
  121. package/dist/preview/{chunk.CXDGE5ZS.js → chunk.OWO3OV62.js} +1 -1
  122. package/dist/preview/chunk.P2EKKKK2.js +1 -0
  123. package/dist/preview/chunk.PSNMZBVS.js +1 -0
  124. package/dist/preview/{chunk.NKYYDFIX.js → chunk.PZ7KY6XH.js} +1 -1
  125. package/dist/preview/chunk.QAM76AXV.js +1 -0
  126. package/dist/preview/chunk.QDVGHI7R.js +1 -0
  127. package/dist/preview/{chunk.HJS3LTSR.js → chunk.QF5QB5YR.js} +1 -1
  128. package/dist/preview/chunk.QNP5OR3P.js +93 -0
  129. package/dist/preview/chunk.QRQ5WPZI.js +1 -0
  130. package/dist/preview/chunk.QWGWOEBZ.js +90 -0
  131. package/dist/preview/chunk.QXLJGHMC.js +23 -0
  132. package/dist/preview/{chunk.3RFAUIGT.js → chunk.QZQCQWQG.js} +1 -1
  133. package/dist/preview/chunk.R6JBA7UK.js +1 -0
  134. package/dist/preview/chunk.R7CRBRD4.js +1 -0
  135. package/dist/preview/chunk.RD2FSSLV.js +1 -0
  136. package/dist/preview/{chunk.CD6YWH6T.js → chunk.RG5G6YQD.js} +1 -1
  137. package/dist/preview/{chunk.T3KNLP7C.js → chunk.RJY7VJBH.js} +1 -1
  138. package/dist/preview/chunk.RR25BGWP.js +1 -0
  139. package/dist/preview/chunk.RSMCTI2N.js +1 -0
  140. package/dist/preview/{chunk.ZYNC73DJ.js → chunk.RSQ432QN.js} +1 -1
  141. package/dist/preview/chunk.SFBHPYRD.js +1 -0
  142. package/dist/preview/{chunk.FOSY7MZF.js → chunk.SJQPTDAT.js} +1 -1
  143. package/dist/preview/{chunk.TUCSUZNO.js → chunk.SNHKYH72.js} +1 -1
  144. package/dist/preview/chunk.SO6NT5K7.js +1 -0
  145. package/dist/preview/{chunk.FDWRH5P2.js → chunk.STPA7HBK.js} +3 -3
  146. package/dist/preview/{chunk.R2TSTDS3.js → chunk.SY5ID44D.js} +1 -1
  147. package/dist/preview/chunk.T27QKVKP.js +1 -0
  148. package/dist/preview/{chunk.FXG5AJF6.js → chunk.T2OUHRAA.js} +1 -1
  149. package/dist/preview/chunk.T3WCRS6M.js +1 -0
  150. package/dist/preview/chunk.TI5FR2QQ.js +1 -0
  151. package/dist/preview/{chunk.N2FNHRI2.js → chunk.TTSGCNPT.js} +1 -1
  152. package/dist/preview/{chunk.P6TZGR3A.js → chunk.TXZQEJ5T.js} +1 -1
  153. package/dist/preview/chunk.U6QXLNHF.js +15 -0
  154. package/dist/preview/{chunk.DICM56FT.js → chunk.UDHPMVC4.js} +1 -1
  155. package/dist/preview/{chunk.ZMWAZACO.js → chunk.UGQYMN4J.js} +1 -1
  156. package/dist/preview/chunk.UJPX3BUV.js +1 -0
  157. package/dist/preview/{chunk.CPYBJNHP.js → chunk.UQIPEMJ5.js} +1 -1
  158. package/dist/preview/{chunk.XSWR5LI4.js → chunk.URQTF5SY.js} +1 -1
  159. package/dist/preview/{chunk.7IGD2K4M.js → chunk.UW52CMGJ.js} +1 -1
  160. package/dist/preview/chunk.UWS4RMM3.js +1 -0
  161. package/dist/preview/{chunk.KHAVEYT7.js → chunk.V7H4BUEB.js} +1 -1
  162. package/dist/preview/{chunk.KHRS2SKB.js → chunk.VBHV4TLG.js} +1 -1
  163. package/dist/preview/chunk.VBLQJVQ5.js +1 -0
  164. package/dist/preview/{chunk.SPCAMQJE.js → chunk.WALVW3KJ.js} +1 -1
  165. package/dist/preview/{chunk.6RZHKQP3.js → chunk.WEMUKZKH.js} +1 -1
  166. package/dist/preview/chunk.X226YATK.js +2 -0
  167. package/dist/preview/{chunk.IJ3YDBWI.js → chunk.XFLGSUYO.js} +1 -1
  168. package/dist/preview/{chunk.ZTN7BS5O.js → chunk.XSWSBTUO.js} +1 -1
  169. package/dist/preview/{chunk.ZJFXM3LE.js → chunk.YCD4JSXD.js} +1 -1
  170. package/dist/preview/{chunk.QSDBF7VL.js → chunk.YZPESGCP.js} +1 -1
  171. package/dist/preview/{chunk.QO5RXOCS.js → chunk.Z27NSSYL.js} +2 -2
  172. package/dist/preview/chunk.Z2XUVJAL.js +1 -0
  173. package/dist/preview/{chunk.S3EEY7T3.js → chunk.Z3O2VZAJ.js} +1 -1
  174. package/dist/preview/chunk.Z4TY44CD.js +1 -0
  175. package/dist/preview/{chunk.O2W5JTWA.js → chunk.ZAPS4J6G.js} +1 -1
  176. package/dist/preview/{chunk.F2TWV4TX.js → chunk.ZAQ4IDX6.js} +1 -1
  177. package/dist/preview/chunk.ZEZUKRC6.js +5 -0
  178. package/dist/preview/{chunk.PTQPS2FJ.js → chunk.ZG5VGP5U.js} +1 -1
  179. package/dist/preview/chunk.ZRBGYXAO.js +6 -0
  180. package/dist/preview/index.html +57 -55
  181. package/dist/preview/page.js +2 -2
  182. package/dist/preview/splash.js +17 -14
  183. package/package.json +6 -6
  184. package/dist/preview/chunk.2P34ML3O.js +0 -111
  185. package/dist/preview/chunk.2UW5CRHF.js +0 -1
  186. package/dist/preview/chunk.2YMO7ZVX.js +0 -1
  187. package/dist/preview/chunk.33ULA3CG.js +0 -1
  188. package/dist/preview/chunk.3CJLAJXP.js +0 -25
  189. package/dist/preview/chunk.3IJSB5ET.js +0 -1
  190. package/dist/preview/chunk.3KO35VN4.js +0 -1
  191. package/dist/preview/chunk.3L37FY3G.js +0 -4
  192. package/dist/preview/chunk.3WP66LB5.js +0 -1
  193. package/dist/preview/chunk.4GJ7F4SP.js +0 -35
  194. package/dist/preview/chunk.4IJTPV5X.js +0 -1
  195. package/dist/preview/chunk.4JFBLVXJ.js +0 -1
  196. package/dist/preview/chunk.4PCVQEVI.js +0 -1
  197. package/dist/preview/chunk.5FQSYMAE.js +0 -1
  198. package/dist/preview/chunk.5NCLZ4NZ.js +0 -1
  199. package/dist/preview/chunk.5YNLFOBJ.js +0 -5
  200. package/dist/preview/chunk.77XQEDT5.js +0 -1
  201. package/dist/preview/chunk.7HPQI5SY.js +0 -1
  202. package/dist/preview/chunk.A4VA3DU5.js +0 -1
  203. package/dist/preview/chunk.ABSY3UZF.js +0 -1
  204. package/dist/preview/chunk.ARHAD5IS.js +0 -1
  205. package/dist/preview/chunk.BOC2EOGB.js +0 -9
  206. package/dist/preview/chunk.BR6TINGU.js +0 -1
  207. package/dist/preview/chunk.CDEAAWPS.js +0 -1
  208. package/dist/preview/chunk.CXJJB3MK.js +0 -1
  209. package/dist/preview/chunk.CXLQPE4J.js +0 -1
  210. package/dist/preview/chunk.DA4RSHLW.js +0 -1
  211. package/dist/preview/chunk.DJMSXXP4.js +0 -90
  212. package/dist/preview/chunk.DJPNVXBQ.js +0 -6
  213. package/dist/preview/chunk.DJVHKBEI.js +0 -1
  214. package/dist/preview/chunk.DVSTLVIH.js +0 -15
  215. package/dist/preview/chunk.E5WJSTOV.js +0 -1
  216. package/dist/preview/chunk.FEGSYSA7.js +0 -1
  217. package/dist/preview/chunk.HJUXC5GM.js +0 -1
  218. package/dist/preview/chunk.HNMSYQRA.js +0 -1
  219. package/dist/preview/chunk.HWLRKOI3.js +0 -1
  220. package/dist/preview/chunk.IHUMKFYH.js +0 -10
  221. package/dist/preview/chunk.IQ54QTA5.js +0 -1
  222. package/dist/preview/chunk.IQC3GOXO.js +0 -1
  223. package/dist/preview/chunk.ISN2QTVL.js +0 -2
  224. package/dist/preview/chunk.J24YPQ5I.js +0 -5
  225. package/dist/preview/chunk.J545NAMY.js +0 -1
  226. package/dist/preview/chunk.K2HDEL7I.js +0 -1
  227. package/dist/preview/chunk.K3JARAWU.js +0 -1
  228. package/dist/preview/chunk.KROR65KD.js +0 -2
  229. package/dist/preview/chunk.KV7GZBJ6.js +0 -50
  230. package/dist/preview/chunk.L7NJLZWV.js +0 -1
  231. package/dist/preview/chunk.LON75VHP.js +0 -1
  232. package/dist/preview/chunk.LQWVJQ5X.js +0 -18
  233. package/dist/preview/chunk.M5W2RHC6.js +0 -1
  234. package/dist/preview/chunk.M6BTLH24.js +0 -1
  235. package/dist/preview/chunk.MAGKI4PD.js +0 -1
  236. package/dist/preview/chunk.MD36ZSM5.js +0 -74
  237. package/dist/preview/chunk.MFZJVHWP.js +0 -1
  238. package/dist/preview/chunk.MHTA4HYB.js +0 -19
  239. package/dist/preview/chunk.N2YM247R.js +0 -1
  240. package/dist/preview/chunk.N35SJWAM.js +0 -1
  241. package/dist/preview/chunk.NJSK3UO2.js +0 -6
  242. package/dist/preview/chunk.OHMHPTEW.js +0 -1
  243. package/dist/preview/chunk.OJGHDWI6.js +0 -1
  244. package/dist/preview/chunk.PV2I4UPH.js +0 -1
  245. package/dist/preview/chunk.QFQSSZN7.js +0 -1
  246. package/dist/preview/chunk.RSS6OHXG.js +0 -1
  247. package/dist/preview/chunk.SBCAYTMT.js +0 -1
  248. package/dist/preview/chunk.SMTGRCMG.js +0 -3
  249. package/dist/preview/chunk.TCZIZ2PU.js +0 -1
  250. package/dist/preview/chunk.U74PTRHJ.js +0 -1
  251. package/dist/preview/chunk.UAORKZLO.js +0 -1
  252. package/dist/preview/chunk.UDVTPI2W.js +0 -1
  253. package/dist/preview/chunk.UETLP5KC.js +0 -1
  254. package/dist/preview/chunk.UHI3X2YD.js +0 -1
  255. package/dist/preview/chunk.UL62ELNR.js +0 -1
  256. package/dist/preview/chunk.VRYSZYAD.js +0 -1
  257. package/dist/preview/chunk.VUZFLDOX.js +0 -1
  258. package/dist/preview/chunk.X2NGFOAF.js +0 -1
  259. package/dist/preview/chunk.XE762VL2.js +0 -2
  260. package/dist/preview/chunk.Y2RZ5B4U.js +0 -1
  261. package/dist/preview/chunk.YKMBXMZE.js +0 -1
  262. package/dist/preview/chunk.Z34KASY7.js +0 -1
  263. package/dist/preview/chunk.ZMGKWMID.js +0 -1
  264. package/dist/preview/chunk.ZT5YQSSP.js +0 -21
  265. package/dist/preview/chunk.ZZM75ZTN.js +0 -4
@@ -0,0 +1,3 @@
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{a as j,e as B}from"./chunk.6UQFV53C.js";import{t as I}from"./chunk.QNP5OR3P.js";import{G as J,La as M,Ua as R,W as b,Ya as $,ea as A,ga as H}from"./chunk.A5PSEU3W.js";import{a as L}from"./chunk.SDO3U72B.js";import{b as c}from"./chunk.AJZBJBMO.js";var t=c(J(),1);var S=c(b(),1),E=M(L(()=>(__graviewPreload(import.meta.url,["./chunk.25VJPUDH.js","./chunk.HJUZMOW2.js","./chunk.NAXOXBOF.js","./chunk.6W6XMLSF.js","./chunk.PZ7KY6XH.js","./chunk.WEMUKZKH.js","./chunk.T27QKVKP.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CY7FFKEZ.js")))),W=E.part((a,n)=>(0,S.jsx)(a.SuggestedCount,{...n}),{quiet:!0}),ro=E.part((a,n)=>(0,S.jsx)(a.SuggestedList,{...n}),{quiet:!0,as:"div"});var o=c(b(),1),K=I.part((a,n)=>(0,o.jsx)(a.InboxPane,{...n}),{what:"The inbox"}),Q=[],U=[],oo=a=>a>99?"99+":String(a);function to(a,n){let d=[a>0?`${a} waiting for you`:"",n>0?`${n===1?"1 change":`${n} changes`}`:""].filter(Boolean);return d.length>0?`Inbox \u2014 ${d.join(", ")}`:"Inbox"}function po({calls:a=Q,seat:n,remembers:d=!1}){let{store:C,principal:f,whileAway:V,notifications:m=U,onNotificationsSeen:y,ai:Y}=A(),_=H(),r=B({calls:a,seat:n,remembers:d}),N=j(),q=Y.off!==!0,p=(0,t.useMemo)(()=>f.id===void 0?[]:N.filter(e=>e.by.id===f.id||e.by.onBehalfOf?.id===f.id),[N,f.id]),F=(0,t.useMemo)(()=>C.log.all().some(e=>e.suggests!==void 0&&!e.withheld),[C,_]),h=(V?.tidied??0)>0,v=F||h,[G,z]=(0,t.useState)(0),g=m.filter(e=>!e.read),u=G+g.length,x=u+r.recent,i=$("inbox"),s=i.open,[l,P]=(0,t.useState)("activity"),w=(0,t.useRef)(!1);if(s&&!w.current){w.current=!0;let e=u>0||h?"for-you":r.has?"activity":p.length>0?"asks":"for-you";e!==l&&P(e)}s||(w.current=!1);let T=(0,t.useRef)("");(0,t.useEffect)(()=>{if(!s||l!=="for-you"||g.length===0||!y)return;let e=g.map(Z=>Z.id);T.current!==e.join(`
2
+ `)&&(T.current=e.join(`
3
+ `),y(e))},[s,l,g,y]);let D=(0,t.useCallback)(()=>i.setOpen(!1),[i]),X=(0,t.useCallback)(e=>z(e),[]);if(!(r.has||v||m.length>0||p.length>0))return null;let k=to(u,r.recent),O=()=>I.prefetch();return(0,o.jsxs)("div",{className:"graview-bar-inbox",style:{position:"relative"},children:[v?(0,o.jsx)(t.Suspense,{fallback:null,children:(0,o.jsx)(W,{onCount:X})}):null,(0,o.jsxs)("button",{type:"button",className:"graview-bar-tool","data-testid":"inbox-button","data-count":x,...i.trigger,onClick:i.toggle,onPointerEnter:O,onFocus:O,"aria-label":r.running?`${k} \u2014 an agent is working`:k,title:r.running?"Inbox \u2014 an agent is working":k,...r.running?{"data-running":""}:{},children:[(0,o.jsx)(eo,{}),x>0?(0,o.jsx)("span",{className:"graview-bar-badge","data-testid":"inbox-count","aria-hidden":"true",children:oo(x)}):r.running?(0,o.jsx)("span",{className:"graview-bar-badge","data-dot":"","aria-hidden":"true"}):null]}),(!s||l!=="activity")&&n!==void 0?(0,o.jsx)("div",{hidden:!0,"data-testid":"agent-seat-seated",children:n}):null,s?(0,o.jsx)("section",{...i.pane,"aria-label":"Inbox","data-testid":"inbox","data-graview-offstage":"","data-tab":l,tabIndex:-1,style:{...R,width:"min(360px, calc(100vw - 16px))",maxHeight:"min(70vh, 520px)",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",padding:0,borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",outline:"none"},children:(0,o.jsx)(t.Suspense,{fallback:null,children:(0,o.jsx)(K,{tab:l,choose:P,asksOn:q,counts:{"for-you":u,activity:r.recent,asks:p.length},notifications:m,asks:p,tray:v,waits:u>0||h,activityHas:r.has,calls:a,remembers:d,close:D,...n!==void 0?{seat:n}:{}})})}):null]})}function eo(){return(0,o.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",style:{flex:"0 0 auto"},children:[(0,o.jsx)("path",{d:"M4 11.25 V7.25 a4 4 0 0 1 8 0 V11.25 L13.25 12.5 H2.75 Z",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M6.5 14 h3",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}export{ro as a,po as b};
@@ -1 +1 @@
1
- import{Yc as g}from"./chunk.J24YPQ5I.js";function b(){let t=new Uint8Array(16);return globalThis.crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}function k(t,e){if(!t)return;let i={..."filter"in e&&e.filter?{filter:e.filter}:{},...e.section?{section:e.section}:{}};"record"in e?t.record(e.record,i):"list"in e?t.list(e.list,i):t.place(e.place,i)}function w(t,e){if(!t?.href)return;let i={..."filter"in e&&e.filter?{filter:e.filter}:{},...e.section?{section:e.section}:{}};return t.href("record"in e?{record:e.record}:"list"in e?{list:e.list}:{place:e.place},i)}var v=[["accent","--graview-accent"],["ground","--graview-ground"],["panel","--graview-panel"],["ink","--graview-ink"],["inkMuted","--graview-ink-muted"],["edge","--graview-edge"],["fontBody","--graview-font-body"],["fontDisplay","--graview-font-display"],["fontMono","--graview-font-mono"],["radius","--graview-radius"]];function B(t){let e=t.ownerDocument.defaultView,i=e.getComputedStyle(t),s=t.closest("[data-graview-scheme]")?.getAttribute("data-graview-scheme"),d={scheme:s==="dark"||s==="light"?s:/\bdark\b/.test(i.colorScheme??"")?"dark":/\blight\b/.test(i.colorScheme??"")?"light":e.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"};for(let[l,u]of v)d[l]=i.getPropertyValue(u).trim();return d}function R(t,e){let i=t.defaultView;if(!i||typeof i.MutationObserver!="function")return()=>{};let s=new i.MutationObserver(e);s.observe(t.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-graview-scheme","data-theme"]});let o=i.matchMedia?.("(prefers-color-scheme: dark)");return o?.addEventListener?.("change",e),()=>{s.disconnect(),o?.removeEventListener?.("change",e)}}function T(t,e,i){let s=e?.(),o=t(),d=s?.logo,l=i.url(typeof d=="string"||d===void 0?d:o.scheme==="dark"&&d.dark?d.dark:d.light);return{...o,...s?.name?{name:s.name}:{},...l?{logo:l}:{}}}function x(t,e,i){let s,o,d=n=>{n?.startsWith("blob:")&&t.URL.revokeObjectURL(n)},l=async n=>{if(n.startsWith("<"))return g(n)===null?new t.Blob([n],{type:"image/svg+xml"}):void 0;if(/\\|%2e/i.test(n)||n.split(/[?#]/)[0].split("/").some(m=>m==="."||m===".."))return;let r=new t.URL(n,t.document.baseURI);if(r.origin!==t.location.origin||!/^https?:$/.test(r.protocol))return;let a=await t.fetch(r.href,{credentials:"same-origin"}),c=(a.headers.get("content-type")??"").split(";")[0].trim();return a.ok&&c.startsWith("image/")?new t.Blob([await a.arrayBuffer()],{type:c}):void 0},u=n=>new Promise(r=>{let a=new t.Image;a.onload=()=>r(!0),a.onerror=()=>r(!1),t.setTimeout(()=>r(!1),2e3),a.src=n}),p=n=>new Promise((r,a)=>{let c=new t.FileReader;c.onload=()=>r(String(c.result)),c.onerror=a,c.readAsDataURL(n)}),h=async n=>{if(/^data:image\//i.test(n))return n;let r=await l(n);if(!(!r||s!==n)){if(i==="blob"){let a=t.URL.createObjectURL(r);if(await u(a))return a;t.URL.revokeObjectURL(a)}return p(r)}},f=(n,r)=>{if(s!==n)return d(r);r!==o&&(d(o),o=r,e())};return{url(n){let r=n?.trim()||void 0;return r!==s&&(s=r,r?h(r).then(a=>f(r,a),()=>f(r,void 0)):(d(o),o=void 0)),o},dispose(){s=void 0,d(o),o=void 0}}}export{b as a,k as b,w as c,B as d,R as e,T as f,x as g};
1
+ import{Zc as g}from"./chunk.ZEZUKRC6.js";function b(){let t=new Uint8Array(16);return globalThis.crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}function k(t,e){if(!t)return;let i={..."filter"in e&&e.filter?{filter:e.filter}:{},...e.section?{section:e.section}:{}};"record"in e?t.record(e.record,i):"list"in e?t.list(e.list,i):t.place(e.place,i)}function w(t,e){if(!t?.href)return;let i={..."filter"in e&&e.filter?{filter:e.filter}:{},...e.section?{section:e.section}:{}};return t.href("record"in e?{record:e.record}:"list"in e?{list:e.list}:{place:e.place},i)}var v=[["accent","--graview-accent"],["ground","--graview-ground"],["panel","--graview-panel"],["ink","--graview-ink"],["inkMuted","--graview-ink-muted"],["edge","--graview-edge"],["fontBody","--graview-font-body"],["fontDisplay","--graview-font-display"],["fontMono","--graview-font-mono"],["radius","--graview-radius"]];function B(t){let e=t.ownerDocument.defaultView,i=e.getComputedStyle(t),s=t.closest("[data-graview-scheme]")?.getAttribute("data-graview-scheme"),d={scheme:s==="dark"||s==="light"?s:/\bdark\b/.test(i.colorScheme??"")?"dark":/\blight\b/.test(i.colorScheme??"")?"light":e.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"};for(let[l,u]of v)d[l]=i.getPropertyValue(u).trim();return d}function R(t,e){let i=t.defaultView;if(!i||typeof i.MutationObserver!="function")return()=>{};let s=new i.MutationObserver(e);s.observe(t.documentElement,{attributes:!0,subtree:!0,attributeFilter:["data-graview-scheme","data-theme"]});let o=i.matchMedia?.("(prefers-color-scheme: dark)");return o?.addEventListener?.("change",e),()=>{s.disconnect(),o?.removeEventListener?.("change",e)}}function T(t,e,i){let s=e?.(),o=t(),d=s?.logo,l=i.url(typeof d=="string"||d===void 0?d:o.scheme==="dark"&&d.dark?d.dark:d.light);return{...o,...s?.name?{name:s.name}:{},...l?{logo:l}:{}}}function x(t,e,i){let s,o,d=n=>{n?.startsWith("blob:")&&t.URL.revokeObjectURL(n)},l=async n=>{if(n.startsWith("<"))return g(n)===null?new t.Blob([n],{type:"image/svg+xml"}):void 0;if(/\\|%2e/i.test(n)||n.split(/[?#]/)[0].split("/").some(m=>m==="."||m===".."))return;let r=new t.URL(n,t.document.baseURI);if(r.origin!==t.location.origin||!/^https?:$/.test(r.protocol))return;let a=await t.fetch(r.href,{credentials:"same-origin"}),c=(a.headers.get("content-type")??"").split(";")[0].trim();return a.ok&&c.startsWith("image/")?new t.Blob([await a.arrayBuffer()],{type:c}):void 0},u=n=>new Promise(r=>{let a=new t.Image;a.onload=()=>r(!0),a.onerror=()=>r(!1),t.setTimeout(()=>r(!1),2e3),a.src=n}),p=n=>new Promise((r,a)=>{let c=new t.FileReader;c.onload=()=>r(String(c.result)),c.onerror=a,c.readAsDataURL(n)}),h=async n=>{if(/^data:image\//i.test(n))return n;let r=await l(n);if(!(!r||s!==n)){if(i==="blob"){let a=t.URL.createObjectURL(r);if(await u(a))return a;t.URL.revokeObjectURL(a)}return p(r)}},f=(n,r)=>{if(s!==n)return d(r);r!==o&&(d(o),o=r,e())};return{url(n){let r=n?.trim()||void 0;return r!==s&&(s=r,r?h(r).then(a=>f(r,a),()=>f(r,void 0)):(d(o),o=void 0)),o},dispose(){s=void 0,d(o),o=void 0}}}export{b as a,k as b,w as c,B as d,R as e,T as f,x as g};
@@ -0,0 +1 @@
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{r as We}from"./chunk.LRNFE3UK.js";import{a as ae,b as Oe,f as Ne,i as ze}from"./chunk.SFBHPYRD.js";import{a as Le,e as Re,l as De}from"./chunk.ILJDLBPJ.js";import{b as $e,c as O,d as qe,e as Ee}from"./chunk.X226YATK.js";import"./chunk.BJUUSIQY.js";import{a as He,b as Ie,c as Pe}from"./chunk.MSAYU25L.js";import{a as Me}from"./chunk.QF5QB5YR.js";import"./chunk.EGPCVMDU.js";import"./chunk.M7KXQGQL.js";import"./chunk.XOZU4OFA.js";import"./chunk.H3EGBDW2.js";import"./chunk.6KJGRM7A.js";import"./chunk.SO6NT5K7.js";import"./chunk.MUSMNKE4.js";import"./chunk.SJQPTDAT.js";import"./chunk.JQ63N4MZ.js";import"./chunk.Z3O2VZAJ.js";import{e as Te,m as Ce}from"./chunk.QNP5OR3P.js";import"./chunk.4W57E7AX.js";import{G as Je,J as be,La as xe,W as Se,ea as Ae}from"./chunk.A5PSEU3W.js";import{a as ve}from"./chunk.SDO3U72B.js";import{eb as ke,oa as ye,td as we}from"./chunk.ZEZUKRC6.js";import"./chunk.FQLNBIQ5.js";import{b as ie}from"./chunk.AJZBJBMO.js";var s=ie(Je(),1);var r=ie(Se(),1),N=xe(ve(()=>(__graviewPreload(import.meta.url,["./chunk.X226YATK.js","./chunk.BJUUSIQY.js","./chunk.6KJGRM7A.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.CKDCTFLU.js")))),Xe=N.part((a,i)=>(0,r.jsx)(a.RateTelling,{...i}),{quiet:!0}),Ze=a=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>setTimeout(a,0)):setTimeout(a,0)},et=()=>`tl-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,tt=/^(yes|yep|yeah|sure|ok(ay)?|do it|go ahead|please do)\b/i,nt=/^(no|nope|don'?t|not now|never ?mind)\b/i;function it(a,i,o){let t=i.on==="list"||i.on==="lens"?i.kind:void 0;if(i.on==="selection")return i.ids;if(i.on!=="list"&&i.on!=="lens")return[];if(o==="pages"&&typeof document<"u"){let y=new Set;for(let u of document.querySelectorAll("main [data-graview-listed], main [data-graview-record], main [data-graview-pick]")){let m=u.getAttribute("data-graview-listed")??u.getAttribute("data-graview-record")??u.getAttribute("data-graview-pick"),b=m?a.graph.getNode(m):void 0;m&&b&&(t===void 0||b.kind===t)&&y.add(m)}if(y.size>0)return[...y]}return t?a.graph.allNodes().filter(y=>y.kind===t).map(y=>y.id):[]}var at=new Set(["show","go","to","open","the","a","an","me"]),Fe=a=>a.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,""),oe=(a,i)=>{let o=Fe(a);return i.every(t=>o.includes(t))},Ge=a=>a&&!/^.\p{Lu}/u.test(a)?`${a[0].toLowerCase()}${a.slice(1)}`:a,X={act:4,show:3,place:3,record:4},Ke=360,f=12;function $t({face:a,opening:i,close:o}){let t=Me(),{setMenuAt:y,aiHere:u,session:m,people:b,seats:E,onProposeChange:C,composeChange:$}=Ae(),[g,q]=(0,s.useState)({state:"offered"}),l=(0,s.useMemo)(()=>i.target??$e(i.pointed??{about:[]},e=>t.store.graph.has(e)),[i,t.store]),z=(0,s.useMemo)(()=>Re(t.store,l,t.places),[t.store,l,t.places]),[A,Q]=(0,s.useState)(""),[B,F]=(0,s.useState)(-1),[p,re]=(0,s.useState)(null),[se,ee]=(0,s.useState)(null),K=(0,s.useRef)(null),le=(0,s.useRef)(null),Y=(0,s.useRef)(null),j=(0,s.useId)(),I=(0,s.useRef)(!0),{ghost:de}=be(t.desk),[te,Qe]=(0,s.useState)(null),P=(0,s.useRef)(null),H=(0,s.useCallback)(e=>{let n=P.current;!n||!t.ai.told||(n.kept&&N.current?N.current.changeTelling(t.ai.told,n.id,e):n.queued={...n.queued,...e})},[t.ai.told]);(0,s.useEffect)(()=>{let e=t.ai.told;if(!e)return;let n=globalThis,d=()=>void N.load().then(w=>w.toldListed(e),()=>{});if(n.requestIdleCallback){let w=n.requestIdleCallback(d,{timeout:1500});return()=>n.cancelIdleCallback?.(w)}let T=setTimeout(d,200);return()=>clearTimeout(T)},[t.ai.told]),(0,s.useEffect)(()=>()=>{I.current=!1;let e=P.current,n=t.desk.get().ghost;e&&!(n&&n.ghost.interaction===e.interaction&&n.batch===void 0)&&H({outcome:"abandoned"});let d=t.desk.get().ghost;d?.onCard&&t.desk.setGhost({...d,onCard:!1})},[t.desk]);let ce=p!==null;(0,s.useEffect)(()=>{if(!ce)return;let e=O(l)[0]??(l.on==="list"?`kind:${l.kind}`:l.on==="lens"&&l.kind?`kind:${l.kind}`:null),n=t.principal,d=n.id?ke(n,{graph:t.store.graph,schema:t.store.schema,...E?{seats:E}:{},...b?{people:b}:{}}):void 0;return u({participant:`agent:graview-for-${n.id??"anyone"}:${m}`,kind:"agent",name:"Graview",...n.id?{onBehalfOf:n.id,...d?{onBehalfOfName:d}:{}}:{},over:e,robot:{at:e,mode:"thinking"}}),()=>u(null)},[ce]);let U=(0,s.useMemo)(()=>{let e=ae(t,l);return qe(t.store,l,{principal:t.principal,places:t.places,...e.acts?{acts:e.acts}:{}})},[t,l]),ue=(0,s.useMemo)(()=>{let e=O(l);if(e.length===0)return[];let n=new Set(U.candidates.flatMap(d=>d.type==="act"?[d.mutation]:[]));return He(t.store,e,{principal:t.principal,...e.length===1?{focus:e[0]}:{}}).affordances.filter(d=>!d.destructive&&n.has(d.mutation))},[t.store,t.principal,l,U]),V=(0,s.useCallback)(()=>{let e=i.returnTo,n=Be(K.current,l,a);o(),requestAnimationFrame(()=>{if(e?.isConnected&&!e.closest("[inert]"))return e.focus({preventScroll:!0});let d=(n&&n.tabIndex>=0?n:null)??document.querySelector("[data-graview-page-title]")??document.querySelector("main");d&&d.tabIndex<0&&!d.hasAttribute("tabindex")&&d.setAttribute("tabindex","-1"),d?.focus({preventScroll:!0})})},[i.returnTo,l,a,o]),pe=(0,s.useCallback)(e=>{if(e.open.length>0){let n=K.current?.getBoundingClientRect();o(),y({x:n?.left??0,y:n?.top??0,on:e.args.id??O(l)[0],about:O(l)});return}try{Pe(t.store,e,{},{pressed:t.principal?{author:t.principal}:{}}),Ie(t.store,e,{},{author:t.principal}),V()}catch(n){ee(n instanceof Error?n.message:String(n))}},[t.store,t.principal,o,V,y,l]),_=(0,s.useCallback)(async e=>{let n=e.trim();if(!n)return;let d=p?.result?.answer?{said:p.said,answer:p.result.answer,...p.result.reading?{reading:p.result.reading.which}:{}}:void 0,T=l.on==="lens"?t.places.find(M=>M.as===l.place)?.title:(l.on==="list",void 0);Q(""),F(-1),ee(null),re({said:n,result:null}),q({state:"offered"});let w=it(t.store,l,a),S=P.current;S&&H({outcome:"abandoned"});let c=Date.now(),k=t.ai.told?N.current??await Promise.race([N.load().catch(()=>{}),new Promise(M=>setTimeout(M,50))]):void 0,R=t.ai.told&&k?k.examplesHere(t.ai.told,t.store,t.principal,n,l):{examples:[],ids:[]},Ve=[...new Set([...S?[]:i.suggested?[i.suggested]:[],...R.ids])],v=await De(t.ai,{...ae(t,l,n),said:n,...d?{follows:d}:{},...w.length>0?{members:w}:{},...T?{where:T}:{},...R.examples.length>0?{examples:R.examples}:{}});t.desk.record(v.interaction),v.ghost&&v.ghost.proposals.length>0&&t.desk.setGhost({ghost:v.ghost,onCard:!0});let W;if(v.missing)try{let{planFor:M}=await (__graviewPreload(import.meta.url,["./chunk.X226YATK.js","./chunk.BJUUSIQY.js","./chunk.6KJGRM7A.js","./chunk.Z3O2VZAJ.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7ARRVNUR.js")),G=Date.now(),me=T??(v.reading&&v.reading.which==="held"&&l.on==="record"?v.reading.words.replace(/^the \d+ \S+ in /,""):void 0);W=await M(t,{said:n,missing:v.missing,members:v.reading?.records??w,host:C!==void 0,...$?{compose:$}:{},...me?{where:me}:{}}),t.desk.record({...v.interaction,stages:[...v.interaction.stages??[],{stage:"compose",ms:Date.now()-G}]})}catch{W={refused:`${v.missing.said} That change could not be made here.`}}I.current&&re({said:n,result:v,...W?{plan:W}:{}});let J=t.ai.told;if(!J)return;let _e=Date.now()-c;P.current?.stop?.();let ne={id:et(),conversation:S?.conversation??"",interaction:v.interaction.id};P.current={...ne,conversation:ne.conversation||ne.id};let D=P.current;Ze(()=>void N.load().then(M=>{let G=M.keepTelling(J,{...M.tellingDraftOf(t.store,{words:n,target:l,result:v,...W?{plan:W}:{},ms:_e,...S?{conversation:S.conversation,follows:S.id}:{},examples:Ve}),id:D.id,conversation:D.conversation},t.principal);G&&(D.kept=!0,D.queued&&M.changeTelling(J,G.id,D.queued),D.stop=M.watchTelling(t.desk,J,G),I.current&&P.current===D&&Qe(G))},()=>{}))},[p,t,l,a,C,$,i.suggested,H]),L=p?.plan&&"question"in p.plan?p.plan:void 0,ge=(0,s.useCallback)(async()=>{let e=L?.proposal;if(!(!e||!C||g.state!=="offered")){q({state:"applying"});try{let n=await C(e);if(!I.current)return;H({outcome:n==="declined"?"declined":"accepted"}),q(n==="declined"?{state:"declined",said:"The host declined this change to the app."}:{state:"applied",...typeof n=="object"?{undo:n.undo,...n.note?{note:n.note}:{}}:{}})}catch(n){I.current&&q({state:"declined",said:n instanceof Error?n.message:String(n)})}}},[L,C,g,H]),fe=(0,s.useCallback)(()=>{H({outcome:"declined"}),q({state:"declined",said:"Left as it is."})},[H]),Ye=(0,s.useCallback)(async()=>{g.state!=="applied"||!g.undo||(await g.undo(),H({outcome:"undone"}),I.current&&q({state:"undone"}))},[g,H]),he=(0,s.useRef)(i.asked);(0,s.useEffect)(()=>{let e=he.current;he.current=void 0,e&&_(e)},[]);let x=(0,s.useMemo)(()=>{let e=A.trim();if(!e&&p)return[];let n=Fe(e).split(/\s+/).filter(c=>c&&!at.has(c)),d=/^show\b/i.test(e),T=/^(go|open)\b/i.test(e),w=[];if(!d&&!T)for(let c of ue.filter(k=>oe(k.label,n)).slice(0,X.act))w.push({id:`act:${c.id}`,kind:"act",label:c.label,hint:c.open.length>0?"asks more":"do it",take:()=>pe(c)});let S=e&&!/\?\s*$/.test(e)?Ee(t.store,l,{principal:t.principal,places:t.places,said:e}):[];for(let c of S)w.push({id:`place:${c.place}`,kind:"place",label:c.fit==="full"?`Open ${c.title}`:`Open and adjust ${c.title}`,hint:c.fit==="full"?"a view you have":"adjust it",take:()=>{o(),t.goTo.place(c.place),c.fit==="partial"&&Te(t.desk,{target:{on:"lens",place:c.place,...c.kind?{kind:c.kind}:{}},asked:e})}});if(!T){let c=U.candidates.filter(k=>k.type==="panel");for(let k of c.filter(R=>oe(`show ${R.label}`,n)).slice(0,X.show))w.push({id:k.id,kind:"show",label:`Show ${Ge(k.label)}`,hint:"a panel",take:()=>{o(),Oe(t,{title:k.label,recipe:{...k.panel,title:k.label}})}})}if(!d){for(let c of t.places.filter(k=>oe(k.title,n)&&!S.some(R=>R.place===k.as)).slice(0,X.place))w.push({id:`place:${c.as}`,kind:"place",label:`Go to ${c.title}`,take:()=>(o(),t.goTo.place(c.as))});if(n.length>0){let c=We(t.store,e.replace(/^(go to|open)\s+/i,""),{principal:t.principal,from:O(l),limit:X.record}).hits;for(let k of c)k.about==="node"&&w.push({id:`record:${k.id}`,kind:"record",label:k.label,hint:ye(t.store.schema,k.kind),take:()=>(o(),t.goTo.record(k.id))})}}return e&&w.push({id:"ask",kind:"ask",label:e,take:()=>void _(e)}),w},[A,ue,U,t,l,pe,_,o,p]);(0,s.useEffect)(()=>F(A.trim()?0:-1),[A]),(0,s.useLayoutEffect)(()=>{let e=K.current;if(!e)return;if(typeof e.showPopover=="function")try{e.showPopover()}catch{}le.current?.focus({preventScroll:!0});let n=0,d=null,T=i.from;T&&rt(e,T);let w=()=>{let S=Be(e,l,a);T?st(e,S):ot(e,S);let c=Y.current?S:null;d!==c&&(d?.removeAttribute("data-graview-ai-thinking"),c?.setAttribute("data-graview-ai-thinking",""),d=c),Y.current&&lt(Y.current,c),n=requestAnimationFrame(w)};return w(),()=>{cancelAnimationFrame(n),d?.removeAttribute("data-graview-ai-thinking")}},[l,a,i.from]),(0,s.useEffect)(()=>{if(p)return;let e=n=>{n.target instanceof Node&&K.current?.contains(n.target)||o()};return document.addEventListener("pointerdown",e,!0),()=>document.removeEventListener("pointerdown",e,!0)},[p,o]);let je=e=>{if(e.key==="ArrowDown"&&x.length>0)e.preventDefault(),F(n=>Math.min(x.length-1,n+1));else if(e.key==="ArrowUp"&&x.length>0)e.preventDefault(),F(n=>Math.max(0,n-1));else if(e.key==="Enter"){e.preventDefault();let n=x[B];n?n.take():L?.proposal&&g.state==="offered"&&tt.test(A.trim())?(Q(""),ge()):L&&g.state==="offered"&&nt.test(A.trim())?(Q(""),fe()):A.trim()&&_(A)}},h=p?.result??null,Ue=x[B];return(0,r.jsxs)("section",{ref:K,popover:"manual",role:"region","aria-label":p?`Answer about ${z}`:`Tell Graview about ${z}`,"data-testid":"quick-ask","data-quick-ask":p?"answer":"bar","data-quick-ask-face":a,"data-graview-offstage":"","data-graview-overlay":"",onKeyDown:e=>{e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),V())},onMouseDown:e=>e.stopPropagation(),style:pt,children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8},children:[(0,r.jsxs)("p",{"data-testid":"quick-ask-about",style:{margin:0,flex:"1 1 auto",minWidth:0,fontSize:"0.75rem",color:"var(--graview-ink-muted)",overflowWrap:"anywhere"},children:["About ",z]}),(0,r.jsx)("button",{type:"button","data-testid":"quick-ask-close","aria-label":"Close",title:"Close",onClick:V,style:gt,children:(0,r.jsx)("span",{"aria-hidden":"true",children:"\u2715"})})]}),p?(0,r.jsxs)("div",{"data-testid":"quick-answer",style:{display:"grid",gap:8},children:[(0,r.jsxs)("p",{"data-testid":"quick-answer-asked",style:{margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)",fontStyle:"italic",overflowWrap:"anywhere"},children:["\u201C",p.said,"\u201D"]}),(0,r.jsx)("p",{"data-testid":"quick-answer-text","aria-live":"polite",style:{margin:0,fontSize:"0.9375rem",lineHeight:1.45,color:h?.interaction.outcome==="failed"?"var(--graview-warn)":"var(--graview-ink)",overflowWrap:"anywhere"},children:h===null?"Thinking\u2026":h.interaction.outcome==="failed"?h.interaction.failed??"The AI could not answer that here.":Le(p.plan?"question"in p.plan?p.plan.question:p.plan.refused:h.answer,h.ghost&&h.ghost.proposals.length>0?"Here is what I would change.":h.offers.length>0?"These may help.":void 0)}),h?.taken?(0,r.jsxs)("p",{"data-testid":"quick-ask-taken",style:{margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Taking \u201C",h.taken.said,"\u201D as ",h.taken.as,"."]}):null,h?.reading?.close?(0,r.jsxs)("p",{"data-testid":"quick-ask-reading",style:{margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Taking this as ",h.reading.words,"."]}):null,L?(0,r.jsxs)("section",{"data-testid":"quick-ask-plan","data-plan-state":g.state,"aria-label":"What I would do",style:ut,children:[(0,r.jsx)("ol",{style:{margin:0,paddingInlineStart:18,display:"grid",gap:2},children:L.parts.map((e,n)=>(0,r.jsx)("li",{"data-plan-part":e.part,style:{fontStyle:g.state==="applied"?"normal":"italic"},children:e.said},n))}),L.proposal&&C?g.state==="offered"||g.state==="applying"?(0,r.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,r.jsx)("button",{type:"button","data-testid":"quick-ask-plan-yes",disabled:g.state==="applying",onClick:()=>void ge(),style:Z,children:"Yes"}),(0,r.jsx)("button",{type:"button","data-testid":"quick-ask-plan-no",disabled:g.state==="applying",onClick:fe,style:Z,children:"No"})]}):g.state==="applied"?(0,r.jsxs)("div",{role:"status",style:{display:"flex",gap:6,alignItems:"center"},children:[(0,r.jsxs)("span",{"data-testid":"quick-ask-plan-done",children:["Done, as one change.",g.note?` ${g.note}`:""]}),g.undo?(0,r.jsx)("button",{type:"button","data-testid":"quick-ask-plan-undo",onClick:()=>void Ye(),style:Z,children:"Undo"}):null]}):(0,r.jsx)("p",{role:"status",style:{margin:0,color:"var(--graview-ink-muted)"},children:g.state==="undone"?"Taken back.":g.said}):null]}):null,h&&h.offers.length>0?(0,r.jsx)("ul",{"aria-label":"What acts on it",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexWrap:"wrap",gap:6},children:h.offers.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)("button",{type:"button","data-testid":"quick-answer-offer","data-ai-offer":e.id,"data-ai-offer-type":e.type,onClick:()=>{Ne(t,h,e,o,{onCard:e.type==="act"||e.type==="fill"}).then(n=>{n&&I.current&&ee(n)})},style:Z,children:e.type==="panel"?`Show ${Ge(e.label)}`:e.type==="place"?`Go to ${e.label}`:e.type==="act"||e.type==="fill"?`${e.label.replace(/[.?]$/,"")}?`:e.label})},e.id))}):null,de?.onCard&&de.ghost.interaction===h?.interaction.id?(0,r.jsx)(ze,{placement:"card"}):null,h&&te&&t.ai.told&&te.interaction===h.interaction.id?(0,r.jsx)(Xe,{told:t.ai.told,telling:te}):null]}):null,(0,r.jsxs)("div",{style:{display:"grid",gap:4},children:[(0,r.jsx)("input",{ref:le,type:"text",role:"combobox","data-testid":"quick-ask-input","aria-label":p?`Reply about ${z}`:`Tell Graview about ${z}, or go somewhere`,"aria-expanded":x.length>0,"aria-controls":j,"aria-autocomplete":"list",...Ue?{"aria-activedescendant":`${j}-${B}`}:{},autoComplete:"off",enterKeyHint:"go",placeholder:p?"Reply\u2026":"Tell Graview, or go to\u2026",value:A,readOnly:p!==null&&h===null,"aria-busy":p!==null&&h===null,onChange:e=>Q(e.target.value),onKeyDown:je,style:ft}),(0,r.jsx)("div",{id:j,role:"listbox","aria-label":A.trim()?`What \u201C${A.trim()}\u201D finds here`:"What can be done here",hidden:x.length===0,style:{display:x.length===0?"none":"grid",gap:1,maxHeight:280,overflowY:"auto"},children:x.map((e,n)=>(0,r.jsx)("div",{id:`${j}-${n}`,role:"option","aria-selected":n===B,"data-testid":"quick-ask-option","data-quick-ask-kind":e.kind,"data-quick-ask-row":e.id,onMouseEnter:()=>F(n),onMouseDown:d=>d.preventDefault(),onClick:e.take,style:{...ht,background:n===B?"var(--graview-panel-muted)":"transparent",...e.kind==="ask"?{borderTop:"1px solid var(--graview-edge)",marginTop:2}:{}},children:e.kind==="ask"?(0,r.jsxs)("span",{children:["Tell Graview: ",(0,r.jsxs)("span",{style:{fontWeight:600},children:["\u2018",e.label,"\u2019"]})]}):(0,r.jsxs)("span",{children:[e.label,e.hint?(0,r.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",e.hint]}):null]})},e.id))})]}),se?(0,r.jsx)("p",{role:"alert","data-testid":"quick-ask-refused",style:{margin:0,fontSize:"0.8125rem",color:"var(--graview-warn)"},children:se}):null,(0,r.jsx)("span",{style:Ce,"aria-live":"polite",children:x.length>0&&A.trim()?`${x.length} ${x.length===1?"way":"ways"} to go on`:""}),p!==null&&h===null?(0,r.jsxs)("span",{ref:Y,role:"status","data-testid":"ai-thinking-mark",style:dt,children:[(0,r.jsx)("style",{children:"@keyframes graview-thinking{from{opacity:.35}to{opacity:1}}@media (prefers-reduced-motion:reduce){[data-testid=ai-thinking-mark]>span{animation:none!important}}"}),(0,r.jsx)("span",{"aria-hidden":"true",style:ct}),(0,r.jsxs)("span",{children:["Thinking about ",z,"\u2026"]})]}):null]})}function Be(a,i,o){let t=a?.closest("[data-graview-embed]")??document,y=i.on==="list"?[`aggregate:${i.kind}`,`kind:${i.kind}`]:i.on==="lens"&&i.kind?[`aggregate:${i.kind}`]:O(i);for(let u of y)for(let m of t.querySelectorAll(`[data-graview-view="${CSS.escape(u)}"], [data-graview-pick="${CSS.escape(u)}"], [data-graview-record="${CSS.escape(u)}"], [data-graview-listed="${CSS.escape(u)}"]`)){if(a?.contains(m))continue;let b=m.getBoundingClientRect();if(b.width>0&&b.height>0)return m}return o==="pages"?t.querySelector("main [data-graview-page-title]")??t.querySelector("main h1"):null}function ot(a,i){let o={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},t=Math.min(Ke,o.width-2*f),y=a.getBoundingClientRect().height,u=i?.getBoundingClientRect(),m,b,E,C=l=>Math.max(f,Math.min(l,o.height-y-f));if(u&&u.width>0&&u.bottom>0&&u.top<o.height)if(u.right+f+t<=o.width-f)m=u.right+f,b=C(u.top),E="right";else if(u.left-f-t>=f)m=u.left-f-t,b=C(u.top),E="left";else{m=Math.max(f,Math.min(u.left,o.width-t-f));let l=u.bottom+f;b=l+y<=o.height-f?l:C(u.top-f-y),E=l+y<=o.height-f?"below":"above"}else m=(o.width-t)/2,b=C(72),E="top";let $=a.style,g={left:`${Math.round(m)}px`,top:`${Math.round(b)}px`,width:`${Math.round(t)}px`};$.left!==g.left&&($.left=g.left),$.top!==g.top&&($.top=g.top),$.width!==g.width&&($.width=g.width);let q=i?.getAttribute("data-graview-view")??i?.getAttribute("data-graview-pick")??i?.getAttribute("data-graview-record")??i?.getAttribute("data-graview-listed")??(i?"page":"");a.getAttribute("data-quick-ask-beside")!==q&&a.setAttribute("data-quick-ask-beside",q),a.getAttribute("data-quick-ask-side")!==E&&a.setAttribute("data-quick-ask-side",E)}function rt(a,i){let o={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},t=Math.min(Ke,o.width-2*f),y=i.left+t>o.width-f?Math.max(f,o.width-f-t):Math.max(f,i.left),u=240,m=i.top+u>o.height-f?Math.max(f,o.height-f-u):Math.max(f,i.top);a.style.left=`${Math.round(y)}px`,a.style.top=`${Math.round(m)}px`,a.style.width=`${Math.round(t)}px`,a.style.maxHeight=`${Math.round(o.height-m-f)}px`,a.setAttribute("data-quick-ask-side","where-the-menu-stood"),a.setAttribute("data-quick-ask-from",`${Math.round(i.left)},${Math.round(i.top)}`)}function st(a,i){let o=i?.getAttribute("data-graview-view")??i?.getAttribute("data-graview-pick")??i?.getAttribute("data-graview-record")??i?.getAttribute("data-graview-listed")??(i?"page":"");a.getAttribute("data-quick-ask-beside")!==o&&a.setAttribute("data-quick-ask-beside",o)}function lt(a,i){let o=i?.getBoundingClientRect(),t=i?.getAttribute("data-graview-view")??i?.getAttribute("data-graview-pick")??i?.getAttribute("data-graview-record")??i?.getAttribute("data-graview-listed")??(i?"page":"");if(a.getAttribute("data-thinking-on")!==t&&a.setAttribute("data-thinking-on",t),!o||o.width===0){a.style.visibility!=="hidden"&&(a.style.visibility="hidden");return}let y=a.getBoundingClientRect().width,u=`${Math.round(Math.max(f/2,o.right-y-6))}px`,m=`${Math.round(Math.max(f/2,o.top-10))}px`;a.style.left!==u&&(a.style.left=u),a.style.top!==m&&(a.style.top=m),a.style.visibility!=="visible"&&(a.style.visibility="visible")}var dt={position:"fixed",visibility:"hidden",display:"inline-flex",alignItems:"center",gap:6,padding:"2px 8px",borderRadius:999,fontSize:"0.75rem",lineHeight:1.4,whiteSpace:"nowrap",color:"var(--graview-ink)",background:"var(--graview-float)",border:"1px dashed var(--graview-accent)",boxShadow:"var(--graview-lift-low)",pointerEvents:"none"},ct={width:7,height:7,borderRadius:999,background:"var(--graview-accent)",animation:"graview-thinking 1s ease-in-out infinite alternate"},ut={display:"grid",gap:8,padding:10,borderRadius:10,border:"1px dashed var(--graview-accent)",fontSize:"0.875rem"},pt={position:"fixed",inset:"auto",height:"auto",margin:0,zIndex:we("popover"),boxSizing:"border-box",display:"grid",gap:10,padding:12,borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)",maxHeight:"calc(100dvh - 24px)",overflowY:"auto",fontSize:"0.875rem"},gt={display:"inline-grid",placeItems:"center",width:28,height:28,padding:0,font:"inherit",fontSize:"0.875rem",lineHeight:1,color:"var(--graview-ink-muted)",background:"transparent",border:"1px solid transparent",borderRadius:6,boxShadow:"none",cursor:"pointer"},ft={boxSizing:"border-box",width:"100%",height:36,padding:"0 10px",font:"inherit",fontSize:"max(1rem,16px)",color:"var(--graview-ink)",background:"var(--graview-panel)",border:"1px solid var(--graview-edge)",borderRadius:8},ht={display:"flex",alignItems:"center",minHeight:30,padding:"4px 8px",borderRadius:6,cursor:"pointer",overflowWrap:"anywhere"},Z={display:"inline-flex",alignItems:"center",minHeight:30,padding:"2px 10px",font:"inherit",fontSize:"0.8125rem",borderRadius:8};export{$t as QuickAskCard};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk.STPA7HBK.js";import"./chunk.6NG76MDA.js";import"./chunk.35KMZHB7.js";import"./chunk.DEKRFTRN.js";import"./chunk.BKYZSV2Y.js";import"./chunk.IAEGJDF3.js";import"./chunk.YZPESGCP.js";import"./chunk.SY5ID44D.js";import"./chunk.GVT4UUQA.js";import"./chunk.5R744JGZ.js";import"./chunk.O2OL6RQQ.js";import"./chunk.J6HF7IRQ.js";import"./chunk.LRNFE3UK.js";import"./chunk.HJCQ6I3S.js";import"./chunk.YCD4JSXD.js";import"./chunk.ZG5VGP5U.js";import"./chunk.EP6Q32WT.js";import"./chunk.QAM76AXV.js";import"./chunk.Z27NSSYL.js";import"./chunk.WEMUKZKH.js";import"./chunk.T27QKVKP.js";import"./chunk.URQTF5SY.js";import"./chunk.BIDL7GQD.js";import"./chunk.LP2ZMAT2.js";import"./chunk.MSAYU25L.js";import"./chunk.EGPCVMDU.js";import"./chunk.H3EGBDW2.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.6SJEZWH3.js";import"./chunk.6N4PE3U5.js";import"./chunk.B7KZBT27.js";import"./chunk.WVUJXDXZ.js";import"./chunk.DWM7AR5Y.js";import"./chunk.6KJGRM7A.js";import"./chunk.WALVW3KJ.js";import"./chunk.SNHKYH72.js";import"./chunk.UGQYMN4J.js";import"./chunk.RG5G6YQD.js";import"./chunk.MIE4TJRW.js";import"./chunk.QRQ5WPZI.js";import"./chunk.RD2FSSLV.js";import"./chunk.37RFCHSS.js";import"./chunk.SO6NT5K7.js";import"./chunk.MUSMNKE4.js";import"./chunk.SJQPTDAT.js";import"./chunk.JQ63N4MZ.js";import"./chunk.Z3O2VZAJ.js";import"./chunk.QNP5OR3P.js";import"./chunk.4W57E7AX.js";import"./chunk.A5PSEU3W.js";import"./chunk.SDO3U72B.js";import"./chunk.ZEZUKRC6.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
@@ -0,0 +1,4 @@
1
+ var j={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},L=["all","display","position","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","width","height","min-width","min-height","max-width","max-height","inline-size","block-size","min-inline-size","min-block-size","max-inline-size","max-block-size","margin","margin-top","margin-right","margin-bottom","margin-left","margin-block","margin-inline","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end","padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","box-sizing","overflow","overflow-x","overflow-y","overflow-wrap","float","clear","z-index","aspect-ratio","object-fit","object-position","vertical-align","isolation","contain","container","container-type","container-name","content-visibility","flex","flex-direction","flex-wrap","flex-flow","flex-grow","flex-shrink","flex-basis","order","grid","grid-template","grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","grid-area","grid-column","grid-row","grid-column-start","grid-column-end","grid-row-start","grid-row-end","gap","row-gap","column-gap","align-items","align-content","align-self","justify-items","justify-content","justify-self","place-items","place-content","place-self","columns","column-count","column-width","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-fill","color","background","background-color","background-image","background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode","border","border-top","border-right","border-bottom","border-left","border-block","border-inline","border-block-start","border-block-end","border-inline-start","border-inline-end","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","border-collapse","border-spacing","outline","outline-width","outline-style","outline-color","outline-offset","box-shadow","opacity","visibility","mix-blend-mode","filter","backdrop-filter","clip-path","accent-color","caret-color","color-scheme","appearance","-webkit-appearance","mask-image","mask-size","mask-position","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode","mask-type","-webkit-mask","-webkit-mask-image","-webkit-mask-size","-webkit-mask-position","-webkit-mask-repeat","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-composite","font","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-variant-numeric","font-variant-caps","font-variant-ligatures","font-feature-settings","font-variation-settings","font-kerning","font-optical-sizing","font-size-adjust","font-synthesis","line-height","letter-spacing","word-spacing","text-align","text-align-last","text-indent","text-transform","text-decoration","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-underline-position","text-shadow","text-overflow","text-wrap","text-wrap-mode","text-wrap-style","white-space","white-space-collapse","word-break","line-break","hyphens","tab-size","direction","unicode-bidi","writing-mode","text-orientation","text-rendering","-webkit-font-smoothing","-webkit-line-clamp","-webkit-box-orient","line-clamp","-webkit-text-fill-color","-webkit-background-clip","-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","list-style","list-style-type","list-style-position","content","quotes","counter-reset","counter-increment","counter-set","table-layout","caption-side","empty-cells","transform","transform-origin","transform-box","transform-style","translate","rotate","scale","perspective","perspective-origin","backface-visibility","transition","transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-composition","will-change","animation-timeline","animation-range","animation-range-start","animation-range-end","scroll-timeline","scroll-timeline-name","scroll-timeline-axis","view-timeline","view-timeline-name","view-timeline-axis","view-timeline-inset","timeline-scope","cursor","pointer-events","user-select","-webkit-user-select","touch-action","resize","scroll-behavior","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-snap-type","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-padding","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-margin-block","scroll-margin-block-start","scroll-margin-block-end","scroll-margin-inline","scroll-margin-inline-start","scroll-margin-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","scroll-padding-block","scroll-padding-block-start","scroll-padding-block-end","scroll-padding-inline","scroll-padding-inline-start","scroll-padding-inline-end","scrollbar-width","scrollbar-color","scrollbar-gutter","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","stop-color","stop-opacity","clip-rule","marker","marker-start","marker-mid","marker-end","paint-order","vector-effect","shape-rendering","text-anchor","dominant-baseline","alignment-baseline","r","cx","cy","rx","ry","x","y","d","mask","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],F=["var","env","calc","min","max","clamp","round","mod","rem","abs","sign","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","rgb","rgba","hsl","hsla","hwb","lab","lch","oklab","oklch","color","color-mix","light-dark","linear-gradient","radial-gradient","conic-gradient","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","translate","translatex","translatey","translatez","translate3d","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","matrix","matrix3d","perspective","cubic-bezier","steps","linear","repeat","minmax","fit-content","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia","opacity","circle","ellipse","inset","polygon","path","xywh","rect","counter","counters","scroll","view"],U=["fill","stroke","clip-path","mask","marker","marker-start","marker-mid","marker-end","filter"],M=["media","supports","container","keyframes"],W={position:["static","relative","absolute","sticky"],all:[],appearance:["auto","none","menulist-button","textfield"],"-webkit-appearance":["auto","none","menulist-button","textfield"]},K=["host","host-context","slotted","part","backdrop","picker","view-transition","view-transition-group","view-transition-image-pair","view-transition-old","view-transition-new"],X=["-webkit-details-marker"],S=64e3;var p=n=>n>=48&&n<=57,Y=n=>p(n)||n>=65&&n<=70||n>=97&&n<=102,V=n=>n>=65&&n<=90||n>=97&&n<=122,A=n=>n>=128,v=n=>V(n)||A(n)||n===95,q=n=>v(n)||p(n)||n===45,G=n=>n===10,b=n=>n===10||n===9||n===32,ce=n=>n>=0&&n<=8||n===11||n>=14&&n<=31||n===127,y=-1;function ue(n){let i=[];for(let t=0;t<n.length;t+=1){let e=n.codePointAt(t);e>65535&&(t+=1),e===13?(n.charCodeAt(t+1)===10&&(t+=1),e=10):e===12?e=10:(e===0||e>=55296&&e<=57343)&&(e=65533),i.push(e)}return i}function Q(n){let i=ue(n),t=0,e=(a=0)=>t+a<i.length?i[t+a]:y,r=[],o=(a,l)=>a===92&&l!==10&&l!==y,s=(a,l,m)=>a===45?v(l)||l===45||o(l,m):v(a)?!0:o(a,l),u=(a,l,m)=>a===43||a===45?p(l)||l===46&&p(m):p(a===46?l:a),c=()=>{let a=e();if(t+=1,a===y)return 65533;if(Y(a)){let l=String.fromCodePoint(a);for(;l.length<6&&Y(e());)l+=String.fromCodePoint(e()),t+=1;b(e())&&(t+=1);let m=parseInt(l,16);return m===0||m>=55296&&m<=57343||m>1114111?65533:m}return a},d=()=>{let a="";for(;;){let l=e();if(q(l))a+=String.fromCodePoint(l),t+=1;else if(o(l,e(1)))t+=1,a+=String.fromCodePoint(c());else return a}},f=()=>{let a="";for((e()===43||e()===45)&&(a+=String.fromCodePoint(i[t++]));p(e());)a+=String.fromCodePoint(i[t++]);if(e()===46&&p(e(1)))for(a+=String.fromCodePoint(i[t++],i[t++]);p(e());)a+=String.fromCodePoint(i[t++]);if((e()===69||e()===101)&&(p(e(1))||(e(1)===43||e(1)===45)&&p(e(2))))for(a+=String.fromCodePoint(i[t++]),p(e())||(a+=String.fromCodePoint(i[t++]));p(e());)a+=String.fromCodePoint(i[t++]);return a},x=()=>{let a=f();return s(e(),e(1),e(2))?{type:"dimension",repr:a,unit:d()}:e()===37?(t+=1,{type:"percentage",repr:a}):{type:"number",repr:a}},g=()=>{for(;;){let a=e();if(t+=1,a===41||a===y)return;o(a,e())&&c()}},se=()=>{let a="";for(;b(e());)t+=1;for(;;){let l=e();if(t+=1,l===41)return{type:"url",value:a};if(l===y)return{type:"url",value:a};if(b(l)){for(;b(e());)t+=1;return e()===41||e()===y?(e()===41&&(t+=1),{type:"url",value:a}):(g(),{type:"bad-url"})}if(l===34||l===39||l===40||ce(l))return g(),{type:"bad-url"};if(l===92){if(o(l,e()))a+=String.fromCodePoint(c());else return g(),{type:"bad-url"};continue}a+=String.fromCodePoint(l)}},z=()=>{let a=d();if(a.toLowerCase()==="url"&&e()===40){for(t+=1;b(e())&&b(e(1));)t+=1;let l=b(e())?e(1):e();return l===34||l===39?{type:"function",value:a}:se()}return e()===40?(t+=1,{type:"function",value:a}):{type:"ident",value:a}},le=a=>{let l="";for(;;){let m=e();if(t+=1,m===a||m===y)return{type:"string",value:l};if(G(m))return t-=1,{type:"bad-string"};if(m===92){if(e()===y)continue;if(G(e())){t+=1;continue}l+=String.fromCodePoint(c());continue}l+=String.fromCodePoint(m)}};for(;;){for(;e()===47&&e(1)===42;){for(t+=2;e()!==y&&!(e()===42&&e(1)===47);)t+=1;e()!==y&&(t+=2)}let a=e();if(a===y)return r;if(b(a)){for(;b(e());)t+=1;r.push({type:"whitespace"});continue}switch(t+=1,a){case 34:case 39:r.push(le(a));continue;case 35:if(q(e())||o(e(),e(1))){let l=s(e(),e(1),e(2));r.push({type:"hash",value:d(),id:l})}else r.push({type:"delim",value:"#"});continue;case 40:r.push({type:"("});continue;case 41:r.push({type:")"});continue;case 43:case 46:u(a,e(),e(1))?(t-=1,r.push(x())):r.push({type:"delim",value:String.fromCodePoint(a)});continue;case 44:r.push({type:","});continue;case 45:u(a,e(),e(1))?(t-=1,r.push(x())):e()===45&&e(1)===62?(t+=2,r.push({type:"CDC"})):s(a,e(),e(1))?(t-=1,r.push(z())):r.push({type:"delim",value:"-"});continue;case 58:r.push({type:":"});continue;case 59:r.push({type:";"});continue;case 60:e()===33&&e(1)===45&&e(2)===45?(t+=3,r.push({type:"CDO"})):r.push({type:"delim",value:"<"});continue;case 64:s(e(),e(1),e(2))?r.push({type:"at-keyword",value:d()}):r.push({type:"delim",value:"@"});continue;case 91:r.push({type:"["});continue;case 92:o(a,e())?(t-=1,r.push(z())):r.push({type:"delim",value:"\\"});continue;case 93:r.push({type:"]"});continue;case 123:r.push({type:"{"});continue;case 125:r.push({type:"}"});continue;default:p(a)?(t-=1,r.push(x())):v(a)?(t-=1,r.push(z())):r.push({type:"delim",value:String.fromCodePoint(a)})}}}var ee={"{":"}","[":"]","(":")"},ne=32,D=class{constructor(i){this.tokens=i}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function te(n,i){let t=n.next();return t.type==="{"||t.type==="["||t.type==="("?{type:"block",open:t.type,value:H(n,ee[t.type],i+1)}:t.type==="function"?{type:"func",name:t.value,value:H(n,")",i+1)}:t}function H(n,i,t){let e=[];for(;;){let r=n.peek();if(!r)return e;if(r.type===i)return n.next(),e;if(t>ne){n.next(),e.push({type:"bad-string"});continue}e.push(te(n,t))}}function w(n,i){let t=[],e=0;for(;e<n.length;){let r=n[e];if(r.type==="whitespace"||i&&(r.type==="CDO"||r.type==="CDC")){e+=1;continue}if(r.type==="at-keyword"){let u=[];e+=1;let c;for(;e<n.length;){let d=n[e];if(e+=1,d.type===";")break;if(d.type==="block"&&d.open==="{"){c=d.value;break}u.push(d)}t.push({type:"at-rule",name:r.value,prelude:u,...c?{block:c}:{}});continue}let o=[],s;for(;e<n.length;){let u=n[e];if(e+=1,u.type==="block"&&u.open==="{"){s=u.value;break}o.push(u)}s&&t.push({type:"qualified",prelude:o,block:s})}return t}function I(n){let i=[],t=0;for(;t<n.length;){let e=n[t];if(e.type==="whitespace"||e.type===";"){t+=1;continue}if(e.type==="at-keyword"){let o=(()=>{for(let s=t+1;s<n.length;s+=1){let u=n[s];if(u.type===";"||u.type==="block"&&u.open==="{")return s+1}return n.length})();i.push(...w(n.slice(t,o),!1)),t=o;continue}if(e.type==="ident"){let o=t+1;for(;n[o]?.type==="whitespace";)o+=1;if(n[o]?.type===":"){let s=o+1;for(;s<n.length&&n[s].type!==";";)s+=1;let u=ie(e.value,n.slice(o+1,s));if(u.value.some(c=>c.type==="block"&&c.open==="{")){let c=n.findIndex((d,f)=>f>t&&d.type==="block"&&d.open==="{");i.push(...w(n.slice(t,c+1),!1)),t=c+1;continue}i.push(u),t=s+1;continue}}let r=t;for(;r<n.length&&!(n[r].type==="block"&&n[r].open==="{")&&n[r].type!==";";)r+=1;r<n.length&&n[r].type==="block"&&i.push(...w(n.slice(t,r+1),!1)),t=r+1}return i}function ie(n,i){let t=[...i];for(;t[0]?.type==="whitespace";)t.shift();for(;t.at(-1)?.type==="whitespace";)t.pop();let e=!1,o=t.length-1;if(t[o]?.type==="ident"&&t[o].value.toLowerCase()==="important"){for(o-=1;t[o]?.type==="whitespace";)o-=1;let s=t[o];if(s?.type==="delim"&&s.value==="!")for(e=!0,t.length=o;t.at(-1)?.type==="whitespace";)t.pop()}return{type:"declaration",name:n,value:t,important:e}}function N(n){let i=new D(Q(n)),t=[];for(;i.peek();)t.push(te(i,0));return t}function C(n){let i="",t=[...n].map(e=>e.codePointAt(0));return t.forEach((e,r)=>{e===0?i+="\uFFFD":e>=1&&e<=31||e===127||r===0&&p(e)||r===1&&p(e)&&t[0]===45?i+=`\\${e.toString(16)} `:r===0&&e===45&&t.length===1?i+="\\-":A(e)||e===45||e===95||p(e)||V(e)?i+=String.fromCodePoint(e):i+=`\\${String.fromCodePoint(e)}`}),i}function R(n){let i="";for(let t of n){let e=t.codePointAt(0);A(e)||e===45||e===95||p(e)||V(e)?i+=t:e>=1&&e<=31||e===127?i+=`\\${e.toString(16)} `:i+=`\\${t}`}return i}function E(n){let i='"';for(let t of n){let e=t.codePointAt(0);e===0?i+="\uFFFD":e>=1&&e<=31||e===127||e===60||e===62?i+=`\\${e.toString(16)} `:e===34||e===92?i+=`\\${t}`:i+=t}return`${i}"`}function de(n){let i=R(n);return/^[eE]([0-9]|[+-][0-9])/.test(n)?`\\${n.codePointAt(0).toString(16)} ${R(n.slice(1))}`:i}var Z=n=>{switch(n.type){case"ident":case"url":case"bad-url":case"number":case"percentage":case"dimension":case"CDC":case"hash":case"at-keyword":return n.type;case"func":case"function":return"function";case"block":return n.open==="("?"(":"other";case"(":return"(";case"delim":return`delim${n.value}`;default:return"other"}};function pe(n,i){let t=["ident","function","url","bad-url","delim-","number","percentage","dimension","CDC"];return n==="ident"?[...t,"("].includes(i):n==="at-keyword"||n==="hash"||n==="dimension"||n==="delim#"||n==="delim-"?t.includes(i):n==="number"?["ident","function","url","bad-url","number","percentage","dimension","delim%"].includes(i):n==="delim@"?["ident","function","url","bad-url","delim-","CDC"].includes(i):n==="delim."||n==="delim+"?["number","percentage","dimension"].includes(i):n==="delim/"?i==="delim*":!1}function fe(n){switch(n.type){case"whitespace":return" ";case"ident":return C(n.value);case"at-keyword":return`@${C(n.value)}`;case"hash":return`#${R(n.value)}`;case"string":return E(n.value);case"url":return`url(${E(n.value)})`;case"delim":return n.value==="\\"?`\\
2
+ `:n.value;case"CDO":return"<!--";case"CDC":return"-->";case"number":return n.repr;case"percentage":return`${n.repr}%`;case"dimension":return`${n.repr}${de(n.unit)}`;case"func":return`${C(n.name)}(${k(n.value)})`;case"block":return`${n.open}${k(n.value)}${ee[n.open]}`;case":":case";":case",":case"[":case"]":case"(":case")":case"{":case"}":return n.type;default:return""}}function k(n){let i="",t;for(let e of n)e.type==="whitespace"&&t?.type==="whitespace"||(t&&pe(Z(t),Z(e))&&(i+="/**/"),i+=fe(e),t=e);return i}var me=new Set(L),re=new Set(F),B=new Set(U),ye=new Set(M),ge=new Set(K),be=new Set(X),J=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,h=n=>n.replace(/[A-Z]/g,i=>i.toLowerCase()),he=n=>h(n);function O(n,i,t){let e=[];for(let r of i){if(r.type==="bad-url"||r.type==="bad-string"){t({reason:"unreadable",...n?{name:n}:{}});return}if(r.type==="url"){if(n&&B.has(n)&&J.test(r.value)){e.push({type:"func",name:"url",value:[{type:"string",value:r.value}]});continue}t({reason:"url",...n?{name:n}:{}});return}if(r.type==="func"){let o=h(r.name);if(o==="url"||o==="src"){let u=r.value.filter(d=>d.type!=="whitespace"),c=u[0];if(o==="url"&&u.length===1&&c?.type==="string"&&n&&B.has(n)&&J.test(c.value)){e.push({type:"func",name:"url",value:[{type:"string",value:c.value}]});continue}t({reason:"url",...n?{name:n}:{}});return}if(!re.has(o)){t({reason:"function",name:o});return}let s=O(n,r.value,t);if(!s)return;o==="var"?e.push({type:"whitespace"},{type:"func",name:o,value:s},{type:"whitespace"}):e.push({type:"func",name:o,value:s});continue}if(r.type==="block"){if(r.open==="{"||r.open==="("&&e.at(-1)?.type==="ident"){t({reason:"unreadable",...n?{name:n}:{}});return}let o=O(n,r.value,t);if(!o)return;e.push({type:"block",open:r.open,value:o});continue}if(r.type==="at-keyword"||r.type==="CDO"||r.type==="CDC"||r.type==="{"||r.type==="}"||r.type===";"||r.type==="delim"&&r.value==="\\"){t({reason:"unreadable",...n?{name:n}:{}});return}e.push(r)}return e}var ke=/^(animation|transition|scroll-behavior)/;function P(n,i,t=!1){let e=n.name.startsWith("--"),r=e?n.name:he(n.name);if(!e&&!me.has(r)){i({reason:"property",name:r});return}let o=W[r];if(o){let c=n.value.filter(x=>x.type!=="whitespace"),d=c[0],f=c.length===1&&d?.type==="ident"?h(d.value):void 0;if(!f||![...o,"inherit","initial","unset","revert"].includes(f)){i({reason:"value",name:r});return}return`${r}: ${f}${n.important?" !important":""}`}let s=O(e?void 0:r,n.value,i);if(!s)return;let u=k(s).trim();return`${e?`--${R(n.name.slice(2))}`:r}: ${u}${n.important&&!(t&&ke.test(r))?" !important":""}`}function oe(n,i){let t=e=>{for(let r=0;r<e.length;r+=1){let o=e[r];if(r>0&&e[r-1].type===":"&&(o.type==="ident"||o.type==="func")){let u=h(o.type==="ident"?o.value:o.name);if(ge.has(u)||(u.startsWith("-webkit-")||u.startsWith("-moz-"))&&!be.has(u))return i({reason:"selector",name:u}),!1}if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="at-keyword"||o.type==="CDO"||o.type==="CDC"||o.type==="block"&&o.open==="{")return i({reason:"unreadable",name:"selector"}),!1;if(o.type==="func"&&!t(o.value)||o.type==="block"&&!t(o.value))return!1}return!0};return t(n)}function T(n,i,t){let e=[];for(let r of I(n))if(r.type==="declaration"){let o=P(r,i);o&&e.push(`${o};`)}else{let o=_(r,i,t+1,"style");o&&e.push(o)}return e.join(" ")}function xe(n,i,t){let e=r=>r.every(o=>{if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="block"&&o.open==="{")return t({reason:o.type==="url"?"url":"unreadable",name:`@${i}`}),!1;if(o.type==="func"){let s=h(o.name);return i==="supports"&&s==="selector"?oe(o.value,t):re.has(s)?e(o.value):(t({reason:"function",name:s}),!1)}if(o.type==="block"){if(i==="supports"){let s=I(o.value);if(s.length===1&&s[0].type==="declaration")return P(s[0],t)!==void 0}return e(o.value)}return!0});return e(n)?k(n).trim():void 0}function $(n){return n.map((i,t)=>{let e=n[t-1],r=e?.type===":"||e?.type==="delim"&&(e.value==="."||e.value==="|");return i.type==="ident"&&!r&&Object.prototype.hasOwnProperty.call(j,h(i.value))?{type:"block",open:"[",value:[{type:"ident",value:"data-graview-as"},{type:"delim",value:"="},{type:"string",value:h(i.value)}]}:i.type==="func"?{type:"func",name:i.name,value:$(i.value)}:i.type==="block"&&i.open==="("?{type:"block",open:"(",value:$(i.value)}:i})}function _(n,i,t,e){if(t>ne){i({reason:"unreadable",name:"nesting"});return}if(n.type==="qualified"){if(e==="keyframes"){if(!n.prelude.every(f=>f.type==="whitespace"||f.type===","||f.type==="percentage"||f.type==="ident"&&["from","to"].includes(h(f.value)))){i({reason:"unreadable",name:"keyframe"});return}return`${k(n.prelude).trim()} { ${T(n.block,i,t)} }`}if(!oe(n.prelude,i))return;let c=k($(n.prelude)).trim();if(c===""){i({reason:"unreadable",name:"selector"});return}return`${c} { ${T(n.block,i,t)} }`}let r=h(n.name),o=r==="-webkit-keyframes"?"keyframes":r;if(!ye.has(o)||e==="keyframes"){i({reason:"at-rule",name:`@${r}`});return}if(!n.block){i({reason:"unreadable",name:`@${r}`});return}if(o==="keyframes"){if(e!=="sheet"){i({reason:"at-rule",name:"@keyframes"});return}let c=n.prelude.filter(g=>g.type!=="whitespace"),d=c[0];if(c.length!==1||!d||d.type!=="ident"&&d.type!=="string"){i({reason:"unreadable",name:"@keyframes"});return}let f=w(n.block,!1).map(g=>_(g,i,t+1,"keyframes")).filter(g=>g!==void 0);return`@keyframes ${d.type==="ident"?C(d.value):E(d.value)} { ${f.join(" ")} }`}let s=xe(n.prelude,o,i);if(s===void 0)return;let u=e==="style"?T(n.block,i,t):w(n.block,!1).map(c=>_(c,i,t+1,"sheet")).filter(c=>c!==void 0).join(" ");return`@${o} ${s} { ${u} }`}function ae(n,i=S){let t=[];if(n.length>i)return{css:"",refused:[{reason:"size"}]};let e=o=>void t.push(o);return{css:w(N(n),!0).map(o=>_(o,e,0,"sheet")).filter(o=>o!==void 0).join(`
3
+ `),refused:t}}function we(n,i=S){let t=[],e=[],r=0;for(let o of n){if(r+o.length>i){e.push({reason:"size"});continue}r+=o.length;let s=ae(o,i);s.css&&t.push(s.css),e.push(...s.refused)}return{css:t.join(`
4
+ `),refused:e}}function Ce(n,i=S){let t=[];if(n.length>i)return{css:"",refused:[{reason:"size"}]};let e=o=>void t.push(o),r=[];for(let o of I(N(n))){if(o.type!=="declaration"){e({reason:"unreadable",name:"a rule in a style attribute"});continue}let s=P(o,e,!0);s&&r.push(s)}return{css:r.join("; "),refused:t}}function Se(n,i){let t,e=P(ie(n,N(i)),r=>t??=r);return e===void 0||t?{refused:t??{reason:"unreadable",name:n}}:{value:e.slice(e.indexOf(":")+1).trim()}}export{ae as a,we as b,Ce as c,Se as d};
@@ -1 +1 @@
1
- import{e as a}from"./chunk.3KUYB5ZT.js";import{l as i}from"./chunk.3CJLAJXP.js";import{$d as o}from"./chunk.J24YPQ5I.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
1
+ import{e as a}from"./chunk.J6HF7IRQ.js";import{l as i}from"./chunk.A5PSEU3W.js";import{de as o}from"./chunk.ZEZUKRC6.js";function p(t){let r=t.within??{};return o({...r.sort?{sort:r.sort}:{},...r.filter?{filter:r.filter}:{},...r.group?{group:r.group}:{},...r.q?{q:r.q}:{},...r.archived?{archived:r.archived}:{}})}function c(t,r){let m=a(r),e=t;for(let n of["sort","filter","group","q","archived"])e=i(e,n,m[n]??null);return e}export{p as a,c as b};
@@ -0,0 +1 @@
1
+ import{a as ot}from"./chunk.T6PU3NKP.js";import"./chunk.J6HF7IRQ.js";import{e as V,l as ue,n as G,r as st}from"./chunk.LRNFE3UK.js";import{a as ee}from"./chunk.G4JJXA63.js";import"./chunk.URQTF5SY.js";import{c as nt}from"./chunk.LP2ZMAT2.js";import{d as tt}from"./chunk.M7KXQGQL.js";import"./chunk.XOZU4OFA.js";import"./chunk.H3EGBDW2.js";import"./chunk.B7KZBT27.js";import"./chunk.SO6NT5K7.js";import"./chunk.MUSMNKE4.js";import{d as et}from"./chunk.SJQPTDAT.js";import{b as Ze}from"./chunk.JQ63N4MZ.js";import"./chunk.Z3O2VZAJ.js";import{L as ze,Zd as Ne,_ as Je,_d as Xe,la as Ye,oa as qe,ta as Ae,ua as F,vb as Ve,wb as Qe}from"./chunk.ZEZUKRC6.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";var At="Nothing by that name here.",$=o=>o.normalize("NFD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[’']/g,"'").replace(/[^\p{L}\p{N}' ]+/gu," ").replace(/\s+/g," ").trim(),Nt=/^(?:(?:can you |could you |please )?(?:go|take me|bring me|head|jump|navigate|switch|get me)(?: back)? to|(?:please )?(?:open|show(?: me)?|bring up|let me see|view)) (.+)$/,St=/^(?:(?:can you |could you |please )?tell me (?:about|of)|what(?: is|'s| are) (?:in |on )?|describe|explain|who(?: is|'s)) (.+)$/,Ot=/^(?:what(?: is|'s| am i looking at| do i see)(?: (?:here|this|on (?:this|the) (?:page|screen)|in view|this place|this page))?|where am i|describe (?:this|here|this place|this page)|tell me about (?:this|here|this place|this page))$/,rt=new Set(["here","this","this place","this page","on this page","on the page","on this screen","in view"]),Ct=/^(?:date|day|when|on|at|the date|the day)$/,jt=/^(?:what(?: is|'s) (?:wrong|broken|the (?:problem|matter|trouble))|what needs (?:fixing|attention|doing)|any (?:problems|issues|trouble)|(?:show(?: me)? |go to |open )?(?:the )?(?:problems|issues|trouble|standing|what's wrong)|is (?:anything|something) (?:wrong|broken)|are there (?:any )?(?:problems|issues))(?: (?:with|about|on|in) (.+))?$/,z=o=>o.replace(/^(?:the|a|an|my|our) /,""),te=new Set(["the","a","an","my","our","all","any","of","that","which","who","are","is","be","what","whats","what's","with","me","show","list","every","there","do","i","have","we","due","for","please","were","was","by","from","in","on"]),ft=864e5,he=o=>Date.UTC(Number(o.slice(0,4)),Number(o.slice(5,7))-1,Number(o.slice(8,10))),xe=o=>new Date(o).toISOString().slice(0,10),C=(o,i)=>xe(he(o)+i*ft),xt=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Mt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wt="(monday|tuesday|tues|wednesday|thursday|thurs|friday|saturday|sunday)",it="(january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sept|sep|oct|nov|dec)",at="(\\d{1,2})(?:st|nd|rd|th)?",Dt=o=>xt.findIndex(i=>i.startsWith(o.slice(0,3))),dt=o=>Mt.findIndex(i=>o.startsWith(i.toLowerCase()));function Rt(o,i){return Je(o,{year:o.slice(0,4)!==i.slice(0,4)})}function Se(o,i,y){if(o<0||i<1||i>31)return;let f=Number(y.slice(0,4)),c=k=>{let j=Date.UTC(k,o,i);return new Date(j).getUTCMonth()===o?xe(j):void 0},p=c(f);if(p)return he(p)<he(y)-183*ft?c(f+1):p}function Oe(o,i,y){let f=new Date(he(i)).getUTCDay(),c=u=>{let S=(f-y+7)%7,w=C(i,-S+u*7);return{from:w,to:C(w,6)}},p=()=>{let u=`${i.slice(0,8)}01`,S=new Date(Date.UTC(Number(i.slice(0,4)),Number(i.slice(5,7)),1));return{from:u,to:C(xe(S.getTime()),-1)}},k=u=>u?{from:u,to:u,day:Rt(u,i)}:void 0,j=(u,S)=>{let w=Dt(S);return k(u==="this"||u==="next"?C(c(u==="next"?1:0).from,(w-y+7)%7):u==="last"?C(i,-((f-w+6)%7+1)):C(i,(w-f+7)%7))},J=u=>{let S=C(i,f===0?-1:6-f);return{from:C(S,u*7),to:C(S,u*7+1)}},B="\\b(?:(?:due |for |on |by )(?:the )?)?",P=[[/\b(?:overdue|past due|late)\b/,()=>({overdue:!0,to:C(i,-1)})],[/\b(?:due |for |on )?today\b/,()=>({from:i,to:i})],[/\b(?:due |for |on )?tomorrow\b/,()=>k(C(i,1))],[/\b(?:due |for |on )?yesterday\b/,()=>k(C(i,-1))],[/\b(?:due |for |on )?this week\b/,()=>c(0)],[/\b(?:due |for |on )?next week\b/,()=>c(1)],[/\b(?:due |for |on )?(?:last|previous) week\b/,()=>c(-1)],[/\b(?:due |for |on )?next weekend\b/,()=>J(1)],[/\b(?:due |for |on )?(?:this |the )?weekend\b/,()=>J(0)],[/\b(?:due |for |on )?this month\b/,()=>p()],[new RegExp(`${B}(\\d{4}) (\\d{2}) (\\d{2})\\b`),u=>k(Se(Number(u[2])-1,Number(u[3]),`${u[1]}-01-01`))],[new RegExp(`${B}${at} (?:of )?${it}\\b`),u=>k(Se(dt(u[2]),Number(u[1]),i))],[new RegExp(`${B}${it} (?:the )?${at}\\b`),u=>k(Se(dt(u[1]),Number(u[2]),i))],[new RegExp(`${B}(?:(this|next|last|coming) )?${Wt}\\b`),u=>j(u[1],u[2])]];for(let[u,S]of P){let w=o.match(u);if(!w)continue;let N=S(w);if(N)return{ask:{words:w[0],...N},rest:o.replace(w[0]," ").replace(/\s+/g," ").trim()}}}function ht(o,i,y={}){let f=y.principal??{kind:"human"},c=o.seenBy(f),p=c.schema,k=y.today??o.today?.()??ze(),j=y.weekStartsOn??1,J=o.kindsKeptFrom(f),B=o.modules.disabledKinds,P=p.kinds.filter(e=>!J.has(e)&&!B.has(e)),u=new Set(P),S=(y.places??[]).filter(e=>e.kind===null||u.has(e.kind)),w=c.graph,N=$(i).replace(/[?.!]+$/,"").trim();if(N.length===0)return{unresolved:!0};let M=e=>p.tryDefinition(e),H=e=>Ye(M(e.kind),e),I=e=>qe(p,e),se=e=>S.find(t=>t.kind===e&&t.address===Ne(p,e))?.address??Ne(p,e),ge=e=>Xe(p,e.kind,e.id),Me=e=>({to:"record",id:e.id,kind:e.kind,label:H(e),address:ge(e),said:`Went to ${H(e)}.`}),We=e=>{let t=`Went to ${e.title}.`;return e.kind===null?{to:"place",slug:e.slug,title:e.title,address:e.address,...e.slug==="overview"?{face:"scene"}:{},said:t}:e.lens||e.address.startsWith("/places/")?{to:"picture",kind:e.kind,as:e.slug,title:e.title,address:e.address,said:t}:{to:"kind",kind:e.kind,title:e.title,address:e.address,said:t}},De=()=>({unresolved:!0,say:At}),oe=e=>{let t=M(e.kind),s=et(e,t,{limit:3,excerpt:!0}).map(r=>r.alone.startsWith(r.label)?r.alone:`${r.label.toLowerCase()} ${r.alone}`).join(", "),n=c.violations().filter(r=>r.nodeIds.includes(e.id));return[`${H(e)} \u2014 ${Ae(F(t,e.kind))}${s?` (${s})`:""}.`,n.length>0?`Trouble: ${n.map(r=>r.message).join("; ")}.`:""].filter(Boolean).join(" ")},re=e=>{let t=new Set([G(e),G(z(e))]);for(let n of[" page"," view"," lens"," place"," picture"," list"])e.endsWith(n)&&(t.add(G(e.slice(0,-n.length))),t.add(G(z(e.slice(0,-n.length)))));t.delete("");let s=n=>t.has(G(n.title))||t.has(G(z($(n.title))))||t.has(G(n.slug));return S.find(n=>n.kind!==null&&n.address.startsWith("/places/")&&s(n))??S.find(s)},pe=e=>{let t=st(o,e,{principal:f,today:k,limit:6,near:!1,...y.selection?{from:y.selection}:{}}),s=t.hits.filter(r=>r.about==="node"&&u.has(r.kind)&&w.getNode(r.id)!==void 0),n=s.filter(r=>r.why.field==="label"&&r.why.strength==="exact");return n.length===1?{one:w.getNode(n[0].id),picks:s}:n.length>1?{picks:n}:s.length===1&&t.total===1?{one:w.getNode(s[0].id),picks:s}:{picks:s}},Re=e=>{let t=e.map(s=>`${s.label} (${F(M(s.kind),s.kind)})`);return`${e.length===1?"One thing matches":`${e.length} things match`}: ${t.join("; ")}.`},Ee=(e,t)=>{if(rt.has(e))return Le();let s=t?pe(z(e)||e):void 0,n=s?.one&&$(H(s.one))===$(z(e)||e)?void 0:re(e);if(n){let l=We(n);return{about:"place",say:t?`${l.said} ${me(n)}`:l.said,moves:[l],subject:n.slug}}let r=pe(z(e)||e);if(r.one){let l=Me(r.one);return{about:t?"describe":"record",say:t?`${l.said} ${oe(r.one)}`:l.said,moves:[l],subject:r.one.id}}if(r.picks.length>0)return{about:"picks",say:Re(r.picks),moves:[],picks:r.picks};let h=ae(e);if(h)return h;let d=Pe(e);if(d){if(d.rest.split(" ").every(l=>l===""||te.has(l))){let l=I(d.kind),v={to:"kind",kind:d.kind,title:l,address:se(d.kind),said:`Went to the ${l.toLowerCase()}.`};return{about:"kind",say:v.said,moves:[v]}}return{unresolved:!0}}return De()},me=e=>{if(e.kind===null){let h=P.map(l=>({kind:l,count:w.nodesOfKind(l).length})).filter(l=>l.count>0).map(l=>`${l.count} ${(l.count===1?F(M(l.kind),l.kind):I(l.kind)).toLowerCase()}`),d=c.violations().length;return[h.length>0?`It holds ${fe(h)}.`:"It holds nothing yet.",d>0?`${d===1?"One problem":`${d} problems`} to see to.`:""].filter(Boolean).join(" ")}let t=w.nodesOfKind(e.kind).length,s=I(e.kind).toLowerCase(),n=new Set(c.violations().flatMap(h=>h.nodeIds)),r=w.nodesOfKind(e.kind).filter(h=>n.has(h.id)).length;return[e.lens?`It draws the ${s} as ${Ae(e.lens)}${t>0?` \u2014 ${t} of them`:""}.`:`${t===0?"No":t} ${t===1?F(M(e.kind),e.kind):s} ${t===1?"is":"are"} here.`,r>0?`${r} ${r===1?"has":"have"} a problem.`:""].filter(Boolean).join(" ")},Le=()=>{let e=(y.selection??[]).map(s=>w.getNode(s)).find(s=>s!==void 0);if(e)return{about:"here",say:oe(e),moves:[],subject:e.id};let t=S.find(s=>s.slug===y.place)??S.find(s=>s.slug==="home");return t?{about:"here",say:`${t.title}. ${me(t)}`,moves:[],subject:t.slug}:{about:"here",say:me({slug:"home",title:"Home",kind:null,cardinality:"many",address:"/",stop:"#"}),moves:[]}},Pe=e=>{let t=P.flatMap(s=>[I(s),F(M(s),s),s].map(n=>({kind:s,name:$(n)}))).filter(s=>s.name.length>0).sort((s,n)=>n.name.length-s.name.length);for(let{kind:s,name:n}of t)if(!(` ${e} `.indexOf(` ${n} `)<0))return{kind:s,rest:` ${e} `.replace(` ${n} `," ").replace(/\s+/g," ").trim()}},ie=(e,t)=>{let s=V(p,e).filters.filter(d=>d.about==="field"&&d.type==="date");if(s.length===0)return;let n=s.find(d=>t.some(l=>$(d.key)===l||$(d.label)===l));if(n)return n;let r=M(e)?.fieldRoles??{};for(let d of["due","deadline","date","when","start","end"]){let l=r[d],v=l?s.find(x=>x.key===l):void 0;if(v)return v}return s.find(d=>["due","deadline","date","when","on","at"].includes(d.key.toLowerCase()))??(s.length===1?s[0]:void 0)},He=e=>{let t=M(e),s=V(p,e).filters;if(t?.lifecycle)return{conditions:[{key:"is",value:"current"}],holds:d=>ue(be,d,{key:"is",value:"current"})};let r=s.find(d=>d.about==="field"&&d.type==="boolean"&&ne.has($(d.key)));if(r)return{conditions:[{key:r.key,value:"false"}],holds:d=>d[r.key]!==!0};let h=s.find(d=>d.about==="field"&&d.type==="choice"&&(d.options??[]).some(l=>ne.has($(l))));if(h){let d=new Set((h.options??[]).filter(v=>ne.has($(v)))),l=(h.options??[]).filter(v=>!d.has(v));return l.length===1?{conditions:[{key:h.key,value:l[0]}],holds:v=>v[h.key]===l[0]}:"unsayable"}return{conditions:[],holds:()=>!0}},Ie=(e,t)=>{let s=e.words.startsWith("due")||$(t.key)==="due",n=Ct.test($(t.label));if(e.day)return s?`due ${e.day}`:n?`on ${e.day}`:`${t.label.toLowerCase()} on ${e.day}`;let r=e.words.replace(/^(?:due|for|on|by) (?:the )?/,"");return s?`due ${r}`:n?r:`${t.label.toLowerCase()} ${r}`},ye=new Set(c.violations().flatMap(e=>e.nodeIds)),be={schema:p,graph:c.graph,flagged:ye,today:k},ae=e=>{let t=Oe(e,k,j),s=Pe(t?.rest??e),n=s?.kind,r=(s?.rest??t?.rest??e).split(" ").filter(Boolean);if(!n&&t){let g=e.split(" "),m=P.filter(L=>ie(L,g)!==void 0),E=m.filter(L=>{let b=ie(L,g);return g.some(O=>$(b.key)===O||$(b.label)===O)}),U=m.length===1?m:E;if(U.length!==1)return;n=U[0]}if(!n)return;let h=V(p,n).filters,d=[],l=[],v=[],x=[],q=!1,de=[];for(let g=0;g<r.length;g++){let m=r[g],E=g>0&&(r[g-1]==="not"||r[g-1]==="un"),U=h.find(b=>b.about==="field"&&b.type==="choice"&&(b.options??[]).some(O=>$(O)===m));if(U&&!E){let b=(U.options??[]).find(O=>$(O)===m);d.push({key:U.key,value:b}),l.push(b);continue}let L=h.find(b=>b.about==="field"&&b.type==="boolean"&&[$(b.key),$(b.label)].some(O=>O===m||O===m.replace(/^un/,"")));if(L){let b=!E&&!(m.startsWith("un")&&!$(L.key).startsWith("un"));d.push({key:L.key,value:String(b)}),l.push(b?m:`not ${m.replace(/^un/,"")}`);continue}if(Pt.has(m)&&!E){let b=He(n);b==="unsayable"?(q=!0,x.push(O=>!ut(p,O))):(d.push(...b.conditions),x.push(b.holds)),l.push(m);continue}m==="not"||m==="un"||t&&h.some(b=>b.type==="date"&&($(b.key)===m||$(b.label)===m))||de.push(m)}if(r=de,r.some(g=>!te.has(g))||!t&&d.length===0&&x.length===0)return;let T=I(n).toLowerCase(),Q=I(n);if(t){let g=ie(n,e.split(" "));if(!g){let m={to:"kind",kind:n,title:Q,address:se(n),said:`Went to the ${T}.`};return{about:"kind",say:`${ee(Q)} carry no date, so I can't tell which are ${/^(?:due|for|on|overdue|past due|late)\b/.test(t.ask.words)?t.ask.words:`due ${t.ask.words}`}. ${m.said}`,moves:[m]}}if(t.ask.from&&d.push({key:g.key,value:`after:${C(t.ask.from,-1)}`}),t.ask.to&&d.push({key:g.key,value:`before:${C(t.ask.to,1)}`}),t.ask.overdue){let m=He(n);m==="unsayable"?(q=!0,x.push(E=>!ut(p,E))):(d.push(...m.conditions),x.push(m.holds))}t.ask.overdue?l.push("overdue"):v.push(Ie(t.ask,g))}let R=w.nodesOfKind(n).filter(g=>d.every(m=>ue(be,g,m))&&x.every(m=>m(g))),K=[...l,...v].join(" and "),Y=[...l,T,...v].join(" "),W=R.slice(0,6).map(g=>({about:"node",id:g.id,kind:n,label:H(g),why:{field:d[0]?.key??"label",reading:d[0]?.key??"Name",fragment:K,strength:"field"},current:!0,flagged:ye.has(g.id),address:ge(g)})),X=R.length===0?`No ${T} are ${K}.`:`${R.length===1?`One ${F(M(n),n)} is`:`${R.length} ${T} are`} ${K}: ${fe(R.slice(0,6).map(H))}${R.length>6?`, and ${R.length-6} more`:""}.`;if(q)return{about:"kind",say:X,moves:[],picks:W,offer:{draft:Y,label:"Show as a view"}};let Z=d.map(g=>`${g.key}:${g.value}`).join(","),we=`${se(n)}?${new URLSearchParams({filter:Z}).toString()}`,_={to:"kind",kind:n,title:ee(Y),filter:Z,address:we,said:`Went to the ${Y}.`};return{about:"kind",say:`${_.said} ${X}`,moves:[_],picks:W}},Te=e=>M(e)?.figure==="person"?!0:[e,F(M(e),e),I(e)].some(s=>$(s).split(" ").some(n=>Et.has(n))),pt=e=>{let t=[],s=n=>M(n)?.edges??{};for(let[n,r]of Object.entries(s(e)))for(let h of r.to??[])u.has(h)&&t.push({key:n,direction:"out",far:h,words:ct(`${r.description??""} ${n}`)});for(let n of P)for(let[r,h]of Object.entries(s(n)))(h.to??[]).includes(e)&&t.push({key:r,direction:"in",far:n,words:ct(`${h.inverse??""} ${r}`)});return t},mt=e=>{let t=e.match(/^(who|which|what)\b/)?.[1];if(!t)return;let s=Oe(e,k,j);if(!s||s.ask.overdue)return;let n=s.rest.split(" ").filter(Boolean),r=P.flatMap(a=>[I(a),F(M(a),a),a].map(A=>({kind:a,name:$(A)}))).filter(a=>a.name.length>0).sort((a,A)=>A.name.length-a.name.length),h=` ${n.join(" ")} `,d=[];for(let{kind:a,name:A}of r)h.includes(` ${A} `)&&(h=h.replace(` ${A} `," "),d.includes(a)||d.push(a));let l=h.match(/\b(?:is|are|was|were)\b|'s\b/)?.[0],v=h.replace(/'s\b/g," ").split(" ").filter(a=>a.length>0&&!te.has(a)&&!Ce.has(a)),x=t==="who"?d.find(Te):d[0];if(!x&&t!=="who")return;let q=d.find(a=>a!==x),de=v.flatMap(a=>[je(a),...lt.has(je(a))?[...lt]:[]]),T=P.filter(a=>q?a===q:a!==x).flatMap(a=>{let A=ie(a,e.split(" "))??V(p,a).filters.find(D=>D.about==="field"&&D.type==="date");return A?pt(a).filter(D=>(x?D.far===x:Te(D.far))&&D.far!==a).map(D=>({kind:a,field:A,relation:D,said:v.length===0||de.some(ve=>D.words.some(vt=>Lt(vt,ve)))})):[]}).filter(a=>a.said);if(T.length===0)return;let Q=T.filter(a=>n.some(A=>$(a.field.key)===A||$(a.field.label)===A)),R=T.length===1?T[0]:Q.length===1?Q[0]:void 0;if(!R)return;let{kind:K,field:Y,relation:W}=R,X=[...s.ask.from?[{key:Y.key,value:`after:${C(s.ask.from,-1)}`}]:[],...s.ask.to?[{key:Y.key,value:`before:${C(s.ask.to,1)}`}]:[]],Z=w.nodesOfKind(K).filter(a=>X.every(A=>ue(be,a,A))),we=a=>(W.direction==="out"?c.graph.out(a.id,W.key):c.graph.in(a.id,W.key)).filter(A=>A.kind===W.far&&u.has(W.far)),_=[],g=[];for(let a of Z){let A=we(a);A.length===0&&g.push(a);for(let D of A)_.some(ve=>ve.id===D.id)||_.push(D)}let m=Ie(s.ask,Y),E=s.ask.day?`On ${s.ask.day}`:ee(s.ask.words.replace(/^(?:due|for|on|by) (?:the )?/,"")),U=I(K).toLowerCase(),L=X.map(a=>`${a.key}:${a.value}`).join(","),b=`${U} ${m}`,O={to:"kind",kind:K,title:ee(b),filter:L,address:`${se(K)}?${new URLSearchParams({filter:L}).toString()}`,said:`Went to the ${b}.`};if(Z.length===0)return{about:"related",say:`No ${b}. ${O.said}`,moves:[O]};let le=v.join(" "),yt=l==="was"||l==="were",Ge=a=>yt?a===1?"was":"were":a===1?"is":"are",ce=_.map(H),bt=ce.length>8?[...ce.slice(0,8),`${ce.length-8} more`]:ce,kt=_.length===0?`${E}: nobody ${Ge(1)}${le?` ${le}`:""}.`:`${E}: ${fe(bt)}${le?` ${Ge(_.length)} ${le}`:""}.`,$t=t==="who"&&g.length>0?`${fe(g.slice(0,4).map(H))}${g.length>4?` and ${g.length-4} more`:""} ${g.length===1?"has":"have"} nobody.`:"",wt=_.slice(0,8).map(a=>({about:"node",id:a.id,kind:a.kind,label:H(a),why:{field:W.key,reading:Ze(p,W.direction==="out"?K:W.far,W.key,W.direction==="out"?"out":"in"),fragment:m,strength:"field"},current:!0,flagged:ye.has(a.id),address:ge(a)}));return{about:"related",say:[kt,$t,O.said].filter(Boolean).join(" "),moves:[O],picks:wt}},Ke=N.match(jt);if(Ke){let e=Ke[1];if(e&&!rt.has(e)&&!/^(?:it|this|that)$/.test(e)){let n=re(e),r=n?void 0:pe(z(e)||e);if(r?.one){let h=Me(r.one);return{about:"describe",say:`${h.said} ${oe(r.one)}`,moves:[h],subject:r.one.id}}if(!n)return r&&r.picks.length>0?{about:"picks",say:Re(r.picks),moves:[],picks:r.picks}:De()}if(e&&/^(?:it|this|that)$|^(?:here|this place|this page)$/.test(e)){let n=(y.selection??[]).map(r=>w.getNode(r)).find(r=>r!==void 0);if(n)return{about:"describe",say:oe(n),moves:[],subject:n.id}}let t=c.violations();if(t.length===0)return{about:"problems",say:"Nothing is wrong \u2014 every rule holds.",moves:[]};let s={to:"problems",address:"/problems",said:"Went to the problems."};return{about:"problems",say:`${s.said} ${Qe(t)}: ${t.slice(0,4).map(n=>n.message).join("; ")}${t.length>4?"\u2026":"."}`,moves:[s]}}if(Ot.test(N))return Le();let _e=mt(N);if(_e)return _e;let ke=Oe(N,k,j);if(ke&&!re(z(ke.ask.words))&&ke.rest.replace(/'s\b/g,"").split(" ").every(e=>e===""||te.has(e)||Ce.has(e))){let e=ae(N);if(e)return e}if(/^open /.test(N)){let e=ae(N);if(e)return e}let Fe=N.match(Nt)??N.match(/^(?:go|take me|head|get me)(?: back)? (home)$/);if(Fe)return Ee(Fe[1].trim(),!1);let Be=N.match(St);if(Be){let e=Ee(Be[1].trim(),!0);return"unresolved"in e&&e.unresolved&&!/^tell me|^describe/.test(N)?{unresolved:!0}:e}let $e=re(N);if($e){let e=We($e);return{about:"place",say:e.said,moves:[e],subject:$e.slug}}let Ue=ae(N);return Ue||{unresolved:!0}}var Ce=new Set(["who","whom","whose","which","what","whats","what's","who's"]),Et=new Set(["person","people","user","users","member","members","volunteer","volunteers","gardener","gardeners","player","players","staff","worker","workers","employee","employees","owner","owners","assignee","assignees","helper","helpers","student","students","teacher","teachers","customer","customers","client","clients","contact","contacts","author","authors"]),lt=new Set(["work","cover","staff","assign","do","run","schedul","roster","book","duty","serv","help"]);function je(o){let i=o.toLowerCase().replace(/'s$/,"");for(let y of["ing","ed","es","s"])if(i.length>y.length+2&&i.endsWith(y)){let f=i.slice(0,-y.length);return f.length>3&&f[f.length-1]===f[f.length-2]?f.slice(0,-1):f}return i}function ct(o){return o.toLowerCase().split(/[^a-z']+/).filter(i=>i.length>1&&!te.has(i)&&!Ce.has(i)&&!["it","they","them","their","its","this","here","to","at"].includes(i)).map(je)}var Lt=(o,i)=>o===i||o.length>=4&&i.length>=4&&(o.startsWith(i)||i.startsWith(o)),ne=new Set(["done","finished","complete","completed","closed","resolved","agreed","canceled","archived","shipped","delivered"]),Pt=new Set(["open","unfinished","outstanding","pending","remaining","undone","incomplete"]);function ut(o,i){return V(o,i.kind).filters.some(f=>f.about==="field"&&(f.type==="boolean"&&ne.has(f.key.toLowerCase())&&i[f.key]===!0||f.type==="choice"&&typeof i[f.key]=="string"&&ne.has(String(i[f.key]).toLowerCase())))}function fe(o){return o.length<=1?o[0]??"":`${o.slice(0,-1).join(", ")} and ${o[o.length-1]}`}function zt(o,i,y={}){let f=y.scene!==void 0?{...y.pages,scene:y.scene}:y.pages;return[...nt(o,i,f?{pages:f}:{})].map(({first:c,hidden:p,lens:k,...j})=>j)}function gt(o,i){return{...o.principal?{principal:o.principal}:{},...o.places?{places:o.places}:{},...o.selection?{selection:o.selection}:{},...o.place?{place:o.place}:{},...i??o.today?{today:i??o.today}:{},...o.weekStartsOn!==void 0?{weekStartsOn:o.weekStartsOn}:{}}}function Jt(o,i,y,f){let c=ht(o,i,gt(y,f));if(c.unresolved)return c.say?{reply:{say:c.say,proposals:[],grounded:!0}}:{};if(c.about==="picks")return{};let p=c.moves.length>0?{moves:c.moves}:{},k=c.subject?o.graph.getNode(c.subject):void 0;if(c.about==="problems")return{...p,problems:!0};if(k&&(c.about==="describe"||c.about==="here"))return{...p,told:k.id};let j=k?tt(o,ot(Ve(o.violations(),[k.id])).slice(0,3)):[];return{reply:{say:c.say,proposals:j,grounded:!0,...p,...c.picks&&c.picks.length>0?{picks:c.picks}:{},...c.offer?{offer:c.offer}:{}}}}function Yt(o,i,y={}){let f=gt(y),c=[];for(let p of i){let k=typeof p=="string"?p:typeof p=="object"&&p!==null&&typeof p.to=="string"?p.to:void 0;if(!k||k.trim().length===0)continue;let j=ht(o,/^(?:go|take me|open|show)\b/i.test(k.trim())?k:`go to ${k}`,f);if("moves"in j)for(let J of j.moves)c.some(B=>B.address===J.address)||c.push(J)}return c}export{At as NOTHING_BY_THAT_NAME,gt as askContextOf,Jt as goingFrom,Yt as movesFromNames,zt as placesFromViews,ht as resolveAsk};
@@ -0,0 +1,6 @@
1
+ import{c as O}from"./chunk.MUSMNKE4.js";import{_ as N}from"./chunk.ZEZUKRC6.js";var H=/^h([1-6])$/,D={section:null,article:null,form:null,region:null,nav:"navigation",navigation:"navigation",main:"main content",header:"header",banner:"header",footer:"footer",contentinfo:"footer",aside:"aside",complementary:"aside",search:"search"},G=e=>typeof e=="object"&&e!==null&&typeof e.getAttribute=="function"&&(e.nodeType===void 0||e.nodeType===1),$=e=>(e??"").replace(/\s+/g," ").trim();function*x(e){yield e;for(let r of Array.from(e.childNodes))G(r)&&(yield*x(r))}var P=e=>(e.getAttribute("data-graview-as")??e.localName??"").toLowerCase();function C(e){let r=H.exec(P(e));return r?Number(r[1]):e.getAttribute("role")==="heading"?Number(e.getAttribute("aria-level")??2):void 0}function R(e){let r=[...x(e)],i=new Map;for(let n of r){let d=n.getAttribute("id");d&&i.set(d,n)}let t=[],g=new Set,a=(n,d)=>{let s=n.toLowerCase();!n||g.has(s)||(g.add(s),t.push({name:n.length>80?`${n.slice(0,79)}\u2026`:n,as:d}))};for(let n of r){if(n.getAttribute("aria-hidden")==="true"||n.getAttribute("hidden")!==null)continue;if(C(n)!==void 0){a($(n.textContent),"heading");continue}let s=P(n),f=(n.getAttribute("role")??"").toLowerCase(),l=f in D?f:s in D?s:void 0;if(!l)continue;let m=(n.getAttribute("aria-labelledby")??"").split(/\s+/).flatMap(u=>i.get(u)?[$(i.get(u).textContent)]:[]).join(" "),c=[...x(n)].find(u=>u!==n&&C(u)!==void 0),o=$(n.getAttribute("aria-label"))||m||(c?$(c.textContent):"")||D[l]||"";a(o,l==="region"?"section":l)}return t}var v="\0";function _(e){let r=[],i=e.length,t=0,g="",a=l=>l.replace(/\\(u\{[0-9a-fA-F]+\}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{2}|.)/gs,(m,c)=>c==="n"?`
2
+ `:c==="t"?" ":c[0]==="u"||c[0]==="x"?String.fromCodePoint(parseInt(c.replace(/[ux{}]/g,""),16)):c),n=l=>{let m=++t;for(;t<i&&e[t]!==l&&e[t]!==`
3
+ `;)t+=e[t]==="\\"?2:1;let c=e.slice(m,t);return t++,a(c)},d=()=>{t++;let l=!1;for(;t<i&&e[t]!==`
4
+ `;){let m=e[t];if(m==="\\")t+=2;else if(m==="[")l=!0,t++;else if(m==="]")l=!1,t++;else{if(m==="/"&&!l)break;t++}}for(t++;t<i&&/[a-z]/i.test(e[t]);)t++},s=()=>{t++;let l="";for(;t<i;){let m=e[t];if(m==="\\")l+=a(e.slice(t,t+2)),t+=2;else{if(m==="`")return t++,l;m==="$"&&e[t+1]==="{"?(t+=2,f(!0),l+=v):(l+=m,t++)}}return l};function f(l){let m=0;for(;t<i;){let c=e[t];if(c==="/"&&e[t+1]==="/"){let o=e.indexOf(`
5
+ `,t);t=o<0?i:o}else if(c==="/"&&e[t+1]==="*"){let o=e.indexOf("*/",t+2);t=o<0?i:o+2}else if(c==='"'||c==="'")r.push(n(c)),g="a";else if(c==="`")r.push(s()),g="a";else if(c==="/"&&(g===""||"(,=:[!&|?{};+-*%<>~^".includes(g)))d(),g="a";else{if(c==="{"&&m++,c==="}"){if(l&&m===0){t++;return}m--}/\s/.test(c)||(g=c),t++}}}return f(!1),r}var F=e=>e.replace(/\s+/g," ").replace(/\s*([>+~,])\s*/g,"$1").trim();function J(e){let r=[],i=0,t=0;for(let g=0;g<e.length;g++){let a=e[g];a==="("||a==="["?i++:a===")"||a==="]"?i--:a===","&&i===0&&(r.push(e.slice(t,g)),t=g+1)}return r.push(e.slice(t)),r.map(F).filter(Boolean)}var K=new Set(["media","supports","container","layer","scope","document"]);function k(e){let r=e.replace(/\/\*[\s\S]*?\*\//g,""),i=[],t=n=>{let d=r[n],s=n+1;for(;s<r.length&&r[s]!==d;)s+=r[s]==="\\"?2:1;return s+1},g=n=>{let d=1,s=n;for(;s<r.length&&d>0;){let f=r[s];if(f==='"'||f==="'"){s=t(s);continue}f==="{"?d++:f==="}"&&d--,s++}return s},a=n=>{let d="",s=n;for(;s<r.length;){let f=r[s];if(f==='"'||f==="'"){let l=t(s);d+=r.slice(s,l),s=l}else{if(f==="}")return s+1;if(f===";")d="",s++;else if(f==="{"){let l=d.trim();if(d="",l.startsWith("@")){let m=(/^@([\w-]+)/.exec(l)?.[1]??"").toLowerCase();s=K.has(m)?a(s+1):g(s+1)}else i.push(...J(l)),s=g(s+1)}else d+=f,s++}}return s};return a(0),[...new Set(i)]}function A(e){let r=e.replace(/\[[^\]]*\]/g,"").replace(/"[^"]*"|'[^']*'/g,"");return[...new Set([...r.matchAll(/([.#])(-?[_a-zA-Z -￿][\w -￿-]*)/g)].map(i=>`${i[1]}${i[2]}`))]}var z=e=>!e.includes(v)&&e.length<300&&!/[<;!@]|=>|^\d/.test(e)&&/^[\w\s.#:>+~*()[\]="'^$|,\\%-]+$/u.test(e),Y=/\b(?:class|className)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,q=/\bid\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Z=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1\s*>/gi,Q=/<(section|nav|main|aside|header|footer|article|form)\b[^>]*?\baria-label\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;function T(e){let r=e.css===void 0||e.drawing===void 0&&e.classes===void 0?_(e.source):[],i=e.css!==void 0?k(e.css):[...new Set(r.filter(a=>a.includes("{")&&a.includes("}")).flatMap(a=>k(a)).filter(z))],t=new Set,g;if(e.drawing){for(let a of x(e.drawing)){for(let d of(a.getAttribute("class")??"").split(/\s+/))d&&t.add(`.${d}`);let n=a.getAttribute("id");n&&t.add(`#${n}`)}g=R(e.drawing)}else{let a=s=>(s[1]??s[2]??"").split(/\s+/).filter(f=>f&&!f.includes(v));for(let s of r){for(let f of s.matchAll(Y))for(let l of a(f))t.add(`.${l}`);for(let f of s.matchAll(q))for(let l of a(f))t.add(`#${l}`)}let n=new Set;g=[];let d=(s,f)=>{let l=s.replace(/\s+/g," ").trim();!l||l.includes(v)||n.has(l.toLowerCase())||(n.add(l.toLowerCase()),g.push({name:l,as:f}))};for(let s of r){for(let f of s.matchAll(Q))d(f[2]??f[3]??"",f[1].toLowerCase());for(let f of s.matchAll(Z))d(f[2].replace(/<[^>]*>/g,""),"heading")}}for(let a of e.classes??[])t.add(`.${a}`);return{from:e.drawing||e.classes?"drawing":"source",selectors:i,drawn:t,sections:g}}var E=8,M=e=>e.length<=E?e.join(", "):`${e.slice(0,E).join(", ")} and ${e.length-E} more`,I=e=>`${Math.round(e).toLocaleString("en-US")}px`;function X(e,r){let i=T(e),t=T(r),g=new Set(t.selectors.flatMap(A)),a=new Map;for(let h of i.selectors)for(let y of A(h))y.startsWith(".")&&a.set(y,[...a.get(y)??[],h]);let n=[...a].filter(([h])=>t.drawn.has(h)&&!g.has(h)).map(([h,y])=>({class:h.slice(1),styledBy:y})),d=new Set(n.map(h=>`.${h.class}`)),s=new Set(t.selectors),f=i.selectors.filter(h=>!s.has(h)).map(h=>({selector:h,names:A(h)})).filter(h=>h.names.length>0&&h.names.every(y=>t.drawn.has(y)&&(i.from==="source"||i.drawn.has(y)))),l=new Set(t.sections.map(h=>h.name.toLowerCase())),m=i.sections.filter(h=>!l.has(h.name.toLowerCase())),c=e.height!==void 0&&r.height!==void 0&&e.height>0?{before:e.height,after:r.height,change:r.height-e.height,ratio:Math.round((r.height-e.height)/e.height*1e3)/1e3}:void 0,o=c!==void 0&&Math.abs(c.ratio)>=.1&&Math.abs(c.change)>=50,u=[];if(n.length>0){let h=n.map(y=>`.${y.class}`);u.push(`${n.length===1?"A class":`${n.length} classes`} it still draws lost every rule that styled ${n.length===1?"it":"them"} before: ${M(h)}. Put back the rules for ${n.length===1?"it":"them"}, or stop drawing ${n.length===1?"it":"them"}.`)}let p=f.filter(h=>!h.names.some(y=>d.has(y)));p.length>0&&u.push(`${p.length===1?"A rule was":`${p.length} rules were`} taken out while the markup ${p.length===1?"it":"they"} styled is still drawn: ${M(p.map(h=>`"${h.selector}"`))}.`),m.length>0&&u.push(`${m.length===1?"A section":`${m.length} sections`} drawn before ${m.length===1?"is":"are"} not drawn now: ${M(m.map(h=>`"${h.name}"`))}.`),c&&o&&u.push(`The page is ${I(c.after)} tall, ${c.change<0?"down":"up"} from ${I(c.before)} (${c.change<0?"\u2212":"+"}${Math.round(Math.abs(c.ratio)*100)}%).`);let w=u.length>0;return{regressed:w,unstyled:n,selectorsRemoved:f,sectionsMissing:m,...c?{height:c}:{},read:{before:i.from,after:t.from},said:u,text:w?u.join(" "):`Nothing it drew before lost its style, and no section it drew is gone${c?"; the page is about as tall":""}.`}}var j=String.raw`(?:Mon(?:day)?|Tue(?:s(?:day)?)?|Wed(?:nesday)?|Thu(?:r(?:s(?:day)?)?)?|Fri(?:day)?|Sat(?:urday)?|Sun(?:day)?)\.?`,ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],V=String.raw`(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July?|Aug(?:ust)?|Sept?(?:ember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\.?`,U=String.raw`(?:st|nd|rd|th)?`,te=[/\b(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})\b/g,new RegExp(String.raw`\b(?:${j},?\s+)?(?<day>\d{1,2})${U}\s+(?<name>${V})(?![a-z])(?:,?\s+(?<year>\d{4})\b)?`,"g"),new RegExp(String.raw`\b(?:${j},?\s+)?(?<name>${V})\s+(?<day>\d{1,2})${U}(?!\d)\b(?:,?\s+(?<year>\d{4})\b)?`,"g")],ne=/^(?:.*today.*|now|current_?(?:day|date))$/i,se=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:new\s+Date\(\s*)?(["'`])(\d{4}-\d{2}-\d{2})[^"'`\n]*\2/g,B=String.raw`(?:today|tomorrow|yesterday|tonight)`,W=String.raw`[\s·•|,:()\-–—]{1,5}`;function re(e,r){let i=e.month!==void 0?Number(e.month):ee.indexOf(e.name.slice(0,3))+1,t=Number(e.day);if(!(i>=1&&i<=12&&t>=1&&t<=31))return;let g=d=>`${d}-${String(i).padStart(2,"0")}-${String(t).padStart(2,"0")}`;if(e.year!==void 0)return g(Number(e.year));let a=Number(r.slice(0,4)),n=d=>Math.abs(Date.parse(d)-Date.parse(r));return[a-1,a,a+1].map(g).sort((d,s)=>n(d)-n(s))[0]}function oe(e,r){let i=[];for(let t of te)for(let g of e.matchAll(t)){let a=g.index,n=a+g[0].length;if(i.some(s=>a<s.to&&n>s.from))continue;let d=re(g.groups??{},r);d!==void 0&&!Number.isNaN(Date.parse(d))&&i.push({from:a,to:n,day:d})}return i.sort((t,g)=>t.from-g.from)}var L=(e,r)=>`source line ${e.slice(0,r).split(`
6
+ `).length}`;function ie(e,r){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(r.today))return[];let{today:i}=r,t=r.title?.trim()||"This view",g=N(i,{weekday:"short",year:!1},r.locale),a=o=>`${t} may be out of date: it says \u201C${o}\u201D and today is ${g}. Read today from graview instead.`,n=[],d=(o,u)=>n.some(p=>o<p.to&&u>p.from);for(let o of e.matchAll(se)){if(!ne.test(o[1]))continue;let u=`${o[1]} = "${o[3]}"`;n.push({at:L(e,o.index),phrase:u,why:"today",says:a(u),from:o.index,to:o.index+o[0].length})}let s=new RegExp(String.raw`\b${B}${W}$`,"i"),f=new RegExp(String.raw`^${W}${B}\b`,"i"),l=/\b(?:due|by|until|on)\s+$/i,m=O(i,-(r.pastDays??31));for(let o of oe(e,i)){if(d(o.from,o.to)||/fromToday\(\s*["'`]$/.test(e.slice(Math.max(0,o.from-24),o.from)))continue;let u=e.slice(Math.max(0,o.from-16),o.from),p=e.slice(o.to,o.to+16),w=s.exec(u),h=f.exec(p);if(w||h){let y=w?o.from-w[0].length:o.from,b=h?o.to+h[0].length:o.to,S=e.slice(y,b).replace(/\s+/g," ").trim();n.push({at:L(e,y),phrase:S,why:"day-words",says:a(S),from:y,to:b});continue}if(o.day<i&&o.day>=m){let y=l.exec(u),b=y?o.from-y[0].length:o.from,S=e.slice(b,o.to).replace(/\s+/g," ").trim();n.push({at:L(e,b),phrase:S,why:"past",says:a(S),from:b,to:o.to})}}let c=new Set;return n.sort((o,u)=>o.from-u.from).filter(o=>!c.has(o.phrase)&&c.add(o.phrase)).map(({at:o,phrase:u,why:p,says:w})=>({at:o,phrase:u,why:p,says:w}))}export{R as a,X as b,ie as c};
@@ -0,0 +1 @@
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{a as q,l as K,s as U}from"./chunk.B5SJMCTT.js";import"./chunk.NYLKG25K.js";import{a as _}from"./chunk.TBY5IR7C.js";import"./chunk.ILJDLBPJ.js";import"./chunk.X226YATK.js";import"./chunk.BJUUSIQY.js";import"./chunk.M7KXQGQL.js";import"./chunk.XOZU4OFA.js";import"./chunk.H3EGBDW2.js";import"./chunk.6KJGRM7A.js";import"./chunk.MIE4TJRW.js";import{x as F}from"./chunk.QRQ5WPZI.js";import"./chunk.RD2FSSLV.js";import"./chunk.37RFCHSS.js";import"./chunk.SO6NT5K7.js";import"./chunk.MUSMNKE4.js";import"./chunk.SJQPTDAT.js";import"./chunk.JQ63N4MZ.js";import"./chunk.Z3O2VZAJ.js";import{A as j}from"./chunk.QNP5OR3P.js";import"./chunk.4W57E7AX.js";import{G as Q,La as W,W as N,ea as $,oa as G}from"./chunk.A5PSEU3W.js";import{a as L}from"./chunk.SDO3U72B.js";import{la as R,pa as b,ra as V,ua as I}from"./chunk.ZEZUKRC6.js";import"./chunk.FQLNBIQ5.js";import{b as T}from"./chunk.AJZBJBMO.js";var P=new WeakMap,X=e=>e.charAt(0).toUpperCase()+e.slice(1),Z=e=>(e??"").replace(/\s+/g," ").trim();function ee(e){let n=e.cloneNode(!0);for(let o of n.querySelectorAll("span"))o.remove();return Z(n.textContent).replace(/^[▸▾]\s*/,"")}function A(e,n){let o=e.at;if(!o.isConnected||o.closest("[data-graview-popover], [data-worker-view]"))return;let r=o.closest("[data-graview-page-main], main")??o.closest("[data-graview-face]"),c=n.store.schema,t=e.about?.length===1&&e.about[0].startsWith("aggregate:")?e.about[0].slice(10):void 0,s=t&&!t.includes("+")&&c.tryDefinition(t)?t:void 0,u,a=e.on!==void 0?n.store.graph.getNode(e.on):void 0;if(a)u={name:`${X(I(c.tryDefinition(a.kind),a.kind))} page`,slot:"record",kind:a.kind,record:a.id,elements:r?[r]:[],main:r};else if(e.place!==void 0){let i=n.views.places?.().find(d=>d.as===e.place);i&&(u={name:i.title,slot:"place",kind:i.kind,place:i.as,elements:r?[r]:[],main:r})}else if(s){let i=o.closest(".graview-group-head"),d=i?.closest('[data-testid="list-group"]'),l=i?ee(i):"";u=d&&l?{name:l,slot:"group",kind:s,group:l,elements:[d],main:r}:{name:b(c,s),slot:"list",kind:s,elements:r?[r]:[],main:r}}else e.home&&(u={name:"Home",slot:"home",elements:r?[r]:[],main:r});return u}function v(e,n){let o=n.onProposeChange!==void 0&&n.composeChange!==void 0&&_(n.store,n.principal),r=e.slot!=="place"&&typeof n.keptViews?.fork=="function"&&typeof n.keptViews.draftFork=="function"&&n.keptViews.current().may.views===!0;return o||r}var x=/^\d{4}-\d{2}-\d{2}/,ne=e=>{if(typeof e=="number")return String(e);if(!(typeof e!="string"||!e.trim())){if(x.test(e)){let n=new Date(`${e.slice(0,10)}T12:00:00`);return Number.isNaN(n.getTime())?void 0:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}return e.length<=40?e:void 0}};function J(e,n){let o=[],{store:r}=n,c=(e.main?.innerText??"").toLowerCase();if((e.slot==="list"||e.slot==="group")&&e.kind){let t=r.schema.tryDefinition(e.kind),s=Object.keys(t?.fields?.shape??{}).filter(m=>!["label","name","title"].includes(m)),u=r.graph.nodesOfKind(e.kind).filter(m=>c.includes(R(t,m).toLowerCase())).slice(0,6),a=m=>V(t,m).toLowerCase(),i=s.find(m=>u.some(g=>typeof g[m]=="string"&&x.test(String(g[m])))),d=s.find(m=>{let g=u.map(y=>ne(y[m])).filter(y=>y!==void 0);return g.length>0&&g.every(y=>!c.includes(y.toLowerCase()))});if(d){let m=u.some(g=>x.test(String(g[d]??"")));o.push(m&&!/date|day/.test(a(d))?`Show the ${a(d)} date on each row`:`Show ${a(d)} on each row`)}let l=n.views.arrangement?.()?.lists?.[e.kind],p=typeof l?.sort=="string"?l.sort:l?.sort?.by;i&&p!==i&&o.push(`Sort these by ${/date|day/.test(a(i))?a(i):`${a(i)} date`}, soonest first`)}return o.push(`Make \u201C${e.name}\u201D easier to read at a glance`),o.slice(0,3)}var f=T(Q(),1);var h=T(N(),1),Y=new WeakMap,E=new Set,z=e=>{let n=Y.get(e);return n||Y.set(e,n={ask:null,doors:[],heard:new Set}),n},C=e=>e.heard.forEach(n=>n()),te=0,k=null,oe=6e4;function D(e,n){let o=z(e);o.ask=n?{...n,at:++te}:null,C(o)}var M=W(L(()=>(__graviewPreload(import.meta.url,["./chunk.HB5NWHFP.js","./chunk.OCXY5DCD.js","./chunk.B5SJMCTT.js","./chunk.NYLKG25K.js","./chunk.TBY5IR7C.js","./chunk.ILJDLBPJ.js","./chunk.X226YATK.js","./chunk.BJUUSIQY.js","./chunk.M7KXQGQL.js","./chunk.XOZU4OFA.js","./chunk.H3EGBDW2.js","./chunk.6KJGRM7A.js","./chunk.MIE4TJRW.js","./chunk.QRQ5WPZI.js","./chunk.RD2FSSLV.js","./chunk.37RFCHSS.js","./chunk.SO6NT5K7.js","./chunk.MUSMNKE4.js","./chunk.SJQPTDAT.js","./chunk.JQ63N4MZ.js","./chunk.Z3O2VZAJ.js","./chunk.QNP5OR3P.js","./chunk.4W57E7AX.js","./chunk.A5PSEU3W.js","./chunk.SDO3U72B.js","./chunk.ZEZUKRC6.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KGMSSXZL.js")))),re=M.part((e,n)=>{let o=e.SectionDrawn;return(0,h.jsx)(o,{...n})},{what:"Make this better"}),O=(e,n,o,r,c)=>({id:"make-better",at:"start",mode:{id:"better",label:"Better UI",mark:"\u2728",claims:async t=>(await K(e.ai,t,n)).about==="look",open:o,nudges:r},prepare:c}),H="graview.better.from-scene",se=3e4;function ae(e,n){let o=n.store.schema,r=n.views.places?.()??[],c=l=>r.find(p=>p.as===l),t=e.on??(e.about.length===1?e.about[0]:void 0),s=t?.startsWith("aggregate:")?t.slice(10):void 0,u=t&&!s?n.store.graph.getNode(t):void 0,a=e.place!==void 0?c(e.place):s&&!s.includes("+")?r.find(l=>l.kind===s):void 0;if(a)return{name:a.title,to:{place:a.as},part:{name:a.title,slot:"place",kind:a.kind,place:a.as,elements:[],main:null}};let i=s&&!s.includes("+")&&o.tryDefinition(s)?s:u?.kind;if(!i)return;let d=b(o,i);return{name:d,to:{list:i},part:{name:d,slot:"list",kind:i,elements:[],main:null}}}function Se(e,n){let{aiDesk:o,keptViews:r}=n,c=e.section,t=e.element??null;if(!c&&e.face==="scene"){let a=typeof document>"u"?null:document.querySelector('[data-testid="app-menu-open"][data-pages]'),i=a?{click:()=>a.dispatchEvent(new CustomEvent(j,{detail:"pages"}))}:null,d=ae(e,n);if(!i||!d||!v(d.part,n))return null;let l=p=>{try{sessionStorage.setItem(H,JSON.stringify({to:d.to,mode:p?"describe":"choose",...p?{words:p}:{},at:Date.now()}))}catch{return}i.click()};return O(n,d.name,l,()=>[`Make \u201C${d.name}\u201D easier to read at a glance`],()=>M.prefetch())}if(c){if(!r?.revise||r.current().may.views!==!0||!F(q(c)))return null;let a=i=>D(o,i?{section:c,mode:"describe",words:i,returnTo:t}:{section:c,mode:"choose",returnTo:t});return O(n,c.name,a,()=>[`Make \u201C${c.name}\u201D easier to read at a glance`],()=>M.prefetch())}let s=e.page&&e.face==="pages"?A(e.page,n):void 0;if(!s||!v(s,n))return null;P.set(e.page.at,s);let u=a=>D(o,a?{part:s,mode:"describe",words:a,returnTo:t}:{part:s,mode:"choose",returnTo:t});return O(n,s.name,u,()=>J(s,n),()=>M.prefetch())}var ie=e=>P.get(e.at)?.elements;function be(){let e=$(),{aiDesk:n,menuAt:o}=e,r=G(),c=(0,f.useRef)({here:e,goTo:r});c.current={here:e,goTo:r},(0,f.useEffect)(()=>{let l=null;try{l=JSON.parse(sessionStorage.getItem(H)??"null")}catch{return}if(!l||Date.now()-l.at>se)return;let p=l.to;try{sessionStorage.removeItem(H)}catch{}"list"in p?c.current.goTo.list(p.list):c.current.goTo.place(p.place);let m=0,g=setInterval(()=>{m+=1;let y=document.querySelector("[data-graview-page-title]"),S=document.querySelector("[data-graview-page-main]")??y?.closest("main")??y?.parentElement?.parentElement??null;if(!S||m<4){m>150&&clearInterval(g);return}clearInterval(g);let B="place"in p?{at:S,place:p.place}:{at:S,about:[`aggregate:${p.list}`]},w=A(B,c.current.here);!w||!v(w,c.current.here)||(P.set(S,w),D(c.current.here.aiDesk,l.words?{part:w,mode:"describe",words:l.words,fromScene:!0}:{part:w,mode:l.mode,fromScene:!0}))},120);return()=>clearInterval(g)},[]);let t=z(n),s=(0,f.useId)(),u=(0,f.useMemo)(()=>l=>(t.heard.add(l),()=>void t.heard.delete(l)),[t]);(0,f.useEffect)(()=>(t.doors.push(s),E.add(t),!t.ask&&k&&k.ask.part&&Date.now()-k.at<oe&&(t.ask=k.ask),k=null,C(t),()=>{if(t.doors.splice(t.doors.indexOf(s),1),t.doors.length===0&&(E.delete(t),t.ask?.part)){let l=[...E].find(p=>!p.ask);l?(l.ask=t.ask,C(l)):k={ask:t.ask,at:Date.now()}}C(t)}),[t,s]);let a=(0,f.useSyncExternalStore)(u,()=>t.doors[0]===s,()=>!1),i=(0,f.useSyncExternalStore)(u,()=>t.ask,()=>null),d=o?.section?.elements??(o?.page?ie(o.page):void 0);return!a||!i&&!d?null:i?(0,h.jsx)(f.Suspense,{fallback:null,children:(0,h.jsx)(re,{ask:i,close:()=>D(n,null)})}):(0,h.jsx)(U,{elements:d})}export{be as SectionDoor,D as askSection,Se as sectionFor};