graview 0.1.71 → 0.1.72

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 (212) hide show
  1. package/dist/preview/chunk.2IOJNFCR.js +1 -0
  2. package/dist/preview/{chunk.5EQRIZ6I.js → chunk.2Q4ZXP7P.js} +1 -1
  3. package/dist/preview/{chunk.MEAUTBVM.js → chunk.2TTKQAWQ.js} +1 -1
  4. package/dist/preview/{chunk.6BBUTKFC.js → chunk.2YSE3SQN.js} +3 -3
  5. package/dist/preview/{chunk.CGRX6SDE.js → chunk.2ZPR6FRI.js} +1 -1
  6. package/dist/preview/chunk.3BE4SHZD.js +1 -0
  7. package/dist/preview/{chunk.TSZ2S3VG.js → chunk.43HWCHBN.js} +1 -1
  8. package/dist/preview/{chunk.TQ3MNB6K.js → chunk.45OLF6BK.js} +1 -1
  9. package/dist/preview/{chunk.ZY3NAJDM.js → chunk.47QWCVZD.js} +1 -1
  10. package/dist/preview/{chunk.WU6D3SPL.js → chunk.4A7BRBEA.js} +1 -1
  11. package/dist/preview/chunk.4EPCI6VY.js +1 -0
  12. package/dist/preview/{chunk.UZKBFI52.js → chunk.4PB5UFUJ.js} +1 -1
  13. package/dist/preview/{chunk.MKJV3BM5.js → chunk.4TDYDIIM.js} +1 -1
  14. package/dist/preview/{chunk.HXRHEPPJ.js → chunk.4VX7GPFS.js} +1 -1
  15. package/dist/preview/{chunk.OUF2QFZL.js → chunk.523X2YEQ.js} +1 -1
  16. package/dist/preview/{chunk.KBJ3UUER.js → chunk.53GQQETN.js} +1 -1
  17. package/dist/preview/{chunk.DHO3QZYK.js → chunk.5MKZTHU2.js} +1 -1
  18. package/dist/preview/{chunk.F5O3HR7X.js → chunk.5ZT4R227.js} +1 -1
  19. package/dist/preview/{chunk.LHCGC3K6.js → chunk.65SI77M7.js} +1 -1
  20. package/dist/preview/chunk.6ESAFTWB.js +1 -0
  21. package/dist/preview/chunk.6GUIFP2A.js +1 -0
  22. package/dist/preview/{chunk.D6ODKMOV.js → chunk.6GZYKHEN.js} +1 -1
  23. package/dist/preview/{chunk.F7KVEWFH.js → chunk.6YKKZI4H.js} +1 -1
  24. package/dist/preview/{chunk.Z2BCOZDZ.js → chunk.73RMM4W7.js} +1 -1
  25. package/dist/preview/{chunk.4O64QV2Y.js → chunk.7DCBIMOI.js} +1 -1
  26. package/dist/preview/chunk.7JE3J7H4.js +1 -0
  27. package/dist/preview/{chunk.RDUGUC7R.js → chunk.7QGDWAHH.js} +1 -1
  28. package/dist/preview/{chunk.7PWLRRUS.js → chunk.7VCYVCYM.js} +2 -2
  29. package/dist/preview/{chunk.GFBE4VNT.js → chunk.A4TBVXHQ.js} +1 -1
  30. package/dist/preview/{chunk.LDWWUKKX.js → chunk.A6LJPXJ3.js} +1 -1
  31. package/dist/preview/chunk.AAPXF6NP.js +1 -0
  32. package/dist/preview/{chunk.UJ7RTNT4.js → chunk.APUICV5Z.js} +1 -1
  33. package/dist/preview/chunk.ASNVH2G4.js +25 -0
  34. package/dist/preview/{chunk.OKHXXIMN.js → chunk.CJHCUHVN.js} +1 -1
  35. package/dist/preview/chunk.CUEPNS3Z.js +1 -0
  36. package/dist/preview/{chunk.H33XWGAY.js → chunk.CUJRWBPX.js} +1 -1
  37. package/dist/preview/{chunk.4YZ2A6SJ.js → chunk.D5PW6YWF.js} +3 -3
  38. package/dist/preview/chunk.DCIYOZYP.js +1 -0
  39. package/dist/preview/{chunk.3CLTABGP.js → chunk.DEBW4FH6.js} +1 -1
  40. package/dist/preview/{chunk.UQZ2P6KD.js → chunk.DYPSFTRP.js} +1 -1
  41. package/dist/preview/{chunk.BWMPC7LK.js → chunk.E6QZUT4L.js} +1 -1
  42. package/dist/preview/{chunk.MEBKTW7H.js → chunk.E7QZZRAQ.js} +1 -1
  43. package/dist/preview/chunk.EHCMBAZO.js +3 -0
  44. package/dist/preview/chunk.EXTD5JWD.js +1 -0
  45. package/dist/preview/{chunk.S2BMI23H.js → chunk.EZF2T3XQ.js} +1 -1
  46. package/dist/preview/chunk.EZSST3IU.js +1 -0
  47. package/dist/preview/{chunk.7THS3DLZ.js → chunk.F2BZ4SC4.js} +1 -1
  48. package/dist/preview/chunk.F2I7ERGM.js +1 -0
  49. package/dist/preview/{chunk.VUDNQOOX.js → chunk.FCV3NX6L.js} +1 -1
  50. package/dist/preview/{chunk.QVBP4UZG.js → chunk.FFTBUXKX.js} +2 -2
  51. package/dist/preview/{chunk.7MDGPTYF.js → chunk.FILBI7XA.js} +1 -1
  52. package/dist/preview/{chunk.D4F6QX5L.js → chunk.FKSI5522.js} +1 -1
  53. package/dist/preview/{chunk.QNWGDG2Z.js → chunk.FQ2QUDZS.js} +1 -1
  54. package/dist/preview/{chunk.O5RPSUXV.js → chunk.G2ZDDO3C.js} +1 -1
  55. package/dist/preview/{chunk.IPKODEOZ.js → chunk.GAVEWSXU.js} +1 -1
  56. package/dist/preview/chunk.GH6QX7JR.js +87 -0
  57. package/dist/preview/chunk.GMHBAS45.js +1 -0
  58. package/dist/preview/{chunk.OYMN3IFX.js → chunk.GXK5PI7I.js} +1 -1
  59. package/dist/preview/{chunk.DDSAFU3B.js → chunk.GYP3EF6Z.js} +1 -1
  60. package/dist/preview/chunk.H2RVMT4Y.js +111 -0
  61. package/dist/preview/chunk.HCHGKI64.js +1 -0
  62. package/dist/preview/chunk.HE7SAJKZ.js +1 -0
  63. package/dist/preview/{chunk.JLNTE5CH.js → chunk.HIIYDKFC.js} +2 -2
  64. package/dist/preview/chunk.HPDUGKEF.js +32 -0
  65. package/dist/preview/{chunk.H4BPTMED.js → chunk.HQRPOGTS.js} +1 -1
  66. package/dist/preview/chunk.HUJLELZ3.js +1 -0
  67. package/dist/preview/chunk.HVRUHRXR.js +1 -0
  68. package/dist/preview/{chunk.QJJWAYHB.js → chunk.I46VNAMS.js} +1 -1
  69. package/dist/preview/{chunk.QK4QZVQG.js → chunk.ID4GOKT6.js} +1 -1
  70. package/dist/preview/{chunk.64K5ELSQ.js → chunk.IZKCTF2R.js} +1 -1
  71. package/dist/preview/{chunk.4HU2ILFY.js → chunk.IZUAZ6EV.js} +1 -1
  72. package/dist/preview/{chunk.5PQV7GFE.js → chunk.J3CUBMUZ.js} +1 -1
  73. package/dist/preview/{chunk.P43LPXXJ.js → chunk.J4D4BIB4.js} +1 -1
  74. package/dist/preview/{chunk.NI4OPHTL.js → chunk.J7GH2CGV.js} +1 -1
  75. package/dist/preview/{chunk.5WCSQFS5.js → chunk.JE4RBRKH.js} +1 -1
  76. package/dist/preview/{chunk.ARGEGV5T.js → chunk.JJSZLCNU.js} +1 -1
  77. package/dist/preview/{chunk.WS5ORRGS.js → chunk.JKX4J3KG.js} +1 -1
  78. package/dist/preview/{chunk.ZONRIOIA.js → chunk.JMXBMLKH.js} +1 -1
  79. package/dist/preview/{chunk.6ZRVVRDQ.js → chunk.JOB3EKS6.js} +1 -1
  80. package/dist/preview/{chunk.PQTXM4VY.js → chunk.JP33TNCH.js} +1 -1
  81. package/dist/preview/{chunk.Z3TK2LJM.js → chunk.K6EN2YR4.js} +1 -1
  82. package/dist/preview/chunk.K6YKXTKC.js +1 -0
  83. package/dist/preview/{chunk.VPFUOTY7.js → chunk.KAIZDIRK.js} +1 -1
  84. package/dist/preview/{chunk.KZUHXOZU.js → chunk.KAQGSLC6.js} +3 -3
  85. package/dist/preview/{chunk.WGH2P2YL.js → chunk.KFYSKZC4.js} +1 -1
  86. package/dist/preview/chunk.KHVW6Q3T.js +1 -0
  87. package/dist/preview/chunk.KMFH26SS.js +1 -0
  88. package/dist/preview/{chunk.67S2UWBT.js → chunk.L3ST2YKI.js} +1 -1
  89. package/dist/preview/{chunk.V5JB5UJS.js → chunk.L6BLZJ6K.js} +1 -1
  90. package/dist/preview/{chunk.MQNW3O67.js → chunk.LG2BQ5LB.js} +1 -1
  91. package/dist/preview/{chunk.T6KOL7TW.js → chunk.LLYHHG67.js} +1 -1
  92. package/dist/preview/{chunk.MWWNKM3I.js → chunk.LPWANRBL.js} +1 -1
  93. package/dist/preview/{chunk.EJC7ACZT.js → chunk.LSS64NAA.js} +1 -1
  94. package/dist/preview/{chunk.NH3VXTGX.js → chunk.MFNWHXGL.js} +1 -1
  95. package/dist/preview/{chunk.DG3YNOH3.js → chunk.MNH3WUAB.js} +1 -1
  96. package/dist/preview/chunk.MQ7AB5N4.js +1 -0
  97. package/dist/preview/{chunk.KJPLX72N.js → chunk.MU5JK5TK.js} +1 -1
  98. package/dist/preview/{chunk.L6P55HFW.js → chunk.N5CACZ5F.js} +1 -1
  99. package/dist/preview/{chunk.W3TJF4EH.js → chunk.NFC2TYA6.js} +1 -1
  100. package/dist/preview/{chunk.VL3YDD7D.js → chunk.NKRDVOLJ.js} +1 -1
  101. package/dist/preview/{chunk.SGYZM6ZU.js → chunk.NNK2E2EP.js} +1 -1
  102. package/dist/preview/{chunk.W332P5T3.js → chunk.NVPKYWMF.js} +1 -1
  103. package/dist/preview/{chunk.EEGVI266.js → chunk.NWJ7ELHN.js} +1 -1
  104. package/dist/preview/{chunk.7KX36ENH.js → chunk.O5P6LXHF.js} +1 -1
  105. package/dist/preview/{chunk.DX7RGK5G.js → chunk.OFK6673S.js} +1 -1
  106. package/dist/preview/{chunk.HPFEYMGP.js → chunk.OG6FEP3K.js} +1 -1
  107. package/dist/preview/{chunk.EA2KYBBR.js → chunk.OHGAZ3D5.js} +1 -1
  108. package/dist/preview/{chunk.SPJ34VHA.js → chunk.ONVYKLRX.js} +1 -1
  109. package/dist/preview/chunk.OQ3FKUP2.js +1 -0
  110. package/dist/preview/chunk.OUJV4CYS.js +1 -0
  111. package/dist/preview/{chunk.CVN2XFMF.js → chunk.OWHH7JDV.js} +1 -1
  112. package/dist/preview/{chunk.G767NLBH.js → chunk.OXDCGGZV.js} +1 -1
  113. package/dist/preview/{chunk.VVIQSFM4.js → chunk.P3Z4ZCL3.js} +1 -1
  114. package/dist/preview/{chunk.FNSVGSZI.js → chunk.PF7XQ5R5.js} +1 -1
  115. package/dist/preview/chunk.PH547SON.js +1 -0
  116. package/dist/preview/{chunk.N3MXLORL.js → chunk.PS765ODQ.js} +1 -1
  117. package/dist/preview/{chunk.NXHEOHRR.js → chunk.PVAYYFT2.js} +1 -1
  118. package/dist/preview/{chunk.Z22C2JJ4.js → chunk.Q6WOIE5I.js} +1 -1
  119. package/dist/preview/{chunk.CEJIH3CN.js → chunk.QE257AXE.js} +1 -1
  120. package/dist/preview/chunk.QKNC5OUC.js +1 -0
  121. package/dist/preview/{chunk.W6L2VAJG.js → chunk.QMGBAKX6.js} +1 -1
  122. package/dist/preview/{chunk.DJGZOPAS.js → chunk.QNFX5VHW.js} +1 -1
  123. package/dist/preview/chunk.QPCDAQTW.js +1 -0
  124. package/dist/preview/{chunk.Y5WQD6KV.js → chunk.QPTQIGLX.js} +1 -1
  125. package/dist/preview/{chunk.IXYG65TM.js → chunk.R5YGW5ZX.js} +1 -1
  126. package/dist/preview/{chunk.7FI75ZVE.js → chunk.RJ6KEVZC.js} +1 -1
  127. package/dist/preview/{chunk.OVSKPBPS.js → chunk.RKVMRP7B.js} +1 -1
  128. package/dist/preview/{chunk.7TACFS7Q.js → chunk.S7U2CHHG.js} +1 -1
  129. package/dist/preview/{chunk.HT35PAHI.js → chunk.SD2UYSV6.js} +2 -2
  130. package/dist/preview/{chunk.LQ5J6YQW.js → chunk.SI5GGFQR.js} +1 -1
  131. package/dist/preview/{chunk.U5KJQFAP.js → chunk.SMF5S4DQ.js} +1 -1
  132. package/dist/preview/{chunk.RO3D2RNP.js → chunk.SNDFIJVX.js} +1 -1
  133. package/dist/preview/{chunk.CEOQY5KS.js → chunk.STHWM422.js} +2 -2
  134. package/dist/preview/{chunk.X7U3JMBR.js → chunk.SV75TRCH.js} +1 -1
  135. package/dist/preview/{chunk.Q6GEPVQ7.js → chunk.SXGPRFA4.js} +1 -1
  136. package/dist/preview/{chunk.6TBQV3NO.js → chunk.T3RFZ66S.js} +1 -1
  137. package/dist/preview/{chunk.VGYG2IBZ.js → chunk.T6ISUVUP.js} +1 -1
  138. package/dist/preview/{chunk.L3MLGFIS.js → chunk.TBLOBXZ2.js} +1 -1
  139. package/dist/preview/{chunk.MT252WP4.js → chunk.TDWJU6GW.js} +1 -1
  140. package/dist/preview/{chunk.EPSYX2SF.js → chunk.THLT6NVO.js} +1 -1
  141. package/dist/preview/{chunk.W5O5F4FT.js → chunk.TQCVEKPH.js} +1 -1
  142. package/dist/preview/{chunk.4ZEHLUXV.js → chunk.TQF5XCUS.js} +1 -1
  143. package/dist/preview/{chunk.VICBF3MQ.js → chunk.TWXYI5AP.js} +1 -1
  144. package/dist/preview/{chunk.LNKY6MT4.js → chunk.UOUQZYVD.js} +1 -1
  145. package/dist/preview/{chunk.FIUPDGUZ.js → chunk.UPL3D3ZO.js} +1 -1
  146. package/dist/preview/{chunk.GFOZVQBQ.js → chunk.UXW43HNW.js} +1 -1
  147. package/dist/preview/{chunk.MM7MLBGB.js → chunk.V4GSVXSV.js} +1 -1
  148. package/dist/preview/chunk.VCEDSOAK.js +1 -0
  149. package/dist/preview/{chunk.3RRK6UTN.js → chunk.VE4AQFLW.js} +1 -1
  150. package/dist/preview/{chunk.QDDDKEBH.js → chunk.VGQDPEB5.js} +1 -1
  151. package/dist/preview/{chunk.XTHSPLZZ.js → chunk.VMYXBFPE.js} +1 -1
  152. package/dist/preview/{chunk.EHLV3LND.js → chunk.VNI6HZEF.js} +2 -2
  153. package/dist/preview/chunk.VQRY2NQ6.js +1 -0
  154. package/dist/preview/{chunk.MFMC35ET.js → chunk.VUE6ILQV.js} +1 -1
  155. package/dist/preview/{chunk.BSWR5SGX.js → chunk.W2VSEEKX.js} +1 -1
  156. package/dist/preview/{chunk.4QMAYVPU.js → chunk.WAPY4RCS.js} +1 -1
  157. package/dist/preview/chunk.WFRSGGU5.js +1 -0
  158. package/dist/preview/{chunk.QKRQPUCE.js → chunk.WIVNFOQR.js} +1 -1
  159. package/dist/preview/chunk.WRIBFLVG.js +1 -0
  160. package/dist/preview/{chunk.RHIP2UYE.js → chunk.WWD2TS47.js} +1 -1
  161. package/dist/preview/{chunk.7XGU6KVF.js → chunk.WWFOQDPR.js} +2 -2
  162. package/dist/preview/{chunk.JNK5WBSU.js → chunk.X5MCAUFX.js} +1 -1
  163. package/dist/preview/{chunk.G5AF5IXL.js → chunk.XBWFQ54R.js} +1 -1
  164. package/dist/preview/{chunk.7LPHWJB4.js → chunk.XMBGT6UT.js} +1 -1
  165. package/dist/preview/{chunk.FOHZPYUV.js → chunk.XP4IVKKR.js} +1 -1
  166. package/dist/preview/chunk.XYBWBMNU.js +1 -0
  167. package/dist/preview/{chunk.OPMGQS5J.js → chunk.YC2IDHQX.js} +1 -1
  168. package/dist/preview/{chunk.JAPTTM6Y.js → chunk.YCYJHPWS.js} +1 -1
  169. package/dist/preview/{chunk.T6UJEXFL.js → chunk.YF5GCOSZ.js} +1 -1
  170. package/dist/preview/{chunk.VDFQFLTU.js → chunk.YGGBGHZU.js} +1 -1
  171. package/dist/preview/{chunk.U6V4KZF5.js → chunk.YRC6PKXP.js} +1 -1
  172. package/dist/preview/{chunk.EJIQDMLU.js → chunk.YRN67Z5K.js} +1 -1
  173. package/dist/preview/{chunk.6L6RUOSF.js → chunk.ZDUKVXBI.js} +1 -1
  174. package/dist/preview/index.html +55 -55
  175. package/dist/preview/page.js +2 -2
  176. package/package.json +6 -6
  177. package/dist/preview/chunk.23DATB5Y.js +0 -1
  178. package/dist/preview/chunk.2INDKSJI.js +0 -1
  179. package/dist/preview/chunk.45HUV56Z.js +0 -1
  180. package/dist/preview/chunk.4LWWXIM4.js +0 -1
  181. package/dist/preview/chunk.4UDST6IF.js +0 -1
  182. package/dist/preview/chunk.6A3KTD66.js +0 -1
  183. package/dist/preview/chunk.6IMRCKB4.js +0 -1
  184. package/dist/preview/chunk.7ZLCA3WK.js +0 -1
  185. package/dist/preview/chunk.CPK6CYKN.js +0 -111
  186. package/dist/preview/chunk.DGYWNM5U.js +0 -1
  187. package/dist/preview/chunk.EOSN5DWW.js +0 -1
  188. package/dist/preview/chunk.EUXAIG73.js +0 -1
  189. package/dist/preview/chunk.EZQK23AB.js +0 -1
  190. package/dist/preview/chunk.F6MY6WJ4.js +0 -1
  191. package/dist/preview/chunk.FW6M6GIU.js +0 -32
  192. package/dist/preview/chunk.GKYJQE5A.js +0 -1
  193. package/dist/preview/chunk.HLKDYI6J.js +0 -1
  194. package/dist/preview/chunk.IZDB777E.js +0 -1
  195. package/dist/preview/chunk.JCKIJSW7.js +0 -25
  196. package/dist/preview/chunk.JREA2XDG.js +0 -1
  197. package/dist/preview/chunk.MJ4T6YXI.js +0 -1
  198. package/dist/preview/chunk.ML4X7VVK.js +0 -1
  199. package/dist/preview/chunk.NNGG7RCO.js +0 -1
  200. package/dist/preview/chunk.OOQG2AEF.js +0 -1
  201. package/dist/preview/chunk.RJ7VSWTA.js +0 -87
  202. package/dist/preview/chunk.RSMCTI2N.js +0 -1
  203. package/dist/preview/chunk.TBEKEHFS.js +0 -1
  204. package/dist/preview/chunk.TO3ZKCA2.js +0 -1
  205. package/dist/preview/chunk.TTM5GQ2U.js +0 -1
  206. package/dist/preview/chunk.TUBY6SV3.js +0 -1
  207. package/dist/preview/chunk.UJPX3BUV.js +0 -1
  208. package/dist/preview/chunk.X2UYEA7H.js +0 -1
  209. package/dist/preview/chunk.XSM4OTF4.js +0 -1
  210. package/dist/preview/chunk.YXVUJ3NB.js +0 -1
  211. package/dist/preview/chunk.ZGLOXN7O.js +0 -1
  212. package/dist/preview/chunk.ZLQIGZXO.js +0 -3
@@ -5,72 +5,72 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Graview preview</title>
7
7
  <link rel="preload" href="/graview/document" as="fetch" crossorigin="anonymous">
8
- <link rel="modulepreload" href="/chunk.G5AF5IXL.js">
9
- <link rel="modulepreload" href="/chunk.5WCSQFS5.js">
10
- <link rel="modulepreload" href="/chunk.TBEKEHFS.js">
11
- <link rel="modulepreload" href="/chunk.LHCGC3K6.js">
12
- <link rel="modulepreload" href="/chunk.L3MLGFIS.js">
8
+ <link rel="modulepreload" href="/chunk.XBWFQ54R.js">
9
+ <link rel="modulepreload" href="/chunk.JE4RBRKH.js">
10
+ <link rel="modulepreload" href="/chunk.HCHGKI64.js">
11
+ <link rel="modulepreload" href="/chunk.65SI77M7.js">
12
+ <link rel="modulepreload" href="/chunk.TBLOBXZ2.js">
13
13
  <link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
14
- <link rel="modulepreload" href="/chunk.OYMN3IFX.js">
15
- <link rel="modulepreload" href="/chunk.N3MXLORL.js">
16
- <link rel="modulepreload" href="/chunk.RJ7VSWTA.js">
17
- <link rel="modulepreload" href="/chunk.P43LPXXJ.js">
18
- <link rel="modulepreload" href="/chunk.JCKIJSW7.js">
14
+ <link rel="modulepreload" href="/chunk.GXK5PI7I.js">
15
+ <link rel="modulepreload" href="/chunk.PS765ODQ.js">
16
+ <link rel="modulepreload" href="/chunk.GH6QX7JR.js">
17
+ <link rel="modulepreload" href="/chunk.J4D4BIB4.js">
18
+ <link rel="modulepreload" href="/chunk.ASNVH2G4.js">
19
19
  <link rel="modulepreload" href="/chunk.SDO3U72B.js">
20
- <link rel="modulepreload" href="/chunk.6L6RUOSF.js">
20
+ <link rel="modulepreload" href="/chunk.ZDUKVXBI.js">
21
21
  <link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
22
22
  <link rel="modulepreload" href="/chunk.AJZBJBMO.js">
23
- <link rel="modulepreload" href="/chunk.EUXAIG73.js">
24
- <link rel="modulepreload" href="/chunk.6BBUTKFC.js">
25
- <link rel="modulepreload" href="/chunk.Z22C2JJ4.js">
26
- <link rel="modulepreload" href="/chunk.MKJV3BM5.js">
27
- <link rel="modulepreload" href="/chunk.CEOQY5KS.js">
23
+ <link rel="modulepreload" href="/chunk.PH547SON.js">
24
+ <link rel="modulepreload" href="/chunk.2YSE3SQN.js">
25
+ <link rel="modulepreload" href="/chunk.Q6WOIE5I.js">
26
+ <link rel="modulepreload" href="/chunk.4TDYDIIM.js">
27
+ <link rel="modulepreload" href="/chunk.STHWM422.js">
28
28
  <link rel="modulepreload" href="/chunk.Q355UPFG.js">
29
- <link rel="modulepreload" href="/chunk.4HU2ILFY.js">
30
- <link rel="modulepreload" href="/chunk.WGH2P2YL.js">
31
- <link rel="modulepreload" href="/chunk.EHLV3LND.js">
32
- <link rel="modulepreload" href="/chunk.EPSYX2SF.js">
33
- <link rel="modulepreload" href="/chunk.EOSN5DWW.js">
34
- <link rel="modulepreload" href="/chunk.T6UJEXFL.js">
35
- <link rel="modulepreload" href="/chunk.7THS3DLZ.js">
36
- <link rel="modulepreload" href="/chunk.4QMAYVPU.js">
37
- <link rel="modulepreload" href="/chunk.ARGEGV5T.js">
38
- <link rel="modulepreload" href="/chunk.WS5ORRGS.js">
39
- <link rel="modulepreload" href="/chunk.ZONRIOIA.js">
40
- <link rel="modulepreload" href="/chunk.NXHEOHRR.js">
29
+ <link rel="modulepreload" href="/chunk.IZUAZ6EV.js">
30
+ <link rel="modulepreload" href="/chunk.KFYSKZC4.js">
31
+ <link rel="modulepreload" href="/chunk.VNI6HZEF.js">
32
+ <link rel="modulepreload" href="/chunk.THLT6NVO.js">
33
+ <link rel="modulepreload" href="/chunk.KMFH26SS.js">
34
+ <link rel="modulepreload" href="/chunk.YF5GCOSZ.js">
35
+ <link rel="modulepreload" href="/chunk.F2BZ4SC4.js">
36
+ <link rel="modulepreload" href="/chunk.WAPY4RCS.js">
37
+ <link rel="modulepreload" href="/chunk.JJSZLCNU.js">
38
+ <link rel="modulepreload" href="/chunk.JKX4J3KG.js">
39
+ <link rel="modulepreload" href="/chunk.JMXBMLKH.js">
40
+ <link rel="modulepreload" href="/chunk.PVAYYFT2.js">
41
41
  <link rel="modulepreload" href="/chunk.MB7LKKUD.js">
42
- <link rel="modulepreload" href="/chunk.QJJWAYHB.js">
43
- <link rel="modulepreload" href="/chunk.6A3KTD66.js">
44
- <link rel="modulepreload" href="/chunk.MQNW3O67.js">
45
- <link rel="modulepreload" href="/chunk.67S2UWBT.js">
46
- <link rel="modulepreload" href="/chunk.7PWLRRUS.js">
47
- <link rel="modulepreload" href="/chunk.OKHXXIMN.js">
48
- <link rel="modulepreload" href="/chunk.NH3VXTGX.js">
49
- <link rel="modulepreload" href="/chunk.6IMRCKB4.js">
50
- <link rel="modulepreload" href="/chunk.7KX36ENH.js">
42
+ <link rel="modulepreload" href="/chunk.I46VNAMS.js">
43
+ <link rel="modulepreload" href="/chunk.3BE4SHZD.js">
44
+ <link rel="modulepreload" href="/chunk.LG2BQ5LB.js">
45
+ <link rel="modulepreload" href="/chunk.L3ST2YKI.js">
46
+ <link rel="modulepreload" href="/chunk.7VCYVCYM.js">
47
+ <link rel="modulepreload" href="/chunk.CJHCUHVN.js">
48
+ <link rel="modulepreload" href="/chunk.MFNWHXGL.js">
49
+ <link rel="modulepreload" href="/chunk.DCIYOZYP.js">
50
+ <link rel="modulepreload" href="/chunk.O5P6LXHF.js">
51
51
  <link rel="modulepreload" href="/chunk.BJUUSIQY.js">
52
- <link rel="modulepreload" href="/chunk.QDDDKEBH.js">
53
- <link rel="modulepreload" href="/chunk.QKRQPUCE.js">
52
+ <link rel="modulepreload" href="/chunk.VGQDPEB5.js">
53
+ <link rel="modulepreload" href="/chunk.WIVNFOQR.js">
54
54
  <link rel="modulepreload" href="/chunk.XOZU4OFA.js">
55
- <link rel="modulepreload" href="/chunk.KBJ3UUER.js">
55
+ <link rel="modulepreload" href="/chunk.53GQQETN.js">
56
56
  <link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
57
- <link rel="modulepreload" href="/chunk.NI4OPHTL.js">
58
- <link rel="modulepreload" href="/chunk.U5KJQFAP.js">
59
- <link rel="modulepreload" href="/chunk.FOHZPYUV.js">
60
- <link rel="modulepreload" href="/chunk.IXYG65TM.js">
61
- <link rel="modulepreload" href="/chunk.W6L2VAJG.js">
57
+ <link rel="modulepreload" href="/chunk.J7GH2CGV.js">
58
+ <link rel="modulepreload" href="/chunk.SMF5S4DQ.js">
59
+ <link rel="modulepreload" href="/chunk.XP4IVKKR.js">
60
+ <link rel="modulepreload" href="/chunk.R5YGW5ZX.js">
61
+ <link rel="modulepreload" href="/chunk.QMGBAKX6.js">
62
62
  <link rel="modulepreload" href="/chunk.MIE4TJRW.js">
63
- <link rel="modulepreload" href="/chunk.3CLTABGP.js">
63
+ <link rel="modulepreload" href="/chunk.DEBW4FH6.js">
64
64
  <link rel="modulepreload" href="/chunk.RD2FSSLV.js">
65
- <link rel="modulepreload" href="/chunk.CVN2XFMF.js">
66
- <link rel="modulepreload" href="/chunk.6TBQV3NO.js">
67
- <link rel="modulepreload" href="/chunk.MT252WP4.js">
68
- <link rel="modulepreload" href="/chunk.VVIQSFM4.js">
69
- <link rel="modulepreload" href="/chunk.TQ3MNB6K.js">
70
- <link rel="modulepreload" href="/chunk.VGYG2IBZ.js">
71
- <link rel="modulepreload" href="/chunk.DGYWNM5U.js">
72
- <link rel="modulepreload" href="/chunk.5EQRIZ6I.js">
73
- <script>(()=>{const later=["/chunk.MJ4T6YXI.js","/chunk.V5JB5UJS.js","/chunk.JLNTE5CH.js","/chunk.DDSAFU3B.js","/chunk.HJCQ6I3S.js","/chunk.DJGZOPAS.js","/chunk.GFOZVQBQ.js","/chunk.PQTXM4VY.js","/chunk.BIDL7GQD.js","/chunk.4O64QV2Y.js","/chunk.UQZ2P6KD.js","/chunk.OOQG2AEF.js","/chunk.LNKY6MT4.js","/chunk.FW6M6GIU.js","/chunk.3RRK6UTN.js","/chunk.MWWNKM3I.js","/chunk.5OS4SYHE.js","/chunk.U5P23GO7.js","/chunk.RO3D2RNP.js","/chunk.MEAUTBVM.js","/chunk.GFBE4VNT.js","/chunk.RDUGUC7R.js","/chunk.OPMGQS5J.js","/chunk.X7U3JMBR.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
65
+ <link rel="modulepreload" href="/chunk.OWHH7JDV.js">
66
+ <link rel="modulepreload" href="/chunk.T3RFZ66S.js">
67
+ <link rel="modulepreload" href="/chunk.TDWJU6GW.js">
68
+ <link rel="modulepreload" href="/chunk.P3Z4ZCL3.js">
69
+ <link rel="modulepreload" href="/chunk.45OLF6BK.js">
70
+ <link rel="modulepreload" href="/chunk.T6ISUVUP.js">
71
+ <link rel="modulepreload" href="/chunk.6ESAFTWB.js">
72
+ <link rel="modulepreload" href="/chunk.2Q4ZXP7P.js">
73
+ <script>(()=>{const later=["/chunk.VQRY2NQ6.js","/chunk.L6BLZJ6K.js","/chunk.HIIYDKFC.js","/chunk.GYP3EF6Z.js","/chunk.HJCQ6I3S.js","/chunk.QNFX5VHW.js","/chunk.UXW43HNW.js","/chunk.JP33TNCH.js","/chunk.BIDL7GQD.js","/chunk.7DCBIMOI.js","/chunk.DYPSFTRP.js","/chunk.EZSST3IU.js","/chunk.UOUQZYVD.js","/chunk.HPDUGKEF.js","/chunk.VE4AQFLW.js","/chunk.LPWANRBL.js","/chunk.5OS4SYHE.js","/chunk.U5P23GO7.js","/chunk.SNDFIJVX.js","/chunk.2TTKQAWQ.js","/chunk.A4TBVXHQ.js","/chunk.7QGDWAHH.js","/chunk.YC2IDHQX.js","/chunk.SV75TRCH.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
74
74
  <style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
75
75
  </head>
76
76
  <body>
@@ -1,2 +1,2 @@
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 Wt,b as cr,c as lr,d as ur,e as fr,f as Dt,g as pr,h as jt}from"./chunk.G5AF5IXL.js";import{a as fo}from"./chunk.5WCSQFS5.js";import{a as mr,b as hr,c as Kt,d as yr,e as zt,f as wr,g as vr,h as br,i as Gt,j as Sr,k as Pr,l as Ar,m as Rr,n as kr,o as Er,p as Tr,q as xr,r as Fr,s as Or,t as Cr,u as Ye}from"./chunk.TBEKEHFS.js";import{b as gr}from"./chunk.LHCGC3K6.js";import{c as qt}from"./chunk.L3MLGFIS.js";import{a as Ot}from"./chunk.Q5WEOX3Q.js";import{b as Ct,i as Hn}from"./chunk.OYMN3IFX.js";import{n as ct}from"./chunk.N3MXLORL.js";import{D as _t,G as ar,L as ir,P as sr,Q as dr,k as Xn,n as er,o as tr,p as It,q as nr,s as rr,w as or}from"./chunk.RJ7VSWTA.js";import{c as uo}from"./chunk.P43LPXXJ.js";import{Ea as qn,Fa as Kn,G as $n,Ga as zn,Ha as Gn,Ia as Un,Ka as Jn,La as Yn,Na as Qn,Oa as $t,Ra as Zn,Ua as ft,Y as In,a as Nn,b as lt,c as ut,ca as _n,j as Vn,la as Wn,m as Vt,ma as Dn,oa as jn}from"./chunk.JCKIJSW7.js";import{a as Ne}from"./chunk.SDO3U72B.js";import{Be as Bt,Ce as Mt,De as Ht,Ge as Mn,Hc as Lt,He as Nt,Ib as st,Ic as En,Jb as An,Kd as Tn,Ld as xn,Td as Fn,Vd as On,Wd as Cn,Yb as Rn,Yd as dt,_b as kn,ue as Fe,ve as Ln,we as Bn,xb as Ke,zb as Pn}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as qe}from"./chunk.AJZBJBMO.js";async function pt(t,r={}){let o=t.compiled===void 0||!mo(t.compiled,t.document)?void 0:Hn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:s}=await po();return s(t.document,r)}var Lr,po=()=>Lr??=(__graviewPreload(import.meta.url,["./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.FOHZPYUV.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JREA2XDG.js")).catch(t=>{throw Lr=void 0,t});function mo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,s=r;if(typeof s=="string")try{s=JSON.parse(s)}catch{return!1}return o!==void 0&&Ot(Ct(o).document)===Ot(Ct(s).document)}var c=qe($n(),1);var ht=qe($n(),1),Ut="data-graview-drawn",ho=200,Br=50,yo=1e4,mt=()=>typeof performance<"u"?performance.now():Date.now();function go(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function wo(t,r){if(t.ownerDocument.fonts?.status==="loading"||qn()>0||Un(r)>0||t.querySelector('[aria-busy="true"]')||go(t).some(s=>!s.complete&&s.loading!=="lazy"))return!1;for(let s of t.querySelectorAll("[data-worker-view-place]"))if(!s.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Mr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(s=>`${s.offsetWidth}x${s.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function vo(t,r,o,s){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let m=mt(),d=m,w=Mr(t),h=!1,E,L=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(B=>!(B.target===t&&B.attributeName===Ut))&&(d=mt())});L?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let _=()=>{h=!0,L?.disconnect(),E!==void 0&&clearTimeout(E)},v=x=>{let B=!1,te=()=>{B||(B=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(te,0)),setTimeout(te,100)},T=()=>{if(h)return;let x=Mr(t);x!==w&&(w=x,d=mt());let B=mt();if(wo(t,s)&&B-d>=ho||B-m>=yo){v(()=>{h||(_(),t.setAttribute(Ut,r),Yn(),o())});return}E=setTimeout(T,Br)};return E=setTimeout(T,Br),_}function Hr(t,r,o,s,l){Jn();let m=(0,ht.useRef)({place:o,onDrawn:s});m.current={place:o,onDrawn:s},(0,ht.useLayoutEffect)(()=>{l&&Gn(l);let d=E=>vo(E,m.current.place.path,()=>m.current.onDrawn?.(m.current.place),l);if(t.current)return d(t.current);let w,h=!1;return queueMicrotask(()=>{!h&&t.current&&(w=d(t.current))}),()=>{h=!0,w?.()}},[r,t,l])}var $r=qe(fo(),1);var C=qe(uo(),1);var g=qe(In(),1);function yt(t,r={}){let o=$t(t);return{Face:o.part((l,m)=>(0,c.createElement)(l,m),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Qt=t=>Promise.all([t,sr()]).then(([r])=>r),Ir=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.4HU2ILFY.js","./chunk.EPSYX2SF.js","./chunk.JLNTE5CH.js","./chunk.T6UJEXFL.js","./chunk.4QMAYVPU.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.HJCQ6I3S.js","./chunk.DJGZOPAS.js","./chunk.GFOZVQBQ.js","./chunk.3RRK6UTN.js","./chunk.MWWNKM3I.js","./chunk.6A3KTD66.js","./chunk.U5P23GO7.js","./chunk.RO3D2RNP.js","./chunk.MEAUTBVM.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.GFBE4VNT.js","./chunk.RDUGUC7R.js","./chunk.OPMGQS5J.js","./chunk.PQTXM4VY.js","./chunk.BIDL7GQD.js","./chunk.7KX36ENH.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.TBEKEHFS.js","./chunk.LHCGC3K6.js","./chunk.Q5WEOX3Q.js","./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.UQZ2P6KD.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4YZ2A6SJ.js"))),bo=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.6BBUTKFC.js","./chunk.Z22C2JJ4.js","./chunk.MKJV3BM5.js","./chunk.CEOQY5KS.js","./chunk.Q355UPFG.js","./chunk.4HU2ILFY.js","./chunk.WGH2P2YL.js","./chunk.EHLV3LND.js","./chunk.EPSYX2SF.js","./chunk.EOSN5DWW.js","./chunk.T6UJEXFL.js","./chunk.7THS3DLZ.js","./chunk.4QMAYVPU.js","./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.MB7LKKUD.js","./chunk.QJJWAYHB.js","./chunk.6A3KTD66.js","./chunk.MQNW3O67.js","./chunk.67S2UWBT.js","./chunk.7PWLRRUS.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.7KX36ENH.js","./chunk.BJUUSIQY.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EUXAIG73.js"))),So=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.6BBUTKFC.js","./chunk.Z22C2JJ4.js","./chunk.MKJV3BM5.js","./chunk.CEOQY5KS.js","./chunk.Q355UPFG.js","./chunk.4HU2ILFY.js","./chunk.WGH2P2YL.js","./chunk.EHLV3LND.js","./chunk.EPSYX2SF.js","./chunk.EOSN5DWW.js","./chunk.T6UJEXFL.js","./chunk.7THS3DLZ.js","./chunk.4QMAYVPU.js","./chunk.ARGEGV5T.js","./chunk.WS5ORRGS.js","./chunk.ZONRIOIA.js","./chunk.NXHEOHRR.js","./chunk.MB7LKKUD.js","./chunk.QJJWAYHB.js","./chunk.6A3KTD66.js","./chunk.MQNW3O67.js","./chunk.67S2UWBT.js","./chunk.7PWLRRUS.js","./chunk.OKHXXIMN.js","./chunk.NH3VXTGX.js","./chunk.6IMRCKB4.js","./chunk.7KX36ENH.js","./chunk.BJUUSIQY.js","./chunk.QDDDKEBH.js","./chunk.QKRQPUCE.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TUBY6SV3.js"))),_r=yt(()=>Qt(Ir().then(t=>t.SceneFace)),{what:"This view"}),Wr=yt(()=>Ir().then(t=>t.SceneKeeping),{quiet:!0}),Dr=yt(()=>Qt(bo().then(t=>t.PagesContent)),{what:"This page"}),jr=yt(()=>Qt(So().then(t=>t.PictureFace)),{what:"This picture"}),Po=_r.Face,Ao=Wr.Face,Ro=Dr.Face,ko=jr.Face;qt(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.Q6GEPVQ7.js","./chunk.CEQQIW7Z.js","./chunk.Z2BCOZDZ.js","./chunk.WGH2P2YL.js","./chunk.GOVRX2YX.js","./chunk.TRP66PHK.js","./chunk.PGT4ZQDG.js","./chunk.UZKBFI52.js","./chunk.MFMC35ET.js","./chunk.GKYJQE5A.js","./chunk.EZQK23AB.js","./chunk.QDVGHI7R.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.PQTXM4VY.js","./chunk.7KX36ENH.js","./chunk.UQZ2P6KD.js","./chunk.MT252WP4.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KZUHXOZU.js"))));function Ve(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(qr));return Promise.all([...[...o].map(s=>s.fetch()),rr()]).then(()=>{},()=>{})}var qr=t=>t==="pages"?[Dr]:t==="picture"?[jr]:[_r,Wr],Kr=t=>qr(t).every(r=>r.here()),Eo=150,Jt=0;function Nr(t,r){if(Kr(t))return r();let o=++Jt,s=()=>{o===Jt&&(Jt+=1,r())};Ve(t).then(s),setTimeout(s,Eo)}var To=768;function xo(t,r){let o=r!==null&&r>=To;(0,c.useEffect)(()=>{if(!o||t==="picture")return;let s=t==="pages"?"scene":"pages";if(Kr(s))return;let l=globalThis,m=()=>void Ve(s),d=()=>{},w=Qn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(m,{timeout:4e3});d=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(m,1500);d=()=>clearTimeout(h)}});return()=>(w(),d())},[t,o])}function Fo({asked:t,shown:r,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function Oo({auto:t,scene:r}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Co=$t(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,g.jsx)(t.StudioPlace,{...r}),{quiet:!0});function zr(t,r,o,s,l){return Dt(t,fr(r?ut(r):l??Nn,s),o)}function Zt(t){return t&&ut(t).overview?"graview":"scene"}function Vr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Gr(t){let[,r]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>r(!0),[]),s=(0,c.useRef)(!1);return t.at&&!gt?(0,g.jsx)(Kt,{onReady:o,fetch:Xt}):!s.current&&hr(t.draftView)?(0,g.jsx)(Kt,{onReady:o,fetch:mr}):(s.current=!0,(0,g.jsx)(Lo,{...t}))}function Lo(t){let{app:r,stop:o,bar:s=!0,standing:l="Everything is in order",principal:m,heading:d=2}=t,{rootRef:w,scope:h,css:E,scheme:L,store:_,presence:v,brand:T,auto:x,height:B}=Sr(t),te=yr(t.draftView),k=vr(t,dr,te.over),[le]=(0,c.useState)(zn),u=t.basePath===void 0?{}:{basePath:t.basePath},[$]=(0,c.useState)(It),I=t.notices??$,z=p=>Bt(p,u),oe={...t.routing?{routing:t.routing}:{},...u},[ae]=(0,c.useState)(()=>{let p=t.at?.face;if(p)return p;let j=o===void 0&&Vr(r,k)?"pages":Zt(o),ve=Wt({...oe,face:j});return t.face===void 0&&t.onOpening?.(ve),ve}),[Se,O]=(0,c.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&cr(oe)&&Vr(r,k)),Pe=(0,c.useRef)(t.onFace);Pe.current=t.onFace,(0,c.useLayoutEffect)(()=>{Se&&(Pe.current?.("pages"),O(!1))},[Se]);let R=Se?"pages":t.face??ae,b=r.schema.kinds,V=t.routing==="address",Ae=(0,c.useMemo)(()=>t.at?gt.settleAt(t,_.seenBy(m??{kind:"human"}),k.places()):void 0,[]),M=(0,c.useMemo)(()=>Dn(k,r.schema),[k,r.schema]),me=(0,c.useMemo)(()=>{let p=Ae?.stop??(V?lr(t.basePath):void 0)??o;return R==="scene"&&p===void 0&&M===void 0&&(t.path===void 0||Yt(t.path))?jt(void 0):zr(R,p,b,k.places(),M)},[]),[W]=(0,c.useState)(R);(0,c.useEffect)(()=>{W!=="pages"&&Wn(k)},[W,k]);let H=(0,c.useRef)(void 0),q=p=>p===void 0||Yt(p)?"/":p;H.current??={path:q(Ae?.path??(V?R==="pages"?(Mt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==H.current.asked&&(H.current={path:q(t.path),asked:t.path});let Z=(0,c.useRef)(t.onNavigate);Z.current=t.onNavigate;let Ce=(0,c.useCallback)((p,j)=>{H.current.path=p,Z.current?.(p,j)},[]),{at:he,setAt:D,steering:G,steer:ne}=Fr(H.current.path),N=(0,c.useContext)(Ur);N&&(N.pages=()=>H.current.path);let[$e]=(0,c.useState)(()=>({})),Y=N??$e,ie=(0,c.useMemo)(()=>er(I),[I]),K=(0,c.useRef)(void 0),Le=(0,c.useCallback)(p=>void(H.current.path=p),[]),U=Xn(w),[ue,Be]=(0,c.useState)(!1),Re=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview")&&!ue,S=Re?"pages":R,ye=(0,c.useRef)(!1);ye.current=ue&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(R==="scene"||R==="graview"),N&&(N.shown=S);let ge=(0,c.useRef)(R==="graview"?"graview":"scene");(S==="scene"||S==="graview")&&(ge.current=S),(0,c.useState)(()=>{if(!V||typeof window>"u"||S==="pages"||S==="picture")return;let{pathname:p,search:j,hash:ve}=window.location;Mt(p,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Fe)}${j}${ve}`)}),br(w,S,t.onIntrinsicHeight),xo(S,U);let ke=Or(t.onError,S),fe=Cr(t.onReady,S),Me=(0,c.useRef)(t.onFaceDrawn);Me.current=t.onFaceDrawn;let He=(0,c.useCallback)((p,j)=>{fe(j),Me.current?.(p)},[fe]),[Ze,Ie]=(0,c.useState)(null),Xe=k.places(),_e=(0,c.useRef)({shown:S,onFace:t.onFace});_e.current={shown:S,onFace:t.onFace};let We=(0,c.useCallback)((p,j,ve)=>{if(V){K.current?.(p,j,ve);return}_e.current.onFace?.(p),Z.current?.(p==="pages"?j??H.current.path:Fe,"push")},[V]),[J,se]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{S==="pages"&&se(void 0)},[S]);let Q=(0,c.useRef)(o);(0,c.useEffect)(()=>{Q.current!==o&&(Q.current=o,se(void 0))},[o]);let De=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){if(Be(!0),se(p),R==="scene"||R==="graview"){Nr(R,()=>{V?window.history.pushState(null,"",`${z(Fe)}${p??""}`):Z.current?.(Fe,"push")});return}Nr(ge.current,()=>We(ge.current,void 0,p))}},[V,R,t.basePath,We]),de=(0,c.useCallback)(p=>{if(_e.current.shown==="pages"){G.go.current||(H.current.path=p),ne(p);return}if(H.current.path=p,D(p),ye.current){Be(!1),V?window.history.pushState(null,"",z(p)):Z.current?.(p,"push");return}We("pages",p)},[G,ne,D,We,V,t.basePath]),et=k.arrangement?.(),Ee=S==="pages",we=t.hrefOf,Te=we??(V?z:void 0),Pt=(0,c.useMemo)(()=>({open:de,...we?{href:we}:V?{href:p=>Bt(p,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[de,V,t.basePath,we]);return(0,g.jsxs)("section",{ref:w,className:h,"aria-label":t.label??r.name,"data-graview-embed":S,"data-graview-scheme":L,...Re?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:B,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:E}),(0,g.jsxs)(Zn.Provider,{value:ke,children:[(0,g.jsx)(Pr,{rootRef:w,board:I,onReport:t.onReport,where:()=>S==="pages"?Ar(he):S==="picture"?{place:"picture"}:tr(Y.view?.focusId)}),(0,g.jsx)(wr,{rootRef:w,firstLook:t.firstLook,app:ar(T??{name:r.name},r.schema)}),(0,g.jsx)(Ye,{module:"@graview/react",report:ke,content:!0,children:(0,g.jsx)(Kn.Provider,{value:le,children:(0,g.jsx)(_n,{store:_,views:k,initialView:me,scheme:L,...Rr(t,v,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,g.jsxs)(nr.Provider,{value:ie,children:[(0,g.jsx)(No,{face:S,stop:J??o,kinds:b,places:Xe,opens:M}),(0,g.jsx)(Bo,{into:Y}),(0,g.jsx)(Mo,{rootRef:w,face:R,shown:S,path:he,stop:o,draft:te.n,onDrawn:t.onDrawn,parts:le}),V?(0,g.jsx)(ur,{pagesWere:Ae?.path,basePath:t.basePath,shown:S,onFace:t.onFace,toggle:K,kinds:b,places:Xe,opens:M,landed:Le}):null,s&&S!=="picture"?(0,g.jsx)(Ye,{module:"@graview/embed",report:ke,children:(0,g.jsx)(kr,{name:T?.name??r.name,heading:d,named:zt(s).name!==!1,faces:zt(s).faces===!1?void 0:{scene:{label:Ln(et),current:!Ee,go:()=>De(),reach:()=>void Ve(ge.current)},pages:{label:Bn(et),current:Ee,go:()=>de(H.current.path),reach:()=>void Ve("pages")}},at:Ee?he:null,without:t.pages?.without(),home:{...Te?.("/")!==void 0?{href:Te("/")}:{},go:()=>de("/"),current:Ee&&he.split("?")[0]==="/"},reach:{...Te?{href:Te}:{},go:p=>de(p.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:Ee?void 0:(0,g.jsx)(Vo,{app:r,studio:t.studio,report:ke}),onFind:Ie})}):null,(0,g.jsx)(or.Provider,{value:Ze,children:(0,g.jsx)(Ye,{module:S==="pages"||S==="picture"?"@graview/pages":"@graview/react",report:ke,content:!0,children:(0,g.jsxs)(c.Suspense,{fallback:(0,g.jsx)(Oo,{auto:x,scene:S!=="pages"&&S!=="picture"}),children:[S==="picture"?(0,g.jsx)(ko,{scope:h,store:_,views:k,as:(o?ut(o).within?.view:void 0)??""}):S==="pages"?(0,g.jsx)(Ro,{store:_,views:k,presence:v,auto:x,brand:T,steering:G,overview:De,scope:h,titleLevel:xr(d),quickAsk:_t(t.quickAsk),props:{...t,onNavigate:Ce,...V?{}:{path:H.current.path}}}):(0,g.jsx)(jn.Provider,{value:Pt,children:(0,g.jsx)(Po,{address:V,auto:x,scheme:L,scope:h,quickAsk:_t(t.quickAsk)})}),(0,g.jsx)(Fo,{asked:R,shown:S,onDrawn:He})]})},S)})]})})})})]})]})}var Yt=t=>t.split(/[?#]/)[0]===Fe,Ur=(0,c.createContext)(null);function Bo({into:t}){return t.view=ft().view,null}function Mo({rootRef:t,face:r,shown:o,path:s,stop:l,draft:m,onDrawn:d,parts:w}){let{view:h}=ft(),E=o==="scene"||o==="graview",L=lt(h),{pan:_,...v}=h,T=h.pan?lt(v):L,x={face:r,path:E?Fe:o==="picture"?l??"#":s,stop:L};return Hr(t,`${o} ${E?T:x.path} ${m}`,x,d,w),null}var gt,Ho=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.G5AF5IXL.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.W3TJF4EH.js"))),Xt=()=>Ho().then(t=>void(gt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Xt));function No({face:t,stop:r,kinds:o,places:s,opens:l}){let{view:m,go:d}=ft(),w=(0,c.useRef)({face:t,stop:r});return(0,c.useLayoutEffect)(()=>{let h=w.current.stop!==r,E=w.current.face!==t,L=w.current.face==="pages";if(w.current={face:t,stop:r},!h&&!E||t==="pages"||t==="picture")return;let _=(h||L)&&r!==void 0?zr(t,r,o,s):L&&pr(m)?Dt(t,jt(l),o):t==="graview"?Vt(m,!0):m.overview?Vn(Vt(m,!1),ir(m,o)):m;d(_)},[t,r,o,m,d,l]),null}function Vo({app:t,studio:r,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Ao,{})}),r!==!1?(0,g.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,g.jsx)($o,{app:t,studio:r})}):null]})}function $o({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},s=r?.place;return s?(0,g.jsx)(s,{...o}):(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Co,{...o})})}function Io({path:t,stop:r,...o},s){return{...o,app:s.app,at:s.at,remote:s.remote,...s.remote.presence?{presence:s.remote.presence}:{}}}function en(t,r){let o=r.store??r.remote?.store??gr(r.app,r.seed),s=r.notices??It(),l=null,m={},d=0,w=r.label,h=r.app,E=Promise.resolve(),L=r.at?.face??r.face,_=L===void 0?void 0:Wt({...r,face:L}),v=_??Zt(r.stop),T=null,x=[],B=u=>{if(T=u,u!==v)return;let $=x;x=[];for(let I of $)I()};function te(){let[u,$]=(0,c.useState)(_),[I,z]=(0,c.useState)(r.stop),[oe,ae]=(0,c.useState)(r.path),[Se,O]=(0,c.useState)(r.scheme??"auto"),[Pe,R]=(0,c.useState)(r.principal),[b,V]=(0,c.useState)(r.seats),[Ae,M]=(0,c.useState)(r.quickAsk),[me,W]=(0,c.useState)(r.people),[H,q]=(0,c.useState)(r.hostContext),[Z,Ce]=(0,c.useState)(r.brand),[he,D]=(0,c.useState)(r.whileAway),[G,ne]=(0,c.useState)(r.label),[N,$e]=(0,c.useState)(r.hostActions),[Y,ie]=(0,c.useState)(r.barActions),[K,Le]=(0,c.useState)(()=>Er(r)),[U,ue]=(0,c.useState)(void 0),[Be,Re]=(0,c.useState)(r.draftView);return l={app:S=>{ue(S),ae(void 0),z(void 0)},face:$,stop:z,path:ae,scheme:O,seat:R,seats:V,quickAsk:M,people:W,hostContext:q,brand:Ce,whileAway:D,label:ne,hostActions:$e,barActions:ie,hostBar:S=>Le(ye=>({...ye,...S})),draft:Re},(0,g.jsx)(Ur.Provider,{value:m,children:(0,g.jsx)(Gr,{...U?Io(r,U):r,store:o,notices:s,...u!==void 0?{face:u}:{},onOpening:S=>{v=S},...I!==void 0?{stop:I}:{},...oe!==void 0?{path:oe}:{},...Pe?{principal:Pe}:{},...b?{seats:b}:{},...Ae!==void 0?{quickAsk:Ae}:{},...me?{people:me}:{},...H?{hostContext:H}:{},...Z?{brand:Z}:{},whileAway:he,label:G,hostActions:N,barActions:Y,...Tr(K),draftView:Be,scheme:Se,onFace:S=>{v=S,$(S)},onSeat:R,onFaceDrawn:B},U?.n??0)})}let k=()=>{let u=m.view?.focusId,$=u?o.graph.getNode(u)?.kind:void 0,I=(m.shown??v)==="scene"||(m.shown??v)==="graview";return{face:v,path:I?Fe:m.pages?.()??r.path??"/",stop:m.view?lt(m.view):r.stop??"#",...$?{kind:$}:{}}},le=(0,$r.createRoot)(t);return(0,C.flushSync)(()=>le.render((0,g.jsx)(te,{}))),{get store(){return o},where:k,setApp:(u,$,I)=>{let z="graph"in $?{store:$}:$,oe=()=>{let ae=k();o=z.store,w=I?.label??(w===h.name?u.name:w),h=u,(0,C.flushSync)(()=>{l?.label(w),l?.app({app:u,remote:z,at:ae,n:++d})})};gt?oe():E=E.then(Xt).then(oe)},setFace:u=>{v=u,(0,C.flushSync)(()=>l?.face(u))},setStop:u=>(0,C.flushSync)(()=>l?.stop(u)),setPath:u=>(0,C.flushSync)(()=>{if(Yt(u)){(v==="pages"||v==="picture")&&(v="scene",l?.face("scene"));return}l?.path(u),v!=="pages"&&(v="pages",l?.face("pages"))}),setScheme:u=>(0,C.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,C.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,C.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,C.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,C.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,C.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,C.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,C.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,C.flushSync)(()=>l?.draft(u)),setLabel:u=>{w=u,(0,C.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,C.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,C.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,C.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,C.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,C.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,C.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,C.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>E.then(()=>T===v?void 0:new Promise(u=>x.push(u))),notify:u=>{let $;return(0,C.flushSync)(()=>{$=s.notify(u)}),$},unmount:()=>le.unmount()}}var wt=t=>`s${(t+1).toString(36)}`;var ee={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",profile:"x-graview-profile",profileName:"x-graview-profile-name",forProfile:"x-graview-for-profile",forProfileName:"x-graview-for-profile-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function vt(t,r={}){try{let o=new URL(t),s=o.searchParams.get(ze.param);if(s)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:s,headers:{[ze.header]:s,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Jr="/graview/friction";var Yr="/graview/live",tn="graview.ship",nn=`${tn}.${st}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},Oe=t=>t?.lineage?{lineage:t.lineage}:{},_o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
2
- `)[0]??"":String(r)})`;function Wo(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(s=>!!s&&Array.isArray(s.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},Do={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,s){super(o);this.conflicts=s;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},jo=new Set([502,503,504]);async function qo(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function Ko(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var zo=1,Go=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function bt(t){return(await Qr(t,Wo(t.carry),"This app was updated while your changes were on the way.",Go())).remote}async function Qr(t,r,o,s){let{key:l,...m}=vt(t.url,t.headers),d={...t,...m},w=d.fetch??fetch,h={"content-type":"application/json",...d.headers??{}},E={...St(d.principal),[ee.via]:d.via??"web"};Object.assign(h,E);let L=d.live===!0,_=d.presenceEveryMs,v=d.visible??Yo,T="connecting",x=s.statuses,B=s.tally,te=[],k,le=[],u=()=>T==="online"&&k!==void 0?"held":T,$=()=>{let e=u();if(s.told!==e){s.told=e;for(let n of[...x])n(e)}},I=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&B.reconnects++,T=e,$(),e==="online"))for(let n of te.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,i=n!==k;if(k=n,oe(),!!i&&($(),n===void 0)){for(let a of le.splice(0))a();X&&clearTimeout(X),dn()}},oe=()=>{if(s.toldHeld!==k){s.toldHeld=k;for(let e of[...s.helds])e(k??null)}},ae=async(e,n)=>{let i;try{i=await w(e,n)}catch(a){throw p()||I("offline"),new Qe(a instanceof Error?a.message:String(a))}if(i.status===503&&await qo(i))return I("online"),i;if(jo.has(i.status))throw p()||I("offline"),new Qe(`The server is away (${i.status})`);return I("online"),i},Se=async(e=!1)=>{let n=`${d.url}/graview/state?opFormat=${Ke.op}`,i=e?await w(n,{headers:h}):await ae(n,{headers:h});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`The server refused (${i.status})`);return await i.json()},O=d.state??await Se(!0);L||(T="online"),k=typeof O.held=="string"&&O.held.length>0?O.held:void 0,oe();let Pe=O.enabledModules??d.enabledModules,R=d.localApp?d.localApp(d.app):d.app,b=new Cn({schema:R.schema,mutations:R.mutations??[],invariants:R.invariants??[],...R.policy?{policy:R.policy}:{},...R.publishing?{publishing:R.publishing}:{},...R.tidying?{tidying:R.tidying}:{},...R.modules?{modules:R.modules}:{},...Pe?{enabledModules:Pe}:{},...R.intelligence?{intelligence:R.intelligence}:{},...R.brand?.timeZone?{timeZone:R.brand.timeZone}:{},snapshot:O.snapshot,log:O.log,...O.horizon!==void 0?{horizon:O.horizon}:{},ids:Ko(),...d.storeOptions??{}});kn.served.add(b);let V=d.friction!==!1&&d.principal?.kind!=="visitor";V&&Tn(b,e=>{V&&w(`${d.url}${Jr}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(V=n.status!==404&&n.status!==410),()=>{})});let Ae=Fn(b),M=O.log.at(-1)?.seq??(O.horizon??0)-1,me=Lt.of(O.log,{horizon:O.horizon??0}),W=null,H,q=new Map,Z=s.who,Ce=!1,he=e=>{if(ce)return;Ce=!0;let n=Mn(new Map,e,Date.now(),Ht,W?.participant);H!==void 0&&n.delete(H);let i=n.size!==q.size;if(!i)for(let[a,f]of n)Nt(f,q.get(a))||(i=!0);if(q=n,!!i)for(let a of[...Z])a([...q.values()])},D=[],G=new Set,ne=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},N=new Map,$e=(e,n)=>{let i=N.get(e);i&&(N.delete(e),i.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,ie=[],K=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return ie.push({ops:e,drop:n}),[];let i=Math.min(...e.filter(P=>P.seq>M).map(P=>P.seq));if(Number.isFinite(i)&&i>M+1)return ie.push({ops:e,drop:n}),U(),[];let a=D.filter(P=>e.some(re=>re.batch===P)),f=[...new Set([...n,...a])].filter(P=>G.has(P)),y,A=D.filter(P=>!a.includes(P));try{y=b.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(P){if(!(P instanceof On))throw P;return ie.push({ops:e,drop:n}),U(),[]}for(let P of a)ne(P);e.some(P=>P.seq>M)&&A.some(P=>!f.includes(P))&&B.rebases++,e.length>0&&(M=Math.max(M,...e.map(P=>P.seq)),me.note(e));for(let P of f)G.delete(P);for(let P of a)$e(P,e);return e.some(P=>P.lineage?.liftedStop===!0||P.undoes!==void 0&&(b.log.get(P.undoes)?.lineage?.stopsKind===!0||b.log.get(P.undoes)===void 0&&(b.stopsServed?.stops.length??0)>0))&&U(),y},Le=e=>{let n=e.stops??[],i=e.stoppedKinds??[];n.length===0&&i.length===0&&!b.stopsServed||(b.stopsServed=n.length>0||i.length>0?{stops:n,kinds:i}:void 0,b.notify(Pn,[]))};(O.stops||O.stoppedKinds)&&(b.stopsServed={stops:O.stops??[],kinds:O.stoppedKinds??[]});let U=()=>{Y||(Y=He(Se().then(e=>{if(ue(e)){ie=[];return}Le(e);let n=new Set(e.log.map(f=>f.batch)),i=D.filter(f=>n.has(f));for(let f of i)ne(f);let a=b.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);M=e.log.at(-1)?.seq??(e.horizon??0)-1,me=Lt.of(e.log,{horizon:e.horizon??0}),B.resyncs++;for(let f of i)$e(f,e.log)}).then(()=>{Y=void 0;let e=ie;ie=[];for(let{ops:n,drop:i}of e)K(n,i)},()=>{Y=void 0,ie=[]})))},ue=e=>(typeof e.build=="string"&&ln(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===O.version?!1:(kt(e.version),!0)),Be=async e=>{let i=await(await ae(`${d.url}/graview/since?seq=${wt(e)}&opFormat=${Ke.op}`,{headers:h})).json();return ue(i)?[]:((i.ops?.length??0)>0&&Le(i),i.reset===!0?(U(),[]):i.ops??[])},Re=async()=>{let e=await S();return Y&&await Y,e},S=async()=>{if(W&&!p()&&v()){let n=await(await ae(`${d.url}/graview/here?opFormat=${Ke.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:W,seq:wt(M)})})).json();return ue(n)?[]:(typeof n.participant=="string"&&(H=n.participant),he(n.who??[]),K(n.ops??[]))}return K(await Be(M))},ye=new Map,ge=new Map,ke=new Set,fe=new Map,Me=new Set,He=e=>(Me.add(e),e.finally(()=>Me.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),Ie=0,Xe=(e,n)=>{let i=Ze.then(()=>We(e,n));return Ze=i.catch(()=>{}),i},_e=()=>new Promise((e,n)=>te.push({again:e,give:n})),We=async(e,n)=>{let i,a;for(;;){try{i=await ae(`${d.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:Ke.op})})}catch(F){if(!(F instanceof Qe)||Q)throw F;if(await _e(),p())return tt(e,n);continue}if(a=await i.json().catch(()=>({})),i.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!Q){if(typeof a.version=="number"?ue(a):(z(a.held),!1))break;if(k!==void 0&&(Ft>0||L)){if(await new Promise(F=>le.push(F)),Q)throw new Ge("The client closed.");if(p())return tt(e,n);continue}}let A;if(i.status===503&&a.reason==="unavailable"&&!Q)A=rn(d.backoff,Ie++);else{if(Ie=0,i.status!==429||Q)break;A=Uo(i.headers.get("retry-after"),a.retryAfter)}if(await new Promise(F=>setTimeout(F,A)),p())return tt(e,n)}if(ce||ue(a))throw new Ge("The app was changed.");if(!i.ok){let A=a.error??`The server refused (${i.status})`;throw a.conflict?new pe(A,a.conflicts??[]):new Ue({reason:a.reason??Do[i.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>M+1&&(f=await Be(M)),n!==void 0&&(a.batch&&ye.set(n,a.batch),ne(n)),K(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},J,se=!1,Q=!1,De=0,de,et=0,Ee=0,we=null,Te=()=>{},Pt=new Promise(e=>{Te=e}),p=()=>L&&se&&J?.readyState===zo,j=e=>{if(!p())return!1;try{return J.send(JSON.stringify(e)),!0}catch{return!1}},ve=(e=!1)=>{!W||!p()||!v()||!e&&we&&Nt(W,we)&&(_===void 0||Date.now()-Ee<_)||j({t:"here",presence:W})&&(we=W,Ee=Date.now())},xe=new Set,X,dn=()=>{if(X=void 0,k!==void 0)return;let e=[...N.entries()].filter(([n])=>xe.has(n));xe.clear();for(let[,n]of e)j(n.message)},cn=(e,n)=>{N.has(e)&&(xe.add(e),X&&clearTimeout(X),X=setTimeout(dn,Math.max(0,n)))},eo=e=>{N.has(e)&&xe.add(e)},tt=(e,n)=>new Promise((i,a)=>{let f=n??`send-${++et}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...Oe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...Oe(e)};if(N.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:i,reject:a}),xe.size>0||k!==void 0){xe.add(f);return}j(y)}),nt=(e,n)=>p()?tt(e,n):Xe(e,n),to=e=>{switch(e.t){case"welcome":{if(Le(e),ln(e.build),typeof e.version=="number"&&e.version!==O.version){kt(e.version);return}if(se=!0,De=0,typeof e.participant=="string"&&(H=e.participant),z(e.held),e.state?U():K(e.ops??[]),xe.clear(),X&&clearTimeout(X),X=void 0,k!==void 0)for(let n of N.keys())xe.add(n);else for(let n of N.values())j(n.message);ve(!0),I("online"),Te();return}case"ops":K(e.ops??[]);return;case"ack":{let n=N.get(e.cid);if(!n){K(e.ops??[]);return}N.delete(e.cid),Ie=0,n.mine!==void 0&&(ye.set(n.mine,e.batch),ne(n.mine)),K(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=N.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){k!==void 0?eo(e.cid):cn(e.cid,rn(d.backoff,Ie++));return}N.delete(e.cid),n.reject(e.t==="conflict"?new pe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":he(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==O.version&&kt(e.version);return;case"reload":mn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&J){let n=J;yn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=s.declarations,Rt=s.builds,ln=e=>{if(!(ce||s.otherBuild!==void 0||!d.build||typeof e!="string"||e.length===0||e===d.build)){s.otherBuild=e;for(let n of[...Rt])n(e)}},un=()=>{let e=[],n=0;for(let i of D){let a=fe.get(i);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Oe(a),batch:i}):n++}return{carried:e,undos:n}},fn=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,pn=e=>{ce=!0,W=null;let n=new Ge(e);for(let a of N.values())a.reject(n);N.clear(),at&&clearInterval(at),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let a of te.splice(0))a.give(n);for(let a of le.splice(0))a();let i=J;J=void 0,se=!1;try{i?.close(1e3,e)}catch{}Te()};async function kt(e){if(ce)return;if(!d.resolveApp){mn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:i}=un(),a=d.resolveApp,f=W;pn("The app was changed.");try{let y=await a(e),{state:A,...F}=d,P=await Qr({...F,app:y},n,"The app was changed while your changes were on the way.",s);f&&P.remote.presence.here(f);for(let it of[...At])it(P.remote,e);let re=[...i>0?[rt(fn(i,"The app was changed"))]:[],...P.unheard()];for(let it of re)for(let lo of je)lo(it.sentence,it)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let F of je)F(A,rt(A))}}function mn(e){if(ce)return;let{carried:n,undos:i}=un();pn(e);let a=!1;if(d.carry&&n.length>0)try{d.carry.storage.setItem(d.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),i>0&&f.push(fn(i,"This app was updated"));for(let y of f)for(let A of je)A(y,rt(y));(d.reloadPage??Jo)()}let hn=()=>{if(Q||!L)return;let e=`${d.url.replace(/^http/,"ws").replace(/\/$/,"")}${Yr}`,{"content-type":n,...i}=h,a;try{a=d.socket?d.socket(e,i,[nn]):co(e,i)}catch{return gn()}J=a,se=!1,a.onopen=()=>{J===a&&a.send(JSON.stringify({t:"hello",seq:wt(M),protocol:st,wire:tn,opFormat:Ke.op,...d.build?{build:d.build.slice(0,64)}:{},...d.hostProtocol!==void 0?{hostProtocol:d.hostProtocol}:{}}))},a.onmessage=f=>{if(J!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}to(y)},a.onclose=()=>yn(a),a.onerror=()=>{}},be,no=()=>{Ce=!1,be&&clearTimeout(be),be=setTimeout(()=>{if(be=void 0,Ce||Q)return;let e=new Map([...q].filter(([,n])=>n.held!=="socket"));if(e.size!==q.size){q=e;for(let n of Z)n([...q.values()])}},Ht),be.unref?.()};function yn(e){if(J!==e)return;let n=se;J=void 0,se=!1,we=null,n&&(I("offline"),no()),gn()}let gn=()=>{if(Q)return;let e=rn(d.backoff,De);De++,de=setTimeout(hn,e)},wn=b.applyAll.bind(b),ro=b.undo.bind(b),oo=b.previewAll.bind(b);b.previewAll=(e,n)=>oo(e,{...d.principal?{author:d.principal}:{},...n});let je=s.refusals,Je=[],rt=e=>({reason:"invalid",sentence:e}),ot=s.conflicts,Et=!1,vn,Tt=async(e,n)=>{if(n instanceof Ge||ce)return;let i=n instanceof Ue?n.refusal:Rn(n),a=i.sentence,f=n instanceof pe?vn?.yoursOf(b,fe.get(e)?.calls??[]):void 0;ne(e);try{K([],[e])}catch{}let y=fe.get(e);fe.delete(e);let A=y?.calls[0];if(A&&!(n instanceof pe)){let F=b.allMutations().find(re=>re.name===A.name)?.subject?.arg,P=F&&b.graph.getNode(A.args[F])?.kind;xn(b,{type:"refused",act:A.name,code:i.reason,...P?{kind:P}:{}},d.principal)}if(n instanceof pe&&B.conflicts++,n instanceof pe&&!p()&&await Re().catch(()=>[]),n instanceof pe&&Y&&await Y,n instanceof pe&&ot.size>0){let F=!1,P={sentence:a,conflicts:f?n.conflicts.map(re=>re.node===f.node&&re.field===f.field?{...re,yours:f.yours}:re):n.conflicts,keepTheirs(){F=!0},useMine(){if(!(F||!y)){F=!0,Et=!0;try{b.applyAll(f?[f.over(M)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Oe(y)})}finally{Et=!1}}}};for(let re of ot)re(P);return}for(let F of je)F(a,i)},ao=(e,n)=>e.flatMap(i=>i.mutation?.name===An?[]:i.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:M}]:[]));b.applyAll=(e,n)=>{let i=En(b.log.all().filter(A=>G.has(A.batch))),a=wn(e,{...d.principal?{author:d.principal}:{},...n}),f=e.map((A,F)=>{let P=a.minted?.[F];return P===void 0||A.args?.id!==void 0?A:{...A,mintedHint:P}});D.push(a.batch),G.add(a.batch),fe.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...Oe(n)});let y=Et?[]:[...me.baseFor(a.ops,i,(A,F)=>b.collaborative(A,F)),...ao(a.ops,i)];return ge.set(a.batch,He(nt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...Oe(n)},a.batch).catch(A=>Tt(a.batch,A)))),a},b.apply=(e,n)=>b.applyAll([e],n),b.undo=(e,n)=>{let i=typeof e=="string"?[e]:e,a=ro(i.map(y=>ye.get(y)??y),{...d.principal?{author:d.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(i.map(y=>ge.get(y)));return ge.set(a.batch,He(f.then(()=>{let y=i.filter(A=>!ke.has(A));if(y.length===0){ne(a.batch),fe.delete(a.batch),K([],[a.batch]);return}return nt({undo:y.map(A=>ye.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...Oe(n)},a.batch)}).catch(y=>Tt(a.batch,y)))),a};let io=async(e,n={})=>{xt++;try{return(await He(nt({calls:e,...n}))).ops}finally{xt--}},xt=0,bn={here(e){W=e,ve()},onWho(e){return Z.add(e),q.size>0&&e([...q.values()]),()=>{Z.delete(e)}},leave(){if(!W)return;let e=JSON.stringify({participant:H??W.participant});if(W=null,j({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${d.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):w(`${d.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},Ft=d.pollMs??800,at=Ft>0&&typeof setInterval=="function"?setInterval(()=>{p()||Re().catch(()=>{})},Ft):null;if(L){hn();let e;await Promise.race([Pt,new Promise(n=>e=setTimeout(n,d.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(b.log.all().map(i=>i.batch));for(let i of r)if(!(i.batch!==void 0&&n.has(i.batch)))try{b.applyAll(i.calls,{...i.intent?{intent:i.intent}:{},...i.batch?{batch:i.batch}:{},...i.via?{via:i.via}:{},...Oe(i)})}catch(a){e.push(_o(i,a))}e.length>0&&Je.push(rt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let Sn=new Map,so=()=>({store:b,author:d.principal,appliedAll:wn,pending:D,provisional:G,asked:fe,answers:ge,letGo:ke,sent:(e,n)=>He(nt({calls:n,batch:e},e).catch(i=>Tt(e,i))),settle:ne,land:K,seen:()=>M,gone:()=>Q||ce});return{remote:{store:b,typing(e,n){let i=`${e}\0${n}`,a=Sn.get(i);return a||(a=(__graviewPreload(import.meta.url,["./chunk.OPMGQS5J.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RHIP2UYE.js")).then(f=>(vn=f,f.typingOf(e,n,f.wireOf(so())))),Sn.set(i,a)),a},version:O.version,migrated:O.migrated??[],send:io,pull:Re,onRefusal(e){je.add(e);let n=Je;Je=[];for(let i of n)e(i.sentence,i);return()=>je.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Rt.add(e),s.otherBuild!==void 0&&e(s.otherBuild),()=>Rt.delete(e)},onConflict(e){return ot.add(e),()=>ot.delete(e)},revision:(e,n)=>me.of(e,n),seq:()=>M,participant:()=>H,transport:()=>p()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>k,onHeld(e){return s.helds.add(e),k!==void 0&&e(k),()=>s.helds.delete(e)},counters:()=>({...B}),who:()=>[...q.values()],pending:()=>D.length+xt,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:bn,close(){at&&clearInterval(at),Ae(),bn.leave(),Q=!0,de&&clearTimeout(de),X&&clearTimeout(X),be&&clearTimeout(be);for(let n of te.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of le.splice(0))n();let e=J;J=void 0,se=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function co(e,n){let i=globalThis.WebSocket;if(!i)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=d.subprotocol?[nn]:[];if(!a)try{return new i(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,F]of Object.entries(E))y.searchParams.set(A,F);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new i(y.toString(),f):new i(y.toString())}}function Uo(t,r,o=Date.now()){let s,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))s=Number(l)*1e3;else{let w=Date.parse(l);Number.isFinite(w)&&(s=Math.max(0,w-o))}let m=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,d=m!==void 0&&m<50&&s!==void 0&&Math.abs(m*1e3-s)<1e3;return m!==void 0&&!d?m:s??1e3}function Jo(){globalThis.location?.reload?.()}function Yo(){return globalThis.document?.visibilityState!=="hidden"}function rn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:s=1e4,factor:l=2}=t??{};return Math.min(s,o*l**r)*(.75+Math.random()*.5)}function St(t){let r={};if(!t)return r;t.id&&(r[ee.seat]=t.id),t.roles?.length&&(r[ee.roles]=t.roles.join(",")),t.kind!=="human"&&(r[ee.kind]=t.kind),t.name&&(r[ee.name]=encodeURIComponent(t.name)),t.profile&&(r[ee.profile]=t.profile.id,r[ee.profileName]=encodeURIComponent(t.profile.name));let o=t.onBehalfOf;return o?.profile&&(r[ee.forProfile]=o.profile.id,r[ee.forProfileName]=encodeURIComponent(o.profile.name)),o?.id&&(r[ee.for]=o.id),o?.roles?.length&&(r[ee.forRoles]=o.roles.join(",")),o?.name&&(r[ee.forName]=encodeURIComponent(o.name)),r}var Zr="/graview/views";function on(t){let r=t.fetch??fetch,o=vt(t.url,t.headers),s=o.url,l={"content-type":"application/json",...t.principal?St(t.principal):{},...o.headers},m=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??dt.may}:dt,d=new Set,w=v=>{if(JSON.stringify(v)!==JSON.stringify(m)){m=v;for(let T of d)T()}},h=async(v,T)=>{let x=await r(`${s}${t.path??Zr}`,{method:v,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),B=await x.json();if(!x.ok)throw new Error(B.error??`The store answered ${x.status}.`);w({hidden:B.hidden??[],removed:B.removed??[],may:B.may??dt.may})},E=()=>h("GET"),L=t.state?Promise.resolve():E().catch(()=>{}),_=t.pollMs?setInterval(()=>void E().catch(()=>{}),t.pollMs):void 0;return{ready:L,refresh:E,close:()=>clearInterval(_),current:()=>m,onChange(v){return d.add(v),()=>void d.delete(v)},hide:v=>h("POST",{hide:v}),show:v=>h("POST",{show:v}),remove:(v,T)=>h("POST",{remove:v,...T?{about:T}:{}}),async restore(v){let T=m.removed.find(x=>x.name===v)?.lens;await h("POST",{restore:v}),T&&await t.onDeclaration?.()},async lens(v){await h("POST",{lens:v}),await t.onDeclaration?.()}}}var sn=document.getElementById("graview-app"),an=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Xr=an?(__graviewPreload(import.meta.url,["./chunk.Z22C2JJ4.js","./chunk.6IMRCKB4.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.5WCSQFS5.js","./chunk.LHCGC3K6.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.L6P55HFW.js")):Ve("pages");try{an?await Qo(decodeURIComponent(an[1])):await Zo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),sn.replaceChildren(r),window.__graviewFailed=r.textContent}async function Qo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let s=await pt(o);if(!s.ok)throw new Error(ct(s.findings));let l=s.app,m=o.principal,d=await bt({app:l,url:location.origin,principal:m,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:w}=await Xr;window.__graview=w(sn,{app:l,form:t,principal:m,remote:d,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Zo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),s=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let E=await pt(h);if(!E.ok)throw new Error(ct(E.findings));return E.app})(r);if(!s||typeof s!="object"||!("schema"in s))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,m=await bt({app:s,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=s.name;let d,w=on({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let E=await pt(h);E.ok&&d?.setApp(E.app,m)}});await Promise.all([Xr,w.ready]),d=en(sn,{app:s,remote:m,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:s.name,heading:1,keptViews:w,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=d,d.drawn().then(()=>{window.__graviewReady=!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 Wt,b as ur,c as fr,d as pr,e as mr,f as jt,g as hr,h as qt}from"./chunk.XBWFQ54R.js";import{a as mo}from"./chunk.JE4RBRKH.js";import{a as yr,b as gr,c as zt,d as wr,e as pt,f as br,g as Sr,h as Pr,i as Gt,j as Ar,k as Rr,l as kr,m as Er,n as Tr,o as xr,p as Fr,q as Or,r as Cr,s as Lr,t as Br,u as Ye}from"./chunk.HCHGKI64.js";import{b as vr}from"./chunk.65SI77M7.js";import{c as Kt}from"./chunk.TBLOBXZ2.js";import{a as Ct}from"./chunk.Q5WEOX3Q.js";import{b as Lt,i as Hn}from"./chunk.GXK5PI7I.js";import{n as ct}from"./chunk.PS765ODQ.js";import{D as _t,G as sr,L as dr,P as cr,Q as lr,k as tr,n as nr,o as rr,p as Dt,q as or,s as ar,w as ir}from"./chunk.GH6QX7JR.js";import{c as po}from"./chunk.J4D4BIB4.js";import{G as $n,Ga as zn,Ha as Gn,Ia as Un,Ja as Jn,Ka as Yn,Ma as Qn,Na as Zn,Pa as Xn,Qa as It,Ta as er,V as In,W as Dn,Wa as ft,_ as _n,a as Nn,b as lt,c as ut,ea as Wn,j as Vn,m as $t,na as jn,oa as qn,qa as Kn}from"./chunk.ASNVH2G4.js";import{a as Ne}from"./chunk.SDO3U72B.js";import{Be as Mt,Ce as Ht,De as Nt,Ge as Mn,Hc as Bt,He as Vt,Ib as st,Ic as En,Jb as An,Kd as Tn,Ld as xn,Td as Fn,Vd as On,Wd as Cn,Yb as Rn,Yd as dt,_b as kn,ue as xe,ve as Ln,we as Bn,xb as Ke,zb as Pn}from"./chunk.ZDUKVXBI.js";import"./chunk.FQLNBIQ5.js";import{b as qe}from"./chunk.AJZBJBMO.js";async function mt(t,r={}){let o=t.compiled===void 0||!yo(t.compiled,t.document)?void 0:Hn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:s}=await ho();return s(t.document,r)}var Mr,ho=()=>Mr??=(__graviewPreload(import.meta.url,["./chunk.7DCBIMOI.js","./chunk.GXK5PI7I.js","./chunk.XP4IVKKR.js","./chunk.QMGBAKX6.js","./chunk.PS765ODQ.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.F2I7ERGM.js")).catch(t=>{throw Mr=void 0,t});function yo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,s=r;if(typeof s=="string")try{s=JSON.parse(s)}catch{return!1}return o!==void 0&&Ct(Lt(o).document)===Ct(Lt(s).document)}var c=qe($n(),1);var yt=qe($n(),1),Ut="data-graview-drawn",go=200,Hr=50,wo=1e4,ht=()=>typeof performance<"u"?performance.now():Date.now();function vo(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function bo(t,r){if(t.ownerDocument.fonts?.status==="loading"||zn()>0||Yn(r)>0||t.querySelector('[aria-busy="true"]')||vo(t).some(s=>!s.complete&&s.loading!=="lazy"))return!1;for(let s of t.querySelectorAll("[data-worker-view-place]"))if(!s.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Nr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(s=>`${s.offsetWidth}x${s.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function So(t,r,o,s){t.removeAttribute(Ut);let f=t.ownerDocument.defaultView;if(!f)return()=>{};let l=ht(),d=l,S=Nr(t),h=!1,T,B=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(O=>!(O.target===t&&O.attributeName===Ut))&&(d=ht())});B?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let D=()=>{h=!0,B?.disconnect(),T!==void 0&&clearTimeout(T)},k=x=>{let O=!1,ee=()=>{O||(O=!0,x())};typeof f.requestAnimationFrame=="function"&&f.requestAnimationFrame(()=>setTimeout(ee,0)),setTimeout(ee,100)},w=()=>{if(h)return;let x=Nr(t);x!==S&&(S=x,d=ht());let O=ht();if(bo(t,s)&&O-d>=go||O-l>=wo){k(()=>{h||(D(),t.setAttribute(Ut,r),Zn(),o())});return}T=setTimeout(w,Hr)};return T=setTimeout(w,Hr),D}function Vr(t,r,o,s,f){Qn();let l=(0,yt.useRef)({place:o,onDrawn:s});l.current={place:o,onDrawn:s},(0,yt.useLayoutEffect)(()=>{f&&Jn(f);let d=T=>So(T,l.current.place.path,()=>l.current.onDrawn?.(l.current.place),f);if(t.current)return d(t.current);let S,h=!1;return queueMicrotask(()=>{!h&&t.current&&(S=d(t.current))}),()=>{h=!0,S?.()}},[r,t,f])}var Dr=qe(mo(),1);var M=qe(po(),1);var g=qe(_n(),1);function gt(t,r={}){let o=It(t);return{Face:o.part((f,l)=>(0,c.createElement)(f,l),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Qt=t=>Promise.all([t,cr()]).then(([r])=>r),_r=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.IZUAZ6EV.js","./chunk.THLT6NVO.js","./chunk.HIIYDKFC.js","./chunk.YF5GCOSZ.js","./chunk.WAPY4RCS.js","./chunk.JMXBMLKH.js","./chunk.PVAYYFT2.js","./chunk.HJCQ6I3S.js","./chunk.QNFX5VHW.js","./chunk.UXW43HNW.js","./chunk.VE4AQFLW.js","./chunk.LPWANRBL.js","./chunk.3BE4SHZD.js","./chunk.U5P23GO7.js","./chunk.SNDFIJVX.js","./chunk.2TTKQAWQ.js","./chunk.CJHCUHVN.js","./chunk.MFNWHXGL.js","./chunk.DCIYOZYP.js","./chunk.A4TBVXHQ.js","./chunk.7QGDWAHH.js","./chunk.YC2IDHQX.js","./chunk.JP33TNCH.js","./chunk.BIDL7GQD.js","./chunk.O5P6LXHF.js","./chunk.VGQDPEB5.js","./chunk.WIVNFOQR.js","./chunk.HCHGKI64.js","./chunk.65SI77M7.js","./chunk.Q5WEOX3Q.js","./chunk.7DCBIMOI.js","./chunk.GXK5PI7I.js","./chunk.DYPSFTRP.js","./chunk.XP4IVKKR.js","./chunk.R5YGW5ZX.js","./chunk.QMGBAKX6.js","./chunk.PS765ODQ.js","./chunk.MIE4TJRW.js","./chunk.DEBW4FH6.js","./chunk.RD2FSSLV.js","./chunk.OWHH7JDV.js","./chunk.T3RFZ66S.js","./chunk.TDWJU6GW.js","./chunk.P3Z4ZCL3.js","./chunk.45OLF6BK.js","./chunk.T6ISUVUP.js","./chunk.GH6QX7JR.js","./chunk.J4D4BIB4.js","./chunk.ASNVH2G4.js","./chunk.SDO3U72B.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.D5PW6YWF.js"))),Po=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.2YSE3SQN.js","./chunk.Q6WOIE5I.js","./chunk.4TDYDIIM.js","./chunk.STHWM422.js","./chunk.Q355UPFG.js","./chunk.IZUAZ6EV.js","./chunk.KFYSKZC4.js","./chunk.VNI6HZEF.js","./chunk.THLT6NVO.js","./chunk.KMFH26SS.js","./chunk.YF5GCOSZ.js","./chunk.F2BZ4SC4.js","./chunk.WAPY4RCS.js","./chunk.JJSZLCNU.js","./chunk.JKX4J3KG.js","./chunk.JMXBMLKH.js","./chunk.PVAYYFT2.js","./chunk.MB7LKKUD.js","./chunk.I46VNAMS.js","./chunk.3BE4SHZD.js","./chunk.LG2BQ5LB.js","./chunk.L3ST2YKI.js","./chunk.7VCYVCYM.js","./chunk.CJHCUHVN.js","./chunk.MFNWHXGL.js","./chunk.DCIYOZYP.js","./chunk.O5P6LXHF.js","./chunk.BJUUSIQY.js","./chunk.VGQDPEB5.js","./chunk.WIVNFOQR.js","./chunk.XOZU4OFA.js","./chunk.53GQQETN.js","./chunk.WVUJXDXZ.js","./chunk.J7GH2CGV.js","./chunk.SMF5S4DQ.js","./chunk.XP4IVKKR.js","./chunk.R5YGW5ZX.js","./chunk.QMGBAKX6.js","./chunk.PS765ODQ.js","./chunk.MIE4TJRW.js","./chunk.DEBW4FH6.js","./chunk.RD2FSSLV.js","./chunk.OWHH7JDV.js","./chunk.T3RFZ66S.js","./chunk.TDWJU6GW.js","./chunk.P3Z4ZCL3.js","./chunk.45OLF6BK.js","./chunk.T6ISUVUP.js","./chunk.GH6QX7JR.js","./chunk.J4D4BIB4.js","./chunk.ASNVH2G4.js","./chunk.SDO3U72B.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.PH547SON.js"))),Ao=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.2YSE3SQN.js","./chunk.Q6WOIE5I.js","./chunk.4TDYDIIM.js","./chunk.STHWM422.js","./chunk.Q355UPFG.js","./chunk.IZUAZ6EV.js","./chunk.KFYSKZC4.js","./chunk.VNI6HZEF.js","./chunk.THLT6NVO.js","./chunk.KMFH26SS.js","./chunk.YF5GCOSZ.js","./chunk.F2BZ4SC4.js","./chunk.WAPY4RCS.js","./chunk.JJSZLCNU.js","./chunk.JKX4J3KG.js","./chunk.JMXBMLKH.js","./chunk.PVAYYFT2.js","./chunk.MB7LKKUD.js","./chunk.I46VNAMS.js","./chunk.3BE4SHZD.js","./chunk.LG2BQ5LB.js","./chunk.L3ST2YKI.js","./chunk.7VCYVCYM.js","./chunk.CJHCUHVN.js","./chunk.MFNWHXGL.js","./chunk.DCIYOZYP.js","./chunk.O5P6LXHF.js","./chunk.BJUUSIQY.js","./chunk.VGQDPEB5.js","./chunk.WIVNFOQR.js","./chunk.XOZU4OFA.js","./chunk.53GQQETN.js","./chunk.WVUJXDXZ.js","./chunk.J7GH2CGV.js","./chunk.SMF5S4DQ.js","./chunk.XP4IVKKR.js","./chunk.R5YGW5ZX.js","./chunk.QMGBAKX6.js","./chunk.PS765ODQ.js","./chunk.MIE4TJRW.js","./chunk.DEBW4FH6.js","./chunk.RD2FSSLV.js","./chunk.OWHH7JDV.js","./chunk.T3RFZ66S.js","./chunk.TDWJU6GW.js","./chunk.P3Z4ZCL3.js","./chunk.45OLF6BK.js","./chunk.T6ISUVUP.js","./chunk.GH6QX7JR.js","./chunk.J4D4BIB4.js","./chunk.ASNVH2G4.js","./chunk.SDO3U72B.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4EPCI6VY.js"))),Wr=gt(()=>Qt(_r().then(t=>t.SceneFace)),{what:"This view"}),jr=gt(()=>_r().then(t=>t.SceneKeeping),{quiet:!0}),qr=gt(()=>Qt(Po().then(t=>t.PagesContent)),{what:"This page"}),Kr=gt(()=>Qt(Ao().then(t=>t.PictureFace)),{what:"This picture"}),Ro=Wr.Face,ko=jr.Face,Eo=qr.Face,To=Kr.Face;Kt(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.SXGPRFA4.js","./chunk.CEQQIW7Z.js","./chunk.73RMM4W7.js","./chunk.KFYSKZC4.js","./chunk.GOVRX2YX.js","./chunk.TRP66PHK.js","./chunk.PGT4ZQDG.js","./chunk.4PB5UFUJ.js","./chunk.VUE6ILQV.js","./chunk.2IOJNFCR.js","./chunk.AAPXF6NP.js","./chunk.QDVGHI7R.js","./chunk.M5FP4Y4Q.js","./chunk.OQ3FKUP2.js","./chunk.JP33TNCH.js","./chunk.O5P6LXHF.js","./chunk.DYPSFTRP.js","./chunk.TDWJU6GW.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KAQGSLC6.js"))));function Ve(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(zr));return Promise.all([...[...o].map(s=>s.fetch()),ar()]).then(()=>{},()=>{})}var zr=t=>t==="pages"?[qr]:t==="picture"?[Kr]:[Wr,jr],Gr=t=>zr(t).every(r=>r.here()),xo=150,Jt=0;function $r(t,r){if(Gr(t))return r();let o=++Jt,s=()=>{o===Jt&&(Jt+=1,r())};Ve(t).then(s),setTimeout(s,xo)}var Fo=768;function Oo(t,r){let o=r!==null&&r>=Fo;(0,c.useEffect)(()=>{if(!o||t==="picture")return;let s=t==="pages"?"scene":"pages";if(Gr(s))return;let f=globalThis,l=()=>void Ve(s),d=()=>{},S=Xn(()=>{if(f.requestIdleCallback&&f.cancelIdleCallback){let h=f.requestIdleCallback(l,{timeout:4e3});d=()=>f.cancelIdleCallback?.(h)}else{let h=setTimeout(l,1500);d=()=>clearTimeout(h)}});return()=>(S(),d())},[t,o])}function Co({asked:t,shown:r,onDrawn:o}){return(0,c.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function Lo({auto:t,scene:r}){return(0,g.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Bo=It(Ne(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,g.jsx)(t.StudioPlace,{...r}),{quiet:!0});function Ur(t,r,o,s,f){return jt(t,mr(r?ut(r):f??Nn,s),o)}function Zt(t){return t&&ut(t).overview?"graview":"scene"}function Ir(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Jr(t){let[,r]=(0,c.useState)(!1),o=(0,c.useCallback)(()=>r(!0),[]),s=(0,c.useRef)(!1);return t.at&&!wt?(0,g.jsx)(zt,{onReady:o,fetch:Xt}):!s.current&&gr(t.draftView)?(0,g.jsx)(zt,{onReady:o,fetch:yr}):(s.current=!0,(0,g.jsx)(Mo,{...t}))}function Mo(t){let{app:r,stop:o,bar:s=!0,standing:f="Everything is in order",principal:l,heading:d=2}=t,{rootRef:S,scope:h,css:T,scheme:B,store:D,presence:k,brand:w,auto:x,height:O}=Ar(t),ee=wr(t.draftView),E=Sr(t,lr,ee.over),[pe]=(0,c.useState)(Un),be=t.basePath===void 0?{}:{basePath:t.basePath},[u]=(0,c.useState)(Dt),C=t.notices??u,_=m=>Mt(m,be),ie={...t.routing?{routing:t.routing}:{},...be},[te]=(0,c.useState)(()=>{let m=t.at?.face;if(m)return m;let q=o===void 0&&Ir(r,E)?"pages":Zt(o),we=Wt({...ie,face:q});return t.face===void 0&&t.onOpening?.(we),we}),[se,L]=(0,c.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&ur(ie)&&Ir(r,E)),Oe=(0,c.useRef)(t.onFace);Oe.current=t.onFace,(0,c.useLayoutEffect)(()=>{se&&(Oe.current?.("pages"),L(!1))},[se]);let A=se?"pages":t.face??te,v=r.schema.kinds,N=t.routing==="address",Ce=(0,c.useMemo)(()=>t.at?wt.settleAt(t,D.seenBy(l??{kind:"human"}),E.places()):void 0,[]),H=(0,c.useMemo)(()=>qn(E,r.schema),[E,r.schema]),Se=(0,c.useMemo)(()=>{let m=Ce?.stop??(N?fr(t.basePath):void 0)??o;return A==="scene"&&m===void 0&&H===void 0&&(t.path===void 0||Yt(t.path))?qt(void 0):Ur(A,m,v,E.places(),H)},[]),[I]=(0,c.useState)(A);(0,c.useEffect)(()=>{I!=="pages"&&jn(E)},[I,E]);let $=(0,c.useRef)(void 0),W=m=>m===void 0||Yt(m)?"/":m;$.current??={path:W(Ce?.path??(N?A==="pages"?(Ht(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==$.current.asked&&($.current={path:W(t.path),asked:t.path});let ne=(0,c.useRef)(t.onNavigate);ne.current=t.onNavigate;let Pe=(0,c.useCallback)((m,q)=>{$.current.path=m,ne.current?.(m,q)},[]),{at:ye,setAt:j,steering:G,steer:re}=Cr($.current.path),V=(0,c.useContext)(Yr);V&&(V.pages=()=>$.current.path);let[$e]=(0,c.useState)(()=>({})),J=V??$e,de=(0,c.useMemo)(()=>nr(C),[C]),K=(0,c.useRef)(void 0),Le=(0,c.useCallback)(m=>void($.current.path=m),[]),Q=tr(S),[oe,Be]=(0,c.useState)(!1),Ae=t.pagesBelow!==void 0&&Q!==null&&Q<t.pagesBelow&&(A==="scene"||A==="graview")&&!oe,R=Ae?"pages":A,z=(0,c.useRef)(!1);z.current=oe&&t.pagesBelow!==void 0&&Q!==null&&Q<t.pagesBelow&&(A==="scene"||A==="graview"),V&&(V.shown=R);let ce=(0,c.useRef)(A==="graview"?"graview":"scene");(R==="scene"||R==="graview")&&(ce.current=R),(0,c.useState)(()=>{if(!N||typeof window>"u"||R==="pages"||R==="picture")return;let{pathname:m,search:q,hash:we}=window.location;Ht(m,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${_(xe)}${q}${we}`)}),Pr(S,R,t.onIntrinsicHeight),Oo(R,Q);let Re=Lr(t.onError,R),me=Br(t.onReady,R),Me=(0,c.useRef)(t.onFaceDrawn);Me.current=t.onFaceDrawn;let He=(0,c.useCallback)((m,q)=>{me(q),Me.current?.(m)},[me]),[Ze,Ie]=(0,c.useState)(null),Xe=E.places(),De=(0,c.useRef)({shown:R,onFace:t.onFace});De.current={shown:R,onFace:t.onFace};let _e=(0,c.useCallback)((m,q,we)=>{if(N){K.current?.(m,q,we);return}De.current.onFace?.(m),ne.current?.(m==="pages"?q??$.current.path:xe,"push")},[N]),[U,le]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{R==="pages"&&le(void 0)},[R]);let Y=(0,c.useRef)(o);(0,c.useEffect)(()=>{Y.current!==o&&(Y.current=o,le(void 0))},[o]);let We=(0,c.useCallback)(m=>{if(De.current.shown==="pages"){if(Be(!0),le(m),A==="scene"||A==="graview"){$r(A,()=>{N?window.history.pushState(null,"",`${_(xe)}${m??""}`):ne.current?.(xe,"push")});return}$r(ce.current,()=>_e(ce.current,void 0,m))}},[N,A,t.basePath,_e]),ue=(0,c.useCallback)(m=>{if(De.current.shown==="pages"){G.go.current||($.current.path=m),re(m);return}if($.current.path=m,j(m),z.current){Be(!1),N?window.history.pushState(null,"",_(m)):ne.current?.(m,"push");return}_e("pages",m)},[G,re,j,_e,N,t.basePath]),et=E.arrangement?.(),ke=R==="pages",ge=t.hrefOf,Ee=ge??(N?_:void 0),At=(0,c.useMemo)(()=>({open:ue,...ge?{href:ge}:N?{href:m=>Mt(m,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[ue,N,t.basePath,ge]);return(0,g.jsxs)("section",{ref:S,className:h,"aria-label":t.label??r.name,"data-graview-embed":R,"data-graview-scheme":B,...Ae?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:O,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,g.jsx)("style",{children:T}),(0,g.jsxs)(er.Provider,{value:Re,children:[(0,g.jsx)(Rr,{rootRef:S,board:C,onReport:t.onReport,where:()=>R==="pages"?kr(ye):R==="picture"?{place:"picture"}:rr(J.view?.focusId)}),(0,g.jsx)(br,{rootRef:S,firstLook:t.firstLook,app:sr(w??{name:r.name},r.schema)}),(0,g.jsx)(Ye,{module:"@graview/react",report:Re,content:!0,children:(0,g.jsx)(Gn.Provider,{value:pe,children:(0,g.jsx)(Wn,{store:D,views:E,initialView:Se,scheme:B,...Er(t,k,w),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,g.jsxs)(or.Provider,{value:de,children:[(0,g.jsx)($o,{face:R,stop:U??o,kinds:v,places:Xe,opens:H}),(0,g.jsx)(Ho,{into:J}),(0,g.jsx)(No,{rootRef:S,face:A,shown:R,path:ye,stop:o,draft:ee.n,onDrawn:t.onDrawn,parts:pe}),N?(0,g.jsx)(pr,{pagesWere:Ce?.path,basePath:t.basePath,shown:R,onFace:t.onFace,toggle:K,kinds:v,places:Xe,opens:H,landed:Le}):null,s&&R!=="picture"?(0,g.jsx)(Ye,{module:"@graview/embed",report:Re,children:(0,g.jsx)(Tr,{name:w?.name??r.name,heading:d,named:pt(s).name!==!1,history:pt(s).history!==!1,faces:pt(s).faces===!1?void 0:{scene:{label:Ln(et),current:!ke,go:()=>We(),reach:()=>void Ve(ce.current)},pages:{label:Bn(et),current:ke,go:()=>ue($.current.path),reach:()=>void Ve("pages")}},at:ke?ye:null,without:t.pages?.without(),home:{...Ee?.("/")!==void 0?{href:Ee("/")}:{},go:()=>ue("/"),current:ke&&ye.split("?")[0]==="/"},reach:{...Ee?{href:Ee}:{},go:m=>ue(m.path)},standing:f,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:ke?void 0:(0,g.jsx)(Io,{app:r,studio:t.studio,report:Re}),onFind:Ie})}):null,(0,g.jsx)(ir.Provider,{value:Ze,children:(0,g.jsx)(Ye,{module:R==="pages"||R==="picture"?"@graview/pages":"@graview/react",report:Re,content:!0,children:(0,g.jsxs)(c.Suspense,{fallback:(0,g.jsx)(Lo,{auto:x,scene:R!=="pages"&&R!=="picture"}),children:[R==="picture"?(0,g.jsx)(To,{scope:h,store:D,views:E,as:(o?ut(o).within?.view:void 0)??""}):R==="pages"?(0,g.jsx)(Eo,{store:D,views:E,presence:k,auto:x,brand:w,steering:G,overview:We,scope:h,titleLevel:Or(d),quickAsk:_t(t.quickAsk),props:{...t,onNavigate:Pe,...N?{}:{path:$.current.path}}}):(0,g.jsx)(Kn.Provider,{value:At,children:(0,g.jsx)(Ro,{address:N,auto:x,scheme:B,scope:h,quickAsk:_t(t.quickAsk)})}),(0,g.jsx)(Co,{asked:A,shown:R,onDrawn:He})]})},R)})]})})})})]})]})}var Yt=t=>t.split(/[?#]/)[0]===xe,Yr=(0,c.createContext)(null);function Ho({into:t}){return t.view=ft().view,null}function No({rootRef:t,face:r,shown:o,path:s,stop:f,draft:l,onDrawn:d,parts:S}){let{view:h}=ft(),T=o==="scene"||o==="graview",B=lt(h),{pan:D,...k}=h,w=h.pan?lt(k):B,x={face:r,path:T?xe:o==="picture"?f??"#":s,stop:B};return Vr(t,`${o} ${T?w:x.path} ${l}`,x,d,S),null}var wt,Vo=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.XBWFQ54R.js","./chunk.GH6QX7JR.js","./chunk.J4D4BIB4.js","./chunk.ASNVH2G4.js","./chunk.SDO3U72B.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.NFC2TYA6.js"))),Xt=()=>Vo().then(t=>void(wt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Xt));function $o({face:t,stop:r,kinds:o,places:s,opens:f}){let{view:l,go:d}=ft(),S=(0,c.useRef)({face:t,stop:r});return(0,c.useLayoutEffect)(()=>{let h=S.current.stop!==r,T=S.current.face!==t,B=S.current.face==="pages";if(S.current={face:t,stop:r},!h&&!T||t==="pages"||t==="picture")return;let D=(h||B)&&r!==void 0?Ur(t,r,o,s):B&&hr(l)?jt(t,qt(f),o):t==="graview"?$t(l,!0):l.overview?Vn($t(l,!1),dr(l,o)):l;d(D)},[t,r,o,l,d,f]),null}function Io({app:t,studio:r,report:o}){return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(ko,{})}),r!==!1?(0,g.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,g.jsx)(Do,{app:t,studio:r})}):null]})}function Do({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},s=r?.place;return s?(0,g.jsx)(s,{...o}):(0,g.jsx)(c.Suspense,{fallback:null,children:(0,g.jsx)(Bo,{...o})})}function _o({path:t,stop:r,...o},s){return{...o,app:s.app,at:s.at,remote:s.remote,...s.remote.presence?{presence:s.remote.presence}:{}}}function en(t,r){let o=r.store??r.remote?.store??vr(r.app,r.seed),s=r.notices??Dt(),f=In(),l=null,d={},S=0,h=r.label,T=r.app,B=Promise.resolve(),D=r.at?.face??r.face,k=D===void 0?void 0:Wt({...r,face:D}),w=k??Zt(r.stop),x=null,O=[],ee=u=>{if(f.settle(),x=u,u!==w)return;let C=O;O=[];for(let _ of C)_()};function E(){let[u,C]=(0,c.useState)(k),[_,ie]=(0,c.useState)(r.stop),[te,se]=(0,c.useState)(r.path),[L,Oe]=(0,c.useState)(r.scheme??"auto"),[A,v]=(0,c.useState)(r.principal),[N,Ce]=(0,c.useState)(r.seats),[H,Se]=(0,c.useState)(r.quickAsk),[I,$]=(0,c.useState)(r.people),[W,ne]=(0,c.useState)(r.hostContext),[Pe,ye]=(0,c.useState)(r.brand),[j,G]=(0,c.useState)(r.whileAway),[re,V]=(0,c.useState)(r.label),[$e,J]=(0,c.useState)(r.hostActions),[de,K]=(0,c.useState)(r.barActions),[Le,Q]=(0,c.useState)(()=>xr(r)),[oe,Be]=(0,c.useState)(void 0),[Ae,R]=(0,c.useState)(r.draftView);return l={app:z=>{Be(z),se(void 0),ie(void 0)},face:C,stop:ie,path:se,scheme:Oe,seat:v,seats:Ce,quickAsk:Se,people:$,hostContext:ne,brand:ye,whileAway:G,label:V,hostActions:J,barActions:K,hostBar:z=>Q(ce=>({...ce,...z})),draft:R},(0,g.jsx)(Dn.Provider,{value:f,children:(0,g.jsx)(Yr.Provider,{value:d,children:(0,g.jsx)(Jr,{...oe?_o(r,oe):r,store:o,notices:s,...u!==void 0?{face:u}:{},onOpening:z=>{w=z,f.unsettle()},..._!==void 0?{stop:_}:{},...te!==void 0?{path:te}:{},...A?{principal:A}:{},...N?{seats:N}:{},...H!==void 0?{quickAsk:H}:{},...I?{people:I}:{},...W?{hostContext:W}:{},...Pe?{brand:Pe}:{},whileAway:j,label:re,hostActions:$e,barActions:de,...Fr(Le),draftView:Ae,scheme:L,onFace:z=>{w=z,f.unsettle(),C(z)},onSeat:v,onFaceDrawn:ee},oe?.n??0)})})}let pe=()=>{let u=d.view?.focusId,C=u?o.graph.getNode(u)?.kind:void 0,_=(d.shown??w)==="scene"||(d.shown??w)==="graview";return{face:w,path:_?xe:d.pages?.()??r.path??"/",stop:d.view?lt(d.view):r.stop??"#",...C?{kind:C}:{}}},be=(0,Dr.createRoot)(t);return(0,M.flushSync)(()=>be.render((0,g.jsx)(E,{}))),{get store(){return o},where:pe,setApp:(u,C,_)=>{let ie="graph"in C?{store:C}:C,te=()=>{let se=pe();o=ie.store,h=_?.label??(h===T.name?u.name:h),T=u,(0,M.flushSync)(()=>{l?.label(h),l?.app({app:u,remote:ie,at:se,n:++S}),f.forget()})};wt?te():B=B.then(Xt).then(te)},setFace:u=>{u!==w&&f.unsettle(),w=u,(0,M.flushSync)(()=>l?.face(u))},setStop:u=>(0,M.flushSync)(()=>l?.stop(u)),setPath:u=>(0,M.flushSync)(()=>{if(Yt(u)){(w==="pages"||w==="picture")&&(w="scene",f.unsettle(),l?.face("scene"));return}l?.path(u),w!=="pages"&&(w="pages",f.unsettle(),l?.face("pages"))}),setScheme:u=>(0,M.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,M.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,M.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,M.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,M.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,M.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,M.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,M.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,M.flushSync)(()=>l?.draft(u)),setLabel:u=>{h=u,(0,M.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,M.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,M.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,M.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,M.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,M.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,M.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,M.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>B.then(()=>x===w?void 0:new Promise(u=>O.push(u))),notify:u=>{let C;return(0,M.flushSync)(()=>{C=s.notify(u)}),C},showHistory:()=>f.show({focus:!0}),unmount:()=>{f.close(),be.unmount()}}}var vt=t=>`s${(t+1).toString(36)}`;var X={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",profile:"x-graview-profile",profileName:"x-graview-profile-name",forProfile:"x-graview-for-profile",forProfileName:"x-graview-for-profile-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function bt(t,r={}){try{let o=new URL(t),s=o.searchParams.get(ze.param);if(s)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:s,headers:{[ze.header]:s,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Qr="/graview/friction";var Zr="/graview/live",tn="graview.ship",nn=`${tn}.${st}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},Fe=t=>t?.lineage?{lineage:t.lineage}:{},Wo=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
2
+ `)[0]??"":String(r)})`;function jo(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(s=>!!s&&Array.isArray(s.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},qo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},he=class extends Error{constructor(o,s){super(o);this.conflicts=s;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},Ko=new Set([502,503,504]);async function zo(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function Go(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var Uo=1,Jo=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function St(t){return(await Xr(t,jo(t.carry),"This app was updated while your changes were on the way.",Jo())).remote}async function Xr(t,r,o,s){let{key:f,...l}=bt(t.url,t.headers),d={...t,...l},S=d.fetch??fetch,h={"content-type":"application/json",...d.headers??{}},T={...Pt(d.principal),[X.via]:d.via??"web"};Object.assign(h,T);let B=d.live===!0,D=d.presenceEveryMs,k=d.visible??Zo,w="connecting",x=s.statuses,O=s.tally,ee=[],E,pe=[],be=()=>w==="online"&&E!==void 0?"held":w,u=()=>{let e=be();if(s.told!==e){s.told=e;for(let n of[...x])n(e)}},C=e=>{if(!(e===w||fe)&&(w==="offline"&&e==="online"&&O.reconnects++,w=e,u(),e==="online"))for(let n of ee.splice(0))n.again()},_=e=>{if(fe)return;let n=typeof e=="string"&&e.length>0?e:void 0,i=n!==E;if(E=n,ie(),!!i&&(u(),n===void 0)){for(let a of pe.splice(0))a();Z&&clearTimeout(Z),dn()}},ie=()=>{if(s.toldHeld!==E){s.toldHeld=E;for(let e of[...s.helds])e(E??null)}},te=async(e,n)=>{let i;try{i=await S(e,n)}catch(a){throw m()||C("offline"),new Qe(a instanceof Error?a.message:String(a))}if(i.status===503&&await zo(i))return C("online"),i;if(Ko.has(i.status))throw m()||C("offline"),new Qe(`The server is away (${i.status})`);return C("online"),i},se=async(e=!1)=>{let n=`${d.url}/graview/state?opFormat=${Ke.op}`,i=e?await S(n,{headers:h}):await te(n,{headers:h});if(!i.ok)throw new Error((await i.json().catch(()=>({}))).error??`The server refused (${i.status})`);return await i.json()},L=d.state??await se(!0);B||(w="online"),E=typeof L.held=="string"&&L.held.length>0?L.held:void 0,ie();let Oe=L.enabledModules??d.enabledModules,A=d.localApp?d.localApp(d.app):d.app,v=new Cn({schema:A.schema,mutations:A.mutations??[],invariants:A.invariants??[],...A.policy?{policy:A.policy}:{},...A.publishing?{publishing:A.publishing}:{},...A.tidying?{tidying:A.tidying}:{},...A.modules?{modules:A.modules}:{},...Oe?{enabledModules:Oe}:{},...A.intelligence?{intelligence:A.intelligence}:{},...A.brand?.timeZone?{timeZone:A.brand.timeZone}:{},snapshot:L.snapshot,log:L.log,...L.horizon!==void 0?{horizon:L.horizon}:{},ids:Go(),...d.storeOptions??{}});kn.served.add(v);let N=d.friction!==!1&&d.principal?.kind!=="visitor";N&&Tn(v,e=>{N&&S(`${d.url}${Qr}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(N=n.status!==404&&n.status!==410),()=>{})});let Ce=Fn(v),H=L.log.at(-1)?.seq??(L.horizon??0)-1,Se=Bt.of(L.log,{horizon:L.horizon??0}),I=null,$,W=new Map,ne=s.who,Pe=!1,ye=e=>{if(fe)return;Pe=!0;let n=Mn(new Map,e,Date.now(),Nt,I?.participant);$!==void 0&&n.delete($);let i=n.size!==W.size;if(!i)for(let[a,p]of n)Vt(p,W.get(a))||(i=!0);if(W=n,!!i)for(let a of[...ne])a([...W.values()])},j=[],G=new Set,re=e=>{let n=j.indexOf(e);n>=0&&j.splice(n,1)},V=new Map,$e=(e,n)=>{let i=V.get(e);i&&(V.delete(e),i.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},J,de=[],K=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(J)return de.push({ops:e,drop:n}),[];let i=Math.min(...e.filter(b=>b.seq>H).map(b=>b.seq));if(Number.isFinite(i)&&i>H+1)return de.push({ops:e,drop:n}),Q(),[];let a=j.filter(b=>e.some(ae=>ae.batch===b)),p=[...new Set([...n,...a])].filter(b=>G.has(b)),y,P=j.filter(b=>!a.includes(b));try{y=v.rebase({confirmed:e,pending:P,drop:p}).confirmed}catch(b){if(!(b instanceof On))throw b;return de.push({ops:e,drop:n}),Q(),[]}for(let b of a)re(b);e.some(b=>b.seq>H)&&P.some(b=>!p.includes(b))&&O.rebases++,e.length>0&&(H=Math.max(H,...e.map(b=>b.seq)),Se.note(e));for(let b of p)G.delete(b);for(let b of a)$e(b,e);return e.some(b=>b.lineage?.liftedStop===!0||b.undoes!==void 0&&(v.log.get(b.undoes)?.lineage?.stopsKind===!0||v.log.get(b.undoes)===void 0&&(v.stopsServed?.stops.length??0)>0))&&Q(),y},Le=e=>{let n=e.stops??[],i=e.stoppedKinds??[];n.length===0&&i.length===0&&!v.stopsServed||(v.stopsServed=n.length>0||i.length>0?{stops:n,kinds:i}:void 0,v.notify(Pn,[]))};(L.stops||L.stoppedKinds)&&(v.stopsServed={stops:L.stops??[],kinds:L.stoppedKinds??[]});let Q=()=>{J||(J=He(se().then(e=>{if(oe(e)){de=[];return}Le(e);let n=new Set(e.log.map(p=>p.batch)),i=j.filter(p=>n.has(p));for(let p of i)re(p);let a=v.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...j],drop:[...G].filter(p=>!j.includes(p))});G.clear();for(let p of a.pending)G.add(p.batch);H=e.log.at(-1)?.seq??(e.horizon??0)-1,Se=Bt.of(e.log,{horizon:e.horizon??0}),O.resyncs++;for(let p of i)$e(p,e.log)}).then(()=>{J=void 0;let e=de;de=[];for(let{ops:n,drop:i}of e)K(n,i)},()=>{J=void 0,de=[]})))},oe=e=>(typeof e.build=="string"&&ln(e.build),typeof e.version=="number"&&_(e.held),typeof e.version!="number"||e.version===L.version?!1:(Et(e.version),!0)),Be=async e=>{let i=await(await te(`${d.url}/graview/since?seq=${vt(e)}&opFormat=${Ke.op}`,{headers:h})).json();return oe(i)?[]:((i.ops?.length??0)>0&&Le(i),i.reset===!0?(Q(),[]):i.ops??[])},Ae=async()=>{let e=await R();return J&&await J,e},R=async()=>{if(I&&!m()&&k()){let n=await(await te(`${d.url}/graview/here?opFormat=${Ke.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:I,seq:vt(H)})})).json();return oe(n)?[]:(typeof n.participant=="string"&&($=n.participant),ye(n.who??[]),K(n.ops??[]))}return K(await Be(H))},z=new Map,ce=new Map,Re=new Set,me=new Map,Me=new Set,He=e=>(Me.add(e),e.finally(()=>Me.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),Ie=0,Xe=(e,n)=>{let i=Ze.then(()=>_e(e,n));return Ze=i.catch(()=>{}),i},De=()=>new Promise((e,n)=>ee.push({again:e,give:n})),_e=async(e,n)=>{let i,a;for(;;){try{i=await te(`${d.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:Ke.op})})}catch(F){if(!(F instanceof Qe)||Y)throw F;if(await De(),m())return tt(e,n);continue}if(a=await i.json().catch(()=>({})),i.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!Y){if(typeof a.version=="number"?oe(a):(_(a.held),!1))break;if(E!==void 0&&(Ot>0||B)){if(await new Promise(F=>pe.push(F)),Y)throw new Ge("The client closed.");if(m())return tt(e,n);continue}}let P;if(i.status===503&&a.reason==="unavailable"&&!Y)P=rn(d.backoff,Ie++);else{if(Ie=0,i.status!==429||Y)break;P=Yo(i.headers.get("retry-after"),a.retryAfter)}if(await new Promise(F=>setTimeout(F,P)),m())return tt(e,n)}if(fe||oe(a))throw new Ge("The app was changed.");if(!i.ok){let P=a.error??`The server refused (${i.status})`;throw a.conflict?new he(P,a.conflicts??[]):new Ue({reason:a.reason??qo[i.status]??"invalid",sentence:P,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let p=a.ops??[],y=p[0]?.seq;return y!==void 0&&y>H+1&&(p=await Be(H)),n!==void 0&&(a.batch&&z.set(n,a.batch),re(n)),K(p,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},U,le=!1,Y=!1,We=0,ue,et=0,ke=0,ge=null,Ee=()=>{},At=new Promise(e=>{Ee=e}),m=()=>B&&le&&U?.readyState===Uo,q=e=>{if(!m())return!1;try{return U.send(JSON.stringify(e)),!0}catch{return!1}},we=(e=!1)=>{!I||!m()||!k()||!e&&ge&&Vt(I,ge)&&(D===void 0||Date.now()-ke<D)||q({t:"here",presence:I})&&(ge=I,ke=Date.now())},Te=new Set,Z,dn=()=>{if(Z=void 0,E!==void 0)return;let e=[...V.entries()].filter(([n])=>Te.has(n));Te.clear();for(let[,n]of e)q(n.message)},cn=(e,n)=>{V.has(e)&&(Te.add(e),Z&&clearTimeout(Z),Z=setTimeout(dn,Math.max(0,n)))},no=e=>{V.has(e)&&Te.add(e)},tt=(e,n)=>new Promise((i,a)=>{let p=n??`send-${++et}`,y=e.undo?{t:"undo",cid:p,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...Fe(e)}:{t:"call",cid:p,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...Fe(e)};if(V.set(p,{message:y,...n!==void 0?{mine:n}:{},resolve:i,reject:a}),Te.size>0||E!==void 0){Te.add(p);return}q(y)}),nt=(e,n)=>m()?tt(e,n):Xe(e,n),ro=e=>{switch(e.t){case"welcome":{if(Le(e),ln(e.build),typeof e.version=="number"&&e.version!==L.version){Et(e.version);return}if(le=!0,We=0,typeof e.participant=="string"&&($=e.participant),_(e.held),e.state?Q():K(e.ops??[]),Te.clear(),Z&&clearTimeout(Z),Z=void 0,E!==void 0)for(let n of V.keys())Te.add(n);else for(let n of V.values())q(n.message);we(!0),C("online"),Ee();return}case"ops":K(e.ops??[]);return;case"ack":{let n=V.get(e.cid);if(!n){K(e.ops??[]);return}V.delete(e.cid),Ie=0,n.mine!==void 0&&(z.set(n.mine,e.batch),re(n.mine)),K(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=V.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){E!==void 0?no(e.cid):cn(e.cid,rn(d.backoff,Ie++));return}V.delete(e.cid),n.reject(e.t==="conflict"?new he(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":ye(e.who??[]);return;case"held":_(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==L.version&&Et(e.version);return;case"reload":mn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&U){let n=U;yn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},fe=!1,Rt=s.declarations,kt=s.builds,ln=e=>{if(!(fe||s.otherBuild!==void 0||!d.build||typeof e!="string"||e.length===0||e===d.build)){s.otherBuild=e;for(let n of[...kt])n(e)}},un=()=>{let e=[],n=0;for(let i of j){let a=me.get(i);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Fe(a),batch:i}):n++}return{carried:e,undos:n}},fn=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,pn=e=>{fe=!0,I=null;let n=new Ge(e);for(let a of V.values())a.reject(n);V.clear(),at&&clearInterval(at),Y=!0,ue&&clearTimeout(ue),Z&&clearTimeout(Z),ve&&clearTimeout(ve);for(let a of ee.splice(0))a.give(n);for(let a of pe.splice(0))a();let i=U;U=void 0,le=!1;try{i?.close(1e3,e)}catch{}Ee()};async function Et(e){if(fe)return;if(!d.resolveApp){mn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:i}=un(),a=d.resolveApp,p=I;pn("The app was changed.");try{let y=await a(e),{state:P,...F}=d,b=await Xr({...F,app:y},n,"The app was changed while your changes were on the way.",s);p&&b.remote.presence.here(p);for(let it of[...Rt])it(b.remote,e);let ae=[...i>0?[rt(fn(i,"The app was changed"))]:[],...b.unheard()];for(let it of ae)for(let fo of je)fo(it.sentence,it)}catch(y){let P=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let F of je)F(P,rt(P))}}function mn(e){if(fe)return;let{carried:n,undos:i}=un();pn(e);let a=!1;if(d.carry&&n.length>0)try{d.carry.storage.setItem(d.carry.key,JSON.stringify(n)),a=!0}catch{}let p=[];!a&&n.length>0&&p.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),i>0&&p.push(fn(i,"This app was updated"));for(let y of p)for(let P of je)P(y,rt(y));(d.reloadPage??Qo)()}let hn=()=>{if(Y||!B)return;let e=`${d.url.replace(/^http/,"ws").replace(/\/$/,"")}${Zr}`,{"content-type":n,...i}=h,a;try{a=d.socket?d.socket(e,i,[nn]):uo(e,i)}catch{return gn()}U=a,le=!1,a.onopen=()=>{U===a&&a.send(JSON.stringify({t:"hello",seq:vt(H),protocol:st,wire:tn,opFormat:Ke.op,...d.build?{build:d.build.slice(0,64)}:{},...d.hostProtocol!==void 0?{hostProtocol:d.hostProtocol}:{}}))},a.onmessage=p=>{if(U!==a)return;let y;try{y=JSON.parse(String(p.data))}catch{return}ro(y)},a.onclose=()=>yn(a),a.onerror=()=>{}},ve,oo=()=>{Pe=!1,ve&&clearTimeout(ve),ve=setTimeout(()=>{if(ve=void 0,Pe||Y)return;let e=new Map([...W].filter(([,n])=>n.held!=="socket"));if(e.size!==W.size){W=e;for(let n of ne)n([...W.values()])}},Nt),ve.unref?.()};function yn(e){if(U!==e)return;let n=le;U=void 0,le=!1,ge=null,n&&(C("offline"),oo()),gn()}let gn=()=>{if(Y)return;let e=rn(d.backoff,We);We++,ue=setTimeout(hn,e)},wn=v.applyAll.bind(v),ao=v.undo.bind(v),io=v.previewAll.bind(v);v.previewAll=(e,n)=>io(e,{...d.principal?{author:d.principal}:{},...n});let je=s.refusals,Je=[],rt=e=>({reason:"invalid",sentence:e}),ot=s.conflicts,Tt=!1,vn,xt=async(e,n)=>{if(n instanceof Ge||fe)return;let i=n instanceof Ue?n.refusal:Rn(n),a=i.sentence,p=n instanceof he?vn?.yoursOf(v,me.get(e)?.calls??[]):void 0;re(e);try{K([],[e])}catch{}let y=me.get(e);me.delete(e);let P=y?.calls[0];if(P&&!(n instanceof he)){let F=v.allMutations().find(ae=>ae.name===P.name)?.subject?.arg,b=F&&v.graph.getNode(P.args[F])?.kind;xn(v,{type:"refused",act:P.name,code:i.reason,...b?{kind:b}:{}},d.principal)}if(n instanceof he&&O.conflicts++,n instanceof he&&!m()&&await Ae().catch(()=>[]),n instanceof he&&J&&await J,n instanceof he&&ot.size>0){let F=!1,b={sentence:a,conflicts:p?n.conflicts.map(ae=>ae.node===p.node&&ae.field===p.field?{...ae,yours:p.yours}:ae):n.conflicts,keepTheirs(){F=!0},useMine(){if(!(F||!y)){F=!0,Tt=!0;try{v.applyAll(p?[p.over(H)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Fe(y)})}finally{Tt=!1}}}};for(let ae of ot)ae(b);return}for(let F of je)F(a,i)},so=(e,n)=>e.flatMap(i=>i.mutation?.name===An?[]:i.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:H}]:[]));v.applyAll=(e,n)=>{let i=En(v.log.all().filter(P=>G.has(P.batch))),a=wn(e,{...d.principal?{author:d.principal}:{},...n}),p=e.map((P,F)=>{let b=a.minted?.[F];return b===void 0||P.args?.id!==void 0?P:{...P,mintedHint:b}});j.push(a.batch),G.add(a.batch),me.set(a.batch,{calls:p,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...Fe(n)});let y=Tt?[]:[...Se.baseFor(a.ops,i,(P,F)=>v.collaborative(P,F)),...so(a.ops,i)];return ce.set(a.batch,He(nt({calls:p,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...Fe(n)},a.batch).catch(P=>xt(a.batch,P)))),a},v.apply=(e,n)=>v.applyAll([e],n),v.undo=(e,n)=>{let i=typeof e=="string"?[e]:e,a=ao(i.map(y=>z.get(y)??y),{...d.principal?{author:d.principal}:{},...n});j.push(a.batch),G.add(a.batch);let p=Promise.allSettled(i.map(y=>ce.get(y)));return ce.set(a.batch,He(p.then(()=>{let y=i.filter(P=>!Re.has(P));if(y.length===0){re(a.batch),me.delete(a.batch),K([],[a.batch]);return}return nt({undo:y.map(P=>z.get(P)??P),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...Fe(n)},a.batch)}).catch(y=>xt(a.batch,y)))),a};let co=async(e,n={})=>{Ft++;try{return(await He(nt({calls:e,...n}))).ops}finally{Ft--}},Ft=0,bn={here(e){I=e,we()},onWho(e){return ne.add(e),W.size>0&&e([...W.values()]),()=>{ne.delete(e)}},leave(){if(!I)return;let e=JSON.stringify({participant:$??I.participant});if(I=null,q({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${d.url}/graview/leave${f!==void 0?`?${ze.param}=${encodeURIComponent(f)}`:""}`,e):S(`${d.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},Ot=d.pollMs??800,at=Ot>0&&typeof setInterval=="function"?setInterval(()=>{m()||Ae().catch(()=>{})},Ot):null;if(B){hn();let e;await Promise.race([At,new Promise(n=>e=setTimeout(n,d.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!fe){let e=[],n=new Set(v.log.all().map(i=>i.batch));for(let i of r)if(!(i.batch!==void 0&&n.has(i.batch)))try{v.applyAll(i.calls,{...i.intent?{intent:i.intent}:{},...i.batch?{batch:i.batch}:{},...i.via?{via:i.via}:{},...Fe(i)})}catch(a){e.push(Wo(i,a))}e.length>0&&Je.push(rt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let Sn=new Map,lo=()=>({store:v,author:d.principal,appliedAll:wn,pending:j,provisional:G,asked:me,answers:ce,letGo:Re,sent:(e,n)=>He(nt({calls:n,batch:e},e).catch(i=>xt(e,i))),settle:re,land:K,seen:()=>H,gone:()=>Y||fe});return{remote:{store:v,typing(e,n){let i=`${e}\0${n}`,a=Sn.get(i);return a||(a=(__graviewPreload(import.meta.url,["./chunk.YC2IDHQX.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.WWD2TS47.js")).then(p=>(vn=p,p.typingOf(e,n,p.wireOf(lo())))),Sn.set(i,a)),a},version:L.version,migrated:L.migrated??[],send:co,pull:Ae,onRefusal(e){je.add(e);let n=Je;Je=[];for(let i of n)e(i.sentence,i);return()=>je.delete(e)},onDeclaration(e){return Rt.add(e),()=>Rt.delete(e)},onBuild(e){return kt.add(e),s.otherBuild!==void 0&&e(s.otherBuild),()=>kt.delete(e)},onConflict(e){return ot.add(e),()=>ot.delete(e)},revision:(e,n)=>Se.of(e,n),seq:()=>H,participant:()=>$,transport:()=>m()?"socket":"poll",status:be,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>E,onHeld(e){return s.helds.add(e),E!==void 0&&e(E),()=>s.helds.delete(e)},counters:()=>({...O}),who:()=>[...W.values()],pending:()=>j.length+Ft,async settled(){for(;Me.size>0;)await Promise.allSettled([...Me])},presence:bn,close(){at&&clearInterval(at),Ce(),bn.leave(),Y=!0,ue&&clearTimeout(ue),Z&&clearTimeout(Z),ve&&clearTimeout(ve);for(let n of ee.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of pe.splice(0))n();let e=U;U=void 0,le=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function uo(e,n){let i=globalThis.WebSocket;if(!i)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",p=d.subprotocol?[nn]:[];if(!a)try{return new i(e,{headers:n,...p.length>0?{protocols:p}:{}})}catch{}let y=new URL(e);for(let[P,F]of Object.entries(T))y.searchParams.set(P,F);return f!==void 0&&y.searchParams.set(ze.param,f),p.length>0?new i(y.toString(),p):new i(y.toString())}}function Yo(t,r,o=Date.now()){let s,f=t?.trim();if(f)if(/^\d+(\.\d+)?$/.test(f))s=Number(f)*1e3;else{let S=Date.parse(f);Number.isFinite(S)&&(s=Math.max(0,S-o))}let l=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,d=l!==void 0&&l<50&&s!==void 0&&Math.abs(l*1e3-s)<1e3;return l!==void 0&&!d?l:s??1e3}function Qo(){globalThis.location?.reload?.()}function Zo(){return globalThis.document?.visibilityState!=="hidden"}function rn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:s=1e4,factor:f=2}=t??{};return Math.min(s,o*f**r)*(.75+Math.random()*.5)}function Pt(t){let r={};if(!t)return r;t.id&&(r[X.seat]=t.id),t.roles?.length&&(r[X.roles]=t.roles.join(",")),t.kind!=="human"&&(r[X.kind]=t.kind),t.name&&(r[X.name]=encodeURIComponent(t.name)),t.profile&&(r[X.profile]=t.profile.id,r[X.profileName]=encodeURIComponent(t.profile.name));let o=t.onBehalfOf;return o?.profile&&(r[X.forProfile]=o.profile.id,r[X.forProfileName]=encodeURIComponent(o.profile.name)),o?.id&&(r[X.for]=o.id),o?.roles?.length&&(r[X.forRoles]=o.roles.join(",")),o?.name&&(r[X.forName]=encodeURIComponent(o.name)),r}var eo="/graview/views";function on(t){let r=t.fetch??fetch,o=bt(t.url,t.headers),s=o.url,f={"content-type":"application/json",...t.principal?Pt(t.principal):{},...o.headers},l=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??dt.may}:dt,d=new Set,S=k=>{if(JSON.stringify(k)!==JSON.stringify(l)){l=k;for(let w of d)w()}},h=async(k,w)=>{let x=await r(`${s}${t.path??eo}`,{method:k,headers:f,...w!==void 0?{body:JSON.stringify(w)}:{}}),O=await x.json();if(!x.ok)throw new Error(O.error??`The store answered ${x.status}.`);S({hidden:O.hidden??[],removed:O.removed??[],may:O.may??dt.may})},T=()=>h("GET"),B=t.state?Promise.resolve():T().catch(()=>{}),D=t.pollMs?setInterval(()=>void T().catch(()=>{}),t.pollMs):void 0;return{ready:B,refresh:T,close:()=>clearInterval(D),current:()=>l,onChange(k){return d.add(k),()=>void d.delete(k)},hide:k=>h("POST",{hide:k}),show:k=>h("POST",{show:k}),remove:(k,w)=>h("POST",{remove:k,...w?{about:w}:{}}),async restore(k){let w=l.removed.find(x=>x.name===k)?.lens;await h("POST",{restore:k}),w&&await t.onDeclaration?.()},async lens(k){await h("POST",{lens:k}),await t.onDeclaration?.()}}}var sn=document.getElementById("graview-app"),an=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),to=an?(__graviewPreload(import.meta.url,["./chunk.Q6WOIE5I.js","./chunk.DCIYOZYP.js","./chunk.XOZU4OFA.js","./chunk.53GQQETN.js","./chunk.JE4RBRKH.js","./chunk.65SI77M7.js","./chunk.T3RFZ66S.js","./chunk.TDWJU6GW.js","./chunk.P3Z4ZCL3.js","./chunk.45OLF6BK.js","./chunk.T6ISUVUP.js","./chunk.J4D4BIB4.js","./chunk.ASNVH2G4.js","./chunk.SDO3U72B.js","./chunk.ZDUKVXBI.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.N5CACZ5F.js")):Ve("pages");try{an?await Xo(decodeURIComponent(an[1])):await ea()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),sn.replaceChildren(r),window.__graviewFailed=r.textContent}async function Xo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let s=await mt(o);if(!s.ok)throw new Error(ct(s.findings));let f=s.app,l=o.principal,d=await St({app:f,url:location.origin,principal:l,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=f.forms?.[t]?.title??f.name;let{mount:S}=await to;window.__graview=S(sn,{app:f,form:t,principal:l,remote:d,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function ea(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),s=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let T=await mt(h);if(!T.ok)throw new Error(ct(T.findings));return T.app})(r);if(!s||typeof s!="object"||!("schema"in s))throw new Error("The app module the preview server handed does not export an app.");let f=r.principal,l=await St({app:s,url:location.origin,principal:f,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=s.name;let d,S=on({url:location.origin,principal:f,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let T=await mt(h);T.ok&&d?.setApp(T.app,l)}});await Promise.all([to,S.ready]),d=en(sn,{app:s,remote:l,principal:f,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:s.name,heading:1,keptViews:S,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=d,d.drawn().then(()=>{window.__graviewReady=!0})}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graview",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "type": "module",
5
5
  "description": "The Graview command line: start a product, check its declaration, write its agent docs, serve its store, preview a document with no product and photograph its places, say whether a product is on one release, host it for an agent over MCP, apply an act to it, sync its seed, install the authoring skills. The tool; @graview/* is the framework.",
6
6
  "keywords": [
@@ -29,11 +29,11 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@graview/core": "0.1.71",
33
- "@graview/guest": "0.1.71",
34
- "@graview/ship": "0.1.71",
35
- "@graview/skills": "0.1.71",
36
- "@graview/tools": "0.1.71"
32
+ "@graview/core": "0.1.72",
33
+ "@graview/ship": "0.1.72",
34
+ "@graview/skills": "0.1.72",
35
+ "@graview/tools": "0.1.72",
36
+ "@graview/guest": "0.1.72"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=22.22.0"
@@ -1 +0,0 @@
1
- import"./chunk.WVUJXDXZ.js";import{k as m,m as i}from"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";function a(t){let r=new Map;return(s,o)=>{let e=o.kind,n=r.get(e);return n===void 0&&r.set(e,n=i(t,e).length),n===0?{}:m(t,s,o).values}}export{a as computedOn};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.UZKBFI52.js";import"./chunk.MFMC35ET.js";import"./chunk.GKYJQE5A.js";import"./chunk.EZQK23AB.js";import"./chunk.QDVGHI7R.js";import"./chunk.M5FP4Y4Q.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{d as SAVE_DEBOUNCE_MS,i as accepts,a as createPressReader,f as createSaver,g as fillPrefills,h as judgePress,b as markPresses,k as prefillOf,c as quietPictures,e as saveDebounceOf,j as writesBack};
@@ -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.64K5ELSQ.js";import"./chunk.G4JJXA63.js";import{a}from"./chunk.TBY5IR7C.js";import"./chunk.PQTXM4VY.js";import"./chunk.BIDL7GQD.js";import"./chunk.7KX36ENH.js";import"./chunk.SPJ34VHA.js";import"./chunk.XOZU4OFA.js";import"./chunk.KBJ3UUER.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.4O64QV2Y.js";import"./chunk.OYMN3IFX.js";import"./chunk.UQZ2P6KD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.6L6RUOSF.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
- 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{c as ae,d as se,f as oe,i as re,j as le,k as de,m as ce,n as ue,o as pe,p as ge,q as fe}from"./chunk.HXRHEPPJ.js";import{b as Z,c as ee,d as te,e as ne}from"./chunk.QNWGDG2Z.js";import{a as ie}from"./chunk.QDDDKEBH.js";import{a as Y}from"./chunk.F7KVEWFH.js";import{a as X,e as O}from"./chunk.RJ7VSWTA.js";import{E as K,G as Ie,J as Q,U as V,Y as _,ga as j}from"./chunk.JCKIJSW7.js";import{zd as J}from"./chunk.6L6RUOSF.js";import{b as N}from"./chunk.AJZBJBMO.js";var c=N(Ie(),1);var o=N(_(),1);function he(e,a,t){let i=a.on==="selection"?a.ids:a.on==="record"||a.on==="field"?[a.id]:[],l=i.length>0?ie(e.store,i,{principal:e.principal,...i.length===1?{focus:i[0]}:{}}).affordances.map(s=>({mutation:s.mutation,label:s.label,args:s.args,open:s.open,why:s.why,...s.destructive?{destructive:!0}:{}})):void 0;return{store:e.store,target:a,principal:e.principal,interaction:se(),places:e.places,selection:e.selection,...l?{acts:l}:{},...e.place?{place:e.place}:{},...t?{said:t}:{},...e.app.purpose?{purpose:e.app.purpose}:{}}}async function be(e,a,t){let i=await (__graviewPreload(import.meta.url,["./chunk.64K5ELSQ.js","./chunk.G4JJXA63.js","./chunk.TBY5IR7C.js","./chunk.PQTXM4VY.js","./chunk.BIDL7GQD.js","./chunk.7KX36ENH.js","./chunk.SPJ34VHA.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.Q5WEOX3Q.js","./chunk.4O64QV2Y.js","./chunk.OYMN3IFX.js","./chunk.UQZ2P6KD.js","./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.45HUV56Z.js")),l=i.recipeDraft(a.recipe,{app:e.app,sight:i.draftSight(e.app,e.principal)});if(i.isDraftFailure(l))return l.failed;t?.(),e.seatTalk.setDraft(l,null),e.goTo.draft?.(),ke()}function ke(e=180){if(typeof document>"u")return;let a=document.querySelector('[data-testid="draft-keep"]'),t=document.activeElement,i=!t||t===document.body||t.closest?.("[inert]")!==null;if(a){i&&a.focus();return}e>0&&requestAnimationFrame(()=>ke(e-1))}async function T(e,a,t,i,l){let s=he(e,t,i),d=a==="suggest"?await oe(e.ai,s):a==="fill"?await re(e.ai,s):a==="record"?await le(e.ai,s):await de(e.ai,s);if(d.interaction.outcome==="failed")return a!=="suggest"&&e.desk.record(d.interaction),d;let u=g=>{let p={...d.interaction,outcome:"failed",failed:g};return e.desk.record(p),{...d,interaction:p}};if(a==="fill"||a==="record"){if(!d.ghost||d.ghost.proposals.length===0)return u("Nothing here could be filled in.");l?.(),e.desk.setGhost({ghost:d.ghost}),e.desk.record(d.interaction)}if(a==="panel"&&d.panel){let g=await be(e,d.panel,l);if(g)return u(g);e.desk.record(d.interaction)}return d}var W=new WeakMap,Te=64,me=new WeakMap;function Ee(e){let a=me.get(e);if(!a){let t=a={n:0};me.set(e,t),e.subscribe(()=>void(t.n+=1))}return a.n}var Se=(e,a)=>{let t=ee(a);return t.length>0?t.map(i=>e.graph.getNode(i)):[Ee(e)]},we=(e,a,t)=>JSON.stringify({target:a,seat:e.principal,by:t}),Ae=(e,a,t)=>{let i=Se(e.store,a);return t.schema===e.store.schema&&t.ai===e.ai&&i.length===t.depends.length&&i.every((l,s)=>l===t.depends[s])};function Me(e,a,t="menu"){let i=W.get(e.store)?.get(we(e,a,t));return i?.result!==void 0&&Ae(e,a,i)?i.result:void 0}function Ce(e,a,t){let i=W.get(e.store);i||W.set(e.store,i=new Map);let l=we(e,a,t?.by??"menu"),s=i.get(l);if(s&&Ae(e,a,s))return s.result?Promise.resolve(s.result):s.asked;let d=t?t.ask():T(e,"suggest",a),u={schema:e.store.schema,ai:e.ai,depends:Se(e.store,a),asked:d};i.delete(l),i.set(l,u),i.size>Te&&i.delete(i.keys().next().value);let g=i;return d.then(p=>{p.interaction.outcome!=="failed"?u.result=p:g.get(l)===u&&g.delete(l)}),d}async function Oe(e,a,t,i,l={}){let s=a.interaction,d=ue(t);if(d){let u=s.usage?.at(-1)?.model,g=s.offered.find(h=>h.id===t.id)?.confidence,p=ce(e.store,{interaction:s.id,target:s.target,basis:`${s.ask.said}: ${t.label}`,...u?{model:u}:{},proposals:[{...d,...g!==void 0?{confidence:g}:{}}]},e.principal);if(p.proposals.length===0){let h="That can't be done now.";return e.desk.record({...s,outcome:"failed",failed:h}),h}l.onCard?e.desk.setGhost({ghost:p,onCard:!0}):(i?.(),e.desk.setGhost({ghost:p})),e.desk.record(s);return}if(t.type==="panel"){let u=t.label,g={title:u,recipe:{...t.panel,title:u}},p=await be(e,g,i);return e.desk.record(p?{...s,outcome:"failed",failed:p}:{...s,outcome:"drawn",accepted:[t.id],panel:g}),p}i?.(),t.type==="place"?e.goTo.place(t.place):t.type==="record"&&e.goTo.record(t.record),e.desk.record({...s,outcome:"accepted",accepted:[t.id]})}async function qe(e,a){if(a.ask.kind==="ask")return O(e.desk,{target:a.target,asked:a.ask.said}),null;let t=a.ask.kind==="panel"||a.ask.kind==="record"?a.ask.kind:"fill";return T(e,t,a.target,a.ask.said)}var k={padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left",borderWidth:1,borderStyle:"solid",borderColor:"transparent",background:"none",boxShadow:"none"},ye=(0,o.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"aria-hidden":"true",style:{...k,visibility:"hidden"},children:"\xA0"}),P={margin:0,padding:"4px 10px",fontSize:"0.8125rem",color:"var(--graview-ink-muted)"};function ze({target:e,close:a}){let t=Y(),i=(0,c.useMemo)(()=>Z(e,n=>t.store.graph.has(n)),[e,t.store]),l=(0,c.useMemo)(()=>{let n=he(t,i);return te(t.store,i,{principal:t.principal,places:t.places,...n.acts?{acts:n.acts}:{}})},[t,i]),s=l.candidates.some(n=>n.type==="fill"),d=l.candidates.some(n=>n.type==="panel"),u=(0,c.useMemo)(()=>d?ne(t.store,i,{principal:t.principal,places:t.places,most:1}):[],[d,t,i]),g=(0,c.useMemo)(()=>new Set(t.store.allMutations().filter(n=>(n.creates??[]).length>0).map(n=>n.name)),[t.store]),p=ae(t.ai)!==void 0&&l.candidates.some(n=>n.type==="act"&&n.asks.length>0&&g.has(n.mutation)),h=K(t.ai),S=Me(t,i),f=JSON.stringify(i),[m,I]=(0,c.useState)(!1),[A,R]=(0,c.useState)(null),[H,E]=(0,c.useState)(h&&S===void 0);(0,c.useEffect)(()=>{if(S!==void 0||!(h||m))return;let n=!0;return E(!0),Ce(t,i).then(y=>{n&&(R(y),E(!1))}),()=>{n=!1}},[f,m]);let r=S??A,w=(r?.offers??[]).filter(n=>!(n.type==="place"&&u.some(y=>y.place===n.place))).slice(0,Math.max(0,3-u.length)),b=r?.interaction.outcome==="failed"?r.interaction.failed??"The AI could not suggest anything here.":null,D=(0,c.useRef)(!1),F=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{r===null||!D.current||(D.current=!1,F.current?.querySelector("button")?.focus())},[r]);let L=(0,c.useRef)(!0);(0,c.useEffect)(()=>()=>{L.current=!1},[]);let[U,G]=(0,c.useState)(!1),[B,$]=(0,c.useState)(null),M=n=>{if(U)return;G(!0),$(null);let y=!1;n(()=>{y=!0,a()}).then(x=>{L.current&&(G(!1),x?$(x):y||a())},x=>{L.current&&(G(!1),$(x instanceof Error?x.message:String(x)))})},q=n=>n.interaction.outcome==="failed"?n.interaction.failed??"The AI could not do that here.":void 0,C=H&&!m?(0,o.jsx)("p",{role:"status","data-testid":"inline-ai-thinking",style:P,children:"Thinking\u2026"}):U?(0,o.jsx)("p",{role:"status","data-testid":"inline-ai-asking",style:P,children:"Asking\u2026"}):B?(0,o.jsx)("p",{role:"alert","data-testid":"inline-ai-failed",style:{...P,color:"var(--graview-warn)"},children:B}):b?(0,o.jsx)("p",{role:"status",style:P,children:b}):null,z=(0,c.useRef)(0);z.current=Math.max(z.current,h&&S===void 0?Math.max(1,3-u.length):0,w.length+(C?1:0));let xe=Math.max(0,z.current-w.length-(C?1:0));return(0,o.jsxs)("div",{ref:F,"data-testid":"inline-ai",style:{display:"grid",gap:2},children:[(0,o.jsxs)("ul",{"data-testid":"inline-ai-room",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:2},children:[C?(0,o.jsxs)("li",{style:{position:"relative"},children:[ye,(0,o.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center"},children:C})]}):null,w.map(n=>(0,o.jsx)("li",{children:(0,o.jsxs)("button",{type:"button","data-menu-item":`ai-offer:${n.id}`,"data-ai-offer":n.id,"data-ai-offer-type":n.type,title:n.label,onClick:()=>M(y=>Oe(t,r,n,y)),style:{...k,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[n.label,(0,o.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",n.type==="panel"?"a panel":n.type==="place"?"go there":n.type==="record"?"open it":"suggested"]})]})},n.id)),Array.from({length:xe},(n,y)=>(0,o.jsx)("li",{"data-inline-ai-room":"",children:ye},`room-${y}`))]}),(0,o.jsxs)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:2},children:[!h&&r===null?(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":"ai-suggest","aria-disabled":m||void 0,onClick:n=>{m||(D.current=document.activeElement===n.currentTarget,I(!0))},style:k,children:m?"Thinking\u2026":"Suggest\u2026"})}):null,s?(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":"ai-fill",onClick:()=>M(async n=>q(await T(t,"fill",i,"Fill in",n))),style:k,children:"Fill in with AI"})}):null,p?(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":"ai-record",onClick:()=>M(async n=>q(await T(t,"record",i,"Add one",n))),style:k,children:"Add one with AI"})}):null,u.map(n=>(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":`ai-open:${n.place}`,"data-ai-existing":n.fit,onClick:()=>{a(),t.goTo.place(n.place),n.fit==="partial"&&O(t.desk,{target:{on:"lens",place:n.place,...n.kind?{kind:n.kind}:{}}})},style:k,children:n.fit==="full"?`Open ${n.title}`:`Open and adjust ${n.title}`})},n.place)),d?(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":"ai-panel",onClick:()=>M(async n=>q(await T(t,"panel",i,"Draw a panel",n))),style:k,children:u.length>0?"Draw a new view":"Draw a panel"})}):null,(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button","data-menu-item":"ai-ask",onClick:()=>{let n=document.activeElement,y=X(n instanceof Element?n.closest('[data-testid="context-menu"]'):null);a(),O(t.desk,{target:i,returnTo:n instanceof HTMLElement&&n!==document.body?n:null,...y?{from:y}:{}})},style:k,children:"Tell Graview\u2026"})})]})]})}var v={display:"inline-flex",alignItems:"center",minHeight:28,padding:"2px 10px",fontSize:"0.8125rem",borderRadius:8};function Ne({placement:e="picture"}){let{store:a,principal:t,aiDesk:i}=j(),l=V(a,t),{ghost:s,entries:d}=Q(i),[u,g]=(0,c.useState)(new Set);(0,c.useEffect)(()=>g(new Set),[s?.ghost.interaction]);let p=(0,c.useRef)(null),h=(0,c.useRef)(null),S=s?.batch;if((0,c.useEffect)(()=>{S!==void 0&&h.current?.focus()},[S]),!s)return null;let{ghost:f}=s,m=d.find(r=>r.id===f.interaction),I=()=>{let r=f.target.on==="record"||f.target.on==="field"?f.target.id:void 0,w=p.current?.closest("[data-graview-face], main")?.parentElement??document,b=(r?w.querySelector(`[data-graview-view="${CSS.escape(r)}"][tabindex]`):null)??document.querySelector("[data-graview-page-title]")??p.current?.closest("main")??document.querySelector("main");b&&!b.hasAttribute("tabindex")&&b.setAttribute("tabindex","-1"),b?.focus({preventScroll:!0}),i.setGhost(null)},A=f.proposals.filter(r=>!u.has(r.id)).map(r=>r.id),R=()=>{let r=pe(l,f,{author:t,ids:A});if(!r.ok){i.setGhost({...s,refused:r.refused});return}m&&i.record(ge(m,r.accepted,r.batch)),i.setGhost({ghost:f,batch:r.batch,took:r.accepted.length,...s.onCard?{onCard:!0}:{}})},H=()=>{m&&s.batch===void 0&&i.record(fe(m)),I()},E=()=>{if(s.batch!==void 0)try{l.undo(s.batch,{author:t}),m&&i.record({...m,undone:!0}),I()}catch(r){i.setGhost({...s,refused:r instanceof Error?r.message:String(r)})}};return(0,o.jsxs)("section",{ref:p,"data-testid":"ai-ghost","data-interaction":f.interaction,"aria-label":"Proposed by AI",style:{...e==="card"?{position:"static"}:{position:e==="page"?"fixed":"absolute",insetInline:"max(12px, calc(50% - 220px))",bottom:"calc(var(--graview-foot-room, 0px) + 72px)",zIndex:J("toast"),boxShadow:"var(--graview-lift-high)"},display:"grid",gap:8,padding:12,borderRadius:12,border:"1px dashed var(--graview-accent)",background:"var(--graview-float)",fontSize:"0.875rem"},children:[(0,o.jsx)("p",{style:{margin:0,color:"var(--graview-ink-muted)"},children:s.batch!==void 0?`Done: ${s.took===1?"one change":`${s.took} changes`}, as one.`:`Proposed by AI \xB7 ${f.basis}`}),s.batch===void 0?(0,o.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:4},children:f.proposals.map(r=>(0,o.jsx)("li",{"data-ghost-proposal":r.id,children:(0,o.jsxs)("label",{style:{display:"flex",alignItems:"baseline",gap:8,cursor:"pointer"},children:[(0,o.jsx)("input",{type:"checkbox",checked:!u.has(r.id),onChange:w=>{let b=new Set(u);w.target.checked?b.delete(r.id):b.add(r.id),g(b)}}),(0,o.jsx)("span",{style:{fontStyle:"italic",color:"var(--graview-ink)"},children:r.said}),r.confidence!==void 0?(0,o.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[Math.round(r.confidence*100),"% sure"]}):null]})},r.id))}):null,s.refused?(0,o.jsx)("p",{role:"alert",style:{margin:0,color:"var(--graview-warn)"},children:s.refused}):null,(0,o.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:s.batch===void 0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{type:"button","data-testid":"ghost-accept",disabled:A.length===0,onClick:R,style:v,children:A.length===f.proposals.length?"Accept":`Accept ${A.length} of ${f.proposals.length}`}),(0,o.jsx)("button",{type:"button","data-testid":"ghost-dismiss",onClick:H,style:v,children:"Dismiss"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{type:"button",ref:h,"data-testid":"ghost-undo",onClick:E,style:v,children:"Undo"}),(0,o.jsx)("button",{type:"button","data-testid":"ghost-close",onClick:I,style:v,children:"Close"})]})})]})}export{he as a,be as b,T as c,Me as d,Ce as e,Oe as f,qe as g,ze as h,Ne as i};
@@ -1 +0,0 @@
1
- import{b as n}from"./chunk.S2BMI23H.js";import{c as a}from"./chunk.MWWNKM3I.js";import"./chunk.6A3KTD66.js";import"./chunk.U5P23GO7.js";import"./chunk.RO3D2RNP.js";import"./chunk.MEAUTBVM.js";import"./chunk.OKHXXIMN.js";import"./chunk.NH3VXTGX.js";import"./chunk.6IMRCKB4.js";import"./chunk.GFBE4VNT.js";import"./chunk.RDUGUC7R.js";import"./chunk.OPMGQS5J.js";import"./chunk.F7KVEWFH.js";import"./chunk.QKRQPUCE.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{Y as i}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as o}from"./chunk.AJZBJBMO.js";var e=o(i(),1);function m({entries:d,style:l,headingStyle:p,className:r}){return(0,e.jsxs)("section",{...r?{className:r}:{},"data-testid":"record-ai","aria-label":"What AI did here",style:{display:"grid",gap:10,...l},children:[(0,e.jsx)("h2",{style:p??{margin:0,fontSize:"1rem"},children:"What AI did here"}),(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8,fontSize:"0.875rem"},children:d.slice(0,8).map(t=>(0,e.jsx)(n,{entry:t,undo:s=>(0,e.jsx)(a,{batch:s})},t.id))})]})}export{m as RecordInteractions};
@@ -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.3CLTABGP.js";import{G as M,Oa as S,T as w,Y as y,ga as m,ha as I,s as b,w as T,x as A}from"./chunk.JCKIJSW7.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.GFBE4VNT.js","./chunk.RDUGUC7R.js","./chunk.OPMGQS5J.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.YXVUJ3NB.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.VL3YDD7D.js","./chunk.OPMGQS5J.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.5PQV7GFE.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
- 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{G as k,Oa as o,Y as n}from"./chunk.JCKIJSW7.js";import{a as t}from"./chunk.SDO3U72B.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.NI4OPHTL.js","./chunk.U5KJQFAP.js","./chunk.FOHZPYUV.js","./chunk.IXYG65TM.js","./chunk.W6L2VAJG.js","./chunk.N3MXLORL.js","./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EJIQDMLU.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.W5O5F4FT.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.MIE4TJRW.js","./chunk.3CLTABGP.js","./chunk.RD2FSSLV.js","./chunk.CVN2XFMF.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EA2KYBBR.js")))),g=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),E=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.X7U3JMBR.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,g as d,E as e,M as f,N as g};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk.S2BMI23H.js";import"./chunk.U5P23GO7.js";import"./chunk.F7KVEWFH.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActivityFilter,b as InteractionRow};