graview 0.1.69 → 0.1.71

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 (247) hide show
  1. package/dist/preview/chunk.23DATB5Y.js +1 -0
  2. package/dist/preview/chunk.2INDKSJI.js +1 -0
  3. package/dist/preview/chunk.3CLTABGP.js +1 -0
  4. package/dist/preview/chunk.3RRK6UTN.js +8 -0
  5. package/dist/preview/chunk.45HUV56Z.js +1 -0
  6. package/dist/preview/chunk.4HU2ILFY.js +1 -0
  7. package/dist/preview/{chunk.3VNOTHA5.js → chunk.4LWWXIM4.js} +1 -1
  8. package/dist/preview/chunk.4O64QV2Y.js +1 -0
  9. package/dist/preview/{chunk.PJL3I2IW.js → chunk.4QMAYVPU.js} +1 -1
  10. package/dist/preview/chunk.4UDST6IF.js +1 -0
  11. package/dist/preview/{chunk.6BNSDPZE.js → chunk.4YZ2A6SJ.js} +3 -3
  12. package/dist/preview/{chunk.523EFGHU.js → chunk.4ZEHLUXV.js} +1 -1
  13. package/dist/preview/{chunk.F4CDJBDS.js → chunk.5EQRIZ6I.js} +1 -1
  14. package/dist/preview/chunk.5OS4SYHE.js +1 -0
  15. package/dist/preview/{chunk.BO32A3W5.js → chunk.5PQV7GFE.js} +1 -1
  16. package/dist/preview/{chunk.PZ3KM3TY.js → chunk.5WCSQFS5.js} +1 -1
  17. package/dist/preview/{chunk.HU3KEWFO.js → chunk.64K5ELSQ.js} +1 -1
  18. package/dist/preview/{chunk.MKN7ADJB.js → chunk.67S2UWBT.js} +1 -1
  19. package/dist/preview/chunk.6A3KTD66.js +1 -0
  20. package/dist/preview/chunk.6BBUTKFC.js +23 -0
  21. package/dist/preview/chunk.6IMRCKB4.js +1 -0
  22. package/dist/preview/chunk.6L6RUOSF.js +5 -0
  23. package/dist/preview/{chunk.MH3AQO2R.js → chunk.6TBQV3NO.js} +1 -1
  24. package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
  25. package/dist/preview/{chunk.YZKHTBTC.js → chunk.7FI75ZVE.js} +1 -1
  26. package/dist/preview/{chunk.IO5VFTXC.js → chunk.7KX36ENH.js} +1 -1
  27. package/dist/preview/chunk.7LPHWJB4.js +3 -0
  28. package/dist/preview/chunk.7MDGPTYF.js +1 -0
  29. package/dist/preview/{chunk.I4H2GS4O.js → chunk.7PWLRRUS.js} +2 -2
  30. package/dist/preview/{chunk.7T2P42VW.js → chunk.7TACFS7Q.js} +1 -1
  31. package/dist/preview/{chunk.KLEKC4ZX.js → chunk.7THS3DLZ.js} +1 -1
  32. package/dist/preview/{chunk.CSVDBDRZ.js → chunk.7XGU6KVF.js} +2 -2
  33. package/dist/preview/chunk.7ZLCA3WK.js +1 -0
  34. package/dist/preview/{chunk.RRCPEHM4.js → chunk.AIFT2HNP.js} +1 -1
  35. package/dist/preview/{chunk.LMZ2WMGH.js → chunk.ARGEGV5T.js} +1 -1
  36. package/dist/preview/{chunk.4FJ4OPSJ.js → chunk.BSWR5SGX.js} +1 -1
  37. package/dist/preview/{chunk.RNAL35ID.js → chunk.BWMPC7LK.js} +1 -1
  38. package/dist/preview/{chunk.KW7PHJYX.js → chunk.CEJIH3CN.js} +1 -1
  39. package/dist/preview/chunk.CEOQY5KS.js +5 -0
  40. package/dist/preview/{chunk.G43YUGNW.js → chunk.CGRX6SDE.js} +1 -1
  41. package/dist/preview/chunk.CPK6CYKN.js +111 -0
  42. package/dist/preview/{chunk.AZRICZKT.js → chunk.CVN2XFMF.js} +1 -1
  43. package/dist/preview/chunk.D4F6QX5L.js +1 -0
  44. package/dist/preview/{chunk.JPAE6K4E.js → chunk.D6ODKMOV.js} +1 -1
  45. package/dist/preview/{chunk.CCCONK73.js → chunk.DDSAFU3B.js} +1 -1
  46. package/dist/preview/{chunk.AHYMIVBX.js → chunk.DG3YNOH3.js} +1 -1
  47. package/dist/preview/chunk.DGYWNM5U.js +1 -0
  48. package/dist/preview/{chunk.ML5EHDZG.js → chunk.DHO3QZYK.js} +1 -1
  49. package/dist/preview/{chunk.EL7XXGQY.js → chunk.DJGZOPAS.js} +1 -1
  50. package/dist/preview/chunk.DOJCYXIJ.js +1 -0
  51. package/dist/preview/{chunk.CKSRW3LA.js → chunk.DX7RGK5G.js} +1 -1
  52. package/dist/preview/{chunk.QK7EUIPL.js → chunk.EA2KYBBR.js} +1 -1
  53. package/dist/preview/chunk.EEGVI266.js +1 -0
  54. package/dist/preview/{chunk.I7OFRF6N.js → chunk.EHLV3LND.js} +2 -2
  55. package/dist/preview/{chunk.QEBD7SC4.js → chunk.EJC7ACZT.js} +4 -2
  56. package/dist/preview/{chunk.QRNKGPAD.js → chunk.EJIQDMLU.js} +1 -1
  57. package/dist/preview/chunk.EOSN5DWW.js +1 -0
  58. package/dist/preview/{chunk.4RPKCW4J.js → chunk.EPSYX2SF.js} +1 -1
  59. package/dist/preview/chunk.EUXAIG73.js +1 -0
  60. package/dist/preview/chunk.EZQK23AB.js +1 -0
  61. package/dist/preview/{chunk.KKFKSJUN.js → chunk.F5O3HR7X.js} +1 -1
  62. package/dist/preview/chunk.F6MY6WJ4.js +1 -0
  63. package/dist/preview/{chunk.GTF6EMVE.js → chunk.F7KVEWFH.js} +1 -1
  64. package/dist/preview/{chunk.EEUCRZA3.js → chunk.FIUPDGUZ.js} +1 -1
  65. package/dist/preview/chunk.FNSVGSZI.js +1 -0
  66. package/dist/preview/chunk.FOHZPYUV.js +1 -0
  67. package/dist/preview/chunk.FW6M6GIU.js +32 -0
  68. package/dist/preview/{chunk.VXPEXUQF.js → chunk.G5AF5IXL.js} +1 -1
  69. package/dist/preview/chunk.G767NLBH.js +1 -0
  70. package/dist/preview/chunk.GFBE4VNT.js +1 -0
  71. package/dist/preview/{chunk.CDSHUWSK.js → chunk.GFOZVQBQ.js} +1 -1
  72. package/dist/preview/chunk.GKYJQE5A.js +1 -0
  73. package/dist/preview/chunk.GOVRX2YX.js +4 -0
  74. package/dist/preview/{chunk.T3PELB6I.js → chunk.H33XWGAY.js} +1 -1
  75. package/dist/preview/{chunk.2AL26ZPJ.js → chunk.H4BPTMED.js} +1 -1
  76. package/dist/preview/chunk.HLKDYI6J.js +1 -0
  77. package/dist/preview/{chunk.VEQIH7HR.js → chunk.HPFEYMGP.js} +1 -1
  78. package/dist/preview/chunk.HT35PAHI.js +21 -0
  79. package/dist/preview/{chunk.VR553M6J.js → chunk.HXRHEPPJ.js} +1 -1
  80. package/dist/preview/chunk.IPKODEOZ.js +1 -0
  81. package/dist/preview/{chunk.EP7YT7LT.js → chunk.IXYG65TM.js} +1 -1
  82. package/dist/preview/chunk.IZDB777E.js +1 -0
  83. package/dist/preview/{chunk.VBBH5R5T.js → chunk.JAPTTM6Y.js} +1 -1
  84. package/dist/preview/chunk.JCKIJSW7.js +25 -0
  85. package/dist/preview/{chunk.4R7H3GIL.js → chunk.JLNTE5CH.js} +2 -2
  86. package/dist/preview/chunk.JNK5WBSU.js +1 -0
  87. package/dist/preview/chunk.JREA2XDG.js +1 -0
  88. package/dist/preview/{chunk.WV6SP6IJ.js → chunk.KBJ3UUER.js} +1 -1
  89. package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
  90. package/dist/preview/{chunk.ISZFRLNJ.js → chunk.KJPLX72N.js} +1 -1
  91. package/dist/preview/chunk.KZUHXOZU.js +21 -0
  92. package/dist/preview/{chunk.6ZFYFT5A.js → chunk.L3MLGFIS.js} +1 -1
  93. package/dist/preview/{chunk.KEGL6NBD.js → chunk.L6P55HFW.js} +1 -1
  94. package/dist/preview/{chunk.N7A3T5QU.js → chunk.LDWWUKKX.js} +1 -1
  95. package/dist/preview/{chunk.CA2SYEYE.js → chunk.LHCGC3K6.js} +1 -1
  96. package/dist/preview/{chunk.BQORHDAH.js → chunk.LNKY6MT4.js} +1 -1
  97. package/dist/preview/chunk.LQ5J6YQW.js +1 -0
  98. package/dist/preview/{chunk.47VEV4BX.js → chunk.MEAUTBVM.js} +1 -1
  99. package/dist/preview/chunk.MEBKTW7H.js +17 -0
  100. package/dist/preview/{chunk.WQ7K5O2I.js → chunk.MFMC35ET.js} +1 -1
  101. package/dist/preview/chunk.MJ4T6YXI.js +1 -0
  102. package/dist/preview/chunk.MKJV3BM5.js +240 -0
  103. package/dist/preview/chunk.ML4X7VVK.js +1 -0
  104. package/dist/preview/chunk.MM7MLBGB.js +1 -0
  105. package/dist/preview/{chunk.5MOXQUZH.js → chunk.MQNW3O67.js} +1 -1
  106. package/dist/preview/{chunk.J2N7EKMX.js → chunk.MT252WP4.js} +1 -1
  107. package/dist/preview/chunk.MWWNKM3I.js +1 -0
  108. package/dist/preview/chunk.N3MXLORL.js +3 -0
  109. package/dist/preview/chunk.NH3VXTGX.js +1 -0
  110. package/dist/preview/{chunk.B422DSYN.js → chunk.NI4OPHTL.js} +1 -1
  111. package/dist/preview/chunk.NNGG7RCO.js +1 -0
  112. package/dist/preview/{chunk.LKM2R5UF.js → chunk.NXHEOHRR.js} +1 -1
  113. package/dist/preview/{chunk.TQQDUJLX.js → chunk.O5RPSUXV.js} +1 -1
  114. package/dist/preview/{chunk.FE3SINPK.js → chunk.OKHXXIMN.js} +1 -1
  115. package/dist/preview/chunk.ONAH6MC4.js +1 -0
  116. package/dist/preview/chunk.OOQG2AEF.js +1 -0
  117. package/dist/preview/{chunk.ZQYHNFRZ.js → chunk.OPMGQS5J.js} +1 -1
  118. package/dist/preview/{chunk.UHJSZ2XZ.js → chunk.OUF2QFZL.js} +1 -1
  119. package/dist/preview/{chunk.CUEIGKFG.js → chunk.OVSKPBPS.js} +1 -1
  120. package/dist/preview/chunk.OYMN3IFX.js +1 -0
  121. package/dist/preview/{chunk.QNC2OKLF.js → chunk.P43LPXXJ.js} +1 -1
  122. package/dist/preview/chunk.PGT4ZQDG.js +4 -0
  123. package/dist/preview/{chunk.WFJCC6G3.js → chunk.PQTXM4VY.js} +1 -1
  124. package/dist/preview/{chunk.KHKCTVHD.js → chunk.Q6GEPVQ7.js} +1 -1
  125. package/dist/preview/chunk.QDDDKEBH.js +1 -0
  126. package/dist/preview/{chunk.26RYER7Y.js → chunk.QJJWAYHB.js} +1 -1
  127. package/dist/preview/chunk.QK4QZVQG.js +1 -0
  128. package/dist/preview/{chunk.CLIC2QBA.js → chunk.QKRQPUCE.js} +1 -1
  129. package/dist/preview/{chunk.DU76ASS4.js → chunk.QNWGDG2Z.js} +2 -2
  130. package/dist/preview/{chunk.447RWLS7.js → chunk.QVBP4UZG.js} +2 -2
  131. package/dist/preview/chunk.RDUGUC7R.js +1 -0
  132. package/dist/preview/{chunk.EK3JXEZL.js → chunk.RHIP2UYE.js} +1 -1
  133. package/dist/preview/chunk.RJ7VSWTA.js +87 -0
  134. package/dist/preview/{chunk.JHAMSDAI.js → chunk.RO3D2RNP.js} +1 -1
  135. package/dist/preview/{chunk.C6CT6F4C.js → chunk.S2BMI23H.js} +1 -1
  136. package/dist/preview/{chunk.ZRBGYXAO.js → chunk.SGYZM6ZU.js} +1 -1
  137. package/dist/preview/{chunk.UPOYRCKI.js → chunk.SPJ34VHA.js} +1 -1
  138. package/dist/preview/{chunk.UAEOCWSG.js → chunk.T6KOL7TW.js} +1 -1
  139. package/dist/preview/{chunk.AUNQNTKY.js → chunk.T6UJEXFL.js} +3 -2
  140. package/dist/preview/chunk.TBEKEHFS.js +1 -0
  141. package/dist/preview/chunk.TO3ZKCA2.js +1 -0
  142. package/dist/preview/{chunk.FIY4RUK5.js → chunk.TQ3MNB6K.js} +1 -1
  143. package/dist/preview/{chunk.GG47EIKO.js → chunk.TRP66PHK.js} +1 -1
  144. package/dist/preview/{chunk.LGNGFG5V.js → chunk.TSZ2S3VG.js} +1 -1
  145. package/dist/preview/chunk.TTM5GQ2U.js +1 -0
  146. package/dist/preview/chunk.TUBY6SV3.js +1 -0
  147. package/dist/preview/{chunk.ZE5RSKXF.js → chunk.U5KJQFAP.js} +1 -1
  148. package/dist/preview/chunk.U6V4KZF5.js +1 -0
  149. package/dist/preview/chunk.UJ7RTNT4.js +1 -0
  150. package/dist/preview/{chunk.HCX6KPRF.js → chunk.UQZ2P6KD.js} +1 -1
  151. package/dist/preview/{chunk.CLZYNFFH.js → chunk.UZKBFI52.js} +1 -1
  152. package/dist/preview/{chunk.66TRDXYR.js → chunk.V5JB5UJS.js} +2 -2
  153. package/dist/preview/{chunk.3TKIZGC7.js → chunk.VDFQFLTU.js} +1 -1
  154. package/dist/preview/{chunk.IY3DV52G.js → chunk.VGYG2IBZ.js} +1 -1
  155. package/dist/preview/chunk.VICBF3MQ.js +2 -0
  156. package/dist/preview/{chunk.EQZPEOIW.js → chunk.VL3YDD7D.js} +1 -1
  157. package/dist/preview/{chunk.IYHY4VEC.js → chunk.VPFUOTY7.js} +1 -1
  158. package/dist/preview/chunk.VUDNQOOX.js +1 -0
  159. package/dist/preview/{chunk.P26ATAAI.js → chunk.VVIQSFM4.js} +1 -1
  160. package/dist/preview/{chunk.DO3FQM6R.js → chunk.W332P5T3.js} +6 -6
  161. package/dist/preview/{chunk.POKGLN4T.js → chunk.W3TJF4EH.js} +1 -1
  162. package/dist/preview/{chunk.D5JZQZ74.js → chunk.W5O5F4FT.js} +1 -1
  163. package/dist/preview/chunk.W6L2VAJG.js +2 -0
  164. package/dist/preview/{chunk.O7NYSO6F.js → chunk.WGH2P2YL.js} +1 -1
  165. package/dist/preview/{chunk.OD5QZHRC.js → chunk.WS5ORRGS.js} +1 -1
  166. package/dist/preview/{chunk.VQDL4EEP.js → chunk.WU6D3SPL.js} +1 -1
  167. package/dist/preview/{chunk.MV27WMNW.js → chunk.X2UYEA7H.js} +1 -1
  168. package/dist/preview/chunk.X45EITTK.js +18 -0
  169. package/dist/preview/{chunk.TAJBXG5U.js → chunk.X7U3JMBR.js} +1 -1
  170. package/dist/preview/chunk.XSM4OTF4.js +1 -0
  171. package/dist/preview/{chunk.DRAPVGQZ.js → chunk.XTHSPLZZ.js} +1 -1
  172. package/dist/preview/{chunk.VQOYFBEV.js → chunk.Y5WQD6KV.js} +1 -1
  173. package/dist/preview/chunk.YXVUJ3NB.js +1 -0
  174. package/dist/preview/{chunk.NRECR3NQ.js → chunk.Z22C2JJ4.js} +1 -1
  175. package/dist/preview/{chunk.TQRC5VAM.js → chunk.Z2BCOZDZ.js} +1 -1
  176. package/dist/preview/{chunk.S2NQRD6W.js → chunk.Z3TK2LJM.js} +1 -1
  177. package/dist/preview/chunk.ZGLOXN7O.js +1 -0
  178. package/dist/preview/{chunk.R7POSVUK.js → chunk.ZLQIGZXO.js} +2 -2
  179. package/dist/preview/{chunk.YJ4PFOPC.js → chunk.ZONRIOIA.js} +1 -1
  180. package/dist/preview/{chunk.QVCKTDG3.js → chunk.ZY3NAJDM.js} +1 -1
  181. package/dist/preview/index.html +55 -55
  182. package/dist/preview/page.js +2 -2
  183. package/package.json +7 -7
  184. package/dist/preview/chunk.2WFOKJB4.js +0 -1
  185. package/dist/preview/chunk.32SHA3EY.js +0 -1
  186. package/dist/preview/chunk.3D37E2G5.js +0 -1
  187. package/dist/preview/chunk.3PT3BU6K.js +0 -1
  188. package/dist/preview/chunk.3XTIYX6M.js +0 -1
  189. package/dist/preview/chunk.4O7WYLCK.js +0 -1
  190. package/dist/preview/chunk.5DU6FA5R.js +0 -1
  191. package/dist/preview/chunk.5TWRTGP6.js +0 -1
  192. package/dist/preview/chunk.6BR2SUAE.js +0 -1
  193. package/dist/preview/chunk.6TDVNWFU.js +0 -17
  194. package/dist/preview/chunk.6XBQDXT6.js +0 -3
  195. package/dist/preview/chunk.7L3I776Z.js +0 -1
  196. package/dist/preview/chunk.7OLKVOS6.js +0 -1
  197. package/dist/preview/chunk.AG7WJYM5.js +0 -3
  198. package/dist/preview/chunk.AMAOZVEO.js +0 -1
  199. package/dist/preview/chunk.AMV2ILR6.js +0 -1
  200. package/dist/preview/chunk.B5EFNTDA.js +0 -1
  201. package/dist/preview/chunk.BBLIT7S7.js +0 -1
  202. package/dist/preview/chunk.BSQI3KM2.js +0 -1
  203. package/dist/preview/chunk.CYEPHT7V.js +0 -1
  204. package/dist/preview/chunk.D3SWJ7OS.js +0 -1
  205. package/dist/preview/chunk.DHPXRDT5.js +0 -5
  206. package/dist/preview/chunk.DKUEZPGR.js +0 -1
  207. package/dist/preview/chunk.FWXW4T4I.js +0 -25
  208. package/dist/preview/chunk.GF5CZPZ7.js +0 -1
  209. package/dist/preview/chunk.GPBHUIZQ.js +0 -2
  210. package/dist/preview/chunk.GVFGS2HY.js +0 -1
  211. package/dist/preview/chunk.HGH27XZG.js +0 -23
  212. package/dist/preview/chunk.HMJXB6KC.js +0 -5
  213. package/dist/preview/chunk.HTEQCRVP.js +0 -1
  214. package/dist/preview/chunk.I7KN732Z.js +0 -2
  215. package/dist/preview/chunk.IAVIYJTL.js +0 -1
  216. package/dist/preview/chunk.IPKESOIU.js +0 -21
  217. package/dist/preview/chunk.IRNEWNUB.js +0 -1
  218. package/dist/preview/chunk.J7O23NKZ.js +0 -22
  219. package/dist/preview/chunk.JDUA5PH2.js +0 -1
  220. package/dist/preview/chunk.JN3WZGJY.js +0 -1
  221. package/dist/preview/chunk.JQEXH23N.js +0 -1
  222. package/dist/preview/chunk.KVQYOFDV.js +0 -1
  223. package/dist/preview/chunk.LAVLPYSC.js +0 -1
  224. package/dist/preview/chunk.MATUPDZ3.js +0 -1
  225. package/dist/preview/chunk.MD3N26BC.js +0 -23
  226. package/dist/preview/chunk.MHHNO3O2.js +0 -1
  227. package/dist/preview/chunk.MUWI54IP.js +0 -1
  228. package/dist/preview/chunk.NLZHNPDU.js +0 -93
  229. package/dist/preview/chunk.NSAGOOJW.js +0 -1
  230. package/dist/preview/chunk.NYLKG25K.js +0 -4
  231. package/dist/preview/chunk.OWO3OV62.js +0 -1
  232. package/dist/preview/chunk.ROYCJXPE.js +0 -1
  233. package/dist/preview/chunk.RZ73YG5K.js +0 -1
  234. package/dist/preview/chunk.SAWASNDO.js +0 -1
  235. package/dist/preview/chunk.SCVKHGO3.js +0 -1
  236. package/dist/preview/chunk.SM37MNS2.js +0 -1
  237. package/dist/preview/chunk.T2BZBR7S.js +0 -50
  238. package/dist/preview/chunk.TLPCYKLW.js +0 -3
  239. package/dist/preview/chunk.U563J5IM.js +0 -1
  240. package/dist/preview/chunk.U6QXLNHF.js +0 -15
  241. package/dist/preview/chunk.VBYJBW32.js +0 -1
  242. package/dist/preview/chunk.VHLL6VC6.js +0 -1
  243. package/dist/preview/chunk.W3WXI5B3.js +0 -1
  244. package/dist/preview/chunk.W43XWQRC.js +0 -1
  245. package/dist/preview/chunk.WJHLE73Y.js +0 -111
  246. package/dist/preview/chunk.ZT3ZG52B.js +0 -1
  247. package/dist/preview/chunk.ZU3RPI34.js +0 -1
@@ -1,3 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ze,b as et}from"./chunk.KHKCTVHD.js";import{a as _e,b as Ve,c as je,d as Ye,e as Ke,f as Ge,g as Xe,j as Qe,p as Je,q as xe,r as de,s as Ce}from"./chunk.DO3FQM6R.js";import{d as Ue}from"./chunk.VR553M6J.js";import{A as qe,x as Fe}from"./chunk.SCVKHGO3.js";import{m as ze}from"./chunk.NLZHNPDU.js";import{G as ke,La as Se,W as Y,ea as We}from"./chunk.FWXW4T4I.js";import{a as ve}from"./chunk.SDO3U72B.js";import{la as $e,td as W}from"./chunk.DHPXRDT5.js";import{b as O}from"./chunk.AJZBJBMO.js";var f=O(ke(),1);var G=O(ke(),1);var K=O(Y(),1),N=e=>(e??"").replace(/\s+/g," ").trim();function Et(e){let t=[e];e.shadowRoot&&t.push(e.shadowRoot);for(let a of e.querySelectorAll("[data-worker-view]"))a.shadowRoot&&t.push(a.shadowRoot);return t}function Pt(e){return e instanceof HTMLElement?e.innerText??e.textContent??"":[...e.children].map(t=>t instanceof HTMLElement?t.innerText??t.textContent??"":t.textContent??"").join(" ")}var Tt="li, tr, article, [data-graview-listed], [data-graview-record], [data-record], [data-key]",Rt=/^[\s·•|,:;–—\-+…✓✔×↓↑▸▾☆★⋯]*$/u;function Dt(e,t,a=[]){let c=[],p=(e.ownerDocument??document).createTreeWalker(e,NodeFilter.SHOW_TEXT),l=new Map,i=[...e.querySelectorAll(Tt)].filter(o=>!o.contains(t)&&a.some(s=>o.contains(s)));for(let o=p.nextNode();o;o=p.nextNode()){let s=o.parentElement;if(!s||t.contains(s)||i.some(d=>d.contains(s))||s.closest("button, input, select, textarea, [role='button'], nav, [hidden], [aria-hidden='true'], script, style"))continue;let r=s.closest("a[href]");r&&!r.contains(t)||l.set(s,(l.get(s)??"")+(o.textContent??""))}for(let[o,s]of[...l].flatMap(([r,d])=>d.split(/\s+·\s+/).map(n=>[r,n]))){let r=N(s);if(!(!r||r.length>40||Rt.test(r)||!/[\p{L}\p{N}]/u.test(r)||o.getClientRects().length===0)&&(c.includes(r)||c.push(r),c.length>=6))break}return c}var Mt=/^[\s\p{So}\p{Sk}\p{Sm}\uFE0F·•|–—✓✔×▸▾…-]+|[\s\p{So}\p{Sk}\p{Sm}\uFE0F·•|–—✓✔×▸▾…-]+$/gu,tt=e=>N(e).replace(Mt,"").toLowerCase();function At(e){let t=[],a=(e.ownerDocument??document).createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let c=a.nextNode();c;c=a.nextNode()){let p=N(c.textContent);p&&!c.parentElement?.closest("button, script, style, [hidden], [aria-hidden='true']")&&t.push(p)}return t}function nt(e,t){if(!e)return[];let a=[],c=p=>{let l=N(p);l.length>1&&l.length<80&&!a.some(i=>i.toLowerCase()===l.toLowerCase())&&a.push(l)};for(let p of e.querySelectorAll("[data-key], [data-record]")){let l=p.getAttribute("data-record")??p.getAttribute("data-key")??"",i=At(p),o=l&&t?t(l):void 0;if(o&&i.join(" ").toLowerCase().includes(N(o).toLowerCase()))c(o);else{if(!p.hasAttribute("data-record")&&p.querySelector("[data-record]"))continue;i.length===1&&c(i[0])}}return a.slice(0,40)}function rt(e){let t=[];for(let a of e)for(let c of[a,...a.querySelectorAll("*")]){if(!c.matches("h1, h2, h3, h4, h5, h6, [role='heading']"))continue;let p=c.cloneNode(!0);for(let i of p.querySelectorAll("span"))/^[\s·\d]+$/.test(i.textContent??"")&&i.remove();let l=N(p.textContent).replace(/^[▸▾]\s*/,"");l&&!t.includes(l)&&t.push(l)}return t}function ce(e,t){if(!e?.isConnected)return{headings:[],records:[],text:""};let a=Et(e),c=[],p=[];for(let r of a)for(let d of r.querySelectorAll("h1, h2, h3, [role='heading']")){if(d.closest("[data-graview-popover], [hidden], [aria-hidden='true'], nav"))continue;let n=d.cloneNode(!0);for(let b of n.querySelectorAll("span"))/^[\s·\d]+$/.test(b.textContent??"")&&b.remove();let h=N(n.textContent).replace(/^[▸▾]\s*/,"");h&&(c.push(h),p.push({element:d,said:h}))}let l=new Map,i=new Map;for(let r of t){let d=tt(r);if(!d||l.has(r))continue;let n,h=[];for(let b of a)for(let u of b.querySelectorAll("a, li, p, span, h2, h3, h4, h5, h6, strong, div, button, td"))tt(u.textContent)===d&&(h.push(u),(!n||n.contains(u))&&(n=u));n&&(l.set(r,n),i.set(r,h))}let o=[...l.values()],s=[];for(let[r,d]of l){let n=d;for(let w=d.parentElement;w&&w!==e&&!(w instanceof HTMLBodyElement)&&!(o.some(D=>D!==d&&w.contains(D))||w.matches("main, section, ul, ol, table, tbody, [data-graview-page]"));w=w.parentElement)n=w;let h,b=new Set(t.map(w=>N(w).toLowerCase()));for(let w of p)w.element.getRootNode()!==d.getRootNode()||n.contains(w.element)||w.element.contains(d)||b.has(w.said.toLowerCase())||w.element.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_FOLLOWING&&(h=w.said);let u=d.getBoundingClientRect(),E=Number.parseFloat(getComputedStyle(d).fontSize)||16,q=[...i].flatMap(([w,D])=>w===r?[]:D),B=n;for(let w=n.parentElement;w&&w!==e&&!(w instanceof HTMLBodyElement)&&!(q.some(D=>w.contains(D))||w.matches("main, [data-graview-page], [data-graview-view-root]"));w=w.parentElement)B=w;let te=B instanceof HTMLElement?B.innerText??B.textContent??"":B.textContent??"",v=d.matches("h1, [data-graview-page-title]")||d.closest("h1, [data-graview-page-title]")!==null,$=!v&&n!==d&&[...n.querySelectorAll("button, [role='button'], [role='checkbox'], [aria-pressed], input[type='checkbox'], [data-act]")].some(w=>!w.contains(d)&&!d.contains(w)),A=!v&&d.closest("a[href], [data-record]")!==null;s.push({label:r,top:Math.round(u.top),left:Math.round(u.left),size:E,facts:v?[]:Dt(n,d,q),row:N(te),...h?{under:h}:{},...$?{presses:$}:{},...A?{opens:A}:{}})}return s.sort((r,d)=>r.top-d.top||r.left-d.left),{headings:c,records:s,text:a.map(Pt).join(" ")}}function Ht(e,t,a=0){(0,G.useLayoutEffect)(()=>{let c=0,p=()=>{let l=t.current,i=e?.isConnected?de([e]):null;if(l&&i){let o=Math.max(i.top,0),s=Math.min(i.bottom,innerHeight);l.style.display=s>o?"grid":"none",l.style.left=`${Math.round(i.left-a)}px`,l.style.top=`${Math.round(o-a)}px`,l.style.width=`${Math.round(i.width+2*a)}px`,l.style.height=`${Math.round(s-o+2*a)}px`}c=requestAnimationFrame(p)};return p(),()=>cancelAnimationFrame(c)},[e,t,a])}var It=`@keyframes graview-redesign{0%{background-position:100% 0}100%{background-position:-100% 0}}
2
- [data-graview-redesigning]{background:linear-gradient(90deg,var(--graview-ground) 0%,color-mix(in srgb,var(--graview-panel) 70%,var(--graview-accent) 6%) 50%,var(--graview-ground) 100%);background-size:200% 100%;animation:graview-redesign 1.6s linear infinite}
3
- @media (prefers-reduced-motion: reduce){[data-graview-redesigning]{animation:none}}`;function ot({over:e,name:t,said:a}){let c=(0,G.useRef)(null);return Ht(e,c,2),(0,K.jsxs)("div",{ref:c,"data-graview-redesigning":"","data-testid":"redesigning","data-graview-popover":"",style:Lt,children:[(0,K.jsx)("style",{children:It}),(0,K.jsxs)("p",{role:"status","aria-live":"polite",style:Ot,children:[(0,K.jsx)("span",{"aria-hidden":"true",style:Nt,children:"\u2726"})," ",a??`Graview is redesigning \u201C${t}\u201D\u2026`]})]})}var Lt={position:"fixed",display:"none",placeItems:"center",boxSizing:"border-box",borderRadius:12,zIndex:W("popover"),pointerEvents:"auto",overflow:"hidden"},Ot={margin:0,padding:"8px 14px",borderRadius:999,fontSize:"0.9375rem",color:"var(--graview-ink)",background:"var(--graview-float, var(--graview-panel))",border:"1px solid var(--graview-edge)",boxShadow:"var(--graview-lift-low)",position:"sticky",top:16},Nt={color:"var(--graview-accent)"},Pn={position:"fixed",left:"max(12px, calc(50% - 440px))",right:"max(12px, calc(50% - 440px))",bottom:12,zIndex:W("popover"),boxSizing:"border-box",display:"grid",gap:8,padding:"10px 12px",borderRadius:14,border:"1px solid var(--graview-edge)",background:"var(--graview-float, var(--graview-panel))",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)",fontSize:"0.875rem"};var ue={minHeight:34,padding:"0 12px",font:"inherit",borderRadius:8,cursor:"pointer"},Tn={...ue,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)",border:"1px solid var(--graview-accent)"},Rn={...ue,color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"};var Dn={...ue,minHeight:28,padding:"0 10px",borderRadius:999,border:0,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)"},Mn={...ue,minHeight:28,padding:"0 10px",borderRadius:999,border:0,color:"var(--graview-ink)",background:"transparent"};var P=O(ke(),1);var m=O(Y(),1),Bt=640,Ee=372,$t=1100,at=()=>typeof innerWidth!="number"||innerWidth>=$t?"side":innerWidth>=Bt?"drawer":"sheet";function Wt(){let e=document.querySelector('[data-testid="app-bar"]');return e||([...document.querySelectorAll("header")].find(t=>{let a=t.getBoundingClientRect();return a.top<=1&&a.width>=innerWidth*.8&&a.height>0})??null)}function zt(e){let t=document.querySelector("[data-graview-page-main], main");for(;t?.parentElement&&t.parentElement!==document.body&&!(e&&t.parentElement.contains(e));)t=t.parentElement;return t}function Ft(e){let[t,a]=(0,P.useState)(at);return(0,P.useLayoutEffect)(()=>{let c=document.body.style,p=c.paddingBottom,l=null,i="",o=0,s=(d,n)=>{l&&l!==d&&(l.style.paddingRight=i),d&&d!==l&&(i=d.style.paddingRight),l=d,l&&(l.style.paddingRight=n?`${Ee}px`:i)},r=()=>{let d=at();a(d);let n=Wt(),h=Math.max(0,Math.round(n?.getBoundingClientRect().bottom??0));e.current&&d!=="sheet"&&(e.current.style.top=`${h}px`),s(zt(n),d==="side"),c.paddingBottom=d==="sheet"?`${Math.round((e.current?.getBoundingClientRect().height??0)+16)}px`:p,o=requestAnimationFrame(r)};return r(),()=>{cancelAnimationFrame(o),s(null,!1),c.paddingBottom=p}},[e]),t}var qt=e=>`${Math.floor(e/6e4)}:${String(Math.floor(e%6e4/1e3)).padStart(2,"0")}`;function lt(e){let t=(0,P.useRef)(null),a=(0,P.useRef)(null),c=(0,P.useRef)(null),[p,l]=(0,P.useState)(""),[,i]=(0,P.useState)(0),o=Ft(t);(0,P.useEffect)(()=>{if(!e.working)return;let n=setInterval(()=>i(h=>h+1),1e3);return()=>clearInterval(n)},[e.working]),(0,P.useEffect)(()=>{a.current&&(a.current.scrollTop=a.current.scrollHeight)},[e.talk.length,e.steps.length]),(0,P.useEffect)(()=>{e.working||c.current?.focus({preventScroll:!0})},[e.working,e.phase]);let s=e.talk.map(n=>n.who).lastIndexOf("person"),r=e.steps.length>0?(0,m.jsx)("li",{"data-testid":"better-steps",style:Xt,children:(0,m.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:3},children:e.steps.map((n,h)=>{let b=e.working&&h===e.steps.length-1;return(0,m.jsxs)("li",{"data-testid":"better-step","data-step-kind":n.kind,style:{display:"flex",gap:6,alignItems:"baseline",color:b?"var(--graview-ink)":"var(--graview-ink-muted)"},children:[(0,m.jsx)("span",{"aria-hidden":"true",style:{width:14,flex:"none",color:n.kind==="check"||n.kind==="stuck"?"var(--graview-warn)":"var(--graview-accent)"},children:b?"\u2026":n.kind==="check"||n.kind==="stuck"?"!":"\u2713"}),(0,m.jsx)("span",{children:n.text})]},`s${h}`)})})}):null,d=e.talk.length===0;return(0,m.jsxs)("aside",{ref:t,role:"complementary","aria-label":`Change how \u201C${e.name}\u201D looks`,"data-testid":"better-panel","data-better-phase":e.phase,"data-better-dock":o,"data-graview-popover":"",style:o==="sheet"?_t:o==="drawer"?Ut:ct,children:[(0,m.jsxs)("header",{style:jt,children:[(0,m.jsxs)("p",{style:{margin:0,fontWeight:600},children:["Change how \u201C",e.name,"\u201D looks"]}),(0,m.jsx)("button",{type:"button","data-testid":"better-close","aria-label":"Close",onClick:e.close,style:Qt,children:"\xD7"})]}),(0,m.jsx)("p",{"data-testid":"better-scope",style:it,children:e.scope}),e.about?(0,m.jsxs)("p",{"data-testid":"better-about",style:Vt,children:["About: ",e.about]}):null,(0,m.jsxs)("ol",{ref:a,"data-testid":"better-talk",style:Yt,children:[e.talk.map((n,h)=>(0,m.jsxs)(P.Fragment,{children:[(0,m.jsx)("li",{"data-testid":"better-message","data-who":n.who,style:n.who==="person"?Kt:Gt,children:n.said}),h===s?r:null]},`t${h}`)),s<0?r:null]}),e.working?(0,m.jsxs)("div",{style:ee,children:[(0,m.jsxs)("p",{role:"status","aria-live":"polite","data-testid":"better-working",style:{margin:0,flex:1,color:"var(--graview-ink-muted)"},children:["Graview is working on \u201C",e.name,"\u201D \xB7 ",(0,m.jsx)("span",{"data-testid":"better-time",children:qt(Date.now()-e.since)})]}),(0,m.jsx)("button",{type:"button","data-testid":"better-stop",onClick:e.stop,style:z,children:"Stop"})]}):null,e.draft&&!e.working?(0,m.jsxs)("div",{"data-testid":"better-draft",style:{flexShrink:0,display:"grid",gap:6},children:[(0,m.jsx)("p",{"data-testid":"better-changed",style:{margin:0},children:e.draft.said}),(0,m.jsxs)("div",{style:ee,children:[(0,m.jsx)("div",{role:"group","aria-label":"Compare",style:Zt,children:["Before","After"].map(n=>{let h=n==="Before"?e.draft.before:!e.draft.before;return(0,m.jsx)("button",{type:"button","data-testid":`better-${n.toLowerCase()}`,"aria-pressed":h,onClick:()=>e.compare(n==="Before"),style:h?en:tn,children:n},n)})}),(0,m.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:6},children:[(0,m.jsx)("button",{type:"button","data-testid":"better-keep",onClick:e.keep,style:st,children:"Keep"}),(0,m.jsx)("button",{type:"button","data-testid":"better-discard",onClick:e.discard,style:z,children:"Discard"})]})]})]}):null,e.stuck&&!e.working?(0,m.jsxs)("div",{"data-testid":"better-stuck",style:ee,children:[e.stuck.keepAnyway?(0,m.jsx)("button",{type:"button","data-testid":"better-keep-anyway",onClick:e.stuck.keepAnyway,style:z,children:"Keep anyway"}):null,(0,m.jsx)("button",{type:"button","data-testid":"better-stuck-stop",onClick:e.stuck.stop,style:z,children:"Stop"})]}):null,e.children,e.kept&&!e.working?(0,m.jsxs)("div",{"data-testid":"better-kept",style:ee,children:[(0,m.jsx)("p",{style:{margin:0,flex:1},children:e.kept.note?/^kept\b/i.test(e.kept.note.trim())?e.kept.note.trim():`Kept. ${e.kept.note}`:"Kept."}),e.kept.undo?(0,m.jsx)("button",{type:"button","data-testid":"better-undo",onClick:e.kept.undo,style:z,children:"Undo"}):null]}):null,d&&!e.working?(0,m.jsxs)("div",{style:ee,children:[(0,m.jsx)("button",{type:"button","data-testid":"better-just",onClick:e.just,style:z,children:"Make it easier to read"}),(0,m.jsx)("button",{type:"button","data-testid":"better-point",onClick:e.point,style:z,children:"Point at a part\u2026"})]}):null,e.pointed&&!e.working?(0,m.jsxs)("p",{"data-testid":"better-pointed",style:it,children:["You pointed at ",e.pointed,"."]}):null,(0,m.jsxs)("form",{onSubmit:n=>{n.preventDefault(),!(!p.trim()||e.working)&&(e.ask(p.trim()),l(""))},style:{flexShrink:0,display:"flex",gap:6},children:[(0,m.jsx)("label",{htmlFor:"graview-better-panel-words",style:ze,children:"Tell Graview what to change"}),(0,m.jsx)("input",{id:"graview-better-panel-words",ref:c,"data-testid":"better-words",value:p,disabled:e.working,onChange:n=>l(n.target.value),placeholder:d?"What should change?":"Tell Graview what to change\u2026",style:Jt}),(0,m.jsx)("button",{type:"submit",disabled:e.working||!p.trim(),"data-testid":"better-send",style:st,children:"Send"})]})]})}var dt={position:"fixed",zIndex:W("popover"),boxSizing:"border-box",display:"flex",flexDirection:"column",gap:10,padding:14,margin:0,fontSize:"0.875rem",lineHeight:1.45,color:"var(--graview-ink)",background:"var(--graview-panel)",overflow:"hidden"},ct={...dt,top:0,right:0,bottom:0,width:Ee,borderLeft:"1px solid var(--graview-edge)"},Ut={...ct,width:`min(${Ee}px, 86vw)`,boxShadow:"var(--graview-lift-high, -12px 0 32px rgba(0,0,0,0.18))"},_t={...dt,left:0,right:0,bottom:0,maxHeight:"55vh",borderTop:"1px solid var(--graview-edge)",borderRadius:"14px 14px 0 0",boxShadow:"var(--graview-lift-high, 0 -12px 32px rgba(0,0,0,0.18))"},Vt={flexShrink:0,margin:0,justifySelf:"start",alignSelf:"flex-start",padding:"2px 10px",borderRadius:999,fontSize:"0.8125rem",color:"var(--graview-ink)",background:"var(--graview-ground)",border:"1px solid var(--graview-edge)"},jt={flexShrink:0,display:"flex",alignItems:"center",gap:8,justifyContent:"space-between"},it={flexShrink:0,margin:0,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},Yt={margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:8,overflowY:"auto",flex:"1 1 0",minHeight:0},ut={padding:"7px 10px",borderRadius:10,maxWidth:"88%",whiteSpace:"pre-wrap",flex:"none"},Kt={...ut,alignSelf:"flex-end",background:"color-mix(in srgb, var(--graview-accent) 12%, var(--graview-panel))"},Gt={...ut,alignSelf:"flex-start",background:"var(--graview-ground)"},Xt={flex:"none",padding:"6px 10px",borderRadius:10,border:"1px dashed var(--graview-edge)",fontSize:"0.8125rem"},ee={flexShrink:0,display:"flex",flexWrap:"wrap",alignItems:"center",gap:6},ge={minHeight:32,padding:"0 12px",borderRadius:8,fontSize:"0.8125rem",cursor:"pointer"},st={...ge,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)",border:"1px solid var(--graview-accent)"},z={...ge,color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"},Qt={...z,minHeight:28,padding:"0 9px",fontSize:"1rem",lineHeight:1},Jt={flex:"1 1 auto",minWidth:0,minHeight:34,padding:"0 10px",borderRadius:8,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)",fontSize:"0.875rem"},Zt={display:"inline-flex",border:"1px solid var(--graview-edge)",borderRadius:999,padding:2},en={...ge,minHeight:28,borderRadius:999,border:"none",color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)"},tn={...ge,minHeight:28,borderRadius:999,border:"none",color:"var(--graview-ink)",background:"transparent"};var C=O(Y(),1);var Pe=Se(ve(()=>(__graviewPreload(import.meta.url,["./chunk.DU76ASS4.js","./chunk.BJUUSIQY.js","./chunk.ZE5RSKXF.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KW7PHJYX.js")))),nn=Pe.part((e,t)=>(0,C.jsx)(e.RateTelling,{...t}),{quiet:!0});function Yn({ask:e,open:t,close:a}){return e?.part?(0,C.jsx)(on,{ask:e,close:a},e.at):e?.section?(0,C.jsx)(un,{ask:e,close:a},e.at):t?(0,C.jsx)(Ce,{elements:t}):null}var rn=Se(ve(()=>(__graviewPreload(import.meta.url,["./chunk.AG7WJYM5.js","./chunk.KHKCTVHD.js","./chunk.DO3FQM6R.js","./chunk.NYLKG25K.js","./chunk.TBY5IR7C.js","./chunk.VR553M6J.js","./chunk.DU76ASS4.js","./chunk.BJUUSIQY.js","./chunk.UPOYRCKI.js","./chunk.XOZU4OFA.js","./chunk.WV6SP6IJ.js","./chunk.ZE5RSKXF.js","./chunk.MIE4TJRW.js","./chunk.SCVKHGO3.js","./chunk.RD2FSSLV.js","./chunk.AZRICZKT.js","./chunk.MH3AQO2R.js","./chunk.J2N7EKMX.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.447RWLS7.js")))),on=rn.part((e,t)=>(0,C.jsx)(e.PageCard,{...t}),{what:"Make this better"}),an=360,R=12;function Kn(e,t){let a={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},c=Math.min(an,a.width-2*R),p=e.getBoundingClientRect().height,l=s=>Math.max(R,Math.min(s,a.height-p-R)),i=(a.width-c)/2,o=l(72);t&&t.width>0&&(t.right+R+c<=a.width-R?[i,o]=[t.right+R,l(t.top)]:t.left-R-c>=R?[i,o]=[t.left-R-c,l(t.top)]:(i=Math.max(R,Math.min(t.left,a.width-c-R)),o=t.bottom+R+p<=a.height-R?t.bottom+R:l(t.top-R-p))),e.style.left=`${Math.round(i)}px`,e.style.top=`${Math.round(o)}px`,e.style.width=`${Math.round(c)}px`}var sn=e=>e.map(t=>t.innerText??t.textContent??"").join(" ").replace(/\s+/g," ").trim(),gt=e=>{let t=e.getBoundingClientRect();return{tag:(e.getAttribute("data-graview-as")??e.localName).toLowerCase(),classes:[...e.classList],text:e.textContent??"",box:{left:t.left,top:t.top,width:t.width,height:t.height}}};function ln(e,t,a){let c=[...e.querySelectorAll("*")].filter(i=>{let o=i.getBoundingClientRect();return o.width>0&&o.height>0});if(a){let i=c.filter(r=>{let d=r.getBoundingClientRect();return t.left>=d.left&&t.left<=d.right&&t.top>=d.top&&t.top<=d.bottom}),s=i.filter(r=>!i.some(d=>d!==r&&r.contains(d)))[0];if(!s)return[];for(let r=s;r&&r!==e;r=r.parentElement)if(r.classList.length>0||/^(h[1-6]|li|a|button|img|p|article|section)$/.test(r.localName))return[r];return[s]}let p=c.filter(i=>{let o=i.getBoundingClientRect();return o.left>=t.left-2&&o.right<=t.right+2&&o.top>=t.top-2&&o.bottom<=t.bottom+2}),l=p.filter(i=>!p.some(o=>o!==i&&o.contains(i)));for(;l.length===1;){let i=[...l[0].children].filter(o=>p.includes(o));if(i.length<2)break;l=i}return l}function dn(e,t,a={}){let c=s=>({source:s.source,css:s.css,...s.root?{drawing:s.root}:{},...s.height!==void 0?{height:s.height}:{}}),p=et(c(e),c(t)),l=[];for(let s of p.unstyled)l.push(`The class \u201C${s.class}\u201D is still drawn and no rule styles it now.`);let i=s=>s.root?Ze(s.root).map(r=>r.name):[],o=e.root&&t.root?Ke(p.sectionsMissing.map(s=>s.name),i(e),i(t),a):p.sectionsMissing.map(s=>s.name);for(let s of o)l.push(`\u201C${s}\u201D is not drawn any more.`);return l}function cn(e,t,a,c,p,l){let i=c.drawing(),o=dn({source:e,css:t.css,root:t.root,height:t.height},{source:p,css:i.css,root:i.root,height:i.height},l);for(let s of c.refused())a.includes(s)||o.push(s);return o}function un({ask:e,close:t}){let{ai:a,aiDesk:c,aiHere:p,session:l,principal:i,keptViews:o,store:s}=We(),[r,d]=(0,f.useState)(e.section),n=_e(e.section),h=(0,f.useRef)(Fe(n)),b=(0,f.useRef)(null),[u,E]=(0,f.useState)(e.mode==="highlight"?{at:"highlighting"}:{at:"open"}),q=(0,f.useRef)(void 0),B=(0,f.useRef)(null),te=(0,f.useRef)(null),v=(0,f.useRef)([]),$=(0,f.useRef)([]),A=(0,f.useRef)([]),w=(0,f.useRef)(Date.now()),D=(0,f.useRef)(null),ne=(0,f.useRef)(null),re=(0,f.useRef)(null),[mt,fe]=(0,f.useState)(!1),[me,oe]=(0,f.useState)(!1),[,ht]=(0,f.useState)(0),ae=(0,f.useCallback)(()=>ht(g=>g+1),[]),[Te,yt]=(0,f.useState)(null),Re=(0,f.useRef)(null),I=(0,f.useCallback)(g=>{let y=Re.current;y&&a.told&&Pe.load().then(k=>k.changeTelling(a.told,y.id,{outcome:g}),()=>{})},[a.told]),De=(0,f.useCallback)((g,y,k,H,S,ye)=>{let se=a.told;se&&Pe.load().then(L=>{let Z=L.keepTelling(se,{words:g,target:{on:"place",place:y.view},decided:k?{type:"refusal"}:{type:"view",section:y.name},slot:"full",stages:H.map(F=>({stage:F.stage==="thinking"?"full":"light",ms:F.ms,model:F.model})),ms:S,outcome:k?"abandoned":"previewed",interaction:ye},i);Re.current=Z??null,yt(Z??null)},()=>{})},[a.told,i]);(0,f.useEffect)(()=>()=>{D.current?.abort(),b.current?.dispose(),b.current=null},[]);let Me=u.at==="working";(0,f.useEffect)(()=>{if(Me)return p({participant:`agent:graview-for-${i.id??"anyone"}:${l}`,kind:"agent",name:"Graview",...i.id?{onBehalfOf:i.id}:{},over:null,robot:{at:null,mode:"thinking"}}),()=>p(null)},[Me]);let X=(0,f.useCallback)((g,y,k,H={})=>({id:Ue(),at:new Date().toISOString(),by:i,target:{on:"place",place:r.view},targetLabel:h.current?.title??r.view,ask:{kind:"section",said:g},offered:[],outcome:y,stages:k.map(S=>({stage:S.stage,ms:S.ms,model:S.model})),usage:k.flatMap(S=>S.usage?[{tier:S.stage==="light"?"fast":"thinking",model:S.model,inputTokens:S.usage.inputTokens,outputTokens:S.usage.outputTokens}]:[]),...H}),[i,r.view]),U=(0,f.useCallback)(async g=>{b.current?.dispose();let k=h.current.draft(g);return b.current=k,await k.drawn,k},[]),_=(0,f.useCallback)(async()=>{let g=v.current.at(-1);oe(!1),g?await U(g.source):(b.current?.dispose(),b.current=null)},[U]),T=(0,f.useCallback)((g,y)=>{$.current.push({who:g,said:y}),ae()},[ae]),Q=()=>$.current.filter(g=>g.who==="person").map(g=>g.said).join(" "),ie=(0,f.useCallback)(async g=>{let y=h.current;if(!y||u.at==="working")return;let k=ne.current;ne.current=null,k&&(re.current=k),T("person",g),A.current=[],w.current=Date.now(),E({at:"working"});let H=await y.source();if(H===void 0)return T("graview","This view can't be changed here."),E({at:"open"});q.current??=H;let S=y.drawing(),ye=y.refused(),se=x=>{let V=s.graph.getNode(x);return V?$e(s.schema.tryDefinition(V.kind),V):void 0};B.current??=ce(S.root?.parentElement??S.root??n,nt(S.root,se)),te.current??=rt(r.elements);let L=B.current,Z=te.current,F=new AbortController;D.current=F;let St=Date.now(),xt=v.current.length,M=await Je({ai:a,part:{name:r.name,slot:"place"},manifest:{name:y.name,attach:"view",cardinality:"many"},talk:$.current,keep:{title:"",headings:L.headings,records:L.records.map(x=>x.label),says:Object.fromEntries(L.records.flatMap(x=>x.facts?.length||x.under?[[x.label,{...x.facts?.length?{shows:x.facts}:{},...x.under?{under:x.under}:{}}]]:[]))},current:v.current.at(-1)?.source??H,section:r.name,rewordable:Z,noun:"records",...re.current?{about:re.current}:{},host:{look:()=>xe(ce(y.drawing().root?.parentElement??n,L.records.map(x=>x.label))),read:()=>({shows:sn(r.elements)}),draft:async x=>{fe(!0);try{let V=await y.check(x);if(V.length>0)return await _(),{findings:V,drew:void 0};let we=await U(x),{failed:Le}=await we.drawn;if(Le)return await _(),{findings:[`The view did not draw: ${Le}`],drew:void 0};await new Promise(j=>requestAnimationFrame(()=>requestAnimationFrame(j)));let Oe=we.drawing().root,be=ce(Oe?.parentElement??Oe,L.records.map(j=>j.label)),Ct=y.presses?await y.presses(x).catch(()=>{}):void 0,Ne={asked:Q(),mayReword:Z},Be=[...cn(q.current,S,ye,we,x,Ne),...Ge(L,be,Ne),...(Ct?.problems??[]).slice(0,5).map(j=>`${j.control}: ${j.says}`)];return Be.length>0?await _():(v.current.push({source:x,said:Xe(r.name,L,be)??`\u201C${r.name}\u201D has changed. Compare Before and After.`,entry:X(`Make \u201C${r.name}\u201D better: ${Q()}`,"offered",[])}),oe(!1)),{findings:Be,drew:xe(be)}}finally{fe(!1)}}},onEvent:x=>{A.current.at(-1)?.kind==="streaming"&&A.current.pop(),A.current.push(x),ae()},signal:F.signal});if(D.current!==F)return;D.current=null,A.current.at(-1)?.kind==="streaming"&&A.current.pop();let le=v.current.length>xt,Ie=X(`Make \u201C${r.name}\u201D better: ${Q()}`,le?"offered":"failed",M.stages,le?{}:{failed:M.last?.findings.join(" ")??M.said});if(c.record(Ie),De(Q(),r,!le,M.stages,Date.now()-St,Ie.id),T("graview",M.passed&&Qe.test(M.said)?"Here it is on the page.":M.said),M.ended==="stuck"&&!le)return E({at:"stuck",...M.keepable&&M.last?{source:M.last.source}:{}});E(v.current.length>0?{at:"draft"}:{at:"open"})},[a,c,U,X,u.at,n,ae,T,r,_,s,De]),he=(0,f.useCallback)(()=>{if(u.at!=="working")return;let g=D.current;D.current=null,g?.abort(),fe(!1);let y=new Date(w.current).toISOString();v.current=v.current.filter(k=>k.entry.at<y),_(),T("graview","Stopped. The view is as it was."),E(v.current.length>0?{at:"draft"}:{at:"open"})},[u.at,T,_]),Ae=(0,f.useRef)(!1);(0,f.useEffect)(()=>{Ae.current||!(e.mode==="just"||e.mode==="describe"&&e.words)||(Ae.current=!0,ie(e.mode==="just"?"Make it easier to read at a glance":e.words))},[e.mode,e.words,ie]);let J=v.current.at(-1),wt=(0,f.useCallback)(async g=>{!J||g===me||(oe(g),g?(b.current?.dispose(),b.current=null):await U(J.source))},[J,me,U]),He=(0,f.useCallback)(async g=>{g!==void 0&&u.at==="stuck"&&v.current.push({source:g,said:`\u201C${r.name}\u201D kept as it was last drafted.`,entry:X(`Make \u201C${r.name}\u201D better: ${Q()}`,"offered",[])});let y=v.current.at(-1);if(u.at!=="draft"&&!(g!==void 0&&u.at==="stuck")||!y||!o?.revise||!h.current)return;let k=h.current,H=await k.source()??"";E({at:"keeping"});try{let S=await o.revise({name:k.name,title:k.title,source:y.source,before:H,section:r.name,said:y.said});b.current?.dispose(),b.current=null,k.draw(y.source),c.record({...y.entry,outcome:"accepted"}),I("accepted"),v.current=[],E({at:"kept",source:H,...S&&S.note?{note:S.note}:{},answer:S,entry:y.entry})}catch{if(T("graview","It couldn't be kept."),g!==void 0)return v.current.pop(),E(v.current.length>0?{at:"draft"}:{at:"open"});E({at:"draft"})}},[u,o,c,r.name,I,T,X]),bt=(0,f.useCallback)(()=>{T("graview","Stopped. The view is as it was."),E(v.current.length>0?{at:"draft"}:{at:"open"})},[T]),vt=(0,f.useCallback)(()=>{b.current?.dispose(),b.current=null;let g=v.current.at(-1);g&&(c.record({...g.entry,outcome:"dismissed"}),I("declined")),v.current=[],oe(!1),T("graview","Put back as it was."),E({at:"open"})},[c,I,T]),kt=(0,f.useCallback)(async()=>{if(u.at!=="kept"||!h.current)return;let g=h.current,y=await g.source()??"";try{u.answer&&typeof u.answer.undo=="function"?await u.answer.undo():await o?.revise?.({name:g.name,title:g.title,source:u.source,before:y,section:r.name,said:"Put back as it was.",undoes:!0}),g.draw(u.source===q.current?void 0:u.source),c.record({...u.entry,outcome:"dismissed"}),I("undone"),T("graview","Undone. The view is as it was."),E({at:"undone"})}catch{T("graview","It couldn't be put back.")}},[u,o,c,r.name,I,T]);return(0,f.useEffect)(()=>{let g=y=>{if(!(y.key!=="Escape"||u.at==="highlighting")){if(y.preventDefault(),u.at==="working")return he();v.current.length>0&&I("declined"),t(),e.returnTo?.focus?.()}};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[u.at,he,t,I,e.returnTo]),u.at==="highlighting"?(0,C.jsx)(gn,{box:n,root:n?.querySelector("[data-worker-view]")?.shadowRoot?.querySelector("[data-graview-view-root]")??void 0,whole:r.elements,cancel:()=>E({at:"open"}),chose:g=>{let y=g[0],k=y?qe(y):void 0;d(k??r),ne.current={name:Ye(g)??Ve(g.map(gt)),lines:je(g.map(gt))},E({at:"open"})}}):(0,C.jsxs)(C.Fragment,{children:[r.elements.length>0&&u.at==="open"&&$.current.length===0?(0,C.jsx)(Ce,{elements:r.elements}):null,mt?(0,C.jsx)(ot,{over:n,name:r.name,said:`Graview is drafting \u201C${r.name}\u201D\u2026`}):null,(0,C.jsx)(lt,{name:r.name,scope:`This changes how \u201C${r.name}\u201D looks for everyone in this app.`,phase:u.at,talk:$.current,steps:A.current,since:w.current,working:u.at==="working"||u.at==="keeping",...J&&u.at==="draft"?{draft:{said:J.said,before:me}}:{},...u.at==="kept"?{kept:{...u.note?{note:u.note}:{},undo:()=>void kt()}}:{},...u.at==="stuck"?{stuck:{...u.source!==void 0?{keepAnyway:()=>void He(u.source)}:{},stop:bt}}:{},about:(ne.current??re.current)?.name??r.name,ask:g=>void ie(g),just:()=>void ie("Make it easier to read at a glance"),point:()=>E({at:"highlighting"}),stop:he,compare:g=>void wt(g),keep:()=>void He(),discard:vt,close:()=>{D.current?.abort(),v.current.length>0&&I("declined"),t()},children:Te&&a.told&&u.at!=="working"?(0,C.jsx)(nn,{told:a.told,telling:Te}):null})]})}function gn({box:e,root:t,whole:a,wholeSaid:c="The whole section",cancel:p,chose:l}){let i=(0,f.useRef)(null),[o,s]=(0,f.useState)(null);(0,f.useLayoutEffect)(()=>{let n=0,h=()=>{let b=e?de([e]):null,u=i.current;u&&b&&(u.style.left=`${Math.round(b.left-pe)}px`,u.style.top=`${Math.round(b.top-pe)}px`,u.style.width=`${Math.round(b.width+2*pe)}px`,u.style.height=`${Math.round(b.height+2*pe)}px`),n=requestAnimationFrame(h)};return h(),()=>cancelAnimationFrame(n)},[e]),(0,f.useEffect)(()=>{i.current?.focus()},[]);let r=n=>{if(!o||!t)return s(null);let h=Math.hypot(n.clientX-o.x0,n.clientY-o.y0)>4,b={left:Math.min(o.x0,n.clientX),top:Math.min(o.y0,n.clientY),right:Math.max(o.x0,n.clientX),bottom:Math.max(o.y0,n.clientY)};s(null);let u=ln(t,b,!h);u.length>0&&l(u)},d=o?{left:Math.min(o.x0,o.x1),top:Math.min(o.y0,o.y1),width:Math.abs(o.x1-o.x0),height:Math.abs(o.y1-o.y0)}:null;return(0,C.jsxs)("div",{ref:i,tabIndex:-1,role:"application","aria-label":"Highlight the area to change: drag over it, or click one part","data-testid":"section-highlighter","data-graview-popover":"",onKeyDown:n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),p())},onMouseDown:n=>n.preventDefault(),onPointerDown:n=>{n.preventDefault(),n.currentTarget.setPointerCapture?.(n.pointerId),s({x0:n.clientX,y0:n.clientY,x1:n.clientX,y1:n.clientY})},onPointerMove:n=>s(h=>h&&{...h,x1:n.clientX,y1:n.clientY}),onPointerUp:r,onPointerCancel:()=>s(null),style:kn,children:[(0,C.jsxs)("p",{style:Sn,children:["Drag over the part to change, or click one \xB7"," ",(0,C.jsx)("button",{type:"button",onPointerDown:n=>n.stopPropagation(),onClick:()=>l(a),style:pt,children:c})," ","\xB7"," ",(0,C.jsx)("button",{type:"button",onPointerDown:n=>n.stopPropagation(),onClick:p,style:pt,children:"Cancel"})]}),d?(0,C.jsx)("div",{"data-testid":"section-drag",style:{...xn,left:d.left-(i.current?.getBoundingClientRect().left??0),top:d.top-(i.current?.getBoundingClientRect().top??0),width:d.width,height:d.height}}):null]})}var pn={position:"fixed",zIndex:W("popover"),boxSizing:"border-box",display:"grid",gap:10,padding:12,borderRadius:12,border:"1px solid var(--graview-edge)",background:"var(--graview-float, var(--graview-panel))",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)",maxHeight:"calc(100dvh - 24px)",overflowY:"auto",fontSize:"0.875rem"},fn={margin:0,fontSize:"0.9375rem"},mn={margin:0,color:"var(--graview-ink-muted)"},hn={margin:0,color:"var(--graview-ink)",fontStyle:"italic"},yn={display:"flex",flexWrap:"wrap",gap:8},wn={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},ft={minHeight:36,padding:"0 14px",font:"inherit",borderRadius:8,cursor:"pointer"},bn={...ft,color:"var(--graview-accent-ink, #fff)",background:"var(--graview-accent)",border:"1px solid var(--graview-accent)"},vn={...ft,color:"var(--graview-ink)",background:"transparent",border:"1px solid var(--graview-edge)"},pt={font:"inherit",color:"inherit",background:"none",border:0,padding:0,textDecoration:"underline",cursor:"pointer"},pe=12,kn={userSelect:"none",WebkitUserSelect:"none",position:"fixed",zIndex:W("popover"),boxSizing:"border-box",cursor:"crosshair",touchAction:"none",outline:"2px dashed var(--graview-accent)",background:"color-mix(in srgb, var(--graview-accent) 6%, transparent)"},Sn={position:"absolute",left:8,top:8,margin:0,padding:"4px 10px",borderRadius:999,fontSize:"0.8125rem",color:"var(--graview-ink)",background:"var(--graview-float, var(--graview-panel))",border:"1px solid var(--graview-edge)",boxShadow:"var(--graview-lift-low)",cursor:"default"},xn={position:"absolute",border:"2px solid var(--graview-accent)",background:"color-mix(in srgb, var(--graview-accent) 14%, transparent)",borderRadius:4,pointerEvents:"none"},Gn={CARD:pn,HEAD:fn,MUTED:mn,THINKING:hn,ROW:yn,FIELD:wn,PRIMARY:bn,QUIET:vn};export{ce as a,ot as b,lt as c,Yn as d,Kn as e,gt as f,dn as g,un as h,gn as i,Gn as j};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk.ZU3RPI34.js";import"./chunk.CCCONK73.js";import"./chunk.IO5VFTXC.js";import"./chunk.7L3I776Z.js";import"./chunk.CLIC2QBA.js";import"./chunk.WV6SP6IJ.js";import"./chunk.B422DSYN.js";import"./chunk.ZE5RSKXF.js";import"./chunk.DKUEZPGR.js";import"./chunk.EP7YT7LT.js";import"./chunk.I7KN732Z.js";import"./chunk.TLPCYKLW.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as actOnSeveral,a as actsForSeveral};
@@ -1 +0,0 @@
1
- import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p}from"./chunk.HU3KEWFO.js";import"./chunk.G4JJXA63.js";import{a}from"./chunk.TBY5IR7C.js";import"./chunk.WFJCC6G3.js";import"./chunk.BIDL7GQD.js";import"./chunk.IO5VFTXC.js";import"./chunk.UPOYRCKI.js";import"./chunk.XOZU4OFA.js";import"./chunk.WV6SP6IJ.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.MATUPDZ3.js";import"./chunk.SAWASNDO.js";import"./chunk.HCX6KPRF.js";import"./chunk.WVUJXDXZ.js";import"./chunk.B422DSYN.js";import"./chunk.ZE5RSKXF.js";import"./chunk.DKUEZPGR.js";import"./chunk.EP7YT7LT.js";import"./chunk.I7KN732Z.js";import"./chunk.TLPCYKLW.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{j as draftAnswer,i as draftFromLens,c as draftSight,m as draftView,b as isDraftFailure,d as judgeLens,e as lensEditOf,g as lensFromSpec,a as mayChangeDeclaration,k as recipeDraft,h as recipeOfLens,n as refineDraft,p as runDraftTool,f as takeBackEditOf,l as templateDraft,o as withReaderLenses};
@@ -1 +0,0 @@
1
- import{$ as z,Ac as ne,Cb as H,Cc as te,Db as U,Dc as oe,Eb as X,Ec as I,Fb as Z,Fc as R,Gc as E,Jc as P,Kd as ie,L,Mc as N,R as G,U as F,Y as T,jc as Q,ob as Y,pb as v,ra as J,wc as O,yb as q,zc as ee}from"./chunk.DHPXRDT5.js";import{j as y}from"./chunk.FQLNBIQ5.js";var re=e=>q(e).id??e.session;function j(e,i={}){let n=O(e),o=new Map,t=i.advisory===!0;for(let s of e){if(s.vote===void 0||s.withheld||n.has(s.id)||s.vote.advisory===!0!==t)continue;let a=t?s.vote.voter:re(s.author);if(a===void 0)continue;let r=o.get(s.vote.suggestion);r||o.set(s.vote.suggestion,r=new Map),s.vote.vote===null?r.delete(a):r.set(a,s.vote.vote)}return o}function se(e){let i=0,n=0;for(let o of e?.values()??[])o==="for"?i++:n++;return{for:i,against:n}}function he(e,i,n){let o=I(i)?R(i):void 0,t=i&&(o===void 0?re(i):void 0),s=o!==void 0?n?.get(o):t!==void 0?e?.get(t):void 0,a=se(n);return{...se(e),...s!==void 0?{mine:s}:{},...a.for+a.against>0?{advisory:a}:{}}}var V=(e,i)=>e.expiresAt!==void 0&&Date.parse(e.expiresAt)<=Date.parse(i),Se=(e,i,n)=>(e??[]).some(o=>o.suggestion===i&&(o.until===void 0||Date.parse(o.until)>Date.parse(n)));function ae(e,i=()=>!0,n={}){let o=O(e),t=Ae(e),s=n.now??new Date().toISOString(),a,r;return e.filter(d=>d.suggests&&!d.withheld&&!o.has(d.id)&&t.get(d.id)!=="all"&&!V(d,s)&&!Se(n.dismissed,d.id,s)).flatMap(({id:d,batch:u,suggests:l,suggestsSaid:c,intent:g,batchIntent:p,author:S,lineage:w,at:f,expiresAt:me})=>{let B=t.get(d),M=ve(l,c,g).filter(h=>!B?.has(h.at));if(M.length===0)return[];let _=M.map(h=>h.call),W=new Set;return JSON.stringify(_.map(h=>h.args),(h,D)=>(typeof D=="string"&&i(D)&&W.add(D),D)),[{id:d,batch:u,calls:_,intent:B?M.map(h=>h.intent).join("; "):g,...p!==void 0?{headline:p}:{},items:M,author:S,...w?{lineage:w}:{},at:f,expiresAt:me,about:[...W],tally:he((a??=j(e)).get(d),n.voter,(r??=j(e,{advisory:!0})).get(d))}]})}function ve(e,i,n){let o=i&&i.length===e.length?i:void 0;return e.map((t,s)=>({at:s,call:t,intent:o?.[s]??(e.length===1?n:t.name)}))}function Ae(e){let i=new Map;for(let o of e){let t=o.lineage?.suggestion;if(t===void 0)continue;let s=o.lineage.items,a=i.get(t);if(a!=="all")if(s===void 0)i.set(t,"all");else{let r=a??new Set;for(let d of s)r.add(d);i.set(t,r)}}let n=new Map(e.filter(o=>o.suggests&&i.has(o.id)).map(o=>[o.id,o.suggests.length]));for(let[o,t]of i)t!=="all"&&n.has(o)&&t.size>=n.get(o)&&i.set(o,"all");return i}var le=e=>JSON.stringify(e,(i,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).sort()):n);var we=/^(archive|unarchive|remove|leave-alone|allow-tidying)$/;function xe(e,i){let n=ie(e.name),o=i?.act(e.name),t=e.args??{},s=o?o.derived:Q(n),{id:a}=t;if(s&&typeof a=="string"){if(we.test(s.act))return[s.act,a];if(s.act==="merge")return["merge",...[a,t.into].sort()];if(s.relation)return[s.act,s.relation,a,t.to]}let r=o?.subject?.arg??"id",[d,u]=Object.keys(t).filter(l=>l!==r);return o?.connects?.length===1&&d&&!u&&i.has(t[r])&&i.has(t[d])?["connect",o.connects[0],t[r],t[d]]:[n,o?.creates?.length&&typeof a=="string"&&!i.has(a)?{...t,id:0}:t]}var A=(e,i)=>`\u2248${le(e.map(n=>xe(n,i)))}`,de=e=>`\u2248${le([["connect",e.kind,e.from,e.to]])}`;function ue(e,i,n,o){let t=C(e,n,o);return[i,...i.map(s=>[s])].map(s=>t.get(A(s,n))).find(Boolean)}function C(e,i,n){let o=O(e),t=new Map(e.map(r=>[r.id,r])),s=new Map;for(let[r,d]of Object.entries(n??{}))o.has(d.id)||s.set(r,d);let a=new Map;for(let r of e)r.lineage?.suggestion!==void 0&&r.lineage.items&&a.set(r.lineage.suggestion,[...a.get(r.lineage.suggestion)??[],...r.lineage.items]);for(let r of e){let d=!o.has(r.id)&&!r.withheld,u=r.author.kind==="human",l=r.undoes!==void 0&&d?t.get(r.undoes):void 0;if(l?.suggests&&l.author.kind===r.author.kind&&l.author.id===r.author.id)continue;let c=l?.mutation&&l.undoes===void 0&&(l.lineage||r.undoneLineage||u),g=l?.suggests?l.suggests.filter((p,S)=>!a.get(l.id)?.includes(S)):c?[l.mutation]:[];if(g.length>0)for(let p of[g,...g.map(S=>[S])])s.set(A(p,i),r);if(!(!d||!u||r.undoes!==void 0))for(let p of r.primitives)p.op==="remove-edge"?s.set(de(p.edge),r):p.op==="add-edge"&&s.delete(de(p.edge))}return s}function ge(e){return Object.fromEntries([...e].map(([i,n])=>[i,{id:n.id,at:n.at,author:n.author,...n.undoes!==void 0&&{undoes:n.undoes}}]))}function ce(e,i){return e.ops.length>0&&e.ops.every(n=>n.suggests!==void 0||n.undoes!==void 0&&i(n.undoes)?.suggests!==void 0)}var K=e=>[...e].length;function Oe(e){let i,n=0,o=0;for(let t of e.ops){let s=t.mutation?.name===Z&&t.withheld!==!0&&t.undoes===void 0?t.mutation.args:void 0;if(typeof s?.node!="string"||typeof s.field!="string"||i&&(i.node!==s.node||i.field!==s.field))return;i={node:s.node,field:s.field};for(let a of t.primitives)a.op==="splice-text"?(n+=K(a.inserted),o+=K(a.removed)):a.op==="patch-node"&&typeof a.after[s.field]=="string"&&(n+=K(a.after[s.field]))}return i&&{...i,inserted:n,removed:o}}function be(e,i,n){let o=n.getNode(e.node)?.kind,t=[...e.inserted>0||e.removed===0?[`+${e.inserted}`]:[],...e.removed>0?[`\u2212${e.removed}`]:[]];return`Wrote in ${J(o?i.tryDefinition(o):void 0,e.field)} (${t.join(" ")})`}var b=e=>JSON.stringify([e.kind,e.id??"",e.name??""]),ke=e=>e.ops.find(i=>i.lineage?.run!==void 0)?.lineage?.run;function Me(e,i=()=>{}){let n=[];for(let o of e){if(ce(o,i))continue;if(!P(o.author)){let l=Oe(o),c=n.at(-1),g=l&&c&&"batch"in c&&b(c.batch.author)===b(o.author)&&c.typed?.node===l.node&&c.typed.field===l.field?c.typed:void 0;g?n[n.length-1]={batch:o,typed:{...g,batches:[...g.batches,o],inserted:g.inserted+l.inserted,removed:g.removed+l.removed}}:n.push(l?{batch:o,typed:{batches:[o],...l}}:{batch:o});continue}let t=ke(o),s=b(o.author),a=t!==void 0?n.findIndex(l=>"digest"in l&&l.digest.run===t&&b(l.digest.author)===s):n.length-1,r=n[a],d=r!==void 0&&"digest"in r&&b(r.digest.author)===s&&r.digest.run===t?r.digest:void 0,u=[...d?.batches??[],o];d&&n.splice(a,1),n.push({digest:{author:o.author,batches:u,things:De(u),at:o.at,...t!==void 0?{run:t}:{}}})}return n}var De=e=>e.reduce((i,n)=>i+(n.undone?0:n.ops.length),0),Ie=e=>{let i=Date.parse(e);if(Number.isNaN(i))return!1;let{minutes:n}=F(i,G());return n<6*60||n>=21*60};function Re(e,i=T(new Date().toISOString())??L()){let n=T(e.at)??e.at.slice(0,10),t=e.run!==void 0&&n===i&&[e.at,...(e.batches??[]).map(a=>a.at)].every(Ie)?"overnight":n===i?"today":`on ${z(n)}`,s=e.things===1?"one thing":`${e.things} things`;return e.author?.id?.startsWith("workflow:")&&e.author.name?`${e.author.name}: ${s} ${t}`:`Tidied ${s} ${t}`}N.declined=ue;N.kept=(e,i,n)=>ge(C(e,i,n));var m=e=>e,x=(e,i)=>i===void 0?{}:{[e]:i};function tn(e,i,n){let o=y(e)?.store??e,t=m(o),s=ne(n.lineage);if(s===void 0)throw new v("A suggestion says what it is based on: { basis, confidence? }");let a=n.author??t.by;if(n.expiresAt!==void 0&&Number.isNaN(Date.parse(n.expiresAt)))throw new v(`A suggestion expires at a time: "${n.expiresAt}" is not one (an ISO time, like 2026-10-23T06:00:00Z).`);let r=t.actMeanings(),d=A(i,r),u=$(o).find(f=>A(f.calls,r)===d);if(u)return o.log.get(u.id);t.refuseDeclined(i,a);let l=t.rehearsal();l.suggesting=!0;let c=l.applying(i,{author:a,lineage:s,...x("via",n.via)});if(c.ops.length===0)return;let g=[...new Set(c.ops.flatMap(f=>f.described??[]))],p=c.ops.filter(f=>f.mutation!==null&&f.author===a),S=i.length>1&&p.length===i.length?p.map(f=>f.intent):void 0,w={id:t.nextId(),seq:o.log.length,batch:t.mintBatch("batch"),author:a,intent:c.ops.map(f=>f.intent).join("; "),...x("batchIntent",n.intent),mutation:null,primitives:[],reads:[],writes:[],...g.length>0?{described:g}:{},at:t.now(),...x("via",n.via),lineage:s,suggests:i,...x("suggestsSaid",S),...x("expiresAt",n.expiresAt)};return o.log.append(w),o.notify(Y,[w]),w}function $(e,i,n={}){let o=y(e),t=o?.store??e,s=i??o?.principal,a=(s!==void 0?t.seenBy(s):t).log.all();return ae(a,r=>t.graph.has(r),{now:m(t).now(),dismissed:n.dismissed,voter:s})}function pe(e,i,n){let o=y(e),t=o?.store??e,s=n??o?.principal??m(t).by;return i.calls.every(a=>t.permits(a,s).ok)}function fe(e,i,n,o={}){let t=y(e)?.store??e,s=o.author??m(t).by;k(t,i,s);let a=t.applyAll([{name:oe,args:{suggestion:i,vote:n}}],{...o,author:s});return n===null?a:{...a,voted:n}}function k(e,i,n){let o=$(e,n).find(s=>s.id===i),t=o?void 0:e.log.get(i);if(t?.suggests&&V(t,m(e).now()))throw new v(`That suggestion expired on ${t.expiresAt.slice(0,10)}.`);if(!o)throw new v("That suggestion is no longer waiting: it was accepted or declined, or it is not one you can see.");return o}function on(e,i,n={}){let o=y(e)?.store??e,{items:t,...s}=n,a=s.author??m(o).by,r=k(o,i,a),d=t===void 0?r.items:r.items.filter(g=>t.includes(g.at));if(t!==void 0&&(t.length===0||d.length!==new Set(t).size))throw new v("Name the changes to accept by their place among those still waiting in the suggestion.");let u={...r,calls:d.map(g=>g.call)};if(!pe(o,u,a))return fe(o,i,"for",{...s,author:a});let l=o.log.get(i)?.suggests?.length??d.length,c=d.length<l?{items:d.map(g=>g.at)}:{};return o.applyAll(u.calls,{...s,author:a,lineage:{...r.lineage,suggestion:i,...c}})}function sn(e,i,n={}){let o=y(e)?.store??e,t=n.author??m(o).by,s=k(o,i,t);if(!pe(o,s,t))return fe(o,i,"against",{...n,author:t});let a=ye(s)&&n.intent===void 0?{intent:`Declined ${$e(je(s))} proposal: ${s.intent}`}:{};return o.undo(s.batch,{...n,...a,author:t})}function rn(e,i,n={}){let o=y(e)?.store??e,t=n.author??m(o).by,s=k(o,i,t);if(s.author.kind!==t.kind||s.author.id!==t.id)throw new v("Only who made a suggestion withdraws it: a person declines it (declineSuggestion).");return o.undo(s.batch,{...n,author:t})}var Pe={kind:"system",id:"tidying",name:"Graview, tidying",automated:!0};E.op=(e,i,n,o,t,s)=>{let a=e,{suggestion:r,vote:d}=n.args,u=k(a,r,t),l=I(t)?R(t):void 0,c=d==="for"?`For: ${u.intent}`:d==="against"?`Against: ${u.intent}`:`Withdraws a vote on: ${u.intent}`;return{id:i.id,seq:a.log.length,batch:o,author:t,intent:c,mutation:n,primitives:[],reads:[],writes:[],...u.about.length>0?{described:u.about}:{},at:i.at,...s.via!==void 0?{via:s.via}:{},vote:{suggestion:r,vote:d,...l!==void 0?{advisory:!0,voter:l}:{}}}};E.accepting=(e,i)=>{let n=e,o=n.tidying?.autoAcceptAt;if(o===void 0||i.vote?.vote!=="for")return;let t=i.vote.suggestion,s=$(n).find(u=>u.id===t);if(!s)return;let r=[...j(n.log.all()).get(t)??[]].filter(([,u])=>u==="for").map(([u])=>u);if(r.length<o)return;let d=P(s.author)?s.author:Pe;return{calls:s.calls,author:d,lineage:{...s.lineage,suggestion:t,voters:r.slice(0,ee)}}};var ye=e=>e.lineage?.proposedBy!==void 0,je=e=>e.author.name??e.author.id??"Somebody",$e=e=>/s$/i.test(e)?`${e}'`:`${e}'s`;function an(e,i,n,o){let t=y(e)?.store??e,s=m(t).actMeanings(),a=A(n,s),r=$(t,i).find(u=>ye(u)&&A(u.calls,s)===a);if(r)return t.log.get(r.id);let d={calls:n.map(({name:u,args:l})=>({name:u,args:l})),...x("intent",o)};return t.applyAll([{name:te,args:d}],{author:i}).ops.find(u=>u.suggests!==void 0)}function dn(e,i,n){if(!e||!e.grants.some(t=>t.propose!==void 0))return[];let o=new Set(H(e,i,n));return n.filter(t=>!o.has(t)&&U(t).some(s=>X(e,i,t.name,s)))}export{be as a,Me as b,Re as c,tn as d,$ as e,pe as f,fe as g,on as h,sn as i,rn as j,ye as k,an as l,dn as m};
@@ -1 +0,0 @@
1
- var n=1,r="allow-scripts",o="null";var t=["wheel","drag","pinch"];function a(e){return typeof e=="object"&&e!==null&&e.graview==="guest-ready"}export{n as a,r as b,o as c,t as d,a as e};
@@ -1 +0,0 @@
1
- import{a as pe,b as ye}from"./chunk.25VJPUDH.js";import{a as fe}from"./chunk.JHAMSDAI.js";import{e as de,f as le,g as ce,h as G,i as ge,j as ue,k as I}from"./chunk.B5EFNTDA.js";import{b as me}from"./chunk.47VEV4BX.js";import"./chunk.FE3SINPK.js";import"./chunk.MUWI54IP.js";import"./chunk.3D37E2G5.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import{m as H}from"./chunk.NLZHNPDU.js";import"./chunk.QNC2OKLF.js";import{G as ie,W as j,ea as D,ga as re,oa as ae}from"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import{Dc as se,eb as te,fc as oe,ha as J,la as U,na as K,oa as X,sa as ee,yb as ne}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as z}from"./chunk.AJZBJBMO.js";function he(e){let o=e.basis.trim(),l=/^[^:]{1,40}: (?:\d(?:\.\d+)?|none|no)\b/i.test(o)?/\(([^()]+)\)\s*$/.exec(o)?.[1]??"":o;if(!l||/^[\d.\s%]+$/.test(l))return"No reason was kept.";let n=l.charAt(0).toUpperCase()+l.slice(1);return/[.!?]$/.test(n)?n:`${n}.`}var Ae=new Set(["in","into","on","onto","under","at","within","inside","near","beside","behind","over","after","before"]),Re=new Set(["for","to","on","in","with","by","from","of","after","before","into","about","under"]),Te=e=>/ies$/.test(e)?e.replace(/ies$/,"y"):/(ch|sh|x|ss|o)es$/.test(e)?e.replace(/es$/,""):e.replace(/s$/,""),Ce=e=>/^[A-Z][a-z]/.test(e)?e.charAt(0).toLowerCase()+e.slice(1):e;function V(e,o){let d=e.schema,l=i=>typeof i=="string"?e.graph.getNode(i):void 0,n=(i,p=!1)=>({record:i.id,label:U(d.tryDefinition(i.kind),i),...p?{quoted:!0}:{}}),s=(i,p,k,W,T)=>({parts:i,text:i.map(f=>typeof f=="string"?f:f.quoted?`\u201C${f.label}\u201D`:f.label).join(""),group:p,many:k,...W&&T?{subject:{record:W.id,label:U(d.tryDefinition(W.kind),W)},alone:T}:{alone:i}}),c=s([o.intent],`intent:${o.intent}`,i=>`${i} suggestions`);if(o.calls.length!==1)return c;let a=o.calls[0],b=a.args,g=e.allMutations().find(i=>i.name===a.name),h=g?.subject?.arg,r=h?l(b[h]):void 0;if(!g||!r)return c;let v=i=>K(d,r.kind,i),$=i=>`${a.name}:${i}`,x=()=>{let i=oe(g.input).filter(p=>p.name!==h&&b[p.name]!==void 0);return i.length===1?l(b[i[0].name]):void 0},R=l(b.into);if(a.name===`merge-${r.kind}`&&R)return s(["Merge ",n(r,!0)," into ",n(R),"?"],$("merge"),i=>`${v(i)} to merge`,r,["Merge into ",n(R),"?"]);if(a.name===`archive-${r.kind}`)return s(["Set ",n(r,!0)," aside?"],$("archive"),i=>`${v(i)} to set aside`,r,["Set aside?"]);let u=x(),S=g.connects?.find(i=>d.tryDefinition(r.kind)?.edges?.[i]!==void 0);if(u&&S){let i=d.tryDefinition(r.kind).edges[S],p=ee(d.tryDefinition(r.kind),S).split(" "),[k,W]=p,T=Ce(X(d,u.kind));if(k&&Ae.has(k))return s(["Put ",n(r,!0),` ${k} `,n(u),"?"],$(`put:${k}`),A=>`${v(A)} to put ${k} ${T}`,r,[`Put ${k} `,n(u),"?"]);if(k&&W&&Re.has(W)&&/[^s]s$/.test(k)){let A=[Te(k),...p.slice(1)].join(" ");return s(["Should ",n(r,!0),` ${A} `,n(u),"?"],$("verb"),M=>`${v(M)} to link`,r,[`${A.charAt(0).toUpperCase()}${A.slice(1)} `,n(u),"?"])}let f=p.join(" ");return i.cardinality==="one"?s(["Make ",n(u),` the ${f} of `,n(r,!0),"?"],$("one"),A=>`${v(A)} to give ${/^[aeiou]/i.test(f)?"an":"a"} ${f}`,r,["Make ",n(u),` the ${f}?`]):s(["Add ",n(u),` to the ${f} of `,n(r,!0),"?"],$("many"),A=>`${v(A)} to link`,r,["Add ",n(u),` to the ${f}?`])}let w=Object.entries(b).filter(([i,p])=>i!==h&&typeof p=="string"&&!l(p));if(o.lineage?.actor==="categorize"&&w.length===1){let i=J(String(w[0][1]));return s(["Mark ",n(r,!0),` as ${i}?`],$("mark"),p=>`${v(p)} to mark`,r,[`Mark as ${i}?`])}return c}function we(e,o){let d=o.map(s=>({one:s,sentence:V(e,s)})),l=new Map;for(let{sentence:s}of d)s.subject&&l.set(s.subject.record,(l.get(s.subject.record)??0)+1);let n=new Map;for(let{one:s,sentence:c}of d){let a=c.subject!==void 0&&l.get(c.subject.record)>1,b=a?`record:${c.subject.record}`:s.calls.length===1?c.group:`one:${n.size}`,g=n.get(b);g?g.suggestions.push(s):n.set(b,{sentence:c,byRecord:a,suggestions:[s]})}return[...n.values()].map(({sentence:s,byRecord:c,suggestions:a})=>c?{record:s.subject,suggestions:a}:a.length>1?{words:s.many(a.length),suggestions:a}:{suggestions:a})}var m=z(ie(),1);var ve=z(ie(),1),C=z(j(),1),be={minWidth:0,overflowWrap:"anywhere"};function Se({suggestion:e,decides:o,heard:d}){let{store:l,principal:n}=D(),[s,c]=(0,ve.useState)(null),a=e.items;if(a.length<2)return null;let b=(g,h)=>{c(null);try{G(l,e.id,{author:n,items:[g]}),d("Accepted that change; the rest still wait."),requestAnimationFrame(()=>{let r=document.querySelector(`[data-suggestion="${CSS.escape(e.id)}"]`);(r?.querySelectorAll('[data-testid="suggestion-item-accept"]')[h]??r?.querySelectorAll('[data-testid="suggestion-item-accept"]')[h-1]??r?.querySelector('[data-testid="suggestion-accept"]'))?.focus()})}catch(r){c(r instanceof Error?r.message:String(r))}};return(0,C.jsxs)("details",{"data-testid":"suggestion-items",style:{minWidth:0},children:[(0,C.jsx)("summary",{style:{cursor:"pointer",fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:`Show the ${a.length} changes`}),(0,C.jsx)("ol",{style:{margin:"6px 0 0",padding:0,listStyle:"none",display:"grid",gap:4,minWidth:0},children:a.map((g,h)=>(0,C.jsxs)("li",{"data-testid":"suggestion-item","data-item":g.at,style:{display:"flex",alignItems:"baseline",gap:6,minWidth:0,fontSize:"0.75rem"},children:[(0,C.jsx)("span",{style:{...be,flex:"1 1 auto"},children:g.intent}),o?(0,C.jsx)("button",{type:"button","data-testid":"suggestion-item-accept","aria-label":`Accept: ${g.intent}`,onClick:()=>b(g.at,h),style:{minHeight:24,padding:"1px 8px",fontSize:"0.75rem",flex:"0 0 auto"},children:"Accept"}):null]},g.at))}),s?(0,C.jsx)("span",{"data-testid":"suggestion-item-refused",role:"alert",style:{...be,display:"block",fontSize:"0.75rem",color:"var(--graview-warn)"},children:s}):null]})}var t=z(j(),1);function Ne(e,o,d=0){let l=[e>0?`${e===1?"one suggestion":`${e} suggestions`} waiting`:"",e>0&&d>0?`${d===1?"a reader agrees":`${d} readers agree`} with one that waits`:"",o>0?`tidied ${o===1?"one thing":`${o} things`} while you were away`:""].filter(Boolean);return l.length>0?l.join(" \xB7 ").replace(/^./,n=>n.toUpperCase()):void 0}function ke(){let{store:e,principal:o,dismissals:d,app:l}=D(),n=re(),s=(0,m.useMemo)(()=>ye(d,l?.name??"app",o),[d,l?.name,o]),[c,a]=(0,m.useReducer)(g=>g+1,0);return(0,m.useEffect)(()=>s.onChange?.(a),[s]),(0,m.useEffect)(()=>e.subscribe((g,h)=>h.some(r=>r.vote!==void 0)&&a()),[e]),{waiting:(0,m.useMemo)(()=>de(e,o,{dismissed:s.list()}),[e,o,n,s,c]),notNow:s}}function Ze({onCount:e}){let{waiting:o}=ke();return(0,m.useEffect)(()=>e(o.length),[e,o.length]),null}function Je({close:e,done:o}){let{store:d,whileAway:l}=D(),{waiting:n,notNow:s}=ke(),[c,a]=(0,m.useState)(""),b=ae(),g=x=>d.graph.has(x)?R=>{e(),b.record(R)}:null,h=l?.tidied??0,r=l?Ne(n.length,h,l.agreed):void 0,v=x=>{if(a(x),n.length>1){requestAnimationFrame(()=>document.querySelector('[data-testid="suggested"] [data-testid="suggestion-accept"]')?.focus());return}o()},$=(0,t.jsx)("span",{role:"status","data-testid":"suggestion-heard",style:H,children:c});return n.length===0&&!r?$:(0,t.jsxs)("div",{"data-testid":"suggested",style:{display:"flex",flexDirection:"column",gap:9,minWidth:0},children:[r?(0,t.jsxs)("p",{"data-testid":"while-away",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:[r,"."]}):null,n.length===0?(0,t.jsx)("p",{style:{margin:0,fontSize:"0.75rem",lineHeight:1.45,color:"var(--graview-ink-faint)"},children:"What it did is in Activity."}):null,[n.filter(I),n.filter(x=>!I(x))].map((x,R)=>x.length===0?null:(0,t.jsxs)("div",{style:{display:"grid",gap:6,minWidth:0},children:[n.some(I)?(0,t.jsx)("h3",{style:{margin:0,fontSize:"0.75rem",fontWeight:600,color:"var(--graview-ink-muted)"},children:R===0?"Proposed":"Suggested by the app"}):null,(0,t.jsx)("ol",{"data-testid":R===0?"proposals":"suggestions",style:_,children:we(d,x).map(u=>u.record?(0,t.jsx)(Pe,{record:u.record,level:n.some(I)?4:3,go:g(u.record.record),children:S=>u.suggestions.map(w=>(0,t.jsx)(Y,{suggestion:w,notNow:s,settled:v,heard:a,goes:g,under:S},w.id))},u.suggestions[0].id):u.words?(0,t.jsxs)("li",{"data-testid":"suggestion-group",style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:6,minWidth:0},children:[(0,t.jsx)("span",{style:{...N,fontSize:"0.75rem",fontWeight:600,color:"var(--graview-ink-muted)"},children:u.words}),(0,t.jsx)("ol",{style:_,children:u.suggestions.map(S=>(0,t.jsx)(Y,{suggestion:S,notNow:s,settled:v,heard:a,goes:g},S.id))})]},u.suggestions[0].id):u.suggestions.map(S=>(0,t.jsx)(Y,{suggestion:S,notNow:s,settled:v,heard:a,goes:g},S.id)))})]},R)),$]})}function Pe({record:e,level:o,go:d,children:l}){let n=(0,m.useId)();return(0,t.jsxs)("li",{"data-testid":"suggestion-record-group","data-record":e.record,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:4,minWidth:0},children:[(0,t.jsx)("span",{id:n,role:"heading","aria-level":o,"data-testid":"suggestion-record-heading",style:{...N,display:"block",fontSize:"0.8125rem",lineHeight:1.45},children:(0,t.jsx)($e,{part:e,go:d})}),(0,t.jsx)("ol",{"aria-labelledby":n,style:{..._,gap:6,paddingInlineStart:12},children:l(n)})]})}var N={minWidth:0,overflowWrap:"anywhere"},_={margin:0,padding:0,listStyle:"none",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:10,fontSize:"0.8125rem",minWidth:0},E={minHeight:24,padding:"1px 10px",fontSize:"0.75rem"},B={...E,border:"1px solid transparent",background:"transparent",boxShadow:"none",color:"var(--graview-ink-muted)"};function $e({part:e,go:o}){let d={display:"inline-block",maxWidth:"min(24ch, 100%)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",verticalAlign:"bottom"},l=o?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-record","data-record":e.record,title:`Go to ${e.label}`,onClick:()=>o(e.record),className:"graview-activity-record",style:{all:"unset",...d,cursor:"pointer",fontWeight:600,color:"var(--graview-ink)",textDecoration:"underline",textDecorationColor:"color-mix(in srgb, var(--graview-ink) 35%, transparent)",textUnderlineOffset:2},children:e.label}):(0,t.jsx)("span",{title:e.label,style:{...d,fontWeight:600},children:e.label});return e.quoted?(0,t.jsxs)(t.Fragment,{children:["\u201C",l,"\u201D"]}):l}var ze={accept:"Accepted.",decline:"Declined: it will not be suggested again.",later:"Hidden from you until tomorrow.",withdraw:"Withdrawn."},O={recorded:"Your vote was recorded.",withdrawn:"Your vote was withdrawn."},De=(e,o)=>o.startsWith(`${e}: `)?o.slice(e.length+2):o,Ie=e=>{let o=`${e.for} for, ${e.against} against`,d=Me(e.advisory);return d?`${o} \xB7 ${d}`:o};function Me(e){if(!e)return"";let o=e.for===0?"":e.for===1?"a visitor agrees":`${e.for} visitors agree`,d=e.against===0?"":e.against===1?`${o?"one":"a visitor"} disagrees`:`${e.against}${o?"":" visitors"} disagree`;return[o,d].filter(Boolean).join(", ")}function Y({suggestion:e,notNow:o,settled:d,heard:l,goes:n,under:s}){let{store:c,principal:a,seats:b,people:g,signIn:h}=D(),[r,v]=(0,m.useState)(null),[$,x]=(0,m.useState)(null),R=(0,m.useId)(),u=(0,m.useId)(),S=te(e.author,{graph:c.graph,schema:c.schema,seats:b,people:g}),w=(0,m.useMemo)(()=>le(c,e,a),[c,e,a]),i=(0,m.useMemo)(()=>w||c.permits({name:se,args:{suggestion:e.id,vote:"for"}},a).ok,[w,c,e.id,a]),{tally:p}=e,k=I(e),W=k&&a!==void 0&&!w&&ne(a).id===e.lineage.proposedBy,T=async y=>{v(null);try{if(y==="withdraw")ue(c,e.id,{author:a});else if(y==="accept"||y==="decline"){if((y==="accept"?G(c,e.id,{author:a}):ge(c,e.id,{author:a})).voted!==void 0){x(O.recorded),l(O.recorded);return}}else if(y==="unvote"){ce(c,e.id,null,{author:a}),x(O.withdrawn),l(O.withdrawn);return}else await o.dismiss({suggestion:e.id,at:new Date().toISOString(),until:pe()});d(ze[y])}catch(P){v(P instanceof Error?P.message:String(P))}},f=e.items.length>1,A=(0,m.useMemo)(()=>V(c,e),[c,e]),M=(0,m.useId)(),xe=s?A.alone:A.parts,F=s?`${s} ${M}`:M,L=new Set(A.parts.flatMap(y=>typeof y=="string"?[]:[y.record])),q=e.lineage&&!(k&&e.lineage.basis.startsWith("Proposed by "))?he(e.lineage):void 0,[Q,We]=(0,m.useState)(!1),Z=(0,m.useId)();return(0,t.jsxs)("li",{"data-testid":"suggestion","data-suggestion":e.id,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:4,lineHeight:1.45,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",columnGap:10,rowGap:4,minWidth:0},children:[(0,t.jsxs)("span",{id:M,"data-graview-suggestion-words":"",style:{...N,flex:"1 1 14em"},children:[k?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{"data-testid":"proposed-by",style:{color:"var(--graview-ink-muted)"},children:["Proposed by ",(0,t.jsx)("strong",{style:{fontWeight:600,color:"var(--graview-ink)"},children:W?"you":S}),":"]})," "]}):f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{style:{fontWeight:600},children:S})," ",(0,t.jsx)("span",{style:{color:"var(--graview-ink-muted)"},children:"suggests"})," "]}):null,f?De(S,e.headline??e.intent):xe.map((y,P)=>typeof y=="string"?y:(0,t.jsx)($e,{part:y,go:n(y.record)},P))]}),(0,t.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:4,marginInlineStart:"auto",minWidth:0},children:[q?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-why","aria-expanded":Q,"aria-controls":Z,onClick:()=>We(y=>!y),style:{...B,padding:"1px 6px"},children:"Why?"}):null,W?(0,t.jsx)("button",{type:"button","data-testid":"proposal-withdraw",onClick:()=>void T("withdraw"),style:E,children:"Withdraw"}):i?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-accept",onClick:()=>void T("accept"),...w?{"aria-describedby":F}:{"aria-pressed":p.mine==="for","aria-describedby":u},style:E,children:w&&f?"Accept all":"Yes"}):h?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-sign-in",onClick:()=>h.run(),style:E,children:"Sign in to vote"}):null,i&&!W?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-decline",onClick:()=>void T("decline"),...w?{"aria-describedby":F}:{"aria-pressed":p.mine==="against","aria-describedby":u},style:E,children:"No"}):null,!w&&i&&!W&&p.mine!==void 0?(0,t.jsx)("button",{type:"button","data-testid":"suggestion-withdraw-vote",onClick:()=>void T("unvote"),style:B,children:"Withdraw vote"}):null,(0,t.jsx)("button",{type:"button","data-testid":"suggestion-not-now",onClick:()=>void T("later"),title:"Hide it from you until tomorrow. It still waits for everyone else.","aria-describedby":R,style:B,children:"Later"})]})]}),(0,t.jsx)("span",{id:R,style:H,children:"Hides it from you until tomorrow; it still waits for everyone else."}),!w&&i&&!W?(0,t.jsx)("span",{id:u,style:H,children:"Counts as your vote; somebody who may make it decides."}):null,q?(0,t.jsx)("span",{id:Z,"data-graview-lineage":"",hidden:!Q,style:{...N,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:q}):null,f?(0,t.jsx)(Se,{suggestion:e,decides:w,heard:l}):null,e.about.some(y=>!L.has(y))&&(f||L.size===0)?(0,t.jsx)("div",{"data-graview-suggestion-records":"",style:{display:"flex",flexWrap:"wrap",gap:4,minWidth:0},children:e.about.filter(y=>!L.has(y)).slice(0,4).map(y=>(0,t.jsx)(fe,{id:y,label:me(c,y),go:n(y),testId:"suggestion-record"},y))}):null,w&&p.for+p.against+(p.advisory?p.advisory.for+p.advisory.against:0)>0?(0,t.jsx)("span",{"data-testid":"suggestion-tally",style:{...N,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:Ie(p)}):null,$?(0,t.jsx)("span",{"data-testid":"suggestion-voted",role:"status",style:{...N,fontSize:"0.75rem",color:"var(--graview-ink-muted)"},children:$}):null,r?(0,t.jsx)("span",{"data-testid":"suggestion-refused",role:"alert",style:{...N,fontSize:"0.75rem",color:"var(--graview-warn)"},children:r}):null]})}export{Ze as SuggestedCount,Je as SuggestedList,Me as advisoryWords,Ne as awayWords,Ie as tallyWords};
@@ -1 +0,0 @@
1
- var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{t as P}from"./chunk.SCVKHGO3.js";import{G as M,La as S,R as w,W as y,ea as m,fa as I,s as b,w as T,x as A}from"./chunk.FWXW4T4I.js";import{a as p}from"./chunk.SDO3U72B.js";import{b as f}from"./chunk.AJZBJBMO.js";var C=f(M(),1),h=f(y(),1),x=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.ZQYHNFRZ.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.W43XWQRC.js")))),O=x.part((e,n)=>(0,h.jsx)(e.Timeline,{...n}),{what:"The timeline"}),q=()=>x.prefetch();function K({face:e}){return w()?.open?(0,h.jsx)(C.Suspense,{fallback:null,children:(0,h.jsx)(O,{face:e})}):null}var i=f(M(),1),u=f(y(),1),v=new WeakMap,D=e=>{let n=v.get(e);return n||v.set(e,n={ask:null,doors:[],listeners:new Set}),n},k=e=>{for(let n of e.listeners)n()};function g(e,n){let t=D(e);t.ask=n,k(t)}var N=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.EQZPEOIW.js","./chunk.ZQYHNFRZ.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BO32A3W5.js")))),B=N.part((e,n)=>{let t=e.NotifySheet;return(0,u.jsx)(t,{...n})},{what:"Notify me"}),W=N.part((e,n)=>{let t=e.NotifiedList;return(0,u.jsx)(t,{...n})},{quiet:!0}),E=(e,n)=>n===void 0&&(e.onBehalfOf??e).id!==void 0;function F(e,n,t){let c=d=>t.tryDefinition(d)?.noun??d.replace(/[-_]+/g," "),o=e.on!==void 0?e.on:e.about.length===1?e.about[0]:void 0;if(e.act!==void 0){let d=o!==void 0&&n(o)!==void 0?o:void 0;return{label:"Notify me when someone does this\u2026",choices:[{on:"act",act:e.act,...d!==void 0?{record:d}:{}},...d!==void 0?[{on:"act",act:e.act}]:[]]}}if(o===void 0)return null;let s=n(o);if(s!==void 0)return{label:"Notify me when this changes\u2026",choices:[{on:"changed",record:o},{on:"act",record:o},{on:"reaches",kind:s,condition:"",record:o}]};let r=b(o)!==null?[b(o)]:T(o)?A(o):[];if(r.length!==1||!t.kinds.includes(r[0]))return null;let l=r[0],a=c(l);return{label:`Notify me when ${/^[aeiou]/i.test(a)?"an":"a"} ${a} is added\u2026`,choices:[{on:"created",kind:l},{on:"changed",kind:l},{on:"reaches",kind:l,condition:""}]}}function L(){let{store:e,principal:n,subscriptions:t,signIn:c}=m(),o=E(n,c);return(0,i.useMemo)(()=>o?s=>{let r=F(s,a=>e.graph.getNode(a)?.kind,e.schema);return r?{id:"notify",items:[{id:"notify-me",label:r.label,run:()=>g(t,{choices:r.choices,returnTo:s.element??null})}],prepare:()=>N.prefetch()}:null}:null,[o,e,t])}var z=[];function U({children:e}){let n=L(),t=(0,i.useMemo)(()=>n?[n]:z,[n]);return(0,u.jsx)(P,{sections:t,children:e})}function V(){let{subscriptions:e}=m(),n=(0,i.useId)(),t=D(e);(0,i.useEffect)(()=>(t.doors.push(n),k(t),()=>{t.doors.splice(t.doors.indexOf(n),1),k(t)}),[t,n]);let c=(0,i.useMemo)(()=>r=>(t.listeners.add(r),()=>void t.listeners.delete(r)),[t]),o=(0,i.useSyncExternalStore)(c,()=>t.ask,()=>null),s=(0,i.useSyncExternalStore)(c,()=>t.doors[0]===n,()=>!1);return!o||!s?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(B,{ask:o,close:()=>g(e,null)})})}function X({choices:e,label:n="Notify me",style:t,className:c,testId:o="notify-me"}){let{principal:s,subscriptions:r,signIn:l}=m();return E(s,l)?(0,u.jsx)("button",{type:"button","data-testid":o,className:c,onClick:a=>g(r,{choices:e,returnTo:a.currentTarget}),style:t,children:n}):null}function G(){let e=I(),n=e?.subscriptions,t=e?(e.principal.onBehalfOf??e.principal).id:void 0,[c,o]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(t===void 0||!n)return;let s=!0,r=()=>void Promise.resolve(n.list(t)).then(a=>s&&o(a.length),()=>s&&o(0));r();let l=n.onChange?.(r);return()=>{s=!1,l?.()}},[n,t]),c}function Y({style:e}){return G()===0?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(W,{...e?{style:e}:{}})})}export{q as a,K as b,L as c,U as d,V as e,X as f,G as g,Y as h};
@@ -1 +0,0 @@
1
- import{E as v,F as C,G as S,M as G,q as O}from"./chunk.NLZHNPDU.js";import{G as I,c as V,ea as m,j as y,l as p,m as g,n as u,o as D,v as B,z as E}from"./chunk.FWXW4T4I.js";import{$d as R,Yd as P,Zd as k,ae as T,pa as M}from"./chunk.DHPXRDT5.js";import{b as A}from"./chunk.AJZBJBMO.js";var W=A(I(),1);function j(e,t){try{t.length===0?localStorage.removeItem(v(e)):localStorage.setItem(v(e),JSON.stringify(t))}catch{}}function F(e,t){j(e,[...S(e).filter(n=>n.title!==t.title),t])}function H(e,t){j(e,S(e).filter(n=>n.title!==t))}function J(e,t){for(let n of e.places().filter(o=>o.title===t))e.forget?.(n.kind,n.as)}var U=e=>e===!0?{written:!0}:typeof e=="object"&&e!==null?{written:e.kept===!0,...e.said?{said:e.said}:{}}:{written:!1},N=e=>({title:e.title,lens:e.lens,on:e.on,...e.bindings?{bindings:e.bindings}:{},...e.options?{options:e.options}:{}});function Z(e,t){let n=o=>t.some(r=>r.title===o||r.as===P(o));if(!n(e))return e;for(let o=2;;o++)if(!n(`${e} ${o}`))return`${e} ${o}`}function ie(e){let{store:t,views:n,brand:o,seatTalk:r,onKeepLens:d}=m(),h=(0,W.useContext)(O),L=C(o,t.schema),b=async f=>{let{edit:i}=f;if(f.written&&d)try{await d({op:"remove-lens",title:i.title,on:i.on})}catch{}H(L,i.title),J(n,i.title),h?.dismiss(`kept:${i.title}`),r.setTurns(l=>[...l.map(s=>s.kept&&s.kept.edit.title===i.title&&!s.kept.taken?{...s,kept:{...s.kept,taken:!0}}:s),{role:"seat",text:`Took \u201C${i.title}\u201D back out of the places.`}]);let a=M(t.schema,i.on);e({to:"kind",kind:i.on,title:a,address:k(t.schema,i.on),said:`Went to ${a}.`})};return{keep:async f=>{let i=Z(f.edit.title,n.places()),a={...f.edit,title:i},l=!1,s;if(d)try{({written:l,said:s}=U(await d(a)))}catch{l=!1}l||F(L,N(a)),G(n,t.schema,[N(a)]);let K=n.places(),c=K.find(w=>w.title===i),x=s??(l?`Kept \u201C${i}\u201D as a lens: it is in the places now.`:d?`Kept \u201C${i}\u201D as your own lens. Ask the owner to keep it for everyone.`:`Kept \u201C${i}\u201D as your own lens.`),$={edit:a,written:l};r.setDraft(null),r.setTurns(w=>[...w,{role:"seat",text:x,kept:$}]),h?.notify({kind:"toast",id:`kept:${i}`,sentence:x,timeout:1e4,action:{label:"Take back",onSelect:()=>void b($)}}),c&&e({to:"picture",kind:c.kind,as:c.as,title:i,address:R(c.as,T(c,K)?k(t.schema,c.kind).slice(1):void 0),said:`Went to ${i}.`})},takeBack:b}}var q=A(I(),1);function _(e,t){switch(t.to){case"place":return{view:V("#")};case"picture":return{view:u(E(p(e,"filter",null),t.kind,t.as),[])};case"kind":{let n=D(g({...y(e,B(t.kind)),relation:null},!1),!0);return{view:u(p(p(n,"view",null),"filter",t.filter??null),[])}}case"record":return{view:u(y(g(p(p(e,"view",null),"filter",null),!1),t.id),[t.id])};case"problems":return{pane:"problems"}}}function z(e){let t=typeof document>"u"?null:document.querySelector('[data-testid="standing"]');t&&t.getAttribute("aria-expanded")==="true"!==e&&t.click()}function ae(){let{setView:e,seatTalk:t}=m();return(0,q.useCallback)(n=>{t.get().draft&&t.setDraft(null),z(n.to==="problems"),n.to!=="problems"&&e(o=>{let r=_(o,n);return"view"in r?r.view:o})},[e,t])}export{ie as a,z as b,ae as c};