graview 0.1.70 → 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.
- package/dist/preview/chunk.2IOJNFCR.js +1 -0
- package/dist/preview/{chunk.I7CSRZC2.js → chunk.2Q4ZXP7P.js} +1 -1
- package/dist/preview/{chunk.O2XPLDMM.js → chunk.2TTKQAWQ.js} +1 -1
- package/dist/preview/chunk.2YSE3SQN.js +23 -0
- package/dist/preview/{chunk.NZFO6BM3.js → chunk.2ZPR6FRI.js} +1 -1
- package/dist/preview/chunk.3BE4SHZD.js +1 -0
- package/dist/preview/{chunk.QODVFVWE.js → chunk.43HWCHBN.js} +1 -1
- package/dist/preview/{chunk.QILGAV7H.js → chunk.45OLF6BK.js} +1 -1
- package/dist/preview/{chunk.NTAC5NNE.js → chunk.47QWCVZD.js} +1 -1
- package/dist/preview/{chunk.7HNMG6LG.js → chunk.4A7BRBEA.js} +1 -1
- package/dist/preview/chunk.4EPCI6VY.js +1 -0
- package/dist/preview/{chunk.OXXZGPJZ.js → chunk.4PB5UFUJ.js} +1 -1
- package/dist/preview/{chunk.SWY6DIE4.js → chunk.4TDYDIIM.js} +3 -3
- package/dist/preview/{chunk.6VG2LCES.js → chunk.4VX7GPFS.js} +1 -1
- package/dist/preview/{chunk.TUVPQLFL.js → chunk.523X2YEQ.js} +1 -1
- package/dist/preview/{chunk.CHG522KL.js → chunk.53GQQETN.js} +1 -1
- package/dist/preview/{chunk.NBB5ALVJ.js → chunk.5MKZTHU2.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.ZTHZHBVN.js → chunk.5ZT4R227.js} +1 -1
- package/dist/preview/{chunk.RIP2SAQ5.js → chunk.65SI77M7.js} +1 -1
- package/dist/preview/chunk.6ESAFTWB.js +1 -0
- package/dist/preview/chunk.6GUIFP2A.js +1 -0
- package/dist/preview/{chunk.M3HLZX6Q.js → chunk.6GZYKHEN.js} +1 -1
- package/dist/preview/{chunk.UVMHC6VM.js → chunk.6YKKZI4H.js} +1 -1
- package/dist/preview/{chunk.BBLA4PSP.js → chunk.73RMM4W7.js} +1 -1
- package/dist/preview/chunk.7DCBIMOI.js +1 -0
- package/dist/preview/chunk.7JE3J7H4.js +1 -0
- package/dist/preview/{chunk.YTRUZ56A.js → chunk.7QGDWAHH.js} +1 -1
- package/dist/preview/{chunk.JEQ6CA5M.js → chunk.7VCYVCYM.js} +2 -2
- package/dist/preview/{chunk.X7HMTN3Z.js → chunk.A4TBVXHQ.js} +1 -1
- package/dist/preview/{chunk.J4NY2K2A.js → chunk.A6LJPXJ3.js} +1 -1
- package/dist/preview/chunk.AAPXF6NP.js +1 -0
- package/dist/preview/chunk.APUICV5Z.js +1 -0
- package/dist/preview/chunk.ASNVH2G4.js +25 -0
- package/dist/preview/{chunk.CM7EDQ4E.js → chunk.CJHCUHVN.js} +1 -1
- package/dist/preview/chunk.CUEPNS3Z.js +1 -0
- package/dist/preview/{chunk.U3CV227I.js → chunk.CUJRWBPX.js} +1 -1
- package/dist/preview/{chunk.7TZXDPPO.js → chunk.D5PW6YWF.js} +3 -3
- package/dist/preview/chunk.DCIYOZYP.js +1 -0
- package/dist/preview/chunk.DEBW4FH6.js +1 -0
- package/dist/preview/{chunk.MR776WQ2.js → chunk.DYPSFTRP.js} +1 -1
- package/dist/preview/{chunk.BBMX3IIO.js → chunk.E6QZUT4L.js} +1 -1
- package/dist/preview/chunk.E7QZZRAQ.js +17 -0
- package/dist/preview/chunk.EHCMBAZO.js +3 -0
- package/dist/preview/chunk.EXTD5JWD.js +1 -0
- package/dist/preview/{chunk.KOVTQCHX.js → chunk.EZF2T3XQ.js} +1 -1
- package/dist/preview/chunk.EZSST3IU.js +1 -0
- package/dist/preview/{chunk.DIVANC3G.js → chunk.F2BZ4SC4.js} +1 -1
- package/dist/preview/chunk.F2I7ERGM.js +1 -0
- package/dist/preview/{chunk.UWEFODVV.js → chunk.FCV3NX6L.js} +1 -1
- package/dist/preview/{chunk.NZ5TJKPT.js → chunk.FFTBUXKX.js} +2 -2
- package/dist/preview/chunk.FILBI7XA.js +1 -0
- package/dist/preview/{chunk.MGG5DH2S.js → chunk.FKSI5522.js} +1 -1
- package/dist/preview/{chunk.I3ADXJQW.js → chunk.FQ2QUDZS.js} +1 -1
- package/dist/preview/{chunk.A5ENJJZN.js → chunk.G2ZDDO3C.js} +1 -1
- package/dist/preview/{chunk.IPKODEOZ.js → chunk.GAVEWSXU.js} +1 -1
- package/dist/preview/chunk.GH6QX7JR.js +87 -0
- package/dist/preview/chunk.GMHBAS45.js +1 -0
- package/dist/preview/{chunk.YCMMATFK.js → chunk.GOVRX2YX.js} +1 -1
- package/dist/preview/chunk.GXK5PI7I.js +1 -0
- package/dist/preview/{chunk.RECTEAG4.js → chunk.GYP3EF6Z.js} +1 -1
- package/dist/preview/chunk.H2RVMT4Y.js +111 -0
- package/dist/preview/chunk.HCHGKI64.js +1 -0
- package/dist/preview/chunk.HE7SAJKZ.js +1 -0
- package/dist/preview/{chunk.WAIIXXVI.js → chunk.HIIYDKFC.js} +2 -2
- package/dist/preview/chunk.HPDUGKEF.js +32 -0
- package/dist/preview/{chunk.DGDOZHYK.js → chunk.HQRPOGTS.js} +1 -1
- package/dist/preview/chunk.HUJLELZ3.js +1 -0
- package/dist/preview/chunk.HVRUHRXR.js +1 -0
- package/dist/preview/{chunk.6KYTCEIH.js → chunk.I46VNAMS.js} +1 -1
- package/dist/preview/{chunk.QAERSZVB.js → chunk.ID4GOKT6.js} +1 -1
- package/dist/preview/{chunk.RJ7UV3XI.js → chunk.IZKCTF2R.js} +1 -1
- package/dist/preview/chunk.IZUAZ6EV.js +1 -0
- package/dist/preview/{chunk.ZIGW5VOT.js → chunk.J3CUBMUZ.js} +1 -1
- package/dist/preview/{chunk.3HFBHLXC.js → chunk.J4D4BIB4.js} +1 -1
- package/dist/preview/{chunk.IRPMGHZN.js → chunk.J7GH2CGV.js} +1 -1
- package/dist/preview/{chunk.SSHEFQ4R.js → chunk.JE4RBRKH.js} +1 -1
- package/dist/preview/{chunk.4BSEYZMS.js → chunk.JJSZLCNU.js} +1 -1
- package/dist/preview/{chunk.KV3N6VRG.js → chunk.JKX4J3KG.js} +1 -1
- package/dist/preview/{chunk.FUTSLXWN.js → chunk.JMXBMLKH.js} +1 -1
- package/dist/preview/chunk.JOB3EKS6.js +1 -0
- package/dist/preview/{chunk.5IM2X3VT.js → chunk.JP33TNCH.js} +1 -1
- package/dist/preview/{chunk.BZXJKWNI.js → chunk.K6EN2YR4.js} +1 -1
- package/dist/preview/chunk.K6YKXTKC.js +1 -0
- package/dist/preview/{chunk.A7JORJJL.js → chunk.KAIZDIRK.js} +1 -1
- package/dist/preview/{chunk.7LAXSQQY.js → chunk.KAQGSLC6.js} +3 -3
- package/dist/preview/{chunk.QG3LV4RH.js → chunk.KFYSKZC4.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/chunk.KHVW6Q3T.js +1 -0
- package/dist/preview/chunk.KMFH26SS.js +1 -0
- package/dist/preview/{chunk.2T24FYAO.js → chunk.L3ST2YKI.js} +1 -1
- package/dist/preview/{chunk.HIJ72QX6.js → chunk.L6BLZJ6K.js} +1 -1
- package/dist/preview/{chunk.NCBUECIW.js → chunk.LG2BQ5LB.js} +1 -1
- package/dist/preview/{chunk.LZ3HO3HM.js → chunk.LLYHHG67.js} +1 -1
- package/dist/preview/{chunk.VKQONZKR.js → chunk.LPWANRBL.js} +1 -1
- package/dist/preview/{chunk.3MPLUSVY.js → chunk.LSS64NAA.js} +1 -1
- package/dist/preview/{chunk.SUYYDJGZ.js → chunk.MFNWHXGL.js} +1 -1
- package/dist/preview/{chunk.UJF6YTEO.js → chunk.MNH3WUAB.js} +1 -1
- package/dist/preview/chunk.MQ7AB5N4.js +1 -0
- package/dist/preview/{chunk.CZUUFO6A.js → chunk.MU5JK5TK.js} +1 -1
- package/dist/preview/{chunk.RXUL6P7Y.js → chunk.N5CACZ5F.js} +1 -1
- package/dist/preview/{chunk.S6IKR6RD.js → chunk.NFC2TYA6.js} +1 -1
- package/dist/preview/{chunk.TD2V74XU.js → chunk.NKRDVOLJ.js} +1 -1
- package/dist/preview/{chunk.SGYZM6ZU.js → chunk.NNK2E2EP.js} +1 -1
- package/dist/preview/{chunk.J65CZJIC.js → chunk.NVPKYWMF.js} +1 -1
- package/dist/preview/{chunk.DWMFLLJO.js → chunk.NWJ7ELHN.js} +1 -1
- package/dist/preview/{chunk.NKUNCQB3.js → chunk.O5P6LXHF.js} +1 -1
- package/dist/preview/{chunk.2MWEYNVH.js → chunk.OFK6673S.js} +1 -1
- package/dist/preview/{chunk.C4LC2UEU.js → chunk.OG6FEP3K.js} +1 -1
- package/dist/preview/{chunk.CZI6J5CE.js → chunk.OHGAZ3D5.js} +1 -1
- package/dist/preview/{chunk.XJ4JYROM.js → chunk.ONVYKLRX.js} +1 -1
- package/dist/preview/chunk.OQ3FKUP2.js +1 -0
- package/dist/preview/chunk.OUJV4CYS.js +1 -0
- package/dist/preview/{chunk.T552MHMU.js → chunk.OWHH7JDV.js} +1 -1
- package/dist/preview/{chunk.SCN6IYDG.js → chunk.OXDCGGZV.js} +1 -1
- package/dist/preview/{chunk.YIDNZTON.js → chunk.P3Z4ZCL3.js} +1 -1
- package/dist/preview/chunk.PF7XQ5R5.js +1 -0
- package/dist/preview/{chunk.FSZQTX3K.js → chunk.PGT4ZQDG.js} +4 -4
- package/dist/preview/chunk.PH547SON.js +1 -0
- package/dist/preview/chunk.PS765ODQ.js +3 -0
- package/dist/preview/{chunk.MZSWWMX6.js → chunk.PVAYYFT2.js} +1 -1
- package/dist/preview/{chunk.F5STM4DX.js → chunk.Q6WOIE5I.js} +1 -1
- package/dist/preview/{chunk.55C7WO4X.js → chunk.QE257AXE.js} +1 -1
- package/dist/preview/chunk.QKNC5OUC.js +1 -0
- package/dist/preview/chunk.QMGBAKX6.js +2 -0
- package/dist/preview/{chunk.4QBW46XV.js → chunk.QNFX5VHW.js} +1 -1
- package/dist/preview/chunk.QPCDAQTW.js +1 -0
- package/dist/preview/{chunk.TS5APXWC.js → chunk.QPTQIGLX.js} +1 -1
- package/dist/preview/{chunk.LZNHTROY.js → chunk.R5YGW5ZX.js} +1 -1
- package/dist/preview/{chunk.4VTUC5TF.js → chunk.RJ6KEVZC.js} +1 -1
- package/dist/preview/{chunk.6QMRDSTD.js → chunk.RKVMRP7B.js} +1 -1
- package/dist/preview/{chunk.YBQUP3KE.js → chunk.S7U2CHHG.js} +1 -1
- package/dist/preview/{chunk.CLJKQLK2.js → chunk.SD2UYSV6.js} +2 -2
- package/dist/preview/chunk.SI5GGFQR.js +1 -0
- package/dist/preview/{chunk.7QWGIGHM.js → chunk.SMF5S4DQ.js} +1 -1
- package/dist/preview/{chunk.LEZGBHPZ.js → chunk.SNDFIJVX.js} +1 -1
- package/dist/preview/{chunk.F5756PXX.js → chunk.STHWM422.js} +2 -2
- package/dist/preview/{chunk.JIEBGUCA.js → chunk.SV75TRCH.js} +1 -1
- package/dist/preview/{chunk.U2DZE7A5.js → chunk.SXGPRFA4.js} +1 -1
- package/dist/preview/{chunk.ZGJUCVT5.js → chunk.T3RFZ66S.js} +1 -1
- package/dist/preview/{chunk.I6HIVTXU.js → chunk.T6ISUVUP.js} +1 -1
- package/dist/preview/{chunk.R65YX332.js → chunk.TBLOBXZ2.js} +1 -1
- package/dist/preview/{chunk.CVVNHQPO.js → chunk.TDWJU6GW.js} +1 -1
- package/dist/preview/{chunk.2QALBEWP.js → chunk.THLT6NVO.js} +1 -1
- package/dist/preview/{chunk.7FTATAH2.js → chunk.TQCVEKPH.js} +1 -1
- package/dist/preview/{chunk.PAIBRJVZ.js → chunk.TQF5XCUS.js} +1 -1
- package/dist/preview/{chunk.F5XWYO5W.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/chunk.TWXYI5AP.js +2 -0
- package/dist/preview/{chunk.IQCMV5WD.js → chunk.UOUQZYVD.js} +1 -1
- package/dist/preview/{chunk.FJXKQZZS.js → chunk.UPL3D3ZO.js} +1 -1
- package/dist/preview/{chunk.U5Q7EVZQ.js → chunk.UXW43HNW.js} +1 -1
- package/dist/preview/{chunk.ZOSTOVXR.js → chunk.V4GSVXSV.js} +1 -1
- package/dist/preview/chunk.VCEDSOAK.js +1 -0
- package/dist/preview/{chunk.4O3STSC4.js → chunk.VE4AQFLW.js} +1 -1
- package/dist/preview/{chunk.HMV4ILAC.js → chunk.VGQDPEB5.js} +1 -1
- package/dist/preview/{chunk.5A5DI36V.js → chunk.VMYXBFPE.js} +1 -1
- package/dist/preview/{chunk.BQWMHHAZ.js → chunk.VNI6HZEF.js} +2 -2
- package/dist/preview/chunk.VQRY2NQ6.js +1 -0
- package/dist/preview/{chunk.K6EKSURO.js → chunk.VUE6ILQV.js} +1 -1
- package/dist/preview/{chunk.3KF5RYPW.js → chunk.W2VSEEKX.js} +1 -1
- package/dist/preview/{chunk.KP7HUXH5.js → chunk.WAPY4RCS.js} +1 -1
- package/dist/preview/chunk.WFRSGGU5.js +1 -0
- package/dist/preview/{chunk.XAN7QXMQ.js → chunk.WIVNFOQR.js} +1 -1
- package/dist/preview/chunk.WRIBFLVG.js +1 -0
- package/dist/preview/{chunk.TVNY7F64.js → chunk.WWD2TS47.js} +1 -1
- package/dist/preview/{chunk.5W7EGQCQ.js → chunk.WWFOQDPR.js} +2 -2
- package/dist/preview/{chunk.FBDCHJS2.js → chunk.X45EITTK.js} +1 -1
- package/dist/preview/{chunk.5FQHZVE3.js → chunk.X5MCAUFX.js} +1 -1
- package/dist/preview/{chunk.IJVR7ZL7.js → chunk.XBWFQ54R.js} +1 -1
- package/dist/preview/{chunk.JPJHM62B.js → chunk.XMBGT6UT.js} +1 -1
- package/dist/preview/chunk.XP4IVKKR.js +1 -0
- package/dist/preview/chunk.XYBWBMNU.js +1 -0
- package/dist/preview/{chunk.MYR36HW4.js → chunk.YC2IDHQX.js} +1 -1
- package/dist/preview/{chunk.ZQSV5XVB.js → chunk.YCYJHPWS.js} +1 -1
- package/dist/preview/{chunk.BJ3G7J2Z.js → chunk.YF5GCOSZ.js} +3 -2
- package/dist/preview/{chunk.3I2SGKKF.js → chunk.YGGBGHZU.js} +1 -1
- package/dist/preview/chunk.YRC6PKXP.js +1 -0
- package/dist/preview/{chunk.6NYSB6OZ.js → chunk.YRN67Z5K.js} +1 -1
- package/dist/preview/chunk.ZDUKVXBI.js +5 -0
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.2QOB62XU.js +0 -1
- package/dist/preview/chunk.36FKQJFM.js +0 -2
- package/dist/preview/chunk.3A3DCALP.js +0 -1
- package/dist/preview/chunk.3GPYKWAD.js +0 -1
- package/dist/preview/chunk.3QPMFUMV.js +0 -1
- package/dist/preview/chunk.3ZP6IDUC.js +0 -1
- package/dist/preview/chunk.53HW224Y.js +0 -1
- package/dist/preview/chunk.AW74DZ5V.js +0 -17
- package/dist/preview/chunk.C67TMA4U.js +0 -111
- package/dist/preview/chunk.CCCSZRKU.js +0 -1
- package/dist/preview/chunk.CUA7F3YJ.js +0 -25
- package/dist/preview/chunk.DBSSCJQM.js +0 -1
- package/dist/preview/chunk.DW6KXAUM.js +0 -1
- package/dist/preview/chunk.DWPM7AWA.js +0 -1
- package/dist/preview/chunk.FXCKKVT5.js +0 -1
- package/dist/preview/chunk.HHQUCFN4.js +0 -1
- package/dist/preview/chunk.HPWMCS3H.js +0 -23
- package/dist/preview/chunk.HRLCDBMO.js +0 -1
- package/dist/preview/chunk.I7ODVOO5.js +0 -1
- package/dist/preview/chunk.IANOWT3Z.js +0 -1
- package/dist/preview/chunk.IFPJPJ4M.js +0 -1
- package/dist/preview/chunk.IUVRJDL3.js +0 -5
- package/dist/preview/chunk.J4CSY2D5.js +0 -2
- package/dist/preview/chunk.JJIKTTXB.js +0 -1
- package/dist/preview/chunk.KDOJC4FX.js +0 -1
- package/dist/preview/chunk.KJAOJTZZ.js +0 -1
- package/dist/preview/chunk.KLZPUTMU.js +0 -1
- package/dist/preview/chunk.LQ2PDW2M.js +0 -32
- package/dist/preview/chunk.M7DJJRFH.js +0 -1
- package/dist/preview/chunk.MNWP3TPN.js +0 -1
- package/dist/preview/chunk.MSWOETXN.js +0 -1
- package/dist/preview/chunk.NILR2BWR.js +0 -1
- package/dist/preview/chunk.NNYKLENL.js +0 -1
- package/dist/preview/chunk.PYGNO2AV.js +0 -87
- package/dist/preview/chunk.PZHCWMKT.js +0 -1
- package/dist/preview/chunk.QQUZ5RTQ.js +0 -1
- package/dist/preview/chunk.QVID5WHS.js +0 -1
- package/dist/preview/chunk.RHV73CBA.js +0 -3
- package/dist/preview/chunk.RP6C2IUM.js +0 -1
- package/dist/preview/chunk.RPHZY7N4.js +0 -1
- package/dist/preview/chunk.RSMCTI2N.js +0 -1
- package/dist/preview/chunk.S4QSZRKH.js +0 -1
- package/dist/preview/chunk.T4QRIJE4.js +0 -1
- package/dist/preview/chunk.UJM5EZDM.js +0 -3
- package/dist/preview/chunk.UJPX3BUV.js +0 -1
- package/dist/preview/chunk.UYBSVE2W.js +0 -1
- package/dist/preview/chunk.WMZ2BINI.js +0 -1
- package/dist/preview/chunk.X2RHBTJI.js +0 -1
- package/dist/preview/chunk.X3FPVFFB.js +0 -1
- package/dist/preview/chunk.X4PFLIXB.js +0 -1
- package/dist/preview/chunk.YR7DKU5T.js +0 -1
- package/dist/preview/chunk.ZBK3FCVE.js +0 -1
- package/dist/preview/chunk.ZH5L746C.js +0 -1
package/dist/preview/index.html
CHANGED
|
@@ -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.
|
|
9
|
-
<link rel="modulepreload" href="/chunk.
|
|
10
|
-
<link rel="modulepreload" href="/chunk.
|
|
11
|
-
<link rel="modulepreload" href="/chunk.
|
|
12
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
17
|
-
<link rel="modulepreload" href="/chunk.
|
|
18
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
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.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
26
|
-
<link rel="modulepreload" href="/chunk.
|
|
27
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
30
|
-
<link rel="modulepreload" href="/chunk.
|
|
31
|
-
<link rel="modulepreload" href="/chunk.
|
|
32
|
-
<link rel="modulepreload" href="/chunk.
|
|
33
|
-
<link rel="modulepreload" href="/chunk.
|
|
34
|
-
<link rel="modulepreload" href="/chunk.
|
|
35
|
-
<link rel="modulepreload" href="/chunk.
|
|
36
|
-
<link rel="modulepreload" href="/chunk.
|
|
37
|
-
<link rel="modulepreload" href="/chunk.
|
|
38
|
-
<link rel="modulepreload" href="/chunk.
|
|
39
|
-
<link rel="modulepreload" href="/chunk.
|
|
40
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
43
|
-
<link rel="modulepreload" href="/chunk.
|
|
44
|
-
<link rel="modulepreload" href="/chunk.
|
|
45
|
-
<link rel="modulepreload" href="/chunk.
|
|
46
|
-
<link rel="modulepreload" href="/chunk.
|
|
47
|
-
<link rel="modulepreload" href="/chunk.
|
|
48
|
-
<link rel="modulepreload" href="/chunk.
|
|
49
|
-
<link rel="modulepreload" href="/chunk.
|
|
50
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
53
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
55
|
+
<link rel="modulepreload" href="/chunk.53GQQETN.js">
|
|
56
56
|
<link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
|
|
57
|
-
<link rel="modulepreload" href="/chunk.
|
|
58
|
-
<link rel="modulepreload" href="/chunk.
|
|
59
|
-
<link rel="modulepreload" href="/chunk.
|
|
60
|
-
<link rel="modulepreload" href="/chunk.
|
|
61
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
63
|
+
<link rel="modulepreload" href="/chunk.DEBW4FH6.js">
|
|
64
64
|
<link rel="modulepreload" href="/chunk.RD2FSSLV.js">
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<link rel="modulepreload" href="/chunk.
|
|
68
|
-
<link rel="modulepreload" href="/chunk.
|
|
69
|
-
<link rel="modulepreload" href="/chunk.
|
|
70
|
-
<link rel="modulepreload" href="/chunk.
|
|
71
|
-
<link rel="modulepreload" href="/chunk.
|
|
72
|
-
<link rel="modulepreload" href="/chunk.
|
|
73
|
-
<script>(()=>{const later=["/chunk.
|
|
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>
|
package/dist/preview/page.js
CHANGED
|
@@ -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.IJVR7ZL7.js";import{a as fo}from"./chunk.SSHEFQ4R.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.T4QRIJE4.js";import{b as gr}from"./chunk.RIP2SAQ5.js";import{c as qt}from"./chunk.R65YX332.js";import{a as Ot}from"./chunk.Q5WEOX3Q.js";import{b as Ct,i as Hn}from"./chunk.DW6KXAUM.js";import{k as ct}from"./chunk.RHV73CBA.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.PYGNO2AV.js";import{c as uo}from"./chunk.3HFBHLXC.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.CUA7F3YJ.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.IUVRJDL3.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.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.HRLCDBMO.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3GPYKWAD.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.3ZP6IDUC.js","./chunk.2QALBEWP.js","./chunk.WAIIXXVI.js","./chunk.BJ3G7J2Z.js","./chunk.KP7HUXH5.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.4O3STSC4.js","./chunk.VKQONZKR.js","./chunk.FXCKKVT5.js","./chunk.U5P23GO7.js","./chunk.LEZGBHPZ.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.X7HMTN3Z.js","./chunk.YTRUZ56A.js","./chunk.MYR36HW4.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.T4QRIJE4.js","./chunk.RIP2SAQ5.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.MR776WQ2.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7TZXDPPO.js"))),bo=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.HPWMCS3H.js","./chunk.F5STM4DX.js","./chunk.SWY6DIE4.js","./chunk.F5756PXX.js","./chunk.Q355UPFG.js","./chunk.3ZP6IDUC.js","./chunk.QG3LV4RH.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.MB7LKKUD.js","./chunk.6KYTCEIH.js","./chunk.FXCKKVT5.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.NKUNCQB3.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IANOWT3Z.js"))),So=Ne(()=>(__graviewPreload(import.meta.url,["./chunk.HPWMCS3H.js","./chunk.F5STM4DX.js","./chunk.SWY6DIE4.js","./chunk.F5756PXX.js","./chunk.Q355UPFG.js","./chunk.3ZP6IDUC.js","./chunk.QG3LV4RH.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.MB7LKKUD.js","./chunk.6KYTCEIH.js","./chunk.FXCKKVT5.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.NKUNCQB3.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MNWP3TPN.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.U2DZE7A5.js","./chunk.CEQQIW7Z.js","./chunk.BBLA4PSP.js","./chunk.QG3LV4RH.js","./chunk.YCMMATFK.js","./chunk.F5XWYO5W.js","./chunk.FSZQTX3K.js","./chunk.OXXZGPJZ.js","./chunk.K6EKSURO.js","./chunk.KJAOJTZZ.js","./chunk.S4QSZRKH.js","./chunk.QDVGHI7R.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.5IM2X3VT.js","./chunk.NKUNCQB3.js","./chunk.MR776WQ2.js","./chunk.CVVNHQPO.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.7LAXSQQY.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.IJVR7ZL7.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.S6IKR6RD.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.MYR36HW4.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TVNY7F64.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.F5STM4DX.js","./chunk.YR7DKU5T.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.SSHEFQ4R.js","./chunk.RIP2SAQ5.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.RXUL6P7Y.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.
|
|
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.
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/skills": "0.1.
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
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{b as n}from"./chunk.KOVTQCHX.js";import{c as a}from"./chunk.VKQONZKR.js";import"./chunk.FXCKKVT5.js";import"./chunk.U5P23GO7.js";import"./chunk.LEZGBHPZ.js";import"./chunk.O2XPLDMM.js";import"./chunk.CM7EDQ4E.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import"./chunk.X7HMTN3Z.js";import"./chunk.YTRUZ56A.js";import"./chunk.MYR36HW4.js";import"./chunk.UVMHC6VM.js";import"./chunk.XAN7QXMQ.js";import"./chunk.MIE4TJRW.js";import"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{Y as i}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import"./chunk.IUVRJDL3.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,2 +0,0 @@
|
|
|
1
|
-
import{g as F,l as b}from"./chunk.RHV73CBA.js";function L(t,o){return o===1&&["every","some","sum","min","max","sort"].includes(t.fn)}function M(t){let o=new Set,e=new Set,r=[],s=[],a=new Set(F),i=(l,f)=>{switch(l.t){case"lit":return;case"ident":f||o.add(l.name);return;case"list":l.items.forEach(c=>i(c,f));return;case"member":i(l.object,f);return;case"unary":i(l.operand,f);return;case"binary":i(l.left,f),i(l.right,f);return;case"where":i(l.set,f),i(l.filter,!0);return;case"call":{e.add(l.fn);let c=(l.fn==="out"||l.fn==="in")&&l.args.length===2?l.args[1]:l.args[0],g=c?.t==="lit"&&typeof c.value=="string"?c.value:void 0;l.fn==="all"&&g&&r.push(g),(l.fn==="out"||l.fn==="in")&&g&&s.push(g),l.args.forEach((v,k)=>i(v,f||L(l,k)));return}}};return i(t,!1),{names:o,functions:e,unknownFunctions:[...e].filter(l=>!a.has(l)),sweeps:r,edges:s}}var p=class extends Error{constructor(e,r,s){super(`${e} (at character ${r+1} of "${s}")`);this.sentence=e;this.at=r;this.source=s}},D=["||","&&","==","!=","<=",">=","<",">","!","|","&","+","-","*","/","%","(",")","[","]",",","."],j={and:"&&",or:"||",not:"!"},T=2e3;function H(t){let o=[],e=0;for(;e<t.length;){let r=t[e];if(r===" "||r===" "||r===`
|
|
2
|
-
`||r==="\r"){e++;continue}if(r>="0"&&r<="9"){let a=e;for(;e<t.length&&/[0-9.]/.test(t[e]);)e++;let i=t.slice(a,e),l=Number(i);if(!Number.isFinite(l)||i.split(".").length>2)throw new p(`"${i}" is not a number`,a,t);o.push({k:"num",v:l,at:a});continue}if(r==="'"||r==='"'){let a=e++,i="";for(;e<t.length&&t[e]!==r;)t[e]==="\\"&&e+1<t.length&&e++,i+=t[e++];if(e>=t.length)throw new p("a quoted word is never closed",a,t);e++,o.push({k:"str",v:i,at:a});continue}if(/[A-Za-z_]/.test(r)){let a=e;for(;e<t.length&&/[A-Za-z0-9_]/.test(t[e]);)e++;let i=t.slice(a,e),l=Object.hasOwn(j,i)?j[i]:void 0;o.push(l?{k:"op",v:l,at:a}:{k:"id",v:i,at:a});continue}let s=D.find(a=>t.startsWith(a,e));if(!s)throw new p(`"${r}" is not part of the rule language`,e,t);o.push({k:"op",v:s,at:e}),e+=s.length}return o.push({k:"end",at:t.length}),o}function w(t){if(t.length>T)throw new p(`an expression may be at most ${T} characters`,0,t.slice(0,40));let o=H(t),e=0,r=()=>o[e],s=n=>{let d=r();return d.k==="op"&&d.v===n},a=n=>{let d=r();return d.k==="id"&&d.v===n},i=(n,d)=>{if(!s(n))throw new p(`expected ${d}`,r().at,t);e++},l=0,f=(n,d)=>{if(++l>64)throw new p("the expression nests too deeply",n,t);try{return d()}finally{l--}},c=(n,d)=>()=>{let m=d();for(;;){let y=r(),S=y.k==="op"?n.find(q=>q===y.v):y.k==="id"&&y.v==="in"&&n.includes("in")?"in":void 0;if(!S)return m;e++,m={t:"binary",op:S,left:m,right:d(),at:y.at}}},g=()=>{let n=r();if(n.k==="num")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="str")return e++,{t:"lit",value:n.v,at:n.at};if(n.k==="id"){if(e++,n.v==="true"||n.v==="false")return{t:"lit",value:n.v==="true",at:n.at};if(n.v==="null")return{t:"lit",value:null,at:n.at};if(s("(")){e++;let d=[];if(!s(")"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i(")",`")" to close ${n.v}(\u2026)`),{t:"call",fn:n.v,args:d,at:n.at}}return{t:"ident",name:n.v,at:n.at}}if(n.k==="op"&&n.v==="("){e++;let d=f(n.at,h);return i(")",'a ")"'),d}if(n.k==="op"&&n.v==="["){e++;let d=[];if(!s("]"))for(;;){if(d.push(h()),s(",")){e++;continue}break}return i("]",'a "]" to close the list'),{t:"list",items:d,at:n.at}}throw n.k==="end"?new p("the expression ends too soon",n.at,t):new p(`"${n.k==="op"?n.v:""}" cannot start a value here`,n.at,t)},v=()=>{let n=g();for(;;){if(s(".")){let d=r();e++;let m=r();if(m.k!=="id")throw new p('expected a field name after "."',m.at,t);e++,n={t:"member",object:n,name:m.v,at:d.at};continue}if(a("where")){let d=r().at;e++,n={t:"where",set:n,filter:f(d,h),at:d};continue}return n}},k=()=>{let n=r();return n.k==="op"&&(n.v==="!"||n.v==="-")?(e++,{t:"unary",op:n.v,operand:f(n.at,k),at:n.at}):v()},P=c(["*","/","%"],k),z=c(["+","-"],P),N=c(["&"],z),R=c(["|"],N),_=()=>{let n=R(),d=r(),m=d.k==="op"&&["==","!=","<","<=",">",">="].includes(d.v)?d.v:d.k==="id"&&d.v==="in"?"in":void 0;return m?(e++,{t:"binary",op:m,left:n,right:R(),at:d.at}):n},O=()=>{let n=r();return n.k==="op"&&n.v==="!"?(e++,{t:"unary",op:"!",operand:f(n.at,O),at:n.at}):_()},B=c(["&&"],O),I=c(["||"],B);function h(){return I()}let K=h();if(r().k!=="end")throw new p("there is more after the end of the expression",r().at,t);return K}function E(t){let o,e=-1,r=0;for(let s=0;s<t.length;s++){let a=t[s];if(o){a==="\\"?s++:a===o&&(o=void 0);continue}a==="'"||a==='"'?o=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:a==="|"&&r===0&&(t[s+1]==="|"?s++:e=s)}if(e>0&&t.slice(e+1).trim()===x){let s=E(t.slice(0,e));if(s>=0)return s}return e}var x="capital",$=/\s*(?:'((?:[^'\\]|\\.)*)'|"((?:[^"\\]|\\.)*)")\s*(,|$)/y;function U(t){let o=E(t);if(o>=0){if(t.slice(o+1).trim()!==x)throw new u('only "capital" may follow another formatter, like {n | words | capital}');let e=t.slice(0,o);if(e.trim()===x)throw new u('"capital" is said once');return{...C(e),capital:!0}}return t.trim()===x?{args:[],capital:!0}:C(t)}function C(t){let o=t.indexOf(":"),e=(o>=0?t.slice(0,o):t).trim();if(!b.includes(e))throw new u(`"${e}" is not a formatter; use one of ${[...b,x].join(", ")}`);let r=[];if(o>=0&&e==="excerpt"){let s=t.slice(o+1).trim();if(!/^\d+$/.test(s)||Number(s)<20||Number(s)>1e3)throw new u("excerpt is told at most how many characters, 20 to 1000: {summary | excerpt: 80}");r.push(s)}else if(o>=0&&e==="money"){if(t.slice(o+1).trim()!=="0")throw new u("money is told 0 for whole units, rounded \u2014 {total | money: 0} \u2014 or nothing, for cents only where a sum has them");r.push("0")}else if(o>=0){let s=t.slice(o+1),a=0;for(;a<s.length;){$.lastIndex=a;let i=$.exec(s);if(!i)throw new u(`"${e}" is told quoted words, like ${e}: 'offer'`);if(r.push((i[1]??i[2]??"").replace(/\\(.)/g,"$1")),a=$.lastIndex,i[3]==="")break}}if(e==="plural"&&(r.length<1||r.length>2))throw new u("plural is told its noun, like {count | plural: 'offer'}, and its plural where English does not make it: plural: 'person', 'people'");if(e!=="plural"&&e!=="excerpt"&&e!=="money"&&r.length>0)throw new u(`"${e}" takes nothing after it`);return{format:e,args:r}}var u=class extends Error{constructor(e){super(e);this.sentence=e}};function Y(t){let o=[],e=0;for(;e<t.length;){let r=t.indexOf("{",e);if(r<0){o.push({text:t.slice(e)});break}r>e&&o.push({text:t.slice(e,r)});let s=t.indexOf("}",r);if(s<0)throw new u(`a "{" at character ${r+1} is never closed`);let a=t.slice(r+1,s),i=E(a),l=(i>=0?a.slice(0,i):a).trim(),f=i>=0?U(a.slice(i+1)):void 0,c=E(l);if(c>=0&&b.includes(l.slice(c+1).split(":")[0].trim()))throw new u('only "capital" may follow another formatter, like {n | words | capital}');o.push({expr:w(l),source:l,...f?.format?{format:f.format}:{},...f&&f.args.length>0?{formatArgs:f.args}:{},...f?.capital?{capital:!0}:{}}),e=s+1}return o}function A(t){let o=new Map;for(let[e,r]of Object.entries(t?.computed??{}))o.set(e,typeof r=="string"?{expr:r}:r);return o}function re(t){let o=A(t);if(o.size===0)return;let e=new Map;for(let[r,s]of o)try{e.set(r,w(s.expr))}catch(a){if(!(a instanceof p))throw a}return e}function Z(t,o,e=new Set){let r=A(t).get(o);if(!r||e.has(o))return!1;let s;try{s=w(r.expr)}catch{return!1}let a=M(s);if(a.edges.length>0||a.sweeps.length>0||[...a.functions].some(c=>c==="out"||c==="in"||c==="all"))return!1;let i=t.fields,l=c=>i instanceof Set?i.has(c):Object.hasOwn(i,c),f=new Set([...e,o]);return[...a.names].every(c=>l(c)||Z(t,c,f))}export{M as a,p as b,w as c,u as d,Y as e,A as f,re as g,Z as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i}from"./chunk.QQUZ5RTQ.js";import"./chunk.BJ3G7J2Z.js";import"./chunk.DIVANC3G.js";import"./chunk.KP7HUXH5.js";import"./chunk.KV3N6VRG.js";import"./chunk.FUTSLXWN.js";import"./chunk.MZSWWMX6.js";import"./chunk.NCBUECIW.js";import"./chunk.2T24FYAO.js";import"./chunk.JEQ6CA5M.js";import"./chunk.SUYYDJGZ.js";import"./chunk.YR7DKU5T.js";import"./chunk.WVUJXDXZ.js";import{e as l}from"./chunk.IRPMGHZN.js";import"./chunk.7QWGIGHM.js";import"./chunk.HRLCDBMO.js";import"./chunk.LZNHTROY.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import"./chunk.MIE4TJRW.js";import"./chunk.RP6C2IUM.js";import"./chunk.RD2FSSLV.js";import"./chunk.T552MHMU.js";import"./chunk.ZGJUCVT5.js";import"./chunk.CVVNHQPO.js";import"./chunk.YIDNZTON.js";import"./chunk.QILGAV7H.js";import"./chunk.I6HIVTXU.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{Y as m}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as g}from"./chunk.AJZBJBMO.js";var a=g(m(),1),r=new WeakMap;function c(n){let o=r.get(n);if(!o){let t=l(n);o=e=>e.mode==="fullscreen"?(0,a.jsx)(i,{blocks:t,slot:"home",heading:2,firstHeading:1,...e.flagged?{flagged:e.flagged}:{}}):(0,a.jsx)(i,{blocks:t,slot:"home",heading:3,firstHeading:2,...e.flagged?{flagged:e.flagged}:{}}),r.set(n,o)}return o}export{c as homeView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f}from"./chunk.ZBK3FCVE.js";import"./chunk.DW6KXAUM.js";import"./chunk.HRLCDBMO.js";import"./chunk.36FKQJFM.js";import"./chunk.RHV73CBA.js";import{Xb as a}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{a as ActRefusal,e as compileDocumentWithoutCheck,d as effectsOf,f as inDocumentWords,c as kindShapes,b as readDocument};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as B,b as Y,c as F,d as j}from"./chunk.X7HMTN3Z.js";import"./chunk.YTRUZ56A.js";import"./chunk.MYR36HW4.js";import"./chunk.PYGNO2AV.js";import"./chunk.3HFBHLXC.js";import{G as Q,T as K,U as L,Y as D,ha as _}from"./chunk.CUA7F3YJ.js";import"./chunk.SDO3U72B.js";import{W as H,zd as $}from"./chunk.IUVRJDL3.js";import"./chunk.FQLNBIQ5.js";import{b as E}from"./chunk.AJZBJBMO.js";var s=E(Q(),1);var a=E(D(),1),V={kind:"human"},Z=[1,2,4,8],ee=900,q={you:"You",person:"A person",agent:"An agent",app:"The app"},G={you:"var(--graview-accent)",person:"var(--graview-ink-muted)",agent:"var(--graview-activity, var(--graview-good))",app:"var(--graview-edge-bright)"};function te(n,t,i){return[...new Set([...i,t,...n.map(r=>r.seq)])].sort((r,o)=>r-o)}function ae(n,t){let i=n.withheld===!0;return{seq:n.seq+1,from:n.seq,at:n.at,batch:n.batch,maker:i?"person":B(n.author,t),author:i?void 0:n.author,said:n.batchIntent??n.intent,declaration:!1,withheld:i}}function ne(n,t){let i=0;for(let r=0;r<n.length;r++)n[r]<=t&&(i=r);return i}function re(n,t,i){let r=F(n,t);if(r.length===0)return null;let o=n.canUndo(r);if(!o.ok)return null;let y=new Set(n.permittedMutations(i).map(d=>d.name));return o.ops.every(d=>d.mutation!==null&&y.has(d.mutation.name))?r:null}function le({face:n}){let t=K(),i=_(),r=i?.principal??V,o=L(t.live,r),y=o.log.length,d=(0,s.useMemo)(()=>Y(o,{me:r,...t.host?.declarations?{declarations:t.host.declarations}:{}}),[o,r,t.host,y]),p=o.log.horizon,x=p>0&&t.host?.archived!==void 0,v=t.kept,O=(0,s.useMemo)(()=>x?v?.stops??Array.from({length:p},(e,g)=>g):[],[x,v,p]),h=(0,s.useMemo)(()=>te(d,p,O),[d,p,O]),u=t.archive,c=u?.seq??t.past?.seq??y,w=t.host?.kept&&(u?.behindKept||v!==void 0&&(c<=v.through||v.from>0&&c<=v.from))?t.host.kept:void 0,b=ne(h,c),m=h.length-1,M=c<p&&t.past?.seq===c?t.past.store.log.all().at(-1):void 0,S=M?ae(M,r):c<p?void 0:[...d].reverse().find(e=>e.seq<=c&&e.seq>(h[b-1]??-1))??[...d].reverse().find(e=>e.seq<=c),[k,R]=(0,s.useState)(!1),[T,U]=(0,s.useState)(1),[C,N]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!k)return;if(b>=m){R(!1);return}let e=setTimeout(()=>t.show(h[b+1]),ee/T);return()=>clearTimeout(e)},[k,b,m,T,h,t]);let W=(0,s.useMemo)(()=>t.past&&!u&&c>=p?re(o,c,r):null,[t.past,u,o,c,p,r,y]),z=e=>j(e,{graph:o.graph,schema:o.schema,...i?.seats?{seats:i.seats}:{},...i?.people?{people:i.people}:{}}),f=t.past?t.past.at?H(t.past.at,i?.locale):"the start":null,A=u?u.refused?"The archive could not be read":u.behindKept?"Nothing this far back is kept":"Reading the older changes from the archive\u2026":S?`${z(S)==="you"?"You":z(S)}: ${S.said}`:"Nothing had happened yet",I=(0,s.useRef)(null);(0,s.useLayoutEffect)(()=>{let e=I.current,g=e?.parentElement;if(n!=="scene"||!e||!g)return;let l=()=>g.style.setProperty("--graview-sheet",`${Math.ceil(e.getBoundingClientRect().height)+24}px`);l();let P=typeof ResizeObserver>"u"?null:new ResizeObserver(l);return P?.observe(e),()=>{P?.disconnect(),g.style.removeProperty("--graview-sheet")}},[n]);let X=n==="scene"?{position:"absolute",left:"50%",bottom:12,transform:"translateX(-50%)",width:"min(720px, calc(100% - 32px))",zIndex:$("rail")}:{position:"sticky",top:0,zIndex:$("rail"),margin:"0 auto 12px",maxWidth:960,width:"100%"};return(0,a.jsxs)("section",{ref:I,"aria-label":"Timeline","data-testid":"timeline","data-graview-past":t.past?String(t.past.seq):"now","data-graview-offstage":"",style:{...X,boxSizing:"border-box",display:"grid",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",color:"var(--graview-ink)",fontSize:"0.8125rem"},children:[(0,a.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 12px"},children:[(0,a.jsx)("strong",{"data-testid":"as-of",role:"status",style:{fontWeight:600},children:u?"Archived changes":f?`As of ${f}`:"Now"}),(0,a.jsx)("span",{"data-testid":"timeline-caption",style:{color:"var(--graview-ink-muted)",minWidth:0,overflowWrap:"anywhere"},children:A}),f?(0,a.jsx)("span",{style:{color:"var(--graview-ink-faint)"},"data-testid":"past-read-only",children:"Nothing changes while you look back."}):null]}),(0,a.jsxs)("div",{style:{position:"relative",height:22},"aria-hidden":"true",children:[x?(0,a.jsx)("span",{"data-testid":"timeline-archived",title:"Changes read from the archive as you scrub back",style:{position:"absolute",left:0,bottom:0,height:6,width:`${m===0?0:h.indexOf(p)/m*100}%`,borderRadius:2,background:"var(--graview-edge)"}}):null,h.slice(1).map((e,g)=>{let l=[...d].reverse().find(J=>J.seq===e);if(!l)return null;let P=m===0?0:(g+1)/m*100;return(0,a.jsx)("span",{"data-graview-tick":e,"data-maker":l.maker,...l.declaration?{"data-declaration":""}:{},title:`${q[l.maker]}: ${l.said}`,style:{position:"absolute",left:`calc(${P}% - 1px)`,bottom:0,width:l.declaration?4:2,height:l.declaration?22:12,borderRadius:2,background:l.declaration?"var(--graview-ink)":G[l.maker],opacity:e<=c?1:.45}},`${e}:${l.batch??"declaration"}`)})]}),(0,a.jsx)("input",{type:"range","data-testid":"scrubber","aria-label":"Moment",min:0,max:m,step:1,value:b,"aria-valuetext":f?`As of ${f}. ${A}`:`Now. ${A}`,onChange:e=>{R(!1),t.show(h[Number(e.currentTarget.value)]??y)},style:{width:"100%",margin:0,accentColor:"var(--graview-accent)"}}),(0,a.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,a.jsx)("button",{type:"button","data-testid":"play","aria-pressed":k,onClick:()=>{!k&&b>=m&&t.show(h[0]),R(!k)},style:{minHeight:28,minWidth:64},children:k?"Pause":"Play"}),(0,a.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--graview-ink-muted)"},children:["Speed",(0,a.jsx)("select",{"data-testid":"speed",value:T,onChange:e=>U(Number(e.currentTarget.value)),style:{minHeight:28},children:Z.map(e=>(0,a.jsxs)("option",{value:e,children:[e,"\xD7"]},e))})]}),(0,a.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",gap:10,color:"var(--graview-ink-faint)",flexWrap:"wrap"},children:Object.keys(q).filter(e=>d.some(g=>g.maker===e)).map(e=>(0,a.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,a.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:G[e]}}),q[e]]},e))}),(0,a.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[W?(0,a.jsx)("button",{type:"button","data-testid":"restore-here",title:"Take back every change since, as one change you can undo",onClick:()=>{N(null);try{o.undo([...W],{author:r,intent:f?`Restore to ${f}`:"Restore"}),t.show(null)}catch(e){N(e instanceof Error?e.message:String(e))}},style:{minHeight:28},children:"Restore to here"}):null,(0,a.jsx)("button",{type:"button","data-testid":"back-to-now",onClick:()=>t.show(null),style:{minHeight:28},children:"Back to now"})]})]}),C?(0,a.jsx)("span",{role:"alert","data-testid":"restore-refused",style:{color:"var(--graview-warn)"},children:C}):null,u?.refused?(0,a.jsx)("span",{role:"alert","data-testid":"archive-refused",style:{color:"var(--graview-warn)"},children:u.refused}):null,w?(0,a.jsxs)("span",{"data-testid":"timeline-kept",style:{color:"var(--graview-ink-faint)"},children:[w.sentence,w.action?(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("a",{"data-testid":"timeline-kept-action",href:w.action.href,style:{color:"var(--graview-ink-muted)"},children:w.action.label})]}):null]}):null,p>0&&!x?(0,a.jsx)("span",{"data-testid":"timeline-horizon",style:{color:"var(--graview-ink-faint)"},children:"The changes before the timeline's start were archived."}):null]})}export{le as Timeline};
|
|
@@ -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{a as re}from"./chunk.BJ3G7J2Z.js";import{p as De,q as te,t as G,u as Ie,y as oe}from"./chunk.RP6C2IUM.js";import{m as Z,n as Ee,o as Te,p as ee,q as ne}from"./chunk.RD2FSSLV.js";import{b as xe}from"./chunk.QILGAV7H.js";import{b as Me,d as J,e as X,g as Ae,q as Pe}from"./chunk.PYGNO2AV.js";import{b as ve}from"./chunk.3HFBHLXC.js";import{D as H,F as U,G as R,J as ye,Ma as Se,Na as be,Oa as I,Sa as $,T as we,Ua as Q,Y as A,ga as b,ha as V,ia as ke,m as me,v as he,z as ge}from"./chunk.CUA7F3YJ.js";import{a as D}from"./chunk.SDO3U72B.js";import{Zd as fe,qa as q,ud as de,zd as pe}from"./chunk.IUVRJDL3.js";import{b as w}from"./chunk.AJZBJBMO.js";var x=w(R(),1),P=w(A(),1),ie=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BBMX3IIO.js")))),Ne=ie.part(n=>(0,P.jsx)(n.HoverChipDoor,{}),{quiet:!0}),Re="A",K=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.VBHV4TLG.js","./chunk.T6PU3NKP.js","./chunk.X3FPVFFB.js","./chunk.53HW224Y.js","./chunk.WAIIXXVI.js","./chunk.RECTEAG4.js","./chunk.KP7HUXH5.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.SCN6IYDG.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.YTRUZ56A.js","./chunk.TBY5IR7C.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.YFVJUHAK.js","./chunk.MR776WQ2.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.J4CSY2D5.js"))));var We=K.part((n,e)=>(0,P.jsx)(n.InspectorPane,{...e}),{what:"This card's acts"});function He(n){let e=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&n()},t=globalThis;if(t.requestIdleCallback){let a=t.requestIdleCallback(e,{timeout:5e3});return()=>t.cancelIdleCallback?.(a)}let r=setTimeout(e,2500);return()=>clearTimeout(r)}var Ge=150,Be="[data-graview-pick], [data-graview-view], [data-graview-record], [data-graview-act], [data-graview-field], a[href]";function ze(n){if(n.closest("[data-graview-face='pages'], [data-graview-popover]"))return null;let e=n.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??n.closest("[data-graview-view]")?.getAttribute("data-graview-view");return e?{face:"scene",on:e,about:[e]}:null}function Fe(n){let{store:e,principal:t,providers:r,ai:a}=b(),l=Ie(),p=U(a),o=(0,x.useRef)({aimAt:n,store:e,principal:t,providers:r,prepareSections:l,chipsOn:p});o.current={aimAt:n,store:e,principal:t,providers:r,prepareSections:l,chipsOn:p},(0,x.useEffect)(()=>{if(typeof document>"u")return;let u=null,g=null,k=null,d=v=>{let m=o.current,M=m.chipsOn?m.aimAt(v):null;M&&(k=v,ie.load().then(_=>{k===v&&_.restOn(M,v)},()=>{}))},h=()=>{u&&clearTimeout(u.timer),u=null},c=v=>{let m=o.current,M=m.aimAt(v);if(!M)return;let _=JSON.stringify([M.face,M.on,M.about,M.field,M.place,M.act,m.store.log.length]);_!==g&&(g=_,m.prepareSections(M),K.load().then(Oe=>Oe.prepareActs(m.store,M,{principal:m.principal,providers:m.providers}),()=>{}))},i=v=>v.target instanceof Element?v.target.closest(Be):null,f=v=>{if(v.pointerType==="touch")return;let m=i(v);m!==null&&m===u?.element||(h(),m!==null&&(u={element:m,timer:setTimeout(()=>{u=null,c(m),d(m)},Ge)}))},y=v=>{let m=v.relatedTarget;k!==null&&!(m instanceof Node&&k.contains(m))&&(k=null,ie.current?.leaveRest()),u!==null&&(m instanceof Node&&u.element.contains(m)||h())},S=v=>{if(v.pointerType==="mouse")return;let m=i(v);m&&c(m)},T=v=>{if(!Se())return;let m=i(v);m&&c(m)};return document.addEventListener("pointerover",f,{passive:!0}),document.addEventListener("pointerout",y,{passive:!0}),document.addEventListener("pointerdown",S,{capture:!0,passive:!0}),document.addEventListener("focusin",T),()=>{h(),document.removeEventListener("pointerover",f),document.removeEventListener("pointerout",y),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("focusin",T)}},[])}function dn({placement:n="float",openActs:e,aimAt:t}={}){let{menuAt:r,setMenuAt:a,registerActsDoor:l,ai:p}=b(),{selection:o}=$();Fe(t??ze),(0,x.useEffect)(()=>{if(K.current)return;let h=()=>{y(),K.prefetch()},c=()=>{},i=be(()=>void(c=He(h))),f=["pointerdown","keydown"];for(let S of f)document.addEventListener(S,h,{capture:!0,passive:!0});function y(){i(),c();for(let S of f)document.removeEventListener(S,h,{capture:!0})}return y},[]),(0,x.useEffect)(()=>{if(n==="menu")return l({key:Re,open:e??(h=>{let c=h.getBoundingClientRect(),i=h.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??h.closest("[data-graview-view]")?.getAttribute("data-graview-view")??void 0;a({x:Math.round(c.left+Math.min(16,c.width/2)),y:Math.round(Math.min(c.bottom,c.top+36)),...i?{on:i}:{}})})}),()=>l(null)},[n,l,a,e]);let u=r!==null||o.length>0&&e===void 0,[g,k]=(0,x.useState)(u);(0,x.useEffect)(()=>{u&&k(!0)},[u]);let d=U(p)?(0,P.jsx)(x.Suspense,{fallback:null,children:(0,P.jsx)(Ne,{})}):null;return!g&&!u?d:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(x.Suspense,{fallback:null,children:(0,P.jsx)(We,{placement:n,chosen:e===void 0})}),d]})}var j=w(R(),1),Y=w(A(),1),_e=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.VBHV4TLG.js","./chunk.T6PU3NKP.js","./chunk.X3FPVFFB.js","./chunk.53HW224Y.js","./chunk.ZOSTOVXR.js","./chunk.HIJ72QX6.js","./chunk.BQWMHHAZ.js","./chunk.2QALBEWP.js","./chunk.WAIIXXVI.js","./chunk.RECTEAG4.js","./chunk.QQUZ5RTQ.js","./chunk.BJ3G7J2Z.js","./chunk.DIVANC3G.js","./chunk.KP7HUXH5.js","./chunk.4BSEYZMS.js","./chunk.KV3N6VRG.js","./chunk.FUTSLXWN.js","./chunk.MZSWWMX6.js","./chunk.HJCQ6I3S.js","./chunk.4QBW46XV.js","./chunk.U5Q7EVZQ.js","./chunk.NCBUECIW.js","./chunk.2T24FYAO.js","./chunk.JEQ6CA5M.js","./chunk.25VJPUDH.js","./chunk.SCN6IYDG.js","./chunk.O2XPLDMM.js","./chunk.CM7EDQ4E.js","./chunk.SUYYDJGZ.js","./chunk.YR7DKU5T.js","./chunk.YTRUZ56A.js","./chunk.TBY5IR7C.js","./chunk.5IM2X3VT.js","./chunk.BIDL7GQD.js","./chunk.NKUNCQB3.js","./chunk.HMV4ILAC.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.YFVJUHAK.js","./chunk.MR776WQ2.js","./chunk.WVUJXDXZ.js","./chunk.IRPMGHZN.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.UWEFODVV.js")))),qe=_e.part((n,e)=>{let t=n.DraftFrame;return(0,Y.jsx)(t,{...e})},{what:"The view"});function hn(n){let{seatTalk:e}=b();return(0,j.useSyncExternalStore)(e.subscribe,()=>e.get().draft!==null,()=>!1)?(0,Y.jsx)(j.Suspense,{fallback:null,children:(0,Y.jsx)(qe,{...n})}):null}var L=w(R(),1),C=w(A(),1),se=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.MZSWWMX6.js","./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.YBQUP3KE.js")))),Ve=se.part((n,e)=>{let t=n.QuickAskCard;return(0,C.jsx)(t,{...e})},{what:"The quick ask"});function Sn({face:n,on:e=!0}){let{ai:t,aiDesk:r,selection:a,view:l}=b(),p=we()?.open??!1,o=e&&H(t)&&!p,u=Ae(r),g=(0,L.useRef)(null),k=(0,L.useRef)({selection:a,place:l.within?.view});return k.current={selection:a,place:l.within?.view},(0,L.useEffect)(()=>{if(!o)return;let d=Me(r);return d.drawn+=1,d.preload=()=>{se.load().catch(()=>{}),(__graviewPreload(import.meta.url,["./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.7QWGIGHM.js","./chunk.I6HIVTXU.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.C4LC2UEU.js")).catch(()=>{})},J(d),()=>{d.drawn=Math.max(0,d.drawn-1),d.drawn===0&&(d.open=null),J(d)}},[o,r]),(0,L.useEffect)(()=>{if(!o)return;let d=h=>{if(h.defaultPrevented||h.key.toLowerCase()!=="k"||!(h.metaKey||h.ctrlKey)||h.altKey||h.shiftKey)return;let c=g.current?.closest("[data-graview-embed]"),i=h.target,f=!(i instanceof Node)||i===document.body||i===document.documentElement;if(c&&!(f||i instanceof Node&&c.contains(i)))return;h.preventDefault(),se.prefetch();let y=document.activeElement,{selection:S,place:T}=k.current;X(r,{pointed:{...S[0]!==void 0?{on:S[0]}:{},about:S,...T?{place:T}:{}},returnTo:y instanceof HTMLElement&&y!==document.body?y:null})};return window.addEventListener("keydown",d,!0),()=>window.removeEventListener("keydown",d,!0)},[o,r]),o?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{ref:g,hidden:!0,"data-graview-quick-ask":n}),u?(0,C.jsx)(L.Suspense,{fallback:null,children:(0,C.jsx)(Ve,{face:n,opening:u,close:()=>X(r,null)},u.at)}):null]}):null}var B=w(R(),1),O=w(A(),1),ae=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.M7DJJRFH.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.HMV4ILAC.js","./chunk.UVMHC6VM.js","./chunk.XAN7QXMQ.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.7QWGIGHM.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QVID5WHS.js")))),$e=ae.part((n,e)=>{let t=n.InlineAiMenu;return(0,O.jsx)(t,{...e})},{what:"The AI's suggestions"}),Qe=ae.part((n,e)=>{let t=n.GhostTray;return(0,O.jsx)(t,{...e})},{quiet:!0});function Ke(){let{ai:n}=b(),e=H(n);return(0,B.useMemo)(()=>e?t=>({id:"inline-ai",heading:"AI",render:r=>(0,O.jsx)(B.Suspense,{fallback:null,children:(0,O.jsx)($e,{target:t,close:r})}),prepare:()=>ae.prefetch()}):null,[e])}var Ye=[];function xn({children:n}){let e=Ke(),t=(0,B.useMemo)(()=>e?[e]:Ye,[e]);return(0,O.jsx)(G,{sections:t,children:n})}function Dn(n){let{ai:e,aiDesk:t}=b(),{ghost:r}=ye(t);return r===null||r.onCard||e.off?null:(0,O.jsx)(B.Suspense,{fallback:null,children:(0,O.jsx)(Qe,{...n})})}var W=w(R(),1);var Le=w(A(),1),Ue=n=>globalThis[Symbol.for("graview.shown-lists")]?.get(n),Ce=I(D(()=>(__graviewPreload(import.meta.url,["./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.NZFO6BM3.js"))));function Je(n){let e=n.about[0];if(n.about.length!==1||!e?.startsWith("aggregate:"))return;let t=e.slice(10).split("+");return t.length===1?t[0]:void 0}function Xe(n,e){return n.filter(t=>t.as!==e.as&&!t.hidden&&(t.kind===e.kind||t.over?.includes(e.kind)===!0)).at(-1)}function Ze(n){let e=V(),t=e?.keptViews,r=e?.views,a=(0,W.useContext)(Pe);return(0,W.useMemo)(()=>r?l=>{let p=t?.current(),o=Je(l),u=c=>c.length>0?{id:"tidy-view",items:c,prepare:()=>Ce.prefetch()}:null,g=(c,...i)=>Ce.load().then(f=>f[c](...i),()=>!1),k=(c,i)=>Ue(c)?.().menu(i,t,a)??[];if(l.place===void 0){if(l.face!=="pages"||o===void 0||l.on!==void 0)return null;let c=p?.may.lenses===!0&&t?.lens!==void 0,i=q(e.store.schema,o),f=r.arrangement?.()?.hide?.includes(o)===!0;return u([...c?[{id:f?"show-list":"hide-list",label:f?"Show":"Hide",hint:f?"Back in the places, for everyone":"Off the places, for everyone; still at its address",run:()=>void g("setListHidden",o,i,t,!f,a)}]:[],...k(`list:${o}`,c)])}let d=r.places().find(c=>c.as===l.place&&(o===void 0||c.kind===o||c.over?.includes(o)===!0));if(!d)return null;let h=t&&p?fe(d,p,t):null;return u([...h?[d.hidden?{id:"show-view",label:"Show",hint:"Back in the places, for everyone",run:()=>void g("setHidden",d,h,t,!1,a)}:{id:"hide-view",label:"Hide",hint:"Off the places and the scene, for everyone",run:()=>void g("setHidden",d,h,t,!0,a)},{id:"delete-view",label:"Delete",hint:`Kept ${30} days under Recently deleted`,run:()=>{let c=Xe(r.places(),d);g("remove",d,h,t,a).then(i=>i&&n?.(d,c))}}]:[],...k(`place:${d.as}`,h==="lens")])}:null,[t,r,a,n])}var en=[];function Wn({children:n}){let{view:e,go:t}=Q(),r=(0,W.useCallback)((p,o)=>{let u=e.within?.view;e.focusId===he(p.kind)&&(u===void 0||u===p.as)&&t(o?ge(e,o.kind,o.as):me(e,!0))},[e,t]),a=Ze(r),l=(0,W.useMemo)(()=>a?[a]:en,[a]);return(0,Le.jsx)(G,{sections:l,children:n})}var E=w(R(),1),ue=w(A(),1),N,ce=new Set,le=n=>(ce.add(n),()=>void ce.delete(n)),z=()=>(__graviewPreload(import.meta.url,["./chunk.PZHCWMKT.js","./chunk.DOJCYXIJ.js","./chunk.J65CZJIC.js","./chunk.FSZQTX3K.js","./chunk.TBY5IR7C.js","./chunk.BIDL7GQD.js","./chunk.6VG2LCES.js","./chunk.I3ADXJQW.js","./chunk.BJUUSIQY.js","./chunk.XJ4JYROM.js","./chunk.XOZU4OFA.js","./chunk.CHG522KL.js","./chunk.Q5WEOX3Q.js","./chunk.ZBK3FCVE.js","./chunk.DW6KXAUM.js","./chunk.7QWGIGHM.js","./chunk.HRLCDBMO.js","./chunk.LZNHTROY.js","./chunk.36FKQJFM.js","./chunk.RHV73CBA.js","./chunk.MIE4TJRW.js","./chunk.RP6C2IUM.js","./chunk.RD2FSSLV.js","./chunk.T552MHMU.js","./chunk.ZGJUCVT5.js","./chunk.CVVNHQPO.js","./chunk.YIDNZTON.js","./chunk.QILGAV7H.js","./chunk.I6HIVTXU.js","./chunk.PYGNO2AV.js","./chunk.3HFBHLXC.js","./chunk.CUA7F3YJ.js","./chunk.SDO3U72B.js","./chunk.IUVRJDL3.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.X4PFLIXB.js")).then(n=>{N=n,ce.forEach(e=>e())});function nn(){let n=b(),{ai:e,keptViews:t,onProposeChange:r,composeChange:a}=n,l=(0,E.useRef)(n);l.current=n;let p=r!==void 0&&a!==void 0||typeof t?.fork=="function",o=H(e)&&(typeof t?.revise=="function"||p);o&&oe(z);let u=(0,E.useSyncExternalStore)(le,()=>N!==void 0,()=>!1);return(0,E.useMemo)(()=>o?g=>g.section||g.page||g.face==="scene"&&p&&(g.on!==void 0||g.place!==void 0||g.about.length===1)?N?N.sectionFor(g,l.current):(z(),null):null:null,[o,p,u])}function Fn(n){let e=b(),t=(0,E.useRef)(e);t.current=e;let r=(0,E.useRef)(n);r.current=n;let a=e.onProposeChange!==void 0&&e.composeChange!==void 0;a&&oe(z);let l=(0,E.useSyncExternalStore)(le,()=>N!==void 0,()=>!1);return(0,E.useMemo)(()=>a?p=>!p.page||p.face!=="pages"?null:N?N.displayOptionsSection(p,t.current,r.current):(z(),null):null,[a,l])}var tn=[];function _n({children:n}){let e=nn(),t=(0,E.useMemo)(()=>e?[e]:tn,[e]);return(0,ue.jsx)(G,{sections:t,children:n})}function qn(){let n=(0,E.useSyncExternalStore)(le,()=>N?.SectionDoor,()=>{});return(0,E.useEffect)(()=>{try{sessionStorage.getItem("graview.better.from-scene")&&z()}catch{}},[]),n?(0,ue.jsx)(n,{}):null}function Kn(n={}){return n.scope===void 0?re:ve(re,n.scope)}var F=w(R(),1),s=w(A(),1);function et({inside:n=!1,widthOf:e}={}){let{store:t,view:r,emphasis:a,setEmphasis:l}=b(),p=De(),{selection:o,set:u}=$(),{show:g}=Q(),k=ke(),d=(0,F.useMemo)(()=>{let i=new Map;for(let f of t.graph.allEdges()){let y=i.get(f.kind)??{count:0,ends:new Set};y.count+=1;for(let S of[f.from,f.to]){let T=t.graph.getNode(S);T&&y.ends.add(`kind:${T.kind}`)}i.set(f.kind,y)}return[...i.entries()].sort(([f],[y])=>f.localeCompare(y)).map(([f,y])=>({kind:f,count:y.count,ends:[...y.ends]}))},[t,k]),h=Math.max(0,...d.map(i=>i.count));if((0,F.useEffect)(()=>()=>l(null),[l]),!r.overview&&!n||d.length===0)return null;let c=new Set;for(let i of o){if(i.startsWith("kind:")){c.add(i);continue}let f=t.graph.getNode(i);f&&c.add(`kind:${f.kind}`)}return(0,s.jsxs)("section",{"aria-label":"What the lines mean",role:n?"group":void 0,"data-testid":"relation-key",style:n?{display:"grid",gap:1}:{position:"absolute",left:16,top:14,zIndex:pe("rail"),display:"grid",gap:1,padding:"8px 10px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)",maxWidth:on,animation:"graview-settle 380ms 280ms ease backwards"},children:[n?null:(0,s.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.16em",textTransform:"uppercase",color:"var(--graview-ink-faint)",paddingBottom:2},children:d.length===1?"1 relation":`${d.length} relations`}),e?(0,s.jsx)(sn,{aloft:r.overview===!0}):null,d.map(({kind:i,count:f,ends:y})=>{let{connector:S,style:T}=te(p,i),v=rn(t.schema,i),m=a!==null?a===i:c.size===0||y.some(M=>c.has(M));return(0,s.jsxs)("button",{type:"button",title:t.schema.edge(i)?.description===void 0?`${f} of these`:v.words,onMouseEnter:()=>l(i),onMouseLeave:()=>l(null),onFocus:()=>l(i),onBlur:()=>l(null),onClick:()=>{u(y),g(null)},style:{all:"unset",outline:"revert-layer",cursor:"pointer",display:"grid",gridTemplateColumns:"30px 1fr auto",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px",borderRadius:6,opacity:m?1:.4},children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",style:{display:"block",opacity:S.visible?1:.35},children:r.overview&&e?(0,s.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",className:"graview-key-ribbon",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:e(f,h)}):(0,s.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",stroke:ee(T),strokeWidth:ne(T,!0),strokeDasharray:Z[T.pattern],strokeLinecap:"round"})}),(0,s.jsxs)("span",{style:{display:"grid",minWidth:0},"data-graview-relation-words":i,children:[(0,s.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink)"},children:v.words}),(0,s.jsx)("span",{style:{fontSize:"0.6875rem",color:"var(--graview-ink-faint)"},children:v.ends})]}),S.visible?null:(0,s.jsx)("span",{"data-graview-quiet":i,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontStyle:"italic"},children:"not drawn"}),(0,s.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},children:f})]},i)})]})}var on="min(280px, calc(100% - 28px))";function rn(n,e,t){let r=n.edge(e)?.from??[],a=new Map;for(let o of t!==void 0&&r.includes(t)?[t]:r.length>0?r:[""]){let u=xe(n,o,e,"out");a.set(u,[...a.get(u)??[],o])}let l=o=>o==="*"?"anything":q(n,o),p=[...a].map(([o,u])=>{let g=u.flatMap(d=>n.tryDefinition(d)?.edges[e]?.to??[]),k=u[0]&&g.length>0?`${u.map(l).join(", ")} \u2192 ${(g.includes("*")?["*"]:[...new Set(g)]).map(l).join(", ")}`:"";return[o.charAt(0).toUpperCase()+o.slice(1),k]});return{words:p.map(([o])=>o).join(" \xB7 "),ends:p.flatMap(([,o])=>o?[o]:[]).join(" \xB7 ")}}function nt({edgeKind:n,kit:e,width:t=30}){let r=V(),a=(0,F.useMemo)(()=>de(e??r?.brand?.kit),[e,r?.brand?.kit]),{connector:l,style:p}=te(a,n);return(0,s.jsx)("svg",{width:t,height:"8","aria-hidden":"true","data-testid":"relation-mark","data-graview-relation":n,style:{display:"inline-block",verticalAlign:"middle",opacity:l.visible?1:.35},children:(0,s.jsx)("path",{d:`M 1 4 L ${t-1} 4`,fill:"none",stroke:ee(p),strokeWidth:ne(p,!0),strokeDasharray:Z[p.pattern],strokeLinecap:"round"})})}function sn({aloft:n}){let e={display:"grid",gridTemplateColumns:"30px 1fr",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px"},t={fontSize:"0.75rem",color:"var(--graview-ink-muted)"};return(0,s.jsxs)("div",{role:"group","aria-label":"The lines","data-testid":"line-manners",style:{display:"grid",gap:1,paddingBottom:6,marginBottom:4,borderBottom:"1px solid var(--graview-edge)"},children:[n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:e,"data-graview-manner":"ribbon",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:6})}),(0,s.jsx)("span",{style:t,children:"A relation between two districts, as wide as the links along it \u2014 point at one for its words"})]}),(0,s.jsxs)("div",{style:e,"data-graview-manner":"record",children:[(0,s.jsxs)("svg",{width:"30",height:"10","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M 1 5 L 25 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeLinecap:"round"}),(0,s.jsx)("circle",{cx:26,cy:5,r:3,fill:"var(--graview-accent)"})]}),(0,s.jsx)("span",{style:t,children:"A chosen record's link to another record, labeled with the relation"})]}),(0,s.jsxs)("div",{style:e,"data-graview-manner":"district",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeDasharray:"5 4"})}),(0,s.jsx)("span",{style:t,children:"A chosen record's links into a district, with how many"})]})]}):null,(0,s.jsxs)("div",{style:e,"data-graview-manner":"unsure",children:[(0,s.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeOpacity:Te,strokeWidth:1.8,strokeDasharray:Ee,strokeLinecap:"round"})}),(0,s.jsx)("span",{style:t,children:"Unsure: a link its maker was less than sure of, until a person keeps it \u2014 point at its words for what it was based on"})]})]})}export{dn as a,hn as b,Sn as c,et as d,on as e,nt as f,Ke as g,xn as h,Dn as i,Ze as j,Wn as k,nn as l,Fn as m,_n as n,qn as o,Kn as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as $}from"./chunk.RECTEAG4.js";import{a as C}from"./chunk.HMV4ILAC.js";import{l as M}from"./chunk.YIDNZTON.js";import{Yb as x,ma as k,na as v,oa as j}from"./chunk.IUVRJDL3.js";function N(a,s){let c=a.tryDefinition(s),r=Object.keys(c?.fields?.shape??{}),m=[c?.lifecycle?.field,...r.filter(l=>/^(status|stage|state|phase)$/i.test(l))].filter(l=>l!==void 0&&r.includes(l));return[...new Set(m)].slice(0,1)}function P(a,s){return a.tryDefinition(s)?.fieldRoles?.title??"label"}function V(a,s,c={}){let r=s.map(e=>a.graph.getNode(e)).filter(e=>e!==void 0);if(r.length===0)return{acts:[],withheld:[]};let u=c.principal??{kind:"human"},m=C(a,r.map(e=>e.id),{...c.derive,principal:u,...c.context?{context:c.context}:{}}),l=new Map(a.allMutations().map(e=>[e.name,e])),g=[...new Set(r.map(e=>e.kind))],p=new Set(g.map(e=>P(a.schema,e))),h=new Set(m.affordances.filter(e=>e.provider==="schema").map(e=>e.mutation)),o=e=>{let n=l.get(e.mutation);if(!n?.subject)return;let t=r.length===1&&e.provider==="invariant"&&!h.has(e.mutation)&&e.args[n.subject.arg]===r[0].id;if(!(e.provider!=="schema"&&!t)&&!(r.length>1&&e.batch?.length!==r.length)&&n.derived?.act!=="edit"&&!e.open.some(i=>p.has(i.name)))return n},y=[],b=new Set;for(let e of m.affordances){let n=o(e);if(!n||b.has(n.name))continue;b.add(n.name);let{[n.subject.arg]:t,...i}=e.args;y.push({id:e.id,label:v(n),mutation:n.name,subject:n.subject.arg,args:i,open:e.open,...e.destructive||e.setsAside?{more:!0}:{},...e.destructive?{destructive:!0}:{},affordance:{...e,label:v(n)}})}if(g.length===1){let e=g[0];for(let n of N(a.schema,e))for(let t of $(a.schema,[...l.values()],e,n)){if(t.by==="none"||r.every(d=>d[n]===t.value))continue;let i=r.find(d=>d[n]!==t.value),f=t.acts.find(d=>{let D=t.by==="step"?{[d.subject.arg]:i.id}:{[d.subject.arg]:i.id,[n]:t.value};return a.permits({name:d.name,args:D},u).ok});if(!f)continue;let w=t.by==="step"?{}:{[n]:t.value};if(t.by==="step"&&y.some(d=>d.mutation===f.name))continue;let R=t.by==="step"?v(f):`Move to ${t.label}`,O=`set:${n}:${t.value}`;y.push({id:O,label:R,mutation:f.name,subject:f.subject.arg,args:w,open:[],affordance:{id:O,label:R,provider:"schema",mutation:f.name,args:{[f.subject.arg]:i.id,...w},open:[],score:0,why:`every one is ${e}`,nodeIds:r.map(d=>d.id)}})}}let S=[...y.filter(e=>!e.more),...y.filter(e=>e.more)],A=m.withheld.filter(e=>{let n=l.get(e.mutation);return n?.subject!==void 0&&n.derived?.act!=="edit"&&(r.length===1||e.batch?.length===r.length)}).map(e=>({label:v(l.get(e.mutation)),message:e.refusal.message}));return{acts:S,withheld:A}}function _(a,s,c,r={}){let u=r.author,m=a.allMutations().find(e=>e.name===s.mutation),l=e=>M(a.schema,a.allMutations(),e),g=e=>{let n=a.graph.getNode(e);return n?k(a.schema.tryDefinition(n.kind),n):e},p=[],h=[],o=[];for(let e of[...new Set(c)]){let n={name:s.mutation,args:{...s.args,[s.subject]:e}};if(!m){p.push({id:e,label:g(e),message:`There is no act \u201C${s.mutation}\u201D.`,reason:"invalid"});continue}let t=a.permits(n,u);if(!t.ok){p.push({id:e,label:g(e),message:t.refusal.message,reason:"forbidden"});continue}if(!a.wouldChange(n,u)){h.push(e);continue}o.push({id:e,call:n})}let y=e=>a.previewAll(e,{...u?{author:u}:{},...r.context?{context:r.context}:{}});for(let e=0;o.length>0;e+=1)try{y(o.map(n=>n.call));break}catch(n){let t=[];for(let i of o)try{y([i.call]),t.push(i)}catch(f){p.push({id:i.id,label:g(i.id),message:l(f),reason:x(f).reason})}if(t.length===o.length||e>o.length){for(let i of t)p.push({id:i.id,label:g(i.id),message:l(n),reason:x(n).reason});o=[];break}o=t}if(o.length===0)return{applied:[],unchanged:h,refused:p};let b=s.label??(m?v(m):s.mutation),S=[...new Set(o.map(e=>a.graph.getNode(e.id)?.kind))],A=`${b} \u2014 ${S.length===1&&S[0]?j(a.schema,S[0],o.length):`${o.length} records`}`;try{let e=a.applyAll(o.map(n=>n.call),{intent:A,...u?{author:u}:{},...r.via?{via:r.via}:{}});return{batch:e.batch,intent:A,applied:o.map(n=>n.id),unchanged:h,refused:p,result:e}}catch(e){let n=l(e),t=x(e).reason;return{applied:[],unchanged:h,refused:[...p,...o.map(i=>({id:i.id,label:g(i.id),message:n,reason:t}))],allOrNothing:!0}}}export{V as a,_ as b};
|